@erclx/canon 5.30.0 → 5.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/references/adopted.md +1 -1
- package/claude/skills/auto-ship/REQUIREMENT.md +4 -16
- package/claude/skills/auto-ship/SKILL.md +13 -58
- package/claude/skills/auto-ship/references/draft-mark.md +2 -2
- package/claude/skills/auto-ship/references/failure-recovery.md +1 -5
- package/claude/skills/auto-ship/references/tier-failures.md +1 -1
- package/claude/skills/auto-ship/references/ui-checklist.md +2 -2
- package/claude/skills/auto-ship/references/verb-absent.md +3 -27
- package/claude/skills/backlog-triage/SKILL.md +1 -1
- package/claude/skills/build-in-slices/REQUIREMENT.md +1 -1
- package/claude/skills/build-in-slices/references/adopted.md +1 -1
- package/claude/skills/canon-cli/REQUIREMENT.md +4 -6
- package/claude/skills/canon-cli/SKILL.md +2 -2
- package/claude/skills/canon-feedback/REQUIREMENT.md +1 -1
- package/claude/skills/canon-feedback/SKILL.md +10 -13
- package/claude/skills/canon-feedback-triage/REQUIREMENT.md +13 -14
- package/claude/skills/canon-feedback-triage/SKILL.md +50 -29
- package/claude/skills/canvas/REQUIREMENT.md +3 -4
- package/claude/skills/canvas/SKILL.md +5 -5
- package/{standards → claude/skills/canvas/references}/canvas.md +12 -1
- package/claude/skills/ci-workflow/REQUIREMENT.md +0 -1
- package/claude/skills/context-fold/REQUIREMENT.md +8 -20
- package/claude/skills/context-fold/SKILL.md +21 -45
- package/claude/skills/context-fold/references/classify.md +7 -8
- package/claude/skills/context-fold/references/completion-report.md +2 -6
- package/claude/skills/context-fold/references/context-refresh.md +5 -15
- package/claude/skills/context-fold/references/promoted-pages.md +3 -3
- package/claude/skills/context-fold/references/receipt-sweep.md +6 -17
- package/claude/skills/context-fold/references/unusable-baseline.md +4 -6
- package/claude/skills/create-rule/REQUIREMENT.md +0 -1
- package/claude/skills/create-skill/REQUIREMENT.md +6 -4
- package/claude/skills/create-skill/SKILL.md +9 -8
- package/{standards → claude/skills/create-skill/references}/skill-paths.md +1 -0
- package/claude/skills/decision-escalate/REQUIREMENT.md +1 -1
- package/claude/skills/decision-escalate/SKILL.md +1 -1
- package/claude/skills/design-taste/REQUIREMENT.md +0 -2
- package/claude/skills/design-taste/SKILL.md +2 -4
- package/claude/skills/design-taste/references/vocabulary.md +1 -1
- package/claude/skills/docs-sync/REQUIREMENT.md +3 -3
- package/claude/skills/docs-sync/SKILL.md +1 -1
- package/claude/skills/document-health/REQUIREMENT.md +2 -2
- package/claude/skills/document-health/SKILL.md +4 -5
- package/claude/skills/document-health/references/axes.md +4 -6
- package/claude/skills/draft-and-pick/REQUIREMENT.md +16 -14
- package/claude/skills/draft-and-pick/SKILL.md +40 -32
- package/claude/skills/draft-and-pick/references/live-arms.md +9 -9
- package/claude/skills/draft-doc/REQUIREMENT.md +5 -5
- package/claude/skills/draft-doc/SKILL.md +10 -11
- package/claude/skills/draft-doc/references/requirements.md +61 -0
- package/claude/skills/draft-doc/references/wiki-kind.md +53 -0
- package/claude/skills/draft-doc/references/wiki.md +50 -30
- package/claude/skills/draft-figure/REQUIREMENT.md +2 -2
- package/claude/skills/draft-figure/SKILL.md +5 -5
- package/claude/skills/draft-figure/references/architecture-set.md +4 -4
- package/claude/skills/draft-figure/references/hand-drawn.md +1 -1
- package/claude/skills/draft-figure/references/mermaid-path.md +55 -0
- package/claude/skills/draft-figure/references/mermaid.md +43 -34
- package/claude/skills/draft-identity/REQUIREMENT.md +1 -1
- package/claude/skills/draft-identity/SKILL.md +9 -7
- package/claude/skills/draft-ready/REQUIREMENT.md +1 -1
- package/claude/skills/draft-ready/SKILL.md +6 -6
- package/claude/skills/draft-ready/references/assembly.md +1 -1
- package/{standards → claude/skills/draft-ready/references}/ready.md +13 -5
- package/claude/skills/git-issue/SKILL.md +1 -1
- package/claude/skills/git-issue/references/issue.md +3 -3
- package/claude/skills/git-pr/SKILL.md +1 -1
- package/claude/skills/git-ship/REQUIREMENT.md +0 -2
- package/claude/skills/git-ship/SKILL.md +16 -24
- package/claude/skills/git-stage/SKILL.md +1 -1
- package/claude/skills/markdown-craft/REQUIREMENT.md +23 -0
- package/claude/skills/markdown-craft/SKILL.md +17 -0
- package/{standards → claude/skills/markdown-craft/references}/markdown.md +14 -7
- package/claude/skills/plan-feature/REQUIREMENT.md +2 -1
- package/claude/skills/plan-feature/SKILL.md +14 -8
- package/{standards → claude/skills/plan-feature/references}/plan.md +33 -21
- package/claude/skills/plan-groundwork/SKILL.md +5 -6
- package/{standards → claude/skills/plan-groundwork/references}/groundwork.md +17 -4
- package/claude/skills/plan-intake/SKILL.md +2 -3
- package/{standards → claude/skills/plan-intake/references}/intake.md +17 -2
- package/claude/skills/plan-intake-answer/REQUIREMENT.md +1 -1
- package/claude/skills/plan-intake-answer/SKILL.md +1 -1
- package/claude/skills/review-address/SKILL.md +2 -2
- package/claude/skills/review-address/references/post-review-findings.md +1 -1
- package/claude/skills/review-craft/REQUIREMENT.md +3 -3
- package/claude/skills/review-craft/SKILL.md +2 -2
- package/claude/skills/review-craft/references/ui.md +4 -4
- package/claude/skills/review-pr/REQUIREMENT.md +1 -1
- package/claude/skills/review-pr/SKILL.md +5 -7
- package/claude/skills/review-pr/references/post.md +2 -2
- package/claude/skills/review-ui/REQUIREMENT.md +0 -1
- package/claude/skills/review-ui/SKILL.md +1 -1
- package/claude/skills/review-ui/references/post.md +1 -1
- package/claude/skills/role-orchestrator/REQUIREMENT.md +0 -3
- package/claude/skills/role-orchestrator/SKILL.md +8 -8
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +4 -3
- package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +7 -10
- package/claude/skills/role-orchestrator/references/orchestrator-parked.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +0 -3
- package/claude/skills/role-orchestrator/references/orchestrator-resume.md +1 -1
- package/claude/skills/role-planner/SKILL.md +2 -2
- package/claude/skills/role-reviewer/SKILL.md +1 -1
- package/claude/skills/role-worker/SKILL.md +2 -2
- package/claude/skills/session-compact/REQUIREMENT.md +1 -4
- package/claude/skills/session-compact/SKILL.md +3 -13
- package/claude/skills/session-compact/references/handoff-note.md +2 -2
- package/claude/skills/session-map/REQUIREMENT.md +1 -9
- package/claude/skills/session-map/SKILL.md +8 -16
- package/{standards → claude/skills/session-map/references}/session.md +17 -11
- package/claude/skills/session-relay/REQUIREMENT.md +1 -1
- package/claude/skills/session-resume/REQUIREMENT.md +4 -6
- package/claude/skills/session-resume/SKILL.md +3 -9
- package/claude/skills/session-worktree/SKILL.md +1 -1
- package/claude/skills/session-worktree/references/main-root-writes.md +2 -2
- package/claude/skills/systematic-debugging/REQUIREMENT.md +0 -1
- package/claude/skills/target-check/REQUIREMENT.md +3 -3
- package/claude/skills/target-check/SKILL.md +1 -1
- package/claude/skills/target-check/references/domains.md +1 -1
- package/claude/skills/target-setup/REQUIREMENT.md +4 -4
- package/claude/skills/target-setup/SKILL.md +3 -3
- package/claude/skills/target-setup/references/detect.md +1 -1
- package/claude/skills/target-setup/references/indexes.md +1 -1
- package/claude/skills/task-board/SKILL.md +4 -4
- package/claude/skills/task-board/references/archive.md +1 -1
- package/{standards → claude/skills/task-board/references}/board.md +9 -0
- package/claude/skills/task-board/references/decline.md +1 -1
- package/{standards → claude/skills/task-board/references}/tasks.md +13 -8
- package/claude/skills/teach-workspace/SKILL.md +1 -1
- package/claude/skills/teach-workspace/references/revisit.md +1 -1
- package/{standards → claude/skills/teach-workspace/references}/teach.md +17 -5
- package/claude/skills/test-first/REQUIREMENT.md +1 -1
- package/claude/skills/ux-audit/REQUIREMENT.md +2 -2
- package/claude/skills/ux-audit/SKILL.md +2 -3
- package/claude/skills/write-human/REQUIREMENT.md +0 -1
- package/claude/skills/write-human/SKILL.md +2 -2
- package/docs/agents/audits.md +1 -1
- package/docs/agents/canvas.md +1 -1
- package/docs/agents/commands.md +6 -10
- package/docs/agents/context-audit-checks.md +10 -24
- package/docs/agents/context-audit.md +7 -15
- package/docs/agents/context-classify.md +5 -5
- package/docs/agents/counts.md +5 -5
- package/docs/agents/drift-surfaces.md +2 -2
- package/docs/agents/index.md +3 -4
- package/docs/agents/install-and-sync.md +6 -6
- package/docs/agents/intake.md +1 -1
- package/docs/agents/markdown-audit.md +1 -1
- package/docs/agents/records-stale.md +5 -5
- package/docs/agents/records-validate.md +1 -1
- package/docs/agents/records.md +2 -2
- package/docs/agents/restated.md +1 -1
- package/docs/agents/routing.md +1 -1
- package/docs/agents/rule-citations.md +1 -1
- package/docs/agents/skills-audit.md +2 -2
- package/docs/agents/state-scoped-risk.md +2 -2
- package/docs/agents/superseded.md +2 -2
- package/docs/agents/tasks-plans.md +2 -2
- package/docs/agents/tasks-validate.md +1 -1
- package/docs/agents/tasks.md +1 -1
- package/docs/agents/teach.md +1 -1
- package/docs/agents/test-order.md +1 -1
- package/docs/agents/upstream.md +94 -0
- package/docs/target/migrations.md +24 -0
- package/docs/target/projects.md +5 -7
- package/docs/target/scenarios.md +2 -2
- package/docs/target/sync.md +3 -3
- package/docs/workflow/ai-workflow.md +7 -38
- package/docs/workflow/index.md +1 -1
- package/docs/workflow/operating-model.md +8 -8
- package/docs/workflow/parallel-features.md +7 -7
- package/docs/workflow/skill-map-on-request.md +13 -16
- package/docs/workflow/skill-map.md +20 -32
- package/docs/workflow/visual-design-workflow.md +11 -14
- package/governance/renames.toml +0 -23
- package/governance/rules/canon/605-worktrees.md +1 -1
- package/governance/rules/{standards → canon}/plan.md +5 -5
- package/governance/rules/canon/tasks.md +18 -0
- package/governance/rules/writing/markdown.md +23 -0
- package/governance/stacks/base.toml +1 -1
- package/package.json +1 -1
- package/scripts/core/install-check.sh +2 -2
- package/scripts/core/regen-web-previews.ts +1 -1
- package/src/audits/catalog.ts +5 -97
- package/src/claude/cases/authoring.ts +5 -18
- package/src/claude/cases/misc.ts +0 -17
- package/src/claude/cases/setup.ts +3 -20
- package/src/claude/cases/workflow.ts +0 -33
- package/src/claude/seeds.ts +1 -7
- package/src/claude/skills-audit.ts +1 -1
- package/src/claude/skills-reach.ts +1 -1
- package/src/cli/help.ts +3 -4
- package/src/cli.ts +2 -4
- package/src/commands/claude.ts +9 -15
- package/src/commands/context.ts +18 -280
- package/src/commands/feedback.ts +22 -91
- package/src/commands/gov.ts +2 -2
- package/src/commands/records.ts +24 -6
- package/src/commands/sync.ts +5 -3
- package/src/commands/upstream.ts +430 -0
- package/src/context/audit.ts +6 -15
- package/src/context/classify/extract.ts +6 -13
- package/src/context/classify/patterns.ts +2 -41
- package/src/context/classify/prompts.ts +2 -6
- package/src/context/classify/run.ts +3 -3
- package/src/context/folders.ts +7 -12
- package/src/context/gate.ts +11 -91
- package/src/context/requirements.ts +13 -4
- package/src/counts/scan.ts +3 -3
- package/src/design/components.ts +2 -2
- package/src/feedback/body.ts +0 -12
- package/src/gate/measures.ts +6 -57
- package/src/gate/stages.ts +0 -1
- package/src/gov/citations.ts +9 -3
- package/src/gov/restated.ts +3 -3
- package/src/markdown/structure.ts +3 -3
- package/src/migrate/record-layout.ts +3 -3
- package/src/records/backup.ts +1 -0
- package/src/records/ordinal.ts +1 -1
- package/src/records/prune.ts +2 -1
- package/src/records/stale-canonical.ts +2 -2
- package/src/records/validate.ts +55 -0
- package/src/roots/record.ts +2 -1
- package/src/sandbox/scenario.ts +115 -11
- package/src/shipped/references.ts +3 -3
- package/src/standards/read.ts +52 -1
- package/src/sync/seeds-report.ts +1 -1
- package/src/tasks/answers.ts +14 -1
- package/src/tasks/reach.ts +2 -2
- package/src/tasks/stack.ts +176 -0
- package/src/tasks/validate.ts +1 -1
- package/src/teach/workspace.ts +1 -1
- package/src/upstream/catalog.ts +112 -0
- package/src/upstream/cursor.ts +120 -0
- package/src/upstream/digest.ts +75 -0
- package/src/upstream/due.ts +128 -0
- package/src/upstream/releases.ts +170 -0
- package/standards/context.md +3 -5
- package/standards/design.md +2 -3
- package/standards/index.md +0 -23
- package/standards/publish.md +1 -1
- package/standards/rule.md +1 -1
- package/standards/skill.md +1 -1
- package/tooling/base/reference.md +1 -1
- package/tooling/claude/reference.md +6 -20
- package/tooling/claude/seeds/.claude/hooks/index-reminder.sh +1 -1
- package/tooling/claude/seeds/.claude/hooks/records-index.sh +8 -20
- package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +3 -3
- package/tooling/claude/seeds/CLAUDE.md +1 -3
- package/tooling/claude/seeds/canon/REQUIREMENTS.md +2 -9
- package/tooling/web/configs/e2e/screenshot.ts +0 -1
- package/claude/skills/auto-ship/references/review-findings.md +0 -20
- package/claude/skills/bash-cli-script/REQUIREMENT.md +0 -43
- package/claude/skills/bash-cli-script/SKILL.md +0 -53
- package/claude/skills/bash-cli-script/references/template.md +0 -19
- package/claude/skills/canon-operator/REQUIREMENT.md +0 -62
- package/claude/skills/canon-operator/SKILL.md +0 -113
- package/claude/skills/canon-rollout/REQUIREMENT.md +0 -59
- package/claude/skills/canon-rollout/SKILL.md +0 -140
- package/claude/skills/canon-rollout/references/failure-recovery.md +0 -20
- package/claude/skills/context-fold/references/anchor-sweep.md +0 -58
- package/claude/skills/context-fold/references/wireframe-sweep.md +0 -45
- package/claude/skills/create-standard/REQUIREMENT.md +0 -33
- package/claude/skills/create-standard/SKILL.md +0 -31
- package/claude/skills/design-extract/REQUIREMENT.md +0 -42
- package/claude/skills/design-extract/SKILL.md +0 -108
- package/claude/skills/draft-and-pick/references/frame.html +0 -118
- package/claude/skills/draft-doc/references/wireframes.md +0 -48
- package/claude/skills/index-lookup/REQUIREMENT.md +0 -35
- package/claude/skills/index-lookup/SKILL.md +0 -44
- package/claude/skills/markdown-propose/REQUIREMENT.md +0 -47
- package/claude/skills/markdown-propose/SKILL.md +0 -122
- package/claude/skills/markdown-propose/references/format.md +0 -118
- package/claude/skills/memory-capture/REQUIREMENT.md +0 -50
- package/claude/skills/memory-capture/SKILL.md +0 -117
- package/claude/skills/memory-review/REQUIREMENT.md +0 -52
- package/claude/skills/memory-review/SKILL.md +0 -129
- package/claude/skills/memory-review/references/later-phases.md +0 -118
- package/claude/skills/memory-review/references/receipt-format.md +0 -64
- package/claude/skills/project-commands/REQUIREMENT.md +0 -42
- package/claude/skills/project-commands/SKILL.md +0 -87
- package/claude/skills/repo-metadata/REQUIREMENT.md +0 -37
- package/claude/skills/repo-metadata/SKILL.md +0 -54
- package/claude/skills/restate-plainly/REQUIREMENT.md +0 -41
- package/claude/skills/restate-plainly/SKILL.md +0 -41
- package/claude/skills/review-branch/REQUIREMENT.md +0 -40
- package/claude/skills/review-branch/SKILL.md +0 -137
- package/claude/skills/seed-sync/REQUIREMENT.md +0 -45
- package/claude/skills/seed-sync/SKILL.md +0 -158
- package/claude/skills/sketch-design/REQUIREMENT.md +0 -38
- package/claude/skills/sketch-design/SKILL.md +0 -94
- package/claude/skills/ux-walkthrough/REQUIREMENT.md +0 -56
- package/claude/skills/ux-walkthrough/SKILL.md +0 -53
- package/claude/skills/ux-walkthrough/references/builds.md +0 -15
- package/claude/skills/ux-walkthrough/references/candidate-pages.md +0 -11
- package/claude/skills/ux-walkthrough/references/measuring.md +0 -22
- package/claude/skills/ux-walkthrough/references/record.md +0 -36
- package/claude/skills/ux-walkthrough/references/relay.md +0 -25
- package/docs/agents/architecture-record.md +0 -36
- package/docs/agents/review-classification.md +0 -76
- package/governance/rules/canon/601-indexes.md +0 -9
- package/governance/rules/canon/603-memory.md +0 -11
- package/governance/rules/claude/565-behavior.md +0 -27
- package/governance/rules/claude/567-planning.md +0 -16
- package/governance/rules/claude/575-hooks.md +0 -16
- package/governance/rules/claude/576-settings.md +0 -13
- package/governance/rules/claude/592-claude-md.md +0 -19
- package/governance/rules/lang/120-bash.md +0 -18
- package/governance/rules/standards/architecture.md +0 -13
- package/governance/rules/standards/groundwork.md +0 -13
- package/governance/rules/standards/intake.md +0 -12
- package/governance/rules/standards/markdown.md +0 -16
- package/governance/rules/standards/memory.md +0 -12
- package/governance/rules/standards/ready.md +0 -13
- package/governance/rules/standards/requirements.md +0 -12
- package/governance/rules/standards/session.md +0 -13
- package/governance/rules/standards/tasks.md +0 -15
- package/governance/rules/standards/teach.md +0 -14
- package/governance/rules/standards/wiki.md +0 -13
- package/governance/rules/standards/wireframes.md +0 -13
- package/governance/rules/writing/800-prose.md +0 -15
- package/src/autoship/classify.ts +0 -75
- package/src/autoship/paths.ts +0 -50
- package/src/commands/autoship.ts +0 -129
- package/src/commands/repo.ts +0 -393
- package/src/context/architecture.ts +0 -654
- package/src/context/wireframe-states.ts +0 -238
- package/src/repo/metadata.ts +0 -206
- package/standards/architecture.md +0 -127
- package/standards/memory.md +0 -158
- package/standards/mermaid.md +0 -64
- package/standards/requirements.md +0 -79
- package/standards/wiki.md +0 -77
- package/standards/wireframes.md +0 -143
- package/tooling/claude/seeds/.claude/memory/index.md +0 -8
- package/tooling/claude/seeds/canon/ARCHITECTURE.md +0 -23
- package/tooling/claude/seeds/canon/wireframes/index.md +0 -8
- /package/{standards → claude/skills/create-skill/references}/skill-practice.md +0 -0
- /package/{standards → claude/skills/create-skill/references}/skill-requirement.md +0 -0
- /package/{standards → claude/skills/plan-feature/references}/plan-lifecycle.md +0 -0
- /package/{standards → claude/skills/plan-groundwork/references}/groundwork-spikes.md +0 -0
- /package/{standards → claude/skills/task-board/references}/tasks-decline.md +0 -0
- /package/{standards → claude/skills/teach-workspace/references}/glossary.md +0 -0
|
@@ -5,7 +5,7 @@ description: The five architecture views with each one's question, source signal
|
|
|
5
5
|
|
|
6
6
|
# Architecture set
|
|
7
7
|
|
|
8
|
-
`draft-figure` reads this file when the request names an architecture view. It shapes the subject, then the figure goes through `${CLAUDE_SKILL_DIR}/references/mermaid.md` like any other graph-shaped figure. The destination stays the one the user named.
|
|
8
|
+
`draft-figure` reads this file when the request names an architecture view. It shapes the subject, then the figure goes through `${CLAUDE_SKILL_DIR}/references/mermaid-path.md` like any other graph-shaped figure. The destination stays the one the user named.
|
|
9
9
|
|
|
10
10
|
## The five views
|
|
11
11
|
|
|
@@ -14,7 +14,7 @@ Draw the view the request names. Each answers one question and is drawn from one
|
|
|
14
14
|
| View | Question it answers | Source signal | Diagram type |
|
|
15
15
|
| -------------- | ------------------------------------------------------- | ------------------------------------------------- | ------------------------------------ |
|
|
16
16
|
| System context | Who uses the system, what it talks to, where it ends | `canon/REQUIREMENTS.md` | `flowchart TB` |
|
|
17
|
-
| Components | The layered structure inside the boundary | `canon/
|
|
17
|
+
| Components | The layered structure inside the boundary | `canon/context/index.md` and the folder layout | `flowchart TB` with `subgraph` lanes |
|
|
18
18
|
| Request flow | A request lifecycle, an agent loop, or an actor handoff | the entry point and its handlers | `sequenceDiagram` |
|
|
19
19
|
| Data pipeline | Retrieval, ranking, queues, or ETL | the pipeline's modules | `flowchart TB` |
|
|
20
20
|
| Deployment | Hosts, services, and infrastructure config | deploy config, compose files, infrastructure code | `flowchart TB` |
|
|
@@ -25,8 +25,8 @@ Stay inside `flowchart` and `sequenceDiagram`. C4, state, ER, and class diagrams
|
|
|
25
25
|
|
|
26
26
|
## Sources
|
|
27
27
|
|
|
28
|
-
- Read `canon/REQUIREMENTS.md`, `canon/
|
|
29
|
-
- When neither planning file exists and no folder structure names a boundary, stop: `❌ No source signal for <view>. Add canon/
|
|
28
|
+
- Read `canon/REQUIREMENTS.md`, `canon/context/index.md`, `CLAUDE.md`, and the language manifest (`package.json`, `pyproject.toml`, `Cargo.toml`) when present, plus the top-level folder layout through `ls`. Do not recurse speculatively.
|
|
29
|
+
- 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
30
|
- 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
31
|
|
|
32
32
|
## Caption and prose
|
|
@@ -26,6 +26,6 @@ canon capture <destination> --selector figure --out .canon/tmp/figures/
|
|
|
26
26
|
- Fix a clipped label, a misaligned shape, or an arrow that misses its target in the destination and capture again. Stop after two correction passes.
|
|
27
27
|
- When the capture fails, keep the figure and name the skipped check in the output.
|
|
28
28
|
|
|
29
|
-
A Mermaid figure bound for a rendered page takes this same capture, since its standalone PNG is measured in the renderer's own fonts and can read clean while the page clips it. A clipped group title there takes the scoped overflow style `${CLAUDE_SKILL_DIR}/references/mermaid.md` states.
|
|
29
|
+
A Mermaid figure bound for a rendered page takes this same capture, since its standalone PNG is measured in the renderer's own fonts and can read clean while the page clips it. A clipped group title there takes the scoped overflow style `${CLAUDE_SKILL_DIR}/references/mermaid-path.md` states.
|
|
30
30
|
|
|
31
31
|
A markdown destination has no page to load, so the read of the markup, or of the standalone render on the Mermaid path, is the whole check there.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Mermaid path
|
|
3
|
+
description: The hand-drawn render config, the SVG and PNG pair, the hex rewrite, the scoped overflow fallback, the label check, and the PNG read-back with its two-pass stop, read by draft-figure once a figure routes through Mermaid
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mermaid path
|
|
7
|
+
|
|
8
|
+
`draft-figure` reads this file when Step 3 routes a figure through Mermaid, whether the subject is graph-shaped or an architecture view the architecture set already shaped.
|
|
9
|
+
|
|
10
|
+
## Draft the fence
|
|
11
|
+
|
|
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
|
+
- Read every node and subgraph label against the banned characters `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md` lists. The audit hook skips every line inside a fence, so a label carrying a banned character passes silently while the same character in the caption is caught. Reading the labels is the only gate they have. A colon works as a replacement inside a label.
|
|
14
|
+
|
|
15
|
+
## Render
|
|
16
|
+
|
|
17
|
+
Render with the hand-drawn look and the figure font stack, writing scratch files under `.canon/tmp/figures/`:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
mkdir -p .canon/tmp/figures
|
|
21
|
+
cat <<'EOF' >.canon/tmp/figures/<slug>.json
|
|
22
|
+
{"look": "handDrawn", "themeVariables": {"fontFamily": "Virgil, Excalifont, cursive"}}
|
|
23
|
+
EOF
|
|
24
|
+
bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.svg -c .canon/tmp/figures/<slug>.json
|
|
25
|
+
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
|
+
```
|
|
27
|
+
|
|
28
|
+
Render both formats in one pass. The SVG is what 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
|
+
|
|
30
|
+
Use `bunx` when bun is available, falling back to `npx -y @mermaid-js/mermaid-cli ...` otherwise.
|
|
31
|
+
|
|
32
|
+
Before the first render in a project, say what is about to block:
|
|
33
|
+
|
|
34
|
+
```plaintext
|
|
35
|
+
Rendering to verify layout. The first run downloads the Mermaid CLI and takes about 15 seconds.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Rewrite the colors
|
|
39
|
+
|
|
40
|
+
Rewrite every stroke, fill, and text color the renderer wrote as a literal hex value into the custom property the host stylesheet defines, per the color rule in `${CLAUDE_SKILL_DIR}/../../standards/figures.md`. Mermaid's own theme has no notion of a custom property, so this is a source edit made to the rendered SVG, not a config option.
|
|
41
|
+
|
|
42
|
+
## Clipped titles
|
|
43
|
+
|
|
44
|
+
- 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, that sets `overflow: visible` on the clipped label's `foreignObject` and centers the label within it, so the wider text spills past both edges evenly. The style hides the mismatch for a title and does nothing for a node label crowding its box, which takes a shorter label instead.
|
|
46
|
+
|
|
47
|
+
## Fonts
|
|
48
|
+
|
|
49
|
+
Check whether the project ran `canon design css --figures`. The figure and figcaption styling ships unconditionally either way, but that flag alone embeds the Virgil and Excalifont font files. Without it, the figure falls back to the browser's own generic `cursive` face rather than the intended hand-drawn font, and the output names that gap when the flag was not passed.
|
|
50
|
+
|
|
51
|
+
## Read the render back
|
|
52
|
+
|
|
53
|
+
- 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.
|
|
54
|
+
- Fix the Mermaid source and re-render on a defect. Stop after two correction passes. When a defect survives, keep the figure and name the defect in the output rather than reporting a false verification.
|
|
55
|
+
- When the render fails for any reason, no browser engine, no network, no package manager, continue to the confirm step and name the skipped check. A missing renderer degrades the loop rather than failing it.
|
|
@@ -1,55 +1,64 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Mermaid
|
|
3
|
-
description:
|
|
2
|
+
title: Mermaid reference
|
|
3
|
+
description: Direction and layout, node and edge budgets, accessibility fields, label punctuation, and render verification for a Mermaid diagram
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Mermaid
|
|
6
|
+
# Mermaid reference
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Applies to every Mermaid fence, wherever it is written. A fence sits inside a document some other standard shapes, so this file reaches the drawing and stops at the fence markers.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Scope
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
- Read every node and subgraph label against the banned characters `${CLAUDE_SKILL_DIR}/../../standards/markdown.md` lists. The audit hook skips every line inside a fence, so a label carrying a banned character passes silently while the same character in the caption is caught. Reading the labels is the only gate they have. A colon works as a replacement inside a label.
|
|
12
|
+
Governs the Mermaid attribute wherever a fence is written, naming no path because an attribute standard governs a drawing rather than a document type: direction and layout, node and edge budgets, the accessibility fields, how punctuation reaches a label, and how a rendered diagram is verified. It carries no template, since a fence has no document shape of its own and sits inside one another standard sets.
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
Does not govern:
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
- Which architecture view a figure draws and what question it answers: the `draft-figure` skill's architecture set
|
|
17
|
+
- Language, word choice, punctuation, and formatting in the prose around a fence: `markdown.md`
|
|
18
|
+
- Voice, rhythm, and sentence construction in that prose: the `write-human` skill
|
|
19
|
+
- The mechanism behind any component a diagram draws: `context.md`
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
mkdir -p .canon/tmp/figures
|
|
21
|
-
cat <<'EOF' >.canon/tmp/figures/<slug>.json
|
|
22
|
-
{"look": "handDrawn", "themeVariables": {"fontFamily": "Virgil, Excalifont, cursive"}}
|
|
23
|
-
EOF
|
|
24
|
-
bunx -y @mermaid-js/mermaid-cli -i .canon/tmp/figures/<slug>.mmd -o .canon/tmp/figures/<slug>.svg -c .canon/tmp/figures/<slug>.json
|
|
25
|
-
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
|
-
```
|
|
21
|
+
## What a working diagram looks like
|
|
27
22
|
|
|
28
|
-
|
|
23
|
+
A diagram works when a reviewer holding the rendered image, and nothing else, answers yes four times:
|
|
29
24
|
|
|
30
|
-
|
|
25
|
+
- Did the declared direction hold?
|
|
26
|
+
- Is every row of siblings free of a sequential reading the system does not have?
|
|
27
|
+
- Is every convergence free of a crossing edge bundle?
|
|
28
|
+
- Is it taller than wide, outside a sequence diagram?
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
A diagram failing these is non-conforming even when it satisfies every shape rule below. The rules are the means. These four questions are the test.
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
Rendering to verify layout. The first run downloads the Mermaid CLI and takes about 15 seconds.
|
|
36
|
-
```
|
|
32
|
+
## Layout
|
|
37
33
|
|
|
38
|
-
|
|
34
|
+
- Declare `flowchart TB` by default. Mermaid ignores a subgraph's direction whenever that subgraph links outward, and an architecture diagram links across its subgraphs as the normal case, so top-bottom is a declaration rather than a guarantee.
|
|
35
|
+
- Restructure a diagram that renders diagonal or left-to-right. Repeating the direction keyword does not fix it.
|
|
36
|
+
- Render a context, component, or pipeline diagram taller than wide. A `sequenceDiagram` is wide by construction and is exempt.
|
|
37
|
+
- 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.
|
|
38
|
+
- Do not converge many edges on one node from one side. A crossing bundle is unreadable whatever it encodes.
|
|
39
|
+
- Keep node labels short. Three or four words max. Detail goes in the paragraph below the diagram.
|
|
40
|
+
- Use `<br/>` for a second short line on a node when the label is two ideas, never for a sentence.
|
|
41
|
+
- Subgraphs are for grouping unrelated lanes such as offline versus online or browser versus server. Do not subgraph a single linear flow.
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
## Budgets
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
- Hold a diagram to roughly 5 to 10 nodes. Split it past 15.
|
|
46
|
+
- Watch edge count harder than node count. It binds first, and a diagram whose edges outnumber its nodes is already too dense to read.
|
|
47
|
+
- Treat a diagram that cannot be described in one sentence as two diagrams.
|
|
48
|
+
- Warn rather than refuse on a budget, and name the split that would fix it. These numbers come from published Mermaid practice rather than from a measurement against a corpus, so a hard refusal on them will be wrong sometimes and unarguable when it is.
|
|
43
49
|
|
|
44
|
-
|
|
45
|
-
- When the in-page check shows a clipped title, add a `<style>` inside the SVG, scoped to that SVG's own id, that sets `overflow: visible` on the clipped label's `foreignObject` and centers the label within it, so the wider text spills past both edges evenly. The style hides the mismatch for a title and does nothing for a node label crowding its box, which takes a shorter label instead.
|
|
50
|
+
## Labels
|
|
46
51
|
|
|
47
|
-
|
|
52
|
+
- Apply the punctuation bans in `markdown.md` to node and subgraph labels. A label is not prose, so a check scoped to prose does not reach it, and reading the labels before shipping is the only gate they have.
|
|
53
|
+
- Treat the prose around a fence and the text inside it as two surfaces. The paragraphs are prose and follow `markdown.md` and the `write-human` skill. The fenced block is not, which is why a check scoped to prose is the wrong thing to rely on for what sits inside it.
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
## Accessibility
|
|
50
56
|
|
|
51
|
-
|
|
57
|
+
- Give every diagram `accTitle` and `accDescr`. `accTitle` names what the diagram answers. `accDescr` states the structure in one sentence for a reader who cannot see the render.
|
|
52
58
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
59
|
+
## Verification
|
|
60
|
+
|
|
61
|
+
- Judge a diagram from its rendered image, not from its source. Direction, sibling rows, and edge bundles are visible only in the output.
|
|
62
|
+
- Render to PNG. An SVG export reads back as markup with no recoverable spatial meaning.
|
|
63
|
+
- Apply the four questions above as a reviewer, against the same render the author judged.
|
|
64
|
+
- State which verification was skipped when no renderer is available. A diagram written without a render is still shippable, and one reported as verified without a render is not.
|
|
@@ -24,7 +24,7 @@ A session building this without a shared loop restates `draft-and-pick`'s render
|
|
|
24
24
|
|
|
25
25
|
- Restate `draft-and-pick`'s render, hand-off, pick, or loop mechanics
|
|
26
26
|
- Add a `## Logo` section to `standards/design.md`'s fixed section set. `src/design/parse.ts` reads a fixed key set, and no outcome behind this skill asks for a schema change.
|
|
27
|
-
- Modify `draft-and-pick`, `
|
|
27
|
+
- Modify `draft-and-pick`, `canon capture`, or `canon design render`. This skill composes all three and extending any of them is a separate change.
|
|
28
28
|
- Assume this skill's own invocation frequency needs no check. Whether anything reaches for it beyond an operator typing its name has no answer at creation time, so a review pass some months in should read that back rather than take it on faith.
|
|
29
29
|
|
|
30
30
|
## Guards
|
|
@@ -18,7 +18,7 @@ One identity rendered twice: the same mark sized down to an icon sequence and co
|
|
|
18
18
|
|
|
19
19
|
Read these in parallel, skipping any that do not exist:
|
|
20
20
|
|
|
21
|
-
- `canon/DESIGN.md`: the `## Personality`, `## Color`, and `## Typography` sections
|
|
21
|
+
- `canon/DESIGN.md`: the `## Personality`, `## Color`, and `## Typography` sections
|
|
22
22
|
- `canon/REQUIREMENTS.md`: the `## Personality` paragraph, when `canon/DESIGN.md` carries none
|
|
23
23
|
- `CLAUDE.md`: the project's stated voice, when neither file above carries a personality signal
|
|
24
24
|
|
|
@@ -61,17 +61,19 @@ Announce which tier decided, naming the tier rather than the path alone. On tier
|
|
|
61
61
|
|
|
62
62
|
## Step 4: name the decision and the arms
|
|
63
63
|
|
|
64
|
-
Follow `${CLAUDE_SKILL_DIR}/../draft-and-pick/SKILL.md` Step 1, with the decision fixed rather than derived: "the project's logo mark and its composition into the social card." Vary the mark's shape or style across arms, keeping the card's type and layout fixed, per that skill's one-property rule. Draft each arm already inside the full 1200x630 card frame, mark and type together, so the pick settles the shape and the composition in one choice. Arm 0 is the current mark when the folder from Step 3 already holds a logo file (`favicon.svg`, `favicon.ico`, `logo.svg`, or similar). Arms start at 1 otherwise.
|
|
64
|
+
Follow `${CLAUDE_SKILL_DIR}/../draft-and-pick/SKILL.md` Step 1, with the decision fixed rather than derived: "the project's logo mark and its composition into the social card." Vary the mark's shape or style across arms, keeping the card's type and layout fixed, per that skill's one-property rule. Draft each arm already inside the full 1200x630 card frame, mark and type together, and add its canvas frame at `--width 1200 --height 630`, so the pick settles the shape and the composition in one choice. Arm 0 is the current mark when the folder from Step 3 already holds a logo file (`favicon.svg`, `favicon.ico`, `logo.svg`, or similar). Arms start at 1 otherwise.
|
|
65
65
|
|
|
66
66
|
Structure every arm as a `.mark` element, the inline SVG alone, nested inside a `.card` element, the full composition, so Step 6 can address either without re-deriving them.
|
|
67
67
|
|
|
68
68
|
## Step 5: draft, render, pick, and loop
|
|
69
69
|
|
|
70
|
-
Follow `${CLAUDE_SKILL_DIR}/../draft-and-pick/SKILL.md` Steps 2 through 5 against the arms from Step 4:
|
|
70
|
+
Follow `${CLAUDE_SKILL_DIR}/../draft-and-pick/SKILL.md` Steps 2 through 5 against the arms from Step 4: draft the arms as frames on a canvas page, render and hand off, take the pick, and loop on it.
|
|
71
|
+
|
|
72
|
+
The final icon and card renders below are not arms, so they stay off the canvas. Call the folder they render from `<dest>`, being `.canon/tmp/<slug>/` under the slug `draft-and-pick` Step 1 derived, which is where this project puts every temporary write.
|
|
71
73
|
|
|
72
74
|
## Step 6: finalize the mark and the icons
|
|
73
75
|
|
|
74
|
-
This step and Step 7 replace `draft-and-pick`'s own Step 6, since the pick here produces several final files rather than one applied surface.
|
|
76
|
+
This step and Step 7 replace `draft-and-pick`'s own Step 6 items 1 and 2, since the pick here produces several final files rather than one applied surface. Its archive capture, its page delete, and its server stop still run, after Step 7.
|
|
75
77
|
|
|
76
78
|
1. Extract the picked arm's `.mark` markup as the final vector source. Write it to `<write-folder>/favicon.svg`.
|
|
77
79
|
2. Under `<dest>/render/`, write one `icon-<w>x<h>.html` page per Step 2 size, carrying the picked `.mark` markup. Give every page's captured element the shared class `.render`, so one capture call renders the whole batch regardless of the size spread. `canon capture` opens every page at a fixed 2x device scale factor and screenshots the element at that scale, so declare each `.render` element at half its target dimension, `<w>/2` by `<h>/2`, to land the captured PNG on the literal target size rather than double it. Declare no font on them, since each holds the mark alone and `canon capture` skips the font check on an element with no text. A generic family such as `system-ui` would be refused if text ever sat inside one.
|
|
@@ -135,9 +137,9 @@ canon capture <dest>/render/og-image.html --selector .render --out <write-folder
|
|
|
135
137
|
|
|
136
138
|
It takes its own call rather than riding Step 6's batch, since Step 6 runs before this step chooses a path and the batch is already captured by the time the choice is made. Say that the card shipped as a PNG with no source, and that the project gains one when it grows a route to hold the composition.
|
|
137
139
|
|
|
138
|
-
### Closing the scratch folder
|
|
140
|
+
### Closing the scratch folder and the canvas
|
|
139
141
|
|
|
140
|
-
Delete `<dest>`
|
|
142
|
+
Delete `<dest>` once both captures land, then close the canvas through `draft-and-pick` Step 6 items 3 to 8, which archive every arm and delete the pages the run added. The route is not a leftover variant that close forbids: a variant is one of several candidates none of which was chosen, and the route holds the arm the operator picked.
|
|
141
143
|
|
|
142
144
|
A project whose card was generated before this route existed keeps its PNG. Say so rather than regenerating it, since re-running the pick loop spends an operator's attention on a file nobody complained about, and the next real edit to the card picks up the route.
|
|
143
145
|
|
|
@@ -158,6 +160,6 @@ Card source: <the route, captured through the card server|a scratch page, since
|
|
|
158
160
|
Cite these rather than restating them.
|
|
159
161
|
|
|
160
162
|
- `draft-and-pick` owns Steps 1 through 5 of the render-and-pick loop, cited above
|
|
161
|
-
- `
|
|
163
|
+
- `canon:canvas` carries a picked direction into `canon/DESIGN.md`. This skill only reads it.
|
|
162
164
|
- `canon capture` owns the render mechanics, its font refusal, its fixed 2x scale factor, and its reported dimensions. It already reads an `http(s)://` source, where `--out` names the destination PNG rather than a directory, so the route capture needs nothing added to it.
|
|
163
165
|
- The `astro` tooling stack owns the card route's scaffold, its second config, and the exclusion check, read with `canon tooling reference astro`. This skill writes into the route and never reshapes it.
|
|
@@ -51,4 +51,4 @@ Without this skill, a session holding finished files that hands them to a worker
|
|
|
51
51
|
- `role-worker` copies the folder into a worktree and ships it. This stops once the three artifacts exist.
|
|
52
52
|
- `task-board` creates a task file for a row with no ready folder. This writes the row it needs beside the folder and calls the same verbs.
|
|
53
53
|
- `git-ship` ships a branch, and a ready folder never reaches one.
|
|
54
|
-
- `
|
|
54
|
+
- `references/ready.md` owns the folder's shape and lifecycle, and this skill owns the procedure that produces it, the way `write-human` and the `markdown` rule split.
|
|
@@ -11,9 +11,9 @@ A warm session that has already written a change hands the exact text to the wor
|
|
|
11
11
|
|
|
12
12
|
Read these in parallel before writing:
|
|
13
13
|
|
|
14
|
-
- `${CLAUDE_SKILL_DIR}
|
|
15
|
-
- `${CLAUDE_SKILL_DIR}
|
|
16
|
-
- `${CLAUDE_SKILL_DIR}
|
|
14
|
+
- `${CLAUDE_SKILL_DIR}/references/ready.md`: the folder layout, the overview frontmatter, the mirrored tree, and the thin-plan contract
|
|
15
|
+
- `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan.md`: the plan's sections and its answer contract
|
|
16
|
+
- `${CLAUDE_SKILL_DIR}/../task-board/references/tasks.md`: the task file's shape and origin lines
|
|
17
17
|
- `${CLAUDE_SKILL_DIR}/references/assembly.md`: the overview and thin-plan templates and the destination match check
|
|
18
18
|
|
|
19
19
|
## Guards
|
|
@@ -61,7 +61,7 @@ install -D -m 0644 <source> <main-root>/.canon/ready/<nn>-<slug>/<destination pa
|
|
|
61
61
|
|
|
62
62
|
## Step 5: write the thin plan
|
|
63
63
|
|
|
64
|
-
Write `<main-root>/.canon/plans/feature-<slug>.md` from the template, by heredoc, per `${CLAUDE_SKILL_DIR}
|
|
64
|
+
Write `<main-root>/.canon/plans/feature-<slug>.md` from the template, by heredoc, per `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan.md`.
|
|
65
65
|
|
|
66
66
|
- List every Step 1 destination under `**Files to touch:**`, each with one clause on why it changes, pointing at the folder's copy rather than restating it.
|
|
67
67
|
- Add a `**Constraints:**` line naming the ready folder as the verbatim source for those paths.
|
|
@@ -71,7 +71,7 @@ Run the match check in `${CLAUDE_SKILL_DIR}/references/assembly.md` before going
|
|
|
71
71
|
|
|
72
72
|
## Step 6: write the task
|
|
73
73
|
|
|
74
|
-
Write `<main-root>/.canon/tasks/<label>-<slug>.md` by heredoc, from the label Step 2 claimed, without calling the verb again, since a second call would claim a different label. Its frontmatter, H1, and `## Outcomes` follow `${CLAUDE_SKILL_DIR}
|
|
74
|
+
Write `<main-root>/.canon/tasks/<label>-<slug>.md` by heredoc, from the label Step 2 claimed, without calling the verb again, since a second call would claim a different label. Its frontmatter, H1, and `## Outcomes` follow `${CLAUDE_SKILL_DIR}/../task-board/references/tasks.md`. Write a `Ready:` line beside the `Plan:` line pointing at the folder, then point the task at the plan through the verb:
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
77
|
canon tasks plan-link <task-stem> .canon/plans/feature-<slug>.md --json
|
|
@@ -79,7 +79,7 @@ canon tasks plan-link <task-stem> .canon/plans/feature-<slug>.md --json
|
|
|
79
79
|
|
|
80
80
|
Branch on the record rather than on the exit. The `Ready:` line orients a worker reading the task, and `canon tasks archive` reads it to move the folder on ship.
|
|
81
81
|
|
|
82
|
-
A task file with no row is a dropped task, so place the row in the same pass. The plan exists, so the row takes `## Run now`, per the tests in `${CLAUDE_SKILL_DIR}
|
|
82
|
+
A task file with no row is a dropped task, so place the row in the same pass. The plan exists, so the row takes `## Run now`, per the tests in `${CLAUDE_SKILL_DIR}/../task-board/references/board.md`. A path `canon tasks plan-reach` reports as claimed is a shared file rather than a hold. Name each one and its holder wherever the row is reported below, so whoever controls the board decides whether a contract, a relocation, or a sweep moves the row to `## Up next`.
|
|
83
83
|
|
|
84
84
|
Check the roster the way `canon:task-board` Step 4 does, reading `canon sessions list --self --json` for this session and `canon sessions list --json` for a row from the same repository, under another `sessionId`, whose `name` starts with `orchestrator-`. Treat a refused read as a roster read that failed.
|
|
85
85
|
|
|
@@ -5,7 +5,7 @@ description: The overview and thin-plan templates for a ready folder, and the ma
|
|
|
5
5
|
|
|
6
6
|
# Assembly
|
|
7
7
|
|
|
8
|
-
Loaded from Step 3 and Step 5 of `draft-ready`. The shape rules live in `${CLAUDE_SKILL_DIR}
|
|
8
|
+
Loaded from Step 3 and Step 5 of `draft-ready`. The shape rules live in `${CLAUDE_SKILL_DIR}/references/ready.md` and `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan.md`, so this file holds the fill-in forms and the one check that compares them.
|
|
9
9
|
|
|
10
10
|
## The overview
|
|
11
11
|
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Ready reference
|
|
3
3
|
description: Folder layout, ordinal naming, the overview frontmatter, the thin-plan contract, and the archive lifecycle for a finished-file handoff
|
|
4
|
-
paths:
|
|
5
|
-
- '.canon/ready/**'
|
|
6
|
-
rule:
|
|
7
|
-
- 'Load the `canon:draft-ready` skill to write a ready folder, its overview, the thin plan, and the task row. It owns the procedure. Report it rather than proceeding silently when it does not resolve, since it ships with the plugin and this rule ships with the CLI.'
|
|
8
4
|
---
|
|
9
5
|
|
|
10
6
|
# Ready reference
|
|
@@ -13,6 +9,18 @@ Applies to a ready folder at `.canon/ready/<nn>-<slug>/`. A warm session that ha
|
|
|
13
9
|
|
|
14
10
|
The folder is gitignored, and backed wherever a records remote is configured: `canon records push` and `canon records pull` protect it against the machine being lost there, refuse with `no-remote` where it is not, and protect nothing against a folder deleted before anyone has pushed. That is why the archive step below is a move rather than a cleanup.
|
|
15
11
|
|
|
12
|
+
## Contents
|
|
13
|
+
|
|
14
|
+
- [Scope](#scope)
|
|
15
|
+
- [What a working ready folder looks like](#what-a-working-ready-folder-looks-like)
|
|
16
|
+
- [Folder name](#folder-name)
|
|
17
|
+
- [00-overview.md](#00-overviewmd) <!-- canon-allow-reference: a heading anchor, not a pull request number -->
|
|
18
|
+
- [The mirrored tree](#the-mirrored-tree)
|
|
19
|
+
- [The thin-plan contract](#the-thin-plan-contract)
|
|
20
|
+
- [Lifecycle](#lifecycle)
|
|
21
|
+
- [Anti-patterns](#anti-patterns)
|
|
22
|
+
- [Template](#template)
|
|
23
|
+
|
|
16
24
|
## Scope
|
|
17
25
|
|
|
18
26
|
The `draft-ready` skill owns the procedure that writes a ready folder, and this standard owns the shape it writes to.
|
|
@@ -68,7 +76,7 @@ Below the frontmatter, state in prose what the worker still owns beyond copying
|
|
|
68
76
|
|
|
69
77
|
## The mirrored tree
|
|
70
78
|
|
|
71
|
-
- Every other file in the folder sits at the same relative path its destination has in the project, so `standards/ready.md` inside the destination tree sits at `<nn>-<slug>/standards/ready.md` inside the ready folder.
|
|
79
|
+
- Every other file in the folder sits at the same relative path its destination has in the project, so `standards/ready.md` inside the destination tree sits at `<nn>-<slug>/standards/ready.md` inside the ready folder. <!-- canon-allow-reference: the example shows a target tree, where the standard sits under standards/ -->
|
|
72
80
|
- Carry no file the destination tree would not carry. A ready folder is a source for `git mv`-shaped copies, not a scratch pad for the warm session's own notes. Anything else belongs in the plan or in the pull request body.
|
|
73
81
|
- Write each file exactly as it should land. The worker copies verbatim and edits only what the gate or the overview's own list requires, so a placeholder or a half-finished passage ships as written.
|
|
74
82
|
|
|
@@ -14,7 +14,7 @@ Format an issue from session context following the issue standard, then file it
|
|
|
14
14
|
Read these in parallel:
|
|
15
15
|
|
|
16
16
|
- `${CLAUDE_SKILL_DIR}/references/issue.md`: issue title, labels, body sections, and banned phrases
|
|
17
|
-
- `${CLAUDE_SKILL_DIR}
|
|
17
|
+
- `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md`: punctuation and formatting for all generated text
|
|
18
18
|
- The `write-human` skill: voice, rhythm, and sentence construction for all generated text
|
|
19
19
|
|
|
20
20
|
Then gather repo context in parallel:
|
|
@@ -30,7 +30,7 @@ Does not govern:
|
|
|
30
30
|
## Labels
|
|
31
31
|
|
|
32
32
|
- Apply `bug` for a defect and `enhancement` for a task or improvement. Both are GitHub default labels.
|
|
33
|
-
- Apply `feedback` to a report filed through `canon feedback
|
|
33
|
+
- Apply `feedback` to a report filed through `canon feedback`, which sets the label unconditionally rather than a session choosing it. It is not a GitHub default. Create it once per project with `gh label create feedback`.
|
|
34
34
|
- A label that does not exist makes `gh` reject the issue. Create each one once with `gh label create`.
|
|
35
35
|
- One label per issue unless a second genuinely applies.
|
|
36
36
|
|
|
@@ -83,11 +83,11 @@ Fix the feedback CLI so it applies the `feedback` label.
|
|
|
83
83
|
|
|
84
84
|
## Details
|
|
85
85
|
|
|
86
|
-
`canon feedback
|
|
86
|
+
`canon feedback` opens an issue with no label, so `canon-feedback-triage` never lists it.
|
|
87
87
|
|
|
88
88
|
## Context
|
|
89
89
|
|
|
90
|
-
Run a piped `canon feedback
|
|
90
|
+
Run a piped `canon feedback`, then check the issue carries no `feedback` label.
|
|
91
91
|
|
|
92
92
|
## Proposed
|
|
93
93
|
|
|
@@ -14,7 +14,7 @@ Read these files in parallel:
|
|
|
14
14
|
- `${CLAUDE_SKILL_DIR}/../../standards/branch.md`: branch format, valid types, and constraints
|
|
15
15
|
- `${CLAUDE_SKILL_DIR}/../../standards/pr.md`: structure, rules, and banned phrases
|
|
16
16
|
- `${CLAUDE_SKILL_DIR}/references/labels.md`: label map format, matching, and the missing-label warning. Skip when the project has no `canon/config/pr-labels.toml` and no `.claude/canon/pr-labels.toml`.
|
|
17
|
-
- `${CLAUDE_SKILL_DIR}
|
|
17
|
+
- `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md`: punctuation and formatting for all generated text
|
|
18
18
|
- The `write-human` skill: voice, rhythm, and sentence construction for all generated text
|
|
19
19
|
- `${CLAUDE_SKILL_DIR}/../../standards/versioning.md`: phase label vs semver discipline
|
|
20
20
|
|
|
@@ -23,13 +23,11 @@ The sequence also reaches the remote on work nothing re-checked. This skill is t
|
|
|
23
23
|
- Name the condition under which the closing block is not emitted, since a caller that closes on its own block leaves two instructions about the last line and nothing deciding between them
|
|
24
24
|
- Watch continuous integration to a terminal state in the background, so the session stays reachable while CI runs, and stop on a failure naming the check
|
|
25
25
|
- Read the evidence thread with `canon pr evidence <number> --check --json` once CI passes, run what it reports owed, and report done only on `settled`, since a chain that never reads the thread ships a regenerated image with no comment and no preview and leaves the controller to repair it
|
|
26
|
-
- Stop memory work at the Propose phase
|
|
27
26
|
|
|
28
27
|
## Must not
|
|
29
28
|
|
|
30
29
|
- Auto-trigger. Shipping is a decision the user takes, and the tool permission dialog on the push and the pull request is the gate that holds it now that the frontmatter no longer disables model invocation.
|
|
31
30
|
- Fix a failing check. The stop is the point, since a green pull request reached by auto-fix hides what broke.
|
|
32
|
-
- Run the memory Apply phase. Promoting an entry changes how the agent operates and ships as its own change.
|
|
33
31
|
- Attempt a fix for a failing verify. The user is already making one, which is what brought the run back here.
|
|
34
32
|
- Implement or review. This chain starts from work already believed done.
|
|
35
33
|
- Report the chain done before the CI watch exits. A turn ending on the watch line leaves a pull request still waiting on CI, and a `✅ Shipped` there claims a result nothing has read.
|
|
@@ -9,7 +9,7 @@ metadata:
|
|
|
9
9
|
|
|
10
10
|
Run the full post-feature workflow by invoking each skill in sequence using the Skill tool. After each skill returns, invoke the next step immediately in the same response.
|
|
11
11
|
|
|
12
|
-
Do not output any text between steps and do not wait for user input. Tool permission dialogs are the only interrupts allowed. The final output is `✅ Shipped`, emitted on the wake after the step
|
|
12
|
+
Do not output any text between steps and do not wait for user input. Tool permission dialogs are the only interrupts allowed. The final output is `✅ Shipped`, emitted on the wake after the step 8 watch exits on `passing` rather than when the turn ends on the watch line, unless a wrapping caller states it closes on its own block, which `auto-ship` does.
|
|
13
13
|
|
|
14
14
|
## Verify
|
|
15
15
|
|
|
@@ -25,17 +25,16 @@ Run `git diff --cached --name-only 2>/dev/null` to check for staged files. If ou
|
|
|
25
25
|
|
|
26
26
|
## Sequence
|
|
27
27
|
|
|
28
|
-
1. Invoke `canon:
|
|
29
|
-
2. Invoke `canon:
|
|
30
|
-
3.
|
|
31
|
-
4. Run `
|
|
32
|
-
5.
|
|
33
|
-
6. Invoke `canon:git-
|
|
34
|
-
7. Invoke `canon:git-
|
|
35
|
-
8.
|
|
36
|
-
9. After the PR opens, watch CI in the background, so the session stays reachable while CI runs. Read `### Watching CI` below for the commands and the wake.
|
|
28
|
+
1. Invoke `canon:context-fold` to sync internal planning docs against session decisions
|
|
29
|
+
2. Invoke `canon:docs-sync` to sync public docs against changes since main
|
|
30
|
+
3. Run `git add -A` to stage any files the sync skills wrote
|
|
31
|
+
4. Run `canon tasks plan-reach <plan> --json` and report both lists it carries. Name the plan this branch built under, by path or by slug. Read `claimed` first and say who holds each path, since that is the half a reader acts on, then say how many of the changed paths `undeclared` names. Branch on the record rather than on the exit code, which a shell function wrapping `canon` can flatten to zero. This step reports and never stops the sequence.
|
|
32
|
+
5. Invoke `canon:git-stage` to group staged changes and commit by concern, only when `git diff --cached --name-only` prints a path. When it prints nothing, the work already reached history in slices, so continue to step 6.
|
|
33
|
+
6. Invoke `canon:git-branch` to rename branch to match conventional format
|
|
34
|
+
7. Invoke `canon:git-pr` to push branch and open pull request
|
|
35
|
+
8. After the PR opens, watch CI in the background, so the session stays reachable while CI runs. Read `### Watching CI` below for the commands and the wake.
|
|
37
36
|
|
|
38
|
-
A caller wrapping this sequence may act between step
|
|
37
|
+
A caller wrapping this sequence may act between step 7 and step 8, which is the one gap the order leaves open, since the pull request exists there and nothing has read its checks yet. `auto-ship` marks the pull request draft in it. Nothing else may go there, and a caller that needs a step anywhere else in the sequence is asking for a change to this body rather than for a place to stand.
|
|
39
38
|
|
|
40
39
|
### Watching CI
|
|
41
40
|
|
|
@@ -62,18 +61,18 @@ Do not auto-fix any of these. The watch line and a stop report from any branch a
|
|
|
62
61
|
|
|
63
62
|
### Settling the evidence thread
|
|
64
63
|
|
|
65
|
-
On a `passing` wake, run `canon pr evidence <number> --check --json` against the number step
|
|
64
|
+
On a `passing` wake, run `canon pr evidence <number> --check --json` against the number step 7 returned. It reads the pull request's comments and edits none, so the comment a reviewer already ticked stays as it is. Branch on `reason` and `owed` rather than the exit.
|
|
66
65
|
|
|
67
66
|
- `settled`: nothing is owed, which is also what a branch that changed no rendered surface reads. Continue to After completion.
|
|
68
67
|
- `owed`: run each step the record's `owed` list names, from `canon:git-pr`'s `references/evidence.md`, evidence first and then preview. Re-read once with the same command. Continue to After completion only on `settled`. Any other reading stops the sequence and reports the `reason` with the `owed` list, and the sequence never loops back for a second pass. A preview step that refuses, or a deploy that failed, leaves `preview` owed on the re-read, so that is the stop and not a retry.
|
|
69
68
|
- Any other `reason`, such as `gh-failed`: the thread went unread. Stop and report the `reason`, since an unread thread is not a settled one.
|
|
70
69
|
- No record at all, or an unknown flag error: the installed binary predates `--check`. Report the thread unread rather than settled, and continue to After completion without emitting a claim that it was checked.
|
|
71
70
|
|
|
72
|
-
The read is a closing step and the draft mark stays the only thing between steps
|
|
71
|
+
The read is a closing step and the draft mark stays the only thing between steps 7 and 8. A caller that closes on its own block, as `auto-ship` does, waits on the same CI wake, so the read lands here and not in that body.
|
|
73
72
|
|
|
74
|
-
### Why the reach reads at step
|
|
73
|
+
### Why the reach reads at step 4
|
|
75
74
|
|
|
76
|
-
The branch is whole there and nowhere earlier. Steps
|
|
75
|
+
The branch is whole there and nowhere earlier. Steps 1 and 2 write past whatever the plan declared, so a reading taken ahead of them misses the chain's own additions, and no pull request exists until step 7 to carry the answer anywhere.
|
|
77
76
|
|
|
78
77
|
It is the one step here that reports rather than acts, which is why it never stops the sequence. Every crossing measured on the wave it was filed against merged clean, and the undeclared list runs long enough on an ordinary branch that a gate would fire on nearly every ship.
|
|
79
78
|
|
|
@@ -81,19 +80,12 @@ It is the one step here that reports rather than acts, which is why it never sto
|
|
|
81
80
|
|
|
82
81
|
An installed binary carrying no `plan-reach` subcommand reports the reach unread rather than clear. Say that, and continue. The verb ships with the CLI and this body ships with the plugin, so a target on an older binary meets a missing subcommand, and a body reading that absence as a clean answer would report the check passing on every branch that never ran it.
|
|
83
82
|
|
|
84
|
-
Capture leads the sequence because a routed fact lands in a context entry, which is a tracked file. Running it after the pull request opens leaves that edit off the branch entirely, so the fact reaches nothing. Memory files are gitignored either way, which is what hid the ordering while capture wrote only those.
|
|
85
|
-
|
|
86
83
|
## After completion
|
|
87
84
|
|
|
88
|
-
Output
|
|
85
|
+
Output one line:
|
|
89
86
|
|
|
90
87
|
```plaintext
|
|
91
88
|
✅ Shipped
|
|
92
|
-
<N facts routed to context entries>
|
|
93
|
-
<N memories captured in .canon/memory/>
|
|
94
|
-
<the review line memory-capture returned>
|
|
95
89
|
```
|
|
96
90
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
Emit nothing here when a wrapping caller states it closes on its own block. `auto-ship` is that caller and its block carries these same three trailing lines below a first line naming the draft state, so emitting both reports one run twice. A caller that states no such thing gets this block, which is every direct invocation.
|
|
91
|
+
Emit nothing here when a wrapping caller states it closes on its own block. `auto-ship` is that caller and its block opens on a line naming the draft state, so emitting both reports one run twice. A caller that states no such thing gets this block, which is every direct invocation.
|
|
@@ -10,7 +10,7 @@ metadata:
|
|
|
10
10
|
Read these files in parallel:
|
|
11
11
|
|
|
12
12
|
- `${CLAUDE_SKILL_DIR}/../../standards/commit.md`: format, types, scopes, and constraints
|
|
13
|
-
- `${CLAUDE_SKILL_DIR}
|
|
13
|
+
- `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md`: punctuation and formatting for all generated text
|
|
14
14
|
- The `write-human` skill: voice, rhythm, and sentence construction for all generated text
|
|
15
15
|
|
|
16
16
|
## Context
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markdown-craft
|
|
3
|
+
description: Why the markdown format rules travel in a skill, and where the boundary sits against the voice skill and the audit command
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Markdown craft requirement
|
|
7
|
+
|
|
8
|
+
## Gap
|
|
9
|
+
|
|
10
|
+
Without this skill, the markdown format rules sat in a standard that a session opened only when a rule told it to. The banned characters and the structure rules are facts a scan settles, yet a session wrote the whole document from memory and learned the result only from the audit's exit.
|
|
11
|
+
|
|
12
|
+
The rules also had three carriers, a standard, a generated rule pointing at it, and a second hand-written rule routing voice. Each stated one routing and each drifted from the others.
|
|
13
|
+
|
|
14
|
+
## Must
|
|
15
|
+
|
|
16
|
+
- Hold the format and structure reference in `references/markdown.md`, the one copy, read by sibling path from every skill that writes markdown
|
|
17
|
+
- Send the session to `canon markdown audit` after an edit, since the audit reads the bans from the package and a restated list would drift
|
|
18
|
+
- Route voice to `write-human` and a Mermaid fence to `draft-figure` rather than restating either
|
|
19
|
+
|
|
20
|
+
## Must not
|
|
21
|
+
|
|
22
|
+
- Restate the banned characters in the body
|
|
23
|
+
- Carry voice, rhythm, or word guidance, which `write-human` owns
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: markdown-craft
|
|
3
|
+
description: Carries the format and structure rules for markdown, being headings, paragraph and list shape, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording, and runs the audit after an edit. Use before a substantial markdown edit, when writing a README, a doc, a skill body, or any `.md` file, or when asked "what are the markdown rules" or "which characters are banned". Do NOT use for voice, rhythm, or word choice, which is `write-human`, or for a Mermaid fence or figure, which is `draft-figure`.
|
|
4
|
+
metadata:
|
|
5
|
+
family: answer
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Markdown craft
|
|
9
|
+
|
|
10
|
+
Read `${CLAUDE_SKILL_DIR}/references/markdown.md` before a substantial markdown edit. Every rule in it is a fact a scan can settle, so do not work the banned characters from memory.
|
|
11
|
+
|
|
12
|
+
Run `canon markdown audit <path>` after the edit. Rewrite the sentence carrying a hit rather than swapping the token for a near-synonym.
|
|
13
|
+
|
|
14
|
+
## Routes
|
|
15
|
+
|
|
16
|
+
- Voice, rhythm, sentence construction, and information density: load `write-human`.
|
|
17
|
+
- A Mermaid fence or a figure: load `draft-figure`, since the audit skips every line inside a fence.
|