@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,86 +1,25 @@
1
1
  ---
2
2
  name: draft-and-pick
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
3
+ description: Why a pointer answers under the old `draft-and-pick` name, and the test that retires it
4
4
  ---
5
5
 
6
6
  # Draft and pick requirement
7
7
 
8
8
  ## Gap
9
9
 
10
- Without this skill, a session facing a decision nobody can settle from a diff:
11
-
12
- - Describes two options in prose and asks the operator to choose. The operator decides by looking, so a described option is not an option and the answer that comes back is arbitrary.
13
- - Produces one answer for a decision that was taste, so the operator never sees what they were choosing between and the call is taken silently by whoever wrote the code.
14
- - Reports that a candidate reads well without rendering it, so the claim rests on the markup having been written rather than on the page having been seen.
15
- - Hands over one image per arm, which asks the operator to hold the differences in memory rather than showing them. The comparison is the artifact and a set of separate files is not one.
16
- - Varies three properties at once across the arms, so the pick cannot say which difference decided it and the next iteration guesses.
17
- - Writes the candidates into the real surface, so the losing arms have to be unpicked out of a tree the operator has not judged yet, and a variant left behind a flag becomes a second design nobody maintains.
18
- - Stops the loop when the arms stop differing rather than when the operator says the pick is right, which ends the run on the session's own patience.
19
- - Reads a driver record as a verdict and drops an arm on it. `canon drive` reports findings and never gates, so a run filtering the arms on a probe reading has made a claim the probe catalog has not earned.
20
- - Reads a color without compositing its alpha, samples a round control at the corner of its bounding box, or confirms a panel's dimensions while it sits above the viewport. Each reads as a passing measurement about something no reader sees.
21
- - Meets a machine with no browser binary and reports on the arms anyway, since nothing in the default flow separates a render that failed from one that was never attempted.
22
- - Hand-writes a mockup of a surface a running app already serves, which drifts from what ships by a few pixels and a few words the moment the app's own markup or stylesheet moves on.
23
- - Varies a property the decision is not about, which satisfies the one-property rule and produces a set differing in the layer a reader notices least. Five palettes over one identical page read as five skins of one design, and the operator rejected the whole set on sight.
24
- - Renders each arm in whatever theme it happens to carry, so a set spanning both themes cannot be compared without the operator toggling every arm and holding the earlier ones in memory.
25
- - Looks at a render to confirm it came out rather than to judge whether it is worth showing, which satisfies the rule against reporting an unseen result and still hands over weak work.
26
- - Writes the run's renders to a scratch path outside the record that cites them, leaving the folder holding source markup and none of the images, so the judgment is unreachable to everyone except the session that made it.
27
- - Narrows the page onto the picked arm in place on each iteration, so every earlier round is overwritten and a later pass cannot see what was already rejected.
28
- - Names no layer at all, since the instruction to name one carries no catalog to name from and nothing reports the omission. Four consecutive rounds against one page each varied a property at the top layer while the defect sat two below it, and three of the four changed nothing the operator could see.
29
- - Judges a lower layer through a finished higher one, so an operator asked about composition looks at the palette instead and answers about that.
30
- - Hands over the combined page alone for a decision about layout, where every arm sits in a column while the media queries answer to the whole window, so no arm is ever seen at its own viewport and a fault that appears only narrower survives the pick.
31
- - Rebuilds a navigation harness by hand on a run with several rounds, since each round writes its own folder and nothing reaches all of them from one address. Two design tracks hand-wrote the same page picker and theme toggle.
32
- - Meets a session with no canvas server and drafts into a file instead, which leaves the operator a second surface to open and the run a second close to remember. The canvas is the one drafting surface, so a run without one starts it rather than falling back.
33
- - Puts the pick question with no address in its output, after capturing the page and reading the image back. The operator then has to ask for a served page before they can look, so the question goes unanswered or gets answered blind.
34
- - Sets the theme on an arm that persists its own and reads it back on load, so the control reports one theme while the arm renders the other and the set is compared across two.
10
+ Without this skill, a person typing the old name after the rename to `pick-by-eye` meets an unknown command with nothing naming where the skill went. A target that has not run `canon migrate skill-names` still holds files telling someone to type it, and a live gitignored record written before the rename still names it, since the sweep reads the tracked listing only.
35
11
 
