@erclx/canon 5.19.0 → 5.21.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 (135) hide show
  1. package/claude/.claude-plugin/plugin.json +1 -1
  2. package/claude/skills/auto-ship/references/verb-absent.md +1 -1
  3. package/claude/skills/create-skill/SKILL.md +1 -0
  4. package/claude/skills/docs-sync/REQUIREMENT.md +1 -1
  5. package/claude/skills/document-health/REQUIREMENT.md +1 -1
  6. package/claude/skills/draft-ready/REQUIREMENT.md +2 -1
  7. package/claude/skills/draft-ready/SKILL.md +6 -4
  8. package/claude/skills/markdown-propose/REQUIREMENT.md +3 -3
  9. package/claude/skills/markdown-propose/SKILL.md +1 -1
  10. package/claude/skills/plan-feature/SKILL.md +1 -1
  11. package/claude/skills/plan-groundwork/SKILL.md +1 -1
  12. package/claude/skills/record-screencast/REQUIREMENT.md +2 -1
  13. package/claude/skills/record-screencast/SKILL.md +2 -2
  14. package/claude/skills/role-worker/REQUIREMENT.md +3 -1
  15. package/claude/skills/role-worker/SKILL.md +5 -3
  16. package/claude/skills/session-resume/SKILL.md +1 -1
  17. package/claude/skills/task-board/REQUIREMENT.md +1 -0
  18. package/claude/skills/task-board/SKILL.md +6 -0
  19. package/claude/skills/task-board/references/decline.md +2 -0
  20. package/claude/skills/video-craft/REQUIREMENT.md +48 -0
  21. package/claude/skills/video-craft/SKILL.md +80 -0
  22. package/claude/skills/video-craft/references/adopted.md +66 -0
  23. package/docs/agents/canvas.md +4 -0
  24. package/docs/agents/commands.md +1 -0
  25. package/docs/agents/demo.md +1 -1
  26. package/docs/agents/index.md +1 -0
  27. package/docs/agents/install-and-sync.md +17 -3
  28. package/docs/agents/markdown-audit.md +1 -3
  29. package/docs/agents/rule-citations.md +4 -4
  30. package/docs/agents/sandbox.md +8 -7
  31. package/docs/agents/slides.md +120 -0
  32. package/docs/agents/tasks-validate.md +1 -1
  33. package/docs/agents/tasks.md +1 -1
  34. package/docs/target/migrations.md +1 -1
  35. package/docs/workflow/ai-workflow.md +1 -1
  36. package/docs/workflow/operating-model.md +9 -9
  37. package/docs/workflow/parallel-features.md +1 -1
  38. package/docs/workflow/skill-map.md +12 -13
  39. package/governance/renames.toml +24 -0
  40. package/governance/rules/lib/330-testing-py.md +1 -1
  41. package/governance/rules/lib/336-testing-php.md +1 -1
  42. package/governance/rules/{canon/640-architecture.md → standards/architecture.md} +3 -2
  43. package/governance/rules/standards/context.md +15 -0
  44. package/governance/rules/standards/design.md +13 -0
  45. package/governance/rules/standards/diagrams.md +17 -0
  46. package/governance/rules/standards/groundwork.md +13 -0
  47. package/governance/rules/standards/intake.md +12 -0
  48. package/governance/rules/standards/markdown.md +15 -0
  49. package/governance/rules/standards/memory.md +12 -0
  50. package/governance/rules/standards/mermaid.md +15 -0
  51. package/governance/rules/{canon/658-plan.md → standards/plan.md} +5 -9
  52. package/governance/rules/standards/readme.md +12 -0
  53. package/governance/rules/standards/ready.md +13 -0
  54. package/governance/rules/standards/requirements.md +13 -0
  55. package/governance/rules/standards/rule.md +13 -0
  56. package/governance/rules/standards/session.md +13 -0
  57. package/governance/rules/{claude/570-skill.md → standards/skill.md} +6 -10
  58. package/governance/rules/standards/standard.md +13 -0
  59. package/governance/rules/standards/tasks.md +15 -0
  60. package/governance/rules/{canon/661-teach.md → standards/teach.md} +3 -2
  61. package/governance/rules/standards/wiki.md +13 -0
  62. package/governance/rules/standards/wireframes.md +14 -0
  63. package/governance/rules/writing/800-prose.md +1 -1
  64. package/governance/stacks/base.toml +4 -2
  65. package/package.json +1 -1
  66. package/src/canvas/capture.ts +228 -15
  67. package/src/claude/cases/misc.ts +5 -0
  68. package/src/claude/cases/workflow.ts +4 -20
  69. package/src/claude/routing.ts +1 -1
  70. package/src/commands/canvas.ts +76 -2
  71. package/src/commands/gov.ts +19 -4
  72. package/src/commands/sandbox.ts +7 -0
  73. package/src/commands/slides.ts +13 -3
  74. package/src/commands/tasks.ts +46 -2
  75. package/src/gate/stages.ts +7 -1
  76. package/src/gov/citations.ts +1 -1
  77. package/src/gov/standard-rules.ts +179 -0
  78. package/src/migrate/skill-names.ts +0 -7
  79. package/src/sandbox/equivalence.ts +43 -14
  80. package/src/sandbox/stub-remote.ts +140 -0
  81. package/src/slides/convert/chart.ts +165 -0
  82. package/src/slides/convert/deck.ts +164 -0
  83. package/src/slides/convert/export.ts +217 -7
  84. package/src/slides/convert/master.ts +195 -0
  85. package/src/slides/convert/shapes.ts +1 -1
  86. package/src/slides/convert/walk.ts +187 -2
  87. package/src/tasks/record.ts +11 -1
  88. package/src/tasks/validate.ts +14 -0
  89. package/standards/architecture.md +5 -0
  90. package/standards/context.md +6 -0
  91. package/standards/design.md +3 -0
  92. package/standards/diagrams.md +8 -0
  93. package/standards/groundwork-spikes.md +66 -0
  94. package/standards/groundwork.md +5 -25
  95. package/standards/index.md +6 -2
  96. package/standards/intake.md +2 -0
  97. package/standards/markdown.md +6 -0
  98. package/standards/memory.md +2 -0
  99. package/standards/mermaid.md +6 -0
  100. package/standards/plan-lifecycle.md +36 -0
  101. package/standards/plan.md +13 -11
  102. package/standards/readme.md +2 -0
  103. package/standards/ready.md +4 -0
  104. package/standards/requirements.md +3 -0
  105. package/standards/rule.md +6 -1
  106. package/standards/session.md +4 -0
  107. package/standards/skill-paths.md +50 -0
  108. package/standards/skill.md +15 -23
  109. package/standards/standard.md +7 -1
  110. package/standards/tasks-decline.md +38 -0
  111. package/standards/tasks.md +9 -14
  112. package/standards/teach.md +5 -0
  113. package/standards/wiki.md +4 -0
  114. package/standards/wireframes.md +5 -0
  115. package/tooling/astro/configs/card-src/pages/og-card.astro +2 -2
  116. package/claude/skills/docs-fold/REQUIREMENT.md +0 -25
  117. package/claude/skills/docs-fold/SKILL.md +0 -9
  118. package/claude/skills/standards-audit/REQUIREMENT.md +0 -33
  119. package/claude/skills/standards-audit/SKILL.md +0 -99
  120. package/governance/rules/canon/610-context.md +0 -17
  121. package/governance/rules/canon/620-wireframes.md +0 -13
  122. package/governance/rules/canon/630-requirements.md +0 -12
  123. package/governance/rules/canon/650-design.md +0 -12
  124. package/governance/rules/canon/655-tasks.md +0 -13
  125. package/governance/rules/canon/656-groundwork.md +0 -11
  126. package/governance/rules/canon/657-intake.md +0 -11
  127. package/governance/rules/canon/659-memory.md +0 -11
  128. package/governance/rules/canon/660-diagrams.md +0 -19
  129. package/governance/rules/canon/662-session.md +0 -15
  130. package/governance/rules/canon/663-ready.md +0 -15
  131. package/governance/rules/claude/590-rule-authoring.md +0 -12
  132. package/governance/rules/writing/801-markdown.md +0 -14
  133. package/governance/rules/writing/802-mermaid.md +0 -14
  134. package/governance/rules/writing/880-readme.md +0 -11
  135. package/governance/rules/writing/891-standard-authoring.md +0 -12
