@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
@@ -7,11 +7,9 @@ metadata:
7
7
 
8
8
  # Design taste
9
9
 
10
- A model with no stated direction draws the population average of what it has seen. That is why unguided design output reads as templated while satisfying every rule of craft it was given, and it is why adding more craft rules does not fix it. This skill carries the direction: where a decision sits, what settles before it, and which defaults to reach past.
10
+ A model with no stated direction draws the population average of what it has seen, so unguided output reads as templated while satisfying every craft rule, and more craft rules do not fix it. This skill carries the direction: where a decision sits, what settles before it, and which defaults to reach past.
11
11
 
12
- Load this before drafting rather than after. A revision pass recovers a color and never recovers the composition the draft already settled.
13
-
14
- Skip it for work that does not change how something looks, feels, moves, or is interacted with.
12
+ Load this before drafting rather than after, since a revision pass recovers a color and never the composition the draft already settled. Skip it for work that does not change how something looks, feels, moves, or is interacted with.
15
13
 
16
14
  ## The defaults you are reaching past
17
15
 
@@ -25,6 +23,8 @@ This is what the population average looks like. Each one is what gets drawn when
25
23
 
26
24
  ### Details and copy
27
25
 
26
+ The rest of the ten sit in the details and the copy.
27
+
28
28
  - A colored dot before every navigation item, row or badge.
29
29
  - A glow standing in for elevation, on a pure black or pure white ground.
30
30
  - A product screenshot built out of styled rectangles.
@@ -53,9 +53,10 @@ Put the read to the operator through the structured question surface where it ge
53
53
 
54
54
  ## The layers, and the order they settle
55
55
 
56
- A lower layer constrains every layer above it. Two consequences follow, they run in opposite directions, and collapsing them is the mistake worth avoiding.
56
+ A lower layer constrains every layer above it. Two consequences follow in opposite directions, and collapsing them is the mistake worth avoiding.
57
57
 
58
- Settling a higher layer over a broken lower one changes nothing, which is why a palette round against a broken composition is wasted. Judging a lower layer through a finished higher one is nearly impossible, which is why grey-boxing works.
58
+ - Settling a higher layer over a broken lower one changes nothing, which is why a palette round against a broken composition is wasted
59
+ - Judging a lower layer through a finished higher one is nearly impossible, which is why grey-boxing works
59
60
 
60
61
  The model is Jesse James Garrett's five planes from _The Elements of User Experience_ (2000), subdivided to the granularity a drafting round works at.
61
62
 
@@ -73,10 +74,11 @@ The model is Jesse James Garrett's five planes from _The Elements of User Experi
73
74
 
74
75
  ### What follows from the order
75
76
 
76
- - Work at the lowest layer the complaint reaches. A complaint is voiced at the layer a person can name and usually lives lower. "It feels gloomy" reads as palette and is frequently composition, since a page with one section shape reads flat whatever color it is.
77
+ Work at the lowest layer the complaint reaches. A complaint is voiced at the layer a person can name and usually lives lower, so "it feels gloomy" reads as palette and is frequently composition, since a page with one section shape reads flat whatever its color.
78
+
77
79
  - A round varies one layer and says which. Varying three answers nothing, because the pick cannot say which difference decided it.
78
- - Never settle a higher layer before the one below it. Imagery and palette are the one pair that settle together, since a real photograph sets a ground rather than accepting one.
79
- - Content leads the order and is frequently absent when drafting starts. Draft against real copy where it exists, stand in for it where it does not, and treat the composition as unsettled until real copy has run through it.
80
+ - Never settle a higher layer before the one below it. Imagery and palette settle together, since a real photograph sets a ground rather than accepting one.
81
+ - Content leads the order and is often absent at the start. Draft against real copy where it exists, stand in where it does not, and treat the composition as unsettled until real copy runs through it.
80
82
  - Name the layer the complaint sits at, then check the layers below are settled. Where one is not, that is the round, and say so rather than drafting the requested one.