36
12
  ## Must
37
13
 
38
- - Produce three to five arms with the shipping state among them, each carrying an id, a label, and what the arm costs.
39
- - Draft every arm of a round as one self-contained frame on one canvas page and capture that page once as a composite, so the comparison arrives as one image, except where the surface under decision is a running app: there each frame links a copy of the built stylesheet inside the page folder rather than inlining it, per `references/live-arms.md`.
40
- - Start the canvas when none is serving, and stop on a canvas that refuses to start or answers with a blank shell, rather than drafting into a file.
41
- - Emit the layer in the run's own output, drawn from the catalog `design-taste` fixes rather than from a word invented per run, and vary the arms at that layer alone. A layer held privately is one nothing can report missing, which is how the instruction went unfollowed while every round passed its own rules.
42
- - Grey-box the set when the declared layer sits below typography, and say the set is grey-boxed when handing it over, so the operator reads a flat page as the question rather than as unfinished work.
43
- - Theme every arm off the attribute the canvas toggle sets on each frame, so one control sets the whole set and the comparison holds still while the operator reads it, and give no arm a script that reads a stored preference back on load over the toggle.
44
- - Give each frame the width the arm is judged at, since a frame renders at its own layout width and answers how an arm behaves at a width where a column on a shared page could not.
45
- - Judge each render against a stated bar before handing it over, name the weakest thing on the page, and fix it where that sentence would embarrass the work.
46
- - Write each iteration to its own canvas page rather than narrowing the previous one in place, so every earlier round stays openable from the canvas page list.
47
- - Write the run's renders inside the record that cites them wherever one exists, and reserve the scratch path for inputs that are re-runnable and cited by nothing.
48
- - Render before reporting on any arm, and report a missing browser binary as a refusal naming the repair rather than describing an arm nobody has seen.
49
- - Take the pick through the structured question surface, with the recommendation ranked first and marked, and every option carrying its cost. Read the canvas selection only to resolve an answer that points at it, and treat an empty or stale selection as no answer.
50
- - Keep every write inside the run's own canvas pages until the pick is final.
51
- - Apply the winning arm in one change.
52
- - Capture every arm from the round the pick came from, whichever round that is, as an image named for its frame before deleting the run's pages, rather than discarding the losing arms with them.
53
- - Delete only the canvas pages the run itself added, recorded as it adds them, and stop only a canvas server the run itself started.
54
- - Resolve the archival capture's destination against the main worktree root, never against a linked worktree the run happens to be building in.
55
- - Put the candidates on the canvas on every run, whatever the decision's layer, and emit the canvas link ahead of the first pick question, so the operator can open the page the question is about and a still is never the only address.
14
+ - Name `pick-by-eye` as the skill to run, so a typed invocation of the old name reaches the new one in one step
15
+ - Carry `disable-model-invocation: true`, so routing never matches the old description against a request the new skill owns
56
16
 
57
17
  ## Must not
58
18
 
59
- - Take the pick where two arms are both defensible and the difference is taste. That call is the operator's, and taking it silently is the failure this skill exists to prevent.
60
- - Draft candidates for a decision the operator has not asked to make. Each arm costs a render, and a run offering options everywhere spends their attention rather than saving it.
61
- - Restate the mechanics of the canvas, the render, or the probes. `canon canvas` and `canon drive` own those and their help text is the source, so a second copy here hands one case two answers.
62
- - Read a `canon drive` finding as a gate over the arms.
63
- - Fire on a request that already names one answer.
64
-
65
- ## Guards
66
-
67
- The refusal strings sit in the body, since the runtime loads that file and ignores this one. Two conditions stop a run: a request naming one answer and asking for it to be built, and a decision with no visible form for a render to show.
19
+ - Carry any part of the draft and pick loop, which would give one behavior two bodies that drift apart
20
+ - Retire on a release number. Retire it when `canon migrate skill-names --json` reports zero citations in every target the rollout reaches and no live `.canon/` record names the old name, since a release number retires it on a date nothing measured.
68
21
 
69
22
  ## Out of scope
70
23
 
