@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
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: Stacked split commands and merge loop
3
+ description: The final commands git-split runs in stacked mode, basing each branch on the one before it, and the restack loop run after each merge
4
+ ---
5
+
6
+ # Stacked split commands and merge loop
7
+
8
+ Applies to a `git-split` run whose preview reads `Mode: Stacked`, where the groups are ordered and each depends on the commits before it.
9
+
10
+ ## Final commands
11
+
12
+ Base each branch on the previous one and cherry-pick only that group's commits, since the base branch already carries every prior commit.
13
+
14
+ ```bash
15
+ # Rename current branch to reflect primary concern
16
+ git branch -m <current_branch> <new_name>
17
+
18
+ mkdir -p .canon/tmp/pr/split
19
+
20
+ # Group 1: based on main
21
+ git switch -c <branch-1> main && git cherry-pick <g1-sha> <g1-sha> \
22
+ && git push -u origin <branch-1> \
23
+ && (cat <<'BODY' > .canon/tmp/pr/split/<branch-1>.md
24
+ <body following pr.md template, written from the cherry-picked commits>
25
+ BODY
26
+ ) && gh api -X POST 'repos/{owner}/{repo}/pulls' -f title="<title>" -f head=<branch-1> -f base=main -F body=@.canon/tmp/pr/split/<branch-1>.md --jq .html_url \
27
+ && printf 'opened=true\n' \
28
+ && rm .canon/tmp/pr/split/<branch-1>.md
29
+
30
+ # Group 2: based on <branch-1>, this group's commits only
31
+ git checkout -b <branch-2> && git cherry-pick <g2-sha> <g2-sha> \
32
+ && git push -u origin <branch-2> \
33
+ && (cat <<'BODY' > .canon/tmp/pr/split/<branch-2>.md
34
+ <body following pr.md template, written from the cherry-picked commits>
35
+ BODY
36
+ ) && gh api -X POST 'repos/{owner}/{repo}/pulls' -f title="<title>" -f head=<branch-2> -f base=<branch-1> -F body=@.canon/tmp/pr/split/<branch-2>.md --jq .html_url \
37
+ && printf 'opened=true\n' \
38
+ && rm .canon/tmp/pr/split/<branch-2>.md
39
+
40
+ # Return to primary branch, push, and open its PR on the last group's branch
41
+ git checkout <new_name> && git push -u origin <new_name> \
42
+ && (cat <<'BODY' > .canon/tmp/pr/split/<new_name>.md
43
+ <body following pr.md template, written from the primary's commits>
44
+ BODY
45
+ ) && gh api -X POST 'repos/{owner}/{repo}/pulls' -f title="<title>" -f head=<new_name> -f base=<branch-2> -F body=@.canon/tmp/pr/split/<new_name>.md --jq .html_url \
46
+ && printf 'opened=true\n' \
47
+ && rm .canon/tmp/pr/split/<new_name>.md
48
+
49
+ # Clean up the body-file dir if all PRs succeeded (no-op when non-empty)
50
+ rmdir .canon/tmp/pr/split 2>/dev/null || true
51
+ ```
52
+
53
+ ## Stacked merge loop
54
+
55
+ When the user signals the previous stacked PR has merged, restack the next one.
56
+
57
+ 1. Rebase and push, taking the own-commit-count from the original split table:
58
+
59
+ ```bash
60
+ git fetch origin main && git checkout <branch> && git rebase --onto origin/main HEAD~<own-commit-count> && git push --force-with-lease
61
+ ```
62
+
63
+ 2. Verify the base auto-retargeted to main with `gh api repos/{owner}/{repo}/pulls/<num> --jq .base.ref`. If not, run `gh api -X PATCH repos/{owner}/{repo}/pulls/<num> -f base=main --silent`.
64
+ 3. Reply: `✅ <branch> rebased onto main. Ready for squash-merge.`
65
+
66
+ Both reads go through REST, which a cloud session's GitHub proxy serves where it refuses GraphQL.
67
+
68
+ ### Edge cases
69
+
70
+ Two states change the loop.
71
+
72
+ - If this branch's commits modify a file added by an unmerged upstream PR, wait for that PR to merge before rebasing
73
+ - If a base-branch deletion orphaned the PR, recreate it with the final commands' create on `-f head=<branch> -f base=main` and a fresh body, then print `opened=true`
@@ -34,10 +34,14 @@ Run these commands in parallel to gather git context:
34
34
 