@@ -87,7 +87,7 @@ A hit the closed set could not separate from correct prose was the case with no
87
87
 
88
88
  ### Where the rules are enforced
89
89
 
90
- Five surfaces apply the ban set and four of them go through this verb. `.claude/hooks/standards-audit.sh` runs it against a single file after each markdown edit, the seed copy a project installs does the same, the `Markdown bans` stage in `canon gate run` runs it across the whole corpus before this repository's own push, and the same-named stage in the one verify runner every stack shares, `scripts/verify.ts`, runs it across a scaffolded project's tracked markdown before its own push. Each hook parsed its own copy of the word bans in awk before that, which left a British spelling passing at edit time and failing the push with nothing in between explaining the difference.
90
+ Four surfaces apply the ban set and all four go through this verb. `.claude/hooks/standards-audit.sh` runs it against a single file after each markdown edit, the seed copy a project installs does the same, the `Markdown bans` stage in `canon gate run` runs it across the whole corpus before this repository's own push, and the same-named stage in the one verify runner every stack shares, `scripts/verify.ts`, runs it across a scaffolded project's tracked markdown before its own push. Each hook parsed its own copy of the word bans in awk before that, which left a British spelling passing at edit time and failing the push with nothing in between explaining the difference.
91
91
 
92
92
  The seed copy moved onto the verb when the sets became data, since its awk had nothing left to parse. It resolves one runner where the toolkit copy resolves two, looking for no checkout source, and a machine carrying no `canon` gets a report naming the binary to install rather than a silent pass. The Seed independence stage of `bun run check` scopes its walk to markdown and leaves the seed hooks outside it, which its own comment records as deliberate.
93
93
 
@@ -95,8 +95,6 @@ The target push stage reads the same exit codes `canon gate run`'s own stage rea
95
95
 
96
96
  The target push stage excludes `CHANGELOG.md`, unlike every other surface here. A changelog a generator builds from commit subjects carries prose nobody wrote against the ban set, where this repository's own passes only because `release-please` builds it from subjects sessions already wrote to the rule. The stage passes an explicit file list rather than the bare invocation the other surfaces use, so a corpus with no file left once the changelog is set aside reads as a pass rather than falling back to the whole tree.
97
97
 
98
- The fifth surface reads the standards directly and is not a consolidation left half done. `claude/skills/standards-audit/SKILL.md` greps the banned tokens agent-side, which is a session reading prose rather than a process it can shell out to, and it ships to every target. It is the likeliest place for the next drift, since nothing compares it against the verb.
99
-
100
98
  The hook prefers a checkout's own `src/cli.ts` over a globally installed binary, so it and the push stage read one build. A published binary lags a branch by whatever has not been released, which would put a ban kind added on the branch into the push and not into the edit. It reads its findings out of the `--json` record rather than off the exit code, so an older binary still reports where the fallback applies. It reads `bans.emptySets` out of the same record, so a set the verb shipped empty reaches the author as a check narrowed to what it could measure rather than as a clean pass.
101
99
 
102
100
  That field replaced `bans.missingStandards`, which answered a standard resolving under none of three roots. The set ships with the package now, so the state it named cannot occur and the narrowed check has one cause left, a defect in the build. The hook keeps reading a field either way, since a reader cannot tell a narrowed check from a clean one without it.
@@ -24,7 +24,7 @@ Under `--json` the record holds stdout alone and the frame still renders on stde
24
24
 
25
25
  ## What the drift check cannot see
26
26
 
27
- `bun run check` asserts that an authored rule and its consumed copy agree, and a dead citation passes that assertion because both copies carry it. `governance/rules/canon/661-teach.md` told its reader to open a `references/glossary.md` inside the teach skill that had never existed at that path. The rule shipped, survived a release, and fired during a real teach run before anyone noticed.
27
+ `bun run check` asserts that an authored rule and its consumed copy agree, and a dead citation passes that assertion because both copies carry it. The teach rule told its reader to open a `references/glossary.md` inside the teach skill that had never existed at that path. The rule shipped, survived a release, and fired during a real teach run before anyone noticed.
28
28
 
29
29
  Two files agreeing is what a drift check measures. Whether either one is right about the tree is a different question, and this is the stage that asks it.