71
- - `plan-feature` plans the work once the answer is settled, and declares the pull request boundary its plan carries. This produces the answer to pick from and stops before the plan.
72
- - `ux-audit` reads source to find roughness and reports it. This takes its input from the operator and changes nothing until they pick.
73
- - `ux-measure` measures what a running interface costs to paint. This measures whatever a visual claim depends on, which is usually geometry or contrast rather than cost.
74
- - `ui-checklist` writes what to look at on a change already made. This runs before there is a change to look at.
75
- - `draft-screencast` scripts a recording of something already built. This has nothing built yet.
76
- - `canon canvas` owns the page, the frames, the selection, the address, and the render, and `canon drive` owns the probes. Both are invoked rather than reimplemented.
77
-
78
- ### What did not travel
79
-
80
- This descends from a project-local skill whose interactive half was written against one repository. Three of its capabilities do not travel, and the two verbs above are what stands in their place:
81
-
82
- - An arm switcher compiled into the project's own page, driven by a query parameter. A canvas page of frames replaces it, which puts the arms on the canvas rather than in the source and removes the call site a run had to remember to delete.
83
- - A copy cycle keyed to canonical page text held in a second repository. No toolkit surface has that shape, so a project holding one owns the second edit and this skill states nothing about it.
84
- - A walker that reads every control on every page and groups them by treatment. `canon drive` probes one page and reports findings, so a sweep across every surface of a site is out of reach here and a run needing one measures by hand.
85
-
86
- The capture mechanics traveled with a change of owner rather than being lost. They sat in a project-local path-scoped rule that fired whether or not the skill ran, and `canon canvas capture` owns them here, which is why this file bars restating them rather than naming a rule to defer to.
24
+ - The work itself, which `pick-by-eye` owns
25
+ - Rewriting a stale citation, which `canon migrate skill-names` owns in a tracked file and the controlling session owns on the board
@@ -1,161 +1,11 @@
1
1
  ---
2
2
  name: draft-and-pick
3
- description: Drafts several candidates for a decision judged by looking, lays them out side by side as frames on one canvas page, hands the operator the address, takes the pick through the structured question surface, and loops on the pick until they stop. Use when asked to "draft some options", "show me a few versions", "try a few variations", "mock up alternatives", "give me candidates for X", or when a choice is taste rather than correctness. Do NOT use when the request already names the answer and asks for it to be built, which is `plan-feature`. Do NOT use to read source for roughness, which is `ux-audit`, to measure what a running interface costs to paint, which is `ux-measure`, to write what to look at on a change already made, which is `ui-checklist`, or to script a recording, which is `draft-screencast`.
3
+ description: Renamed from `draft-and-pick` to `pick-by-eye`. Answers a typed invocation of the old pick skill name by pointing at the new one.
4
+ disable-model-invocation: true
4
5
  metadata:
5
6
  family: decide
6
7
  ---
7
8
 
8
9
  # Draft and pick
9
10
 
