@erclx/canon 5.32.0 → 5.33.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/auto-ship/SKILL.md +1 -1
- package/claude/skills/auto-ship/references/worktree-name.md +1 -1
- package/claude/skills/backlog-triage/REQUIREMENT.md +2 -2
- package/claude/skills/backlog-triage/SKILL.md +1 -1
- package/claude/skills/canon-cli/REQUIREMENT.md +16 -13
- package/claude/skills/canon-cli/SKILL.md +75 -32
- package/claude/skills/canon-feedback/SKILL.md +1 -1
- package/claude/skills/{canvas → canvas-board}/REQUIREMENT.md +2 -2
- package/claude/skills/{canvas → canvas-board}/SKILL.md +2 -2
- package/{standards → claude/skills/canvas-board/references}/design.md +11 -2
- package/claude/skills/context-fold/REQUIREMENT.md +25 -33
- package/claude/skills/context-fold/SKILL.md +25 -70
- package/claude/skills/context-fold/references/classify.md +3 -3
- package/claude/skills/context-fold/references/completion-report.md +4 -4
- package/claude/skills/context-fold/references/context-refresh.md +5 -5
- package/{standards → claude/skills/context-fold/references}/context.md +16 -5
- package/claude/skills/context-fold/references/unusable-baseline.md +3 -5
- package/claude/skills/create-rule/SKILL.md +2 -2
- package/{standards → claude/skills/create-rule/references}/rule.md +12 -5
- package/claude/skills/create-skill/SKILL.md +2 -2
- package/{standards → claude/skills/create-skill/references}/skill.md +17 -14
- package/claude/skills/design-taste/REQUIREMENT.md +3 -3
- package/claude/skills/design-taste/SKILL.md +1 -1
- package/claude/skills/docs-sync/REQUIREMENT.md +1 -1
- package/claude/skills/docs-sync/SKILL.md +3 -3
- package/{standards → claude/skills/docs-sync/references}/docs.md +11 -0
- package/{standards → claude/skills/docs-sync/references}/readme.md +9 -2
- package/claude/skills/draft-and-pick/SKILL.md +5 -5
- package/claude/skills/draft-doc/SKILL.md +6 -6
- package/claude/skills/draft-figure/REQUIREMENT.md +2 -2
- package/claude/skills/draft-figure/SKILL.md +2 -2
- package/claude/skills/draft-figure/references/hand-drawn.md +1 -1
- package/claude/skills/draft-figure/references/mermaid-path.md +1 -1
- package/claude/skills/draft-identity/REQUIREMENT.md +2 -2
- package/claude/skills/draft-identity/SKILL.md +2 -2
- package/claude/skills/draft-ready/SKILL.md +1 -1
- package/claude/skills/git-branch/SKILL.md +1 -1
- package/{standards → claude/skills/git-branch/references}/branch.md +1 -1
- package/claude/skills/git-commit/SKILL.md +2 -2
- package/claude/skills/git-followup/REQUIREMENT.md +1 -1
- package/claude/skills/git-followup/SKILL.md +1 -1
- package/claude/skills/git-issue/SKILL.md +1 -1
- package/claude/skills/git-pr/SKILL.md +13 -13
- package/claude/skills/git-pr/references/evidence.md +2 -2
- package/claude/skills/git-pr/references/final-command.md +38 -14
- package/claude/skills/git-pr/references/labels.md +5 -1
- package/{standards → claude/skills/git-pr/references}/pr.md +19 -9
- package/{standards → claude/skills/git-pr/references}/publish.md +4 -2
- package/claude/skills/git-pr/references/task-number.md +1 -1
- package/claude/skills/git-ship/SKILL.md +15 -14
- package/claude/skills/git-split/SKILL.md +3 -3
- package/claude/skills/git-stage/SKILL.md +1 -1
- package/claude/skills/plan-feature/REQUIREMENT.md +1 -1
- package/claude/skills/review-address/SKILL.md +1 -1
- package/claude/skills/review-address/references/post-review-findings.md +1 -1
- package/claude/skills/review-pr/REQUIREMENT.md +1 -1
- package/claude/skills/review-pr/SKILL.md +3 -3
- package/claude/skills/review-pr/references/body-variants.md +2 -2
- package/claude/skills/review-pr/references/key-changes.md +3 -3
- package/claude/skills/review-pr/references/post.md +4 -2
- package/claude/skills/review-ui/REQUIREMENT.md +1 -1
- package/claude/skills/review-ui/SKILL.md +1 -1
- package/claude/skills/review-ui/references/post.md +1 -1
- package/claude/skills/role-orchestrator/REQUIREMENT.md +3 -0
- package/claude/skills/role-orchestrator/SKILL.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +8 -5
- package/claude/skills/role-orchestrator/references/orchestrator-launch.md +23 -1
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-resume.md +3 -0
- package/claude/skills/role-planner/REQUIREMENT.md +2 -1
- package/claude/skills/role-planner/SKILL.md +13 -2
- package/claude/skills/role-reviewer/SKILL.md +1 -1
- package/claude/skills/role-worker/REQUIREMENT.md +1 -0
- package/claude/skills/role-worker/SKILL.md +9 -1
- package/claude/skills/session-map/SKILL.md +1 -1
- package/claude/skills/session-resume/REQUIREMENT.md +2 -2
- package/claude/skills/session-worktree/SKILL.md +5 -5
- package/claude/skills/target-setup/references/detect.md +1 -1
- package/claude/skills/task-board/REQUIREMENT.md +7 -12
- package/claude/skills/task-board/SKILL.md +5 -17
- package/claude/skills/task-board/references/tasks.md +2 -2
- package/claude/skills/task-complete/REQUIREMENT.md +47 -0
- package/claude/skills/task-complete/SKILL.md +86 -0
- package/claude/skills/{task-board → task-complete}/references/archive.md +4 -4
- package/claude/skills/{context-fold → task-complete}/references/receipt-sweep.md +5 -5
- package/claude/skills/task-complete/references/unusable-baseline.md +19 -0
- package/claude/skills/teach-workspace/REQUIREMENT.md +6 -2
- package/claude/skills/teach-workspace/SKILL.md +8 -4
- package/claude/skills/teach-workspace/references/lesson-craft.md +1 -1
- package/claude/skills/{context-fold/references/promoted-pages.md → teach-workspace/references/promotion-fold.md} +3 -3
- package/claude/skills/teach-workspace/references/promotion.md +3 -3
- package/claude/skills/ui-checklist/SKILL.md +1 -1
- package/claude/skills/ux-audit/SKILL.md +1 -1
- package/claude/skills/ux-measure/SKILL.md +1 -1
- package/docs/agents/canvas.md +1 -1
- package/docs/agents/commands.md +3 -2
- package/docs/agents/context-audit-checks.md +4 -4
- package/docs/agents/index.md +3 -3
- package/docs/agents/indexes.md +1 -1
- package/docs/agents/install-and-sync.md +6 -11
- package/docs/agents/key-changes.md +5 -5
- package/docs/agents/label-coverage.md +11 -0
- package/docs/agents/migrate.md +1 -1
- package/docs/agents/records-push.md +2 -2
- package/docs/agents/records-stale.md +12 -47
- package/docs/agents/records-validate.md +3 -7
- package/docs/agents/records.md +5 -27
- package/docs/agents/rule-citations.md +1 -1
- package/docs/agents/sandbox.md +4 -4
- package/docs/agents/skills-audit.md +1 -1
- package/docs/agents/tasks-plans.md +2 -2
- package/docs/agents/tasks.md +2 -2
- package/docs/target/migrations.md +10 -2
- package/docs/target/projects.md +1 -1
- package/docs/target/sync.md +1 -1
- package/docs/workflow/operating-model.md +2 -2
- package/docs/workflow/parallel-features.md +7 -7
- package/docs/workflow/skill-map-on-request.md +9 -9
- package/docs/workflow/skill-map.md +12 -11
- package/docs/workflow/visual-design-workflow.md +2 -2
- package/governance/renames.toml +0 -11
- package/governance/rules/canon/context.md +13 -0
- package/governance/rules/claude/skill.md +17 -0
- package/governance/stacks/base.toml +2 -4
- package/package.json +4 -4
- package/scripts/core/install-check.sh +3 -3
- package/scripts/lib/ui.sh +0 -159
- package/src/audits/catalog.ts +0 -1
- package/src/claude/cases/misc.ts +1 -1
- package/src/claude/cases/setup.ts +4 -0
- package/src/claude/cases/workflow.ts +6 -1
- package/src/claude/seeds.ts +1 -1
- package/src/claude/skills-audit.ts +2 -2
- package/src/cli/help.ts +3 -1
- package/src/cli/ui.ts +2 -3
- package/src/commands/claude.ts +1 -1
- package/src/commands/gov.ts +2 -15
- package/src/commands/labels.ts +326 -7
- package/src/commands/migrate.ts +6 -1
- package/src/commands/pr.ts +1 -1
- package/src/commands/records.ts +13 -399
- package/src/commands/sandbox.ts +3 -6
- package/src/commands/tasks.ts +3 -3
- package/src/context/audit.ts +5 -5
- package/src/context/folders.ts +1 -1
- package/src/design/budget.ts +1 -1
- package/src/design/components.ts +1 -1
- package/src/design/document.ts +1 -1
- package/src/design/regen.ts +1 -1
- package/src/design/render.ts +1 -1
- package/src/gate/measures.ts +1 -1
- package/src/gate/sequencer.ts +56 -1
- package/src/gate/stages.ts +1 -7
- package/src/gov/install.ts +2 -3
- package/src/gov/stacks.ts +1 -1
- package/src/hooks/post-merge.ts +1 -1
- package/src/labels/apply.ts +39 -0
- package/src/labels/format.ts +3 -3
- package/src/labels/phase.ts +3 -3
- package/src/labels/sections.ts +43 -0
- package/src/migrate/skill-names.ts +20 -1
- package/src/pr/paths.ts +4 -4
- package/src/records/backup.ts +16 -6
- package/src/records/stale-canonical.ts +31 -1
- package/src/records/validate.ts +2 -188
- package/src/sandbox/census.ts +1 -1
- package/src/sandbox/coverage.ts +2 -6
- package/src/sandbox/equivalence.ts +5 -44
- package/src/sandbox/expect.ts +4 -4
- package/src/sandbox/provision.ts +13 -36
- package/src/sandbox/scenario.ts +26 -48
- package/src/sandbox/tree.ts +2 -6
- package/src/standards/read.ts +14 -1
- package/src/sync/git.ts +1 -1
- package/src/tasks/archive.ts +5 -5
- package/src/tasks/branch.ts +3 -3
- package/src/tasks/label.ts +1 -1
- package/src/tasks/record.ts +2 -2
- package/src/tasks/validate.ts +1 -1
- package/standards/index.md +0 -13
- package/standards/standard.md +1 -7
- package/tooling/base/reference.md +1 -1
- package/tooling/base/seeds/.github/pull_request_template.md +2 -2
- package/tooling/claude/reference.md +1 -1
- package/tooling/claude/seeds/.claude/hooks/pr-create-log.sh +9 -1
- package/tooling/claude/seeds/.claude/hooks/review-post-scan.sh +171 -0
- package/tooling/claude/seeds/.claude/settings.json +9 -0
- package/governance/rules/standards/context.md +0 -14
- package/governance/rules/standards/design.md +0 -12
- package/governance/rules/standards/readme.md +0 -12
- package/governance/rules/standards/rule.md +0 -13
- package/governance/rules/standards/skill.md +0 -21
- package/governance/rules/standards/standard.md +0 -13
- package/scripts/config.sh +0 -11
- package/scripts/lib/gov.sh +0 -14
- package/scripts/lib/sandbox-fixtures.sh +0 -191
- package/scripts/lib/sandbox-git.sh +0 -125
- package/scripts/lib/sandbox-path.sh +0 -50
- package/scripts/sandbox-hook.sh +0 -99
- package/src/gov/standard-rules.ts +0 -179
- package/src/records/migrate.ts +0 -78
- package/src/records/stale.ts +0 -243
- package/src/sandbox/hooks.ts +0 -128
- /package/claude/skills/{canvas → canvas-board}/references/canvas.md +0 -0
- /package/{standards → claude/skills/draft-figure/references}/figures.md +0 -0
- /package/{standards → claude/skills/git-branch/references}/slug.md +0 -0
- /package/{standards → claude/skills/git-commit/references}/commit.md +0 -0
- /package/{standards → claude/skills/git-commit/references}/versioning.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-fold
|
|
3
|
-
description: Folds a session into the project's context entries,
|
|
3
|
+
description: Folds a session's decisions and its diff into the project's context entries, then audits what it touched. Use when asked to "fold the session into context", "update the context entries", "refresh the context folder", when design or requirements changed mid-cycle, after a pivot, or before shipping. Do NOT use for `README.md` or `docs/`, which is `docs-sync`, or to mark a shipped task's outcomes on the board, which is `task-complete`.
|
|
4
4
|
metadata:
|
|
5
5
|
family: ship
|
|
6
6
|
---
|
|
@@ -11,11 +11,11 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
- If neither a `canon/` nor a `.claude/` directory exists, stop: `❌ No canon/ or .claude/ directory found. Run canon claude init to set up the workflow.`
|
|
13
13
|
|
|
14
|
-
The skip for a session that changed nothing lives at the end of Step 2, because it needs the diff to decide.
|
|
14
|
+
The skip for a session that changed nothing lives at the end of Step 2, because it needs the diff to decide.
|
|
15
15
|
|
|
16
16
|
## Diff baseline
|
|
17
17
|
|
|
18
|
-
Steps 2 and
|
|
18
|
+
Steps 2, 3, and 4 share one diff. Resolve the base ref once and reuse it:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null
|
|
@@ -25,18 +25,13 @@ Take the union of `git diff --name-only <base> HEAD`, `git diff --name-only HEAD
|
|
|
25
25
|
|
|
26
26
|
Prefer `origin/main` over local `main`. On `main` itself the local ref resolves to HEAD, so every committed change drops out of the set and the skill goes blind to the work it is meant to read.
|
|
27
27
|
|
|
28
|
-
The baseline is unusable when no merge base resolves against either ref, or when the base came from local `main` and equals HEAD. On an unusable baseline, read `${CLAUDE_SKILL_DIR}/references/unusable-baseline.md` before Step
|
|
28
|
+
The baseline is unusable when no merge base resolves against either ref, or when the base came from local `main` and equals HEAD. On an unusable baseline, read `${CLAUDE_SKILL_DIR}/references/unusable-baseline.md` before Step 3 for the set that step takes instead.
|
|
29
29
|
|
|
30
|
-
## Step 1: read
|
|
30
|
+
## Step 1: read the context catalog
|
|
31
31
|
|
|
32
|
-
Read
|
|
32
|
+
Read `canon/context/index.md` from the current worktree root (`pwd`), not the main worktree root, to see which domain entries exist. Entries are tracked files and edits must commit with the branch. A project the surface move has not reached holds the folder under `.claude/` rather than `canon/`, so read and write it at whichever root already carries it.
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
- `canon/DESIGN.md`
|
|
36
|
-
|
|
37
|
-
Read the task board from the main worktree root instead, resolving that root the way `session-worktree` does. It is gitignored scratch and never commits with the branch:
|
|
38
|
-
|
|
39
|
-
- `.canon/tasks/index.md` first, then the task files this session touched. That narrow read serves the marking step, which is the only step here that opens a task file.
|
|
34
|
+
Read `canon/REQUIREMENTS.md` beside it when it exists, for the direction a session decision is measured against. This skill never writes it.
|
|
40
35
|
|
|
41
36
|
## Step 2: identify what changed
|
|
42
37
|
|
|
@@ -46,81 +41,41 @@ Review the session for decisions that diverged from the original plan:
|
|
|
46
41
|
|
|
47
42
|
- Requirements added, removed, or changed scope
|
|
48
43
|
- Technical decisions made or revised
|
|
49
|
-
- Design or UX decisions that differ from
|
|
50
|
-
- Tasks blocked or newly identified
|
|
51
|
-
|
|
52
|
-
Then resolve the diff baseline and match it against the board. From `.canon/tasks/index.md` at the main worktree root, pick the task files whose title or description relates to the changed paths and read the ones Step 1 skipped.
|
|
53
|
-
|
|
54
|
-
Path matching only chooses which files to open. Behavior decides each outcome. For each unchecked outcome, decide whether the diff shipped the behavior that outcome names.
|
|
55
|
-
|
|
56
|
-
Completion is the one judgment here that is a fact about the repository rather than a fact about the conversation, so the diff decides it and the session does not. Requirements, decisions, and design stay session-sourced.
|
|
57
|
-
|
|
58
|
-
Keep the match conservative:
|
|
44
|
+
- Design or UX decisions that differ from what the context entries state
|
|
59
45
|
|
|
60
|
-
|
|
61
|
-
- Match on the behavior an outcome describes, not on filenames or commit subjects. The path match above only narrowed which task files to open.
|
|
62
|
-
- Leave an outcome `[ ]` when the diff is ambiguous. An unmarked shipped outcome costs one manual edit, while a wrongly marked one hides work that never happened.
|
|
46
|
+
Then resolve the diff baseline and keep the changed paths for Step 3.
|
|
63
47
|
|
|
64
|
-
|
|
48
|
+
Stop when the session shows no divergence **and** the diff carries no path a context entry could describe, being a change confined to the task board, scratch, or files outside the repository's source and docs. Report `✅ No context updates needed. Session matched the original plan.` Both conditions have to hold, since a session-only skip would drop the diff-driven refresh for a mechanical change nobody narrated.
|
|
65
49
|
|
|
66
|
-
|
|
50
|
+
## Step 3: refresh context entries
|
|
67
51
|
|
|
68
|
-
|
|
52
|
+
Skip this step silently when `canon/context/` does not exist or its catalog lists no entries.
|
|
69
53
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
For each doc with relevant changes, apply updates following these rules. Read a standard this skill names, here or in a later step, from `${CLAUDE_SKILL_DIR}/../../standards/` when the project does not have it.
|
|
73
|
-
|
|
74
|
-
**`.canon/tasks/`**
|
|
75
|
-
|
|
76
|
-
- Mark completed outcomes `[x]` in the task's own file through `canon tasks outcome <stem> --close <n> --json`, repeating `--close` for each. Positions count every outcome checkbox in file order from 1, which the read above already gives. Do not move or archive the file.
|
|
77
|
-
- Write a newly identified task as its own file, following `${CLAUDE_SKILL_DIR}/../task-board/references/tasks.md` for the filename and frontmatter.
|
|
78
|
-
- Do not touch task files this session did not change.
|
|
79
|
-
- Never hand-edit `.canon/tasks/index.md`. A hook regenerates it.
|
|
80
|
-
|
|
81
|
-
The verb resolves the board at the main worktree root in-process, which is the route `session-worktree` states for an edit inside an existing main-root file.
|
|
82
|
-
|
|
83
|
-
Read `ok` and `reason` out of that record rather than the exit. An operator's shell profile may wrap `canon` in a function that runs the binary and then a second command and takes the second status, which flattens every non-zero exit to zero. A refusal arriving as success leaves the outcome unmarked while the chain moves on, so the board reports shipped work as open and the next session re-plans it.
|
|
54
|
+
Otherwise read `${CLAUDE_SKILL_DIR}/references/context-refresh.md` for the diff it reads, the widening a removed capability takes, when a new entry is created, and the output lines.
|
|
84
55
|
|
|
85
|
-
|
|
56
|
+
Write a session decision into the entry for the domain it constrains, under that entry's `## Decisions`, whatever other domains its reasoning touches. Every write follows these rules:
|
|
86
57
|
|
|
87
58
|
- Never write `canon/REQUIREMENTS.md`. Report a requirements change in After completion.
|
|
88
|
-
- Update only the sections affected by session decisions.
|
|
89
|
-
-
|
|
90
|
-
- Rewrite a restated or superseded statement in place rather than appending the replacement beside it. State the fact that stands and keep the earlier reasoning only where it is the alternative that lost, per `${CLAUDE_SKILL_DIR}/../../standards/context.md`.
|
|
59
|
+
- Update only the sections affected by session decisions or the diff, and leave unrelated sections alone.
|
|
60
|
+
- Rewrite a restated or superseded statement in place rather than appending the replacement beside it. State the fact that stands and keep the earlier reasoning only where it is the alternative that lost, per `${CLAUDE_SKILL_DIR}/references/context.md`.
|
|
91
61
|
- Follow `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md` and the `write-human` skill for all edits.
|
|
92
|
-
- Write a session decision into the `canon/context/` entry for the domain it constrains, under that entry's `## Decisions`, whatever other domains its reasoning touches.
|
|
93
62
|
|
|
94
63
|
Write each updated file immediately. Claude Code's tool permission dialog is the confirmation gate. Do not wait for user input.
|
|
95
64
|
|
|
96
|
-
## Step 4:
|
|
65
|
+
## Step 4: audit what the fold touched
|
|
97
66
|
|
|
98
|
-
|
|
67
|
+
Run the structural audit, then the content classifier, and answer both before the report.
|
|
99
68
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
## Step 5: refresh context entries
|
|
105
|
-
|
|
106
|
-
Read `canon/context/index.md` at `pwd` to see which domain entries exist. Skip this step silently if the directory does not exist or has no entries.
|
|
107
|
-
|
|
108
|
-
Otherwise read `${CLAUDE_SKILL_DIR}/references/context-refresh.md` for the diff it reads, the widening a removed capability takes, when a new entry is created, and the output lines.
|
|
109
|
-
|
|
110
|
-
## Step 6: fold promoted pages
|
|
111
|
-
|
|
112
|
-
Skip this step silently when no teach promotion handoff exists at `.canon/tmp/handoff/teach-promotion/<slug>.md` at the main worktree root, deriving `<slug>` per `${CLAUDE_SKILL_DIR}/../../standards/slug.md` with the `latest` fallback. Otherwise read `${CLAUDE_SKILL_DIR}/references/promoted-pages.md` for how each block lands, the handoff delete, and the output lines.
|
|
113
|
-
|
|
114
|
-
## Step 7: sweep consumed receipts
|
|
115
|
-
|
|
116
|
-
Read `${CLAUDE_SKILL_DIR}/references/receipt-sweep.md` for which review receipts this session sweeps, which it keeps, and the output lines. Skip this step silently when nothing qualifies.
|
|
69
|
+
```bash
|
|
70
|
+
canon context audit --json
|
|
71
|
+
```
|
|
117
72
|
|
|
118
|
-
|
|
73
|
+
The verb takes a project root rather than a file list, so it reports the whole folder. Report only the findings whose `rel` names a file Step 3 wrote this run or a file the diff carries, one line each as `⚠ Audit: <rel>, <finding>`, and leave the rest unreported, since a finding in an entry this run never touched belongs to whoever next edits it. Repair a finding in a file Step 3 wrote this run when the fix is inside what it already rewrote, such as a bare reference or a missing section it dropped. Report a missing subcommand or a refusal as `⚠ Audit: <message>` and continue.
|
|
119
74
|
|
|
120
|
-
Skip
|
|
75
|
+
Then classify. Skip the classifier only when the Diff baseline section could not resolve a base ref at all, reporting `⚠ No diff to scope against. Skipped the classify check.` The verb needs a resolvable ref to run against, which is the one condition it cannot answer for itself.
|
|
121
76
|
|
|
122
|
-
Otherwise read `${CLAUDE_SKILL_DIR}/references/classify.md` for the invocation, its scope, the record fields, applying a finding, the one-line keep reason, the unreachable and missing-subcommand lines, and the report shape. `${CLAUDE_SKILL_DIR}` names this skill's own directory, resolved once when the skill loaded
|
|
77
|
+
Otherwise read `${CLAUDE_SKILL_DIR}/references/classify.md` for the invocation, its scope, the record fields, applying a finding, the one-line keep reason, the unreachable and missing-subcommand lines, and the report shape. `${CLAUDE_SKILL_DIR}` names this skill's own directory, resolved once when the skill loaded. Read the reference by that resolved path rather than guessing a `.claude/skills/context-fold/references/classify.md` path from the toolkit's install-time layout, which is a different root than the one this skill's own files live under. The invocation is `canon context classify diff --base <base> --json`, and it runs whether or not that reference resolves. Findings never stop the fold.
|
|
123
78
|
|
|
124
79
|
## After completion
|
|
125
80
|
|
|
126
|
-
Read `${CLAUDE_SKILL_DIR}/references/completion-report.md` before printing anything, for the line each outcome prints, the lines Step
|
|
81
|
+
Read `${CLAUDE_SKILL_DIR}/references/completion-report.md` before printing anything, for the line each outcome prints, the lines Step 2 and Step 4 add, and when the closing line is suppressed.
|
|
@@ -5,7 +5,7 @@ description: The classify diff invocation, the record fields to read, applying a
|
|
|
5
5
|
|
|
6
6
|
# Classify the fold's diff baseline
|
|
7
7
|
|
|
8
|
-
Mechanics for Step
|
|
8
|
+
Mechanics for the classify half of Step 4 of `context-fold`. The body owns the skip condition and the shared baseline, and this file owns the invocation, what the record carries, and what applying a finding does.
|
|
9
9
|
|
|
10
10
|
## Invocation
|
|
11
11
|
|
|
@@ -30,14 +30,14 @@ Each finding carries `file`, a `verdict` of `KEEP`, `REPLACE`, `HISTORY`, or `MO
|
|
|
30
30
|
|
|
31
31
|
## Scope
|
|
32
32
|
|
|
33
|
-
Answer every non-`KEEP` finding the verb returns, not only the files Step 3
|
|
33
|
+
Answer every non-`KEEP` finding the verb returns, not only the files Step 3 wrote this run. A branch carrying earlier commits from a prior session has doc edits the fold is equally responsible for, and the verb's own extraction already scopes to canonical doc types and reports nothing when the range carries none, so there is no narrower check to add here.
|
|
34
34
|
|
|
35
35
|
## Applying a finding
|
|
36
36
|
|
|
37
37
|
Locate the finding by its `quote` in the file's current content. The quote is often a narrow fragment rather than the whole clause it sits in, since the regex layer's own match is a short pattern hit, so the edit below targets the sentence or bullet the quote sits in rather than the literal substring alone.
|
|
38
38
|
|
|
39
39
|
- **Found exactly once.** Apply the verdict:
|
|
40
|
-
- `REPLACE`: rewrite the sentence or bullet carrying the quote in place with the fact that now stands, per Step 3
|
|
40
|
+
- `REPLACE`: rewrite the sentence or bullet carrying the quote in place with the fact that now stands, per Step 3's rewrite-in-place rule. State what is current and drop what the quote restated, in the one edit.
|
|
41
41
|
- `HISTORY`: rewrite the sentence or bullet carrying the quote to drop the narration and keep any current fact the same clause states. The quote narrates how the fact arrived rather than stating the fact, which a canonical doc excludes regardless of what wrote it, and a literal cut of the fragment alone would leave the rest of the clause grammatically stranded.
|
|
42
42
|
- `MOVE`: do not cut. The verdict means correct content sitting on the wrong surface, such as a rule written into a context entry that belongs in a path-scoped rule, and only the model layer returns it. Cutting would delete content a fold with no model configured would never have flagged at all. Report the finding instead, naming the surface the `reason` names as where the content belongs, and leave the file unedited.
|
|
43
43
|
- **Found more than once, or not found at all.** Report that the finding could not be located rather than guessing which occurrence or rewriting nothing silently. A model verdict paraphrasing the quote it read is the ordinary way this happens.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Completion report
|
|
3
|
-
description: The lines context-fold prints once every step has run, being one per file updated, the direction-change note, Step
|
|
3
|
+
description: The lines context-fold prints once every step has run, being one per file updated, the direction-change note, Step 4's audit and classify lines, and the closing line with when it is suppressed
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Completion report
|
|
@@ -13,10 +13,10 @@ Output one line per file updated:
|
|
|
13
13
|
|
|
14
14
|
When Step 2 noted a requirements change: `↪ Direction changed this session: run document-health on canon/REQUIREMENTS.md`
|
|
15
15
|
|
|
16
|
-
Step
|
|
16
|
+
Step 4 adds one `⚠ Audit:` line per audit finding it reported, in the shape the body gives. Its classify half adds its own lines when it applied or reported a finding, in the exact shape `${CLAUDE_SKILL_DIR}/references/classify.md` gives them under its own Report section. Do not shorten or paraphrase those lines here or in the reply, since the quote and the reason are what a reader checks the finding against.
|
|
17
17
|
|
|
18
|
-
If no files were updated and
|
|
18
|
+
If no files were updated and Step 4 reported nothing, output:
|
|
19
19
|
|
|
20
20
|
`✅ No changes needed.`
|
|
21
21
|
|
|
22
|
-
Suppress that line when Step 2 already reported no
|
|
22
|
+
Suppress that line when Step 2 already reported no context updates. It closes the run on its own, and emitting both leaves a quiet session reporting success twice for one outcome.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Refresh context entries
|
|
3
|
-
description: How context-fold Step
|
|
3
|
+
description: How context-fold Step 3 folds diff-scoped rewrites into canon/context entries, when it creates an entry, and the lines it reports
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Refresh context entries
|
|
7
7
|
|
|
8
|
-
Step
|
|
8
|
+
Step 3 of `context-fold`, reached in order once `canon/context/index.md` lists at least one entry.
|
|
9
9
|
|
|
10
10
|
The diff carries what the repository changed, and this step rewrites against it.
|
|
11
11
|
|
|
@@ -15,8 +15,8 @@ Reuse the diff from the baseline above, names and content both. For each domain
|
|
|
15
15
|
|
|
16
16
|
- Map the entry's section headings, whether they sit in one flat file or spread across a nested domain's sibling files, to the changed files. An entry is relevant when its prose references files, modules, or decisions touched by the diff.
|
|
17
17
|
- For each relevant entry, rewrite only the sections affected by the diff. Same pattern as `docs-sync`. Do not touch unrelated sections. Never rewrite a split domain's own `index.md` directly, since a regen overwrites it the same way it overwrites the top-level catalog. Rewrite the sibling file the affected section actually lives in instead.
|
|
18
|
-
- Rewrite a restated or superseded statement in place rather than appending beside it, the same rule
|
|
19
|
-
- Write a reference to another entry as the path that entry sits at, rather than as its bare filename. `${CLAUDE_SKILL_DIR}
|
|
18
|
+
- Rewrite a restated or superseded statement in place rather than appending beside it, the same rule the body states for a session decision.
|
|
19
|
+
- Write a reference to another entry as the path that entry sits at, rather than as its bare filename. `${CLAUDE_SKILL_DIR}/references/context.md` states the form, and a bare name strands the reference once a domain splits into subfolders.
|
|
20
20
|
|
|
21
21
|
## When the diff removes a capability
|
|
22
22
|
|
|
@@ -29,7 +29,7 @@ Grep the tree for the name that went, rather than for the paths the diff carries
|
|
|
29
29
|
|
|
30
30
|
Report each hit as an ordinary rewrite.
|
|
31
31
|
|
|
32
|
-
Create a new entry only for a domain `canon/context/index.md` already lists but carries no file for, following `${CLAUDE_SKILL_DIR}
|
|
32
|
+
Create a new entry only for a domain `canon/context/index.md` already lists but carries no file for, following `${CLAUDE_SKILL_DIR}/references/context.md` for its shape. Before treating a domain as carrying no file, confirm it holds no entry under either spelling, `canon/context/<domain>.md` or `canon/context/<domain>/index.md`, since a domain already split into a folder still passes a check that only looked for the flat file. A row in the catalog is the deliberate decision, taken by whoever added it. This step only fills in what that decision left open, and only until the next `canon indexes regen` pass, which rebuilds the catalog from each entry's own frontmatter plus every sibling's and drops a row whose file still does not exist. Create the file before that regen runs, or the row this bar exists to fill in is gone. A domain the catalog does not list at all is a different case: report it and stop, rather than creating an entry or a catalog row for it.
|
|
33
33
|
|
|
34
34
|
Write each updated entry immediately. Output one line per file, naming the path this run actually wrote rather than always the flat template:
|
|
35
35
|
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Context entry reference
|
|
3
3
|
description: Shape and content rules for canon/context/<domain>.md entries
|
|
4
|
-
paths:
|
|
5
|
-
- 'canon/context/**'
|
|
6
|
-
rule:
|
|
7
|
-
- 'Before non-trivial work in a domain, read its `canon/context/<domain>.md` entry. Use `canon/context/index.md` to find it.'
|
|
8
|
-
- 'Leave the entry conforming when work in its domain changes what it describes.'
|
|
9
4
|
---
|
|
10
5
|
|
|
11
6
|
# Context entry reference
|
|
12
7
|
|
|
13
8
|
Applies to per-domain narrative entries under `canon/context/`. Skip for `index.md`, which is regenerated by `canon indexes regen`.
|
|
14
9
|
|
|
10
|
+
## Contents
|
|
11
|
+
|
|
12
|
+
- [Scope](#scope)
|
|
13
|
+
- [Organizing principle](#organizing-principle)
|
|
14
|
+
- [What a working entry looks like](#what-a-working-entry-looks-like)
|
|
15
|
+
- [Frontmatter](#frontmatter)
|
|
16
|
+
- [Required sections](#required-sections)
|
|
17
|
+
- [Expected sections](#expected-sections)
|
|
18
|
+
- [Optional sections](#optional-sections)
|
|
19
|
+
- [Ordering](#ordering)
|
|
20
|
+
- [The development entry](#the-development-entry)
|
|
21
|
+
- [What goes in](#what-goes-in)
|
|
22
|
+
- [What does not go in](#what-does-not-go-in)
|
|
23
|
+
- [Length](#length)
|
|
24
|
+
- [Examples](#examples)
|
|
25
|
+
|
|
15
26
|
## Scope
|
|
16
27
|
|
|
17
28
|
Governs per-domain narrative entries under `canon/context/`: their structure, the decisions and gotchas they carry, and what they leave to the code.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: An unusable diff baseline
|
|
3
|
-
description: When context-fold's diff baseline is unusable,
|
|
3
|
+
description: When context-fold's diff baseline is unusable, why Step 3 keeps the scoped set rather than the whole tree
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# An unusable diff baseline
|
|
@@ -14,10 +14,8 @@ The baseline is unusable in two cases:
|
|
|
14
14
|
|
|
15
15
|
An unusable baseline costs only the committed half. `git diff <base> HEAD` is empty by definition once the base equals HEAD, while `git diff HEAD` and `git ls-files --others --exclude-standard` still report uncommitted and untracked work at correct scope.
|
|
16
16
|
|
|
17
|
-
**Step
|
|
17
|
+
**Step 3 keeps the scoped set.** Run it on the working tree and untracked files alone, and skip only when that set comes out empty, reporting the warning its own reference names.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Never substitute the whole tree for a missing baseline, and do not reuse Step 2's commit read in Step 5 for consistency. On a fresh `git init` project the last commit is the scaffold commit, so `git log -p -1` is the whole tree by another route. Step 2 tolerates that because it only reads, and it matches conservatively against outcomes already on the board. Step 5 writes, so the same set rewrites every context entry that tree touches.
|
|
19
|
+
Never substitute the whole tree for a missing baseline, and do not widen to `git log -p -1` for coverage. On a fresh `git init` project the last commit is the scaffold commit, so that read is the whole tree by another route, and Step 3 writes, so the same set rewrites every context entry that tree touches. `task-complete` takes the widened read for its marking step, which only reads and matches conservatively against outcomes already on the board.
|
|
22
20
|
|
|
23
21
|
Widening what a step reads is safe. Widening what a step writes is not.
|
|
@@ -45,7 +45,7 @@ A project-authored rule numbers in `900-999`, the band reserved for one. `000-89
|
|
|
45
45
|
|
|
46
46
|
## Step 4: write the rule
|
|
47
47
|
|
|
48
|
-
Read `${CLAUDE_SKILL_DIR}
|
|
48
|
+
Read `${CLAUDE_SKILL_DIR}/references/rule.md` for frontmatter, body shape, and voice before writing the body. Do not work the shape from memory.
|
|
49
49
|
|
|
50
50
|
Write `.claude/rules/project/<subdir>/<n>-<slug>.md` where `<slug>` is a 1-to-3-word kebab topic. Preview the resolved path, subdir, number, and frontmatter, then write immediately. The tool permission dialog is the confirmation gate.
|
|
51
51
|
|
|
@@ -66,7 +66,7 @@ paths:
|
|
|
66
66
|
- <imperative rule>
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Title casing is sentence case, with proper nouns keeping their own casing (`# TypeScript standards`). `${CLAUDE_SKILL_DIR}
|
|
69
|
+
Title casing is sentence case, with proper nouns keeping their own casing (`# TypeScript standards`). `${CLAUDE_SKILL_DIR}/references/rule.md` owns the rest of the body shape.
|
|
70
70
|
|
|
71
71
|
## After writing
|
|
72
72
|
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Governance rule reference
|
|
3
3
|
description: Rule frontmatter, body shape, and voice for .claude/rules files
|
|
4
|
-
paths:
|
|
5
|
-
- '.claude/rules/**/*.md'
|
|
6
|
-
rule:
|
|
7
|
-
- 'Read it before writing or editing a rule. Do not work the shape from memory.'
|
|
8
4
|
---
|
|
9
5
|
|
|
10
6
|
# Governance rule reference
|
|
11
7
|
|
|
8
|
+
## Contents
|
|
9
|
+
|
|
10
|
+
- [Overview](#overview)
|
|
11
|
+
- [Scope](#scope)
|
|
12
|
+
- [Whether a skill belongs behind the rule](#whether-a-skill-belongs-behind-the-rule)
|
|
13
|
+
- [Location](#location)
|
|
14
|
+
- [Reserved numbers](#reserved-numbers)
|
|
15
|
+
- [Two sources numbering into one folder](#two-sources-numbering-into-one-folder)
|
|
16
|
+
- [Frontmatter](#frontmatter)
|
|
17
|
+
- [Body](#body)
|
|
18
|
+
- [Examples](#examples)
|
|
19
|
+
|
|
12
20
|
## Overview
|
|
13
21
|
|
|
14
22
|
Rules give Claude Code coding constraints scoped to file paths. Claude Code discovers `.claude/rules/**/*.md` at session start.
|
|
@@ -41,7 +49,6 @@ Write both when both apply. A rule stating the directive and a skill stating how
|
|
|
41
49
|
- A rule the project authored itself lives at `.claude/rules/project/<subdirectory>/<n>-<slug>.md`, a sibling of `canon/` rather than nested inside it, keeping the same subdirectory names
|
|
42
50
|
- This repository's own toolkit-only rules, which never ship to a target, live at `.claude/rules/internal/<subdirectory>/<n>-<slug>.md`, a second sibling of `canon/`. See "Two sources numbering into one folder" below.
|
|
43
51
|
- Give every authored rule a numeric prefix. A bare-word filename reads as a folder name where a stack names its rules, so a rule without one is unreachable from a stack entry.
|
|
44
|
-
- A rule that only routes a path to a standard is generated, not authored. It lives at `governance/rules/standards/<standard>.md` under the standard's name, carries no number, and installs to `.claude/rules/canon/standards/`. Never hand-edit one. Change its globs and bullets in the standard's `paths` and `rule` frontmatter, and `canon gov regen` rewrites it. The generator refuses a standard named like a band folder, which keeps the bare-word name reachable.
|
|
45
52
|
|
|
46
53
|
## Reserved numbers
|
|
47
54
|
|
|
@@ -9,7 +9,7 @@ metadata:
|
|
|
9
9
|
|
|
10
10
|
Read these files in parallel:
|
|
11
11
|
|
|
12
|
-
- `${CLAUDE_SKILL_DIR}
|
|
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 a standard
|
|
15
15
|
- `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md`: punctuation and formatting for skill body text
|
|
@@ -18,7 +18,7 @@ Read these files in parallel:
|
|
|
18
18
|
|
|
19
19
|
## Guards
|
|
20
20
|
|
|
21
|
-
- If `${CLAUDE_SKILL_DIR}
|
|
21
|
+
- If `${CLAUDE_SKILL_DIR}/references/skill.md` is not present, stop: `❌ skill.md standard not found. Reinstall the canon plugin.`
|
|
22
22
|
|
|
23
23
|
## Steps
|
|
24
24
|
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Claude skill reference
|
|
3
3
|
description: Skill structure and authoring rules for Claude Code
|
|
4
|
-
paths:
|
|
5
|
-
- '.claude/skills/**/SKILL.md'
|
|
6
|
-
- 'claude/skills/**/SKILL.md'
|
|
7
|
-
- '.claude/skills/**/REQUIREMENT.md'
|
|
8
|
-
- 'claude/skills/**/REQUIREMENT.md'
|
|
9
|
-
rule:
|
|
10
|
-
- "Confirm `canon:create-skill`'s two creation-time questions are answered before a new `SKILL.md` lands, whether drafted by hand, by another skill, or by `canon:create-skill` itself. Carry the third question into the sibling `REQUIREMENT.md`'s `Must not` section as a review criterion rather than a gate."
|
|
11
|
-
- 'Report it rather than proceeding silently when `canon:create-skill` does not resolve. It ships with the plugin and this rule ships with the CLI, so a project that installed governance alone does not have it.'
|
|
12
|
-
- 'Re-read a skill body this session edited before invoking that skill again in the same session'
|
|
13
|
-
- 'Do not read a resolved file path in a held body as evidence the body is current'
|
|
14
|
-
- 'Follow the skill requirement standard for the shape a `REQUIREMENT.md` states. Read it with `canon standards skill-requirement`.'
|
|
15
|
-
- 'Follow the skill path standard for which root a path in a body resolves against and how a body cites a standard. Read it with `canon standards skill-paths`.'
|
|
16
4
|
---
|
|
17
5
|
|
|
18
6
|
# Claude skill reference
|
|
19
7
|
|
|
8
|
+
## Contents
|
|
9
|
+
|
|
10
|
+
- [Overview](#overview)
|
|
11
|
+
- [Scope](#scope)
|
|
12
|
+
- [Changing a skill](#changing-a-skill)
|
|
13
|
+
- [Whether a rule belongs beside the skill](#whether-a-rule-belongs-beside-the-skill)
|
|
14
|
+
- [Skill types](#skill-types)
|
|
15
|
+
- [Structure](#structure)
|
|
16
|
+
- [Frontmatter](#frontmatter)
|
|
17
|
+
- [Description](#description)
|
|
18
|
+
- [Body](#body)
|
|
19
|
+
- [Scripts](#scripts)
|
|
20
|
+
- [Invocation](#invocation)
|
|
21
|
+
- [Examples](#examples)
|
|
22
|
+
|
|
20
23
|
## Overview
|
|
21
24
|
|
|
22
25
|
Skills give Claude Code domain-specific constraints and rules inline, so it can act immediately without reading all docs.
|
|
@@ -34,7 +37,7 @@ Does not govern:
|
|
|
34
37
|
- Voice, rhythm, and sentence construction in a skill body: the `write-human` skill
|
|
35
38
|
- Punctuation, formatting, and word choice in a skill body: `markdown.md`
|
|
36
39
|
- The transform from a branch name to a slug a skill carries in a filename: `slug.md`
|
|
37
|
-
- Whether a new skill earns its place: the three-question test in the `create-skill` skill and the creation-time bullet in
|
|
40
|
+
- Whether a new skill earns its place: the three-question test in the `create-skill` skill and the creation-time bullet in the `skill` governance rule
|
|
38
41
|
|
|
39
42
|
## Changing a skill
|
|
40
43
|
|
|
@@ -133,7 +136,7 @@ allowed-tools: <tools required>
|
|
|
133
136
|
- Name every file under `references/` in the body at the point a session reads it, since an unnamed reference is never loaded.
|
|
134
137
|
- 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.
|
|
135
138
|
- 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.
|
|
136
|
-
-
|
|
139
|
+
- 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.
|
|
137
140
|
|
|
138
141
|
### Reading and running commands
|
|
139
142
|
|
|
@@ -15,7 +15,7 @@ The instruction against that already existed. `draft-and-pick` Step 1 says to na
|
|
|
15
15
|
|
|
16
16
|
The second half is the output itself. A model with no stated direction draws the population average of its training data, which produces interfaces that satisfy every craft rule and still read templated.
|
|
17
17
|
|
|
18
|
-
Prose is already governed in two halves and design is governed in neither. The character bans ship as data a command reads, and the shapes no closed word set can match needed a skill of their own, because each is a pattern rather than a token. `
|
|
18
|
+
Prose is already governed in two halves and design is governed in neither. The character bans ship as data a command reads, and the shapes no closed word set can match needed a skill of their own, because each is a pattern rather than a token. `claude/skills/canvas-board/references/design.md` governs the shape of a project's design document and is silent on whether its values are any good.
|
|
19
19
|
|
|
20
20
|
Importing an external catalog wholesale fails on what those catalogs turn out to carry. The largest is 1,206 lines in one file, pinned to one framework, one styling library and one animation package, and it scopes itself out of dashboards, data tables and multi-step product UI. A second bans default fonts by name and prescribes a component library.
|
|
21
21
|
|
|
@@ -56,7 +56,7 @@ A rule failing any of the four is recorded as considered and declined rather tha
|
|
|
56
56
|
- Express intensity as a numeric scale. A session picks a middle value and reports compliance, which satisfies the rule and decides nothing.
|
|
57
57
|
- Claim the reported failure is closed. Nothing measures whether a round follows these rules, so this skill states them and the measurement is owed separately.
|
|
58
58
|
- Duplicate a rule a surface already states for itself, such as slide layout or terminal color, where pointing at that surface is the whole of the correct answer
|
|
59
|
-
- Be reached only by an author typing its name. `
|
|
59
|
+
- Be reached only by an author typing its name. `claude/skills/create-skill/references/skill.md` makes this a review criterion rather than a check, since nothing answers it before the skill has run. The intended non-author caller is the declared read in `draft-and-pick`'s output. A round producing no read, with this skill never loaded, is the evidence that the description's triggers are too weak.
|
|
60
60
|
|
|
61
61
|
## Guards
|
|
62
62
|
|
|
@@ -71,6 +71,6 @@ A rule failing any of the four is recorded as considered and declined rather tha
|
|
|
71
71
|
- Validation timing, error placement and save blocking, which `420-forms` owns
|
|
72
72
|
- Rendered copy casing, button labels and error wording, which `400-ui` owns
|
|
73
73
|
- The candidate loop, the arm set, the render and the pick, which `draft-and-pick` owns and which this skill is loaded alongside rather than inside
|
|
74
|
-
- The shape of the project's design document, its sections and its token tables, which `
|
|
74
|
+
- The shape of the project's design document, its sections and its token tables, which `claude/skills/canvas-board/references/design.md` governs
|
|
75
75
|
- Prose on the surface being designed, which `write-human` and `markdown.md` govern between them
|
|
76
76
|
- Measuring whether finished output followed these rules, which needs a check this skill does not carry and which no command reaches while a render is an image rather than a parse
|
|
@@ -145,6 +145,6 @@ Run `${CLAUDE_SKILL_DIR}/references/preflight.md` against the output. It is the
|
|
|
145
145
|
- States, empty and loading coverage, destructive confirmation, truncation: the same rules
|
|
146
146
|
- Rendered copy casing, button labels, error message shape: the same rules
|
|
147
147
|
- The candidate loop, the arm set, the render, and the pick: `draft-and-pick`
|
|
148
|
-
- The shape of the project's design document and its token tables: `${CLAUDE_SKILL_DIR}
|
|
148
|
+
- The shape of the project's design document and its token tables: `${CLAUDE_SKILL_DIR}/../canvas-board/references/design.md`
|
|
149
149
|
- Reading source for roughness: `ux-audit`. Measuring what a running interface costs to paint: `ux-measure`
|
|
150
150
|
- Prose on the surface being designed: the `write-human` skill
|
|
@@ -35,7 +35,7 @@ The quiet one is the baseline. A diff resolved against a bare local ref equals H
|
|
|
35
35
|
|
|
36
36
|
## Out of scope
|
|
37
37
|
|
|
38
|
-
- The context entries
|
|
38
|
+
- The context entries: `context-fold`, which runs ahead of this skill in the ship chain and resolves the same baseline. The task board: `task-complete`, which runs between the two. The split is by audience, so a file's location decides which skill owns it rather than its subject.
|
|
39
39
|
- The requirements record: `document-health` reads it when asked
|
|
40
40
|
- `CLAUDE.md` and the installed seed docs, which an operator reconciles by hand against the toolkit source
|
|
41
41
|
- Changelog entries, which release tooling generates from commit messages
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: docs-sync
|
|
3
|
-
description: Rewrites stale `README.md` and `docs/*.md` sections based on changes since main. Use before staging, or when asked to "sync the public docs", "update the docs in docs/", or "update the README". Do NOT use for the context entries,
|
|
3
|
+
description: Rewrites stale `README.md` and `docs/*.md` sections based on changes since main. Use before staging, or when asked to "sync the public docs", "update the docs in docs/", or "update the README". Do NOT use for the context entries, which `context-fold` owns, the task board, which `task-complete` owns, or for changelog and `CLAUDE.md` updates.
|
|
4
4
|
metadata:
|
|
5
5
|
family: ship
|
|
6
6
|
---
|
|
@@ -11,8 +11,8 @@ Read these files in parallel:
|
|
|
11
11
|
|
|
12
12
|
- `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md`: punctuation and formatting for all generated text
|
|
13
13
|
- The `write-human` skill: voice, rhythm, and sentence construction for all generated text
|
|
14
|
-
- `${CLAUDE_SKILL_DIR}
|
|
15
|
-
- `${CLAUDE_SKILL_DIR}
|
|
14
|
+
- `${CLAUDE_SKILL_DIR}/references/readme.md`: README structure, required sections, and content rules
|
|
15
|
+
- `${CLAUDE_SKILL_DIR}/references/docs.md`: the reader a page under `docs/` serves, its frontmatter, structure, and what it links out rather than carrying
|
|
16
16
|
|
|
17
17
|
## Diff baseline
|
|
18
18
|
|
|
@@ -7,6 +7,17 @@ description: Reader and jurisdiction, frontmatter, page structure, what a page l
|
|
|
7
7
|
|
|
8
8
|
Applies to each authored reference page under `docs/`. Skip for `index.md` at any depth, which is generated rather than authored.
|
|
9
9
|
|
|
10
|
+
## Contents
|
|
11
|
+
|
|
12
|
+
- [Scope](#scope)
|
|
13
|
+
- [What a working docs page looks like](#what-a-working-docs-page-looks-like)
|
|
14
|
+
- [Frontmatter](#frontmatter)
|
|
15
|
+
- [Structure](#structure)
|
|
16
|
+
- [Content](#content)
|
|
17
|
+
- [Diagrams](#diagrams)
|
|
18
|
+
- [Splitting the folder](#splitting-the-folder)
|
|
19
|
+
- [Template](#template)
|
|
20
|
+
|
|
10
21
|
## Scope
|
|
11
22
|
|
|
12
23
|
Governs each authored reference page under `docs/`, whose reader is an operator running what the project ships rather than developing it, and an agent reading the page cold from a project that consumes it: the frontmatter a page carries, its structure, what it links out to rather than restating, whether it holds a diagram, and when a category earns a subfolder of its own.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Readme reference
|
|
3
3
|
description: Readme voice, structure, and content conventions
|
|
4
|
-
paths:
|
|
5
|
-
- '**/README.md'
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# Readme reference
|
|
@@ -11,6 +9,15 @@ Applies to every `README.md`. The `## Voice` section states the voice for a repo
|
|
|
11
9
|
|
|
12
10
|
The reader is what changes. Reference prose serves someone who already committed to the project and is scanning for a fact. A root README meets someone deciding whether to commit at all, and it is often the only file they read.
|
|
13
11
|
|
|
12
|
+
## Contents
|
|
13
|
+
|
|
14
|
+
- [Scope](#scope)
|
|
15
|
+
- [Voice](#voice)
|
|
16
|
+
- [Structure](#structure)
|
|
17
|
+
- [Sections](#sections)
|
|
18
|
+
- [Content](#content)
|
|
19
|
+
- [Examples](#examples)
|
|
20
|
+
|
|
14
21
|
## Scope
|
|
15
22
|
|
|
16
23
|
Governs every `README.md`: voice, heading structure, required and optional sections, the header block, badge selection, and what the page links out to instead of carrying.
|
|
@@ -9,7 +9,7 @@ metadata:
|
|
|
9
9
|
|
|
10
10
|
Some decisions are settled by looking rather than by reasoning, and no draft is wrong until one is picked. Every step here puts several candidates in front of the operator and keeps the real surface untouched until they have chosen.
|
|
11
11
|
|
|
12
|
-
The candidates live on the local design canvas, the surface `canon:canvas` drives. Every verb below is `canon canvas`, and `canon standards canvas` fixes the content format a frame takes. Read that standard before writing the first frame.
|
|
12
|
+
The candidates live on the local design canvas, the surface `canon:canvas-board` drives. Every verb below is `canon canvas`, and `canon standards canvas` fixes the content format a frame takes. Read that standard before writing the first frame.
|
|
13
13
|
|
|
14
14
|
## Guards
|
|
15
15
|
|
|
@@ -30,10 +30,10 @@ The candidates live on the local design canvas, the surface `canon:canvas` drive
|
|
|
30
30
|
|
|
31
31
|
Every arm of a round sits as one frame on one canvas page, side by side. The comparison the operator judges is that page, never a set of separate images handed over to compare from memory.
|
|
32
32
|
|
|
33
|
-
1. Start the canvas the way `canon:canvas` Step 1 states, unless this run already has: read `canon canvas list --json`, start `canon canvas serve --json` in the background unless the operator named an address that already answers, and fetch the `url` the record carries to check the shell's body holds a `<script` tag. Note whether this run started the server, since Step 6 stops only a server this run started. A refused serve or a blank shell stops the run, reported with its `reason`. A run with no canvas cannot draft, and no file stands in for one.
|
|
33
|
+
1. Start the canvas the way `canon:canvas-board` Step 1 states, unless this run already has: read `canon canvas list --json`, start `canon canvas serve --json` in the background unless the operator named an address that already answers, and fetch the `url` the record carries to check the shell's body holds a `<script` tag. Note whether this run started the server, since Step 6 stops only a server this run started. A refused serve or a blank shell stops the run, reported with its `reason`. A run with no canvas cannot draft, and no file stands in for one.
|
|
34
34
|
2. Add the round's page with `canon canvas page add <page> --json` and record its name on the run's own list of pages it added. A name `canvas list` already shows belongs to somebody else, so take the next free suffix rather than writing into it.
|
|
35
35
|
3. Add each arm as a frame with `canon canvas frame add <page> arm-<id> --width <px> --height <px> --json`. Name every frame `arm-<id>`, since Step 6's archive keeps those names and its readers key on them. Set the width the arm is judged at. A frame renders at its own layout width on the canvas and in a capture alike, so a decision about layout reads off the frame itself and needs no device toolbar.
|
|
36
|
-
4. Write each arm's whole document to the `path` the add verb reported. From a linked worktree, take the heredoc route `canon:canvas` Step 3 gives for a main-root write.
|
|
36
|
+
4. Write each arm's whole document to the `path` the add verb reported. From a linked worktree, take the heredoc route `canon:canvas-board` Step 3 gives for a main-root write.
|
|
37
37
|
5. Lay the frames out in one row, in arm order, with `canon canvas frame move <page> arm-<id> --x <px> --y <px> --json`.
|
|
38
38
|
|
|
39
39
|
### What every frame carries
|
|
@@ -62,7 +62,7 @@ canon canvas capture <page> --composite --json
|
|
|
62
62
|
- Point `--out` at `evidence/<slug>/renders/<page>.png` inside a live track, and leave it at its session-scratch default everywhere else. A pick taken from an image the track does not hold is a judgment nobody but this session can check, and the archive in Step 6 covers the picked round alone.
|
|
63
63
|
- Read the PNG's `path` off the record. The composite shows every frame in its default theme, so look at the other theme on the live canvas where the arms carry two.
|
|
64
64
|
- `canon canvas capture` needs a browser binary the toolkit does not install. When it refuses for that reason, report the refusal and name `bunx playwright install chromium` as the repair, stop the canvas server if this run started it, then stop rather than describing an arm nobody has seen.
|
|
65
|
-
- A capture refusing on a font names the family it read off the frame's text. Take the repair `canon:canvas` Step 6 gives and capture again.
|
|
65
|
+
- A capture refusing on a font names the family it read off the frame's text. Take the repair `canon:canvas-board` Step 6 gives and capture again.
|
|
66
66
|
- Hand over the address rather than a description. Emit the canvas link first on its own line, naming the page, then the PNG path on its own line. A still answers how a thing looks and answers none of a hover response, a scroll-linked position, or a pace, which the live frame does.
|
|
67
67
|
- Never report a visual result you have not looked at. A claim about appearance with no render behind it is a guess.
|
|
68
68
|
- Look to judge rather than to confirm. Reading the image back to check it rendered satisfies the rule above and still hands over weak work, so name the weakest thing on the page in a sentence. Where that sentence would embarrass the work, fix it and hand over the second version. Say the remaining weakness out loud either way, so the operator is not hunting for what you already know.
|
|
@@ -120,4 +120,4 @@ Cite these rather than restating them. A step reimplemented here rots against th
|
|
|
120
120
|
- `write-human` carries the voice for any copy an arm puts in front of a reader
|
|
121
121
|
- `git-stage`, `git-pr`, and `git-followup` carry the commits and the pull request
|
|
122
122
|
- `review-pr` and `review-address` run the review pass
|
|
123
|
-
- `canon:canvas` carries the canvas start-and-check sequence, the main-root write route for a frame, and the selection and capture refusals
|
|
123
|
+
- `canon:canvas-board` carries the canvas start-and-check sequence, the main-root write route for a frame, and the selection and capture refusals
|