30
30
 
@@ -49,7 +49,7 @@ A `path` is anchored on the whole backticked span rather than on a trailing patt
49
49
  A rule body is full of backticked spans carrying a slash, and almost none of them names a file in this tree. The stage declines four shapes outright.
50
50
 
51
51
  - A placeholder or glob segment describes a shape rather than naming a file: `canon/context/<domain>.md`, `standards/<name>.md`, `app/**/route.ts`, `${CLAUDE_SKILL_DIR}/../../standards/<name>.md`.
52
- - A bare filename names a convention: `route.ts`, `manifest.toml`, `components.json`, `playwright.config.ts`. A bare name is read as a citation only when it matches a rule filename, which is how `662-session.md` points at `655-tasks.md`.
52
+ - A bare filename names a convention: `route.ts`, `manifest.toml`, `components.json`, `playwright.config.ts`. A bare name is read as a citation only when it matches a rule filename, which is how one authored rule would point at a sibling such as `605-worktrees.md`. A generated rule under `governance/rules/standards/` carries no number, so a bare name citing one is not read as a citation, and those rules name each other in prose instead.
53
53
  - A span carrying no file extension is a folder or a module specifier: `src/pages/`, `next/font`, `try/except`, `react-hooks/set-state-in-effect`, `oven-sh/setup-bun@v2`, `@/lib/utils`.
54
54
  - A fenced block displays a path rather than pointing at one.
55
55
 
@@ -59,11 +59,11 @@ The extension test is what carries most of the separation, and it costs one real
59
59
 
60
60
  Two classes resolve to nothing and are right to. Both are reported by name rather than dropped, so a reader can see what the verdict declined to judge.
61
61
 
62
- **Governed.** A rule spelling a path in its own frontmatter `paths:` is naming an artifact a target holds rather than a file here. `governance/rules/canon/660-diagrams.md` declares `.claude/DIAGRAMS.md` and then tells its reader to convert one an older install left behind, so the file is correctly absent from this tree and correctly named in the rule.
62
+ **Governed.** A rule spelling a path in its own frontmatter `paths:` is naming an artifact a target holds rather than a file here. `governance/rules/standards/diagrams.md` declares `.claude/DIAGRAMS.md` and then tells its reader to convert one an older install left behind, so the file is correctly absent from this tree and correctly named in the rule.
63
63
 
64
64
  Only an exact declaration exempts, never a glob match against one. A glob declares a shape, so a body path sitting inside it is still a citation and a stale one is still a defect. A rule scoped at `docs/**` citing a `docs/agents/renamed.md` that moved is exactly the class this stage exists to catch, and matching the glob would excuse it.
65
65
 
66
- **Ignored.** A path git ignores is session scratch no clone is expected to hold. `governance/rules/canon/655-tasks.md` cites `.canon/tasks/index.md`, which is real in a live project and absent from a fresh clone and from every linked worktree. Resolving against the filesystem alone would make the verdict depend on which tree the stage ran in, so the unresolved paths go to one batched `git check-ignore` and an ignored one is excused. A read git cannot answer refuses rather than reporting those paths dead.
66
+ **Ignored.** A path git ignores is session scratch no clone is expected to hold. `governance/rules/standards/tasks.md` cites `.canon/tasks/index.md`, which is real in a live project and absent from a fresh clone and from every linked worktree. Resolving against the filesystem alone would make the verdict depend on which tree the stage ran in, so the unresolved paths go to one batched `git check-ignore` and an ignored one is excused. A read git cannot answer refuses rather than reporting those paths dead.
67
67
 
68
68
  ## Why the glob half reads one corpus
69
69
 
@@ -56,13 +56,14 @@ canon sandbox equivalence claude:plan-feature/full --base HEAD
56
56
 
57
57
  A target is `<category>`, `<category>:<command>`, or `<category>:<command>/<arm>`, defaulting to every category.
58
58
 
59
- | Flag | Effect |
60
- | ------------------ | ------------------------------------------------------------------------------------------- |
61
- | `--base <ref>` | Ref the baseline is provisioned from, `main` by default |
62
- | `--include-anchor` | Also run the arms that push to the shared GitHub anchor, one at a time, for an attended run |
63
- | `--out <dir>` | Keep the provisioned trees, logs, and per-side manifests in this folder |
64
- | `--no-masks` | Compare every path, which lists what each mask would hide |
65
- | `--json` | Emit the record on stdout |
59
+ | Flag | Effect |
60
+ | ------------------ | -------------------------------------------------------------------------------------------------- |
61
+ | `--base <ref>` | Ref the baseline is provisioned from, `main` by default |
62
+ | `--include-anchor` | Also run the arms that push to the shared GitHub anchor, one at a time, for an attended run |
63
+ | `--stub-remote` | Run the anchor arms against a local bare repository and a stub `gh`, writing nothing to the anchor |
64
+ | `--out <dir>` | Keep the provisioned trees, logs, and per-side manifests in this folder |
65
+ | `--no-masks` | Compare every path, which lists what each mask would hide |
66
+ | `--json` | Emit the record on stdout |
66
67
 
67
68
  The baseline is a detached worktree with full history, removed on exit including after `SIGINT`. Each arm provisions on the base side, is read into a manifest, is deleted, then provisions on the head side at the same path with the run id pinned. A manifest holds every file's mode and hash, every symlink's target, the exit status, the narration, and for the outer repository and each nested one the commit subjects, the staged index, and the branch.
68
69
 
