@erclx/canon 5.31.0 → 5.32.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 (303) hide show
  1. package/README.md +1 -1
  2. package/claude/.claude-plugin/plugin.json +1 -1
  3. package/claude/skills/api-design/references/adopted.md +1 -1
  4. package/claude/skills/auto-ship/REQUIREMENT.md +4 -16
  5. package/claude/skills/auto-ship/SKILL.md +13 -58
  6. package/claude/skills/auto-ship/references/draft-mark.md +2 -2
  7. package/claude/skills/auto-ship/references/failure-recovery.md +1 -5
  8. package/claude/skills/auto-ship/references/tier-failures.md +1 -1
  9. package/claude/skills/auto-ship/references/ui-checklist.md +2 -2
  10. package/claude/skills/auto-ship/references/verb-absent.md +3 -27
  11. package/claude/skills/backlog-triage/SKILL.md +1 -1
  12. package/claude/skills/canon-cli/REQUIREMENT.md +4 -6
  13. package/claude/skills/canon-cli/SKILL.md +2 -2
  14. package/claude/skills/canon-feedback/REQUIREMENT.md +1 -1
  15. package/claude/skills/canon-feedback/SKILL.md +10 -13
  16. package/claude/skills/canon-feedback-triage/REQUIREMENT.md +13 -14
  17. package/claude/skills/canon-feedback-triage/SKILL.md +49 -30
  18. package/claude/skills/canvas/REQUIREMENT.md +3 -4
  19. package/claude/skills/canvas/SKILL.md +5 -5
  20. package/{standards → claude/skills/canvas/references}/canvas.md +12 -1
  21. package/claude/skills/ci-workflow/REQUIREMENT.md +0 -1
  22. package/claude/skills/context-fold/REQUIREMENT.md +8 -20
  23. package/claude/skills/context-fold/SKILL.md +20 -44
  24. package/claude/skills/context-fold/references/classify.md +7 -8
  25. package/claude/skills/context-fold/references/completion-report.md +2 -6
  26. package/claude/skills/context-fold/references/context-refresh.md +5 -15
  27. package/claude/skills/context-fold/references/promoted-pages.md +3 -3
  28. package/claude/skills/context-fold/references/receipt-sweep.md +6 -17
  29. package/claude/skills/context-fold/references/unusable-baseline.md +4 -6
  30. package/claude/skills/create-rule/REQUIREMENT.md +0 -1
  31. package/claude/skills/create-skill/REQUIREMENT.md +6 -4
  32. package/claude/skills/create-skill/SKILL.md +8 -7
  33. package/{standards → claude/skills/create-skill/references}/skill-paths.md +1 -0
  34. package/claude/skills/decision-escalate/REQUIREMENT.md +1 -1
  35. package/claude/skills/decision-escalate/SKILL.md +1 -1
  36. package/claude/skills/design-taste/REQUIREMENT.md +0 -2
  37. package/claude/skills/design-taste/SKILL.md +1 -3
  38. package/claude/skills/design-taste/references/vocabulary.md +1 -1
  39. package/claude/skills/docs-sync/REQUIREMENT.md +3 -3
  40. package/claude/skills/document-health/REQUIREMENT.md +2 -2
  41. package/claude/skills/document-health/SKILL.md +4 -5
  42. package/claude/skills/document-health/references/axes.md +4 -6
  43. package/claude/skills/draft-and-pick/REQUIREMENT.md +16 -14
  44. package/claude/skills/draft-and-pick/SKILL.md +40 -32
  45. package/claude/skills/draft-and-pick/references/live-arms.md +9 -9
  46. package/claude/skills/draft-doc/REQUIREMENT.md +5 -5
  47. package/claude/skills/draft-doc/SKILL.md +9 -10
  48. package/claude/skills/draft-doc/references/requirements.md +61 -0
  49. package/claude/skills/draft-doc/references/wiki-kind.md +53 -0
  50. package/claude/skills/draft-doc/references/wiki.md +50 -30
  51. package/claude/skills/draft-figure/REQUIREMENT.md +2 -2
  52. package/claude/skills/draft-figure/SKILL.md +4 -4
  53. package/claude/skills/draft-figure/references/architecture-set.md +4 -4
  54. package/claude/skills/draft-figure/references/hand-drawn.md +1 -1
  55. package/claude/skills/draft-figure/references/mermaid-path.md +55 -0
  56. package/claude/skills/draft-figure/references/mermaid.md +43 -34
  57. package/claude/skills/draft-identity/REQUIREMENT.md +1 -1
  58. package/claude/skills/draft-identity/SKILL.md +9 -7
  59. package/claude/skills/draft-ready/REQUIREMENT.md +1 -1
  60. package/claude/skills/draft-ready/SKILL.md +6 -6
  61. package/claude/skills/draft-ready/references/assembly.md +1 -1
  62. package/{standards → claude/skills/draft-ready/references}/ready.md +13 -5
  63. package/claude/skills/git-issue/references/issue.md +3 -3
  64. package/claude/skills/git-ship/REQUIREMENT.md +0 -2
  65. package/claude/skills/git-ship/SKILL.md +16 -24
  66. package/claude/skills/plan-feature/SKILL.md +2 -6
  67. package/{standards → claude/skills/plan-feature/references}/plan.md +9 -10
  68. package/claude/skills/plan-groundwork/SKILL.md +5 -6
  69. package/{standards → claude/skills/plan-groundwork/references}/groundwork.md +17 -4
  70. package/claude/skills/plan-intake/SKILL.md +2 -3
  71. package/{standards → claude/skills/plan-intake/references}/intake.md +17 -2
  72. package/claude/skills/plan-intake-answer/REQUIREMENT.md +1 -1
  73. package/claude/skills/plan-intake-answer/SKILL.md +1 -1
  74. package/claude/skills/review-address/SKILL.md +1 -1
  75. package/claude/skills/review-craft/REQUIREMENT.md +3 -3
  76. package/claude/skills/review-craft/SKILL.md +2 -2
  77. package/claude/skills/review-craft/references/ui.md +4 -4
  78. package/claude/skills/review-pr/REQUIREMENT.md +1 -1
  79. package/claude/skills/review-pr/SKILL.md +5 -7
  80. package/claude/skills/review-ui/REQUIREMENT.md +0 -1
  81. package/claude/skills/review-ui/SKILL.md +1 -1
  82. package/claude/skills/role-orchestrator/REQUIREMENT.md +0 -3
  83. package/claude/skills/role-orchestrator/SKILL.md +8 -8
  84. package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +3 -3
  85. package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +7 -10
  86. package/claude/skills/role-orchestrator/references/orchestrator-parked.md +2 -2
  87. package/claude/skills/role-orchestrator/references/orchestrator-refill.md +0 -3
  88. package/claude/skills/role-orchestrator/references/orchestrator-resume.md +1 -1
  89. package/claude/skills/role-planner/SKILL.md +2 -2
  90. package/claude/skills/role-reviewer/SKILL.md +1 -1
  91. package/claude/skills/role-worker/SKILL.md +2 -2
  92. package/claude/skills/session-compact/REQUIREMENT.md +1 -4
  93. package/claude/skills/session-compact/SKILL.md +3 -13
  94. package/claude/skills/session-compact/references/handoff-note.md +2 -2
  95. package/claude/skills/session-map/REQUIREMENT.md +1 -9
  96. package/claude/skills/session-map/SKILL.md +8 -16
  97. package/{standards → claude/skills/session-map/references}/session.md +17 -11
  98. package/claude/skills/session-relay/REQUIREMENT.md +1 -1
  99. package/claude/skills/session-resume/REQUIREMENT.md +4 -6
  100. package/claude/skills/session-resume/SKILL.md +3 -9
  101. package/claude/skills/session-worktree/SKILL.md +1 -1
  102. package/claude/skills/session-worktree/references/main-root-writes.md +2 -2
  103. package/claude/skills/systematic-debugging/REQUIREMENT.md +0 -1
  104. package/claude/skills/target-check/REQUIREMENT.md +3 -3
  105. package/claude/skills/target-check/SKILL.md +1 -1
  106. package/claude/skills/target-check/references/domains.md +1 -1
  107. package/claude/skills/target-setup/REQUIREMENT.md +4 -4
  108. package/claude/skills/target-setup/SKILL.md +3 -3
  109. package/claude/skills/target-setup/references/detect.md +1 -1
  110. package/claude/skills/task-board/SKILL.md +4 -4
  111. package/claude/skills/task-board/references/archive.md +1 -1
  112. package/{standards → claude/skills/task-board/references}/board.md +9 -0
  113. package/claude/skills/task-board/references/decline.md +1 -1
  114. package/{standards → claude/skills/task-board/references}/tasks.md +13 -8
  115. package/claude/skills/teach-workspace/SKILL.md +1 -1
  116. package/claude/skills/teach-workspace/references/revisit.md +1 -1
  117. package/{standards → claude/skills/teach-workspace/references}/teach.md +17 -5
  118. package/claude/skills/ux-audit/REQUIREMENT.md +2 -2
  119. package/claude/skills/ux-audit/SKILL.md +2 -3
  120. package/claude/skills/write-human/REQUIREMENT.md +0 -1
  121. package/claude/skills/write-human/SKILL.md +1 -1
  122. package/docs/agents/audits.md +1 -1
  123. package/docs/agents/canvas.md +1 -1
  124. package/docs/agents/commands.md +1 -6
  125. package/docs/agents/context-audit-checks.md +9 -23
  126. package/docs/agents/context-audit.md +7 -15
  127. package/docs/agents/context-classify.md +5 -5
  128. package/docs/agents/counts.md +5 -5
  129. package/docs/agents/drift-surfaces.md +2 -2
  130. package/docs/agents/index.md +3 -5
  131. package/docs/agents/install-and-sync.md +6 -6
  132. package/docs/agents/intake.md +1 -1
  133. package/docs/agents/records-stale.md +5 -5
  134. package/docs/agents/records-validate.md +1 -1
  135. package/docs/agents/records.md +2 -2
  136. package/docs/agents/restated.md +1 -1
  137. package/docs/agents/rule-citations.md +1 -1
  138. package/docs/agents/skills-audit.md +2 -2
  139. package/docs/agents/state-scoped-risk.md +2 -2
  140. package/docs/agents/superseded.md +2 -2
  141. package/docs/agents/tasks-plans.md +1 -1
  142. package/docs/agents/tasks-validate.md +1 -1
  143. package/docs/agents/tasks.md +1 -1
  144. package/docs/agents/teach.md +1 -1
  145. package/docs/agents/upstream.md +26 -2
  146. package/docs/target/migrations.md +24 -0
  147. package/docs/target/projects.md +5 -7
  148. package/docs/target/scenarios.md +2 -2
  149. package/docs/target/sync.md +3 -3
  150. package/docs/workflow/ai-workflow.md +7 -38
  151. package/docs/workflow/index.md +1 -1
  152. package/docs/workflow/operating-model.md +8 -8
  153. package/docs/workflow/parallel-features.md +7 -7
  154. package/docs/workflow/skill-map-on-request.md +12 -15
  155. package/docs/workflow/skill-map.md +20 -32
  156. package/docs/workflow/visual-design-workflow.md +11 -14
  157. package/governance/renames.toml +0 -19
  158. package/governance/rules/canon/605-worktrees.md +1 -1
  159. package/governance/rules/{standards → canon}/plan.md +4 -5
  160. package/governance/rules/canon/tasks.md +18 -0
  161. package/governance/stacks/base.toml +1 -1
  162. package/package.json +1 -1
  163. package/scripts/core/install-check.sh +1 -1
  164. package/scripts/core/regen-web-previews.ts +1 -1
  165. package/src/audits/catalog.ts +5 -97
  166. package/src/claude/cases/authoring.ts +0 -18
  167. package/src/claude/cases/misc.ts +0 -13
  168. package/src/claude/cases/setup.ts +3 -20
  169. package/src/claude/cases/workflow.ts +0 -33
  170. package/src/claude/seeds.ts +1 -7
  171. package/src/claude/skills-audit.ts +1 -1
  172. package/src/cli/help.ts +1 -4
  173. package/src/cli.ts +0 -4
  174. package/src/commands/claude.ts +8 -14
  175. package/src/commands/context.ts +18 -280
  176. package/src/commands/feedback.ts +22 -91
  177. package/src/commands/records.ts +5 -5
  178. package/src/commands/sync.ts +5 -3
  179. package/src/commands/upstream.ts +135 -0
  180. package/src/context/audit.ts +5 -14
  181. package/src/context/classify/extract.ts +6 -13
  182. package/src/context/classify/patterns.ts +2 -41
  183. package/src/context/classify/prompts.ts +2 -6
  184. package/src/context/classify/run.ts +3 -3
  185. package/src/context/folders.ts +7 -12
  186. package/src/context/gate.ts +11 -91
  187. package/src/context/requirements.ts +13 -4
  188. package/src/counts/scan.ts +3 -3
  189. package/src/design/components.ts +2 -2
  190. package/src/feedback/body.ts +0 -12
  191. package/src/gate/measures.ts +6 -57
  192. package/src/gov/citations.ts +9 -3
  193. package/src/gov/restated.ts +3 -3
  194. package/src/markdown/structure.ts +2 -2
  195. package/src/migrate/record-layout.ts +3 -3
  196. package/src/records/ordinal.ts +1 -1
  197. package/src/records/prune.ts +2 -1
  198. package/src/records/stale-canonical.ts +2 -2
  199. package/src/roots/record.ts +1 -1
  200. package/src/sandbox/scenario.ts +115 -11
  201. package/src/shipped/references.ts +3 -3
  202. package/src/standards/read.ts +31 -0
  203. package/src/sync/seeds-report.ts +1 -1
  204. package/src/tasks/reach.ts +2 -2
  205. package/src/tasks/validate.ts +1 -1
  206. package/src/teach/workspace.ts +1 -1
  207. package/src/upstream/cursor.ts +1 -1
  208. package/src/upstream/due.ts +128 -0
  209. package/src/upstream/releases.ts +2 -1
  210. package/standards/context.md +3 -5
  211. package/standards/design.md +2 -3
  212. package/standards/index.md +0 -22
  213. package/standards/publish.md +1 -1
  214. package/standards/skill.md +1 -1
  215. package/tooling/base/reference.md +1 -1
  216. package/tooling/claude/reference.md +6 -20
  217. package/tooling/claude/seeds/.claude/hooks/records-index.sh +8 -20
  218. package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +3 -3
  219. package/tooling/claude/seeds/CLAUDE.md +1 -3
  220. package/tooling/claude/seeds/canon/REQUIREMENTS.md +2 -9
  221. package/tooling/web/configs/e2e/screenshot.ts +0 -1
  222. package/claude/skills/auto-ship/references/review-findings.md +0 -20
  223. package/claude/skills/bash-cli-script/REQUIREMENT.md +0 -43
  224. package/claude/skills/bash-cli-script/SKILL.md +0 -53
  225. package/claude/skills/bash-cli-script/references/template.md +0 -19
  226. package/claude/skills/canon-operator/REQUIREMENT.md +0 -62
  227. package/claude/skills/canon-operator/SKILL.md +0 -113
  228. package/claude/skills/canon-rollout/REQUIREMENT.md +0 -59
  229. package/claude/skills/canon-rollout/SKILL.md +0 -140
  230. package/claude/skills/canon-rollout/references/failure-recovery.md +0 -20
  231. package/claude/skills/context-fold/references/anchor-sweep.md +0 -58
  232. package/claude/skills/context-fold/references/wireframe-sweep.md +0 -45
  233. package/claude/skills/create-standard/REQUIREMENT.md +0 -33
  234. package/claude/skills/create-standard/SKILL.md +0 -31
  235. package/claude/skills/design-extract/REQUIREMENT.md +0 -42
  236. package/claude/skills/design-extract/SKILL.md +0 -108
  237. package/claude/skills/draft-and-pick/references/frame.html +0 -118
  238. package/claude/skills/draft-doc/references/wireframes.md +0 -48
  239. package/claude/skills/markdown-propose/REQUIREMENT.md +0 -47
  240. package/claude/skills/markdown-propose/SKILL.md +0 -122
  241. package/claude/skills/markdown-propose/references/format.md +0 -118
  242. package/claude/skills/memory-capture/REQUIREMENT.md +0 -50
  243. package/claude/skills/memory-capture/SKILL.md +0 -117
  244. package/claude/skills/memory-review/REQUIREMENT.md +0 -52
  245. package/claude/skills/memory-review/SKILL.md +0 -129
  246. package/claude/skills/memory-review/references/later-phases.md +0 -118
  247. package/claude/skills/memory-review/references/receipt-format.md +0 -64
  248. package/claude/skills/project-commands/REQUIREMENT.md +0 -42
  249. package/claude/skills/project-commands/SKILL.md +0 -87
  250. package/claude/skills/repo-metadata/REQUIREMENT.md +0 -37
  251. package/claude/skills/repo-metadata/SKILL.md +0 -54
  252. package/claude/skills/restate-plainly/REQUIREMENT.md +0 -41
  253. package/claude/skills/restate-plainly/SKILL.md +0 -41
  254. package/claude/skills/review-branch/REQUIREMENT.md +0 -40
  255. package/claude/skills/review-branch/SKILL.md +0 -137
  256. package/claude/skills/seed-sync/REQUIREMENT.md +0 -45
  257. package/claude/skills/seed-sync/SKILL.md +0 -158
  258. package/claude/skills/sketch-design/REQUIREMENT.md +0 -38
  259. package/claude/skills/sketch-design/SKILL.md +0 -94
  260. package/claude/skills/ux-walkthrough/REQUIREMENT.md +0 -56
  261. package/claude/skills/ux-walkthrough/SKILL.md +0 -53
  262. package/claude/skills/ux-walkthrough/references/builds.md +0 -15
  263. package/claude/skills/ux-walkthrough/references/candidate-pages.md +0 -11
  264. package/claude/skills/ux-walkthrough/references/measuring.md +0 -22
  265. package/claude/skills/ux-walkthrough/references/record.md +0 -36
  266. package/claude/skills/ux-walkthrough/references/relay.md +0 -25
  267. package/docs/agents/architecture-record.md +0 -36
  268. package/docs/agents/review-classification.md +0 -76
  269. package/governance/rules/canon/603-memory.md +0 -11
  270. package/governance/rules/lang/120-bash.md +0 -18
  271. package/governance/rules/standards/architecture.md +0 -13
  272. package/governance/rules/standards/groundwork.md +0 -13
  273. package/governance/rules/standards/intake.md +0 -12
  274. package/governance/rules/standards/memory.md +0 -12
  275. package/governance/rules/standards/ready.md +0 -13
  276. package/governance/rules/standards/requirements.md +0 -12
  277. package/governance/rules/standards/session.md +0 -13
  278. package/governance/rules/standards/tasks.md +0 -15
  279. package/governance/rules/standards/teach.md +0 -14
  280. package/governance/rules/standards/wiki.md +0 -13
  281. package/governance/rules/standards/wireframes.md +0 -13
  282. package/src/autoship/classify.ts +0 -75
  283. package/src/autoship/paths.ts +0 -50
  284. package/src/commands/autoship.ts +0 -129
  285. package/src/commands/repo.ts +0 -393
  286. package/src/context/architecture.ts +0 -654
  287. package/src/context/wireframe-states.ts +0 -238
  288. package/src/repo/metadata.ts +0 -206
  289. package/standards/architecture.md +0 -127
  290. package/standards/memory.md +0 -158
  291. package/standards/mermaid.md +0 -64
  292. package/standards/requirements.md +0 -79
  293. package/standards/wiki.md +0 -77
  294. package/standards/wireframes.md +0 -143
  295. package/tooling/claude/seeds/.claude/memory/index.md +0 -8
  296. package/tooling/claude/seeds/canon/ARCHITECTURE.md +0 -23
  297. package/tooling/claude/seeds/canon/wireframes/index.md +0 -8
  298. /package/{standards → claude/skills/create-skill/references}/skill-practice.md +0 -0
  299. /package/{standards → claude/skills/create-skill/references}/skill-requirement.md +0 -0
  300. /package/{standards → claude/skills/plan-feature/references}/plan-lifecycle.md +0 -0
  301. /package/{standards → claude/skills/plan-groundwork/references}/groundwork-spikes.md +0 -0
  302. /package/{standards → claude/skills/task-board/references}/tasks-decline.md +0 -0
  303. /package/{standards → claude/skills/teach-workspace/references}/glossary.md +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: draft-and-pick
