@erclx/canon 5.43.0 → 5.45.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 (245) hide show
  1. package/README.md +1 -1
  2. package/claude/.claude-plugin/plugin.json +1 -1
  3. package/claude/skills/backlog-triage/references/apply.md +6 -6
  4. package/claude/skills/canon-cli/SKILL.md +4 -5
  5. package/claude/skills/canvas-board/REQUIREMENT.md +1 -1
  6. package/claude/skills/canvas-board/SKILL.md +1 -1
  7. package/claude/skills/context-fold/references/context.md +1 -1
  8. package/claude/skills/create-skill/REQUIREMENT.md +1 -1
  9. package/claude/skills/create-skill/SKILL.md +2 -2
  10. package/claude/skills/create-skill/references/skill-requirement.md +68 -9
  11. package/claude/skills/create-skill/references/skill.md +1 -1
  12. package/claude/skills/design-identity/REQUIREMENT.md +40 -0
  13. package/claude/skills/design-identity/SKILL.md +138 -0
  14. package/claude/skills/{draft-identity → design-identity}/references/card-route.md +2 -2
  15. package/claude/skills/design-taste/REQUIREMENT.md +6 -6
  16. package/claude/skills/design-taste/SKILL.md +2 -2
  17. package/claude/skills/design-taste/references/kinds.md +1 -1
  18. package/claude/skills/design-taste/references/preflight.md +1 -1
  19. package/claude/skills/draft-and-pick/REQUIREMENT.md +8 -69
  20. package/claude/skills/draft-and-pick/SKILL.md +3 -153
  21. package/claude/skills/draft-doc/REQUIREMENT.md +9 -30
  22. package/claude/skills/draft-doc/SKILL.md +4 -76
  23. package/claude/skills/draft-figure/REQUIREMENT.md +8 -42
  24. package/claude/skills/draft-figure/SKILL.md +3 -77
  25. package/claude/skills/draft-identity/REQUIREMENT.md +8 -23
  26. package/claude/skills/draft-identity/SKILL.md +3 -130
  27. package/claude/skills/draft-ready/REQUIREMENT.md +8 -37
  28. package/claude/skills/draft-ready/SKILL.md +3 -128
  29. package/claude/skills/draft-screencast/REQUIREMENT.md +8 -23
  30. package/claude/skills/draft-screencast/SKILL.md +3 -62
  31. package/claude/skills/draft-slides/REQUIREMENT.md +8 -27
  32. package/claude/skills/draft-slides/SKILL.md +3 -72
  33. package/claude/skills/draw-figure/REQUIREMENT.md +59 -0
  34. package/claude/skills/draw-figure/SKILL.md +85 -0
  35. package/claude/skills/{draft-figure → draw-figure}/references/architecture-set.md +2 -2
  36. package/claude/skills/{draft-figure → draw-figure}/references/hand-drawn.md +2 -2
  37. package/claude/skills/{draft-figure → draw-figure}/references/mermaid-path.md +2 -2
  38. package/claude/skills/{draft-figure → draw-figure}/references/mermaid.md +1 -1
  39. package/claude/skills/make-deck/REQUIREMENT.md +44 -0
  40. package/claude/skills/make-deck/SKILL.md +80 -0
  41. package/claude/skills/markdown-craft/REQUIREMENT.md +1 -1
  42. package/claude/skills/markdown-craft/SKILL.md +2 -2
  43. package/claude/skills/pick-by-eye/REQUIREMENT.md +36 -0
  44. package/claude/skills/pick-by-eye/SKILL.md +161 -0
  45. package/claude/skills/plan-feature/SKILL.md +2 -1
  46. package/claude/skills/plan-feature/references/plan.md +24 -10
  47. package/claude/skills/plan-groundwork/SKILL.md +1 -1
  48. package/claude/skills/plan-intake/SKILL.md +1 -1
  49. package/claude/skills/plan-ready/REQUIREMENT.md +54 -0
  50. package/claude/skills/plan-ready/SKILL.md +136 -0
  51. package/claude/skills/{draft-ready → plan-ready}/references/assembly.md +1 -1
  52. package/claude/skills/{draft-ready → plan-ready}/references/ready.md +1 -1
  53. package/claude/skills/record-screencast/REQUIREMENT.md +3 -3
  54. package/claude/skills/record-screencast/SKILL.md +2 -2
  55. package/claude/skills/role-orchestrator/REQUIREMENT.md +16 -99
  56. package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +5 -2
  57. package/claude/skills/role-orchestrator/references/orchestrator-parked.md +2 -2
  58. package/claude/skills/role-orchestrator/references/orchestrator-refill.md +18 -13
  59. package/claude/skills/role-planner/REQUIREMENT.md +15 -73
  60. package/claude/skills/role-planner/SKILL.md +2 -1
  61. package/claude/skills/role-worker/REQUIREMENT.md +13 -41
  62. package/claude/skills/role-worker/SKILL.md +9 -0
  63. package/claude/skills/script-screencast/REQUIREMENT.md +40 -0
  64. package/claude/skills/script-screencast/SKILL.md +70 -0
  65. package/claude/skills/{draft-screencast → script-screencast}/references/beats-template.md +2 -2
  66. package/claude/skills/search-craft/REQUIREMENT.md +4 -4
  67. package/claude/skills/search-craft/SKILL.md +1 -1
  68. package/claude/skills/target-setup/SKILL.md +3 -2
  69. package/claude/skills/target-setup/references/detect.md +0 -1
  70. package/claude/skills/target-setup/references/verify.md +2 -2
  71. package/claude/skills/task-board/SKILL.md +11 -9
  72. package/claude/skills/task-board/references/board.md +15 -12
  73. package/claude/skills/teach-workspace/REQUIREMENT.md +1 -1
  74. package/claude/skills/teach-workspace/SKILL.md +1 -1
  75. package/claude/skills/teach-workspace/references/lesson-craft.md +2 -2
  76. package/claude/skills/teach-workspace/references/promotion.md +5 -5
  77. package/claude/skills/ui-checklist/SKILL.md +2 -0
  78. package/claude/skills/write-doc/REQUIREMENT.md +46 -0
  79. package/claude/skills/write-doc/SKILL.md +83 -0
  80. package/claude/skills/{draft-doc → write-doc}/references/context.md +2 -2
  81. package/claude/skills/{draft-doc → write-doc}/references/docs.md +2 -2
  82. package/claude/skills/{draft-doc → write-doc}/references/readme.md +2 -2
  83. package/claude/skills/{draft-doc → write-doc}/references/wiki-kind.md +3 -3
  84. package/docs/agents/install-and-sync.md +2 -2
  85. package/docs/agents/markdown-audit.md +4 -2
  86. package/docs/agents/migrate.md +2 -2
  87. package/docs/agents/output-shape.md +1 -2
  88. package/docs/target/migrations.md +35 -4
  89. package/docs/target/projects.md +2 -3
  90. package/docs/target/scenarios.md +4 -1
  91. package/docs/workflow/parallel-features.md +3 -2
  92. package/docs/workflow/skill-map-on-request.md +19 -13
  93. package/docs/workflow/skill-map.md +13 -12
  94. package/docs/workflow/visual-design-workflow.md +2 -2
  95. package/governance/detect.toml +4 -0
  96. package/governance/ledger/framework/astro.md +73 -0
  97. package/governance/ledger/framework/fastapi.md +76 -0
  98. package/governance/ledger/framework/nextjs.md +86 -0
  99. package/governance/ledger/framework/react.md +83 -0
  100. package/governance/ledger/framework/shadcn.md +60 -0
  101. package/governance/ledger/framework/tailwind.md +55 -0
  102. package/governance/ledger/lang/go.md +61 -0
  103. package/governance/ledger/lang/php.md +50 -0
  104. package/governance/ledger/lang/python.md +68 -0
  105. package/governance/ledger/lang/typescript.md +64 -0
  106. package/governance/ledger/lib/database.md +65 -0
  107. package/governance/ledger/lib/e2e-reliability.md +57 -0
  108. package/governance/ledger/lib/pydantic.md +61 -0
  109. package/governance/ledger/lib/security-server.md +62 -0
  110. package/governance/ledger/lib/security-web.md +51 -0
  111. package/governance/ledger/lib/tanstack-query.md +57 -0
  112. package/governance/ledger/lib/test-scope.md +43 -0
  113. package/governance/ledger/lib/testing-go.md +57 -0
  114. package/governance/ledger/lib/testing-php.md +51 -0
  115. package/governance/ledger/lib/testing-py.md +67 -0
  116. package/governance/ledger/lib/testing-ts.md +63 -0
  117. package/governance/ledger/lib/zod.md +47 -0
  118. package/governance/ledger/tooling/ci-workflow.md +33 -0
  119. package/governance/ledger/tooling/code-comments.md +48 -0
  120. package/governance/ledger/tooling/config-comments.md +27 -0
  121. package/governance/ledger/tooling/dependencies.md +38 -0
  122. package/governance/ledger/ui/a11y.md +55 -0
  123. package/governance/ledger/ui/copy.md +49 -0
  124. package/governance/ledger/ui/design-reference.md +42 -0
  125. package/governance/ledger/ui/design-taste.md +19 -0
  126. package/governance/ledger/ui/forms.md +71 -0
  127. package/governance/ledger/ui/interface-casing.md +47 -0
  128. package/governance/ledger/ui/keyboard.md +68 -0
  129. package/governance/ledger/ui/link-behavior.md +29 -0
  130. package/governance/ledger/ui/motion.md +33 -0
  131. package/governance/ledger/ui/surface-capture.md +69 -0
  132. package/governance/ledger/ui/ux-completeness.md +79 -0
  133. package/governance/rules/framework/astro.md +12 -14
  134. package/governance/rules/framework/fastapi.md +20 -24
  135. package/governance/rules/framework/nextjs.md +19 -27
  136. package/governance/rules/framework/react.md +22 -33
  137. package/governance/rules/framework/shadcn.md +11 -15
  138. package/governance/rules/framework/tailwind.md +12 -14
  139. package/governance/rules/lang/go.md +7 -16
  140. package/governance/rules/lang/php.md +3 -3
  141. package/governance/rules/lang/python.md +9 -18
  142. package/governance/rules/lang/typescript.md +9 -19
  143. package/governance/rules/lib/database.md +5 -5
  144. package/governance/rules/lib/e2e-reliability.md +4 -6
  145. package/governance/rules/lib/pydantic.md +14 -16
  146. package/governance/rules/lib/security-server.md +4 -4
  147. package/governance/rules/lib/security-web.md +6 -10
  148. package/governance/rules/lib/tanstack-query.md +10 -12
  149. package/governance/rules/lib/test-scope.md +4 -4
  150. package/governance/rules/lib/testing-go.md +1 -2
  151. package/governance/rules/lib/testing-php.md +4 -5
  152. package/governance/rules/lib/testing-py.md +11 -19
  153. package/governance/rules/lib/testing-ts.md +7 -16
  154. package/governance/rules/lib/zod.md +6 -8
  155. package/governance/rules/tooling/code-comments.md +2 -4
  156. package/governance/rules/tooling/config-comments.md +1 -4
  157. package/governance/rules/tooling/dependencies.md +1 -1
  158. package/governance/rules/ui/a11y.md +16 -45
  159. package/governance/rules/ui/copy.md +6 -9
  160. package/governance/rules/ui/forms.md +13 -19
  161. package/governance/rules/ui/interface-casing.md +5 -7
  162. package/governance/rules/ui/keyboard.md +38 -0
  163. package/governance/rules/ui/link-behavior.md +3 -3
  164. package/governance/rules/ui/motion.md +3 -3
  165. package/governance/rules/ui/surface-capture.md +15 -27
  166. package/governance/rules/ui/ux-completeness.md +16 -39
  167. package/governance/rules/writing/markdown.md +1 -1
  168. package/package.json +1 -1
  169. package/scripts/core/install-check.sh +1 -1
  170. package/src/claude/cases/authoring.ts +15 -3
  171. package/src/claude/cases/misc.ts +12 -0
  172. package/src/claude/cases/workflow.ts +19 -1
  173. package/src/claude/skills-audit.ts +113 -1
  174. package/src/cli/help.ts +0 -1
  175. package/src/cli.ts +0 -2
  176. package/src/commands/claude.ts +34 -11
  177. package/src/commands/demo.ts +1 -1
  178. package/src/commands/gov.ts +4 -0
  179. package/src/commands/init.ts +2 -2
  180. package/src/commands/markdown.ts +1 -1
  181. package/src/commands/migrate.ts +4 -0
  182. package/src/commands/pr.ts +30 -6
  183. package/src/commands/tasks.ts +383 -2
  184. package/src/commands/tooling.ts +18 -5
  185. package/src/context/audit.ts +1 -1
  186. package/src/demo/beats.ts +1 -1
  187. package/src/design/components.ts +1 -1
  188. package/src/gov/audit.ts +25 -4
  189. package/src/init/plan.ts +1 -8
  190. package/src/init/steps.ts +0 -8
  191. package/src/inventory/subjects.ts +1 -1
  192. package/src/markdown/scope.ts +49 -35
  193. package/src/migrate/record-layout.ts +1 -1
  194. package/src/migrate/scratch-evidence.ts +12 -4
  195. package/src/migrate/skill-names.ts +68 -21
  196. package/src/pr/frames.ts +14 -3
  197. package/src/records/backup.ts +3 -3
  198. package/src/records/validate.ts +31 -0
  199. package/src/roots/record.ts +17 -8
  200. package/src/tasks/board.ts +854 -0
  201. package/src/tasks/record.ts +20 -1
  202. package/src/tasks/validate.ts +206 -9
  203. package/src/tooling/inject.ts +26 -7
  204. package/src/tooling/package.ts +32 -0
  205. package/src/tooling/read.ts +46 -3
  206. package/src/tooling/scan.ts +8 -2
  207. package/tooling/astro/configs/card-src/pages/og-card.astro +1 -1
  208. package/tooling/astro/reference.md +64 -93
  209. package/tooling/base/configs/.github/workflows/phase-label-gate.yml +1 -1
  210. package/tooling/base/configs/scripts/verify.ts +1 -1
  211. package/tooling/base/reference.md +1 -9
  212. package/tooling/base/seeds/canon/context/{ci.md → development/ci.md} +1 -1
  213. package/tooling/base/seeds/canon/context/development/index.md +11 -0
  214. package/tooling/base/seeds/canon/context/{development.md → development/setup.md} +8 -12
  215. package/tooling/base/seeds/canon/context/index.md +1 -2
  216. package/tooling/claude/manifest.toml +1 -5
  217. package/tooling/claude/reference.md +36 -59
  218. package/tooling/claude/seeds/.claude/hooks/board-validate.sh +65 -0
  219. package/tooling/claude/seeds/.claude/hooks/index-reminder.sh +2 -7
  220. package/tooling/claude/seeds/.claude/hooks/pr-create-log.sh +2 -7
  221. package/tooling/claude/seeds/.claude/hooks/scratch-guard.sh +3 -10
  222. package/tooling/claude/seeds/.claude/hooks/search-reminder.sh +2 -7
  223. package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +2 -4
  224. package/tooling/claude/seeds/.claude/settings.json +4 -0
  225. package/tooling/nextjs/reference.md +0 -6
  226. package/tooling/php/reference.md +0 -4
  227. package/tooling/web/configs/.github/workflows/verify.yml +28 -0
  228. package/tooling/web/configs/.oxlintrc.json +7 -0
  229. package/tooling/web/configs/e2e/capture-types.ts +35 -0
  230. package/tooling/web/configs/e2e/screenshot.ts +23 -72
  231. package/tooling/web/manifest.toml +1 -1
  232. package/tooling/web/reference.md +77 -124
  233. package/tooling/web/seeds/e2e/capture/cases.ts +47 -0
  234. package/src/commands/wiki.ts +0 -100
  235. package/src/wiki/init.ts +0 -85
  236. /package/claude/skills/{draft-figure → draw-figure}/references/figures.md +0 -0
  237. /package/claude/skills/{draft-slides → make-deck}/references/deck.md +0 -0
  238. /package/claude/skills/{draft-and-pick → pick-by-eye}/references/live-arms.md +0 -0
  239. /package/claude/skills/{draft-doc → write-doc}/references/readme/agent-facing.md +0 -0
  240. /package/claude/skills/{draft-doc → write-doc}/references/readme/application.md +0 -0
  241. /package/claude/skills/{draft-doc → write-doc}/references/readme/cli.md +0 -0
  242. /package/claude/skills/{draft-doc → write-doc}/references/readme/library.md +0 -0
  243. /package/claude/skills/{draft-doc → write-doc}/references/readme/plugin.md +0 -0
  244. /package/claude/skills/{draft-doc → write-doc}/references/requirements.md +0 -0
  245. /package/claude/skills/{draft-doc → write-doc}/references/wiki.md +0 -0
