hermes-agent/optional-skills/creative/baoyu-article-illustrator/PORT_NOTES.md
Siddharth Balyan 5eea87882a
Clarify: one question shape and one result shape on every surface (skip, cancel, timeout and undelivered are told apart) (#127760)
* refactor(desktop): split clarify-tool.tsx into a clarify/ folder

Pure moves, no behaviour change. Parsing, the question-card core
(shell, choice rows, question block), the delivery watchdog, and each
pending/settled card get their own file so the core can be reused.

* feat(clarify): one questions[] shape with per-question status and one outcome

The clarify tool now takes only questions=[{question, choices?, multi_select?}].
A wrong shape is a tool error that names the right one, so a model that
sends the old top-level question/choices corrects itself on the next call.

Every result has the same shape on every surface: each response carries
status (answered, skipped, unanswered) with user_response null unless
answered, and the result carries one outcome (submitted, cancelled,
timed_out, undelivered) plus an optional surface-written notice. The
timeout and cancel sentences that used to pose as the user's answer are
gone, and the compressor reads status instead of matching their prefixes.

The callback contract is callback(questions) -> {answers, outcome, notice?}
(None = skipped, missing qid = unanswered). tui_gateway settles a batch the
same way for the last lock, a cancel, an interrupt and the deadline, and
clarify.lock keeps a null answer as a skip. A multi-select answer that is
not a JSON array counts as one typed ("Other") answer. The tool-row preview
reads the first question.

* feat(clarify): every surface asks through the one question card

CLI: the batch panel is the only panel; Enter on an empty field skips a
question, Ctrl+C cancels and keeps the locked answers, the deadline returns
timed_out. -q and -z return undelivered with a no-user notice.

Ink TUI: the single-question prompt is gone; the card supports multi-select
(Space or a digit toggles, Enter locks, typed Other text joins the picks),
an empty submit skips, Esc cancels, and "Batch" names are dropped.

Desktop: the single-question card is deleted and its keyboard handling moved
into the one card (arrows, letters and digits, auto-advance, Enter picks then
confirms). Confirm enables at one answer; blank questions lock null; Skip and
a composer message cancel; the settled card shows No answer for unanswered
questions. The bots room card follows the same contract.

Messaging: one card per question with a "Reply skip to skip" line in every
locale; timeouts and delivery failures map to timed_out and undelivered.

* fix(clarify): cancelled for a released messaging card, labels win over the skip word

A prose reply to a messaging choice card, /new and session end released
the wait with "", which read as timed_out. They now resolve with a
CANCELLED marker and the tool gets outcome cancelled.

A typed reply that matches a choice label ("Skip") now resolves to that
choice; the skip word applies only when no choice matches.

The bots room card sends the picked labels as they are; the tool already
strips the recommendation label. Unused OUTCOMES and a new docstring and
comment are removed.

* fix(tui): re-editing a multi-select answer keeps its picks

The Ink card stored a multi-select answer as display text ("A, B"), so
revisiting the question put the whole string into Other and re-locked it
as one item. The answers map now keeps the raw JSON array, the card
restores the picks on revisit, and only the display lines format it.

Comments that earlier edits reworded are restored to their original
words, minus the phrases the change made wrong. The compute-host clarify
lock accepts None for a skipped question.

* test(clarify): align three checks with the one-answer confirm and the regenerated keys

The desktop Cmd+Enter test now expects a send with one answer (the blank
question locks null), the compressor test expects the single-answer summary
the code gives, and locales/_keys.desktop.json is regenerated for the
removed and added clarify strings.

* test(tui): the one-question card header is singular
2026-09-29 18:33:44 +05:30

3.3 KiB
Raw Permalink Blame History

Port Notes — baoyu-article-illustrator

Ported from JimLiu/baoyu-skills v1.57.0.

Changes from upstream

SKILL.md, references/workflow.md, references/usage.md, references/style-presets.md, references/styles.md, references/prompt-construction.md, and prompts/system.md were adapted. The 23 style files and 4 palette files are verbatim copies. The references/config/ directory was removed entirely.

Adaptations

Change Upstream Hermes
Metadata namespace openclaw hermes
Trigger /baoyu-article-illustrator slash command + CLI flags Natural language skill matching
User config EXTEND.md (project/user/XDG paths) + first-time-setup Removed — not part of Hermes infra
User prompts AskUserQuestion (batched, multi-question) clarify tool (batched, up to 5 questions)
Image generation baoyu-imagine (Bun/TypeScript, multi-provider, accepts --ref, writes to local path) image_generate (returns URL only; agent downloads via terminal/curl)
Backend selection User picks provider via CLI flags Not agent-selectable — image_generate uses the user-configured FAL model. Removed hardcoded "nano banana pro" line from prompts/system.md.
Reference images Passed to backend via --ref, copied via shell vision_analyze extracts a textual description (binary never touched by write_file/read_file); description is embedded in prompts. Optional terminal cp for a local record.
Platform support Linux/macOS/Windows/WSL/PowerShell Linux/macOS only
File operations Bash commands Hermes file tools: write_file/read_file for text, terminal for binaries and URL downloads, vision_analyze for reading images
Watermark Driven by EXTEND.md watermark.enabled Optional — user asks for it per-article
Output directory EXTEND.md default_output_dir (imgs-subdir / same-dir / illustrations-subdir / independent) Defaults based on input type; user overrides in request

What was preserved

  • Type × Style × Palette three-dimension framework
  • All style definitions (23 files, verbatim)
  • All palette definitions (4 files, verbatim)
  • Core reference files (workflow, prompt-construction, styles, style-presets) — adapted for Hermes tooling
  • Core principles and workflow structure (analyze → confirm → outline → prompts → generate)
  • Prompt-file-as-reproducibility-record discipline
  • Author, version, homepage attribution

Syncing with upstream

To pull upstream updates:

# Compare versions
curl -sL https://raw.githubusercontent.com/JimLiu/baoyu-skills/main/skills/baoyu-article-illustrator/SKILL.md | head -5
# Look for version: line

# Diff style/palette files (safe to overwrite — unchanged from upstream)
diff <(curl -sL https://raw.githubusercontent.com/JimLiu/baoyu-skills/main/skills/baoyu-article-illustrator/references/styles/blueprint.md) references/styles/blueprint.md

references/styles/* and references/palettes/* can be overwritten directly. SKILL.md, references/workflow.md, references/usage.md, references/style-presets.md, references/styles.md, references/prompt-construction.md, and prompts/system.md must be manually merged since they contain Hermes-specific adaptations (tool wiring, backend neutrality, removed EXTEND.md references).