3
- description: Drafts several candidates for a decision judged by looking, renders them side by side on one page, hands the operator the addresses, 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`, to script a recording, which is `draft-screencast`, or to inspect a running app across many findings, which is `ux-walkthrough`.
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`.
4
4
  metadata:
5
5
  family: decide
6
6
  ---
@@ -9,6 +9,8 @@ metadata:
9
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
11
 
12
+ The candidates live on the local design canvas, the surface `canon:canvas` drives. Every verb below is `canon canvas`, and `canon standards canvas` fixes the content format a frame takes. Read that standard before writing the first frame.
13
+
12
14
  ## Guards
13
15
 
14
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.`
@@ -19,25 +21,29 @@ Some decisions are settled by looking rather than by reasoning, and no draft is
19
21
 
20
22
  1. State the decision in one sentence, naming what changes between arms and what stays fixed.
21
23
  2. Emit the design read in the run's own output, in the form `design-taste` fixes. The layer comes from that skill's ordered catalog rather than from a word invented here, and the arms differ at it rather than somewhere cheaper to change. A run emitting no read has not decided what it is drafting, and a missing line is visible where an unstated layer is not.
22
- 3. Derive a kebab slug from that sentence. Call the folder every file this run writes to `<dest>` below. `<dest>` is `.canon/tmp/<slug>/`, a nested `<slug>/` folder rather than a flat `<slug>-<file>.md`, which is the shape every temporary write in this project takes. Running inside a live `plan-groundwork` track is the one exception: `<dest>` is the track's own `evidence/<slug>/` instead, since a candidate render is evidence the track's decision file cites rather than spike input.
24
+ 3. Derive a kebab slug from that sentence. The first round's canvas page takes `<slug>` as its name, and Step 5 names each later round `<slug>-2`, `<slug>-3`, and so on. Inside a live `plan-groundwork` track, the run's renders land in the track's own `evidence/<slug>/renders/`, since a candidate render is evidence the track's decision file cites rather than spike input. Everywhere else they land in session scratch.
23
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.
24
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`.
25
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.
26
28
 