@@ -1,80 +1,11 @@
1
1
  ---
2
2
  name: draft-slides
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.
3
+ description: Renamed from `draft-slides` to `make-deck`. Answers a typed invocation of the old slides skill name by pointing at the new one.
4
+ disable-model-invocation: true
4
5
  metadata:
5
6
  family: generate
6
7
  ---
7
8
 
8
9
  # Draft slides
9
10
 
10
- 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.
11
-
12
- ## Read the decks and the format
13
-
14
- Run the list first, then read the format. Never hardcode a deck name, an attribute, or a chart type.
15
-
16
- ```bash
17
- canon slides list --json 2>/dev/null
18
- ```
19
-
20
- 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.
21
-
22
- Read `${CLAUDE_SKILL_DIR}/references/deck.md`. It states what `deck.json` holds, what each slide declares on its `<body>`, the motion attributes, speaker notes, and charts. Each refusal prints as a `✗` line from the render.
23
-
24
- ## Draw the deck
25
-
26
- A deck folder sits at `.canon/slides/<deck>/` from the project root, and holds:
27
-
28
- - 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.
29
- - `deck.json`, optional, for the title, the header and footer bands, slide numbers, the mark, and embedded faces.
30
- - `assets/` for images the slides reference by a relative path.
31
-
32
- Never write a slide into `.canon/slides/layouts/`. That folder holds the project's shared layouts and is never listed as a deck.
33
-
34
- 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.
35
-
36
- ## Design rules
37
-
38
- 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.
39
-
40
- - Use the project's custom properties, such as `var(--color-accent)`, for every color, face, and spacing value, read from `.claude/design/base.css` and overrides under `.claude/design/project/`
41
- - When neither exists, say the deck renders unstyled rather than inventing values to cover it
42
- - Leave the `--color-*` roles to the stylesheet. The master reads its colors off the first slide's `<html>`, so a slide computing its own `--color-text` is reported, since the bands keep the master's.
43
- - 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.
44
-
45
- ### Fit and shapes
46
-
47
- Text and shapes have to survive the conversion.
48
-
49
- - Keep titles short and lines tight, so text fits its box at the size the design sets rather than overflowing the frame.
50
- - Never write centered body text.
51
- - Prefer CSS the converter maps to native shapes. An unmappable property is drawn as a picture and reported on stderr, so a slide full of gradients and filters stops being editable.
52
-
53
- ## Render
54
-
55
- Shell out to the CLI. It writes the deck and reports the path.
56
-
57
- ```bash
58
- canon slides render <deck>
59
- ```
60
-
61
- 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.
62
-
63
- 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.
64
-
65
- ## QA loop
66
-
67
- Run this once after the first render, then stop.
68
-
69
- 1. Convert the deck with `soffice --headless --convert-to pdf <deck>.pptx`, then `pdftoppm -r 90 -png <deck>.pdf slide`. If either is missing, skip the image pass and say so rather than fail the render.
70
- 2. Open and inspect every rendered image in this session, checking each slide for overlap, overflow, low contrast, and empty regions.
71
- 3. Fix the reported issues and the `✗` lines in the slide files once, re-render, and stop. Do not loop indefinitely on aesthetics.
72
-
73
- ## Response
74
-
75
- After rendering, report:
76
-
77
- - The deck folder, the slide count, and the written `.pptx` path
78
- - Whether the project's token stylesheet was found
79
- - Each `✗` line the final render printed, or that it printed none
80
- - Any QA issues found and what changed, or that the deck passed clean
11
+ This skill is now `make-deck`. Run `/canon:make-deck` instead, and change any file that still names this one.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: draw-figure
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
+ ---
5
+
6
+ # Draw figure requirement
7
+
8
+ ## Gap
9
+
10
+ Without this skill, a session asked for a figure reaches for whichever path it thought of first. A graph-shaped subject gets model-authored SVG coordinates nobody checked against a render, drifting from the hand-drawn look every other figure in the project carries. A subject that is not graph-shaped gets forced through Mermaid's node-and-edge model, producing a diagram that answers a different question than the one asked. Either failure ships a figure a reader cannot trust, and a figure exists only to be trusted at a glance.
11
+
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
+
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
+
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.
17
+
18
+ ## Must
19
+
20
+ - Apply the standard's earn-its-place bar before drawing anything
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
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
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
26
+ - Keep the scoped overflow style as the documented fallback for a clipped group title wherever the Mermaid path still runs
27
+ - Render the Mermaid path with the hand-drawn look and the figure font stack, never with Mermaid's default look
28
+ - Rewrite every literal color the renderer wrote into the custom property the host stylesheet defines
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
32
+ - Wrap either path in a `<figure>` and `<figcaption>` and give it an accessible name
33
+
34
+ ## Must not
35
+
36
+ - Force a non-graph-shaped subject through Mermaid, or route a graph-shaped one through freehand SVG coordinates a model authored by hand outside a teach lesson
37
+ - Report a figure bound for a rendered page as verified from the standalone render alone
38
+ - Ship a literal hex color on either path
39
+ - Report a clean verification when the Mermaid render was skipped or a defect survived
40
+ - Loop past two correction passes on a surviving defect
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
44
+
45
+ ## Guards
46
+
47
+ - No subject given: stop, since nothing states what the figure has to show
48
+ - No destination document given: stop, since the figure has nowhere to land
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.
52
+
53
+ ## Out of scope
54
+
55
+ - Mermaid's own layout, budgets, and label rules for the fence itself: the mermaid standard, cited rather than restated here
56
+ - A UI screen mockup: `canvas-board`
57
+ - Design tokens and the visual system: `canvas-board`, which carries a picked direction into the design document
58
+ - Implementation detail behind an architecture view, which belongs in a context entry the caption points at
59
+ - Which lesson needs a figure and where it sits among the lesson's blocks: `teach-workspace`, which calls this skill to draw one
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: draw-figure
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 screen mockup, which is `canvas-board`.
4
+ metadata:
5
+ family: generate
6
+ ---
7
+
8
+ # Draw figure
9
+
10
+ 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.
11
+
12
+ ## Guards
13
+
14
+ - If no subject is given, stop: `❌ No subject given. Name the relationship, boundary, path, or before-and-after this figure should show.`
15
+ - If no destination document is given, stop: `❌ No destination given. Name the file this figure belongs in.`
16
+
17
+ ## Step 1: read sources
18
+
19
+ Read these in parallel:
20
+
21
+ - `${CLAUDE_SKILL_DIR}/references/figures.md`: when a figure earns its place, the render-first policy, wrapping and captioning, and the color and accessibility rules
22
+ - `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md`: formatting for the caption prose
23
+ - The `write-human` skill: voice and rhythm for the caption prose
24
+
25
+ ## Step 2: does it earn its place
26
+
27
+ 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.`
28
+
29
+ ## Step 3: pick the path
30
+
31
+ Take the first that matches, and state which path was picked and why in one sentence:
32
+
33
+ 1. **A teach lesson**, a page in a learning workspace's `lessons/` folder: the hand-drawn path, any shape. The renderer cannot load the lesson's hand font, so Mermaid labels measure narrow and clip.
34
+ 2. **An architecture view**, meaning the request names system context, components, request flow, data pipeline, or deployment: the architecture set, then the Mermaid path.
35
+ 3. **Graph-shaped**, meaning the relationship, boundary, or path is already what a flowchart or sequence diagram expresses: the Mermaid path.
36
+ 4. **Anything else**, a spatial or physical arrangement no flowchart reduces to: the hand-drawn path.
37
+
38
+ 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.
39
+
40
+ ## Step 4: draw
41
+
42
+ Read the reference for the path Step 3 picked and follow it:
43
+
44
+ - Architecture set: shape the view per `${CLAUDE_SKILL_DIR}/references/architecture-set.md`, then draw, render, and read back per `${CLAUDE_SKILL_DIR}/references/mermaid-path.md`
45
+ - Mermaid path: read `${CLAUDE_SKILL_DIR}/references/mermaid-path.md`.
46
+ - Hand-drawn path: read `${CLAUDE_SKILL_DIR}/references/hand-drawn.md`.
47
+
48
+ ## Step 5: wrap, caption, and verify
49
+
50
+ - 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.
51
+ - On the Mermaid path, run the read-back `mermaid-path.md` states before confirming.
52
+ - 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.
53
+ - On a rendered page, an HTML file a browser loads, the check that counts is the figure in the page, which Step 6 captures on either path. A markdown destination's whole check is the checks above.
54
+
55
+ ## Step 6: confirm and write
56
+
57
+ 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, then write the figure where the user named.
58
+
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.
60
+
61
+ ### Cleaning up
62
+
63
+ Renders and captures under `.canon/tmp/figures/` are verification artifacts. Delete the scratch PNGs, the stamps beside them, and the JSON config once the checks confirm, since only the SVG ships, and keep the `.mmd` source a later refresh redraws from.
64
+
65
+ ## Output
66
+
67
+ ### Preview
68
+
69
+ **Destination:** `<path>`
70
+ **Render path:** `<mermaid | architecture | freehand>`, `<one-sentence reason>`
71
+
72
+ ```html
73
+ <drafted figure markup></drafted>
74
+ ```
75
+
76
+ ### After confirmation
77
+
78
+ Report the write in this shape.
79
+
80
+ ```plaintext
81
+ ✅ Drafted figure in <path>
82
+ Render path: <mermaid | architecture | freehand>
83
+ Verified <in page | as a standalone render>. <defect or skipped check, one line, omitted when clean>
84
+ <Font not embedded: run `canon design css --figures` to ship Virgil and Excalifont. Omitted when the project already ran it.>
85
+ ```
@@ -1,11 +1,11 @@
1
1
  ---
2
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
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 draw-figure when a request names an architecture view
4
4
  ---
5
5
 
6
6
  # Architecture set
7
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-path.md` like any other graph-shaped figure. The destination stays the one the user named.
8
+ `draw-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-path.md` like any other graph-shaped figure. The destination stays the one the user named.
9
9
 