10
- Some decisions are settled by looking rather than by reasoning, and no draft is wrong until one is picked. Every step here puts several candidates in front of the operator and keeps the real surface untouched until they have chosen.
11
-
12
- The candidates live on the local design canvas, the surface `canon:canvas-board` drives. Every verb below is `canon canvas`, and `${CLAUDE_SKILL_DIR}/../canvas-board/references/canvas.md` fixes the content format a frame takes. Read that reference before writing the first frame.
13
-
14
- ## Guards
15
-
16
- - If the request names one answer and asks for it to be built, stop: `❌ This names one answer, so there is nothing to pick between. Use /canon:plan-feature.`
17
- - If the decision has no visible form, stop: `❌ Nothing to look at. Drafting candidates needs a decision a render can show.`
18
- - Draft no candidate for a decision the operator has not asked to make, since options everywhere spend their attention rather than saving it
19
-
20
- ## Step 1: name the decision and the arms
21
-
22
- 1. State the decision in one sentence, naming what changes between arms and what stays fixed.
23
- 2. Emit the design read in the run's output, in the form `design-taste` fixes, taking the layer from its ordered catalog. The arms differ at that layer, and a missing read is visible.
24
- 3. Derive a kebab slug from that sentence. The first round's page is `<slug>`, and Step 5 names later rounds `<slug>-2`, `<slug>-3`, and so on.
25
- 4. Write one arm per candidate, each carrying an id, a label, and what the arm costs. An arm with no stated cost is not an option.
26
- 5. Make the current state arm `0`, so the baseline is a candidate rather than an absence. A decision with nothing shipped yet says so and starts at arm `1`.
27
- 6. Stop at three to five arms. Two is a comparison the operator can hold in prose, and past five the pick stops being a look and becomes a sort.
28
-
29
- Inside a live `plan-groundwork` track, renders land in the track's own `evidence/<slug>/renders/`, since a candidate render is evidence its decision file cites. Everywhere else they land in session scratch.
30
-
31
- ## Step 2: draft the arms as frames on one canvas page
32
-
33
- Every arm of a round sits as one frame on one canvas page, side by side. The operator judges that page, never a set of separate images compared from memory.
34
-
35
- 1. Start the canvas the way `canon:canvas-board` Step 1 states, unless this run already has. Note whether this run started the server, since Step 6 stops only a server this run started.
36
- 2. Add the round's page with `canon canvas page add <page> --json` and record it on the run's list of pages. A name `canvas list` already shows is somebody else's, so take the next free suffix.
37
- 3. Add each arm with `canon canvas frame add <page> arm-<id> --width <px> --height <px> --json`. Step 6's archive keys on the `arm-<id>` names.
38
- 4. Write each arm's whole document to the `path` the add verb reported. From a linked worktree, take the heredoc route `canon:canvas-board` Step 3 gives for a main-root write.
39
- 5. Lay the frames out in one row, in arm order, with `canon canvas frame move <page> arm-<id> --x <px> --y <px> --json`.
40
-
41
- The `canvas-board` start reads `canon canvas list --json`, serves with `canon canvas serve --json` in the background unless the operator named an address that answers, and checks the shell's body holds a `<script` tag. A refused serve or a blank shell stops the run with its `reason`, and no file stands in for a canvas.
42
-
43
- Set each frame's width to the one the arm is judged at. A frame renders at its own layout width on the canvas and in a capture alike, so a layout decision needs no device toolbar.
44
-
45
- ### What every frame carries
46
-
47
- Each frame carries its own label and follows the canvas theme, so the set reads as one comparison.
48
-
49
- - Label each arm inside its frame with its id and its cost, since the composite capture draws no captions
50
- - Theme every arm off the `data-theme` attribute the canvas sets on each frame's root, so the theme toggle sets the whole set at once. A set spanning both themes cannot be compared.
51
- - Give no arm a script that stores a theme and reapplies it on load. It overwrites the toggle, and a fresh browser profile hides the fault.
52
-
53
- ### Default path and live app
54
-
55
- A running app under decision takes the live-app branch, and every other decision takes the default path.
56
-
57
- - Live app: lift the rendered markup and link a copy of the built stylesheet rather than inlining, per `${CLAUDE_SKILL_DIR}/references/live-arms.md`
58
- - Default path: inline every style, script, and asset. A frame resolves nothing outside its own page folder, so a build step or network font silently drops out.
59
- - Default path: name a real font first in the stack, one the machine has or the frame embeds, such as the project's own family. A generic keyword such as `system-ui` resolves differently per machine.
60
-
61
- The capture refuses a frame that would rewrap against a substitute font rather than ship a false comparison. A frame naming no font is refused on whatever the default resolves to.
62
-
63
- ### What varies
64
-
65
- Vary one property across the arms, since a pick cannot say which of three differences decided it.
66
-
67
- - Vary the property the decision is about. Holding composition fixed and varying color produces five skins of one design, and a palette cannot be picked ahead of the composition it serves.
68
- - Grey-box the arms when the declared layer sits below typography, per `design-taste`, and say the set is grey-boxed when handing it over
69
- - Do not grey-box a set judged at composition that carries a finished palette, since the operator looks at the higher layers instead of the question
70
-
71
- ## Step 3: render and hand off
72
-
73
- Render the page and look at what came back before handing anything over:
74
-
75
- ```bash
76
- canon canvas capture <page> --composite --json
77
- ```
78
-
79
- - Point `--out` at `evidence/<slug>/renders/<page>.png` inside a live track, and leave the scratch default elsewhere. Step 6 archives the picked round alone.
80
- - Read the PNG's `path` off the record. The composite shows each frame in its default theme, so check the other theme on the live canvas.
81
- - A capture refusing on a font names the family it read. Take the repair `canon:canvas-board` Step 6 gives and capture again.
82
-
83
- When `canon canvas capture` refuses for a missing browser binary, report it and name `bunx playwright install chromium` as the repair. Stop the canvas server if this run started it, then stop rather than describe an arm nobody has seen.
84
-
85
- ### Handing over
86
-
87
- Hand over the address rather than a description. Emit the canvas link first on its own line, naming the page, then the PNG path on its own line.
88
-
89
- - A still answers how a thing looks and none of a hover, a scroll-linked position, or a pace, which the live frame does
90
- - Never report a visual result you have not looked at, since a claim about appearance with no render behind it is a guess
91
- - Look to judge rather than to confirm. Name the weakest thing on the page in a sentence, fix it where that sentence would embarrass the work, and say what remains.
92
-
93
- ## Step 4: take the pick
94
-
95
- Put the choice to the operator through the structured question surface, since a call the operator's preference decides always routes through it rather than through prose.
96
-
97
- - Emit the link ahead of the question call and again in the question's text, since some surfaces render the card alone
98
- - One option per arm, labeled with the arm's id and carrying its cost as the description
99
- - Rank the recommendation first and mark it `(Recommended)`
100
- - Author the real arms only. The surface appends its own free-text and reopen escapes, and a duplicate is rejected.
101
-
102
- ### Taking the answer
103
-
104
- Take no pick on the operator's behalf when two arms are both defensible and the difference is taste. That call is theirs, and a silent one is the failure this skill exists to prevent.
105
-
106
- Read `canon canvas selection --json` when the answer points at the canvas, such as "the selected one". Resolve it against the record's `page` as well as its `frame`, since every round reuses the `arm-<id>` names.
107
-
108
- | Selection | Reading |
109
- | ---------------------------------------------------------------- | ---------------------------------------------- |
110
- | A frame on the current round's page | The pick |
111
- | A frame on an earlier round's page | A revert, so name the round back before acting |
112
- | A fresh element inside a picked frame | A correction Step 5 carries by its `index` |
113
- | `selection: null`, a page this run did not add, or `stale: true` | No answer, so ask again rather than guess |
114
-
115
- ## Step 5: loop on the pick
116
-
117
- 1. Add each iteration as its own page, recorded on the run's list. An overwritten page cannot be reopened, and the losing round stops a correction re-proposing a rejected arm.
118
- 2. Write fresh arms off the pick and return to Step 2 where the correction opens a new question. Revise the one arm's frame where it does not.
119
- 3. Re-render, hand off again, and take the next answer.
120
- 4. Repeat until the operator says it is right. A run stopping because the arms stopped differing has stopped early.
121
- 5. Hold the real surface untouched across every iteration. Nothing outside the run's own canvas pages changes until the pick is final.
122
-
123
- ## Step 6: close
124
-
125
- 1. Apply the winning arm to the real surface, in one change.
126
- 2. Close out any document stating the decision as open, in the same change, naming the winner and the arms that stayed defensible. Skip this where nothing stated the decision.
127
- 3. Capture the picked round's frames with `canon canvas capture <page> --out <archive-dir> --json`. Each lands as `arm-<id>.png`, keeping the losing arms as a revert record.
128
- 4. Resolve `<archive-dir>` as `.canon/picks/<slug>/` against the main worktree root, since shared session scratch resolves there rather than in a linked worktree.
129
- 5. Delete every page folder on the run's list from under the `content` folder `canon canvas list --json` reports. Touch no page the run did not add, whatever its name.
130
- 6. Stop the canvas server if this run started it, and leave one the operator started running.
131
- 7. Leave the renders in a live track's `evidence/<slug>/renders/`, since `plan-groundwork` treats evidence as durable.
132
- 8. Report each page whose delete is refused, naming the path for the operator to remove. The pick is applied either way.
133
- 9. Report every surface that changed, each on its own line, name the winning arm by its id and its cost, and report the archive path.
134
-
135
- The picked round is the final one unless Step 4 resolved a revert. Archiving any other page lets item 5 delete the winning arm with nothing kept, and a variant left on the canvas is a second design nobody maintains.
136
-
137
- ## Reading a measurement
138
-
139
- A capture proves appearance and a measurement proves a relationship, so reach for the second whenever the claim is a number, such as a contrast ratio, a column width, or a tap target. `canon drive` runs the probes and ships the failure modes each one carries.
140
-
141
- - Composite alpha before reading a color. A `color-mix` toward transparent resolves to channels plus an alpha, and reading them as opaque reports a color nobody sees.
142
- - Sample inside the shape. A patch at a bounding box corner misses a round control and reads the page behind it.
143
- - Ask whether a reader would see the thing. A panel sized a healthy 1517 by 639 passed every size check while sitting 1868px above the viewport.
144
-
145
- `canon drive` reports findings and never gates. Read its record as evidence for the operator rather than as a filter over the arms, since the probe catalog has not earned the right to drop one.
146
-
147
- ## What this delegates
148
-
149
- Cite these rather than restating them. A step reimplemented here rots against the skill that owns it.
150
-
151
- - `plan-feature` plans the work once the pick is made, and declares the pull request boundary that plan carries
152
- - `design-taste` carries the layer catalog, the ordering, grey-boxing, and the defaults an arm should reach past
153
- - `write-human` carries the voice for any copy an arm puts in front of a reader
154
-
155
- ### Git and review
156
-
157
- Commits, review, and the canvas mechanics each have an owner.
158
-
159
- - `git-stage`, `git-pr`, and `git-followup` carry the commits and the pull request
160
- - `review-pr` and `review-address` run the review pass
161
- - `canon:canvas-board` carries the canvas start-and-check sequence, the main-root write route for a frame, and the selection and capture refusals
11
+ This skill is now `pick-by-eye`. Run `/canon:pick-by-eye` instead, and change any file that still names this one.
@@ -1,46 +1,25 @@
1
1
  ---
