@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
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  title: Ready reference
3
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
+ rule:
7
+ - '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.'
4
8
  ---
5
9
 
6
10
  # Ready reference
@@ -1,6 +1,9 @@
1
1
  ---
2
2
  title: Requirements reference
3
3
  description: Shape and content rules for canon/REQUIREMENTS.md
4
+ paths:
5
+ - 'canon/REQUIREMENTS.md'
6
+ - '.claude/REQUIREMENTS.md'
4
7
  ---
5
8
 
6
9
  # Requirements reference
package/standards/rule.md CHANGED
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  title: Governance rule reference
3
3
  description: Rule frontmatter, body shape, and voice for .claude/rules files
4
+ paths:
5
+ - '.claude/rules/**/*.md'
6
+ rule:
7
+ - 'Read it before writing or editing a rule. Do not work the shape from memory.'
4
8
  ---
5
9
 
6
10
  # Governance rule reference
@@ -36,7 +40,8 @@ Write both when both apply. A rule stating the directive and a skill stating how
36
40
  - `<n>` is a number from the band reserved for the rule's source and `<slug>` is a one-to-three-word kebab topic
37
41
  - A rule the project authored itself lives at `.claude/rules/project/<subdirectory>/<n>-<slug>.md`, a sibling of `canon/` rather than nested inside it, keeping the same subdirectory names
38
42
  - This repository's own toolkit-only rules, which never ship to a target, live at `.claude/rules/internal/<subdirectory>/<n>-<slug>.md`, a second sibling of `canon/`. See "Two sources numbering into one folder" below.
39
- - Give every rule a numeric prefix. A bare-word filename reads as a folder name where a stack names its rules, so a rule without one is unreachable from a stack entry.
43
+ - Give every authored rule a numeric prefix. A bare-word filename reads as a folder name where a stack names its rules, so a rule without one is unreachable from a stack entry.
44
+ - A rule that only routes a path to a standard is generated, not authored. It lives at `governance/rules/standards/<standard>.md` under the standard's name, carries no number, and installs to `.claude/rules/canon/standards/`. Never hand-edit one. Change its globs and bullets in the standard's `paths` and `rule` frontmatter, and `canon gov regen` rewrites it. The generator refuses a standard named like a band folder, which keeps the bare-word name reachable.
40
45
 
41
46
  ## Reserved numbers
42
47
 
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  title: Session map reference
3
3
  description: Filename and location, the sections a handoff carries, the write and read procedures, and how a role extends it
4
+ paths:
5
+ - '.canon/tasks/session-*.md'
6
+ rule:
7
+ - 'Follow this rule rather than the tasks rule for a `session-` file. A handoff is not a task and carries neither `## Outcomes` nor `## Findings`.'
4
8
  ---
5
9
 
6
10
  # Session map reference
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: Skill path reference
3
+ description: Which root a file a skill body names resolves against, and how a body cites a standard
4
+ ---
5
+
6
+ # Skill path reference
7
+
8
+ Applies to every path a skill body names, under `skills/<name>/`. A skill reads from two roots, so the path it writes decides whether the file is found once the skill runs from another project.
9
+
10
+ This is an attribute standard. It governs the path strings a body carries rather than a file of its own, so it carries no template.
11
+
12
+ ## Scope
13
+
14
+ Governs how a `SKILL.md` body or a file under its `references/` names a bundled asset, an installed shared doc, or a standard.
15
+
16
+ Does not govern:
17
+
18
+ - The skill folder, its frontmatter, the body rules, and the choice between skill types: `skill.md`
19
+ - Punctuation, formatting, and word choice: `markdown.md`
20
+
21
+ ## What a working path looks like
22
+
23
+ A path in a skill body works when the skill resolves it from any project it runs in:
24
+
25
+ - Does each bundled asset resolve against the skill's own directory rather than the session's working directory?
26
+ - Does each cited standard resolve in a target that installed nothing but the plugin?
27
+ - Does a procedure two skills share live in one place, with each body citing it?
28
+
29
+ A body failing any of these is non-conforming even when every path resolves in this repository.
30
+
31
+ ## Path resolution
32
+
33
+ Know which root a file lives under before referencing it.
34
+
35
+ - Bundled skill assets (`references/`, `scripts/`, `assets/`) resolve against the skill's own directory. Reference them with `${CLAUDE_SKILL_DIR}/<path>`, never a bare relative path, which resolves against the session cwd and fails when a plugin skill runs from another project.
36
+ - Installed shared docs (`.claude/rules/`, `canon/context/`) resolve against the target project cwd, where install placed them. Reference them by that path.
37
+ - Do not hand-copy a standard into a skill. If a skill must carry its own copy, generate it from the single source and reference it through `${CLAUDE_SKILL_DIR}`, so one owner keeps every copy in sync.
38
+
39
+ ## Citing a standard
40
+
41
+ No standard installs into a project, so a body cites one place rather than choosing between two.
42
+
43
+ - Cite `${CLAUDE_SKILL_DIR}/../../standards/X.md`. The plugin ships the whole standards folder beside `skills/`, so the path resolves in every install.
44
+ - Never cite `.claude/standards/X.md` from a shipped body. A target holds no such folder. <!-- audit-ignore-citations: .claude/standards/X.md -->
45
+ - Name `canon standards X` instead where the body wants the document rather than a path to open, such as a value it captures or reports. That verb resolves `standards/` at the project root and then the corpus inside the package.
46
+ - State the path once per body, at the site that reads the standard. A later mention of a standard the body already read stays bare, since repeating the path at every mention is noise rather than instruction.
47
+ - A guard on a standard's presence names the file rather than the folder holding it, since a folder test answers for a sibling that happens to be there.
48
+ - Use `${CLAUDE_SKILL_DIR}`, never a bare `../../` and never `${CLAUDE_PLUGIN_ROOT}`, since only the first expands before the body reaches the model.
49
+ - Cite a shared procedure, never restate it. A procedure two or more skills execute gets one definition in a standard and a citation in each body.
50
+ - Keep the trigger in the body and the procedure in the standard. The citing skill states when the procedure runs and what it runs against, since that varies per skill and the standard cannot know it.
@@ -1,6 +1,18 @@
1
1
  ---