10
10
  ## The five views
11
11
 
@@ -1,11 +1,11 @@
1
1
  ---
2
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
3
+ description: Authoring a freehand SVG, its color and accessibility audit, and the in-page capture loop a rendered destination takes, read by draw-figure once a figure is drawn by hand
4
4
  ---
5
5
 
6
6
  # Hand-drawn path
7
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.
8
+ `draw-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
9
 
10
10
  ## Draw
11
11
 
@@ -1,11 +1,11 @@
1
1
  ---
2
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
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 draw-figure once a figure routes through Mermaid
4
4
  ---
5
5
 
6
6
  # Mermaid path
7
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.
8
+ `draw-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
9
 
10
10
  ## Draft the fence
11
11
 
@@ -13,7 +13,7 @@ Governs the Mermaid attribute wherever a fence is written, being direction and l
13
13
 
14
14
  Does not govern:
15
15
 
16
- - Which architecture view a figure draws and what question it answers: the `draft-figure` skill's architecture set
16
+ - Which architecture view a figure draws and what question it answers: the `draw-figure` skill's architecture set
17
17
  - Language, word choice, punctuation, and formatting in the prose around a fence: `markdown.md`
18
18
  - Voice, rhythm, and sentence construction in that prose: the `write-human` skill
19
19
  - The mechanism behind any component a diagram draws: `context.md`
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: make-deck
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
+ ---
5
+
6
+ # Make deck requirement
7
+
8
+ ## Gap
9
+
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
+
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
+
14
+ ## Must
15
+
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
21
+ - Shell out to the render command for the deck itself
22
+ - Read every fallback and refusal the render reports, run one QA pass over the rendered images, and fix what both report
23
+
24
+ ## Must not
25
+
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
30
+ - Write centered body text or content that overflows a slide
31
+ - Loop on aesthetics past a single fix pass
32
+
33
+ ## Guards
34
+
35
+ - No token stylesheet: draw the deck anyway and say it renders unstyled.
36
+ - Image conversion tools missing: skip the image pass and say so. Do not fail the render over a verification step.
37
+
38
+ ## Out of scope
39
+
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
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
44
+ - Recording a demo, which `script-screencast` owns
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: make-deck
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
+ metadata:
5
+ family: generate
6
+ ---
7
+
8
+ # Make deck
9
+
10
+ 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.
11
+
12
+ ## Read the decks and the format
13
+
14
+ Run the list first, then read the format. Never hardcode a deck name, an attribute, or a chart type.
15
+
16
+ ```bash
17
+ canon slides list --json 2>/dev/null
18
+ ```
19
+
20
+ 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.
21
+
22
+ Read `${CLAUDE_SKILL_DIR}/references/deck.md`. It states what `deck.json` holds, what each slide declares on its `<body>`, the motion attributes, speaker notes, and charts. Each refusal prints as a `✗` line from the render.
23
+
24
+ ## Draw the deck
25
+
26
+ A deck folder sits at `.canon/slides/<deck>/` from the project root, and holds:
27
+
28
+ - 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.
29
+ - `deck.json`, optional, for the title, the header and footer bands, slide numbers, the mark, and embedded faces.
30
+ - `assets/` for images the slides reference by a relative path.
31
+
32
+ Never write a slide into `.canon/slides/layouts/`. That folder holds the project's shared layouts and is never listed as a deck.
33
+
34
+ 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.
35
+
36
+ ## Design rules
37
+
38
+ 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.
39
+
40
+ - Use the project's custom properties, such as `var(--color-accent)`, for every color, face, and spacing value, read from `.claude/design/base.css` and overrides under `.claude/design/project/`
41
+ - When neither exists, say the deck renders unstyled rather than inventing values to cover it
42
+ - Leave the `--color-*` roles to the stylesheet. The master reads its colors off the first slide's `<html>`, so a slide computing its own `--color-text` is reported, since the bands keep the master's.
43
+ - 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.
44
+
45
+ ### Fit and shapes
46
+
47
+ Text and shapes have to survive the conversion.
48
+
49
+ - Keep titles short and lines tight, so text fits its box at the size the design sets rather than overflowing the frame.
50
+ - Never write centered body text.
51
+ - Prefer CSS the converter maps to native shapes. An unmappable property is drawn as a picture and reported on stderr, so a slide full of gradients and filters stops being editable.
52
+
53
+ ## Render
54
+
55
+ Shell out to the CLI. It writes the deck and reports the path.
56
+
57
+ ```bash
58
+ canon slides render <deck>
59
+ ```
60
+
61
+ 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.
62
+
63
+ 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.
64
+
65
+ ## QA loop
66
+
67
+ Run this once after the first render, then stop.
68
+
69
+ 1. Convert the deck with `soffice --headless --convert-to pdf <deck>.pptx`, then `pdftoppm -r 90 -png <deck>.pdf slide`. If either is missing, skip the image pass and say so rather than fail the render.
70
+ 2. Open and inspect every rendered image in this session, checking each slide for overlap, overflow, low contrast, and empty regions.
71
+ 3. Fix the reported issues and the `✗` lines in the slide files once, re-render, and stop. Do not loop indefinitely on aesthetics.
72
+
73
+ ## Response
74
+
75
+ After rendering, report:
76
+
77
+ - The deck folder, the slide count, and the written `.pptx` path
78
+ - Whether the project's token stylesheet was found
79
+ - Each `✗` line the final render printed, or that it printed none
80
+ - Any QA issues found and what changed, or that the deck passed clean
@@ -15,7 +15,7 @@ The rules also had three carriers, a standard, a generated rule pointing at it,
15
15
 