2
2
  name: draft-doc
3
- description: Why a brand-new project document needs its kind's standard, a catalog collision check, and a confirm step, not the rewrite and refresh paths docs-sync and context-fold already own
3
+ description: Why a pointer answers under the old `draft-doc` name, and the test that retires it
4
4
  ---
5
5
 
6
- # Doc draft requirement
6
+ # Draft doc requirement
7
7
 
8
8
  ## Gap
9
9
 
10
- Without this skill, a session drafting a document that has no prior version either invents a shape from memory or reaches for a rewrite or refresh surface. `docs-sync` and `context-fold` read an existing document and a diff, and a document that never existed has neither, so they report the request as unrelated to any change. Either way the document ships with no read of the standard its kind answers to and no check against the catalog for a sibling already covering the same ground under a different name.
11
-
12
- The same procedure ran as five skills, one per kind, each restating the read, the collision check, the confirm, and the write. They drifted on their own cadence, and five descriptions competed for one trigger, writing a new document.
10
+ Without this skill, a person typing the old name after the rename to `write-doc` meets an unknown command with nothing naming where the skill went. A target that has not run `canon migrate skill-names` still holds files telling someone to type it, and a live gitignored record written before the rename still names it, since the sweep reads the tracked listing only.
13
11
 
14
12
  ## Must