2
2
  title: Claude skill reference
3
- description: Claude skill structure and authoring rules
3
+ description: Skill structure and authoring rules for Claude Code
4
+ paths:
5
+ - '.claude/skills/**/SKILL.md'
6
+ - 'claude/skills/**/SKILL.md'
7
+ - '.claude/skills/**/REQUIREMENT.md'
8
+ - 'claude/skills/**/REQUIREMENT.md'
9
+ rule:
10
+ - "Confirm `canon:create-skill`'s two creation-time questions are answered before a new `SKILL.md` lands, whether drafted by hand, by another skill, or by `canon:create-skill` itself. Carry the third question into the sibling `REQUIREMENT.md`'s `Must not` section as a review criterion rather than a gate."
11
+ - 'Report it rather than proceeding silently when `canon:create-skill` does not resolve. It ships with the plugin and this rule ships with the CLI, so a project that installed governance alone does not have it.'
12
+ - 'Re-read a skill body this session edited before invoking that skill again in the same session'
13
+ - 'Do not read a resolved file path in a held body as evidence the body is current'
14
+ - 'Follow the skill requirement standard for the shape a `REQUIREMENT.md` states. Read it with `canon standards skill-requirement`.'
15
+ - 'Follow the skill path standard for which root a path in a body resolves against and how a body cites a standard. Read it with `canon standards skill-paths`.'
4
16
  ---
5
17
 
6
18
  # Claude skill reference
@@ -17,11 +29,12 @@ Does not govern:
17
29
 
18
30
  - What a `REQUIREMENT.md` must answer, its sections, and its template: `skill-requirement.md`
19
31
  - A practice skill's closing sections and ledger: `skill-practice.md`
32
+ - Which root a path in a body resolves against, and how a body cites a standard: `skill-paths.md`
20
33
  - Path-scoped coding rules, which load on a file match rather than on a request match: `rule.md`
21
34
  - Voice, rhythm, and sentence construction in a skill body: the `write-human` skill
22
35
  - Punctuation, formatting, and word choice in a skill body: `markdown.md`
23
36
  - The transform from a branch name to a slug a skill carries in a filename: `slug.md`
24
- - Whether a new skill earns its place: the three-question test in the `create-skill` skill and the clause in `570-skill.md`
37
+ - Whether a new skill earns its place: the three-question test in the `create-skill` skill and the creation-time bullet in this standard's own `rule` frontmatter
25
38
 
26
39
  ## Changing a skill
27
40
 
@@ -146,27 +159,6 @@ allowed-tools: <tools required>
146
159
  - Use `#!/usr/bin/env bash` shebang
147
160
  - Always include `2>/dev/null || echo "FALLBACK"` guards on git and shell commands
148
161
 