@@ -0,0 +1,120 @@
1
+ ---
2
+ title: Slides
3
+ description: What a folder of HTML slides declares for the whole deck in deck.json, what each slide declares on its own body, the master built from the project's tokens, speaker notes, charts, and what each refusal reports
4
+ ---
5
+
6
+ # Slides
7
+
8
+ `canon slides render --source <folder>` turns a folder of `.html` slides into an editable PowerPoint deck. Each slide describes its own shapes. What belongs to the whole deck, being the bands, the numbers, and the mark, sits in one file beside them, and the master that carries it takes the project's own colors and face.
9
+
10
+ ```bash
11
+ canon slides render --source slides/q3-review
12
+ ```
13
+
14
+ ## The deck file
15
+
16
+ `deck.json` beside the slides is optional. Without it the deck gets its defaults.
17
+
18
+ | Field | Default | What it sets |
19
+ | -------------- | ------------------------------ | ------------------------------------------------- |
20
+ | `title` | the folder name | the file's title and the default footer text |
21
+ | `header` | off | a band at the top, with `left`, `center`, `right` |
22
+ | `footer` | on, with the title on the left | a band at the bottom, with the same three slots |
23
+ | `slideNumbers` | `true` | the number at the right of the footer |
24
+ | `mark` | none | an image path, relative to the folder, top right |
25
+
26
+ ```json
27
+ {
28
+ "title": "Q3 review",
29
+ "header": { "left": "Acme" },
30
+ "footer": { "center": "Internal" },
31
+ "mark": "assets/mark.png"
32
+ }
33
+ ```
34
+
35
+ A band takes `show` and the three slots. A declared band merges over its default, so `"footer": { "center": "Internal" }` keeps the title on the left. Declaring any slot turns a band on unless it also says `"show": false`. Set a slot to `""` to empty it.
36
+
37
+ Slide numbers belong to the footer and hold its right slot. They show only where the footer does, and `footer.right` needs `slideNumbers` set to `false`.
38
+
39
+ Prefer a raster mark. An SVG mark lands as a vector, and its fallback for a viewer that cannot draw SVG comes out broken.
40
+
41
+ ## What each slide declares
42
+
43
+ A slide sets its own place in the deck through attributes on `<body>`.
44
+
45
+ | Attribute | Effect |
46
+ | --------------------------------------- | --------------------------------------------- |
47
+ | `data-section="Results"` | opens a section the slides after it stay in |
48
+ | `data-hidden` | hides the slide in the show |
49
+ | `data-header="off"` | drops the header on this slide |
50
+ | `data-footer="off"` | drops the footer and its number on this slide |
51
+ | `data-footer-left`, `-center`, `-right` | replaces that footer slot on this slide alone |
52
+ | `data-header-left`, `-center`, `-right` | replaces that header slot on this slide alone |
53
+
54
+ Once any slide opens a section, slides ahead of the first one sit in a section named after the deck, since PowerPoint wants every slide in one. A title the deck returns to after another section opens a new section numbered `Intro (2)`, so each section stays one run of slides.
55
+
56
+ A slide dropping one band keeps the other from the master. A slide replacing a slot draws its band as its own text, so editing that band once in PowerPoint's master view reaches every slide except the ones that replaced it.
57
+
58
+ ## The master
59
+
60
+ The master takes its colors from the `<html>` element of the first slide as Chromium laid it out with the project's token stylesheet injected, so a theme switched on one slide's `<body>`, such as a dark cover, stays on that slide:
61
+
62
+ - `--color-background`: the slide ground
63
+ - `--color-text`: the header text
64
+ - `--color-muted`: the footer text
65
+ - `--color-accent`: the slide number
66
+ - the `<body>` font family, first name with a ` Variable` suffix dropped: the theme face
67
+
68
+ A role the project declares no token for falls back to the slide body's own color and prints one `✗` line naming it. It never falls back to the toolkit's palette.
69
+
70
+ A slide whose `<body>` background differs from the master's keeps its own. A slide whose `<body>` computes a `--color-text` apart from the master's prints one `✗` line naming it, since its bands keep the master's colors and may not read against its ground.
71
+
72
+ ## Speaker notes
73
+
74
+ `<aside class="notes">` becomes the slide's notes and is never drawn. Each paragraph or list item becomes its own line, and markup is dropped.
75
+
76
+ ## Charts
77
+
78
+ A `<figure data-chart="...">` holding a `<table>` becomes a native, editable chart placed where the figure was laid out. The table stays the page's accessible source and is not drawn as well.
79
+
80
+ ```html
81
+ <figure data-chart="bar" data-labels>
82
+ <figcaption>Revenue by region</figcaption>
83
+ <table>
84
+ <tr>
85
+ <th>Region</th>
86
+ <th>Q1</th>
87
+ <th>Q2</th>
88
+ </tr>
89
+ <tr>
90
+ <td>North</td>
91
+ <td>12</td>
92
+ <td>16</td>
93
+ </tr>
94
+ <tr>
95
+ <td>South</td>
96
+ <td></td>
97
+ <td>11</td>
98
+ </tr>
99
+ </table>
100
+ </figure>
101
+ ```
102
+
103
+ - `data-chart` takes `bar`, `line`, `area`, `pie`, or `doughnut`.
104
+ - The header row names the series and the first column names the categories.
105
+ - An empty cell is a gap, not a zero. A comma is a thousands separator only where it groups in threes, as in `12,345.5`, so a comma-decimal `3,5` refuses rather than reading as 35.
106
+ - `data-labels` shows each value. A `<figcaption>` becomes the chart title.
107
+ - Series take the accent first, then every other declared `--color-*` role in sheet order except the background and surface, repeating past the last.
108
+
109
+ ## Refusals
110
+
111
+ | Case | Report | Exit |
112
+ | -------------------------------------- | ---------------------------------------------- | ---- |
113
+ | `deck.json` field malformed or unknown | `✗` naming the file and the field | 1 |
114
+ | `mark` path missing | `✗` naming the resolved path | 1 |
115
+ | chart cell not a number | `✗` naming the slide, the figure, and the cell | 0 |
116
+ | `data-chart` outside the five types | `✗` naming the value | 0 |
117
+ | token role not declared | `✗` naming the role | 0 |
118
+ | slide body sets its own `--color-text` | `✗` naming the slides | 0 |
119
+
120
+ A refused chart is left out and the rest of the deck is written.
@@ -61,7 +61,7 @@ The blocker check re-takes a measurement the board records once and never repeat
61
61
  }