15
13
 
16
- - Resolve the kind from the destination the request names, and ask rather than defaulting when it names none, since a document in the wrong surface is invisible where a reader looks for it
17
- - Load exactly one kind reference per run, so every step that differs by kind lives in one file and the shared procedure in one body
18
- - Read the kind's standard before drafting, since its frontmatter contract and its reader questions make the document arguable against a sibling
19
- - Check the catalog by exact name and by title and description, since a subject can be covered under a name the request does not guess
20
- - Confirm the resolved path, the kind's detections, and the full content with the user before writing, since placement and detection are judgment calls with no diff to preview them against
21
- - Regenerate the catalog of the folder the document landed in, where the kind keeps one, so the next run's collision check sees it
22
- - Draft a README from the template for every detected project type and combine them, never the closest one, since a project that is a CLI and a plugin owes its reader both
23
- - Carry each kind's own musts in its reference: the root check for context, both placement tests and a fetched source for the wiki, and project detection and rendered-value badges for the readme
14
+ - Name `write-doc` as the skill to run, so a typed invocation of the old name reaches the new one in one step
15
+ - Carry `disable-model-invocation: true`, so routing never matches the old description against a request the new skill owns
24
16
 
25
17
  ## Must not
26
18
 
27
- - Rewrite, refresh, or sync a document that already exists. A collision refuses toward the surface that owns the existing document.
28
- - Hand-edit an `index.md`. It regenerates from sibling frontmatter, and a hand edit is overwritten on the next regen.
29
- - Substitute recall for a failed fetch on the wiki kind, or invent an image or a placeholder path on the readme kind.
30
- - Build a hand-drawn diagram loop for a docs page.
31
- - Widen the wiki's folder split to admit a subject its second placement test rejects. That is a change to the standard, argued there.
32
- - Assume this skill's routing needs no check. One description now covers four triggers, and a ranking over descriptions is a proxy for how Claude Code routes, so a review some months in should read real invocations back.
33
-
34
- ## Guards
35
-
36
- - No subject given, for any kind but the readme: stop and ask what the document should cover.
37
- - No destination named: ask which kind rather than defaulting to `docs/`.
38
- - Every other guard is the kind's own, stated in its reference.
19
+ - Carry any part of the document draft, which would give one behavior two bodies that drift apart
20
+ - Retire on a release number. Retire it when `canon migrate skill-names --json` reports zero citations in every target the rollout reaches and no live `.canon/` record names the old name, since a release number retires it on a date nothing measured.
39
21
 