27
- ## Step 2: author the candidate set as one page
29
+ ## Step 2: draft the arms as frames on one canvas page
30
+
31
+ Every arm of a round sits as one frame on one canvas page, side by side. The comparison the operator judges is that page, never a set of separate images handed over to compare from memory.
32
+
33
+ 1. Start the canvas the way `canon:canvas` Step 1 states, unless this run already has: read `canon canvas list --json`, start `canon canvas serve --json` in the background unless the operator named an address that already answers, and fetch the `url` the record carries to check the shell's body holds a `<script` tag. Note whether this run started the server, since Step 6 stops only a server this run started. A refused serve or a blank shell stops the run, reported with its `reason`. A run with no canvas cannot draft, and no file stands in for one.
34
+ 2. Add the round's page with `canon canvas page add <page> --json` and record its name on the run's own list of pages it added. A name `canvas list` already shows belongs to somebody else, so take the next free suffix rather than writing into it.
35
+ 3. Add each arm as a frame with `canon canvas frame add <page> arm-<id> --width <px> --height <px> --json`. Name every frame `arm-<id>`, since Step 6's archive keeps those names and its readers key on them. Set the width the arm is judged at. A frame renders at its own layout width on the canvas and in a capture alike, so a decision about layout reads off the frame itself and needs no device toolbar.
36
+ 4. Write each arm's whole document to the `path` the add verb reported. From a linked worktree, take the heredoc route `canon:canvas` Step 3 gives for a main-root write.
37
+ 5. Lay the frames out in one row, in arm order, with `canon canvas frame move <page> arm-<id> --x <px> --y <px> --json`.
28
38
 
29
- Write every arm side by side on one self-contained HTML page at `<dest>/candidates.html`, and write each arm again as its own self-contained whole-page file at `<dest>/arms/arm-<id>.html`. Clear `<dest>/arms/` first on every pass through this step, including from Step 5's loop, so a file left behind by a wider earlier round never survives into a narrower one.
39
+ ### What every frame carries
30
40
 
