@erclx/canon 5.31.0 → 5.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) 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/auto-ship/references/worktree-name.md +1 -1
  12. package/claude/skills/backlog-triage/REQUIREMENT.md +2 -2
  13. package/claude/skills/backlog-triage/SKILL.md +2 -2
  14. package/claude/skills/canon-cli/REQUIREMENT.md +19 -18
  15. package/claude/skills/canon-cli/SKILL.md +75 -32
  16. package/claude/skills/canon-feedback/REQUIREMENT.md +1 -1
  17. package/claude/skills/canon-feedback/SKILL.md +11 -14
  18. package/claude/skills/canon-feedback-triage/REQUIREMENT.md +13 -14
  19. package/claude/skills/canon-feedback-triage/SKILL.md +49 -30
  20. package/claude/skills/{canvas → canvas-board}/REQUIREMENT.md +5 -6
  21. package/claude/skills/{canvas → canvas-board}/SKILL.md +7 -7
  22. package/{standards → claude/skills/canvas-board/references}/canvas.md +12 -1
  23. package/{standards → claude/skills/canvas-board/references}/design.md +13 -5
  24. package/claude/skills/ci-workflow/REQUIREMENT.md +0 -1
  25. package/claude/skills/context-fold/REQUIREMENT.md +28 -48
  26. package/claude/skills/context-fold/SKILL.md +26 -95
  27. package/claude/skills/context-fold/references/classify.md +7 -8
  28. package/claude/skills/context-fold/references/completion-report.md +4 -8
  29. package/claude/skills/context-fold/references/context-refresh.md +7 -17
  30. package/{standards → claude/skills/context-fold/references}/context.md +19 -10
  31. package/claude/skills/context-fold/references/unusable-baseline.md +4 -8
  32. package/claude/skills/create-rule/REQUIREMENT.md +0 -1
  33. package/claude/skills/create-rule/SKILL.md +2 -2
  34. package/{standards → claude/skills/create-rule/references}/rule.md +12 -5
  35. package/claude/skills/create-skill/REQUIREMENT.md +6 -4
  36. package/claude/skills/create-skill/SKILL.md +10 -9
  37. package/{standards → claude/skills/create-skill/references}/skill-paths.md +1 -0
  38. package/{standards → claude/skills/create-skill/references}/skill.md +18 -15
  39. package/claude/skills/decision-escalate/REQUIREMENT.md +1 -1
  40. package/claude/skills/decision-escalate/SKILL.md +1 -1
  41. package/claude/skills/design-taste/REQUIREMENT.md +3 -5
  42. package/claude/skills/design-taste/SKILL.md +2 -4
  43. package/claude/skills/design-taste/references/vocabulary.md +1 -1
  44. package/claude/skills/docs-sync/REQUIREMENT.md +3 -3
  45. package/claude/skills/docs-sync/SKILL.md +3 -3
  46. package/{standards → claude/skills/docs-sync/references}/docs.md +11 -0
  47. package/{standards → claude/skills/docs-sync/references}/readme.md +9 -2
  48. package/claude/skills/document-health/REQUIREMENT.md +2 -2
  49. package/claude/skills/document-health/SKILL.md +4 -5
  50. package/claude/skills/document-health/references/axes.md +4 -6
  51. package/claude/skills/draft-and-pick/REQUIREMENT.md +16 -14
  52. package/claude/skills/draft-and-pick/SKILL.md +40 -32
  53. package/claude/skills/draft-and-pick/references/live-arms.md +9 -9
  54. package/claude/skills/draft-doc/REQUIREMENT.md +5 -5
  55. package/claude/skills/draft-doc/SKILL.md +9 -10
  56. package/claude/skills/draft-doc/references/requirements.md +61 -0
  57. package/claude/skills/draft-doc/references/wiki-kind.md +53 -0
  58. package/claude/skills/draft-doc/references/wiki.md +50 -30
  59. package/claude/skills/draft-figure/REQUIREMENT.md +2 -2
  60. package/claude/skills/draft-figure/SKILL.md +5 -5
  61. package/claude/skills/draft-figure/references/architecture-set.md +4 -4
  62. package/claude/skills/draft-figure/references/hand-drawn.md +2 -2
  63. package/claude/skills/draft-figure/references/mermaid-path.md +55 -0
  64. package/claude/skills/draft-figure/references/mermaid.md +43 -34
  65. package/claude/skills/draft-identity/REQUIREMENT.md +3 -3
  66. package/claude/skills/draft-identity/SKILL.md +10 -8
  67. package/claude/skills/draft-ready/REQUIREMENT.md +1 -1
  68. package/claude/skills/draft-ready/SKILL.md +7 -7
  69. package/claude/skills/draft-ready/references/assembly.md +1 -1
  70. package/{standards → claude/skills/draft-ready/references}/ready.md +13 -5
  71. package/claude/skills/git-branch/SKILL.md +1 -1
  72. package/{standards → claude/skills/git-branch/references}/branch.md +1 -1
  73. package/claude/skills/git-commit/SKILL.md +2 -2
  74. package/claude/skills/git-followup/REQUIREMENT.md +1 -1
  75. package/claude/skills/git-followup/SKILL.md +1 -1
  76. package/claude/skills/git-issue/SKILL.md +1 -1
  77. package/claude/skills/git-issue/references/issue.md +3 -3
  78. package/claude/skills/git-pr/SKILL.md +13 -13
  79. package/claude/skills/git-pr/references/evidence.md +2 -2
  80. package/claude/skills/git-pr/references/final-command.md +38 -14
  81. package/claude/skills/git-pr/references/labels.md +5 -1
  82. package/{standards → claude/skills/git-pr/references}/pr.md +19 -9
  83. package/{standards → claude/skills/git-pr/references}/publish.md +5 -3
  84. package/claude/skills/git-pr/references/task-number.md +1 -1
  85. package/claude/skills/git-ship/REQUIREMENT.md +0 -2
  86. package/claude/skills/git-ship/SKILL.md +5 -12
  87. package/claude/skills/git-split/SKILL.md +3 -3
  88. package/claude/skills/git-stage/SKILL.md +1 -1
  89. package/claude/skills/plan-feature/REQUIREMENT.md +1 -1
  90. package/claude/skills/plan-feature/SKILL.md +2 -6
  91. package/{standards → claude/skills/plan-feature/references}/plan.md +9 -10
  92. package/claude/skills/plan-groundwork/SKILL.md +5 -6
  93. package/{standards → claude/skills/plan-groundwork/references}/groundwork.md +17 -4
  94. package/claude/skills/plan-intake/SKILL.md +2 -3
  95. package/{standards → claude/skills/plan-intake/references}/intake.md +17 -2
  96. package/claude/skills/plan-intake-answer/REQUIREMENT.md +1 -1
  97. package/claude/skills/plan-intake-answer/SKILL.md +1 -1
  98. package/claude/skills/review-address/SKILL.md +2 -2
  99. package/claude/skills/review-address/references/post-review-findings.md +1 -1
  100. package/claude/skills/review-craft/REQUIREMENT.md +3 -3
  101. package/claude/skills/review-craft/SKILL.md +2 -2
  102. package/claude/skills/review-craft/references/ui.md +4 -4
  103. package/claude/skills/review-pr/REQUIREMENT.md +2 -2
  104. package/claude/skills/review-pr/SKILL.md +8 -10
  105. package/claude/skills/review-pr/references/body-variants.md +2 -2
  106. package/claude/skills/review-pr/references/key-changes.md +3 -3
  107. package/claude/skills/review-pr/references/post.md +4 -2
  108. package/claude/skills/review-ui/REQUIREMENT.md +1 -2
  109. package/claude/skills/review-ui/SKILL.md +2 -2
  110. package/claude/skills/review-ui/references/post.md +1 -1
  111. package/claude/skills/role-orchestrator/REQUIREMENT.md +3 -3
  112. package/claude/skills/role-orchestrator/SKILL.md +10 -10
  113. package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +3 -3
  114. package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +9 -9
  115. package/claude/skills/role-orchestrator/references/orchestrator-launch.md +23 -1
  116. package/claude/skills/role-orchestrator/references/orchestrator-parked.md +2 -2
  117. package/claude/skills/role-orchestrator/references/orchestrator-refill.md +2 -5
  118. package/claude/skills/role-orchestrator/references/orchestrator-resume.md +4 -1
  119. package/claude/skills/role-planner/REQUIREMENT.md +2 -1
  120. package/claude/skills/role-planner/SKILL.md +15 -4
  121. package/claude/skills/role-reviewer/SKILL.md +2 -2
  122. package/claude/skills/role-worker/REQUIREMENT.md +1 -0
  123. package/claude/skills/role-worker/SKILL.md +11 -3
  124. package/claude/skills/session-compact/REQUIREMENT.md +1 -4
  125. package/claude/skills/session-compact/SKILL.md +3 -13
  126. package/claude/skills/session-compact/references/handoff-note.md +2 -2
  127. package/claude/skills/session-map/REQUIREMENT.md +1 -9
  128. package/claude/skills/session-map/SKILL.md +9 -17
  129. package/{standards → claude/skills/session-map/references}/session.md +17 -11
  130. package/claude/skills/session-relay/REQUIREMENT.md +1 -1
  131. package/claude/skills/session-resume/REQUIREMENT.md +6 -8
  132. package/claude/skills/session-resume/SKILL.md +3 -9
  133. package/claude/skills/session-worktree/SKILL.md +6 -6
  134. package/claude/skills/session-worktree/references/main-root-writes.md +2 -2
  135. package/claude/skills/systematic-debugging/REQUIREMENT.md +0 -1
  136. package/claude/skills/target-check/REQUIREMENT.md +3 -3
  137. package/claude/skills/target-check/SKILL.md +1 -1
  138. package/claude/skills/target-check/references/domains.md +1 -1
  139. package/claude/skills/target-setup/REQUIREMENT.md +4 -4
  140. package/claude/skills/target-setup/SKILL.md +3 -3
  141. package/claude/skills/target-setup/references/detect.md +2 -2
  142. package/claude/skills/task-board/REQUIREMENT.md +7 -12
  143. package/claude/skills/task-board/SKILL.md +9 -21
  144. package/{standards → claude/skills/task-board/references}/board.md +9 -0
  145. package/claude/skills/task-board/references/decline.md +1 -1
  146. package/{standards → claude/skills/task-board/references}/tasks.md +15 -10
  147. package/claude/skills/task-complete/REQUIREMENT.md +47 -0
  148. package/claude/skills/task-complete/SKILL.md +86 -0
  149. package/claude/skills/{task-board → task-complete}/references/archive.md +5 -5
  150. package/claude/skills/task-complete/references/receipt-sweep.md +32 -0
  151. package/claude/skills/task-complete/references/unusable-baseline.md +19 -0
  152. package/claude/skills/teach-workspace/REQUIREMENT.md +6 -2
  153. package/claude/skills/teach-workspace/SKILL.md +9 -5
  154. package/claude/skills/teach-workspace/references/lesson-craft.md +1 -1
  155. package/claude/skills/teach-workspace/references/promotion-fold.md +29 -0
  156. package/claude/skills/teach-workspace/references/promotion.md +3 -3
  157. package/claude/skills/teach-workspace/references/revisit.md +1 -1
  158. package/{standards → claude/skills/teach-workspace/references}/teach.md +17 -5
  159. package/claude/skills/ui-checklist/SKILL.md +1 -1
  160. package/claude/skills/ux-audit/REQUIREMENT.md +2 -2
  161. package/claude/skills/ux-audit/SKILL.md +3 -4
  162. package/claude/skills/ux-measure/SKILL.md +1 -1
  163. package/claude/skills/write-human/REQUIREMENT.md +0 -1
  164. package/claude/skills/write-human/SKILL.md +1 -1
  165. package/docs/agents/audits.md +1 -1
  166. package/docs/agents/canvas.md +1 -1
  167. package/docs/agents/commands.md +4 -8
  168. package/docs/agents/context-audit-checks.md +11 -25
  169. package/docs/agents/context-audit.md +7 -15
  170. package/docs/agents/context-classify.md +5 -5
  171. package/docs/agents/counts.md +5 -5
  172. package/docs/agents/drift-surfaces.md +2 -2
  173. package/docs/agents/index.md +5 -7
  174. package/docs/agents/indexes.md +1 -1
  175. package/docs/agents/install-and-sync.md +6 -11
  176. package/docs/agents/intake.md +1 -1
  177. package/docs/agents/key-changes.md +5 -5
  178. package/docs/agents/label-coverage.md +11 -0
  179. package/docs/agents/migrate.md +1 -1
  180. package/docs/agents/records-push.md +2 -2
  181. package/docs/agents/records-stale.md +13 -48
  182. package/docs/agents/records-validate.md +4 -8
  183. package/docs/agents/records.md +6 -28
  184. package/docs/agents/restated.md +1 -1
  185. package/docs/agents/rule-citations.md +2 -2
  186. package/docs/agents/sandbox.md +4 -4
  187. package/docs/agents/skills-audit.md +2 -2
  188. package/docs/agents/state-scoped-risk.md +2 -2
  189. package/docs/agents/superseded.md +2 -2
  190. package/docs/agents/tasks-plans.md +1 -1
  191. package/docs/agents/tasks-validate.md +1 -1
  192. package/docs/agents/tasks.md +3 -3
  193. package/docs/agents/teach.md +1 -1
  194. package/docs/agents/upstream.md +26 -2
  195. package/docs/target/migrations.md +32 -0
  196. package/docs/target/projects.md +5 -7
  197. package/docs/target/scenarios.md +2 -2
  198. package/docs/target/sync.md +4 -4
  199. package/docs/workflow/ai-workflow.md +7 -38
  200. package/docs/workflow/index.md +1 -1
  201. package/docs/workflow/operating-model.md +10 -10
  202. package/docs/workflow/parallel-features.md +12 -12
  203. package/docs/workflow/skill-map-on-request.md +21 -24
  204. package/docs/workflow/skill-map.md +23 -34
  205. package/docs/workflow/visual-design-workflow.md +13 -16
  206. package/governance/renames.toml +0 -30
  207. package/governance/rules/canon/605-worktrees.md +1 -1
  208. package/governance/rules/canon/context.md +13 -0
  209. package/governance/rules/{standards → canon}/plan.md +4 -5
  210. package/governance/rules/canon/tasks.md +18 -0
  211. package/governance/rules/claude/skill.md +17 -0
  212. package/governance/stacks/base.toml +2 -4
  213. package/package.json +4 -4
  214. package/scripts/core/install-check.sh +4 -4
  215. package/scripts/core/regen-web-previews.ts +1 -1
  216. package/scripts/lib/ui.sh +0 -159
  217. package/src/audits/catalog.ts +5 -98
  218. package/src/claude/cases/authoring.ts +0 -18
  219. package/src/claude/cases/misc.ts +1 -14
  220. package/src/claude/cases/setup.ts +7 -20
  221. package/src/claude/cases/workflow.ts +6 -34
  222. package/src/claude/seeds.ts +1 -7
  223. package/src/claude/skills-audit.ts +3 -3
  224. package/src/cli/help.ts +4 -5
  225. package/src/cli/ui.ts +2 -3
  226. package/src/cli.ts +0 -4
  227. package/src/commands/claude.ts +9 -15
  228. package/src/commands/context.ts +18 -280
  229. package/src/commands/feedback.ts +22 -91
  230. package/src/commands/gov.ts +2 -15
  231. package/src/commands/labels.ts +326 -7
  232. package/src/commands/migrate.ts +6 -1
  233. package/src/commands/pr.ts +1 -1
  234. package/src/commands/records.ts +17 -403
  235. package/src/commands/sandbox.ts +3 -6
  236. package/src/commands/sync.ts +5 -3
  237. package/src/commands/tasks.ts +3 -3
  238. package/src/commands/upstream.ts +135 -0
  239. package/src/context/audit.ts +10 -19
  240. package/src/context/classify/extract.ts +6 -13
  241. package/src/context/classify/patterns.ts +2 -41
  242. package/src/context/classify/prompts.ts +2 -6
  243. package/src/context/classify/run.ts +3 -3
  244. package/src/context/folders.ts +8 -13
  245. package/src/context/gate.ts +11 -91
  246. package/src/context/requirements.ts +13 -4
  247. package/src/counts/scan.ts +3 -3
  248. package/src/design/budget.ts +1 -1
  249. package/src/design/components.ts +3 -3
  250. package/src/design/document.ts +1 -1
  251. package/src/design/regen.ts +1 -1
  252. package/src/design/render.ts +1 -1
  253. package/src/feedback/body.ts +0 -12
  254. package/src/gate/measures.ts +7 -58
  255. package/src/gate/sequencer.ts +56 -1
  256. package/src/gate/stages.ts +1 -7
  257. package/src/gov/citations.ts +9 -3
  258. package/src/gov/install.ts +2 -3
  259. package/src/gov/restated.ts +3 -3
  260. package/src/gov/stacks.ts +1 -1
  261. package/src/hooks/post-merge.ts +1 -1
  262. package/src/labels/apply.ts +39 -0
  263. package/src/labels/format.ts +3 -3
  264. package/src/labels/phase.ts +3 -3
  265. package/src/labels/sections.ts +43 -0
  266. package/src/markdown/structure.ts +2 -2
  267. package/src/migrate/record-layout.ts +3 -3
  268. package/src/migrate/skill-names.ts +20 -1
  269. package/src/pr/paths.ts +4 -4
  270. package/src/records/backup.ts +16 -6
  271. package/src/records/ordinal.ts +1 -1
  272. package/src/records/prune.ts +2 -1
  273. package/src/records/stale-canonical.ts +33 -3
  274. package/src/records/validate.ts +2 -188
  275. package/src/roots/record.ts +1 -1
  276. package/src/sandbox/census.ts +1 -1
  277. package/src/sandbox/coverage.ts +2 -6
  278. package/src/sandbox/equivalence.ts +5 -44
  279. package/src/sandbox/expect.ts +4 -4
  280. package/src/sandbox/provision.ts +13 -36
  281. package/src/sandbox/scenario.ts +137 -55
  282. package/src/sandbox/tree.ts +2 -6
  283. package/src/shipped/references.ts +3 -3
  284. package/src/standards/read.ts +44 -0
  285. package/src/sync/git.ts +1 -1
  286. package/src/sync/seeds-report.ts +1 -1
  287. package/src/tasks/archive.ts +5 -5
  288. package/src/tasks/branch.ts +3 -3
  289. package/src/tasks/label.ts +1 -1
  290. package/src/tasks/reach.ts +2 -2
  291. package/src/tasks/record.ts +2 -2
  292. package/src/tasks/validate.ts +2 -2
  293. package/src/teach/workspace.ts +1 -1
  294. package/src/upstream/cursor.ts +1 -1
  295. package/src/upstream/due.ts +128 -0
  296. package/src/upstream/releases.ts +2 -1
  297. package/standards/index.md +0 -35
  298. package/standards/standard.md +1 -7
  299. package/tooling/base/reference.md +2 -2
  300. package/tooling/base/seeds/.github/pull_request_template.md +2 -2
  301. package/tooling/claude/reference.md +7 -21
  302. package/tooling/claude/seeds/.claude/hooks/pr-create-log.sh +9 -1
  303. package/tooling/claude/seeds/.claude/hooks/records-index.sh +8 -20
  304. package/tooling/claude/seeds/.claude/hooks/review-post-scan.sh +171 -0
  305. package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +3 -3
  306. package/tooling/claude/seeds/.claude/settings.json +9 -0
  307. package/tooling/claude/seeds/CLAUDE.md +1 -3
  308. package/tooling/claude/seeds/canon/REQUIREMENTS.md +2 -9
  309. package/tooling/web/configs/e2e/screenshot.ts +0 -1
  310. package/claude/skills/auto-ship/references/review-findings.md +0 -20
  311. package/claude/skills/bash-cli-script/REQUIREMENT.md +0 -43
  312. package/claude/skills/bash-cli-script/SKILL.md +0 -53
  313. package/claude/skills/bash-cli-script/references/template.md +0 -19
  314. package/claude/skills/canon-operator/REQUIREMENT.md +0 -62
  315. package/claude/skills/canon-operator/SKILL.md +0 -113
  316. package/claude/skills/canon-rollout/REQUIREMENT.md +0 -59
  317. package/claude/skills/canon-rollout/SKILL.md +0 -140
  318. package/claude/skills/canon-rollout/references/failure-recovery.md +0 -20
  319. package/claude/skills/context-fold/references/anchor-sweep.md +0 -58
  320. package/claude/skills/context-fold/references/promoted-pages.md +0 -29
  321. package/claude/skills/context-fold/references/receipt-sweep.md +0 -43
  322. package/claude/skills/context-fold/references/wireframe-sweep.md +0 -45
  323. package/claude/skills/create-standard/REQUIREMENT.md +0 -33
  324. package/claude/skills/create-standard/SKILL.md +0 -31
  325. package/claude/skills/design-extract/REQUIREMENT.md +0 -42
  326. package/claude/skills/design-extract/SKILL.md +0 -108
  327. package/claude/skills/draft-and-pick/references/frame.html +0 -118
  328. package/claude/skills/draft-doc/references/wireframes.md +0 -48
  329. package/claude/skills/markdown-propose/REQUIREMENT.md +0 -47
  330. package/claude/skills/markdown-propose/SKILL.md +0 -122
  331. package/claude/skills/markdown-propose/references/format.md +0 -118
  332. package/claude/skills/memory-capture/REQUIREMENT.md +0 -50
  333. package/claude/skills/memory-capture/SKILL.md +0 -117
  334. package/claude/skills/memory-review/REQUIREMENT.md +0 -52
  335. package/claude/skills/memory-review/SKILL.md +0 -129
  336. package/claude/skills/memory-review/references/later-phases.md +0 -118
  337. package/claude/skills/memory-review/references/receipt-format.md +0 -64
  338. package/claude/skills/project-commands/REQUIREMENT.md +0 -42
  339. package/claude/skills/project-commands/SKILL.md +0 -87
  340. package/claude/skills/repo-metadata/REQUIREMENT.md +0 -37
  341. package/claude/skills/repo-metadata/SKILL.md +0 -54
  342. package/claude/skills/restate-plainly/REQUIREMENT.md +0 -41
  343. package/claude/skills/restate-plainly/SKILL.md +0 -41
  344. package/claude/skills/review-branch/REQUIREMENT.md +0 -40
  345. package/claude/skills/review-branch/SKILL.md +0 -137
  346. package/claude/skills/seed-sync/REQUIREMENT.md +0 -45
  347. package/claude/skills/seed-sync/SKILL.md +0 -158
  348. package/claude/skills/sketch-design/REQUIREMENT.md +0 -38
  349. package/claude/skills/sketch-design/SKILL.md +0 -94
  350. package/claude/skills/ux-walkthrough/REQUIREMENT.md +0 -56
  351. package/claude/skills/ux-walkthrough/SKILL.md +0 -53
  352. package/claude/skills/ux-walkthrough/references/builds.md +0 -15
  353. package/claude/skills/ux-walkthrough/references/candidate-pages.md +0 -11
  354. package/claude/skills/ux-walkthrough/references/measuring.md +0 -22
  355. package/claude/skills/ux-walkthrough/references/record.md +0 -36
  356. package/claude/skills/ux-walkthrough/references/relay.md +0 -25
  357. package/docs/agents/architecture-record.md +0 -36
  358. package/docs/agents/review-classification.md +0 -76
  359. package/governance/rules/canon/603-memory.md +0 -11
  360. package/governance/rules/lang/120-bash.md +0 -18
  361. package/governance/rules/standards/architecture.md +0 -13
  362. package/governance/rules/standards/context.md +0 -14
  363. package/governance/rules/standards/design.md +0 -12
  364. package/governance/rules/standards/groundwork.md +0 -13
  365. package/governance/rules/standards/intake.md +0 -12
  366. package/governance/rules/standards/memory.md +0 -12
  367. package/governance/rules/standards/readme.md +0 -12
  368. package/governance/rules/standards/ready.md +0 -13
  369. package/governance/rules/standards/requirements.md +0 -12
  370. package/governance/rules/standards/rule.md +0 -13
  371. package/governance/rules/standards/session.md +0 -13
  372. package/governance/rules/standards/skill.md +0 -21
  373. package/governance/rules/standards/standard.md +0 -13
  374. package/governance/rules/standards/tasks.md +0 -15
  375. package/governance/rules/standards/teach.md +0 -14
  376. package/governance/rules/standards/wiki.md +0 -13
  377. package/governance/rules/standards/wireframes.md +0 -13
  378. package/scripts/config.sh +0 -11
  379. package/scripts/lib/gov.sh +0 -14
  380. package/scripts/lib/sandbox-fixtures.sh +0 -191
  381. package/scripts/lib/sandbox-git.sh +0 -125
  382. package/scripts/lib/sandbox-path.sh +0 -50
  383. package/scripts/sandbox-hook.sh +0 -99
  384. package/src/autoship/classify.ts +0 -75
  385. package/src/autoship/paths.ts +0 -50
  386. package/src/commands/autoship.ts +0 -129
  387. package/src/commands/repo.ts +0 -393
  388. package/src/context/architecture.ts +0 -654
  389. package/src/context/wireframe-states.ts +0 -238
  390. package/src/gov/standard-rules.ts +0 -179
  391. package/src/records/migrate.ts +0 -78
  392. package/src/records/stale.ts +0 -243
  393. package/src/repo/metadata.ts +0 -206
  394. package/src/sandbox/hooks.ts +0 -128
  395. package/standards/architecture.md +0 -127
  396. package/standards/memory.md +0 -158
  397. package/standards/mermaid.md +0 -64
  398. package/standards/requirements.md +0 -79
  399. package/standards/wiki.md +0 -77
  400. package/standards/wireframes.md +0 -143
  401. package/tooling/claude/seeds/.claude/memory/index.md +0 -8
  402. package/tooling/claude/seeds/canon/ARCHITECTURE.md +0 -23
  403. package/tooling/claude/seeds/canon/wireframes/index.md +0 -8
  404. /package/{standards → claude/skills/create-skill/references}/skill-practice.md +0 -0
  405. /package/{standards → claude/skills/create-skill/references}/skill-requirement.md +0 -0
  406. /package/{standards → claude/skills/draft-figure/references}/figures.md +0 -0
  407. /package/{standards → claude/skills/git-branch/references}/slug.md +0 -0
  408. /package/{standards → claude/skills/git-commit/references}/commit.md +0 -0
  409. /package/{standards → claude/skills/git-commit/references}/versioning.md +0 -0
  410. /package/{standards → claude/skills/plan-feature/references}/plan-lifecycle.md +0 -0
  411. /package/{standards → claude/skills/plan-groundwork/references}/groundwork-spikes.md +0 -0
  412. /package/{standards → claude/skills/task-board/references}/tasks-decline.md +0 -0
  413. /package/{standards → claude/skills/teach-workspace/references}/glossary.md +0 -0