35
35
  ### Order and commands
36
36
 
37
+ Order and stage the groups so each commit lands whole.
38
+
37
39
  - Order commits by dependency: commit dependencies before the files that import them.
38
40
  - Prefix the full command sequence with `git restore --staged .` to unstage everything, then stage and commit each group in order.
39
41
  - For `D` status files, use `git rm <file>`. For `A` or `M` files, use `git add <file>`.
40
- - For `R<score>` status rows, `--name-status` emits three tab-separated fields: `R<score>\t<old>\t<new>`. Treat the pair as one file, keep both paths in the same group, and restage them together with `git add <old> <new>` so git detects the rename at commit time. Splitting the pair across groups produces an add-plus-delete pair instead of a rename.
42
+ - For `R<score>` status rows, `--name-status` emits three tab-separated fields, `R<score>\t<old>\t<new>`
43
+
44
+ Treat a rename pair as one file. Keep both paths in one group and restage them with `git add <old> <new>`, so git detects the rename at commit time rather than recording an add plus a delete.
41
45
 
42
46
  ## Response format
43
47
 
@@ -53,12 +57,12 @@ Run these commands in parallel to gather git context:
53
57
 
54
58
  **All <total> files accounted for.**
55
59
 
56
- Count characters in each `<type>(<scope>): <subject>` line. Shorten any subject that exceeds 72 characters and update the table.
57
-
58
- After outputting the preview, execute the final command immediately. Claude Code's tool permission dialog is the confirmation gate. Do not wait for user input.
60
+ Count characters in each `<type>(<scope>): <subject>` line, shortening any subject past 72 characters and updating the table. Then execute the final command immediately without waiting for user input, since Claude Code's tool permission dialog is the confirmation gate.
59
61
 
60
62
  ### Final command
61
63
 