31
- - One page for the pick, never a set of separate images handed to the operator to compare from memory. The comparison they judge is `candidates.html`, which Step 3 renders and Step 4 asks about. The per-arm files exist only for Step 6's archival capture, once the pick is made, and only the last pass through this step is what Step 6 finds there.
32
- - Wrap each arm's markup in the same class on both files, chosen once per run and reused everywhere, so one selector addresses an arm on the combined page and on its own standalone file alike.
33
- - Label each arm on the page with its id and its cost, so the render carries what the question will ask about.
34
- - Give the combined page one control that sets every arm's theme at once, beside whatever per-arm control the arms carry. A set spanning both themes cannot be compared, since the operator has to toggle each arm and hold the earlier ones in memory, which is the failure the single-page rule exists to prevent.
35
- - Set that theme so it survives the arm reading its own preference back. An arm that stores a theme and applies it on load will overwrite whatever the control set, which shows the control in one state and the arm in the other, and it passes a fresh browser profile because the stored value is not there yet.
36
- - Write `<dest>/frame.html` from `${CLAUDE_SKILL_DIR}/references/frame.html` where the run has more than one round, and hand over its address beside the combined page. Replace the template's one data token with the JSON object its comment describes, listing the combined page and every per-arm file of this round and each earlier one, with each `src` relative to the frame and `themeKey` set to the key the arms read their theme from. The frame is the route to every round from one address, with a page picker and the global theme toggle. Earlier rounds are sibling folders, so serve the parent folder with `canon serve <parent> --entry <dest-name>/frame.html` rather than `<dest>`, and keep the per-arm files as the fallback where nothing is served.
37
- - Hand over the per-arm file addresses beside the combined page where the declared layer is composition, layout or space, and say that an arm is judged at a width by opening its own file in the browser's device toolbar. The combined page cannot answer that question at all: every arm sits in a column there while the media queries answer to the whole window, so each one renders its widest layout in a narrow space no matter how the window is sized. Build no width control of your own, since the browser already has one.
41
+ - Label each arm inside its frame with its id and its cost. The composite capture draws no captions, so the label is how the render carries what the question will ask about.
42
+ - Theme every arm off the `data-theme` attribute the canvas sets on each frame's root, so the canvas theme toggle sets the whole set at once. A set spanning both themes cannot be compared, since the operator has to hold one arm in memory while reading the next.
43
+ - Give no arm a script that stores a theme and reapplies it on load. That script overwrites the toggle, shows one frame in the other theme, and passes a fresh browser profile because the stored value is not there yet.
38
44
  - Take the live-app branch instead when the surface under decision is a running app: lift the rendered markup and link a copy of the built stylesheet rather than inlining, per `${CLAUDE_SKILL_DIR}/references/live-arms.md`.
39
- - On the default path, inline every style, script, and asset the page needs. The render reads the file off disk, so a page reaching for a build step or a network font renders without it and the arms differ by something nobody chose.
40
- - On the default path, name a real font first in the stack, one the machine has or the page embeds, such as the project's own family from its design tokens. A generic keyword such as `system-ui` or `sans-serif` is refused, since it resolves to a different font on each machine. The render refuses a page that would rewrap against a substitute rather than shipping a false comparison, so a page naming no font at all is refused on whatever the default resolves to.
45
+ - On the default path, inline every style, script, and asset the frame needs. A frame resolves nothing outside its own page folder, so one reaching for a build step or a network font renders without it and the arms differ by something nobody chose.
46
+ - On the 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 from its design tokens. A generic keyword such as `system-ui` or `sans-serif` is refused, since it resolves to a different font on each machine. The capture refuses a frame that would rewrap against a substitute rather than shipping a false comparison, so a frame naming no font at all is refused on whatever the default resolves to.
41
47
 
42
48
  ### What varies
43
49
 
@@ -47,19 +53,17 @@ Write every arm side by side on one self-contained HTML page at `<dest>/candidat
47
53
 
48
54
  ## Step 3: render and hand off
49
55
 
50
- Serve the page first, then render it and look at what came back. Every run serves, whatever the decision's layer, since a pick asked about a page the operator cannot open is a question nobody can answer.
56
+ Render the page and look at what came back before handing anything over:
51
57
 
52
58
  ```bash
