@erclx/canon 5.31.0 → 5.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (303) hide show
  1. package/README.md +1 -1
  2. package/claude/.claude-plugin/plugin.json +1 -1
  3. package/claude/skills/api-design/references/adopted.md +1 -1
  4. package/claude/skills/auto-ship/REQUIREMENT.md +4 -16
  5. package/claude/skills/auto-ship/SKILL.md +13 -58
  6. package/claude/skills/auto-ship/references/draft-mark.md +2 -2
  7. package/claude/skills/auto-ship/references/failure-recovery.md +1 -5
  8. package/claude/skills/auto-ship/references/tier-failures.md +1 -1
  9. package/claude/skills/auto-ship/references/ui-checklist.md +2 -2
  10. package/claude/skills/auto-ship/references/verb-absent.md +3 -27
  11. package/claude/skills/backlog-triage/SKILL.md +1 -1
  12. package/claude/skills/canon-cli/REQUIREMENT.md +4 -6
  13. package/claude/skills/canon-cli/SKILL.md +2 -2
  14. package/claude/skills/canon-feedback/REQUIREMENT.md +1 -1
  15. package/claude/skills/canon-feedback/SKILL.md +10 -13
  16. package/claude/skills/canon-feedback-triage/REQUIREMENT.md +13 -14
  17. package/claude/skills/canon-feedback-triage/SKILL.md +49 -30
  18. package/claude/skills/canvas/REQUIREMENT.md +3 -4
  19. package/claude/skills/canvas/SKILL.md +5 -5
  20. package/{standards → claude/skills/canvas/references}/canvas.md +12 -1
  21. package/claude/skills/ci-workflow/REQUIREMENT.md +0 -1
  22. package/claude/skills/context-fold/REQUIREMENT.md +8 -20
  23. package/claude/skills/context-fold/SKILL.md +20 -44
  24. package/claude/skills/context-fold/references/classify.md +7 -8
  25. package/claude/skills/context-fold/references/completion-report.md +2 -6
  26. package/claude/skills/context-fold/references/context-refresh.md +5 -15
  27. package/claude/skills/context-fold/references/promoted-pages.md +3 -3
  28. package/claude/skills/context-fold/references/receipt-sweep.md +6 -17
  29. package/claude/skills/context-fold/references/unusable-baseline.md +4 -6
  30. package/claude/skills/create-rule/REQUIREMENT.md +0 -1
  31. package/claude/skills/create-skill/REQUIREMENT.md +6 -4
  32. package/claude/skills/create-skill/SKILL.md +8 -7
  33. package/{standards → claude/skills/create-skill/references}/skill-paths.md +1 -0
  34. package/claude/skills/decision-escalate/REQUIREMENT.md +1 -1
  35. package/claude/skills/decision-escalate/SKILL.md +1 -1
  36. package/claude/skills/design-taste/REQUIREMENT.md +0 -2
  37. package/claude/skills/design-taste/SKILL.md +1 -3
  38. package/claude/skills/design-taste/references/vocabulary.md +1 -1
  39. package/claude/skills/docs-sync/REQUIREMENT.md +3 -3
  40. package/claude/skills/document-health/REQUIREMENT.md +2 -2
  41. package/claude/skills/document-health/SKILL.md +4 -5
  42. package/claude/skills/document-health/references/axes.md +4 -6
  43. package/claude/skills/draft-and-pick/REQUIREMENT.md +16 -14
  44. package/claude/skills/draft-and-pick/SKILL.md +40 -32
  45. package/claude/skills/draft-and-pick/references/live-arms.md +9 -9
  46. package/claude/skills/draft-doc/REQUIREMENT.md +5 -5
  47. package/claude/skills/draft-doc/SKILL.md +9 -10
  48. package/claude/skills/draft-doc/references/requirements.md +61 -0
  49. package/claude/skills/draft-doc/references/wiki-kind.md +53 -0
  50. package/claude/skills/draft-doc/references/wiki.md +50 -30
  51. package/claude/skills/draft-figure/REQUIREMENT.md +2 -2
  52. package/claude/skills/draft-figure/SKILL.md +4 -4
  53. package/claude/skills/draft-figure/references/architecture-set.md +4 -4
  54. package/claude/skills/draft-figure/references/hand-drawn.md +1 -1
  55. package/claude/skills/draft-figure/references/mermaid-path.md +55 -0
  56. package/claude/skills/draft-figure/references/mermaid.md +43 -34
  57. package/claude/skills/draft-identity/REQUIREMENT.md +1 -1
  58. package/claude/skills/draft-identity/SKILL.md +9 -7
  59. package/claude/skills/draft-ready/REQUIREMENT.md +1 -1
  60. package/claude/skills/draft-ready/SKILL.md +6 -6
  61. package/claude/skills/draft-ready/references/assembly.md +1 -1
  62. package/{standards → claude/skills/draft-ready/references}/ready.md +13 -5
  63. package/claude/skills/git-issue/references/issue.md +3 -3
  64. package/claude/skills/git-ship/REQUIREMENT.md +0 -2
  65. package/claude/skills/git-ship/SKILL.md +16 -24
  66. package/claude/skills/plan-feature/SKILL.md +2 -6
  67. package/{standards → claude/skills/plan-feature/references}/plan.md +9 -10
  68. package/claude/skills/plan-groundwork/SKILL.md +5 -6
  69. package/{standards → claude/skills/plan-groundwork/references}/groundwork.md +17 -4
  70. package/claude/skills/plan-intake/SKILL.md +2 -3
  71. package/{standards → claude/skills/plan-intake/references}/intake.md +17 -2
  72. package/claude/skills/plan-intake-answer/REQUIREMENT.md +1 -1
  73. package/claude/skills/plan-intake-answer/SKILL.md +1 -1
  74. package/claude/skills/review-address/SKILL.md +1 -1
  75. package/claude/skills/review-craft/REQUIREMENT.md +3 -3
  76. package/claude/skills/review-craft/SKILL.md +2 -2
  77. package/claude/skills/review-craft/references/ui.md +4 -4
  78. package/claude/skills/review-pr/REQUIREMENT.md +1 -1
  79. package/claude/skills/review-pr/SKILL.md +5 -7
  80. package/claude/skills/review-ui/REQUIREMENT.md +0 -1
  81. package/claude/skills/review-ui/SKILL.md +1 -1
  82. package/claude/skills/role-orchestrator/REQUIREMENT.md +0 -3
  83. package/claude/skills/role-orchestrator/SKILL.md +8 -8
  84. package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +3 -3
  85. package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +7 -10
  86. package/claude/skills/role-orchestrator/references/orchestrator-parked.md +2 -2
  87. package/claude/skills/role-orchestrator/references/orchestrator-refill.md +0 -3
  88. package/claude/skills/role-orchestrator/references/orchestrator-resume.md +1 -1
  89. package/claude/skills/role-planner/SKILL.md +2 -2
  90. package/claude/skills/role-reviewer/SKILL.md +1 -1
  91. package/claude/skills/role-worker/SKILL.md +2 -2
  92. package/claude/skills/session-compact/REQUIREMENT.md +1 -4
  93. package/claude/skills/session-compact/SKILL.md +3 -13
  94. package/claude/skills/session-compact/references/handoff-note.md +2 -2
  95. package/claude/skills/session-map/REQUIREMENT.md +1 -9
  96. package/claude/skills/session-map/SKILL.md +8 -16
  97. package/{standards → claude/skills/session-map/references}/session.md +17 -11
  98. package/claude/skills/session-relay/REQUIREMENT.md +1 -1
  99. package/claude/skills/session-resume/REQUIREMENT.md +4 -6
  100. package/claude/skills/session-resume/SKILL.md +3 -9
  101. package/claude/skills/session-worktree/SKILL.md +1 -1
  102. package/claude/skills/session-worktree/references/main-root-writes.md +2 -2
  103. package/claude/skills/systematic-debugging/REQUIREMENT.md +0 -1
  104. package/claude/skills/target-check/REQUIREMENT.md +3 -3
  105. package/claude/skills/target-check/SKILL.md +1 -1
  106. package/claude/skills/target-check/references/domains.md +1 -1
  107. package/claude/skills/target-setup/REQUIREMENT.md +4 -4
  108. package/claude/skills/target-setup/SKILL.md +3 -3
  109. package/claude/skills/target-setup/references/detect.md +1 -1
  110. package/claude/skills/task-board/SKILL.md +4 -4
  111. package/claude/skills/task-board/references/archive.md +1 -1
  112. package/{standards → claude/skills/task-board/references}/board.md +9 -0
  113. package/claude/skills/task-board/references/decline.md +1 -1
  114. package/{standards → claude/skills/task-board/references}/tasks.md +13 -8
  115. package/claude/skills/teach-workspace/SKILL.md +1 -1
  116. package/claude/skills/teach-workspace/references/revisit.md +1 -1
  117. package/{standards → claude/skills/teach-workspace/references}/teach.md +17 -5
  118. package/claude/skills/ux-audit/REQUIREMENT.md +2 -2
  119. package/claude/skills/ux-audit/SKILL.md +2 -3
  120. package/claude/skills/write-human/REQUIREMENT.md +0 -1
  121. package/claude/skills/write-human/SKILL.md +1 -1
  122. package/docs/agents/audits.md +1 -1
  123. package/docs/agents/canvas.md +1 -1
  124. package/docs/agents/commands.md +1 -6
  125. package/docs/agents/context-audit-checks.md +9 -23
  126. package/docs/agents/context-audit.md +7 -15
  127. package/docs/agents/context-classify.md +5 -5
  128. package/docs/agents/counts.md +5 -5
  129. package/docs/agents/drift-surfaces.md +2 -2
  130. package/docs/agents/index.md +3 -5
  131. package/docs/agents/install-and-sync.md +6 -6
  132. package/docs/agents/intake.md +1 -1
  133. package/docs/agents/records-stale.md +5 -5
  134. package/docs/agents/records-validate.md +1 -1
  135. package/docs/agents/records.md +2 -2
  136. package/docs/agents/restated.md +1 -1
  137. package/docs/agents/rule-citations.md +1 -1
  138. package/docs/agents/skills-audit.md +2 -2
  139. package/docs/agents/state-scoped-risk.md +2 -2
  140. package/docs/agents/superseded.md +2 -2
  141. package/docs/agents/tasks-plans.md +1 -1
  142. package/docs/agents/tasks-validate.md +1 -1
  143. package/docs/agents/tasks.md +1 -1
  144. package/docs/agents/teach.md +1 -1
  145. package/docs/agents/upstream.md +26 -2
  146. package/docs/target/migrations.md +24 -0
  147. package/docs/target/projects.md +5 -7
  148. package/docs/target/scenarios.md +2 -2
  149. package/docs/target/sync.md +3 -3
  150. package/docs/workflow/ai-workflow.md +7 -38
  151. package/docs/workflow/index.md +1 -1
  152. package/docs/workflow/operating-model.md +8 -8
  153. package/docs/workflow/parallel-features.md +7 -7
  154. package/docs/workflow/skill-map-on-request.md +12 -15
  155. package/docs/workflow/skill-map.md +20 -32
  156. package/docs/workflow/visual-design-workflow.md +11 -14
  157. package/governance/renames.toml +0 -19
  158. package/governance/rules/canon/605-worktrees.md +1 -1
  159. package/governance/rules/{standards → canon}/plan.md +4 -5
  160. package/governance/rules/canon/tasks.md +18 -0
  161. package/governance/stacks/base.toml +1 -1
  162. package/package.json +1 -1
  163. package/scripts/core/install-check.sh +1 -1
  164. package/scripts/core/regen-web-previews.ts +1 -1
  165. package/src/audits/catalog.ts +5 -97
  166. package/src/claude/cases/authoring.ts +0 -18
  167. package/src/claude/cases/misc.ts +0 -13
  168. package/src/claude/cases/setup.ts +3 -20
  169. package/src/claude/cases/workflow.ts +0 -33
  170. package/src/claude/seeds.ts +1 -7
  171. package/src/claude/skills-audit.ts +1 -1
  172. package/src/cli/help.ts +1 -4
  173. package/src/cli.ts +0 -4
  174. package/src/commands/claude.ts +8 -14
  175. package/src/commands/context.ts +18 -280
  176. package/src/commands/feedback.ts +22 -91
  177. package/src/commands/records.ts +5 -5
  178. package/src/commands/sync.ts +5 -3
  179. package/src/commands/upstream.ts +135 -0
  180. package/src/context/audit.ts +5 -14
  181. package/src/context/classify/extract.ts +6 -13
  182. package/src/context/classify/patterns.ts +2 -41
  183. package/src/context/classify/prompts.ts +2 -6
  184. package/src/context/classify/run.ts +3 -3
  185. package/src/context/folders.ts +7 -12
  186. package/src/context/gate.ts +11 -91
  187. package/src/context/requirements.ts +13 -4
  188. package/src/counts/scan.ts +3 -3
  189. package/src/design/components.ts +2 -2
  190. package/src/feedback/body.ts +0 -12
  191. package/src/gate/measures.ts +6 -57
  192. package/src/gov/citations.ts +9 -3
  193. package/src/gov/restated.ts +3 -3
  194. package/src/markdown/structure.ts +2 -2
  195. package/src/migrate/record-layout.ts +3 -3
  196. package/src/records/ordinal.ts +1 -1
  197. package/src/records/prune.ts +2 -1
  198. package/src/records/stale-canonical.ts +2 -2
  199. package/src/roots/record.ts +1 -1
  200. package/src/sandbox/scenario.ts +115 -11
  201. package/src/shipped/references.ts +3 -3
  202. package/src/standards/read.ts +31 -0
  203. package/src/sync/seeds-report.ts +1 -1
  204. package/src/tasks/reach.ts +2 -2
  205. package/src/tasks/validate.ts +1 -1
  206. package/src/teach/workspace.ts +1 -1
  207. package/src/upstream/cursor.ts +1 -1
  208. package/src/upstream/due.ts +128 -0
  209. package/src/upstream/releases.ts +2 -1
  210. package/standards/context.md +3 -5
  211. package/standards/design.md +2 -3
  212. package/standards/index.md +0 -22
  213. package/standards/publish.md +1 -1
  214. package/standards/skill.md +1 -1
  215. package/tooling/base/reference.md +1 -1
  216. package/tooling/claude/reference.md +6 -20
  217. package/tooling/claude/seeds/.claude/hooks/records-index.sh +8 -20
  218. package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +3 -3
  219. package/tooling/claude/seeds/CLAUDE.md +1 -3
  220. package/tooling/claude/seeds/canon/REQUIREMENTS.md +2 -9
  221. package/tooling/web/configs/e2e/screenshot.ts +0 -1
  222. package/claude/skills/auto-ship/references/review-findings.md +0 -20
  223. package/claude/skills/bash-cli-script/REQUIREMENT.md +0 -43
  224. package/claude/skills/bash-cli-script/SKILL.md +0 -53
  225. package/claude/skills/bash-cli-script/references/template.md +0 -19
  226. package/claude/skills/canon-operator/REQUIREMENT.md +0 -62
  227. package/claude/skills/canon-operator/SKILL.md +0 -113
  228. package/claude/skills/canon-rollout/REQUIREMENT.md +0 -59
  229. package/claude/skills/canon-rollout/SKILL.md +0 -140
  230. package/claude/skills/canon-rollout/references/failure-recovery.md +0 -20
  231. package/claude/skills/context-fold/references/anchor-sweep.md +0 -58
  232. package/claude/skills/context-fold/references/wireframe-sweep.md +0 -45
  233. package/claude/skills/create-standard/REQUIREMENT.md +0 -33
  234. package/claude/skills/create-standard/SKILL.md +0 -31
  235. package/claude/skills/design-extract/REQUIREMENT.md +0 -42
  236. package/claude/skills/design-extract/SKILL.md +0 -108
  237. package/claude/skills/draft-and-pick/references/frame.html +0 -118
  238. package/claude/skills/draft-doc/references/wireframes.md +0 -48
  239. package/claude/skills/markdown-propose/REQUIREMENT.md +0 -47
  240. package/claude/skills/markdown-propose/SKILL.md +0 -122
  241. package/claude/skills/markdown-propose/references/format.md +0 -118
  242. package/claude/skills/memory-capture/REQUIREMENT.md +0 -50
  243. package/claude/skills/memory-capture/SKILL.md +0 -117
  244. package/claude/skills/memory-review/REQUIREMENT.md +0 -52
  245. package/claude/skills/memory-review/SKILL.md +0 -129
  246. package/claude/skills/memory-review/references/later-phases.md +0 -118
  247. package/claude/skills/memory-review/references/receipt-format.md +0 -64
  248. package/claude/skills/project-commands/REQUIREMENT.md +0 -42
  249. package/claude/skills/project-commands/SKILL.md +0 -87
  250. package/claude/skills/repo-metadata/REQUIREMENT.md +0 -37
  251. package/claude/skills/repo-metadata/SKILL.md +0 -54
  252. package/claude/skills/restate-plainly/REQUIREMENT.md +0 -41
  253. package/claude/skills/restate-plainly/SKILL.md +0 -41
  254. package/claude/skills/review-branch/REQUIREMENT.md +0 -40
  255. package/claude/skills/review-branch/SKILL.md +0 -137
  256. package/claude/skills/seed-sync/REQUIREMENT.md +0 -45
  257. package/claude/skills/seed-sync/SKILL.md +0 -158
  258. package/claude/skills/sketch-design/REQUIREMENT.md +0 -38
  259. package/claude/skills/sketch-design/SKILL.md +0 -94
  260. package/claude/skills/ux-walkthrough/REQUIREMENT.md +0 -56
  261. package/claude/skills/ux-walkthrough/SKILL.md +0 -53
  262. package/claude/skills/ux-walkthrough/references/builds.md +0 -15
  263. package/claude/skills/ux-walkthrough/references/candidate-pages.md +0 -11
  264. package/claude/skills/ux-walkthrough/references/measuring.md +0 -22
  265. package/claude/skills/ux-walkthrough/references/record.md +0 -36
  266. package/claude/skills/ux-walkthrough/references/relay.md +0 -25
  267. package/docs/agents/architecture-record.md +0 -36
  268. package/docs/agents/review-classification.md +0 -76
  269. package/governance/rules/canon/603-memory.md +0 -11
  270. package/governance/rules/lang/120-bash.md +0 -18
  271. package/governance/rules/standards/architecture.md +0 -13
  272. package/governance/rules/standards/groundwork.md +0 -13
  273. package/governance/rules/standards/intake.md +0 -12
  274. package/governance/rules/standards/memory.md +0 -12
  275. package/governance/rules/standards/ready.md +0 -13
  276. package/governance/rules/standards/requirements.md +0 -12
  277. package/governance/rules/standards/session.md +0 -13
  278. package/governance/rules/standards/tasks.md +0 -15
  279. package/governance/rules/standards/teach.md +0 -14
  280. package/governance/rules/standards/wiki.md +0 -13
  281. package/governance/rules/standards/wireframes.md +0 -13
  282. package/src/autoship/classify.ts +0 -75
  283. package/src/autoship/paths.ts +0 -50
  284. package/src/commands/autoship.ts +0 -129
  285. package/src/commands/repo.ts +0 -393
  286. package/src/context/architecture.ts +0 -654
  287. package/src/context/wireframe-states.ts +0 -238
  288. package/src/repo/metadata.ts +0 -206
  289. package/standards/architecture.md +0 -127
  290. package/standards/memory.md +0 -158
  291. package/standards/mermaid.md +0 -64
  292. package/standards/requirements.md +0 -79
  293. package/standards/wiki.md +0 -77
  294. package/standards/wireframes.md +0 -143
  295. package/tooling/claude/seeds/.claude/memory/index.md +0 -8
  296. package/tooling/claude/seeds/canon/ARCHITECTURE.md +0 -23
  297. package/tooling/claude/seeds/canon/wireframes/index.md +0 -8
  298. /package/{standards → claude/skills/create-skill/references}/skill-practice.md +0 -0
  299. /package/{standards → claude/skills/create-skill/references}/skill-requirement.md +0 -0
  300. /package/{standards → claude/skills/plan-feature/references}/plan-lifecycle.md +0 -0
  301. /package/{standards → claude/skills/plan-groundwork/references}/groundwork-spikes.md +0 -0
  302. /package/{standards → claude/skills/task-board/references}/tasks-decline.md +0 -0
  303. /package/{standards → claude/skills/teach-workspace/references}/glossary.md +0 -0