149
- ## Path resolution
150
-
151
- A skill reads from two roots, so know which one a file lives under before referencing it.
152
-
153
- - Bundled skill assets (`references/`, `scripts/`, `assets/`) resolve against the skill's own directory. Reference them with `${CLAUDE_SKILL_DIR}/<path>`, never a bare relative path, which resolves against the session cwd and fails when a plugin skill runs from another project.
154
- - Installed shared docs (`.claude/rules/`, `canon/context/`) resolve against the target project cwd, where install placed them. Reference them by that path.
155
- - Do not hand-copy a standard into a skill. If a skill must carry its own copy, generate it from the single source and reference it through `${CLAUDE_SKILL_DIR}`, so one owner keeps every copy in sync.
156
-
157
- ### Citing a standard
158
-
159
- No standard installs into a project, so a body cites one place rather than choosing between two.
160
-
161
- - Cite `${CLAUDE_SKILL_DIR}/../../standards/X.md`. The plugin ships the whole standards folder beside `skills/`, so the path resolves in every install.
162
- - Never cite `.claude/standards/X.md` from a shipped body. A target holds no such folder. <!-- audit-ignore-citations: .claude/standards/X.md -->
163
- - Name `canon standards X` instead where the body wants the document rather than a path to open, such as a value it captures or reports. That verb resolves `standards/` at the project root and then the corpus inside the package.
164
- - State the path once per body, at the site that reads the standard. A later mention of a standard the body already read stays bare, since repeating the path at every mention is noise rather than instruction.
165
- - A guard on a standard's presence names the file rather than the folder holding it, since a folder test answers for a sibling that happens to be there.
166
- - Use `${CLAUDE_SKILL_DIR}`, never a bare `../../` and never `${CLAUDE_PLUGIN_ROOT}`, since only the first expands before the body reaches the model.
167
- - Cite a shared procedure, never restate it. A procedure two or more skills execute gets one definition in a standard and a citation in each body.
168
- - Keep the trigger in the body and the procedure in the standard. The citing skill states when the procedure runs and what it runs against, since that varies per skill and the standard cannot know it.
169
-
170
162
  ## Invocation
171
163
 
172
164
  - Invoke a plugin skill by its namespaced name, `/<plugin>:<skill-name>`.
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  title: Standard reference
3
3
  description: Shape and content rules for authoring a standard
4
+ paths:
5
+ - 'standards/**/*.md'
6
+ rule:
7
+ - 'Read it before writing or editing a standard. Do not work the shape from memory.'
4
8
  ---
5
9
 
6
10
  # Standard reference
@@ -64,7 +68,9 @@ A standard failing these questions is non-conforming even when it satisfies ever
64
68
 
65
69
  - Start the file with a frontmatter block carrying at least `title` and `description`. A consuming surface may require more.
66
70
  - `title`: names the doc type in sentence case, suffixed `reference` (`Commit reference`, `Branch reference`)
67
- - `description`: one line naming what the standard covers. It becomes the index link label on install.
71
+ - `description`: one line naming what the standard covers. It becomes the index link label on install, and the generated rule's description and pointer bullet.
72
+ - `paths` (optional): the globs where the standard applies, one per entry, copied verbatim into the rule `canon gov regen` generates for it. Omit it when no path should route to the standard, and no rule is generated.
73
+ - `rule` (optional): operative bullets the generated rule carries after its pointer bullet, one per entry, each a full sentence. Quote an entry holding a backtick, a colon, or a leading `-`.
68
74
 
69
75
  ## Structure