53
- canon serve <dest> --entry candidates.html --json
54
- canon capture <dest>/candidates.html --selector <element>
59
+ canon canvas capture <page> --composite --json
55
60
  ```
56
61
 
57
- - Start `canon serve` in the background and read the link off its record, never assuming a port, since the printed link opens `index.html` without `--entry` and `<dest>` holds no such file. Keep each server up through the loop and note its process, since Step 5 re-enters this step and Step 6 stops them all. Serving needs no browser, so the link exists the moment the page is written.
58
- - Where Step 2 wrote a frame, hand over the frame's link instead, served from the parent folder as Step 2 says, and let no earlier round's `<dest>`-only link stand as the address a later round cites.
59
- - `--selector` has no default and the command refuses without it. Name the element wrapping the arms rather than `body`, which crops to whatever the page's own margins leave.
60
- - `canon capture` and `canon drive` both need a browser binary the toolkit does not install. When either refuses for that reason, report the refusal and name `bunx playwright install chromium` as the repair, stop every server Step 3 started, then stop rather than describing an arm nobody has seen.
61
- - Write the render inside the record that cites it wherever one exists, by pointing `--out` at `<dest>/renders/` rather than at a session scratch path. A pick taken from an image the record does not hold is a judgment nobody but this session can check, and the archival capture in Step 6 covers the final round alone.
62
- - Hand over the address rather than a description. Emit the link first on its own line, then the PNG path on its own line. A still answers how a thing looks and answers none of a hover response, a scroll-linked position, or a pace, which the served page does.
62
+ - Point `--out` at `evidence/<slug>/renders/<page>.png` inside a live track, and leave it at its session-scratch default everywhere else. A pick taken from an image the track does not hold is a judgment nobody but this session can check, and the archive in Step 6 covers the picked round alone.
63
+ - Read the PNG's `path` off the record. The composite shows every frame in its default theme, so look at the other theme on the live canvas where the arms carry two.
64
+ - `canon canvas capture` needs a browser binary the toolkit does not install. When it refuses for that reason, report the refusal and name `bunx playwright install chromium` as the repair, stop the canvas server if this run started it, then stop rather than describing an arm nobody has seen.
65
+ - A capture refusing on a font names the family it read off the frame's text. Take the repair `canon:canvas` Step 6 gives and capture again.
66
+ - 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. A still answers how a thing looks and answers none of a hover response, a scroll-linked position, or a pace, which the live frame does.
63
67
  - Never report a visual result you have not looked at. A claim about appearance with no render behind it is a guess.
64
68
  - Look to judge rather than to confirm. Reading the image back to check it rendered satisfies the rule above and still hands over weak work, so name the weakest thing on the page in a sentence. Where that sentence would embarrass the work, fix it and hand over the second version. Say the remaining weakness out loud either way, so the operator is not hunting for what you already know.
65
69
 
@@ -72,25 +76,28 @@ Put the choice to the operator through the structured question surface, since a
72
76
  - Rank the recommendation first and mark it `(Recommended)`.
73
77
  - Author the real arms only. The surface appends its own escapes for a free-text answer and for reopening the question, so writing either as an option ships a duplicate the tool rejects.
74
78
  - 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.
79
+ - Read `canon canvas selection --json` when the answer points at the canvas rather than naming an arm, such as "the selected one". Resolve it against the record's `page` as well as its `frame`, since every round names its arms `arm-<id>` from the same ids. A selected frame on the current round's page is the pick. One on an earlier round's page picks that round's arm, which is a revert, so name the round back to the operator before acting on it. A fresh element inside a picked frame is a correction Step 5 carries by its `index`.
80
+ - Treat `selection: null`, a frame on a page this run did not add, or an element carrying `stale: true` as no answer, and ask again rather than guessing.
75
81
 
76
82
  ## Step 5: loop on the pick
77
83
 
78
- 1. Write each iteration to its own `<dest>` rather than narrowing the previous one in place, suffixing the slug so the folders sort. An iteration overwritten is one a later pass cannot open, and the losing round is what stops a correction re-proposing something already rejected.
79
- 2. Write fresh arms off the pick and return to Step 2 where the correction opens a new question. Revise the one arm where it does not. Each pass through Step 2 rewrites the frame with every earlier round's arms, since the list is baked in when the frame is written.
84
+ 1. Add each iteration as its own page, recorded on the run's list, rather than narrowing the previous page in place. A page overwritten is one a later pass cannot open, and the losing round is what stops a correction re-proposing something already rejected. The canvas page list reaches every round from one address.
85
+ 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.
80
86
  3. Re-render, hand off again, and take the next answer.
81
87
  4. Repeat until the operator says it is right. The loop stops on their word and on nothing else, so a run stopping because the arms stopped differing has stopped early.
82
- 5. Hold the real surface untouched across every iteration. Nothing outside the run's own folders changes until the pick is final.
88
+ 5. Hold the real surface untouched across every iteration. Nothing outside the run's own canvas pages changes until the pick is final.
83
89
 
84
90
  ## Step 6: close
85
91
 
86
92
  1. Apply the winning arm to the real surface, in one change.
87
93
  2. Close out whatever document stated the decision as open, in the same change, naming the arm that won and the ones that stayed defensible. A pick that changes a surface and records nothing about why leaves the next reader to re-derive it from a diff. Skip this where nothing stated the decision.
88
- 3. Batch-capture the final round's arm files, when `<dest>` is the scratch path: `canon capture <dest>/arms --selector <wrapper-class> --out <archive-dir>`, naming Step 2's chosen class. This is the directory-batch convention `draft-identity` Step 6 already uses.
89
- 4. Resolve `<archive-dir>` as `.canon/picks/<slug>/` against the main worktree root, since shared session scratch resolves there rather than against a linked worktree this run happens to be building in. The capture is what keeps every arm past the pick, the losing ones included, as a durable revert record distinct from the live comparison page.
90
- 5. Stop every background server Step 3 started, one per round where the loop re-entered it, then delete `<dest>` and every file inside it, when `<dest>` is the scratch path, now that every arm sits at the durable path above. A variant left behind there is a second design nobody maintains, and a server left running would serve a folder that no longer exists.
91
- 6. Leave `<dest>` in place when it is a live track's `evidence/<slug>/`: `plan-groundwork`'s write scope treats evidence as durable rather than as scratch a session may delete, and the arms already sit at a durable path there. Stop every server there too.
92
- 7. Report `<dest>` as still standing when the scratch-path delete is refused, naming the path for the operator to remove, rather than closing on a report the tree contradicts. The pick is applied either way, so the run has done its work and the folder is what outlives it.
93
- 8. Report every surface that changed, each on its own line, name the arm that won by its id and its cost, and report the archival path from Step 3 where it ran.
94
+ 3. Capture the frames of the round the pick came from into the archive with `canon canvas capture <page> --out <archive-dir> --json`. That page is the final round's unless Step 4 resolved a revert to an earlier round, and archiving any other page would let item 5 delete the winning arm with nothing kept. Each frame lands as `arm-<id>.png`, which keeps every arm of that round past the pick, the losing ones included, as a durable revert record.
95
+ 4. Resolve `<archive-dir>` as `.canon/picks/<slug>/` against the main worktree root, since shared session scratch resolves there rather than against a linked worktree this run happens to be building in.
96
+ 5. Delete every page folder on the run's list from under the `content` folder `canon canvas list --json` reports, now that every arm sits at the durable path. Touch no page the run did not add, whatever its name. A variant left on the canvas is a second design nobody maintains.
97
+ 6. Stop the canvas server if this run started it, and leave one the operator started running.
98
+ 7. Leave the renders in place inside a live track's `evidence/<slug>/renders/`, since `plan-groundwork`'s write scope treats evidence as durable rather than as scratch a session may delete.
99
+ 8. Report each page still standing when its delete is refused, naming the path for the operator to remove, rather than closing on a report the tree contradicts. The pick is applied either way, so the run has done its work and the page is what outlives it.
100
+ 9. Report every surface that changed, each on its own line, name the arm that won by its id and its cost, and report the archive path.
94
101
 
95
102
  ## Reading a measurement
96
103
 
@@ -112,4 +119,5 @@ Cite these rather than restating them. A step reimplemented here rots against th
112
119
  - `design-taste` carries the layer catalog, the ordering, grey-boxing, and the defaults an arm should reach past
113
120
  - `write-human` carries the voice for any copy an arm puts in front of a reader
114
121
  - `git-stage`, `git-pr`, and `git-followup` carry the commits and the pull request
115
- - `review-branch` and `review-address` run the review pass
122
+ - `review-pr` and `review-address` run the review pass
123
+ - `canon:canvas` carries the canvas start-and-check sequence, the main-root write route for a frame, and the selection and capture refusals
@@ -4,16 +4,16 @@ Read when the surface under decision is a running app rather than a static mocku
4
4
 
5
5
  ## Lift from the app
6
6
 
7
- - Dump the rendered markup of the surface under decision from the built page, after it has loaded, into a file under `<dest>`. Strip scripts from the dump.
8
- - Copy the built stylesheet and font files beside the page, at the path the dumped markup links them from, so a candidate page renders with the stylesheet the app ships. Every arm then differs from the shipped page only by what the arm names.
7
+ - Dump the rendered markup of the surface under decision from the built page, after it has loaded, into a scratch file the run reads from. Strip scripts from the dump.
8
+ - Copy the built stylesheet and font files into the canvas page folder, at the path each frame links them from, since a frame resolves only files inside its own page. Every arm then renders with the stylesheet the app ships and differs from the shipped page only by what the arm names.
9
9
  - Trim a large dump to the part the decision needs, and keep the wrapper classes intact so layout rules keyed to them still resolve.
10
- - Size each frame to the content width the decision names rather than the window width, since a container query reads the frame.
10
+ - Set each frame's `--width` to the content width the decision names rather than the window width, since a container query reads the frame.
11
11
  - Write copy an arm introduces with `write-human`, and take every other word from the dump.
12
12
 
13
- ## The page
13
+ ## The frames
14
14
 
15
- - Generate the page with a short script, one per round, so a shared change is one edit and a rerun.
16
- - Put a theme button on the page that flips the app's own theme switch on the root, rather than drawing each frame once per theme. Read `?arm=<id>&theme=<name>` to strip every other arm and the button for capture. Skip the button for an app that ships one theme.
17
- - Print each frame's measurement under it from a script in the page, so the numbers the operator reads are the browser's.
18
- - Write an index page linking one page per arm when an arm is a whole page or a route rather than a frame, with thumbnails copied beside it.
19
- - Name anything the preview cannot reproduce, such as an asset whose colors follow the browser rather than the page's theme button, rather than fixing the page around it.
15
+ - Generate the frames with a short script, one per round, so a shared change is one edit and a rerun.
16
+ - Leave the theme to the canvas toggle, which sets the app's own `data-theme` switch on every frame's root. Name the attribute the app's stylesheet reads where it is not `data-theme`, since the toggle sets that one alone.
17
+ - Print each frame's measurement under it from a script in the frame, so the numbers the operator reads are the browser's.
18
+ - Draw an arm that is a whole page or a route as one frame at that page's width, so it still sits beside the other arms on the round's page.
19
+ - Name anything the canvas cannot reproduce, such as an asset whose colors follow the browser rather than the frame's theme, rather than fixing the frame around it.
@@ -20,16 +20,16 @@ The same procedure ran as five skills, one per kind, each restating the read, th
20
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
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
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 and wireframes, tier detection and the two modes for wireframes, both placement tests and a fetched source for the wiki, and project detection and rendered-value badges for the readme
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
24
24
 
25
25
  ## Must not
26
26
 
27
27
  - Rewrite, refresh, or sync a document that already exists. A collision refuses toward the surface that owns the existing document.
28
28
  - Hand-edit an `index.md`. It regenerates from sibling frontmatter, and a hand edit is overwritten on the next regen.
29
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 companion render for a detected wireframe tier, or a hand-drawn diagram loop for a docs page.
30
+ - Build a hand-drawn diagram loop for a docs page.
31
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 five 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.
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
33
 
34
34
  ## Guards
35
35
 
@@ -40,7 +40,7 @@ The same procedure ran as five skills, one per kind, each restating the read, th
40
40
  ## Out of scope
41
41
 
42
42
  - Rewriting or syncing an existing `docs/` page or an authored README against a diff: `docs-sync`
43
- - Refreshing an existing context entry or wireframe, or stubbing a surface a diff touched: `context-fold`
44
- - Drafting a standard or a governance rule: `create-standard`, `create-rule`
43
+ - Refreshing an existing context entry: `context-fold`
44
+ - Drafting a governance rule: `create-rule`
45
45
  - Drawing a figure or a diagram for a document: `draft-figure`
46
46
  - Voice, rhythm, punctuation, and formatting in the drafted document: the `write-human` skill and the markdown standard
@@ -1,6 +1,6 @@
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 `canon/wireframes/` surface, 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", "draft a wireframe 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 or wireframe, which is `context-fold`.
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`.
4
4
  metadata:
5
5
  family: generate
6
6
  ---
@@ -13,15 +13,14 @@ Drafts one brand-new project document end to end: resolve its kind, read the sta
13
13
 
14
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
15
 
16
- | Kind | Lands at | Standard | Reference |
17
- | ---------- | -------------------------------------------------------- | --------------------------------------------------- | ---------------------------------------------- |
18
- | docs | a page under `docs/` | `${CLAUDE_SKILL_DIR}/../../standards/docs.md` | `${CLAUDE_SKILL_DIR}/references/docs.md` |
19
- | context | an entry under `canon/context/` | `${CLAUDE_SKILL_DIR}/../../standards/context.md` | `${CLAUDE_SKILL_DIR}/references/context.md` |
20
- | wireframes | a surface under `canon/wireframes/` | `${CLAUDE_SKILL_DIR}/../../standards/wireframes.md` | `${CLAUDE_SKILL_DIR}/references/wireframes.md` |
21
- | wiki | a reference page on a subject owned outside this project | `${CLAUDE_SKILL_DIR}/../../standards/wiki.md` | `${CLAUDE_SKILL_DIR}/references/wiki.md` |
22
- | readme | a `README.md`, at the root or in a folder | `${CLAUDE_SKILL_DIR}/../../standards/readme.md` | `${CLAUDE_SKILL_DIR}/references/readme.md` |
16
+ | Kind | Lands at | Standard | Reference |
17
+ | ------- | -------------------------------------------------------- | ------------------------------------------------ | --------------------------------------------- |
18
+ | docs | a page under `docs/` | `${CLAUDE_SKILL_DIR}/../../standards/docs.md` | `${CLAUDE_SKILL_DIR}/references/docs.md` |
19
+ | context | an entry under `canon/context/` | `${CLAUDE_SKILL_DIR}/../../standards/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}/../../standards/readme.md` | `${CLAUDE_SKILL_DIR}/references/readme.md` |
23
22
 
24
- - 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 wireframe".
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".
25
24
  - Ask which kind when the request names no destination, offering the candidates the subject fits with the likeliest first. 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
25
  - If no subject is given for any kind but readme, stop: `❌ No subject given. Name what this document should cover.` A README covers the project or the folder it sits in, so its subject is the target path.
27
26
 
@@ -63,7 +62,7 @@ Settle the path and check the catalog for a collision the way the reference stat
63
62
 
64
63
  ### Preview
65
64
 
66
- **Kind:** `<docs | context | wireframes | wiki | readme>`
65
+ **Kind:** `<docs | context | wiki | readme>`
67
66
  **Subject:** `<subject, or the target path for a README>`
68
67
  **Placement:** `<path>`
69
68
  <one line per preview field the reference names>
@@ -0,0 +1,61 @@
1
+ ---
2
+ title: Requirements reference
3
+ description: Shape and content rules for canon/REQUIREMENTS.md
4
+ ---
5
+
6
+ # Requirements reference
7
+
8
+ Applies to `canon/REQUIREMENTS.md`. Describes what the product does and why, not how it works. Update when scope changes, goals shift, or a non-goal is promoted to a feature.
9
+
10
+ ## Scope
11
+
12
+ Governs the product-scope document at `canon/REQUIREMENTS.md`: goals and non-goals, with constraints and worldview when the project has them.
13
+
14
+ Does not govern:
15
+
16
+ - Execution order across the work the scope generates: `board.md`
17
+ - Per-domain structure, narrative, and the rationale for a technical choice: `context.md`
18
+
19
+ ## What goes in
20
+
21
+ - The problem being solved and for whom, as the record's opening line under the title
22
+ - User-facing goals stated as outcomes, not implementation
23
+ - Explicit non-goals that prevent feature creep. Mark deferred items "(deferred)" so they read as paused, not excluded. A non-goal resting on how an outside tool, an installer, or the model behaves may close with one `Revisit when <finding>.` sentence, and a non-goal resting on scope alone takes none.
24
+ - Hard constraints that shape every decision, when the project has any
25
+
26
+ ## What does not go in
27
+
28
+ - Implementation details, API names, or internal component references
29
+ - Anything that describes how a feature is built rather than what it does
30
+ - Measured results, such as scores, benchmark figures, or token counts. They move on every run and this file changes least. Name where the results live instead.
31
+ - Content another canonical doc owns, such as the stack list, which the context entry of the domain it constrains holds, or the rules of this standard itself
32
+
33
+ ## Sections
34
+
35
+ Require `## Goals` and `## Non-goals`. Add `## Constraints` when the project holds hard limits that shape every decision. Add `## Worldview` when the project holds beliefs that shape every decision, and keep a belief there only when it changes a decision, since a padded worldview turns into a second goals list. Drop a section rather than pad it with filler.
36
+
37
+ ## Length
38
+
39
+ This file loads into every session, so its weight is paid before any work starts. Cap it by stating the clause `This record holds at most <n> words.` in the record itself, where a checker reads it and counts every word below the frontmatter. The cap is the record's own, so a record stating none is measured and never gated. The template and the seed a new project installs state it at 600, and a project loosens it by editing the number in its own record. At the cap, cut a goal or a constraint that no longer changes a decision before adding one.
40
+
41
+ ## Lifecycle
42
+
43
+ The record may carry an optional `reviewed: YYYY-MM-DD` frontmatter field naming the day someone last read it whole for identity drift. Whoever finishes that review sets it as the review's last edit, and `canon records stale canonical` reads it to count the releases shipped since. A record with no field reads as never reviewed.
44
+
45
+ Later scope arrives as a new section rather than as an extension of the goals. Name the section for what it delivers and state its entries as outcomes, the same way the goals are stated. Once every entry in it has shipped, delete the section, since version history keeps the old text and the document states the project as it stands. Nothing sequences a section into versions. Work reaches the board as discrete tasks under `tasks.md`, and `board.md` orders them by readiness, so a section here states what is wanted and never when it lands.
46
+
47
+ ## Template
48
+
49
+ ```markdown
50
+ # Requirements
51
+
52
+ [One line: the problem and who has it]
53
+
54
+ This record holds at most 600 words.
55
+
56
+ ## Goals
57
+
58
+ ## Non-goals
59
+
60
+ <!-- ## Constraints: include only when hard limits shape every decision -->
61
+ ```
@@ -0,0 +1,53 @@
1
+ ---
2
+ title: Wiki kind
3
+ description: The root guard, both placement tests, catalog collision, sourcing from the owner, and vendor-folder regen for a brand-new wiki reference page, read by draft-doc once the request resolves to the wiki kind
4
+ ---
5
+
6
+ # Wiki kind
7
+
8
+ `draft-doc` reads this file when the request resolves to a wiki reference page. A page that already exists is edited against the same standard, never drafted a second time.
9
+
10
+ The standard's `## Placement` section names the folder a page lands in and the vendor subfolder under it. Resolve both from the project root and call them `<wiki-root>` and `<vendor>` below, so the standard stays the one owner of the path.
11
+
12
+ ## Guards
13
+
14
+ - If `<wiki-root>` does not resolve, say so and ask whether to create it before drafting. A project carrying no such folder has never taken the standard's placement rule, so creating it is a decision rather than a step.
15
+
16
+ ## Placement
17
+
18
+ The standard sets two tests and a page has to pass both. Run them before drafting anything, since a page failing either is non-conforming however well it is written.
19
+
20
+ - **Owned outside this repository.** A subject describing how this repository works fails. Refuse and offer the docs or context kind of this skill: `❌ <subject> is owned by this project, so it belongs in the docs surface or a context entry. Re-run draft-doc naming that destination.`
21
+ - **Owned by the vendor the folder split covers.** The standard names one owner and one subfolder. A third-party tool or a vendor-neutral concept fails, however reference-like it reads. Refuse: `❌ <subject> is outside the wiki's folder split. Route it to the docs surface or a skill body rather than adding a second folder for it.`
22
+
23
+ Do not widen the split to admit a subject. Adding a sibling folder is a change to the standard, argued there, rather than a placement this kind takes on its own.
24
+
25
+ ## Collision
26
+
27
+ - Derive the page slug per the standard's `## Naming` section and check whether `<wiki-root>/<vendor>/<slug>.md` already exists. If it does, stop: `❌ <path> already covers this subject. Edit that page against the standard instead of drafting a second one.`
28
+ - Read `<wiki-root>/<vendor>/index.md` and check every title and description it lists against the subject. Stop on a match: `❌ <path> already covers this subject under a different name. Edit that page instead.`
29
+
30
+ ## Source
31
+
32
+ The standard forbids working from training knowledge, so the draft is built on a read rather than on recall.
33
+
34
+ - Fetch current information through the `claude-code-guide` agent for any subject that agent covers. Its answer is the source the page is written from.
35
+ - Reach a subject the agent does not cover through the owner's own published documentation. Invoke `canon:search-craft` with the skill tool before searching for it, since finding the owner's documentation is the field-and-authority step that skill carries, and report it rather than proceeding silently when the skill does not resolve.
36
+ - Say the fetch failed and stop rather than substituting recall, even for a subject the session believes it knows. A page sourced from memory ships looking identical to one that was checked.
37
+ - Close the intro with the `Source:` sentence the standard requires, linking the canonical page where one exists and naming the owner alone where the subject has no single URL.
38
+ - Stamp the read date on a source revised without notice, as `read <date>`. A claim traced to an undated read cannot be checked against what was actually read.
39
+
40
+ ## Draft
41
+
42
+ - Draft `title` and `description` frontmatter against the standard's contract, then the intro paragraph closing on `Source:` as a short orientation, then the lesson sections. Let the read of the source decide what is a lesson: keep a fact only when the source page does not state it, and leave reference detail to the source.
43
+ - Write what the fetch returned rather than what the subject is assumed to do.
44
+ - Answer one question per section and stop. A reader arrives to settle something specific rather than to read the page through.
45
+ - Mark a claim the fetch left unsettled rather than smoothing over it. An unmarked gap reads as a checked fact.
46
+
47
+ ## Preview
48
+
49
+ Add `**Source:** <owner, and the read it came from>`, and confirm the source with the path, since the standard states outright that a wiki file is not written unasked.
50
+
51
+ ## Write
52
+
53
+ Regenerate `<wiki-root>/<vendor>`, naming the folder the page landed in rather than the root above it. The verb rewrites the `index.md` in the folder it is given and does not walk down, so regenerating at the root leaves the vendor catalog untouched. A page absent there is invisible to the next run's Collision step, which then drafts a second page on the same subject.
@@ -1,53 +1,73 @@
1
1
  ---
