@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
@@ -14,10 +14,10 @@ const MARKDOWN = '.md'
14
14
  */
15
15
  export const PLAN_BRANCH_TYPE = 'feat'
16
16
 
17
- /** The description cap in `standards/branch.md`, in kebab-separated words. */
17
+ /** The description cap in `claude/skills/git-branch/references/branch.md`, in kebab-separated words. */
18
18
  export const DESCRIPTION_WORD_CAP = 4
19
19
 
20
- /** The branch length cap in `standards/branch.md`, in characters. */
20
+ /** The branch length cap in `claude/skills/git-branch/references/branch.md`, in characters. */
21
21
  export const BRANCH_LENGTH_CAP = 50
22
22
 
23
23
  export interface PlanBranch {
@@ -48,7 +48,7 @@ function slugOf(path: string): string {
48
48
  * of them name. It is the one derivation, so the collision check and the
49
49
  * worktree entry it gates cannot hold two answers for one plan.
50
50
  *
51
- * Conformance covers both caps `standards/branch.md` states, being the word
51
+ * Conformance covers both caps `claude/skills/git-branch/references/branch.md` states, being the word
52
52
  * count of the description and the length of the whole branch. A slug is a
53
53
  * plan's own filename rather than a name anyone chose for a branch, so a plan
54
54
  * can name a branch this refuses to grade as conforming, and reporting that is
@@ -185,7 +185,7 @@ async function reserveLabel(root: string, label: string): Promise<boolean> {
185
185
  * the task file after this returns, so a reservation with no file behind it is
186
186
  * the ordinary state for a few seconds, and a scan blind to it would offer the
187
187
  * same label to every retry. Reservations are never expired: a claim that died
188
- * leaves a gap, and `standards/versioning.md` permits gaps.
188
+ * leaves a gap, and `claude/skills/git-commit/references/versioning.md` permits gaps.
189
189
  */
190
190
  export async function claimLabel(
191
191
  root: string,
@@ -11,7 +11,7 @@ const PLANS = 'plans'
11
11
  const MARKDOWN = '.md'
12
12
  const NONE_IDENTIFIED = 'None identified.'
13
13
 
14
- /** The one group a dispatch reads, per `standards/board.md`. */
14
+ /** The one group a dispatch reads, per `claude/skills/task-board/references/board.md`. */
15
15
  const DISPATCH_GROUP = 'Run now'
16
16
 
17
17
  export const REACH_REFUSALS = [
@@ -146,7 +146,7 @@ function namesFile(span: string): boolean {
146
146
  * An entry carrying no colon at all is taken whole. The standard requires a
147
147
  * reason rather than the punctuation introducing it, so the alternative is
148
148
  * reading such an entry as declaring nothing, which reports every path it
149
- * names as undeclared. `standards/plan.md` fixes the colon form, so the
149
+ * names as undeclared. `claude/skills/plan-feature/references/plan.md` fixes the colon form, so the
150
150
  * conforming entry never reaches this fallback.
151
151
  *
152
152
  * A rename declares both sides, since both are paths the branch writes and
@@ -420,7 +420,7 @@ async function openTask(
420
420
  * resolve the board root in-process.
421
421
  *
422
422
  * `branches` names the recording branch and every name it carried before a
423
- * rename, since `git-ship` renames a branch after `context-fold` has already
423
+ * rename, since `git-ship` renames a branch after `task-complete` has already
424
424
  * written the marker under the old name. Each comes off the `Pending branch:`
425
425
  * line even when the number was already listed, so a rerun repairs a stale
426
426
  * marker.
@@ -504,7 +504,7 @@ export async function recordPlan(
504
504
  }
505
505
 
506
506
  /**
507
- * Marks the named outcomes `[x]` in place. `context-fold` runs this against a
507
+ * Marks the named outcomes `[x]` in place. `task-complete` runs this against a
508
508
  * board it can read and cannot edit from a linked worktree, and the positions
509
509
  * come from the read it already made.
510
510
  *
@@ -18,7 +18,7 @@ const ORDERING_FILE = 'priority.md'
18
18
  const BACKLOG_FILE = 'backlog.md'
19
19
 
20
20
  /**
21
- * The readiness headings `standards/board.md` fixes. The names are the
21
+ * The readiness headings `claude/skills/task-board/references/board.md` fixes. The names are the
22
22
  * contract rather than a suggestion, so a board grouping under names of its own
23
23
  * reads as carrying no group at all and the run refuses instead of reporting a
24
24
  * clean board it never parsed.
@@ -597,7 +597,7 @@ async function listTaskStems(dir: string): Promise<string[]> {
597
597
 
598
598
  /**
599
599
  * Resolves a pointer against the board and against the project root both, the
600
- * way `context-fold` reads the same line. A fragment is dropped first, since an
600
+ * way `task-complete` reads the same line. A fragment is dropped first, since an
601
601
  * anchor is part of the link and never part of the path.
602
602
  */
603
603
  function resolves(target: string, dir: string, root: string): boolean {
@@ -30,7 +30,7 @@ export interface TeachRefused {
30
30
  readonly detail: readonly string[]
31
31
  }
32
32
 
33
- /** The files and folders `standards/teach.md` fixes for a workspace. */
33
+ /** The files and folders `claude/skills/teach-workspace/references/teach.md` fixes for a workspace. */
34
34
  export const TEACH_MISSION = 'MISSION.md'
35
35
  export const TEACH_RESOURCES = 'RESOURCES.md'
36
36
  export const TEACH_GLOSSARY = 'GLOSSARY.md'
@@ -73,7 +73,7 @@ export function compareVersions(a: string, b: string): number {
73
73
 
74
74
  // `fetch` reads this file, so a write that half-lands would leave a reader on a
75
75
  // truncated cursor. A rename within one folder is atomic.
76
- async function writeAtomic(path: string, body: string): Promise<void> {
76
+ export async function writeAtomic(path: string, body: string): Promise<void> {
77
77
  mkdirSync(dirname(path), { recursive: true })
78
78
  const temp = `${path}.${process.pid}.tmp`
79
79
  writeFileSync(temp, body)
@@ -0,0 +1,128 @@
1
+ import { existsSync, readFileSync } from 'node:fs'
2
+ import { recordDir, SCRATCH } from '@/roots/record'
3
+ import { compareVersions, writeAtomic, type Cursor } from '@/upstream/cursor'
4
+
5
+ const DAY_MS = 86_400_000
6
+ const DUE_AFTER_DAYS = 7
7
+
8
+ // Ported from the groundwork's pre-filter script. It names canon's own surfaces,
9
+ // so an Added line matching it is one a digest would act on.
10
+ const VOCABULARY =
11
+ /plugin|skill|hook|SendMessage|ListAgents|agent view|agents view|worktree|subagent|background|routine|schedule|Monitor|mod\b|mods\b|CLAUDE\.md|rules|memory|permission|auto mode|stream-json|--bg|headless|-p\b|marketplace|session/i
12
+ const ADDED = /^Added/
13
+ const CACHE_MAX_AGE_MS = DAY_MS
14
+
15
+ /** What the gap between the cursor and the installed version holds. */
16
+ export interface Gap {
17
+ readonly releases: number
18
+ readonly lines: readonly string[]
19
+ }
20
+
21
+ export interface DueInput {
22
+ /** The installed Claude Code version, or null when it could not be read. */
23
+ readonly installed: string | null
24
+ readonly cursor: Cursor | null
25
+ /** Null when the feed was not read, so only the age path can decide. */
26
+ readonly gap: Gap | null
27
+ readonly now: Date
28
+ }
29
+
30
+ export type DueReason =
31
+ | 'no-cursor'
32
+ | 'week'
33
+ | 'vocabulary'
34
+ | 'current'
35
+ | 'recent'
36
+ | 'unknown-version'
37
+
38
+ export interface DueResult {
39
+ readonly due: boolean
40
+ readonly reason: DueReason
41
+ /** Releases in the gap, or null when it was not read. */
42
+ readonly releases: number | null
43
+ }
44
+
45
+ export function passesVocabulary(line: string): boolean {
46
+ return ADDED.test(line) && VOCABULARY.test(line)
47
+ }
48
+
49
+ // A cursor date is a calendar day with no time, read at UTC midnight. An
50
+ // unreadable one gives NaN, which fails the age test and leaves the vocabulary
51
+ // path to decide.
52
+ function ageInDays(date: string, now: Date): number {
53
+ return (now.getTime() - Date.parse(`${date}T00:00:00Z`)) / DAY_MS
54
+ }
55
+
56
+ /**
57
+ * Decides whether a digest is due.
58
+ *
59
+ * The age boundary is inclusive: a cursor exactly seven days old is due, since
60
+ * a week has passed. An installed version at or below the cursor is never due,
61
+ * which covers a downgrade as well as a run straight after a digest.
62
+ */
63
+ export function decideDue(input: DueInput): DueResult {
64
+ const { installed, cursor, gap, now } = input
65
+ const releases = gap?.releases ?? null
66
+
67
+ if (cursor === null) return { due: true, reason: 'no-cursor', releases }
68
+ if (installed === null) {
69
+ return { due: false, reason: 'unknown-version', releases }
70
+ }
71
+ if (compareVersions(installed, cursor.version) <= 0) {
72
+ return { due: false, reason: 'current', releases }
73
+ }
74
+ if (ageInDays(cursor.date, now) >= DUE_AFTER_DAYS) {
75
+ return { due: true, reason: 'week', releases }
76
+ }
77
+ if (gap?.lines.some(passesVocabulary)) {
78
+ return { due: true, reason: 'vocabulary', releases }
79
+ }
80
+
81
+ return { due: false, reason: 'recent', releases }
82
+ }
83
+
84
+ /**
85
+ * One reading of the feed, kept so a wave of sessions starting together spends
86
+ * one request rather than one each.
87
+ */
88
+ export interface DueCache {
89
+ readonly checkedAt: string
90
+ readonly installed: string
91
+ readonly cursor: string
92
+ /** Null when the read failed, so a failure is held for the day too. */
93
+ readonly gap: Gap | null
94
+ }
95
+
96
+ // Scratch rather than the upstream record folder, which a records push backs
97
+ // whole. A file rewritten daily would add a commit to the history each time.
98
+ const cachePath = (root: string): string =>
99
+ recordDir(root, SCRATCH, 'upstream-due', 'check.json')
100
+
101
+ /** The stored reading when it is fresh and answers for this pair of versions. */
102
+ export function readDueCache(
103
+ root: string,
104
+ installed: string,
105
+ cursor: string,
106
+ now: Date,
107
+ ): DueCache | null {
108
+ const path = cachePath(root)
109
+ if (!existsSync(path)) return null
110
+
111
+ try {
112
+ const cache = JSON.parse(readFileSync(path, 'utf8')) as DueCache
113
+ const age = now.getTime() - Date.parse(cache.checkedAt)
114
+ const isFresh = age >= 0 && age < CACHE_MAX_AGE_MS
115
+ const isSamePair = cache.installed === installed && cache.cursor === cursor
116
+
117
+ return isFresh && isSamePair ? cache : null
118
+ } catch {
119
+ return null
120
+ }
121
+ }
122
+
123
+ export async function writeDueCache(
124
+ root: string,
125
+ cache: DueCache,
126
+ ): Promise<void> {
127
+ await writeAtomic(cachePath(root), `${JSON.stringify(cache)}\n`)
128
+ }
@@ -113,6 +113,7 @@ export async function walkReleases(
113
113
 
114
114
  export function githubPageFetcher(
115
115
  env: Record<string, string | undefined> = process.env,
116
+ signal?: AbortSignal,
116
117
  ): PageFetcher {
117
118
  const token = env.GH_TOKEN ?? env.GITHUB_TOKEN
118
119
  const headers: Record<string, string> = {
@@ -125,7 +126,7 @@ export function githubPageFetcher(
125
126
  try {
126
127
  const response = await fetch(
127
128
  `${RELEASES_URL}?per_page=${PER_PAGE}&page=${page}`,
128
- { headers },
129
+ { headers, signal },
129
130
  )
130
131
  if (response.status === 403 || response.status === 429) {
131
132
  return {
@@ -7,39 +7,4 @@ subtitle: Reference docs for consistent authoring across the toolkit and target
7
7
 
8
8
  Reference docs for consistent authoring across the toolkit and target projects.
9
9
 
10
- - [Architecture reference](architecture.md): Shape and content rules for canon/ARCHITECTURE.md
11
- - [Board reference](board.md): Readiness groups, row cells, and ordering for priority.md, the unordered backlog.md beside it, and the generated index under .canon/tasks/
12
- - [Branch reference](branch.md): Branch naming format and type conventions
13
- - [Canvas reference](canvas.md): Page folders, frame files, the layout.json shape, token resolution, and what a frame must not assume on a local design canvas
14
- - [Commit reference](commit.md): Commit message format and type conventions
15
- - [Context entry reference](context.md): Shape and content rules for canon/context/<domain>.md entries
16
- - [Design reference](design.md): Shape and content rules for canon/DESIGN.md
17
- - [Docs reference](docs.md): Reader and jurisdiction, frontmatter, page structure, what a page links out to, the diagram permission, and when a category earns a subfolder
18
- - [Figure reference](figures.md): When a figure earns its place, the render-first policy for a graph-shaped subject, freehand SVG as the escape hatch, and its wrapping, color, and accessibility rules
19
- - [Glossary reference](glossary.md): Frontmatter, entry shape, ordering, and the rules deciding which terms a glossary carries
20
- - [Groundwork spikes reference](groundwork-spikes.md): What each spike in a track's 08-spikes.md records, the sample rule, and the three folders that hold what a spike produced
21
- - [Groundwork reference](groundwork.md): Folder layout, ordinal naming, reserved numbering, frontmatter and dating, required file contents, and conventions for a measurement track
22
- - [Intake reference](intake.md): Folder layout, ordinal naming, reserved index number, frontmatter and dating, the item template, the answer contract, and retrieval
23
- - [Memory reference](memory.md): Filename and type prefix, frontmatter, the body shape per type, links between entries, and the lifecycle from write to retire
24
- - [Mermaid reference](mermaid.md): Direction and layout, node and edge budgets, accessibility fields, label punctuation, and render verification for a Mermaid diagram
25
- - [Plan lifecycle reference](plan-lifecycle.md): When a feature plan is written, where it lives, how it changes mid-flight, and its move to the archive
26
- - [Plan reference](plan.md): Filename and slug, the required sections, and the suggested-and-answer contract for a feature plan
27
- - [Pull request reference](pr.md): Pull request title and body conventions
28
- - [Publish reference](publish.md): Scan an author runs against finished text, the cross-reference form each destination takes, and the response to an unreadable source
29
- - [Readme reference](readme.md): Readme voice, structure, and content conventions
30
- - [Ready reference](ready.md): Folder layout, ordinal naming, the overview frontmatter, the thin-plan contract, and the archive lifecycle for a finished-file handoff
31
- - [Requirements reference](requirements.md): Shape and content rules for canon/REQUIREMENTS.md
32
- - [Governance rule reference](rule.md): Rule frontmatter, body shape, and voice for .claude/rules files
33
- - [Session map reference](session.md): Filename and location, the sections a handoff carries, the write and read procedures, and how a role extends it
34
- - [Skill path reference](skill-paths.md): Which root a file a skill body names resolves against, and how a body cites a standard
35
- - [Practice skill reference](skill-practice.md): Closing sections and source ledger for a skill carrying engineering practice
36
- - [Skill requirement reference](skill-requirement.md): Shape and content rules for the REQUIREMENT.md beside a skill
37
- - [Claude skill reference](skill.md): Skill structure and authoring rules for Claude Code
38
- - [Slug reference](slug.md): Transform from a git branch name to a slug, and the three responses to an empty result
39
10
  - [Standard reference](standard.md): Shape and content rules for authoring a standard
40
- - [Task decline reference](tasks-decline.md): Where a task decided against moves, the Declined line it carries, and what happens to its plan and board row
41
- - [Tasks reference](tasks.md): Folder layout, filename convention, file format, origin lines, and archiving for task files under .canon/tasks/
42
- - [Teach reference](teach.md): Workspace layout, ordinal naming, frontmatter, and the mission and learning-record formats for a learning workspace
43
- - [Versioning reference](versioning.md): Phase label vs semver discipline across tasks, PRs, reviews, issues, commits, and tags
44
- - [Wiki reference](wiki.md): Folder split, frontmatter, naming convention, and sourcing for a wiki reference page
45
- - [Wireframe reference](wireframes.md): Shape and content rules for canon/wireframes/<surface>.md files
@@ -1,10 +1,6 @@
1
1
  ---
2
2
  title: Standard reference
3
3
  description: Shape and content rules for authoring a standard
4
- paths:
5
- - 'standards/**/*.md'
6
- rule:
7
- - 'Read it before writing or editing a standard. Do not work the shape from memory.'
8
4
  ---
9
5
 
10
6
  # Standard reference
@@ -68,9 +64,7 @@ A standard failing these questions is non-conforming even when it satisfies ever
68
64
 
69
65
  - Start the file with a frontmatter block carrying at least `title` and `description`. A consuming surface may require more.
70
66
  - `title`: names the doc type in sentence case, suffixed `reference` (`Commit reference`, `Branch reference`)
71
- - `description`: one line naming what the standard covers. It becomes the index link label on install, and the generated rule's description and pointer bullet.
72
- - `paths` (optional): the globs where the standard applies, one per entry, copied verbatim into the rule `canon gov regen` generates for it. Omit it when no path should route to the standard, and no rule is generated.
73
- - `rule` (optional): operative bullets the generated rule carries after its pointer bullet, one per entry, each a full sentence. Quote an entry holding a backtick, a colon, or a leading `-`.
67
+ - `description`: one line naming what the standard covers. It becomes the index link label on install.
74
68
 
75
69
  ## Structure
76
70
 
@@ -29,7 +29,7 @@ Seeds live in `tooling/base/seeds/`. Sync drops each once on first install and n
29
29
  - `.lintstagedrc`: the glob map below.
30
30
  - `.prettierignore`: created empty. Projects add their own entries.
31
31
  - `.github/workflows/verify.yml`: runs on pull requests targeting `main` and on `workflow_dispatch`. A project with more than one language root adds its own jobs here.
32
- - `.github/pull_request_template.md`: `## Summary`, `## Key Changes`, `## Technical Context`, `## Testing`. A project adds the checklist lines its own review needs.
32
+ - `.github/pull_request_template.md`: `## Summary`, `## Key changes`, `## Technical context`, `## Testing`. A project adds the checklist lines its own review needs.
33
33
  - `canon/context/`: extend the `ci` and `development` entries with project-specific commands, workflows, or deploy steps. Canonical rationale stays in this reference.
34
34
 
35
35
  ## Tool pairing
@@ -45,7 +45,7 @@ Seeds live in `tooling/base/seeds/`. Sync drops each once on first install and n
45
45
 
46
46
  - All shell scripts live in `scripts/`. Do not place a `.sh` file outside it.
47
47
  - Dictionaries live in `.cspell/`, hooks in `.husky/`, seeded context docs in `canon/context/`.
48
- - The `canon/context/` location matches the three-tier context model: project-wide invariants in `CLAUDE.md`, `canon/REQUIREMENTS.md`, and `canon/ARCHITECTURE.md`, path-scoped rules in `.claude/rules/`, and on-demand domain narrative in `canon/context/`. Indexes stay opt-in.
48
+ - The `canon/context/` location matches the three-tier context model: project-wide invariants in `CLAUDE.md` and `canon/REQUIREMENTS.md`, path-scoped rules in `.claude/rules/`, and on-demand domain narrative in `canon/context/`. Indexes stay opt-in.
49
49
 
50
50
  ## Hooks
51
51
 
@@ -2,12 +2,12 @@
2
2
 
3
3
  <Action Verb> <Direct Object> to <Result>.
4
4
 
5
- ## Key Changes
5
+ ## Key changes
6
6
 
7
7
  - <Verb> <specific component/file/function> (<reason if non-obvious>)
8
8
  - <Verb> <specific component/file/function>
9
9
 
10
- <!-- ## Technical Context (optional, omit for docs/config/trivial changes) -->
10
+ <!-- ## Technical context (optional, omit for docs/config/trivial changes) -->
11
11
  <!-- - <Why this approach was taken, not what changed> -->
12
12
 
13
13
  ## Testing
@@ -10,11 +10,9 @@ The claude stack installs the `.claude/` workflow directory into a project. Stat
10
10
  CLAUDE.md ← seeded. Project context and rules, auto-loaded by Claude Code each session
11
11
 
12
12
  canon/
13
- ├── REQUIREMENTS.md ← seeded. Project goals, non-goals, MVP scope
14
- ├── ARCHITECTURE.md ← seeded. Technical design decisions and open questions
13
+ ├── REQUIREMENTS.md ← seeded. Project problem, goals, non-goals
15
14
  ├── DESIGN.md ← seeded. Visual intent and the decisions behind it
16
- ├── context/ ← seeded. Per-domain narrative. `index.md` is the discovery anchor.
17
- └── wireframes/ ← seeded. Per-surface regions and states. `index.md` is the discovery anchor; `<surface>.md` files hold the regions list, the states table, and the behavior bullets.
15
+ └── context/ ← seeded. Per-domain narrative. `index.md` is the discovery anchor.
18
16
 
19
17
  .claude/
20
18
  ├── GOV.md ← retired. Removed by `canon gov sync` if present from a prior install
@@ -23,10 +21,9 @@ canon/
23
21
 
24
22
  .canon/
25
23
  ├── tasks/ ← seeded. One file per task plus a generated index.md, local scratch only. `archive/` holds the tasks that shipped.
26
- ├── plans/ ← execution detail for multi-step tasks. `feature-*.md` entries swept by context-fold into `archive/`.
27
- ├── review/ ← one subfolder per producer. `branch/` for review-branch, `feedback/` for canon feedback, `memory/` for memory-review with its own `archive/`, `design/` for canon design render.
28
- ├── tmp/ ← ephemeral scratch space, safe to delete without loss
29
- └── memory/ ← session facts no context entry owns. `index.md` regenerated by a hook.
24
+ ├── plans/ ← execution detail for multi-step tasks. `feature-*.md` entries moved into `archive/` by `canon tasks archive` when the `post-merge` hook archives their task.
25
+ ├── review/ ← one subfolder per producer. `branch/` no longer written, `design/` for canon design render.
26
+ └── tmp/ ← ephemeral scratch space, safe to delete without loss
30
27
  ```
31
28
 
32
29
  One ignore entry covers `.canon/` whole, so nothing under it is named separately and nothing tracked may ever land there. A project scaffolded before the move keeps its records under `.claude/`, and every command reads either root.
@@ -35,7 +32,7 @@ One ignore entry covers `.canon/` whole, so nothing under it is named separately
35
32
 
36
33
  A project installed before the split still holds its records under `.claude/`. `canon migrate records` moves them and repoints every tracked file that cites one, reporting the plan until `--write` is passed.
37
34
 
38
- Run `canon tooling sync claude . --write` first. The verb refuses while the project does not ignore `.canon/`, because every folder it relocates is ignored where it stands and landing one under a tracked root commits the memory pen. Until the move runs, this project's records sit at a root the shipped ignore set no longer names, so a `git add -A` in that window picks them up.
35
+ Run `canon tooling sync claude . --write` first. The verb refuses while the project does not ignore `.canon/`, because every folder it relocates is ignored where it stands and landing one under a tracked root commits the task board and the plans. Until the move runs, this project's records sit at a root the shipped ignore set no longer names, so a `git add -A` in that window picks them up.
39
36
 
40
37
  The verb ships with the change that split the roots and is not in a published release yet, so an installed binary answers `unknown command` until one carries it. Run it out of a canon checkout in the meantime, as `bun src/cli.ts migrate records --root <project> --write`, and read the `ok` field out of `--json` rather than the exit code, which a shell wrapper around `canon` can flatten.
41
38
 
@@ -49,16 +46,6 @@ Convert by hand, once per project:
49
46
  2. Run `canon indexes regen --no-stage --root . .canon/tasks/<any-task>.md` to build the catalog.
50
47
  3. Delete `.claude/TASKS.md`, and swap its `.gitignore` entry for `.canon/tasks/`.
51
48
 
52
- ## Upgrading a hand-appended memory index
53
-
54
- A project installed before the memory folder gained a generated index still holds `.canon/memory/MEMORY.md`, and its entries still carry `name` and `type` frontmatter. Nothing migrates it. `memory-capture` stops appending rows once the new seed lands, so the old file freezes at whatever it held while the folder keeps growing past it.
55
-
56
- Convert by hand, once per project:
57
-
58
- 1. Rewrite each entry's `name` key to `title` and its `type` key to a sentence-case `category`, quoting any `description` that opens with a backtick or a colon so the frontmatter parses.
59
- 2. Replace `MEMORY.md` with an `index.md` carrying `title` and `subtitle` frontmatter and nothing else.
60
- 3. Run `canon indexes regen --no-stage --root . .canon/memory/index.md` to build the catalog, and compare its entry count against the file count before deleting anything.
61
-
62
49
  ## Gitignore
63
50
 
64
51
  - `# Claude`: `.canon/`, `.claude/worktrees/`, `.claude/.tmp/` <!-- canon-keep-record-root -->
@@ -76,8 +63,7 @@ The first entry covers the whole record root, so a record folder added later nee
76
63
  ## CLAUDE.md
77
64
 
78
65
  - Ships as a seed with placeholder project name, description, and key paths. Fill these in after init.
79
- - Section layout: `Context`, `Indexes`, `Markdown`, `Key paths`, `Spelling`, `Tasks`, `Memory`. Each section groups rules that share a surface so skills can detect, extend, or skip by heading.
80
- - The memory rules favor signal over volume. Saving only after a second occurrence or an explicit user correction keeps entries focused on patterns worth preventing, not first-occurrence slips. The 3-line cap stops the built-in auto-memory from drifting into narrative writeups that bury the rule underneath the recovery story.
66
+ - Section layout: `Context`, `Commands`, `Key paths`. Each section groups rules that share a surface so skills can detect, extend, or skip by heading.
81
67
  - The `Context` section points at `.claude/` state docs one line. `plan-feature` does the parallel read when invoked. The seed intentionally does not re-list every file.
82
68
 
83
69
  ## Seed docs
@@ -24,8 +24,9 @@ IFS= read -r -d '' -t 2 input
24
24
  # its edit path prints a URL as well and is not an opening.
25
25
  command=$(printf '%s' "$input" | jq -r '.tool_input.command // empty')
26
26
  stdout=$(printf '%s' "$input" | jq -r '.tool_response.stdout // empty')
27
+ is_hand_opened=false
27
28
  case "$command" in
28
- *"gh pr create"*) ;;
29
+ *"gh pr create"*) is_hand_opened=true ;;
29
30
  *)
30
31
  printf '%s\n' "$stdout" | grep -qx 'opened=true' || exit 0
31
32
  ;;
@@ -57,4 +58,11 @@ session=$(printf '%s' "$input" | jq -r '.session_id // "unknown"')
57
58
  printf -- '- %s session=%s pr=%s\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)" "$session" "$url" >>"$log_dir/log.md"
58
59
 
59
60
  msg="Pull request $url just opened. If this session holds a worker's channel obligation, announce it to the controller now, per role-worker."
61
+ # A pull request opened by hand skipped git-pr, so nothing has labelled it.
62
+ # The verb is named only where the installed canon carries it, since a skill
63
+ # can reach a target ahead of the release that ships the verb.
64
+ if [ "$is_hand_opened" = true ] && canon labels apply --help >/dev/null 2>&1; then
65
+ msg="$msg Run canon labels apply ${url##*/} to label it."
66
+ fi
67
+
60
68
  jq -nc --arg msg "$msg" '{hookSpecificOutput:{hookEventName:"PostToolUse",additionalContext:$msg}}'
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- # Regenerates the index.md of a gitignored record folder, `tasks` or `memory`,
4
- # after a file in it changes.
3
+ # Regenerates the index.md of the gitignored `tasks` record folder after a
4
+ # file in it changes.
5
5
  #
6
- # These folders are gitignored, so the whole-repo walk in `bun run check` drops
7
- # them and never regenerates their index. Naming the file as a positional
6
+ # That folder is gitignored, so the whole-repo walk in `bun run check` drops
7
+ # it and never regenerates its index. Naming the file as a positional
8
8
  # argument to `canon indexes regen` below bypasses that filter, which makes this
9
- # hook the only trigger that reaches either folder.
9
+ # hook the only trigger that reaches the folder.
10
10
 
11
11
  # Claude Code sends a payload and closes stdin. A bare read with nothing feeding
12
12
  # it blocks forever and holds the session open, so the read is bounded. `read`
@@ -31,11 +31,9 @@ file_path=$(printf '%s' "$input" | jq -r '.tool_input.file_path // empty')
31
31
  # said. The index then goes stale while every save reports success.
32
32
  #
33
33
  # A shell `case` `*` crosses `/`, so each arm also matches a file in a subfolder
34
- # the index does not render: an archived or declined task, a memory receipt, a
35
- # retired memory entry, or the index itself. Those exit here, before the regen
36
- # call. The exclusions are per folder, since a task under `review/` is indexed
37
- # and a memory `declined/` is not special. The arms are ordered tasks first,
38
- # and no path carries both segments today.
34
+ # the index does not render: an archived or declined task, or the index itself.
35
+ # Those exit here, before the regen call. A task under `review/` is
36
+ # indexed, and no other folder is read.
39
37
  #
40
38
  # The walk-up boundary has to come from the path, not from the session. Shared
41
39
  # scratch resolves at the main worktree root, so a session inside a linked
@@ -45,8 +43,6 @@ file_path=$(printf '%s' "$input" | jq -r '.tool_input.file_path // empty')
45
43
  case "$file_path" in
46
44
  */.canon/tasks/index.md | */.canon/tasks/archive/* | */.canon/tasks/declined/*) exit 0 ;;
47
45
  */.claude/tasks/index.md | */.claude/tasks/archive/* | */.claude/tasks/declined/*) exit 0 ;;
48
- */.canon/memory/index.md | */.canon/memory/review/* | */.canon/memory/archive/*) exit 0 ;;
49
- */.claude/memory/index.md | */.claude/memory/review/* | */.claude/memory/archive/*) exit 0 ;;
50
46
  */.canon/tasks/*.md)
51
47
  folder=tasks
52
48
  base=.canon
@@ -55,14 +51,6 @@ case "$file_path" in
55
51
  folder=tasks
56
52
  base=.claude
57
53
  ;;
58
- */.canon/memory/*.md)
59
- folder=memory
60
- base=.canon
61
- ;;
62
- */.claude/memory/*.md)
63
- folder=memory
64
- base=.claude
65
- ;;
66
54
  *) exit 0 ;;
67
55
  esac
68
56
  root="${file_path%/"$base/$folder"/*}"