@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
|
@@ -1,79 +1,59 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-fold
|
|
3
|
-
description: What the
|
|
3
|
+
description: What the context-entry fold is for, the gaps it closes, and why it audits its own writes before it reports
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Context fold requirement
|
|
7
7
|
|
|
8
8
|
## Gap
|
|
9
9
|
|
|
10
|
-
Without this skill, the
|
|
10
|
+
Without this skill, the context entries describe the repository the session opened with. A decision a plan settled mid-cycle lives only in the conversation and dies with it, and an entry naming a module the diff rewrote keeps stating what the module used to do.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
The trigger side carries a gap of its own. "Sync the docs" names either corpus to the person saying it, so a description leaving its corpus to the opening clause alone competes with its public-facing sibling on nothing the routing field states, and the context folder the request was about goes untouched.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
The opposite gap opened from the same write. A fold allowed to touch the requirements record on every ship rewrote it one reasonable edit at a time, and nothing read it for whether it still stated the project's identity. Each ship looked correct and the sum drifted.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
A fold that did everything at ship time hid its own job. It marked board outcomes, swept receipts, wrote the design record, and landed promoted pages, so a session invoking it to refresh the context entries ran ten steps and could not tell which one it had asked for.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
The opposite gap opened from the same write. A fold allowed to touch the requirements and architecture records on every ship rewrote both one reasonable edit at a time, and nothing read either for whether it still stated the project's identity. Each ship looked correct and the sum drifted.
|
|
21
|
-
|
|
22
|
-
This skill writes canonical docs at the end of a long build and never reviews what it wrote. An appended figure or a branch-narrated re-measurement lands unchecked the same way a session's own edits do, so what the fold produces carries the exact defect the standards it cites already ban.
|
|
18
|
+
This skill writes canonical docs at the end of a long build. An appended figure, a branch-narrated re-measurement, or an entry pushed past its length lands unchecked the same way a session's own edits do, so what the fold produces carries the exact defect the standards it cites already ban.
|
|
23
19
|
|
|
24
20
|
## Must
|
|
25
21
|
|
|
26
|
-
- Name the context entries
|
|
27
|
-
- Take
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
- Write tracked docs at the current worktree root and the task board at the main root, since only the first commits with the branch
|
|
31
|
-
- Count every other citation before archiving a plan, comparing resolved targets rather than raw strings or bare filenames
|
|
32
|
-
- Retarget a closed task at the archived plan, so the reasoning behind finished work stays reachable
|
|
33
|
-
- Write a decision to the domain context entry it constrains unless a plan this run folds states it and it fills an architecture slot, since reach admits nearly every decision to an always-loaded file and a slot decision only the conversation carries was never reviewed
|
|
22
|
+
- Name the context entries in a trigger phrase rather than in the opening clause alone, so a bare request to sync the docs separates this skill from `docs-sync` on something both descriptions state
|
|
23
|
+
- Take decisions from the session and the refresh scope from the diff
|
|
24
|
+
- Write tracked docs at the current worktree root, since only that copy commits with the branch
|
|
25
|
+
- Write a decision to the domain context entry it constrains, whatever other domains its reasoning touches, so a decision has one home that loads on demand
|
|
34
26
|
- Report a requirements or direction change in one line naming `document-health`, rather than writing it, so the identity record changes only when the operator reviews it
|
|
35
|
-
-
|
|
36
|
-
- Anchor a decision entry this run writes or amends whose reasoning cites a measured number, re-reading the number against the tree before writing the marker
|
|
37
|
-
- Report an anchored decision whose cited path the diff touched, since the number was read before the branch moved what it counted
|
|
38
|
-
- Scan every memory-review receipt rather than the one matching this slug, since the skill that writes them runs after this one in the ship chain and a slug is unique per feature
|
|
39
|
-
- Collect a memory-review receipt whose items are all decided, folding each skip into its memory entry first, since a declined item is recorded nowhere else and a promoted one is already in git
|
|
40
|
-
- Leave a memory-review receipt holding a pending item, and report the count. A branch shipping is not an operator deciding what the receipt proposed.
|
|
41
|
-
- Leave the current branch's review receipt alone, since the chain that wrote it cites it in its own closing line and this skill cannot read whether that citation is still live
|
|
42
|
-
- Land each block of a promotion handoff at the destination its heading names, then delete the file so a later run does not fold it twice
|
|
43
|
-
- Take a promotion destination as already decided, since the operator confirmed it where the page was produced
|
|
27
|
+
- Close on an audit of what the fold touched, running `canon context audit` and reporting the findings on files this run wrote or the diff carries
|
|
44
28
|
- Classify the fold's whole diff baseline through `canon context classify diff`, calling the verb rather than reimplementing its pattern or its prompt in the skill body, since an earlier commit on the branch carries a doc edit the fold is equally responsible for
|
|
45
|
-
- Apply a `REPLACE` or `HISTORY` finding
|
|
46
|
-
- Rewrite a restated or superseded statement in place rather than appending the replacement beside it
|
|
47
|
-
- Report a refusal or a missing `context classify` subcommand as one line and continue the fold either way, since a check that cannot run is not a reason to leave the fold's own output unshipped
|
|
29
|
+
- Apply a `REPLACE` or `HISTORY` finding against the quote it names, report a `MOVE` finding naming the surface it belongs on rather than cutting it, or keep a finding with a one-line reason, rather than leaving a finding unanswered
|
|
30
|
+
- Rewrite a restated or superseded statement in place rather than appending the replacement beside it
|
|
31
|
+
- Report a refusal or a missing `context audit` or `context classify` subcommand as one line and continue the fold either way, since a check that cannot run is not a reason to leave the fold's own output unshipped
|
|
48
32
|
|
|
49
33
|
## Must not
|
|
50
34
|
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
- Widen what a writing step reads when the baseline is unusable. Widening a read is safe and widening a write stubs a surface for every file in the repository.
|
|
35
|
+
- Write the task board, the design record, `CLAUDE.md`, or a page from a promotion handoff. Each has its own owner, and a fold that writes them hides its job behind theirs.
|
|
36
|
+
- Widen what the refresh reads when the baseline is unusable. Widening a read is safe and widening a write stubs a surface for every file in the repository.
|
|
54
37
|
- Write the requirements record. It states identity, and a fold reads one session where a review reads the whole project.
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
- Write an anchor onto a decision the run did not amend, or refresh one without re-reading the number. A date from a pass that measured nothing is the false confidence the marker exists to prevent.
|
|
59
|
-
- Anchor an entry written before the rule, which dates it by blame rather than by a read
|
|
38
|
+
- Create a context entry for a domain the catalog does not list
|
|
39
|
+
- Report an audit finding on an entry this run never touched, which belongs to whoever next edits it
|
|
40
|
+
- Add a path flag to the audit verb from this skill. It takes a project root, so the skill filters the record.
|
|
60
41
|
- Pick or configure a classifier backend. The project setting decides it, and this skill reports the resolved `modelLayer` as returned.
|
|
61
|
-
- Stop the fold on
|
|
42
|
+
- Stop the fold on an audit or classify finding, a refusal, or a missing subcommand. All of them report and continue.
|
|
62
43
|
- Apply a finding against a quote found more than once or not found at all. Report that it could not be located instead of guessing.
|
|
63
44
|
- Re-run the classifier after applying a finding, which loops it over its own edit
|
|
64
|
-
- Cut a
|
|
65
|
-
-
|
|
66
|
-
- Scope Step 10 to the files Steps 3 and 7 wrote this run. An earlier commit on the branch carries a doc edit the fold is equally responsible for, and the verb's own extraction already answers whether anything in range qualifies.
|
|
45
|
+
- Cut a `MOVE` finding. The verdict means correct content sitting on the wrong surface rather than a deletion candidate, so cutting one can discard content that belongs elsewhere rather than removing detail that never belonged at all.
|
|
46
|
+
- Scope the classifier to the files Step 3 wrote this run. An earlier commit on the branch carries a doc edit the fold is equally responsible for, and the verb's own extraction already answers whether anything in range qualifies.
|
|
67
47
|
|
|
68
48
|
## Guards
|
|
69
49
|
|
|
70
50
|
- Neither a `canon/` nor a `.claude/` directory: stop and name the command that sets one up
|
|
71
|
-
- No session divergence and no
|
|
51
|
+
- No session divergence and no diff a context entry could describe: stop with a pass, since both conditions have to hold
|
|
72
52
|
|
|
73
53
|
## Out of scope
|
|
74
54
|
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
55
|
+
- Marking a shipped task's outcomes, sweeping review receipts, and archiving a task, which `task-complete` owns
|
|
56
|
+
- Landing a page a teach promotion handoff carries, which `teach-workspace` owns in its fold mode
|
|
57
|
+
- Creating or declining a task file, which `task-board` owns
|
|
58
|
+
- Public-facing docs, which `docs-sync` owns. Both descriptions name their corpus in the trigger so a request saying only "sync the docs" lands on one of the pair rather than on either.
|
|
59
|
+
- Regenerating the context catalog, which a commit hook runs
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: context-fold
|
|
3
|
-
description: Folds a session
|
|
3
|
+
description: Folds a session's decisions and its diff into the project's context entries, then audits what it touched. Use when asked to "fold the session into context", "update the context entries", "refresh the context folder", when design or requirements changed mid-cycle, after a pivot, or before shipping. Do NOT use for `README.md` or `docs/`, which is `docs-sync`, or to mark a shipped task's outcomes on the board, which is `task-complete`.
|
|
4
4
|
metadata:
|
|
5
5
|
family: ship
|
|
6
6
|
---
|
|
@@ -11,11 +11,11 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
- If neither a `canon/` nor a `.claude/` directory exists, stop: `❌ No canon/ or .claude/ directory found. Run canon claude init to set up the workflow.`
|
|
13
13
|
|
|
14
|
-
The skip for a session that changed nothing lives at the end of Step 2, because it needs the diff to decide.
|
|
14
|
+
The skip for a session that changed nothing lives at the end of Step 2, because it needs the diff to decide.
|
|
15
15
|
|
|
16
16
|
## Diff baseline
|
|
17
17
|
|
|
18
|
-
Steps 2,
|
|
18
|
+
Steps 2, 3, and 4 share one diff. Resolve the base ref once and reuse it:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
git merge-base HEAD origin/main 2>/dev/null || git merge-base HEAD main 2>/dev/null
|
|
@@ -25,20 +25,13 @@ Take the union of `git diff --name-only <base> HEAD`, `git diff --name-only HEAD
|
|
|
25
25
|
|
|
26
26
|
Prefer `origin/main` over local `main`. On `main` itself the local ref resolves to HEAD, so every committed change drops out of the set and the skill goes blind to the work it is meant to read.
|
|
27
27
|
|
|
28
|
-
The baseline is unusable when no merge base resolves against either ref, or when the base came from local `main` and equals HEAD. On an unusable baseline, read `${CLAUDE_SKILL_DIR}/references/unusable-baseline.md` before Step
|
|
28
|
+
The baseline is unusable when no merge base resolves against either ref, or when the base came from local `main` and equals HEAD. On an unusable baseline, read `${CLAUDE_SKILL_DIR}/references/unusable-baseline.md` before Step 3 for the set that step takes instead.
|
|
29
29
|
|
|
30
|
-
## Step 1: read
|
|
30
|
+
## Step 1: read the context catalog
|
|
31
31
|
|
|
32
|
-
Read
|
|
32
|
+
Read `canon/context/index.md` from the current worktree root (`pwd`), not the main worktree root, to see which domain entries exist. Entries are tracked files and edits must commit with the branch. A project the surface move has not reached holds the folder under `.claude/` rather than `canon/`, so read and write it at whichever root already carries it.
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
- `canon/ARCHITECTURE.md`
|
|
36
|
-
- `canon/DESIGN.md`
|
|
37
|
-
- `canon/wireframes/index.md` and every surface file it links to, following a grouped surface's own `index.md` and the siblings it lists rather than stopping at the top-level folder
|
|
38
|
-
|
|
39
|
-
Read the task board from the main worktree root instead, resolving that root the way `session-worktree` does. It is gitignored scratch and never commits with the branch:
|
|
40
|
-
|
|
41
|
-
- `.canon/tasks/index.md` first, then the task files this session touched. That narrow read serves the marking step, which is the only step here that opens a task file.
|
|
34
|
+
Read `canon/REQUIREMENTS.md` beside it when it exists, for the direction a session decision is measured against. This skill never writes it.
|
|
42
35
|
|
|
43
36
|
## Step 2: identify what changed
|
|
44
37
|
|
|
@@ -47,104 +40,42 @@ Two sources feed this step. The session carries judgments no diff can show. The
|
|
|
47
40
|
Review the session for decisions that diverged from the original plan:
|
|
48
41
|
|
|
49
42
|
- Requirements added, removed, or changed scope
|
|
50
|
-
-
|
|
51
|
-
- Design or UX decisions that differ from
|
|
52
|
-
- Tasks blocked or newly identified
|
|
53
|
-
|
|
54
|
-
Then resolve the diff baseline and match it against the board. From `.canon/tasks/index.md` at the main worktree root, pick the task files whose title or description relates to the changed paths and read the ones Step 1 skipped.
|
|
55
|
-
|
|
56
|
-
Path matching only chooses which files to open. Behavior decides each outcome. For each unchecked outcome, decide whether the diff shipped the behavior that outcome names.
|
|
57
|
-
|
|
58
|
-
Completion is the one judgment here that is a fact about the repository rather than a fact about the conversation, so the diff decides it and the session does not. Requirements, architecture, and design stay session-sourced.
|
|
59
|
-
|
|
60
|
-
Keep the match conservative:
|
|
61
|
-
|
|
62
|
-
- Mark only outcomes already written on the board. Never infer a new task from the diff.
|
|
63
|
-
- Match on the behavior an outcome describes, not on filenames or commit subjects. The path match above only narrowed which task files to open.
|
|
64
|
-
- Leave an outcome `[ ]` when the diff is ambiguous. An unmarked shipped outcome costs one manual edit, while a wrongly marked one hides work that never happened.
|
|
65
|
-
|
|
66
|
-
Skip Step 3 when the session shows no divergence **and** the diff matches no queued outcome, reporting `✅ No doc updates needed. Session matched the original plan.` Both conditions have to hold. Shipping a queued task exactly as planned is the ordinary case and it reads as no divergence, so a session-only skip would drop the marking step with it.
|
|
43
|
+
- Technical decisions made or revised
|
|
44
|
+
- Design or UX decisions that differ from what the context entries state
|
|
67
45
|
|
|
68
|
-
Then
|
|
46
|
+
Then resolve the diff baseline and keep the changed paths for Step 3.
|
|
69
47
|
|
|
70
|
-
|
|
48
|
+
Stop when the session shows no divergence **and** the diff carries no path a context entry could describe, being a change confined to the task board, scratch, or files outside the repository's source and docs. Report `✅ No context updates needed. Session matched the original plan.` Both conditions have to hold, since a session-only skip would drop the diff-driven refresh for a mechanical change nobody narrated.
|
|
71
49
|
|
|
72
|
-
## Step 3:
|
|
50
|
+
## Step 3: refresh context entries
|
|
73
51
|
|
|
74
|
-
|
|
52
|
+
Skip this step silently when `canon/context/` does not exist or its catalog lists no entries.
|
|
75
53
|
|
|
76
|
-
|
|
54
|
+
Otherwise read `${CLAUDE_SKILL_DIR}/references/context-refresh.md` for the diff it reads, the widening a removed capability takes, when a new entry is created, and the output lines.
|
|
77
55
|
|
|
78
|
-
|
|
79
|
-
- Write a newly identified task as its own file, following `${CLAUDE_SKILL_DIR}/../../standards/tasks.md` for the filename and frontmatter.
|
|
80
|
-
- Do not touch task files this session did not change.
|
|
81
|
-
- Never hand-edit `.canon/tasks/index.md`. A hook regenerates it.
|
|
82
|
-
|
|
83
|
-
The verb resolves the board at the main worktree root in-process, which is the route `session-worktree` states for an edit inside an existing main-root file.
|
|
84
|
-
|
|
85
|
-
Read `ok` and `reason` out of that record rather than the exit. An operator's shell profile may wrap `canon` in a function that runs the binary and then a second command and takes the second status, which flattens every non-zero exit to zero. A refusal arriving as success leaves the outcome unmarked while the chain moves on, so the board reports shipped work as open and the next session re-plans it.
|
|
86
|
-
|
|
87
|
-
**ARCHITECTURE.md, DESIGN.md, a wireframe surface file (flat or nested)**
|
|
56
|
+
Write a session decision into the entry for the domain it constrains, under that entry's `## Decisions`, whatever other domains its reasoning touches. Every write follows these rules:
|
|
88
57
|
|
|
89
58
|
- Never write `canon/REQUIREMENTS.md`. Report a requirements change in After completion.
|
|
90
|
-
- Update only the sections affected by session decisions.
|
|
91
|
-
-
|
|
92
|
-
- Rewrite a restated or superseded statement in place rather than appending the replacement beside it. State the fact that stands and keep the earlier reasoning only where it is the alternative that lost, per `${CLAUDE_SKILL_DIR}/../../standards/context.md` and `${CLAUDE_SKILL_DIR}/../../standards/architecture.md`.
|
|
59
|
+
- Update only the sections affected by session decisions or the diff, and leave unrelated sections alone.
|
|
60
|
+
- Rewrite a restated or superseded statement in place rather than appending the replacement beside it. State the fact that stands and keep the earlier reasoning only where it is the alternative that lost, per `${CLAUDE_SKILL_DIR}/references/context.md`.
|
|
93
61
|
- Follow `${CLAUDE_SKILL_DIR}/../markdown-craft/references/markdown.md` and the `write-human` skill for all edits.
|
|
94
|
-
- Write a session decision into the `canon/context/` entry for the domain it constrains, under that entry's `## Decisions`, by default.
|
|
95
|
-
- Touch `canon/ARCHITECTURE.md` only when a plan a matched task's `Plan:` line names states a decision filling a slot `${CLAUDE_SKILL_DIR}/../../standards/architecture.md` names. A slot decision no plan carries goes to the domain entry.
|
|
96
|
-
- Read the entry cap the record states before adding a decision to it. At the cap, merge two decisions or retire one to the domain entry it constrains, and name which in the report. Never compress a decision's prose to fit, and never pack two decisions under one heading.
|
|
97
|
-
- Close a decision entry in `canon/ARCHITECTURE.md` with its verification anchor whenever this run writes that entry or amends its reasoning and that reasoning cites a measured number. Re-read the number against the tree first, since the marker records the read rather than the edit. `${CLAUDE_SKILL_DIR}/../../standards/architecture.md` fixes the sentence.
|
|
98
|
-
- Leave every decision entry this run did not write alone, anchored or not. The rule is scoped forward, so an entry written before it is dated by blame rather than by a read. Step 5 reports a stale anchor and no step writes one on an entry it did not amend.
|
|
99
62
|
|
|
100
63
|
Write each updated file immediately. Claude Code's tool permission dialog is the confirmation gate. Do not wait for user input.
|
|
101
64
|
|
|
102
|
-
## Step 4:
|
|
103
|
-
|
|
104
|
-
Skip this step silently when `canon/wireframes/` does not exist or has no surface files. When the baseline is unusable, scope it to the working tree and untracked files, and skip it only when that set is empty, reporting `⚠ No diff to scope against. Skipped the wireframe sweep.`
|
|
105
|
-
|
|
106
|
-
Reuse the diff from the baseline above and filter for UI-affecting paths. UI-affecting paths are framework-dependent. Default heuristic: any file under a `components/`, `features/`, `pages/`, `app/`, `routes/`, or `screens/` folder, plus any `*.tsx`, `*.jsx`, `*.vue`, or `*.svelte` file anywhere in the diff.
|
|
107
|
-
|
|
108
|
-
Skip silently when the filter leaves nothing, which is every branch touching no UI. Otherwise read `${CLAUDE_SKILL_DIR}/references/wireframe-sweep.md` for the slug derivation, the two findings it reports, the stub it writes, and the output lines.
|
|
109
|
-
|
|
110
|
-
## Step 5: architecture anchor sweep
|
|
65
|
+
## Step 4: audit what the fold touched
|
|
111
66
|
|
|
112
|
-
|
|
67
|
+
Run the structural audit, then the content classifier, and answer both before the report.
|
|
113
68
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Past the skip above, read `${CLAUDE_SKILL_DIR}/references/anchor-sweep.md` for how an entry's cited paths are collected, the finding the diff fires, and the report line.
|
|
119
|
-
|
|
120
|
-
## Step 6: flag CLAUDE.md drift
|
|
121
|
-
|
|
122
|
-
If this session established or changed a cross-cutting behavior rule that belongs in root `CLAUDE.md` (a new always-on convention, a revised workflow rule), surface a one-line warning:
|
|
123
|
-
|
|
124
|
-
`⚠ CLAUDE.md may need a rule from this session. Review and edit by hand.`
|
|
125
|
-
|
|
126
|
-
Do not edit `CLAUDE.md` inline. Every `CLAUDE.md` change goes through the show-diff-and-approve gate, so this step only flags. Skip silently when the session made no cross-cutting behavior decision.
|
|
127
|
-
|
|
128
|
-
## Step 7: refresh context entries
|
|
129
|
-
|
|
130
|
-
Read `canon/context/index.md` at `pwd` to see which domain entries exist. Skip this step silently if the directory does not exist or has no entries.
|
|
131
|
-
|
|
132
|
-
Otherwise read `${CLAUDE_SKILL_DIR}/references/context-refresh.md` for its two sources, the routed facts and the diff, the widening a removed capability takes, when a new entry is created, and the output lines.
|
|
133
|
-
|
|
134
|
-
## Step 8: fold promoted pages
|
|
135
|
-
|
|
136
|
-
Skip this step silently when no teach promotion handoff exists at `.canon/tmp/handoff/teach-promotion/<slug>.md` at the main worktree root, deriving `<slug>` per `${CLAUDE_SKILL_DIR}/../../standards/slug.md` with the `latest` fallback. Otherwise read `${CLAUDE_SKILL_DIR}/references/promoted-pages.md` for how each block lands, the handoff delete, and the output lines.
|
|
137
|
-
|
|
138
|
-
## Step 9: sweep consumed receipts
|
|
139
|
-
|
|
140
|
-
Read `${CLAUDE_SKILL_DIR}/references/receipt-sweep.md` for which review and memory receipts this session sweeps, which it keeps, and the output lines. Skip this step silently when nothing qualifies.
|
|
69
|
+
```bash
|
|
70
|
+
canon context audit --json
|
|
71
|
+
```
|
|
141
72
|
|
|
142
|
-
|
|
73
|
+
The verb takes a project root rather than a file list, so it reports the whole folder. Report only the findings whose `rel` names a file Step 3 wrote this run or a file the diff carries, one line each as `⚠ Audit: <rel>, <finding>`, and leave the rest unreported, since a finding in an entry this run never touched belongs to whoever next edits it. Repair a finding in a file Step 3 wrote this run when the fix is inside what it already rewrote, such as a bare reference or a missing section it dropped. Report a missing subcommand or a refusal as `⚠ Audit: <message>` and continue.
|
|
143
74
|
|
|
144
|
-
Skip
|
|
75
|
+
Then classify. Skip the classifier only when the Diff baseline section could not resolve a base ref at all, reporting `⚠ No diff to scope against. Skipped the classify check.` The verb needs a resolvable ref to run against, which is the one condition it cannot answer for itself.
|
|
145
76
|
|
|
146
|
-
Otherwise read `${CLAUDE_SKILL_DIR}/references/classify.md` for the invocation, its scope, the record fields, applying a finding, the one-line keep reason, the unreachable and missing-subcommand lines, and the report shape. `${CLAUDE_SKILL_DIR}` names this skill's own directory, resolved once when the skill loaded
|
|
77
|
+
Otherwise read `${CLAUDE_SKILL_DIR}/references/classify.md` for the invocation, its scope, the record fields, applying a finding, the one-line keep reason, the unreachable and missing-subcommand lines, and the report shape. `${CLAUDE_SKILL_DIR}` names this skill's own directory, resolved once when the skill loaded. Read the reference by that resolved path rather than guessing a `.claude/skills/context-fold/references/classify.md` path from the toolkit's install-time layout, which is a different root than the one this skill's own files live under. The invocation is `canon context classify diff --base <base> --json`, and it runs whether or not that reference resolves. Findings never stop the fold.
|
|
147
78
|
|
|
148
79
|
## After completion
|
|
149
80
|
|
|
150
|
-
Read `${CLAUDE_SKILL_DIR}/references/completion-report.md` before printing anything, for the line each outcome prints, the lines Step
|
|
81
|
+
Read `${CLAUDE_SKILL_DIR}/references/completion-report.md` before printing anything, for the line each outcome prints, the lines Step 2 and Step 4 add, and when the closing line is suppressed.
|
|
@@ -5,7 +5,7 @@ description: The classify diff invocation, the record fields to read, applying a
|
|
|
5
5
|
|
|
6
6
|
# Classify the fold's diff baseline
|
|
7
7
|
|
|
8
|
-
Mechanics for Step
|
|
8
|
+
Mechanics for the classify half of Step 4 of `context-fold`. The body owns the skip condition and the shared baseline, and this file owns the invocation, what the record carries, and what applying a finding does.
|
|
9
9
|
|
|
10
10
|
## Invocation
|
|
11
11
|
|
|
@@ -15,9 +15,9 @@ Call the verb rather than reimplementing its pattern or prompt in this skill:
|
|
|
15
15
|
canon context classify diff --base <base> --json
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Never substitute a different verb for it, such as `canon
|
|
18
|
+
Never substitute a different verb for it, such as `canon docs <name>` (a documentation lookup, not a classification).
|
|
19
19
|
|
|
20
|
-
Reuse the base the Diff baseline section already resolved for Steps 2
|
|
20
|
+
Reuse the base the Diff baseline section already resolved for Steps 2 and 5 rather than resolving a second time. Never pick or configure a backend here. The project setting decides it, and this step reports `modelLayer` as the record returns it.
|
|
21
21
|
|
|
22
22
|
## Reading the record
|
|
23
23
|
|
|
@@ -30,17 +30,16 @@ Each finding carries `file`, a `verdict` of `KEEP`, `REPLACE`, `HISTORY`, or `MO
|
|
|
30
30
|
|
|
31
31
|
## Scope
|
|
32
32
|
|
|
33
|
-
Answer every non-`KEEP` finding the verb returns, not only the files Step 3
|
|
33
|
+
Answer every non-`KEEP` finding the verb returns, not only the files Step 3 wrote this run. A branch carrying earlier commits from a prior session has doc edits the fold is equally responsible for, and the verb's own extraction already scopes to canonical doc types and reports nothing when the range carries none, so there is no narrower check to add here.
|
|
34
34
|
|
|
35
35
|
## Applying a finding
|
|
36
36
|
|
|
37
37
|
Locate the finding by its `quote` in the file's current content. The quote is often a narrow fragment rather than the whole clause it sits in, since the regex layer's own match is a short pattern hit, so the edit below targets the sentence or bullet the quote sits in rather than the literal substring alone.
|
|
38
38
|
|
|
39
39
|
- **Found exactly once.** Apply the verdict:
|
|
40
|
-
- `REPLACE`: rewrite the sentence or bullet carrying the quote in place with the fact that now stands, per Step 3
|
|
40
|
+
- `REPLACE`: rewrite the sentence or bullet carrying the quote in place with the fact that now stands, per Step 3's rewrite-in-place rule. State what is current and drop what the quote restated, in the one edit.
|
|
41
41
|
- `HISTORY`: rewrite the sentence or bullet carrying the quote to drop the narration and keep any current fact the same clause states. The quote narrates how the fact arrived rather than stating the fact, which a canonical doc excludes regardless of what wrote it, and a literal cut of the fragment alone would leave the rest of the clause grammatically stranded.
|
|
42
|
-
- `MOVE
|
|
43
|
-
- `MOVE`, model-decided (`decidedBy: 'model'`): do not cut. The model's own prompt defines `MOVE` more broadly, for correct content sitting on the wrong surface, such as domain mechanism written into `canon/ARCHITECTURE.md` that belongs in a context entry. Cutting would delete content a fold with no model configured would never have flagged at all. Report the finding instead, naming the surface the `reason` names as where the content belongs, and leave the file unedited.
|
|
42
|
+
- `MOVE`: do not cut. The verdict means correct content sitting on the wrong surface, such as a rule written into a context entry that belongs in a path-scoped rule, and only the model layer returns it. Cutting would delete content a fold with no model configured would never have flagged at all. Report the finding instead, naming the surface the `reason` names as where the content belongs, and leave the file unedited.
|
|
44
43
|
- **Found more than once, or not found at all.** Report that the finding could not be located rather than guessing which occurrence or rewriting nothing silently. A model verdict paraphrasing the quote it read is the ordinary way this happens.
|
|
45
44
|
|
|
46
45
|
Run the classifier once per fold. Do not re-run it after applying a finding to check the edit, since a second pass over what this step wrote is the loop the verb's own reference already warns against.
|
|
@@ -73,7 +72,7 @@ Then one line per non-`KEEP` finding:
|
|
|
73
72
|
|
|
74
73
|
- `✏ Rewrote: <file>, "<quote>" (<reason>)`
|
|
75
74
|
- `✂ Cut: <file>, "<quote>" (<reason>)`
|
|
76
|
-
- `➡ Move needed: <file>, "<quote>" (<reason>)`, for a
|
|
75
|
+
- `➡ Move needed: <file>, "<quote>" (<reason>)`, for a `MOVE` this step reported rather than cut
|
|
77
76
|
- `⏭ Kept: <file>, "<quote>", <reason for keeping>`
|
|
78
77
|
- `⚠ Not located: <file>, "<quote>" not found or found more than once`
|
|
79
78
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Completion report
|
|
3
|
-
description: The lines context-fold prints once every step has run, being one per file updated, the
|
|
3
|
+
description: The lines context-fold prints once every step has run, being one per file updated, the direction-change note, Step 4's audit and classify lines, and the closing line with when it is suppressed
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Completion report
|
|
@@ -11,16 +11,12 @@ Output one line per file updated:
|
|
|
11
11
|
|
|
12
12
|
`✅ Updated: <path written>`
|
|
13
13
|
|
|
14
|
-
When Step 3 met the architecture record's cap, add one line naming what it did there:
|
|
15
|
-
|
|
16
|
-
`↪ Architecture at cap: merged <heading> into <heading>` or `↪ Architecture at cap: retired <heading> to <context entry>`
|
|
17
|
-
|
|
18
14
|
When Step 2 noted a requirements change: `↪ Direction changed this session: run document-health on canon/REQUIREMENTS.md`
|
|
19
15
|
|
|
20
|
-
Step
|
|
16
|
+
Step 4 adds one `⚠ Audit:` line per audit finding it reported, in the shape the body gives. Its classify half adds its own lines when it applied or reported a finding, in the exact shape `${CLAUDE_SKILL_DIR}/references/classify.md` gives them under its own Report section. Do not shorten or paraphrase those lines here or in the reply, since the quote and the reason are what a reader checks the finding against.
|
|
21
17
|
|
|
22
|
-
If no files were updated and
|
|
18
|
+
If no files were updated and Step 4 reported nothing, output:
|
|
23
19
|
|
|
24
20
|
`✅ No changes needed.`
|
|
25
21
|
|
|
26
|
-
Suppress that line when Step 2 already reported no
|
|
22
|
+
Suppress that line when Step 2 already reported no context updates. It closes the run on its own, and emitting both leaves a quiet session reporting success twice for one outcome.
|
|
@@ -1,28 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Refresh context entries
|
|
3
|
-
description: How context-fold Step
|
|
3
|
+
description: How context-fold Step 3 folds diff-scoped rewrites into canon/context entries, when it creates an entry, and the lines it reports
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Refresh context entries
|
|
7
7
|
|
|
8
|
-
Step
|
|
8
|
+
Step 3 of `context-fold`, reached in order once `canon/context/index.md` lists at least one entry.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
The diff carries what the repository changed, and this step rewrites against it.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
This half is not diff-scoped and must not be. A gotcha a session hit while working is exactly the fact the diff never shows, and scoping it to changed files would drop the entries worth keeping. The handoff is a named input rather than a scan, so the reach stays bounded to what capture decided.
|
|
15
|
-
|
|
16
|
-
Skip this half silently when the file is absent, which is every run where nothing routed.
|
|
17
|
-
|
|
18
|
-
**The diff.** When the baseline is unusable, scope this half to the working tree and untracked files, and skip it only when that set is empty, reporting `⚠ No diff to scope against. Skipped the context refresh.` The routed half still runs, since it reads a file rather than a diff.
|
|
12
|
+
When the baseline is unusable, scope this step to the working tree and untracked files, and skip it only when that set is empty, reporting `⚠ No diff to scope against. Skipped the context refresh.`
|
|
19
13
|
|
|
20
14
|
Reuse the diff from the baseline above, names and content both. For each domain listed in `canon/context/index.md`, read its own entry: a flat `canon/context/<domain>.md`, or, for a domain split into a folder, its `canon/context/<domain>/index.md` and every sibling file that index links. Follow the index rather than globbing the folder, since a folder can hold a file the index does not list yet.
|
|
21
15
|
|
|
22
16
|
- Map the entry's section headings, whether they sit in one flat file or spread across a nested domain's sibling files, to the changed files. An entry is relevant when its prose references files, modules, or decisions touched by the diff.
|
|
23
17
|
- For each relevant entry, rewrite only the sections affected by the diff. Same pattern as `docs-sync`. Do not touch unrelated sections. Never rewrite a split domain's own `index.md` directly, since a regen overwrites it the same way it overwrites the top-level catalog. Rewrite the sibling file the affected section actually lives in instead.
|
|
24
|
-
- Rewrite a restated or superseded statement in place rather than appending beside it, the same rule
|
|
25
|
-
- Write a reference to another entry as the path that entry sits at, rather than as its bare filename. `${CLAUDE_SKILL_DIR}
|
|
18
|
+
- Rewrite a restated or superseded statement in place rather than appending beside it, the same rule the body states for a session decision.
|
|
19
|
+
- Write a reference to another entry as the path that entry sits at, rather than as its bare filename. `${CLAUDE_SKILL_DIR}/references/context.md` states the form, and a bare name strands the reference once a domain splits into subfolders.
|
|
26
20
|
|
|
27
21
|
## When the diff removes a capability
|
|
28
22
|
|
|
@@ -35,14 +29,10 @@ Grep the tree for the name that went, rather than for the paths the diff carries
|
|
|
35
29
|
|
|
36
30
|
Report each hit as an ordinary rewrite.
|
|
37
31
|
|
|
38
|
-
Create a new entry only for a domain `canon/context/index.md` already lists but carries no file for, following `${CLAUDE_SKILL_DIR}
|
|
32
|
+
Create a new entry only for a domain `canon/context/index.md` already lists but carries no file for, following `${CLAUDE_SKILL_DIR}/references/context.md` for its shape. Before treating a domain as carrying no file, confirm it holds no entry under either spelling, `canon/context/<domain>.md` or `canon/context/<domain>/index.md`, since a domain already split into a folder still passes a check that only looked for the flat file. A row in the catalog is the deliberate decision, taken by whoever added it. This step only fills in what that decision left open, and only until the next `canon indexes regen` pass, which rebuilds the catalog from each entry's own frontmatter plus every sibling's and drops a row whose file still does not exist. Create the file before that regen runs, or the row this bar exists to fill in is gone. A domain the catalog does not list at all is a different case: report it and stop, rather than creating an entry or a catalog row for it.
|
|
39
33
|
|
|
40
34
|
Write each updated entry immediately. Output one line per file, naming the path this run actually wrote rather than always the flat template:
|
|
41
35
|
|
|
42
36
|
`✅ Context: canon/context/<domain>.md` for a flat entry, or `✅ Context: canon/context/<domain>/<sub-area>.md` for the sibling file a nested edit landed in
|
|
43
37
|
|
|
44
|
-
Add a line naming the handoff when one was consumed:
|
|
45
|
-
|
|
46
|
-
`🧹 Folded: .canon/tmp/handoff/memory-routing/<slug>.md`
|
|
47
|
-
|
|
48
38
|
The base lint-staged config runs `canon indexes regen` on every committed `*.md`, so `canon/context/index.md` refreshes automatically on commit. No manual step needed.
|
|
@@ -1,27 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Context entry reference
|
|
3
3
|
description: Shape and content rules for canon/context/<domain>.md entries
|
|
4
|
-
paths:
|
|
5
|
-
- 'canon/context/**'
|
|
6
|
-
rule:
|
|
7
|
-
- 'Before non-trivial work in a domain, read its `canon/context/<domain>.md` entry. Use `canon/context/index.md` to find it.'
|
|
8
|
-
- 'Leave the entry conforming when work in its domain changes what it describes.'
|
|
9
4
|
---
|
|
10
5
|
|
|
11
6
|
# Context entry reference
|
|
12
7
|
|
|
13
8
|
Applies to per-domain narrative entries under `canon/context/`. Skip for `index.md`, which is regenerated by `canon indexes regen`.
|
|
14
9
|
|
|
10
|
+
## Contents
|
|
11
|
+
|
|
12
|
+
- [Scope](#scope)
|
|
13
|
+
- [Organizing principle](#organizing-principle)
|
|
14
|
+
- [What a working entry looks like](#what-a-working-entry-looks-like)
|
|
15
|
+
- [Frontmatter](#frontmatter)
|
|
16
|
+
- [Required sections](#required-sections)
|
|
17
|
+
- [Expected sections](#expected-sections)
|
|
18
|
+
- [Optional sections](#optional-sections)
|
|
19
|
+
- [Ordering](#ordering)
|
|
20
|
+
- [The development entry](#the-development-entry)
|
|
21
|
+
- [What goes in](#what-goes-in)
|
|
22
|
+
- [What does not go in](#what-does-not-go-in)
|
|
23
|
+
- [Length](#length)
|
|
24
|
+
- [Examples](#examples)
|
|
25
|
+
|
|
15
26
|
## Scope
|
|
16
27
|
|
|
17
28
|
Governs per-domain narrative entries under `canon/context/`: their structure, the decisions and gotchas they carry, and what they leave to the code.
|
|
18
29
|
|
|
19
30
|
Does not govern:
|
|
20
31
|
|
|
21
|
-
- Decisions filling a stack, delivery, boundary, layout, or build-principle slot, and system-wide risks: `architecture.md`
|
|
22
32
|
- Product scope, goals, and non-goals: `requirements.md`
|
|
23
33
|
- Path-scoped coding rules: `rule.md`
|
|
24
|
-
- Wireframes, which answer layout questions an entry hands off: `wireframes.md`
|
|
25
34
|
- Figures and architecture views, which answer structure questions an entry hands off: the `draft-figure` skill
|
|
26
35
|
- The consumer-facing reference under `docs/`, whose reader is operating the project without the source open: `docs.md`
|
|
27
36
|
|
|
@@ -88,10 +97,10 @@ Only the `development` entry carries this section. It is not a general-purpose h
|
|
|
88
97
|
## What goes in
|
|
89
98
|
|
|
90
99
|
- Per-domain narrative on how the code is structured and why
|
|
91
|
-
- Decisions that constrain the domain, whether or not their reasoning touches another one.
|
|
100
|
+
- Decisions that constrain the domain, whether or not their reasoning touches another one. A decision lives in the entry of the domain it constrains.
|
|
92
101
|
- Constraints, gotchas, things tried and rejected
|
|
93
102
|
- Domain-specific conventions that do not fit a `paths:`-scoped rule
|
|
94
|
-
- A measured figure,
|
|
103
|
+
- A measured figure, closed with a trailing `Measured at <short-sha> on <YYYY-MM-DD>.` naming a commit rather than a pull request number or a branch. Carry one anchor per figure and rewrite it in place when the number is re-read, whether or not it moved. An absent anchor reads as unchecked.
|
|
95
104
|
- A reference to another entry, spelled as the path that entry sits at rather than as its bare filename. A bare name resolves against whichever folder the reader is already in, so a domain that splits into subfolders strands every inbound reference and the break surfaces nowhere. A reference to a seed, a standard, or a file the project owns elsewhere keeps the form its own surface uses.
|
|
96
105
|
|
|
97
106
|
## What does not go in
|
|
@@ -103,7 +112,7 @@ Only the `development` entry carries this section. It is not a general-purpose h
|
|
|
103
112
|
- Rules. Those go in `.claude/rules/<scope>.md` with a `paths:` glob.
|
|
104
113
|
- Tutorials or human onboarding. Those go in `docs/` if a public audience exists.
|
|
105
114
|
- Generated content (API references). Generate, do not write by hand.
|
|
106
|
-
- Anything already in `canon/REQUIREMENTS.md
|
|
115
|
+
- Anything already in `canon/REQUIREMENTS.md`.
|
|
107
116
|
- The history of how the domain reached its current shape. An entry describes the repository as it stands, so a change number, release label, or date attached to a change goes wherever the project tracks work.
|
|
108
117
|
- A rejected alternative's provenance, which is the same rule at the one place the section above admits history. Keep what was tried and why it lost. Cut who tried it and when.
|
|
109
118
|
- The route to a decision: the rounds of candidates, the tuning steps a threshold passed through, the review pass that caught a miss. State the decision, what lost, and why, once and in the present tense. Cut the route. Git and the change that introduced it keep it.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: An unusable diff baseline
|
|
3
|
-
description: When context-fold's diff baseline is unusable,
|
|
3
|
+
description: When context-fold's diff baseline is unusable, why Step 3 keeps the scoped set rather than the whole tree
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# An unusable diff baseline
|
|
@@ -14,12 +14,8 @@ The baseline is unusable in two cases:
|
|
|
14
14
|
|
|
15
15
|
An unusable baseline costs only the committed half. `git diff <base> HEAD` is empty by definition once the base equals HEAD, while `git diff HEAD` and `git ls-files --others --exclude-standard` still report uncommitted and untracked work at correct scope.
|
|
16
16
|
|
|
17
|
-
**Step
|
|
17
|
+
**Step 3 keeps the scoped set.** Run it on the working tree and untracked files alone, and skip only when that set comes out empty, reporting the warning its own reference names.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Never substitute the whole tree for a missing baseline, and do not widen to `git log -p -1` for coverage. On a fresh `git init` project the last commit is the scaffold commit, so that read is the whole tree by another route, and Step 3 writes, so the same set rewrites every context entry that tree touches. `task-complete` takes the widened read for its marking step, which only reads and matches conservatively against outcomes already on the board.
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Step 5 only reports, and the whole tree costs it a different way. Every anchored decision cites a path the scaffold commit carries, so the sweep flags the entire record and the reader learns nothing about which number moved.
|
|
24
|
-
|
|
25
|
-
Widening what a step reads is safe. Widening what a step writes is not, and widening what a step flags spends the reader's attention on entries nothing put in doubt.
|
|
21
|
+
Widening what a step reads is safe. Widening what a step writes is not.
|
|
@@ -42,4 +42,3 @@ The subdir gets picked by feel, so a UI copy rule lands in the always-on folder
|
|
|
42
42
|
- Editing a rule that already exists
|
|
43
43
|
- Toolkit source rules, which are authored in the toolkit rather than in a target
|
|
44
44
|
- Installing the rules the toolkit ships, which the governance setup path owns
|
|
45
|
-
- A standard, which `create-standard` owns
|
|
@@ -45,7 +45,7 @@ A project-authored rule numbers in `900-999`, the band reserved for one. `000-89
|
|
|
45
45
|
|
|
46
46
|
## Step 4: write the rule
|
|
47
47
|
|
|
48
|
-
Read `${CLAUDE_SKILL_DIR}
|
|
48
|
+
Read `${CLAUDE_SKILL_DIR}/references/rule.md` for frontmatter, body shape, and voice before writing the body. Do not work the shape from memory.
|
|
49
49
|
|
|
50
50
|
Write `.claude/rules/project/<subdir>/<n>-<slug>.md` where `<slug>` is a 1-to-3-word kebab topic. Preview the resolved path, subdir, number, and frontmatter, then write immediately. The tool permission dialog is the confirmation gate.
|
|
51
51
|
|
|
@@ -66,7 +66,7 @@ paths:
|
|
|
66
66
|
- <imperative rule>
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Title casing is sentence case, with proper nouns keeping their own casing (`# TypeScript standards`). `${CLAUDE_SKILL_DIR}
|
|
69
|
+
Title casing is sentence case, with proper nouns keeping their own casing (`# TypeScript standards`). `${CLAUDE_SKILL_DIR}/references/rule.md` owns the rest of the body shape.
|
|
70
70
|
|
|
71
71
|
## After writing
|
|
72
72
|
|