70
76
 
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: Task decline reference
3
+ description: Where a task decided against moves, the Declined line it carries, and what happens to its plan and board row
4
+ ---
5
+
6
+ # Task decline reference
7
+
8
+ Applies to a task under `.canon/tasks/` that somebody decided against doing. `canon tasks decline` performs the move, and this file fixes what the move leaves behind.
9
+
10
+ This is an attribute standard. It governs one origin line and one folder move rather than a file of its own, so it carries no template.
11
+
12
+ ## Scope
13
+
14
+ Governs the `.canon/tasks/declined/` folder, the `Declined:` line, and what declining does to the task's plan and board row.
15
+
16
+ Does not govern:
17
+
18
+ - The task file's layout, filename, format, other origin lines, and archiving: `tasks.md`
19
+ - The board rows the move clears: `board.md`
20
+
21
+ ## What a working decline looks like
22
+
23
+ A declined task works when a later reader can tell, from the folder and the file alone:
24
+
25
+ - Was the work decided against, rather than shipped or merely unscheduled?
26
+ - Who decided, when, and why?
27
+
28
+ ## Declining
29
+
30
+ A task decided against moves to `.canon/tasks/declined/` rather than `.canon/tasks/archive/`. The two folders answer different questions: archive means the work shipped, declined means somebody decided against doing it. Neither reading fits a task that is merely unscheduled, which stays on `backlog.md` rather than moving anywhere, since nobody has decided against it and it may still rise when the board has room.
31
+
32
+ `canon tasks decline` carries no outcome-state gate, so a task can be decided against at any outcome state, open outcomes included.
33
+
34
+ The decision is recorded on the task itself with a `Declined:` line, in the `Plan:`/`Pull request:` family: `Declined: <reason>, <who> on <YYYY-MM-DD>`. It anchors the same way `Pull request:` does, after the last origin line the task carries. The line is free prose after the colon, since it names no file to link.
35
+
36
+ Declining a task moves its plan alongside it the same way archiving does, when the declining task is that plan's last live citation. A plan several tasks share stays where it is, and a declined task's plan lands in `.canon/plans/archive/` indistinguishable from a shipped one by folder alone. The task file under `.canon/tasks/declined/` is what records which it was.
37
+
38
+ The move clears whichever of `priority.md` or `backlog.md` holds the task's row.
@@ -1,6 +1,12 @@
1
1
  ---
2
2
  title: Tasks reference
3
3
  description: Folder layout, filename convention, file format, origin lines, and archiving for task files under .canon/tasks/
4
+ paths:
5
+ - '.canon/tasks/**'
6
+ rule:
7
+ - 'Follow the board standard for `priority.md` and `backlog.md`, their readiness groups, and row order. Read it with `canon standards board`.'
8
+ - 'Never hand-edit `.canon/tasks/index.md`. A hook regenerates it from sibling frontmatter.'
9
+ - 'Follow the task decline standard for a task decided against. Read it with `canon standards tasks-decline`.'
4
10
  ---
5
11
 
6
12
  # Tasks reference
@@ -13,10 +19,11 @@ The folder is gitignored. Board state changes when work ships rather than when a
13
19
 
14
20
  ## Scope
15
21
 
16
- Governs the task files under `.canon/tasks/`: folder layout, filenames, frontmatter, file format, origin lines, archiving, and declining.
22
+ Governs the task files under `.canon/tasks/`: folder layout, filenames, frontmatter, file format, origin lines, and archiving.
17
23
 
18
24
  Does not govern:
19
25
 
26
+ - The declined folder, the `Declined:` line, and what declining does to a plan and a board row: `tasks-decline.md`
20
27
  - Execution order, readiness groups, the backlog, and the generated index beside the tasks: `board.md`
21
28
  - The plan file a task cites, its sections, and its answer contract: `plan.md`
22
29
  - Phase-label format and which surfaces a label may appear on: `versioning.md`
@@ -134,7 +141,7 @@ One plan per task, or one per slice, which the board check reads as distinct pla
134
141
 
135
142
  `Pull request:` records which pull requests carry the task's work, each as a bare `#NNN` the way `Issue:` does. It lists every pull request that shipped part of the task, oldest first and separated by commas, as in `Pull request: #NNN, #NNN`, and a task shipped whole lists one. It is not an origin, so a task without one is well-formed. `git-pr` appends to it when a pull request opens.
136
143
 
137
- The line is what lets a merge close its own task. `canon tasks archive --pull-request <n>` finds the task by any number the line lists and archives it only on the last. One pull request, one task: two tasks naming the same number refuse to archive rather than both moving. `Pending branch: <branch>` holds that merge back while a branch that ticked an outcome waits on its own number, since `canon tasks outcome` writes it and `canon tasks pull-request` clears it.
144
+ The line is what lets a merge close its own task. `canon tasks archive --pull-request <n>` finds the task by any number the line lists and archives it only on the last. One pull request, one task: two tasks naming the same number refuse to archive rather than both moving. `Pending branch: <branch>` holds that merge back while a branch that ticked an outcome waits on its own number, since `canon tasks outcome` writes it and `canon tasks pull-request` clears it. `canon tasks outcome` skips the write when the branch's own pull request is already on the line.
138
145
 
139
146
  ## What goes in
140
147
 
@@ -161,15 +168,3 @@ The archive nests inside `.canon/tasks/` rather than sitting beside it as a flat
161
168
  Archiving a task archives its plan alongside it, when the closing task is that plan's last live citation. The archived task's `Plan:` line is retargeted at `../../plans/archive/feature-<slug>.md`. The ready folder its `Ready:` line names moves with the plan to `.canon/ready/archive/<nn>-<slug>/`, and both pointers to it are retargeted. A plan several tasks share stays live with its ready folder, and the task archives anyway.
