@erclx/canon 5.32.0 → 5.34.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 (250) hide show
  1. package/claude/.claude-plugin/plugin.json +1 -1
  2. package/claude/skills/api-design/REQUIREMENT.md +1 -2
  3. package/claude/skills/api-design/SKILL.md +2 -3
  4. package/claude/skills/api-design/references/adopted.md +1 -1
  5. package/claude/skills/auto-ship/SKILL.md +1 -1
  6. package/claude/skills/auto-ship/references/worktree-name.md +1 -1
  7. package/claude/skills/backlog-triage/REQUIREMENT.md +2 -2
  8. package/claude/skills/backlog-triage/SKILL.md +1 -1
  9. package/claude/skills/canon-cli/REQUIREMENT.md +16 -13
  10. package/claude/skills/canon-cli/SKILL.md +75 -32
  11. package/claude/skills/canon-feedback/REQUIREMENT.md +1 -0
  12. package/claude/skills/canon-feedback/SKILL.md +11 -29
  13. package/claude/skills/canon-feedback/references/template.md +53 -0
  14. package/claude/skills/{canvas → canvas-board}/REQUIREMENT.md +2 -2
  15. package/claude/skills/{canvas → canvas-board}/SKILL.md +6 -3
  16. package/claude/skills/{canvas → canvas-board}/references/canvas.md +26 -3
  17. package/{standards → claude/skills/canvas-board/references}/design.md +11 -2
  18. package/claude/skills/code-craft/REQUIREMENT.md +1 -1
  19. package/claude/skills/code-craft/SKILL.md +0 -1
  20. package/claude/skills/context-fold/REQUIREMENT.md +25 -33
  21. package/claude/skills/context-fold/SKILL.md +25 -70
  22. package/claude/skills/context-fold/references/classify.md +3 -3
  23. package/claude/skills/context-fold/references/completion-report.md +4 -4
  24. package/claude/skills/context-fold/references/context-refresh.md +5 -5
  25. package/{standards → claude/skills/context-fold/references}/context.md +16 -5
  26. package/claude/skills/context-fold/references/unusable-baseline.md +3 -5
  27. package/claude/skills/create-rule/SKILL.md +3 -3
  28. package/{standards → claude/skills/create-rule/references}/rule.md +15 -6
  29. package/claude/skills/create-skill/SKILL.md +2 -2
  30. package/{standards → claude/skills/create-skill/references}/skill.md +18 -15
  31. package/claude/skills/design-taste/REQUIREMENT.md +3 -3
  32. package/claude/skills/design-taste/SKILL.md +1 -1
  33. package/claude/skills/docs-sync/REQUIREMENT.md +1 -1
  34. package/claude/skills/docs-sync/SKILL.md +3 -3
  35. package/{standards → claude/skills/docs-sync/references}/docs.md +11 -0
  36. package/{standards → claude/skills/docs-sync/references}/readme.md +9 -2
  37. package/claude/skills/draft-and-pick/SKILL.md +5 -5
  38. package/claude/skills/draft-doc/SKILL.md +6 -6
  39. package/claude/skills/draft-figure/REQUIREMENT.md +2 -2
  40. package/claude/skills/draft-figure/SKILL.md +2 -2
  41. package/claude/skills/draft-figure/references/hand-drawn.md +1 -1
  42. package/claude/skills/draft-figure/references/mermaid-path.md +1 -1
  43. package/claude/skills/draft-identity/REQUIREMENT.md +2 -2
  44. package/claude/skills/draft-identity/SKILL.md +2 -2
  45. package/claude/skills/draft-ready/SKILL.md +1 -1
  46. package/claude/skills/git-branch/SKILL.md +1 -1
  47. package/{standards → claude/skills/git-branch/references}/branch.md +1 -1
  48. package/claude/skills/git-commit/SKILL.md +2 -2
  49. package/claude/skills/git-followup/REQUIREMENT.md +1 -1
  50. package/claude/skills/git-followup/SKILL.md +1 -1
  51. package/claude/skills/git-issue/SKILL.md +1 -1
  52. package/claude/skills/git-issue/references/issue.md +4 -1
  53. package/claude/skills/git-pr/SKILL.md +13 -13
  54. package/claude/skills/git-pr/references/evidence.md +2 -2
  55. package/claude/skills/git-pr/references/final-command.md +38 -14
  56. package/claude/skills/git-pr/references/labels.md +5 -1
  57. package/{standards → claude/skills/git-pr/references}/pr.md +19 -9
  58. package/{standards → claude/skills/git-pr/references}/publish.md +4 -2
  59. package/claude/skills/git-pr/references/task-number.md +1 -1
  60. package/claude/skills/git-ship/SKILL.md +15 -14
  61. package/claude/skills/git-split/SKILL.md +3 -3
  62. package/claude/skills/git-stage/SKILL.md +1 -1
  63. package/claude/skills/plan-feature/REQUIREMENT.md +1 -1
  64. package/claude/skills/review-address/SKILL.md +1 -1
  65. package/claude/skills/review-address/references/post-review-findings.md +1 -1
  66. package/claude/skills/review-craft/references/ui.md +1 -1
  67. package/claude/skills/review-pr/REQUIREMENT.md +1 -1
  68. package/claude/skills/review-pr/SKILL.md +3 -3
  69. package/claude/skills/review-pr/references/body-variants.md +2 -2
  70. package/claude/skills/review-pr/references/key-changes.md +3 -3
  71. package/claude/skills/review-pr/references/post.md +4 -2
  72. package/claude/skills/review-ui/REQUIREMENT.md +1 -1
  73. package/claude/skills/review-ui/SKILL.md +8 -6
  74. package/claude/skills/review-ui/references/driving.md +8 -8
  75. package/claude/skills/review-ui/references/post.md +53 -17
  76. package/claude/skills/role-orchestrator/REQUIREMENT.md +3 -0
  77. package/claude/skills/role-orchestrator/SKILL.md +2 -2
  78. package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +2 -2
  79. package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +8 -5
  80. package/claude/skills/role-orchestrator/references/orchestrator-launch.md +32 -1
  81. package/claude/skills/role-orchestrator/references/orchestrator-refill.md +2 -2
  82. package/claude/skills/role-orchestrator/references/orchestrator-resume.md +3 -0
  83. package/claude/skills/role-planner/REQUIREMENT.md +2 -1
  84. package/claude/skills/role-planner/SKILL.md +13 -2
  85. package/claude/skills/role-reviewer/SKILL.md +1 -1
  86. package/claude/skills/role-worker/REQUIREMENT.md +1 -0
  87. package/claude/skills/role-worker/SKILL.md +9 -1
  88. package/claude/skills/session-map/SKILL.md +1 -1
  89. package/claude/skills/session-resume/REQUIREMENT.md +2 -2
  90. package/claude/skills/session-worktree/SKILL.md +5 -5
  91. package/claude/skills/target-setup/SKILL.md +10 -4
  92. package/claude/skills/target-setup/references/detect.md +20 -3
  93. package/claude/skills/task-board/REQUIREMENT.md +7 -12
  94. package/claude/skills/task-board/SKILL.md +5 -17
  95. package/claude/skills/task-board/references/tasks.md +2 -2
  96. package/claude/skills/task-complete/REQUIREMENT.md +47 -0
  97. package/claude/skills/task-complete/SKILL.md +86 -0
  98. package/claude/skills/{task-board → task-complete}/references/archive.md +4 -4
  99. package/claude/skills/{context-fold → task-complete}/references/receipt-sweep.md +5 -5
  100. package/claude/skills/task-complete/references/unusable-baseline.md +19 -0
  101. package/claude/skills/teach-workspace/REQUIREMENT.md +6 -2
  102. package/claude/skills/teach-workspace/SKILL.md +8 -4
  103. package/claude/skills/teach-workspace/references/lesson-craft.md +1 -1
  104. package/claude/skills/{context-fold/references/promoted-pages.md → teach-workspace/references/promotion-fold.md} +3 -3
  105. package/claude/skills/teach-workspace/references/promotion.md +3 -3
  106. package/claude/skills/test-craft/REQUIREMENT.md +2 -3
  107. package/claude/skills/test-craft/SKILL.md +15 -3
  108. package/claude/skills/ui-checklist/SKILL.md +1 -1
  109. package/claude/skills/ux-audit/SKILL.md +1 -1
  110. package/claude/skills/ux-measure/SKILL.md +1 -1
  111. package/docs/agents/canvas.md +6 -2
  112. package/docs/agents/commands.md +4 -3
  113. package/docs/agents/context-audit-checks.md +4 -4
  114. package/docs/agents/gov-detect.md +47 -0
  115. package/docs/agents/index.md +7 -4
  116. package/docs/agents/indexes.md +1 -1
  117. package/docs/agents/install-and-sync.md +10 -11
  118. package/docs/agents/key-changes.md +5 -5
  119. package/docs/agents/label-coverage.md +11 -0
  120. package/docs/agents/migrate.md +1 -1
  121. package/docs/agents/pr-evidence-layout.md +70 -0
  122. package/docs/agents/pr-evidence.md +8 -9
  123. package/docs/agents/pr-frames.md +7 -2
  124. package/docs/agents/pr-lift.md +132 -0
  125. package/docs/agents/records-push.md +2 -2
  126. package/docs/agents/records-stale.md +12 -47
  127. package/docs/agents/records-validate.md +3 -7
  128. package/docs/agents/records.md +5 -27
  129. package/docs/agents/rule-citations.md +1 -1
  130. package/docs/agents/sandbox.md +4 -4
  131. package/docs/agents/scripting.md +2 -1
  132. package/docs/agents/skills-audit.md +1 -1
  133. package/docs/agents/tasks-plans.md +2 -2
  134. package/docs/agents/tasks.md +2 -2
  135. package/docs/target/migrations.md +10 -2
  136. package/docs/target/projects.md +4 -4
  137. package/docs/target/sync.md +1 -1
  138. package/docs/workflow/operating-model.md +2 -2
  139. package/docs/workflow/parallel-features.md +7 -7
  140. package/docs/workflow/skill-map-on-request.md +9 -9
  141. package/docs/workflow/skill-map.md +12 -11
  142. package/docs/workflow/visual-design-workflow.md +2 -2
  143. package/governance/detect.toml +201 -0
  144. package/governance/renames.toml +0 -11
  145. package/governance/rules/canon/context.md +13 -0
  146. package/governance/rules/claude/skill.md +17 -0
  147. package/governance/rules/code/000-code.md +1 -13
  148. package/governance/rules/code/010-testing.md +2 -30
  149. package/governance/rules/ui/400-ui.md +1 -1
  150. package/governance/rules/ui/480-canvas.md +13 -0
  151. package/governance/stacks/base.toml +2 -4
  152. package/package.json +4 -4
  153. package/scripts/core/install-check.sh +3 -3
  154. package/scripts/core/regen-hero.ts +0 -6
  155. package/scripts/lib/ui.sh +0 -168
  156. package/src/audits/catalog.ts +0 -1
  157. package/src/canvas/arrange.ts +66 -0
  158. package/src/canvas/capture.ts +20 -6
  159. package/src/canvas/content.ts +39 -0
  160. package/src/canvas/fit.ts +238 -0
  161. package/src/canvas/tokens.ts +28 -10
  162. package/src/capture/frame-values.ts +2 -32
  163. package/src/claude/cases/misc.ts +1 -1
  164. package/src/claude/cases/setup.ts +4 -0
  165. package/src/claude/cases/workflow.ts +6 -1
  166. package/src/claude/seeds.ts +1 -1
  167. package/src/claude/skills-audit.ts +2 -2
  168. package/src/cli/help.ts +3 -1
  169. package/src/cli/ui.ts +2 -3
  170. package/src/commands/canvas.ts +179 -1
  171. package/src/commands/claude.ts +1 -1
  172. package/src/commands/gov.ts +146 -16
  173. package/src/commands/labels.ts +326 -7
  174. package/src/commands/migrate.ts +6 -1
  175. package/src/commands/pr.ts +377 -2
  176. package/src/commands/records.ts +13 -399
  177. package/src/commands/sandbox.ts +3 -6
  178. package/src/commands/tasks.ts +3 -3
  179. package/src/context/audit.ts +5 -5
  180. package/src/context/folders.ts +1 -1
  181. package/src/design/budget.ts +1 -1
  182. package/src/design/components.ts +1 -1
  183. package/src/design/document.ts +1 -1
  184. package/src/design/regen.ts +1 -1
  185. package/src/design/render.ts +1 -1
  186. package/src/feedback/body.ts +26 -5
  187. package/src/gate/measures.ts +59 -45
  188. package/src/gate/sequencer.ts +56 -1
  189. package/src/gate/stages.ts +4 -11
  190. package/src/gov/detect.ts +301 -0
  191. package/src/gov/install.ts +2 -3
  192. package/src/gov/list.ts +23 -2
  193. package/src/gov/stacks.ts +10 -1
  194. package/src/hooks/post-merge.ts +1 -1
  195. package/src/labels/apply.ts +39 -0
  196. package/src/labels/format.ts +3 -3
  197. package/src/labels/phase.ts +3 -3
  198. package/src/labels/sections.ts +43 -0
  199. package/src/migrate/skill-names.ts +20 -1
  200. package/src/pr/evidence.ts +218 -45
  201. package/src/pr/frames.ts +23 -3
  202. package/src/pr/lift.ts +418 -0
  203. package/src/pr/paths.ts +4 -4
  204. package/src/pr/rest.ts +3 -0
  205. package/src/pr/review-scope.ts +76 -0
  206. package/src/records/backup.ts +16 -6
  207. package/src/records/stale-canonical.ts +31 -1
  208. package/src/records/validate.ts +2 -188
  209. package/src/sandbox/census.ts +1 -1
  210. package/src/sandbox/coverage.ts +2 -6
  211. package/src/sandbox/equivalence.ts +19 -51
  212. package/src/sandbox/expect.ts +4 -4
  213. package/src/sandbox/provision.ts +13 -36
  214. package/src/sandbox/scenario.ts +26 -48
  215. package/src/sandbox/tree.ts +2 -6
  216. package/src/standards/read.ts +14 -1
  217. package/src/sync/git.ts +1 -1
  218. package/src/tasks/archive.ts +5 -5
  219. package/src/tasks/branch.ts +3 -3
  220. package/src/tasks/label.ts +1 -1
  221. package/src/tasks/record.ts +2 -2
  222. package/src/tasks/validate.ts +1 -1
  223. package/standards/index.md +0 -13
  224. package/standards/standard.md +1 -7
  225. package/tooling/base/reference.md +1 -1
  226. package/tooling/base/seeds/.github/pull_request_template.md +2 -2
  227. package/tooling/claude/reference.md +1 -1
  228. package/tooling/claude/seeds/.claude/hooks/pr-create-log.sh +9 -1
  229. package/tooling/claude/seeds/.claude/hooks/review-post-scan.sh +171 -0
  230. package/tooling/claude/seeds/.claude/settings.json +9 -0
  231. package/governance/rules/standards/context.md +0 -14
  232. package/governance/rules/standards/design.md +0 -12
  233. package/governance/rules/standards/readme.md +0 -12
  234. package/governance/rules/standards/rule.md +0 -13
  235. package/governance/rules/standards/skill.md +0 -21
  236. package/governance/rules/standards/standard.md +0 -13
  237. package/scripts/config.sh +0 -11
  238. package/scripts/lib/gov.sh +0 -14
  239. package/scripts/lib/sandbox-fixtures.sh +0 -191
  240. package/scripts/lib/sandbox-git.sh +0 -125
  241. package/scripts/lib/sandbox-path.sh +0 -50
  242. package/scripts/sandbox-hook.sh +0 -99
  243. package/src/gov/standard-rules.ts +0 -179
  244. package/src/records/migrate.ts +0 -78
  245. package/src/records/stale.ts +0 -243
  246. package/src/sandbox/hooks.ts +0 -128
  247. /package/{standards → claude/skills/draft-figure/references}/figures.md +0 -0
  248. /package/{standards → claude/skills/git-branch/references}/slug.md +0 -0
  249. /package/{standards → claude/skills/git-commit/references}/commit.md +0 -0
  250. /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.34.0",