64
+ Run it as soon as the preview is out.
65
+
62
66
  ```bash
63
67
  git restore --staged .
64
68
  # Commit 1: <subject>
@@ -71,8 +75,6 @@ git add <old> <new> && git commit -m "<type>(<scope>): <subject>"
71
75
 
72
76
  ## After execution
73
77
 
74
- Respond with exactly one line:
78
+ Respond with exactly one line and add no other text:
75
79
 
76
80
  `✅ Committed: <n> commits`
77
-
78
- Do not add any other text.
@@ -49,17 +49,32 @@ For each row, determine merge state of its branch:
49
49
  - `OPEN`: state is `open`, record PR number and URL.
50
50
  - `CLOSED`: state is `closed` (not merged), record PR number.
51
51
  - Command fails or returns no PR: fall through.
52
- 3. Fallback: `git branch --merged main --format='%(refname:short)' 2>/dev/null | grep -qx "<branch>"` to detect linear-merge ancestry. On match, mark `merged (local)`. Otherwise `unmerged`. Match the name alone. Without `--format`, git decorates the current branch with `*` and every branch checked out in a linked worktree with `+`, which is the whole set being enumerated.
52
+ 3. Fallback: `git branch --merged main --format='%(refname:short)' 2>/dev/null | grep -qx "<branch>"`. On match, mark `merged (local)`, otherwise `unmerged`.
53
53
 
54
- Determine dirtiness: `git -C <path> status --porcelain` non-empty means `dirty`.
54
+ Match the name alone in the fallback. Without `--format`, git decorates the current branch with `*` and every branch checked out in a linked worktree with `+`, which is the whole set being enumerated.
55
55
 
56
- Determine current: the row whose `path` equals `git rev-parse --show-toplevel`. Resolve the root rather than comparing `pwd`, which equals the worktree root only when the session sits at the top of it. A session in any subdirectory would match no row, and the current-worktree exclusion in `cleanup` would pass its own worktree into the remove set.
56
+ ### Dirty, current, and foreign
57
57
 
58
- Determine provenance: a non-main row is `foreign` when its `path` does not start with `<MAIN_ROOT>/.claude/worktrees/`. That prefix is the folder `session-worktree` creates under, a convention of that skill rather than a fact this one owns. A tree an operator registered by hand anywhere else on disk reads as `foreign`. Step 1 has already marked the main row `main`, so it never reaches this test.
58
+ Three more marks come from the row's own path.
59
59
 
60
- Determine occupancy: run `canon sessions list --json` once for the whole enumeration, never once per row. Resolve each enumerated row's `path` and each live session's `worktree` field with `realpath` before comparing, since a session registered from a second clone of this repository reports a path under that clone rather than under `MAIN_ROOT`, and a raw string compare would hold nothing back. A row is `occupied` when a resolved `worktree` from any live session equals its resolved `path`. A resolved session `worktree` outside `MAIN_ROOT` names a different checkout, so it clears no row here and marks none as occupied.
60
+ | Mark | Test |
61
+ | --------- | -------------------------------------------------------------------------------- |
62
+ | `dirty` | `git -C <path> status --porcelain` is non-empty |
63
+ | current | `path` equals `git rev-parse --show-toplevel` |
64
+ | `foreign` | A non-main row whose `path` does not start with `<MAIN_ROOT>/.claude/worktrees/` |
61
65
 
62
- The roster is unreadable when the command exits non-zero, when its JSON carries a `reason` field instead of a populated `sessions` array, or when `sessions` is non-empty but no entry carries a `worktree` key at all, which is the shape an older binary prints and cannot be told apart from a roster answering that nothing is occupied. `list` leaves the Notes column silent on that failure rather than changing behavior beyond it. `cleanup` refuses instead, stated in its own section below.
66
+ Resolve the root rather than comparing `pwd`, which equals it only at the top of the worktree. A session in a subdirectory would match no row, and `cleanup` would pass its own worktree into the remove set.
67
+
68
+ The `foreign` prefix is the folder `session-worktree` creates under, a convention of that skill rather than a fact this one owns. A tree an operator registered by hand anywhere else reads as `foreign`, and the main row never reaches this test.
69
+
70
+ ### Occupancy
71
+
72
+ Run `canon sessions list --json` once for the whole enumeration, never once per row. A row is `occupied` when a live session's `worktree` equals its `path`.
73
+
74
+ - Resolve both sides with `realpath` before comparing, since a session from a second clone reports a path under that clone and a raw compare would hold nothing back
75
+ - A resolved session `worktree` outside `MAIN_ROOT` names a different checkout, so it marks no row occupied
76
+
77
+ The roster is unreadable when the command exits non-zero, when its JSON carries a `reason` instead of a populated `sessions` array, or when `sessions` is non-empty and no entry carries a `worktree` key. An older binary prints that last shape, which cannot be told apart from nothing occupied.
63
78
 
64
79
  ## `list` mode
65
80
 
@@ -70,7 +85,7 @@ Print the enumeration as a table, then stop. `list` has no final command.
70
85
  | -- | ---------------------------------- | ----------------- | -------- | ------ | -------- |
71
86
  ```
72
87
 
73
- Notes column shows the first that applies of `current`, `occupied`, `foreign`, `dirty`, or empty. Show paths relative to `MAIN_ROOT` (`.claude/worktrees/<name>`). A `foreign` row sits outside `MAIN_ROOT`, so print its path in full.
88
+ Notes column shows the first that applies of `current`, `occupied`, `foreign`, `dirty`, or empty. Show paths relative to `MAIN_ROOT` (`.claude/worktrees/<name>`), and a `foreign` row's path in full. An unreadable roster leaves the Notes column silent and changes nothing else.
74
89
 
75
90
  After the table, append a one-line hint:
76
91
 
@@ -79,54 +94,17 @@ After the table, append a one-line hint:
79
94
 
80
95
  ## `cleanup` mode