162
169
 
163
170
  A task with an open outcome stays on the board, and so does its plan. Close it, or cut it from the task when the work is being abandoned, so what was dropped is recorded rather than inferred from an archived file. Cutting means striking the outcome's body: `- ~~<outcome>~~ <why>`. A struck body reads as cut whatever its checkbox holds, so a task carrying only cut outcomes still archives.
164
-
165
- ## Declining
166
-
167
- A task decided against moves to `.canon/tasks/declined/` rather than `.canon/tasks/archive/`. The two folders answer different questions: archive means the work shipped, declined means somebody decided against doing it. Neither reading fits a task that is merely unscheduled, which stays on `backlog.md` rather than moving anywhere, since nobody has decided against it and it may still rise when the board has room.
168
-
169
- `canon tasks decline` carries no outcome-state gate, so a task can be decided against at any outcome state, open outcomes included.
170
-
171
- The decision is recorded on the task itself with a `Declined:` line, in the `Plan:`/`Pull request:` family: `Declined: <reason>, <who> on <YYYY-MM-DD>`. It anchors the same way `Pull request:` does, after the last origin line the task carries. The line is free prose after the colon, since it names no file to link.
172
-
173
- Declining a task moves its plan alongside it the same way archiving does, when the declining task is that plan's last live citation. A plan several tasks share stays where it is, and a declined task's plan lands in `.canon/plans/archive/` indistinguishable from a shipped one by folder alone. The task file under `.canon/tasks/declined/` is what records which it was.
174
-
175
- The move clears whichever of `priority.md` or `backlog.md` holds the task's row.
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  title: Teach reference
3
3
  description: Workspace layout, ordinal naming, frontmatter, and the mission and learning-record formats for a learning workspace
4
+ paths:
5
+ - '.canon/teach/**'
6
+ rule:
7
+ - 'Follow the glossary standard for the glossary every workspace carries at its root. It is the single source for the entry shape, the ordering, and which terms the file carries. Read it with `canon standards glossary`.'
8
+ - 'Report it rather than proceeding silently when that file does not resolve. It ships with the plugin and this rule ships with the CLI, so a project that installed governance alone does not have it.'
4
9
  ---
5
10
 
6
11
  # Teach reference
package/standards/wiki.md CHANGED
@@ -1,6 +1,10 @@
1
1
  ---
2
2
  title: Wiki reference
3
3
  description: Folder split, frontmatter, naming convention, and sourcing for a wiki reference page
4
+ paths:
5
+ - 'wiki/**/*.md'
6
+ rule:
7
+ - 'Read it before drafting a page. Do not work the placement criterion or the naming convention from memory.'
4
8
  ---
5
9
 
6
10
  # Wiki reference
@@ -1,6 +1,11 @@
1
1
  ---
2
2
  title: Wireframe reference
3
3
  description: Shape and content rules for canon/wireframes/<surface>.md files
4
+ paths:
5
+ - 'canon/wireframes/**'
6
+ - '.claude/wireframes/**'
7
+ rule:
8
+ - 'Read it before adding or revising a surface.'
4
9
  ---
5
10
 
6
11
  # Wireframe reference
@@ -20,12 +20,12 @@
20
20
  * `scripts/check-card-exclusion.sh` fails a build that carries the marker
21
21
  * below, which is what keeps the route out of the published site.
22
22
  */
23
- import '@/styles/global.css'
24
23
 
25
- // Retarget the import above when this project keeps its global stylesheet
24
+ // Point the import below at this project's global stylesheet when it lives
26
25
  // somewhere else. An unresolved path refuses the card server by name, which is
27
26
  // the loud direction: a card captured against no stylesheet renders as an
28
27
  // unstyled box and reports success.
28
+ import '@/styles/global.css'
29
29
  ---
30
30
 
31
31
  <html lang="en">