5
5
  "author": {
6
6
  "name": "Eric Le",
7
7
  "url": "https://github.com/erclx"
@@ -19,7 +19,7 @@ The one skill nearest the subject leaves the pointer open. `codebase-layout` exc
19
19
 
20
20
  - State Hyrum's Law as design rules a session can act on: decide what is observable, and expose no storage type, internal identifier, ordering, or timing by accident
21
21
  - Tell the session to write the contract, being the signature, flags, output shape, or schema, before the body
22
- - State one error shape per surface with a stable code a caller can branch on, pointing at the core code rule for structured errors and hidden internals rather than restating it
22
+ - State one error shape per surface with a stable code a caller can branch on, and own the hidden-internals clause in the body, since no project rule carries it for every code stack
23
23
  - State validation at the boundary, once, with the value trusted inside
24
24
  - State additive change as the default: new fields and flags optional, nothing renamed or removed in place, no change of meaning under an existing name, and the One-Version Rule for a caller that cannot pin
25
25
  - State the four idempotency rules: store and honor a caller's key, claim it in one atomic step under a unique constraint, fail loudly on a reused key with a different body, and keep a key past the longest retry window
@@ -30,7 +30,6 @@ The one skill nearest the subject leaves the pointer open. `codebase-layout` exc
30
30
  ## Must not
31
31
 
32
32
  - Name a framework, a protocol style, or a language in the body. Status codes, verbs, pagination, and schema languages stay out, so the body holds for a function, a command, a file format, and an endpoint alike.
33
- - Restate the two error bullets of the core code rule
34
33
  - Restate the consumer-listing axis `review-craft` carries for a finished change
35
34
  - Cover interface depth or the internals behind a boundary, which govern what sits behind a surface rather than what crosses it
36
35
  - Import an external skill's tone, such as a law stated as absolute, or an excuse row rebutting an objection no session has raised
@@ -31,8 +31,8 @@ Every observable behavior becomes a dependency once there are enough callers, wh
31
31
 
32
32
  ## Keep one error shape per surface
33
33
 
34
- - Give every failure on one surface the same shape, carrying a stable code a caller can branch on and a message for the person reading it. Branching on message text breaks the first time the message is reworded.
35
- - Follow the project's own rule on structured errors and hidden internals where it states one, rather than inventing a second error convention beside it.
34
+ - Give every failure on one surface the same shape, carrying a stable code a caller can branch on and a message for the person reading it. Branching on message text breaks the first time the message is reworded. Keep internal implementation details out of the message, since a caller reads it and cannot act on a stack frame.
35
+ - Reuse the error type the project already throws or returns where one exists, rather than inventing a second error convention beside it.
36
36
 
37
37
  ## Validate at the boundary
38
38
 
@@ -98,7 +98,6 @@ Check each line against the surface the change produced. A line answering no is
98
98
  ## What this delegates
99
99
 
100
100
  - Where the file holding a surface sits on disk: `codebase-layout`
101
- - The structured error rule and hidden internals floor every code stack loads: `000-code`
102
101
  - Listing the consumers a finished change breaks, and the docs it made false, during review: `review-craft`
103
102
  - A visual interface, its layout, and its look: `design-taste`
104
103
  - Interface depth and the internals behind a boundary: `code-craft`
@@ -21,7 +21,7 @@ From `addyosmani/agent-skills@2686b620`, [`skills/api-and-interface-design/SKILL
21
21
 
22
22
  **Contract first.** Write the interface before the body. Adopted as its own group, widened from an endpoint to a signature, a flag set, an output shape, and a schema.
23
23
 
24
- **One error shape.** Every failure on one surface carries the same structure. Adopted with a stable code added for the caller to branch on, and pointed at the core code rule for the structured-error floor rather than restating it.
24
+ **One error shape.** Every failure on one surface carries the same structure. Adopted with a stable code added for the caller to branch on, and a clause keeping internal implementation details out of the message, since no project rule carries either for every code stack.
25
25
 
26
26
  **Validation at the boundary.** Check input where it enters and trust it inside. Adopted, with a value read back from a file or another service counted as input.
27
27
 
@@ -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.
@@ -20,6 +20,7 @@ The last failure is the session's own effort. Asked to report, a session starts
20
20
  - Write the stated fallback for a field the session cannot fill, so an empty field reads as absent rather than as unreported
21
21
  - Open a GitHub issue on the toolkit repo through the CLI so the report lands where triage reads it, and print the returned URL on its own line
22
22
  - Surface the block and the reason when the issue call fails, since a failure that prints nothing leaves the report where nothing reads it
23
+ - Carry the whole request in the issue body alone, since a comment is easy to miss and a body and a comment that differ leave triage choosing
23
24
  - Hold a report the operator marks sensitive, since the issue is public
24
25
  - Fall back to printing the block when the CLI is absent, so the report still exists
25
26
 
@@ -27,41 +27,23 @@ From the conversation so far, identify:
27
27
  - Repro details already in context (commands run, files touched), or `none`
28
28
  - Proposed fix, or `open` when the session settled on no direction
29
29
 
30
- Format as a single fenced markdown block, one `###` heading per field:
30
+ **Fields the report omits when the session has none:**
31
31
 
32
- ```markdown
33
- ## Toolkit feedback
34
-
35
- ### From project
36
-
37
- <name or kind>
38
-
39
- ### Surface
40
-
41
- <type>, <file path or name>
42
-
43
- ### Observed
44
-
45
- <one or two lines>
32
+ - Suggested shape, when the session worked out what the change should look like, such as a template, a command's output, or a field list
33
+ - Why, when the session has reasons for the fix beyond the observed failure
34
+ - Links, when the session cites an issue, a pull request, or a document
46
35
 
47
- ### Expected
36
+ Format as a single fenced markdown block, one `###` heading per field. Read `${CLAUDE_SKILL_DIR}/references/template.md` on reaching this point for the block and each field's fallback.
48
37
 
49
- <one or two lines, or "unclear">
38
+ `canon feedback` refuses a report missing `### Surface`, `### Observed`, or `### Proposed fix`, naming the one it did not find. `### From project`, `### Expected`, and `### Repro` are optional, so write the literal fallback the template shows rather than dropping the heading, which is what keeps a field the session cannot fill reading as absent instead of unreported.
50
39
 
51
- ### Repro
52
-
53
- <commands or steps, or "none">
54
-
55
- ### Proposed fix
56
-
57
- <one line, or "open">
58
- ```
59
-
60
- `canon feedback` refuses a report missing `### Surface`, `### Observed`, or `### Proposed fix`, naming the one it did not find. The other three are optional, so write the literal fallback shown above rather than dropping the heading, which is what keeps a field the session cannot fill reading as absent instead of unreported.
40
+ `### Suggested shape`, `### Why`, and `### Links` are optional the other way. Omit the heading when the session has nothing for it and write no fallback, since a report filed without them is complete and a placeholder would read as a reporter who had nothing to say.
61
41
 
62
42
  Headings rather than bold labels, because a GitHub issue form renders a submitted field as `### <label>`. One shape reaches the toolkit whichever route a report takes, and the CLI parses both with one parser. The retired `**Surface:**` form is refused rather than accepted, so a block carrying it has to be rewritten.
63
43
 
64
- Keep each field to one or two lines.
44
+ Keep Observed and Expected to one or two lines each, so the report scans. Length belongs in Proposed fix, Suggested shape, and Why.
45
+
46
+ The issue body is the request. Put everything the toolkit needs to act on it there, since a comment is easy to miss and a body and a comment that differ leave triage choosing. A comment carries only what happens after filing.
65
47
 
66
48
  ## Step 2: ship to the toolkit
67
49
 
@@ -73,7 +55,7 @@ command -v canon >/dev/null 2>&1
73
55
 
74
56
  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
57
 
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.
58
+ 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
59
 
78
60
  ```bash
79
61
  cat <<'EOF' | canon feedback
@@ -0,0 +1,53 @@
1
+ ---
2
+ title: Feedback report template
3
+ description: The fenced block canon-feedback fills, one heading per field, with each field's stated fallback
4
+ ---
5
+
6
+ # Feedback report template
7
+
8
+ Step 1 of `canon-feedback`. The session reads this file on reaching the point where it formats the block.
9
+
10
+ ```markdown
11
+ ## Toolkit feedback
12
+
13
+ ### From project
14
+
15
+ <name or kind>
16
+
17
+ ### Surface
18
+
19
+ <type>, <file path or name>
20
+
21
+ ### Observed
22
+
23
+ <one or two lines>
24
+
25
+ ### Expected
26
+
27
+ <one or two lines, or "unclear">
28
+
29
+ ### Repro
30
+
31
+ <commands or steps, or "none">
32
+
33
+ ### Proposed fix
34
+
35
+ <the direction in as many lines as it takes, or "open">
36
+
37
+ ### Suggested shape
38
+
39
+ <details>
40
+ <summary>Shape</summary>
41
+
42
+ <the template, output, or field list, in a fence one backtick longer than any fence it holds>
43
+
44
+ </details>
45
+
46
+ ### Why
47
+
48
+ - <one reason per bullet>
49
+
50
+ ### Links
51
+
52
+ <one link per line>
53
+ ```
@@ -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
 
@@ -47,9 +47,11 @@ Hand the operator the address as a markdown link carrying the URL as its text an
47
47
  ## Step 2: make pages and frames
48
48
 
49
49
  - Add a page for each decision being drafted: `canon canvas page add <page> --json`.
50
- - Add each frame through the verb, which writes the starting file and its box in one locked step: `canon canvas frame add <page> <frame> --width <px> --height <px> --json`. Give the width the frame should render at, since a capture and the canvas both render at it.
50
+ - Follow the house style in `${CLAUDE_SKILL_DIR}/references/canvas.md` before drafting an explanation frame.
51
+ - Add each frame through the verb, which writes the starting file and its box in one locked step: `canon canvas frame add <page> <frame> --width <px> --height <px> --json`. Give the width the frame should render at, since a capture and the canvas both render at it. The verb places the frame after the last one, and a position the operator asks for goes through `frame move`.
51
52
  - Lay frames out with `canon canvas frame move <page> <frame> --x <px> --y <px> --json` rather than writing `layout.json` by hand, since the operator's drags write the same file under a lock.
52
53
  - Name pages and frames for what they hold, such as `pricing` and `pricing-dense`, so the operator can say which one by name.
54
+ - After an insert or a resize, re-lay the page with `canon canvas arrange <page> --json`. It keeps the rows the operator dragged, places each on the standard gap, and drops layout entries whose frame file is gone. `--check` reports without writing.
53
55
 
54
56
  ## Step 3: edit a frame through its file
55
57
 
@@ -57,6 +59,7 @@ Write the frame's whole document to the `path` the add verb reported. The open c
57
59
 
58
60
  - From a linked worktree, `Edit` and `Write` refuse a main-root path. Write the whole file through one plain `Bash` heredoc instead, the route `session-worktree` states for a main-root write, and never take the redirect to a worktree copy.
59
61
  - Change one property of one element with `canon canvas edit <page>/<frame> --element <index> --set <property>=<value> --json` when the set it accepts covers the change, since it leaves every other byte as it was.
62
+ - Fit the box to the content once the write lands: `canon canvas fit <page>/<frame> --json`. Read each row's `wide` and `font`. A `wide` frame needs its box widened, which fit never does, and a `font` frame names a family the canvas does not serve, so set its text to a served face and fit again. A fit that grew a frame leaves the rows below overlapped until `canvas arrange` runs.
60
63
  - Use the project's custom properties for every value the token stylesheet defines. The record from `serve` names the token source under `tokens`, and a `none` source means frames render unstyled, so say so rather than inventing values to cover it.
61
64
 
62
65
  Mark the frame before the first write, so the operator sees which frame is being worked on before anything lands, and clear the mark once the edits to it are done:
@@ -15,6 +15,7 @@ The folder is gitignored, so nothing in a repository checks its shape and nothin
15
15
  - [What a working canvas looks like](#what-a-working-canvas-looks-like)
16
16
  - [Pages](#pages)
17
17
  - [Frames](#frames)
18
+ - [House style](#house-style)
18
19
  - [Layout](#layout)
19
20
  - [Tokens](#tokens)
20
21
  - [What a frame must not assume](#what-a-frame-must-not-assume)
@@ -24,9 +25,11 @@ The folder is gitignored, so nothing in a repository checks its shape and nothin
24
25
 
25
26
  Governs the canvas content under `.canon/canvas/`: page folder names, frame files, the `layout.json` shape, how tokens reach a frame, and what a frame must not assume about where it renders.
26
27
 
28
+ Also governs the house style of an explanation frame, being a diagram, a board of notes, or a comparison. A mockup of the project's own interface is not an explanation frame, and it follows the project's design document for type, color, and layout.
29
+
27
30
  Does not govern:
28
31
 
29
- - The design decisions a frame is drafting, such as type, color, and layout taste: the project's own design document
32
+ - The design decisions a mockup frame is drafting, such as type, color, and layout taste: the project's own design document
30
33
  - The project's design document and the token module it renders from, which a picked direction is carried into: `design.md`
31
34
  - The procedure that starts the canvas, reads the operator's selection, and carries a pick back, which belongs to the surface driving the canvas
32
35
  - Voice, rhythm, and sentence construction in any text a frame shows: the `write-human` skill
@@ -59,6 +62,19 @@ A canvas failing these is non-conforming even when it satisfies every shape rule
59
62
  - Use the project's custom properties, `var(--<name>)`, for every value the token stylesheet defines. A literal copied from it shows the right color today and the wrong one after the next token change.
60
63
  - Edit a frame by rewriting its file. The file is the frame, and nothing else holds a copy of its markup.
61
64
 
65
+ ## House style
66
+
67
+ Applies to an explanation frame only. A mockup of the project's interface renders at the app's own sizes and follows the project's design document instead.
68
+
69
+ - Write text in sentence case. Use no all-caps text and no `text-transform: uppercase`.
70
+ - Keep lines short, one fact a line.
71
+ - Set body text at 20px or larger and headings at 44px or larger. Set nothing under 16px.
72
+ - Render an explanation frame about 1100px wide.
73
+ - Take colors from the project's custom properties. A frame that defines colors of its own sets the dark values on `:root` and the light ones under `[data-theme="light"]`, since the shell sets `data-theme` on each frame's root.
74
+ - Name only the faces the canvas serves into every frame: `Geist Variable` for text, `Noto Sans Mono` for code, and `Excalifont` for a hand-drawn look. They render the same in a capture and in any browser, so a height fitted against them holds.
75
+ - Make each box tall enough to show all its content, with no scrollbar and no clipped line. Run `canon canvas fit <page>/<frame>` rather than estimating, since it measures the content in the capture browser and sets the height.
76
+ - Read frames left to right in reading order. Let `frame add` place each frame after the last with the standard gap, and move one only when the operator asks for a position.
77
+
62
78
  ## Layout
63
79
 
64
80
  - Keep one `layout.json` per page, beside its frames. It holds each frame's box and nothing else, so moving a frame never rewrites its markup.
@@ -89,8 +105,8 @@ The keys below are the ones a reader parses. The frame names are placeholders.
89
105
 
90
106
  - Do not assume a viewport. A frame renders at its layout width on the canvas and in a capture alike, so size it with media queries against that width rather than against the operator's window.
91
107
  - Do not assume the theme. The canvas theme toggle is the operator's own state, and a capture shows each frame in its default theme.
92
- - Do not assume a network. Name only fonts the machine has, or ship the font beside the frame, since a capture refuses a frame naming a font it cannot find.
93
- - Do not assume a default font. Set `font-family` with an installed family first on an element the frame's text inherits from, since a capture checks the first family of the text it renders and the browser's default serif is absent from many machines.
108
+ - Do not assume a network. Name a served face, or ship the font beside the frame, since a capture refuses a frame naming a font it cannot find.
109
+ - Do not assume a default font. Set `font-family` with a served face first on an element the frame's text inherits from, since a capture checks the first family of the text it renders and the browser's default serif is absent from many machines. A frame naming a machine family such as `DejaVu Sans` renders at another height in another browser, which `canon canvas fit` reports.
94
110
  - Do not assume the frame is the source. A picked direction is carried into the project's design document or a plan, and the operator clears the frame once it has been carried.
95
111
  - Do not assume the canvas survives the checkout. The folder is gitignored, so a lost checkout loses every page in it.
96
112
 
@@ -113,6 +129,13 @@ A new frame starts from this skeleton. The names in it are placeholders.
113
129
  color: var(--color-text);
114
130
  background: var(--color-background);
115
131
  }
132
+ /* only a color the frame defines itself: dark on :root, light here */
133
+ :root {
134
+ --frame-accent: #7aa2ff;
135
+ }
136
+ [data-theme='light'] {
137
+ --frame-accent: #1f4fd8;
138
+ }
116
139
  </style>
117
140
  </head>
118
141
  <body>
@@ -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.
@@ -30,7 +30,7 @@ Before this skill, two shipped pointers left interface depth unowned. `api-desig
30
30
  - State a tension as one side only, such as "never duplicate"
31
31
  - Name a language, a framework, or a type system feature in the body
32
32
  - Restate the red, green, refactor loop `test-first` runs, or the design review procedure `review-craft` carries for a finished diff
33
- - Restate the error and naming bullets of the core code rule
33
+ - Restate error or naming bullets. The core code rule retired them on purpose, and the error shape lives in `api-design`.
34
34
 
35
35
  ## Guards
36
36
 
@@ -106,4 +106,3 @@ Check each line against the code the change produced. A line answering no is fix
106
106
  - Which layer a test belongs at: `test-craft`
107
107
  - The contract a caller depends on, being its exports, flags, output, and errors: `api-design`
108
108
  - Judging a finished diff, including a design review of it: `review-craft`
109
- - The error and naming floors every code stack loads: `000-code`