81
83
 
82
84
  ## Grey-box when judging layers 1 to 4
@@ -114,7 +116,7 @@ Never change these without saying so and getting agreement, because each one bre
114
116
 
115
117
  ## Setting up the scales
116
118
 
117
- Read `${CLAUDE_SKILL_DIR}/references/systems.md` when establishing or revising what a surface draws from, being the space scale, the type scale, and the relationships a palette holds. Every other reference here is read against a draft. That one is read before there is one, so a project reaches for it at the start and on a system revision rather than on an ordinary round.
119
+ Read `${CLAUDE_SKILL_DIR}/references/systems.md` when establishing or revising what a surface draws from, being the space scale, the type scale, and the relationships a palette holds. Every other reference is read against a draft, and this one before there is one, at the start and on a system revision.
118
120
 
119
121
  It states no values. A value belongs to the project's own stylesheet, and its intent to the design document.
120
122
 
@@ -122,7 +124,9 @@ It states no values. A value belongs to the project's own stylesheet, and its in
122
124
 
123
125
  Read `${CLAUDE_SKILL_DIR}/references/tells.md` before handing over anything a model drafted, and whenever output satisfies every rule here and still reads generic. The ten above are the common cases. It holds the rest, plus the countable composition limits and the first-screen budget.
124
126
 
125
- Skip `tells.md` on a small change to a surface with a settled direction. The catalog is a diagnostic and costs a read on every invocation that does not need one.
127
+ Skip `tells.md` on a small change to a surface with a settled direction, since the catalog is a diagnostic and costs a read wherever it is not needed.
128
+
129
+ ### Source record
126
130
 
127
131
  Read `${CLAUDE_SKILL_DIR}/references/adopted.md` only when extending this guidance or arguing against a rule in it. It records which external catalog items were adopted, which declined, and why.
128
132
 
@@ -150,6 +154,8 @@ Run `${CLAUDE_SKILL_DIR}/references/preflight.md` against the output. It is the
150
154
 
151
155
  ### Other skills
152
156
 
157
+ Four neighbors own the rest.
158
+
153
159
  - The candidate loop, the arm set, the render, and the pick: `draft-and-pick`
154
160
  - The shape of the project's design document and where its values live: `${CLAUDE_SKILL_DIR}/../canvas-board/references/design.md`
155
161
  - Reading source for roughness: `ux-audit`. Measuring what a running interface costs to paint: `ux-measure`
@@ -22,6 +22,7 @@ The quiet one is the baseline. A diff resolved against a bare local ref equals H
22
22
  - Say so in the output when the baseline degrades, rather than reporting a clean pass off a set it could not build
23
23
  - Discover the doc set by glob at run time
24
24
  - Classify and rewrite at section level, so a partly stale file is partly rewritten
25
+ - Mark a section stale only when the diff changes what a caller sees, since a page rewritten on every internal change starts carrying the reasons behind it
25
26
  - Write immediately after the preview, since the tool permission dialog is the confirmation gate
26
27
 
27
28
  ## Must not
@@ -29,7 +29,9 @@ The baseline is unusable in two cases:
29
29
  - No merge base resolves against either ref.
30
30
  - The base equals HEAD, whichever ref resolved it. Nothing is committed ahead of the base to compare against. This is the ordinary shape on `main`, and on a feature branch before its first commit.
31
31
 
32
- An unusable baseline costs only the committed half. `git diff --cached <base>` degrades to the staged set and `git status --short` still reports the working tree, so both reads stay at this skill's own scope. Say so in the preview with `⚠ Baseline unusable. Synced against the uncommitted set only.` The base ref is the only thing this change touches, and the `--cached` scope stays.
32
+ An unusable baseline costs only the committed half. `git diff --cached <base>` degrades to the staged set and `git status --short` still reports the working tree, so both reads stay at this skill's own scope.
33
+
34
+ Say so in the preview with `⚠ Baseline unusable. Synced against the uncommitted set only.` The base ref is the only thing this change touches, and the `--cached` scope stays.
33
35
 
