@erclx/canon 5.37.0 → 5.39.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 (197) hide show
  1. package/README.md +1 -1
  2. package/claude/.claude-plugin/plugin.json +1 -1
  3. package/claude/skills/api-design/SKILL.md +12 -9
  4. package/claude/skills/auto-ship/SKILL.md +43 -23
  5. package/claude/skills/backlog-triage/SKILL.md +62 -53
  6. package/claude/skills/backlog-triage/references/apply.md +69 -0
  7. package/claude/skills/build-in-slices/SKILL.md +8 -4
  8. package/claude/skills/canon-cli/SKILL.md +5 -1
  9. package/claude/skills/canon-feedback/SKILL.md +18 -8
  10. package/claude/skills/canon-feedback-triage/SKILL.md +10 -3
  11. package/claude/skills/canvas-board/SKILL.md +36 -17
  12. package/claude/skills/ci-workflow/SKILL.md +5 -4
  13. package/claude/skills/code-craft/SKILL.md +10 -6
  14. package/claude/skills/codebase-layout/SKILL.md +3 -5
  15. package/claude/skills/context-fold/REQUIREMENT.md +4 -4
  16. package/claude/skills/context-fold/SKILL.md +42 -23
  17. package/claude/skills/context-fold/references/context-refresh.md +4 -3
  18. package/claude/skills/context-fold/references/context.md +79 -64
  19. package/claude/skills/create-rule/SKILL.md +7 -3
  20. package/claude/skills/create-skill/SKILL.md +27 -7
  21. package/claude/skills/create-skill/references/skill-reference.md +41 -17
  22. package/claude/skills/decision-escalate/SKILL.md +8 -5
  23. package/claude/skills/deploy-app/SKILL.md +1 -1
  24. package/claude/skills/deprecation-migration/SKILL.md +12 -4
  25. package/claude/skills/design-taste/SKILL.md +17 -11
  26. package/claude/skills/docs-sync/REQUIREMENT.md +1 -0
  27. package/claude/skills/docs-sync/SKILL.md +17 -6
  28. package/claude/skills/docs-sync/references/docs.md +54 -21
  29. package/claude/skills/docs-sync/references/readme.md +32 -8
  30. package/claude/skills/document-health/SKILL.md +3 -4
  31. package/claude/skills/draft-and-pick/SKILL.md +73 -47
  32. package/claude/skills/draft-doc/SKILL.md +9 -4
  33. package/claude/skills/draft-doc/references/context.md +4 -4
  34. package/claude/skills/draft-doc/references/docs.md +1 -0
  35. package/claude/skills/draft-doc/references/wiki.md +3 -2
  36. package/claude/skills/draft-figure/SKILL.md +9 -7
  37. package/claude/skills/draft-identity/SKILL.md +24 -52
  38. package/claude/skills/draft-identity/references/card-route.md +46 -0
  39. package/claude/skills/draft-ready/SKILL.md +19 -7
  40. package/claude/skills/draft-screencast/SKILL.md +6 -112
  41. package/claude/skills/draft-screencast/references/beats-template.md +119 -0
  42. package/claude/skills/draft-slides/SKILL.md +7 -4
  43. package/claude/skills/git-branch/SKILL.md +3 -3
  44. package/claude/skills/git-commit/SKILL.md +5 -3
  45. package/claude/skills/git-followup/SKILL.md +16 -9
  46. package/claude/skills/git-issue/SKILL.md +6 -5
  47. package/claude/skills/git-issue/references/issue.md +11 -10
  48. package/claude/skills/git-pr/SKILL.md +56 -44
  49. package/claude/skills/git-ship/SKILL.md +43 -34
  50. package/claude/skills/git-ship/references/ci-watch.md +31 -0
  51. package/claude/skills/git-split/SKILL.md +28 -100
  52. package/claude/skills/git-split/references/independent.md +40 -0
  53. package/claude/skills/git-split/references/stacked.md +73 -0
  54. package/claude/skills/git-stage/SKILL.md +9 -7
  55. package/claude/skills/git-worktree/SKILL.md +27 -49
  56. package/claude/skills/git-worktree/references/cleanup.md +55 -0
  57. package/claude/skills/markdown-craft/SKILL.md +2 -2
  58. package/claude/skills/markdown-craft/references/markdown.md +82 -52
  59. package/claude/skills/plan-feature/SKILL.md +52 -46
  60. package/claude/skills/plan-feature/references/batches.md +46 -0
  61. package/claude/skills/plan-groundwork/SKILL.md +60 -74
  62. package/claude/skills/plan-groundwork/references/groundwork.md +53 -24
  63. package/claude/skills/plan-groundwork/references/output.md +48 -0
  64. package/claude/skills/plan-intake/SKILL.md +28 -21
  65. package/claude/skills/plan-intake-answer/SKILL.md +14 -13
  66. package/claude/skills/read-frames/SKILL.md +2 -0
  67. package/claude/skills/record-screencast/SKILL.md +31 -11
  68. package/claude/skills/review-address/SKILL.md +76 -158
  69. package/claude/skills/review-address/references/rebase-only.md +34 -0
  70. package/claude/skills/review-craft/SKILL.md +27 -11
  71. package/claude/skills/review-pr/SKILL.md +91 -40
  72. package/claude/skills/review-pr/references/post.md +1 -1
  73. package/claude/skills/review-ui/SKILL.md +62 -37
  74. package/claude/skills/review-ui/references/hosted-preview.md +30 -0
  75. package/claude/skills/role-orchestrator/SKILL.md +105 -74
  76. package/claude/skills/role-orchestrator/references/orchestrator-filing.md +26 -0
  77. package/claude/skills/role-orchestrator/references/orchestrator-parked.md +1 -1
  78. package/claude/skills/role-planner/SKILL.md +66 -64
  79. package/claude/skills/role-reviewer/SKILL.md +57 -46
  80. package/claude/skills/role-worker/SKILL.md +68 -63
  81. package/claude/skills/search-craft/SKILL.md +7 -5
  82. package/claude/skills/session-compact/SKILL.md +16 -11
  83. package/claude/skills/session-map/SKILL.md +31 -10
  84. package/claude/skills/session-relay/SKILL.md +32 -65
  85. package/claude/skills/session-resume/SKILL.md +18 -13
  86. package/claude/skills/session-worktree/SKILL.md +70 -42
  87. package/claude/skills/systematic-debugging/SKILL.md +6 -1
  88. package/claude/skills/target-check/SKILL.md +13 -6
  89. package/claude/skills/target-setup/SKILL.md +41 -30
  90. package/claude/skills/target-setup/references/verify.md +6 -5
  91. package/claude/skills/task-board/SKILL.md +68 -60
  92. package/claude/skills/task-board/references/create-report.md +36 -0
  93. package/claude/skills/task-board/references/tasks.md +3 -1
  94. package/claude/skills/task-complete/SKILL.md +20 -18
  95. package/claude/skills/teach-workspace/SKILL.md +61 -33
  96. package/claude/skills/test-craft/SKILL.md +2 -1
  97. package/claude/skills/test-first/SKILL.md +15 -9
  98. package/claude/skills/ui-checklist/SKILL.md +18 -16
  99. package/claude/skills/ux-audit/SKILL.md +9 -10
  100. package/claude/skills/ux-measure/SKILL.md +22 -18
  101. package/claude/skills/video-craft/SKILL.md +15 -7
  102. package/claude/skills/write-human/SKILL.md +9 -1
  103. package/claude/skills/youtube-transcripts/SKILL.md +2 -1
  104. package/docs/agents/context-audit-checks.md +19 -1
  105. package/docs/agents/context-audit.md +2 -2
  106. package/docs/agents/driver.md +1 -1
  107. package/docs/agents/hooks.md +21 -1
  108. package/docs/agents/index.md +10 -14
  109. package/docs/agents/indexes.md +25 -29
  110. package/docs/agents/install-and-sync.md +124 -235
  111. package/docs/agents/markdown-audit-density.md +39 -0
  112. package/docs/agents/markdown-audit-weight.md +9 -7
  113. package/docs/agents/markdown-audit.md +18 -14
  114. package/docs/agents/migrate.md +41 -16
  115. package/docs/agents/output-shape.md +60 -45
  116. package/docs/agents/overview.md +36 -12
  117. package/docs/agents/routing.md +1 -1
  118. package/docs/agents/rule-citations.md +1 -1
  119. package/docs/agents/skills-reach.md +1 -1
  120. package/docs/agents/targets.md +25 -77
  121. package/docs/target/migrations.md +1 -1
  122. package/docs/target/projects.md +3 -3
  123. package/docs/target/scenarios.md +1 -1
  124. package/docs/workflow/ai-workflow.md +2 -2
  125. package/docs/workflow/parallel-features.md +2 -2
  126. package/docs/workflow/skill-map.md +1 -1
  127. package/docs/workflow/visual-design-workflow.md +1 -1
  128. package/governance/detect.toml +6 -1
  129. package/package.json +6 -3
  130. package/scripts/core/install-check.sh +1 -1
  131. package/src/commands/claude.ts +1 -2
  132. package/src/commands/context.ts +106 -7
  133. package/src/commands/hooks.ts +63 -0
  134. package/src/commands/markdown.ts +169 -32
  135. package/src/commands/pr.ts +1 -1
  136. package/src/commands/records.ts +0 -1
  137. package/src/context/audit.ts +256 -5
  138. package/src/context/classify/prompts.ts +1 -1
  139. package/src/context/gate.ts +23 -7
  140. package/src/context/shape-gated.ts +28 -0
  141. package/src/design/document.ts +1 -1
  142. package/src/design/tokens.ts +1 -1
  143. package/src/docs/read.ts +15 -21
  144. package/src/gate/measures.ts +15 -190
  145. package/src/gate/stages.ts +21 -23
  146. package/src/hooks/reply-links.ts +110 -0
  147. package/src/markdown/density.ts +258 -0
  148. package/src/markdown/gate.ts +57 -18
  149. package/src/markdown/reference-shape.ts +103 -0
  150. package/src/markdown/scope.ts +174 -0
  151. package/src/markdown/structure.ts +10 -60
  152. package/src/sandbox/equivalence.ts +7 -9
  153. package/src/shipped/references.ts +1 -1
  154. package/src/teach/browser/head.ts +2 -2
  155. package/src/teach/browser/sidebar.ts +3 -3
  156. package/src/teach/browser/theme.ts +2 -2
  157. package/src/tooling/inject.ts +2 -2
  158. package/src/tooling/package.ts +15 -18
  159. package/src/tooling/verify-stack.ts +6 -3
  160. package/tooling/astro/configs/.oxfmtrc.json +8 -0
  161. package/tooling/astro/configs/.prettierrc +13 -0
  162. package/tooling/astro/manifest.toml +13 -0
  163. package/tooling/astro/reference.md +15 -5
  164. package/tooling/base/configs/.oxfmtrc.json +7 -0
  165. package/tooling/base/configs/scripts/verify.ts +1 -1
  166. package/tooling/base/manifest.toml +6 -6
  167. package/tooling/base/reference.md +12 -9
  168. package/tooling/base/seeds/.lintstagedrc +1 -3
  169. package/tooling/base/seeds/canon/context/ci.md +3 -3
  170. package/tooling/base/seeds/canon/context/development.md +2 -2
  171. package/tooling/claude/manifest.toml +5 -1
  172. package/tooling/claude/seeds/.claude/hooks/reply-links.sh +72 -0
  173. package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +22 -1
  174. package/tooling/claude/seeds/.claude/settings.json +4 -0
  175. package/tooling/go/reference.md +2 -2
  176. package/tooling/nextjs/configs/.oxlintrc.json +223 -0
  177. package/tooling/nextjs/manifest.toml +2 -5
  178. package/tooling/nextjs/reference.md +4 -4
  179. package/tooling/php/manifest.toml +6 -1
  180. package/tooling/php/reference.md +2 -2
  181. package/tooling/python/manifest.toml +6 -1
  182. package/tooling/python/reference.md +4 -4
  183. package/tooling/vite-react/manifest.toml +1 -4
  184. package/tooling/vite-react/reference.md +3 -3
  185. package/tooling/web/configs/.oxlintrc.json +213 -0
  186. package/tooling/web/manifest.toml +9 -13
  187. package/tooling/web/reference.md +14 -14
  188. package/docs/agents/commands.md +0 -154
  189. package/docs/agents/docs.md +0 -27
  190. package/docs/agents/drift-surfaces.md +0 -201
  191. package/docs/agents/gov-detect.md +0 -47
  192. package/docs/agents/scripting.md +0 -142
  193. package/src/markdown/growth.ts +0 -43
  194. package/tooling/base/configs/.prettierrc +0 -12
  195. package/tooling/base/seeds/.prettierignore +0 -0
  196. package/tooling/nextjs/configs/eslint.config.js +0 -91
  197. package/tooling/web/configs/eslint.config.js +0 -82
