@erclx/canon 5.38.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 (149) 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-pr/SKILL.md +56 -44
  48. package/claude/skills/git-ship/SKILL.md +43 -34
  49. package/claude/skills/git-ship/references/ci-watch.md +31 -0
  50. package/claude/skills/git-split/SKILL.md +28 -100
  51. package/claude/skills/git-split/references/independent.md +40 -0
  52. package/claude/skills/git-split/references/stacked.md +73 -0
  53. package/claude/skills/git-stage/SKILL.md +9 -7
  54. package/claude/skills/git-worktree/SKILL.md +27 -49
  55. package/claude/skills/git-worktree/references/cleanup.md +55 -0
  56. package/claude/skills/markdown-craft/SKILL.md +2 -2
  57. package/claude/skills/markdown-craft/references/markdown.md +82 -53
  58. package/claude/skills/plan-feature/SKILL.md +52 -46
  59. package/claude/skills/plan-feature/references/batches.md +46 -0
  60. package/claude/skills/plan-groundwork/SKILL.md +60 -74
  61. package/claude/skills/plan-groundwork/references/output.md +48 -0
  62. package/claude/skills/plan-intake/SKILL.md +28 -21
  63. package/claude/skills/plan-intake-answer/SKILL.md +14 -13
  64. package/claude/skills/read-frames/SKILL.md +2 -0
  65. package/claude/skills/record-screencast/SKILL.md +31 -11
  66. package/claude/skills/review-address/SKILL.md +76 -158
  67. package/claude/skills/review-address/references/rebase-only.md +34 -0
  68. package/claude/skills/review-craft/SKILL.md +27 -11
  69. package/claude/skills/review-pr/SKILL.md +91 -40
  70. package/claude/skills/review-ui/SKILL.md +62 -37
  71. package/claude/skills/review-ui/references/hosted-preview.md +30 -0
  72. package/claude/skills/role-orchestrator/SKILL.md +105 -74
  73. package/claude/skills/role-orchestrator/references/orchestrator-filing.md +26 -0
  74. package/claude/skills/role-planner/SKILL.md +66 -64
  75. package/claude/skills/role-reviewer/SKILL.md +57 -46
  76. package/claude/skills/role-worker/SKILL.md +68 -63
  77. package/claude/skills/search-craft/SKILL.md +7 -5
  78. package/claude/skills/session-compact/SKILL.md +16 -11
  79. package/claude/skills/session-map/SKILL.md +31 -10
  80. package/claude/skills/session-relay/SKILL.md +32 -65
  81. package/claude/skills/session-resume/SKILL.md +18 -13
  82. package/claude/skills/session-worktree/SKILL.md +70 -42
  83. package/claude/skills/systematic-debugging/SKILL.md +6 -1
  84. package/claude/skills/target-check/SKILL.md +13 -6
  85. package/claude/skills/target-setup/SKILL.md +39 -27
  86. package/claude/skills/task-board/SKILL.md +68 -60
  87. package/claude/skills/task-board/references/create-report.md +36 -0
  88. package/claude/skills/task-complete/SKILL.md +20 -18
  89. package/claude/skills/teach-workspace/SKILL.md +61 -33
  90. package/claude/skills/test-craft/SKILL.md +2 -1
  91. package/claude/skills/test-first/SKILL.md +15 -9
  92. package/claude/skills/ui-checklist/SKILL.md +18 -16
  93. package/claude/skills/ux-audit/SKILL.md +9 -10
  94. package/claude/skills/ux-measure/SKILL.md +22 -18
  95. package/claude/skills/video-craft/SKILL.md +15 -7
  96. package/claude/skills/write-human/SKILL.md +9 -1
  97. package/claude/skills/youtube-transcripts/SKILL.md +2 -1
  98. package/docs/agents/context-audit-checks.md +19 -1
  99. package/docs/agents/context-audit.md +2 -2
  100. package/docs/agents/driver.md +1 -1
  101. package/docs/agents/hooks.md +21 -1
  102. package/docs/agents/index.md +10 -14
  103. package/docs/agents/indexes.md +25 -29
  104. package/docs/agents/install-and-sync.md +124 -235
  105. package/docs/agents/markdown-audit-density.md +39 -0
  106. package/docs/agents/markdown-audit-weight.md +9 -7
  107. package/docs/agents/markdown-audit.md +18 -14
  108. package/docs/agents/migrate.md +41 -16
  109. package/docs/agents/output-shape.md +60 -45
  110. package/docs/agents/overview.md +36 -12
  111. package/docs/agents/routing.md +1 -1
  112. package/docs/agents/rule-citations.md +1 -1
  113. package/docs/agents/skills-reach.md +1 -1
  114. package/docs/agents/targets.md +25 -77
  115. package/docs/target/migrations.md +1 -1
  116. package/docs/target/projects.md +2 -2
  117. package/docs/workflow/ai-workflow.md +2 -2
  118. package/docs/workflow/parallel-features.md +2 -2
  119. package/docs/workflow/skill-map.md +1 -1
  120. package/docs/workflow/visual-design-workflow.md +1 -1
  121. package/package.json +1 -1
  122. package/src/commands/claude.ts +1 -1
  123. package/src/commands/context.ts +106 -7
  124. package/src/commands/hooks.ts +63 -0
  125. package/src/commands/markdown.ts +169 -32
  126. package/src/context/audit.ts +256 -5
  127. package/src/context/classify/prompts.ts +1 -1
  128. package/src/context/gate.ts +23 -7
  129. package/src/context/shape-gated.ts +28 -0
  130. package/src/design/document.ts +1 -1
  131. package/src/design/tokens.ts +1 -1
  132. package/src/gate/measures.ts +15 -190
  133. package/src/gate/stages.ts +7 -23
  134. package/src/hooks/reply-links.ts +110 -0
  135. package/src/markdown/density.ts +258 -0
  136. package/src/markdown/gate.ts +57 -18
  137. package/src/markdown/reference-shape.ts +103 -0
  138. package/src/markdown/scope.ts +174 -0
  139. package/src/markdown/structure.ts +9 -59
  140. package/src/shipped/references.ts +1 -1
  141. package/tooling/claude/seeds/.claude/hooks/reply-links.sh +72 -0
  142. package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +22 -1
  143. package/tooling/claude/seeds/.claude/settings.json +4 -0
  144. package/docs/agents/commands.md +0 -154
  145. package/docs/agents/docs.md +0 -27
  146. package/docs/agents/drift-surfaces.md +0 -201
  147. package/docs/agents/gov-detect.md +0 -47
  148. package/docs/agents/scripting.md +0 -142
  149. package/src/markdown/growth.ts +0 -43