81
96
 
82
- If Enumeration marked the roster unreadable, stop: `❌ Session roster unreadable, so occupancy cannot be checked. Resolve the canon sessions list failure, then re-run cleanup.` Hold every non-main row rather than computing the remove set from the other five tests alone, since removing a tree a live session holds is the failure this skill exists to prevent and a sweep that removes nothing costs one re-run.
97
+ If Enumeration marked the roster unreadable, stop: `❌ Session roster unreadable, so occupancy cannot be checked. Resolve the canon sessions list failure, then re-run cleanup.`
83
98
 
84
- From the enumeration, include a worktree in the remove set when all hold:
85
-
86
- 1. Not the main row.
87
- 2. Not the current session's worktree.
88
- 3. Not occupied by a live session.
89
- 4. Not a `foreign` tree.
90
- 5. State is `merged` or `merged (local)`.
91
- 6. Working tree is clean.
92
-
93
- 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`. A `foreign` tree that is also dirty reports `foreign`, since `dirty` is a state the operator can clear and `foreign` is not. Leading with the transient reason invites a commit or stash that changes nothing, after which the row reports `foreign` and holds back anyway.
94
-
95
- ### Preview
96
-
97
- ```plaintext
98
- **Removing:** <count>
99
+ Hold every non-main row rather than computing the remove set from the other tests, since removing a tree a live session holds is the failure this skill exists to prevent, and a sweep that removes nothing costs one re-run.
99
100
 
100
- | Path | Branch | PR |
101
- | ---- | ------ | -- |
101
+ ### Remove set and final command
102
102
 
103
- **Skipping:** <count>
104
-
105
- | Path | Branch | Reason |
106
- | ---- | ------ | ------ |
107
- ```
108
-
109
- If the remove set is empty, stop with `❌ Nothing to remove. All linked worktrees are current, dirty, unmerged, or foreign.`
110
-
111
- ### Final command
112
-
113
- After the preview, execute immediately. Claude Code's tool permission dialog is the confirmation gate. Do not wait for user input.
114
-
115
- ```bash
116
- git -C <MAIN_ROOT> worktree remove <path1> \
117
- && git -C <MAIN_ROOT> branch -D <branch1> \
118
- && git -C <MAIN_ROOT> worktree remove <path2> \
119
- && git -C <MAIN_ROOT> branch -D <branch2> \
120
- && git -C <MAIN_ROOT> worktree prune
121
- ```
122
-
123
- Chain one `worktree remove` + `branch -D` pair per row in the remove set, then a single `worktree prune` at the end.
103
+ Read `${CLAUDE_SKILL_DIR}/references/cleanup.md` for the remove set, the skip reasons and their order, the preview, and the final command. `list` mode skips it.
124
104
 
125
105
  ## After execution
126
106
 
127
- Respond with exactly one line:
107
+ Respond with exactly one line and add no other text:
128
108
 
129
109
  - `list`: `✅ <n> worktrees listed`
130
110
  - `cleanup`: `✅ Removed: <count> worktrees, <count> branches pruned`
131
-
132
- Do not add any other text.
@@ -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,62 +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
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.
45
47
 
46
48
  ### Seams
47
49
 
48
- - 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.
49
- - 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.
50
- - 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.
51
- - 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.
52
58
 
53
59
  ### Exempt blocks
54
60
 
55
- - 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.
56
- - Mixing prose with that list, or nesting levels inside it, ends the exemption at any weight.
57
- - 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.
58
- - 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
59
68
 
60
69
  ### Bold section markers
61
70
 
62
- - 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.
63
- - 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.
64
- - 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.
65
72
 
66
- ## 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
67
77
 
68
- - Use prose by default. Reserve bullets for discrete, unrelated items.
69
- - Keep paragraphs to four sentences or fewer. Split longer blocks at the next logical boundary.
70
- - Past roughly 700 characters in one paragraph, folding in the lines that wrap it, split at the next logical boundary as well. A paragraph written as two long sentences satisfies the sentence cap above and still asks the reader to hold too much at once. 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
71
79
 
72
- ### 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.
73
81
 
74
- - 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, and a bullet reading well past it means the number is wrong rather than the rule.
75
- - 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.
76
- - 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.
77
- - 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.
78
- - 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
79
113
 
80
114
  ### Bullet form
81
115
 
116
+ A bullet's punctuation follows its sentence count, and a list opens unannounced.
117
+
118
+ - Use dashes (`-`) not asterisks (`*`) for bulleted lists
82
119
  - Do not end single-sentence or fragment bullets with a period. Use periods when a bullet has two or more sentences.
83
120
  - For key path lists, use colon format: `- \`src/\`: description`. Never use an em dash.
