@erclx/canon 5.41.0 → 5.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/references/adopted.md +34 -14
- package/claude/skills/auto-ship/REQUIREMENT.md +1 -0
- package/claude/skills/auto-ship/SKILL.md +22 -2
- package/claude/skills/auto-ship/references/draft-mark.md +32 -6
- package/claude/skills/auto-ship/references/failure-recovery.md +15 -13
- package/claude/skills/auto-ship/references/tier-failures.md +31 -10
- package/claude/skills/auto-ship/references/ui-checklist.md +9 -4
- package/claude/skills/auto-ship/references/worktree-name.md +9 -3
- package/claude/skills/build-in-slices/references/adopted.md +35 -21
- package/claude/skills/canvas-board/references/canvas.md +17 -6
- package/claude/skills/canvas-board/references/design.md +26 -7
- package/claude/skills/code-craft/references/adopted.md +58 -20
- package/claude/skills/codebase-layout/references/adopted.md +49 -16
- package/claude/skills/codebase-layout/references/frontend.md +11 -4
- package/claude/skills/codebase-layout/references/tests.md +4 -2
- package/claude/skills/context-fold/references/classify.md +10 -15
- package/claude/skills/context-fold/references/completion-report.md +11 -9
- package/claude/skills/context-fold/references/context-refresh.md +26 -9
- package/claude/skills/context-fold/references/unusable-baseline.md +5 -3
- package/claude/skills/create-rule/REQUIREMENT.md +5 -0
- package/claude/skills/create-rule/SKILL.md +9 -1
- package/claude/skills/create-rule/references/checklist.md +26 -0
- package/claude/skills/create-rule/references/rule.md +98 -20
- package/claude/skills/create-skill/SKILL.md +1 -0
- package/claude/skills/create-skill/references/skill-disclosure.md +10 -2
- package/claude/skills/create-skill/references/skill-frontmatter.md +43 -0
- package/claude/skills/create-skill/references/skill-paths.md +7 -4
- package/claude/skills/create-skill/references/skill-practice.md +6 -3
- package/claude/skills/create-skill/references/skill-requirement.md +4 -2
- package/claude/skills/create-skill/references/skill.md +67 -44
- package/claude/skills/deploy-app/references/vercel.md +2 -1
- package/claude/skills/deprecation-migration/references/adopted.md +44 -25
- package/claude/skills/design-taste/references/adopted.md +9 -1
- package/claude/skills/design-taste/references/craft.md +3 -1
- package/claude/skills/design-taste/references/kinds.md +8 -7
- package/claude/skills/design-taste/references/preflight.md +12 -0
- package/claude/skills/design-taste/references/systems.md +7 -6
- package/claude/skills/design-taste/references/tells.md +24 -25
- package/claude/skills/design-taste/references/vocabulary.md +7 -5
- package/claude/skills/document-health/references/axes.md +54 -30
- package/claude/skills/draft-and-pick/references/live-arms.md +2 -2
- package/claude/skills/draft-doc/references/context.md +4 -3
- package/claude/skills/draft-doc/references/docs.md +6 -3
- package/claude/skills/draft-doc/references/readme/agent-facing.md +6 -0
- package/claude/skills/draft-doc/references/readme/application.md +8 -2
- package/claude/skills/draft-doc/references/readme/cli.md +5 -1
- package/claude/skills/draft-doc/references/readme/library.md +4 -0
- package/claude/skills/draft-doc/references/readme/plugin.md +9 -1
- package/claude/skills/draft-doc/references/readme.md +30 -13
- package/claude/skills/draft-doc/references/requirements.md +17 -4
- package/claude/skills/draft-doc/references/wiki-kind.md +20 -10
- package/claude/skills/draft-figure/references/architecture-set.md +7 -3
- package/claude/skills/draft-figure/references/figures.md +8 -6
- package/claude/skills/draft-figure/references/hand-drawn.md +3 -1
- package/claude/skills/draft-figure/references/mermaid-path.md +19 -9
- package/claude/skills/draft-figure/references/mermaid.md +10 -5
- package/claude/skills/draft-ready/references/ready.md +22 -15
- package/claude/skills/git-branch/references/branch.md +11 -1
- package/claude/skills/git-branch/references/slug.md +17 -5
- package/claude/skills/git-commit/references/commit.md +8 -0
- package/claude/skills/git-commit/references/versioning.md +23 -17
- package/claude/skills/git-followup/REQUIREMENT.md +1 -1
- package/claude/skills/git-followup/SKILL.md +5 -6
- package/claude/skills/git-issue/references/issue.md +29 -16
- package/claude/skills/git-pr/REQUIREMENT.md +1 -5
- package/claude/skills/git-pr/SKILL.md +11 -22
- package/claude/skills/git-pr/references/final-command.md +21 -8
- package/claude/skills/git-pr/references/labels.md +45 -28
- package/claude/skills/git-pr/references/pr.md +28 -9
- package/claude/skills/git-pr/references/publish.md +42 -28
- package/claude/skills/git-pr/references/task-number.md +20 -8
- package/claude/skills/git-ship/SKILL.md +1 -1
- package/claude/skills/plan-feature/references/plan-lifecycle.md +10 -3
- package/claude/skills/plan-feature/references/plan.md +57 -20
- package/claude/skills/plan-groundwork/references/groundwork-spikes.md +4 -1
- package/claude/skills/plan-groundwork/references/groundwork.md +14 -16
- package/claude/skills/plan-intake/references/intake.md +29 -24
- package/claude/skills/pr-evidence/REQUIREMENT.md +40 -0
- package/claude/skills/pr-evidence/SKILL.md +53 -0
- package/claude/skills/pr-evidence/references/evidence.md +150 -0
- package/claude/skills/review-address/references/post-review-findings.md +10 -3
- package/claude/skills/review-address/references/rebase-conflicts.md +15 -7
- package/claude/skills/review-address/references/rest-reads.md +3 -1
- package/claude/skills/review-craft/references/adopted.md +35 -18
- package/claude/skills/review-craft/references/security.md +42 -7
- package/claude/skills/review-craft/references/ui.md +23 -8
- package/claude/skills/review-pr/SKILL.md +6 -6
- package/claude/skills/review-pr/references/body-variants.md +29 -9
- package/claude/skills/review-pr/references/close-out.md +20 -5
- package/claude/skills/review-pr/references/key-changes.md +27 -3
- package/claude/skills/review-pr/references/post.md +83 -31
- package/claude/skills/review-pr/references/scope.md +54 -19
- package/claude/skills/review-ui/references/close-out.md +7 -5
- package/claude/skills/review-ui/references/driving.md +24 -4
- package/claude/skills/review-ui/references/post.md +43 -15
- package/claude/skills/role-orchestrator/references/orchestrator-cloud-launch.md +67 -17
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +80 -40
- package/claude/skills/role-orchestrator/references/orchestrator-handback.md +52 -15
- package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +48 -26
- package/claude/skills/role-orchestrator/references/orchestrator-inbound.md +12 -13
- package/claude/skills/role-orchestrator/references/orchestrator-launch.md +72 -36
- package/claude/skills/role-orchestrator/references/orchestrator-output.md +12 -4
- package/claude/skills/role-orchestrator/references/orchestrator-parked.md +64 -24
- package/claude/skills/role-orchestrator/references/orchestrator-poll.md +80 -26
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +41 -18
- package/claude/skills/role-orchestrator/references/orchestrator-resume.md +19 -7
- package/claude/skills/role-orchestrator/references/orchestrator-review-dispatch.md +22 -12
- package/claude/skills/role-orchestrator/references/orchestrator-reviewer-launch.md +15 -6
- package/claude/skills/role-orchestrator/references/orchestrator-sweep.md +25 -7
- package/claude/skills/role-orchestrator/references/orchestrator-watch.md +34 -8
- package/claude/skills/role-orchestrator/scripts/poll.ts +16 -24
- package/claude/skills/role-worker/REQUIREMENT.md +1 -0
- package/claude/skills/role-worker/SKILL.md +8 -0
- package/claude/skills/search-craft/references/adopted.md +18 -6
- package/claude/skills/session-map/references/session.md +26 -7
- package/claude/skills/session-worktree/references/main-root-writes.md +25 -8
- package/claude/skills/systematic-debugging/references/adopted.md +30 -16
- package/claude/skills/target-check/references/domains.md +39 -11
- package/claude/skills/target-setup/references/detect.md +80 -65
- package/claude/skills/target-setup/references/indexes.md +8 -6
- package/claude/skills/task-board/references/board.md +86 -30
- package/claude/skills/task-board/references/decline.md +29 -13
- package/claude/skills/task-board/references/tasks-decline.md +12 -5
- package/claude/skills/task-board/references/tasks.md +65 -33
- package/claude/skills/task-complete/references/archive.md +41 -17
- package/claude/skills/task-complete/references/receipt-sweep.md +23 -9
- package/claude/skills/task-complete/references/unusable-baseline.md +10 -3
- package/claude/skills/teach-workspace/references/glossary.md +6 -2
- package/claude/skills/teach-workspace/references/lesson-build.md +44 -16
- package/claude/skills/teach-workspace/references/lesson-craft.md +12 -7
- package/claude/skills/teach-workspace/references/pedagogy.md +6 -3
- package/claude/skills/teach-workspace/references/promotion-fold.md +17 -11
- package/claude/skills/teach-workspace/references/promotion.md +31 -8
- package/claude/skills/teach-workspace/references/revisit.md +8 -2
- package/claude/skills/teach-workspace/references/teach.md +17 -9
- package/claude/skills/test-craft/references/adopted.md +48 -14
- package/claude/skills/test-craft/references/component.md +7 -4
- package/claude/skills/test-craft/references/e2e.md +25 -7
- package/claude/skills/test-craft/references/unit.md +3 -1
- package/claude/skills/test-first/references/adopted.md +12 -4
- package/claude/skills/ui-checklist/REQUIREMENT.md +1 -1
- package/claude/skills/ui-checklist/SKILL.md +1 -1
- package/claude/skills/video-craft/references/adopted.md +62 -18
- package/claude/skills/write-human/references/adopted.md +21 -8
- package/docs/workflow/parallel-features.md +1 -1
- package/docs/workflow/skill-map.md +1 -0
- package/package.json +1 -1
- package/src/claude/cases/workflow.ts +5 -0
- package/src/commands/pr.ts +142 -28
- package/src/markdown/scope.ts +144 -0
- package/src/pr/lift.ts +6 -3
- package/src/pr/review-state.ts +182 -0
- package/claude/skills/git-pr/references/evidence.md +0 -124
|
@@ -13,12 +13,13 @@ A project the surface move has not reached keeps its context folder under `.clau
|
|
|
13
13
|
|
|
14
14
|
## Guards
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Derive a kebab-case slug from the domain and check whether `<context-root>/<slug>.md` or `<context-root>/<slug>/index.md` already exists. Either resolving means the domain is covered under that exact name, so stop: `❌ <slug> already has a context entry. Use context-fold to refresh it instead.`
|
|
17
17
|
|
|
18
18
|
## Placement
|
|
19
19
|
|
|
20
|
-
- Read `<context-root>/index.md` and check every title and description it lists against the domain
|
|
21
|
-
-
|
|
20
|
+
- Read `<context-root>/index.md` and check every title and description it lists against the domain
|
|
21
|
+
- Stop on a match: `❌ <path> already covers this domain under a different name. Use context-fold to refresh it instead.`
|
|
22
|
+
- Default a brand-new entry to a flat file, `<context-root>/<slug>.md`, since the standard splits an entry into a folder only past the 300-line ceiling, which a fresh domain never reaches
|
|
22
23
|
|
|
23
24
|
## Draft
|
|
24
25
|
|
|
@@ -9,12 +9,15 @@ description: The guard, placement, draft additions, and regen folder for a brand
|
|
|
9
9
|
|
|
10
10
|
## Guards
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Derive a kebab-case slug from the topic and run `canon docs <slug>`. A resolved page means the topic is covered under that exact name, so stop: `❌ <slug> already resolves to an existing page. Run canon:docs-sync instead.`
|
|
13
|
+
|
|
14
|
+
This is a name match rather than a topic match, and Placement checks the wider case.
|
|
13
15
|
|
|
14
16
|
## Placement
|
|
15
17
|
|
|
16
|
-
- Read `docs/index.md` and its sub-catalogs for the closest existing `category`. <!-- canon-allow-reference:
|
|
17
|
-
- Check every page title and description that read surfaces against the topic
|
|
18
|
+
- Read `docs/index.md` and its sub-catalogs for the closest existing `category`. <!-- canon-allow-reference: the target project's own docs/ tree -->
|
|
19
|
+
- Check every page title and description that read surfaces against the topic
|
|
20
|
+
- Stop on a match: `❌ <path> already covers this topic under a different name. Run canon:docs-sync instead.`
|
|
18
21
|
- Reuse a matching `category` value verbatim. A near-miss spelling opens a second shelf holding one page, per the docs standard.
|
|
19
22
|
- 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.
|
|
20
23
|
|
|
@@ -13,11 +13,15 @@
|
|
|
13
13
|
|
|
14
14
|
### Requirements
|
|
15
15
|
|
|
16
|
+
Install <what the machine needs> before setup.
|
|
17
|
+
|
|
16
18
|
- <Agent tool and minimum version>
|
|
17
19
|
- <Runtime the listing command needs>
|
|
18
20
|
|
|
19
21
|
### Set up
|
|
20
22
|
|
|
23
|
+
Run these from <where to run them>.
|
|
24
|
+
|
|
21
25
|
```bash
|
|
22
26
|
<clone command>
|
|
23
27
|
<setup command, when a session needs one>
|
|
@@ -31,6 +35,8 @@
|
|
|
31
35
|
|
|
32
36
|
### List what the project exposes
|
|
33
37
|
|
|
38
|
+
The listing shows <what it shows>.
|
|
39
|
+
|
|
34
40
|
```bash
|
|
35
41
|
<command that lists skills, rules, or commands>
|
|
36
42
|
```
|
|
@@ -22,11 +22,15 @@
|
|
|
22
22
|
|
|
23
23
|
### Requirements
|
|
24
24
|
|
|
25
|
+
Install <what the machine needs> before setup.
|
|
26
|
+
|
|
25
27
|
- <Runtime and version>
|
|
26
28
|
- <Service the app depends on>
|
|
27
29
|
|
|
28
30
|
### Set up
|
|
29
31
|
|
|
32
|
+
Run these from <where to run them>.
|
|
33
|
+
|
|
30
34
|
```bash
|
|
31
35
|
<clone command>
|
|
32
36
|
<dependency install command>
|
|
@@ -36,11 +40,13 @@
|
|
|
36
40
|
|
|
37
41
|
### Run locally
|
|
38
42
|
|
|
43
|
+
The dev server runs <what it runs>.
|
|
44
|
+
|
|
39
45
|
```bash
|
|
40
46
|
<dev server command>
|
|
41
47
|
```
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
It serves on <address>.
|
|
44
50
|
|
|
45
51
|
### Configuration
|
|
46
52
|
|
|
@@ -50,7 +56,7 @@
|
|
|
50
56
|
|
|
51
57
|
### Deploy
|
|
52
58
|
|
|
53
|
-
|
|
59
|
+
The app deploys to <where>, through <the command or workflow>.
|
|
54
60
|
|
|
55
61
|
## Support
|
|
56
62
|
|
|
@@ -27,12 +27,16 @@
|
|
|
27
27
|
|
|
28
28
|
### Run a command
|
|
29
29
|
|
|
30
|
+
The most common invocation is <what it does>.
|
|
31
|
+
|
|
30
32
|
```bash
|
|
31
33
|
<command> <argument>
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
### Flags
|
|
35
37
|
|
|
38
|
+
Most runs need <the flags a reader reaches for first>.
|
|
39
|
+
|
|
36
40
|
```bash
|
|
37
41
|
<command> --<flag> <value>
|
|
38
42
|
<command> --<flag>
|
|
@@ -44,7 +48,7 @@
|
|
|
44
48
|
|
|
45
49
|
### Exit codes
|
|
46
50
|
|
|
47
|
-
|
|
51
|
+
A non-zero exit means <what each code means>, when a script depends on it.
|
|
48
52
|
|
|
49
53
|
## Documentation
|
|
50
54
|
|
|
@@ -29,12 +29,16 @@
|
|
|
29
29
|
|
|
30
30
|
### Quickstart
|
|
31
31
|
|
|
32
|
+
The snippet shows <the core behavior>.
|
|
33
|
+
|
|
32
34
|
```<language>
|
|
33
35
|
<Import and one call that shows the core behavior>
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
### <Second common task>
|
|
37
39
|
|
|
40
|
+
Reach for this when <the reader's situation>.
|
|
41
|
+
|
|
38
42
|
```<language>
|
|
39
43
|
<Snippet for the task>
|
|
40
44
|
```
|
|
@@ -18,18 +18,24 @@
|
|
|
18
18
|
|
|
19
19
|
### <First channel name>
|
|
20
20
|
|
|
21
|
+
Install through this channel when <who it suits>.
|
|
22
|
+
|
|
21
23
|
```bash
|
|
22
24
|
<install command for this channel>
|
|
23
25
|
```
|
|
24
26
|
|
|
25
27
|
### <Second channel name>
|
|
26
28
|
|
|
29
|
+
Install through this channel when <who it suits>.
|
|
30
|
+
|
|
27
31
|
```bash
|
|
28
32
|
<install command for this channel>
|
|
29
33
|
```
|
|
30
34
|
|
|
31
35
|
### Update
|
|
32
36
|
|
|
37
|
+
Update when <the trigger>, which replaces <what it replaces>.
|
|
38
|
+
|
|
33
39
|
```bash
|
|
34
40
|
<update command>
|
|
35
41
|
```
|
|
@@ -38,6 +44,8 @@
|
|
|
38
44
|
|
|
39
45
|
### Invoke a skill
|
|
40
46
|
|
|
47
|
+
Type the command in <where the user types it>.
|
|
48
|
+
|
|
41
49
|
```text
|
|
42
50
|
/<plugin name>:<skill name> <argument>
|
|
43
51
|
```
|
|
@@ -50,7 +58,7 @@
|
|
|
50
58
|
|
|
51
59
|
### Configuration
|
|
52
60
|
|
|
53
|
-
<
|
|
61
|
+
Set <the setting the plugin reads> in <where the user sets it>, when one exists.
|
|
54
62
|
|
|
55
63
|
## Support
|
|
56
64
|
|
|
@@ -11,12 +11,21 @@ The readme standard claims the voice of a repository-root README. `write-human`
|
|
|
11
11
|
|
|
12
12
|
## Guards
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
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, which keeps the reference voice per the standard's `## Voice` section.
|
|
15
|
+
|
|
16
|
+
### Reading an existing target
|
|
17
|
+
|
|
18
|
+
Read the target if it exists, and branch on its headings.
|
|
19
|
+
|
|
20
|
+
| Target | Reading | Route |
|
|
21
|
+
| -------------------------------------------------------------- | ---------------- | ------------------------------------------------------------------------------------- |
|
|
22
|
+
| Carries an H1 naming the project | Authored | Stop: `❌ <path> already exists and covers the project. Run canon:docs-sync instead.` |
|
|
23
|
+
| Carries no H1, or only headings restating the scaffolding tool | Generator output | Continue, drafting over it rather than syncing its sections |
|
|
24
|
+
| Does not exist | Nothing to read | Continue |
|
|
25
|
+
|
|
26
|
+
- On the authored branch, report rather than offering to overwrite it or to conform it, since the project's own citations into its README are invisible from here
|
|
27
|
+
- A hand-authored README opening with a badge block, or a title the H1 test misses, falls into the no-H1 branch the same as a scaffold page
|
|
28
|
+
- The Confirm step catches that case before the write, so it is load-bearing. Never skip it on the reasoning that the guard already decided.
|
|
20
29
|
|
|
21
30
|
## Placement
|
|
22
31
|
|
|
@@ -26,15 +35,18 @@ The target path is the placement. A README keeps no catalog, so there is no coll
|
|
|
26
35
|
|
|
27
36
|
Read the project's manifest (`package.json`, `pyproject.toml`, `Cargo.toml`, or equivalent) and the tree, then test each type on its own signal. Note every type that matches rather than stopping at the first, since a project is often several at once.
|
|
28
37
|
|
|
29
|
-
- Library: an installable package name, counted only when no application, CLI, or plugin signal matches, since a
|
|
38
|
+
- Library: an installable package name, counted only when no application, CLI, or plugin signal matches, since a site, a CLI, or a plugin also carries a named package
|
|
30
39
|
- CLI: a `bin` field, a `[project.scripts]` table in `pyproject.toml`, a `[[bin]]` table in `Cargo.toml`, or a CLI entry point.
|
|
31
40
|
- Application: a site framework dependency, a site config file, or an app entry point.
|
|
32
41
|
- Agent-facing: a `.claude/skills/` folder, or a file an agent loads such as `CLAUDE.md`.
|
|
33
42
|
- Plugin: a `plugin.json` or a marketplace manifest.
|
|
34
43
|
|
|
35
|
-
A match on no type falls back to the standard's generic template. Say so in the preview, and never force the nearest type.
|
|
44
|
+
An agent-facing match leaves the library type in place, so a library with a `CLAUDE.md` still gets its quickstart. A match on no type falls back to the standard's generic template. Say so in the preview, and never force the nearest type.
|
|
45
|
+
|
|
46
|
+
### Page, mark, and screenshot
|
|
47
|
+
|
|
48
|
+
A site framework dependency or a site config file in the manifest or the tree marks a project as having a page. Read a live URL separately, from a `homepage` field or a deploy config, since a project can have a page and no known URL.
|
|
36
49
|
|
|
37
|
-
- 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.
|
|
38
50
|
- 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.
|
|
39
51
|
- 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.
|
|
40
52
|
|
|
@@ -61,13 +73,18 @@ Between agent-facing and plugin alone, a repository with no plugin manifest take
|
|
|
61
73
|
|
|
62
74
|
## Draft
|
|
63
75
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
76
|
+
Start from the picked or combined template. Draft the H1, a 2-3 sentence description in plain text, the required sections, then whichever optional sections and per-type content Detect found. A README takes no frontmatter.
|
|
77
|
+
|
|
78
|
+
- Open with the standard's header block, filled from Detect in order: mark, title, badges, a one-line claim from the manifest description, the live link, then the product screenshot
|
|
79
|
+
- Fill the screenshot slot only with an image the project already commits, with alt text naming what it depicts, since this kind cannot capture one
|
|
80
|
+
- With no such image, omit the slot and say so in the preview. Never write a placeholder path or invent a mark.
|
|
81
|
+
- Omit the link and the screenshot for a project with no page, and the mark for a project with none, with no note in the page
|
|
82
|
+
- A project with a page and no known URL gets the screenshot slot, and the Confirm step asks for the link
|
|
68
83
|
|
|
69
84
|
### Types and badges
|
|
70
85
|
|
|
86
|
+
A badge earns its place only once its rendered value is checked.
|
|
87
|
+
|
|
71
88
|
- Cover every applicable project type from the standard's `## Content` list rather than picking the closest one.
|
|
72
89
|
- Candidate badges: check for a published package (a registry field in the manifest), a CI workflow, and a `LICENSE` file.
|
|
73
90
|
- 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.
|
|
@@ -20,7 +20,8 @@ Does not govern:
|
|
|
20
20
|
|
|
21
21
|
- The problem being solved and for whom, as the record's opening line under the title
|
|
22
22
|
- User-facing goals stated as outcomes, not implementation
|
|
23
|
-
- Explicit non-goals that prevent feature creep. Mark deferred items "(deferred)" so they read as paused, not excluded.
|
|
23
|
+
- Explicit non-goals that prevent feature creep. Mark deferred items "(deferred)" so they read as paused, not excluded.
|
|
24
|
+
- A non-goal resting on how an outside tool, an installer, or the model behaves may close with one `Revisit when <finding>.` sentence. One resting on scope alone takes none.
|
|
24
25
|
- Hard constraints that shape every decision, when the project has any
|
|
25
26
|
|
|
26
27
|
## What does not go in
|
|
@@ -32,17 +33,29 @@ Does not govern:
|
|
|
32
33
|
|
|
33
34
|
## Sections
|
|
34
35
|
|
|
35
|
-
Require `## Goals` and `## Non-goals
|
|
36
|
+
Require `## Goals` and `## Non-goals`, and drop any other section rather than pad it with filler.
|
|
37
|
+
|
|
38
|
+
- Add `## Constraints` when the project holds hard limits that shape every decision
|
|
39
|
+
- Add `## Worldview` when the project holds beliefs that shape every decision
|
|
40
|
+
- Keep a belief there only when it changes a decision, since a padded worldview turns into a second goals list
|
|
36
41
|
|
|
37
42
|
## Length
|
|
38
43
|
|
|
39
|
-
This file loads into every session, so its weight is paid before any work starts. Cap it by stating the clause `This record holds at most <n> words.` in the record itself, where a checker reads it and counts every word below the frontmatter.
|
|
44
|
+
This file loads into every session, so its weight is paid before any work starts. Cap it by stating the clause `This record holds at most <n> words.` in the record itself, where a checker reads it and counts every word below the frontmatter.
|
|
45
|
+
|
|
46
|
+
- The cap is the record's own, so a record stating none is measured and never gated
|
|
47
|
+
- The template and the seed a new project installs state 600, and a project loosens it by editing the number in its own record
|
|
48
|
+
- At the cap, cut a goal or a constraint that no longer changes a decision before adding one
|
|
40
49
|
|
|
41
50
|
## Lifecycle
|
|
42
51
|
|
|
43
52
|
The record may carry an optional `reviewed: YYYY-MM-DD` frontmatter field naming the day someone last read it whole for identity drift. Whoever finishes that review sets it as the review's last edit, and `canon records stale canonical` reads it to count the releases shipped since. A record with no field reads as never reviewed.
|
|
44
53
|
|
|
45
|
-
Later scope arrives as a new section rather than as an extension of the goals. Name
|
|
54
|
+
Later scope arrives as a new section rather than as an extension of the goals. Name it for what it delivers and state its entries as outcomes, the same way the goals are stated.
|
|
55
|
+
|
|
56
|
+
- Once every entry in it has shipped, delete the section, since version history keeps the old text and the document states the project as it stands
|
|
57
|
+
- Nothing sequences a section into versions. Work reaches the board as discrete tasks under `tasks.md`, and `board.md` orders them by readiness.
|
|
58
|
+
- A section states what is wanted and never when it lands
|
|
46
59
|
|
|
47
60
|
## Template
|
|
48
61
|
|
|
@@ -11,35 +11,43 @@ The standard's `## Placement` section names the folder a page lands in and the v
|
|
|
11
11
|
|
|
12
12
|
## Guards
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
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.
|
|
15
15
|
|
|
16
16
|
## Placement
|
|
17
17
|
|
|
18
18
|
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.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
| Test | Fails on | Refusal |
|
|
21
|
+
| ------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
22
|
+
| Owned outside this repository | A subject describing how this repository works | `❌ <subject> is owned by this project, so it belongs in the docs surface or a context entry. Re-run draft-doc naming that destination.` |
|
|
23
|
+
| Owned by the vendor the folder split covers | A third-party tool or a vendor-neutral concept, however reference-like it reads | `❌ <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.` |
|
|
24
|
+
|
|
25
|
+
On the first test, offer the docs or context kind of this skill. The standard names one owner and one subfolder for the second.
|
|
22
26
|
|
|
23
27
|
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 kind takes on its own.
|
|
24
28
|
|
|
25
29
|
## Collision
|
|
26
30
|
|
|
27
|
-
- Derive the page slug per the standard's `## Naming` section and check whether `<wiki-root>/<vendor>/<slug>.md` already exists
|
|
28
|
-
-
|
|
31
|
+
- Derive the page slug per the standard's `## Naming` section and check whether `<wiki-root>/<vendor>/<slug>.md` already exists
|
|
32
|
+
- If it does, stop: `❌ <path> already covers this subject. Edit that page against the standard instead of drafting a second one.`
|
|
33
|
+
- Read `<wiki-root>/<vendor>/index.md` and check every title and description it lists against the subject
|
|
34
|
+
- Stop on a match: `❌ <path> already covers this subject under a different name. Edit that page instead.`
|
|
29
35
|
|
|
30
36
|
## Source
|
|
31
37
|
|
|
32
38
|
The standard forbids working from training knowledge, so the draft is built on a read rather than on recall.
|
|
33
39
|
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
Fetch current information through the `claude-code-guide` agent for any subject that agent covers, and write from its answer. Reach any other subject through the owner's own published documentation.
|
|
41
|
+
|
|
42
|
+
- Invoke `canon:search-craft` with the skill tool before that search, since finding the owner's documentation is its field-and-authority step. Report it when it does not resolve.
|
|
36
43
|
- Say the fetch failed and stop rather than substituting recall, even for a subject the session believes it knows. A page sourced from memory ships looking identical to one that was checked.
|
|
37
|
-
- Close the intro with the `Source:` sentence the standard requires, linking the canonical page
|
|
44
|
+
- Close the intro with the `Source:` sentence the standard requires, linking the canonical page, or naming the owner alone where the subject has no single URL
|
|
38
45
|
- 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.
|
|
39
46
|
|
|
40
47
|
## Draft
|
|
41
48
|
|
|
42
|
-
- Draft `title` and `description` frontmatter against the standard's contract, then the intro paragraph closing on `Source:` as a short orientation, then the lesson sections
|
|
49
|
+
- Draft `title` and `description` frontmatter against the standard's contract, then the intro paragraph closing on `Source:` as a short orientation, then the lesson sections
|
|
50
|
+
- Let the read of the source decide what is a lesson. Keep a fact only when the source page does not state it, and leave reference detail to the source.
|
|
43
51
|
- Write what the fetch returned rather than what the subject is assumed to do.
|
|
44
52
|
- Answer one question per section and stop. A reader arrives to settle something specific rather than to read the page through.
|
|
45
53
|
- Mark a claim the fetch left unsettled rather than smoothing over it. An unmarked gap reads as a checked fact.
|
|
@@ -50,4 +58,6 @@ Add `**Source:** <owner, and the read it came from>`, and confirm the source wit
|
|
|
50
58
|
|
|
51
59
|
## Write
|
|
52
60
|
|
|
53
|
-
Regenerate `<wiki-root>/<vendor>`, naming the folder the page landed in rather than the root above it. The verb rewrites the `index.md` in the folder it is given and does not walk down, so regenerating at the root leaves the vendor catalog untouched.
|
|
61
|
+
Regenerate `<wiki-root>/<vendor>`, naming the folder the page landed in rather than the root above it. The verb rewrites the `index.md` in the folder it is given and does not walk down, so regenerating at the root leaves the vendor catalog untouched.
|
|
62
|
+
|
|
63
|
+
A page absent from that catalog is invisible to the next run's Collision step, which then drafts a second page on the same subject.
|
|
@@ -25,11 +25,15 @@ Stay inside `flowchart` and `sequenceDiagram`. C4, state, ER, and class diagrams
|
|
|
25
25
|
|
|
26
26
|
## Sources
|
|
27
27
|
|
|
28
|
-
- Read `canon/REQUIREMENTS.md`, `canon/context/index.md`, `CLAUDE.md`, and the language manifest (`package.json`, `pyproject.toml`, `Cargo.toml`) when present
|
|
28
|
+
- Read `canon/REQUIREMENTS.md`, `canon/context/index.md`, `CLAUDE.md`, and the language manifest (`package.json`, `pyproject.toml`, `Cargo.toml`) when present
|
|
29
|
+
- Read the top-level folder layout through `ls`, and do not recurse speculatively
|
|
29
30
|
- When neither planning file exists and no folder structure names a boundary, stop: `❌ No source signal for <view>. Add canon/REQUIREMENTS.md or run inside a project folder.`
|
|
30
31
|
- When the view came from a code scan rather than planning prose, open the caption with `Source: code.` and add `Fidelity is lower than prose-driven figures. Verify against the project's intent.`
|
|
31
32
|
|
|
32
33
|
## Caption and prose
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
Name one or two code paths a reader can open, in the caption or the prose beside the figure. Cite only paths that exist and spell each one exactly, since a reader deciding whether the figure still holds starts by opening them.
|
|
36
|
+
|
|
37
|
+
- Keep implementation detail out of the figure, being function names and call signatures, library versions, config keys and environment variable names, retry counts and timeouts
|
|
38
|
+
- A workaround needing more than a sentence stays out too
|
|
39
|
+
- That detail belongs in a `canon/context/` entry, which the caption points at by path when a reader needs the mechanism
|
|
@@ -9,7 +9,7 @@ Applies to every hand-drawn figure, wherever it is authored. A figure sits insid
|
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
11
|
|
|
12
|
-
Governs a hand-drawn figure wherever one is authored,
|
|
12
|
+
Governs a hand-drawn figure wherever one is authored, being when it earns its place, the render-first policy routing a graph-shaped subject through Mermaid, the wrapping and caption every figure carries, and its color and accessibility rules. It names no path and carries no template, since it governs a fragment rather than a document type.
|
|
13
13
|
|
|
14
14
|
Does not govern:
|
|
15
15
|
|
|
@@ -35,10 +35,12 @@ A figure failing these is non-conforming even when it satisfies every shape rule
|
|
|
35
35
|
|
|
36
36
|
## The render-first policy
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
38
|
+
Route a graph-shaped subject, one whose relationship, boundary, or path a flowchart already expresses, through Mermaid's own hand-drawn look rather than through model-authored SVG coordinates. `mermaid.md` governs the fence itself.
|
|
39
|
+
|
|
40
|
+
- Reserve freehand inline SVG, plain shapes and lines authored in the markup, for a subject that is not graph-shaped
|
|
41
|
+
- A figure that cannot express its subject through the deterministic path is a worse failure than an inconsistent hand-drawn one, so the hatch stays open
|
|
42
|
+
- Draw a figure in a teach lesson freehand whatever its shape. Its hand font cannot load in the renderer, so Mermaid measures labels in a narrower fallback face and the page clips them.
|
|
43
|
+
- State this as a render-first policy rather than a ban on a tool-exported drawing, since routing through Mermaid is itself running an external tool
|
|
42
44
|
|
|
43
45
|
## Wrapping and captioning
|
|
44
46
|
|
|
@@ -47,5 +49,5 @@ A figure failing these is non-conforming even when it satisfies every shape rule
|
|
|
47
49
|
|
|
48
50
|
## Color and accessibility
|
|
49
51
|
|
|
50
|
-
- Color every fill and stroke through a custom property the surrounding document's
|
|
52
|
+
- Color every fill and stroke through a custom property the surrounding document's stylesheet defines, never a literal hex value, so the figure re-colors on the switch that re-colors the page
|
|
51
53
|
- Give the drawing an accessible name: `role="img"` with `aria-label` for one short line, or `aria-labelledby` pointing at a `<title>` element inside it for a longer one.
|
|
@@ -12,7 +12,9 @@ description: Authoring a freehand SVG, its color and accessibility audit, and th
|
|
|
12
12
|
- Author the SVG by hand: plain shapes and lines authored directly in the markup.
|
|
13
13
|
- Follow the `## Color and accessibility` section of `${CLAUDE_SKILL_DIR}/references/figures.md` for every fill, stroke, and accessible name.
|
|
14
14
|
|
|
15
|
-
There is no external render to verify a freehand drawing against before it is written. The check
|
|
15
|
+
There is no external render to verify a freehand drawing against before it is written. The check is the stroke-and-fill audit above and one read of the markup against what the subject means to show, done once rather than looped.
|
|
16
|
+
|
|
17
|
+
Hand-placed coordinates can drift out of line where a layout engine would not, so a freehand figure bound for a rendered page also takes the in-page capture below.
|
|
16
18
|
|
|
17
19
|
## Capture in the page
|
|
18
20
|
|
|
@@ -9,8 +9,11 @@ description: The hand-drawn render config, the SVG and PNG pair, the hex rewrite
|
|
|
9
9
|
|
|
10
10
|
## Draft the fence
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Draft the fence against `${CLAUDE_SKILL_DIR}/references/mermaid.md` for direction, node and edge budgets, `accTitle` and `accDescr`, and quoted labels. Do not work the layout or the budgets from memory.
|
|
13
|
+
|
|
14
|
+
- Read every node and subgraph label against the banned characters `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md` lists
|
|
15
|
+
- The audit hook skips every line inside a fence, so a banned character in a label passes silently while the same one in the caption is caught. Reading the labels is their only gate.
|
|
16
|
+
- A colon works as a replacement inside a label
|
|
14
17
|
|
|
15
18
|
## Render
|
|
16
19
|
|
|
@@ -25,9 +28,9 @@ bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/f
|
|
|
25
28
|
bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.png -c .canon/tmp/figures/<slug>.json
|
|
26
29
|
```
|
|
27
30
|
|
|
28
|
-
Render both formats in one pass. The SVG
|
|
31
|
+
Render both formats in one pass. The SVG ships inside the `<figure>`, and the PNG is what the read-back below judges, since an SVG's markup carries no recoverable spatial meaning.
|
|
29
32
|
|
|
30
|
-
Use `bunx` when bun is available, falling back to `npx -y @mermaid-js/mermaid-cli ...` otherwise
|
|
33
|
+
- Use `bunx` when bun is available, falling back to `npx -y @mermaid-js/mermaid-cli ...` otherwise
|
|
31
34
|
|
|
32
35
|
Before the first render in a project, say what is about to block:
|
|
33
36
|
|
|
@@ -42,14 +45,21 @@ Rewrite every stroke, fill, and text color the renderer wrote as a literal hex v
|
|
|
42
45
|
## Clipped titles
|
|
43
46
|
|
|
44
47
|
- Expect a group title or a long label to clip once the destination shows it in the hand font, since the renderer sized its box in a fallback face.
|
|
45
|
-
- When the in-page check shows a clipped title, add a `<style>` inside the SVG, scoped to that SVG's own id
|
|
48
|
+
- When the in-page check shows a clipped title, add a `<style>` inside the SVG, scoped to that SVG's own id
|
|
49
|
+
- The style sets `overflow: visible` on the clipped label's `foreignObject` and centers the label within it, so the wider text spills past both edges evenly
|
|
50
|
+
- It does nothing for a node label crowding its box, which takes a shorter label instead
|
|
46
51
|
|
|
47
52
|
## Fonts
|
|
48
53
|
|
|
49
|
-
Check whether the project ran `canon design css --figures`. The figure and figcaption styling ships
|
|
54
|
+
Check whether the project ran `canon design css --figures`. The figure and figcaption styling ships either way, but that flag alone embeds the Virgil and Excalifont font files.
|
|
55
|
+
|
|
56
|
+
Without it, the figure falls back to the browser's generic `cursive` face rather than the hand-drawn font, and the output names that gap.
|
|
50
57
|
|
|
51
58
|
## Read the render back
|
|
52
59
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
60
|
+
Read the rendered PNG and judge it against what the figure means to say, applying the verification properties in the mermaid standard. A source satisfying every rule there can still render as a picture asserting something false, so the image is what gets judged.
|
|
61
|
+
|
|
62
|
+
- Fix the Mermaid source and re-render on a defect, stopping after two correction passes
|
|
63
|
+
- When a defect survives, keep the figure and name the defect in the output rather than reporting a false verification
|
|
64
|
+
- When the render fails for any reason, such as no browser engine, network, or package manager, continue to the confirm step and name the skipped check
|
|
65
|
+
- A missing renderer degrades the loop rather than failing it
|
|
@@ -9,7 +9,7 @@ Applies to every Mermaid fence, wherever it is written. A fence sits inside a do
|
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
11
|
|
|
12
|
-
Governs the Mermaid attribute wherever a fence is written,
|
|
12
|
+
Governs the Mermaid attribute wherever a fence is written, being direction and layout, node and edge budgets, the accessibility fields, how punctuation reaches a label, and how a rendered diagram is verified. It names no path and carries no template, since it governs a drawing rather than a document type.
|
|
13
13
|
|
|
14
14
|
Does not govern:
|
|
15
15
|
|
|
@@ -31,17 +31,21 @@ A diagram failing these is non-conforming even when it satisfies every shape rul
|
|
|
31
31
|
|
|
32
32
|
## Layout
|
|
33
33
|
|
|
34
|
-
- Declare `flowchart TB` by default. Mermaid ignores a subgraph's direction
|
|
34
|
+
- Declare `flowchart TB` by default. Mermaid ignores a subgraph's direction when it links outward, as an architecture diagram normally does, so top-bottom is a declaration, not a guarantee.
|
|
35
35
|
- Restructure a diagram that renders diagonal or left-to-right. Repeating the direction keyword does not fix it.
|
|
36
36
|
- Render a context, component, or pipeline diagram taller than wide. A `sequenceDiagram` is wide by construction and is exempt.
|
|
37
37
|
|
|
38
38
|
### Rows and edges
|
|
39
39
|
|
|
40
|
+
A row or a bundle asserts something about the system, so each is drawn only where it is true.
|
|
41
|
+
|
|
40
42
|
- Do not let independent nodes render in a row. A row of siblings reads as a sequential chain and asserts a pipeline the system does not have.
|
|
41
43
|
- Do not converge many edges on one node from one side. A crossing bundle is unreadable whatever it encodes.
|
|
42
44
|
|
|
43
45
|
### Labels and subgraphs
|
|
44
46
|
|
|
47
|
+
A label names a node, and the paragraph below the diagram carries the detail.
|
|
48
|
+
|
|
45
49
|
- Keep node labels short. Three or four words max. Detail goes in the paragraph below the diagram.
|
|
46
50
|
- Use `<br/>` for a second short line on a node when the label is two ideas, never for a sentence.
|
|
47
51
|
- Subgraphs are for grouping unrelated lanes such as offline versus online or browser versus server. Do not subgraph a single linear flow.
|
|
@@ -51,12 +55,13 @@ A diagram failing these is non-conforming even when it satisfies every shape rul
|
|
|
51
55
|
- Hold a diagram to roughly 5 to 10 nodes. Split it past 15.
|
|
52
56
|
- Watch edge count harder than node count. It binds first, and a diagram whose edges outnumber its nodes is already too dense to read.
|
|
53
57
|
- Treat a diagram that cannot be described in one sentence as two diagrams.
|
|
54
|
-
- Warn rather than refuse on a budget, and name the split that would fix it
|
|
58
|
+
- Warn rather than refuse on a budget, and name the split that would fix it
|
|
59
|
+
- These numbers come from published Mermaid practice rather than a measurement, so a hard refusal on them would be wrong sometimes and unarguable when it is
|
|
55
60
|
|
|
56
61
|
## Labels
|
|
57
62
|
|
|
58
|
-
- Apply the punctuation bans in `markdown.md` to node and subgraph labels. A
|
|
59
|
-
- Treat the prose around a fence and the text inside it as two surfaces. The paragraphs
|
|
63
|
+
- Apply the punctuation bans in `markdown.md` to node and subgraph labels. A check scoped to prose does not reach a label, so reading the labels before shipping is their only gate.
|
|
64
|
+
- Treat the prose around a fence and the text inside it as two surfaces. The paragraphs follow `markdown.md` and the `write-human` skill, and a prose check does not reach the fenced block.
|
|
60
65
|
|
|
61
66
|
## Accessibility
|
|
62
67
|
|