@@ -12,7 +12,14 @@ metadata:
12
12
  - If no feature description is provided, stop: `❌ No feature description. Describe what you want to add.`
13
13
  - Do not implement anything. Output the plan and stop.
14
14
  - When the feature description spans two or more independent concerns, write one plan file per concern. Do not bundle them under a single slug.
15
- - Before Step 3, name the next three questions you would ask about what the ask must achieve, and predict the operator's answer to each from the ask and the project context. An answer you can predict settles its criterion, which Step 3 writes as a `**Verification:**` bullet rather than a question. Only a prediction still open goes under `**Questions:**` with a `- Suggested:` line, so a fully specified ask carries none and Small mode stays reachable. When you can predict none of the three, so no checkable success criterion can be stated, ask before Step 3 through whatever route reaches the operator, including a message to a dispatching session. The test reads the ask's success criteria, never the plan's open questions, which a `- Suggested:` line answers.
15
+
16
+ ### Predict the next three questions
17
+
18
+ Before Step 3, name the next three questions you would ask about what the ask must achieve, and predict the operator's answer to each. The test reads the ask's success criteria, never the plan's open questions.
19
+
20
+ - A predictable answer settles its criterion, which Step 3 writes as a `**Verification:**` bullet rather than a question
21
+ - Only a prediction still open goes under `**Questions:**` with a `- Suggested:` line, so a fully specified ask carries none and Small mode stays reachable
22
+ - When you can predict none of the three, ask before Step 3 through whatever route reaches the operator, including a message to a dispatching session
16
23
 
17
24
  ## Step 1: read the Claude setup
18
25
 
@@ -22,26 +29,29 @@ Read these in parallel from the project root, skipping any that do not exist:
22
29
  - `canon/REQUIREMENTS.md`: feature scope and non-goals
23
30
  - `.canon/tasks/index.md`: current scope and status, then any task file the feature relates to
24
31
 
25
- Also read these when the feature touches code or UI. Skip them for prose, docs, catalog, or config-only changes:
32
+ Also read `canon/DESIGN.md` when the feature touches code or UI, for visual intent and component rules, with values read from the stylesheet its lead names. Skip it for prose, docs, catalog, or config-only changes.
26
33
 