@@ -0,0 +1,55 @@
1
+ ---
2
+ title: Worktree cleanup
3
+ description: Which enumerated worktrees git-worktree cleanup removes, the skip reasons and their order, the preview, and the final command
4
+ ---
5
+
6
+ # Worktree cleanup
7
+
8
+ Applies to `git-worktree` in `cleanup` mode, after the enumeration has run and the roster read cleanly. The roster stop stays in the skill body.
9
+
10
+ ## The remove set
11
+
12
+ Include a worktree when every test holds:
13
+
14
+ 1. Not the main row.
15
+ 2. Not the current session's worktree.
16
+ 3. Not occupied by a live session.
17
+ 4. Not a `foreign` tree.
18
+ 5. State is `merged` or `merged (local)`.
19
+ 6. Working tree is clean.
20
+
21
+ ### The skip set
22
+
23
+ Every other non-main row goes to the skip set with a one-word reason, the first that applies in this order: `current`, `occupied`, `foreign`, `dirty`, `open`, `closed`, `unmerged`.
24
+
25
+ A `foreign` tree that is also dirty reports `foreign`, since the operator can clear `dirty` and cannot clear `foreign`. Leading with the transient reason invites a commit or stash that changes nothing.
26
+
27
+ ## Preview
28
+
29
+ ```plaintext
30
+ **Removing:** <count>
31
+
32
+ | Path | Branch | PR |
33
+ | ---- | ------ | -- |
34
+
35
+ **Skipping:** <count>
36
+
37
+ | Path | Branch | Reason |
38
+ | ---- | ------ | ------ |
39
+ ```
40
+
41
+ If the remove set is empty, stop with `❌ Nothing to remove. All linked worktrees are current, dirty, unmerged, or foreign.`
42
+
43
+ ## Final command
44
+
45
+ After the preview, execute immediately without waiting for user input, since Claude Code's tool permission dialog is the confirmation gate.
46
+
47
+ ```bash
48
+ git -C <MAIN_ROOT> worktree remove <path1> \
49
+ && git -C <MAIN_ROOT> branch -D <branch1> \
50
+ && git -C <MAIN_ROOT> worktree remove <path2> \
51
+ && git -C <MAIN_ROOT> branch -D <branch2> \
52
+ && git -C <MAIN_ROOT> worktree prune
53
+ ```
54
+
55
+ Chain one `worktree remove` + `branch -D` pair per row in the remove set, then a single `worktree prune` at the end.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: markdown-craft
3
- description: Carries the format and structure rules for markdown, being headings, paragraph and list shape, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording, and runs the audit after an edit. Use before a substantial markdown edit, when writing a README, a doc, a skill body, or any `.md` file, or when asked "what are the markdown rules" or "which characters are banned". Do NOT use for voice, rhythm, or word choice, which is `write-human`, or for a Mermaid fence or figure, which is `draft-figure`.
3
+ description: Carries the format and structure rules for markdown, being headings, the density limits, paragraph and list shape, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording, and runs the audit after an edit. Use before a substantial markdown edit, when writing a README, a doc, a skill body, or any `.md` file, or when asked "what are the markdown rules" or "which characters are banned". Do NOT use for voice, rhythm, or word choice, which is `write-human`, or for a Mermaid fence or figure, which is `draft-figure`.
4
4
  metadata:
