@erclx/canon 5.36.0 → 5.38.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/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/SKILL.md +6 -0
- package/claude/skills/auto-ship/SKILL.md +1 -1
- package/claude/skills/backlog-triage/SKILL.md +8 -8
- package/claude/skills/build-in-slices/SKILL.md +7 -1
- package/claude/skills/build-in-slices/references/adopted.md +3 -0
- package/claude/skills/canon-cli/SKILL.md +3 -0
- package/claude/skills/canon-feedback/SKILL.md +5 -0
- package/claude/skills/canon-feedback-triage/SKILL.md +3 -0
- package/claude/skills/canvas-board/SKILL.md +3 -0
- package/claude/skills/canvas-board/references/canvas.md +12 -0
- package/claude/skills/ci-workflow/SKILL.md +5 -0
- package/claude/skills/code-craft/SKILL.md +6 -0
- package/claude/skills/context-fold/references/context.md +48 -34
- package/claude/skills/create-rule/SKILL.md +11 -9
- package/claude/skills/create-rule/references/rule.md +6 -0
- package/claude/skills/create-skill/SKILL.md +11 -2
- package/claude/skills/create-skill/references/skill-disclosure.md +26 -0
- package/claude/skills/create-skill/references/skill-paths.md +3 -0
- package/claude/skills/create-skill/references/skill-reference.md +12 -0
- package/claude/skills/create-skill/references/skill.md +25 -24
- package/claude/skills/deprecation-migration/SKILL.md +6 -0
- package/claude/skills/deprecation-migration/references/adopted.md +3 -0
- package/claude/skills/design-taste/SKILL.md +6 -0
- package/claude/skills/design-taste/references/craft.md +3 -0
- package/claude/skills/design-taste/references/preflight.md +16 -0
- package/claude/skills/docs-sync/references/docs.md +6 -0
- package/claude/skills/docs-sync/references/readme.md +15 -0
- package/claude/skills/draft-and-pick/SKILL.md +12 -0
- package/claude/skills/draft-doc/references/context.md +1 -1
- package/claude/skills/draft-doc/references/readme.md +3 -0
- package/claude/skills/draft-figure/references/mermaid.md +6 -0
- package/claude/skills/draft-slides/SKILL.md +3 -0
- package/claude/skills/git-branch/references/branch.md +16 -11
- package/claude/skills/git-commit/references/commit.md +19 -11
- package/claude/skills/git-commit/references/versioning.md +9 -0
- package/claude/skills/git-issue/references/issue.md +13 -9
- package/claude/skills/git-pr/SKILL.md +5 -0
- package/claude/skills/git-pr/references/pr.md +24 -6
- package/claude/skills/git-ship/SKILL.md +3 -0
- package/claude/skills/git-split/SKILL.md +6 -0
- package/claude/skills/git-stage/SKILL.md +3 -0
- package/claude/skills/git-worktree/SKILL.md +6 -6
- package/claude/skills/markdown-craft/references/markdown.md +25 -6
- package/claude/skills/plan-feature/SKILL.md +9 -0
- package/claude/skills/plan-feature/references/plan.md +20 -8
- package/claude/skills/plan-groundwork/SKILL.md +6 -0
- package/claude/skills/plan-groundwork/references/groundwork.md +61 -29
- package/claude/skills/plan-intake/references/intake.md +6 -6
- package/claude/skills/read-frames/SKILL.md +3 -0
- package/claude/skills/review-craft/SKILL.md +3 -0
- package/claude/skills/review-pr/references/post.md +1 -1
- package/claude/skills/review-ui/SKILL.md +6 -3
- package/claude/skills/role-orchestrator/SKILL.md +4 -1
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +7 -4
- package/claude/skills/role-orchestrator/references/orchestrator-parked.md +1 -1
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +3 -0
- package/claude/skills/role-planner/SKILL.md +4 -1
- package/claude/skills/role-worker/SKILL.md +13 -1
- package/claude/skills/search-craft/SKILL.md +3 -0
- package/claude/skills/systematic-debugging/SKILL.md +6 -0
- package/claude/skills/target-check/references/domains.md +5 -0
- package/claude/skills/target-setup/SKILL.md +8 -4
- package/claude/skills/target-setup/references/verify.md +6 -5
- package/claude/skills/task-board/references/tasks.md +12 -7
- package/claude/skills/task-complete/references/archive.md +3 -0
- package/claude/skills/teach-workspace/SKILL.md +3 -0
- package/claude/skills/teach-workspace/references/glossary.md +3 -0
- package/claude/skills/teach-workspace/references/lesson-build.md +3 -0
- package/claude/skills/teach-workspace/references/lesson-craft.md +3 -0
- package/claude/skills/teach-workspace/references/teach.md +8 -8
- package/claude/skills/test-craft/SKILL.md +5 -0
- package/claude/skills/video-craft/SKILL.md +6 -0
- package/claude/skills/write-human/SKILL.md +9 -0
- package/docs/agents/capture.md +2 -0
- package/docs/agents/commands.md +54 -54
- package/docs/agents/context-audit-checks.md +6 -0
- package/docs/agents/context-audit.md +8 -8
- package/docs/agents/context-classify.md +2 -0
- package/docs/agents/drift-surfaces.md +5 -5
- package/docs/agents/gate.md +6 -7
- package/docs/agents/index.md +1 -1
- package/docs/agents/install-and-sync.md +2 -2
- package/docs/agents/markdown-audit-weight.md +11 -3
- package/docs/agents/markdown-audit.md +2 -2
- package/docs/agents/pr-frames.md +17 -3
- package/docs/agents/sessions-transfer.md +8 -6
- package/docs/agents/skills-audit.md +9 -1
- package/docs/target/projects.md +1 -1
- package/docs/target/scenarios.md +2 -2
- package/docs/target/standards-moved.md +20 -18
- package/docs/workflow/ai-workflow.md +3 -0
- package/docs/workflow/visual-design-workflow.md +5 -0
- package/governance/detect.toml +6 -1
- package/package.json +7 -4
- package/scripts/core/install-check.sh +1 -1
- package/src/cli/help.ts +1 -1
- package/src/commands/claude.ts +0 -1
- package/src/commands/context.ts +29 -4
- package/src/commands/gate.ts +1 -8
- package/src/commands/markdown.ts +52 -0
- package/src/commands/pr.ts +18 -11
- package/src/commands/records.ts +0 -1
- package/src/context/audit.ts +83 -0
- package/src/context/classify/prompts.ts +6 -1
- package/src/context/gate.ts +6 -3
- package/src/docs/read.ts +15 -21
- package/src/gate/measures.ts +186 -1
- package/src/gate/sequencer.ts +0 -4
- package/src/gate/stages.ts +46 -27
- package/src/git/files.ts +30 -0
- package/src/gov/adapter.ts +2 -2
- package/src/gov/install.ts +2 -2
- package/src/gov/list.ts +1 -1
- package/src/gov/payload.ts +1 -1
- package/src/gov/stacks.ts +1 -1
- package/src/markdown/gate.ts +10 -0
- package/src/markdown/growth.ts +43 -0
- package/src/markdown/stacks.ts +74 -0
- package/src/markdown/structure.ts +73 -5
- package/src/migrate/rule-layout.ts +12 -12
- package/src/pr/frames.ts +66 -1
- package/src/sandbox/equivalence.ts +7 -9
- package/src/sync/check.ts +23 -23
- package/src/teach/browser/head.ts +2 -2
- package/src/teach/browser/sidebar.ts +3 -3
- package/src/teach/browser/theme.ts +2 -2
- package/src/tooling/inject.ts +2 -2
- package/src/tooling/package.ts +15 -18
- package/src/tooling/verify-stack.ts +6 -3
- package/tooling/astro/configs/.oxfmtrc.json +8 -0
- package/tooling/astro/configs/.prettierrc +13 -0
- package/tooling/astro/configs/tsconfig.json +1 -1
- package/tooling/astro/manifest.toml +13 -0
- package/tooling/astro/reference.md +17 -7
- package/tooling/base/configs/.oxfmtrc.json +7 -0
- package/tooling/base/configs/scripts/verify.json +1 -1
- package/tooling/base/configs/scripts/verify.ts +3 -9
- package/tooling/base/manifest.toml +6 -6
- package/tooling/base/reference.md +20 -17
- package/tooling/base/seeds/.lintstagedrc +1 -3
- package/tooling/base/seeds/canon/context/ci.md +7 -7
- package/tooling/base/seeds/canon/context/development.md +10 -10
- package/tooling/claude/manifest.toml +5 -1
- package/tooling/claude/seeds/.claude/hooks/scratch-guard.sh +8 -0
- package/tooling/go/reference.md +2 -2
- package/tooling/nextjs/configs/.oxlintrc.json +223 -0
- package/tooling/nextjs/manifest.toml +2 -5
- package/tooling/nextjs/reference.md +4 -4
- package/tooling/php/manifest.toml +6 -1
- package/tooling/php/reference.md +2 -2
- package/tooling/python/manifest.toml +6 -1
- package/tooling/python/reference.md +4 -4
- package/tooling/vite-react/configs/tsconfig.json +1 -1
- package/tooling/vite-react/configs/vitest.config.ts +1 -1
- package/tooling/vite-react/manifest.toml +1 -4
- package/tooling/vite-react/reference.md +5 -5
- package/tooling/web/configs/.oxlintrc.json +213 -0
- package/tooling/web/configs/src/test/setup.ts +1 -1
- package/tooling/web/manifest.toml +12 -16
- package/tooling/web/reference.md +15 -15
- package/tooling/base/configs/.prettierrc +0 -12
- package/tooling/base/seeds/.prettierignore +0 -0
- package/tooling/nextjs/configs/eslint.config.js +0 -91
- package/tooling/web/configs/eslint.config.js +0 -82
|
@@ -79,6 +79,9 @@ Read `${CLAUDE_SKILL_DIR}/references/adopted.md` only when extending this guidan
|
|
|
79
79
|
- A function returns the object it read from storage, or a type defined beside the storage code.
|
|
80
80
|
- The same input check appears both at the entry point and inside a function it calls.
|
|
81
81
|
- A caller matches on the text of an error message.
|
|
82
|
+
|
|
83
|
+
### Changes, retries, and order
|
|
84
|
+
|
|
82
85
|
- An existing field is changing type or meaning under the same name.
|
|
83
86
|
- A write that a client could retry carries no key, or checks for one with a read before the insert.
|
|
84
87
|
- Output order follows whatever the underlying data returned, and nothing states whether it is sorted.
|
|
@@ -91,6 +94,9 @@ Check each line against the surface the change produced. A line answering no is
|
|
|
91
94
|
- Every new field, flag, or parameter is optional and defaults to the old behavior.
|
|
92
95
|
- No storage type, internal identifier, or bookkeeping field appears in what the surface returns.
|
|
93
96
|
- Every failure on the surface carries the same shape with a stable code.
|
|
97
|
+
|
|
98
|
+
### Input, writes, and contract
|
|
99
|
+
|
|
94
100
|
- Input is checked once, at the boundary, and nowhere deeper.
|
|
95
101
|
- Every write a caller could retry takes a key, claims it atomically, and refuses a reused key with a different body.
|
|
96
102
|
- The contract states what the surface returns and what it refuses.
|
|
@@ -50,7 +50,7 @@ Check for a `**Files to touch:**` or `## Files to touch` marker per `${CLAUDE_SK
|
|
|
50
50
|
|
|
51
51
|
Read `<plan>` at the main worktree root. This file is the scope for this run.
|
|
52
52
|
|
|
53
|
-
Its sections and its answer contract are fixed by `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan.md`. A blank `- Answer:` accepts the `- Suggested:` line above it, so an unanswered question is a decision this run executes rather than a reason to stop. When this run decides against that suggestion, rewrite the `- Suggested:` line as `overridden at execution to <pick>,` plus the measurement, leaving the `- Answer:` slot blank, and put the same deviation in one line under the open task's `## Findings`, per `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan.md
|
|
53
|
+
Its sections and its answer contract are fixed by `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan.md`. A blank `- Answer:` accepts the `- Suggested:` line above it, so an unanswered question is a decision this run executes rather than a reason to stop. When this run decides against that suggestion, rewrite the `- Suggested:` line as `overridden at execution to <pick>,` plus the measurement, leaving the `- Answer:` slot blank, and put the same deviation in one line under the open task's `## Findings`, per `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan.md`, opening with the bold source-and-date label that `${CLAUDE_SKILL_DIR}/../task-board/references/tasks.md` fixes.
|
|
54
54
|
|
|
55
55
|
## Step 2: implement
|
|
56
56
|
|
|
@@ -77,13 +77,13 @@ Age is evidence in neither direction. A row untouched for months is not more dec
|
|
|
77
77
|
|
|
78
78
|
Write one item per row in the intake item format, one cluster file per domain the task touches, numbered in read order. Head each item `### N. <task stem>` so apply can find the task from the heading alone.
|
|
79
79
|
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
80
|
+
- **`Problem:`** states what this pass measured, with the count, path, or commit behind it
|
|
81
|
+
- **`Fix:`** states what applying the verdict does to the board
|
|
82
|
+
- **`Worth it:`** names the cost or the reach the verdict rests on in one clause, or says the row names neither. A `yes` or a `later` carries no verdict on its own, so a decline can follow either word
|
|
83
|
+
- **`Open:`** reads `decline, archive, keep, or promote?` on every item
|
|
84
|
+
- **`Suggested:`** opens with exactly one of the four verdict tokens, then the reason. An archive suggestion lists every outcome position it closes, as `archive 1, 3: shipped in #NNN`
|
|
85
|
+
- **`Overlaps:`** names a live board task that already carries the work, where one does
|
|
86
|
+
- **`You:`** ships empty
|
|
87
87
|
|
|
88
88
|
Write `00-overview.md` last, per the intake standard, with the verdict counts by token and an open-questions list linking each item. Where the pass runs out of context before the index, write `99-next-session.md` naming the last row filed, since a compaction drops the rest.
|
|
89
89
|
|
|
@@ -112,7 +112,7 @@ Take the task stem from the item heading. Every verdict leaves the folder slug o
|
|
|
112
112
|
- **keep**: append the `## Findings` line naming what reproduced. The backlog line stays.
|
|
113
113
|
- **promote**: move the backlog line to the bottom of `## Needs a plan` in `.canon/tasks/priority.md`, with a `Waiting on` cell stating what cleared and ending in `last`, then append the `## Findings` line.
|
|
114
114
|
|
|
115
|
-
Write the `## Findings` line as `-
|
|
115
|
+
Write the `## Findings` line as `- **<YYYY-MM-DD>, backlog triage <slug>:** <verdict>, <evidence>`, the bold label form `${CLAUDE_SKILL_DIR}/../task-board/references/tasks.md` fixes. It is the last write on every verdict with a task file behind it, since Step 1 reads it as applied and a line written ahead of a refused move would mark a row done that never moved.
|
|
116
116
|
|
|
117
117
|
Before any promote, check the roster the way `task-board` step 4 does: a live session in this repository whose name starts with `orchestrator-` and whose `sessionId` is not this one. When one is found, write the `## Findings` line but not `priority.md` or `backlog.md`, and message that session with the row and its cell so it places the row itself.
|
|
118
118
|
|
|
@@ -40,7 +40,7 @@ Leave the build passing at every commit. A slice that cannot pass on its own is
|
|
|
40
40
|
|
|
41
41
|
A defect outside the plan that turns up mid-build is a finding, not a slice. Fixing it on this branch widens a diff the plan scoped and hides the fix inside an unrelated review.
|
|
42
42
|
|
|
43
|
-
- Write it in one line under the open task's `## Findings`, naming the file and what is wrong, when the build is closing a task.
|
|
43
|
+
- Write it in one line under the open task's `## Findings`, naming the file and what is wrong, when the build is closing a task. Open the line with the bold source-and-date label from `${CLAUDE_SKILL_DIR}/../task-board/references/tasks.md`.
|
|
44
44
|
- Carry it in the handover message instead when no task exists, and never create a file to hold it.
|
|
45
45
|
- Leave the file as it is, even when the fix is one line.
|
|
46
46
|
- Fix it here only when the plan's own change cannot pass without it, and then say so in the commit that does.
|
|
@@ -71,6 +71,9 @@ Read `${CLAUDE_SKILL_DIR}/references/adopted.md` only when extending this guidan
|
|
|
71
71
|
- The next commit message needs "and" to say what it does.
|
|
72
72
|
- A slice has been implemented and its tests have not run yet.
|
|
73
73
|
- The build or a test is failing and the next slice has already started.
|
|
74
|
+
|
|
75
|
+
### Scope and ordering
|
|
76
|
+
|
|
74
77
|
- You opened a file the plan does not name and are about to edit it.
|
|
75
78
|
- A commit deletes code and adds its replacement in the same change.
|
|
76
79
|
- You are about to stage a test in a commit after the one that added its code.
|
|
@@ -83,6 +86,9 @@ Check each line against the branch the build produced. A line answering no is fi
|
|
|
83
86
|
- Every commit on the branch carries one logical change and passed the checks it could affect.
|
|
84
87
|
- No commit adds code whose test lands in a later commit.
|
|
85
88
|
- No commit deletes something and adds its replacement together.
|
|
89
|
+
|
|
90
|
+
### Tree and scope
|
|
91
|
+
|
|
86
92
|
- The working tree holds no uncommitted implementation work.
|
|
87
93
|
- Every file changed is in the plan's scope, or its commit says why the plan needed it.
|
|
88
94
|
- Every defect noticed outside the plan is written in the task's findings or the handover, and its file is unchanged.
|
|
@@ -21,6 +21,9 @@ External sources were read and filtered rather than imported. This file is the r
|
|
|
21
21
|
- Vertical, risk-first, and contract-first slicing, stated as rules for choosing the next slice rather than as worked examples tied to one stack.
|
|
22
22
|
- Rule 1, one thing at a time, as one logical change per commit.
|
|
23
23
|
- Rule 2, keep it compilable, as a build left passing at every commit.
|
|
24
|
+
|
|
25
|
+
#### Rollback and the notes
|
|
26
|
+
|
|
24
27
|
- Rule 5, rollback-friendly, as the group on keeping each commit safe to revert and the rule against deleting and replacing in one commit.
|
|
25
28
|
- The "noticed but not touching" list from its scope section, routed to the open task's findings or the handover rather than offered as new tasks, since a worker may not add a row to the board.
|
|
26
29
|
- The note against re-running a command on unchanged code, scoped to a session's own repeats so it never reads as permission to skip a chain's verify step.
|
|
@@ -85,6 +85,9 @@ Read the doc each line names before running one of these. `canon docs install-an
|
|
|
85
85
|
- `canon sync` runs every installed domain's sync, so it carries each risk below.
|
|
86
86
|
- `canon gov sync` replaces a rule you edited and deletes a rule the toolkit retired, edited or not.
|
|
87
87
|
- `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
|
+
|
|
89
|
+
### Design, migrate, and indexes
|
|
90
|
+
|
|
88
91
|
- `canon design sync` replaces the shipped design files and leaves `.claude/design/project/` alone.
|
|
89
92
|
- `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
93
|
- `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`.
|
|
@@ -22,6 +22,11 @@ From the conversation so far, identify:
|
|
|
22
22
|
- Target project name or kind, never its full path. The path names a folder on one machine and says nothing a triage session can route on, where the project's own name does. Name a private project by its kind instead, such as `a Next.js app`, since the report leaves the machine.
|
|
23
23
|
- Toolkit surface and its type (plugin skill, tooling config, governance rule, seed, or CLI). The type leads the `### Surface` field, ahead of the first comma, because the CLI picks the issue's domain labels from that text alone.
|
|
24
24
|
- Specific toolkit file or name when the session cites one
|
|
25
|
+
|
|
26
|
+
### Behavior and fix
|
|
27
|
+
|
|
28
|
+
From the same conversation, identify:
|
|
29
|
+
|
|
25
30
|
- Observed behavior
|
|
26
31
|
- Expected behavior, or `unclear`
|
|
27
32
|
- Repro details already in context (commands run, files touched), or `none`
|
|
@@ -19,6 +19,9 @@ Run from the toolkit repo root. This skill reads GitHub issues and writes only i
|
|
|
19
19
|
- If `gh` is not on PATH, stop: `❌ gh CLI not found. Install it to read feedback issues.`
|
|
20
20
|
- If `gh auth status` fails, stop: `❌ gh is not authenticated. Run gh auth login.`
|
|
21
21
|
- If no open `feedback` issues exist, stop: `✅ No open feedback issues.`
|
|
22
|
+
|
|
23
|
+
### Slots and records
|
|
24
|
+
|
|
22
25
|
- Never fill a `You:` slot, and never read an empty one as agreement. Answering runs through `plan-intake-answer` or the operator's own edit.
|
|
23
26
|
- Branch on each `canon` record's `ok` and `reason` rather than on the exit code, which a shell function wrapping `canon` can flatten to zero.
|
|
24
27
|
|
|
@@ -49,6 +49,9 @@ Hand the operator the address as a markdown link carrying the URL as its text an
|
|
|
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
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`.
|
|
52
|
+
|
|
53
|
+
### Layout and naming
|
|
54
|
+
|
|
52
55
|
- 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.
|
|
53
56
|
- Name pages and frames for what they hold, such as `pricing` and `pricing-dense`, so the operator can say which one by name.
|
|
54
57
|
- 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.
|
|
@@ -58,6 +58,9 @@ A canvas failing these is non-conforming even when it satisfies every shape rule
|
|
|
58
58
|
- Write a frame as a whole document or as a fragment. The server writes in the `html`, `head`, and `body` a fragment leaves out, marked so a pick still matches the file.
|
|
59
59
|
- State a `body` whenever the frame states a `head`. The browser builds one the file leaves out, and an address the operator picks inside the frame can no longer be matched to the file.
|
|
60
60
|
- Write every table with its `tbody` stated, for the same reason. A browser adds one the file leaves out.
|
|
61
|
+
|
|
62
|
+
### Content and edits
|
|
63
|
+
|
|
61
64
|
- Keep a frame self-contained. Inline its own styles and scripts, or link a file inside the same page folder, since a frame is served from its page and nothing outside the canvas resolves.
|
|
62
65
|
- 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.
|
|
63
66
|
- Edit a frame by rewriting its file. The file is the frame, and nothing else holds a copy of its markup.
|
|
@@ -70,6 +73,9 @@ Applies to an explanation frame only. A mockup of the project's interface render
|
|
|
70
73
|
- Keep lines short, one fact a line.
|
|
71
74
|
- Set body text at 20px or larger and headings at 44px or larger. Set nothing under 16px.
|
|
72
75
|
- Render an explanation frame about 1100px wide.
|
|
76
|
+
|
|
77
|
+
### Colors, faces, and fit
|
|
78
|
+
|
|
73
79
|
- 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
80
|
- 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
81
|
- 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.
|
|
@@ -80,6 +86,9 @@ Applies to an explanation frame only. A mockup of the project's interface render
|
|
|
80
86
|
- 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.
|
|
81
87
|
- Key each box by the frame's name, under one top-level `frames` object.
|
|
82
88
|
- Give every box four finite numbers in pixels: `x` and `y` for its top-left corner on the page, `width` for the width the frame renders at, and `height` for the height it shows on the canvas.
|
|
89
|
+
|
|
90
|
+
### Missing boxes and writes
|
|
91
|
+
|
|
83
92
|
- Leave a frame out of the layout only when its position does not matter yet. A reader places an unnamed frame in a row after the others, at the default size of 1440 by 900.
|
|
84
93
|
- Never write the file while a writer holds its lock, which is the same name with `.lock` appended. Two writers each replacing the whole file lose one of the two edits.
|
|
85
94
|
- Treat a layout that does not parse as a defect to repair, never as an empty one to overwrite. Writing over it erases every box it held.
|
|
@@ -106,6 +115,9 @@ The keys below are the ones a reader parses. The frame names are placeholders.
|
|
|
106
115
|
- 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.
|
|
107
116
|
- 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.
|
|
108
117
|
- 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.
|
|
118
|
+
|
|
119
|
+
### Font, source, and checkout
|
|
120
|
+
|
|
109
121
|
- 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.
|
|
110
122
|
- 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.
|
|
111
123
|
- Do not assume the canvas survives the checkout. The folder is gitignored, so a lost checkout loses every page in it.
|
|
@@ -61,6 +61,11 @@ Before responding, verify:
|
|
|
61
61
|
- All actions pinned to major version tags, no `@latest` or `@main`.
|
|
62
62
|
- A new pipeline folds static, unit, and build into one job, and a gate a run log put past two minutes gives them no `needs` so they run in parallel.
|
|
63
63
|
- Every name in a `needs` matches a job declared in the same file. E2E names the artifact producer, release and deploy name E2E.
|
|
64
|
+
|
|
65
|
+
### Artifacts, names, and deploys
|
|
66
|
+
|
|
67
|
+
Before responding, also verify:
|
|
68
|
+
|
|
64
69
|
- Artifacts upload on `if: failure()` only with `retention-days: 7`.
|
|
65
70
|
- Job names use emoji + title format.
|
|
66
71
|
- Deploy, publish, and release jobs carry a placeholder step and a named handoff, never a guessed deploy command.
|
|
@@ -83,6 +83,9 @@ Read `${CLAUDE_SKILL_DIR}/references/adopted.md` only when extending this guidan
|
|
|
83
83
|
- A new class has one method, or a new function's body is one call with the same arguments.
|
|
84
84
|
- The change you are making opens a third file to adjust one rule.
|
|
85
85
|
- You are writing an interface, a factory, or a registry with one implementation behind it.
|
|
86
|
+
|
|
87
|
+
### Defaults and fixes
|
|
88
|
+
|
|
86
89
|
- You wrote a default value, a threshold, or a fallback the task never named.
|
|
87
90
|
- A fix is adding a special case, a catch, or a disabled check rather than changing the code that misbehaved.
|
|
88
91
|
- The code reads the current time, an environment variable, or a global from inside a rule.
|
|
@@ -95,6 +98,9 @@ Check each line against the code the change produced. A line answering no is fix
|
|
|
95
98
|
- Every new function or class hides more than its interface asks a caller to learn, with no pass-through left.
|
|
96
99
|
- No rule the change wrote exists in a second place, and nothing was merged that changes for a different reason.
|
|
97
100
|
- Every pattern in the diff solves a problem present now, with more than one case behind it.
|
|
101
|
+
|
|
102
|
+
### Inputs, scope, and fixes
|
|
103
|
+
|
|
98
104
|
- Clock, environment, and global reads are passed in rather than taken inside a rule.
|
|
99
105
|
- The diff holds no feature, option, or default the task did not ask for or state.
|
|
100
106
|
- Every fix changes the code that misbehaved rather than silencing it.
|
|
@@ -13,10 +13,7 @@ Applies to per-domain narrative entries under `canon/context/`. Skip for `index.
|
|
|
13
13
|
- [Organizing principle](#organizing-principle)
|
|
14
14
|
- [What a working entry looks like](#what-a-working-entry-looks-like)
|
|
15
15
|
- [Frontmatter](#frontmatter)
|
|
16
|
-
- [
|
|
17
|
-
- [Expected sections](#expected-sections)
|
|
18
|
-
- [Optional sections](#optional-sections)
|
|
19
|
-
- [Ordering](#ordering)
|
|
16
|
+
- [The closed set](#the-closed-set)
|
|
20
17
|
- [The development entry](#the-development-entry)
|
|
21
18
|
- [What goes in](#what-goes-in)
|
|
22
19
|
- [What does not go in](#what-does-not-go-in)
|
|
@@ -59,40 +56,33 @@ An entry that fails these is non-conforming regardless of whether it satisfies e
|
|
|
59
56
|
|
|
60
57
|
Both fields feed `canon/context/index.md` when regenerated.
|
|
61
58
|
|
|
62
|
-
##
|
|
59
|
+
## The closed set
|
|
63
60
|
|
|
64
|
-
|
|
65
|
-
- `## Layout`: one line per folder in owns-X form. Folders only, never files.
|
|
66
|
-
- Form: ``- `scripts/lib/` owns shared bash functions sourced by domain scripts``. Do not list every file under that folder with a description each.
|
|
67
|
-
- Implementation detail moves to `## Decisions`, `## Hidden contracts`, or `## Gotchas`.
|
|
68
|
-
- Omit the section when the domain owns no paths in the repo, as with a domain covering external tools. Inventing a line to satisfy the heading is the padding banned below.
|
|
61
|
+
An entry carries four H2 sections and no other, in this order: `Overview`, `Layout`, `Decisions`, `Gotchas`. `canon context audit` reports any other H2 and `--gate` fails it. A topic of the domain's own, such as `Cache` or `Workflow`, is an H3 under one of the four, which is where a reader scanning the entry looks for it.
|
|
69
62
|
|
|
70
|
-
|
|
63
|
+
- `## Overview`: two to four lines. What the domain owns and where its boundary sits. Required.
|
|
64
|
+
- `## Layout`: one line per folder in owns-X form, folders only and never files. Required, and omitted where the domain owns no paths in the repo, as with a domain covering external tools. Inventing a line to satisfy the heading is the padding banned below.
|
|
65
|
+
- `## Decisions`: non-obvious choices and the reasoning behind them, each as an H3 or a bullet. The highest-value section in the folder and the one most often missing. A decision resting on how an outside tool, an installer, or the model behaves may close with one `Revisit when <finding>.` sentence naming the harm the decision prevents, and a decision resting on the project's own code takes none.
|
|
66
|
+
- `## Gotchas`: workarounds, things tried and rejected, and invariants the code does not self-document, such as shape constraints, skip rules, and header semantics. Use `## Decisions` when the reader needs the reasoning rather than the invariant itself.
|
|
71
67
|
|
|
72
|
-
Include whenever the domain has content for them
|
|
68
|
+
Include `Decisions` and `Gotchas` whenever the domain has content for them, and never pad an entry with an empty heading.
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
- `## Gotchas`: workarounds, things tried and rejected, scar tissue worth preserving.
|
|
70
|
+
### Where an extra topic goes
|
|
76
71
|
|
|
77
|
-
|
|
72
|
+
- A command surface goes under `## Layout` as an H3, only when the domain has one, and only as a list of what each verb does. Flags and JSON shapes stay in the CLI reference under `docs/`, linked rather than restated.
|
|
73
|
+
- The procedure for the domain's most common task goes under `## Layout` as an H3 such as `### Adding a <thing>`, since most sessions arrive asking how to add one more of the thing the domain holds.
|
|
74
|
+
- Implementation detail that the one-line owns-X form cannot carry moves to `## Decisions` or `## Gotchas`.
|
|
78
75
|
|
|
79
|
-
|
|
76
|
+
### Ordering and headings
|
|
80
77
|
|
|
81
|
-
-
|
|
82
|
-
- `## Workflow` or `## Adding a <thing>`: the procedure for the domain's most common task. Most sessions arrive asking how to add one more of the thing the domain holds.
|
|
83
|
-
- `## Hidden contracts`: invariants the code does not self-document (shape constraints, skip rules, header semantics). Use `## Decisions` when the reader needs the reasoning rather than the invariant itself.
|
|
84
|
-
|
|
85
|
-
## Ordering
|
|
86
|
-
|
|
87
|
-
- Order sections `Overview`, `Layout`, `Decisions`, `Gotchas`, then everything else.
|
|
88
|
-
- Name a heading for its subject as it stands (`## Cache`), never for the event that shaped it (`## The cache was the untested part, and the test moved it`). A heading is what a scan reads, so a narrating heading turns the table of contents into a changelog.
|
|
78
|
+
- Name a heading for its subject as it stands (`### Cache`), never for the event that shaped it (`### The cache was the untested part, and the test moved it`). A heading is what a scan reads, so a narrating heading turns the table of contents into a changelog.
|
|
89
79
|
- Entries get read top-down and often partially, so irreducible content sits above recoverable content.
|
|
90
80
|
|
|
91
81
|
## The development entry
|
|
92
82
|
|
|
93
|
-
Only the `development` entry carries this section
|
|
83
|
+
Only the `development` entry carries this section, as an H3 under `## Layout`. It is not a general-purpose heading for other domains.
|
|
94
84
|
|
|
95
|
-
-
|
|
85
|
+
- `### Scripts`: a table of run commands (command plus purpose). The single discoverable surface for how to run the project. Keep run commands here, not scattered across `CLAUDE.md`.
|
|
96
86
|
|
|
97
87
|
## What goes in
|
|
98
88
|
|
|
@@ -100,6 +90,9 @@ Only the `development` entry carries this section. It is not a general-purpose h
|
|
|
100
90
|
- Decisions that constrain the domain, whether or not their reasoning touches another one. A decision lives in the entry of the domain it constrains.
|
|
101
91
|
- Constraints, gotchas, things tried and rejected
|
|
102
92
|
- Domain-specific conventions that do not fit a `paths:`-scoped rule
|
|
93
|
+
|
|
94
|
+
### Figures and references
|
|
95
|
+
|
|
103
96
|
- A measured figure, closed with a trailing `Measured at <short-sha> on <YYYY-MM-DD>.` naming a commit rather than a pull request number or a branch. Carry one anchor per figure and rewrite it in place when the number is re-read, whether or not it moved. An absent anchor reads as unchecked.
|
|
104
97
|
- A reference to another entry, spelled as the path that entry sits at rather than as its bare filename. A bare name resolves against whichever folder the reader is already in, so a domain that splits into subfolders strands every inbound reference and the break surfaces nowhere. A reference to a seed, a standard, or a file the project owns elsewhere keeps the form its own surface uses.
|
|
105
98
|
|
|
@@ -109,10 +102,16 @@ Only the `development` entry carries this section. It is not a general-purpose h
|
|
|
109
102
|
- Restated `--help` output, flag tables, or JSON shapes.
|
|
110
103
|
- A catalog a `list` command already returns. Link the command instead, so the entry cannot drift from it.
|
|
111
104
|
- Function-level documentation for implementation modules. Read the code. The exception is the public surface of a shared utility module, where the entry is how a session finds an existing helper instead of duplicating it.
|
|
105
|
+
|
|
106
|
+
### Elsewhere
|
|
107
|
+
|
|
112
108
|
- Rules. Those go in `.claude/rules/<scope>.md` with a `paths:` glob.
|
|
113
109
|
- Tutorials or human onboarding. Those go in `docs/` if a public audience exists.
|
|
114
110
|
- Generated content (API references). Generate, do not write by hand.
|
|
115
111
|
- Anything already in `canon/REQUIREMENTS.md`.
|
|
112
|
+
|
|
113
|
+
### History and results
|
|
114
|
+
|
|
116
115
|
- The history of how the domain reached its current shape. An entry describes the repository as it stands, so a change number, release label, or date attached to a change goes wherever the project tracks work.
|
|
117
116
|
- A rejected alternative's provenance, which is the same rule at the one place the section above admits history. Keep what was tried and why it lost. Cut who tried it and when.
|
|
118
117
|
- The route to a decision: the rounds of candidates, the tuning steps a threshold passed through, the review pass that caught a miss. State the decision, what lost, and why, once and in the present tense. Cut the route. Git and the change that introduced it keep it.
|
|
@@ -122,9 +121,15 @@ Only the `development` entry carries this section. It is not a general-purpose h
|
|
|
122
121
|
|
|
123
122
|
- Aim for one entry per domain. Length is a symptom, not the defect, and the one hard cap is the whole-document ceiling `markdown.md` states.
|
|
124
123
|
- Past roughly 150 rendered lines, check three things before adding more: whether the entry still covers a single domain, whether it has filled with content `ls` or `--help` reproduces, and whether it has accumulated the history of its own changes. Fix whichever is true rather than trimming to hit a number. The 150 is a diagnostic checkpoint and never gates. Rendered lines count as `markdown.md` defines them.
|
|
125
|
-
- Never cut a `## Decisions` or `## Gotchas` entry to shorten a file. Cut a `## Layout` or
|
|
124
|
+
- Never cut a `## Decisions` or `## Gotchas` entry to shorten a file. Cut a `## Layout` section or an H3 under it instead.
|
|
125
|
+
|
|
126
|
+
### Retiring and rewriting
|
|
127
|
+
|
|
126
128
|
- Retire a decision or gotcha once its subject is gone, rewriting the bullet to state the current design rather than leaving the narration of what it replaced beside it. A rejected alternative is not a retired one, so what was tried and why it lost stays whatever its age. The rule above protects content whose subject is live, and this one releases content whose subject is not.
|
|
127
129
|
- Rewrite a decision a later one replaced rather than appending the replacement beside it. The subject is still live, so the rule above does not reach it, and two bullets on one subject leave a reader to work out which of them is current. State the design that stands and keep the superseded reasoning only where it is the alternative that lost.
|
|
130
|
+
|
|
131
|
+
### Splitting and naming
|
|
132
|
+
|
|
128
133
|
- Split into a folder (`canon/context/<domain>/<sub-area>.md`) when a domain has three or more sub-areas that do not fit cleanly in one file. That split is the natural ceiling.
|
|
129
134
|
- Group whole single-file entries of two or more small domains into one folder when they share a kind, such as small feature domains that each own a verb. Each entry still covers one domain, and the folder's generated `index.md` carries a `subtitle` naming the kind. It names an entry to start with only when that entry frames the others. A grouping folder is not a split, so no entry inside it is a sub-area of another.
|
|
130
135
|
- Name an entry inside a split or grouping folder per the `codebase-layout` skill, which never repeats the folder's name as the entry's stem or prefix.
|
|
@@ -157,16 +162,25 @@ never the reverse.
|
|
|
157
162
|
|
|
158
163
|
## Decisions
|
|
159
164
|
|
|
160
|
-
|
|
161
|
-
|
|
165
|
+
### Validation at the route boundary
|
|
166
|
+
|
|
167
|
+
Validation happens at the route boundary using a schema library. Services trust their inputs.
|
|
168
|
+
|
|
169
|
+
### Opaque pagination cursors
|
|
170
|
+
|
|
171
|
+
Pagination uses opaque cursor tokens, never offset+limit. Cursor format stays opaque to clients, which is why any handler that issues a cursor uses the shared encoder.
|
|
162
172
|
|
|
163
173
|
## Gotchas
|
|
164
174
|
|
|
165
|
-
|
|
166
|
-
|
|
175
|
+
### The health endpoint skips auth
|
|
176
|
+
|
|
177
|
+
The `/health` endpoint skips auth middleware. Liveness probes from the orchestrator do not carry tokens.
|
|
178
|
+
|
|
179
|
+
### The connection pool caps at 50
|
|
180
|
+
|
|
181
|
+
Concurrent requests over that block until a connection frees.
|
|
167
182
|
|
|
168
|
-
|
|
183
|
+
### Handlers never wrap their return
|
|
169
184
|
|
|
170
|
-
|
|
171
|
-
- Cursor tokens are base64-encoded JSON of `{ id, sort }`. Any handler that issues a cursor must use the shared encoder.
|
|
185
|
+
Route handlers return a plain object, and the serializer wraps it in `{ data, meta }`.
|
|
172
186
|
```
|
|
@@ -25,15 +25,17 @@ Resolve both from the request, and ask only for what is missing. Attach a propos
|
|
|
25
25
|
|
|
26
26
|
Pick the subdir from the topic. It sits under `.claude/rules/project/` and names the rule's domain:
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
| Subdir | Holds |
|
|
29
|
+
| ------------- | ---------------------------------------------------------- |
|
|
30
|
+
| `code/`: | code placement, errors, naming, testing. |
|
|
31
|
+
| `lang/`: | one programming language. |
|
|
32
|
+
| `framework/`: | one framework. |
|
|
33
|
+
| `lib/`: | one library or tool. |
|
|
34
|
+
| `ui/`: | UI copy, accessibility, forms. |
|
|
35
|
+
| `claude/`: | session conduct and `.claude/` authoring surfaces. |
|
|
36
|
+
| `canon/`: | the toolkit workflow and its record folders. |
|
|
37
|
+
| `tooling/`: | dev setup, such as CI workflows, dependencies, and config. |
|
|
38
|
+
| `writing/`: | prose and document shape. |
|
|
37
39
|
|
|
38
40
|
## Step 3: pick a free slug
|
|
39
41
|
|
|
@@ -81,9 +81,15 @@ paths:
|
|
|
81
81
|
- Use imperative voice for every rule (`Prefix booleans with is`, not `Booleans should be prefixed`)
|
|
82
82
|
- State one rule per bullet as a single directive line
|
|
83
83
|
- State what to do and what not to do. Do not explain the reasoning behind a rule.
|
|
84
|
+
|
|
85
|
+
### Phrasing
|
|
86
|
+
|
|
84
87
|
- End the directive line of a ban asserting how the model or a tool behaves with one `Revisit when <finding>.` sentence, which states a condition rather than the reasoning. A style, safety, or consistency ban takes none.
|
|
85
88
|
- Phrase a rule as a ban on the forbidden shape when it could otherwise enumerate allowed options, so it stays stable as categories grow
|
|
86
89
|
- Cut any rule that resists crisp one-line phrasing. Vague guidance is worse than none.
|
|
90
|
+
|
|
91
|
+
### Scope of a rule file
|
|
92
|
+
|
|
87
93
|
- Keep the file to one topic. A second topic is a second rule file.
|
|
88
94
|
- Do not restate a rule that a sibling rule or `CLAUDE.md` already owns. Point once, never duplicate.
|
|
89
95
|
- Name the current layout only, in a glob and in the body alike. A layout change ships a migration verb, as `canon migrate surface-roots` and `canon migrate records` did, rather than a rule line or a glob that keeps the old spelling loading.
|
|
@@ -12,11 +12,20 @@ Read these files in parallel:
|
|
|
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
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-
|
|
15
|
+
- `${CLAUDE_SKILL_DIR}/references/skill-disclosure.md`: the rules that bind a skill of any size, being where each reference is named, the contents block, the trigger and guard that stay in the body, and what moves to `references/`
|
|
16
|
+
|
|
17
|
+
### Writing standards
|
|
18
|
+
|
|
19
|
+
Read these in the same pass:
|
|
20
|
+
|
|
16
21
|
- `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md`: punctuation and formatting for skill body text
|
|
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
|
|
18
22
|
- The `write-human` skill: voice, rhythm, and sentence construction for skill body text
|
|
19
23
|
|
|
24
|
+
## Further references
|
|
25
|
+
|
|
26
|
+
- `${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
|
|
27
|
+
- `${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
|
|
28
|
+
|
|
20
29
|
## Guards
|
|
21
30
|
|
|
22
31
|
- If `${CLAUDE_SKILL_DIR}/references/skill.md` is not present, stop: `❌ skill.md standard not found. Reinstall the canon plugin.`
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Skill disclosure reference
|
|
3
|
+
description: Keeping a skill body and its references under the ceiling, what moves to references and what stays in the body, and how the body names a reference
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill disclosure reference
|
|
7
|
+
|
|
8
|
+
Applies to the size and split of every `SKILL.md` and every file under a skill's `references/`.
|
|
9
|
+
|
|
10
|
+
## Rules
|
|
11
|
+
|
|
12
|
+
- Keep `SKILL.md` and each file under `references/` at or under the 300 rendered line ceiling `markdown.md` sets for a whole document. The ceiling binds procedure as much as reference material.
|
|
13
|
+
- Look at a body once it passes 150 lines. That number prompts a look and gates nothing.
|
|
14
|
+
- Move a catalog, a table of cases, or a format spec running past roughly 15 lines to `references/` at any body length.
|
|
15
|
+
- Below the ceiling, name the branch that skips a block before moving it. A block every run dereferences costs a read and saves nothing.
|
|
16
|
+
|
|
17
|
+
### Moving a step
|
|
18
|
+
|
|
19
|
+
- Past the ceiling, move a whole step to a reference, preferring a step a named branch skips. Keep the step heading in the body with one line naming the file to read on reaching it, so the body still shows every step in order.
|
|
20
|
+
- Name every file under `references/` in the body at the point a session reads it, since an unnamed reference is never loaded.
|
|
21
|
+
|
|
22
|
+
### Contents, triggers, and citations
|
|
23
|
+
|
|
24
|
+
- Open a file under `references/` running over 100 lines with a `## Contents` H2 of anchor links after its H1 and intro, so a session that reads only the top of the file still sees everything it holds.
|
|
25
|
+
- Keep the trigger, the skip condition, and the guard in the body. A run that never reaches the block has to decide that without opening the reference.
|
|
26
|
+
- Point one skill at a sibling skill's reference by the form `skill-paths.md` states, `${CLAUDE_SKILL_DIR}/../<skill>/references/<name>.md`, and name the owner rather than copying the file.
|
|
@@ -43,6 +43,9 @@ A reference shared across skills lives in the `references/` of the skill that ow
|
|
|
43
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
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
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.
|
|
46
|
+
|
|
47
|
+
### Form and ownership
|
|
48
|
+
|
|
46
49
|
- Use `${CLAUDE_SKILL_DIR}`, never a bare `../../` and never `${CLAUDE_PLUGIN_ROOT}`, since only the first expands before the body reaches the model.
|
|
47
50
|
- 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
51
|
- 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.
|
|
@@ -50,10 +50,16 @@ A reference failing these questions is non-conforming even when it satisfies eve
|
|
|
50
50
|
- Govern one document type per reference, or one attribute across every document. Split unrelated conventions into separate files.
|
|
51
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
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
|
+
|
|
54
|
+
#### The path and owners
|
|
55
|
+
|
|
53
56
|
- 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.
|
|
54
57
|
- 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.
|
|
55
58
|
- 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.
|
|
56
59
|
- 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.
|
|
60
|
+
|
|
61
|
+
#### Boundaries
|
|
62
|
+
|
|
57
63
|
- 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
64
|
- 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
65
|
- 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.
|
|
@@ -125,9 +131,15 @@ Answer all four before editing, and carry the answers into wherever the change i
|
|
|
125
131
|
- Carry one fenced template of the document the reference governs, so an author copies a shape instead of reconstructing it from prose.
|
|
126
132
|
- 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
133
|
- Place the template below the rules it satisfies, under a `## Template` heading or inside the section holding those rules.
|
|
134
|
+
|
|
135
|
+
### What the template shows
|
|
136
|
+
|
|
128
137
|
- Show the skeleton alone: every required section, one placeholder line for what each holds. A full worked document is a second document to maintain.
|
|
129
138
|
- 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
139
|
- 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.
|
|
140
|
+
|
|
141
|
+
### Load-bearing text
|
|
142
|
+
|
|
131
143
|
- 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
144
|
- Treat the template as authoritative where it and the prose disagree. An author copies the block, so a contradiction ships as the block.
|
|
133
145
|
|