@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.
- package/README.md +1 -1
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/SKILL.md +12 -9
- package/claude/skills/auto-ship/SKILL.md +43 -23
- package/claude/skills/backlog-triage/SKILL.md +62 -53
- package/claude/skills/backlog-triage/references/apply.md +69 -0
- package/claude/skills/build-in-slices/SKILL.md +8 -4
- package/claude/skills/canon-cli/SKILL.md +5 -1
- package/claude/skills/canon-feedback/SKILL.md +18 -8
- package/claude/skills/canon-feedback-triage/SKILL.md +10 -3
- package/claude/skills/canvas-board/SKILL.md +36 -17
- package/claude/skills/ci-workflow/SKILL.md +5 -4
- package/claude/skills/code-craft/SKILL.md +10 -6
- package/claude/skills/codebase-layout/SKILL.md +3 -5
- package/claude/skills/context-fold/REQUIREMENT.md +4 -4
- package/claude/skills/context-fold/SKILL.md +42 -23
- package/claude/skills/context-fold/references/context-refresh.md +4 -3
- package/claude/skills/context-fold/references/context.md +79 -64
- package/claude/skills/create-rule/SKILL.md +7 -3
- package/claude/skills/create-skill/SKILL.md +27 -7
- package/claude/skills/create-skill/references/skill-reference.md +41 -17
- package/claude/skills/decision-escalate/SKILL.md +8 -5
- package/claude/skills/deploy-app/SKILL.md +1 -1
- package/claude/skills/deprecation-migration/SKILL.md +12 -4
- package/claude/skills/design-taste/SKILL.md +17 -11
- package/claude/skills/docs-sync/REQUIREMENT.md +1 -0
- package/claude/skills/docs-sync/SKILL.md +17 -6
- package/claude/skills/docs-sync/references/docs.md +54 -21
- package/claude/skills/docs-sync/references/readme.md +32 -8
- package/claude/skills/document-health/SKILL.md +3 -4
- package/claude/skills/draft-and-pick/SKILL.md +73 -47
- package/claude/skills/draft-doc/SKILL.md +9 -4
- package/claude/skills/draft-doc/references/context.md +4 -4
- package/claude/skills/draft-doc/references/docs.md +1 -0
- package/claude/skills/draft-doc/references/wiki.md +3 -2
- package/claude/skills/draft-figure/SKILL.md +9 -7
- package/claude/skills/draft-identity/SKILL.md +24 -52
- package/claude/skills/draft-identity/references/card-route.md +46 -0
- package/claude/skills/draft-ready/SKILL.md +19 -7
- package/claude/skills/draft-screencast/SKILL.md +6 -112
- package/claude/skills/draft-screencast/references/beats-template.md +119 -0
- package/claude/skills/draft-slides/SKILL.md +7 -4
- package/claude/skills/git-branch/SKILL.md +3 -3
- package/claude/skills/git-commit/SKILL.md +5 -3
- package/claude/skills/git-followup/SKILL.md +16 -9
- package/claude/skills/git-issue/SKILL.md +6 -5
- package/claude/skills/git-issue/references/issue.md +11 -10
- package/claude/skills/git-pr/SKILL.md +56 -44
- package/claude/skills/git-ship/SKILL.md +43 -34
- package/claude/skills/git-ship/references/ci-watch.md +31 -0
- package/claude/skills/git-split/SKILL.md +28 -100
- package/claude/skills/git-split/references/independent.md +40 -0
- package/claude/skills/git-split/references/stacked.md +73 -0
- package/claude/skills/git-stage/SKILL.md +9 -7
- package/claude/skills/git-worktree/SKILL.md +27 -49
- package/claude/skills/git-worktree/references/cleanup.md +55 -0
- package/claude/skills/markdown-craft/SKILL.md +2 -2
- package/claude/skills/markdown-craft/references/markdown.md +82 -52
- package/claude/skills/plan-feature/SKILL.md +52 -46
- package/claude/skills/plan-feature/references/batches.md +46 -0
- package/claude/skills/plan-groundwork/SKILL.md +60 -74
- package/claude/skills/plan-groundwork/references/groundwork.md +53 -24
- package/claude/skills/plan-groundwork/references/output.md +48 -0
- package/claude/skills/plan-intake/SKILL.md +28 -21
- package/claude/skills/plan-intake-answer/SKILL.md +14 -13
- package/claude/skills/read-frames/SKILL.md +2 -0
- package/claude/skills/record-screencast/SKILL.md +31 -11
- package/claude/skills/review-address/SKILL.md +76 -158
- package/claude/skills/review-address/references/rebase-only.md +34 -0
- package/claude/skills/review-craft/SKILL.md +27 -11
- package/claude/skills/review-pr/SKILL.md +91 -40
- package/claude/skills/review-pr/references/post.md +1 -1
- package/claude/skills/review-ui/SKILL.md +62 -37
- package/claude/skills/review-ui/references/hosted-preview.md +30 -0
- package/claude/skills/role-orchestrator/SKILL.md +105 -74
- package/claude/skills/role-orchestrator/references/orchestrator-filing.md +26 -0
- package/claude/skills/role-orchestrator/references/orchestrator-parked.md +1 -1
- package/claude/skills/role-planner/SKILL.md +66 -64
- package/claude/skills/role-reviewer/SKILL.md +57 -46
- package/claude/skills/role-worker/SKILL.md +68 -63
- package/claude/skills/search-craft/SKILL.md +7 -5
- package/claude/skills/session-compact/SKILL.md +16 -11
- package/claude/skills/session-map/SKILL.md +31 -10
- package/claude/skills/session-relay/SKILL.md +32 -65
- package/claude/skills/session-resume/SKILL.md +18 -13
- package/claude/skills/session-worktree/SKILL.md +70 -42
- package/claude/skills/systematic-debugging/SKILL.md +6 -1
- package/claude/skills/target-check/SKILL.md +13 -6
- package/claude/skills/target-setup/SKILL.md +41 -30
- package/claude/skills/target-setup/references/verify.md +6 -5
- package/claude/skills/task-board/SKILL.md +68 -60
- package/claude/skills/task-board/references/create-report.md +36 -0
- package/claude/skills/task-board/references/tasks.md +3 -1
- package/claude/skills/task-complete/SKILL.md +20 -18
- package/claude/skills/teach-workspace/SKILL.md +61 -33
- package/claude/skills/test-craft/SKILL.md +2 -1
- package/claude/skills/test-first/SKILL.md +15 -9
- package/claude/skills/ui-checklist/SKILL.md +18 -16
- package/claude/skills/ux-audit/SKILL.md +9 -10
- package/claude/skills/ux-measure/SKILL.md +22 -18
- package/claude/skills/video-craft/SKILL.md +15 -7
- package/claude/skills/write-human/SKILL.md +9 -1
- package/claude/skills/youtube-transcripts/SKILL.md +2 -1
- package/docs/agents/context-audit-checks.md +19 -1
- package/docs/agents/context-audit.md +2 -2
- package/docs/agents/driver.md +1 -1
- package/docs/agents/hooks.md +21 -1
- package/docs/agents/index.md +10 -14
- package/docs/agents/indexes.md +25 -29
- package/docs/agents/install-and-sync.md +124 -235
- package/docs/agents/markdown-audit-density.md +39 -0
- package/docs/agents/markdown-audit-weight.md +9 -7
- package/docs/agents/markdown-audit.md +18 -14
- package/docs/agents/migrate.md +41 -16
- package/docs/agents/output-shape.md +60 -45
- package/docs/agents/overview.md +36 -12
- package/docs/agents/routing.md +1 -1
- package/docs/agents/rule-citations.md +1 -1
- package/docs/agents/skills-reach.md +1 -1
- package/docs/agents/targets.md +25 -77
- package/docs/target/migrations.md +1 -1
- package/docs/target/projects.md +3 -3
- package/docs/target/scenarios.md +1 -1
- package/docs/workflow/ai-workflow.md +2 -2
- package/docs/workflow/parallel-features.md +2 -2
- package/docs/workflow/skill-map.md +1 -1
- package/docs/workflow/visual-design-workflow.md +1 -1
- package/governance/detect.toml +6 -1
- package/package.json +6 -3
- package/scripts/core/install-check.sh +1 -1
- package/src/commands/claude.ts +1 -2
- package/src/commands/context.ts +106 -7
- package/src/commands/hooks.ts +63 -0
- package/src/commands/markdown.ts +169 -32
- package/src/commands/pr.ts +1 -1
- package/src/commands/records.ts +0 -1
- package/src/context/audit.ts +256 -5
- package/src/context/classify/prompts.ts +1 -1
- package/src/context/gate.ts +23 -7
- package/src/context/shape-gated.ts +28 -0
- package/src/design/document.ts +1 -1
- package/src/design/tokens.ts +1 -1
- package/src/docs/read.ts +15 -21
- package/src/gate/measures.ts +15 -190
- package/src/gate/stages.ts +21 -23
- package/src/hooks/reply-links.ts +110 -0
- package/src/markdown/density.ts +258 -0
- package/src/markdown/gate.ts +57 -18
- package/src/markdown/reference-shape.ts +103 -0
- package/src/markdown/scope.ts +174 -0
- package/src/markdown/structure.ts +10 -60
- package/src/sandbox/equivalence.ts +7 -9
- package/src/shipped/references.ts +1 -1
- package/src/teach/browser/head.ts +2 -2
- package/src/teach/browser/sidebar.ts +3 -3
- package/src/teach/browser/theme.ts +2 -2
- package/src/tooling/inject.ts +2 -2
- package/src/tooling/package.ts +15 -18
- package/src/tooling/verify-stack.ts +6 -3
- package/tooling/astro/configs/.oxfmtrc.json +8 -0
- package/tooling/astro/configs/.prettierrc +13 -0
- package/tooling/astro/manifest.toml +13 -0
- package/tooling/astro/reference.md +15 -5
- package/tooling/base/configs/.oxfmtrc.json +7 -0
- package/tooling/base/configs/scripts/verify.ts +1 -1
- package/tooling/base/manifest.toml +6 -6
- package/tooling/base/reference.md +12 -9
- package/tooling/base/seeds/.lintstagedrc +1 -3
- package/tooling/base/seeds/canon/context/ci.md +3 -3
- package/tooling/base/seeds/canon/context/development.md +2 -2
- package/tooling/claude/manifest.toml +5 -1
- package/tooling/claude/seeds/.claude/hooks/reply-links.sh +72 -0
- package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +22 -1
- package/tooling/claude/seeds/.claude/settings.json +4 -0
- package/tooling/go/reference.md +2 -2
- package/tooling/nextjs/configs/.oxlintrc.json +223 -0
- package/tooling/nextjs/manifest.toml +2 -5
- package/tooling/nextjs/reference.md +4 -4
- package/tooling/php/manifest.toml +6 -1
- package/tooling/php/reference.md +2 -2
- package/tooling/python/manifest.toml +6 -1
- package/tooling/python/reference.md +4 -4
- package/tooling/vite-react/manifest.toml +1 -4
- package/tooling/vite-react/reference.md +3 -3
- package/tooling/web/configs/.oxlintrc.json +213 -0
- package/tooling/web/manifest.toml +9 -13
- package/tooling/web/reference.md +14 -14
- package/docs/agents/commands.md +0 -154
- package/docs/agents/docs.md +0 -27
- package/docs/agents/drift-surfaces.md +0 -201
- package/docs/agents/gov-detect.md +0 -47
- package/docs/agents/scripting.md +0 -142
- package/src/markdown/growth.ts +0 -43
- package/tooling/base/configs/.prettierrc +0 -12
- package/tooling/base/seeds/.prettierignore +0 -0
- package/tooling/nextjs/configs/eslint.config.js +0 -91
- package/tooling/web/configs/eslint.config.js +0 -82
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
79
|
-
- Content leads the order and is
|
|
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
|
|
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
|
|
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.
|
|
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.`
|
|
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
|
|
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
|
|
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
|
-
|
|
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/`,
|
|
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
|
-
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
130
|
+
<One or two lines on what the command does and who calls it.>
|
|
106
131
|
|
|
107
|
-
|
|
132
|
+
```bash
|
|
133
|
+
<the command, spelled to copy>
|
|
134
|
+
```
|
|
108
135
|
|
|
109
|
-
`<
|
|
136
|
+
Run `<command> --help` for every flag.
|
|
110
137
|
|
|
111
|
-
|
|
138
|
+
## Output
|
|
112
139
|
|
|
113
|
-
|
|
140
|
+
<What the command prints or writes, with one example where the shape is not obvious.>
|
|
114
141
|
|
|
115
|
-
|
|
142
|
+
## Refusals
|
|
116
143
|
|
|
117
|
-
|
|
144
|
+
Branch on `reason` in the record, not the exit code.
|
|
118
145
|
|
|
119
|
-
|
|
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
|
|
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
|
-
|
|
65
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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"`
|
|
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
|
|