27
- - `canon/DESIGN.md`: visual intent and component rules, with values read from the stylesheet its lead names
28
-
29
- Coding standards live in `.claude/rules/`. Claude Code loads them automatically. Path-scoped rules apply to the files they match.
34
+ Coding standards live in `.claude/rules/`. Claude Code loads them automatically, and path-scoped rules apply to the files they match.
30
35
 
31
36
  ## Step 2: scan relevant source files
32
37
 
33
- Based on the feature description, identify and read source files that are directly relevant. Do not read entire directories speculatively. Where a folder carries an `index.md`, read it first and load only the files it points at.
38
+ Read the source files directly relevant to the feature, never whole directories speculatively. Where a folder carries an `index.md`, read it first and load only the files it points at.
39
+
40
+ Measure against the tree rather than recall, since a count carried from an earlier session or a summary is the most common way a plan ships the wrong scope.
34
41
 
35
- Measure against the tree rather than recall. Grep for each construct the plan will name and count the sites, so the plan carries the count the tree holds today. The tree tells a new path what exists beside it, not where it belongs, so a flat folder is a reading to place against rather than a pattern to copy. Confirm any work the plan sequences behind is still open, so it does not lead with an item that already shipped.
42
+ - Open each file before describing what is in it
43
+ - Grep for each construct the plan will name and count the sites
44
+ - Confirm any work the plan sequences behind is still open
45
+ - Read a flat folder as a reading to place against rather than a pattern to copy, since the tree shows what exists beside a new path, not where it belongs
36
46
 
37
- Open each file before describing what is in it. A count or a claim carried from an earlier session, a summary, or another document is the most common way a plan ships the wrong scope.
47
+ ### Outside sources
38
48
 
39
- When a decision the plan will make rests on an outside practice or a third-party behavior, invoke `canon:search-craft` before searching, fetch each source, and record the passage relied on. Skip this for a plan that rests on nothing outside the project.
49
+ When a decision rests on an outside practice or a third-party behavior, invoke `canon:search-craft` before searching, fetch each source, and record the passage relied on. Skip this for a plan that rests on nothing outside the project.
40
50
 
41
- - Ask the fetch for the verbatim passage, and confirm the wording through `curl` where a decision turns on exact wording, since `WebFetch` returns a model's answer rather than the page.
42
- - Route a Claude Code subject to the `claude-code-guide` agent.
43
- - Mark a source that could not be fetched as unverified rather than citing recall.
44
- - Report it rather than proceeding silently when `canon:search-craft` does not resolve.
51
+ - Confirm exact wording through `curl` where a decision turns on it, since `WebFetch` returns a model's answer rather than the page
52
+ - Route a Claude Code subject to the `claude-code-guide` agent
53
+ - Mark a source that could not be fetched as unverified rather than citing recall
54
+ - Report it rather than proceeding silently when `canon:search-craft` does not resolve
45
55
 
46
56
  ## Step 3: build the plan
47
57
 
@@ -49,37 +59,30 @@ The section list, what each section holds, and the suggested-and-answer contract
49
59
 
50
60
  What this skill adds on top of the standard:
51
61
 
52
- - Reframe a vague ask as success criteria before writing `**Files to touch:**`. Each criterion names something observable and a check that decides it, such as a measure and the threshold it must stay under, drawn from the ask or the project context. "Make it faster" names no criterion, while a stated budget for one path does. Each criterion becomes one `**Verification:**` bullet.
53
- - Confirm a concrete project or use case drives the feature before shaping it, and lift patterns from that project where precedent exists. A feature with no named user is a guess about what one will want.
62
+ - Reframe a vague ask as success criteria before `**Files to touch:**`, each an observable result and its check, which becomes one `**Verification:**` bullet. "Make it faster" names none.
63
+ - Confirm a concrete project or use case drives the feature, and lift patterns from it where precedent exists. A feature with no named user is a guess.
54
64
  - Prefer one layout that serves both a new and a grown project over a dual-mode toggle or a migration shim. Two modes double what every later change has to hold.
55
65
 
56
66
  ### Suggestions and sections
57
67
 
58
- - Apply senior judgment to every `- Suggested:` line. Pick the best option and state it in one line with its reason or main tradeoff. No padding, no alternatives unless they change the pick.
59
- - Suggest a real default when best practice, the codebase, or prior context points to one.
60
- - Load the `canon:codebase-layout` skill before writing the `**Files to touch:**` entries when any of them names a file or folder that does not exist yet, and give each new path its placement reason in its entry. Skip the load when every entry edits an existing file. Report it rather than proceeding silently when the skill does not resolve.
61
- - Write `**Verification:**` as one bullet per outcome naming the test or command that proves it, and `**Review focus:**` as the inputs or states that would break the change. You understood the risk before any diff existed, and these two sections carry it to the executing session and to the reviewer.
68
+ Every `- Suggested:` line takes senior judgment, picking the best option in one line with its reason or main tradeoff, and naming alternatives only when they change the pick.
69
+
70
+ - Suggest a real default when best practice, the codebase, or prior context points to one
71
+ - Load `canon:codebase-layout` before `**Files to touch:**` when an entry names a path that does not exist yet, and give each new path its placement reason. Report it if it does not resolve.
72
+ - Write `**Verification:**` as one bullet per outcome naming the test or command that proves it
73
+ - Write `**Review focus:**` as the inputs or states that would break the change, carrying the risk you understood to the executor and the reviewer
62
74
 
63
75
  ### Sources and size
64
76
 
65
- - Cite the `**Sources:**` entry for every decision Step 2 sourced, each with its quoted passage or the word `unverified`.
66
- - Prefer `None identified.` over low-signal fillers. A small feature should produce a short plan, not a padded one.
77
+ A small feature produces a short plan, not a padded one.
78
+
79
+ - Cite the `**Sources:**` entry for every decision Step 2 sourced, each with its quoted passage or the word `unverified`
80
+ - Prefer `None identified.` over low-signal fillers
67
81
  - When three or more questions remain, keep chat output to the file pointer plus a short summary. Inline chat is fine when two or fewer remain.
68
82
 
69
83
  ## Pull request boundaries
70
84
 
