@erclx/canon 5.31.0 → 5.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/auto-ship/references/worktree-name.md +1 -1
- package/claude/skills/backlog-triage/REQUIREMENT.md +2 -2
- package/claude/skills/backlog-triage/SKILL.md +2 -2
- package/claude/skills/canon-cli/REQUIREMENT.md +19 -18
- package/claude/skills/canon-cli/SKILL.md +75 -32
- package/claude/skills/canon-feedback/REQUIREMENT.md +1 -1
- package/claude/skills/canon-feedback/SKILL.md +11 -14
- package/claude/skills/canon-feedback-triage/REQUIREMENT.md +13 -14
- package/claude/skills/canon-feedback-triage/SKILL.md +49 -30
- package/claude/skills/{canvas → canvas-board}/REQUIREMENT.md +5 -6
- package/claude/skills/{canvas → canvas-board}/SKILL.md +7 -7
- package/{standards → claude/skills/canvas-board/references}/canvas.md +12 -1
- package/{standards → claude/skills/canvas-board/references}/design.md +13 -5
- package/claude/skills/ci-workflow/REQUIREMENT.md +0 -1
- package/claude/skills/context-fold/REQUIREMENT.md +28 -48
- package/claude/skills/context-fold/SKILL.md +26 -95
- package/claude/skills/context-fold/references/classify.md +7 -8
- package/claude/skills/context-fold/references/completion-report.md +4 -8
- package/claude/skills/context-fold/references/context-refresh.md +7 -17
- package/{standards → claude/skills/context-fold/references}/context.md +19 -10
- package/claude/skills/context-fold/references/unusable-baseline.md +4 -8
- package/claude/skills/create-rule/REQUIREMENT.md +0 -1
- package/claude/skills/create-rule/SKILL.md +2 -2
- package/{standards → claude/skills/create-rule/references}/rule.md +12 -5
- package/claude/skills/create-skill/REQUIREMENT.md +6 -4
- package/claude/skills/create-skill/SKILL.md +10 -9
- package/{standards → claude/skills/create-skill/references}/skill-paths.md +1 -0
- package/{standards → claude/skills/create-skill/references}/skill.md +18 -15
- 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 +3 -5
- 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 +3 -3
- package/{standards → claude/skills/docs-sync/references}/docs.md +11 -0
- package/{standards → claude/skills/docs-sync/references}/readme.md +9 -2
- package/claude/skills/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 +9 -10
- 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 +2 -2
- 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 +3 -3
- package/claude/skills/draft-identity/SKILL.md +10 -8
- package/claude/skills/draft-ready/REQUIREMENT.md +1 -1
- package/claude/skills/draft-ready/SKILL.md +7 -7
- 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-branch/SKILL.md +1 -1
- package/{standards → claude/skills/git-branch/references}/branch.md +1 -1
- package/claude/skills/git-commit/SKILL.md +2 -2
- package/claude/skills/git-followup/REQUIREMENT.md +1 -1
- package/claude/skills/git-followup/SKILL.md +1 -1
- package/claude/skills/git-issue/SKILL.md +1 -1
- package/claude/skills/git-issue/references/issue.md +3 -3
- package/claude/skills/git-pr/SKILL.md +13 -13
- package/claude/skills/git-pr/references/evidence.md +2 -2
- package/claude/skills/git-pr/references/final-command.md +38 -14
- package/claude/skills/git-pr/references/labels.md +5 -1
- package/{standards → claude/skills/git-pr/references}/pr.md +19 -9
- package/{standards → claude/skills/git-pr/references}/publish.md +5 -3
- package/claude/skills/git-pr/references/task-number.md +1 -1
- package/claude/skills/git-ship/REQUIREMENT.md +0 -2
- package/claude/skills/git-ship/SKILL.md +5 -12
- package/claude/skills/git-split/SKILL.md +3 -3
- package/claude/skills/git-stage/SKILL.md +1 -1
- package/claude/skills/plan-feature/REQUIREMENT.md +1 -1
- package/claude/skills/plan-feature/SKILL.md +2 -6
- package/{standards → claude/skills/plan-feature/references}/plan.md +9 -10
- 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 +2 -2
- package/claude/skills/review-pr/SKILL.md +8 -10
- package/claude/skills/review-pr/references/body-variants.md +2 -2
- package/claude/skills/review-pr/references/key-changes.md +3 -3
- package/claude/skills/review-pr/references/post.md +4 -2
- package/claude/skills/review-ui/REQUIREMENT.md +1 -2
- package/claude/skills/review-ui/SKILL.md +2 -2
- package/claude/skills/review-ui/references/post.md +1 -1
- package/claude/skills/role-orchestrator/REQUIREMENT.md +3 -3
- package/claude/skills/role-orchestrator/SKILL.md +10 -10
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +3 -3
- package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +9 -9
- package/claude/skills/role-orchestrator/references/orchestrator-launch.md +23 -1
- package/claude/skills/role-orchestrator/references/orchestrator-parked.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +2 -5
- package/claude/skills/role-orchestrator/references/orchestrator-resume.md +4 -1
- package/claude/skills/role-planner/REQUIREMENT.md +2 -1
- package/claude/skills/role-planner/SKILL.md +15 -4
- package/claude/skills/role-reviewer/SKILL.md +2 -2
- package/claude/skills/role-worker/REQUIREMENT.md +1 -0
- package/claude/skills/role-worker/SKILL.md +11 -3
- 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 +9 -17
- 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 +6 -8
- package/claude/skills/session-resume/SKILL.md +3 -9
- package/claude/skills/session-worktree/SKILL.md +6 -6
- 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 +2 -2
- package/claude/skills/task-board/REQUIREMENT.md +7 -12
- package/claude/skills/task-board/SKILL.md +9 -21
- 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 +15 -10
- package/claude/skills/task-complete/REQUIREMENT.md +47 -0
- package/claude/skills/task-complete/SKILL.md +86 -0
- package/claude/skills/{task-board → task-complete}/references/archive.md +5 -5
- package/claude/skills/task-complete/references/receipt-sweep.md +32 -0
- package/claude/skills/task-complete/references/unusable-baseline.md +19 -0
- package/claude/skills/teach-workspace/REQUIREMENT.md +6 -2
- package/claude/skills/teach-workspace/SKILL.md +9 -5
- package/claude/skills/teach-workspace/references/lesson-craft.md +1 -1
- package/claude/skills/teach-workspace/references/promotion-fold.md +29 -0
- package/claude/skills/teach-workspace/references/promotion.md +3 -3
- package/claude/skills/teach-workspace/references/revisit.md +1 -1
- package/{standards → claude/skills/teach-workspace/references}/teach.md +17 -5
- package/claude/skills/ui-checklist/SKILL.md +1 -1
- package/claude/skills/ux-audit/REQUIREMENT.md +2 -2
- package/claude/skills/ux-audit/SKILL.md +3 -4
- package/claude/skills/ux-measure/SKILL.md +1 -1
- package/claude/skills/write-human/REQUIREMENT.md +0 -1
- package/claude/skills/write-human/SKILL.md +1 -1
- package/docs/agents/audits.md +1 -1
- package/docs/agents/canvas.md +1 -1
- package/docs/agents/commands.md +4 -8
- package/docs/agents/context-audit-checks.md +11 -25
- 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 +5 -7
- package/docs/agents/indexes.md +1 -1
- package/docs/agents/install-and-sync.md +6 -11
- package/docs/agents/intake.md +1 -1
- package/docs/agents/key-changes.md +5 -5
- package/docs/agents/label-coverage.md +11 -0
- package/docs/agents/migrate.md +1 -1
- package/docs/agents/records-push.md +2 -2
- package/docs/agents/records-stale.md +13 -48
- package/docs/agents/records-validate.md +4 -8
- package/docs/agents/records.md +6 -28
- package/docs/agents/restated.md +1 -1
- package/docs/agents/rule-citations.md +2 -2
- package/docs/agents/sandbox.md +4 -4
- 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 +1 -1
- package/docs/agents/tasks-validate.md +1 -1
- package/docs/agents/tasks.md +3 -3
- package/docs/agents/teach.md +1 -1
- package/docs/agents/upstream.md +26 -2
- package/docs/target/migrations.md +32 -0
- package/docs/target/projects.md +5 -7
- package/docs/target/scenarios.md +2 -2
- package/docs/target/sync.md +4 -4
- package/docs/workflow/ai-workflow.md +7 -38
- package/docs/workflow/index.md +1 -1
- package/docs/workflow/operating-model.md +10 -10
- package/docs/workflow/parallel-features.md +12 -12
- package/docs/workflow/skill-map-on-request.md +21 -24
- package/docs/workflow/skill-map.md +23 -34
- package/docs/workflow/visual-design-workflow.md +13 -16
- package/governance/renames.toml +0 -30
- package/governance/rules/canon/605-worktrees.md +1 -1
- package/governance/rules/canon/context.md +13 -0
- package/governance/rules/{standards → canon}/plan.md +4 -5
- package/governance/rules/canon/tasks.md +18 -0
- package/governance/rules/claude/skill.md +17 -0
- package/governance/stacks/base.toml +2 -4
- package/package.json +4 -4
- package/scripts/core/install-check.sh +4 -4
- package/scripts/core/regen-web-previews.ts +1 -1
- package/scripts/lib/ui.sh +0 -159
- package/src/audits/catalog.ts +5 -98
- package/src/claude/cases/authoring.ts +0 -18
- package/src/claude/cases/misc.ts +1 -14
- package/src/claude/cases/setup.ts +7 -20
- package/src/claude/cases/workflow.ts +6 -34
- package/src/claude/seeds.ts +1 -7
- package/src/claude/skills-audit.ts +3 -3
- package/src/cli/help.ts +4 -5
- package/src/cli/ui.ts +2 -3
- package/src/cli.ts +0 -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 -15
- package/src/commands/labels.ts +326 -7
- package/src/commands/migrate.ts +6 -1
- package/src/commands/pr.ts +1 -1
- package/src/commands/records.ts +17 -403
- package/src/commands/sandbox.ts +3 -6
- package/src/commands/sync.ts +5 -3
- package/src/commands/tasks.ts +3 -3
- package/src/commands/upstream.ts +135 -0
- package/src/context/audit.ts +10 -19
- 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 +8 -13
- package/src/context/gate.ts +11 -91
- package/src/context/requirements.ts +13 -4
- package/src/counts/scan.ts +3 -3
- package/src/design/budget.ts +1 -1
- package/src/design/components.ts +3 -3
- package/src/design/document.ts +1 -1
- package/src/design/regen.ts +1 -1
- package/src/design/render.ts +1 -1
- package/src/feedback/body.ts +0 -12
- package/src/gate/measures.ts +7 -58
- package/src/gate/sequencer.ts +56 -1
- package/src/gate/stages.ts +1 -7
- package/src/gov/citations.ts +9 -3
- package/src/gov/install.ts +2 -3
- package/src/gov/restated.ts +3 -3
- package/src/gov/stacks.ts +1 -1
- package/src/hooks/post-merge.ts +1 -1
- package/src/labels/apply.ts +39 -0
- package/src/labels/format.ts +3 -3
- package/src/labels/phase.ts +3 -3
- package/src/labels/sections.ts +43 -0
- package/src/markdown/structure.ts +2 -2
- package/src/migrate/record-layout.ts +3 -3
- package/src/migrate/skill-names.ts +20 -1
- package/src/pr/paths.ts +4 -4
- package/src/records/backup.ts +16 -6
- package/src/records/ordinal.ts +1 -1
- package/src/records/prune.ts +2 -1
- package/src/records/stale-canonical.ts +33 -3
- package/src/records/validate.ts +2 -188
- package/src/roots/record.ts +1 -1
- package/src/sandbox/census.ts +1 -1
- package/src/sandbox/coverage.ts +2 -6
- package/src/sandbox/equivalence.ts +5 -44
- package/src/sandbox/expect.ts +4 -4
- package/src/sandbox/provision.ts +13 -36
- package/src/sandbox/scenario.ts +137 -55
- package/src/sandbox/tree.ts +2 -6
- package/src/shipped/references.ts +3 -3
- package/src/standards/read.ts +44 -0
- package/src/sync/git.ts +1 -1
- package/src/sync/seeds-report.ts +1 -1
- package/src/tasks/archive.ts +5 -5
- package/src/tasks/branch.ts +3 -3
- package/src/tasks/label.ts +1 -1
- package/src/tasks/reach.ts +2 -2
- package/src/tasks/record.ts +2 -2
- package/src/tasks/validate.ts +2 -2
- package/src/teach/workspace.ts +1 -1
- package/src/upstream/cursor.ts +1 -1
- package/src/upstream/due.ts +128 -0
- package/src/upstream/releases.ts +2 -1
- package/standards/index.md +0 -35
- package/standards/standard.md +1 -7
- package/tooling/base/reference.md +2 -2
- package/tooling/base/seeds/.github/pull_request_template.md +2 -2
- package/tooling/claude/reference.md +7 -21
- package/tooling/claude/seeds/.claude/hooks/pr-create-log.sh +9 -1
- package/tooling/claude/seeds/.claude/hooks/records-index.sh +8 -20
- package/tooling/claude/seeds/.claude/hooks/review-post-scan.sh +171 -0
- package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +3 -3
- package/tooling/claude/seeds/.claude/settings.json +9 -0
- 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/promoted-pages.md +0 -29
- package/claude/skills/context-fold/references/receipt-sweep.md +0 -43
- 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/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/603-memory.md +0 -11
- package/governance/rules/lang/120-bash.md +0 -18
- package/governance/rules/standards/architecture.md +0 -13
- package/governance/rules/standards/context.md +0 -14
- package/governance/rules/standards/design.md +0 -12
- package/governance/rules/standards/groundwork.md +0 -13
- package/governance/rules/standards/intake.md +0 -12
- package/governance/rules/standards/memory.md +0 -12
- package/governance/rules/standards/readme.md +0 -12
- package/governance/rules/standards/ready.md +0 -13
- package/governance/rules/standards/requirements.md +0 -12
- package/governance/rules/standards/rule.md +0 -13
- package/governance/rules/standards/session.md +0 -13
- package/governance/rules/standards/skill.md +0 -21
- package/governance/rules/standards/standard.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/scripts/config.sh +0 -11
- package/scripts/lib/gov.sh +0 -14
- package/scripts/lib/sandbox-fixtures.sh +0 -191
- package/scripts/lib/sandbox-git.sh +0 -125
- package/scripts/lib/sandbox-path.sh +0 -50
- package/scripts/sandbox-hook.sh +0 -99
- package/src/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/gov/standard-rules.ts +0 -179
- package/src/records/migrate.ts +0 -78
- package/src/records/stale.ts +0 -243
- package/src/repo/metadata.ts +0 -206
- package/src/sandbox/hooks.ts +0 -128
- 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/draft-figure/references}/figures.md +0 -0
- /package/{standards → claude/skills/git-branch/references}/slug.md +0 -0
- /package/{standards → claude/skills/git-commit/references}/commit.md +0 -0
- /package/{standards → claude/skills/git-commit/references}/versioning.md +0 -0
- /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
|
@@ -6,7 +6,7 @@ description: What to read back after a compaction, and how to treat a groundwork
|
|
|
6
6
|
Resume as orchestrator after a compaction. Read the board and the groundwork behind the live work before answering anything, because a compaction summary keeps conclusions and drops the reasoning that produced them.
|
|
7
7
|
|
|
8
8
|
1. Resolve the main worktree root with `git worktree list --porcelain | grep -m 1 '^worktree ' | cut -d' ' -f2-`, falling back to `pwd`. Every path below resolves against it.
|
|
9
|
-
2. Read `.canon/tasks/priority.md` for the ordering and what each task waits on. Read the newest `.canon/tasks/session-*.md` when one exists, per `${CLAUDE_SKILL_DIR}
|
|
9
|
+
2. Read `.canon/tasks/priority.md` for the ordering and what each task waits on. Read the newest `.canon/tasks/session-*.md` when one exists, per `${CLAUDE_SKILL_DIR}/../session-map/references/session.md`, and treat it as the previous session's scratch rather than a source.
|
|
10
10
|
3. Read the task file for every entry under `## Run now`, plus any entry a live pull request names.
|
|
11
11
|
4. Read the groundwork folder each of those tasks cites. Read `README.md` for the file map, then `06-decision.md` when the track is closed, or `07-next-session.md` and the numbered topic files when it is open. A task's Findings section is a lossy summary of its track, so planning against the summary re-derives what the folder already settled.
|
|
12
12
|
5. Run `gh pr list --state open` and `git log --oneline -5` to see what shipped since the folder was written.
|
|
@@ -17,8 +17,11 @@ Read: <task files>, <groundwork folders>
|
|
|
17
17
|
Shipped since: <commits or PRs>
|
|
18
18
|
Stale in the groundwork: <lean or number the shipped work overturned>
|
|
19
19
|
Next: <the one or two tasks ready to hand a worker>
|
|
20
|
+
Held open: <talk sessions from the map's `## Talk sessions held open`, or none>
|
|
20
21
|
```
|
|
21
22
|
|
|
23
|
+
Read `Held open:` off the newest session map's `## Talk sessions held open`, so a resumed session does not mistake a conversation for a finished delivery. `orchestrator-handoff.md` states what ends one.
|
|
24
|
+
|
|
22
25
|
Treat a groundwork folder as three kinds of content with different shelf lives. Trust the reasoning and the method, which stay correct. Re-measure every count, size, and cost, because they were true when written. Check every `Leaning:` against what has shipped, because work spawned by a track routinely overturns the lean that spawned it and nothing writes back.
|
|
23
26
|
|
|
24
27
|
A plan a live task cites goes stale the same way, and `role-orchestrator` states the check that catches it.
|
|
@@ -61,6 +61,7 @@ four carried at least one, caught only because the planner ran
|
|
|
61
61
|
- Owe an announcement when the record lands, carrying the path and what the row got wrong, since the controller cannot watch the read happen
|
|
62
62
|
- Owe a message before a block becomes an interactive prompt, since a session already waiting on input never reaches the tool round an inbound message drains at
|
|
63
63
|
- Keep correcting the dispatcher a first-class move carrying its evidence, since a trial corrected a brief's premise, planned every row anyway, and carried the consequence into a plan question
|
|
64
|
+
- Carry a talk clause for a launch whose operator is in the session, putting each open question to them, recording a settled pick in place, and owing a close message when they end the conversation, since a cold planner's halting rules contradict a brief that asks it to talk
|
|
64
65
|
- Point at each of the three skills for its record's shape and the steps that write it
|
|
65
66
|
- Defer the addressee resolution to `session-relay` and keep only the last-rung inference, which discriminates differently here than it does for a worker because a session in this role holds no feature branch either
|
|
66
67
|
|
|
@@ -69,7 +70,7 @@ four carried at least one, caught only because the planner ran
|
|
|
69
70
|
- Restate a record's sections, its suggested-and-answer contract, or the steps the running skill carries, since thinness is what keeps one body correct for a dispatched session reading it as its whole contract
|
|
70
71
|
- Restate the write-scope exceptions each of the three skills states about its own folder
|
|
71
72
|
- Restate a boundary `role-orchestrator` or `role-worker` states about itself
|
|
72
|
-
- Tell a planner to halt on a plan question, which the suggested line already answers, rather than on what blocks writing the plan at all
|
|
73
|
+
- Tell a planner to halt on a plan question, which the suggested line already answers, rather than on what blocks writing the plan at all. A talk launch is the exception, since putting the question to the operator in the session is its job.
|
|
73
74
|
- Tell a planner to report the path with no account of what the row got wrong. That instruction came from a trial condition holding a blind comparison intact, and it is not a durable obligation.
|
|
74
75
|
- Report progress through the channel, which rebuilds on the sender's side the poll the announcement exists to retire
|
|
75
76
|
- Write the priority board or the backlog, at any size, or the task file outside `plan-groundwork`'s close-time exception
|
|
@@ -41,14 +41,14 @@ Each item below is something a record needed and a launch string did not carry.
|
|
|
41
41
|
|
|
42
42
|
- The task file, and its `## Findings` before deciding anything. A row can carry its own disproof under a title that still states the original claim, which is how one trial nearly planned against a premise the file had already recorded as dead.
|
|
43
43
|
- The source files themselves, opened rather than summarized. Never a count quoted from the task file, which was wrong or stale in ten places across four plans.
|
|
44
|
-
- `CLAUDE.md` and
|
|
44
|
+
- `CLAUDE.md` and the context entries the row touches, for the decision and the alternative it was taken against rather than for the decision alone.
|
|
45
45
|
- `.canon/tasks/priority.md` for the row's Touches column and its stated blocker. That column is the file set the dispatch conflict check already reads. Read it for the shared-path lines and the holds of the constraint block, never as a gate a plan must clear.
|
|
46
46
|
|
|
47
47
|
Two reads belong to the `plan-feature` path alone, since neither a groundwork
|
|
48
48
|
track nor an intake pass is sequenced behind another row or validated as a plan:
|
|
49
49
|
|
|
50
50
|
- The plan of any row this one is sequenced behind, including one already moved to `.canon/plans/archive/`. Reading a shipped plan produced the strongest constraint in the first trial and no brief asked for it.
|
|
51
|
-
- `${CLAUDE_SKILL_DIR}
|
|
51
|
+
- `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan.md` for the shape, then `canon records validate plans` and `canon markdown audit <the plan file>` on the file once it is written. Nothing else opens a plan, since `.canon/plans/` is gitignored and the audit's default path set is what git lists.
|
|
52
52
|
|
|
53
53
|
A groundwork or intake record passes through whatever its own skill and standard
|
|
54
54
|
name instead. The gitignored-folder problem is the same for all three, so run
|
|
@@ -94,14 +94,25 @@ controller. Report the candidates and stop where more than one does, rather than
|
|
|
94
94
|
addressing the first. Send to the single row where exactly one comes back, and
|
|
95
95
|
say the addressee was inferred.
|
|
96
96
|
|
|
97
|
+
## Talk launch
|
|
98
|
+
|
|
99
|
+
A launch whose brief says it is a talk session puts the operator in this one. Everything above holds, and the clause below changes how questions are answered and when the role ends. A launch carrying no such sentence takes none of this.
|
|
100
|
+
|
|
101
|
+
- Put each open question to the operator through the structured question surface before writing the record, and record a settled pick in place per the plan standard's answer-in-place rule. Never fill an `- Answer:` slot the operator did not answer.
|
|
102
|
+
- Keep answering under `plan-feature`'s discussion rounds after the record lands, since the operator launched this session to keep talking.
|
|
103
|
+
- Owe the landing announcement as usual, plus a close message when the operator ends the conversation.
|
|
104
|
+
- Skip the before-prompt block message for a question put to the operator who is in the session. Keep it for a block the operator cannot answer, since a controller learns of a stall only from a message.
|
|
105
|
+
|
|
106
|
+
The operator being present is an assumption the launch carries. A talk planner whose operator has walked away waits silently on its first question, so say what the session is waiting on in the turn it stops.
|
|
107
|
+
|
|
97
108
|
## Refusing is part of the job
|
|
98
109
|
|
|
99
110
|
- Refuse an instruction the tree contradicts, and carry the evidence with it. Name the commands read and what complying would produce, rather than reporting reluctance.
|
|
100
111
|
- Correct a premise the brief carried when the tree disagrees with it. One trial was told two rows were free of a renamed token and found they carried it as command names rather than path segments, planned all three rows anyway, and put the consequence into a plan question. Correct, continue, and record what the correction changed.
|
|
101
|
-
- Answer a plan question rather than halting on it. Every question carries a `- Suggested:` line the operator accepts or overrules, so a judgment written down is the deliverable. Halt only on what blocks writing the record at all, and send that out as a message before it becomes a prompt.
|
|
112
|
+
- Answer a plan question rather than halting on it. Every question carries a `- Suggested:` line the operator accepts or overrules, so a judgment written down is the deliverable. Halt only on what blocks writing the record at all, and send that out as a message before it becomes a prompt. A talk launch is the exception, per `## Talk launch` above, where a question goes to the operator in the session.
|
|
102
113
|
|
|
103
114
|
## Lifetime
|
|
104
115
|
|
|
105
|
-
- The role runs from the launch to the record landing, and
|
|
116
|
+
- The role runs from the launch to the record landing. The record closes the role, and the operator closes a talk session. A session handed a second row works it under the same role and reads the tree again for that row.
|
|
106
117
|
- A reused session pays the context load once and stales differently. Its picture of the tree ages while it works, which is why the in-flight read runs per row, and it accumulates toward a compaction that drops the reasoning behind its earlier records with nothing reporting it. Cap a reused session rather than letting it run the board.
|
|
107
118
|
- Treat this body as possibly older than the branch under it. A plugin skill loads from the marketplace cache rather than from the working tree.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: role-reviewer
|
|
3
|
-
description: Asserts the reviewer role for a session dispatched to review one pull request another session built, holding what it may write, what it reads and never reads, the one message it owes on posting, and the acts it refuses. Use when asked to "be the reviewer", "you are a reviewer session", at the start of a dispatched or hand-launched review of one pull request, or when a reviewing session needs to know what it may not write or who it answers to. Do NOT use to run the pass itself, which is `review-pr` for the code and `review-ui` for the running app,
|
|
3
|
+
description: Asserts the reviewer role for a session dispatched to review one pull request another session built, holding what it may write, what it reads and never reads, the one message it owes on posting, and the acts it refuses. Use when asked to "be the reviewer", "you are a reviewer session", at the start of a dispatched or hand-launched review of one pull request, or when a reviewing session needs to know what it may not write or who it answers to. Do NOT use to run the pass itself, which is `review-pr` for the code and `review-ui` for the running app, or to make the cross-branch call across a wave.
|
|
4
4
|
metadata:
|
|
5
5
|
family: parallel
|
|
6
6
|
---
|
|
@@ -35,7 +35,7 @@ from here.
|
|
|
35
35
|
|
|
36
36
|
- Read the diff, the plan the branch built under, the task's `## Outcomes`, the rules the diff's paths load, and `review-craft`. That is the artifact and the contract the change answers to.
|
|
37
37
|
- Read the pull request's `## For the reviewer` bullets and its `## Testing` section, which `review-pr` already bounds its read to, and stop there.
|
|
38
|
-
- Leave the author's Summary and Technical
|
|
38
|
+
- Leave the author's Summary and Technical context unread while judging, and never open the worker's session or its transcript. Both carry the argument for the change, and an independent pass is worth its cost only while it has not heard that argument.
|
|
39
39
|
- Read none of the above as a UI reviewer. `review-ui` states its own reads, being the checklist and the address, and a UI pass that has read the diff drives towards what it expects the code to do.
|
|
40
40
|
- Treat the cross-branch facts the launch carries as facts rather than findings. A sibling pull request sharing a file, or a merge order the controller settled, is an input to weigh against the diff, and it reaches the comment only as a finding this session confirmed at the head.
|
|
41
41
|
|
|
@@ -32,6 +32,7 @@ The draft mark fails from both ends. On 2026-08-31 four sessions re-drafted a pu
|
|
|
32
32
|
- Defer the addressee resolution to `session-relay` and keep only the operator ask and the last-rung inference, which discriminates here because a worker holds a feature branch and a controller does not, and which falls back to the roster and says so, since an operator's own launch names nobody
|
|
33
33
|
- Keep refusing a dispatcher a first-class move carrying its evidence, since the halts measured so far were correct and the cost of each fell where it belonged
|
|
34
34
|
- State that a held body may be older than the branch under it, since a plugin skill loads from the marketplace cache rather than from the working tree
|
|
35
|
+
- Carry a talk clause for a launch whose operator is in the session, asking them at a judgment call and sending a close message when they end the conversation, since a cold worker's halt-toward-the-controller and merge-ends-the-role rules contradict a brief that asks it to talk
|
|
35
36
|
- Point at `session-worktree`, `auto-ship`, and `review-address` for the steps each already owns
|
|
36
37
|
|
|
37
38
|
## Must not
|
|
@@ -28,13 +28,13 @@ which `auto-ship` Step 2 loads.
|
|
|
28
28
|
|
|
29
29
|
## Where the session stands
|
|
30
30
|
|
|
31
|
-
- Resolve `.canon/plans/`, `.canon/tasks/`, `.canon/review/`,
|
|
31
|
+
- Resolve `.canon/plans/`, `.canon/tasks/`, `.canon/review/`, and `.canon/ready/` at the main worktree root, never against the linked worktree this session builds in. Those folders are gitignored, so `git worktree add` never creates them and the copy beside the build is absent rather than empty.
|
|
32
32
|
- Report a plan that fails to resolve as unreadable from here, naming the main-root path. Reporting the task as having no plan is true where this session stands and wrong about the world, and a reader with no second tree to check cannot separate the two.
|
|
33
33
|
- Build the plan the launch named. Do not write a second one when the path fails to resolve, since a row that cites a plan already has one and drafting another produces two plans for one row.
|
|
34
34
|
- Copy a ready folder's files verbatim to the paths its plan's constraints name, when the plan's `**Constraints:**` block names one, and edit only what the gate or the overview's own list requires. A rewrite discards the text the handoff exists to carry.
|
|
35
35
|
- Report a draft flag reading ready once, and leave it cleared. The ship chain marks the pull request a draft and no step anywhere un-marks, so a flag reading ready afterwards was lifted by the operator or by the controlling session acting on a closed review, each acting directly on the pull request, which GitHub requires before a merge. Re-drafting fights them, and no surface in the tree states a reason to.
|
|
36
36
|
- Refuse an instruction to lift the mark yourself, whoever sends it. This session cannot verify who is asking or whether review actually closed, so the refusal holds regardless of the sender's claimed authority.
|
|
37
|
-
- Rewrite a plan question's `- Suggested:` line as `overridden at execution to <pick>,` plus the measurement when this build decides against an unanswered one, leaving the `- Answer:` slot blank, and put the same deviation in one line under the open task's `## Findings`, per `${CLAUDE_SKILL_DIR}
|
|
37
|
+
- Rewrite a plan question's `- Suggested:` line as `overridden at execution to <pick>,` plus the measurement when this build decides against an unanswered one, leaving the `- Answer:` slot blank, and put the same deviation in one line under the open task's `## Findings`, per `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan.md`.
|
|
38
38
|
|
|
39
39
|
## The board is read-only
|
|
40
40
|
|
|
@@ -79,6 +79,14 @@ correct it. This rung stays here rather than in the relay because it differs
|
|
|
79
79
|
between roles, and it discriminates for a worker because a worker holds a
|
|
80
80
|
feature branch and a controller does not.
|
|
81
81
|
|
|
82
|
+
## Talk launch
|
|
83
|
+
|
|
84
|
+
A launch whose brief says it is a talk session puts the operator in this one. Everything above holds, and the clause below changes where a judgment call goes and when the role ends. A launch carrying no such sentence takes none of this.
|
|
85
|
+
|
|
86
|
+
- Ask the operator in the session through the structured question surface at a judgment call, rather than halting toward the controller. A plan question written as needing the operator's call is put to them directly.
|
|
87
|
+
- Send the controller a close message when the operator ends the conversation, beside the announcements the channel above owes.
|
|
88
|
+
- Keep the before-prompt block message for a block the operator cannot answer. A question put to the operator who is in the session needs none.
|
|
89
|
+
|
|
82
90
|
## Refusing is part of the job
|
|
83
91
|
|
|
84
92
|
- Refuse an instruction the tree contradicts, and carry the evidence with it. Name the commands read and the consequences of complying, rather than reporting reluctance.
|
|
@@ -92,5 +100,5 @@ feature branch and a controller does not.
|
|
|
92
100
|
|
|
93
101
|
## Lifetime
|
|
94
102
|
|
|
95
|
-
- The role runs from the worktree entry to the merge of the branch it built, and nothing carries across to a second row. A worker handed another row after that is a new build under a new plan.
|
|
103
|
+
- The role runs from the worktree entry to the merge of the branch it built, and nothing carries across to a second row. A talk session outlives the merge and ends when the operator says the conversation is over. A worker handed another row after that is a new build under a new plan.
|
|
96
104
|
- Treat this body as possibly older than the branch under it. A plugin skill loads from the marketplace cache rather than the working tree, so a session building a change to its own skills may be holding the copy from before the last update.
|
|
@@ -9,14 +9,13 @@ description: Why a plain session needs a handoff surface that is not the task bo
|
|
|
9
9
|
|
|
10
10
|
Without this skill, a session facing a compaction reaches for `session-map`, which writes `.canon/tasks/session-<slug>.md`. The board carries four such files today, and `session-resume` drops them by name prefix to read the real rows, so a reader works around a misplacement on every run.
|
|
11
11
|
|
|
12
|
-
`session-map` also carries the orchestrator's shape: a drift check against a start commit nothing records, a step for role sections, and a `## State` section. A session that shipped nothing pays all three to leave one note behind, and `
|
|
12
|
+
`session-map` also carries the orchestrator's shape: a drift check against a start commit nothing records, a step for role sections, and a `## State` section. A session that shipped nothing pays all three to leave one note behind, and the `session-map` skill's `references/session.md` already names a `## State` filled from the tree as non-conforming, which is the failure that shape invites.
|
|
13
13
|
|
|
14
14
|
Sessions also write the wrong thing into a handoff. They restate the tree, which survives a compaction, and omit what each decision beat, which does not.
|
|
15
15
|
|
|
16
16
|
## Must
|
|
17
17
|
|
|
18
18
|
- Write to `.canon/compact/`, outside the task board and outside scratch.
|
|
19
|
-
- Invoke `canon:memory-capture` before writing, so the note cites entries rather than repeating them.
|
|
20
19
|
- Carry a stated shape for the note, so what belongs in it is not re-derived per session.
|
|
21
20
|
- Require a citation for every claim, and a rejected alternative beside every decision.
|
|
22
21
|
- Decline in one line where the session holds nothing a compaction would destroy.
|
|
@@ -27,7 +26,6 @@ Sessions also write the wrong thing into a handoff. They restate the tree, which
|
|
|
27
26
|
- Write a task row, a plan, or anything under `.canon/tasks/`.
|
|
28
27
|
- Write a `## State` section, or any section a reader could fill from `git status`.
|
|
29
28
|
- Run a drift check or recover a start commit. Both belong to the role that ships code.
|
|
30
|
-
- Restate a memory entry the capture pass wrote.
|
|
31
29
|
- Lose its caller. The `PreCompact` hook names this skill on a manual compaction, and that hook plus an operator typing it are the two callers the third creation question asks for. A hook edit that names another skill leaves one caller, which is a reason to revisit this skill rather than to keep it.
|
|
32
30
|
|
|
33
31
|
## Guards
|
|
@@ -41,5 +39,4 @@ Sessions also write the wrong thing into a handoff. They restate the tree, which
|
|
|
41
39
|
|
|
42
40
|
- The orchestrator's handoff, which carries a drift check and a board row: `canon:session-map`. The two skills are held apart by role, so a plain session belongs here and a session holding `canon:role-orchestrator` belongs there.
|
|
43
41
|
- Reading a handoff back: `canon:session-resume`, which reads `.canon/compact/` ahead of the older task-board form.
|
|
44
|
-
- The memory pen, its routing and its shape: `canon:memory-capture` and `standards/memory.md`.
|
|
45
42
|
- A decision a groundwork track owns, which belongs in that track's `06-decision.md`: `canon:plan-groundwork`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: session-compact
|
|
3
|
-
description:
|
|
3
|
+
description: Writes one handoff note to .canon/compact/ so the session after a compaction picks up where this one stopped. Use before running /compact, when asked to "write a handoff", "prepare for compaction", "save where we got to", or before moving a session to another machine, or when a PreCompact hook blocks and names this skill. Do NOT use for a session holding the orchestrator role, whose board handoff is `session-map`. Do NOT use to record a decision a groundwork track owns, which is `plan-groundwork`.
|
|
4
4
|
metadata:
|
|
5
5
|
family: parallel
|
|
6
6
|
---
|
|
@@ -17,15 +17,7 @@ Write only what a compaction destroys. Everything a later session can read from
|
|
|
17
17
|
- Decline where the session holds no reasoning a reader could not get faster from git or from a record already written. Say so in one line and write nothing. A padded note is worse than an absent one, because a reader who finds a note trusts it.
|
|
18
18
|
- Resolve `.canon/` at the main worktree root and send the write out as a heredoc, both the way `session-worktree` states.
|
|
19
19
|
|
|
20
|
-
## Step 1:
|
|
21
|
-
|
|
22
|
-
Invoke `canon:memory-capture` and let it return before writing. The note then cites what was written rather than restating the same lesson in prose.
|
|
23
|
-
|
|
24
|
-
State the caveat the caller gives about committing. A caller that does not commit says so, and capture skips routing and writes memory files alone.
|
|
25
|
-
|
|
26
|
-
Carry through the line capture returns when a fact routed, so the session knows a fold is still owed. Report nothing else about what it wrote.
|
|
27
|
-
|
|
28
|
-
## Step 2: write the note
|
|
20
|
+
## Step 1: write the note
|
|
29
21
|
|
|
30
22
|
Write one file to `.canon/compact/<slug>.md`. Name `<slug>` for the work as a short kebab-case phrase, taken from what the session did rather than from the branch, so a session that ran on `main` still gets a name a reader recognizes. Use `latest` when nothing in the session names the work.
|
|
31
23
|
|
|
@@ -33,11 +25,10 @@ Follow `${CLAUDE_SKILL_DIR}/references/handoff-note.md` for what each section ca
|
|
|
33
25
|
|
|
34
26
|
Overwrite a note of the same name. One session's work has one note, and a second file for the same work splits the handoff.
|
|
35
27
|
|
|
36
|
-
## Step
|
|
28
|
+
## Step 2: report
|
|
37
29
|
|
|
38
30
|
```plaintext
|
|
39
31
|
✅ Handoff written: .canon/compact/<slug>.md
|
|
40
|
-
<the line memory-capture returned, where a fact routed>
|
|
41
32
|
Move: canon records push, then canon sessions export <id>
|
|
42
33
|
```
|
|
43
34
|
|
|
@@ -59,7 +50,6 @@ A decline reports itself so a caller can tell it from a failure:
|
|
|
59
50
|
|
|
60
51
|
## What this delegates
|
|
61
52
|
|
|
62
|
-
- The memory pass, its routing, and the pen's shape: `canon:memory-capture`
|
|
63
53
|
- The orchestrator's handoff, which carries a drift check and writes a task row: `canon:session-map`
|
|
64
54
|
- Reading a handoff back at the start of the next session: `canon:session-resume`
|
|
65
55
|
- Packing the session for another machine: `canon sessions export`, with `canon sessions import` and then `/canon:session-resume` on the arriving side
|
|
@@ -63,6 +63,6 @@ Not general advice. A caution a reader could have guessed is noise around the tw
|
|
|
63
63
|
|
|
64
64
|
- A `## State` section. A session that committed nothing has no state, and one that did has it in the log.
|
|
65
65
|
- The tree, the file counts, and the folder listing. All survive a compaction.
|
|
66
|
-
- The session's narrative. What was tried and abandoned belongs in the record the track keeps, or
|
|
67
|
-
- A lesson
|
|
66
|
+
- The session's narrative. What was tried and abandoned belongs in the record the track keeps, or nowhere.
|
|
67
|
+
- A lesson stated as a lesson. Put it in `## Where to pick up` as the context edit or the task that carries it, since nothing else reads a note once the next session is past it.
|
|
68
68
|
- Anything the reader would have to take on trust. Every claim carries a file, a commit, or a record.
|
|
@@ -11,13 +11,9 @@ Without this skill, the standard governing the pre-compaction handoff carries a
|
|
|
11
11
|
|
|
12
12
|
The only routed writer belongs to the orchestrator role. It disables model invocation, asserts that role on invocation, and adds a section for decisions taken under delegated authority, so a plain feature session that reaches it receives a section it cannot fill and a review poll it does not run.
|
|
13
13
|
|
|
14
|
-
The nearest description by wording writes a different artifact. Capture routes facts to a context entry and writes memory files, and a request naming the session and the moment matches it, so the map goes unwritten while a session believes it has handed off.
|
|
15
|
-
|
|
16
14
|
The drift step is the one most specific to session length and the easiest to skip. It reads the commit the session started from, nothing on the machine records that commit, and a route that names the step without naming how to recover the ref ships an instruction nobody can follow.
|
|
17
15
|
|
|
18
|
-
A step that reads a surface a project may not carry gets skipped on the reasoning that it has nothing to act on. A cold session run against a project with no `.claude/` tree skipped
|
|
19
|
-
|
|
20
|
-
A capture fired the same way for every caller breaks the one caller the split leaves. An orchestrating session may write no tracked file, so its capture has to skip routing, and a route offering no way to say so leaves that reader running capture twice or routing facts the role forbids it to fold.
|
|
16
|
+
A step that reads a surface a project may not carry gets skipped on the reasoning that it has nothing to act on. A cold session run against a project with no `.claude/` tree skipped the drift step and wrote its own rationale into the map, so the step the route exists to carry did not run on the first test from outside. The skip is worst where it looks most defensible, and a session that takes it quietly leaves a map indistinguishable from a conforming one.
|
|
21
17
|
|
|
22
18
|
A body that restates the sections, the frontmatter, or the numbered steps becomes a second source that drifts from the standard, which is the failure the split between the role writer and the core was made to remove rather than move.
|
|
23
19
|
|
|
@@ -30,15 +26,12 @@ A body that restates the sections, the frontmatter, or the numbered steps become
|
|
|
30
26
|
- Resolve the folder at the main worktree root, and write the file whole from the shell where the editing tools refuse that root
|
|
31
27
|
- Fall back to the branchless filename on an empty slug rather than stopping
|
|
32
28
|
- Leave model invocation enabled, so a session that has dropped its routing still reaches this by description
|
|
33
|
-
- Take a caller's statement that the session does not commit and pass it to capture, so no fact this route fires is routed into a tracked file
|
|
34
|
-
- Report the map alone, plus the line capture returns when a fact routed, since a fold left unreported is a fold nobody runs
|
|
35
29
|
|
|
36
30
|
## Must not
|
|
37
31
|
|
|
38
32
|
- Restate the standard's sections, frontmatter, or numbered steps
|
|
39
33
|
- Skip a step by predicting what its skill or verb would have answered, rather than running it and recording what came back
|
|
40
34
|
- Assert a role, or add a role's section to a map written by a session holding no such role
|
|
41
|
-
- Fold the capture step's output into this skill's report
|
|
42
35
|
- Take the worktree-local copy the editing tools offer in place of the main-root path
|
|
43
36
|
- Summarize the board, the task files, or the work that shipped, each of which is carried by an artifact a compaction leaves standing
|
|
44
37
|
|
|
@@ -52,7 +45,6 @@ A body that restates the sections, the frontmatter, or the numbered steps become
|
|
|
52
45
|
|
|
53
46
|
- The handoff a plain session writes before a compaction, which is a note outside the board with no drift step and no `## State`: `session-compact`. Both skills once claimed the phrases "write the handoff" and "about to compact", so this description narrows to the orchestrator and to a request naming the map or the board, and a plain session belongs to `session-compact`.
|
|
54
47
|
- Reading a handoff back at the start of the next session: `session-resume`
|
|
55
|
-
- Routing a session fact to the context entry that owns it, and writing what no entry owns to the memory folder: `memory-capture`
|
|
56
48
|
- The sections a role adds over the core three, which belong to that role's own surface. `role-orchestrator` owns the orchestrator's and cites this route for the generic half.
|
|
57
49
|
- Validating a written map against the standard, which no record kind covers, so a conforming shape rests on the standard being followed
|
|
58
50
|
- Firing the write without being asked, which is a question about what the harness supports and is measured on its own track
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: session-map
|
|
3
|
-
description: Writes the session map, the board-side handoff at `.canon/tasks/session-<slug>.md`, for an orchestrating session or on a request naming the session map or the task board, running the skill-drift step the write procedure opens with. Use when asked to "write the session map", "write the board handoff", or when a session holding `canon:role-orchestrator` hands off before a compaction. Do NOT use for a plain session about to compact, which is `session-compact` and writes a note outside the board. Do NOT use to
|
|
3
|
+
description: Writes the session map, the board-side handoff at `.canon/tasks/session-<slug>.md`, for an orchestrating session or on a request naming the session map or the task board, running the skill-drift step the write procedure opens with. Use when asked to "write the session map", "write the board handoff", or when a session holding `canon:role-orchestrator` hands off before a compaction. Do NOT use for a plain session about to compact, which is `session-compact` and writes a note outside the board. Do NOT use to read a handoff back, which is `session-resume`.
|
|
4
4
|
metadata:
|
|
5
5
|
family: parallel
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Session map
|
|
9
9
|
|
|
10
|
-
Write the pre-compaction handoff for the current session. `${CLAUDE_SKILL_DIR}
|
|
10
|
+
Write the pre-compaction handoff for the current session. `${CLAUDE_SKILL_DIR}/references/session.md` fixes the filename, the frontmatter, the three core sections, the numbered write procedure, and the citation rule. Follow that document rather than this body, which states when the procedure runs and what it runs against and leaves the shape where it already lives.
|
|
11
11
|
|
|
12
12
|
Any session writes one. Do not assert a role on invocation, and do not add a role's sections to a map written by a session holding no such role.
|
|
13
13
|
|
|
14
|
-
Run every step rather than judging in advance that one has nothing to act on. The
|
|
14
|
+
Run every step rather than judging in advance that one has nothing to act on. The drift verb answers for itself, refusal included, and a refusal recorded is a result where a prediction of one is not. A project carrying none of the scaffolding the step reads is the case this fires on, and it is the case where skipping looks most defensible.
|
|
15
15
|
|
|
16
16
|
## What fires this
|
|
17
17
|
|
|
@@ -22,20 +22,12 @@ Decline where the session holds no reasoning a reader could not get faster from
|
|
|
22
22
|
## Guards
|
|
23
23
|
|
|
24
24
|
- If `git rev-parse --git-dir` does not resolve, stop: `❌ Not a git repository. A session map takes its filename from the branch.`
|
|
25
|
-
- Derive `<slug>` per `${CLAUDE_SKILL_DIR}
|
|
25
|
+
- Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../git-branch/references/slug.md`. An empty result falls back to `latest` rather than stopping, since a handoff is scratch and a stop loses the reasoning the file exists to save.
|
|
26
26
|
- Resolve the containing folder at the main worktree root with `git worktree list --porcelain | grep -m 1 '^worktree ' | cut -d' ' -f2-`. The guard above already stopped where that read has no repository to answer from, so it takes no fallback.
|
|
27
27
|
|
|
28
|
-
## Step 1:
|
|
28
|
+
## Step 1: recover the commit the drift step reads
|
|
29
29
|
|
|
30
|
-
Item 1 of `## Writing one`
|
|
31
|
-
|
|
32
|
-
Pass on the caveat a caller states about committing. A caller that does not commit says so, and capture then skips routing and writes memory files alone, since a routed fact lands in a context entry and that is a tracked file. A caller stating nothing leaves capture to decide for itself, which is the ordinary run.
|
|
33
|
-
|
|
34
|
-
Carry through the line capture returns when a fact routed, so the session knows a fold is still owed. Report nothing else about what it wrote. The map is this skill's output.
|
|
35
|
-
|
|
36
|
-
## Step 2: recover the commit the drift step reads
|
|
37
|
-
|
|
38
|
-
Item 2 runs `canon claude skills drift <ref>` against the commit this session started from, and nothing on the machine records that commit. Estimate how long the session has run, round the duration up, and read the ref item 3 recovers:
|
|
30
|
+
Item 1 of `## Writing one` runs `canon claude skills drift <ref>` against the commit this session started from, and nothing on the machine records that commit. Estimate how long the session has run, round the duration up, and read the ref item 2 recovers:
|
|
39
31
|
|
|
40
32
|
```bash
|
|
41
33
|
git log -1 --format=%H --before='<duration> ago'
|
|
@@ -45,13 +37,13 @@ Round up rather than down. A ref older than the oldest load over-reports, and co
|
|
|
45
37
|
|
|
46
38
|
Record what the verb names under `## Standing cautions`. A refusal is the boundary of what the verb can read rather than a fault, since it answers where the working directory carries `claude/skills/` with history behind it and refuses in a project consuming the plugin from a cache. Record the boundary the verb reported and keep writing, rather than the one it looked likely to report.
|
|
47
39
|
|
|
48
|
-
## Step
|
|
40
|
+
## Step 2: write the map
|
|
49
41
|
|
|
50
|
-
Follow items
|
|
42
|
+
Follow items 3 through 5. Write only what a compaction destroys and no other artifact already carries, and cite a commit, a task, or a file and line for every claim.
|
|
51
43
|
|
|
52
44
|
The file sits at the main worktree root and is written whole every time, so send it out as a heredoc, routed the way `session-worktree` states.
|
|
53
45
|
|
|
54
|
-
## Step
|
|
46
|
+
## Step 3: extend it only where a role is held
|
|
55
47
|
|
|
56
48
|
`## Extending it` governs a section added over the core three. Add one only when this session holds the role and the surface owning that role states the section, since a section the writer cannot fill teaches its reader to skip the file. A session holding no role writes the core three and stops.
|
|
57
49
|
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Session map reference
|
|
3
3
|
description: Filename and location, the sections a handoff carries, the write and read procedures, and how a role extends it
|
|
4
|
-
paths:
|
|
5
|
-
- '.canon/tasks/session-*.md'
|
|
6
|
-
rule:
|
|
7
|
-
- 'Follow this rule rather than the tasks rule for a `session-` file. A handoff is not a task and carries neither `## Outcomes` nor `## Findings`.'
|
|
8
4
|
---
|
|
9
5
|
|
|
10
6
|
# Session map reference
|
|
@@ -13,6 +9,18 @@ Applies to `.canon/tasks/session-<slug>.md`. A session writes one before a compa
|
|
|
13
9
|
|
|
14
10
|
Any session writes one. The role a session holds decides which sections it adds on top of the core, never whether it may write at all.
|
|
15
11
|
|
|
12
|
+
## Contents
|
|
13
|
+
|
|
14
|
+
- [Scope](#scope)
|
|
15
|
+
- [What a working session map looks like](#what-a-working-session-map-looks-like)
|
|
16
|
+
- [Filename and location](#filename-and-location)
|
|
17
|
+
- [Frontmatter](#frontmatter)
|
|
18
|
+
- [Sections](#sections)
|
|
19
|
+
- [Writing one](#writing-one)
|
|
20
|
+
- [Reading one back](#reading-one-back)
|
|
21
|
+
- [Extending it](#extending-it)
|
|
22
|
+
- [Template](#template)
|
|
23
|
+
|
|
16
24
|
## Scope
|
|
17
25
|
|
|
18
26
|
Governs the pre-compaction handoff at `.canon/tasks/session-<slug>.md`: its filename, its sections, what a writer puts in each, and how a reader picks one up.
|
|
@@ -23,7 +31,6 @@ Does not govern:
|
|
|
23
31
|
- The transform from a branch name to the slug in the filename: `slug.md`
|
|
24
32
|
- The role-specific sections a caller adds over the core, which belong to that caller
|
|
25
33
|
- The note a plain session writes at `.canon/compact/<slug>.md`, whose shape lives in the `session-compact` skill's own reference
|
|
26
|
-
- Which memories a session captures before writing, which is the capture surface's own subject
|
|
27
34
|
|
|
28
35
|
## What a working session map looks like
|
|
29
36
|
|
|
@@ -63,12 +70,11 @@ Add a section only for content that fits none of the three and would otherwise b
|
|
|
63
70
|
|
|
64
71
|
The `session-map` skill is the invocable route onto this procedure and holds no role, so a session reaching for a handoff without knowing this document exists still lands here. A session that arrives at this document directly follows the steps below unchanged.
|
|
65
72
|
|
|
66
|
-
1.
|
|
67
|
-
2.
|
|
68
|
-
3.
|
|
69
|
-
4.
|
|
70
|
-
5.
|
|
71
|
-
6. Fill a section from reasoning the session actually holds. A session with no cross-feature picture that fills `## State` from what is already in git has written a summary of the tree, which the reader can produce faster than they can read it.
|
|
73
|
+
1. Run `canon claude skills drift <the commit this session started from>` and record what it names under `## Standing cautions`. A skill body enters a session once and re-invoking the skill does not re-read the file, so the drift is worst at exactly this moment and a name here is a body the session has been following out of date. Recording a name is not acting on it, and the verb misses a body this session edited and has not committed. This step belongs to session length rather than to any role, so every writer runs it, and a refusal names the boundary of what the verb can read rather than a fault.
|
|
74
|
+
2. Recover that commit from how long the session has been running with `git log -1 --format=%H --before='<duration> ago'`, rounding the duration up rather than down. Nothing on the machine records it. A ref older than the oldest load over-reports, and confirming a name costs one read of the body, so the generous end is the safe one and a guess at the exact commit is not worth making. An empty result means no commit predates the window, so take the oldest commit the history holds and say which of the two the ref came from.
|
|
75
|
+
3. Write only what a compaction destroys and no other artifact already carries. The board holds the ordering and what each task waits on, a task file holds its own findings, and a measurement folder holds its track.
|
|
76
|
+
4. Cite a commit, a task, or a file and line for every claim, so the next session can tell a read from a recall.
|
|
77
|
+
5. Fill a section from reasoning the session actually holds. A session with no cross-feature picture that fills `## State` from what is already in git has written a summary of the tree, which the reader can produce faster than they can read it.
|
|
72
78
|
|
|
73
79
|
Do not restate the board, and do not summarize the work that shipped, since version control already carries it.
|
|
74
80
|
|
|
@@ -24,7 +24,7 @@ makes the firing survive.
|
|
|
24
24
|
The first draft of this plan closed the gap with a paragraph drafted inline,
|
|
25
25
|
once inside `role-worker` and once inside `role-planner`. The operator overrode
|
|
26
26
|
that call: two bodies carrying identical protocol text is the shared-surface
|
|
27
|
-
case
|
|
27
|
+
case, since a later
|
|
28
28
|
fix reaching one copy and not the other diverges silently.
|
|
29
29
|
|
|
30
30
|
Neither attempt named who the relay is from. A message an operator relays by
|
|
@@ -9,22 +9,21 @@ description: Why resuming reads the handoff before the board, reads an index bef
|
|
|
9
9
|
|
|
10
10
|
Without this skill, a session picking up old work reconstructs state from the git log, which records what shipped and not what is queued, so finished work reads as pending and the actual next item goes unmentioned. The alternative failure is worse for a different reason. A session that reads every task file and every plan to be thorough spends the context the work needs before the work starts, and the summary arrives in a session with no room left to act on it.
|
|
11
11
|
|
|
12
|
-
A compaction keeps conclusions and drops the reasoning that produced them, and the previous session can write that reasoning to a handoff before it goes. A resume that reads the board
|
|
12
|
+
A compaction keeps conclusions and drops the reasoning that produced them, and the previous session can write that reasoning to a handoff before it goes. A resume that reads the board and the plans alone walks past that file, so the one artifact written to survive the compaction reaches nobody and the next session re-derives what it holds.
|
|
13
13
|
|
|
14
14
|
The task index is a folder catalog rather than a task filter, so it carries a row for the ordering file and one for every handoff on the board. A session reporting each row as a backlog item queues work nobody filed, and the count grows with every session that ever wrote a handoff.
|
|
15
15
|
|
|
16
16
|
From a linked worktree the shared scratch folders resolve against the worktree rather than the main root, where they are empty. That reports no tracked work on a repository carrying a full backlog, and the report is indistinguishable from the true empty case.
|
|
17
17
|
|
|
18
|
-
A resume is a read, and a session that treats it as a cleanup pass offers to archive finished entries or
|
|
18
|
+
A resume is a read, and a session that treats it as a cleanup pass offers to archive finished entries or rewrite a plan it decided was stale. Both change tracked state on the strength of a summary the user has not confirmed yet.
|
|
19
19
|
|
|
20
20
|
## Must
|
|
21
21
|
|
|
22
22
|
- Read the newest handoff before the board, and report what it carries attributed to its writer
|
|
23
|
-
- Resolve the handoff, plans,
|
|
23
|
+
- Resolve the handoff, plans, and tasks folders at the main worktree root
|
|
24
24
|
- Read the task index before any individual task file, and open only the task files the summary needs
|
|
25
25
|
- Drop the board siblings from the index before reporting it as the backlog, since the catalog filters nothing and carries a row per handoff
|
|
26
26
|
- Preserve the index's order in the report, since the order is the priority
|
|
27
|
-
- Surface only the memory entries that inform the top item
|
|
28
27
|
- Close with one recommendation naming the first item and whether a plan backs it
|
|
29
28
|
|
|
30
29
|
## Must not
|
|
@@ -33,17 +32,16 @@ A resume is a read, and a session that treats it as a cleanup pass offers to arc
|
|
|
33
32
|
- Report the absence of a handoff, which is the common case and would train a reader to skip the line on the run where one exists
|
|
34
33
|
- Restate a handoff's counts, sizes, or costs as current. Each was true when written.
|
|
35
34
|
- Offer to remove, archive, or reorder an entry. Resume reports and does not mutate.
|
|
36
|
-
- Update memory, which changes when a recorded fact becomes wrong rather than on a resume
|
|
37
35
|
|
|
38
36
|
## Guards
|
|
39
37
|
|
|
40
|
-
-
|
|
38
|
+
- Every surface absent or empty reports no tracked work and stops, rather than inventing a next step from the repository
|
|
41
39
|
- A handoff found beside an empty board recommends what the handoff leaves open, since the guard passes on the handoff alone and the recommendation has no backlog item to name
|
|
42
40
|
|
|
43
41
|
## Out of scope
|
|
44
42
|
|
|
45
43
|
- Writing a handoff, which happens at the close of a session rather than at its start. This skill names the standard that governs one and follows it no further.
|
|
46
44
|
- The sections a role adds over the core handoff, which belong to that role's own surface
|
|
47
|
-
- Archiving a shipped task out of the folder: `task-
|
|
48
|
-
-
|
|
45
|
+
- Archiving a shipped task out of the folder: `task-complete`
|
|
46
|
+
- Marking an outcome, which `task-complete` does when the work ships, and archiving a plan, which the merge does
|
|
49
47
|
- Implementing the item it recommends, which is the next request rather than part of this one
|
|
@@ -9,18 +9,16 @@ metadata:
|
|
|
9
9
|
|
|
10
10
|
## Step 1: read tracked work
|
|
11
11
|
|
|
12
|
-
Resolve `.canon/plans/`, `.canon/
|
|
12
|
+
Resolve `.canon/plans/`, `.canon/compact/`, and `.canon/tasks/` at the main worktree root the way `session-worktree` does.
|
|
13
13
|
|
|
14
14
|
Read these in parallel, skipping any that do not exist:
|
|
15
15
|
|
|
16
|
-
- the newest `.canon/compact/*.md`, then the newest `.canon/tasks/session-*.md`: the handoff a previous session wrote before a compaction. The first is the note `session-compact` writes, and the second is the board-side map per `${CLAUDE_SKILL_DIR}
|
|
16
|
+
- the newest `.canon/compact/*.md`, then the newest `.canon/tasks/session-*.md`: the handoff a previous session wrote before a compaction. The first is the note `session-compact` writes, and the second is the board-side map per `${CLAUDE_SKILL_DIR}/../session-map/references/session.md`, which stays readable. Whichever exists leads the report rather than the reads, and both lead it when both exist.
|
|
17
17
|
- `.canon/tasks/index.md`: the folder catalog. Read this before any individual task file, and take the task list from it by dropping the `index`, `priority`, `backlog`, and `session-` rows, which are siblings rather than tasks.
|
|
18
18
|
- `.canon/plans/*.md`: execution detail for in-progress tasks
|
|
19
19
|
|
|
20
20
|
Then read only the task files the summary needs, typically the top one. Do not read the whole folder.
|
|
21
21
|
|
|
22
|
-
Once the top task is known, grep `.canon/memory/index.md` for two or three terms from its title and read at most three of the entries whose rows match. Never read the index whole, since a grown pen's index runs to hundreds of rows and the report shows three at most. With no top task, or no row matching, read no memory entry and say nothing about it.
|
|
23
|
-
|
|
24
22
|
Most projects carry no handoff. Say nothing about its absence, since a line reporting it every run trains a reader to skip the line on the run where a handoff exists.
|
|
25
23
|
|
|
26
24
|
If the handoff, task, and plan surfaces are all absent or empty, stop: `✅ No tracked work found. Start a new task.`
|
|
@@ -35,17 +33,13 @@ Output these sections, omitting the first when no handoff was found:
|
|
|
35
33
|
|
|
36
34
|
**Active plans:** one line per file in `.canon/plans/`, linking each to its task file in `.canon/tasks/`. Say "None" if empty.
|
|
37
35
|
|
|
38
|
-
**Relevant context:** the memory entries Step 1 matched to the top backlog item, three at most. Skip if none matched.
|
|
39
|
-
|
|
40
36
|
## Step 3: recommend
|
|
41
37
|
|
|
42
38
|
End with one line: `Start with: <first Up next item>` and note whether it has a linked plan.
|
|
43
39
|
|
|
44
40
|
When the board is empty and a handoff was found, name what the handoff leaves open instead: `Start with: <the open thread the handoff names>`. A recommendation slot filled with nothing reads as a failed run, and a handoff on an empty board is the shape a session leaves when it was reasoning rather than shipping.
|
|
45
41
|
|
|
46
|
-
Do not offer to remove entries. A completed task is archived out of `.canon/tasks/` when work ships. The git log is the authoritative record of shipped work. Plan files are archived per the lifecycle rule in `${CLAUDE_SKILL_DIR}
|
|
47
|
-
|
|
48
|
-
Memory is updated only when a recorded fact becomes wrong, never on resume. A domain fact reaches a session through `canon/context/`, which `memory-capture` routes to and the three-tier model loads on demand, so the memory folder read here is the residue no context entry owns.
|
|
42
|
+
Do not offer to remove entries. A completed task is archived out of `.canon/tasks/` when work ships. The git log is the authoritative record of shipped work. Plan files are archived per the lifecycle rule in `${CLAUDE_SKILL_DIR}/../plan-feature/references/plan-lifecycle.md`.
|
|
49
43
|
|
|
50
44
|
## Writing the next one
|
|
51
45
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: session-worktree
|
|
3
|
-
description: Enters a Claude Code worktree at `.claude/worktrees/<name>/` with a name derived from the active plan or branch. Use when asked to "enter a worktree", "start a worktree", "work in a worktree", or at the plan-to-execute boundary after `/plan-feature`. Also use when an `Edit` or `Write` to a main-root file such as a plan, a task, or a
|
|
3
|
+
description: Enters a Claude Code worktree at `.claude/worktrees/<name>/` with a name derived from the active plan or branch. Use when asked to "enter a worktree", "start a worktree", "work in a worktree", or at the plan-to-execute boundary after `/plan-feature`. Also use when an `Edit` or `Write` to a main-root file such as a plan, a task, or a review report was refused for session isolation. Do NOT use to list, clean up, or rotate worktrees (use `git-worktree`).
|
|
4
4
|
metadata:
|
|
5
5
|
family: build
|
|
6
6
|
---
|
|
@@ -41,8 +41,8 @@ The directory test separates the defect from a genuinely bare repository, which
|
|
|
41
41
|
|
|
42
42
|
Try each source in order. Stop at the first match.
|
|
43
43
|
|
|
44
|
-
0. **Caller-supplied.** The invocation carried an argument. Take it as the name and infer nothing further. Accept `<name>` or `<type>/<name>`, where a leading segment matching a type in `${CLAUDE_SKILL_DIR}
|
|
45
|
-
1. **Plan matched to current branch.** Derive `<slug>` per `${CLAUDE_SKILL_DIR}
|
|
44
|
+
0. **Caller-supplied.** The invocation carried an argument. Take it as the name and infer nothing further. Accept `<name>` or `<type>/<name>`, where a leading segment matching a type in `${CLAUDE_SKILL_DIR}/../git-branch/references/branch.md` sets `<type>` and the rest is `<name>`. A bare `<name>` falls to the default type below.
|
|
45
|
+
1. **Plan matched to current branch.** Derive `<slug>` per `${CLAUDE_SKILL_DIR}/../git-branch/references/slug.md`. An empty result falls through to the next source here rather than becoming `latest`, since the slug is one candidate among several. If `<main-root>/.canon/plans/feature-<slug>.md` exists, use `<slug>`.
|
|
46
46
|
2. **Single plan file.** List `<main-root>/.canon/plans/feature-*.md`. If exactly one match, derive `<slug>` from the filename.
|
|
47
47
|
3. **Multiple plan files, no branch match.** Ask the user which plan. Show the candidate slugs as a numbered list. Do not pick.
|
|
48
48
|
4. **Current branch.** When no plan exists, use the `<slug>` from step 1 if it is not `main` or `master`.
|
|
@@ -53,7 +53,7 @@ Tier 0 sits ahead of the inference because every tier below it answers from stat
|
|
|
53
53
|
|
|
54
54
|
Validate the result: letters, digits, dots, underscores, dashes only, max 64 chars (`/` separators are also allowed). If the derived name violates the rule, sanitize by replacing invalid chars with `-` and truncating. Show the sanitized name in the preview before invoking.
|
|
55
55
|
|
|
56
|
-
Resolve `<type>` here as well, since Step 3 previews it and Step 5 renames onto it, drawing the value from the type vocabulary in `${CLAUDE_SKILL_DIR}
|
|
56
|
+
Resolve `<type>` here as well, since Step 3 previews it and Step 5 renames onto it, drawing the value from the type vocabulary in `${CLAUDE_SKILL_DIR}/../git-branch/references/branch.md`. A type the caller spelled in tier 0 wins outright and no reading overrides it. A name that came from a plan, through tier 1 or tier 2, takes its type from `canon tasks plan-branch <plan> --json`, read off the record's `type` field. Every other case takes `feat`, which covers a name from a branch, a bare name from the user, and a plan the verb could not answer for.
|
|
57
57
|
|
|
58
58
|
The verb is the reading rather than this body, because a type read off a plan's sections is a judgment that two sessions reading one plan can grade differently, and the verb answers the same for both. The caller's type still wins over the verb's, because tier 0 is the one source that knows something no file states.
|
|
59
59
|
|
|
@@ -68,7 +68,7 @@ Then test both names the entry is about to claim. Neither read needs a worktree,
|
|
|
68
68
|
|
|
69
69
|
Leave both in place. Resolving either automatically risks the wrong one.
|
|
70
70
|
|
|
71
|
-
The two tests catch different collisions. The branch test misses the one `${CLAUDE_SKILL_DIR}
|
|
71
|
+
The two tests catch different collisions. The branch test misses the one `${CLAUDE_SKILL_DIR}/../git-branch/references/slug.md` records, where two branches differing only in type collapse onto one name: `feat/foo` and `fix/foo` are distinct refs and reach one directory. The directory test is the only read that sees it.
|
|
72
72
|
|
|
73
73
|
The branch test fires on the tier 1 and tier 4 sources whenever the branch the session started on is already conventional, since a name derived from that branch resolves back onto it. Stopping is the answer there. The concern already has a branch, git refuses a second under the same name, and the bare-name rename this replaces only carried the collision forward to the `git-branch` step. It fires on tier 0 as well, where a caller handed a name something already holds.
|
|
74
74
|
|
|
@@ -98,7 +98,7 @@ Call `EnterWorktree` with `name: "<name>"`. Claude Code's tool permission dialog
|
|
|
98
98
|
git branch -m worktree-<name> <type>/<name>
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
The slug transform drops a leading type segment, so `<name>` is what every downstream derivation reads back out of the typed branch. See `${CLAUDE_SKILL_DIR}
|
|
101
|
+
The slug transform drops a leading type segment, so `<name>` is what every downstream derivation reads back out of the typed branch. See `${CLAUDE_SKILL_DIR}/../git-branch/references/slug.md`.
|
|
102
102
|
|
|
103
103
|
Step 2 already cleared the target name, so the rename runs unguarded here. Do not repeat the test. A ref created between the two points is a second session racing this one, which a re-read narrows rather than closes.
|
|
104
104
|
|