@@ -0,0 +1,171 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Claude Code sends a payload and closes stdin. A bare read with nothing feeding
4
+ # it blocks forever and holds the session open, so the read is bounded. `read`
5
+ # rather than `timeout cat`, which macOS does not ship.
6
+ IFS= read -r -d '' -t 2 input
7
+ [ -n "$input" ] || {
8
+ printf '%s reads a Claude Code hook payload on stdin and cannot be run by hand.\n' "${0##*/}" >&2
9
+ exit 1
10
+ }
11
+
12
+ # Every Bash call reaches this line, so the command is read in one jq pass and
13
+ # matched with a shell pattern before anything else costs a process.
14
+ fields=$(printf '%s' "$input" | jq -r 'if .tool_name == "Bash" then [(.cwd // ""), (.tool_input.command // "")] | @json else empty end')
15
+ [ -n "$fields" ] || exit 0
16
+
17
+ cmd=$(printf '%s' "$fields" | jq -r '.[1]')
18
+ case "$cmd" in
19
+ *'gh api'*) ;;
20
+ *) exit 0 ;;
21
+ esac
22
+
23
+ # A command that only mentions a post is not one: a heredoc writing a review
24
+ # body that quotes the command, or a search whose pattern holds it. The string
25
+ # is cut into the commands it runs, with heredoc bodies dropped and quoted text
26
+ # left whole, and only a command that starts with `gh api` is read further.
27
+ # Splitting on the separators outside quotes is what keeps `echo 'a; gh api'`
28
+ # one command rather than two.
29
+ IFS= read -r -d '' splitter <<'AWK'
30
+ { s = s (NR > 1 ? "\n" : "") $0 }
31
+ function emit() {
32
+ gsub(/\n/, " ", seg)
33
+ sub(/^[ \t]+/, "", seg)
34
+ if (seg != "") print seg
35
+ seg = ""
36
+ }
37
+ END {
38
+ n = length(s); q = ""; seg = ""; nt = 0; i = 1
39
+ while (i <= n) {
40
+ c = substr(s, i, 1)
41
+ if (q == "'") { seg = seg c; if (c == "'") q = ""; i++; continue }
42
+ if (q == "\"") {
43
+ if (c == "\\") { seg = seg c substr(s, i + 1, 1); i += 2; continue }
44
+ if (c == "\"") q = ""
45
+ seg = seg c; i++; continue
46
+ }
47
+ if (c == "\\") { seg = seg c substr(s, i + 1, 1); i += 2; continue }
48
+ if (c == "'" || c == "\"") { q = c; seg = seg c; i++; continue }
49
+ if (c == "#" && (seg == "" || substr(seg, length(seg), 1) ~ /[ \t]/)) {
50
+ while (i <= n && substr(s, i, 1) != "\n") i++
51
+ continue
52
+ }
53
+ if (c == "<" && substr(s, i, 2) == "<<" && substr(s, i, 3) != "<<<") {
54
+ j = i + 2; dash = 0
55
+ if (substr(s, j, 1) == "-") { dash = 1; j++ }
56
+ while (substr(s, j, 1) ~ /[ \t]/) j++
57
+ oq = substr(s, j, 1)
58
+ if (oq == "'" || oq == "\"") j++
59
+ tag = ""
60
+ while (substr(s, j, 1) ~ /[A-Za-z0-9_]/) { tag = tag substr(s, j, 1); j++ }
61
+ if (oq == "'" || oq == "\"") j++
62
+ if (tag != "") { nt++; tags[nt] = tag; dashes[nt] = dash; i = j; continue }
63
+ }
64
+ if (c == "\n") {
65
+ emit(); i++
66
+ for (t = 1; t <= nt; t++) {
67
+ while (i <= n) {
68
+ e = index(substr(s, i), "\n")
69
+ if (e == 0) { line = substr(s, i); i = n + 1 } else { line = substr(s, i, e - 1); i += e }
70
+ if (dashes[t]) sub(/^\t+/, "", line)
71
+ if (line == tags[t]) break
72
+ }
73
+ }
74
+ nt = 0; continue
75
+ }
76
+ if (c == ";" || c == "|" || c == "(" || c == ")" || c == "`" || c == "&") {
77
+ if (c == "&" && (substr(seg, length(seg), 1) ~ /[<>]/ || substr(s, i + 1, 1) == ">")) { seg = seg c; i++; continue }
78
+ emit(); i++; continue
79
+ }
80
+ seg = seg c; i++
81
+ }
82
+ emit()
83
+ }
84
+ AWK
85
+
86
+ # A block reaches the session through stderr, and stdout stays empty so nothing
87
+ # unframed lands in the hook protocol.
88
+ deny() {
89
+ printf '%s\n' "$1" >&2
90
+ exit 2
91
+ }
92
+
93
+ # The thread a review or a comment lands on: a review post or edit, and an issue
94
+ # or pull request comment post or edit. A pull request's inline comments are left
95
+ # out, since no shipped skill posts one.
96
+ seg="[^/[:space:]'\"]+"
97
+ end="(['\" ?]|\$)"
98
+ endpoint="(pulls/$seg/reviews(/$seg)?|issues/$seg/comments|issues/comments/$seg)$end"
99
+ starts_gh_api="^([A-Za-z_][A-Za-z0-9_]*=[^[:space:]]*[[:space:]]+)*((command|exec)[[:space:]]+)?gh[[:space:]]+api([[:space:]]|\$)"
100
+ body_inline="[[:space:]](-f|-F|--field|--raw-field)[[:space:]=]*['\"]?body="
101
+ body_file="[[:space:]](-F|--field)[[:space:]=]*['\"]?body=@([^'\"[:space:]]+)"
102
+
103
+ # Reads one command already known to start with `gh api` and returns when it
104
+ # has nothing to scan or the scan came back clean.
105
+ check() {
106
+ local call=$1 method='' file='' cwd out code warnings
107
+
108
+ [[ $call =~ $endpoint ]] || return 0
109
+
110
+ # gh sends POST when a field flag is present and no method is named, and the
111
+ # explicit method wins when one is. A call naming neither is a read.
112
+ if [[ $call =~ (-X|--method)[[:space:]=]*([A-Za-z]+) ]]; then
113
+ method=$(printf '%s' "${BASH_REMATCH[2]}" | tr '[:lower:]' '[:upper:]')
114
+ elif [[ $call =~ [[:space:]](-f|-F|--field|--raw-field|--input)([[:space:]=]|$) ]]; then
115
+ method=POST
116
+ fi
117
+ case "$method" in
118
+ POST | PATCH | PUT) ;;
119
+ *) return 0 ;;
120
+ esac
121
+
122
+ if [[ $call =~ $body_file ]]; then
123
+ file=${BASH_REMATCH[2]}
124
+ elif [[ $call =~ $body_inline ]]; then
125
+ deny 'This review or comment post passes its body inline, so the label scan cannot read it. Write the body to a file in an earlier call and pass it as -F body=@<file>.'
126
+ else
127
+ return 0
128
+ fi
129
+
130
+ [ "$file" != '-' ] || deny 'This post reads its body from stdin, so the label scan cannot read it. Write the body to a file in an earlier call and pass it as -F body=@<file>.'
131
+
132
+ if ! command -v canon >/dev/null 2>&1; then
133
+ jq -nc '{hookSpecificOutput:{hookEventName:"PreToolUse",additionalContext:"The label scan did not run on this review or comment post, since canon is not on PATH. Run canon labels scan --body-file on the body once it is."}}'
134
+ exit 0
135
+ fi
136
+
137
+ # The payload's own cwd is the directory a relative path was written against.
138
+ # The project dir and this process's directory can each be a different worktree.
139
+ cwd=$(printf '%s' "$fields" | jq -r '.[0]')
140
+ [ -n "$cwd" ] || cwd=${CLAUDE_PROJECT_DIR:-.}
141
+ case "$file" in
142
+ /*) ;;
143
+ *) file="$cwd/$file" ;;
144
+ esac
145
+
146
+ # A body written by the same call does not exist when this hook runs, so the
147
+ # post would go out unread by the scan. Blocking is the only verdict that holds.
148
+ [ -f "$file" ] || deny "The body file $file does not exist yet, so the label scan cannot read it. Write the body in an earlier call, then post it."
149
+
150
+ # No --title: a review body carries none, and a title would grade it as an
151
+ # ordinary pull request body.
152
+ out=$(cd "$cwd" && canon labels scan --body-file "$file" 2>&1)
153
+ code=$?
154
+ [ "$code" -ne 0 ] || return 0
155
+
156
+ warnings=$(printf '%s\n' "$out" | grep -F '!')
157
+ [ -n "$warnings" ] || warnings=$out
158
+ if [ "$code" -eq 2 ]; then
159
+ deny "The label scan found text this post would publish. Fix the body file and post again.
160
+ $warnings"
161
+ fi
162
+ deny "The label scan could not grade $file (exit $code). Fix what it reports and post again.
163
+ $warnings"
164
+ }
165
+
166
+ commands=$(printf '%s' "$cmd" | awk "$splitter")
167
+ while IFS= read -r line; do
168
+ [[ $line =~ $starts_gh_api ]] || continue
169
+ check "$line"
170
+ done <<<"$commands"
171
+ exit 0
@@ -18,12 +18,12 @@ case "$file" in
18
18
  *) exit 0 ;;
19
19
  esac
20
20
 
21
- # Four record folders, at either root. A skip list fixed at the old spelling
21
+ # Three record folders, at either root. A skip list fixed at the old spelling
22
22
  # audits a project's own session records the moment the move reaches it, which
23
23
  # reports findings against prose nobody publishes.
24
24
  case "$file" in
25
- *.claude/.tmp/* | *.claude/memory/* | *.claude/review/* | *.claude/plans/*) exit 0 ;;
26
- *.canon/tmp/* | *.canon/memory/* | *.canon/review/* | *.canon/plans/*) exit 0 ;;
25
+ *.claude/.tmp/* | *.claude/review/* | *.claude/plans/*) exit 0 ;;
26
+ *.canon/tmp/* | *.canon/review/* | *.canon/plans/*) exit 0 ;;
27
27
  esac
28
28
 
29
29
  [ -f "$file" ] || exit 0
@@ -27,6 +27,15 @@
27
27
  "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/scratch-guard.sh"
28
28
  }
29
29
  ]
30
+ },
31
+ {
32
+ "matcher": "Bash",
33
+ "hooks": [
34
+ {
35
+ "type": "command",
36
+ "command": "\"$CLAUDE_PROJECT_DIR\"/.claude/hooks/review-post-scan.sh"
37
+ }
38
+ ]
30
39
  }
31
40
  ],
32
41
  "PostToolUse": [
@@ -4,12 +4,10 @@
4
4
 
5
5
  ## Context
6
6
 
7
- - Before non-trivial work in a domain read `canon/context/<domain>.md`, and before touching a UI surface read `canon/wireframes/<surface>.md`. Pick which from the index anchors below.
7
+ - Before non-trivial work in a domain read `canon/context/<domain>.md`. Pick which from the index anchor below.
8
8
 
9
9
  @canon/REQUIREMENTS.md
10
- @canon/ARCHITECTURE.md
11
10
  @canon/context/index.md
12
- @canon/wireframes/index.md
13
11
 
14
12
  ## Commands
15
13
 
@@ -1,18 +1,11 @@
1
1
  # Requirements
2
2
 
3
+ [One line: the problem and who has it]
4
+
3
5
  Authoring guidance: the requirements standard.
4
6
 
5
7
  This record holds at most 600 words.
6
8
 
7
- ## Problem
8
-
9
9
  ## Goals
10
10
 
11
11
  ## Non-goals
12
-
13
- ## MVP features
14
-
15
- 1. Feature: description
16
- 2. Feature: description
17
-
18
- ## Constraints
@@ -58,7 +58,6 @@ const HOME_SECTIONS: CaptureSection[] = [
58
58
  { name: 'dispatch', selector: '#dispatch' },
59
59
  { name: 'workers', selector: '#workers' },
60
60
  { name: 'gate', selector: '#gate' },
61
- { name: 'memory', selector: '#memory' },
62
61
  { name: 'evidence', selector: '#evidence' },
63
62
  { name: 'loop', selector: '#loop' },
64
63
  { name: 'merge', selector: '#merge' },
@@ -1,20 +0,0 @@
1
- ---
2
- title: Review findings
3
- description: How auto-ship Step 7 splits the review receipt's findings by origin, which ones it repairs in place and which stop the chain, and the one-pass bound on the repair
4
- ---
5
-
6
- # Evaluate the review findings
7
-
8
- Step 7 of `auto-ship`. The session reads this file when Step 6 ran review rather than skipping it.
9
-
10
- Read `.canon/review/branch-<slug>.md` at the main worktree root. Split every finding by origin before parsing the summary line (`X critical, Y should-fix, Z minor`), since the stop exists for a defect the branch inherited.
11
-
12
- - **This run caused it, at any severity.** Fix it, re-run the Step 3 verify commands, re-read the fixed file against what the finding claimed, and continue. Do not report it as a stop or offer the fix as a choice.
13
- - **It predates this run, critical or should-fix.** Stop: `❌ Review found non-minor issues that predate this run. See .canon/review/branch-<slug>.md. Fix and run /git-ship.`
14
- - **It predates this run, minor only.** Continue. The minor findings stay in the on-disk review receipt. Fold any a reviewer needs into the PR's `## Technical Context`. Do not add a separate review-notes section to the PR body.
15
-
16
- Read origin as causation rather than authorship, so staleness this run induced in a file it never opened is a finding it caused.
17
-
18
- Bound the repair at one pass, the way Step 3 bounds verify. When that re-read shows the finding still standing, stop: `❌ A self-introduced finding survived one fix pass. See .canon/review/branch-<slug>.md. Fix and run /git-ship.`
19
-
20
- This chain owns the receipt's lifetime. The `context-fold` sweep under Step 8 reaches only reports whose branch is gone, so it collects this one a branch later.
@@ -1,43 +0,0 @@
1
- ---
2
- name: bash-cli-script
3
- description: What a small non-interactive shell wrapper owes its caller, and the 100-line threshold past which the work belongs in TypeScript on Bun
4
- ---
5
-
6
- # Bash CLI script requirement
7
-
8
- ## Gap
9
-
10
- Without this skill, a wrapper is written with an interactive tool's habits. Progress lines, icons, and color land on stdout, so the script stops composing in a pipe and the caller parses a spinner as data. The failure is invisible in a terminal and total in CI.
11
-
12
- The robustness failures are the ones that reach production. Without strict mode a failed stage inside a pipe exits zero and the script reports success on work that did not happen. An unset variable expands to nothing and a path built from it points somewhere nobody meant.
13
-
14
- The size failure is the slow one. A shell script that keeps growing past a wrapper's job turns into the long file nobody will touch, and the [Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html) puts the line at 100: past it, the script is rewritten in a more structured language. Without a stop before generating, a session writes the long script first and the rewrite never happens.
15
-
16
- ## Must
17
-
18
- - Stop before generating when the script will run past 100 lines, and route the work to TypeScript on Bun citing the style guide
19
- - Stop the same way on a request for prompts or a terminal UI, saying why
20
- - Open with the strict-mode preamble, so a failed stage stops the script
21
- - Keep data on stdout and put every log line, progress message, and error on stderr
22
- - Exit non-zero with actionable context through one error helper
23
- - Default every variable expansion rather than relying on it being set
24
- - Guard a command that returns non-zero on a valid empty result
25
- - Run the validation list before responding
26
-
27
- ## Must not
28
-
29
- - Emit timeline frames, icons, color, or an interactive prompt
30
- - Put a log or progress line on stdout
31
- - Comment what the code already states
32
- - Rewrite an existing long shell file on contact, which is a rewrite decision rather than an edit
33
-
34
- ## Guards
35
-
36
- - A script that will run past 100 lines stops before any of it is written, and the session writes it in TypeScript on Bun instead.
37
- - A request for prompts, a framed timeline, icons, or color stops with the same route.
38
-
39
- ## Out of scope
40
-
41
- - A tool a person drives through prompts or a terminal UI, which is written in TypeScript on Bun
42
- - A GitHub Actions workflow file, which `ci-workflow` owns
43
- - Running, installing, or scheduling what it generates
@@ -1,53 +0,0 @@
1
- ---
2
- name: bash-cli-script
3
- description: Generates a small non-interactive Bash wrapper for automation, CI, and agent-run tasks, with strict mode, logs on stderr, a clean stdout, and explicit exit codes. Stops at 100 lines and routes the work to TypeScript on Bun. Use when asked for "a shell script", "a wrapper script", an automation or CI script, a cron job, or a pipeline helper. Do NOT use for a tool that prompts a person or draws a terminal UI, or for a script that will run past 100 lines. Both are written in TypeScript on Bun.
4
- metadata:
5
- family: generate
6
- ---
7
-
8
- # Bash CLI script
9
-
10
- Generate small non-interactive Bash wrappers for automation, CI, and agent-run workflows. Shell is for small utilities and simple wrappers, and anything larger is written in TypeScript on Bun, which runs a script about as fast as bash starts one.
11
-
12
- Load `${CLAUDE_SKILL_DIR}/references/template.md` for the base skeleton. Copy it and keep only what the task needs.
13
-
14
- ## Guards
15
-
16
- - Estimate the script's length before writing any of it. When it will run past 100 lines, stop and write it in TypeScript on Bun instead, saying the threshold is the one the [Google Shell Style Guide](https://google.github.io/styleguide/shellguide.html) sets: "If you are writing a script that is more than 100 lines long ... you should rewrite it in a more structured language now". Stopping after generating wastes the draft and leaves a long script to argue against.
17
- - A request for interactive prompts, a framed timeline, icons, or color stops the same way. Say that a tool a person drives is past what a wrapper is for, and offer the TypeScript route rather than generating a script with prompts.
18
- - Editing an existing shell file already over 100 lines is not a new script. Edit it in place without growing it, and flag it for a rewrite rather than rewriting it on contact.
19
-
20
- ## Script setup
21
-
22
- - Start with `#!/usr/bin/env bash` and `set -euo pipefail`.
23
- - Do not rely on unset variables. Use `${VAR:-default}`.
24
-
25
- ## Output contract
26
-
27
- - Write data to stdout. Write logs, progress, and errors to stderr.
28
- - Keep stdout clean so the script composes in a pipe.
29
- - Do not emit timeline frames, icons, or color.
30
-
31
- ## Error handling
32
-
33
- - Define `die()` that prints an error to stderr and exits non-zero.
34
- - Include actionable context in error messages.
35
- - Guard commands that return non-zero on a valid empty result with `|| true`.
36
- - Set explicit exit codes. Reserve 0 for success.
37
- - Read a called command's machine-readable record where it emits one. An exit status separates success from failure and never names which failure, so a script routing on the reason reads the record and keeps the exit for the pass-fail decision alone.
38
-
39
- ## Code style
40
-
41
- - Quote variables in expansions and test brackets.
42
- - Comment only a fact the reader cannot recover from the code, and follow the code-comment rule in `.claude/rules/` when the project installs it.
43
- - Use 2-space indentation.
44
-
45
- ## Validation
46
-
47
- Before responding, verify:
48
-
49
- - The script is 100 lines or fewer.
50
- - File starts with `#!/usr/bin/env bash` and `set -euo pipefail`.
51
- - Data goes to stdout, logs and errors go to stderr.
52
- - No timeline frames, icons, or interactive prompts.
53
- - Errors exit non-zero with context through `die()`.
@@ -1,19 +0,0 @@
1
- # Wrapper template
2
-
3
- Copy this skeleton for a small non-interactive wrapper. Keep only the parts the task needs, and stop at 100 lines.
4
-
5
- ```bash
6
- #!/usr/bin/env bash
7
- set -euo pipefail
8
-
9
- log() { printf '%s\n' "$*" >&2; }
10
-
11
- die() {
12
- printf 'error: %s\n' "$*" >&2
13
- exit 1
14
- }
15
-
16
- [ $# -ge 1 ] || die "usage: script.sh <arg>"
17
-
18
- log "starting"
19
- ```
@@ -1,62 +0,0 @@
1
- ---
2
- name: canon-operator
3
- description: Why the toolkit has one front door, what orienting on live catalogs prevents, and where it hands off
4
- ---
5
-
6
- # Canon operator requirement
7
-
8
- ## Gap
9
-
10
- Without this skill, using the toolkit means knowing which skill to pick, and the user who most needs it is the one who cannot. A plain-language intent has no obvious owner among a dozen setup and sync skills, so the session guesses a command instead of resolving one, and a wrong guess installs into a project rather than reporting a mismatch.
11
-
12
- Two failures come from acting on memory. A session that names a stack or rule from what it remembers rather than from the live catalog runs against an entry that has been renamed or removed. And a session that edits a managed file by hand produces a change the next sync overwrites, which reads as the toolkit undoing work rather than as the edit having been made in the wrong place.
13
-
14
- The third failure is duplication. A front door that answers everything itself reimplements first-time detection and seed diffing inline, badly, beside the skills that already do both. The value of a router is that it stops at the handoff.
15
-
16
- A fourth failure sits between the router and what it runs. This skill executes the install and sync commands whose effect on an existing file is invisible from the command line, and the reference stating that effect per surface is named in the boundary below, which Claude Code never loads. The router therefore overwrites a customized golden config with the answer sitting one skill away and unread.
17
-
18
- The fifth failure is writing without re-checking. A domain sync brought a stricter standard into a target and left ten of its eleven context entries non-compliant in the same moment, and the run reported success because reporting the command was where its work ended. A person found the breakage afterwards by running an audit by hand. The audit that would have caught it is built and reachable from nothing the router offers, so one session held both the defect and its detector and connected neither to the other.
19
-
20
- The last failure is a section no route reaches. `## Route` maps an intent or a diagnostic finding to one lifecycle phase, so audit offers sitting below that table with no row naming them are unreachable by a correct reading. Two runs asked what the toolkit could measure and both took the scaffold handoff, the row the table declares. A route in settles half of it, since a project carrying a context folder and no installed domain fires the scaffold row and two audit conditions at once, and a body ranking neither leaves the choice to whichever the session read last.
21
-
22
- ## Must
23
-
24
- - Orient on the toolkit's own docs and the live catalogs before acting
25
- - Map the stated intent to one lifecycle phase, then either run the simplest command that satisfies it or hand off
26
- - Resolve every stack, rule, and standard name from a catalog at runtime
27
- - Run the CLI non-interactively and report the command run, what changed, and the full path of anything written
28
- - Read the overwrite contract from the body before any install or sync, and name each surface it lists as overwritten before running one
29
- - Read the reverse walk beside the forward sections, so a folder the toolkit stopped shipping reaches the user
30
- - Read `unmovedSurfaces` from the report itself, since the drift status ignores it by design, and name `canon migrate surface-roots` without running either form
31
- - Name an unmigrated domain's root and install path for the user to move themselves, since no skill covers the move
32
- - Route a measurement intent to the audit offers from the route table itself, rather than leaving the section reachable only by reading past the table
33
- - Rank a lifecycle row against the audit offers where the route table itself states it, so a session acting on the lifecycle row reads the ranking without opening the section being ranked
34
- - Offer every audit whose surface the target carries, and offer none whose surface it lacks
35
- - Hand off an audit that is a skill rather than a command, since the execute contract governs a CLI run and says nothing about a skill's own guards
36
- - Re-check the target after any operation that wrote, and report what those writes changed against the state read before acting
37
-
38
- ## Must not
39
-
40
- - Edit a managed file by hand instead of running the CLI that owns it
41
- - Reimplement a flow another skill owns
42
- - Hardcode a catalog name
43
- - Move, delete, or name a command against a folder in `unclaimed`. The toolkit stopped claiming the path and only the user knows whether the project owns what sits there
44
- - Run an audit the user did not pick, which turns a front door into a full sweep
45
- - Refuse to finish an operation over an audit finding, since every audit reports judgments beside facts and a router that stops on one is a router a target works around
46
- - Auto-trigger. It is a door the user opens, and a router that fires on its own routes requests nobody made.
47
-
48
- ## Guards
49
-
50
- - An intent matching a deep flow hands off rather than running a shallow version of it, since a partial scaffold is harder to recover from than none
51
- - An ignore-only fix on an unmeasured tooling report stops, names which cause applies, and names the command answering that cause. Unmeasured has several causes and they do not share a remedy, so one suggested command is wrong for at least one of them. No cause asks the user to supply a stack name, and none reads the zero counts under an unmeasured report as a clean target.
52
- - A re-check with no earlier report to compare against says the write ran without a baseline, rather than describing the target from scratch
53
- - A report missing a field this skill reads names the CLI version as the cause and reports that section as unread. Neither an absent key nor a hand-rolled substitute for it may be reported as a finding, since the first reads as a clean target and the second reaches a verdict only the field's attribution can make
54
-
55
- ## Out of scope
56
-
57
- - First-time scaffold of a fresh project: `target-setup`
58
- - Seed and preamble drift in installed files: `seed-sync`
59
- - Governance rule install and index bootstrap: `target-setup`, on its `gov` and `indexes` phases
60
- - What a given sync overwrites once it runs: `canon-cli`
61
-
62
- That last contract carries no row for the governance install this skill routes to, so the overwrite `Must` above reads nothing at one of its own destinations. The row belongs to the skill owning the table. This file records the silence rather than answering it, since a rule written here for a silent contract teaches a session that silence means safe.
@@ -1,113 +0,0 @@
1
- ---
2
- name: canon-operator
3
- description: Front door to the toolkit in a target project. Orients on the toolkit's own docs and live `canon` catalogs, then runs or routes any toolkit operation from a plain-language intent. Use when you want one entry point instead of picking a specific setup or sync skill, or when asked to "use the toolkit", "what can the toolkit do", "sync my standards", "install rules", or "help me set up this project". User-invoked only. Defers first-time scaffold to setup and seed drift to seed-sync.
4
- disable-model-invocation: true
5
- metadata:
6
- family: setup
7
- ---
8
-
9
- # Canon operator
10
-
11
- Front door to the toolkit. Orient first, then run the simplest operation that satisfies the intent or hand off to the owning skill. Never bypass `canon` to edit managed files by hand.
12
-
13
- ## Orient
14
-
15
- Run these from the target project root, in parallel, before acting:
16
-
17
- - `canon docs list`: the index of toolkit reference docs
18
- - `canon docs agents`: the CLI command catalog and invocation contract
19
- - `canon docs projects`: the scaffold, add-a-domain, and sync lifecycle
20
-
21
- Load a domain doc with `canon docs <topic>` only when the intent touches that domain. Read the live catalog for any domain you act on with `canon <domain> list --json`. Never hardcode stack, rule, or standards names.
22
-
23
- ## Diagnose
24
-
25
- Run `canon sync --check . --json` before routing. It reports what a target is behind on across every surface, so the intent comes from the project state rather than from the user having to know it already. Skip only when the user named a single operation to run.
26
-
27
- Read eight fields off the report and carry each to `## Route`:
28
-
29
- - `unmigrated`: a domain sitting at the root layout with nothing under `.claude/`. The most urgent finding, because that domain reports no drift of its own while being entirely behind
30
- - `superseded`: a file a newer seed folder replaced. No command moves it, since the content is the project's own, so this routes to `canon:target-check` for the full per-domain reading rather than ending at the report
31
- - `unmovedSurfaces`: a surface held only at its `.claude/` spelling, each entry carrying `rel` and `movesTo`. Every other field reads clean for such a target, and the report's drift status ignores it by design, so read the array itself rather than an exit status
32
- - `seeds`: entries are `matching`, `stale`, `drifted`, or `missing`. Anything but `matching` needs the seed handoff
33
- - `domains[].entries`: per-file `stale`, `customized`, `stranded`, and `orphaned` as before, plus `retired` for a rule the toolkit no longer ships, which the next sync deletes
34
- - `reverse`: what the target holds that no live catalog claims. `unclaimed` lists folders at roots the toolkit stopped shipping, each with an `attribution` of `dropped`, `unattributed`, or `project`. Act on the first two and leave `project` alone, which history proved the project owns
35
- - `historyUnavailable` on a domain, on `seeds`, or on `reverse`: nothing could be dated, so treat every difference as unverified and say so rather than reporting a file as untouched. It is set on `reverse` when the toolkit itself ships without history, which is the registry-install case, so the walk found nothing rather than finding a clean target
36
- - `tooling`: read `measured` first. Every count under it is zero when it is false, which is an absence of measurement rather than a measured zero. Past that, `chain` names the stacks the install resolved, nearest first, and `counts.gitignore` counts the managed ignore entries the target is missing.
37
-
38
- State what the report found in one line per finding before acting on any of it.
39
-
40
- An `unmovedSurfaces` key the report does not carry at all is likewise a CLI predating the field rather than a target with nothing to move. Say the section was unread and name the installed CLI version as the cause.
41
-
42
- A `reverse` key the report does not carry at all is a CLI predating the field rather than a target with nothing unclaimed. Say the walk did not run and name the CLI version as the cause. Reading the absent key as an empty answer reports a clean target to a project nobody has looked at, and answering it from a filesystem walk of your own is worse, since that reaches a verdict the attribution the field carries is the only thing entitled to make.
43
-
44
- ## Route
45
-
46
- Map the stated intent, or what `## Diagnose` found, to one lifecycle phase, then act.
47
-
48
- The two can name different rows, and a reply answers both rather than picking one. Run or hand off what the finding names, then answer the intent in the same reply. A measurement intent therefore reaches the audit offers below even on a target whose diagnostic found scaffold work, which is the case a session leaving from the scaffold row would otherwise never read.
49
-
50
- - A domain in `unmigrated`: name it, the root path, and the install path. No command moves it, so the user runs the relocation themselves
51
- - Anything in `superseded`: name which files and what replaced them, then hand off to `canon:target-check`, which reports and never moves or deletes the file
52
- - Anything in `unmovedSurfaces`: name `canon migrate surface-roots`, which only reports its plan until `--write` is passed, with each entry's `rel` and `movesTo`, and run neither form, since the move rewrites tracked paths
53
- - A folder in `unclaimed`: name it and the attribution it carries. No command moves it and the content may be the project's own, so the decision is the user's
54
-
55
- - First-time scaffold of a fresh project: hand off to `target-setup`
56
- - Governance rules for the project stack: hand off to `target-setup`, which installs them alone on its `gov` phase
57
- - Bootstrap the `index.md` system: hand off to `target-setup`, which bootstraps it on its `indexes` phase
58
- - Seed or standards drift in `CLAUDE.md` or `.claude/` preambles: hand off to `seed-sync`
59
- - Install one rule: run the domain `install` command
60
- - Sync one domain or every installed domain: run `canon <domain> sync` or `canon sync`
61
- - Fix only the ignore entries of the installed stack: run `canon tooling inject --gitignore <stack>`
62
- - Measure a surface without changing it: offer the audits under `### Audits`
63
- - Browse what is available: run `canon <domain> list`
64
-
65
- ### The ignore-only row
66
-
67
- The ignore-only row runs on a measured tooling report alone, so `measured` decides before `chain` is read at all. A false one splits three ways. Report tooling as unmeasured in each, name the cause, and run nothing, since the zero counts underneath are unmeasured rather than clean:
68
-
69
- - An empty `chain` at a workspace root, which carries `pnpm-workspace.yaml` or a `workspaces` key in `package.json`: no chain is recorded there by design, since one would guess at what the packages hold. Name `canon tooling sync <stack> <path>` against a package.
70
- - An empty `chain` anywhere else: no tooling install is recorded, so name `canon tooling sync` as the command that records one rather than asking the user for a stack.
71
- - A `chain` carrying names: this toolkit no longer ships those stacks. Name them, since injecting would write against a retired name.
72
-
73
- On a measured report, take `<stack>` from the first name in `tooling.chain`, which records the stack nearest the target. Inject re-resolves that leaf's own chain, so a target whose recorded chain is shorter receives the entries from the layer its install skipped. Say so before running it.
74
-
75
- ### Audits
76
-
77
- Five audits measure a surface without changing it. Offer the ones whose surface the target carries, list them together, and let the user pick. Run none of them unasked, and never treat a finding as a reason to abandon the operation the user asked for, since each reports judgments beside facts.
78
-
79
- A lifecycle row and these offers fire together on a project carrying a context folder and no installed domain, which is the ranking the preamble states. Scaffold work on a target with nothing installed is real work, so an audit offered instead of it answers a question nobody asked, while an audit dropped in favor of it loses the one the user did.
80
-
81
- - `canon/context/` present: offer `canon context audit`
82
- - A record folder present under `.claude/`, one of `plans`, `groundwork`, `intake`, or `memory`: offer `canon records validate <kind>` for each one found
83
- - Markdown that git lists: offer `canon markdown audit`
84
- - TypeScript or shell source present: offer `canon comments scan`
85
- - A `package.json` script that serves an interface, one of `dev`, `preview`, `serve`, or `start`: offer `ux-measure`
86
-
87
- An audit offered against a surface the target lacks reports an empty run as a finding, which is the same defect as never offering it at all. Check the surface before naming the command.
88
-
89
- The markdown row is the one every target satisfies, since a project with no markdown is not one this reaches. Its condition is stated so the five rows read alike, and the row needs no gate beyond it.
90
-
91
- The last row is a skill handoff rather than a command, so `## Execute` does not govern it. Hand it off and stop, the way a lifecycle row hands off. Its condition reads a serving command rather than a source folder, since that skill measures what a browser receives and never opens the tree behind it. It carries a second condition this skill cannot read, which is a browser harness the project already installed, and the skill itself reports what it needs when it finds none. Testing for that here would put the detection in two places and let this one answer stale.
92
-
93
- ## Execute
94
-
95
- For operations this skill runs directly:
96
-
97
- - Read the catalog first with `canon <domain> list --json`, then match against project context
98
- - Read the `canon-cli` skill before any install or sync, and warn the user by name about each surface it lists as overwritten. A command name says nothing about what it does to a file already there, and this skill is the one running it.
99
- - Run the CLI with `CANON_NON_INTERACTIVE=1` so it skips prompts. The tool permission dialog is the confirmation gate.
100
- - Report the command run and what changed. Emit the full relative path for any file written.
101
- - Re-run `canon sync --check . --json` after any operation that wrote, and compare it against the report `## Diagnose` read before acting
102
- - Report the fields that moved and name the write that moved each one. Do not restate the second report, since the value sits in the difference alone.
103
- - State a field that moved the wrong way and leave it for the user to decide on. The re-check reports and never repairs.
104
-
105
- A write can leave a target worse in a field the write never named, which stays silent while the operation itself succeeds. The re-check is what makes that visible, so it runs before the operation is reported as done.
106
-
107
- The comparison needs the earlier report. When `## Diagnose` was skipped because the user named a single operation, say the write ran with no baseline rather than describing the target from scratch, which would attribute differences another session made to this run.
108
-
109
- ## Boundaries
110
-
111
- - Run `canon`. Never reimplement its install or sync logic, and never edit managed files like rules, configs, or seeds by hand.
112
- - Hand off the deep flows. Do not duplicate `target-setup` detection or `seed-sync` part-diffing inline.
113
- - Resolve names from catalogs at runtime. A hardcoded name is a bug.
@@ -1,59 +0,0 @@
1
- ---
2
- name: canon-rollout
3
- description: Why one skill carries both roles of an outbound wave, and where its boundary sits against the seven skills that operate inside a target
4
- ---
5
-
6
- # Canon rollout requirement
7
-
8
- ## Gap
9
-
10
- Without this skill, a toolkit change reaches its consuming projects by hand. One measured pass across four targets took four hand-written `cd <path> && claude --bg` invocations, each carrying a brief composed by hand from that project's review. Nothing enumerated the targets, nothing derived the brief, and nothing applied a convention across the set.
11
-
12
- The conventions were already settled and reached none of the four. The branch and title shape was answered and reconfirmed, and the four pull requests carried four titles across two scopes, neither of them the settled one, with three naming the toolkit in the half of the shape that withholds it. A convention nothing applies holds only where somebody remembers it.
13
-
14
- The return leg dead-ends outside this repository. A review that posts a finding on a target's pull request has to reach the session holding that branch, and every dispatch guessed instead. All four sessions that opened those pull requests were still alive holding their worktrees hours later, two fresh addressers were sent over them, one refused on the worktree lock, and one cut a second worktree on the same branch, which would have put two sessions pushing to one ref.
15
-
16
- A wave ends without telling the operator what to do. Reading where four targets stood took a hand-written shell loop over four repositories, re-run three times as reviews landed, and every status line it produced named a repository and a number and no link. Merging is the one act only the operator performs, and they reached each result by navigating to it by hand.
17
-
18
- A worker's reply reads as done when it is not. One pull request's fix for two minor findings closed both and introduced four more, all in prose the fix added, including a claim about a workflow that runs on a trigger it does not declare. A loop that closes a target on the worker's word merges that.
19
-
20
- ## Must
21
-
22
- - Enumerate the targets from the record the install writes, with the sweep as the fallback and its stated bound read before any count is trusted, since a hand census of this population was wrong in both directions at once
23
- - Write the branch and the title from a fixed shape rather than leaving either to the dispatched session, since the settled convention reached none of four hand-driven repairs
24
- - Carry one line in each target's body naming the toolkit as the source and where to change the content upstream, since a reader in that repository has no other route to the fact that a local edit is lost at the next wave
25
- - Name no toolkit version in any target's body, since the install stamp in that target already records `syncedAt` and a sha256 per synced file and a version string is the copy that goes stale
26
- - Dispatch one worker per target, with the branch checked as unclaimed in that target before the launch
27
- - Branch from the clone that is current rather than from whichever the record names first, since a working copy answers what that machine last pulled rather than what the target holds
28
- - Resolve who holds a branch before dispatching an addresser, and dispatch a fresh one only where the resolver reports the owning session gone
29
- - Address every finding whatever its severity, and close a target only when a narrow re-review posts `## Review closed`
30
- - Name a pull request URL on every line that reports a target, at dispatch and at hand-back both
31
- - Close a wave by naming every target with its URL, review heading, CI state, and what is owed, the targets needing nothing included
32
-
33
- ## Must not
34
-
35
- - Merge anything, in either role, at any size. The operator holds that gate over every role rather than as a setting on a wave.
36
- - Reimplement what `canon targets list`, `canon targets pulls`, or `canon sessions list --repository` already answers. Each is a shipped verb this body reads under `CANON_NON_INTERACTIVE=1`.
37
- - Restate the in-target diagnosis and routing that `canon-operator` owns, or the review, address, and worktree procedures the three skills named below own
38
- - Read or write this repository's task board. The board is `role-orchestrator`'s subject and a wave is not a row on it.
39
- - Bound the review and address loop with a count. The bound was declined with its failure mode stated, and what guards the loop is the orchestrator reviewing every round itself.
40
- - Edit a managed file in a target by hand rather than through the `canon` verb that owns it
41
- - Be a skill nothing invokes but its author typing the name. Nothing else routes to it, since it carries `disable-model-invocation: true` and no sibling body names it, so a wave that only ever runs when somebody types the name is the signal that the loop never replaced the hand-driven pass it was built against.
42
-
43
- ## Guards
44
-
45
- - `gh` absent: stop, since no target's pull request can be read or opened
46
- - The target index reads as unknown with no sweep behind it: stop and name the reason, rather than reporting a population of zero
47
- - The claim check refuses or comes back with either readability flag false: treat the target as unverified rather than clear and hand it to the operator
48
- - Every clone of a target is behind its remote: refuse that target rather than branching from a stale base
49
- - More than one session holds a target's branch: report the ambiguity and stop, rather than sending findings to whichever row came first
50
-
51
- ## Out of scope
52
-
53
- - This repository's own board, queue, and worker dispatch, which `role-orchestrator` holds
54
- - The role a session building one branch under one plan in this repository takes, which `role-worker` holds. A rollout worker does not take it, since that body resolves session scratch against a main worktree root a target does not carry.
55
- - Entering the worktree, which `session-worktree` owns, including the branch collision tests it runs before entry
56
- - Diagnosing what a target is behind on and routing each finding to its command, which `canon-operator` owns
57
- - Posting a review to a pull request and moving its heading, which `review-pr` owns
58
- - Answering a posted review inside the target, which `review-address` owns
59
- - The commit and the pull request mechanics, which the `git-*` family owns