34
36
  ## Context
35
37
 
@@ -41,7 +43,8 @@ Run these commands in parallel:
41
43
 
42
44
  ## Guards
43
45
 
44
- - If `git diff --cached <base>` output is empty and `git status --short` output is empty, stop: `❌ No changes since main. Nothing to sync.` Resolve the base ref first. A guard reading bare local `main` stops the skill on `main` before it reaches the corrected read.
46
+ - If `git diff --cached <base>` output is empty and `git status --short` output is empty, stop: `❌ No changes since main. Nothing to sync.`
47
+ - Resolve the base ref first, since a guard reading bare local `main` stops the skill on `main` before it reaches the corrected read
45
48
 
46
49
  ## Discovery
47
50
 
@@ -56,9 +59,9 @@ Read each discovered file in parallel.
56
59
 
57
60
  For each discovered doc, classify as one of:
58
61
 
59
- - `stale`: the diff touches something the doc describes
62
+ - `stale`: the diff changes something a caller sees in what the doc describes, being a flag, the output, a refusal, or how commands chain
60
63
  - `departed`: the doc records a deliberate contract and the diff broke it
61
- - `unrelated`: no overlap between diff and doc content
64
+ - `unrelated`: no overlap between diff and doc content, or the diff changes only internals a caller never sees
62
65
 
63
66
  The split between `stale` and `departed` is whether the doc was describing or promising. A doc that trailed the code is `stale`. A doc stating a contract the code was meant to keep is `departed`, and rewriting it to match the diff would record the regression as the contract.
64
67
 
@@ -68,9 +71,16 @@ Classify at the section level, not the file level. A doc edited earlier in the s
68
71
 
69
72
  Rewrite only the stale sections. Do not touch sections unrelated to the diff.
70
73
 
71
- Write the updated file immediately after the preview. Claude Code's tool permission dialog is the confirmation gate. Do not wait for user input.
74
+ - Write the updated file immediately after the preview. Claude Code's tool permission dialog is the confirmation gate, so do not wait for user input.
75
+ - Never rewrite a `departed` section. Leave it as written and report it as a finding, since the repair belongs in the code rather than in the prose.
76
+
77
+ ## Audit
78
+
79
+ Run `canon markdown audit <path>` over every page this run rewrote, and fix each ban, density, and reference shape finding it reports per the markdown standard and the docs reference read above.
72
80
 
73
- Never rewrite a `departed` section. Leave it as written and report it as a finding, since the repair belongs in the code rather than in the prose.
81
+ - Fix a finding inside a section this run rewrote, then re-run the audit on that page until it reports none there
82
+ - Report a finding in a section the diff does not reach as an audit line in the summary, since the rule above leaves that section as it is
83
+ - Report a refusal or a missing subcommand as an audit line and continue
74
84
 
75
85
  ## Response format
76
86
 