2
- title: Wiki kind
3
- description: The root guard, both placement tests, catalog collision, sourcing from the owner, and vendor-folder regen for a brand-new wiki reference page, read by draft-doc once the request resolves to the wiki kind
2
+ title: Wiki reference
3
+ description: Folder split, frontmatter, naming convention, and sourcing for a wiki reference page
4
4
  ---
5
5
 
6
- # Wiki kind
6
+ # Wiki reference
7
7
 
8
- `draft-doc` reads this file when the request resolves to a wiki reference page. A page that already exists is edited against the same standard, never drafted a second time.
8
+ Applies to each authored page in the `wiki` folder at the project root. Skip for `index.md` at any depth, which is a hand-maintained catalog rather than a reference page, and carries `subtitle` rather than `description`.
9
9
 
10
- The standard's `## Placement` section names the folder a page lands in and the vendor subfolder under it. Resolve both from the project root and call them `<wiki-root>` and `<vendor>` below, so the standard stays the one owner of the path.
10
+ ## Scope
11
11
 
12
- ## Guards
12
+ Governs each authored page in the `wiki` folder at the project root: which folder it belongs in, its frontmatter, its filename, and how it cites the subject it documents.
13
13
 
14
- - If `<wiki-root>` does not resolve, say so and ask whether to create it before drafting. A project carrying no such folder has never taken the standard's placement rule, so creating it is a decision rather than a step.
14
+ Does not govern:
15
+
16
+ - Voice, rhythm, sentence construction, and information density: the `write-human` skill
17
+ - Headings, punctuation, word choice, and file references: `markdown.md`
18
+
19
+ ## What a working wiki page looks like
20
+
21
+ A page works when a reader who has never opened it settles two things without asking anyone:
22
+
23
+ - Which folder holds it, decided from the subject alone rather than from where it happened to get written
24
+ - Where the content came from, so a claim can be checked against its owner rather than against this repository
25
+
26
+ A page failing either is non-conforming even when it satisfies every shape rule below.
15
27
 
16
28
  ## Placement
17
29
 
18
- The standard sets two tests and a page has to pass both. Run them before drafting anything, since a page failing either is non-conforming however well it is written.
30
+ - Write a page here only when its subject is owned outside this repository. Route anything about how this repository works to `docs/`, `canon/context/`, or a skill body instead.
31
+ - File the page in the `claude` subfolder of the `wiki` folder. A subject Anthropic does not own, whether a third-party tool or a vendor-neutral concept, is out of scope for this folder split. Route it to `docs/` or a skill body instead of adding a second wiki folder for it.
32
+
33
+ ## Frontmatter
19
34
 
20
- - **Owned outside this repository.** A subject describing how this repository works fails. Refuse and offer the docs or context kind of this skill: `❌ <subject> is owned by this project, so it belongs in the docs surface or a context entry. Re-run draft-doc naming that destination.`
21
- - **Owned by the vendor the folder split covers.** The standard names one owner and one subfolder. A third-party tool or a vendor-neutral concept fails, however reference-like it reads. Refuse: `❌ <subject> is outside the wiki's folder split. Route it to the docs surface or a skill body rather than adding a second folder for it.`
35
+ - `title` (required): sentence case, naming the subject
36
+ - `description` (required): one line naming what the page covers
22
37
 
23
- Do not widen the split to admit a subject. Adding a sibling folder is a change to the standard, argued there, rather than a placement this kind takes on its own.
38
+ ## Naming
24
39
 
25
- ## Collision
40
+ - Name a page by its kebab subject alone. The vendor folder it sits in already names the vendor, so a prefix repeats the folder.
41
+ - The `codebase-layout` skill carries the same rule for every folder in a project, beyond the wiki.
26
42
 
27
- - Derive the page slug per the standard's `## Naming` section and check whether `<wiki-root>/<vendor>/<slug>.md` already exists. If it does, stop: `❌ <path> already covers this subject. Edit that page against the standard instead of drafting a second one.`
28
- - Read `<wiki-root>/<vendor>/index.md` and check every title and description it lists against the subject. Stop on a match: `❌ <path> already covers this subject under a different name. Edit that page instead.`
43
+ ## Sourcing
29
44
 
30
- ## Source
45
+ - Close the intro paragraph with a `Source:` sentence naming the owner. Link the canonical page where one exists, and name the owner alone where the subject has no single URL.
46
+ - Link a docs page in its fetchable form, `https://code.claude.com/docs/en/<page>.md`, so a session reads the live text rather than a copy.
47
+ - Fetch current information through the `claude-code-guide` agent when the subject is Claude Code. Do not work from training knowledge.
48
+ - Propose an addition or correction and wait for confirmation. Do not write to a wiki file unasked.
31
49
 
32
- The standard forbids working from training knowledge, so the draft is built on a read rather than on recall.
50
+ ## Shape
33
51
 
