@erclx/canon 4.78.0 → 4.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/canon-operator/SKILL.md +1 -1
- package/claude/skills/create-standard/SKILL.md +1 -1
- package/claude/skills/design-extract/REQUIREMENT.md +4 -4
- package/claude/skills/design-extract/SKILL.md +11 -11
- package/claude/skills/docs-fold/SKILL.md +14 -14
- package/claude/skills/docs-fold/references/anchor-sweep.md +1 -1
- package/claude/skills/docs-fold/references/wireframe-sweep.md +4 -4
- package/claude/skills/draft-context/REQUIREMENT.md +6 -6
- package/claude/skills/draft-context/SKILL.md +8 -6
- package/claude/skills/draft-diagram/SKILL.md +5 -5
- package/claude/skills/draft-identity/SKILL.md +3 -3
- package/claude/skills/draft-readme/REQUIREMENT.md +1 -1
- package/claude/skills/draft-screencast/SKILL.md +1 -1
- package/claude/skills/draft-wireframes/REQUIREMENT.md +7 -7
- package/claude/skills/draft-wireframes/SKILL.md +7 -5
- package/claude/skills/memory-capture/REQUIREMENT.md +1 -1
- package/claude/skills/memory-capture/SKILL.md +6 -6
- package/claude/skills/memory-review/SKILL.md +1 -1
- package/claude/skills/migration-claude-md/REQUIREMENT.md +3 -3
- package/claude/skills/migration-claude-md/SKILL.md +7 -5
- package/claude/skills/migration-context/REQUIREMENT.md +3 -3
- package/claude/skills/migration-context/SKILL.md +11 -9
- package/claude/skills/plan-feature/SKILL.md +4 -4
- package/claude/skills/plan-groundwork/SKILL.md +2 -2
- package/claude/skills/plan-intake/SKILL.md +2 -2
- package/claude/skills/project-commands/SKILL.md +2 -2
- package/claude/skills/review-branch/SKILL.md +3 -3
- package/claude/skills/review-pr/SKILL.md +2 -2
- package/claude/skills/role-orchestrator/SKILL.md +1 -1
- package/claude/skills/role-planner/SKILL.md +1 -1
- package/claude/skills/session-relay/REQUIREMENT.md +1 -1
- package/claude/skills/session-resume/SKILL.md +1 -1
- package/claude/skills/setup-gov/SKILL.md +1 -1
- package/claude/skills/setup-init/SKILL.md +1 -1
- package/claude/skills/teach-workspace/references/promotion.md +5 -5
- package/claude/skills/ux-audit/SKILL.md +5 -5
- package/claude/skills/ux-measure/SKILL.md +1 -1
- package/docs/agents/commands.md +7 -2
- package/docs/agents/context-audit-checks.md +3 -3
- package/docs/agents/context-audit.md +2 -2
- package/docs/agents/counts.md +3 -3
- package/docs/agents/design-board.md +3 -3
- package/docs/agents/docs.md +3 -3
- package/docs/agents/indexes.md +1 -1
- package/docs/agents/install-and-sync.md +1 -1
- package/docs/agents/review-classification.md +1 -1
- package/docs/agents/routing.md +2 -2
- package/docs/agents/rule-citations.md +1 -1
- package/docs/agents/sandbox.md +1 -1
- package/docs/agents/scripting.md +1 -1
- package/docs/agents/skills-audit.md +1 -1
- package/docs/agents/skills-reach.md +4 -4
- package/docs/target-projects.md +10 -10
- package/docs/workflow/ai-workflow.md +15 -13
- package/docs/workflow/operating-model.md +2 -2
- package/docs/workflow/visual-design-workflow.md +8 -8
- package/governance/rules/claude/510-context.md +3 -2
- package/governance/rules/claude/520-wireframes.md +3 -2
- package/governance/rules/claude/530-requirements.md +2 -1
- package/governance/rules/claude/540-architecture.md +2 -1
- package/governance/rules/claude/550-design.md +2 -1
- package/governance/rules/core/025-indexes.md +1 -1
- package/governance/rules/core/045-memory.md +1 -1
- package/package.json +1 -1
- package/scripts/core/check-ignore-parity.sh +1 -1
- package/scripts/core/check-seed-independence.sh +5 -2
- package/scripts/core/install-check.sh +1 -1
- package/scripts/core/list-seed-roots.sh +3 -3
- package/scripts/core/regen-hero.sh +1 -1
- package/scripts/docs/list.sh +3 -3
- package/scripts/lib/sandbox-git.sh +1 -1
- package/scripts/lib/tooling.sh +6 -4
- package/snippets/claude/figma-steps.md +1 -1
- package/src/audits/catalog.ts +2 -2
- package/src/autoship/paths.ts +1 -1
- package/src/claude/cases/authoring.ts +2 -2
- package/src/claude/cases/setup.ts +1 -1
- package/src/claude/routing.ts +1 -1
- package/src/claude/seeds-list.ts +1 -1
- package/src/claude/seeds.ts +62 -28
- package/src/claude/skills-reach.ts +3 -3
- package/src/commands/claude.ts +1 -1
- package/src/commands/context.ts +8 -8
- package/src/commands/design.ts +1 -1
- package/src/commands/gov.ts +1 -1
- package/src/commands/migrate.ts +182 -1
- package/src/context/audit.ts +1 -1
- package/src/context/citations.ts +7 -5
- package/src/context/folders.ts +2 -2
- package/src/counts/scan.ts +4 -4
- package/src/design/board.ts +5 -5
- package/src/design/components.ts +2 -2
- package/src/design/css.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/design/tokens.ts +2 -2
- package/src/docs/read.ts +9 -3
- package/src/gate/measures.ts +10 -7
- package/src/gate/stages.ts +4 -4
- package/src/markdown/scan.ts +1 -1
- package/src/migrate/surface-roots.ts +458 -0
- package/src/record-root.ts +6 -4
- package/src/sandbox/census.ts +1 -1
- package/src/shipped/references.ts +3 -3
- package/src/surface-root.ts +39 -7
- package/src/sync/layout.ts +10 -6
- package/src/sync/reverse.ts +1 -1
- package/src/tooling/inject.ts +5 -3
- package/src/tooling/scan.ts +4 -1
- package/standards/architecture.md +4 -4
- package/standards/context.md +7 -7
- package/standards/design.md +3 -3
- package/standards/diagrams.md +6 -6
- package/standards/index.md +5 -5
- package/standards/markdown.md +2 -2
- package/standards/publish.md +3 -3
- package/standards/readme.md +1 -1
- package/standards/requirements.md +4 -4
- package/standards/skill.md +2 -2
- package/standards/tasks.md +1 -1
- package/standards/wiki.md +1 -1
- package/standards/wireframes.md +8 -8
- package/tooling/astro/reference.md +3 -3
- package/tooling/base/reference.md +3 -3
- package/tooling/claude/reference.md +7 -3
- package/tooling/claude/seeds/CLAUDE.md +9 -9
- package/tooling/nextjs/reference.md +2 -2
- package/tooling/python/reference.md +1 -1
- package/tooling/vite-react/reference.md +2 -2
- package/tooling/web/reference.md +2 -2
- /package/tooling/base/seeds/{.claude → canon}/context/ci.md +0 -0
- /package/tooling/base/seeds/{.claude → canon}/context/development.md +0 -0
- /package/tooling/base/seeds/{.claude → canon}/context/index.md +0 -0
- /package/tooling/claude/seeds/{.claude → canon}/ARCHITECTURE.md +0 -0
- /package/tooling/claude/seeds/{.claude → canon}/DESIGN.md +0 -0
- /package/tooling/claude/seeds/{.claude → canon}/REQUIREMENTS.md +0 -0
- /package/tooling/claude/seeds/{.claude → canon}/wireframes/index.md +0 -0
package/README.md
CHANGED
|
@@ -150,15 +150,15 @@ For the full journey from scaffold through adding a domain later to syncing upst
|
|
|
150
150
|
|
|
151
151
|
Each domain carries an entry written for someone maintaining the toolkit rather than installing it. These paths resolve in a clone only. The published package ships `docs` and not `.claude`, so an installed copy does not carry them.
|
|
152
152
|
|
|
153
|
-
- [Claude Code plugin](
|
|
154
|
-
- [Governance rules](
|
|
155
|
-
- [Standards](
|
|
156
|
-
- [Snippets](
|
|
157
|
-
- [Tooling stacks](
|
|
158
|
-
- [Design system](
|
|
159
|
-
- [Slides](
|
|
160
|
-
- [Transcripts](
|
|
161
|
-
- [Sandbox](
|
|
153
|
+
- [Claude Code plugin](canon/context/claude-plugin/index.md)
|
|
154
|
+
- [Governance rules](canon/context/governance/index.md)
|
|
155
|
+
- [Standards](canon/context/standards/index.md)
|
|
156
|
+
- [Snippets](canon/context/snippets.md)
|
|
157
|
+
- [Tooling stacks](canon/context/tooling.md)
|
|
158
|
+
- [Design system](canon/context/design.md)
|
|
159
|
+
- [Slides](canon/context/slides.md)
|
|
160
|
+
- [Transcripts](canon/context/transcripts.md)
|
|
161
|
+
- [Sandbox](canon/context/sandbox/index.md)
|
|
162
162
|
|
|
163
163
|
## Contributing
|
|
164
164
|
|
|
@@ -73,7 +73,7 @@ Five audits measure a surface without changing it. Offer the ones whose surface
|
|
|
73
73
|
|
|
74
74
|
A lifecycle row and these offers fire together on a project carrying a context folder and no installed domain, which is the ranking the preamble states. Scaffold work on a target with nothing installed is real work, so an audit offered instead of it answers a question nobody asked, while an audit dropped in favor of it loses the one the user did.
|
|
75
75
|
|
|
76
|
-
-
|
|
76
|
+
- `canon/context/` present: offer `canon context audit`
|
|
77
77
|
- A record folder present under `.claude/`, one of `plans`, `groundwork`, `intake`, or `memory`: offer `canon records validate <kind>` for each one found
|
|
78
78
|
- Markdown that git lists: offer `canon markdown audit`
|
|
79
79
|
- TypeScript or shell source present: offer `canon comments scan`
|
|
@@ -23,7 +23,7 @@ Creates one standard file. Read these files in parallel:
|
|
|
23
23
|
|
|
24
24
|
Emit the full path on its own line.
|
|
25
25
|
|
|
26
|
-
- In the toolkit: this is the authoring source. Remind the user to run `bun run check` to regenerate the consumed copy under `.claude/`. That pass also regenerates the `standards/index.md` entry, and the user adds a row to the standards table in
|
|
26
|
+
- In the toolkit: this is the authoring source. Remind the user to run `bun run check` to regenerate the consumed copy under `.claude/`. That pass also regenerates the `standards/index.md` entry, and the user adds a row to the standards table in `canon/context/standards/overview.md`. <!-- canon-allow-reference: audience-branched, only a toolkit-repo reader reaches this line and that reader can open the path -->
|
|
27
27
|
- In a project: the file is project-local and no toolkit command touches it. Remind the user to copy it to the toolkit repo, under `standards/<slug>.md`, if it should ship to every project.
|
|
28
28
|
|
|
29
29
|
Separate the two by whether the folder already held toolkit-authored standards before this write, since a project authoring its own uses the same path.
|
|
@@ -7,7 +7,7 @@ description: Why a design system is drafted from what the tree already holds, an
|
|
|
7
7
|
|
|
8
8
|
## Gap
|
|
9
9
|
|
|
10
|
-
Without this skill, a session asked for a design system either invents token values with nothing behind them or refuses because the project ships no stylesheet. It writes over a
|
|
10
|
+
Without this skill, a session asked for a design system either invents token values with nothing behind them or refuses because the project ships no stylesheet. It writes over a `canon/DESIGN.md` someone already filled. It fills every cell so the file looks complete, which leaves a reader unable to tell a hex sampled from the CLI apart from one the session made up, and a proposal nobody flagged gets built on. A trailing tag column added to mark that uncertainty breaks the render parser instead.
|
|
11
11
|
|
|
12
12
|
The greenfield case is the one that fails quietly. A project with no UI code still has a personality paragraph and a stated platform, so values can be proposed against a signal rather than pulled from a default palette. A session that does not know this reports there is nothing to extract.
|
|
13
13
|
|
|
@@ -22,7 +22,7 @@ The greenfield case is the one that fails quietly. A project with no UI code sti
|
|
|
22
22
|
|
|
23
23
|
## Must not
|
|
24
24
|
|
|
25
|
-
- Overwrite a
|
|
25
|
+
- Overwrite a `canon/DESIGN.md` that already carries content beyond the seed
|
|
26
26
|
- Guess a value on the source path when no signal exists. Leave the cell blank instead.
|
|
27
27
|
- Invent a non-goal. A proposed motion line is correct when nothing rules motion out.
|
|
28
28
|
- Put the verify tag in a trailing column, which breaks the row
|
|
@@ -30,9 +30,9 @@ The greenfield case is the one that fails quietly. A project with no UI code sti
|
|
|
30
30
|
|
|
31
31
|
## Guards
|
|
32
32
|
|
|
33
|
-
-
|
|
33
|
+
- `canon/DESIGN.md` already populated: stop rather than mutating it
|
|
34
34
|
- `canon` not on PATH: stop, since the seed template and the render both need it
|
|
35
|
-
- Greenfield path with no
|
|
35
|
+
- Greenfield path with no `canon/REQUIREMENTS.md` or no `## Personality` section: stop, because there is nothing to propose against. Evaluate this only after Step 1 picks the path.
|
|
36
36
|
|
|
37
37
|
## Out of scope
|
|
38
38
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-extract
|
|
3
|
-
description: Drafts
|
|
3
|
+
description: Drafts `canon/DESIGN.md` from a project's existing prose and shell UI surfaces, or proposes token values from `REQUIREMENTS.md` and a `## Personality` section when no UI code exists yet. Use when asked to "extract the design system", "draft DESIGN.md", "bootstrap design tokens", "capture the visual system", "propose a design system", "bootstrap DESIGN.md from scratch", "draft tokens for a greenfield project", or "replace Claude Design onboarding". Do NOT use to mutate an existing `canon/DESIGN.md`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Design extract
|
|
7
7
|
|
|
8
8
|
## Guards
|
|
9
9
|
|
|
10
|
-
- If
|
|
10
|
+
- If `canon/DESIGN.md` already exists and has content beyond the seed template, stop: `❌ canon/DESIGN.md already populated. Edit directly or archive the existing file first.`
|
|
11
11
|
- If `canon` is not on PATH, stop: `❌ canon CLI not found.`
|
|
12
12
|
|
|
13
13
|
Step 1 carries two more stops that apply to one path only. Do not evaluate them before the path is picked.
|
|
@@ -23,21 +23,21 @@ The project decides this, never a user flag or an argument. Announce which path
|
|
|
23
23
|
|
|
24
24
|
The greenfield path needs a personality paragraph to propose against, and stops without one. The source path needs neither file and skips both stops.
|
|
25
25
|
|
|
26
|
-
- If
|
|
27
|
-
- If
|
|
26
|
+
- If `canon/REQUIREMENTS.md` is missing, stop: `❌ canon/REQUIREMENTS.md not found. Write requirements before proposing a design system.`
|
|
27
|
+
- If `canon/REQUIREMENTS.md` has no `## Personality` section, stop: `❌ canon/REQUIREMENTS.md missing ## Personality section. Add a paragraph describing voice and tone before running this skill.`
|
|
28
28
|
|
|
29
29
|
## Step 2: read source signals in parallel
|
|
30
30
|
|
|
31
31
|
Read these on both paths, skipping any that do not exist:
|
|
32
32
|
|
|
33
33
|
- `CLAUDE.md`: voice and personality
|
|
34
|
-
-
|
|
34
|
+
- `canon/REQUIREMENTS.md`: the `## Personality` paragraph, worldview, non-goals
|
|
35
35
|
- `${CLAUDE_SKILL_DIR}/../../standards/markdown.md`: word, punctuation, and formatting constraints
|
|
36
36
|
- The `write-human` skill: tone and sentence construction constraints
|
|
37
37
|
|
|
38
38
|
On the source path, also read the UI surfaces matched in Step 1 plus `canon docs output-shape` and `canon docs index`, for output shape or framing rules already documented in the toolkit's own reference. Skip either that fails to resolve, since a project keeping its framing rules elsewhere is read there instead.
|
|
39
39
|
|
|
40
|
-
On the greenfield path, also read
|
|
40
|
+
On the greenfield path, also read `canon/ARCHITECTURE.md` for platform, tech stack, and surface type. Do not scan `src/`, stylesheets, or UI modules. Step 1 already established they hold nothing.
|
|
41
41
|
|
|
42
42
|
Run these reads in parallel. Do not speculatively recurse into every directory.
|
|
43
43
|
|
|
@@ -46,7 +46,7 @@ Run these reads in parallel. Do not speculatively recurse into every directory.
|
|
|
46
46
|
Run this from the project root:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
canon claude seeds list --json | jq -r '.[] | select(.path == "
|
|
49
|
+
canon claude seeds list --json | jq -r '.[] | select(.path == "canon/DESIGN.md") | .content'
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
Use the returned content as the target shape. Keep every section heading and every table header intact. The `canon design render` parser depends on them.
|
|
@@ -61,7 +61,7 @@ On the source path, the tag marks the exception. On the greenfield path it marks
|
|
|
61
61
|
|
|
62
62
|
### Source path
|
|
63
63
|
|
|
64
|
-
- **Personality**: one paragraph. Transcribe what `CLAUDE.md` and
|
|
64
|
+
- **Personality**: one paragraph. Transcribe what `CLAUDE.md` and `canon/REQUIREMENTS.md` say about voice, tone, and visual feeling. Do not invent rules the source does not state. If nothing matches, write a one-sentence placeholder ending in `? verify`.
|
|
65
65
|
- **Color**: one row per role. Source hex values from the CLI UI files or stylesheets. If a role has no source signal, leave `Value` blank rather than guessing.
|
|
66
66
|
- **Typography**: one row per role. Source families and sizes from stylesheet or theme config. Leave cells blank when no signal exists.
|
|
67
67
|
- **Spacing**: fill the base unit and multipliers from stylesheet tokens or obvious repeated values in the UI code.
|
|
@@ -72,7 +72,7 @@ On the source path, the tag marks the exception. On the greenfield path it marks
|
|
|
72
72
|
|
|
73
73
|
Anchor every proposal to a signal, never to a default. "Calm and dense" pins muted grays and tight spacing. A requirements non-goal of "no motion" makes Motion read `No animation.` with no tag. A CLI-only surface leans Typography monospaced and keeps Borders minimal.
|
|
74
74
|
|
|
75
|
-
- **Personality**: transcribe the `## Personality` paragraph from
|
|
75
|
+
- **Personality**: transcribe the `## Personality` paragraph from `canon/REQUIREMENTS.md` verbatim. This is the one section that is not a proposal. No tag.
|
|
76
76
|
- **Color**: one row per role. Rewrite the Intent cell in personality language, for example `warm off-white page canvas` instead of the seed default `page canvas`. Propose hex values matching the personality. Dense and calm gives low saturation and high text contrast. Playful gives saturated accents. Every Intent and Value cell gets `? verify`.
|
|
77
77
|
- **Typography**: one row per role. Propose families fitting the platform, system UI for web, monospaced for CLI tools, serif for editorial, and a harmonious scale. Every cell gets `? verify`.
|
|
78
78
|
- **Spacing**: propose a base unit matching density intent. Dense gives a 4px base, roomy gives 8px. Keep the Multiplier column as the seed ships it, no tag. Only the Value column gets `? verify`.
|
|
@@ -84,7 +84,7 @@ Do not invent non-goals. A proposed motion line is fine when neither the persona
|
|
|
84
84
|
|
|
85
85
|
## Step 5: write and render
|
|
86
86
|
|
|
87
|
-
Write the filled template to
|
|
87
|
+
Write the filled template to `canon/DESIGN.md` from the project root. Then run:
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
90
|
canon design render
|
|
@@ -95,7 +95,7 @@ The command writes an HTML plus CSS preview to `.canon/review/design/`. Output t
|
|
|
95
95
|
## Response format
|
|
96
96
|
|
|
97
97
|
```plaintext
|
|
98
|
-
📝 Wrote
|
|
98
|
+
📝 Wrote canon/DESIGN.md
|
|
99
99
|
📝 Wrote .canon/review/design/index.html
|
|
100
100
|
|
|
101
101
|
Ran the <source|greenfield> path. N cells marked `? verify`. Open the preview and confirm before committing.
|
|
@@ -42,12 +42,12 @@ Widening what a step reads is safe. Widening what a step writes is not, and wide
|
|
|
42
42
|
|
|
43
43
|
## Step 1: read current docs
|
|
44
44
|
|
|
45
|
-
Read these in parallel from the current worktree root (`pwd`), not the main worktree root. These are tracked files and edits must commit with the branch. Skip any that
|
|
45
|
+
Read these in parallel from the current worktree root (`pwd`), not the main worktree root. These are tracked files and edits must commit with the branch. A project the surface move has not reached holds each of them under `.claude/` rather than `canon/`, so read and write each at whichever root already carries it. Skip any that exist at neither:
|
|
46
46
|
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
47
|
+
- `canon/REQUIREMENTS.md`
|
|
48
|
+
- `canon/ARCHITECTURE.md`
|
|
49
|
+
- `canon/DESIGN.md`
|
|
50
|
+
- `canon/wireframes/index.md` and every surface file it links to, following a grouped surface's own `index.md` and the siblings it lists rather than stopping at the top-level folder
|
|
51
51
|
|
|
52
52
|
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:
|
|
53
53
|
|
|
@@ -109,14 +109,14 @@ Read `ok` and `reason` out of that record rather than the exit. An operator's sh
|
|
|
109
109
|
- Update only the sections affected by session decisions.
|
|
110
110
|
- Do not rewrite sections unrelated to what changed.
|
|
111
111
|
- Follow `${CLAUDE_SKILL_DIR}/../../standards/markdown.md` and the `write-human` skill for all edits.
|
|
112
|
-
- Close a decision entry in
|
|
112
|
+
- Close a decision entry in `canon/ARCHITECTURE.md` with its verification anchor whenever this run writes that entry or amends its reasoning and that reasoning cites a measured number. Re-read the number against the tree first, since the marker records the read rather than the edit. `${CLAUDE_SKILL_DIR}/../../standards/architecture.md` fixes the sentence.
|
|
113
113
|
- Leave every decision entry this run did not write alone, anchored or not. The rule is scoped forward, so an entry written before it is dated by blame rather than by a read. Step 5 reports a stale anchor and no step writes one on an entry it did not amend.
|
|
114
114
|
|
|
115
115
|
Write each updated file immediately. Claude Code's tool permission dialog is the confirmation gate. Do not wait for user input.
|
|
116
116
|
|
|
117
117
|
## Step 4: wireframe coverage sweep
|
|
118
118
|
|
|
119
|
-
Skip this step silently when
|
|
119
|
+
Skip this step silently when `canon/wireframes/` does not exist or has no surface files. When the baseline is unusable, scope it to the working tree and untracked files, and skip it only when that set is empty, reporting `⚠ No diff to scope against. Skipped the wireframe sweep.`
|
|
120
120
|
|
|
121
121
|
Reuse the diff from the baseline above and filter for UI-affecting paths. UI-affecting paths are framework-dependent. Default heuristic: any file under a `components/`, `features/`, `pages/`, `app/`, `routes/`, or `screens/` folder, plus any `*.tsx`, `*.jsx`, `*.vue`, or `*.svelte` file anywhere in the diff.
|
|
122
122
|
|
|
@@ -124,7 +124,7 @@ Skip silently when the filter leaves nothing, which is every branch touching no
|
|
|
124
124
|
|
|
125
125
|
## Step 5: architecture anchor sweep
|
|
126
126
|
|
|
127
|
-
Skip this step silently when
|
|
127
|
+
Skip this step silently when `canon/ARCHITECTURE.md` does not exist at `pwd` or carries no decision entry with a verification anchor. A record written before the rule holds none, and a project is not told on every ship that nothing has been checked when the standard calls that state correct. When the baseline is unusable, scope the sweep to the working tree and untracked files, and skip it only when that set is empty, reporting `⚠ No diff to scope against. Skipped the anchor sweep.`
|
|
128
128
|
|
|
129
129
|
This step reports and never writes. The record carries no frontmatter, so an anchor is a sentence sharing a paragraph with the claim it marks, and a pass editing prose to mark prose has no structural guard against editing the claim beside it. A surface whose marker sits in YAML gets that separation for free and this one cannot.
|
|
130
130
|
|
|
@@ -144,11 +144,11 @@ Do not edit `CLAUDE.md` inline. Every `CLAUDE.md` change goes through the show-d
|
|
|
144
144
|
|
|
145
145
|
## Step 7: refresh context entries
|
|
146
146
|
|
|
147
|
-
Read
|
|
147
|
+
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.
|
|
148
148
|
|
|
149
149
|
Two sources feed this step, the same split Step 2 runs on. The diff carries what the repository changed. The routed facts carry what the session learned, which a diff cannot show.
|
|
150
150
|
|
|
151
|
-
**Routed facts.** Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../../standards/slug.md`, falling back to `latest` on an empty result, and read `.canon/tmp/memory-routing/<slug>.md` at the main worktree root. `memory-capture` writes it, one H2 per target entry naming the path, with the fact underneath. Fold each fact into the entry its heading names, which for a nested
|
|
151
|
+
**Routed facts.** Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../../standards/slug.md`, falling back to `latest` on an empty result, and read `.canon/tmp/memory-routing/<slug>.md` at the main worktree root. `memory-capture` writes it, one H2 per target entry naming the path, with the fact underneath. Fold each fact into the entry its heading names, which for a nested `canon/context/<domain>/index.md` heading is the sibling file the fact belongs under rather than the generated index itself. Then delete the handoff file so a later run does not fold it twice.
|
|
152
152
|
|
|
153
153
|
This half is not diff-scoped and must not be. A gotcha a session hit while working is exactly the fact the diff never shows, and scoping it to changed files would drop the entries worth keeping. The handoff is a named input rather than a scan, so the reach stays bounded to what capture decided.
|
|
154
154
|
|
|
@@ -156,7 +156,7 @@ Skip this half silently when the file is absent, which is every run where nothin
|
|
|
156
156
|
|
|
157
157
|
**The diff.** When the baseline is unusable, scope this half to the working tree and untracked files, and skip it only when that set is empty, reporting `⚠ No diff to scope against. Skipped the context refresh.` The routed half still runs, since it reads a file rather than a diff.
|
|
158
158
|
|
|
159
|
-
Reuse the diff from the baseline above, names and content both. For each domain listed in
|
|
159
|
+
Reuse the diff from the baseline above, names and content both. For each domain listed in `canon/context/index.md`, read its own entry: a flat `canon/context/<domain>.md`, or, for a domain split into a folder, its `canon/context/<domain>/index.md` and every sibling file that index links. Follow the index rather than globbing the folder, since a folder can hold a file the index does not list yet.
|
|
160
160
|
|
|
161
161
|
- 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.
|
|
162
162
|
- 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.
|
|
@@ -173,17 +173,17 @@ Grep the tree for the name that went, rather than for the paths the diff carries
|
|
|
173
173
|
|
|
174
174
|
Report each hit as an ordinary rewrite.
|
|
175
175
|
|
|
176
|
-
Create a new entry only for a domain
|
|
176
|
+
Create a new entry only for a domain `canon/context/index.md` already lists but carries no file for, following `${CLAUDE_SKILL_DIR}/../../standards/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.
|
|
177
177
|
|
|
178
178
|
Write each updated entry immediately. Output one line per file, naming the path this run actually wrote rather than always the flat template:
|
|
179
179
|
|
|
180
|
-
`✅ Context:
|
|
180
|
+
`✅ Context: canon/context/<domain>.md` for a flat entry, or `✅ Context: canon/context/<domain>/<sub-area>.md` for the sibling file a nested edit landed in
|
|
181
181
|
|
|
182
182
|
Add a line naming the handoff when one was consumed:
|
|
183
183
|
|
|
184
184
|
`🧹 Folded: .canon/tmp/memory-routing/<slug>.md`
|
|
185
185
|
|
|
186
|
-
The base lint-staged config runs `canon indexes regen` on every committed `*.md`, so
|
|
186
|
+
The base lint-staged config runs `canon indexes regen` on every committed `*.md`, so `canon/context/index.md` refreshes automatically on commit. No manual step needed.
|
|
187
187
|
|
|
188
188
|
## Step 8: fold promoted pages
|
|
189
189
|
|
|
@@ -9,7 +9,7 @@ Mechanics for Step 5 of `docs-fold`. The body owns the skip conditions, the repo
|
|
|
9
9
|
|
|
10
10
|
## Anchored entries
|
|
11
11
|
|
|
12
|
-
Read
|
|
12
|
+
Read `canon/ARCHITECTURE.md` and take the H3 entries under `## Key technical decisions`. An entry is anchored when its reasoning closes on the marker the standard fixes:
|
|
13
13
|
|
|
14
14
|
```plaintext
|
|
15
15
|
Measured at <short-sha> on <YYYY-MM-DD>.
|
|
@@ -9,13 +9,13 @@ Mechanics for Step 4 of `docs-fold`. The body owns the skip conditions and the U
|
|
|
9
9
|
|
|
10
10
|
## Deriving a candidate slug
|
|
11
11
|
|
|
12
|
-
For each UI-affecting path, derive a candidate surface slug from the file's basename and parent folder (e.g. `web/src/features/mock/MockDemoStrip.tsx` → `mock-demo-strip` or `mock`). Cross-reference against every surface file in
|
|
12
|
+
For each UI-affecting path, derive a candidate surface slug from the file's basename and parent folder (e.g. `web/src/features/mock/MockDemoStrip.tsx` → `mock-demo-strip` or `mock`). Cross-reference against every surface file in `canon/wireframes/`, including one nested inside a grouped surface's own subfolder (`canon/wireframes/<group>/<surface>.md`), by walking the tree rather than globbing the top level alone.
|
|
13
13
|
|
|
14
14
|
## Findings
|
|
15
15
|
|
|
16
16
|
**Contradicted sections.** When a surface file exists for a path in the diff and the diff renames or removes a literal string that appears in the wireframe prose (e.g. provider name, button label, copy string), output a one-line report entry and stop. Do not auto-rewrite prose. Operator resolves.
|
|
17
17
|
|
|
18
|
-
**Uncovered surfaces.** When a UI-affecting path has no matching surface file by slug, write
|
|
18
|
+
**Uncovered surfaces.** When a UI-affecting path has no matching surface file by slug, write `canon/wireframes/<slug>.md` with this stub:
|
|
19
19
|
|
|
20
20
|
```markdown
|
|
21
21
|
---
|
|
@@ -38,8 +38,8 @@ Skip the write when the slug would collide with an existing file, flat or nested
|
|
|
38
38
|
|
|
39
39
|
Output one line per finding:
|
|
40
40
|
|
|
41
|
-
- `⚠ Wireframe drift in
|
|
42
|
-
- `📝 Stubbed:
|
|
41
|
+
- `⚠ Wireframe drift in canon/wireframes/<surface>.md: <contradicted string>`
|
|
42
|
+
- `📝 Stubbed: canon/wireframes/<surface>.md`
|
|
43
43
|
- `⚠ Slug collision: <slug> matches existing <existing-surface>.md, review and rename`
|
|
44
44
|
|
|
45
45
|
If the sweep finds nothing, skip silently.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: draft-context
|
|
3
|
-
description: Why a brand-new
|
|
3
|
+
description: Why a brand-new canon/context/<domain>.md entry needs a catalog collision check and a confirm step, not the refresh path docs-fold already owns
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Context draft requirement
|
|
@@ -15,23 +15,23 @@ Without this skill, a session documenting a domain that has no context entry yet
|
|
|
15
15
|
- Check the domain against the existing catalog by slug and by title-and-description, not by slug alone, since a domain can be covered under a name the topic phrase does not guess
|
|
16
16
|
- Default a brand-new entry to a flat file, since a fresh domain never holds the three or more sub-areas the standard requires before it earns a folder
|
|
17
17
|
- Confirm the resolved path and the full content with the user before writing, since placement is a judgment call with no diff to preview it against
|
|
18
|
-
- Run `canon indexes regen` on
|
|
18
|
+
- Run `canon indexes regen` on `canon/context/` after writing, so the catalog picks up the new domain immediately rather than drifting until the next unrelated regen
|
|
19
19
|
|
|
20
20
|
## Must not
|
|
21
21
|
|
|
22
22
|
- Refresh or rewrite an existing entry. A domain already covered refuses toward the refresh mechanism.
|
|
23
|
-
- Hand-edit
|
|
23
|
+
- Hand-edit `canon/context/index.md`. It regenerates from sibling frontmatter, and a hand edit is overwritten on the next regen.
|
|
24
24
|
- Assume this skill's own invocation frequency needs no check. Whether anything reaches for it beyond an author typing its name has no answer at creation time, so a review pass some months in should read that back rather than take the assumption on faith.
|
|
25
25
|
|
|
26
26
|
## Guards
|
|
27
27
|
|
|
28
28
|
- No domain given: stop and ask what domain the entry should cover.
|
|
29
|
-
- The derived slug already resolves to
|
|
29
|
+
- The derived slug already resolves to `canon/context/<slug>.md` or `canon/context/<slug>/index.md`: stop and point at the refresh mechanism instead.
|
|
30
30
|
- The catalog already covers the domain under a different name: stop the same way, checked against the titles and descriptions the Placement step already reads.
|
|
31
31
|
|
|
32
32
|
## Out of scope
|
|
33
33
|
|
|
34
|
-
- Refreshing an existing
|
|
35
|
-
- Drafting a
|
|
34
|
+
- Refreshing an existing `canon/context/<domain>.md` entry against a diff: `docs-fold`
|
|
35
|
+
- Drafting a `canon/wireframes/<surface>.md` file: `draft-wireframes`
|
|
36
36
|
- Drafting a `docs/*.md` page: `draft-docs`
|
|
37
37
|
- Drafting a standard, a snippet, or a governance rule: `create-standard`, `create-snippet`, `create-rule`
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: draft-context
|
|
3
|
-
description: Drafts a brand-new
|
|
3
|
+
description: Drafts a brand-new `canon/context/<domain>.md` entry against the context standard, checks the catalog for a name-or-topic collision, decides flat-file placement, confirms with the user, then writes. Use when asked to "write a context entry for X", "document the X domain", "add a context entry for X", or "create a canon/context page for X" where no existing entry covers the domain. Do NOT use to refresh an existing entry against a diff, which is `docs-fold`.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Context draft
|
|
7
7
|
|
|
8
|
-
Drafts one brand-new
|
|
8
|
+
Drafts one brand-new `canon/context/<domain>.md` entry end to end: read the standard, decide whether the domain is already covered under a different name, confirm the draft with the user, then write.
|
|
9
|
+
|
|
10
|
+
A project the surface move has not reached keeps its context folder under `.claude/` rather than `canon/`. Check and write at whichever root already carries the folder, and create it under `canon/` only when neither does, since a new `canon/` folder would hide every entry the old one holds.
|
|
9
11
|
|
|
10
12
|
Read these files in parallel:
|
|
11
13
|
|
|
@@ -16,13 +18,13 @@ Read these files in parallel:
|
|
|
16
18
|
## Guards
|
|
17
19
|
|
|
18
20
|
- If no domain is given, stop: `❌ No domain given. Name the domain this entry should cover.`
|
|
19
|
-
- Derive a kebab-case slug from the domain and check whether
|
|
21
|
+
- Derive a kebab-case slug from the domain and check whether `canon/context/<slug>.md` or `canon/context/<slug>/index.md` already exists. Either resolving means the domain is already covered under that exact name. Stop: `❌ <slug> already has a context entry. Use docs-fold to refresh it instead.`
|
|
20
22
|
|
|
21
23
|
## Placement
|
|
22
24
|
|
|
23
|
-
- Read
|
|
25
|
+
- Read `canon/context/index.md` and check every title and description it lists against the domain. The Guards check above only catches an exact-slug collision, and a domain already covered under a different name still resolves here at no extra cost, since this read already runs.
|
|
24
26
|
- Stop the same way on a match: `❌ <path> already covers this domain under a different name. Use docs-fold to refresh it instead.`
|
|
25
|
-
- Default a brand-new entry to a flat file,
|
|
27
|
+
- Default a brand-new entry to a flat file, `canon/context/<slug>.md`. A domain starts as one page's worth of narrative, and the standard only splits it into a folder once it holds three or more sub-areas, which a fresh domain never does on day one.
|
|
26
28
|
|
|
27
29
|
## Draft
|
|
28
30
|
|
|
@@ -39,7 +41,7 @@ Read these files in parallel:
|
|
|
39
41
|
|
|
40
42
|
- Write the file at the confirmed path, creating the folder when it is absent.
|
|
41
43
|
- Run `canon markdown audit <path>`.
|
|
42
|
-
- Run `canon indexes regen
|
|
44
|
+
- Run `canon indexes regen canon/context`, so the domain appears in `canon/context/index.md` immediately rather than drifting until the next unrelated regen.
|
|
43
45
|
|
|
44
46
|
## Response format
|
|
45
47
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: draft-diagram
|
|
3
|
-
description: Writes per-kind Mermaid diagram entries into `.canon/diagrams/`, covering system context, components, request flow, data pipeline, and deployment. Reads
|
|
3
|
+
description: Writes per-kind Mermaid diagram entries into `.canon/diagrams/`, covering system context, components, request flow, data pipeline, and deployment. Reads `canon/ARCHITECTURE.md` and `REQUIREMENTS.md` when present, falls back to a code-structure scan. Use when asked to "draw the architecture", "diagram the system", "show the components", "give me a flow chart", "refresh the deploy diagram", or "visualize the project". Do NOT use for design tokens (use `design-extract`) or UI audits (use `ux-audit`).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Draft diagram
|
|
@@ -9,15 +9,15 @@ Write one entry per diagram kind. Never rewrite the folder wholesale. A pass tha
|
|
|
9
9
|
|
|
10
10
|
## Guards
|
|
11
11
|
|
|
12
|
-
- If no
|
|
12
|
+
- If no `canon/ARCHITECTURE.md`, no `canon/REQUIREMENTS.md`, and no top-level folder structure to scan, stop: `❌ No source signal. Add canon/ARCHITECTURE.md or run inside a project folder.`
|
|
13
13
|
|
|
14
14
|
## Step 1: read sources and locate the surface
|
|
15
15
|
|
|
16
16
|
Read these from the project root in parallel, skipping any that do not exist:
|
|
17
17
|
|
|
18
18
|
- `.canon/diagrams/index.md` and every `.canon/diagrams/*.md`: which entries exist and what they already say
|
|
19
|
-
-
|
|
20
|
-
-
|
|
19
|
+
- `canon/REQUIREMENTS.md`: users, external dependencies, tech stack, MVP feature list
|
|
20
|
+
- `canon/ARCHITECTURE.md`: layered components, key technical decisions
|
|
21
21
|
- `CLAUDE.md`: project type, conventions
|
|
22
22
|
- `package.json`, `pyproject.toml`, `Cargo.toml`: language and framework markers
|
|
23
23
|
- Top-level folder layout and root config files via `ls`: deploy targets, infrastructure config, component boundaries
|
|
@@ -44,7 +44,7 @@ Count entries the way Step 1 does, excluding `index.md`. Counting the catalog as
|
|
|
44
44
|
- The user asked broadly and the folder holds no entry: write every kind whose signal exists.
|
|
45
45
|
- The user asked broadly and at least one entry exists: compare each entry against its source signal and write only the ones whose signal moved. Report the untouched ones as current.
|
|
46
46
|
|
|
47
|
-
The standard fixes one filename and one `category` value per kind. Use them verbatim rather than inventing a name, since a refresh finds its target by filename and a new name writes a duplicate entry beside the old one. Emit `system-context.md` whenever
|
|
47
|
+
The standard fixes one filename and one `category` value per kind. Use them verbatim rather than inventing a name, since a refresh finds its target by filename and a new name writes a duplicate entry beside the old one. Emit `system-context.md` whenever `canon/REQUIREMENTS.md` exists, since it is the entry a reader outside the team opens first and the set is incomplete without it.
|
|
48
48
|
|
|
49
49
|
Stay inside `flowchart` and `sequenceDiagram`. C4, state, ER, and class diagrams render inconsistently across viewers.
|
|
50
50
|
|
|
@@ -16,8 +16,8 @@ One identity rendered twice: the same mark sized down to an icon sequence and co
|
|
|
16
16
|
|
|
17
17
|
Read these in parallel, skipping any that do not exist:
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
19
|
+
- `canon/DESIGN.md`: the `## Personality`, `## Color`, and `## Typography` sections, the same three cells `design-extract` Step 2 sources from
|
|
20
|
+
- `canon/REQUIREMENTS.md`: the `## Personality` paragraph, when `canon/DESIGN.md` carries none
|
|
21
21
|
- `CLAUDE.md`: the project's stated voice, when neither file above carries a personality signal
|
|
22
22
|
|
|
23
23
|
No signal from any of the three is not a stop. Draft against a neutral default and tag the color and type choices `? verify` per `${CLAUDE_SKILL_DIR}/../../standards/design.md`'s uncertainty tag.
|
|
@@ -82,5 +82,5 @@ Write folder: <detected <path>|defaulted to project root>. Move the files if thi
|
|
|
82
82
|
Cite these rather than restating them.
|
|
83
83
|
|
|
84
84
|
- `draft-and-pick` owns Steps 1 through 5 of the render-and-pick loop, cited above
|
|
85
|
-
- `design-extract` owns building
|
|
85
|
+
- `design-extract` owns building `canon/DESIGN.md`. This skill only reads it.
|
|
86
86
|
- `canon capture` owns the render mechanics, its font refusal, and its reported dimensions
|
|
@@ -9,7 +9,7 @@ description: Why a README needs a project-type read and a confirm step, not the
|
|
|
9
9
|
|
|
10
10
|
Without this skill, a session drafting a README either copies the generic template from memory or reaches for `docs-sync`, which has nothing to diff a nonexistent page against and reports the topic as unrelated to any change. A scaffold-written stub meets the same dead end, since no diff touches it either. Either way the page ships with no read of `standards/readme.md`, no read of what the project actually is, and no badge chosen against its rendered value rather than its service name.
|
|
11
11
|
|
|
12
|
-
A README whose real documentation lives in
|
|
12
|
+
A README whose real documentation lives in `canon/context/` or `docs/` was a second gap the standard itself carried until this build: nothing named a pointer page as complete, so a session drafting one either padded the page or read the required list as unsatisfied.
|
|
13
13
|
|
|
14
14
|
## Must
|
|
15
15
|
|
|
@@ -16,7 +16,7 @@ description: Drafts a screencast script with pre-seeded beats, defaults, and dec
|
|
|
16
16
|
Read these in parallel from the project root, skipping any that do not exist:
|
|
17
17
|
|
|
18
18
|
- `CLAUDE.md`: behavior rules and project pitch
|
|
19
|
-
-
|
|
19
|
+
- `canon/REQUIREMENTS.md`: feature scope, non-goals, audience hints
|
|
20
20
|
- `.canon/tasks/index.md`: current scope
|
|
21
21
|
- Recent commits via `git log --oneline -20 2>/dev/null || echo "FALLBACK"`: what shipped recently is usually the recording subject.
|
|
22
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: draft-wireframes
|
|
3
|
-
description: Why a brand-new
|
|
3
|
+
description: Why a brand-new canon/wireframes/<surface>.md file needs a real draft and a tier-detect step, not the stub the wireframe-sweep already writes
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Wireframe draft requirement
|
|
@@ -12,27 +12,27 @@ Without this skill, a session drafting a wireframe for a surface with no file ye
|
|
|
12
12
|
## Must
|
|
13
13
|
|
|
14
14
|
- Read `standards/wireframes.md` before drafting, since the frontmatter contract, the layout and variant rules, and the Transcription-wireframes branch are what make the file arguable against a sibling
|
|
15
|
-
- Walk the whole
|
|
16
|
-
- Detect an existing higher tier from
|
|
15
|
+
- Walk the whole `canon/wireframes/` tree, including a grouped surface's own subfolder, before drafting, since a top-level-only check misses a nested match
|
|
16
|
+
- Detect an existing higher tier from `canon/DESIGN.md` and the wireframes tree and report it, never build a companion render for it, since no shipped mechanism produces one
|
|
17
17
|
- Draft in transcription mode, citing the real source, when the surface names an already-built component. Draft in role-intent mode otherwise.
|
|
18
18
|
- Confirm the resolved path, the detected tier, and the full content with the user before writing, since the mode decision and the tier read are judgment calls with no diff to preview either against
|
|
19
|
-
- Run `canon indexes regen` on
|
|
19
|
+
- Run `canon indexes regen` on `canon/wireframes/` after writing, so the catalog picks up the new surface immediately rather than drifting until the next unrelated regen
|
|
20
20
|
|
|
21
21
|
## Must not
|
|
22
22
|
|
|
23
23
|
- Build a tier-1 or tier-2 rendering mechanism, an Excalidraw round trip, or any companion render. Detecting and reporting a higher tier is the whole of this skill's reach past ASCII.
|
|
24
|
-
- Hand-edit
|
|
24
|
+
- Hand-edit `canon/wireframes/index.md`. It regenerates from sibling frontmatter, and a hand edit is overwritten on the next regen.
|
|
25
25
|
- Assume this skill's own invocation frequency needs no check. Whether anything reaches for it beyond an author typing its name has no answer at creation time, so a review pass some months in should read that back rather than take the assumption on faith.
|
|
26
26
|
|
|
27
27
|
## Guards
|
|
28
28
|
|
|
29
29
|
- No surface given: stop and ask what surface the wireframe should cover.
|
|
30
|
-
- The derived slug already matches a file anywhere in the
|
|
30
|
+
- The derived slug already matches a file anywhere in the `canon/wireframes/` tree, flat or nested: stop and point at editing that file directly, since no dedicated skill owns a full rewrite of an existing surface.
|
|
31
31
|
|
|
32
32
|
## Out of scope
|
|
33
33
|
|
|
34
34
|
- Stubbing a surface a diff touched, or reporting drift in an existing wireframe against a diff: `claude/skills/docs-fold/references/wireframe-sweep.md`
|
|
35
|
-
- Drafting a
|
|
35
|
+
- Drafting a `canon/context/<domain>.md` entry: `draft-context`
|
|
36
36
|
- Drafting a `docs/*.md` page: `draft-docs`
|
|
37
37
|
- Drafting a standard, a snippet, or a governance rule: `create-standard`, `create-snippet`, `create-rule`
|
|
38
38
|
- Building or wiring an actual tier-1 or tier-2 rendering pipeline: the visual design workflow's own tier guidance, out of reach of a hand-drafting skill
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: draft-wireframes
|
|
3
|
-
description: Drafts a brand-new
|
|
3
|
+
description: Drafts a brand-new `canon/wireframes/<surface>.md` file against the wireframes standard, walks the tree for a name collision, detects an existing higher visual-design tier without building one, confirms with the user, then writes. Use when asked to "draft a wireframe for X", "write the wireframe for this surface", "add a canon/wireframes entry for X", or "wireframe this screen" where no surface file covers it yet. Do NOT use to fix a stale TODO stub or report wireframe drift against a diff, which is `docs-fold`'s wireframe-sweep step.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Wireframe draft
|
|
7
7
|
|
|
8
|
-
Drafts one brand-new
|
|
8
|
+
Drafts one brand-new `canon/wireframes/<surface>.md` file end to end: read the standard, decide whether the surface is already covered, detect but never build a higher visual-design tier, confirm the draft with the user, then write.
|
|
9
|
+
|
|
10
|
+
A project the surface move has not reached keeps its wireframes folder under `.claude/` rather than `canon/`. Walk and write at whichever root already carries the folder, and create it under `canon/` only when neither does, since a new `canon/` folder would hide every surface the old one holds.
|
|
9
11
|
|
|
10
12
|
Read these files in parallel:
|
|
11
13
|
|
|
@@ -18,11 +20,11 @@ This skill stays fully independent of `docs-fold`'s wireframe coverage sweep, wh
|
|
|
18
20
|
## Guards
|
|
19
21
|
|
|
20
22
|
- If no surface is given, stop: `❌ No surface given. Name the surface this wireframe should cover.`
|
|
21
|
-
- Derive a kebab-case slug from the surface. Walk the whole
|
|
23
|
+
- Derive a kebab-case slug from the surface. Walk the whole `canon/wireframes/` tree, including a surface nested inside a grouped subfolder, rather than checking the top level alone. A match at any depth means the surface already has a file. Stop: `❌ <path> already covers this surface. Edit it directly; this skill only drafts a surface with no file yet.`
|
|
22
24
|
|
|
23
25
|
## Tier detection
|
|
24
26
|
|
|
25
|
-
- Read
|
|
27
|
+
- Read `canon/DESIGN.md` and every existing `canon/wireframes/` file for a tier signal: a Stitch, Excalidraw, or Figma reference, or a marker naming one of them.
|
|
26
28
|
- State the detected tier at the confirm step. Always draft the tier-0 ASCII file regardless of what is detected, since that is the only shape this skill or any other shipped mechanism produces. Report a higher tier rather than attempting a companion render for it.
|
|
27
29
|
- Default silently to tier 0 when nothing is detected.
|
|
28
30
|
|
|
@@ -43,7 +45,7 @@ This skill stays fully independent of `docs-fold`'s wireframe coverage sweep, wh
|
|
|
43
45
|
|
|
44
46
|
- Write the file at the confirmed path, creating a grouped subfolder only when the surface belongs beside siblings that already share one.
|
|
45
47
|
- Run `canon markdown audit <path>` against the prose outside the fenced block.
|
|
46
|
-
- Run `canon indexes regen
|
|
48
|
+
- Run `canon indexes regen canon/wireframes`, so the surface appears in `canon/wireframes/index.md` immediately rather than drifting until the next unrelated regen.
|
|
47
49
|
|
|
48
50
|
## Response format
|
|
49
51
|
|
|
@@ -17,7 +17,7 @@ The threshold is what the remaining folder lives or dies on. A first-occurrence
|
|
|
17
17
|
|
|
18
18
|
- Resolve every read and write at the main worktree root, so parallel worktrees write one folder
|
|
19
19
|
- Classify each candidate as feedback, project, user, or reference before routing or writing
|
|
20
|
-
- Route a project candidate whose subject names an entry in
|
|
20
|
+
- Route a project candidate whose subject names an entry in `canon/context/index.md` to that entry, and hand it off as a file rather than an edit
|
|
21
21
|
- Keep a candidate that matches no entry, or two entries with no clear owner, as a memory file
|
|
22
22
|
- Apply the save threshold, firing feedback only on an explicit correction or a pattern that repeated twice
|
|
23
23
|
- Grep the folder for an existing file on the topic and update it in place rather than adding a second
|