@@ -95,4 +105,5 @@ One line per file, using the same relative path format as the preview table (e.g
95
105
  ✅ Updated: <relative-path>
96
106
  ⏭️ Skipped: <relative-path>
97
107
  ⚠️ Departed: <relative-path> records <the contract>, and the diff <what it did>. Left unwritten.
108
+ ⚠️ Audit: <relative-path>, <finding>
98
109
  ```
@@ -1,18 +1,21 @@
1
1
  ---
2
2
  title: Docs reference
3
- description: Reader and jurisdiction, frontmatter, page structure, what a page links out to, the diagram permission, and when a category earns a subfolder
3
+ description: Reader and jurisdiction, frontmatter, page structure, the command reference shape, what a page links out to, the diagram permission, and when a category earns a subfolder
4
4
  ---
5
5
 
6
6
  # Docs reference
7
7
 
8
8
  Applies to each authored reference page under `docs/`. Skip for `index.md` at any depth, which is generated rather than authored.
9
9
 
10
+ Its reader is an operator running what the project ships rather than developing it, or an agent reading the page cold from a project that consumes it. Neither has the source open, which separates a page from internal narrative, whose reader does, and from the front-door page, whose reader has not installed anything yet.
11
+
10
12
  ## Contents
11
13
 
12
14
  - [Scope](#scope)
13
15
  - [What a working docs page looks like](#what-a-working-docs-page-looks-like)
14
16
  - [Frontmatter](#frontmatter)
15
17
  - [Structure](#structure)
18
+ - [Reference pages](#reference-pages)
16
19
  - [Content](#content)
17
20
  - [Diagrams](#diagrams)
18
21
  - [Splitting the folder](#splitting-the-folder)
@@ -20,13 +23,11 @@ Applies to each authored reference page under `docs/`. Skip for `index.md` at an
20
23
 
21
24
  ## Scope
22
25
 
23
- Governs each authored reference page under `docs/`, whose reader is an operator running what the project ships rather than developing it, and an agent reading the page cold from a project that consumes it: the frontmatter a page carries, its structure, what it links out to rather than restating, whether it holds a diagram, and when a category earns a subfolder of its own.
24
-
25
- Neither reader has the source open. That is the whole of the distinction from internal narrative, whose reader does, and from the page a project puts at its front door, whose reader has not decided to install anything yet.
26
+ Governs each authored reference page under `docs/`, being the frontmatter a page carries, its structure, what it links out to rather than restating, whether it holds a diagram, and when a category earns a subfolder of its own.
26
27
 
27
28
  Does not govern:
28
29
 
29
- - The page a project puts at its front door, whose reader is deciding whether to commit at all: `readme.md`
30
+ - `README.md`, the page a project puts at its front door, whose reader is deciding whether to commit at all. It keeps its own voice and takes the density limits but not the no-why rule: `readme.md`
30
31
  - Per-domain internal narrative written for a reader with the source open: `context.md`
31
32
  - The drawing inside a Mermaid fence: `mermaid.md`
32
33
  - Voice, rhythm, and sentence construction: the `write-human` skill
@@ -48,10 +49,13 @@ A page failing these is non-conforming even when it satisfies every shape rule b
48
49
  - `title` (required): sentence case, naming the surface the page covers rather than the action a reader takes on it
49
50
  - `description` (required): one line naming what the page covers, which is what the folder's catalog shows beside the link
50
51
  - `category` (conditional): the shelf the page sits on in that catalog
52
+ - `kind` (optional): `reference` on a page documenting one command, which opts it into the shape under [Reference pages](#reference-pages)
51
53
 
52
54
  ### Declaring category
53
55
 
54
- - Declare `category` on every page in a folder where any page declares one. A grouped catalog writes the declared shelves and nothing else, so a page omitting the field beside a sibling that carries one is absent from the catalog with nothing reporting it.
56
+ A grouped catalog writes the declared shelves and nothing else, so `category` is all or nothing within a folder.
57
+
58
+ - Declare `category` on every page in a folder where any page declares one, since a page omitting it beside a sibling that carries one is absent from the catalog with nothing reporting it
55
59
  - Omit it on every page or on none. A folder where no page declares one lists flat, which is the right shape for a folder whose pages need no shelves.
56
60
  - Spell one shelf's value identically on every page sitting there. The grouping reads the literal string, so a second spelling opens a second shelf holding one page.
57
61
 
@@ -60,18 +64,35 @@ A page failing these is non-conforming even when it satisfies every shape rule b
60
64
  - Open with an H1 matching `title`, then one or two lines saying what the surface is, before any heading
61
65
  - Use `##` for major sections and `###` for subsections. Do not nest deeper.
62
66
  - Use sentence case for every heading, proper nouns aside
63
- - Lead with the invocation a reader came for. Background, rationale, and edge cases sit below it.
67
+ - Lead with the invocation a reader came for, with the edge cases below it
64
68
  - Write a command, a flag, or a field as something copyable, in a code span or a fence, never paraphrased into prose
65
69
 
70
+ ## Reference pages
71
+
72
+ A page marked `kind: reference` documents one command and holds a fixed set of parts. `canon markdown audit` checks the headings and tables on every marked page, and an unmarked page is never measured.
73
+
74
+ Write a reference page only for a command a person or a target project runs by hand. A command only a skill calls gets no page, since the calling skill and `<command> --help` cover it.
75
+
76
+ - Open with the H1, one or two lines on what the command does, and the command in a fence
77
+ - Follow with `## Output`, `## Refusals`, and `## See also`, each at most once and in that order, and no other H2. A page may leave one out.
78
+ - Use no H3. A part long enough to need one belongs on a page of its own.
79
+ - Point at `<command> --help` for flags rather than tabling them. A table whose first header cell is `Flag` or `Option` is a finding.
80
+ - Table the refusals by their `reason` where the command emits one
81
+
82
+ A guide walking a reader through several commands carries no marker and keeps free sections, held by the density limits and the no-why rule under [Content](#content).
83
+
66
84
  ## Content
67
85
 
86
+ - State how to use the surface and never why it was built that way. The why lives in the code and the pull request that changed it.
68
87
  - Write for a reader with no access to the source. A sentence that resolves only by opening a file belongs in internal narrative instead.
69
88
  - Name the failures a surface produces alongside the path that works. A page documenting success alone sends its reader to the source at the first refusal.
70
89
  - Link to the adjacent page rather than restating it. One page owns each surface, and a second copy drifts with nothing comparing the two.
71
90
 
72
91
  ### What to leave out
73
92
 
74
- - Do not restate output a command already prints, such as a full flag table. Name the command that prints it.
93
+ A page leaves out what its reader can get elsewhere or does not need yet.
94
+
95
+ - Do not restate what `<command> --help` prints, such as a flag table. Name the command and point at its help.
75
96
  - Do not carry the history of how a surface reached its shape. A page describes the surface as it stands, and the change that moved it is recorded wherever the project tracks work.
76
97
  - Do not carry contributor setup or the argument for adopting the project. Both are addressed to a reader who has not installed anything yet.
77
98
 
@@ -80,41 +101,53 @@ A page failing these is non-conforming even when it satisfies every shape rule b
80
101
  - Carry a diagram where the page describes a structure or a path the reader has to hold in their head at once. One per page at most, and none is a correct answer for most pages.
81
102
  - Draw it as a Mermaid fence or as a committed image the page references. Neither form is preferred, and the pick belongs to whoever knows which one the page's reader reads it in.
82
103
  - Follow `mermaid.md` for the drawing inside a fence. It reaches the drawing and stops at the fence markers, so everything around it stays this file's subject.
83
- - Do not write the drawing as raw inline markup. A rendering host strips markup outside its own allowlist, so an inline drawing survives a local preview and vanishes on the surface the page is read from.
104
+ - Do not write the drawing as raw inline markup. A rendering host strips markup outside its allowlist, so an inline drawing survives a local preview and vanishes where the page is read.
84
105
  - Say beneath the diagram, in prose, what it shows. A reader who cannot see the image gets the same answer from the sentence.
85
106
 
86
107
  ## Splitting the folder
87
108
 
88
- - Move a `category` into a subfolder once its pages stop reading as a list in the catalog and start reading as a section of one. The shelf is the signal, not a file count, and a count invites an argument about the count instead.
109
+ Move a `category` into a subfolder once its pages stop reading as a list in the catalog and start reading as a section of one. The shelf is the signal, not a file count, since a count invites an argument about the count instead.
110
+
89
111
  - Move every page carrying that value. A shelf split across two depths is harder to scan than either arrangement taken whole.
90
- - Give the subfolder a catalog page of its own, so the parent lists one entry where it listed several. The parent lists a subfolder as a folder rather than as a member of the shelf it replaced, so nothing on that page restores the grouping.
112
+ - Give the subfolder a catalog page of its own, so the parent lists one entry where it listed several, as a folder rather than as a member of the shelf it replaced
91
113
  - Retarget every link into a moved page in the same change. A link resolving nowhere is what the move costs, and nothing else reports it.
92
114
  - Name a moved page per the `codebase-layout` skill, which drops the prefix the subfolder now states.
93
115
 
94
116
  ## Template
95
117
 
96
- ```markdown
118
+ A command reference page, in the four-part shape:
119
+
120
+ ````markdown
97
121
  ---
98
122
  title: <Surface>
99
123
  description: <one line naming what this page covers>
100
124
  category: <the shelf this page sits on, carried by every sibling or by none>
125
+ kind: reference
101
126
  ---
102
127
 
103
128
  # <Surface>
104
129
 
105
- <One or two lines on what the surface is and when a reader reaches for it.>
130
+ <One or two lines on what the command does and who calls it.>
106
131
 
107
- ## <The invocation>
132
+ ```bash
133
+ <the command, spelled to copy>
134
+ ```
108
135
 
109
- `<the command or field, spelled to copy>`
136
+ Run `<command> --help` for every flag.
110
137
 
111
- <What it does and what it produces.>
138
+ ## Output
112
139
 
113
- ## <Refusals>
140
+ <What the command prints or writes, with one example where the shape is not obvious.>
114
141
 
115
- - `<the condition>`: <what the reader sees, and what to do about it>
142
+ ## Refusals
116
143
 
117
- ## <Adjacent surface>
144
+ Branch on `reason` in the record, not the exit code.
118
145
 
119
- <Where the reader goes for the thing this page stops at.>
120
- ```
146
+ | Reason | Meaning |
147
+ | ---------- | -------------------------------------- |
148
+ | `<reason>` | <what the reader sees, and what to do> |
149
+
150
+ ## See also
151
+
152
+ - `<adjacent command or page>`: <what it covers that this page stops at>
153
+ ````
@@ -5,7 +5,10 @@ description: Readme voice, structure, and content conventions
5
5
 
6
6
  # Readme reference
7
7
 
8
- Applies to every `README.md`. The `## Voice` section states the voice for a repository's root README, so the `write-human` skill yields to it there. The yield covers voice alone. The rhythm and density rules that skill carries stay in force, as does the word-choice guidance that travels with them, and so do the punctuation and formatting in `markdown.md`, so the warmer register ships with the same hygiene: no em dashes, no semicolons, no marketing words.
8
+ Applies to every `README.md`. The `## Voice` section states the voice for a repository's root README, so the `write-human` skill yields to it there, for voice alone.
9
+
10
+ - The rhythm, density, and word-choice rules that skill carries stay in force
11
+ - The punctuation, formatting, and density limits in `markdown.md` stay in force too, so the warmer register ships with no em dashes, no semicolons, and no marketing words
9
12
 
10
13
  The reader is what changes. Reference prose serves someone who already committed to the project and is scanning for a fact. A root README meets someone deciding whether to commit at all, and it is often the only file they read.
11
14
 
@@ -54,6 +57,8 @@ Scoped to the README at a repository root. A nested README documenting a folder,
54
57
 
55
58
  ### Leave out
56
59
 
60
+ A README links to the surface that owns long-form material rather than carrying it.
61
+
57
62
  - Do not include full API documentation. Link to separate docs instead.
58
63
  - Do not include license text. Reference the `LICENSE` file.
59
64
  - Do not include detailed contribution guidelines. Reference `CONTRIBUTING.md`.
@@ -61,8 +66,12 @@ Scoped to the README at a repository root. A nested README documenting a folder,
61
66
 
62
67
  ### Routing and generator output
63
68
 
64
- - A README that points to the project's own context entries instead of restating them satisfies the required list by routing rather than carrying. A repository documented in `docs/` or `canon/context/` names the entry point and the listing command, then stops. The reader is one hop away, the same way `## Badges` treats zero as complete.
65
- - A README missing an H1, or whose headings restate the tool that scaffolded it rather than the project, is unedited generator output rather than a page anyone wrote. Draft over it. Nothing here asks a session to preserve a section a scaffold wrote and nobody replaced.
69
+ A README can satisfy the required list by routing to the project's own context entries rather than restating them.
70
+
71
+ - A repository documented in `docs/` or `canon/context/` names the entry point and the listing command, then stops, since the reader is one hop away
72
+ - That counts as complete the same way `## Badges` treats zero as complete
73
+ - A README missing an H1, or whose headings restate the tool that scaffolded it rather than the project, is unedited generator output. Draft over it.
74
+ - Nothing here asks a session to preserve a section a scaffold wrote and nobody replaced
66
75
 
67
76
  ### Header block
68
77
 
@@ -73,7 +82,7 @@ The opening of a root README is a block of up to six elements in a fixed order.
73
82
  3. Badges: the block `### Badges` below governs, placed directly under the title.
74
83
  4. Claim: one line saying what the project does, taken from the manifest description or the repository description.
75
84
  5. Live link: the URL of the running surface, from a `homepage` field or a deploy config. Omit it when the project has no page or no known URL.
76
- 6. Product screenshot: an image the project already commits and references, shown with alt text naming what it depicts. Present only when the project has a page. Omit it when no such image exists rather than writing a placeholder path.
85
+ 6. Product screenshot: an image the project already commits, with alt text naming what it depicts. Present only when the project has a page, and omitted rather than given a placeholder path.
77
86
 
78
87
  The description of 2-3 sentences follows the block and expands the claim rather than repeating it.
79
88
 
@@ -81,7 +90,9 @@ The description of 2-3 sentences follows the block and expands the claim rather
81
90
  - A project whose own page carries the screenshot omits it here and keeps the live link, which answers the slot rather than skipping it. Say so in the pull request that drops it.
82
91
  - The order is the block's rather than the page's. The screenshot sits last inside the block, which puts it in the first row of content a reader meets below the title, badges, and claim.
83
92
 
84
- #### Themes and wrappers
93
+ ### Themes and wrappers
94
+
95
+ The block takes a project's styling as it is and adds nothing of its own.
85
96
 
86
97
  - A themed light and dark pair counts as one element in the slot rather than two. The block does not require a pair and leaves the handling of themes to the project.
87
98
  - Centering the block in an HTML wrapper is optional. Plain markdown reaches every host a README renders on, and a wrapper is styling a project can add.
@@ -99,11 +110,16 @@ Stars, forks, download counts, language chips, and "made with" badges fail. The
99
110
 
100
111
  - Cap the block at four. A fifth costs more scanning than any badge repays.
101
112
  - Give each badge alt text naming what it reports rather than the service that renders it. Write `npm version`, not `shields.io`.
102
- - Link each badge to the page a doubting reader would check next, which is the registry listing for a version badge and the run history for a status badge. A red badge with no route to the failing run reports a problem and withholds the only thing the reader wants.
113
+ - Link each badge to the page a doubting reader would check next, which is the registry listing for a version badge and the run history for a status badge
114
+ - A red badge with no route to the failing run reports a problem and withholds the only thing the reader wants
115
+
116
+ ### Pinning and verifying
103
117
 
104
- #### Pinning and verifying
118
+ A badge reports a fact only when its source runs where the badge says and the value it renders is checked.
105
119
 
106
- - Pin a status badge to the branch whose health it claims to report, and confirm the workflow actually runs on that branch. A workflow triggered by pull requests alone never runs on the default branch, so an unpinned badge reports whichever branch ran last and a pinned one reports nothing at all. Fix the trigger, or drop the badge under the rule below.
120
+ - Pin a status badge to the branch whose health it claims to report, and confirm the workflow actually runs on that branch
121
+ - A workflow triggered by pull requests alone never runs on the default branch, so an unpinned badge reports whichever branch ran last and a pinned one reports nothing at all
122
+ - Fix the trigger, or drop the badge under the zero-badge rule below
107
123
  - Verify a badge by the value it renders, not by its status code. A badge service answers 200 for a query it cannot satisfy, so a blank badge and a working one look identical to a status check.
108
124
  - Zero badges is a correct answer. A private project with no registry presence and no CI has nothing that passes the test, and an empty block beats a padded one.
109
125
 
@@ -115,6 +131,8 @@ Stars, forks, download counts, language chips, and "made with" badges fail. The
115
131
 
116
132
  ### Per project kind
117
133
 
134
+ Each kind of project owes its reader a different first snippet.
135
+
118
136
  - For libraries/tools: include API quickstart
119
137
  - For applications/products: include usage instructions and configuration options
120
138
  - For CLI tools: include command examples with flags
@@ -127,6 +145,8 @@ A project is often several of these at once. Cover every type that applies rathe
127
145
 
128
146
  ### Template
129
147
 
148
+ A README a scaffold would start from, with the required sections and the optional ones most projects carry.
149
+
130
150
  ````markdown
131
151
  # Project Name
132
152
 
@@ -171,6 +191,8 @@ See the [contributing guidelines](CONTRIBUTING.md).
171
191
 
172
192
  ### Correct
173
193
 
194
+ Each line names what it is and links what it cites.
195
+
174
196
  ```plaintext
175
197
  Lightweight authentication library for Node.js with OAuth2 and JWT support. # one line naming what it is
176
198
  ## Quick start # sentence case, a runnable snippet follows
@@ -179,6 +201,8 @@ Lightweight authentication library for Node.js with OAuth2 and JWT support. # o
179
201
 
180
202
  ### Incorrect
181
203
 
204
+ Each line pitches, pads, or inlines what belongs elsewhere.
205
+
182
206
  ```plaintext
183
207
  ## Why Use This? # title case, and a pitch rather than a feature list
184
208
  Simply run the following command to install: # filler qualifier before the command
@@ -16,7 +16,7 @@ Three axes carry the report. Two answer from a verb and the third answers from a
16
16
  - `canon` absent from the path: stop. `❌ canon is not on PATH, so neither measured axis can be read.`
17
17
  - `git ls-files '*.md'` listing nothing: stop. `❌ No tracked markdown here, so there is no corpus to read.`
18
18
  - Run every command under `CANON_NON_INTERACTIVE=1` and prompt at no point. A caller reaching this from a rollout wave has nobody present to answer.
19
- - Branch on each record's own fields rather than on an exit status. An operator's shell profile may wrap `canon` in a function whose status comes from a trailing command, which reports every refusal as success.
19
+ - Branch on each record's own fields rather than on an exit status, since a shell profile may wrap `canon` in a function whose trailing command reports every refusal as success
20
20
  - Repair nothing, write no file in the project, and open no pull request. Whoever read the report decides what to fix.
21
21
 
22
22
  ## Step 1: scope the corpus
@@ -51,9 +51,8 @@ Take the checkpoints from the record each verb returns rather than from a number
51
51
 
52
52
  A refusal, an absent key, and a subcommand the project's binary does not carry each leave an axis unread. Report it as unread against the documents it would have covered, name the read that could not be taken, and name the cause.
53
53
 
54
- `canon context audit` refuses with `reason: "no-folders"` in a project whose folders resolve to nothing, which is the ordinary shape where the layout differs from the one the verb looks for. That refusal is the honest answer rather than a failure, and reading it as an empty finding set reports a healthy corpus for documents nothing looked at.
55
-
56
- A narrower read is not an unread one. The sweep running on its regex layer alone still answered, so it is reported with the layer named rather than as an axis nothing reached.
54
+ - `canon context audit` refuses with `reason: "no-folders"` where the layout is not the expected one. Reading that honest refusal as an empty finding set reports a healthy corpus nothing looked at.
55
+ - A narrower read is not an unread one. The sweep running on its regex layer alone still answered, so report it with the layer named.
57
56
 
58
57
  ## Step 3: read the staleness axis
59
58