@erclx/canon 5.33.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 +2 -3
- package/claude/skills/api-design/SKILL.md +2 -3
- package/claude/skills/api-design/references/adopted.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/canon-feedback/REQUIREMENT.md +1 -0
- package/claude/skills/canon-feedback/SKILL.md +10 -28
- package/claude/skills/canon-feedback/references/template.md +53 -0
- package/claude/skills/canvas-board/SKILL.md +4 -1
- package/claude/skills/canvas-board/references/canvas.md +26 -3
- package/claude/skills/code-craft/REQUIREMENT.md +1 -1
- package/claude/skills/code-craft/SKILL.md +0 -1
- package/claude/skills/create-rule/SKILL.md +1 -1
- package/claude/skills/create-rule/references/rule.md +3 -1
- 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 +10 -4
- package/claude/skills/draft-and-pick/SKILL.md +1 -1
- package/claude/skills/git-commit/references/versioning.md +13 -13
- package/claude/skills/git-issue/references/issue.md +4 -1
- 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-craft/references/ui.md +1 -1
- 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 +8 -6
- package/claude/skills/review-ui/references/driving.md +8 -8
- package/claude/skills/review-ui/references/post.md +52 -16
- 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 +11 -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 +12 -6
- package/claude/skills/target-setup/references/detect.md +22 -5
- package/claude/skills/test-craft/REQUIREMENT.md +2 -3
- package/claude/skills/test-craft/SKILL.md +15 -3
- package/docs/agents/audits.md +1 -1
- package/docs/agents/canvas.md +5 -1
- package/docs/agents/commands.md +3 -5
- package/docs/agents/counts.md +5 -6
- package/docs/agents/drift-surfaces.md +15 -19
- package/docs/agents/gov-detect.md +47 -0
- package/docs/agents/index.md +6 -4
- package/docs/agents/install-and-sync.md +11 -31
- package/docs/agents/markdown-audit.md +10 -12
- package/docs/agents/migrate.md +1 -1
- package/docs/agents/pr-evidence-layout.md +70 -0
- package/docs/agents/pr-evidence.md +8 -9
- package/docs/agents/pr-frames.md +7 -2
- package/docs/agents/pr-lift.md +132 -0
- 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 +4 -21
- 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 +11 -11
- 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 +197 -0
- package/governance/renames.toml +0 -1
- package/governance/rules/code/000-code.md +1 -13
- package/governance/rules/code/010-testing.md +2 -30
- package/governance/rules/ui/400-ui.md +1 -1
- package/governance/rules/ui/480-canvas.md +13 -0
- 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/scripts/core/regen-hero.ts +0 -6
- package/scripts/lib/ui.sh +0 -9
- package/src/audits/catalog.ts +0 -9
- package/src/canvas/arrange.ts +66 -0
- package/src/canvas/capture.ts +20 -6
- package/src/canvas/content.ts +39 -0
- package/src/canvas/fit.ts +238 -0
- package/src/canvas/tokens.ts +28 -10
- package/src/capture/frame-values.ts +2 -32
- 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/canvas.ts +179 -1
- package/src/commands/gov.ts +149 -10
- package/src/commands/init.ts +1 -1
- package/src/commands/labels.ts +4 -44
- package/src/commands/migrate.ts +1 -1
- package/src/commands/pr.ts +376 -1
- package/src/commands/records.ts +4 -20
- package/src/commands/tooling.ts +2 -4
- package/src/counts/catalogs.ts +0 -6
- package/src/feedback/body.ts +26 -5
- package/src/gate/boundaries.ts +2 -2
- package/src/gate/measures.ts +64 -72
- package/src/gate/sequencer.ts +51 -2
- package/src/gate/stages.ts +3 -22
- package/src/gov/citations.ts +11 -43
- package/src/gov/detect.ts +301 -0
- package/src/gov/list.ts +23 -2
- package/src/gov/stacks.ts +9 -0
- package/src/markdown/bans.ts +1 -1
- package/src/migrate/scratch-evidence.ts +2 -2
- package/src/pr/evidence.ts +218 -45
- package/src/pr/frames.ts +23 -3
- package/src/pr/lift.ts +418 -0
- package/src/pr/rest.ts +3 -0
- package/src/pr/review-scope.ts +76 -0
- package/src/records/validate.ts +6 -194
- package/src/sandbox/equivalence.ts +14 -7
- 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
|
|
|
@@ -19,7 +19,7 @@ The one skill nearest the subject leaves the pointer open. `codebase-layout` exc
|
|
|
19
19
|
|
|
20
20
|
- State Hyrum's Law as design rules a session can act on: decide what is observable, and expose no storage type, internal identifier, ordering, or timing by accident
|
|
21
21
|
- Tell the session to write the contract, being the signature, flags, output shape, or schema, before the body
|
|
22
|
-
- State one error shape per surface with a stable code a caller can branch on,
|
|
22
|
+
- State one error shape per surface with a stable code a caller can branch on, and own the hidden-internals clause in the body, since no project rule carries it for every code stack
|
|
23
23
|
- State validation at the boundary, once, with the value trusted inside
|
|
24
24
|
- State additive change as the default: new fields and flags optional, nothing renamed or removed in place, no change of meaning under an existing name, and the One-Version Rule for a caller that cannot pin
|
|
25
25
|
- State the four idempotency rules: store and honor a caller's key, claim it in one atomic step under a unique constraint, fail loudly on a reused key with a different body, and keep a key past the longest retry window
|
|
@@ -30,7 +30,6 @@ The one skill nearest the subject leaves the pointer open. `codebase-layout` exc
|
|
|
30
30
|
## Must not
|
|
31
31
|
|
|
32
32
|
- Name a framework, a protocol style, or a language in the body. Status codes, verbs, pagination, and schema languages stay out, so the body holds for a function, a command, a file format, and an endpoint alike.
|
|
33
|
-
- Restate the two error bullets of the core code rule
|
|
34
33
|
- Restate the consumer-listing axis `review-craft` carries for a finished change
|
|
35
34
|
- Cover interface depth or the internals behind a boundary, which govern what sits behind a surface rather than what crosses it
|
|
36
35
|
- Import an external skill's tone, such as a law stated as absolute, or an excuse row rebutting an objection no session has raised
|
|
@@ -31,8 +31,8 @@ Every observable behavior becomes a dependency once there are enough callers, wh
|
|
|
31
31
|
|
|
32
32
|
## Keep one error shape per surface
|
|
33
33
|
|
|
34
|
-
- Give every failure on one surface the same shape, carrying a stable code a caller can branch on and a message for the person reading it. Branching on message text breaks the first time the message is reworded.
|
|
35
|
-
-
|
|
34
|
+
- Give every failure on one surface the same shape, carrying a stable code a caller can branch on and a message for the person reading it. Branching on message text breaks the first time the message is reworded. Keep internal implementation details out of the message, since a caller reads it and cannot act on a stack frame.
|
|
35
|
+
- Reuse the error type the project already throws or returns where one exists, rather than inventing a second error convention beside it.
|
|
36
36
|
|
|
37
37
|
## Validate at the boundary
|
|
38
38
|
|
|
@@ -98,7 +98,6 @@ Check each line against the surface the change produced. A line answering no is
|
|
|
98
98
|
## What this delegates
|
|
99
99
|
|
|
100
100
|
- Where the file holding a surface sits on disk: `codebase-layout`
|
|
101
|
-
- The structured error rule and hidden internals floor every code stack loads: `000-code`
|
|
102
101
|
- Listing the consumers a finished change breaks, and the docs it made false, during review: `review-craft`
|
|
103
102
|
- A visual interface, its layout, and its look: `design-taste`
|
|
104
103
|
- Interface depth and the internals behind a boundary: `code-craft`
|
|
@@ -21,7 +21,7 @@ From `addyosmani/agent-skills@2686b620`, [`skills/api-and-interface-design/SKILL
|
|
|
21
21
|
|
|
22
22
|
**Contract first.** Write the interface before the body. Adopted as its own group, widened from an endpoint to a signature, a flag set, an output shape, and a schema.
|
|
23
23
|
|
|
24
|
-
**One error shape.** Every failure on one surface carries the same structure. Adopted with a stable code added for the caller to branch on, and
|
|
24
|
+
**One error shape.** Every failure on one surface carries the same structure. Adopted with a stable code added for the caller to branch on, and a clause keeping internal implementation details out of the message, since no project rule carries either for every code stack.
|
|
25
25
|
|
|
26
26
|
**Validation at the boundary.** Check input where it enters and trust it inside. Adopted, with a value read back from a file or another service counted as input.
|
|
27
27
|
|
|
@@ -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
|
|
|
@@ -20,6 +20,7 @@ The last failure is the session's own effort. Asked to report, a session starts
|
|
|
20
20
|
- Write the stated fallback for a field the session cannot fill, so an empty field reads as absent rather than as unreported
|
|
21
21
|
- Open a GitHub issue on the toolkit repo through the CLI so the report lands where triage reads it, and print the returned URL on its own line
|
|
22
22
|
- Surface the block and the reason when the issue call fails, since a failure that prints nothing leaves the report where nothing reads it
|
|
23
|
+
- Carry the whole request in the issue body alone, since a comment is easy to miss and a body and a comment that differ leave triage choosing
|
|
23
24
|
- Hold a report the operator marks sensitive, since the issue is public
|
|
24
25
|
- Fall back to printing the block when the CLI is absent, so the report still exists
|
|
25
26
|
|
|
@@ -27,41 +27,23 @@ From the conversation so far, identify:
|
|
|
27
27
|
- Repro details already in context (commands run, files touched), or `none`
|
|
28
28
|
- Proposed fix, or `open` when the session settled on no direction
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
**Fields the report omits when the session has none:**
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
### From project
|
|
36
|
-
|
|
37
|
-
<name or kind>
|
|
38
|
-
|
|
39
|
-
### Surface
|
|
40
|
-
|
|
41
|
-
<type>, <file path or name>
|
|
42
|
-
|
|
43
|
-
### Observed
|
|
44
|
-
|
|
45
|
-
<one or two lines>
|
|
32
|
+
- Suggested shape, when the session worked out what the change should look like, such as a template, a command's output, or a field list
|
|
33
|
+
- Why, when the session has reasons for the fix beyond the observed failure
|
|
34
|
+
- Links, when the session cites an issue, a pull request, or a document
|
|
46
35
|
|
|
47
|
-
|
|
36
|
+
Format as a single fenced markdown block, one `###` heading per field. Read `${CLAUDE_SKILL_DIR}/references/template.md` on reaching this point for the block and each field's fallback.
|
|
48
37
|
|
|
49
|
-
|
|
38
|
+
`canon feedback` refuses a report missing `### Surface`, `### Observed`, or `### Proposed fix`, naming the one it did not find. `### From project`, `### Expected`, and `### Repro` are optional, so write the literal fallback the template shows rather than dropping the heading, which is what keeps a field the session cannot fill reading as absent instead of unreported.
|
|
50
39
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<commands or steps, or "none">
|
|
54
|
-
|
|
55
|
-
### Proposed fix
|
|
56
|
-
|
|
57
|
-
<one line, or "open">
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
`canon feedback` refuses a report missing `### Surface`, `### Observed`, or `### Proposed fix`, naming the one it did not find. The other three are optional, so write the literal fallback shown above rather than dropping the heading, which is what keeps a field the session cannot fill reading as absent instead of unreported.
|
|
40
|
+
`### Suggested shape`, `### Why`, and `### Links` are optional the other way. Omit the heading when the session has nothing for it and write no fallback, since a report filed without them is complete and a placeholder would read as a reporter who had nothing to say.
|
|
61
41
|
|
|
62
42
|
Headings rather than bold labels, because a GitHub issue form renders a submitted field as `### <label>`. One shape reaches the toolkit whichever route a report takes, and the CLI parses both with one parser. The retired `**Surface:**` form is refused rather than accepted, so a block carrying it has to be rewritten.
|
|
63
43
|
|
|
64
|
-
Keep
|
|
44
|
+
Keep Observed and Expected to one or two lines each, so the report scans. Length belongs in Proposed fix, Suggested shape, and Why.
|
|
45
|
+
|
|
46
|
+
The issue body is the request. Put everything the toolkit needs to act on it there, since a comment is easy to miss and a body and a comment that differ leave triage choosing. A comment carries only what happens after filing.
|
|
65
47
|
|
|
66
48
|
## Step 2: ship to the toolkit
|
|
67
49
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Feedback report template
|
|
3
|
+
description: The fenced block canon-feedback fills, one heading per field, with each field's stated fallback
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Feedback report template
|
|
7
|
+
|
|
8
|
+
Step 1 of `canon-feedback`. The session reads this file on reaching the point where it formats the block.
|
|
9
|
+
|
|
10
|
+
```markdown
|
|
11
|
+
## Toolkit feedback
|
|
12
|
+
|
|
13
|
+
### From project
|
|
14
|
+
|
|
15
|
+
<name or kind>
|
|
16
|
+
|
|
17
|
+
### Surface
|
|
18
|
+
|
|
19
|
+
<type>, <file path or name>
|
|
20
|
+
|
|
21
|
+
### Observed
|
|
22
|
+
|
|
23
|
+
<one or two lines>
|
|
24
|
+
|
|
25
|
+
### Expected
|
|
26
|
+
|
|
27
|
+
<one or two lines, or "unclear">
|
|
28
|
+
|
|
29
|
+
### Repro
|
|
30
|
+
|
|
31
|
+
<commands or steps, or "none">
|
|
32
|
+
|
|
33
|
+
### Proposed fix
|
|
34
|
+
|
|
35
|
+
<the direction in as many lines as it takes, or "open">
|
|
36
|
+
|
|
37
|
+
### Suggested shape
|
|
38
|
+
|
|
39
|
+
<details>
|
|
40
|
+
<summary>Shape</summary>
|
|
41
|
+
|
|
42
|
+
<the template, output, or field list, in a fence one backtick longer than any fence it holds>
|
|
43
|
+
|
|
44
|
+
</details>
|
|
45
|
+
|
|
46
|
+
### Why
|
|
47
|
+
|
|
48
|
+
- <one reason per bullet>
|
|
49
|
+
|
|
50
|
+
### Links
|
|
51
|
+
|
|
52
|
+
<one link per line>
|
|
53
|
+
```
|
|
@@ -47,9 +47,11 @@ Hand the operator the address as a markdown link carrying the URL as its text an
|
|
|
47
47
|
## Step 2: make pages and frames
|
|
48
48
|
|
|
49
49
|
- Add a page for each decision being drafted: `canon canvas page add <page> --json`.
|
|
50
|
-
-
|
|
50
|
+
- Follow the house style in `${CLAUDE_SKILL_DIR}/references/canvas.md` before drafting an explanation frame.
|
|
51
|
+
- Add each frame through the verb, which writes the starting file and its box in one locked step: `canon canvas frame add <page> <frame> --width <px> --height <px> --json`. Give the width the frame should render at, since a capture and the canvas both render at it. The verb places the frame after the last one, and a position the operator asks for goes through `frame move`.
|
|
51
52
|
- Lay frames out with `canon canvas frame move <page> <frame> --x <px> --y <px> --json` rather than writing `layout.json` by hand, since the operator's drags write the same file under a lock.
|
|
52
53
|
- Name pages and frames for what they hold, such as `pricing` and `pricing-dense`, so the operator can say which one by name.
|
|
54
|
+
- After an insert or a resize, re-lay the page with `canon canvas arrange <page> --json`. It keeps the rows the operator dragged, places each on the standard gap, and drops layout entries whose frame file is gone. `--check` reports without writing.
|
|
53
55
|
|
|
54
56
|
## Step 3: edit a frame through its file
|
|
55
57
|
|
|
@@ -57,6 +59,7 @@ Write the frame's whole document to the `path` the add verb reported. The open c
|
|
|
57
59
|
|
|
58
60
|
- From a linked worktree, `Edit` and `Write` refuse a main-root path. Write the whole file through one plain `Bash` heredoc instead, the route `session-worktree` states for a main-root write, and never take the redirect to a worktree copy.
|
|
59
61
|
- Change one property of one element with `canon canvas edit <page>/<frame> --element <index> --set <property>=<value> --json` when the set it accepts covers the change, since it leaves every other byte as it was.
|
|
62
|
+
- Fit the box to the content once the write lands: `canon canvas fit <page>/<frame> --json`. Read each row's `wide` and `font`. A `wide` frame needs its box widened, which fit never does, and a `font` frame names a family the canvas does not serve, so set its text to a served face and fit again. A fit that grew a frame leaves the rows below overlapped until `canvas arrange` runs.
|
|
60
63
|
- Use the project's custom properties for every value the token stylesheet defines. The record from `serve` names the token source under `tokens`, and a `none` source means frames render unstyled, so say so rather than inventing values to cover it.
|
|
61
64
|
|
|
62
65
|
Mark the frame before the first write, so the operator sees which frame is being worked on before anything lands, and clear the mark once the edits to it are done:
|
|
@@ -15,6 +15,7 @@ The folder is gitignored, so nothing in a repository checks its shape and nothin
|
|
|
15
15
|
- [What a working canvas looks like](#what-a-working-canvas-looks-like)
|
|
16
16
|
- [Pages](#pages)
|
|
17
17
|
- [Frames](#frames)
|
|
18
|
+
- [House style](#house-style)
|
|
18
19
|
- [Layout](#layout)
|
|
19
20
|
- [Tokens](#tokens)
|
|
20
21
|
- [What a frame must not assume](#what-a-frame-must-not-assume)
|
|
@@ -24,9 +25,11 @@ The folder is gitignored, so nothing in a repository checks its shape and nothin
|
|
|
24
25
|
|
|
25
26
|
Governs the canvas content under `.canon/canvas/`: page folder names, frame files, the `layout.json` shape, how tokens reach a frame, and what a frame must not assume about where it renders.
|
|
26
27
|
|
|
28
|
+
Also governs the house style of an explanation frame, being a diagram, a board of notes, or a comparison. A mockup of the project's own interface is not an explanation frame, and it follows the project's design document for type, color, and layout.
|
|
29
|
+
|
|
27
30
|
Does not govern:
|
|
28
31
|
|
|
29
|
-
- The design decisions a frame is drafting, such as type, color, and layout taste: the project's own design document
|
|
32
|
+
- The design decisions a mockup frame is drafting, such as type, color, and layout taste: the project's own design document
|
|
30
33
|
- The project's design document and the token module it renders from, which a picked direction is carried into: `design.md`
|
|
31
34
|
- The procedure that starts the canvas, reads the operator's selection, and carries a pick back, which belongs to the surface driving the canvas
|
|
32
35
|
- Voice, rhythm, and sentence construction in any text a frame shows: the `write-human` skill
|
|
@@ -59,6 +62,19 @@ A canvas failing these is non-conforming even when it satisfies every shape rule
|
|
|
59
62
|
- Use the project's custom properties, `var(--<name>)`, for every value the token stylesheet defines. A literal copied from it shows the right color today and the wrong one after the next token change.
|
|
60
63
|
- Edit a frame by rewriting its file. The file is the frame, and nothing else holds a copy of its markup.
|
|
61
64
|
|
|
65
|
+
## House style
|
|
66
|
+
|
|
67
|
+
Applies to an explanation frame only. A mockup of the project's interface renders at the app's own sizes and follows the project's design document instead.
|
|
68
|
+
|
|
69
|
+
- Write text in sentence case. Use no all-caps text and no `text-transform: uppercase`.
|
|
70
|
+
- Keep lines short, one fact a line.
|
|
71
|
+
- Set body text at 20px or larger and headings at 44px or larger. Set nothing under 16px.
|
|
72
|
+
- Render an explanation frame about 1100px wide.
|
|
73
|
+
- Take colors from the project's custom properties. A frame that defines colors of its own sets the dark values on `:root` and the light ones under `[data-theme="light"]`, since the shell sets `data-theme` on each frame's root.
|
|
74
|
+
- Name only the faces the canvas serves into every frame: `Geist Variable` for text, `Noto Sans Mono` for code, and `Excalifont` for a hand-drawn look. They render the same in a capture and in any browser, so a height fitted against them holds.
|
|
75
|
+
- Make each box tall enough to show all its content, with no scrollbar and no clipped line. Run `canon canvas fit <page>/<frame>` rather than estimating, since it measures the content in the capture browser and sets the height.
|
|
76
|
+
- Read frames left to right in reading order. Let `frame add` place each frame after the last with the standard gap, and move one only when the operator asks for a position.
|
|
77
|
+
|
|
62
78
|
## Layout
|
|
63
79
|
|
|
64
80
|
- Keep one `layout.json` per page, beside its frames. It holds each frame's box and nothing else, so moving a frame never rewrites its markup.
|
|
@@ -89,8 +105,8 @@ The keys below are the ones a reader parses. The frame names are placeholders.
|
|
|
89
105
|
|
|
90
106
|
- Do not assume a viewport. A frame renders at its layout width on the canvas and in a capture alike, so size it with media queries against that width rather than against the operator's window.
|
|
91
107
|
- Do not assume the theme. The canvas theme toggle is the operator's own state, and a capture shows each frame in its default theme.
|
|
92
|
-
- Do not assume a network. Name
|
|
93
|
-
- Do not assume a default font. Set `font-family` with
|
|
108
|
+
- Do not assume a network. Name a served face, or ship the font beside the frame, since a capture refuses a frame naming a font it cannot find.
|
|
109
|
+
- Do not assume a default font. Set `font-family` with a served face first on an element the frame's text inherits from, since a capture checks the first family of the text it renders and the browser's default serif is absent from many machines. A frame naming a machine family such as `DejaVu Sans` renders at another height in another browser, which `canon canvas fit` reports.
|
|
94
110
|
- Do not assume the frame is the source. A picked direction is carried into the project's design document or a plan, and the operator clears the frame once it has been carried.
|
|
95
111
|
- Do not assume the canvas survives the checkout. The folder is gitignored, so a lost checkout loses every page in it.
|
|
96
112
|
|
|
@@ -113,6 +129,13 @@ A new frame starts from this skeleton. The names in it are placeholders.
|
|
|
113
129
|
color: var(--color-text);
|
|
114
130
|
background: var(--color-background);
|
|
115
131
|
}
|
|
132
|
+
/* only a color the frame defines itself: dark on :root, light here */
|
|
133
|
+
:root {
|
|
134
|
+
--frame-accent: #7aa2ff;
|
|
135
|
+
}
|
|
136
|
+
[data-theme='light'] {
|
|
137
|
+
--frame-accent: #1f4fd8;
|
|
138
|
+
}
|
|
116
139
|
</style>
|
|
117
140
|
</head>
|
|
118
141
|
<body>
|
|
@@ -30,7 +30,7 @@ Before this skill, two shipped pointers left interface depth unowned. `api-desig
|
|
|
30
30
|
- State a tension as one side only, such as "never duplicate"
|
|
31
31
|
- Name a language, a framework, or a type system feature in the body
|
|
32
32
|
- Restate the red, green, refactor loop `test-first` runs, or the design review procedure `review-craft` carries for a finished diff
|
|
33
|
-
- Restate
|
|
33
|
+
- Restate error or naming bullets. The core code rule retired them on purpose, and the error shape lives in `api-design`.
|
|
34
34
|
|
|
35
35
|
## Guards
|
|
36
36
|
|
|
@@ -106,4 +106,3 @@ Check each line against the code the change produced. A line answering no is fix
|
|
|
106
106
|
- Which layer a test belongs at: `test-craft`
|
|
107
107
|
- The contract a caller depends on, being its exports, flags, output, and errors: `api-design`
|
|
108
108
|
- Judging a finished diff, including a design review of it: `review-craft`
|
|
109
|
-
- The error and naming floors every code stack loads: `000-code`
|
|
@@ -70,4 +70,4 @@ Title casing is sentence case, with proper nouns keeping their own casing (`# Ty
|
|
|
70
70
|
|
|
71
71
|
## After writing
|
|
72
72
|
|
|
73
|
-
Emit the full path on its own line: `.claude/rules/project/<subdir>/<n>-<slug>.md`. Remind the user that Claude Code loads path-scoped rules when it reads a matching file, and always-on rules every session.
|
|
73
|
+
Emit the full path on its own line: `.claude/rules/project/<subdir>/<n>-<slug>.md`. Remind the user that Claude Code loads path-scoped rules when it reads or writes a matching file, and always-on rules every session.
|
|
@@ -21,7 +21,9 @@ description: Rule frontmatter, body shape, and voice for .claude/rules files
|
|
|
21
21
|
|
|
22
22
|
Rules give Claude Code coding constraints scoped to file paths. Claude Code discovers `.claude/rules/**/*.md` at session start.
|
|
23
23
|
|
|
24
|
-
A rule with no `paths:` field always applies, at the same priority as `CLAUDE.md`. A rule with `paths:` applies when Claude reads a file matching the glob. Author one rule per topic so the scope stays precise.
|
|
24
|
+
A rule with no `paths:` field always applies, at the same priority as `CLAUDE.md`. A rule with `paths:` applies when Claude reads or writes a file matching the glob. Author one rule per topic so the scope stays precise.
|
|
25
|
+
|
|
26
|
+
A rule with `paths:` loads on a read or a write of a matching file, inside a linked worktree as in the main one. A session creating the first matching file gets the rule only after that write lands, so a rule meant to shape new files also belongs in the skill or the always-on rule a session reads before it writes. Revisit when Claude Code loads a path-scoped rule before a write to a matching path. Re-measure with two headless `claude -p` runs in a linked worktree, one reading a matching file and one reading a file that does not match, each asking whether the rule's content is in context.
|
|
25
27
|
|
|
26
28
|
## Scope
|
|
27
29
|
|
|
@@ -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.
|