71
- A plan sequencing its work into batches declares where one pull request ends, here rather than at ship time. A dependency chain cannot be split once it is built, so the choice exists only while the batches are still a plan.
72
-
73
- - One batch is one pull request, and one pull request is one plan file, named for its own concern rather than a numeric suffix. `canon tasks plan-branch` derives one branch from one plan filename, so a `**Batch N**` sub-heading inside one file's `**Files to touch:**` shares that one branch across every batch, and the batch that merges first strands every batch behind it with nothing left to open a pull request against. Write a plan opening five batches as five files before the first line of any of them.
74
- - State a dependent batch's dependency on the ones before it in its own `**Constraints:**`, naming the earlier batch's slug and stacking rather than merging into it. A batch that builds after another and shares most of its files with it folds into that batch as contiguous commits on one branch, since each pull request pays a fixed cost a same-file slice cannot earn back, and the rebases between stacked slices land on the same files. Keep a batch apart only where a reviewer or the operator would judge it apart: a contract a later batch is built against, a taste call the operator judges in its own sitting, or a fold that would exceed one review. Write that reason as ``Judged apart from `feature-<parent>`: <reason>`` in the batch's `**Constraints:**`. `canon records validate plans` reports a stacked batch that should have folded, and its thresholds live there.
75
- - Mark each batch dependent or independent by comparing the file sets rather than the descriptions. A batch sharing no file with another is independent and earns its own branch even where both arrived in one request. One run measured at 68 files carried three such batches into a single review because nothing drew the boundary.
76
-
77
- ### Slicing and sequence
78
-
79
- - Slice a batch by one user-visible path end to end rather than by layer, so each batch ships something a person can exercise. The slice decides what a batch contains, and the file-set comparison above still decides whether two batches depend on each other, so two slices sharing a file stay marked dependent. A path too thin to pay a pull request of its own folds forward into the next.
80
- - Sequence the riskiest batch first, so the batch most likely to change the plan is built while every later batch can still move. A sweep is the one exception and stays last even when it is the riskiest, per the next bullet.
81
- - Sequence a sweep last. A batch deliberately rewriting files earlier batches touched is coherent as the final one and forces every batch behind it into one review anywhere else.
82
- - Keep each batch's commits contiguous once the work starts. A later fix to an earlier batch belongs on that batch's own commits, since a batch interrupted by another cannot be lifted onto its own branch afterward.
85
+ A plan sequencing its work into batches declares where each pull request ends, since a dependency chain cannot be split once it is built. Read `${CLAUDE_SKILL_DIR}/references/batches.md` when the plan carries more than one batch, for the one-file-per-batch rule, when a dependent batch folds, and the build order. A single-batch plan skips it.
83
86
 
84
87
  ## Step 4: output
85
88
 
@@ -88,11 +91,11 @@ Decide the mode based on what Step 3 produced:
88
91
  - **Small** when the plan touches 2 files or fewer, has no architectural or cross-cutting choices, and both Risks and Questions come out `None identified.`
89
92
  - **Full** otherwise
90
93
 
91
- A consumer list is a `Risks` entry, which already forces Full. Establishing a resource with more than one consumer, where at least one writes, is a cross-cutting choice wherever that list ends up living, so such a plan stays Full even at two files.
94
+ A consumer list is a `Risks` entry, which already forces Full. A resource with more than one consumer, at least one writing, is a cross-cutting choice, so such a plan stays Full even at two files.
92
95
 
93
96
  ### Small mode
94
97
 
95
- Output the plan to chat. Do not write a plan file. The markers match the standard's, so a plan that later grows into a file keeps the shape it was drafted in.
98
+ Output the plan to chat and write no plan file. The markers match the standard's, so a plan that later grows into a file keeps its shape.
96
99
 
97
100
  ```markdown
98
101
  **Files to touch:**
@@ -104,7 +107,7 @@ Output the plan to chat. Do not write a plan file. The markers match the standar
104
107
  - <outcome>: `<test or command that proves it>`
105
108
  ```
106
109
 
107
- Small mode carries no `**Review focus:**`, since it already requires Risks to come out `None identified.` and a change with no risk leaves the reviewer no breaking input to name.
110
+ Small mode carries no `**Review focus:**`, since its Risks already came out `None identified.` and the reviewer has no breaking input to name.
108
111
 
109
112
  If real questions exist, include a numbered `**Questions:**` section below, each with a `- Suggested:` line and an `- Answer:` slot:
110
113
 
@@ -120,17 +123,20 @@ Omit empty sections. Do not print `None identified.` in chat.
120
123
 
121
124
  ### Full mode
122
125
 
123
- Derive a 2-to-4-word kebab-case slug from the feature description. Write the full plan to `.canon/plans/feature-<slug>.md` at the main worktree root, not the current worktree. Resolve that root the way `session-worktree` does. Create the directory if it does not exist.
126
+ Derive a 2-to-4-word kebab-case slug from the feature description. Write the plan to `.canon/plans/feature-<slug>.md` at the main worktree root, resolved the way `session-worktree` does, creating the directory if needed.
127
+
128
+ The plan is a main-root write, from a linked worktree and from a background session at the main root alike, so it goes out as a heredoc routed the way `session-worktree` states. Copy the shape from the template in `${CLAUDE_SKILL_DIR}/references/plan.md` rather than from this body, so one edit to the standard moves every plan.
124
129
 
125
- The plan is a main-root write, from a linked worktree and from a background session sitting at the main root with none entered alike, so it goes out as a heredoc, routed the way `session-worktree` states.
130
+ ### Checking the written plan
126
131
 
127
- The file follows the template in `${CLAUDE_SKILL_DIR}/references/plan.md`. Copy the shape from there rather than from this body, so one edit to the standard moves every plan.
132
+ Two commands check the file once it lands, and both write nothing.
128
133
 
129
- Run `canon records validate plans` after writing the file when the CLI is on PATH. It reports a section, a filename, or an answer slot that does not hold, and it writes nothing.
134
+ - Run `canon records validate plans` when the CLI is on PATH. It reports a section, a filename, or an answer slot that does not hold.
135
+ - Run `canon markdown audit .canon/plans/feature-<slug>.md`, naming the file, since the gitignored plan reaches no other gate. Rewrite a hit's sentence rather than swapping the token.
130
136
 
131
- Run `canon markdown audit .canon/plans/feature-<slug>.md` beside it, naming the file. `.canon/plans/` is gitignored and the audit's default path set is what git lists, so no other gate ever opens a plan, and six ban hits landed across four plans written without this call. Rewrite the sentence carrying a hit rather than swapping the token for a near-synonym.
137
+ When Step 1 resolved an existing task, run `canon tasks plan-link <task> .canon/plans/feature-<slug>.md` right after the file lands, naming the stem Step 1 read. Skip it when Step 1 found no task, and report a refusal rather than stopping, since `canon tasks validate` still catches an unlinked task through `plan-uncited`.
132
138
 
133
- When Step 1 resolved an existing task for this feature, run `canon tasks plan-link <task> .canon/plans/feature-<slug>.md` right after the file lands, naming the stem Step 1 read. Skip the call when Step 1 found no task, since there is nothing to link yet. Report a refusal rather than stopping on it. The plan file is already written, and `canon tasks validate` still catches an unlinked task through `plan-uncited` if this call cannot run.
139
+ ### Chat output
134
140
 
135
141
  Then output in chat:
136
142
 
@@ -145,7 +151,7 @@ Then output in chat:
145
151
  Next: /session-worktree