40
22
  ## Out of scope
41
23
 
42
- - Rewriting or syncing an existing `docs/` page or an authored README against a diff: `docs-sync`
43
- - Refreshing an existing context entry: `context-fold`
44
- - Drafting a governance rule: `create-rule`
45
- - Drawing a figure or a diagram for a document: `draft-figure`
46
- - Voice, rhythm, punctuation, and formatting in the drafted document: the `write-human` skill and the markdown standard
24
+ - The work itself, which `write-doc` owns
25
+ - Rewriting a stale citation, which `canon migrate skill-names` owns in a tracked file and the controlling session owns on the board
@@ -1,83 +1,11 @@
1
1
  ---
2
2
  name: draft-doc
3
- description: Drafts one brand-new project document from scratch against the standard for its kind, picking the kind from where it lands, a `docs/` page, a `canon/context/` entry, a wiki reference page, or a README.md. Checks the catalog for a name or topic collision, places it, confirms with the user, then writes. Use when asked to "write a new docs page for X", "write a context entry for X", "write a wiki page for X", or "write a README" where none exists yet. Do NOT use to rewrite or sync an existing page or README against a diff, which is `docs-sync`, or to refresh a context entry, which is `context-fold`.
3
+ description: Renamed from `draft-doc` to `write-doc`. Answers a typed invocation of the old doc 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
- # Doc draft
9
+ # Draft doc
9
10
 