62
62
  ```
63
63
 
64
- A closed outcome is not the fact the dependency half needs. The ship chain marks outcomes as its first step and opens the pull request several steps later, so a check reading the checkbox reports the row settled while the branch is still in review. A live task therefore settles the row only once it closed every outcome and carries a `Pull request:` line the trunk holds. One that names no pull request, and one whose number no trunk ref could answer for, land in the untested array below rather than being settled or left silent.
64
+ A closed outcome is not the fact the dependency half needs. The ship chain marks outcomes as its first step and opens the pull request several steps later, so a check reading the checkbox reports the row settled while the branch is still in review. A live task therefore settles the row only once it closed every outcome and carries a `Pull request:` line the trunk holds. One that carries a `Pending branch:` line, one that names no pull request, and one whose number no trunk ref could answer for, land in the untested array below rather than being settled or left silent.
65
65
 
66
66
  The trunk is read as the clone already holds it, `origin/main` first and local `main` behind it, and no run fetches. A validate runs several times a sweep and a fetch per run is a cost this command does not carry, so a clone behind its remote under-reports rather than claiming work landed.
67
67
 
@@ -84,7 +84,7 @@ canon tasks outcome --plan worktree-scratch-routing --close 2 --json
84
84
 
85
85
  An outcome already closed comes back under `alreadyClosed` rather than refusing, so a rerun against the same positions changes nothing. A position past the end of the list refuses as `out-of-range`, since a caller counting wrong should hear about it rather than mark a neighbor.
86
86
 
87
- A close that ticks at least one box from a branch other than `main` or `master` names that branch on a `Pending branch:` line, read from `git branch --show-current` in the working directory. The line holds the task against `canon tasks archive --pull-request` until `canon tasks pull-request` records that branch's own number. A detached HEAD, a trunk checkout, or a failed git read writes no line and refuses nothing. The `pending` field lists the branches on the line after the write.
87
+ A close that ticks at least one box from a branch other than `main` or `master` names that branch on a `Pending branch:` line, read from `git branch --show-current` in the working directory. The line holds the task against `canon tasks archive --pull-request` until `canon tasks pull-request` records that branch's own number. A detached HEAD, a trunk checkout, or a failed git read writes no line and refuses nothing. The line is also skipped when `gh pr list --head <branch> --state all` lists a number already on the task's `Pull request:` line, since that branch has recorded itself and a marker would outlive it, as in a review-address pass. A failed, offline, or unreadable `gh` lookup counts as no listing and writes the line. The `pending` field lists the branches on the line after the write.
88
88
 
89
89
  Positions skip fenced blocks. A checkbox inside a sample a task displays is not an outcome the task claims, and counting one would shift every position after it. `canon tasks archive` reads the list through the same walker, so the two verbs cannot disagree about which checkboxes are outcomes.
90
90
 
@@ -60,7 +60,7 @@ The first line reports the plan and the second applies it, relocating each rule
60
60
 
61
61
  ## Rename the skill citations, once
62
62
 
63
- Twenty-five plugin skills dropped their `claude-` prefix for two-word names, so `canon:claude-docs` answers as `canon:context-fold` and `canon:claude-tasks` as `canon:task-board`. A project that installed governance or tooling before that release holds files naming the old ones, and the plugin answers to none of them. A later release renamed `docs-fold` to `context-fold`, since the skill folds a session into the context entries and the task board rather than into `docs/`, and the same sweep carries a project across that rename too. <!-- canon-keep-retired -->
63
+ Twenty-five plugin skills dropped their `claude-` prefix for two-word names, so `canon:claude-docs` answers as `canon:context-fold` and `canon:claude-tasks` as `canon:task-board`. A project that installed governance or tooling before that release holds files naming the old ones, and the plugin answers to none of them. A later release renamed `docs-fold` to `context-fold`, since the skill folds a session into the context entries and the task board rather than into `docs/`, and the same sweep carries a project across that rename too. The pointer that answered under the old name no longer ships, so a citation the sweep has not reached names nothing. <!-- canon-keep-retired -->
64
64
 
65
65
  Two of those files run rather than sit there. `.husky/post-merge` runs the `canon hooks post-merge` verb, so a stale copy of the hook calls a binary that may lack it, and `.claude/hooks/pr-create-log.sh` hands a session a message naming a skill, so a stale copy tells someone to invoke something that no longer exists. A rule under `.claude/rules/canon/core/` names skills too, though a rule is read rather than run.
66
66
 
@@ -97,7 +97,7 @@ Review findings split by origin before severity is read. One the branch inherite
97
97
 
98
98
  Review is skipped when the diff is prose that only informs: every changed file matches `*.md` or `*.txt`, and none sits under a behavior path. Behavior paths cover skills and rules in both the authoring and the installed spelling, so the list matches whether a repository authors those surfaces or consumed them from the toolkit. Standards, `internal/`, and `tooling/` carry the authoring spelling alone, since none of the three reaches a session through a `.claude/` copy, and root `CLAUDE.md` is named as a file because a path prefix reaches nothing sitting in no folder.
99
99
 
100
- Markdown under one states what an agent does, so a branch touching it reaches review while `docs/` and `wiki/` still skip and stay gated by `docs-sync`, `standards-audit`, and pre-push hooks.
100
+ Markdown under one states what an agent does, so a branch touching it reaches review while `docs/` and `wiki/` still skip and stay gated by `docs-sync`, `canon markdown audit`, and pre-push hooks.
101
101
 
102
102
  An empty changed-file list stops the chain rather than counting as prose-only. The filename test passes vacuously on an empty set, which routed a branch past review instead of through it.
103
103
 
@@ -48,9 +48,9 @@ or a path that no longer resolves is reported rather than repaired, since the
48
48
  task file and the board stay the orchestrator's to write.
49
49
 
50
50
  A worker that halts on a plan question it may not answer, or argues back against
51
- an instruction the tree contradicts, is working correctly. It never writes
52
- `.canon/tasks/priority.md` or the backlog beside it, and reports the row it
53
- needs for the orchestrator to write. `role-worker` carries the reason for each.
51
+ an instruction the tree contradicts, is working correctly. It writes neither
52
+ `.canon/tasks/priority.md`, the backlog, nor a task file for work it turns up,
53
+ and hands the row to the orchestrator. `role-worker` gives the reason for each.
54
54
 
55
55
  The orchestrator's cell reads every tracked file rather than every feature, and
56
56
  it offers no exception for a small one. A correction found while orchestrating
@@ -116,12 +116,12 @@ delta against, and `canon pr checks` reports the runs belonging to that tip, so
116
116
  follow-up push cannot be read as green off the predecessor's completed run. See
117
117
  [Head-sensitive pull request reads](../agents/pr-reads.md).
118
118
 
119
- Three messages travel from the worker to its controller, and `role-worker`
120
- states each with its reason: the worker's pull request as it opens, the end of
121
- each address-review pass with the new CI state, and a block before it becomes an
122
- interactive prompt. Nothing is sent on progress. An open pull request is what
123
- starts the controller's review poll, with a dispatch still silent after thirty
124
- minutes kept as a fallback.
119
+ Three messages travel from the worker to its controller, each stated with its
120
+ reason in `role-worker`: the pull request as it opens, carrying any row the
121
+ build turned up, the end of each address-review pass with the new CI state, and
122
+ a block before it becomes an interactive prompt. Nothing is sent on progress. An
123
+ open pull request is what starts the controller's review poll, with a dispatch
124
+ still silent after thirty minutes kept as a fallback.
125
125
 
126
126
  What the session channel carries is the handback instruction and the worker's
127
127
  reply to it, which is a notification layer over a record that stays on the PR. A
@@ -34,7 +34,7 @@ A constraint naming a track in flight carries the same problem past the handoff,
34
34
 
35
35
  `.canon/plans/`, `.canon/review/`, and `.canon/memory/` all resolve at the main worktree root, so artifacts created in any session are visible from any sibling worktree. A session inside a worktree reads them directly, since the file-editing tools refuse a main-root path but `Read` resolves normally. It writes a whole file through the shell and makes a change inside an existing file through a `canon` verb, which resolves the main root in-process. See [Claude Code and git worktrees](../../wiki/claude/worktrees.md) for the full rule and the domain-level fan-out guidance.
36
36
 
37
- The plan's shape is fixed by `standards/plan.md`: the section list, the filename, the lifecycle, and the contract its questions keep. Every question carries a `- Suggested:` line and an empty `- Answer:` slot, and a blank answer accepts the suggestion at execution time. That default is what makes a plan decision-ready in one pass, and it is the opposite of the contract an intake folder keeps, where an empty slot means nobody reached the item.
37
+ The plan's shape is fixed by `standards/plan.md`: the section list, the filename, and the contract its questions keep. Its lifecycle, from the session that writes it to the archive, is `standards/plan-lifecycle.md`. Every question carries a `- Suggested:` line and an empty `- Answer:` slot, and a blank answer accepts the suggestion at execution time. That default is what makes a plan decision-ready in one pass, and it is the opposite of the contract an intake folder keeps, where an empty slot means nobody reached the item.
38
38
 
39
39
  An execution that picks other than the suggestion rewrites the `- Suggested:` line as `overridden at execution to <pick>,` followed by the measurement that moved it, and leaves the slot blank. That fixed phrase is how a reader of the archived plan tells an override from a suggestion the execution accepted, since an authored suggestion often carries a number of its own. The same deviation takes one line in the open task's `## Findings`, which is the register that survives the plan being archived. A deviation from a question somebody already answered goes back to whoever answered it instead, since a filled slot is a decision already made.