146
152
  ```
147
153
 
148
- Show only the path line and the `Next:` line when there are no questions. The `.canon/plans/` directory is gitignored. Do not stage or commit the file.
154
+ Show only the path line and the `Next:` line when there are no questions. The `.canon/plans/` directory is gitignored, so do not stage or commit the file.
149
155
 
150
156
  Do not proceed to implementation until the user explicitly says to continue.
151
157
 
@@ -153,6 +159,6 @@ Do not proceed to implementation until the user explicitly says to continue.
153
159
 
154
160
  After the plan is written, the user may re-ping with follow-up questions or pushback. Keep chat output to a decision-help shape.
155
161
 
156
- - State each pick as one-line pick plus one-line reason. Do not use section headers, context blocks, or multi-section breakdowns in chat. Those belong in the plan file.
157
- - Put numbered decisions to resolve at the bottom of the response, not interleaved with findings.
158
- - When a finding needs more than two lines to explain, update `.canon/plans/feature-<slug>.md` in place with the detail and point the user at the file instead.
162
+ - State each pick as one-line pick plus one-line reason. Section headers, context blocks, and multi-section breakdowns belong in the plan file.
163
+ - Put numbered decisions to resolve at the bottom of the response, not interleaved with findings
164
+ - When a finding needs more than two lines, update `.canon/plans/feature-<slug>.md` in place and point the user at the file
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: Pull request boundaries reference
3
+ description: How a plan sequencing its work into batches declares where each pull request ends, how dependent batches stack or fold, and the order batches build in
4
+ ---
5
+
6
+ # Pull request boundaries reference
7
+
8
+ Applies to a feature plan that sequences its work into more than one batch. A dependency chain cannot be split once it is built, so the boundary is declared while the batches are still a plan rather than at ship time.
9
+
10
+ ## One batch, one file
11
+
12
+ One batch is one pull request, and one pull request is one plan file, named for its own concern rather than a numeric suffix. `canon tasks plan-branch` derives one branch from one plan filename.
13
+
14
+ - A `**Batch N**` sub-heading inside one file's `**Files to touch:**` shares that branch across every batch, so the first merge strands the rest
15
+ - Write a plan opening five batches as five files before the first line of any of them
16
+
17
+ ## Dependent batches
18
+
19
+ State a dependent batch's dependency on the ones before it in its own `**Constraints:**`, naming the earlier batch's slug and stacking rather than merging into it.
20
+
21
+ A batch that builds after another and shares most of its files folds into that batch as contiguous commits on one branch. Each pull request pays a fixed cost a same-file slice cannot earn back, and the rebases between stacked slices land on the same files.
22
+
23
+ ### Judged apart
24
+
25
+ Keep a batch apart only where a reviewer or the operator would judge it apart. Write that reason as ``Judged apart from `feature-<parent>`: <reason>`` in the batch's `**Constraints:**`.
26
+
27
+ - A contract a later batch is built against
28
+ - A taste call the operator judges in its own sitting
29
+ - A fold that would exceed one review
30
+
31
+ `canon records validate plans` reports a stacked batch that should have folded, and its thresholds live there.
32
+
33
+ ### Marking dependence
34
+
35
+ Mark each batch dependent or independent by comparing the file sets rather than the descriptions. A batch sharing no file with another is independent and earns its own branch even where both arrived in one request.
36
+
37
+ One run measured at 68 files carried three such batches into a single review because nothing drew the boundary.
38
+
39
+ ## Slicing and sequence
40
+
41
+ Slice a batch by one user-visible path end to end rather than by layer, so each batch ships something a person can exercise. The file-set comparison still decides dependence, so two slices sharing a file stay marked dependent.
42
+
43
+ - Fold a path too thin to pay a pull request of its own forward into the next
44
+ - Sequence the riskiest batch first, so the batch most likely to change the plan is built while every later batch can still move
45
+ - Sequence a sweep last, even when it is the riskiest. A batch rewriting files earlier batches touched forces every batch behind it into one review anywhere else.
46
+ - Keep each batch's commits contiguous once the work starts, since a batch interrupted by another cannot be lifted onto its own branch afterward
@@ -14,56 +14,81 @@ Read `${CLAUDE_SKILL_DIR}/references/groundwork.md` before writing any file in t
14
14
  ## Guards
15
15
 
16
16
  - If no topic is given, stop: `❌ No topic. Name what needs measuring.`
17
- - Apply the qualifying test in open mode alone, after Step 1 resolves the mode and before the folder is created. Two of these three must hold: the current state is not known, more than one approach is live, and committing wrong costs more than a day of measuring. When one or fewer holds, stop: `❌ Already decided enough to plan. Run /plan-feature instead.`
18
- - Resume and close are exempt from the test above. A track that has already been measured fails it by definition, since its current state is now known and its approaches have narrowed, so applying the test to either mode refuses the folder that same test admitted.
19
- - A refused topic that is a broad dump rather than one question routes to `plan-intake`, not to the planning skill the stop names. Intake dispositions many findings in breadth from what the repository already holds, and one folder holding dozens of unrelated threads is what forcing them past this guard produces.
20
17
  - Do not pause for approval between steps. The write scope below is what makes that safe.
21
18
 
19
+ ### The qualifying test
20
+
21
+ Apply it in open mode alone, after Step 1 resolves the mode and before the folder is created. Two of three must hold, being an unknown current state, more than one live approach, and a wrong commitment costing more than a day of measuring.
22
+
23
+ - When one or fewer holds, stop: `❌ Already decided enough to plan. Run /plan-feature instead.`
24
+ - Resume and close are exempt, since a measured track fails the test by definition and applying it would refuse the folder it admitted
25
+ - A refused topic that is a broad dump rather than one question routes to `plan-intake`, which dispositions many findings in breadth, not to the planning skill the stop names
26
+
22
27
  ## Write scope
23
28
 
24
- - Write only inside `.canon/groundwork/<nn>-<slug>/`. A feature plan, source changes, a standard, a rule, and a reference doc all live outside that folder, so this one rule forbids every one of them.
25
- - One exception, at close only: write one task file recording what the track concluded.
26
- - A second exception, for what a spike reads as bulk input: write a large fixture under `.canon/tmp/runs/groundwork-fixtures/<slug>/`. Keep it out of `.canon/groundwork/` so mode detection never matches a fixture as a track. A fixture a headless run is pointed at goes outside the repository instead, per the rule in `## Running a spike`. An arm script and a checkout a claim rests on are not fixtures, and go inside the track under `scripts/` and `clones/`, per the standard.
29
+ Write only inside `.canon/groundwork/<nn>-<slug>/`. A feature plan, source changes, a standard, a rule, and a reference doc all live outside it, so this one rule forbids every one of them.
30
+
31
+ - One exception, at close only, is one task file recording what the track concluded
32
+ - A second exception is a large fixture a spike reads as bulk input, under `.canon/tmp/runs/groundwork-fixtures/<slug>/` so mode detection never matches it as a track
33
+ - A fixture a headless run is pointed at goes outside the repository instead, per `## Running a spike`
34
+ - An arm script and a checkout a claim rests on are not fixtures, and go inside the track under `scripts/` and `clones/`, per the standard
27
35
 
28
36
  ### Evidence and drafts
29
37
 
30
- - What a spike produces stays inside the track rather than joining the two exceptions above: write evidence a spike file cites under `.canon/groundwork/<nn>-<slug>/evidence/`, which the first rule already permits. Mode detection matches entries at the top level of the tracks directory, so the sibling the fixtures rule guards against cannot be a folder nested inside a track, and the scratch path holds only what can be deleted without loss, which a recording a finding rests on is not.
31
- - A `draft-and-pick` run invoked from inside a live track follows its own branch for this. It writes its renders to `evidence/` here, and drafts its candidates as canvas pages under `.canon/canvas/` that its close deletes.
38
+ What a spike produces stays inside the track, under `.canon/groundwork/<nn>-<slug>/evidence/`, which the first rule already permits. Mode detection matches only top-level entries, so a nested folder cannot be mistaken for a track, and scratch holds only what can be deleted without loss.
39
+
40
+ A `draft-and-pick` run invoked from inside a live track follows its own branch for this. It writes its renders to `evidence/` here, and drafts its candidates as canvas pages under `.canon/canvas/` that its close deletes.
32
41
 
33
42
  ### Reading and backing
34
43
 
35
- - Reading is not restricted. External research is in scope, so read documentation, comparable projects, and papers whenever a live question needs them. Invoke `canon:search-craft` with the skill tool before an outside search, and report it rather than proceeding silently when the skill does not resolve.
44
+ Reading is not restricted, so read documentation, comparable projects, and papers whenever a live question needs them. Invoke `canon:search-craft` with the skill tool before an outside search, and report it rather than proceeding silently when the skill does not resolve.
45
+
36
46
  - Every claim about a source outside the project carries a link to it. A source found and not read is listed as a lead and is never cited.
