You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/skills/apply-annotations/SKILL.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,22 @@ description: Apply pending studio annotations from a Rustmotion scenario — for
5
5
6
6
# Apply Annotations
7
7
8
-
Use this when a Rustmotion scenario has an `annotations` array (created in the studio's "Leave a comment for the agent" box) to apply.
8
+
Use this when a Rustmotion scenario has annotations (created in the studio's "Leave a comment for the agent" box) to apply.
9
+
10
+
## Where annotations live
11
+
12
+
-**JSON scenarios** (`foo.json`): in the scenario file's top-level `annotations` array.
13
+
-**HTML scenarios** (`foo.html` / `foo.htm`): in a sidecar file next to the source — `foo.annotations.json` — holding `{"annotations": [...]}` with exactly the same annotation object format. The HTML file itself never contains annotations. Always check for the sidecar when the source is HTML.
9
14
10
15
## Process
11
16
12
-
1. Read the scenario file's `annotations` array. For each entry with `status: "open"`:
17
+
1. Read the `annotations` array — from the scenario JSON, or from `<stem>.annotations.json` for HTML sources. For each entry with `status: "open"`:
13
18
-`target.pointer` is an RFC 6901 JSON Pointer to the element (e.g. `/scenes/2/children/5`).
14
19
-`note` is the change request.
15
20
-`frame` / `view` / `scene` give the moment in the video; `target.kind` is the component type (`text`, `card`, …).
16
-
2. For each open annotation, **apply the requested change** by editing the element at `target.pointer` — usually a property under its `style` object — interpreting `note`. Make the smallest edit that satisfies the note.
21
+
2. For each open annotation, **apply the requested change** by editing the element at `target.pointer` — usually a property under its `style` object — interpreting `note`. Make the smallest edit that satisfies the note. For HTML sources, the pointer addresses the **transpiled** scenario structure; apply the change in the HTML source (inline `style` attribute of the corresponding element).
17
22
3. After each edit, run `rustmotion validate -f <file>` (schema + geometry). Both passes must succeed. If geometry fails (e.g. `unwrappable_text_overflow`), adjust (keep `wrap: true`, lower a `font-size`, …) and re-validate.
18
-
4. Set the annotation's `status` to `"resolved"` (do not delete it — the studio panel and `validate --fix` can strip resolved ones later).
23
+
4. Set the annotation's `status` to `"resolved"`**in the same place you found it** — the scenario JSON, or the `<stem>.annotations.json` sidecar for HTML sources (do not delete it — the studio panel and `validate --fix` can strip resolved ones later).
19
24
5. Report a short summary: which annotations were applied and what changed.
0 commit comments