34
- - Fetch current information through the `claude-code-guide` agent for any subject that agent covers. Its answer is the source the page is written from.
35
- - Reach a subject the agent does not cover through the owner's own published documentation. Invoke `canon:search-craft` with the skill tool before searching for it, since finding the owner's documentation is the field-and-authority step that skill carries, and report it rather than proceeding silently when the skill does not resolve.
36
- - Say the fetch failed and stop rather than substituting recall, even for a subject the session believes it knows. A page sourced from memory ships looking identical to one that was checked.
37
- - Close the intro with the `Source:` sentence the standard requires, linking the canonical page where one exists and naming the owner alone where the subject has no single URL.
38
- - Stamp the read date on a source revised without notice, as `read <date>`. A claim traced to an undated read cannot be checked against what was actually read.
52
+ - Keep a page thin: the `Source:` sentence, an orientation paragraph, and lesson sections. The source owns the reference detail and a paraphrase of it falls behind within days.
53
+ - Apply the lesson test per section: keep a fact about the subject only when the source page does not state it. Such a fact is a gotcha this project hit, a constraint it relies on, or how it uses the feature.
54
+ - Read the current source before keeping or cutting a section. A fact kept from memory is the drift this shape exists to prevent.
55
+ - Send a session that wants reference detail to the source and fetch it live. The page answers orientation and lessons only.
56
+ - Leave a page with no lessons as the source link and the orientation paragraph. A catalog routes a reader by page, so the stub stays.
39
57
 
40
- ## Draft
58
+ ## Template
41
59
 
42
- - Draft `title` and `description` frontmatter against the standard's contract, then the intro paragraph closing on `Source:` as a short orientation, then the lesson sections. Let the read of the source decide what is a lesson: keep a fact only when the source page does not state it, and leave reference detail to the source.
43
- - Write what the fetch returned rather than what the subject is assumed to do.
44
- - Answer one question per section and stop. A reader arrives to settle something specific rather than to read the page through.
45
- - Mark a claim the fetch left unsettled rather than smoothing over it. An unmarked gap reads as a checked fact.
60
+ ```markdown
61
+ ---
62
+ title: <Subject>
63
+ description: <one line naming what this page covers>
64
+ ---
46
65
 
47
- ## Preview
66
+ # <Subject>
48
67
 
49
- Add `**Source:** <owner, and the read it came from>`, and confirm the source with the path, since the standard states outright that a wiki file is not written unasked.
68
+ <What the subject is and why it matters, in a short orientation.> Source: <owner, with a link to the canonical page where one exists>.
50
69
 
51
- ## Write
70
+ ## <Lesson>
52
71
 
53
- Regenerate `<wiki-root>/<vendor>`, naming the folder the page landed in rather than the root above it. The verb rewrites the `index.md` in the folder it is given and does not walk down, so regenerating at the root leaves the vendor catalog untouched. A page absent there is invisible to the next run's Collision step, which then drafts a second page on the same subject.
72
+ <A fact the source page does not state.>
73
+ ```
@@ -53,7 +53,7 @@ The color failure is the quiet one. Mermaid's own theme writes literal hex value
53
53
  ## Out of scope
54
54
 
55
55
  - Mermaid's own layout, budgets, and label rules for the fence itself: the mermaid standard, cited rather than restated here
56
- - A UI wireframe or screen mockup: `draft-doc`
57
- - Design tokens and the visual system: `design-extract`
56
+ - A UI screen mockup: `canvas`
57
+ - Design tokens and the visual system: `canvas`, which carries a picked direction into the design document
58
58
  - Implementation detail behind an architecture view, which belongs in a context entry the caption points at
59
59
  - Which lesson needs a figure and where it sits among the lesson's blocks: `teach-workspace`, which calls this skill to draw one
@@ -1,6 +1,6 @@
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 wireframe, which is `draft-doc`, or for design tokens, which is `design-extract`.
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`.
4
4
  metadata:
5
5
  family: generate
6
6
  ---
@@ -41,14 +41,14 @@ The standard states this as a render-first policy rather than a ban on any tool-
41
41
 
42
42
  Read the reference for the path Step 3 picked and follow it:
43
43
 
44
- - Architecture set: read `${CLAUDE_SKILL_DIR}/references/architecture-set.md` to shape the view, then `${CLAUDE_SKILL_DIR}/references/mermaid.md` to draw and render it. The architecture branch always renders and reads back. An unrendered fence is not a figure.
45
- - Mermaid path: read `${CLAUDE_SKILL_DIR}/references/mermaid.md`.
44
+ - Architecture set: read `${CLAUDE_SKILL_DIR}/references/architecture-set.md` to shape the view, then `${CLAUDE_SKILL_DIR}/references/mermaid-path.md` to draw and render it. The architecture branch always renders and reads back. An unrendered fence is not a figure.
45
+ - Mermaid path: read `${CLAUDE_SKILL_DIR}/references/mermaid-path.md`.
46
46
  - Hand-drawn path: read `${CLAUDE_SKILL_DIR}/references/hand-drawn.md`.
47
47
 
48
48
  ## Step 5: wrap, caption, and verify
49
49
 
50
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.md` states before confirming.
51
+ - On the Mermaid path, run the read-back `mermaid-path.md` states before confirming.
52
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
53
  - When the destination is a rendered page, an HTML file a browser loads, the check that counts is the figure inside that page, which Step 6 captures once the figure is written, on either path. A markdown destination has no page to load, so the checks above are the whole check there.
54
54
 
@@ -5,7 +5,7 @@ description: The five architecture views with each one's question, source signal
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.md` like any other graph-shaped figure. The destination stays the one the user named.
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.
9
9
 
10
10
  ## The five views
11
11
 
@@ -14,7 +14,7 @@ Draw the view the request names. Each answers one question and is drawn from one
14
14
  | View | Question it answers | Source signal | Diagram type |
15
15
  | -------------- | ------------------------------------------------------- | ------------------------------------------------- | ------------------------------------ |
16
16
  | System context | Who uses the system, what it talks to, where it ends | `canon/REQUIREMENTS.md` | `flowchart TB` |
17
- | Components | The layered structure inside the boundary | `canon/ARCHITECTURE.md` | `flowchart TB` with `subgraph` lanes |
17
+ | Components | The layered structure inside the boundary | `canon/context/index.md` and the folder layout | `flowchart TB` with `subgraph` lanes |
18
18
  | Request flow | A request lifecycle, an agent loop, or an actor handoff | the entry point and its handlers | `sequenceDiagram` |
19
19
  | Data pipeline | Retrieval, ranking, queues, or ETL | the pipeline's modules | `flowchart TB` |
20
20
  | Deployment | Hosts, services, and infrastructure config | deploy config, compose files, infrastructure code | `flowchart TB` |
@@ -25,8 +25,8 @@ Stay inside `flowchart` and `sequenceDiagram`. C4, state, ER, and class diagrams
25
25
 
26
26
  ## Sources
27
27
 
28
- - Read `canon/REQUIREMENTS.md`, `canon/ARCHITECTURE.md`, `CLAUDE.md`, and the language manifest (`package.json`, `pyproject.toml`, `Cargo.toml`) when present, plus the top-level folder layout through `ls`. Do not recurse speculatively.
29
- - When neither planning file exists and no folder structure names a boundary, stop: `❌ No source signal for <view>. Add canon/ARCHITECTURE.md or run inside a project folder.`
28
+ - Read `canon/REQUIREMENTS.md`, `canon/context/index.md`, `CLAUDE.md`, and the language manifest (`package.json`, `pyproject.toml`, `Cargo.toml`) when present, plus the top-level folder layout through `ls`. Do not recurse speculatively.
29
+ - When neither planning file exists and no folder structure names a boundary, stop: `❌ No source signal for <view>. Add canon/REQUIREMENTS.md or run inside a project folder.`
30
30
  - When the view came from a code scan rather than planning prose, open the caption with `Source: code.` and add `Fidelity is lower than prose-driven figures. Verify against the project's intent.`
31
31
 
32
32
  ## Caption and prose
@@ -26,6 +26,6 @@ canon capture <destination> --selector figure --out .canon/tmp/figures/
26
26
  - Fix a clipped label, a misaligned shape, or an arrow that misses its target in the destination and capture again. Stop after two correction passes.
27
27
  - When the capture fails, keep the figure and name the skipped check in the output.
28
28
 
29
- A Mermaid figure bound for a rendered page takes this same capture, since its standalone PNG is measured in the renderer's own fonts and can read clean while the page clips it. A clipped group title there takes the scoped overflow style `${CLAUDE_SKILL_DIR}/references/mermaid.md` states.
29
+ A Mermaid figure bound for a rendered page takes this same capture, since its standalone PNG is measured in the renderer's own fonts and can read clean while the page clips it. A clipped group title there takes the scoped overflow style `${CLAUDE_SKILL_DIR}/references/mermaid-path.md` states.
30
30
 
31
31
  A markdown destination has no page to load, so the read of the markup, or of the standalone render on the Mermaid path, is the whole check there.