37
- - Treat the folder as gitignored, and backed only where a records remote is configured: `canon records push` and `canon records pull` protect it against the machine being lost there and refuse with `no-remote` otherwise, and neither protects against a compaction dropping this session's own reasoning before anyone has pushed, so `07-next-session.md` repeats what it needs instead of pointing at its siblings.
47
+ - Treat the folder as gitignored. `canon records push` and `canon records pull` back it up where a records remote is configured, and refuse with `no-remote` otherwise.
48
+ - Neither protects against a compaction dropping unpushed reasoning, so `07-next-session.md` repeats what it needs instead of pointing at its siblings
38
49
 
39
50
  ## Running a spike
40
51
 
41
52
  A track may run an experiment to settle an open question without stopping to ask. What it takes depends on what the experiment does.
42
53
 
43
- - Reading or computing: run it. Unrestricted reading already covers this, and it is what most spikes turn out to be.
44
- - Anything that processes an input: start against a sample and scale up after it works, per the sample rule in `${CLAUDE_SKILL_DIR}/references/groundwork-spikes.md`, which bounds it on size, duration, and spend.
45
- - Writing a fixture this session reads or provisions itself: run it, under the fixtures path above. Provisioning is the usual blocker rather than spend, and it costs nothing.
46
- - Spawning a billed headless session: run up to three, then ask before spawning more. The bound is a run count rather than a budget, because a headless run reports its total cost only after it finishes, so a dollar ceiling is reportable and not enforceable while a run count is checkable before spawning.
54
+ | Experiment | What it takes |
55
+ | ----------------------------------------- | ---------------------------------------------------------------------- |
56
+ | Reading or computing | Run it, since unrestricted reading covers it |
57
+ | Processing an input | Start on a sample and scale up after it works, per the sample rule |
58
+ | Writing a fixture this session provisions | Run it under the fixtures path above, since provisioning costs nothing |
59
+ | Spawning a billed headless session | Run up to three, then ask before spawning more |
60
+
61
+ The sample rule in `${CLAUDE_SKILL_DIR}/references/groundwork-spikes.md` bounds an input run on size, duration, and spend. The headless bound is a run count because a run reports its cost only after it finishes, so a count is checkable before spawning and a dollar ceiling is not.
62
+
63
+ ### Headless fixtures
47
64
 
48
- A fixture a headless run is pointed at goes outside the repository, under `mktemp -d`, and never under `.canon/tmp/`. A session started anywhere beneath the project root loads that project's `CLAUDE.md` and `.claude/rules/` through the ancestor chain, so an in-repo fixture measures the repository instead of the arm. Record the fixture as contaminated and re-run it outside if this is discovered after the fact, because the result reads as evidence either way.
65
+ A fixture a headless run is pointed at goes under `mktemp -d`, never under `.canon/tmp/`. A session started beneath the project root loads its `CLAUDE.md` and `.claude/rules/` through the ancestor chain, so an in-repo fixture measures the repository instead of the arm.
49
66
 
50
- Record method, result, measured cost, and caveats in `08-spikes.md`. Put whatever the run produced that the record cites in `evidence/` beside it, so a reader checking a claim opens the artifact rather than taking the prose for it, and keep the arm scripts in `scripts/`. Reach for a test harness the project already carries before building one, and copy how it isolates its fixture rather than only what it asserts.
67
+ Record a fixture found in-repo after the fact as contaminated and re-run it outside.
68
+
69
+ ### Recording a spike
70
+
71
+ Record method, result, measured cost, and caveats in `08-spikes.md`. Put whatever the record cites in `evidence/` beside it, so a reader opens the artifact rather than taking the prose for it, and keep the arm scripts in `scripts/`.
72
+
73
+ Reach for a test harness the project already carries before building one, and copy how it isolates its fixture rather than only what it asserts.
51
74
 
52
75
  ## Step 1: detect the mode
53
76
 
54
- List `.canon/groundwork/` from the project root and match the topic against the slug half of each `<nn>-<slug>` folder already there before deriving anything. A resume pass rarely phrases the topic the way the folder was named, so a fresh slug derived from the wording would miss a live track and restart it.
77
+ List `.canon/groundwork/` from the project root and match the topic against the slug half of each `<nn>-<slug>` folder before deriving anything. A resume pass rarely phrases the topic the way the folder was named, so a fresh slug would miss a live track and restart it.
55
78
 
56
79
  Never match against `.claude/` itself. That directory holds every other workflow surface, so a topic matched there lands on a folder that was never a track.
57
80
 
58
- With no match, derive a kebab-case slug named for the subject rather than the activity. Prefer `ts-migration` over `migration-research`. That is open mode outright: no folder can carry a slug nothing matched yet, so there is nothing to route on. `<nn>` for it is claimed in Open mode Step 1 rather than here, since the qualifying test below has to run before the folder exists.
81
+ ### No match
82
+
83
+ Derive a kebab-case slug named for the subject rather than the activity, preferring `ts-migration` over `migration-research`. That is open mode outright, since no folder can carry a slug nothing matched. Open mode Step 1 claims `<nn>`, after the qualifying test runs.
59
84
 
60
- A matched folder instead routes on its own `<nn>-<slug>/`:
85
+ ### A matched folder
86
+
87
+ A matched folder routes on its own `<nn>-<slug>/`. Detect the mode from the folder rather than asking which one to run.
61
88
 
62
89
  - Present without `06-decision.md`: resume
63
90
  - Present and the user judges it ready: close
64
91
 
65
- Detect the mode from the folder. Do not ask which one to run.
66
-
67
92
  ## Step 2: orient
68
93
 
69
94
  Read these in parallel from the project root, skipping any that do not exist:
@@ -72,22 +97,23 @@ Read these in parallel from the project root, skipping any that do not exist:
72
97
  - `canon/REQUIREMENTS.md`: scope and non-goals
73
98
  - `.canon/tasks/index.md`: what is already tracked, and what a prior track concluded. Open a task file only when its entry looks related.
74
99
 
75
- Then read only what a live question needs. Do not read entire directories speculatively. Where a folder carries an `index.md`, read it first and load only the files it points at.
100
+ Then read only what a live question needs, never whole directories speculatively. Where a folder carries an `index.md`, read it first and load only the files it points at.
76
101
 
77
102
  Do not dispatch subagents. A groundwork track is a conversation, and fanning out loses the reasoning that makes the folder worth keeping. A search too large to run inline is a finding that the question is too broad.
78
103
 
79
104
  ## Open questions in chat
80
105
 
81
- The standard sets the open question format and requires it inside a topic file and in `00-scope.md`. Carry the same shape into the chat output, which sits outside the folder the standard governs. A bare numbered list hands the reader a quiz and defers the judgment the track exists to inform.
106
+ The standard sets the open question format inside a topic file and in `00-scope.md`. Carry the same shape into the chat output, since a bare numbered list hands the reader a quiz and defers the judgment the track exists to inform.
82
107
 
83
108
  ## Open mode
84
109
 