16
16
  - Hold the format and structure reference in `references/markdown.md`, the one copy, read by sibling path from every skill that writes markdown
17
17
  - Send the session to `canon markdown audit` after an edit, since the audit reads the bans from the package and a restated list would drift
18
- - Route voice to `write-human` and a Mermaid fence to `draft-figure` rather than restating either
18
+ - Route voice to `write-human` and a Mermaid fence to `draw-figure` rather than restating either
19
19
 
20
20
  ## Must not
21
21
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: markdown-craft
3
- description: Carries the format and structure rules for markdown, being headings, the density limits, paragraph and list shape, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording, and runs the audit after an edit. Use before a substantial markdown edit, when writing a README, a doc, a skill body, or any `.md` file, or when asked "what are the markdown rules" or "which characters are banned". Do NOT use for voice, rhythm, or word choice, which is `write-human`, or for a Mermaid fence or figure, which is `draft-figure`.
3
+ description: Carries the format and structure rules for markdown, being headings, the density limits, paragraph and list shape, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording, and runs the audit after an edit. Use before a substantial markdown edit, when writing a README, a doc, a skill body, or any `.md` file, or when asked "what are the markdown rules" or "which characters are banned". Do NOT use for voice, rhythm, or word choice, which is `write-human`, or for a Mermaid fence or figure, which is `draw-figure`.
4
4
  metadata:
5
5
  family: answer
6
6
  ---
@@ -14,4 +14,4 @@ Run `canon markdown audit <path>` after the edit, and fix every ban and density
14
14
  ## Routes
15
15
 
16
16
  - Voice, rhythm, sentence construction, and information density: load `write-human`.
17
- - A Mermaid fence or a figure: load `draft-figure`, since the audit skips every line inside a fence.
17
+ - A Mermaid fence or a figure: load `draw-figure`, since the audit skips every line inside a fence.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: pick-by-eye
3
+ description: Why a decision settled by looking needs its own surface, and where its boundary against the planning, audit, measurement, and recording skills falls
4
+ ---
5
+
6
+ # Pick by eye requirement
7
+
8
+ ## Gap
9
+
10
+ Without this skill, a session facing a decision settled by looking describes the options in prose or ships one answer to a taste call. The operator never sees what they chose between. A drafted set varies several properties or the wrong layer, sits in the real surface, and mixes themes and widths, so no pick names what decided it.
11
+
12
+ The evidence fails as well. Arms get reported without being rendered or judged, a driver finding reads as a verdict, and the pick question arrives with no address to look at. Renders land in scratch, each round overwrites the last, and the losing arms vanish with the run's pages.
13
+
14
+ ## Must
15
+
16
+ - Three to five arms, the shipping state among them, each carry an id, a label, and a cost, and vary only at a layer named from the `design-taste` catalog
17
+ - Each round is one canvas page of frames at their judged widths, themed by the canvas toggle and captured once as a composite, with the link ahead of the first pick question
18
+ - Every arm is rendered and judged against a stated bar before handover, and a missing browser or a canvas that will not start is reported as a refusal
19
+ - The pick comes through the structured question surface with the recommendation first and every option's cost, and the winner lands in one change
20
+ - Every round stays openable on its own page until the pick, and the picked round's arms are captured into the citing record at the main root before the run's pages go
21
+
22
+ ## Must not
23
+
24
+ - Take the pick where two arms are defensible and the difference is taste
25
+ - Draft candidates for a decision the operator has not asked to make, or for a request that already names one answer
26
+ - Write into the real surface before the pick is final
27
+ - Restate the mechanics `canon canvas` and `canon drive` own, or read a drive finding as a gate over the arms
28
+ - Delete a canvas page or stop a server the run did not start
29
+
30
+ ## Out of scope
31
+
32
+ - Planning the work once the answer is settled, which `plan-feature` owns
33
+ - Finding roughness by reading source, which `ux-audit` owns
34
+ - Measuring what a running interface costs to paint, which `ux-measure` owns
35
+ - Listing what to look at on a change already made, which `ui-checklist` owns
36
+ - Scripting a recording of something already built, which `script-screencast` owns