@@ -1,76 +0,0 @@
1
- ---
2
- title: Review classification
3
- description: Deciding whether a changed set needs the review pass, the two tests it runs, why an empty set refuses rather than skipping, and the written fallback a target on an older binary falls back to
4
- ---
5
-
6
- # Review classification
7
-
8
- `canon autoship classify` answers the one decision the ship chain used to make by reading a bulleted list out of a skill body. It takes the names a branch changed and returns whether the review pass can be skipped, which file decided it, and which of the two tests that file failed.
9
-
10
- ```bash
11
- canon autoship classify docs/index.md README.md
12
- canon autoship classify --json .claude/skills/deploy-check/SKILL.md
13
- ```
14
-
15
- | Option | Behavior |
16
- | -------- | ---------------------------------------------------------- |
17
- | `--json` | Add a machine-readable record on stdout, keeping the frame |
18
-
19
- Positional paths are the whole input. The verb never touches git, so it reads no baseline of its own and the caller hands over the set it already computed. A second read here could resolve a different range than the one the chain measured, which is the stale-baseline failure a prior row closed.
20
-
21
- Under `--json` the record holds stdout alone and the frame still renders on stderr, refusals included, which is the split `output-shape.md` fixes for every mode.
22
-
23
- ## The two tests
24
-
25
- A branch skips review only when both hold across every changed name:
26
-
27
- - **Every path reads as prose.** The extension is `.md` or `.txt`, compared lowercased. Anything else is code, a config, or an asset.
28
- - **No path sits under a behavior path.** Markdown under one of those surfaces states what an agent does, so a change there is a behavior change wearing a prose extension.
29
-
30
- One failing file sends the whole branch to review. Documentation shipped beside a behavior change does not cancel it.
31
-
32
- The record names the first file to fail, tested in the caller's own order, and each file is read for its extension before its path. A set failing both tests reports one file and one test, which is all a caller needs to route.
33
-
34
- ## The behavior paths
35
-
36
- Most carry two spellings, the one a surface authors at and the one it reaches a session at, so the rule reads the same in this toolkit and in a project that consumed one.
37
-
38
- | Surface | Spellings |
39
- | ----------------- | ------------------------------------- |
40
- | Plugin skills | `claude/skills/`, `.claude/skills/` |
41
- | Governance rules | `governance/rules/`, `.claude/rules/` |
42
- | Standards | `standards/` |
43
- | Internal and seed | `internal/`, `tooling/` |
44
- | Root instructions | `CLAUDE.md` |
45
-
46
- `standards/` carries one spelling. It never installs into a project, reaching a reader by resolution, so there is no consumed copy to name.
47
-
48
- `CLAUDE.md` is matched as a whole path rather than as a prefix, because a prefix reaches nothing that sits in no folder. A nested `docs/CLAUDE.md` stays informational.
49
-
50
- The set is data at `src/autoship/paths.ts`. That makes it permanently exempt from any later design that folds a machine-parsed list back into the surface citing it, per the toolkit's machine-parsed clause: a rule restating the list a parser reads is two sources for one list.
51
-
52
- ## Exit codes and refusals
53
-
54
- | Code | Meaning |
55
- | ---- | ------------------------------------------------------------ |
56
- | `0` | prose-only, so the review pass can be skipped |
57
- | `1` | refused, with `reason` naming the cause |
58
- | `2` | review is needed, with `file` and `test` naming what decided |
59
-
60
- Branch on the record's `decision` rather than on the exit code. A shell function wrapping `canon` takes its status from whatever it runs last, so every non-zero exit can reach a caller as zero.
61
-
62
- An empty set refuses with `no-changes` rather than skipping. Both tests are universally quantified, so an empty set satisfies them vacuously, and reading that as prose-only would route a branch past review for having produced no output at all.
63
-
64
- ## Why it is a verb
65
-
66
- The decision was three sentences in `auto-ship`'s review step, applied by a session reading a bulleted list of paths. It failed three times. A driven arm on 2026-08-30 staged `.claude/skills/deploy-check/SKILL.md`, which that list names, and the chain skipped review and opened a draft pull request anyway. The rule was correct and the session did not apply it, and the two fixes before that one were each a rewrite of the same prose.
67
-
68
- A rule a session can talk itself out of moves into a verb. That is the same argument the quiz-order draw in `canon teach lesson` was decided on: an instruction is a hope where a verb is a check.
69
-
70
- ## The written fallback
71
-
72
- The verb ships with the CLI and Step 6 ships with the plugin, so a target holding an older binary meets a missing subcommand. The skill body keeps the written list and applies it by hand there, naming which of the two decided the run.
73
-
74
- The fallback is never a skip. Failing open is the exact defect the verb closes, so a body that skips on anything other than a `skip` record would ship every branch unreviewed the moment the subcommand went absent.
75
-
76
- Two copies of the path set is what the fallback costs, and it stands until a release retires the written half.
@@ -1,11 +0,0 @@
1
- ---
2
- description: Keep memory writes scoped to .canon/memory/ and out of context-owned domains
3
- ---
4
-
5
- # Memory standards
6
-
7
- ## Writing memory
8
-
9
- - Write all memory files to `.canon/memory/`, not `~/.claude/projects/`
10
- - A fact about a domain goes to that domain's `canon/context/` entry, not to memory. `canon:memory-capture` routes it there and `canon:context-fold` folds it in. Memory keeps only what no context entry owns. Report it rather than proceeding silently when either skill does not resolve. Both ship with the plugin and this rule ships with the CLI, so a project that installed governance alone does not have them.
11
- - Never delete a memory entry. Retire one by moving it to `.canon/memory/archive/`, which `canon records push` backs. A bulk retire runs through the shell, where no file edit fires a path-scoped rule.
@@ -1,18 +0,0 @@
1
- ---
2
- description: Route bash script authoring to the wrapper skill, and name the lint gate
3
- paths:
4
- - '**/*.sh'
5
- ---
6
-
7
- # Bash standards
8
-
9
- ## Skill routing
10
-
11
- - Use `canon:bash-cli-script` before writing a script, and follow its guards on what a shell script may be.
12
- - Load the skill's own reference template rather than hand-rolling logging patterns outside it.
13
- - Report it rather than proceeding silently when the skill does not resolve. It ships with the plugin and this rule ships with the CLI, so a project that installed governance alone does not have it.
14
-
15
- ## Lint gate
16
-
17
- - Format with `shfmt --write --indent 2` and lint with `shellcheck --severity=warning` before committing a script.
18
- - Fix a shellcheck finding at the source. Suppress one with a directive comment only for a genuine false positive, and state why beside the suppression.
@@ -1,13 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/architecture.md. Edit that frontmatter, not this file.
3
- description: Shape and content rules for canon/ARCHITECTURE.md
4
- paths:
5
- - 'canon/ARCHITECTURE.md'
6
- ---
7
-
8
- # Architecture standards
9
-
10
- ## Authority
11
-
12
- - Follow the architecture standard for shape and content rules for canon/ARCHITECTURE.md. It is the single source. Read it with `canon standards architecture`.
13
- - Add a decision here only when it fills one of the standard's slots, and write any other decision into the context entry for the domain it constrains. At the record's stated cap, merge or retire an entry before adding one.
@@ -1,13 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/groundwork.md. Edit that frontmatter, not this file.
3
- description: Folder layout, ordinal naming, reserved numbering, frontmatter and dating, required file contents, and conventions for a measurement track
4
- paths:
5
- - '.canon/groundwork/**'
6
- ---
7
-
8
- # Groundwork standards
9
-
10
- ## Authority
11
-
12
- - Follow the groundwork standard for folder layout, ordinal naming, reserved numbering, frontmatter and dating, required file contents, and conventions for a measurement track. It is the single source. Read it with `canon standards groundwork`.
13
- - Follow the groundwork spikes standard for `08-spikes.md` and the folders holding what a spike produced. Read it with `canon standards groundwork-spikes`.
@@ -1,12 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/intake.md. Edit that frontmatter, not this file.
3
- description: Folder layout, ordinal naming, reserved index number, frontmatter and dating, the item template, the answer contract, and retrieval
4
- paths:
5
- - '.canon/intake/**'
6
- ---
7
-
8
- # Intake standards
9
-
10
- ## Authority
11
-
12
- - Follow the intake standard for folder layout, ordinal naming, reserved index number, frontmatter and dating, the item template, the answer contract, and retrieval. It is the single source. Read it with `canon standards intake`.
@@ -1,12 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/memory.md. Edit that frontmatter, not this file.
3
- description: Filename and type prefix, frontmatter, the body shape per type, links between entries, and the lifecycle from write to retire
4
- paths:
5
- - '.canon/memory/**'
6
- ---
7
-
8
- # Memory standards
9
-
10
- ## Authority
11
-
12
- - Follow the memory standard for filename and type prefix, frontmatter, the body shape per type, links between entries, and the lifecycle from write to retire. It is the single source. Read it with `canon standards memory`.
@@ -1,13 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/ready.md. Edit that frontmatter, not this file.
3
- description: Folder layout, ordinal naming, the overview frontmatter, the thin-plan contract, and the archive lifecycle for a finished-file handoff
4
- paths:
5
- - '.canon/ready/**'
6
- ---
7
-
8
- # Ready standards
9
-
10
- ## Authority
11
-
12
- - Follow the ready standard for folder layout, ordinal naming, the overview frontmatter, the thin-plan contract, and the archive lifecycle for a finished-file handoff. It is the single source. Read it with `canon standards ready`.
13
- - Load the `canon:draft-ready` skill to write a ready folder, its overview, the thin plan, and the task row. It owns the procedure. Report it rather than proceeding silently when it does not resolve, since it ships with the plugin and this rule ships with the CLI.
@@ -1,12 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/requirements.md. Edit that frontmatter, not this file.
3
- description: Shape and content rules for canon/REQUIREMENTS.md
4
- paths:
5
- - 'canon/REQUIREMENTS.md'
6
- ---
7
-
8
- # Requirements standards
9
-
10
- ## Authority
11
-
12
- - Follow the requirements standard for shape and content rules for canon/REQUIREMENTS.md. It is the single source. Read it with `canon standards requirements`.
@@ -1,13 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/session.md. Edit that frontmatter, not this file.
3
- description: Filename and location, the sections a handoff carries, the write and read procedures, and how a role extends it
4
- paths:
5
- - '.canon/tasks/session-*.md'
6
- ---
7
-
8
- # Session map standards
9
-
10
- ## Authority
11
-
12
- - Follow the session standard for filename and location, the sections a handoff carries, the write and read procedures, and how a role extends it. It is the single source. Read it with `canon standards session`.
13
- - Follow this rule rather than the tasks rule for a `session-` file. A handoff is not a task and carries neither `## Outcomes` nor `## Findings`.
@@ -1,15 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/tasks.md. Edit that frontmatter, not this file.
3
- description: Folder layout, filename convention, file format, origin lines, and archiving for task files under .canon/tasks/
4
- paths:
5
- - '.canon/tasks/**'
6
- ---
7
-
8
- # Tasks standards
9
-
10
- ## Authority
11
-
12
- - Follow the tasks standard for folder layout, filename convention, file format, origin lines, and archiving for task files under .canon/tasks/. It is the single source. Read it with `canon standards tasks`.
13
- - Follow the board standard for `priority.md` and `backlog.md`, their readiness groups, and row order. Read it with `canon standards board`.
14
- - Never hand-edit `.canon/tasks/index.md`. A hook regenerates it from sibling frontmatter.
15
- - Follow the task decline standard for a task decided against. Read it with `canon standards tasks-decline`.
@@ -1,14 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/teach.md. Edit that frontmatter, not this file.
3
- description: Workspace layout, ordinal naming, frontmatter, and the mission and learning-record formats for a learning workspace
4
- paths:
5
- - '.canon/teach/**'
6
- ---
7
-
8
- # Teach standards
9
-
10
- ## Authority
11
-
12
- - Follow the teach standard for workspace layout, ordinal naming, frontmatter, and the mission and learning-record formats for a learning workspace. It is the single source. Read it with `canon standards teach`.
13
- - Follow the glossary standard for the glossary every workspace carries at its root. It is the single source for the entry shape, the ordering, and which terms the file carries. Read it with `canon standards glossary`.
14
- - Report it rather than proceeding silently when that file does not resolve. It ships with the plugin and this rule ships with the CLI, so a project that installed governance alone does not have it.
@@ -1,13 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/wiki.md. Edit that frontmatter, not this file.
3
- description: Folder split, frontmatter, naming convention, and sourcing for a wiki reference page
4
- paths:
5
- - 'wiki/**/*.md'
6
- ---
7
-
8
- # Wiki standards
9
-
10
- ## Authority
11
-
12
- - Follow the wiki standard for folder split, frontmatter, naming convention, and sourcing for a wiki reference page. It is the single source. Read it with `canon standards wiki`.
13
- - Read it before drafting a page. Do not work the placement criterion or the naming convention from memory.
@@ -1,13 +0,0 @@
1
- ---
2
- # Generated by `canon gov regen` from standards/wireframes.md. Edit that frontmatter, not this file.
3
- description: Shape and content rules for canon/wireframes/<surface>.md files
4
- paths:
5
- - 'canon/wireframes/**'
6
- ---
7
-
8
- # Wireframe standards
9
-
10
- ## Authority
11
-
12
- - Follow the wireframes standard for shape and content rules for canon/wireframes/<surface>.md files. It is the single source. Read it with `canon standards wireframes`.
13
- - Read it before adding or revising a surface.
@@ -1,75 +0,0 @@
1
- import {
2
- BEHAVIOR_FILES,
3
- BEHAVIOR_PREFIXES,
4
- PROSE_EXTENSIONS,
5
- } from '@/autoship/paths'
6
-
7
- /**
8
- * Which of the two tests a file failed.
9
- *
10
- * Named apart rather than folded into one boolean, because the repair differs.
11
- * A non-prose extension means the branch carries code and review is ordinary. A
12
- * behavior path means prose that states what an agent does, which is the half
13
- * three sessions read past.
14
- */
15
- export type FailedTest = 'extension' | 'behavior-path'
16
-
17
- /** Why a classification produced no reading. */
18
- export type ClassifyRefusal = 'no-changes'
19
-
20
- export type Classification =
21
- | { readonly kind: 'skip' }
22
- | {
23
- readonly kind: 'review'
24
- readonly test: FailedTest
25
- readonly file: string
26
- }
27
- | { readonly kind: 'refused'; readonly reason: ClassifyRefusal }
28
-
29
- /**
30
- * Prefix-anchored against the folders, matching how `resolveCoverage` reads the
31
- * label map, and equality against the whole paths a prefix cannot reach.
32
- */
33
- function underBehaviorPath(path: string): boolean {
34
- if (BEHAVIOR_FILES.some((file) => file === path)) return true
35
- return BEHAVIOR_PREFIXES.some((prefix) => path.startsWith(prefix))
36
- }
37
-
38
- function readsAsProse(path: string): boolean {
39
- const lowered = path.toLowerCase()
40
- return PROSE_EXTENSIONS.some((extension) => lowered.endsWith(extension))
41
- }
42
-
43
- /**
44
- * Decides whether a branch's changed set skips the review pass.
45
- *
46
- * The skip needs both tests to pass: every name reads as prose, and no name
47
- * sits under a behavior path. One behavior file sends the whole branch to
48
- * review, since documentation shipped beside a behavior change does not cancel
49
- * it.
50
- *
51
- * An empty set refuses rather than skipping. Both tests are universally
52
- * quantified, so an empty set satisfies them vacuously, and reading that as
53
- * prose-only would route a branch past review for having produced no output at
54
- * all.
55
- *
56
- * Names only. The caller hands the set the ship chain already computed, so no
57
- * second baseline is read here and the stale-baseline half stays closed.
58
- */
59
- export function classifyChanges(paths: readonly string[]): Classification {
60
- if (paths.length === 0) return { kind: 'refused', reason: 'no-changes' }
61
-
62
- // First failure in the caller's order wins, and each file is tested for its
63
- // extension before its path. A set failing both tests reports one file and
64
- // one test, which is all the branch needs to route.
65
- for (const path of paths) {
66
- if (!readsAsProse(path)) {
67
- return { kind: 'review', test: 'extension', file: path }
68
- }
69
- if (underBehaviorPath(path)) {
70
- return { kind: 'review', test: 'behavior-path', file: path }
71
- }
72
- }
73
-
74
- return { kind: 'skip' }
75
- }
@@ -1,50 +0,0 @@
1
- /**
2
- * The surfaces where markdown states what an agent does, and the extensions
3
- * that read as prose, held as data one command parses.
4
- *
5
- * Lifted verbatim in content from the list `auto-ship` Step 6 carried, whose
6
- * written fallback copy now sits in `auto-ship/references/verb-absent.md`,
7
- * which a session was asked to apply by hand. It failed that
8
- * application three times, so the set moved here and the body now calls a verb
9
- * that reads it. Being machine-parsed makes it permanently exempt from any
10
- * later design that folds a standard back into the surface citing it, per the
11
- * machine-parsed clause in `canon/context/standards/resolution.md`.
12
- */
13
-
14
- /**
15
- * Path prefixes under which a markdown change is a behavior change.
16
- *
17
- * Most carry two spellings, the one a surface authors at and the one it reaches
18
- * a session at, so the rule reads the same in this toolkit and in a project
19
- * that consumed one. `standards/` carries one: it never installs into a
20
- * project, reaching a reader by resolution, so no `.claude/` spelling exists
21
- * to name.
22
- */
23
- export const BEHAVIOR_PREFIXES = [
24
- 'claude/skills/',
25
- '.claude/skills/',
26
- 'governance/rules/',
27
- '.claude/rules/',
28
- 'standards/',
29
- 'internal/',
30
- 'tooling/',
31
- ] as const
32
-
33
- /**
34
- * Behavior surfaces named as whole paths rather than as prefixes.
35
- *
36
- * A path prefix reaches nothing that sits in no folder, which is what the root
37
- * instruction file is. Matching is equality rather than a suffix test, so a
38
- * nested `docs/CLAUDE.md` stays informational the way the body's "at the
39
- * repository root" qualifier says it should.
40
- */
41
- export const BEHAVIOR_FILES = ['CLAUDE.md'] as const
42
-
43
- /**
44
- * Extensions a changed file may carry for the branch to read as prose-only.
45
- *
46
- * Compared lowercased, so a `README.MD` is not routed to review for its
47
- * spelling. Everything else is code, a config, or an asset, and one of them
48
- * sends the whole branch to review.
49
- */
50
- export const PROSE_EXTENSIONS = ['.md', '.txt'] as const
@@ -1,129 +0,0 @@
1
- import type { Command } from 'commander'
2
- import {
3
- type ClassifyRefusal,
4
- type FailedTest,
5
- classifyChanges,
6
- } from '@/autoship/classify'
7
- import { intro, logInfo, logStep, logWarn, outro, plural } from '@/cli/ui'
8
-
9
- interface ClassifyOptions {
10
- readonly json?: boolean
11
- }
12
-
13
- /** What a reader does about the one way the classification produced no reading. */
14
- const REFUSALS: Record<ClassifyRefusal, string> = {
15
- 'no-changes':
16
- 'No changed files were supplied, so there is no set to classify. Pass the set the ship chain already computed.',
17
- }
18
-
19
- /** Why each failed test sends the branch to review, in the reader's terms. */
20
- const TESTS: Record<FailedTest, string> = {
21
- extension: 'is not prose, so this branch carries a change review reads',
22
- 'behavior-path':
23
- 'sits under a behavior path, so its prose states what an agent does',
24
- }
25
-
26
- export function register(program: Command): void {
27
- const autoship = program
28
- .command('autoship')
29
- .description('Answer the decisions the ship chain used to make in prose')
30
- .helpOption('-h, --help', 'Show this help message')
31
-
32
- autoship
33
- .command('classify')
34
- .description('Decide whether a changed set needs the review pass')
35
- .argument('[paths...]', 'Changed set to classify, as names')
36
- .helpOption('-h, --help', 'Show this help message')
37
- .option('--json', 'Add a machine-readable record on stdout')
38
- .addHelpText(
39
- 'after',
40
- [
41
- '',
42
- 'Reads names only and never touches git, so the caller hands over the',
43
- 'set it already computed rather than paying for a second baseline that',
44
- 'can disagree with the first.',
45
- '',
46
- 'The skip needs both tests to pass. Every name reads as prose, and no',
47
- 'name sits under a behavior path, which is where markdown states what',
48
- 'an agent does. One behavior file sends the whole branch to review,',
49
- 'since documentation shipped beside a behavior change does not cancel',
50
- 'it.',
51
- '',
52
- 'An empty set refuses rather than skipping. Both tests are universally',
53
- 'quantified, so an empty set satisfies them vacuously, and reading that',
54
- 'as prose-only would route a branch past review for producing no output.',
55
- '',
56
- 'Exit codes:',
57
- ' 0 prose-only, so the review pass can be skipped',
58
- ' 1 refused, with the reason on stderr or in the JSON record',
59
- ' 2 review is needed, with the file and the test it failed named',
60
- '',
61
- 'Examples:',
62
- ' canon autoship classify docs/index.md README.md',
63
- ' canon autoship classify --json .claude/skills/deploy-check/SKILL.md',
64
- '',
65
- ].join('\n'),
66
- )
67
- .action((paths: string[], opts: ClassifyOptions) => {
68
- process.exitCode = runClassify(paths, opts)
69
- })
70
- }
71
-
72
- function runClassify(paths: string[], opts: ClassifyOptions): number {
73
- const emitJson = opts.json ?? false
74
- const result = classifyChanges(paths)
75
-
76
- intro('canon autoship classify')
77
-
78
- // The frame renders on stderr in both modes and the record goes to stdout
79
- // alone, so an operator reading the terminal sees the refusal rather than a
80
- // command that appeared to do nothing.
81
- if (result.kind === 'refused') {
82
- logStep('Refused')
83
- logWarn(REFUSALS[result.reason])
84
- outro()
85
-
86
- if (emitJson) {
87
- process.stdout.write(
88
- `${JSON.stringify({
89
- decision: 'refused',
90
- reason: result.reason,
91
- message: REFUSALS[result.reason],
92
- })}\n`,
93
- )
94
- }
95
- return 1
96
- }
97
-
98
- logStep('Scope')
99
- logInfo(`${plural(paths.length, 'path')} supplied by the caller`)
100
-
101
- if (result.kind === 'skip') {
102
- logStep('Prose only')
103
- logInfo('every path reads as prose and none states agent behavior')
104
- outro()
105
-
106
- if (emitJson) {
107
- process.stdout.write(
108
- `${JSON.stringify({ decision: 'skip', changed: paths })}\n`,
109
- )
110
- }
111
- return 0
112
- }
113
-
114
- logStep('Review')
115
- logWarn(`${result.file} ${TESTS[result.test]}.`)
116
- outro()
117
-
118
- if (emitJson) {
119
- process.stdout.write(
120
- `${JSON.stringify({
121
- decision: 'review',
122
- test: result.test,
123
- file: result.file,
124
- changed: paths,
125
- })}\n`,
126
- )
127
- }
128
- return 2
129
- }