85
- 1. Claim the ordinal and create the folder in one act with `canon records ordinal groundwork <slug> --claim`, per `${CLAUDE_SKILL_DIR}/references/groundwork.md`. Where the installed binary carries no such subcommand, fall back to listing both `.canon/groundwork/` and `.canon/intake/` and creating `.canon/groundwork/<nn>-<slug>/` at the highest ordinal present across the two, incremented.
86
- 2. Write `README.md` first. Writing it first forces the question of what the track is for.
87
- 3. Write `01-current-state.md` by measuring now. Never carry a figure from a previous session or from recall without re-measuring it. Measure only what an open question in the folder needs. A number with no question attached is how groundwork turns into the work.
88
- 4. Write `00-scope.md` when the track is large enough to run away. Skip it on a small track.
89
- 5. Add topic files at `02` through `05` as the subject demands. Close each one with its open questions in the standard's format.
90
- 6. Keep going. Revise, reframe, and take correction as the questions move. The folder is meant to be rewritten.
110
+ 1. Claim the ordinal and create the folder in one act with `canon records ordinal groundwork <slug> --claim`, per `${CLAUDE_SKILL_DIR}/references/groundwork.md`.
111
+ 2. Where the binary carries no such subcommand, list `.canon/groundwork/` and `.canon/intake/` and take the highest ordinal across both, incremented.
112
+ 3. Write `README.md` first. Writing it first forces the question of what the track is for.
113
+ 4. Write `01-current-state.md` by measuring now, never carrying a figure from recall. Measure only what an open question needs, since a number with no question turns groundwork into the work.
114
+ 5. Write `00-scope.md` when the track is large enough to run away. Skip it on a small track.
115
+ 6. Add topic files at `02` through `05` as the subject demands. Close each one with its open questions in the standard's format.
116
+ 7. Keep going. Revise, reframe, and take correction as the questions move. The folder is meant to be rewritten.
91
117
 
92
118
  ## Resume mode
93
119
 
@@ -98,55 +124,15 @@ The standard sets the open question format and requires it inside a topic file a
98
124
 
99
125
  ## Close mode
100
126
 
101
- 1. Write `06-decision.md`. It states the problem once, names the goal, lists what to do, and lists what was considered and dropped. Carry the "Overturned by" line of each lean that became the decision into a `## Revisit when` section, and carry none from a lean the decision did not take.
127
+ 1. Write `06-decision.md`, stating the problem once, the goal, what to do, and what was dropped. Carry each adopted lean's "Overturned by" line into `## Revisit when`.
102
128
  2. Write `07-next-session.md` self-contained, so it survives a compaction that loses the conversation.
103
129
  3. Update the file map in `README.md`.
104
- 4. Write one task file in `.canon/tasks/` recording what the track concluded, even when the conclusion is to do nothing. Follow `${CLAUDE_SKILL_DIR}/../task-board/references/tasks.md` for the filename and frontmatter. Place the row through `task-board` Step 4, which checks the roster for a live orchestrator before writing `priority.md` or `backlog.md` directly. Aside from an experiment fixture, this and the routing in Step 5 are the only ways close mode reaches outside the folder.
130
+ 4. Write one task file in `.canon/tasks/` recording the conclusion, even when it is to do nothing, per `${CLAUDE_SKILL_DIR}/../task-board/references/tasks.md`. Place its row through `task-board` Step 4.
105
131
  5. When the task written in Step 4 does not cover every finding the track surfaced, route what it leaves out through `plan-intake`. Skip this step when it does.
106
- 6. Report uncited external claims. Closing already reads every file in the folder, so list any statement about a source outside the project that carries neither a link nor a lead entry. Report and do not block, because judging whether a sentence makes an external claim is the call a checker gets wrong.
132
+ 6. Report each statement about an outside source carrying neither a link nor a lead entry. Report and do not block, because judging what counts as an external claim is the call a checker gets wrong.
107
133
 
108
- Do not close while an open question quietly fails an outcome. Resolve it, or record it in `06-decision.md` as knowingly accepted.
134
+ Aside from an experiment fixture, Steps 4 and 5 are the only ways close mode reaches outside the folder. Do not close while an open question quietly fails an outcome. Resolve it, or record it in `06-decision.md` as knowingly accepted.
109
135
 
110
136
  ## Output
111
137
 
112
- Emit the full relative path from the project root for every file written or updated. A bare filename names a file the reader cannot open.
113
-
114
- Open and resume:
115
-
116
- ```plaintext
117
- 📂 Opened .canon/groundwork/<nn>-<slug>/
118
-
119
- **Written:**
120
-
121
- - `.canon/groundwork/<nn>-<slug>/README.md`
122
- - `.canon/groundwork/<nn>-<slug>/01-current-state.md`
123
-
124
- **Open questions:**
125
-
126
- 1. <question>
127
- - Leaning: <where the evidence currently points>
128
- - Overturned by: <the finding that would change it>
129
- ```
130
-
131
- Use `📂 Resumed` in place of `📂 Opened` on a resume pass.
132
-
133
- Close:
134
-
135
- ```plaintext
136
- ✅ Closed .canon/groundwork/<nn>-<slug>/
137
-
138
- **Written:**
139
-
140
- - `.canon/groundwork/<nn>-<slug>/06-decision.md`
141
- - `.canon/groundwork/<nn>-<slug>/07-next-session.md`
142
-
143
- **Uncited external claims:** <count, or none>
144
-
145
- - `<file>`: <the claim>
146
-
147
- <the decision in one line>
148
-
149
- Next: /plan-feature
150
- ```
151
-
152
- Omit the uncited-claims block when the count is zero.
138
+ Emit the full relative path from the project root for every file written or updated, since a bare filename names a file the reader cannot open. Read `${CLAUDE_SKILL_DIR}/references/output.md` on reaching this step for the open and resume template and the close template. A run that stops on a guard skips it.
@@ -33,8 +33,8 @@ Governs a groundwork track under `.canon/groundwork/<nn>-<slug>/`: folder layout
33
33
  Does not govern:
34
34
 
35
35
  - **`groundwork-spikes.md`**: `08-spikes.md`, what each spike records, and the folders holding what a spike produced
36
- - **`intake.md`**: A dump of many findings filed by domain, each carrying its own verdict
37
- - **`plan.md`**: the feature plan a closed track feeds, and the contract its answer slots keep
36
+ - **`intake.md`**: A dump of many findings filed by domain, each with a verdict
37
+ - **`plan.md`**: the feature plan a closed track feeds, and its answer contract
38
38
  - **`tasks.md`**: the task file a closing track writes, and the origin line pointing back at the folder
39
39
  - **the `write-human` skill**: voice, rhythm, and sentence construction
40
40
  - **`markdown.md`**: headings, punctuation, word choice, and file references
@@ -42,9 +42,9 @@ Does not govern:
42
42
 
43
43
  ## Folder name
44
44
 
45
- - Name the folder `<nn>-<slug>`, a two-digit zero-padded ordinal followed by a kebab-case slug.
46
- - The ordinal marks a folder per track, opened once and worked over time, distinct from a file addressed by name, one already carrying its own sorting prefix, or one deliberately overwritten.
47
- - Claim the ordinal through `canon records ordinal groundwork <slug> --claim`, which reads the highest one across both `.canon/groundwork/` and `.canon/intake/` and creates the folder in one atomic act, so two sessions opening at once never share a number. The two kinds share one creation-order line.
45
+ - Name the folder `<nn>-<slug>`, a two-digit ordinal and a kebab-case slug.
46
+ - The ordinal marks a folder per track, opened once and worked over time, unlike a file addressed by name, one with its own sorting prefix, or one overwritten on purpose.
47
+ - Claim the ordinal through `canon records ordinal groundwork <slug> --claim`, which reads the highest one across both `.canon/groundwork/` and `.canon/intake/` and creates the folder in one atomic act, so two sessions opening at once never share a number. The two kinds share one order.
48
48
  - With neither folder holding an entry, the first one opened takes `01`, whatever number a track's own files start at.