10
- Drafts one brand-new project document end to end: resolve its kind, read the standard that kind answers to, check the catalog for a collision, place it, draft, confirm with the user, then write.
11
-
12
- ## Resolve the kind
13
-
14
- Each kind has one standard and one reference. Load the reference for the resolved kind and no other, since every step below that differs by kind lives there.
15
-
16
- | Kind | Lands at | Standard | Reference |
17
- | ------- | -------------------------------------------------------- | ----------------------------------------------------------- | --------------------------------------------- |
18
- | docs | a page under `docs/` | `${CLAUDE_SKILL_DIR}/../docs-sync/references/docs.md` | `${CLAUDE_SKILL_DIR}/references/docs.md` |
19
- | context | an entry under `canon/context/` | `${CLAUDE_SKILL_DIR}/../context-fold/references/context.md` | `${CLAUDE_SKILL_DIR}/references/context.md` |
20
- | wiki | a reference page on a subject owned outside this project | `${CLAUDE_SKILL_DIR}/references/wiki.md` | `${CLAUDE_SKILL_DIR}/references/wiki-kind.md` |
21
- | readme | a `README.md`, at the root or in a folder | `${CLAUDE_SKILL_DIR}/../docs-sync/references/readme.md` | `${CLAUDE_SKILL_DIR}/references/readme.md` |
22
-
23
- - Read the kind off the destination the request names: a path, a folder, or the document's own name, such as "a context entry" or "a wiki page".
24
- - Ask which kind when the request names no destination, offering the candidates the subject fits with the likeliest first
25
- - Never default to `docs/` without saying so, since a subject documented in the wrong surface is invisible to the session that looks for it in the right one
26
- - If no subject is given for any kind but readme, stop: `❌ No subject given. Name what this document should cover.`
27
- - A README covers the project or the folder it sits in, so its subject is the target path
28
-
29
- ## Read
30
-
31
- Read these in parallel, from the project root where a path is relative:
32
-
33
- - The kind's standard from the table above: the reader the document serves, its frontmatter, its structure, and what it links out to rather than restates
34
- - `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md`: punctuation and formatting for all generated text
35
- - The `write-human` skill: voice, rhythm, and sentence construction for all generated text
36
- - The kind's reference from the table above
37
-
38
- ## Guards
39
-
40
- Run the guards the reference states before placing or drafting anything. Each one stops toward the surface that owns the case, and a stop writes nothing.
41
-
42
- ## Placement
43
-
44
- Settle the path and check the catalog for a collision the way the reference states. An exact-name check alone misses a document already covering the subject under another name, so check the titles and descriptions of the catalog the placement step already reads, and stop the same way on a match.
45
-
46
- ## Draft
47
-
48
- - Draft against the kind's standard, keeping its template and its section order.
49
- - Draft frontmatter where the standard requires it, then the body, following the reference for what the kind adds.
50
- - Write for a reader with no source open. Omit an expected section with nothing to put in it rather than padding it.
51
-
52
- ## Confirm
53
-
54
- - Show the kind, the resolved path, whatever else the reference names for the preview, and the full drafted content before writing.
55
- - Confirm with the user, and wait for that answer rather than treating the tool permission dialog as the gate
56
- - The kind, the placement, and every detection the reference runs are judgment calls with no diff to preview them against, which is why the dialog cannot stand in
57
-
58
- ## Write
59
-
60
- - Write the file at the confirmed path, creating the folder when it is absent unless the reference narrows that.
61
- - Run `canon markdown audit <path>` and fix every ban, density, and reference shape finding until a re-run reports none. The whole file is this run's draft, so every finding is its own.
62
- - Run `canon indexes regen <folder>` on the folder the reference names, so its `index.md` picks up the new document. Skip it where the reference says the kind keeps no catalog.
63
-
64
- ## Response format
65
-
66
- ### Preview
67
-
68
- **Kind:** `<docs | context | wiki | readme>`
69
- **Subject:** `<subject, or the target path for a README>`
70
- **Placement:** `<path>`
71
- <one line per preview field the reference names>
72
-
73
- ```markdown
74
- <drafted frontmatter and body>
75
- ```
76
-
77
- ### After confirmation
78
-
79
- One line once the file is written and its audit reports nothing.
80
-
81
- ```plaintext
82
- ✅ Drafted: <path>
83
- ```
11
+ This skill is now `write-doc`. Run `/canon:write-doc` instead, and change any file that still names this one.
@@ -1,59 +1,25 @@
1
1
  ---
2
2
  name: draft-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
3
+ description: Why a pointer answers under the old `draft-figure` name, and the test that retires it
4
4
  ---
5
5
 
6
6
  # Draft figure requirement
7
7
 
8
8
  ## Gap
9
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.
10
+ Without this skill, a person typing the old name after the rename to `draw-figure` meets an unknown command with nothing naming where the skill went. A target that has not run `canon migrate skill-names` still holds files telling someone to type it, and a live gitignored record written before the rename still names it, since the sweep reads the tracked listing only.
17
11
 
18
12
  ## Must
19
13
 
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
14
+ - Name `draw-figure` as the skill to run, so a typed invocation of the old name reaches the new one in one step
15
+ - Carry `disable-model-invocation: true`, so routing never matches the old description against a request the new skill owns
33
16
 
34
17
  ## Must not
35
18
 
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.
19
+ - Carry any part of the figure draft, which would give one behavior two bodies that drift apart
20
+ - Retire on a release number. Retire it when `canon migrate skill-names --json` reports zero citations in every target the rollout reaches and no live `.canon/` record names the old name, since a release number retires it on a date nothing measured.
52
21
 
53
22
  ## Out of scope
54
23
 
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
24
+ - The work itself, which `draw-figure` owns
25
+ - Rewriting a stale citation, which `canon migrate skill-names` owns in a tracked file and the controlling session owns on the board
@@ -1,85 +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, 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`.
3
+ description: Renamed from `draft-figure` to `draw-figure`. Answers a typed invocation of the old figure 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 figure
9
10
 
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
- ```
11
+ This skill is now `draw-figure`. Run `/canon:draw-figure` instead, and change any file that still names this one.