@erclx/canon 5.32.0 → 5.33.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 (210) hide show
  1. package/claude/.claude-plugin/plugin.json +1 -1
  2. package/claude/skills/auto-ship/SKILL.md +1 -1
  3. package/claude/skills/auto-ship/references/worktree-name.md +1 -1
  4. package/claude/skills/backlog-triage/REQUIREMENT.md +2 -2
  5. package/claude/skills/backlog-triage/SKILL.md +1 -1
  6. package/claude/skills/canon-cli/REQUIREMENT.md +16 -13
  7. package/claude/skills/canon-cli/SKILL.md +75 -32
  8. package/claude/skills/canon-feedback/SKILL.md +1 -1
  9. package/claude/skills/{canvas → canvas-board}/REQUIREMENT.md +2 -2
  10. package/claude/skills/{canvas → canvas-board}/SKILL.md +2 -2
  11. package/{standards → claude/skills/canvas-board/references}/design.md +11 -2
  12. package/claude/skills/context-fold/REQUIREMENT.md +25 -33
  13. package/claude/skills/context-fold/SKILL.md +25 -70
  14. package/claude/skills/context-fold/references/classify.md +3 -3
  15. package/claude/skills/context-fold/references/completion-report.md +4 -4
  16. package/claude/skills/context-fold/references/context-refresh.md +5 -5
  17. package/{standards → claude/skills/context-fold/references}/context.md +16 -5
  18. package/claude/skills/context-fold/references/unusable-baseline.md +3 -5
  19. package/claude/skills/create-rule/SKILL.md +2 -2
  20. package/{standards → claude/skills/create-rule/references}/rule.md +12 -5
  21. package/claude/skills/create-skill/SKILL.md +2 -2
  22. package/{standards → claude/skills/create-skill/references}/skill.md +17 -14
  23. package/claude/skills/design-taste/REQUIREMENT.md +3 -3
  24. package/claude/skills/design-taste/SKILL.md +1 -1
  25. package/claude/skills/docs-sync/REQUIREMENT.md +1 -1
  26. package/claude/skills/docs-sync/SKILL.md +3 -3
  27. package/{standards → claude/skills/docs-sync/references}/docs.md +11 -0
  28. package/{standards → claude/skills/docs-sync/references}/readme.md +9 -2
  29. package/claude/skills/draft-and-pick/SKILL.md +5 -5
  30. package/claude/skills/draft-doc/SKILL.md +6 -6
  31. package/claude/skills/draft-figure/REQUIREMENT.md +2 -2
  32. package/claude/skills/draft-figure/SKILL.md +2 -2
  33. package/claude/skills/draft-figure/references/hand-drawn.md +1 -1
  34. package/claude/skills/draft-figure/references/mermaid-path.md +1 -1
  35. package/claude/skills/draft-identity/REQUIREMENT.md +2 -2
  36. package/claude/skills/draft-identity/SKILL.md +2 -2
  37. package/claude/skills/draft-ready/SKILL.md +1 -1
  38. package/claude/skills/git-branch/SKILL.md +1 -1
  39. package/{standards → claude/skills/git-branch/references}/branch.md +1 -1
  40. package/claude/skills/git-commit/SKILL.md +2 -2
  41. package/claude/skills/git-followup/REQUIREMENT.md +1 -1
  42. package/claude/skills/git-followup/SKILL.md +1 -1
  43. package/claude/skills/git-issue/SKILL.md +1 -1
  44. package/claude/skills/git-pr/SKILL.md +13 -13
  45. package/claude/skills/git-pr/references/evidence.md +2 -2
  46. package/claude/skills/git-pr/references/final-command.md +38 -14
  47. package/claude/skills/git-pr/references/labels.md +5 -1
  48. package/{standards → claude/skills/git-pr/references}/pr.md +19 -9
  49. package/{standards → claude/skills/git-pr/references}/publish.md +4 -2
  50. package/claude/skills/git-pr/references/task-number.md +1 -1
  51. package/claude/skills/git-ship/SKILL.md +15 -14
  52. package/claude/skills/git-split/SKILL.md +3 -3
  53. package/claude/skills/git-stage/SKILL.md +1 -1
  54. package/claude/skills/plan-feature/REQUIREMENT.md +1 -1
  55. package/claude/skills/review-address/SKILL.md +1 -1
  56. package/claude/skills/review-address/references/post-review-findings.md +1 -1
  57. package/claude/skills/review-pr/REQUIREMENT.md +1 -1
  58. package/claude/skills/review-pr/SKILL.md +3 -3
  59. package/claude/skills/review-pr/references/body-variants.md +2 -2
  60. package/claude/skills/review-pr/references/key-changes.md +3 -3
  61. package/claude/skills/review-pr/references/post.md +4 -2
  62. package/claude/skills/review-ui/REQUIREMENT.md +1 -1
  63. package/claude/skills/review-ui/SKILL.md +1 -1
  64. package/claude/skills/review-ui/references/post.md +1 -1
  65. package/claude/skills/role-orchestrator/REQUIREMENT.md +3 -0
  66. package/claude/skills/role-orchestrator/SKILL.md +2 -2
  67. package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +2 -2
  68. package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +8 -5
  69. package/claude/skills/role-orchestrator/references/orchestrator-launch.md +23 -1
  70. package/claude/skills/role-orchestrator/references/orchestrator-refill.md +2 -2
  71. package/claude/skills/role-orchestrator/references/orchestrator-resume.md +3 -0
  72. package/claude/skills/role-planner/REQUIREMENT.md +2 -1
  73. package/claude/skills/role-planner/SKILL.md +13 -2
  74. package/claude/skills/role-reviewer/SKILL.md +1 -1
  75. package/claude/skills/role-worker/REQUIREMENT.md +1 -0
  76. package/claude/skills/role-worker/SKILL.md +9 -1
  77. package/claude/skills/session-map/SKILL.md +1 -1
  78. package/claude/skills/session-resume/REQUIREMENT.md +2 -2
  79. package/claude/skills/session-worktree/SKILL.md +5 -5
  80. package/claude/skills/target-setup/references/detect.md +1 -1
  81. package/claude/skills/task-board/REQUIREMENT.md +7 -12
  82. package/claude/skills/task-board/SKILL.md +5 -17
  83. package/claude/skills/task-board/references/tasks.md +2 -2
  84. package/claude/skills/task-complete/REQUIREMENT.md +47 -0
  85. package/claude/skills/task-complete/SKILL.md +86 -0
  86. package/claude/skills/{task-board → task-complete}/references/archive.md +4 -4
  87. package/claude/skills/{context-fold → task-complete}/references/receipt-sweep.md +5 -5
  88. package/claude/skills/task-complete/references/unusable-baseline.md +19 -0
  89. package/claude/skills/teach-workspace/REQUIREMENT.md +6 -2
  90. package/claude/skills/teach-workspace/SKILL.md +8 -4
  91. package/claude/skills/teach-workspace/references/lesson-craft.md +1 -1
  92. package/claude/skills/{context-fold/references/promoted-pages.md → teach-workspace/references/promotion-fold.md} +3 -3
  93. package/claude/skills/teach-workspace/references/promotion.md +3 -3
  94. package/claude/skills/ui-checklist/SKILL.md +1 -1
  95. package/claude/skills/ux-audit/SKILL.md +1 -1
  96. package/claude/skills/ux-measure/SKILL.md +1 -1
  97. package/docs/agents/canvas.md +1 -1
  98. package/docs/agents/commands.md +3 -2
  99. package/docs/agents/context-audit-checks.md +4 -4
  100. package/docs/agents/index.md +3 -3
  101. package/docs/agents/indexes.md +1 -1
  102. package/docs/agents/install-and-sync.md +6 -11
  103. package/docs/agents/key-changes.md +5 -5
  104. package/docs/agents/label-coverage.md +11 -0
  105. package/docs/agents/migrate.md +1 -1
  106. package/docs/agents/records-push.md +2 -2
  107. package/docs/agents/records-stale.md +12 -47
  108. package/docs/agents/records-validate.md +3 -7
  109. package/docs/agents/records.md +5 -27
  110. package/docs/agents/rule-citations.md +1 -1
  111. package/docs/agents/sandbox.md +4 -4
  112. package/docs/agents/skills-audit.md +1 -1
  113. package/docs/agents/tasks-plans.md +2 -2
  114. package/docs/agents/tasks.md +2 -2
  115. package/docs/target/migrations.md +10 -2
  116. package/docs/target/projects.md +1 -1
  117. package/docs/target/sync.md +1 -1
  118. package/docs/workflow/operating-model.md +2 -2
  119. package/docs/workflow/parallel-features.md +7 -7
  120. package/docs/workflow/skill-map-on-request.md +9 -9
  121. package/docs/workflow/skill-map.md +12 -11
  122. package/docs/workflow/visual-design-workflow.md +2 -2
  123. package/governance/renames.toml +0 -11
  124. package/governance/rules/canon/context.md +13 -0
  125. package/governance/rules/claude/skill.md +17 -0
  126. package/governance/stacks/base.toml +2 -4
  127. package/package.json +4 -4
  128. package/scripts/core/install-check.sh +3 -3
  129. package/scripts/lib/ui.sh +0 -159
  130. package/src/audits/catalog.ts +0 -1
  131. package/src/claude/cases/misc.ts +1 -1
  132. package/src/claude/cases/setup.ts +4 -0
  133. package/src/claude/cases/workflow.ts +6 -1
  134. package/src/claude/seeds.ts +1 -1
  135. package/src/claude/skills-audit.ts +2 -2
  136. package/src/cli/help.ts +3 -1
  137. package/src/cli/ui.ts +2 -3
  138. package/src/commands/claude.ts +1 -1
  139. package/src/commands/gov.ts +2 -15
  140. package/src/commands/labels.ts +326 -7
  141. package/src/commands/migrate.ts +6 -1
  142. package/src/commands/pr.ts +1 -1
  143. package/src/commands/records.ts +13 -399
  144. package/src/commands/sandbox.ts +3 -6
  145. package/src/commands/tasks.ts +3 -3
  146. package/src/context/audit.ts +5 -5
  147. package/src/context/folders.ts +1 -1
  148. package/src/design/budget.ts +1 -1
  149. package/src/design/components.ts +1 -1
  150. package/src/design/document.ts +1 -1
  151. package/src/design/regen.ts +1 -1
  152. package/src/design/render.ts +1 -1
  153. package/src/gate/measures.ts +1 -1
  154. package/src/gate/sequencer.ts +56 -1
  155. package/src/gate/stages.ts +1 -7
  156. package/src/gov/install.ts +2 -3
  157. package/src/gov/stacks.ts +1 -1
  158. package/src/hooks/post-merge.ts +1 -1
  159. package/src/labels/apply.ts +39 -0
  160. package/src/labels/format.ts +3 -3
  161. package/src/labels/phase.ts +3 -3
  162. package/src/labels/sections.ts +43 -0
  163. package/src/migrate/skill-names.ts +20 -1
  164. package/src/pr/paths.ts +4 -4
  165. package/src/records/backup.ts +16 -6
  166. package/src/records/stale-canonical.ts +31 -1
  167. package/src/records/validate.ts +2 -188
  168. package/src/sandbox/census.ts +1 -1
  169. package/src/sandbox/coverage.ts +2 -6
  170. package/src/sandbox/equivalence.ts +5 -44
  171. package/src/sandbox/expect.ts +4 -4
  172. package/src/sandbox/provision.ts +13 -36
  173. package/src/sandbox/scenario.ts +26 -48
  174. package/src/sandbox/tree.ts +2 -6
  175. package/src/standards/read.ts +14 -1
  176. package/src/sync/git.ts +1 -1
  177. package/src/tasks/archive.ts +5 -5
  178. package/src/tasks/branch.ts +3 -3
  179. package/src/tasks/label.ts +1 -1
  180. package/src/tasks/record.ts +2 -2
  181. package/src/tasks/validate.ts +1 -1
  182. package/standards/index.md +0 -13
  183. package/standards/standard.md +1 -7
  184. package/tooling/base/reference.md +1 -1
  185. package/tooling/base/seeds/.github/pull_request_template.md +2 -2
  186. package/tooling/claude/reference.md +1 -1
  187. package/tooling/claude/seeds/.claude/hooks/pr-create-log.sh +9 -1
  188. package/tooling/claude/seeds/.claude/hooks/review-post-scan.sh +171 -0
  189. package/tooling/claude/seeds/.claude/settings.json +9 -0
  190. package/governance/rules/standards/context.md +0 -14
  191. package/governance/rules/standards/design.md +0 -12
  192. package/governance/rules/standards/readme.md +0 -12
  193. package/governance/rules/standards/rule.md +0 -13
  194. package/governance/rules/standards/skill.md +0 -21
  195. package/governance/rules/standards/standard.md +0 -13
  196. package/scripts/config.sh +0 -11
  197. package/scripts/lib/gov.sh +0 -14
  198. package/scripts/lib/sandbox-fixtures.sh +0 -191
  199. package/scripts/lib/sandbox-git.sh +0 -125
  200. package/scripts/lib/sandbox-path.sh +0 -50
  201. package/scripts/sandbox-hook.sh +0 -99
  202. package/src/gov/standard-rules.ts +0 -179
  203. package/src/records/migrate.ts +0 -78
  204. package/src/records/stale.ts +0 -243
  205. package/src/sandbox/hooks.ts +0 -128
  206. /package/claude/skills/{canvas → canvas-board}/references/canvas.md +0 -0
  207. /package/{standards → claude/skills/draft-figure/references}/figures.md +0 -0
  208. /package/{standards → claude/skills/git-branch/references}/slug.md +0 -0
  209. /package/{standards → claude/skills/git-commit/references}/commit.md +0 -0
  210. /package/{standards → claude/skills/git-commit/references}/versioning.md +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "canon",