40
40
 
@@ -53,6 +53,7 @@ This page is the corpus the coverage claim is measured against: every name `cano
53
53
  | `canon:search-craft` | Before searching outside the project, to derive where the field's authorities publish and search there too |
54
54
  | `canon:systematic-debugging` | When a test fails or a bug surfaces, to force root cause first |
55
55
  | `canon:design-taste` | When drafting or judging an interface, or when output reads generic, to settle which decision comes first |
56
+ | `canon:video-craft` | Before composing or judging a video, for sourced captions, zoom, pointer, and audio judgment |
56
57
  | `canon:ui-checklist` | After a UI change, to write what to look at and name what ships untested |
57
58
 
58
59
  ## Check the work before it leaves the branch
@@ -60,7 +61,6 @@ This page is the corpus the coverage claim is measured against: every name `cano
60
61
  | Skill | When to use |
61
62
  | ------------------------ | --------------------------------------------------------------------------------------- |
62
63
  | `canon:review-branch` | On the local branch diff, before anything is pushed |
63
- | `canon:standards-audit` | When changed markdown has to answer to the authoring standards |
64
64
  | `canon:document-health` | When the documents themselves have to answer for length, placement, and staleness |
65
65
  | `canon:markdown-propose` | When a markdown claim needs rewriting and the change should wait for an answer per file |
66
66
  | `canon:ux-audit` | To read UI source for missing states, edge cases, and inconsistencies |
