--- name: annotation description: "Fix UI from a hand-drawn red-mark screenshot: file an [review] annotation task, read marks/note, apply the change." version: 1.0.0 license: MIT metadata: hermes: tags: [review, annotation, screenshot, ui, human-in-the-loop] category: workflow phase: fix role: author abstract_roles: [role:visual-reviewer, role:builder] recommended_role: role:visual-reviewer quality_tier: evidence-based --- # Annotation (take UI corrections as red marks on a screenshot) Post-implementation UI checks arrive as **red marks on an image**, not as prose complaints. The human draws lines, boxes and arrows on a screenshot plus a short note, and the app turns that into a `.annotation.json` with coordinates (`marks` + `note`). The agent reads it and **fixes exactly the place that was pointed at**. This skill ships with the **`hermes-pilot` plugin**. Data lives in `~/.hermes/plugin-data/hermes-pilot/review/` (override with `HP_DATA_DIR`). ## Language Write user-facing prose in the run's UI language — sheet title/topic/question/option text, SPEC prose, and the comments and summaries you post. Keep machine tokens ASCII and unchanged: `label=`, `sheet=`, `mode=`, `round=`, `target=`, task ids, file paths, and the SPEC keys **Execution Mode** / **Objective** / **Files** / **Verify**. This is `LANGUAGE_RULE_MARKER` / `LANGUAGE_RULE_EN` in `apps/bridge/src/language-rule.js`; `apps/bridge/test/languageRule.test.js` keeps this section and the bridge prompt identical. When the run's language is Japanese, only the prose switches to Japanese (JA variant in the same module); the machine line and paths stay ASCII. The rule covers the sheet you write and every prose line you post to the board, including the 1-line `complete --summary`. ## When to use it - You want a human eye to settle the look after implementation (spacing, wrapping, colour, overlap) - Explaining it in prose would be long or ambiguous ("here" means nothing) - Redlining a PWA screenshot is the shortest path (a `390x844` capture already exists) Do not use it: fix unique defects yourself (failing test, exception, type error). ## Abstract roles, delegation and fallback (model-agnostic) This skill is **model-agnostic**. Never write a specific model name, provider name, pricing plan or personal path here. "Which abstract role maps to which real model" is owned by the device profile (profile memory / the assignment table in `SOUL.md`). - `role:visual-reviewer` — a separate lane from implementation. Reading screenshot diffs (`.before.png` / `.after.png`) and redlined images (`.annotated.png`), turning coordinates into words, and visual sign-off at `390x844` / `820x1180`. **The primary role for this skill.** - `role:builder` — implementing the fix at the identified spot, `npm run deploy`, `npm run verify`. - `role:decision-framer` — question design when "how far do we fix" branches (hand off to `quick-review`). - `role:planner` — when the red marks span several components or states and root-causing is complex. ### Native delegation and fallback 1. Reading the image in step B is best **delegated to `role:visual-reviewer` via `delegate_task`**. Pass image paths in `images`, and name the role plus "return the pointed region name and the evidence" in `goal` / `context`. 2. Children are **read-only advisers**. They do not edit files, commit or run `npm run deploy`. Applying and verifying is the parent's job (`role:builder`). 3. If delegation fails (error / rate limit / timeout / no multimodal / no delegation tool), **do not stop**. Identify the spot yourself from the `marks` coordinate array (0–1 normalised) and `note` in `.annotation.json`, and finish the fix. Coordinates substitute for reading the image. 4. Leave one line in a `comment` recording that you fell back. ### Hard boundary: no external AI CLIs Do not spawn external AI CLIs such as the `gemini` CLI (`gemini -p`, …) or `agy -p` to read images (this covers `spawn` / `execFile` / `exec`). Delegation means the Hermes native API provider plus `delegate_task` only. Runtime code is machine-checked by `npm run check:oauth`. ## Path A: file the annotation task yourself (the screenshot side) ### 1. Capture (only for changes that alter the UI) - Run `npm run deploy` **first** (the bridge serves `apps/web/dist`; without a build you photograph the old screen) - Capture: PWA at `390x844` (`820x1180` for tablet checks) - Location: `~/.hermes/plugin-data/hermes-pilot/review/shots/