3
3
  "description": "Runs your agent's work and keeps its code good, on one setup for every repo.",
4
- "version": "5.32.0",
4
+ "version": "5.33.0",
5
5
  "author": {
6
6
  "name": "Eric Le",
7
7
  "url": "https://github.com/erclx"
@@ -12,7 +12,7 @@ Chain the post-plan pipeline in a single run. Every step but the UI checklist ha
12
12
  ## Guards
13
13
 
14
14
  - All `.canon/plans/` reads resolve at the main worktree root, not the current worktree. Resolve that root the way `session-worktree` does.
15
- - Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../../standards/slug.md`. This skill takes the stop rather than the `latest` fallback, since it commits and opens a pull request. If empty, stop: `❌ Detached HEAD. Checkout the feature branch first.` This slug is provisional. It is superseded once `session-worktree` runs, whether at Step 0 or before this chain began. Every later step keys its output on the slug that run resolves, being the worktree and the branch, regardless of which plan Step 1 reads.
15
+ - Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../git-branch/references/slug.md`. This skill takes the stop rather than the `latest` fallback, since it commits and opens a pull request. If empty, stop: `❌ Detached HEAD. Checkout the feature branch first.` This slug is provisional. It is superseded once `session-worktree` runs, whether at Step 0 or before this chain began. Every later step keys its output on the slug that run resolves, being the worktree and the branch, regardless of which plan Step 1 reads.
16
16
  - Resolve `<plan>` in Step 1, ahead of any other read.
17
17
  - If the working tree has uncommitted changes unrelated to the plan, stop: `❌ Uncommitted changes outside the plan. Commit or stash before autoshipping.`
18
18
 
@@ -14,7 +14,7 @@ canon tasks plan-branch <argument> --json
14
14
  ```
15
15
 
16
16
  - `conforms: true`: pass the record's `branch`, which is already `<type>/<slug>`, and invoke nothing else to derive a name.
17
- - `conforms: false`: the plan's own filename breaks a cap in `${CLAUDE_SKILL_DIR}/../../standards/branch.md`. Pass `branch` anyway and say the cap it broke, since the alternative is a name this session shortened by hand, which is a second derivation and the thing this call exists to prevent. `git-branch` decides the rename at ship.
17
+ - `conforms: false`: the plan's own filename breaks a cap in `${CLAUDE_SKILL_DIR}/../git-branch/references/branch.md`. Pass `branch` anyway and say the cap it broke, since the alternative is a name this session shortened by hand, which is a second derivation and the thing this call exists to prevent. `git-branch` decides the rename at ship.
18
18
  - Anything else, including a refusal, a record carrying no `branch` key, and an installed binary carrying no `plan-branch` subcommand: invoke `canon:session-worktree` bare and let its ladder derive the name. Say the verb did not answer, so a reader can tell a derived name from a fallback one.
19
19
 
20
20
  The dispatch runbook runs the same verb on the same plan to pick the branch its collision check clears, so calling it here is what makes the checked branch and the taken branch one string.
@@ -7,7 +7,7 @@ description: Why the backlog gets a measured verdict per row with a lean toward
7
7
 
8
8
  ## Gap
9
9
 
10
- Without this skill, the backlog only grows. `task-board` declines or archives one named task, and nothing reads the backlog as a whole, so a row stays until somebody happens to remember it and decides by hand. The orchestrator's backlog re-test only clears a row upward onto the board, so no sweep ever takes one off. A backlog past fifty rows had no surface that could say which of them still mattered.
10
+ Without this skill, the backlog only grows. `task-board` declines one named task and `task-complete` archives one, and nothing reads the backlog as a whole, so a row stays until somebody happens to remember it and decides by hand. The orchestrator's backlog re-test only clears a row upward onto the board, so no sweep ever takes one off. A backlog past fifty rows had no surface that could say which of them still mattered.
11
11
 
12
12
  Four failure modes cost more than the rest. A pass that judges a row by what its task file says rather than by the tree keeps every row, since a task file reads as live the day it was written and every day after. A pass that applies its own verdicts decides rows on silence, which ships a decline nobody approved on a board with no history to restore it from. A keep that carries no measurement is the default nobody argues with, so a triage without a lean toward decline ends with the same backlog it started with. And a keep that measures only that the defect still exists keeps nearly everything, since a row filed against the tree almost always still reproduces. One pass suggested keeping 24 of 27 rows that way, where the operator kept 6 and promoted 1.
13
13
 
@@ -42,6 +42,6 @@ Four failure modes cost more than the rest. A pass that judges a row by what its
42
42
 
43
43
  - Filing a brain dump, which `plan-intake` owns
44
44
  - Answering the filed items, which `plan-intake-answer` owns
45
- - Creating a task, or archiving and declining one named task outside a triage, which `task-board` owns
45
+ - Creating or declining one named task outside a triage, which `task-board` owns, and archiving one, which `task-complete` owns
46
46
  - Ordering the rows a promote lands under `## Needs a plan`, which the orchestrator's refill sweep owns
47
47
  - Skipping rows kept at a recent triage, which waits on a second triage measuring the re-read cost
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: backlog-triage
3
- description: Files a measured verdict for every backlog row into an intake folder, suggesting decline, archive, keep, or promote and leaning toward decline, then applies the verdicts the operator approved through the task verbs. Use when asked to "triage the backlog", "prune the backlog", "which backlog rows are still worth doing", "clear out the backlog", or "apply the backlog triage". Do NOT use to file a brain dump, which is `plan-intake`, to answer the filed items, which is `plan-intake-answer`, or to create, archive, or decline one named task, which is `task-board`.
3
+ description: Files a measured verdict for every backlog row into an intake folder, suggesting decline, archive, keep, or promote and leaning toward decline, then applies the verdicts the operator approved through the task verbs. Use when asked to "triage the backlog", "prune the backlog", "which backlog rows are still worth doing", "clear out the backlog", or "apply the backlog triage". Do NOT use to file a brain dump, which is `plan-intake`, to answer the filed items, which is `plan-intake-answer`, or to create or decline one named task, which is `task-board`, or archive one, which is `task-complete`.
4
4
  metadata:
5
5
  family: decide
6
6
  ---
@@ -1,39 +1,42 @@
1
1
  ---
2
2
  name: canon-cli
3
- description: Why a session is pointed at the verb catalog, the reference docs, and the overwrite contract from one place, and why the skill reads rather than writes
3
+ description: Why a session is routed from a job to its canon verb from one place, why the verbs that can lose its edits are flagged before they run, and why the skill reads rather than writes
4
4
  ---
5
5
 
6
6
  # Canon cli requirement
7
7
 
8
8
  ## Gap
9
9
 
10
- Without this skill, a session runs a `canon` sync and finds out afterward what it did. The command names give nothing away. `install` and `sync` differ per domain, some surfaces overwrite unconditionally, some merge, some are written once and never touched again, and none of that is visible from the command line the user typed.
10
+ Without this skill, a session guesses at a verb from its name and runs a `canon` sync to find out afterward what it did. The command names give nothing away. `install` and `sync` differ per domain, some surfaces overwrite unconditionally, some merge, some are written once and never touched again, and none of that is visible from the command line the user typed.
11
11
 
12
- The damage lands on the files a project owns. A golden config carrying local edits is replaced without a warning anyone saw, and a standards install overwrites every standard in a project that only needed the two it had drifted on. The user learns which category a file was in by losing the edit.
12
+ The damage lands on the files a project owns. A golden config carrying local edits is replaced without a warning anyone saw, and a governance sync takes back a rule the project had edited. The user learns which category a file was in by losing the edit.
13
13
 
14
14
  The inverse failure is quieter. A session that assumes a sync will pick up a change edits a seed and waits for an update that never comes, because the seed is copy-once and no sync command writes it again. Both failures are one missing fact available before the command runs.
15
15
 
16
- Being reachable is a separate problem from being right. This is a pure reference whose moment happens inside another skill's run, so nothing brings it up unless a body names it. Three sibling requirement files named it and routed nothing, because Claude Code loads `SKILL.md` as the entry and never opens the sibling. A route lives in a body or it does not exist, and a fourth requirement mention would repeat the same defect.
16
+ A third gap is the route itself. `canon --help` lists every top-level verb with a partial hint, and a session with a job in hand pays a `--help` read per candidate to find the one that does it, or picks by name and lands on the wrong one. The job-to-verb mapping is the fact the session needs and no verb answers.
17
17
 
18
- A third gap sits beside the first two, aimed at a different question. `canon --help` lists every top-level verb and `canon docs` emits the toolkit's own reference corpus, but no reference skill pointed a session at either. No skill does now. A session guessing at a verb's name, or restating what a doc already answers, is the same missing-fact failure the overwrite gap names.
18
+ Being reachable is a separate problem from being right. This is a pure reference whose moment happens inside another skill's run, so nothing brings it up unless a body names it. A route lives in a body or it does not exist, and a mention in a sibling's requirement file is not one.
19
19
 
20
20
  ## Must
21
21
 
22
- - State per surface and per command whether an existing file is overwritten, merged, written once, or left alone
23
- - Warn about a destructive run before it happens, naming the surface that will be lost
24
- - Name the section-preserving path for a standard or seed the project has customized
25
- - Defer to the toolkit's own context docs when they and this summary disagree, since the summary is a copy and they are the source
26
- - Point to `canon docs agents` for the verb catalog and to `canon docs` for the reference corpus, rather than restating either
22
+ - Name each target-usable top-level verb by its job, never its subcommands or flags
23
+ - Route an author-and-render verb to the skill that owns it rather than describing it
24
+ - Warn about a verb that can lose the project's edits before it runs, naming what it replaces
25
+ - Point each destructive verb at `canon docs install-and-sync`, which owns the overwrite detail
26
+ - Point to `canon <verb> --help` and `canon docs agents` for subcommands, flags, and the invocation contract
27
+ - Defer to `canon docs install-and-sync` when it and this summary disagree, since the summary is a copy and the doc is the source
27
28
 
28
29
  ## Must not
29
30
 
30
31
  - Run, or send the session to run, a `canon` command that writes or installs. The skill is read before acting on a sync.
31
- - Restate the verb catalog or a reference doc's content. Point to `canon docs agents` or `canon docs <topic>` instead. The overwrite table is this skill's one authored exception, and it too is a target-session summary, with the detail living with its owner.
32
- - Take a mention in a sibling's requirement file as an inbound route. The three bodies named in the gap above carry the pointer, and adding a fourth means editing that body rather than its requirement.
32
+ - List a subcommand, a flag, or a JSON shape. That restates the docs and is the drift the one-name-per-verb rule removes.
33
+ - List a verb that only works inside the toolkit repository. A named exemption set in the coverage test holds that boundary.
34
+ - Take a mention in a sibling's requirement file as an inbound route. The pointer lives in the body that needs it.
33
35
 
34
36
  ## Guards
35
37
 
36
- - A surface or command the contract does not cover routes to the context docs rather than to an inference from a similar row
38
+ - A test fails naming each top-level verb in `COMMAND_GROUPS` that the body neither carries as `canon <verb>` nor exempts, and fails again when an exemption names something that is no longer a verb
39
+ - A verb or surface the skill does not cover routes to `canon docs` rather than to an inference from a similar row
37
40
 
38
41
  ## Out of scope
39
42
 
@@ -1,53 +1,96 @@
1
1
  ---
2
2
  name: canon-cli
3
- description: Reference for what a canon verb does before you run it. Run `canon docs agents` for the full command catalog, `canon docs` for any other reference doc, and read this skill's own table for what a sync or install command overwrites, merges, or leaves untouched in a target project. Use when asked "which canon command do I run", "is there a doc for X", "will this overwrite my changes", or before running `canon tooling`, `canon standards`, `canon claude sync`, or `canon init`. Do NOT use to execute a sync, an install, or a docs lookup, only to know which command answers the question.
3
+ description: Routes a job to the `canon` verb that does it, and warns which verbs can lose a project's edits before one runs. Use when asked "which canon command does X", "is there a verb for X", "which command tells me if X", "will this overwrite my changes", or before running `canon sync`, `canon gov sync`, `canon tooling sync`, `canon design sync`, `canon migrate`, or `canon indexes regen`. Do NOT use to execute a verb, only to pick one and know what it costs.
4
4
  metadata:
5
5
  family: answer
6
6
  ---
7
7
 
8
- # Toolkit CLI contract
8
+ # Toolkit CLI router
9
9
 
10
- Consult before running an unfamiliar `canon` verb, before a sync or install, or when asked "will this overwrite my changes". This skill is reference only. It never runs a sync or an install.
10
+ Consult to pick the `canon` verb for a job, and before running a verb that writes. This skill is reference only. It never runs a verb.
11
11
 
12
- ## Verb catalog and reference docs
12
+ ## Find the verb
13
13
 
14
- - Run `canon docs agents` for the full command catalog and invocation contract, rather than guessing at a verb from its name.
15
- - Run `canon docs list` for every other reference doc, then `canon docs <topic>` by name.
16
- - State neither list here. Both read live off the CLI, and a copy in this body ships on a different cadence than the commands it names.
14
+ - Each row below names a verb by its job. Subcommands and flags are not listed here, so read them where they are kept.
15
+ - Run `canon <verb> --help` for a verb's subcommands and flags.
16
+ - Run `canon docs agents` for the invocation contract behind every verb, and `canon docs list` for every other reference doc, then `canon docs <topic>` by name.
17
17
 
18
- ## Overwrite contract
18
+ ## Project setup
19
19
 
20
- | Surface | Command | Effect on existing files |
21
- | --------------------------------------------------------------------------------------------- | -------------------- | --------------------------------------------------------------------------- |
22
- | Golden configs | `canon tooling sync` | Overwritten once `--write` is passed. Local edits are lost. |
23
- | Dictionary seeds (`.cspell/*.txt`) | `canon tooling sync` | Merged and sorted. Existing terms preserved. |
24
- | Other seeds (`cspell.json`, `.lintstagedrc`, base's `verify.yml` and PR template, state docs) | `canon tooling sync` | Copy-once. Dropped on first install, untouched after. |
25
- | Standards | none | Nothing installs. `canon standards <name>` reads and never writes. |
26
- | Seed docs and `CLAUDE.md` | `canon claude init` | Skipped when present. Never overwritten. |
27
- | Seed docs | `canon claude sync` | Never touched. Only `.gitignore` is written. |
28
- | Stack references | none | Nothing installs. `canon tooling reference <stack>` reads and never writes. |
29
- | `.gitignore`, deps, scripts | any sync | Additive. Existing entries preserved. Deps re-pin on major skew. |
30
- | Generated `index.md` | any sync or regen | Rewritten from target state. Hand edits are lost. |
20
+ | Job | Verb |
21
+ | -------------------------------------------- | --------------- |
22
+ | Bootstrap a project with toolkit domains | `canon init` |
23
+ | Bring every installed domain current | `canon sync` |
24
+ | Reinstall the CLI itself | `canon upgrade` |
25
+ | Move a project off a retired name or layout | `canon migrate` |
26
+ | List the projects the toolkit installed into | `canon targets` |
31
27
 
32
- ## What a tooling sync can overwrite
28
+ ## Domains
33
29
 
34
- A golden config is any file a stack ships under `configs/`, and the category is wider than its name suggests. It carries the phase-label gate workflow, the web stack's CI workflow, the git hooks, the end-to-end harness, the shell scripts under `scripts/`, and the editor settings, alongside the linters and compilers a reader expects. A stack inherits its parent's configs, so syncing `astro` also writes everything `web` and `base` hold.
30
+ | Job | Verb |
31
+ | --------------------------------------------------------------- | ----------------- |
32
+ | Install or sync governance rules | `canon gov` |
33
+ | Read an authoring standard by name | `canon standards` |
34
+ | Sync a tooling stack's configs and seeds, or read its reference | `canon tooling` |
35
+ | Set up or sync the Claude workflow | `canon claude` |
36
+ | Scaffold a wiki | `canon wiki` |
37
+ | Regenerate the `index.md` files | `canon indexes` |
38
+ | Read a toolkit reference doc | `canon docs` |
35
39
 
36
- No list of those paths ships in this body, since a copy would go stale on a different cadence than the stacks. Run `canon tooling diff <stack> <target>` for the list resolved against a real target. It reports every path, writes nothing, and exits 1 when any differs. A binary older than that verb answers the same question through `canon tooling sync <stack> <target> --check`, which names each file it would replace.
40
+ ## Author and render
37
41
 
38
- ## Rules
42
+ Each verb here has a skill that owns the job. Load the skill rather than driving the verb by hand.
39
43
 
40
- - `canon tooling sync` writes nothing until `--write` is passed. A headless run without it reports and exits 1, so a script that forgets the flag fails rather than silently skipping the sync.
41
- - Run `--check` first when the project carries local edits to a config the stack ships. The report names each file it would replace, which is the warning the user needs before the write.
42
- - An interactive run still prompts. `--write` skips the prompt, and `--check` refuses to write even with a TTY.
43
- - Seeds are user-owned. Dictionary `.txt` files merge and sort. Other seeds are copy-once, so re-seeding a structured file means deleting it and syncing again.
44
- - No command writes a standard into a project. A `.claude/standards/` folder from an older toolkit is inert, and deleting it costs nothing.
45
- - For section-level customizations of a seed doc, merge by hand against the toolkit copy, not through `canon ... sync`.
44
+ | Job | Verb | Skill |
45
+ | -------------------------------------------- | ------------------- | --------------------------- |
46
+ | Render the design system | `canon design` | `canon:draft-figure` |
47
+ | Render a slide deck | `canon slides` | `canon:draft-slides` |
48
+ | Render an HTML source to a PNG | `canon capture` | `canon:draft-identity` |
49
+ | Serve a directory and print the link | `canon serve` | none |
50
+ | Record a running app | `canon demo` | `canon:draft-screencast` |
51
+ | Report one computed property across routes | `canon inventory` | `canon:target-check` |
52
+ | Walk a page through interactions and measure | `canon drive` | `canon:ux-measure` |
53
+ | Fetch a YouTube transcript | `canon transcripts` | `canon:youtube-transcripts` |
54
+ | Open a learning workspace | `canon teach` | `canon:teach-workspace` |
55
+ | Work on the local canvas | `canon canvas` | `canon:canvas-board` |
46
56
 
47
- ## CLAUDE.md
57
+ ## Session and ship
48
58
 
49
- - `CLAUDE.md` is a copy-once seed. No `canon` sync command ever updates it. Merge it by hand against the toolkit copy, keeping the project's customizations.
59
+ | Job | Verb |
60
+ | ---------------------------------------------- | ----------------- |
61
+ | Read and close tasks on the board | `canon tasks` |
62
+ | Read and answer intake folders | `canon intake` |
63
+ | Validate, size, and move session records | `canon records` |
64
+ | Resolve live sessions to a worktree and branch | `canon sessions` |
65
+ | Reclaim worktrees whose branches merged | `canon worktrees` |
66
+ | Read a pull request | `canon pr` |
67
+ | File toolkit feedback as an issue | `canon feedback` |
68
+
69
+ ## Reports
70
+
71
+ | Job | Verb |
72
+ | ----------------------------------------- | ---------------- |
73
+ | Scan the tree for credentials | `canon secrets` |
74
+ | Read the dependency set for advisories | `canon deps` |
75
+ | Check a changed set against the label map | `canon labels` |
76
+ | Measure comment density | `canon comments` |
77
+ | Report context folder health | `canon context` |
78
+ | Check markdown against the standards | `canon markdown` |
79
+ | Count files, extensions, and lines | `canon census` |
80
+
81
+ ## Verbs that can lose your edits
82
+
83
+ Read the doc each line names before running one of these. `canon docs install-and-sync` covers the governance and design verbs, `canon docs sync` covers tooling, `canon docs indexes` covers regeneration, and `canon docs migrate` covers the migrate verbs. Run the `--check` or `--dry-run` form first where the verb has one.
84
+
85
+ - `canon sync` runs every installed domain's sync, so it carries each risk below.
86
+ - `canon gov sync` replaces a rule you edited and deletes a rule the toolkit retired, edited or not.
87
+ - `canon tooling sync --write` replaces every golden config a stack ships. Seeds are copy-once and dictionaries merge. Nothing writes without the flag. See `canon docs sync`.
88
+ - `canon design sync` replaces the shipped design files and leaves `.claude/design/project/` alone.
89
+ - `canon migrate --write` rewrites files that cite a retired name or layout. It reports and writes nothing without the flag. See `canon docs migrate`.
90
+ - `canon indexes regen` rewrites each generated `index.md` from the folder's current state, so a hand edit there is lost. See `canon docs indexes`.
91
+
92
+ No command writes a standard into a project, so `canon standards` is safe to run. `CLAUDE.md` and the other seed docs are copy-once, and no sync updates them. Merge those by hand against the toolkit copy.
50
93
 
51
94
  ## Source of truth
52
95
 
53
- - Full semantics live in the toolkit's own context entries. This skill is the target-session summary. When they disagree, the context docs win.
96
+ - `canon docs install-and-sync` states what each install and sync verb writes, refuses, or leaves alone. `canon docs indexes` and `canon docs migrate` state the same for their verbs. When a doc and this skill disagree, the doc wins.
@@ -73,7 +73,7 @@ command -v canon >/dev/null 2>&1
73
73
 
74
74
  The destination is a public GitHub issue on the toolkit repo, so the report leaves the machine. Hold it and ask when the operator has marked it sensitive, and never send it on a guess.
75
75
 
76
- Before the pipe below, run the scan in `${CLAUDE_SKILL_DIR}/../../standards/publish.md` against the composed block, phase-label half included. Nothing else checks what reaches the remote, so this scan is the only gate.
76
+ Before the pipe below, run the scan in `${CLAUDE_SKILL_DIR}/../git-pr/references/publish.md` against the composed block, phase-label half included. Nothing else checks what reaches the remote, so this scan is the only gate.
77
77
 
78
78
  ```bash
79
79
  cat <<'EOF' | canon feedback
@@ -1,9 +1,9 @@
1
1
  ---
2
- name: canvas
2
+ name: canvas-board
3
3
  description: Scope boundary for driving the local design canvas, and the line between a drafted frame and the design it feeds
4
4
  ---
5
5
 
6
- # Canvas requirement
6
+ # Canvas board requirement
7
7
 
8
8
  ## Gap
9
9
 
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: canvas
2
+ name: canvas-board
3
3
  description: Drives the local design canvas, where pages hold HTML frames the operator sees, drags, selects, and edits in the browser. Starts the canvas when it is not running, confirms the live shell loads, makes pages and frames, edits a frame through its file, reads what the operator selected or restyled, captures finished frames, and carries a picked direction into the project's design document. Use when asked to "open the canvas", "put this on the canvas", "draw a frame for X", "change the one I selected", "what did I pick", "capture this frame", or "move that frame on the canvas". Do NOT use to draft candidates for a taste decision, which is `draft-and-pick`.
4
4
  metadata:
5
5
  family: decide
6
6
  ---
7
7
 
8
- # Canvas
8
+ # Canvas board
9
9
 
10
10
  Drive the canvas the operator is looking at. A page is a folder of HTML frames and a frame is one file, so a session draws by writing files and the operator sees each write land in the browser. The content format is fixed by `${CLAUDE_SKILL_DIR}/references/canvas.md`. Read it before writing a frame.
11
11
 
@@ -1,14 +1,23 @@
1
1
  ---
2
2
  title: Design reference
3
3
  description: Shape and content rules for canon/DESIGN.md
4
- paths:
5
- - 'canon/DESIGN.md'
6
4
  ---
7
5
 
8
6
  # Design reference
9
7
 
10
8
  Applies to `canon/DESIGN.md`. Captures visual intent and the decisions behind how things look, not a style guide, component spec, or framework reference. Update when a visual decision is made or a rule changes.
11
9
 
10
+ ## Contents
11
+
12
+ - [Scope](#scope)
13
+ - [What goes in](#what-goes-in)
14
+ - [What does not go in](#what-does-not-go-in)
15
+ - [Format](#format)
16
+ - [Prose budget](#prose-budget)
17
+ - [The uncertainty tag](#the-uncertainty-tag)
18
+ - [Sections](#sections)
19
+ - [Template](#template)
20
+
12
21
  ## Scope
13
22
 
14
23
  Governs the visual-intent document at `canon/DESIGN.md`: tokens described as intent, layout constraints, and the omissions that keep visual scope closed.
@@ -1,67 +1,59 @@
1
1
  ---
2
2
  name: context-fold
3
- description: What the planning-doc reconcile is for, the gaps it closes, and why the diff decides completion alone
3
+ description: What the context-entry fold is for, the gaps it closes, and why it audits its own writes before it reports
4
4
  ---
5
5
 
6
6
  # Context fold requirement
7
7
 
8
8
  ## Gap
9
9
 
10
- Without this skill, the planning docs describe the scope the session opened with. An outcome the diff shipped stays unchecked, so the board reports finished work as open and the next session re-plans it. A decision a plan settled mid-cycle lives only in the conversation and dies with it. Plans for closed tasks accumulate in the live folder, so the folder stops indicating what is in flight.
10
+ Without this skill, the context entries describe the repository the session opened with. A decision a plan settled mid-cycle lives only in the conversation and dies with it, and an entry naming a module the diff rewrote keeps stating what the module used to do.
11
11
 
12
- A handoff file has the same shape of gap as an unmarked outcome. A page a learning workspace produced and an operator already picked a destination for sits in gitignored scratch until something lands it, and the session that produced it is gone by the time a branch exists to carry the write. Left unfolded it reads as promoted while the destination holds nothing.
13
-
14
- The receipt half of that sweep was missing entirely. A review receipt was deleted per shipped branch while another kind of receipt was skipped, because the exclusion protecting the checklist and audit prefixes caught a third by accident. Nothing but an operator asking collected it, and a collection that waits on someone remembering to ask is one a folder outgrows, so the skipped population grew per shipped branch and never shrank until it was most of the folder.
15
-
16
- The trigger side carries a gap of its own. "Sync the docs" names either corpus to the person saying it, so a description leaving its corpus to the opening clause alone competes with its public-facing sibling on nothing the routing field states, and the planning surface the request was about goes untouched.
12
+ The trigger side carries a gap of its own. "Sync the docs" names either corpus to the person saying it, so a description leaving its corpus to the opening clause alone competes with its public-facing sibling on nothing the routing field states, and the context folder the request was about goes untouched.
17
13
 
18
14
  The opposite gap opened from the same write. A fold allowed to touch the requirements record on every ship rewrote it one reasonable edit at a time, and nothing read it for whether it still stated the project's identity. Each ship looked correct and the sum drifted.
19
15
 
20
- This skill writes canonical docs at the end of a long build and never reviews what it wrote. An appended figure or a branch-narrated re-measurement lands unchecked the same way a session's own edits do, so what the fold produces carries the exact defect the standards it cites already ban.
16
+ A fold that did everything at ship time hid its own job. It marked board outcomes, swept receipts, wrote the design record, and landed promoted pages, so a session invoking it to refresh the context entries ran ten steps and could not tell which one it had asked for.
17
+
18
+ This skill writes canonical docs at the end of a long build. An appended figure, a branch-narrated re-measurement, or an entry pushed past its length lands unchecked the same way a session's own edits do, so what the fold produces carries the exact defect the standards it cites already ban.
21
19
 
22
20
  ## Must
23
21
 
24
- - Name the context entries and the task board in a trigger phrase rather than in the opening clause alone, so a bare request to sync the docs separates this skill from `docs-sync` on something both descriptions state
25
- - Take completion from the diff and everything else from the session, since completion is a fact about the repository rather than about the conversation
26
- - Match an outcome on the behavior it names, never on a filename or a commit subject
27
- - Leave an outcome unchecked when the diff is ambiguous. An unmarked shipped outcome costs one manual edit and a wrongly marked one hides work that never happened.
28
- - Write tracked docs at the current worktree root and the task board at the main root, since only the first commits with the branch
29
- - Count every other citation before archiving a plan, comparing resolved targets rather than raw strings or bare filenames
30
- - Retarget a closed task at the archived plan, so the reasoning behind finished work stays reachable
22
+ - Name the context entries in a trigger phrase rather than in the opening clause alone, so a bare request to sync the docs separates this skill from `docs-sync` on something both descriptions state
23
+ - Take decisions from the session and the refresh scope from the diff
24
+ - Write tracked docs at the current worktree root, since only that copy commits with the branch
31
25
  - Write a decision to the domain context entry it constrains, whatever other domains its reasoning touches, so a decision has one home that loads on demand
32
26
  - Report a requirements or direction change in one line naming `document-health`, rather than writing it, so the identity record changes only when the operator reviews it
33
- - Leave the current branch's review receipt alone, since its branch is still live
34
- - Land each block of a promotion handoff at the destination its heading names, then delete the file so a later run does not fold it twice
35
- - Take a promotion destination as already decided, since the operator confirmed it where the page was produced
27
+ - Close on an audit of what the fold touched, running `canon context audit` and reporting the findings on files this run wrote or the diff carries
36
28
  - Classify the fold's whole diff baseline through `canon context classify diff`, calling the verb rather than reimplementing its pattern or its prompt in the skill body, since an earlier commit on the branch carries a doc edit the fold is equally responsible for
37
29
  - Apply a `REPLACE` or `HISTORY` finding against the quote it names, report a `MOVE` finding naming the surface it belongs on rather than cutting it, or keep a finding with a one-line reason, rather than leaving a finding unanswered
38
- - Rewrite a restated or superseded statement in place rather than appending the replacement beside it, on every canonical doc type this skill writes
39
- - Report a refusal or a missing `context classify` subcommand as one line and continue the fold either way, since a check that cannot run is not a reason to leave the fold's own output unshipped
30
+ - Rewrite a restated or superseded statement in place rather than appending the replacement beside it
31
+ - Report a refusal or a missing `context audit` or `context classify` subcommand as one line and continue the fold either way, since a check that cannot run is not a reason to leave the fold's own output unshipped
40
32
 
41
33
  ## Must not
42
34
 
43
- - Infer a new task from the diff. Only outcomes already on the board get marked.
44
- - Touch task files the session did not change
45
- - Widen what a writing step reads when the baseline is unusable. Widening a read is safe and widening a write stubs a surface for every file in the repository.
35
+ - Write the task board, the design record, `CLAUDE.md`, or a page from a promotion handoff. Each has its own owner, and a fold that writes them hides its job behind theirs.
36
+ - Widen what the refresh reads when the baseline is unusable. Widening a read is safe and widening a write stubs a surface for every file in the repository.
46
37
  - Write the requirements record. It states identity, and a fold reads one session where a review reads the whole project.
47
- - Edit `CLAUDE.md` inline. Every change there goes through a diff-and-approve gate, so this skill only flags.
48
- - Create a context entry, or move or delete a plan. A plan is settled by the merge, and `canon tasks archive` carries it.
49
- - Overwrite a file a promotion block routes to. A destination that already holds a page is a merge for a person, and folding over it discards work this skill never read.
38
+ - Create a context entry for a domain the catalog does not list
39
+ - Report an audit finding on an entry this run never touched, which belongs to whoever next edits it
40
+ - Add a path flag to the audit verb from this skill. It takes a project root, so the skill filters the record.
50
41
  - Pick or configure a classifier backend. The project setting decides it, and this skill reports the resolved `modelLayer` as returned.
51
- - Stop the fold on a classify finding, a refusal, or a missing subcommand. All three report and continue.
42
+ - Stop the fold on an audit or classify finding, a refusal, or a missing subcommand. All of them report and continue.
52
43
  - Apply a finding against a quote found more than once or not found at all. Report that it could not be located instead of guessing.
53
44
  - Re-run the classifier after applying a finding, which loops it over its own edit
54
45
  - Cut a `MOVE` finding. The verdict means correct content sitting on the wrong surface rather than a deletion candidate, so cutting one can discard content that belongs elsewhere rather than removing detail that never belonged at all.
55
- - Scope Step 8 to the files Steps 3 and 5 wrote this run. An earlier commit on the branch carries a doc edit the fold is equally responsible for, and the verb's own extraction already answers whether anything in range qualifies.
46
+ - Scope the classifier to the files Step 3 wrote this run. An earlier commit on the branch carries a doc edit the fold is equally responsible for, and the verb's own extraction already answers whether anything in range qualifies.
56
47
 
57
48
  ## Guards
58
49
 
59
50
  - Neither a `canon/` nor a `.claude/` directory: stop and name the command that sets one up
60
- - No session divergence and no queued outcome the diff shipped: stop with a pass, since both conditions have to hold
51
+ - No session divergence and no diff a context entry could describe: stop with a pass, since both conditions have to hold
61
52
 
62
53
  ## Out of scope
63
54
 
64
- - Creating a task file or moving one off the board, which `task-board` owns
65
- - Public-facing docs, which `docs-sync` owns, apart from landing a page a promotion handoff already carries a confirmed destination for. This skill reconciles the context entries, the planning records, and the task board, and both descriptions name their corpus in the trigger so a request saying only "sync the docs" lands on one of the pair rather than on either.
66
- - Deciding where a promoted page belongs, which is settled with the operator by the surface that produced the page
67
- - Regenerating the task index, owned by a hook
55
+ - Marking a shipped task's outcomes, sweeping review receipts, and archiving a task, which `task-complete` owns
56
+ - Landing a page a teach promotion handoff carries, which `teach-workspace` owns in its fold mode
57
+ - Creating or declining a task file, which `task-board` owns
58
+ - Public-facing docs, which `docs-sync` owns. Both descriptions name their corpus in the trigger so a request saying only "sync the docs" lands on one of the pair rather than on either.
59
+ - Regenerating the context catalog, which a commit hook runs