84
121
  - Do not introduce a list with a "Here are the X:" or "The following X:" lead-in
@@ -86,7 +123,7 @@ Does not govern:
86
123
  ## Code and identifiers
87
124
 
88
125
  - Wrap commands, API names, file paths, and code identifiers in backticks
89
- - 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 ` ``` `.
90
127
  - In ASCII tree diagrams, use `←` for inline annotations. Never use `#`.
91
128
 
92
129
  ## Dates
@@ -101,13 +138,14 @@ Does not govern:
101
138
 
102
139
  ## Language
103
140
 
104
- - Use American English spelling
105
- - 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.
106
144
  - Do not use the negative parallelism pattern (`It's not X, it's Y`, `not because X, but because Y`)
107
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).
108
146
  - Do not address the reader as a participant (`Let's`, `Here's`, `Here are`). State the content directly.
109
147
 
110
- ### Claims
148
+ A claim carries the weight its source gives it and no more.
111
149
 
112
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.
113
151
  - Do not inflate significance. State what a thing does rather than calling it `a major milestone` or `a turning point for the field`.
@@ -115,14 +153,15 @@ Does not govern:
115
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.
116
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.
117
155
 
118
- 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.
119
157
 
120
158
  ## Frontmatter descriptions
121
159
 
122
- When frontmatter carries a short `title` or `description` used for catalog display:
160
+ When frontmatter carries a `title` or `description` used for catalog display:
123
161
 
124
162
  - `title`: sentence case, identifies the file uniquely against its siblings in the same catalog. Proper nouns retain their casing. No trailing period.
125
- - `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"
126
165
  - Do not mechanically reuse the H1 as the description.
127
166
 
128
167
  ## Emphasis and dividers
@@ -133,8 +172,9 @@ When frontmatter carries a short `title` or `description` used for catalog displ
133
172
  ## Links and file references
134
173
 
135
174
  - Use descriptive anchor text for links. Avoid `click here` or `read more`.
136
- - 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.
137
- - 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
138
178
 
139
179
  ## Examples
140
180
 
@@ -143,29 +183,19 @@ Each pair shows a banned pattern and its fix.
143
183
  ```markdown
144
184
  Bad: See [canon/context/retrieval.md](canon/context/retrieval.md) for the retrieval flow.
145
185
  Good: See `canon/context/retrieval.md` for the retrieval flow.
146
- ```
147
186
 
148
- ```markdown
149
187
  Bad: Read [docs/development.md](docs/development.md) before contributing.
150
188
  Good: Read the [development guide](docs/development.md) before contributing.
151
- ```
152
189
 
153
- ```markdown
154
190
  Bad: In order to configure the server, you'll need to ensure that the port is set.
155
191
  Good: Set `port` in the server config.
156
- ```
157
192
 
158
- ```markdown
159
193
  Bad: It's not just a cache. It's a system for intelligent memory management.
160
194
  Good: The cache is an LRU store. It evicts the least-recently-used entry when full.
161
- ```
162
195
 
163
- ```markdown
164
196
  Bad: Leveraging the retry mechanism, developers can build more resilient integrations.
165
197
  Good: Use the `retry` option for failed webhooks. Set `maxRetries` to 3.
166
- ```
167
198
 
168
- ```markdown
169
199
  Bad: It might be worth considering whether to enable caching.
170
200
  Good: Enable caching for read-heavy endpoints. Skip it for writes.
171
201
  ```