5
5
  family: answer
6
6
  ---
@@ -9,7 +9,7 @@ metadata:
9
9
 
10
10
  Read `${CLAUDE_SKILL_DIR}/references/markdown.md` before a substantial markdown edit. Every rule in it is a fact a scan can settle, so do not work the banned characters from memory.
11
11
 
12
- Run `canon markdown audit <path>` after the edit. Rewrite the sentence carrying a hit rather than swapping the token for a near-synonym.
12
+ Run `canon markdown audit <path>` after the edit, and fix every ban and density finding it reports before moving on. Rewrite the sentence carrying a ban hit rather than swapping the token for a near-synonym, and fix a density finding by its shape rather than trimming characters.
13
13
 
14
14
  ## Routes
15
15
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Markdown reference
3
- description: Headings, paragraph and list structure, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording
3
+ description: Headings, density limits, paragraph and list shape, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording
4
4
  ---
5
5
 
6
6
  # Markdown reference
@@ -11,7 +11,7 @@ Applies to markdown reference docs, READMEs, and inline documentation in repos.
11
11
 
12
12
  - [Scope](#scope)
13
13
  - [Headings](#headings)
14
- - [Paragraphs and lists](#paragraphs-and-lists)
14
+ - [Density](#density)
15
15
  - [Code and identifiers](#code-and-identifiers)
16
16
  - [Dates](#dates)
17
17
  - [Punctuation](#punctuation)
@@ -23,63 +23,99 @@ Applies to markdown reference docs, READMEs, and inline documentation in repos.
23
23
 
24
24
  ## Scope
25
25
 
26
- Governs what a check can decide about a markdown file: headings, paragraph and list structure, code spans and fences, the form a date takes, punctuation, emphasis, file references, the spelling convention, what prose may claim about its sources, and the wording of a catalog title and description. It is an attribute standard rather than a document-type one, so it applies over documents whose shape another standard sets, and it carries no template because these rules are written across every document and have no shape of their own.
26
+ Governs what a check can decide about a markdown file, being headings, density, paragraph and list shape, code spans and fences, the date form, punctuation, emphasis, file references, spelling, what prose may claim about its sources, and the wording of a catalog title and description.
27
27
 
28
- The two frontmatter fields it reaches are `title` and `description`. They are named here rather than in the statement above, since a backticked token in a scope statement's first sentence is published as the standard's jurisdiction.
28
+ It is an attribute standard rather than a document-type one, so it applies over documents whose shape another standard sets. It carries no template, since these rules run across every document and have no shape of their own.
29
29
 
30
- The split with the voice guidance is what reads the rule rather than what the rule covers. The character bans ship as data `canon markdown audit` and the installed audit hook both read, so a violation is measured on every run. Word choice, cadence, rhythm, and information density are judgments a reader settles, and those travel in the `canon:write-human` skill, which a markdown edit routes to.
30
+ - The two frontmatter fields it reaches are `title` and `description`, named here since a backticked token in a scope statement's first sentence is published as its jurisdiction
31
+ - The character bans ship as data that `canon markdown audit` and the installed audit hook both read, so every run measures a violation
31
32
 
32
33
  Does not govern:
33
34
 
34
- - Voice, rhythm, sentence construction, and information density, which the `write-human` skill carries
35
- - What sections a document has, or what belongs in each: the standard for that document type
36
- - Which frontmatter fields a document carries, which is that standard's own subject. This file governs the wording of a `title` and a `description` and nothing else about them.
35
+ - Voice, rhythm, sentence construction, and word choice, which the `canon:write-human` skill carries and a markdown edit routes to
36
+ - What sections a document has, or what belongs in each, which the standard for that document type sets
37
+ - Which frontmatter fields a document carries, which is that standard's subject
37
38
  - The text inside a fenced block, which follows the conventions of its own language rather than these
38
- - Phase-label and semver discipline, which is `versioning.md`. The scan that applies these bans to finished text on its way out, and whether a pull request or issue number is backticked, which turns on where the text is published rather than on the text, are `publish.md`.
39
+ - Phase-label and semver discipline, which is `versioning.md`, and the outbound ban scan and issue-number backticks, which turn on where text is published and are `publish.md`
39
40
 
40
41
  ## Headings
41
42
 
42
- - H1 for document title, H2 for main sections, H3 for subsections
43
- - Use sentence case for all headings (H1, H2, H3). The audit reports a heading or a frontmatter `title` with a capitalized word after the first, and a proper noun it reports stays as it is.
44
- - Proper nouns and product names retain their casing in headings
45
- - Shape a record as H2 per section and H3 per item a reader looks up by name, with a few bullets or prose under each H3. Use a table only for a fixed-shape set.
43
+ - H1 for document title, H2 for main sections, H3 for subsections, and no H4
44
+ - Use sentence case for every heading. The audit reports a heading or a frontmatter `title` with a capitalized word after the first.
45
+ - Proper nouns and product names keep their casing, whatever the audit reports
46
+ - Shape a record as H2 per section and H3 per item a reader looks up by name. Use a table only for a fixed-shape set.
46
47
 
47
48
  ### Seams
48
49
 
49
- - Past roughly 40 rendered lines with no heading of any level breaking them, add a subheading at the seam. Measure the longest such run rather than everything under one `##`, and exclude fenced code blocks. The number is a checkpoint, not a cap.
50
- - Count rendered lines rather than source lines, wrapping each source line at 80 columns and summing the heights. Source lines undercount a file authored one line per bullet, where a block of fifteen paragraph-bullets occupies fifteen lines and renders past sixty. A checkpoint another standard states counts the same unit, so a file measured one way never sits beside a run measured another.
51
- - Keep a whole document at or under 300 rendered lines, counted over the full source with frontmatter and fenced blocks included, since a session pays for every line it loads. This one is a ceiling rather than a checkpoint. `canon markdown audit` lists every document past it without failing the run, and a gate stage reads the same number, so whether a push fails on it is the project's gate to decide. Split the document at a seam rather than compressing it.
52
- - Exempt a file named `CHANGELOG.md`, which a release tool rewrites, and a document carrying `<!-- canon-length-exempt: <reason> -->` on a line of its own outside a fenced block. A marker naming no reason exempts nothing.
50
+ Every depth number counts rendered lines, each source line wrapped at 80 columns. Source lines undercount a file authored one line per bullet, where fifteen paragraph-bullets render past sixty lines.
51
+
52
+ - Past roughly 40 rendered lines with no heading breaking them, add a subheading at the seam. Measure the longest such run, excluding fenced code. The number is a checkpoint, not a cap.
53
+ - A checkpoint another standard states counts the same unit, so a file measured one way never sits beside a run measured another
54
+ - Keep a whole document at or under 300 rendered lines, frontmatter and fences included, since a session pays for every line it loads. Split it at a seam rather than compressing it.
55
+ - The 300 lines are a ceiling. `canon markdown audit` lists each document past it without failing, and a gate stage reads the same number, so the project's gate decides whether a push fails.
56
+
57
+ The ceiling exempts a file named `CHANGELOG.md`, which a release tool rewrites. It also exempts a document carrying `<!-- canon-length-exempt: <reason> -->` on its own line outside a fence, and a marker naming no reason exempts nothing.
53
58
 
54
59
  ### Exempt blocks
55
60
 
56
- - Exempt a block whose lines are all list items at one level averaging under roughly 130 characters. A flat list of short peers is already navigable, and a subheading dropped into it splits a set that belongs together. Bullet count says nothing on its own to this checkpoint, which measures depth. The cap on a run of bullets is a separate rule under Paragraphs and lists. A catalog of one-liners and a stack of paragraphs reach the same count and read nothing alike, so weight is what decides.
57
- - Mixing prose with that list, or nesting levels inside it, ends the exemption at any weight.
58
- - Exempt a block whose lines are all table rows, at any length. The peer list above is exempt because it is already navigable, and a table because the remedy does not exist: a subheading dropped inside one splits the table rather than the run, so no edit short of rewriting it as a list clears the checkpoint.
59
- - Prose either side of the table ends that exemption, since the block has a seam and a heading breaks it there.
61
+ Two kinds of block are exempt from the 40-line checkpoint, since a subheading dropped into either splits something that belongs together.
62
+
63
+ - A block whose lines are all list items at one level averaging under roughly 130 characters, since a flat list of short peers is already navigable
64
+ - Weight decides rather than count, since a catalog of one-liners and a stack of paragraphs reach one count and read nothing alike. The cap on a bullet run is a separate rule.
65
+ - Mixing prose into that list, or nesting levels in it, ends the exemption at any weight
66
+ - A block whose lines are all table rows, at any length, since a subheading inside one splits the table rather than the run
67
+ - Prose either side of the table ends that exemption, since the block has a seam and a heading breaks it there
60
68
 
61
69
  ### Bold section markers
62
70
 
63
- - Break a run on a bold section marker holding its line alone, the way a heading breaks one. A document whose template separates sections with `**Risks:**` rather than `## Risks` has written the seam a reader lands on, and reading only the heading reported every such file at its full length whatever it carried.
64
- - Require the marker to start at column zero and to be the whole line. `**Risks:**` breaks a run, a bold phrase opening a sentence stays emphasis, and an indented one stays a label inside its list item.
65
- - Break a colon-less marker on either of two signals, since no one test separates every marker from a sentence set in bold. A label that is one whole code span breaks at any width, which is how a bold line holding only a backticked path reads as the file heading it is. Anything else breaks at 20 characters or fewer, which reaches `**Testing**` and leaves a bold sentence as prose.
71
+ A bold section marker holding its line alone breaks a run the way a heading does. A template separating sections with `**Risks:**` rather than `## Risks` has written the seam a reader lands on.
66
72
 
67
- ## Paragraphs and lists
73
+ - The marker starts at column zero and is the whole line. A bold phrase opening a sentence stays emphasis, and an indented one stays a label inside its list item.
74
+ - A colon-less marker breaks on either of two signals, since no one test separates every marker from a sentence set in bold
75
+ - A label that is one whole code span breaks at any width, so a bold line holding only a backticked path reads as the file heading it is
76
+ - Anything else breaks at 20 characters or fewer, which reaches `**Testing**` and leaves a bold sentence as prose
68
77
 
69
- - Use prose by default. Reserve bullets for discrete, unrelated items.
70
- - Keep paragraphs to four sentences or fewer. Split longer blocks at the next logical boundary.
71
- - Past roughly 700 characters in one paragraph, folding in the lines that wrap it, split at the next logical boundary as well. Two long sentences satisfy the sentence cap and still overload the reader. This number sits well above the bullet checkpoint because a paragraph is read straight through and a bullet is scanned. A paragraph a branch adds or grows past it fails the push in a context entry through the `paragraph-growth` gate stage, and an unchanged long paragraph passes. Elsewhere it is the audit's warning and no more.
78
+ ## Density
72
79
 
73
- ### Bullets
80
+ Six limits keep a file scannable on sight, each a fact `canon markdown audit` measures that fails the push wherever the surface's gate is on. Open an H3 with a lead sentence or a table, then a few bullets or a short paragraph, since monotone text is the defect whether all prose or all bullets.
74
81
 
75
- - Keep bullets tight. Past roughly 250 characters in one top-level bullet, counting the lines that continue it and excluding any bullet nested under it, the overflow belongs in prose. A bullet a branch adds or grows past it fails the push in a context entry through the `paragraph-growth` gate stage, and an unchanged one passes until edited. Elsewhere it is the audit's warning and no more. The number is a checkpoint rather than a cap.
76
- - Keep a run of consecutive top-level bullets to 5 or fewer under one heading, and fold a longer one into prose, an H3 per item, or a split at the seam. A blank line, a continuation, and a nested item do not break the run, and a paragraph or heading does. The audit reports a longer run and the `bullet-stacks` gate stage fails it.
77
- - Leave a run whose every item opens with a bold label or a link as it is, since each item names its own subject. A task box (`[ ]`) is not a link, so a checklist counts as plain bullets. Numbered items do not count toward the cap. Governance rules and `REQUIREMENT.md` sit outside it, since a rule is one imperative per bullet.
78
- - Collapse a stack of bullets narrating one subsystem into a single `###` subsection carrying one narrative. Splitting a heavy bullet into three light ones satisfies the checkpoint above and leaves the reader no better off, and subdividing a block does not lighten the bullets inside it, so the two rules answer different defects.
79
- - Use dashes (`-`) not asterisks (`*`) for bulleted lists
82
+ | Rule | Limit |
83
+ | ------------------- | ------------------------------------------------- |
84
+ | Paragraph length | 350 characters |
85
+ | Paragraphs in a row | 2 at most |
86
+ | Bullet length | 200 characters |
87
+ | Bullets in a row | 5 plain bullets at most |
88
+ | Heading depth | H3 at most, no H4 |
89
+ | H3 opening | First block under an H3 is a paragraph or a table |
90
+
91
+ Rules, `CLAUDE.md`, a requirements or design record, a changelog, examples, and `.canon/` records take no density finding, since a rule is one imperative per bullet and each record keeps its own shape.
92
+
93
+ ### How each limit counts
94
+
95
+ A paragraph is read straight through and a bullet is scanned, so the paragraph limit sits above the bullet one. Four sentences to a paragraph stays advice rather than a limit.
96
+
97
+ - A paragraph's length folds in the lines that wrap it. A paragraph inside a list item counts toward its bullet, never as a paragraph or toward a run.
98
+ - A bullet's length counts its continuation lines and excludes any bullet nested under it
99
+ - A heading, list, table, fence, or bold section marker ends a run of paragraphs
100
+ - A blank line, a continuation, and a nested item do not break a run of bullets, and a paragraph or a heading does
101
+ - A run whose every item opens with a bold label or a link is exempt from the run limit, since each item names its own subject. A task box is not a link, so a checklist counts as plain.
102
+
103
+ Numbered items do not count toward a bullet run. Fix a finding by its shape, splitting a paragraph at its next logical boundary and folding a long run into prose, an H3 per item, or a split at the seam. A rewrite may cut repetition and history, and never a stated reason.
104
+
105
+ ### Content
106
+
107
+ A file can pass every limit and still say too much.
108
+
109
+ - State one fact per bullet, with its reason in the same sentence, as "X, so Y"
110
+ - State what holds now. History and rejected options go in a decision record.
111
+ - Do not write a sentence that restates its heading or the line above it
112
+ - Collapse a stack of bullets narrating one subsystem into one H3 with one narrative, since splitting a heavy bullet into light ones reads no better
80
113
 
81
114
  ### Bullet form
82
115
 
116
+ A bullet's punctuation follows its sentence count, and a list opens unannounced.
117
+
118
+ - Use dashes (`-`) not asterisks (`*`) for bulleted lists
83
119
  - Do not end single-sentence or fragment bullets with a period. Use periods when a bullet has two or more sentences.
84
120
  - For key path lists, use colon format: `- \`src/\`: description`. Never use an em dash.
85
121
  - Do not introduce a list with a "Here are the X:" or "The following X:" lead-in
@@ -87,7 +123,7 @@ Does not govern:
87
123
  ## Code and identifiers
88
124
 
89
125
  - Wrap commands, API names, file paths, and code identifiers in backticks
90
- - Use a language identifier on all fenced code blocks (`markdown`, `typescript`, `plaintext`). Never use a bare ` ``` `
126
+ - Use a language identifier on every fenced code block, such as `markdown`, `typescript`, or `plaintext`. Never use a bare ` ``` `.
91
127
  - In ASCII tree diagrams, use `←` for inline annotations. Never use `#`.
92
128
 
93
129
  ## Dates
@@ -102,13 +138,14 @@ Does not govern:
102
138
 
103
139
  ## Language
104
140
 
105
- - Use American English spelling
106
- - Open a sentence with its subject and action, not filler (`Note that`, `Basically`), a hollow connective (`That being said`, `It's worth noting`), or a gerund windup (`Leveraging the API...`). Substantive transitions that carry a real relationship are fine.
141
+ Use American English spelling.
142
+
143
+ - Open a sentence with its subject and action, not filler (`Basically`), a hollow connective (`It's worth noting`), or a gerund windup (`Leveraging the API...`). A real transition is fine.
107
144
  - Do not use the negative parallelism pattern (`It's not X, it's Y`, `not because X, but because Y`)
108
145
  - Do not pad verb phrases or delay the action. Write the shortest form (`in order to` → `to`, `ensure that X is set` → `set X`, `By doing X, you can Y` → state Y directly).
109
146
  - Do not address the reader as a participant (`Let's`, `Here's`, `Here are`). State the content directly.
110
147
 
111
- ### Claims
148
+ A claim carries the weight its source gives it and no more.
112
149
 
113
150
  - Commit to a position. Do not hedge in clusters (`It might be worth considering`) or use false balance (`While X is true, Y is also important`). Recommend, or state the tradeoff.
114
151
  - Do not inflate significance. State what a thing does rather than calling it `a major milestone` or `a turning point for the field`.
@@ -116,14 +153,15 @@ Does not govern:
116
153
  - Do not attribute a claim to an unnamed authority (`experts say`, `studies show`, `it is widely believed`). Name the source or cut the claim.
117
154
  - Do not introduce a fact, name, date, or citation the source does not carry when rewriting existing text. A rewrite changes wording and never claims.
118
155
 
119
- One command reads the character bans under `## Punctuation`. `canon markdown audit` ships them as package data, so a project that installed no standards is measured the same as one that did, and this file states them for a reader rather than for the parser. The spelling line above states a convention and ships no set, so a project's spell checker is what enforces it.
156
+ One command reads the character bans under `## Punctuation`. `canon markdown audit` ships them as package data, so a project that installed no standards is measured the same as one that did. This file states them for a reader rather than for the parser, and the spelling line ships no set, so a project's spell checker enforces it.
120
157
 
121
158
  ## Frontmatter descriptions
122
159
 
123
- When frontmatter carries a short `title` or `description` used for catalog display:
160
+ When frontmatter carries a `title` or `description` used for catalog display:
124
161
 
125
162
  - `title`: sentence case, identifies the file uniquely against its siblings in the same catalog. Proper nouns retain their casing. No trailing period.
126
- - `description`: sentence case, names the specific topics covered so a reader can decide whether to open the file. Lead with concrete subjects, strip filler like "guide to", "overview of", or "documentation about". No trailing period, no leading article (`the`, `a`).
163
+ - `description`: sentence case, names the specific topics covered so a reader can decide whether to open the file. No trailing period, no leading article (`the`, `a`).
164
+ - Lead a `description` with concrete subjects, and strip filler like "guide to", "overview of", or "documentation about"
127
165
  - Do not mechanically reuse the H1 as the description.
128
166
 
129
167
  ## Emphasis and dividers
@@ -134,8 +172,9 @@ When frontmatter carries a short `title` or `description` used for catalog displ
134
172
  ## Links and file references
135
173
 
136
174
  - Use descriptive anchor text for links. Avoid `click here` or `read more`.
137
- - Wrap file references in backticks by default. Use a labeled markdown link (`[label](path)`) only on rendered-for-human surfaces (`README.md`, `docs/`) and in an index file, whose rows exist to be followed. Never repeat the path verbatim as the label.
138
- - A relative link's destination resolves against the filesystem, over the same corpus the ban scan reads. A destination carrying a template placeholder in angle brackets, such as `<slug>` or `<name>`, reads as an illustration rather than a literal path and is exempt.
175
+ - Wrap file references in backticks by default. Never repeat the path verbatim as a link label.
176
+ - Use a labeled markdown link (`[label](path)`) only on rendered-for-human surfaces (`README.md`, `docs/`) and in an index file, whose rows exist to be followed
177
+ - A relative link resolves against the filesystem over the corpus the ban scan reads, and one carrying a placeholder in angle brackets, such as `<slug>`, is an exempt illustration
139
178
 
140
179
  ## Examples
141
180
 
@@ -144,29 +183,19 @@ Each pair shows a banned pattern and its fix.
144
183
  ```markdown
145
184
  Bad: See [canon/context/retrieval.md](canon/context/retrieval.md) for the retrieval flow.
146
185
  Good: See `canon/context/retrieval.md` for the retrieval flow.
147
- ```
148
186
 
149
- ```markdown
150
187
  Bad: Read [docs/development.md](docs/development.md) before contributing.
151
188
  Good: Read the [development guide](docs/development.md) before contributing.
152
- ```
153
189
 
154
- ```markdown
155
190
  Bad: In order to configure the server, you'll need to ensure that the port is set.
156
191
  Good: Set `port` in the server config.
157
- ```
158
192
 
159
- ```markdown
160
193
  Bad: It's not just a cache. It's a system for intelligent memory management.
161
194
  Good: The cache is an LRU store. It evicts the least-recently-used entry when full.
162
- ```
163
195
 
164
- ```markdown
165
196
  Bad: Leveraging the retry mechanism, developers can build more resilient integrations.
166
197
  Good: Use the `retry` option for failed webhooks. Set `maxRetries` to 3.
167
- ```
168
198
 
169
- ```markdown
170
199
  Bad: It might be worth considering whether to enable caching.
171
200
  Good: Enable caching for read-heavy endpoints. Skip it for writes.
172
201
  ```
@@ -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