@@ -69,18 +69,17 @@ This page is the corpus the coverage claim is measured against: every name `cano
69
69
 
70
70
  ## Ship it
71
71
 
72
- | Skill | When to use |
73
- | ---------------------- | ------------------------------------------------------------------------------------------------- |
74
- | `canon:git-ship` | To run the whole post-feature chain from the verify gate through open PR |
75
- | `canon:memory-capture` | First skill in that chain, to route what the session learned to the surface owning it |
76
- | `canon:context-fold` | When decisions diverged from the plan, or a shipped task needs its outcomes marked |
77
- | `canon:docs-fold` | Never on purpose. A pointer at the old name that names `context-fold` <!-- canon-keep-retired --> |
78
- | `canon:docs-sync` | When a change since main left `README.md` or `docs/` stale |
79
- | `canon:git-stage` | When the staged set spans several concerns and wants one commit each |
80
- | `canon:git-commit` | When the staged set is one concern, or was staged hunk by hand |
81
- | `canon:git-branch` | When a branch name needs generating or renaming to conventional form |
82
- | `canon:git-pr` | When a pull request needs a title and body written from the diff |
83
- | `canon:memory-review` | When the pen has grown, to propose where each entry belongs |
72
+ | Skill | When to use |
73
+ | ---------------------- | ------------------------------------------------------------------------------------- |
74
+ | `canon:git-ship` | To run the whole post-feature chain from the verify gate through open PR |
75
+ | `canon:memory-capture` | First skill in that chain, to route what the session learned to the surface owning it |
76
+ | `canon:context-fold` | When decisions diverged from the plan, or a shipped task needs its outcomes marked |
77
+ | `canon:docs-sync` | When a change since main left `README.md` or `docs/` stale |
78
+ | `canon:git-stage` | When the staged set spans several concerns and wants one commit each |
79
+ | `canon:git-commit` | When the staged set is one concern, or was staged hunk by hand |
80
+ | `canon:git-branch` | When a branch name needs generating or renaming to conventional form |
81
+ | `canon:git-pr` | When a pull request needs a title and body written from the diff |
82
+ | `canon:memory-review` | When the pen has grown, to propose where each entry belongs |
84
83
 
85
84
  ## After the pull request opens
86
85
 
@@ -13,6 +13,10 @@
13
13
  # resolves A only while both links stay. A key must name no live rule and every
14
14
  # chain must end on one, which `src/gov/renames.test.ts` checks against this
15
15
  # file.
16
+ #
17
+ # A numbered rule replaced by the rule `canon gov regen` generates from its
18
+ # standard is a rename too: the generated rule keeps every glob and bullet, so
19
+ # the pair is one-to-one identity under the standard's name.
16
20
  [renamed]
17
21
  "005-behavior" = "565-behavior"
18
22
  "015-output" = "566-output"
@@ -47,3 +51,23 @@
47
51
  "075-dependencies" = "775-dependencies"
48
52
  "080-config-comments" = "780-config-comments"
49
53
  "090-code-comments" = "790-code-comments"
54
+ "658-plan" = "plan"
55
+ "610-context" = "context"
56
+ "620-wireframes" = "wireframes"
57
+ "630-requirements" = "requirements"
58
+ "640-architecture" = "architecture"
59
+ "650-design" = "design"
60
+ "655-tasks" = "tasks"
61
+ "656-groundwork" = "groundwork"
62
+ "657-intake" = "intake"
63
+ "659-memory" = "memory"
64
+ "660-diagrams" = "diagrams"
65
+ "661-teach" = "teach"
66
+ "662-session" = "session"
67
+ "663-ready" = "ready"
68
+ "570-skill" = "skill"
69
+ "590-rule-authoring" = "rule"
70
+ "801-markdown" = "markdown"
71
+ "802-mermaid" = "mermaid"
72
+ "880-readme" = "readme"
73
+ "891-standard-authoring" = "standard"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Enforce pytest fixtures, parametrize, and async patterns for Python tests
3
3
  paths:
4
- - 'tests/**/*.py'
4
+ - '**/tests/**/*.py'
5
5
  - '**/test_*.py'
6
6
  - '**/*_test.py'
7
7
  ---
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Enforce PHPUnit test classes, attributes, and strict assertions for PHP tests
3
3
  paths:
4
- - 'tests/**/*.php'
4
+ - '**/tests/**/*.php'
5
5
  - '**/*Test.php'
6
6
  ---
7
7
 
@@ -1,5 +1,6 @@
1
1
  ---
2
- description: Route canon/ARCHITECTURE.md edits to the architecture standard for system decisions and risks
2
+ # Generated by `canon gov regen` from standards/architecture.md. Edit that frontmatter, not this file.
3
+ description: Shape and content rules for canon/ARCHITECTURE.md
3
4
  paths:
4
5
  - 'canon/ARCHITECTURE.md'
5
6
  - '.claude/ARCHITECTURE.md'
@@ -9,5 +10,5 @@ paths:
9
10
 
10
11
  ## Authority
11
12
 
12
- - Follow the architecture standard for the overview, named decision entries, and risks. It is the single source. Read it with `canon standards architecture`.
13
+ - Follow the architecture standard for shape and content rules for canon/ARCHITECTURE.md. It is the single source. Read it with `canon standards architecture`.
13
14
  - Add a decision here only when it fills one of the standard's slots, and write any other decision into the context entry for the domain it constrains. At the record's stated cap, merge or retire an entry before adding one.
@@ -0,0 +1,15 @@
1
+ ---
2
+ # Generated by `canon gov regen` from standards/context.md. Edit that frontmatter, not this file.
3
+ description: Shape and content rules for canon/context/<domain>.md entries
4
+ paths:
5
+ - 'canon/context/**'
6
+ - '.claude/context/**'
7
+ ---
8
+
9
+ # Context entry standards
10
+
11
+ ## Authority
12
+
13
+ - Follow the context standard for shape and content rules for canon/context/<domain>.md entries. It is the single source. Read it with `canon standards context`.
14
+ - Before non-trivial work in a domain, read its `canon/context/<domain>.md` entry. Use `canon/context/index.md` to find it.
15
+ - Leave the entry conforming when work in its domain changes what it describes.
@@ -0,0 +1,13 @@
1
+ ---
2
+ # Generated by `canon gov regen` from standards/design.md. Edit that frontmatter, not this file.
3
+ description: Shape and content rules for canon/DESIGN.md
4
+ paths:
5
+ - 'canon/DESIGN.md'
6
+ - '.claude/DESIGN.md'
7
+ ---
8
+
9
+ # Design standards
10
+
11
+ ## Authority
12
+
13
+ - Follow the design standard for shape and content rules for canon/DESIGN.md. It is the single source. Read it with `canon standards design`.
@@ -0,0 +1,17 @@
1
+ ---
2
+ # Generated by `canon gov regen` from standards/diagrams.md. Edit that frontmatter, not this file.
3
+ description: Shape and content rules for .canon/diagrams/<kind>.md files
4
+ paths:
5
+ - '.canon/diagrams/**'
6
+ - '.claude/DIAGRAMS.md'
7
+ ---
8
+
9
+ # Diagram standards
10
+
11
+ ## Authority
12
+
13
+ - Follow the diagrams standard for shape and content rules for .canon/diagrams/<kind>.md files. It is the single source. Read it with `canon standards diagrams`.
14
+ - Layout, budgets, accessibility, labels, and render verification inside the fence are a separate topic. The mermaid standard routes them.
15
+ - A diagram entry carries structure and flow, not implementation. Read the standard before adding or revising a kind.
16
+ - Write a new diagram to `.canon/diagrams/<kind>.md`, never to `.claude/DIAGRAMS.md`
17
+ - Convert a `.claude/DIAGRAMS.md` left by an older install into per-kind entries before editing it
@@ -0,0 +1,13 @@
1
+ ---
2
+ # Generated by `canon gov regen` from standards/groundwork.md. Edit that frontmatter, not this file.
3
+ description: Folder layout, ordinal naming, reserved numbering, frontmatter and dating, required file contents, and conventions for a measurement track
4
+ paths:
5
+ - '.canon/groundwork/**'
6
+ ---
7
+
8
+ # Groundwork standards
9
+
10
+ ## Authority
11
+
12
+ - Follow the groundwork standard for folder layout, ordinal naming, reserved numbering, frontmatter and dating, required file contents, and conventions for a measurement track. It is the single source. Read it with `canon standards groundwork`.
13
+ - Follow the groundwork spikes standard for `08-spikes.md` and the folders holding what a spike produced. Read it with `canon standards groundwork-spikes`.
@@ -0,0 +1,12 @@
1
+ ---
2
+ # Generated by `canon gov regen` from standards/intake.md. Edit that frontmatter, not this file.
3
+ description: Folder layout, ordinal naming, reserved index number, frontmatter and dating, the item template, the answer contract, and retrieval
4
+ paths:
5
+ - '.canon/intake/**'
6
+ ---
7
+
8
+ # Intake standards
9
+
10
+ ## Authority
11
+
12
+ - Follow the intake standard for folder layout, ordinal naming, reserved index number, frontmatter and dating, the item template, the answer contract, and retrieval. It is the single source. Read it with `canon standards intake`.
@@ -0,0 +1,15 @@
1
+ ---
2
+ # Generated by `canon gov regen` from standards/markdown.md. Edit that frontmatter, not this file.
3
+ description: Headings, paragraph and list structure, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording
4
+ paths:
5
+ - '**/*.md'
6
+ ---
7
+
8
+ # Markdown standards
9
+
10
+ ## Authority
11
+
12
+ - Follow the markdown standard for headings, paragraph and list structure, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording. It is the single source. Read it with `canon standards markdown`.
13
+ - Read it before a substantial markdown edit. Do not work the banned characters from memory.
14
+ - Run `canon markdown audit <path>` after the edit, and rewrite the sentence carrying a hit rather than swapping the token for a near-synonym.
15
+ - Voice, rhythm, and sentence construction are a separate topic. `800-prose` routes them.
@@ -0,0 +1,12 @@
1
+ ---
2
+ # Generated by `canon gov regen` from standards/memory.md. Edit that frontmatter, not this file.
3
+ description: Filename and type prefix, frontmatter, the body shape per type, links between entries, and the lifecycle from write to retire
4
+ paths:
5
+ - '.canon/memory/**'
6
+ ---
7
+
8
+ # Memory standards
9
+
10
+ ## Authority
11
+
12
+ - Follow the memory standard for filename and type prefix, frontmatter, the body shape per type, links between entries, and the lifecycle from write to retire. It is the single source. Read it with `canon standards memory`.
@@ -0,0 +1,15 @@
1
+ ---
2
+ # Generated by `canon gov regen` from standards/mermaid.md. Edit that frontmatter, not this file.
3
+ description: Direction and layout, node and edge budgets, accessibility fields, label punctuation, and render verification for a Mermaid diagram
4
+ paths:
5
+ - '**/*.md'
6
+ ---
7
+
8
+ # Mermaid standards
9
+
10
+ ## Authority
11
+
12
+ - Follow the mermaid standard for direction and layout, node and edge budgets, accessibility fields, label punctuation, and render verification for a Mermaid diagram. It is the single source. Read it with `canon standards mermaid`.
13
+ - Apply this rule only when the edit drafts or revises a Mermaid fence. Skip it on a markdown edit carrying no diagram.
14
+ - Read it before drafting the fence. Do not work the layout or the budgets from memory.
15
+ - Which diagram a document carries and what question it answers is a separate topic. The diagrams standard routes it.
@@ -1,22 +1,18 @@
1
1
  ---
2
- description: Route .canon/plans/ edits to the plan standard for sections, the answer contract, and the archive move
2
+ # Generated by `canon gov regen` from standards/plan.md. Edit that frontmatter, not this file.
3
+ description: Filename and slug, the required sections, and the suggested-and-answer contract for a feature plan
3
4
  paths:
4
5
  - '.canon/plans/**'
5
6
  ---
6
7
 
7
8
  # Plan standards
8
9
 
9
- ## The answer contract
10
+ ## Authority
10
11
 
12
+ - Follow the plan standard for filename and slug, the required sections, and the suggested-and-answer contract for a feature plan. It is the single source. Read it with `canon standards plan`.
11
13
  - Never fill an `- Answer:` slot on behalf of the person who owns it. A blank slot accepts the suggestion at execution time.
12
14
  - Never ship a question without a `- Suggested:` line. Write `- Suggested: needs your call, <why>` where the answer turns on preference.
13
15
  - Rewrite the `- Suggested:` line as `overridden at execution to <pick>,` plus the measurement when execution deviates from an unanswered question, leaving the slot blank. Put the same deviation in one line under the open task's `## Findings`.
