@erclx/canon 5.24.0 → 5.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/README.md +2 -1
  2. package/claude/.claude-plugin/plugin.json +1 -1
  3. package/claude/skills/backlog-triage/REQUIREMENT.md +2 -2
  4. package/claude/skills/backlog-triage/SKILL.md +19 -6
  5. package/claude/skills/canvas/REQUIREMENT.md +49 -0
  6. package/claude/skills/canvas/SKILL.md +106 -0
  7. package/claude/skills/context-fold/REQUIREMENT.md +6 -2
  8. package/claude/skills/context-fold/SKILL.md +8 -6
  9. package/claude/skills/context-fold/references/anchor-sweep.md +2 -2
  10. package/claude/skills/design-extract/REQUIREMENT.md +1 -1
  11. package/claude/skills/design-taste/REQUIREMENT.md +1 -1
  12. package/claude/skills/design-taste/SKILL.md +4 -2
  13. package/claude/skills/design-taste/references/adopted.md +40 -0
  14. package/claude/skills/design-taste/references/kinds.md +1 -1
  15. package/claude/skills/design-taste/references/systems.md +1 -7
  16. package/claude/skills/design-taste/references/tells.md +2 -24
  17. package/claude/skills/docs-sync/REQUIREMENT.md +2 -1
  18. package/claude/skills/document-health/REQUIREMENT.md +2 -0
  19. package/claude/skills/document-health/SKILL.md +21 -0
  20. package/claude/skills/document-health/references/axes.md +12 -0
  21. package/claude/skills/draft-and-pick/SKILL.md +1 -1
  22. package/claude/skills/draft-doc/REQUIREMENT.md +1 -1
  23. package/claude/skills/draft-figure/REQUIREMENT.md +14 -3
  24. package/claude/skills/draft-figure/SKILL.md +24 -51
  25. package/claude/skills/draft-figure/references/architecture-set.md +35 -0
  26. package/claude/skills/draft-figure/references/hand-drawn.md +31 -0
  27. package/claude/skills/draft-figure/references/mermaid.md +55 -0
  28. package/claude/skills/draft-identity/SKILL.md +1 -1
  29. package/claude/skills/draft-screencast/SKILL.md +9 -7
  30. package/claude/skills/draft-slides/REQUIREMENT.md +17 -12
  31. package/claude/skills/draft-slides/SKILL.md +31 -20
  32. package/claude/skills/git-followup/SKILL.md +17 -6
  33. package/claude/skills/git-issue/references/issue.md +10 -0
  34. package/claude/skills/git-pr/references/evidence.md +12 -2
  35. package/claude/skills/git-pr/references/labels.md +12 -0
  36. package/claude/skills/git-split/SKILL.md +19 -8
  37. package/claude/skills/index-lookup/SKILL.md +2 -2
  38. package/claude/skills/markdown-propose/references/format.md +9 -0
  39. package/claude/skills/memory-review/references/later-phases.md +7 -0
  40. package/claude/skills/review-address/SKILL.md +6 -13
  41. package/claude/skills/review-address/references/rest-reads.md +43 -0
  42. package/claude/skills/review-craft/references/ui.md +7 -1
  43. package/claude/skills/review-pr/REQUIREMENT.md +1 -0
  44. package/claude/skills/review-pr/SKILL.md +9 -3
  45. package/claude/skills/review-pr/references/close-out.md +2 -2
  46. package/claude/skills/review-pr/references/post.md +17 -5
  47. package/claude/skills/review-pr/references/scope.md +10 -8
  48. package/claude/skills/review-ui/SKILL.md +12 -4
  49. package/claude/skills/review-ui/references/post.md +4 -2
  50. package/claude/skills/role-orchestrator/references/orchestrator-cloud-launch.md +38 -1
  51. package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +13 -0
  52. package/claude/skills/role-orchestrator/references/orchestrator-launch.md +4 -0
  53. package/claude/skills/role-orchestrator/references/orchestrator-poll.md +4 -4
  54. package/claude/skills/role-orchestrator/references/orchestrator-review-dispatch.md +6 -0
  55. package/claude/skills/role-orchestrator/scripts/poll.ts +90 -27
  56. package/claude/skills/role-orchestrator/scripts/repo.ts +3 -5
  57. package/claude/skills/role-orchestrator/scripts/watch.ts +4 -7
  58. package/claude/skills/search-craft/REQUIREMENT.md +1 -1
  59. package/claude/skills/search-craft/SKILL.md +3 -1
  60. package/claude/skills/search-craft/references/adopted.md +30 -0
  61. package/claude/skills/target-setup/references/detect.md +8 -0
  62. package/claude/skills/target-setup/references/indexes.md +13 -0
  63. package/claude/skills/target-setup/references/verify.md +8 -0
  64. package/claude/skills/test-first/SKILL.md +2 -0
  65. package/claude/skills/test-first/references/adopted.md +36 -0
  66. package/claude/skills/write-human/SKILL.md +1 -1
  67. package/claude/skills/write-human/references/machine-tells.md +13 -0
  68. package/docs/agents/canvas.md +4 -2
  69. package/docs/agents/capture.md +1 -1
  70. package/docs/agents/commands.md +47 -47
  71. package/docs/agents/context-audit-checks.md +2 -2
  72. package/docs/agents/index.md +2 -3
  73. package/docs/agents/key-changes.md +3 -3
  74. package/docs/agents/pr-evidence.md +11 -2
  75. package/docs/agents/pr-reads.md +5 -4
  76. package/docs/agents/records-stale.md +22 -9
  77. package/docs/agents/records.md +1 -1
  78. package/docs/agents/sandbox.md +1 -1
  79. package/docs/agents/skills-audit.md +10 -3
  80. package/docs/agents/slides.md +15 -3
  81. package/docs/target/projects.md +4 -4
  82. package/docs/workflow/ai-workflow.md +1 -2
  83. package/docs/workflow/index.md +1 -0
  84. package/docs/workflow/parallel-features.md +1 -1
  85. package/docs/workflow/skill-map-on-request.md +42 -0
  86. package/docs/workflow/skill-map.md +3 -36
  87. package/docs/workflow/visual-design-workflow.md +1 -0
  88. package/governance/renames.toml +0 -4
  89. package/governance/rules/standards/markdown.md +1 -0
  90. package/package.json +1 -2
  91. package/scripts/core/install-check.sh +1 -1
  92. package/scripts/lib/sandbox-dispatch.sh +1 -1
  93. package/scripts/lib/sandbox-git.sh +1 -9
  94. package/scripts/lib/sandbox-path.sh +1 -1
  95. package/scripts/sandbox-hook.sh +99 -0
  96. package/src/audits/catalog.ts +2 -2
  97. package/src/canvas/capture.ts +1 -9
  98. package/src/canvas/client/inspector/color-field.tsx +368 -0
  99. package/src/canvas/client/inspector/field.tsx +200 -0
  100. package/src/canvas/client/inspector/fields.css +292 -0
  101. package/src/canvas/client/inspector/section.tsx +27 -0
  102. package/src/canvas/client/inspector/values.ts +183 -0
  103. package/src/canvas/client/inspector.tsx +176 -160
  104. package/src/canvas/client/shell.css +0 -101
  105. package/src/capture/render.ts +45 -7
  106. package/src/capture/sources.ts +43 -0
  107. package/src/census/count.ts +1 -1
  108. package/src/claude/cases/misc.ts +5 -0
  109. package/src/claude/cases/workflow.ts +6 -1
  110. package/src/claude/seeds.ts +1 -2
  111. package/src/claude/skills-audit.ts +68 -14
  112. package/src/client-commands.ts +1 -1
  113. package/src/commands/claude.ts +27 -2
  114. package/src/commands/design.ts +2 -64
  115. package/src/commands/feedback.ts +3 -3
  116. package/src/commands/pr.ts +219 -202
  117. package/src/commands/records.ts +88 -6
  118. package/src/commands/sandbox.ts +50 -10
  119. package/src/commands/slides.ts +31 -77
  120. package/src/context/audit.ts +8 -7
  121. package/src/design/tokens.ts +2 -18
  122. package/src/docs/read.ts +1 -1
  123. package/src/{github.ts → feedback/github.ts} +1 -1
  124. package/src/gate/measures.ts +6 -4
  125. package/src/gov/citations.ts +1 -1
  126. package/src/gov/payload.ts +1 -1
  127. package/src/gov/superseded.ts +2 -2
  128. package/src/help.ts +2 -2
  129. package/src/markdown/ceiling.ts +1 -1
  130. package/src/migrate/skill-names.ts +7 -1
  131. package/src/pr/evidence.ts +25 -5
  132. package/src/pr/rest.ts +137 -0
  133. package/src/record-root.ts +1 -0
  134. package/src/records/backup.ts +1 -0
  135. package/src/records/push-guard.ts +1 -1
  136. package/src/records/stale-canonical.ts +146 -0
  137. package/src/records/stale.ts +1 -1
  138. package/src/sandbox/hooks.ts +128 -0
  139. package/src/sandbox/provision.ts +596 -0
  140. package/src/sandbox/tree.ts +103 -4
  141. package/src/secrets/marker.ts +2 -2
  142. package/src/secrets/scan.ts +1 -1
  143. package/src/shipped/references.ts +2 -2
  144. package/src/slides/convert/export.ts +2 -16
  145. package/src/slides/decks.ts +110 -0
  146. package/src/standards/read.ts +1 -1
  147. package/src/sync/seeds-report.ts +1 -1
  148. package/src/tasks/answers.ts +1 -1
  149. package/src/tasks/archive.ts +1 -1
  150. package/src/teach/nav.ts +1 -1
  151. package/src/tooling/inject.ts +1 -1
  152. package/src/web/readme-citations.ts +1 -1
  153. package/standards/architecture.md +1 -0
  154. package/standards/canvas.md +112 -0
  155. package/standards/context.md +2 -1
  156. package/standards/figures.md +0 -1
  157. package/standards/index.md +1 -1
  158. package/standards/markdown.md +1 -0
  159. package/standards/mermaid.md +1 -7
  160. package/standards/requirements.md +2 -0
  161. package/standards/skill-practice.md +2 -1
  162. package/standards/skill.md +1 -0
  163. package/tooling/claude/reference.md +0 -5
  164. package/claude/skills/draft-diagram/REQUIREMENT.md +0 -45
  165. package/claude/skills/draft-diagram/SKILL.md +0 -177
  166. package/docs/agents/design-board.md +0 -33
  167. package/governance/rules/standards/diagrams.md +0 -14
  168. package/governance/rules/standards/mermaid.md +0 -15
  169. package/scripts/core/check-gallery-exclusion.sh +0 -50
  170. package/scripts/manage-sandbox.sh +0 -472
  171. package/src/design/board.ts +0 -576
  172. package/src/slides/layouts.ts +0 -478
  173. package/src/slides/parse.ts +0 -84
  174. package/src/slides/render.ts +0 -110
  175. package/src/slides/styles.ts +0 -96
  176. package/standards/diagrams.md +0 -132
  177. package/tooling/claude/seeds/.claude/diagrams/index.md +0 -8
  178. /package/claude/skills/write-human/references/{source-material.md → adopted.md} +0 -0
  179. /package/src/{commands/feedback-format.ts → feedback/body.ts} +0 -0
  180. /package/src/{github-format.ts → feedback/github-format.ts} +0 -0
  181. /package/src/{frontmatter.ts → markdown/frontmatter.ts} +0 -0
  182. /package/src/{binary.ts → sweep/binary.ts} +0 -0
  183. /package/src/{exempt-marker.ts → sweep/exempt-marker.ts} +0 -0
  184. /package/src/{paths.ts → tasks/paths.ts} +0 -0
  185. /package/src/{seed-marker.ts → tooling/seed-marker.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: draft-figure
3
- description: Why a figure decides between Mermaid and freehand SVG before drawing, and why only the Mermaid path carries a render-verification loop
3
+ description: Why a figure decides between Mermaid, an architecture view, and freehand SVG before drawing, and why the Mermaid path carries a render-verification loop
4
4
  ---
5
5
 
6
6
  # Draft figure requirement
@@ -11,18 +11,24 @@ Without this skill, a session asked for a figure reaches for whichever path it t
11
11
 
12
12
  A teach lesson breaks the Mermaid path outright. The lesson letters its figures in a hand font the renderer cannot load, so the render sizes every label in a narrower fallback face and the lesson clips the text it actually shows. The check then reads the standalone image, rendered in that same fallback, and passes a figure the reader sees clipped. Both happened on one lesson, where every group title clipped mid-word and only a capture taken inside the lesson showed it.
13
13
 
14
+ An architecture view asked for one at a time fails its own way. A session asked to refresh one view redraws every view beside it, so pictures nobody checked change in the same commit and the reviewer cannot tell which one the pass was about. It reaches for C4, state, or class diagrams that render differently in every viewer. A Mermaid source can satisfy every rule in the standard and still render as a picture asserting something false about the system, so a session that judges the source and calls it verified has spent the only signal a reader has on a picture nobody looked at.
15
+
14
16
  The color failure is the quiet one. Mermaid's own theme writes literal hex values, and a figure carrying one stops re-coloring itself the moment the host page switches its palette, which the figure standard's own accessibility bar rules out.
15
17
 
16
18
  ## Must
17
19
 
18
20
  - Apply the standard's earn-its-place bar before drawing anything
19
21
  - Decide between the Mermaid path and the freehand path by whether the subject reduces to a graph, not by which is faster to produce
22
+ - Draw an architecture view from its named source signal, inside `flowchart` and `sequenceDiagram`, and render it through the Mermaid path
23
+ - Draw only the view the request names, leaving every other figure in the destination untouched
20
24
  - Draw a figure bound for a teach lesson freehand whatever its shape, since the lesson's hand font is one the renderer cannot measure
21
25
  - Verify a figure bound for a rendered page by capturing it inside that page, and fall back to the standalone render only where the destination has no page to load
22
26
  - Keep the scoped overflow style as the documented fallback for a clipped group title wherever the Mermaid path still runs
23
27
  - Render the Mermaid path with the hand-drawn look and the figure font stack, never with Mermaid's default look
24
28
  - Rewrite every literal color the renderer wrote into the custom property the host stylesheet defines
25
- - Read the Mermaid render back and judge it against what the figure means to say, the same verification `draft-diagram` runs for the architecture surface
29
+ - Read the Mermaid render back and judge it against what the figure means to say, rather than judging the source
30
+ - Read the node labels by hand, since no hook checks inside a fence
31
+ - Cite only code paths that exist in an architecture view's caption or prose
26
32
  - Wrap either path in a `<figure>` and `<figcaption>` and give it an accessible name
27
33
 
28
34
  ## Must not
@@ -33,16 +39,21 @@ The color failure is the quiet one. Mermaid's own theme writes literal hex value
33
39
  - Report a clean verification when the Mermaid render was skipped or a defect survived
34
40
  - Loop past two correction passes on a surviving defect
35
41
  - Commit a scratch render. Only the SVG that ships in the destination document survives
42
+ - Redraw a figure the request did not name, or report one as drawn when it was left alone
43
+ - Leave an architecture view as an unrendered fence
36
44
 
37
45
  ## Guards
38
46
 
39
47
  - No subject given: stop, since nothing states what the figure has to show
40
48
  - No destination document given: stop, since the figure has nowhere to land
41
49
  - Subject does not clear the earn-its-place bar: stop rather than drawing decoration
50
+ - An architecture view with no planning file and no folder structure to scan: stop, because nothing anchors it
51
+ - Render fails for any reason: continue to the output and name the skipped check. A missing renderer degrades the loop rather than failing it.
42
52
 
43
53
  ## Out of scope
44
54
 
45
- - The toolkit's own `.canon/diagrams/` architecture surface, which shares no code, font, or visual language with this convention: `draft-diagram`
46
55
  - Mermaid's own layout, budgets, and label rules for the fence itself: the mermaid standard, cited rather than restated here
47
56
  - A UI wireframe or screen mockup: `draft-doc`
57
+ - Design tokens and the visual system: `design-extract`
58
+ - Implementation detail behind an architecture view, which belongs in a context entry the caption points at
48
59
  - Which lesson needs a figure and where it sits among the lesson's blocks: `teach-workspace`, which calls this skill to draw one
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: draft-figure
3
- description: Drafts one hand-drawn figure for a document, deciding whether the subject is Mermaid-shaped or needs freehand SVG, then draws it. Renders the Mermaid path through Mermaid's own hand-drawn look, reads the render back, and fixes what it exposes. Wraps either path in the figure standard's caption, color, and accessibility rules. Use when asked to "draw a figure", "add a hand-drawn diagram", "draft a figure for this doc", or "draw this relationship as a figure". Do NOT use for the toolkit's own `.canon/diagrams/` architecture surface, which is `draft-diagram`, or for a UI wireframe, which is `draft-doc`.
3
+ description: Drafts one hand-drawn figure for a document, deciding whether the subject is Mermaid-shaped, an architecture view, or needs freehand SVG, then draws it. Renders the Mermaid path through Mermaid's own hand-drawn look, reads the render back, and fixes what it exposes. Wraps every path in the figure standard's caption, color, and accessibility rules. Use when asked to "draw a figure", "add a hand-drawn diagram", "draft a figure for this doc", "draw this relationship as a figure", "draw the architecture", "diagram the system", or "show the components". Do NOT use for a UI wireframe, which is `draft-doc`, or for design tokens, which is `design-extract`.
4
4
  ---
5
5
 
6
6
  # Draft figure
7
7
 
8
- Decide whether a requested figure reduces to a graph Mermaid can draw, or needs freehand SVG, then draw it and verify what a reader will actually see.
8
+ Decide whether a requested figure reduces to a graph Mermaid can draw, is one of the architecture views, or needs freehand SVG, then draw it and verify what a reader will actually see.
9
9
 
10
10
  ## Guards
11
11
 
@@ -17,7 +17,6 @@ Decide whether a requested figure reduces to a graph Mermaid can draw, or needs
17
17
  Read these in parallel:
18
18
 
19
19
  - `${CLAUDE_SKILL_DIR}/../../standards/figures.md`: when a figure earns its place, the render-first policy, wrapping and captioning, and the color and accessibility rules
20
- - `${CLAUDE_SKILL_DIR}/../../standards/mermaid.md`: direction and layout, node and edge budgets, the accessibility fields, and how a render is verified, for the Mermaid path
21
20
  - `${CLAUDE_SKILL_DIR}/../../standards/markdown.md`: formatting for the caption prose
22
21
  - The `write-human` skill: voice and rhythm for the caption prose
23
22
 
@@ -25,74 +24,48 @@ Read these in parallel:
25
24
 
26
25
  Apply the standard's bar: a relationship, a boundary, a path, or a before-and-after that prose or a list cannot carry as well. Stop when it does not: `❌ <subject> reads fine as prose. A figure adds nothing here.`
27
26
 
28
- ## Step 3: decide the render path
27
+ ## Step 3: pick the path
29
28
 
30
- - **A teach lesson**, meaning the destination is a lesson page in a learning workspace's `lessons/` folder: draw it through Step 5 whatever its shape. The lesson letters its figures in a hand font the renderer cannot load, so a Mermaid render measures its labels in a narrower face and the lesson clips them.
31
- - **Graph-shaped**, meaning the relationship, boundary, or path is already what a flowchart or sequence diagram expresses: draw it through Step 4.
32
- - **Not graph-shaped**, meaning the subject is a spatial or physical arrangement no flowchart reduces to: draw it through Step 5.
29
+ Take the first that matches, and state which path was picked and why in one sentence:
33
30
 
34
- Take the first that matches, and state which path was picked and why in one sentence. The standard states this as a render-first policy rather than a ban on any tool-exported drawing, so outside a teach lesson a graph-shaped subject always routes through Mermaid even though that is itself an external renderer.
31
+ 1. **A teach lesson**, meaning the destination is a lesson page in a learning workspace's `lessons/` folder: the hand-drawn path, whatever the subject's shape, an architecture view included. The lesson letters its figures in a hand font the renderer cannot load, so a Mermaid render measures its labels in a narrower face and the lesson clips them.
32
+ 2. **An architecture view**, meaning the request names system context, components, request flow, data pipeline, or deployment: the architecture set, then the Mermaid path.
33
+ 3. **Graph-shaped**, meaning the relationship, boundary, or path is already what a flowchart or sequence diagram expresses: the Mermaid path.
34
+ 4. **Anything else**, a spatial or physical arrangement no flowchart reduces to: the hand-drawn path.
35
35
 
36
- ## Step 4: the Mermaid path
36
+ The standard states this as a render-first policy rather than a ban on any tool-exported drawing, so outside a teach lesson a graph-shaped subject always routes through Mermaid even though that is itself an external renderer.
37
37
 
38
- - Draft the fence against `mermaid.md`: direction, node and edge budgets, `accTitle`/`accDescr`, and quoted labels.
39
- - Render it with the hand-drawn look and the figure font stack, writing scratch files under `.canon/tmp/figures/`:
38
+ ## Step 4: draw
40
39
 
41
- ```bash
42
- mkdir -p .canon/tmp/figures
43
- cat <<'EOF' >.canon/tmp/figures/<slug>.json
44
- {"look": "handDrawn", "themeVariables": {"fontFamily": "Virgil, Excalifont, cursive"}}
45
- EOF
46
- bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.svg -c .canon/tmp/figures/<slug>.json
47
- bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.png -c .canon/tmp/figures/<slug>.json
48
- ```
49
-
50
- Render both formats in one pass: the SVG is what ships inside the `<figure>`, and the PNG is what Step 6 reads back, since an SVG's markup carries no recoverable spatial meaning the way `draft-diagram` Step 5 already states for the architecture surface.
51
-
52
- Use `bunx` when bun is available, falling back to `npx -y @mermaid-js/mermaid-cli ...` otherwise.
53
-
54
- - Rewrite every stroke, fill, and text color the renderer wrote as a literal hex value into the custom property the host stylesheet defines, per the standard's color rule. Mermaid's own theme has no notion of a custom property, so this is a source edit made to the rendered SVG, not a config option.
55
- - Expect a group title or a long label to clip once the destination shows it in the hand font, since the renderer sized its box in a fallback face.
56
- - When the in-page check shows a clipped title, add a `<style>` inside the SVG, scoped to that SVG's own id, that sets `overflow: visible` on the clipped label's `foreignObject` and centers the label within it, so the wider text spills past both edges evenly. The style hides the mismatch for a title and does nothing for a node label crowding its box, which takes a shorter label instead.
57
- - Check whether the project ran `canon design css --figures`. The figure and figcaption styling ships unconditionally either way, but that flag alone embeds the Virgil and Excalifont font files. Without it, the figure falls back to the browser's own generic `cursive` face rather than the intended hand-drawn font, and Step 7's output names that gap when the flag was not passed.
58
-
59
- ## Step 5: the freehand path
40
+ Read the reference for the path Step 3 picked and follow it:
60
41
 
61
- - Author the SVG by hand: plain shapes and lines authored directly in the markup.
62
- - Follow the standard's `## Color and accessibility` section for every fill, stroke, and accessible name.
42
+ - Architecture set: read `${CLAUDE_SKILL_DIR}/references/architecture-set.md` to shape the view, then `${CLAUDE_SKILL_DIR}/references/mermaid.md` to draw and render it. The architecture branch always renders and reads back. An unrendered fence is not a figure.
43
+ - Mermaid path: read `${CLAUDE_SKILL_DIR}/references/mermaid.md`.
44
+ - Hand-drawn path: read `${CLAUDE_SKILL_DIR}/references/hand-drawn.md`.
63
45
 
64
- There is no external render to verify a freehand drawing against before it is written. The check here is the stroke-and-fill audit above and a read of the markup against what the subject means to show, done once rather than looped. Hand-placed coordinates can drift out of line where a layout engine would not, so a freehand figure bound for a rendered page also takes Step 7's in-page capture.
65
-
66
- ## Step 6: wrap, caption, and verify
46
+ ## Step 5: wrap, caption, and verify
67
47
 
68
48
  - Wrap the drawing in a `<figure>` element with a `<figcaption>` naming what to take from the figure, never what it shows. Let it run wider than the surrounding prose column.
69
- - On the Mermaid path, read the rendered PNG back and judge it against what the figure means to say, the same check `draft-diagram` Steps 5 and 6 run for the architecture surface. Fix the mermaid source and re-render on a defect. Stop after two correction passes. When a defect survives, keep the figure and name the defect in the output rather than reporting a false verification.
70
- - On either path, confirm the figure still reads once every color and font it depends on is stripped to its fallback, per the standard's own working-figure bar.
71
- - When the render fails for any reason, no browser engine, no network, no package manager, continue to Step 7 and name the skipped check. A missing renderer degrades the loop rather than failing it.
72
- - When the destination is a rendered page, an HTML file a browser loads, the check that counts is the figure inside that page, which Step 7 runs once the figure is written. The standalone PNG is measured in the renderer's own fonts and can read clean while the page clips it. A markdown destination has no page to load, so the standalone check above is the whole check there.
49
+ - On the Mermaid path, run the read-back `mermaid.md` states before confirming.
50
+ - On every path, confirm the figure still reads once every color and font it depends on is stripped to its fallback, per the standard's own working-figure bar.
51
+ - When the destination is a rendered page, an HTML file a browser loads, the check that counts is the figure inside that page, which Step 6 captures once the figure is written, on either path. A markdown destination has no page to load, so the checks above are the whole check there.
73
52
 
74
- ## Step 7: confirm and write
53
+ ## Step 6: confirm and write
75
54
 
76
- Show the destination path, the decided render path, and the full `<figure>` markup before writing. Confirm with the user, since the graph-shaped decision and the render verdict are judgment calls with no diff to preview either against.
55
+ Show the destination path, the decided path, and the full `<figure>` markup before writing. Confirm with the user, since the path decision and the render verdict are judgment calls with no diff to preview either against.
77
56
 
78
57
  Write the figure into the destination document at the location the user named.
79
58
 
80
- When the destination is a rendered page, capture the figure inside it and read the capture against what the figure means to say:
81
-
82
- ```bash
83
- canon capture <destination> --selector figure --out .canon/tmp/figures/
84
- ```
85
-
86
- Narrow the selector to this figure, such as by an id on its `<figure>`, when the page carries more than one. Fix a clipped label, a misaligned shape, or an arrow that misses its target in the destination and capture again, within the same two correction passes Step 6 allows. A clipped group title on the Mermaid path takes the scoped overflow style Step 4 states. When the capture fails, keep the figure and name the skipped check in the output, the same way Step 6 treats a failed render.
59
+ When the destination is a rendered page, read the `## Capture in the page` section of `${CLAUDE_SKILL_DIR}/references/hand-drawn.md` and run it, on the Mermaid path as well as the hand-drawn one, within the same two correction passes the read-back allows.
87
60
 
88
- Renders and captures under `.canon/tmp/figures/` are verification artifacts, and the scratch PNGs, the stamps the capture writes beside them, and the JSON config are deleted once the checks confirm, since only the SVG ships.
61
+ Renders and captures under `.canon/tmp/figures/` are verification artifacts, and the scratch PNGs, the stamps the capture writes beside them, and the JSON config are deleted once the checks confirm, since only the SVG ships. Keep the `.mmd` source, which is what a later refresh redraws from.
89
62
 
90
63
  ## Output
91
64
 
92
65
  ### Preview
93
66
 
94
67
  **Destination:** `<path>`
95
- **Render path:** `<mermaid | freehand>`, `<one-sentence reason>`
68
+ **Render path:** `<mermaid | architecture | freehand>`, `<one-sentence reason>`
96
69
 
97
70
  ```html
98
71
  <drafted figure markup></drafted>
@@ -102,7 +75,7 @@ Renders and captures under `.canon/tmp/figures/` are verification artifacts, and
102
75
 
103
76
  ```plaintext
104
77
  ✅ Drafted figure in <path>
105
- Render path: <mermaid | freehand>
78
+ Render path: <mermaid | architecture | freehand>
106
79
  Verified <in page | as a standalone render>. <defect or skipped check, one line, omitted when clean>
107
80
  <Font not embedded: run `canon design css --figures` to ship Virgil and Excalifont. Omitted when the project already ran it.>
108
81
  ```
@@ -0,0 +1,35 @@
1
+ ---
2
+ title: Architecture set
3
+ description: The five architecture views with each one's question, source signal, and diagram type, the code-scan fallback, cited paths, and what moves to canon/context/ instead, read by draft-figure when a request names an architecture view
4
+ ---
5
+
6
+ # Architecture set
7
+
8
+ `draft-figure` reads this file when the request names an architecture view. It shapes the subject, then the figure goes through `${CLAUDE_SKILL_DIR}/references/mermaid.md` like any other graph-shaped figure. The destination stays the one the user named.
9
+
10
+ ## The five views
11
+
12
+ Draw the view the request names. Each answers one question and is drawn from one source signal:
13
+
14
+ | View | Question it answers | Source signal | Diagram type |
15
+ | -------------- | ------------------------------------------------------- | ------------------------------------------------- | ------------------------------------ |
16
+ | System context | Who uses the system, what it talks to, where it ends | `canon/REQUIREMENTS.md` | `flowchart TB` |
17
+ | Components | The layered structure inside the boundary | `canon/ARCHITECTURE.md` | `flowchart TB` with `subgraph` lanes |
18
+ | Request flow | A request lifecycle, an agent loop, or an actor handoff | the entry point and its handlers | `sequenceDiagram` |
19
+ | Data pipeline | Retrieval, ranking, queues, or ETL | the pipeline's modules | `flowchart TB` |
20
+ | Deployment | Hosts, services, and infrastructure config | deploy config, compose files, infrastructure code | `flowchart TB` |
21
+
22
+ System context is the only view that draws the world outside the boundary, and the one a reader outside the team opens first, so assume no knowledge of the repository there.
23
+
24
+ Stay inside `flowchart` and `sequenceDiagram`. C4, state, ER, and class diagrams render inconsistently across viewers.
25
+
26
+ ## Sources
27
+
28
+ - Read `canon/REQUIREMENTS.md`, `canon/ARCHITECTURE.md`, `CLAUDE.md`, and the language manifest (`package.json`, `pyproject.toml`, `Cargo.toml`) when present, plus the top-level folder layout through `ls`. Do not recurse speculatively.
29
+ - When neither planning file exists and no folder structure names a boundary, stop: `❌ No source signal for <view>. Add canon/ARCHITECTURE.md or run inside a project folder.`
30
+ - When the view came from a code scan rather than planning prose, open the caption with `Source: code.` and add `Fidelity is lower than prose-driven figures. Verify against the project's intent.`
31
+
32
+ ## Caption and prose
33
+
34
+ - Name one or two code paths a reader can open, in the caption or the prose beside the figure. Cite only paths that exist and spell each one exactly, since a reader deciding whether the figure still holds starts by opening them.
35
+ - Keep implementation detail out of the figure: function names and call signatures, library versions, config keys and environment variable names, retry counts and timeouts, and workarounds needing more than a sentence. That detail belongs in a `canon/context/` entry, which the caption points at by path when a reader needs the mechanism.
@@ -0,0 +1,31 @@
1
+ ---
2
+ title: Hand-drawn path
3
+ description: Authoring a freehand SVG, its color and accessibility audit, and the in-page capture loop a rendered destination takes, read by draft-figure once a figure is drawn by hand
4
+ ---
5
+
6
+ # Hand-drawn path
7
+
8
+ `draft-figure` reads this file when Step 3 routes a figure to a freehand drawing: a teach lesson whatever its subject, or a subject no flowchart reduces to.
9
+
10
+ ## Draw
11
+
12
+ - Author the SVG by hand: plain shapes and lines authored directly in the markup.
13
+ - Follow the `## Color and accessibility` section of `${CLAUDE_SKILL_DIR}/../../standards/figures.md` for every fill, stroke, and accessible name.
14
+
15
+ There is no external render to verify a freehand drawing against before it is written. The check here is the stroke-and-fill audit above and a read of the markup against what the subject means to show, done once rather than looped. Hand-placed coordinates can drift out of line where a layout engine would not, so a freehand figure bound for a rendered page also takes the in-page capture below.
16
+
17
+ ## Capture in the page
18
+
19
+ When the destination is a rendered page, an HTML file a browser loads, capture the figure inside it once it is written and read the capture against what the figure means to say:
20
+
21
+ ```bash
22
+ canon capture <destination> --selector figure --out .canon/tmp/figures/
23
+ ```
24
+
25
+ - Narrow the selector to this figure, such as by an id on its `<figure>`, when the page carries more than one.
26
+ - Fix a clipped label, a misaligned shape, or an arrow that misses its target in the destination and capture again. Stop after two correction passes.
27
+ - When the capture fails, keep the figure and name the skipped check in the output.
28
+
29
+ A Mermaid figure bound for a rendered page takes this same capture, since its standalone PNG is measured in the renderer's own fonts and can read clean while the page clips it. A clipped group title there takes the scoped overflow style `${CLAUDE_SKILL_DIR}/references/mermaid.md` states.
30
+
31
+ A markdown destination has no page to load, so the read of the markup, or of the standalone render on the Mermaid path, is the whole check there.
@@ -0,0 +1,55 @@
1
+ ---
2
+ title: Mermaid path
3
+ description: The hand-drawn render config, the SVG and PNG pair, the hex rewrite, the scoped overflow fallback, the label check, and the PNG read-back with its two-pass stop, read by draft-figure once a figure routes through Mermaid
4
+ ---
5
+
6
+ # Mermaid path
7
+
8
+ `draft-figure` reads this file when Step 3 routes a figure through Mermaid, whether the subject is graph-shaped or an architecture view the architecture set already shaped.
9
+
10
+ ## Draft the fence
11
+
12
+ - Draft the fence against `${CLAUDE_SKILL_DIR}/../../standards/mermaid.md` for direction, node and edge budgets, `accTitle` and `accDescr`, and quoted labels. Do not work the layout or the budgets from memory.
13
+ - Read every node and subgraph label against the banned characters `${CLAUDE_SKILL_DIR}/../../standards/markdown.md` lists. The audit hook skips every line inside a fence, so a label carrying a banned character passes silently while the same character in the caption is caught. Reading the labels is the only gate they have. A colon works as a replacement inside a label.
14
+
15
+ ## Render
16
+
17
+ Render with the hand-drawn look and the figure font stack, writing scratch files under `.canon/tmp/figures/`:
18
+
19
+ ```bash
20
+ mkdir -p .canon/tmp/figures
21
+ cat <<'EOF' >.canon/tmp/figures/<slug>.json
22
+ {"look": "handDrawn", "themeVariables": {"fontFamily": "Virgil, Excalifont, cursive"}}
23
+ EOF
24
+ bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.svg -c .canon/tmp/figures/<slug>.json
25
+ bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.png -c .canon/tmp/figures/<slug>.json
26
+ ```
27
+
28
+ Render both formats in one pass. The SVG is what ships inside the `<figure>`, and the PNG is what the read-back below judges, since an SVG's markup carries no recoverable spatial meaning.
29
+
30
+ Use `bunx` when bun is available, falling back to `npx -y @mermaid-js/mermaid-cli ...` otherwise.
31
+
32
+ Before the first render in a project, say what is about to block:
33
+
34
+ ```plaintext
35
+ Rendering to verify layout. The first run downloads the Mermaid CLI and takes about 15 seconds.
36
+ ```
37
+
38
+ ## Rewrite the colors
39
+
40
+ Rewrite every stroke, fill, and text color the renderer wrote as a literal hex value into the custom property the host stylesheet defines, per the color rule in `${CLAUDE_SKILL_DIR}/../../standards/figures.md`. Mermaid's own theme has no notion of a custom property, so this is a source edit made to the rendered SVG, not a config option.
41
+
42
+ ## Clipped titles
43
+
44
+ - Expect a group title or a long label to clip once the destination shows it in the hand font, since the renderer sized its box in a fallback face.
45
+ - When the in-page check shows a clipped title, add a `<style>` inside the SVG, scoped to that SVG's own id, that sets `overflow: visible` on the clipped label's `foreignObject` and centers the label within it, so the wider text spills past both edges evenly. The style hides the mismatch for a title and does nothing for a node label crowding its box, which takes a shorter label instead.
46
+
47
+ ## Fonts
48
+
49
+ Check whether the project ran `canon design css --figures`. The figure and figcaption styling ships unconditionally either way, but that flag alone embeds the Virgil and Excalifont font files. Without it, the figure falls back to the browser's own generic `cursive` face rather than the intended hand-drawn font, and the output names that gap when the flag was not passed.
50
+
51
+ ## Read the render back
52
+
53
+ - Read the rendered PNG and judge it against what the figure means to say, applying the verification properties in the mermaid standard. A source satisfying every rule there can still render as a picture asserting something false, so the image is what gets judged.
54
+ - Fix the Mermaid source and re-render on a defect. Stop after two correction passes. When a defect survives, keep the figure and name the defect in the output rather than reporting a false verification.
55
+ - When the render fails for any reason, no browser engine, no network, no package manager, continue to the confirm step and name the skipped check. A missing renderer degrades the loop rather than failing it.
@@ -72,7 +72,7 @@ Follow `${CLAUDE_SKILL_DIR}/../draft-and-pick/SKILL.md` Steps 2 through 5 agains
72
72
  This step and Step 7 replace `draft-and-pick`'s own Step 6, since the pick here produces several final files rather than one applied surface.
73
73
 
74
74
  1. Extract the picked arm's `.mark` markup as the final vector source. Write it to `<write-folder>/favicon.svg`.
75
- 2. Under `<dest>/render/`, write one `icon-<w>x<h>.html` page per Step 2 size, carrying the picked `.mark` markup. Give every page's captured element the shared class `.render`, so one capture call renders the whole batch regardless of the size spread. `canon capture` opens every page at a fixed 2x device scale factor and screenshots the element at that scale, so declare each `.render` element at half its target dimension, `<w>/2` by `<h>/2`, to land the captured PNG on the literal target size rather than double it. Declare a machine-resolved font stack (`system-ui` behind a generic fallback) on each, since `canon capture` refuses a page naming no font at all.
75
+ 2. Under `<dest>/render/`, write one `icon-<w>x<h>.html` page per Step 2 size, carrying the picked `.mark` markup. Give every page's captured element the shared class `.render`, so one capture call renders the whole batch regardless of the size spread. `canon capture` opens every page at a fixed 2x device scale factor and screenshots the element at that scale, so declare each `.render` element at half its target dimension, `<w>/2` by `<h>/2`, to land the captured PNG on the literal target size rather than double it. Declare no font on them, since each holds the mark alone and `canon capture` skips the font check on an element with no text. A generic family such as `system-ui` would be refused if text ever sat inside one.
76
76
  3. Render the batch:
77
77
 
78
78
  ```bash
@@ -45,6 +45,8 @@ Create `demos/<slug>/beats.md` at the project root, creating the folder if it do
45
45
 
46
46
  Write all nine sections. Pre-seed every section with concrete content so the draft is shippable as-is. The user edits down rather than fills blanks.
47
47
 
48
+ Load `canon:video-craft` for every zoom and caption value the draft names, and report it rather than proceeding silently when it does not resolve. The template below states none, since each number there traces to a source that skill records.
49
+
48
50
  ```markdown
49
51
  # Screencast: <short title>
50
52
 
@@ -72,7 +74,7 @@ Five beats. Each uses five fields. Add a sixth `Transition out` only when non-de
72
74
  - On screen: <derived from hero moment>
73
75
  - Action: <one verb, derived>
74
76
  - Watch for:
75
- - Emphasis: zoom 1.4x
77
+ - Emphasis: zoom onto the action, scale and speed per `canon:video-craft`
76
78
  - Caption:
77
79
 
78
80
  ### Beat 2: Setup
@@ -104,7 +106,7 @@ Five beats. Each uses five fields. Add a sixth `Transition out` only when non-de
104
106
  - On screen:
105
107
  - Action:
106
108
  - Watch for:
107
- - Emphasis: zoom 1.2x out
109
+ - Emphasis: zoom out to full frame
108
110
  - Caption:
109
111
 
110
112
  ## 4. Sequencing notes
@@ -119,14 +121,14 @@ Five beats. Each uses five fields. Add a sixth `Transition out` only when non-de
119
121
  - Resolution: 1920x1080
120
122
  - Frame rate: 30fps
121
123
  - Container: mp4 H.264
122
- - Zoom: max 1.8x with always-zoom-out before cut
124
+ - Zoom: only on an action too small to read at full frame, scale, speed, and dwell per `canon:video-craft`, zoomed out before every cut
123
125
  - Highlight overlay: ~1.5s soft glow
124
126
 
125
- ## 6. Caption typography
127
+ ## 6. Captions
126
128
 
127
- - White text on dark scrim at ~60% opacity
128
- - ~200ms fade in and out
129
- - One line max per caption, split across beats if needed
129
+ - Each caption names what its beat's frame shows, at most two lines of 42 characters, per `canon:video-craft`
130
+ - Hold and reading rate per `canon:video-craft`, splitting a caption across beats rather than shortening its hold
131
+ - Placed off the element the beat acts on
130
132
 
131
133
  ## 7. Distribution
132
134
 
@@ -1,39 +1,44 @@
1
1
  ---
2
2
  name: draft-slides
3
- description: Why the skill owns deck content and the CLI owns layout, and why one render is read back before the deck is called done
3
+ description: Why the skill draws a deck as HTML in the project's tokens inside its own folder, why the CLI owns the conversion, and why one render is read back before the deck is called done
4
4
  ---
5
5
 
6
6
  # Draft slides requirement
7
7
 
8
8
  ## Gap
9
9
 
10
- Without this skill, a deck request turns into hand-built layout. The session invents layout names the renderer does not have, so the render falls back or fails, and it writes centered body text and bullet lines that overflow the slide because nothing told it the type scale is fixed. Every slide comes out as a title over bullets, which is the shape that needs no decision and reads as a document rather than a deck.
10
+ Without this skill, a deck request turns into hand-built output. The session writes a deck into whatever path occurs to it, so a second deck overwrites the first and nothing lists either. It writes pptxgenjs code or hex colors per deck, so the deck takes neither the project's design nor any other deck's, and it invents attributes the converter does not read, so a section, a chart, or an entrance silently goes missing. Every slide comes out as a title over bullets, which is the shape that needs no decision and reads as a document rather than a deck.
11
11
 
12
- Reimplementing spacing and palette logic is the failure that survives the session. The CLI already owns both, so a deck that styles itself drifts from every other deck and stops being recognizable. And a first render shipped unread hands the audience the overlap and the overflow, since a source that looks correct says nothing about the picture it produces.
12
+ A first render shipped unread hands the audience the overlap, the overflow, and every element the converter fell back to a picture for, since markup that looks correct says nothing about the file it produces.
13
13
 
14
14
  ## Must
15
15
 
16
- - Read the layout catalog from the CLI before drafting and pick only from what it returns
17
- - Match the content shape to the layout, since each one parses a different body
18
- - Vary layouts across the deck rather than repeating one
19
- - Size content to fit the fixed type scale, keeping titles short and bullet lines tight
16
+ - Read the existing decks and the slide format from the CLI before drawing, and pick a deck name no listed deck carries unless the request names one
17
+ - Write each deck into its own folder under the slides record folder, one HTML file per slide in filename order
18
+ - Draw with the project's custom properties so the deck takes the project's design
19
+ - Vary the composition across the deck rather than repeating one shape
20
+ - Size content to fit the slide frame, keeping titles short and lines tight
20
21
  - Shell out to the render command for the deck itself
21
- - Run one QA pass over the rendered images and fix what it reports
22
+ - Read every fallback and refusal the render reports, run one QA pass over the rendered images, and fix what both report
22
23
 
23
24
  ## Must not
24
25
 
25
- - Hardcode a layout name, which goes stale the moment the catalog changes
26
- - Reimplement layout, palette, or type scale, which the CLI owns
26
+ - Hardcode a deck name, an attribute, or a chart type, which goes stale the moment the CLI changes
27
+ - Reimplement the conversion, the master, or the packaging, which the CLI owns
28
+ - Write a deck into the shared layouts folder, which is never listed as a deck
29
+ - Invent token values when the project has no token stylesheet
27
30
  - Write centered body text or content that overflows a slide
28
31
  - Loop on aesthetics past a single fix pass
29
32
 
30
33
  ## Guards
31
34
 
35
+ - No token stylesheet: draw the deck anyway and say it renders unstyled.
32
36
  - Image conversion tools missing: skip the image pass and say so. Do not fail the render over a verification step.
33
37
 
34
38
  ## Out of scope
35
39
 
36
- - Rendering, which the CLI owns end to end
37
- - The palette and the type scale, which live in the CLI rather than in the source
40
+ - Converting HTML to PowerPoint, which the CLI owns end to end
41
+ - The project's palette and faces, which live in its token stylesheet rather than in the slides
38
42
  - Writing the content the deck is about, which the caller brings
43
+ - Drafting a deck as a canvas page, which waits on a measurement of that authoring surface
39
44
  - Recording a demo, which `draft-screencast` owns
@@ -1,49 +1,59 @@
1
1
  ---
2
2
  name: draft-slides
3
- description: Drafts a `.claude/SLIDES.md` source from a topic, picks a layout per slide, then renders it to PowerPoint via `canon slides render`. Use when asked to "draft slides", "make a deck", "build a presentation", "turn this into slides", or "render a SLIDES.md". Holds the deck design rules. Do NOT reimplement render logic. The CLI owns layout and styling. Assumes the `canon` CLI is on PATH.
3
+ description: Draws a deck as HTML slides in the project's own design, one folder under `.canon/slides/` per deck, then renders it to an editable PowerPoint file via `canon slides render`. Use when asked to "draft slides", "make a deck", "build a presentation", "turn this into slides", or "render the deck". Holds the deck design rules. Do NOT reimplement the conversion. The CLI owns layout into PowerPoint shapes, the master, and packaging. Assumes the `canon` CLI is on PATH.
4
4
  ---
5
5
 
6
6
  # Draft slides
7
7
 
8
- Author a `SLIDES.md` source, then shell out to `canon slides render`. The CLI owns all layout and styling. This skill owns content and the design choices encoded in the source.
8
+ Draw each slide as an HTML file in a deck folder, then shell out to `canon slides render`. The CLI lays every slide out in a browser and rebuilds it as editable PowerPoint shapes. This skill owns the content, the slide markup, and the design choices the markup encodes.
9
9
 
10
- ## Read the catalog
10
+ ## Read the decks and the format
11
11
 
12
- Run this first to load the available layouts. Never hardcode layout names. The catalog is the source of truth.
12
+ Run both first. Never hardcode a deck name, an attribute, or a chart type. The CLI is the source of truth for each.
13
13
 
14
14
  ```bash
15
15
  canon slides list --json 2>/dev/null
16
+ canon docs slides
16
17
  ```
17
18
 
18
- ## Draft the source
19
+ The list returns one row per deck, carrying its `name`, `title`, slide count, and `path`. When the request names a deck the list holds, edit that folder. Otherwise pick a new kebab-case name no row carries.
19
20
 
20
- Write the deck to `.claude/SLIDES.md` from the project root. Structure:
21
+ The docs page states what `deck.json` holds, what each slide declares on its `<body>`, the motion attributes, speaker notes, charts, and what each refusal reports.
21
22
 
22
- - Deck frontmatter between `---` delimiters: `title`, optional `subtitle`, `palette`, and `variant` (light or dark).
23
- - One slide per section, separated by a `---` rule. Each slide opens with a `# Title` and a `layout:` line naming a layout from the catalog, followed by its content.
23
+ ## Draw the deck
24
24
 
25
- Match content shape to the layout: bullet lists for list layouts, `## Heading` blocks for columns, `- value : caption` pairs for stats and cards, a quote with a `- attribution` line for quotes.
25
+ A deck folder sits at `.canon/slides/<deck>/` from the project root, and holds:
26
26
 
27
- For a deck with chapters, add a `toc` slide near the front and mark each chapter opener with the `section` layout. The render fills the contents links and the per-slide footer automatically from the section slides. Leave the `toc` slide body empty.
27
+ - One `.html` file per slide, rendered in filename order. Number them with a zero-padded prefix, such as `01-cover.html`, so a slide inserted later sorts where it belongs.
28
+ - `deck.json`, optional, for the title, the header and footer bands, slide numbers, the mark, and embedded faces.
29
+ - `assets/` for images the slides reference by a relative path.
30
+
31
+ Never write a slide into `.canon/slides/layouts/`. That folder holds the project's shared layouts and is never listed as a deck.
32
+
33
+ Each slide is a full HTML document laid out at 1280 by 720 CSS pixels. Position its blocks absolutely or with a flex or grid container sized to that frame, and keep every element inside it.
28
34
 
29
35
  ## Design rules
30
36
 
31
- The palette and type scale live in the CLI. Own the choices the source controls.
37
+ The render injects the project's token stylesheet ahead of each slide's own styles, so the deck takes the project's design rather than the toolkit's.
32
38
 
33
- - Pick the variant that fits the topic. Light is a paper background, dark is near black. Both carry the same rust accent.
34
- - Vary the layout across slides. Never repeat title-and-bullets on every slide. Reach for columns, stat callouts, grids, and section dividers.
35
- - The CLI enforces the type scale, so size content to fit rather than overflow. Keep titles short and bullet lines tight.
36
- - Never write centered body text or content that overflows a slide. Let the layouts place the elements.
39
+ - Use the project's custom properties, such as `var(--color-accent)`, for every color, face, and spacing value the stylesheet defines. Read the names from `.claude/design/base.css` and any overrides under `.claude/design/project/`. When neither exists, say the deck renders unstyled rather than inventing values to cover it.
40
+ - Leave the `--color-*` roles to the stylesheet rather than redefining them in a slide. The master reads its colors off the first slide's `<html>`, and a slide body computing its own `--color-text` is reported, since the bands keep the master's colors.
41
+ - Vary the composition across slides. Never repeat a title over bullets on every slide. Reach for columns, a row of large numbers, a grid of cards, a chart, a pull quote, and section dividers.
42
+ - Keep titles short and lines tight, so text fits its box at the size the design sets rather than overflowing the frame.
43
+ - Never write centered body text.
44
+ - Prefer CSS the converter maps to native shapes. An element computing a property it cannot map is drawn as a picture of itself and reported on stderr, so a slide full of gradients and filters stops being editable.
37
45
 
38
46
  ## Render
39
47
 
40
48
  Shell out to the CLI. It writes the deck and reports the path.
41
49
 
42
50
  ```bash
43
- canon slides render --source .claude/SLIDES.md --out .canon/tmp/render/slides
51
+ canon slides render <deck>
44
52
  ```
45
53
 
46
- Pass `--variant light` or `--variant dark` to override the source variant for a one-off render. Pass `--open` to open the deck, and `--mirror <dir>` (or set `CANON_SLIDES_MIRROR`) to copy it into a synced folder.
54
+ With one deck in the project the name can be left out. The render refuses with the deck list when there are several. Pass `--open` to open the deck, and `--mirror <dir>`, or set `CANON_SLIDES_MIRROR`, to copy it into a synced folder.
55
+
56
+ Read every `✗` line the render prints. A picture fallback, a refused link, chart, or effect, and a missing token each leave the deck written with that piece degraded or left out.
47
57
 
48
58
  ## QA loop
49
59
 
@@ -51,12 +61,13 @@ Run this once after the first render, then stop.
51
61
 
52
62
  1. Convert the deck to images: `soffice --headless --convert-to pdf <deck>.pptx` then `pdftoppm -r 90 -png <deck>.pdf slide`. If `soffice` or `pdftoppm` is missing, skip the image pass and say so. Do not fail the render.
53
63
  2. Open and inspect every rendered image in this session, checking each slide for overlap, overflow, low contrast, and empty regions.
54
- 3. Fix the reported issues in `SLIDES.md` once, re-render, and stop. Do not loop indefinitely on aesthetics.
64
+ 3. Fix the reported issues and the `✗` lines in the slide files once, re-render, and stop. Do not loop indefinitely on aesthetics.
55
65
 
56
66
  ## Response
57
67
 
58
68
  After rendering, report:
59
69
 
60
- - Slide count and the deck path
61
- - The palette and variant used
70
+ - The deck folder, the slide count, and the written `.pptx` path
71
+ - Whether the project's token stylesheet was found
72
+ - Each `✗` line the final render printed, or that it printed none
62
73
  - Any QA issues found and what changed, or that the deck passed clean