@@ -1,25 +0,0 @@
1
- ---
2
- name: docs-fold
3
- description: Why a pointer answers under the fold skill's old name, and the test that retires it
4
- ---
5
-
6
- # Docs fold requirement
7
-
8
- ## Gap
9
-
10
- Without this skill, a person typing the old name after the rename to `context-fold` meets an unknown command with nothing naming where the skill went. A target that has not run `canon migrate skill-names` still holds files telling someone to type it, and a live gitignored record written before the rename still names it, since the sweep reads the tracked listing only.
11
-
12
- ## Must
13
-
14
- - Name `context-fold` as the skill to run, so a typed invocation of the old name reaches the new one in one step
15
- - Carry `disable-model-invocation: true`, so routing never matches the old description against a request the new skill owns
16
-
17
- ## Must not
18
-
19
- - Carry any part of the fold procedure, which would give one behavior two bodies that drift apart
20
- - Retire on a release number. Retire it when `canon migrate skill-names --json` reports zero citations in every target the rollout reaches and no live `.canon/` record names the old name, since a release number retires it on a date nothing measured.
21
-
22
- ## Out of scope
23
-
24
- - The fold itself, which `context-fold` owns
25
- - Rewriting a stale citation, which `canon migrate skill-names` owns in a tracked file and the controlling session owns on the board
@@ -1,9 +0,0 @@
1
- ---
2
- name: docs-fold
3
- description: Renamed to `context-fold`. Answers a typed invocation of the old name by pointing at the new one.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Docs fold
8
-
9
- This skill is now `context-fold`. Run `/canon:context-fold` instead, and change any file that still names this one.
@@ -1,33 +0,0 @@
1
- ---
2
- name: standards-audit
3
- description: What the standards audit is for, the gaps it closes, and the fixing it deliberately refuses
4
- ---
5
-
6
- # Standards audit requirement
7
-
8
- ## Gap
9
-
10
- Without this skill, markdown ships unchecked against the authoring standards it was written under. A session fresh from writing prose does not reopen the standard it was meant to follow, banned punctuation survives because it reads fine, and the mapping from a file to the standards governing it gets re-derived by guess on every pass.
11
-
12
- ## Must
13
-
14
- - Scope the audit to markdown the project hand-authors, so a generated file is not reported against a standard nobody applies to it
15
- - Decide which standards govern each changed file, rather than auditing every file against every standard
16
- - Grep for the violations a standard makes mechanically detectable, because reading alone misses occurrences
17
- - Report each finding with a file and a line, grouped so one file is one fix pass
18
-
19
- ## Must not
20
-
21
- - Fix a violation, or propose the fix inline. The cheap swap satisfies the grep and breaks the rule the grep was standing in for.
22
- - Enumerate specific rules or tokens from a standard. The standard is the list, and a copy of it here drifts the moment the standard changes.
23
-
24
- ## Guards
25
-
26
- - No markdown changed since main: stop with a pass, not an error
27
- - No installed standards to audit against: stop and say where they come from
28
-
29
- ## Out of scope
30
-
31
- - Code style and structure, which `.claude/rules/` governs and Claude Code loads directly
32
- - Whether a standard is itself correct. A finding against the corpus is an argument to change the standard, and that is a standards edit rather than an audit result.
33
- - Persisting a report. The diff is the living state and the audit is a check against it at a moment.
@@ -1,99 +0,0 @@
1
- ---
2
- name: standards-audit
3
- description: Audits changed markdown files against every authoring standard that declares jurisdiction over their paths and reports violations without fixing. Reads the standards catalog to map each file, greps for banned tokens, and groups findings by file. Use when asked to "audit prose", "audit standards", "check standards", "standards audit", or after editing markdown where standards compliance matters. Do NOT fix violations. Reporting only.
4
- ---
5
-
6
- # Standards audit
7
-
8
- ## Guards
9
-
10
- - Resolve the base ref first, per Diff baseline below, then scope the file list exactly as Step 1 does, fallback included. If no markdown files changed, stop: `✅ No markdown changes to audit.` A guard that reads bare local `main`, or that skips the unusable-baseline fallback, passes the skill clean on a branch it never read.
11
- - If `${CLAUDE_SKILL_DIR}/../../standards/markdown.md` is not present, stop: `❌ markdown.md standard not found. Reinstall the canon plugin.` Test the file rather than the directory, since a plugin cache built before a given file existed keeps the directory without ever receiving that file.
12
- - `markdown.md` is the one standard testable before the mapping runs, since its scope statement declares an attribute and every changed markdown file therefore maps to it. Every other standard is tested in Step 3, where the mapping has named which ones the run needs.
13
-
14
- ## Diff baseline
15
-
16
- Resolve the base ref once and reuse it in the guard and in Step 1:
17
-
18
- ```bash
19
- git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null
20
- ```
21
-
22
- Prefer `origin/main` over local `main`. On `main` itself the local ref resolves to HEAD, so every committed change drops out of the set and the audit passes clean rather than admitting it cannot see the files.
23
-
24
- The baseline is unusable in two cases:
25
-
26
- - No merge base resolves against either ref.
27
- - 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.
28
-
29
- An unusable baseline costs only the committed half. Audit `git diff HEAD --name-only` instead and lead the report with `⚠ Baseline unusable. Audited the uncommitted set only.`, so a clean result is never read as a clean branch.
30
-
31
- ## Step 1: scope the audit
32
-
33
- Get the changed file list, substituting `git diff HEAD --name-only` when the baseline is unusable:
34
-
35
- ```bash
36
- git diff <base> HEAD --name-only
37
- ```
38
-
39
- Filter to markdown (`.md`), then drop what the project does not hand-author:
40
-
41
- - `index.md`, unless its frontmatter carries `auto: false`
42
- - Any file in a gitignored directory
43
- - Any file sitting in a skill's bundled reference folder whose frontmatter names the consumers a generator copied it out to
44
-
45
- The last rule keeps a fan-out from multiplying one edit into a finding per copy. The source is the file to audit and the only one an author can fix, because the next regen overwrites every copy.
46
-
47
- It takes both halves. A generator copies frontmatter verbatim, so the field alone matches the source as well and drops the one file the rule means to keep. The location alone matches a reference the skill author wrote by hand, which carries no such field and is governed like the rest of the folder.
48
-
49
- ## Step 2: map files to standards
50
-
51
- Read the mapping rather than holding it here. Every standard declares the paths it governs, so a standard added later joins this audit with no edit to this body:
52
-
53
- ```bash
54
- canon standards list --json
55
- ```
56
-
57
- Each entry carries `appliesTo`, the paths its `## Scope` statement declares. Match every changed file against every entry:
58
-
59
- - `*` matches every changed markdown file
60
- - An entry ending in `/` matches when the file path contains it at a path-segment boundary
61
- - Any other entry matches when the file path ends with it at a path-segment boundary
62
-
63
- Add any standard the catalog did not list, reading `${CLAUDE_SKILL_DIR}/../../standards/` and whatever folder the project authors its own standards in, and derive every declaration the same way when `canon` is unavailable: the backticked paths in the first sentence under `## Scope`, or `*` when that sentence says the standard governs an attribute. Skip `index.md`, which is generated from the others and declares nothing.
64
-
65
- An entry whose `appliesTo` is empty declared nothing this can read. Report it as a finding against that standard's own file in Step 4 and audit the rest. A standard dropped in silence is the same miss this mapping exists to remove, one level up.
66
-
67
- Every mapping names a changed markdown file, which is the only thing Step 1 produces. Text that never lands in the tree, such as a branch name or a pull request body, is checked by the skill that publishes it rather than here.
68
-
69
- ## Step 3: read standards and audit
70
-
71
- Read each applicable standard once from `${CLAUDE_SKILL_DIR}/../../standards/<name>`, testing the file before reading it. A standard the mapping named and that path does not carry is reported as a finding against the file that mapped to it rather than skipped, since a standard read from nowhere reports every file under it clean.
72
-
73
- For each changed file, audit against every rule:
74
-
75
- - **Pattern rules**: grep the file for every token the standard bans. Grep is authoritative. Reading alone misses occurrences.
76
- - **Judgment rules**: check each rule in context against the standard that states it.
77
-
78
- Every changed markdown file gets the pattern pass, since `${CLAUDE_SKILL_DIR}/../../standards/markdown.md` applies to all of them. Take the banned tokens from that standard at read time rather than from a list held here. It carries the banned characters, so one read covers every token this pass greps for.
79
-
80
- ## Step 4: report
81
-
82
- Group findings by file with line references, naming the standard each one comes from. One file is one fix pass, and the standard is what the reader opens to settle a finding they disagree with. Use this shape:
83
-
84
- ```markdown
85
- path/to/file.md
86
-
87
- - L12: `markdown.md`, em dash in prose
88
- - L34: `markdown.md`, semicolon used to join clauses
89
- - L51: `markdown.md`, vague qualifier `simply`
90
- - L67: `context.md`, decision entry names no rejected alternative
91
- ```
92
-
93
- If clean, respond with `✅ No violations.`
94
-
95
- Reporting only. Do not rewrite any file, swap any punctuation, or propose fixes inline. Fixes are a separate user-initiated step because a lazy swap (semicolon to period, em dash to comma) leaves the sentence in the shape the ban exists to remove.
96
-
97
- ## Output
98
-
99
- Chat output is the full report. This skill does not persist a file. The audit is a momentary check and living state is the diff itself.
@@ -1,17 +0,0 @@
1
- ---
2
- description: Route canon/context edits to the context-entry standard and the consult-first workflow
3
- paths:
4
- - 'canon/context/**'
5
- - '.claude/context/**'
6
- ---
7
-
8
- # Context entry standards
9
-
10
- ## Before editing
11
-
12
- - Before non-trivial work in a domain, read its `canon/context/<domain>.md` entry. Use `canon/context/index.md` to find it.
13
- - Leave the entry conforming when work in its domain changes what it describes.
14
-
15
- ## Authority
16
-
17
- - Follow the context standard for entry shape: frontmatter, sections, length, and what goes in. It is the single source. Read it with `canon standards context`.
@@ -1,13 +0,0 @@
1
- ---
2
- description: Route canon/wireframes edits to the wireframe standard for layout and interaction intent
3
- paths:
4
- - 'canon/wireframes/**'
5
- - '.claude/wireframes/**'
6
- ---
7
-
8
- # Wireframe standards
9
-
10
- ## Authority
11
-
12
- - Follow the wireframes standard for layout and interaction intent: regions, the states table and its evidence links, copy, behavior, exclusions, and what moves to `canon/context/`. It is the single source. Read it with `canon standards wireframes`.
13
- - Read it before adding or revising a surface.
@@ -1,12 +0,0 @@
1
- ---
2
- description: Route canon/REQUIREMENTS.md edits to the requirements standard for product scope and goals
3
- paths:
4
- - 'canon/REQUIREMENTS.md'
5
- - '.claude/REQUIREMENTS.md'
6
- ---
7
-
8
- # Requirements standards
9
-
10
- ## Authority
11
-
12
- - Follow the requirements standard for what belongs in the problem, goals, non-goals, MVP features, and constraints. It is the single source. Read it with `canon standards requirements`.
@@ -1,12 +0,0 @@
1
- ---
2
- description: Route canon/DESIGN.md edits to the design standard for visual intent and token tables
3
- paths:
4
- - 'canon/DESIGN.md'
5
- - '.claude/DESIGN.md'
6
- ---
7
-
8
- # Design standards
9
-
10
- ## Authority
11
-
12
- - Follow the design standard for visual intent, the token tables, and the render contract. It is the single source. Read it with `canon standards design`.
@@ -1,13 +0,0 @@
1
- ---
2
- description: Route .canon/tasks/ edits to the tasks standard for task files and the board standard for priority.md and backlog.md
3
- paths:
4
- - '.canon/tasks/**'
5
- ---
6
-
7
- # Tasks standards
8
-
9
- ## Authority
10
-
11
- - Follow the tasks standard for filenames, frontmatter, what belongs, and the task file format. It is the single source. Read it with `canon standards tasks`.
12
- - Follow the board standard for `priority.md` and `backlog.md`, their readiness groups, and row order. Read it with `canon standards board`.
13
- - Never hand-edit `.canon/tasks/index.md`. A hook regenerates it from sibling frontmatter.
@@ -1,11 +0,0 @@
1
- ---
2
- description: Route .canon/groundwork/ edits to the groundwork standard for ordinal naming, numbering, frontmatter, and required file contents
3
- paths:
4
- - '.canon/groundwork/**'
5
- ---
6
-
7
- # Groundwork standards
8
-
9
- ## Authority
10
-
11
- - Follow the groundwork standard for reserved numbering, frontmatter and dating, what each required file holds, and the conventions a track keeps. It is the single source. Read it with `canon standards groundwork`.
@@ -1,11 +0,0 @@
1
- ---
2
- description: Route .canon/intake/ edits to the intake standard for the item format, the answer contract, and ordinal naming
3
- paths:
4
- - '.canon/intake/**'
5
- ---
6
-
7
- # Intake standards
8
-
9
- ## Authority
10
-
11
- - Follow the intake standard for the folder layout, frontmatter and dating, the item format, and retrieval. It is the single source. Read it with `canon standards intake`.
@@ -1,11 +0,0 @@
1
- ---
2
- description: Route .canon/memory/ edits to the memory standard for the filename, frontmatter, body shape, and lifecycle
3
- paths:
4
- - '.canon/memory/**'
5
- ---
6
-
7
- # Memory standards
8
-
9
- ## Authority
10
-
11
- - Follow the memory standard for the filename and type prefix, the frontmatter, the body shape per type, links between entries, and the lifecycle. It is the single source. Read it with `canon standards memory`.