@erclx/canon 5.34.0 → 5.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/REQUIREMENT.md +1 -1
- package/claude/skills/auto-ship/references/draft-mark.md +1 -1
- package/claude/skills/canon-cli/SKILL.md +10 -11
- package/claude/skills/create-skill/SKILL.md +2 -1
- package/claude/skills/create-skill/references/skill-paths.md +12 -15
- package/{standards/standard.md → claude/skills/create-skill/references/skill-reference.md} +50 -45
- package/claude/skills/create-skill/references/skill.md +9 -3
- package/claude/skills/draft-and-pick/SKILL.md +1 -1
- package/claude/skills/git-commit/references/versioning.md +13 -13
- package/claude/skills/git-pr/SKILL.md +1 -1
- package/claude/skills/git-pr/references/publish.md +1 -1
- package/claude/skills/review-address/REQUIREMENT.md +1 -1
- package/claude/skills/review-address/SKILL.md +2 -2
- package/claude/skills/review-pr/SKILL.md +3 -3
- package/claude/skills/review-pr/references/post.md +1 -1
- package/claude/skills/review-ui/REQUIREMENT.md +1 -1
- package/claude/skills/review-ui/SKILL.md +1 -1
- package/claude/skills/role-orchestrator/REQUIREMENT.md +2 -2
- package/claude/skills/role-orchestrator/SKILL.md +11 -12
- package/claude/skills/role-orchestrator/references/orchestrator-cloud-launch.md +3 -1
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +11 -8
- package/claude/skills/role-orchestrator/references/orchestrator-handback.md +10 -4
- package/claude/skills/role-orchestrator/references/orchestrator-launch.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-poll.md +11 -12
- package/claude/skills/role-orchestrator/references/orchestrator-review-dispatch.md +12 -15
- package/claude/skills/role-orchestrator/references/orchestrator-reviewer-launch.md +6 -4
- package/claude/skills/role-orchestrator/scripts/poll.ts +50 -1
- package/claude/skills/role-reviewer/REQUIREMENT.md +17 -7
- package/claude/skills/role-reviewer/SKILL.md +17 -10
- package/claude/skills/role-worker/REQUIREMENT.md +1 -1
- package/claude/skills/role-worker/SKILL.md +6 -6
- package/claude/skills/session-compact/references/handoff-note.md +1 -1
- package/claude/skills/target-setup/SKILL.md +2 -2
- package/claude/skills/target-setup/references/detect.md +3 -3
- package/docs/agents/audits.md +1 -1
- package/docs/agents/commands.md +2 -4
- package/docs/agents/counts.md +5 -6
- package/docs/agents/drift-surfaces.md +15 -19
- package/docs/agents/index.md +2 -3
- package/docs/agents/install-and-sync.md +7 -31
- package/docs/agents/markdown-audit.md +10 -12
- package/docs/agents/migrate.md +1 -1
- package/docs/agents/records-stale.md +1 -1
- package/docs/agents/records-validate.md +11 -23
- package/docs/agents/records.md +1 -1
- package/docs/agents/routing.md +1 -1
- package/docs/agents/rule-citations.md +11 -14
- package/docs/agents/scripting.md +2 -20
- package/docs/agents/state-scoped-risk.md +1 -1
- package/docs/agents/tasks-validate.md +1 -1
- package/docs/agents/teach.md +1 -1
- package/docs/target/index.md +1 -0
- package/docs/target/migrations.md +4 -0
- package/docs/target/projects.md +9 -9
- package/docs/target/scenarios.md +5 -6
- package/docs/target/standards-moved.md +32 -0
- package/docs/target/sync.md +5 -5
- package/docs/workflow/operating-model.md +16 -18
- package/docs/workflow/skill-map.md +1 -1
- package/governance/detect.toml +0 -4
- package/governance/renames.toml +0 -1
- package/governance/stacks/base.toml +15 -8
- package/governance/stacks/go.toml +2 -0
- package/governance/stacks/node.toml +1 -1
- package/governance/stacks/php.toml +2 -0
- package/governance/stacks/python.toml +1 -1
- package/package.json +1 -4
- package/scripts/core/install-check.sh +2 -3
- package/src/audits/catalog.ts +0 -9
- package/src/claude/routing.ts +1 -1
- package/src/claude/skills-reach.ts +4 -6
- package/src/cli/help.ts +3 -4
- package/src/cli.ts +0 -2
- package/src/commands/gov.ts +5 -9
- package/src/commands/init.ts +1 -1
- package/src/commands/labels.ts +4 -44
- package/src/commands/migrate.ts +1 -1
- package/src/commands/records.ts +4 -20
- package/src/commands/tooling.ts +2 -4
- package/src/counts/catalogs.ts +0 -6
- package/src/gate/boundaries.ts +2 -2
- package/src/gate/measures.ts +6 -28
- package/src/gate/sequencer.ts +51 -2
- package/src/gate/stages.ts +0 -18
- package/src/gov/citations.ts +11 -43
- package/src/markdown/bans.ts +1 -1
- package/src/migrate/scratch-evidence.ts +2 -2
- package/src/records/validate.ts +6 -194
- package/src/sandbox/provision.ts +0 -5
- package/src/secrets/shipped.ts +1 -2
- package/src/serve/static.ts +1 -2
- package/src/shipped/references.ts +29 -80
- package/src/sync/check.ts +18 -14
- package/src/tooling/inject.ts +6 -37
- package/src/tooling/read.ts +2 -3
- package/src/tooling/scan.ts +4 -17
- package/src/tooling/subfolder.ts +2 -66
- package/tooling/base/configs/scripts/verify.json +1 -1
- package/tooling/base/configs/scripts/verify.ts +1 -12
- package/tooling/base/manifest.toml +1 -2
- package/tooling/base/reference.md +10 -16
- package/tooling/base/seeds/.github/workflows/verify.yml +0 -3
- package/tooling/base/seeds/.lintstagedrc +1 -2
- package/tooling/base/seeds/canon/context/ci.md +0 -1
- package/tooling/base/seeds/canon/context/development.md +1 -1
- package/tooling/claude/reference.md +1 -1
- package/tooling/claude/seeds/.claude/hooks/review-post-scan.sh +13 -1
- package/tooling/go/reference.md +1 -1
- package/tooling/php/reference.md +1 -1
- package/tooling/python/reference.md +2 -2
- package/tooling/web/configs/.github/workflows/verify.yml +0 -3
- package/tooling/web/manifest.toml +0 -1
- package/tooling/web/reference.md +2 -4
- package/docs/agents/standards-audit.md +0 -40
- package/governance/rules/tooling/765-spelling.md +0 -19
- package/governance/stacks/astro.toml +0 -2
- package/governance/stacks/nextjs.toml +0 -2
- package/governance/stacks/node-server.toml +0 -2
- package/governance/stacks/python-fastapi.toml +0 -2
- package/governance/stacks/react.toml +0 -2
- package/src/commands/standards.ts +0 -278
- package/src/labels/spelling.ts +0 -120
- package/src/standards/audit.ts +0 -146
- package/src/standards/list.ts +0 -33
- package/src/standards/read.ts +0 -177
- package/src/standards/scope.ts +0 -56
- package/standards/index.md +0 -10
- package/tooling/base/configs/.vscode/extensions.json +0 -9
- package/tooling/base/configs/.vscode/settings.json +0 -3
- package/tooling/base/seeds/.cspell/project-terms.txt +0 -0
- package/tooling/base/seeds/.cspell/tech-stack.txt +0 -25
- package/tooling/base/seeds/cspell.json +0 -20
- package/tooling/go/seeds/.cspell/tech-stack.txt +0 -16
- package/tooling/nextjs/seeds/.cspell/tech-stack.txt +0 -3
- package/tooling/php/seeds/.cspell/tech-stack.txt +0 -5
- package/tooling/python/seeds/.cspell/tech-stack.txt +0 -18
- package/tooling/vite-react/seeds/.cspell/project-terms.txt +0 -1
- package/tooling/vite-react/seeds/.cspell/tech-stack.txt +0 -2
- package/tooling/web/configs/.vscode/extensions.json +0 -13
- package/tooling/web/configs/.vscode/settings.json +0 -10
- package/tooling/web/seeds/.cspell/tech-stack.txt +0 -21
package/README.md
CHANGED
|
@@ -65,7 +65,6 @@ Each domain has a canonical source in this repo and a thin install or sync CLI o
|
|
|
65
65
|
| -------------- | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------- |
|
|
66
66
|
| Plugin skills | Skills that plan a feature, review a diff, sync the planning docs, and run the ship chain | Loaded live from the plugin, never copied |
|
|
67
67
|
| Governance | Coding and authoring rules that load into a Claude session when a matching path is edited | Installed per project by `canon gov install`, refreshed by sync |
|
|
68
|
-
| Standards | Authoring conventions for commits, branches, plans, tasks, and markdown | Opened by name, read by name with `canon standards <name>` |
|
|
69
68
|
| Tooling stacks | Golden configs, seeds, and a reference per framework | Laid down by `canon init`, reconciled by `canon tooling sync` |
|
|
70
69
|
| Design system | Ships a `DESIGN.md` token format, a skill that drafts one from an existing project or from scratch, and a render command | `canon design render` |
|
|
71
70
|
| Slides | A folder of HTML slides per deck, drawn in the project's tokens and rebuilt as editable shapes | `canon slides render` writes PowerPoint |
|
|
@@ -74,7 +73,7 @@ Each domain has a canonical source in this repo and a thin install or sync CLI o
|
|
|
74
73
|
| Transcripts | A YouTube transcript with metadata frontmatter | `canon transcripts <url>` writes it into any repo |
|
|
75
74
|
| Sandbox | Scenario scaffolds that provision an isolated project state for verifying each domain flow | `canon sandbox` |
|
|
76
75
|
|
|
77
|
-
Those domains reach you in three shapes. A tooling stack lands as real files under version control, because a config is something your build reads and your project owns. A
|
|
76
|
+
Those domains reach you in three shapes. A tooling stack lands as real files under version control, because a config is something your build reads and your project owns. A plugin skill and the references it carries are never copied, so there is no copy in your repo to drift from this one.
|
|
78
77
|
|
|
79
78
|
Governance is the third shape. A rule with a path glob loads only when a matching path is edited, and a rule with none loads every session. Run `canon gov list` to see the glob beside each rule.
|
|
80
79
|
|
|
@@ -152,9 +151,9 @@ git init
|
|
|
152
151
|
canon init
|
|
153
152
|
```
|
|
154
153
|
|
|
155
|
-
`canon init` installs base tooling configs, Claude seeds, and governance rules in one pass, and scaffolds a `.claude/wiki/` stub for your project's own reference pages. Governance defaults to the `base` stack, so a bare init lands the
|
|
154
|
+
`canon init` installs base tooling configs, Claude seeds, and governance rules in one pass, and scaffolds a `.claude/wiki/` stub for your project's own reference pages. Governance defaults to the `base` stack, so a bare init lands the workflow and doc-authoring rules in `.claude/rules/`. Each rule names the skill it loads, so no corpus is copied into your project.
|
|
156
155
|
|
|
157
|
-
Pass `--stack <name>` for a
|
|
156
|
+
Pass `--stack <name>` for a language stack such as `node` or `python`, or `--skip governance` to leave rules out. Run `canon tooling list --json` to see the catalog.
|
|
158
157
|
|
|
159
158
|
For the full journey from scaffold through adding a domain later to syncing upstream drift, see [target projects](docs/target/projects.md).
|
|
160
159
|
|
|
@@ -164,7 +163,6 @@ Each domain carries an entry written for someone maintaining the toolkit rather
|
|
|
164
163
|
|
|
165
164
|
- [Claude Code plugin](canon/context/claude-plugin/index.md)
|
|
166
165
|
- [Governance rules](canon/context/governance/index.md)
|
|
167
|
-
- [Standards](canon/context/standards/index.md)
|
|
168
166
|
- [Tooling stacks](canon/context/tooling/index.md)
|
|
169
167
|
- [Design system](canon/context/design/index.md)
|
|
170
168
|
- [Slides](canon/context/features/slides.md)
|
|
@@ -9,7 +9,7 @@ description: Why a session changing what a caller can see needs stated rules on
|
|
|
9
9
|
|
|
10
10
|
Without this skill, a session changing a surface a caller depends on has nothing in front of it about what that caller can see or how a change lands without breaking it. It works for the one caller it opened, renames a field in place, returns whatever record it had in hand, and nothing in the toolkit answers before the change ships.
|
|
11
11
|
|
|
12
|
-
The absence is measured across the shipped corpus. No folder under `claude/skills/` matches `api`, `interface`, or `contract`, and no file across `claude
|
|
12
|
+
The absence is measured across the shipped corpus. No folder under `claude/skills/` matches `api`, `interface`, or `contract`, and no file across `claude/` and `governance/` carries `hyrum` or a form of `idempotent`. The only related lines are the two error bullets in the core code rule, which state that errors are structured and hide internals and say nothing about exposure, versioning, or retries.
|
|
13
13
|
|
|
14
14
|
The one skill nearest the subject leaves the pointer open. `codebase-layout` excludes shaping "a module's interface and seams" in its description and names no skill to take it, so a session routed away from layout on that question lands nowhere.
|
|
15
15
|
|
|
@@ -29,4 +29,4 @@ The number crosses from that step's output into a command this session types, wh
|
|
|
29
29
|
|
|
30
30
|
Report what the read returned rather than what the command printed, since the exit says the call ran and says nothing about the state. A `true` reports a draft. A `false` reports the pull request as opened ready and unsupervised, and the chain stops there. Never re-issue the mark on a disagreeing read, which fights whoever readied it instead of guarding anything.
|
|
31
31
|
|
|
32
|
-
Placement is why the call sits ahead of the watch rather than after it. Marking afterwards leaves the pull request unmarked for the whole CI run, which is the stretch an unattended worker's branch is least supervised. What the mark buys is a reader learning the pull request has had no review yet. It buys no bound on that stretch: readying a pull request to merge lifts the mark, GitHub requires it before a merge, and the act
|
|
32
|
+
Placement is why the call sits ahead of the watch rather than after it. Marking afterwards leaves the pull request unmarked for the whole CI run, which is the stretch an unattended worker's branch is least supervised. What the mark buys is a reader learning the pull request has had no review yet. It buys no bound on that stretch: readying a pull request to merge lifts the mark, GitHub requires it before a merge, and the act runs through `canon pr lift`, which a reviewer runs on its close and the controlling session runs as the fallback, or through the operator directly. `role-worker` states the mirroring refusal of an instruction to ready the pull request directly, whoever sends it.
|
|
@@ -27,15 +27,14 @@ Consult to pick the `canon` verb for a job, and before running a verb that write
|
|
|
27
27
|
|
|
28
28
|
## Domains
|
|
29
29
|
|
|
30
|
-
| Job | Verb
|
|
31
|
-
| --------------------------------------------------------------- |
|
|
32
|
-
| Install or sync governance rules | `canon gov`
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
| Read a toolkit reference doc | `canon docs` |
|
|
30
|
+
| Job | Verb |
|
|
31
|
+
| --------------------------------------------------------------- | --------------- |
|
|
32
|
+
| Install or sync governance rules | `canon gov` |
|
|
33
|
+
| Sync a tooling stack's configs and seeds, or read its reference | `canon tooling` |
|
|
34
|
+
| Set up or sync the Claude workflow | `canon claude` |
|
|
35
|
+
| Scaffold a wiki | `canon wiki` |
|
|
36
|
+
| Regenerate the `index.md` files | `canon indexes` |
|
|
37
|
+
| Read a toolkit reference doc | `canon docs` |
|
|
39
38
|
|
|
40
39
|
## Author and render
|
|
41
40
|
|
|
@@ -84,12 +83,12 @@ Read the doc each line names before running one of these. `canon docs install-an
|
|
|
84
83
|
|
|
85
84
|
- `canon sync` runs every installed domain's sync, so it carries each risk below.
|
|
86
85
|
- `canon gov sync` replaces a rule you edited and deletes a rule the toolkit retired, edited or not.
|
|
87
|
-
- `canon tooling sync --write` replaces every golden config a stack ships. Seeds are copy-once
|
|
86
|
+
- `canon tooling sync --write` replaces every golden config a stack ships. Seeds are copy-once. Nothing writes without the flag. See `canon docs sync`.
|
|
88
87
|
- `canon design sync` replaces the shipped design files and leaves `.claude/design/project/` alone.
|
|
89
88
|
- `canon migrate --write` rewrites files that cite a retired name or layout. It reports and writes nothing without the flag. See `canon docs migrate`.
|
|
90
89
|
- `canon indexes regen` rewrites each generated `index.md` from the folder's current state, so a hand edit there is lost. See `canon docs indexes`.
|
|
91
90
|
|
|
92
|
-
|
|
91
|
+
`CLAUDE.md` and the other seed docs are copy-once, and no sync updates them. Merge those by hand against the toolkit copy.
|
|
93
92
|
|
|
94
93
|
## Source of truth
|
|
95
94
|
|
|
@@ -11,7 +11,8 @@ Read these files in parallel:
|
|
|
11
11
|
|
|
12
12
|
- `${CLAUDE_SKILL_DIR}/references/skill.md`: skill structure, skill types, frontmatter fields, invocation rules
|
|
13
13
|
- `${CLAUDE_SKILL_DIR}/references/skill-requirement.md`: what `REQUIREMENT.md` must answer, its sections, and its template
|
|
14
|
-
- `${CLAUDE_SKILL_DIR}/references/skill-paths.md`: which root a path in the body resolves against, and how the body cites
|
|
14
|
+
- `${CLAUDE_SKILL_DIR}/references/skill-paths.md`: which root a path in the body resolves against, and how the body cites another skill's reference
|
|
15
|
+
- `${CLAUDE_SKILL_DIR}/references/skill-reference.md`, when the skill carries a reference setting the shape of one artifact: its scope, success criterion, frontmatter, and rule phrasing
|
|
15
16
|
- `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md`: punctuation and formatting for skill body text
|
|
16
17
|
- `${CLAUDE_SKILL_DIR}/references/skill-practice.md`, when the skill carries engineering practice: the closing sections a practice skill owes and the anatomy behind them
|
|
17
18
|
- The `write-human` skill: voice, rhythm, and sentence construction for skill body text
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Skill path reference
|
|
3
|
-
description: Which root a file a skill body names resolves against, and how a body cites
|
|
3
|
+
description: Which root a file a skill body names resolves against, and how a body cites another skill's reference
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Skill path reference
|
|
7
7
|
|
|
8
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
9
|
|
|
10
|
-
This is an attribute
|
|
10
|
+
This is an attribute reference. It governs the path strings a body carries rather than a file of its own, so it carries no template.
|
|
11
11
|
|
|
12
12
|
## Scope
|
|
13
13
|
|
|
14
|
-
Governs how a `SKILL.md` body or a file under its `references/` names a bundled asset, an installed shared doc, or
|
|
14
|
+
Governs how a `SKILL.md` body or a file under its `references/` names a bundled asset, an installed shared doc, or another skill's reference.
|
|
15
15
|
|
|
16
16
|
Does not govern:
|
|
17
17
|
|
|
@@ -23,7 +23,7 @@ Does not govern:
|
|
|
23
23
|
A path in a skill body works when the skill resolves it from any project it runs in:
|
|
24
24
|
|
|
25
25
|
- Does each bundled asset resolve against the skill's own directory rather than the session's working directory?
|
|
26
|
-
- Does each cited
|
|
26
|
+
- Does each cited reference resolve in a target that installed nothing but the plugin?
|
|
27
27
|
- Does a procedure two skills share live in one place, with each body citing it?
|
|
28
28
|
|
|
29
29
|
A body failing any of these is non-conforming even when every path resolves in this repository.
|
|
@@ -34,18 +34,15 @@ Know which root a file lives under before referencing it.
|
|
|
34
34
|
|
|
35
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
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
|
|
37
|
+
- Do not hand-copy another skill's reference 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
38
|
|
|
39
|
-
## Citing
|
|
39
|
+
## Citing another skill's reference
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
A reference shared across skills lives in the `references/` of the skill that owns it, so a body cites it by the sibling path.
|
|
42
42
|
|
|
43
|
-
- Cite `${CLAUDE_SKILL_DIR}
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
- 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.
|
|
47
|
-
- 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.
|
|
48
|
-
- 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.
|
|
43
|
+
- Cite another skill's reference as `${CLAUDE_SKILL_DIR}/../<skill>/references/<name>.md`. The plugin ships the skills side by side, so the sibling path resolves in every install. Name the owner skill rather than copying the file.
|
|
44
|
+
- State the path once per body, at the site that reads the reference. A later mention of a reference the body already read stays bare, since repeating the path at every mention is noise rather than instruction.
|
|
45
|
+
- A guard on a reference's presence names the file rather than the folder holding it, since a folder test answers for a sibling that happens to be there.
|
|
49
46
|
- Use `${CLAUDE_SKILL_DIR}`, never a bare `../../` and never `${CLAUDE_PLUGIN_ROOT}`, since only the first expands before the body reaches the model.
|
|
50
|
-
- Cite a shared procedure, never restate it. A procedure two or more skills execute gets one definition in
|
|
51
|
-
- Keep the trigger in the body and the procedure in the
|
|
47
|
+
- Cite a shared procedure, never restate it. A procedure two or more skills execute gets one definition in its owner's reference and a citation in each body.
|
|
48
|
+
- Keep the trigger in the body and the procedure in the reference. The citing skill states when the procedure runs and what it runs against, since that varies per skill and the reference cannot know it.
|
|
@@ -1,75 +1,83 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description: Shape and content rules for
|
|
2
|
+
title: Reference file reference
|
|
3
|
+
description: Shape and content rules for a reference that sets the shape of one artifact
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Reference file reference
|
|
7
7
|
|
|
8
|
-
Applies to each
|
|
8
|
+
Applies to each file under a skill's `references/` that sets the shape of one document type, or of one attribute carried across every document. A session reads it at the point the skill body names it, and skills and developers consume it alike. This file governs itself, so every rule below applies to it.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Contents
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
- [Scope](#scope)
|
|
13
|
+
- [What a working reference looks like](#what-a-working-reference-looks-like)
|
|
14
|
+
- [Scoping rules](#scoping-rules)
|
|
15
|
+
- [Frontmatter](#frontmatter)
|
|
16
|
+
- [Structure](#structure)
|
|
17
|
+
- [Rules](#rules)
|
|
18
|
+
- [Success criterion](#success-criterion)
|
|
19
|
+
- [Changing a reference](#changing-a-reference)
|
|
20
|
+
- [Examples](#examples)
|
|
21
|
+
- [Template](#template)
|
|
13
22
|
|
|
14
23
|
## Scope
|
|
15
24
|
|
|
16
|
-
Governs
|
|
25
|
+
Governs a shape reference at `skills/<name>/references/<file>.md`: its stated jurisdiction, success criterion, frontmatter, structure, and rule phrasing.
|
|
17
26
|
|
|
18
27
|
Does not govern:
|
|
19
28
|
|
|
20
|
-
- The
|
|
21
|
-
-
|
|
22
|
-
- The
|
|
29
|
+
- The `references/` folder's place in the skill, its line ceiling, and the body naming each file: `skill.md`
|
|
30
|
+
- How a body or a reference cites another skill's reference: `skill-paths.md`
|
|
31
|
+
- The voice, rhythm, and sentence construction a reference is written in: the `write-human` skill
|
|
32
|
+
- The punctuation, formatting, and word choice a reference is written in: `../markdown-craft/references/markdown.md`
|
|
33
|
+
- The shape of any artifact a reference governs, which is that reference's own subject
|
|
23
34
|
|
|
24
|
-
## What a working
|
|
35
|
+
## What a working reference looks like
|
|
25
36
|
|
|
26
|
-
A
|
|
37
|
+
A shape reference answers these questions. Each can be answered wrong, which is what makes them a test rather than a preamble.
|
|
27
38
|
|
|
28
39
|
- Which single document type or attribute does this govern, and where does it apply?
|
|
29
40
|
- Can an author who has seen no example produce a conforming document from this file alone?
|
|
30
41
|
- Does every rule state a shape the document must have, rather than a fact about the repository that happens to store it?
|
|
31
42
|
- What does a conforming document achieve, stated so a reviewer can call one non-conforming without appealing to taste?
|
|
32
43
|
|
|
33
|
-
A
|
|
44
|
+
A reference failing these questions is non-conforming even when it satisfies every shape rule below.
|
|
34
45
|
|
|
35
46
|
## Scoping rules
|
|
36
47
|
|
|
37
48
|
### Declaring scope
|
|
38
49
|
|
|
39
|
-
- Govern one document type per
|
|
40
|
-
- Open with a `## Scope` section stating what the
|
|
41
|
-
- Write it as one line naming the artifact or attribute and where it applies, then a `Does not govern:` list. Give each entry the excluded concern and the owner it goes to.
|
|
50
|
+
- Govern one document type per reference, or one attribute across every document. Split unrelated conventions into separate files.
|
|
51
|
+
- Open with a `## Scope` section stating what the reference governs and what it does not, placed above the shape rules. A reference that specifies shape exhaustively and jurisdiction nowhere cannot refuse a rule, so the rule with no obvious owner lands in whichever reference sits nearest.
|
|
52
|
+
- Write it as one line naming the artifact or attribute and where it applies, then a `Does not govern:` list. Give each entry the excluded concern and the owner it goes to.
|
|
53
|
+
- Name an owner in the same `references/` folder by bare filename and one in another skill by its sibling path, `../<skill>/references/<name>.md`. Name the surface instead where the owner is one, such as a coding rule, a project policy, or the code.
|
|
42
54
|
- Put the governed path in backticks inside the first sentence of that line, anchored deep enough to resolve from a project root. A bare folder name matches a same-named folder elsewhere in the tree, and a path held back until a later sentence sits beside every other path the statement mentions, including the ones it excludes.
|
|
43
|
-
- Say in that same sentence when the
|
|
55
|
+
- Say in that same sentence when the reference governs an attribute rather than a document type. An attribute is written across every document and has no path to name, so the silence reads as an omission unless the sentence claims it.
|
|
44
56
|
- Cut an entry that names no owner at all. It is either excluding something nothing was going to claim, or it is a content exclusion, which the rule below sends to the shape rules instead.
|
|
45
|
-
- Declare a boundary from both sides. A yield, an exemption, or a handoff stated in one
|
|
46
|
-
- Separate a jurisdiction exclusion from a content exclusion. The first names a concern another
|
|
47
|
-
- Stay silent on a section the
|
|
57
|
+
- Declare a boundary from both sides. A yield, an exemption, or a handoff stated in one reference alone is never checked against the reference on the other side of it, which is how two files come to claim the same rule or neither does.
|
|
58
|
+
- Separate a jurisdiction exclusion from a content exclusion. The first names a concern another reference owns and belongs in `## Scope`. The second names what does not belong inside the document and stays with the shape rules. Merging them puts a boundary claim where no sibling will read it.
|
|
59
|
+
- Stay silent on a section the reference holds today but should not own. Claiming it makes the scope statement false the moment it moves, and the mismatch is the evidence that moves it.
|
|
48
60
|
|
|
49
61
|
### Naming the file
|
|
50
62
|
|
|
51
63
|
- Name the file for the artifact the scope statement governs, taking the word from the deepest path segment that names the artifact rather than the folder holding it. `plan.md` over `.canon/plans/feature-<slug>.md` and `session.md` over `.canon/tasks/session-<slug>.md` both follow it.
|
|
52
|
-
- Take the singular or the plural of that word, whichever reads as the artifact. A standard over one document takes the singular, and one over a set may take either.
|
|
53
|
-
- Name an attribute standard for the attribute itself, since it governs no path to derive a word from.
|
|
54
|
-
- Write the derived word alone. A standard installs as a sibling and is cited by bare filename, so a qualifier makes an outlier that every later citation has to carry.
|
|
55
|
-
- Rename an outlier at the moment it is found, and state the reach in the change that does it. The name is installed in every target and cited in surfaces that never see the rename, so the cost only grows.
|
|
56
64
|
|
|
57
65
|
### Staying inside it
|
|
58
66
|
|
|
59
|
-
- Name no path, filename, or folder outside the document type the
|
|
67
|
+
- Name no path, filename, or folder outside the document type the reference governs. A reference reaches projects whose layout is their own, so a path borrowed from the authoring repository is wrong in a target and nothing reports it.
|
|
60
68
|
- State the rule, never the mechanism enforcing it. Hooks, scripts, checks, and skill catalogs are facts about one repository. Name the condition the document must meet and let the enforcing surface name its own case.
|
|
61
|
-
- Invent inline examples rather than citing a real file elsewhere in the project. A cited file moves or is deleted and the
|
|
69
|
+
- Invent inline examples rather than citing a real file elsewhere in the project. A cited file moves or is deleted and the reference goes stale in silence.
|
|
62
70
|
|
|
63
71
|
## Frontmatter
|
|
64
72
|
|
|
65
73
|
- Start the file with a frontmatter block carrying at least `title` and `description`. A consuming surface may require more.
|
|
66
74
|
- `title`: names the doc type in sentence case, suffixed `reference` (`Commit reference`, `Branch reference`)
|
|
67
|
-
- `description`: one line naming what the
|
|
75
|
+
- `description`: one line naming what the reference covers
|
|
68
76
|
|
|
69
77
|
## Structure
|
|
70
78
|
|
|
71
79
|
- Use sentence case for every heading
|
|
72
|
-
- Flat `##` rule groups for a single-topic
|
|
80
|
+
- Flat `##` rule groups for a single-topic reference. Group `##` headers by concern for a multi-topic one.
|
|
73
81
|
- When one `##` section covers more than one sub-concern, split its bullets into `###` subgroups, one subgroup per sub-concern. A flat bullet list under an `##` covers a single sub-concern. Roughly seven bullets is a signal to split, not a hard cap.
|
|
74
82
|
- Order groups from the most-used rule down to the edge case
|
|
75
83
|
|
|
@@ -83,13 +91,12 @@ A standard failing these questions is non-conforming even when it satisfies ever
|
|
|
83
91
|
|
|
84
92
|
## Success criterion
|
|
85
93
|
|
|
86
|
-
- State what a conforming artifact achieves, not only what shape it takes. A
|
|
94
|
+
- State what a conforming artifact achieves, not only what shape it takes. A reference that specifies structure exhaustively and success nowhere cannot be argued against, only edited on taste.
|
|
87
95
|
- Write the criterion as a small set of questions the artifact must answer, or a task a reader must be able to complete from it. Keep it checkable by a person in one sitting.
|
|
88
96
|
- Place it near the top, above the shape rules it governs. The shape rules are the means and the criterion is the test.
|
|
89
97
|
- Say that an artifact failing the criterion is non-conforming even when it satisfies every shape rule. Without that line the criterion reads as advice.
|
|
90
|
-
- Add a criterion to an existing standard when that standard is next exercised, not in a sweep. A criterion written without a failure to point at is the taste-based edit this section exists to prevent, so a standard with no criterion yet is a known gap rather than a violation.
|
|
91
98
|
|
|
92
|
-
## Changing a
|
|
99
|
+
## Changing a reference
|
|
93
100
|
|
|
94
101
|
### The checkpoint
|
|
95
102
|
|
|
@@ -98,12 +105,12 @@ Answer all four before editing, and carry the answers into wherever the change i
|
|
|
98
105
|
- What problem does this solve? Name the artifact that went wrong, rather than the improvement the change makes.
|
|
99
106
|
- Which surface owns the rule today? A rule already stated somewhere moves or is cited, never restated in a second place.
|
|
100
107
|
- What deterministic check catches a regression? Name it, or say none exists and the rule holds on reading alone.
|
|
101
|
-
- What does this collide with? Name the sibling
|
|
108
|
+
- What does this collide with? Name the sibling reference, rule, or template it contradicts, or state that nothing does.
|
|
102
109
|
|
|
103
110
|
### What justifies a change
|
|
104
111
|
|
|
105
|
-
- Change a
|
|
106
|
-
- Park findings wherever the project tracks pending work, or in the
|
|
112
|
+
- Change a reference on a failure, not on a finding. A finding is that the docs say X or a paper suggests Y. A failure is a conforming artifact that satisfied every shape rule and still missed the success criterion.
|
|
113
|
+
- Park findings wherever the project tracks pending work, or in the reference's own backlog section when it tracks none. They are hypotheses to test, not instructions to apply.
|
|
107
114
|
- Cite the failing artifact in the change that fixes it, so the next reader can tell which rules were paid for by evidence.
|
|
108
115
|
|
|
109
116
|
## Examples
|
|
@@ -115,20 +122,19 @@ Answer all four before editing, and carry the answers into wherever the change i
|
|
|
115
122
|
|
|
116
123
|
## Template
|
|
117
124
|
|
|
118
|
-
- Carry one fenced template of the document the
|
|
119
|
-
- Bind this to a
|
|
120
|
-
-
|
|
121
|
-
- Place the template below the rules it satisfies, under a `## Template` heading or inside the section holding those rules. A reader arrives at it having already read what each part means.
|
|
125
|
+
- Carry one fenced template of the document the reference governs, so an author copies a shape instead of reconstructing it from prose.
|
|
126
|
+
- Bind this to a reference governing a document type. An attribute reference governs a scan, a string, or a label rather than a file, so it has no document to template and carries none. State that exemption in the sentence declaring it an attribute reference.
|
|
127
|
+
- Place the template below the rules it satisfies, under a `## Template` heading or inside the section holding those rules.
|
|
122
128
|
- Show the skeleton alone: every required section, one placeholder line for what each holds. A full worked document is a second document to maintain.
|
|
123
|
-
- Write placeholders in angle brackets rather than copying a real document. A copied file goes stale, and its backticked filenames read as citations to anything parsing the
|
|
124
|
-
- Switch to a bare word where the fenced language reads `<` as syntax of its own, as Mermaid and HTML do, and say in the line above the fence that the names are placeholders.
|
|
125
|
-
- Carry any header, key, or label a consuming tool parses verbatim. The template is the only place an author learns which strings are load-bearing
|
|
126
|
-
- Treat the template as authoritative where it and the prose disagree. An author copies the block, so a contradiction ships as the block
|
|
129
|
+
- Write placeholders in angle brackets rather than copying a real document. A copied file goes stale, and its backticked filenames read as citations to anything parsing the reference.
|
|
130
|
+
- Switch to a bare word where the fenced language reads `<` as syntax of its own, as Mermaid and HTML do, and say in the line above the fence that the names are placeholders.
|
|
131
|
+
- Carry any header, key, or label a consuming tool parses verbatim. The template is the only place an author learns which strings are load-bearing.
|
|
132
|
+
- Treat the template as authoritative where it and the prose disagree. An author copies the block, so a contradiction ships as the block.
|
|
127
133
|
|
|
128
134
|
````markdown
|
|
129
135
|
---
|
|
130
136
|
title: <Document type> reference
|
|
131
|
-
description: <one line naming what this
|
|
137
|
+
description: <one line naming what this reference covers>
|
|
132
138
|
---
|
|
133
139
|
|
|
134
140
|
# <Document type> reference
|
|
@@ -137,7 +143,7 @@ Applies to `<path/to/document>`. <One line on what the document is for and when
|
|
|
137
143
|
|
|
138
144
|
## Scope
|
|
139
145
|
|
|
140
|
-
Governs `<path/to/document>`: <the aspects this
|
|
146
|
+
Governs `<path/to/document>`: <the aspects this reference sets>.
|
|
141
147
|
|
|
142
148
|
Does not govern:
|
|
143
149
|
|
|
@@ -160,7 +166,6 @@ A <document type> failing these is non-conforming even when it satisfies every s
|
|
|
160
166
|
|
|
161
167
|
## <Shape rule group>
|
|
162
168
|
|
|
163
|
-
- <imperative rule, one concern per bullet>
|
|
164
169
|
- <imperative rule, one concern per bullet>
|
|
165
170
|
|
|
166
171
|
## Template
|
|
@@ -32,7 +32,8 @@ Does not govern:
|
|
|
32
32
|
|
|
33
33
|
- What a `REQUIREMENT.md` must answer, its sections, and its template: `skill-requirement.md`
|
|
34
34
|
- A practice skill's closing sections and ledger: `skill-practice.md`
|
|
35
|
-
- Which root a path in a body resolves against, and how a body cites
|
|
35
|
+
- Which root a path in a body resolves against, and how a body cites another skill's reference: `skill-paths.md`
|
|
36
|
+
- The jurisdiction, success criterion, and rule phrasing of a reference setting one artifact's shape: `skill-reference.md`
|
|
36
37
|
- Path-scoped coding rules, which load on a file match rather than on a request match: `rule.md`
|
|
37
38
|
- Voice, rhythm, and sentence construction in a skill body: the `write-human` skill
|
|
38
39
|
- Punctuation, formatting, and word choice in a skill body: `markdown.md`
|
|
@@ -160,9 +161,14 @@ allowed-tools: <tools required>
|
|
|
160
161
|
## Scripts
|
|
161
162
|
|
|
162
163
|
- Use `scripts/` for operations that must be deterministic or repetitive
|
|
164
|
+
- Ask whether a CLI verb the project already has does the job before writing a script. A verb is already installed and tested, and a script beside it is a second copy that drifts
|
|
165
|
+
- Write a script in TypeScript and run it as `bun ${CLAUDE_SKILL_DIR}/scripts/<name>.ts`. Keep bash for a few lines that start one command
|
|
166
|
+
- Import no package. A plugin loads from a cache that carries no `node_modules`, so only `node:` built-ins and the CLIs the skill already requires resolve
|
|
163
167
|
- Use XML tags in script output for reliable parsing: `<SECTION>content</SECTION>`
|
|
164
|
-
|
|
165
|
-
|
|
168
|
+
|
|
169
|
+
### Inline commands
|
|
170
|
+
|
|
171
|
+
- Always include `2>/dev/null || echo "FALLBACK"` guards on git and shell commands a skill body runs inline. A TypeScript script handles failure with try and catch instead
|
|
166
172
|
|
|
167
173
|
## Invocation
|
|
168
174
|
|
|
@@ -9,7 +9,7 @@ metadata:
|
|
|
9
9
|
|
|
10
10
|
Some decisions are settled by looking rather than by reasoning, and no draft is wrong until one is picked. Every step here puts several candidates in front of the operator and keeps the real surface untouched until they have chosen.
|
|
11
11
|
|
|
12
|
-
The candidates live on the local design canvas, the surface `canon:canvas-board` drives. Every verb below is `canon canvas`, and
|
|
12
|
+
The candidates live on the local design canvas, the surface `canon:canvas-board` drives. Every verb below is `canon canvas`, and `${CLAUDE_SKILL_DIR}/../canvas-board/references/canvas.md` fixes the content format a frame takes. Read that reference before writing the first frame.
|
|
13
13
|
|
|
14
14
|
## Guards
|
|
15
15
|
|
|
@@ -39,19 +39,19 @@ External release identity used in git tags and release notes. Independent of pha
|
|
|
39
39
|
|
|
40
40
|
## Where each appears
|
|
41
41
|
|
|
42
|
-
| Surface
|
|
43
|
-
|
|
|
44
|
-
| `.canon/tasks/`
|
|
45
|
-
| Chat with the operator
|
|
46
|
-
| Tracked prose (context entries)
|
|
47
|
-
| Shipped prose (`
|
|
48
|
-
| PR titles
|
|
49
|
-
| PR bodies
|
|
50
|
-
| Review comments
|
|
51
|
-
| Issue titles and bodies
|
|
52
|
-
| Commit messages
|
|
53
|
-
| Git tags
|
|
54
|
-
| README and `CHANGELOG.md`
|
|
42
|
+
| Surface | Phase labels | Semver tags |
|
|
43
|
+
| ----------------------------------------------------- | ------------ | ----------------------------------- |
|
|
44
|
+
| `.canon/tasks/` | yes | no |
|
|
45
|
+
| Chat with the operator | yes | no |
|
|
46
|
+
| Tracked prose (context entries) | conditional | no |
|
|
47
|
+
| Shipped prose (`claude/skills/`, `governance/rules/`) | no | no |
|
|
48
|
+
| PR titles | no | only when the PR cuts a release |
|
|
49
|
+
| PR bodies | no | only when the PR cuts a release |
|
|
50
|
+
| Review comments | no | only when referencing a release |
|
|
51
|
+
| Issue titles and bodies | no | only when referencing a release |
|
|
52
|
+
| Commit messages | no | only when the commit cuts a release |
|
|
53
|
+
| Git tags | no | yes |
|
|
54
|
+
| README and `CHANGELOG.md` | no | yes |
|
|
55
55
|
|
|
56
56
|
## Rules
|
|
57
57
|
|
|
@@ -87,7 +87,7 @@ canon labels scan --title "<title>" --body-file .canon/tmp/pr/body.md --json
|
|
|
87
87
|
|
|
88
88
|
Branch on the JSON record rather than the exit code. An operator's shell can wrap `canon` in a function whose status comes from a trailing command, flattening a non-zero exit to 0, the same reason the labels step below branches on its own record rather than the exit.
|
|
89
89
|
|
|
90
|
-
Stop and fix the title or body on a non-empty `phaseLabels`, `boardReferences`, `sessionLinks`, `
|
|
90
|
+
Stop and fix the title or body on a non-empty `phaseLabels`, `boardReferences`, `sessionLinks`, `titleFormatIssues`, `bannedCharacters`, or a `sections` record with anything in `outside` or `missing`. Do not proceed to `### Final command` until a re-run comes back clean on all six. `titleFormatIssues` names which `## Title` rule in `${CLAUDE_SKILL_DIR}/references/pr.md` the title breaks, structure, casing, or length, so fix the named rule rather than guessing. `sections.outside` lists each heading to rename or drop, `sections.missing` each required heading to add, and `bannedCharacters` names the character to restructure the sentence around. Leave `cutsRelease` and `semverTags` alone, since a release-please pull request legitimately carries version references its own fixed shape explains.
|
|
91
91
|
|
|
92
92
|
The scan stays required even where a `pull_request` workflow job runs the same verb, since a project holding an older `canon` carries no such job and no `titleFormatIssues`, `sections`, or `bannedCharacters` key.
|
|
93
93
|
|
|
@@ -66,7 +66,7 @@ A number referring to a pull request or an issue takes the form its destination
|
|
|
66
66
|
|
|
67
67
|
Text published to a remote is the auto-linking half: a pull request body, an issue body, a comment on either, and a commit message. Write `#123` there, and `owner/repo#123` where the reference crosses repositories, which the same auto-linking reaches. A markdown file browsed from the repository tree is the other half, where neither spelling links and the backticked one marks the number as an identifier. <!-- canon-allow-reference: the two spellings this section defines, which a qualified form would destroy -->
|
|
68
68
|
|
|
69
|
-
Content that installs into another repository is the third destination, and it splits on which repository the number names. A skill body loads from a plugin cache
|
|
69
|
+
Content that installs into another repository is the third destination, and it splits on which repository the number names. A skill body loads from a plugin cache and a docs page is read through `canon docs`, so the reader holds their own repository rather than the one a bare number belongs to. Qualifying a number against a different, resolvable repository fixes that, since the reader can open that repository even without this one.
|
|
70
70
|
|
|
71
71
|
Qualifying it against `erclx/canon` fixes nothing, because a reader holding only the plugin cache or the published package still cannot open this repository's own history. A same-repository citation takes no number here at all, bare or qualified. State the fact the citation was standing in for instead, and where the identifier is the only trace of a one-off incident rather than a reproducible count, carry it into the `canon/context/` entry that owns the surface.
|
|
72
72
|
|
|
@@ -55,5 +55,5 @@ A declined finding fails on a third axis, which is where its reason ends up. A w
|
|
|
55
55
|
- Writing the review, which `review-pr` owns. The split is by side of the channel: that one posts findings from an independent session and this one is the worker's return leg.
|
|
56
56
|
- Staging, committing, and pushing the follow-up, which `git-followup` owns under this skill's direction
|
|
57
57
|
- Refreshing the `.claude/` docs the fixes made stale, which `context-fold` owns
|
|
58
|
-
- Re-reviewing its own fixes, which hands back to the
|
|
58
|
+
- Re-reviewing its own fixes, which hands back to the reviewer
|
|
59
59
|
- Re-reading a rewritten branch, which `review-pr` absorbs by testing whether the prior reviewed commit still reaches the head and paying for a full pass when it does not
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-address
|
|
3
|
-
description: Pulls review findings and CI status on the current branch's open PR, fixes each in the working tree, refreshes any stale `.claude/` docs, replies with a summary comment, and pushes a follow-up commit. The worker's return leg after `review-pr`. Use when asked to "address the review", "fix the PR comments", "respond to review", or after
|
|
3
|
+
description: Pulls review findings and CI status on the current branch's open PR, fixes each in the working tree, refreshes any stale `.claude/` docs, replies with a summary comment, and pushes a follow-up commit. The worker's return leg after `review-pr`. Use when asked to "address the review", "fix the PR comments", "respond to review", or after a reviewer posts findings. Do NOT use to write a review. That is `review-pr`.
|
|
4
4
|
metadata:
|
|
5
5
|
family: after-pr
|
|
6
6
|
---
|
|
@@ -247,7 +247,7 @@ addressed, and leads with the rebase instead:
|
|
|
247
247
|
Rebased PR #<number> onto origin/main. <N> files resolved by hand, <N> rebuilt by the check.
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
-
Do not merge. Hand back to the
|
|
250
|
+
Do not merge. Hand back to the reviewer for re-review, or to the orchestrator where no live reviewer answers.
|
|
251
251
|
|
|
252
252
|
## Post-review findings
|
|
253
253
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-pr
|
|
3
|
-
description: Reviews an open pull request from an independent session and posts findings as a review comment on the PR. Posts a first pass against the whole change and every later pass against only the commits added since, under `## Review` while any finding is open and `## Review closed` once a pass carries none. Reads project docs and the task board for cross-feature context a self-review lacks. Use when asked to "review the PR", "review this feature's PR", "post a PR review", "re-review the PR", "close out the review", "confirm the findings are fixed", or acting as the
|
|
3
|
+
description: Reviews an open pull request from an independent session and posts findings as a review comment on the PR. Posts a first pass against the whole change and every later pass against only the commits added since, under `## Review` while any finding is open and `## Review closed` once a pass carries none. Reads project docs and the task board for cross-feature context a self-review lacks. Use when asked to "review the PR", "review this feature's PR", "post a PR review", "re-review the PR", "close out the review", "confirm the findings are fixed", or acting as the dispatched reviewer of a worker's PR. Do NOT use to review local uncommitted changes.
|
|
4
4
|
metadata:
|
|
5
5
|
family: after-pr
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Review PR
|
|
9
9
|
|
|
10
|
-
This is
|
|
10
|
+
This is a dispatched reviewer's independent review. It reviews an open PR the session
|
|
11
11
|
did not write and posts the findings to the PR, so the vantage is independent
|
|
12
12
|
and the output is durable.
|
|
13
13
|
|
|
@@ -19,7 +19,7 @@ none, so the most recent comment's heading reports whether any work is owed.
|
|
|
19
19
|
Every pass is this skill, and which one it is gets detected from the thread
|
|
20
20
|
rather than named by the caller.
|
|
21
21
|
|
|
22
|
-
The threshold is stated here and nowhere else, and every other surface acting on it cites this skill rather than restating the grades. One rule governs both the heading and the dispatch: a pass carrying anything owed takes `## Review` and owes a dispatch to the session holding the branch, and a pass carrying nothing at all takes `## Review closed` and owes none. Owed covers a finding at any severity, a Testing question, and a reviewer request nobody has answered alike, which is what keeps the two halves from separating. Sending that dispatch is `role-
|
|
22
|
+
The threshold is stated here and nowhere else, and every other surface acting on it cites this skill rather than restating the grades. One rule governs both the heading and the dispatch: a pass carrying anything owed takes `## Review` and owes a dispatch to the session holding the branch, and a pass carrying nothing at all takes `## Review closed` and owes none. Owed covers a finding at any severity, a Testing question, and a reviewer request nobody has answered alike, which is what keeps the two halves from separating. Sending that dispatch is `role-reviewer`'s step rather than this one, which posts and stops, and `role-orchestrator` sends it only as the fallback where no live reviewer can. Post the open heading whether it is the first pass or the fourth. A pull request thread then reads as `## Review`, the worker's answer under `## Review response` from `review-address`, another `## Review` while anything stays open, and `## Review closed` when nothing does.
|
|
23
23
|
|
|
24
24
|
Both of this skill's headings anchor as a section distinct from human threads, and neither invents beyond what the whole set already states. That set is eight headings across four families, stated here once so `role-orchestrator`'s poll and every reply-posting skill cite it rather than carry a copy. The review family, `## Review` and `## Review closed`, belongs to this skill alone. The reply family, `## Review response`, `## Rebase`, and `## Post-review findings`, belongs to `review-address`. The third family is a single heading, `## Evidence`, which `canon pr evidence` posts through `git-pr` and `git-followup` and which answers no comment already on the thread, so the poll excludes it from the unclassified count without reading it as a reply that owes a re-review. The fourth, `## UI review` and `## UI review closed`, belongs to `review-ui`, which posts it as a review beside this one, and nothing in this skill reads it.
|
|
25
25
|
|
|
@@ -56,7 +56,7 @@ X critical, Y should-fix, Z minor. Reviewed against project docs and the board.
|
|
|
56
56
|
|
|
57
57
|
A stale ticked box goes in a `**PR body**` block, in place of a `**`path/to/file.ext`**` block and ahead of every one of those, since it precedes the code the diff carries rather than sitting inside it.
|
|
58
58
|
|
|
59
|
-
Run `canon labels scan --title "<title>" --body "<body>" --head <headRefName>` against the PR under review, since Step 1 already holds all three and this pass is the last human-shaped gate before merge. A hit lands in the same `**PR body**` block, `should-fix`, naming each finding the scan returns: a token quoted from the title or body for a phase label, a board identifier, a session link,
|
|
59
|
+
Run `canon labels scan --title "<title>" --body "<body>" --head <headRefName>` against the PR under review, since Step 1 already holds all three and this pass is the last human-shaped gate before merge. A hit lands in the same `**PR body**` block, `should-fix`, naming each finding the scan returns: a token quoted from the title or body for a phase label, a board identifier, or a session link, and the broken rule's name, `structure`, a casing issue, or `length`, for a title-format hit. A heading in `sections.outside`, a heading in `sections.missing`, or a character in `bannedCharacters` is a hit of the same weight, naming the heading or the character. This reads the pull request being reviewed, distinct from the comment this pass is about to post, which the scan later in this step still covers.
|
|
60
60
|
|
|
61
61
|
A later pass carrying findings keeps that shape and changes only the summary line:
|
|
62
62
|
|
|
@@ -54,7 +54,7 @@ A verdict also goes stale without saying so. A push after the pass changes what
|
|
|
54
54
|
|
|
55
55
|
- Reviewing the code and the stills, which `review-pr` owns. The two run as separate sessions so each finishes on its own clock and neither hears the other.
|
|
56
56
|
- Writing the checklist and its drivable format, which `ui-checklist` owns
|
|
57
|
-
- Dispatching the pass
|
|
57
|
+
- Dispatching the pass and polling its verdict, which `role-orchestrator` owns, and the lift's gates, which `canon pr lift` reads whichever session runs it
|
|
58
58
|
- A subagent inside the code reviewer, dropped because its cost stays invisible until it returns
|
|
59
59
|
- Writing a tracked file or checking anything out to host a frame. The push goes through the GitHub API onto the frames branch alone, so the reviewer still enters no worktree and touches no branch a pull request holds.
|
|
60
60
|
- Dropping a closed pull request's frames, which a scheduled workflow runs, and purging a dropped frame GitHub still serves by commit, which needs a platform request
|
|
@@ -24,7 +24,7 @@ rather than inside it, so the two passes finish on their own clocks.
|
|
|
24
24
|
- The wrapper refuses to open the browser because its revision is absent: stop and post nothing, passing its install command to whoever launched the pass. Never install mid-pass.
|
|
25
25
|
- The newest UI verdict is `## UI review closed` at the current head: stop, `The UI review already covers <short-sha>.` An open verdict at the head stops the same way only when nothing has arrived since it: drive again when a `## Review response` or `## Post-review findings` comment is newer than the verdict, or the launch names an address.
|
|
26
26
|
- The hosted preview was not built from the head: stop and post nothing, naming `built`, `tip`, and `canon pr preview <number> --json` for the dispatcher. A verdict posted against an older build carries a marker naming a head nobody drove.
|
|
27
|
-
- Post
|
|
27
|
+
- Post, then run `canon pr lift <number>` on a close. Never merge or ready the PR by hand, and edit the evidence comment only through `canon pr tick`.
|
|
28
28
|
|
|
29
29
|
## Step 1: resolve the pull request
|
|
30
30
|
|