14
-
15
- ## Archiving
16
-
17
16
  - Move a shipped plan to `.canon/plans/archive/`. Never delete one.
18
17
  - Amend a plan in place when a decision changes. Do not append a second passage narrating the change.
19
-
20
- ## Authority
21
-
22
- - Follow the plan standard for the filename and slug, the required sections, the suggested-and-answer contract, and the lifecycle. It is the single source. Read it with `canon standards plan`.
18
+ - Follow the plan lifecycle standard for when a plan is written, how it is amended, and its move to the archive. Read it with `canon standards plan-lifecycle`.
@@ -0,0 +1,12 @@
1
+ ---
2
+ # Generated by `canon gov regen` from standards/readme.md. Edit that frontmatter, not this file.
3
+ description: Readme voice, structure, and content conventions
4
+ paths:
5
+ - '**/README.md'
6
+ ---
7
+
8
+ # Readme standards
9
+
10
+ ## Authority
11
+
12
+ - Follow the readme standard for readme voice, structure, and content conventions. It is the single source. Read it with `canon standards readme`.
@@ -0,0 +1,13 @@
1
+ ---
2
+ # Generated by `canon gov regen` from standards/ready.md. Edit that frontmatter, not this file.
3
+ description: Folder layout, ordinal naming, the overview frontmatter, the thin-plan contract, and the archive lifecycle for a finished-file handoff
4
+ paths:
5
+ - '.canon/ready/**'
6
+ ---
7
+
8
+ # Ready standards
9
+
10
+ ## Authority
11
+
12
+ - Follow the ready standard for folder layout, ordinal naming, the overview frontmatter, the thin-plan contract, and the archive lifecycle for a finished-file handoff. It is the single source. Read it with `canon standards ready`.
13
+ - Load the `canon:draft-ready` skill to write a ready folder, its overview, the thin plan, and the task row. It owns the procedure. Report it rather than proceeding silently when it does not resolve, since it ships with the plugin and this rule ships with the CLI.