@erclx/canon 5.20.0 → 5.22.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/draft-mark.md +8 -6
- package/claude/skills/auto-ship/references/verb-absent.md +1 -1
- package/claude/skills/docs-sync/REQUIREMENT.md +1 -1
- package/claude/skills/document-health/REQUIREMENT.md +1 -1
- package/claude/skills/draft-doc/REQUIREMENT.md +45 -0
- package/claude/skills/draft-doc/SKILL.md +77 -0
- package/claude/skills/draft-doc/references/context.md +31 -0
- package/claude/skills/draft-doc/references/docs.md +33 -0
- package/claude/skills/draft-doc/references/readme.md +58 -0
- package/claude/skills/draft-doc/references/wiki.md +53 -0
- package/claude/skills/draft-doc/references/wireframes.md +48 -0
- package/claude/skills/draft-figure/REQUIREMENT.md +1 -1
- package/claude/skills/draft-figure/SKILL.md +1 -1
- package/claude/skills/draft-ready/REQUIREMENT.md +2 -1
- package/claude/skills/draft-ready/SKILL.md +6 -4
- package/claude/skills/git-pr/SKILL.md +5 -46
- package/claude/skills/git-pr/references/final-command.md +75 -0
- package/claude/skills/git-pr/references/labels.md +2 -2
- package/claude/skills/markdown-propose/REQUIREMENT.md +3 -3
- package/claude/skills/markdown-propose/SKILL.md +1 -1
- package/claude/skills/role-orchestrator/references/orchestrator-cloud-launch.md +76 -0
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +11 -1
- package/claude/skills/role-orchestrator/references/orchestrator-launch.md +5 -1
- package/claude/skills/search-craft/REQUIREMENT.md +4 -4
- package/claude/skills/search-craft/SKILL.md +1 -1
- package/docs/agents/commands.md +1 -0
- package/docs/agents/drift-surfaces.md +20 -9
- package/docs/agents/index.md +2 -1
- package/docs/agents/install-and-sync.md +3 -3
- package/docs/agents/markdown-audit.md +1 -3
- package/docs/agents/migrate.md +1 -1
- package/docs/agents/rule-citations.md +1 -1
- package/docs/agents/slides.md +164 -0
- package/docs/agents/tasks-validate.md +1 -1
- package/docs/agents/tasks.md +2 -2
- package/docs/target/migrations.md +4 -2
- package/docs/target/sync.md +1 -1
- package/docs/workflow/ai-workflow.md +1 -1
- package/docs/workflow/skill-map.md +25 -31
- package/governance/rules/canon/604-scratch.md +0 -1
- package/governance/rules/claude/575-hooks.md +1 -2
- package/governance/rules/claude/576-settings.md +1 -2
- package/governance/rules/lib/330-testing-py.md +1 -1
- package/governance/rules/lib/336-testing-php.md +1 -1
- package/governance/rules/standards/architecture.md +0 -1
- package/governance/rules/standards/context.md +0 -1
- package/governance/rules/standards/design.md +0 -1
- package/governance/rules/standards/diagrams.md +0 -3
- package/governance/rules/standards/requirements.md +0 -1
- package/governance/rules/standards/wireframes.md +0 -1
- package/package.json +1 -1
- package/scripts/manage-sandbox.sh +7 -8
- package/src/claude/cases/authoring.ts +5 -5
- package/src/claude/cases/workflow.ts +4 -20
- package/src/commands/slides.ts +23 -3
- package/src/commands/sync.ts +10 -0
- package/src/commands/tasks.ts +46 -2
- package/src/gov/citations.ts +1 -2
- package/src/migrate/skill-names.ts +12 -7
- package/src/slides/convert/chart.ts +165 -0
- package/src/slides/convert/deck.ts +244 -0
- package/src/slides/convert/export.ts +281 -23
- package/src/slides/convert/master.ts +195 -0
- package/src/slides/convert/shapes.ts +44 -4
- package/src/slides/convert/walk.ts +229 -2
- package/src/slides/package/fonts.ts +297 -0
- package/src/slides/package/motion.ts +316 -0
- package/src/slides/package/test-face.ts +113 -0
- package/src/sync/check.ts +9 -0
- package/src/sync/layout.ts +27 -1
- package/src/tasks/record.ts +11 -1
- package/src/tasks/validate.ts +14 -0
- package/standards/architecture.md +0 -1
- package/standards/context.md +0 -1
- package/standards/design.md +0 -1
- package/standards/diagrams.md +0 -3
- package/standards/requirements.md +0 -1
- package/standards/rule.md +1 -0
- package/standards/tasks.md +1 -1
- package/standards/wireframes.md +0 -1
- package/tooling/astro/configs/card-src/pages/og-card.astro +2 -2
- package/tooling/claude/seeds/.claude/hooks/pr-create-log.sh +8 -3
- package/claude/skills/docs-fold/REQUIREMENT.md +0 -25
- package/claude/skills/docs-fold/SKILL.md +0 -9
- package/claude/skills/draft-context/REQUIREMENT.md +0 -37
- package/claude/skills/draft-context/SKILL.md +0 -61
- package/claude/skills/draft-docs/REQUIREMENT.md +0 -35
- package/claude/skills/draft-docs/SKILL.md +0 -59
- package/claude/skills/draft-readme/REQUIREMENT.md +0 -38
- package/claude/skills/draft-readme/SKILL.md +0 -73
- package/claude/skills/draft-wiki/REQUIREMENT.md +0 -42
- package/claude/skills/draft-wiki/SKILL.md +0 -83
- package/claude/skills/draft-wireframes/REQUIREMENT.md +0 -38
- package/claude/skills/draft-wireframes/SKILL.md +0 -69
- package/claude/skills/standards-audit/REQUIREMENT.md +0 -33
- package/claude/skills/standards-audit/SKILL.md +0 -99
|
@@ -19,15 +19,20 @@ IFS= read -r -d '' -t 2 input
|
|
|
19
19
|
exit 1
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
# Two shapes open a pull request. `gh pr create` names itself in the command.
|
|
23
|
+
# git-pr opens one over REST and prints `opened=true` only on that path, since
|
|
24
|
+
# its edit path prints a URL as well and is not an opening.
|
|
22
25
|
command=$(printf '%s' "$input" | jq -r '.tool_input.command // empty')
|
|
26
|
+
stdout=$(printf '%s' "$input" | jq -r '.tool_response.stdout // empty')
|
|
23
27
|
case "$command" in
|
|
24
28
|
*"gh pr create"*) ;;
|
|
25
|
-
*)
|
|
29
|
+
*)
|
|
30
|
+
printf '%s\n' "$stdout" | grep -qx 'opened=true' || exit 0
|
|
31
|
+
;;
|
|
26
32
|
esac
|
|
27
33
|
|
|
28
|
-
#
|
|
34
|
+
# Either shape prints the new pull request's URL to stdout on success, so
|
|
29
35
|
# matching it is what tells a creation apart from a failed or refused call.
|
|
30
|
-
stdout=$(printf '%s' "$input" | jq -r '.tool_response.stdout // empty')
|
|
31
36
|
url=$(printf '%s' "$stdout" | grep -Eo 'https://github\.com/[^[:space:]]+/pull/[0-9]+' | tail -1)
|
|
32
37
|
[ -n "$url" ] || exit 0
|
|
33
38
|
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: docs-fold
|
|
3
|
-
description: Why a pointer answers under the fold skill's old name, and the test that retires it
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Docs fold requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a person typing the old name after the rename to `context-fold` meets an unknown command with nothing naming where the skill went. A target that has not run `canon migrate skill-names` still holds files telling someone to type it, and a live gitignored record written before the rename still names it, since the sweep reads the tracked listing only.
|
|
11
|
-
|
|
12
|
-
## Must
|
|
13
|
-
|
|
14
|
-
- Name `context-fold` as the skill to run, so a typed invocation of the old name reaches the new one in one step
|
|
15
|
-
- Carry `disable-model-invocation: true`, so routing never matches the old description against a request the new skill owns
|
|
16
|
-
|
|
17
|
-
## Must not
|
|
18
|
-
|
|
19
|
-
- Carry any part of the fold procedure, which would give one behavior two bodies that drift apart
|
|
20
|
-
- Retire on a release number. Retire it when `canon migrate skill-names --json` reports zero citations in every target the rollout reaches and no live `.canon/` record names the old name, since a release number retires it on a date nothing measured.
|
|
21
|
-
|
|
22
|
-
## Out of scope
|
|
23
|
-
|
|
24
|
-
- The fold itself, which `context-fold` owns
|
|
25
|
-
- Rewriting a stale citation, which `canon migrate skill-names` owns in a tracked file and the controlling session owns on the board
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: docs-fold
|
|
3
|
-
description: Renamed to `context-fold`. Answers a typed invocation of the old name by pointing at the new one.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Docs fold
|
|
8
|
-
|
|
9
|
-
This skill is now `context-fold`. Run `/canon:context-fold` instead, and change any file that still names this one.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: draft-context
|
|
3
|
-
description: Why a brand-new canon/context/<domain>.md entry needs a catalog collision check and a confirm step, not the refresh path context-fold already owns
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Context draft requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a session documenting a domain that has no context entry yet either invents a shape from memory or reaches for the refresh mechanism, which reads an existing entry and a diff and has neither to work from for a domain that never had one. Either way the entry ships with no read of `standards/context.md` and no check against the catalog for a sibling already covering the same ground under a different name.
|
|
11
|
-
|
|
12
|
-
## Must
|
|
13
|
-
|
|
14
|
-
- Read `standards/context.md` before drafting, since the frontmatter contract and the three-question test are what make the entry arguable against a sibling
|
|
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
|
-
- 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
|
-
- 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 `canon/context/` after writing, so the catalog picks up the new domain immediately rather than drifting until the next unrelated regen
|
|
19
|
-
|
|
20
|
-
## Must not
|
|
21
|
-
|
|
22
|
-
- Refresh or rewrite an existing entry. A domain already covered refuses toward the refresh mechanism.
|
|
23
|
-
- Hand-edit `canon/context/index.md`. It regenerates from sibling frontmatter, and a hand edit is overwritten on the next regen.
|
|
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
|
-
|
|
26
|
-
## Guards
|
|
27
|
-
|
|
28
|
-
- No domain given: stop and ask what domain the entry should cover.
|
|
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
|
-
- 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
|
-
|
|
32
|
-
## Out of scope
|
|
33
|
-
|
|
34
|
-
- Refreshing an existing `canon/context/<domain>.md` entry against a diff: `context-fold`
|
|
35
|
-
- Drafting a `canon/wireframes/<surface>.md` file: `draft-wireframes`
|
|
36
|
-
- Drafting a `docs/*.md` page: `draft-docs`
|
|
37
|
-
- Drafting a standard or a governance rule: `create-standard`, `create-rule`
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: draft-context
|
|
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 `context-fold`.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Context draft
|
|
7
|
-
|
|
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.
|
|
11
|
-
|
|
12
|
-
Read these files in parallel:
|
|
13
|
-
|
|
14
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/context.md`: the three questions an entry must answer, its frontmatter, required and expected sections, and what stays out of it
|
|
15
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/markdown.md`: punctuation and formatting for all generated text
|
|
16
|
-
- The `write-human` skill: voice, rhythm, and sentence construction for all generated text
|
|
17
|
-
|
|
18
|
-
## Guards
|
|
19
|
-
|
|
20
|
-
- If no domain is given, stop: `❌ No domain given. Name the domain this entry should cover.`
|
|
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 context-fold to refresh it instead.`
|
|
22
|
-
|
|
23
|
-
## Placement
|
|
24
|
-
|
|
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.
|
|
26
|
-
- Stop the same way on a match: `❌ <path> already covers this domain under a different name. Use context-fold to refresh it instead.`
|
|
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.
|
|
28
|
-
|
|
29
|
-
## Draft
|
|
30
|
-
|
|
31
|
-
- Read the domain's own folders and files well enough to answer the standard's three questions: where things live, why they are that way, and how to add one more of what the domain holds.
|
|
32
|
-
- Draft `title` and `description` frontmatter, then `## Overview`, `## Layout` (folder ownership lines only, never a file-by-file list), and `## Decisions` or `## Gotchas` wherever the domain's history supplies a non-obvious choice or a workaround worth preserving. Omit an expected section with nothing to put in it rather than padding it.
|
|
33
|
-
- Draft against `${CLAUDE_SKILL_DIR}/../../standards/context.md`'s template and ordering: `Overview`, `Layout`, `Decisions`, `Gotchas`, then anything else.
|
|
34
|
-
|
|
35
|
-
## Confirm
|
|
36
|
-
|
|
37
|
-
- Show the resolved path and the full drafted content before writing.
|
|
38
|
-
- Confirm both with the user. This skill waits for that answer rather than treating the tool permission dialog as the gate, since placement here is a judgment call with no diff to preview it against.
|
|
39
|
-
|
|
40
|
-
## Write
|
|
41
|
-
|
|
42
|
-
- Write the file at the confirmed path, creating the folder when it is absent.
|
|
43
|
-
- Run `canon markdown audit <path>`.
|
|
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.
|
|
45
|
-
|
|
46
|
-
## Response format
|
|
47
|
-
|
|
48
|
-
### Preview
|
|
49
|
-
|
|
50
|
-
**Domain:** `<domain>`
|
|
51
|
-
**Placement:** `<path>`
|
|
52
|
-
|
|
53
|
-
```markdown
|
|
54
|
-
<drafted frontmatter and body>
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### After confirmation
|
|
58
|
-
|
|
59
|
-
```plaintext
|
|
60
|
-
✅ Drafted: <path>
|
|
61
|
-
```
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: draft-docs
|
|
3
|
-
description: Why a brand-new docs/*.md page needs a placement decision and a confirm step, not the rewrite path docs-sync already owns
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Docs draft requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a session drafting documentation for a surface that has no page yet either invents structure 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. Either way the page ships with no read of `standards/docs.md` and no catalog placement decided against the folder's actual shelves.
|
|
11
|
-
|
|
12
|
-
## Must
|
|
13
|
-
|
|
14
|
-
- Read `standards/docs.md` before drafting, since the frontmatter contract and the four reader questions are what make the page arguable against a sibling
|
|
15
|
-
- Decide placement from the existing catalog rather than guessing a folder, reusing a `category` value verbatim when one fits and defaulting to the `docs/` root when none does
|
|
16
|
-
- 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
|
|
17
|
-
- Run `canon indexes regen` on the containing folder after writing, so the folder's `index.md` picks up the new page immediately rather than drifting until the next unrelated regen
|
|
18
|
-
|
|
19
|
-
## Must not
|
|
20
|
-
|
|
21
|
-
- Rewrite an existing page. A topic already covered by a page refuses toward `docs-sync`.
|
|
22
|
-
- Hand-edit an `index.md`. It regenerates from sibling frontmatter, and a hand edit is overwritten on the next regen.
|
|
23
|
-
- Build a hand-drawn diagram-and-capture authoring loop. `standards/docs.md`'s Mermaid-fence permission is the only path to a diagram this skill takes.
|
|
24
|
-
|
|
25
|
-
## Guards
|
|
26
|
-
|
|
27
|
-
- No topic given: stop and ask what surface the page should cover.
|
|
28
|
-
- The derived slug already resolves through `canon docs <slug>`: stop and point at `docs-sync` instead. This catches an exact-name collision only.
|
|
29
|
-
- A page in the catalog already covers the topic under a different name: stop the same way, checked against the titles and descriptions Placement already reads.
|
|
30
|
-
|
|
31
|
-
## Out of scope
|
|
32
|
-
|
|
33
|
-
- Rewriting or syncing an existing `docs/*.md` section against a diff since main: `docs-sync`
|
|
34
|
-
- The context entries, requirements, architecture, wireframes, and task board: `context-fold`
|
|
35
|
-
- Drafting a standard or a governance rule: `create-standard`, `create-rule`
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: draft-docs
|
|
3
|
-
description: Drafts a brand-new `docs/*.md` page against the docs standard, decides its placement in the existing catalog, confirms with the user, then writes. Use when asked to "add a docs page for X", "write a new doc for X", "document X under docs/", or "create a docs page for X" where no existing page covers the topic. Do NOT use to rewrite or sync an existing `docs/*.md` section against a diff, which is `docs-sync`.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Docs draft
|
|
7
|
-
|
|
8
|
-
Drafts one brand-new `docs/*.md` page end to end: read the standard, decide where the page belongs in the existing catalog, confirm the draft with the user, then write.
|
|
9
|
-
|
|
10
|
-
Read these files in parallel:
|
|
11
|
-
|
|
12
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/docs.md`: the reader a page serves, its frontmatter, structure, and what it links out to rather than restates
|
|
13
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/markdown.md`: punctuation and formatting for all generated text
|
|
14
|
-
- The `write-human` skill: voice, rhythm, and sentence construction for all generated text
|
|
15
|
-
|
|
16
|
-
## Guards
|
|
17
|
-
|
|
18
|
-
- If no topic is given, stop: `❌ No topic given. Name the surface this page should cover.`
|
|
19
|
-
- Derive a kebab-case slug from the topic and run `canon docs <slug>`. A resolved page means the topic is already covered under that exact name. Stop: `❌ <slug> already resolves to an existing page. Run canon:docs-sync instead.` This is a name match rather than a topic match. Placement below checks the wider case.
|
|
20
|
-
|
|
21
|
-
## Placement
|
|
22
|
-
|
|
23
|
-
- Read `docs/index.md` and its sub-catalogs for the closest existing `category`. <!-- canon-allow-reference: illustrates the target project's own docs/ tree, not a citation of this repository's own corpus -->
|
|
24
|
-
- Check every page title and description this read surfaces against the topic. The Guards check above only catches an exact-slug collision, and a page already covering the same subject under a different slug still resolves here at no extra cost, since this read already runs. Stop the same way on a match: `❌ <path> already covers this topic under a different name. Run canon:docs-sync instead.`
|
|
25
|
-
- Reuse a matching `category` value verbatim. A near-miss spelling opens a second shelf holding one page, per the docs standard.
|
|
26
|
-
- Default to the `docs/` root with no `category` when nothing fits. A subfolder earns itself only once a shelf of pages already sits there, per the standard's splitting rule.
|
|
27
|
-
|
|
28
|
-
## Draft
|
|
29
|
-
|
|
30
|
-
- Draft `title`, `description`, and `category` (where one applies), then the page body, against `${CLAUDE_SKILL_DIR}/../../standards/docs.md`.
|
|
31
|
-
- Write for a reader with no source open. The standard's four questions are the test: what the surface is, what to run or write, what it refuses, and where to go for the adjacent surface.
|
|
32
|
-
|
|
33
|
-
## Confirm
|
|
34
|
-
|
|
35
|
-
- Show the resolved path and the full drafted content before writing.
|
|
36
|
-
- Confirm both with the user. This skill waits for that answer rather than treating the tool permission dialog as the gate, since placement here is a judgment call with no diff to preview it against.
|
|
37
|
-
|
|
38
|
-
## Write
|
|
39
|
-
|
|
40
|
-
- Write the file at the confirmed path, creating the folder when it is absent.
|
|
41
|
-
- Run `canon markdown audit <path>`.
|
|
42
|
-
- Run `canon indexes regen <folder>` on the containing folder, so its `index.md` picks up the new page.
|
|
43
|
-
|
|
44
|
-
## Response format
|
|
45
|
-
|
|
46
|
-
### Preview
|
|
47
|
-
|
|
48
|
-
**Topic:** `<topic>`
|
|
49
|
-
**Placement:** `<path>` (category: `<category-or-root>`)
|
|
50
|
-
|
|
51
|
-
```markdown
|
|
52
|
-
<drafted frontmatter and body>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### After confirmation
|
|
56
|
-
|
|
57
|
-
```plaintext
|
|
58
|
-
✅ Drafted: <path>
|
|
59
|
-
```
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: draft-readme
|
|
3
|
-
description: Why a README needs a project-type read and a confirm step, not the rewrite path docs-sync already owns
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Readme draft requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
14
|
-
## Must
|
|
15
|
-
|
|
16
|
-
- Read `standards/readme.md` before drafting, since its `## Voice` section is scoped to a repository-root README and yields to `write-human`'s reference voice everywhere else
|
|
17
|
-
- Detect every project type the standard's `## Content` list applies to, from the manifest and the tree, rather than drafting against the closest single type
|
|
18
|
-
- Treat an existing README with no H1, or with headings that name only the scaffold that wrote it, as unedited generator output to draft over rather than a page to sync section by section
|
|
19
|
-
- Read the header block's slots off the repository, being the mark, the claim, the live link, and the product screenshot, and skip the link and the screenshot for a project with no page, so every element traces to a file or field the project holds
|
|
20
|
-
- Verify a candidate badge by the value it would render rather than by a fetch's status code, since a badge service answers 200 for a query it cannot satisfy
|
|
21
|
-
- Confirm the resolved path, the detected types, the badge candidates, and the full content with the user before writing, since project-type detection and badge selection are judgment calls with no diff to preview them against
|
|
22
|
-
|
|
23
|
-
## Must not
|
|
24
|
-
|
|
25
|
-
- Rewrite an authored README. One carrying an H1 that names the project refuses toward `docs-sync`.
|
|
26
|
-
- Offer to overwrite an authored README on the refusal path, or propose conforming it to what this skill would have drafted. A target project's own citations into its README are invisible from here, so the refusal reports rather than proposes.
|
|
27
|
-
- Invent a screenshot or a mark the project does not hold, or write a placeholder path for one. An omitted slot is a correct page and an invented image is the failure.
|
|
28
|
-
- 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.
|
|
29
|
-
|
|
30
|
-
## Guards
|
|
31
|
-
|
|
32
|
-
- The target already exists and is authored, carrying an H1 that names the project: stop and point at `docs-sync` instead.
|
|
33
|
-
|
|
34
|
-
## Out of scope
|
|
35
|
-
|
|
36
|
-
- Rewriting or syncing an existing authored `README.md` against a diff since main: `docs-sync`
|
|
37
|
-
- The consumer-facing reference under `docs/`: `draft-docs`
|
|
38
|
-
- Product scope and goals, and every other surface `standards/readme.md` already scopes out of its own governance
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: draft-readme
|
|
3
|
-
description: Drafts a project's README.md against the readme standard, detecting project type and badge candidates, and confirming with the user before write. Use when asked to "write a README", "draft a README for this project", "add a README", or "create a README.md" where none exists yet or the existing one is unedited scaffold output. Do NOT use to rewrite or resync an existing authored README against a diff, which is `docs-sync`.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Readme draft
|
|
7
|
-
|
|
8
|
-
Drafts a project's `README.md` end to end: read the standard, detect the project's shape, confirm the draft with the user, then write.
|
|
9
|
-
|
|
10
|
-
Read these files in parallel:
|
|
11
|
-
|
|
12
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/readme.md`: voice, structure, required and optional sections, badge selection, and what to link out to rather than carry. Voice is claimed here for a repository-root README, and `write-human` yields it there while keeping rhythm, density, and the machine-tell catalog everywhere, root README included.
|
|
13
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/markdown.md`: punctuation and formatting for all generated text
|
|
14
|
-
- The `write-human` skill: rhythm, density, and sentence construction for all generated text
|
|
15
|
-
|
|
16
|
-
## Guards
|
|
17
|
-
|
|
18
|
-
- Default the target to `README.md` at the repository root when no path is given. A caller naming a path under a folder, a harness, or an internal tool is drafting a nested README instead, which keeps the reference voice per the standard's `## Voice` section rather than the root voice below.
|
|
19
|
-
- Read the target if it exists.
|
|
20
|
-
- It carries an H1 naming the project: it is authored. Stop: `❌ <path> already exists and covers the project. Run canon:docs-sync instead.`
|
|
21
|
-
- It carries no H1, or its only headings restate the tool that scaffolded it rather than the project: it is unedited generator output. Continue, drafting over it rather than syncing its sections.
|
|
22
|
-
- It does not exist: continue.
|
|
23
|
-
- A hand-authored README opening with a badge block, or a title in some other form the H1 test misses, falls into the no-H1 branch the same as a scaffold page. The Confirm step below is what catches that case before the write happens, so treat it as load-bearing rather than a courtesy: never skip it on the reasoning that the guard already decided.
|
|
24
|
-
|
|
25
|
-
## Detect
|
|
26
|
-
|
|
27
|
-
- Read the project's manifest (`package.json`, `pyproject.toml`, `Cargo.toml`, or equivalent) for a `bin` field or CLI entry point, an installable package name, and its declared dependencies.
|
|
28
|
-
- Check for a `claude/skills/` or `.claude/skills/` folder, a `plugin.json`, or a marketplace manifest, each naming an agent-facing or marketplace-distributed surface.
|
|
29
|
-
- A project is often several of these at once. Note every type that applies rather than stopping at the first match, since the Draft step covers each one the project actually is.
|
|
30
|
-
- Check for a page. A dependency on a site framework or a site config file in the manifest or the tree marks a project as having one. Read a live URL separately, from a `homepage` field or a deploy config, since a project can have a page and no known URL.
|
|
31
|
-
- A monorepo can carry a page in one package and a CLI in another, so both signals may fire. Report each rather than picking one.
|
|
32
|
-
- Look for the mark and the screenshot among images the project already commits: scan the existing README for image references, then the asset and public folders.
|
|
33
|
-
|
|
34
|
-
## Draft
|
|
35
|
-
|
|
36
|
-
- Draft the page against `${CLAUDE_SKILL_DIR}/../../standards/readme.md`: H1, a 2-3 sentence description in plain text, then the required sections, then whichever optional sections and per-type content the Detect step found.
|
|
37
|
-
- Open the page with the standard's header block, filling each slot from what Detect found: mark, title, badges, a one-line claim from the manifest description, the live link, then the product screenshot.
|
|
38
|
-
- Fill the screenshot slot only with an image the project already commits, referenced with alt text naming what it depicts. This skill cannot capture one. Omit the slot when no such image exists and say so in the preview. Never write a placeholder path.
|
|
39
|
-
- Omit the link and the screenshot for a project with no page, and the mark for a project with none, without a note in the drafted page. A project with a page and no known URL gets the screenshot slot, and the Confirm step asks for the link.
|
|
40
|
-
- Cover every applicable project type from the standard's `## Content` list rather than picking the closest one.
|
|
41
|
-
- Candidate badges: check for a published package (a registry field in the manifest), a CI workflow, and a `LICENSE` file.
|
|
42
|
-
- State each candidate's rendered value in the preview rather than trusting a fetch's status code, since a badge service answers 200 for a query it cannot satisfy.
|
|
43
|
-
- Pin a status badge to the branch the standard names and confirm the workflow actually triggers on that branch before offering it. Zero badges is a correct answer when nothing passes the test.
|
|
44
|
-
|
|
45
|
-
## Confirm
|
|
46
|
-
|
|
47
|
-
- Show the resolved path, the detected project types, the header slots filled or skipped with the reason for each, the badge candidates and what backs each one, and the full drafted content before writing.
|
|
48
|
-
- The skill can confirm that an image file exists and is referenced, and it cannot verify the picture shows the product. Ask the user to look at it in the preview.
|
|
49
|
-
- Confirm with the user. This skill waits for that answer rather than treating the tool permission dialog as the gate, since project-type detection and badge selection are judgment calls with no diff to preview them against.
|
|
50
|
-
|
|
51
|
-
## Write
|
|
52
|
-
|
|
53
|
-
- Write the file at the confirmed path, creating the folder when it is absent.
|
|
54
|
-
- Run `canon markdown audit <path>`.
|
|
55
|
-
|
|
56
|
-
## Response format
|
|
57
|
-
|
|
58
|
-
### Preview
|
|
59
|
-
|
|
60
|
-
**Target:** `<path>` (root | nested)
|
|
61
|
-
**Detected:** `<project types>`
|
|
62
|
-
**Header:** `<each slot as filled (source) or skipped (reason)>`
|
|
63
|
-
**Badges:** `<candidates, or none>`
|
|
64
|
-
|
|
65
|
-
```markdown
|
|
66
|
-
<drafted H1 and body>
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### After confirmation
|
|
70
|
-
|
|
71
|
-
```plaintext
|
|
72
|
-
✅ Drafted: <path>
|
|
73
|
-
```
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: draft-wiki
|
|
3
|
-
description: Why a brand-new wiki reference page needs both placement tests, a catalog collision check, and a sourced read before anything is written
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Wiki draft requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a session asked for a wiki page writes one from training knowledge, which is the single thing the wiki standard forbids outright, and nothing in the resulting file shows that it happened. It also files the page by where the request came from rather than by who owns the subject, so material about the project itself lands in the wiki and material about a third-party tool acquires a folder the standard never sanctioned.
|
|
11
|
-
|
|
12
|
-
The standard can state all of this and still be read by nothing, which is the condition this skill was written into in the toolkit. A page written under that condition conforms by the author's memory rather than by a read, and it ships looking identical to one that was checked.
|
|
13
|
-
|
|
14
|
-
## Must
|
|
15
|
-
|
|
16
|
-
- Read the wiki standard before drafting, since the placement tests and the sourcing rule are the two things a session gets wrong from memory
|
|
17
|
-
- Run both placement tests and refuse on either, since a page passing one and failing the other is still non-conforming
|
|
18
|
-
- Check the subject against the catalog by title and description, not by slug alone, since a subject can be covered under a name the slug does not guess
|
|
19
|
-
- Build the draft on a fetched read and stop when the fetch fails, since a page written from recall is indistinguishable from a checked one once it ships
|
|
20
|
-
- Confirm the path, the source, and the content with the user before writing, since the standard forbids writing a wiki file unasked
|
|
21
|
-
- Name the folder by resolving what the standard states rather than by carrying a path in the body, since the body ships to projects whose layout this repository does not set
|
|
22
|
-
|
|
23
|
-
## Must not
|
|
24
|
-
|
|
25
|
-
- Widen the folder split to admit a subject the second placement test rejects. That is a change to the standard, argued there.
|
|
26
|
-
- Edit or refresh a page that already exists. A collision refuses toward editing the existing page rather than drafting a second one.
|
|
27
|
-
- Substitute recall for a failed fetch, even for a subject the session believes it knows.
|
|
28
|
-
|
|
29
|
-
## Guards
|
|
30
|
-
|
|
31
|
-
- No subject given: stop and ask what subject the page should cover.
|
|
32
|
-
- The wiki root does not resolve: say so and ask before creating it, since a project holding no wiki has never taken the placement rule.
|
|
33
|
-
- The slug already resolves to a page: stop and point at editing that page.
|
|
34
|
-
- The catalog already covers the subject under a different name: stop the same way, checked against the titles and descriptions the Collision step already reads.
|
|
35
|
-
|
|
36
|
-
## Out of scope
|
|
37
|
-
|
|
38
|
-
- Editing or refreshing a wiki page that already exists: a plain edit against the same standard
|
|
39
|
-
- Drafting a `docs/*.md` page: `draft-docs`
|
|
40
|
-
- Drafting a `canon/context/<domain>.md` entry: `draft-context`
|
|
41
|
-
- Voice, rhythm, and sentence construction in the drafted page: the `write-human` skill
|
|
42
|
-
- Punctuation, headings, and word choice in the drafted page: the markdown standard
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: draft-wiki
|
|
3
|
-
description: Drafts a brand-new wiki reference page for a subject owned outside this repository, against the wiki standard. Checks the two placement tests and the catalog for a collision, sources the subject from its owner rather than from training knowledge, confirms with the user, then writes. Use when asked to "write a wiki page for X", "add a wiki reference for X", "document X in the wiki", or "create a reference page for X" where no page covers the subject yet. Do NOT use to edit or refresh a page that already exists, which is a plain edit against the same standard. Do NOT use for a subject this repository owns, which is `draft-docs` or `draft-context`.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Wiki draft
|
|
7
|
-
|
|
8
|
-
Drafts one brand-new wiki reference page end to end: read the standard, settle placement, check the catalog for a collision, source the subject from its owner, confirm the draft with the user, then write.
|
|
9
|
-
|
|
10
|
-
Read these files in parallel:
|
|
11
|
-
|
|
12
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/wiki.md`: the two placement tests, the frontmatter contract, the naming convention, the sourcing rule, and the page template
|
|
13
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/markdown.md`: punctuation and formatting for all generated text
|
|
14
|
-
- The `write-human` skill: voice, rhythm, and sentence construction for all generated text
|
|
15
|
-
|
|
16
|
-
The standard's `## Placement` section names the folder a page lands in and the vendor subfolder under it. Resolve both from the project root and call them `<wiki-root>` and `<vendor>` below, so the body states the rule once and the standard stays the one owner of the path.
|
|
17
|
-
|
|
18
|
-
## Guards
|
|
19
|
-
|
|
20
|
-
- If no subject is given, stop: `❌ No subject given. Name the subject this page should cover.`
|
|
21
|
-
- If `<wiki-root>` does not resolve, say so and ask whether to create it before drafting. A project carrying no such folder has never taken the standard's placement rule, so creating it is a decision rather than a step.
|
|
22
|
-
|
|
23
|
-
## Placement
|
|
24
|
-
|
|
25
|
-
The standard sets two tests and a page has to pass both. Run them before drafting anything, since a page failing either is non-conforming however well it is written.
|
|
26
|
-
|
|
27
|
-
- **Owned outside this repository.** A subject describing how this repository works fails. Refuse and route it: `❌ <subject> is owned by this project, so it belongs in the docs surface, a context entry, or a skill body. Use draft-docs or draft-context.`
|
|
28
|
-
- **Owned by the vendor the folder split covers.** The standard names one owner and one subfolder. A third-party tool or a vendor-neutral concept fails, however reference-like it reads. Refuse and route it: `❌ <subject> is outside the wiki's folder split. Route it to the docs surface or a skill body rather than adding a second folder for it.`
|
|
29
|
-
|
|
30
|
-
Do not widen the split to admit a subject. Adding a sibling folder is a change to the standard, argued there, rather than a placement this skill takes on its own.
|
|
31
|
-
|
|
32
|
-
## Collision
|
|
33
|
-
|
|
34
|
-
- Derive the page slug per the standard's `## Naming` section and check whether `<wiki-root>/<vendor>/<slug>.md` already exists. If it does, stop: `❌ <path> already covers this subject. Edit that page against the standard instead of drafting a second one.`
|
|
35
|
-
- Read `<wiki-root>/<vendor>/index.md` and check every title and description it lists against the subject. The slug check above only catches an exact filename collision, and a subject already covered under a different name still resolves here at no extra cost, since this read already runs.
|
|
36
|
-
- Stop the same way on a match: `❌ <path> already covers this subject under a different name. Edit that page instead.`
|
|
37
|
-
|
|
38
|
-
## Source
|
|
39
|
-
|
|
40
|
-
The standard forbids working from training knowledge, so the draft is built on a read rather than on recall.
|
|
41
|
-
|
|
42
|
-
- Fetch current information through the `claude-code-guide` agent for any subject that agent covers. Its answer is the source the page is written from.
|
|
43
|
-
- Reach a subject the agent does not cover through the owner's own published documentation. Invoke `canon:search-craft` with the skill tool before searching for it, since finding the owner's documentation is the field-and-authority step that skill carries, and report it rather than proceeding silently when the skill does not resolve.
|
|
44
|
-
- Say the fetch failed and stop rather than substituting recall. A page sourced from memory is the failure the rule exists to prevent, and it ships looking identical to one that was checked.
|
|
45
|
-
- Close the intro with the `Source:` sentence the standard requires, linking the canonical page where one exists and naming the owner alone where the subject has no single URL.
|
|
46
|
-
- Stamp the read date on a source revised without notice, as `read <date>`. A claim traced to an undated read cannot be checked against what was actually read.
|
|
47
|
-
|
|
48
|
-
## Draft
|
|
49
|
-
|
|
50
|
-
- Draft `title` and `description` frontmatter against the standard's contract, then the intro paragraph closing on `Source:`, then the reference sections.
|
|
51
|
-
- Draft against the standard's template and keep its ordering.
|
|
52
|
-
- Write what the fetch returned rather than what the subject is assumed to do.
|
|
53
|
-
- Answer one question per section and stop. A reader arrives to settle something specific rather than to read the page through.
|
|
54
|
-
- Mark a claim the fetch left unsettled rather than smoothing over it. An unmarked gap reads as a checked fact.
|
|
55
|
-
|
|
56
|
-
## Confirm
|
|
57
|
-
|
|
58
|
-
- Show the resolved path, the source the page was built from, and the full drafted content before writing.
|
|
59
|
-
- Confirm all three with the user. This skill waits for that answer rather than treating the tool permission dialog as the gate, since the standard states outright that a wiki file is not written unasked.
|
|
60
|
-
|
|
61
|
-
## Write
|
|
62
|
-
|
|
63
|
-
- Write the file at the confirmed path.
|
|
64
|
-
- Run `canon markdown audit <path>`.
|
|
65
|
-
- Run `canon indexes regen <wiki-root>/<vendor>`, naming the folder the page landed in rather than the root above it. The verb rewrites the `index.md` sitting in the folder it is given and does not walk down, so regenerating at the root leaves the vendor catalog untouched and the new page missing from the one the Collision step reads. A page absent there is invisible to the next run, which then drafts a second page on the same subject.
|
|
66
|
-
|
|
67
|
-
## Response format
|
|
68
|
-
|
|
69
|
-
### Preview
|
|
70
|
-
|
|
71
|
-
**Subject:** `<subject>`
|
|
72
|
-
**Placement:** `<path>`
|
|
73
|
-
**Source:** `<owner, and the read it came from>`
|
|
74
|
-
|
|
75
|
-
```markdown
|
|
76
|
-
<drafted frontmatter and body>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### After confirmation
|
|
80
|
-
|
|
81
|
-
```plaintext
|
|
82
|
-
✅ Drafted: <path>
|
|
83
|
-
```
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: draft-wireframes
|
|
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
|
-
---
|
|
5
|
-
|
|
6
|
-
# Wireframe draft requirement
|
|
7
|
-
|
|
8
|
-
## Gap
|
|
9
|
-
|
|
10
|
-
Without this skill, a session drafting a wireframe for a surface with no file yet either invents an ASCII layout from memory with no read of `standards/wireframes.md`, or waits on the wireframe-sweep, which only fires against a diff and only ever writes a bare `TODO` stub rather than a real layout, copy, and behavior draft. Neither path checks whether a visual-design tier above ASCII is already in play for the project before drafting the tier-0 file.
|
|
11
|
-
|
|
12
|
-
## Must
|
|
13
|
-
|
|
14
|
-
- Read `standards/wireframes.md` before drafting, since the frontmatter contract, the regions list, the states table, the exclusions section, and the Transcription-wireframes branch are what make the file arguable against a sibling
|
|
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
|
-
- Draft in transcription mode, citing the real source, when the surface names an already-built component. Draft in role-intent mode otherwise.
|
|
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 `canon/wireframes/` after writing, so the catalog picks up the new surface immediately rather than drifting until the next unrelated regen
|
|
20
|
-
|
|
21
|
-
## Must not
|
|
22
|
-
|
|
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 `canon/wireframes/index.md`. It regenerates from sibling frontmatter, and a hand edit is overwritten on the next regen.
|
|
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
|
-
|
|
27
|
-
## Guards
|
|
28
|
-
|
|
29
|
-
- No surface given: stop and ask what surface the wireframe should cover.
|
|
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
|
-
|
|
32
|
-
## Out of scope
|
|
33
|
-
|
|
34
|
-
- Stubbing a surface a diff touched, or reporting drift in an existing wireframe against a diff: `claude/skills/context-fold/references/wireframe-sweep.md`
|
|
35
|
-
- Drafting a `canon/context/<domain>.md` entry: `draft-context`
|
|
36
|
-
- Drafting a `docs/*.md` page: `draft-docs`
|
|
37
|
-
- Drafting a standard or a governance rule: `create-standard`, `create-rule`
|
|
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,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: draft-wireframes
|
|
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 `context-fold`'s wireframe-sweep step.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Wireframe draft
|
|
7
|
-
|
|
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.
|
|
11
|
-
|
|
12
|
-
Read these files in parallel:
|
|
13
|
-
|
|
14
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/wireframes.md`: the four questions a wireframe must answer, its frontmatter, the regions list and states table, the exclusions section, the Transcription-wireframes branch, and what moves to a context entry instead
|
|
15
|
-
- `${CLAUDE_SKILL_DIR}/../../standards/markdown.md`: punctuation and formatting for the prose around the fences
|
|
16
|
-
- The `write-human` skill: voice, rhythm, and sentence construction for the prose around the fences
|
|
17
|
-
|
|
18
|
-
This skill stays fully independent of `context-fold`'s wireframe coverage sweep, which only ever writes a bare `TODO` stub for a surface a diff touched and reports drift against one a wireframe already covers. Neither the stub nor the drift check is a draft, and this skill never reads or writes through that mechanism.
|
|
19
|
-
|
|
20
|
-
## Guards
|
|
21
|
-
|
|
22
|
-
- If no surface is given, stop: `❌ No surface given. Name the surface this wireframe should cover.`
|
|
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.`
|
|
24
|
-
|
|
25
|
-
## Tier detection
|
|
26
|
-
|
|
27
|
-
- Read `canon/DESIGN.md` and every existing `canon/wireframes/` file for a tier signal: an Excalidraw or Figma reference, or a marker naming one of them.
|
|
28
|
-
- State the detected tier at the confirm step. Always draft the regions-and-states shape regardless of what is detected, since that is the only shape this skill or any other shipped mechanism produces, adding the ASCII sketch fence only when the layout is not built yet. Report a higher tier rather than attempting a companion render for it.
|
|
29
|
-
- Default silently to tier 0 when nothing is detected.
|
|
30
|
-
|
|
31
|
-
## Draft
|
|
32
|
-
|
|
33
|
-
- Decide the mode before drafting. When the surface names an already-built component or file, open that source and draft in transcription mode, citing the render function, the stylesheet rule, or the built file each region and label traces to, per the standard's Transcription-wireframes section.
|
|
34
|
-
- Draft in role-intent mode otherwise: label each region by its role, never by a class name or a token value.
|
|
35
|
-
- Draft `title` and `description` frontmatter, then a lead paragraph naming what the surface is for and what it covers, then `## Regions` as a bullet list naming every region and where it sits relative to the others.
|
|
36
|
-
- Draw an ASCII `plaintext` fence with `←` role annotations only when the layout is not built yet. Skip the fence in transcription mode, which already cites the built source instead.
|
|
37
|
-
- Draft `## States` as a table listing every state a visitor can reach, what reaches it, what it shows in words, and its evidence folder, reading `not captured` in the evidence cell until a capture lands.
|
|
38
|
-
- Follow with `## Copy`, `## Behavior`, and `## Not on this surface`, against `${CLAUDE_SKILL_DIR}/../../standards/wireframes.md`'s template.
|
|
39
|
-
- Give a layout that changes across a breakpoint or state its own entry in the regions list, named by what triggers it, never for a spacing difference alone.
|
|
40
|
-
- Leave out algorithms, event-handler code, framework prop or class names outside transcription mode, and anything else the standard sends to a context entry instead.
|
|
41
|
-
|
|
42
|
-
## Confirm
|
|
43
|
-
|
|
44
|
-
- Show the resolved path, the detected tier, and the full drafted content before writing.
|
|
45
|
-
- Confirm all three with the user. This skill waits for that answer rather than treating the tool permission dialog as the gate, since the mode decision and the tier read are judgment calls with no diff to preview either against.
|
|
46
|
-
|
|
47
|
-
## Write
|
|
48
|
-
|
|
49
|
-
- Write the file at the confirmed path, creating a grouped subfolder only when the surface belongs beside siblings that already share one.
|
|
50
|
-
- Run `canon markdown audit <path>` against the prose outside the fenced block.
|
|
51
|
-
- Run `canon indexes regen canon/wireframes`, so the surface appears in `canon/wireframes/index.md` immediately rather than drifting until the next unrelated regen.
|
|
52
|
-
|
|
53
|
-
## Response format
|
|
54
|
-
|
|
55
|
-
### Preview
|
|
56
|
-
|
|
57
|
-
**Surface:** `<surface>`
|
|
58
|
-
**Placement:** `<path>`
|
|
59
|
-
**Detected tier:** `<tier-0 | tier-1 | tier-2 | none detected>`
|
|
60
|
-
|
|
61
|
-
```markdown
|
|
62
|
-
<drafted frontmatter and body>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### After confirmation
|
|
66
|
-
|
|
67
|
-
```plaintext
|
|
68
|
-
✅ Drafted: <path>
|
|
69
|
-
```
|