49
49
  - Never renumber an existing folder. The ordinal is the order it opened, and a later reader cites it by that name.
50
50
 
@@ -53,17 +53,17 @@ Does not govern:
53
53
  A track works when a session that has never seen it re-enters from the folder alone and can answer each of these:
54
54
 
55
55
  - Which single question is being measured, and why is it running now?
56
- - What is the current state, measured during this pass rather than carried in from an earlier one?
57
- - Which questions are still open, where does the evidence point, and what would overturn that?
56
+ - What is the current state, measured this pass rather than carried in?
57
+ - Which questions are open, where is the evidence, and what overturns it?
58
58
  - What was decided, and what was considered and dropped?
59
59
 
60
- A track failing these is non-conforming even when it satisfies every shape rule below.
60
+ A track failing these is non-conforming even when it meets every shape rule.
61
61
 
62
62
  ## Frontmatter and dating
63
63
 
64
64
  - `title` (required): the track subject in sentence case
65
65
  - `description` (required): one line naming what the track measures
66
- - `date` (required, `README.md` only): the day the folder opened, as `YYYY-MM-DD`
66
+ - `date` (required, `README.md` only): the day it opened, as `YYYY-MM-DD`
67
67
 
68
68
  Carry the opening date as a frontmatter field rather than a sentence in the body, since nothing that walks the folder reads prose. Date the folder once rather than every file, because a per-file date goes stale on the first edit. The checkable half is the commit each measurement was taken against, which the file holding that measurement names.
69
69
 
@@ -90,13 +90,13 @@ Orients. Holds no findings.
90
90
 
91
91
  - A one-line definition of the investigation
92
92
  - A `## Why` section stating why the track is running now
93
- - A file-map table of filename and what it holds, kept current as files are added or retired
93
+ - A file-map table of filename and what it holds, kept current
94
94
  - A `## Method` section splitting internal sources from external ones, naming which were used and which were not yet done, and listing under a leads heading any external source found but not opened
95
95
 
96
96
  ### Closing sections and phase
97
97
 
98
98
  - A `## Prior art` section
99
- - A `## Source citation` section stating the rule below, so a returning session picks it up from the folder
99
+ - A `## Source citation` section stating the rule below, so a returning session finds it in the folder
100
100
  - The phase stated out loud in the first three lines, in the form `Groundwork phase. Nothing here is a feature plan.`
101
101
 
102
102
  Every claim about a source outside the project carries a link to it, wherever the claim appears in the folder. Without one, a later reader cannot tell a fetched page from recall. A source found and not read is listed as a lead and is never cited, since a link to a page nobody opened is worse than no link. Listing it stops a later pass re-searching for it.
@@ -109,23 +109,19 @@ Facts before opinion. Verified measurement only, taken during this pass.
109
109
 
110
110
  - Never carry a figure from a previous session without re-measuring, since every number built on a stale one is quietly wrong.
111
111
  - Mark an inference as an inference where one is unavoidable.
112
- - Measure only what an open question needs. A number with no question attached is the mechanism by which the groundwork becomes the work.
112
+ - Measure only what an open question needs. A number with no question attached is how the groundwork becomes the work.
113
113
 
114
114
  ## 00-scope.md
115
115
 
116
- Written when the subject is large enough to run away. Holds constraints, risks, the open question list, and the downstream surfaces a decision would touch. A small track skips it.
116
+ Written when the subject is large enough to run away. Holds constraints, risks, the open questions, and what a decision would touch. A small track skips it.
117
117
 
118
118
  ## 06-decision.md
119
119
 
120
- Closes the folder. Everything above it is input.
120
+ Closes the folder. Everything above it is input. Write it from the skeleton under `## Template`, with an H3 per dropped alternative.
121
121
 
122
- - The problem stated once
123
- - The goal
124
- - The items to do
125
- - What was considered and dropped
126
- - `## Revisit when`: the "Overturned by" line of each lean that became the decision, carried over as written. A lean the decision did not take carries nothing, and a track whose deciding leans carried no overturn line omits the section.
122
+ `## Revisit when` carries the "Overturned by" line of each lean that became the decision, as written. A lean the decision did not take carries nothing, and a track whose deciding leans carried no overturn line omits the section.
127
123
 
128
- The dropped list is what stops a future session re-proposing something already rejected.
124
+ The dropped list stops a future session re-proposing a rejected idea.
129
125
 
130
126
  ## 07-next-session.md
131
127
 
@@ -141,8 +137,8 @@ Every open question carries a lean, wherever it appears. A bare numbered list ha
141
137
  - Overturned by: <the finding that would change it>
142
138
  ```
143
139
 
144
- - Pair every lean with what would overturn it. A lean with no falsifier is an opinion.
145
- - On a measurement rather than a judgment, write `- Leaning: none, needs measuring` and drop the overturn line. A guess at a number is worse than an admission.
140
+ - Pair every lean with what would overturn it. A lean with no falsifier is opinion.
141
+ - On a measurement rather than a judgment, write `- Leaning: none, needs measuring` and drop the overturn line. A guess at a number is worse.
146
142
  - Mark each question open or answered, and repeat the open ones at the end of the file they belong to. That gives the decision file its agenda for free.
147
143
 
148
144
  A lean is weaker than a plan's suggestion: it records the current read on an open question, not a decision to accept at execution time.
@@ -155,13 +151,15 @@ A lean is weaker than a plan's suggestion: it records the current read on an ope
155
151
 
156
152
  ## Anti-patterns
157
153
 
158
- - **The groundwork becomes the work.** Gathering expands until the measuring costs more than the change it justifies. Cap it, and drop any thread with no question attached.
154
+ - **The groundwork becomes the work.** Gathering expands until the measuring costs more than the change it justifies. Cap it, and drop any thread with no question.
159
155
  - **Deciding by omission.** Closing a track while an unresolved question quietly fails an outcome. Resolve it or record it as knowingly accepted.
160
156
  - **Recording a constraint discovered while defending a decision.** Check it against the alternative design first, or a fact about the current shape reads as inherent to the problem.
161
157
  - **A plan written before the groundwork.** Every track that has done this had to supersede the plan it wrote.
162
158
 
163
159
  ## Template
164
160
 
161
+ ### README.md
162
+
165
163
  ```markdown
166
164
  ---
167
165
  title: <Track subject>
@@ -195,10 +193,41 @@ Groundwork phase. Nothing here is a feature plan.
195
193
 
196
194
  ## Prior art
197
195
 
198
- <Earlier plans, folders, or decisions this track supersedes or builds on.>
196
+ ### <earlier plan or folder>
197
+
198
+ <What it decided and how this track supersedes or builds on it. Say not to go looking for it again.>
199
199
 
200
200
  ## Source citation
201
201
 
202
202
  Every claim about a source outside the project carries a link. A source found
203
203
  and not read is listed as a lead and is never cited.
204
204
  ```
205
+
206
+ ### 06-decision.md
207
+
208
+ ```markdown
209
+ ---
210
+ title: <Track subject> decision
211
+ description: <one line naming what the track decided>
212
+ ---
213
+
214
+ # <Track subject> decision
215
+
216
+ ## Problem and goal
217
+
218
+ <The problem stated once, then what done looks like.>
219
+
220
+ ## What to do
221
+
222
+ 1. <item>
223
+
224
+ ## Considered and dropped
225
+
226
+ ### <alternative>
227
+
228
+ <Why it was dropped, and what would revive it.>
229
+
230
+ ## Revisit when
231
+
232
+ - <an "Overturned by" line, as written>
233
+ ```