@erclx/canon 5.30.0 → 5.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/skills/api-design/references/adopted.md +1 -1
- package/claude/skills/auto-ship/REQUIREMENT.md +4 -16
- package/claude/skills/auto-ship/SKILL.md +13 -58
- package/claude/skills/auto-ship/references/draft-mark.md +2 -2
- package/claude/skills/auto-ship/references/failure-recovery.md +1 -5
- package/claude/skills/auto-ship/references/tier-failures.md +1 -1
- package/claude/skills/auto-ship/references/ui-checklist.md +2 -2
- package/claude/skills/auto-ship/references/verb-absent.md +3 -27
- package/claude/skills/backlog-triage/SKILL.md +1 -1
- package/claude/skills/build-in-slices/REQUIREMENT.md +1 -1
- package/claude/skills/build-in-slices/references/adopted.md +1 -1
- package/claude/skills/canon-cli/REQUIREMENT.md +4 -6
- package/claude/skills/canon-cli/SKILL.md +2 -2
- package/claude/skills/canon-feedback/REQUIREMENT.md +1 -1
- package/claude/skills/canon-feedback/SKILL.md +10 -13
- package/claude/skills/canon-feedback-triage/REQUIREMENT.md +13 -14
- package/claude/skills/canon-feedback-triage/SKILL.md +50 -29
- package/claude/skills/canvas/REQUIREMENT.md +3 -4
- package/claude/skills/canvas/SKILL.md +5 -5
- package/{standards → claude/skills/canvas/references}/canvas.md +12 -1
- package/claude/skills/ci-workflow/REQUIREMENT.md +0 -1
- package/claude/skills/context-fold/REQUIREMENT.md +8 -20
- package/claude/skills/context-fold/SKILL.md +21 -45
- package/claude/skills/context-fold/references/classify.md +7 -8
- package/claude/skills/context-fold/references/completion-report.md +2 -6
- package/claude/skills/context-fold/references/context-refresh.md +5 -15
- package/claude/skills/context-fold/references/promoted-pages.md +3 -3
- package/claude/skills/context-fold/references/receipt-sweep.md +6 -17
- package/claude/skills/context-fold/references/unusable-baseline.md +4 -6
- package/claude/skills/create-rule/REQUIREMENT.md +0 -1
- package/claude/skills/create-skill/REQUIREMENT.md +6 -4
- package/claude/skills/create-skill/SKILL.md +9 -8
- package/{standards → claude/skills/create-skill/references}/skill-paths.md +1 -0
- package/claude/skills/decision-escalate/REQUIREMENT.md +1 -1
- package/claude/skills/decision-escalate/SKILL.md +1 -1
- package/claude/skills/design-taste/REQUIREMENT.md +0 -2
- package/claude/skills/design-taste/SKILL.md +2 -4
- package/claude/skills/design-taste/references/vocabulary.md +1 -1
- package/claude/skills/docs-sync/REQUIREMENT.md +3 -3
- package/claude/skills/docs-sync/SKILL.md +1 -1
- package/claude/skills/document-health/REQUIREMENT.md +2 -2
- package/claude/skills/document-health/SKILL.md +4 -5
- package/claude/skills/document-health/references/axes.md +4 -6
- package/claude/skills/draft-and-pick/REQUIREMENT.md +16 -14
- package/claude/skills/draft-and-pick/SKILL.md +40 -32
- package/claude/skills/draft-and-pick/references/live-arms.md +9 -9
- package/claude/skills/draft-doc/REQUIREMENT.md +5 -5
- package/claude/skills/draft-doc/SKILL.md +10 -11
- package/claude/skills/draft-doc/references/requirements.md +61 -0
- package/claude/skills/draft-doc/references/wiki-kind.md +53 -0
- package/claude/skills/draft-doc/references/wiki.md +50 -30
- package/claude/skills/draft-figure/REQUIREMENT.md +2 -2
- package/claude/skills/draft-figure/SKILL.md +5 -5
- package/claude/skills/draft-figure/references/architecture-set.md +4 -4
- package/claude/skills/draft-figure/references/hand-drawn.md +1 -1
- package/claude/skills/draft-figure/references/mermaid-path.md +55 -0
- package/claude/skills/draft-figure/references/mermaid.md +43 -34
- package/claude/skills/draft-identity/REQUIREMENT.md +1 -1
- package/claude/skills/draft-identity/SKILL.md +9 -7
- package/claude/skills/draft-ready/REQUIREMENT.md +1 -1
- package/claude/skills/draft-ready/SKILL.md +6 -6
- package/claude/skills/draft-ready/references/assembly.md +1 -1
- package/{standards → claude/skills/draft-ready/references}/ready.md +13 -5
- package/claude/skills/git-issue/SKILL.md +1 -1
- package/claude/skills/git-issue/references/issue.md +3 -3
- package/claude/skills/git-pr/SKILL.md +1 -1
- package/claude/skills/git-ship/REQUIREMENT.md +0 -2
- package/claude/skills/git-ship/SKILL.md +16 -24
- package/claude/skills/git-stage/SKILL.md +1 -1
- package/claude/skills/markdown-craft/REQUIREMENT.md +23 -0
- package/claude/skills/markdown-craft/SKILL.md +17 -0
- package/{standards → claude/skills/markdown-craft/references}/markdown.md +14 -7
- package/claude/skills/plan-feature/REQUIREMENT.md +2 -1
- package/claude/skills/plan-feature/SKILL.md +14 -8
- package/{standards → claude/skills/plan-feature/references}/plan.md +33 -21
- package/claude/skills/plan-groundwork/SKILL.md +5 -6
- package/{standards → claude/skills/plan-groundwork/references}/groundwork.md +17 -4
- package/claude/skills/plan-intake/SKILL.md +2 -3
- package/{standards → claude/skills/plan-intake/references}/intake.md +17 -2
- package/claude/skills/plan-intake-answer/REQUIREMENT.md +1 -1
- package/claude/skills/plan-intake-answer/SKILL.md +1 -1
- package/claude/skills/review-address/SKILL.md +2 -2
- package/claude/skills/review-address/references/post-review-findings.md +1 -1
- package/claude/skills/review-craft/REQUIREMENT.md +3 -3
- package/claude/skills/review-craft/SKILL.md +2 -2
- package/claude/skills/review-craft/references/ui.md +4 -4
- package/claude/skills/review-pr/REQUIREMENT.md +1 -1
- package/claude/skills/review-pr/SKILL.md +5 -7
- package/claude/skills/review-pr/references/post.md +2 -2
- package/claude/skills/review-ui/REQUIREMENT.md +0 -1
- package/claude/skills/review-ui/SKILL.md +1 -1
- package/claude/skills/review-ui/references/post.md +1 -1
- package/claude/skills/role-orchestrator/REQUIREMENT.md +0 -3
- package/claude/skills/role-orchestrator/SKILL.md +8 -8
- package/claude/skills/role-orchestrator/references/orchestrator-dispatch.md +4 -3
- package/claude/skills/role-orchestrator/references/orchestrator-handoff.md +7 -10
- package/claude/skills/role-orchestrator/references/orchestrator-parked.md +2 -2
- package/claude/skills/role-orchestrator/references/orchestrator-refill.md +0 -3
- package/claude/skills/role-orchestrator/references/orchestrator-resume.md +1 -1
- package/claude/skills/role-planner/SKILL.md +2 -2
- package/claude/skills/role-reviewer/SKILL.md +1 -1
- package/claude/skills/role-worker/SKILL.md +2 -2
- package/claude/skills/session-compact/REQUIREMENT.md +1 -4
- package/claude/skills/session-compact/SKILL.md +3 -13
- package/claude/skills/session-compact/references/handoff-note.md +2 -2
- package/claude/skills/session-map/REQUIREMENT.md +1 -9
- package/claude/skills/session-map/SKILL.md +8 -16
- package/{standards → claude/skills/session-map/references}/session.md +17 -11
- package/claude/skills/session-relay/REQUIREMENT.md +1 -1
- package/claude/skills/session-resume/REQUIREMENT.md +4 -6
- package/claude/skills/session-resume/SKILL.md +3 -9
- package/claude/skills/session-worktree/SKILL.md +1 -1
- package/claude/skills/session-worktree/references/main-root-writes.md +2 -2
- package/claude/skills/systematic-debugging/REQUIREMENT.md +0 -1
- package/claude/skills/target-check/REQUIREMENT.md +3 -3
- package/claude/skills/target-check/SKILL.md +1 -1
- package/claude/skills/target-check/references/domains.md +1 -1
- package/claude/skills/target-setup/REQUIREMENT.md +4 -4
- package/claude/skills/target-setup/SKILL.md +3 -3
- package/claude/skills/target-setup/references/detect.md +1 -1
- package/claude/skills/target-setup/references/indexes.md +1 -1
- package/claude/skills/task-board/SKILL.md +4 -4
- package/claude/skills/task-board/references/archive.md +1 -1
- package/{standards → claude/skills/task-board/references}/board.md +9 -0
- package/claude/skills/task-board/references/decline.md +1 -1
- package/{standards → claude/skills/task-board/references}/tasks.md +13 -8
- package/claude/skills/teach-workspace/SKILL.md +1 -1
- package/claude/skills/teach-workspace/references/revisit.md +1 -1
- package/{standards → claude/skills/teach-workspace/references}/teach.md +17 -5
- package/claude/skills/test-first/REQUIREMENT.md +1 -1
- package/claude/skills/ux-audit/REQUIREMENT.md +2 -2
- package/claude/skills/ux-audit/SKILL.md +2 -3
- package/claude/skills/write-human/REQUIREMENT.md +0 -1
- package/claude/skills/write-human/SKILL.md +2 -2
- package/docs/agents/audits.md +1 -1
- package/docs/agents/canvas.md +1 -1
- package/docs/agents/commands.md +6 -10
- package/docs/agents/context-audit-checks.md +10 -24
- package/docs/agents/context-audit.md +7 -15
- package/docs/agents/context-classify.md +5 -5
- package/docs/agents/counts.md +5 -5
- package/docs/agents/drift-surfaces.md +2 -2
- package/docs/agents/index.md +3 -4
- package/docs/agents/install-and-sync.md +6 -6
- package/docs/agents/intake.md +1 -1
- package/docs/agents/markdown-audit.md +1 -1
- package/docs/agents/records-stale.md +5 -5
- package/docs/agents/records-validate.md +1 -1
- package/docs/agents/records.md +2 -2
- package/docs/agents/restated.md +1 -1
- package/docs/agents/routing.md +1 -1
- package/docs/agents/rule-citations.md +1 -1
- package/docs/agents/skills-audit.md +2 -2
- package/docs/agents/state-scoped-risk.md +2 -2
- package/docs/agents/superseded.md +2 -2
- package/docs/agents/tasks-plans.md +2 -2
- package/docs/agents/tasks-validate.md +1 -1
- package/docs/agents/tasks.md +1 -1
- package/docs/agents/teach.md +1 -1
- package/docs/agents/test-order.md +1 -1
- package/docs/agents/upstream.md +94 -0
- package/docs/target/migrations.md +24 -0
- package/docs/target/projects.md +5 -7
- package/docs/target/scenarios.md +2 -2
- package/docs/target/sync.md +3 -3
- package/docs/workflow/ai-workflow.md +7 -38
- package/docs/workflow/index.md +1 -1
- package/docs/workflow/operating-model.md +8 -8
- package/docs/workflow/parallel-features.md +7 -7
- package/docs/workflow/skill-map-on-request.md +13 -16
- package/docs/workflow/skill-map.md +20 -32
- package/docs/workflow/visual-design-workflow.md +11 -14
- package/governance/renames.toml +0 -23
- package/governance/rules/canon/605-worktrees.md +1 -1
- package/governance/rules/{standards → canon}/plan.md +5 -5
- package/governance/rules/canon/tasks.md +18 -0
- package/governance/rules/writing/markdown.md +23 -0
- package/governance/stacks/base.toml +1 -1
- package/package.json +1 -1
- package/scripts/core/install-check.sh +2 -2
- package/scripts/core/regen-web-previews.ts +1 -1
- package/src/audits/catalog.ts +5 -97
- package/src/claude/cases/authoring.ts +5 -18
- package/src/claude/cases/misc.ts +0 -17
- package/src/claude/cases/setup.ts +3 -20
- package/src/claude/cases/workflow.ts +0 -33
- package/src/claude/seeds.ts +1 -7
- package/src/claude/skills-audit.ts +1 -1
- package/src/claude/skills-reach.ts +1 -1
- package/src/cli/help.ts +3 -4
- package/src/cli.ts +2 -4
- package/src/commands/claude.ts +9 -15
- package/src/commands/context.ts +18 -280
- package/src/commands/feedback.ts +22 -91
- package/src/commands/gov.ts +2 -2
- package/src/commands/records.ts +24 -6
- package/src/commands/sync.ts +5 -3
- package/src/commands/upstream.ts +430 -0
- package/src/context/audit.ts +6 -15
- package/src/context/classify/extract.ts +6 -13
- package/src/context/classify/patterns.ts +2 -41
- package/src/context/classify/prompts.ts +2 -6
- package/src/context/classify/run.ts +3 -3
- package/src/context/folders.ts +7 -12
- package/src/context/gate.ts +11 -91
- package/src/context/requirements.ts +13 -4
- package/src/counts/scan.ts +3 -3
- package/src/design/components.ts +2 -2
- package/src/feedback/body.ts +0 -12
- package/src/gate/measures.ts +6 -57
- package/src/gate/stages.ts +0 -1
- package/src/gov/citations.ts +9 -3
- package/src/gov/restated.ts +3 -3
- package/src/markdown/structure.ts +3 -3
- package/src/migrate/record-layout.ts +3 -3
- package/src/records/backup.ts +1 -0
- package/src/records/ordinal.ts +1 -1
- package/src/records/prune.ts +2 -1
- package/src/records/stale-canonical.ts +2 -2
- package/src/records/validate.ts +55 -0
- package/src/roots/record.ts +2 -1
- package/src/sandbox/scenario.ts +115 -11
- package/src/shipped/references.ts +3 -3
- package/src/standards/read.ts +52 -1
- package/src/sync/seeds-report.ts +1 -1
- package/src/tasks/answers.ts +14 -1
- package/src/tasks/reach.ts +2 -2
- package/src/tasks/stack.ts +176 -0
- package/src/tasks/validate.ts +1 -1
- package/src/teach/workspace.ts +1 -1
- package/src/upstream/catalog.ts +112 -0
- package/src/upstream/cursor.ts +120 -0
- package/src/upstream/digest.ts +75 -0
- package/src/upstream/due.ts +128 -0
- package/src/upstream/releases.ts +170 -0
- package/standards/context.md +3 -5
- package/standards/design.md +2 -3
- package/standards/index.md +0 -23
- package/standards/publish.md +1 -1
- package/standards/rule.md +1 -1
- package/standards/skill.md +1 -1
- package/tooling/base/reference.md +1 -1
- package/tooling/claude/reference.md +6 -20
- package/tooling/claude/seeds/.claude/hooks/index-reminder.sh +1 -1
- package/tooling/claude/seeds/.claude/hooks/records-index.sh +8 -20
- package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +3 -3
- package/tooling/claude/seeds/CLAUDE.md +1 -3
- package/tooling/claude/seeds/canon/REQUIREMENTS.md +2 -9
- package/tooling/web/configs/e2e/screenshot.ts +0 -1
- package/claude/skills/auto-ship/references/review-findings.md +0 -20
- package/claude/skills/bash-cli-script/REQUIREMENT.md +0 -43
- package/claude/skills/bash-cli-script/SKILL.md +0 -53
- package/claude/skills/bash-cli-script/references/template.md +0 -19
- package/claude/skills/canon-operator/REQUIREMENT.md +0 -62
- package/claude/skills/canon-operator/SKILL.md +0 -113
- package/claude/skills/canon-rollout/REQUIREMENT.md +0 -59
- package/claude/skills/canon-rollout/SKILL.md +0 -140
- package/claude/skills/canon-rollout/references/failure-recovery.md +0 -20
- package/claude/skills/context-fold/references/anchor-sweep.md +0 -58
- package/claude/skills/context-fold/references/wireframe-sweep.md +0 -45
- package/claude/skills/create-standard/REQUIREMENT.md +0 -33
- package/claude/skills/create-standard/SKILL.md +0 -31
- package/claude/skills/design-extract/REQUIREMENT.md +0 -42
- package/claude/skills/design-extract/SKILL.md +0 -108
- package/claude/skills/draft-and-pick/references/frame.html +0 -118
- package/claude/skills/draft-doc/references/wireframes.md +0 -48
- package/claude/skills/index-lookup/REQUIREMENT.md +0 -35
- package/claude/skills/index-lookup/SKILL.md +0 -44
- package/claude/skills/markdown-propose/REQUIREMENT.md +0 -47
- package/claude/skills/markdown-propose/SKILL.md +0 -122
- package/claude/skills/markdown-propose/references/format.md +0 -118
- package/claude/skills/memory-capture/REQUIREMENT.md +0 -50
- package/claude/skills/memory-capture/SKILL.md +0 -117
- package/claude/skills/memory-review/REQUIREMENT.md +0 -52
- package/claude/skills/memory-review/SKILL.md +0 -129
- package/claude/skills/memory-review/references/later-phases.md +0 -118
- package/claude/skills/memory-review/references/receipt-format.md +0 -64
- package/claude/skills/project-commands/REQUIREMENT.md +0 -42
- package/claude/skills/project-commands/SKILL.md +0 -87
- package/claude/skills/repo-metadata/REQUIREMENT.md +0 -37
- package/claude/skills/repo-metadata/SKILL.md +0 -54
- package/claude/skills/restate-plainly/REQUIREMENT.md +0 -41
- package/claude/skills/restate-plainly/SKILL.md +0 -41
- package/claude/skills/review-branch/REQUIREMENT.md +0 -40
- package/claude/skills/review-branch/SKILL.md +0 -137
- package/claude/skills/seed-sync/REQUIREMENT.md +0 -45
- package/claude/skills/seed-sync/SKILL.md +0 -158
- package/claude/skills/sketch-design/REQUIREMENT.md +0 -38
- package/claude/skills/sketch-design/SKILL.md +0 -94
- package/claude/skills/ux-walkthrough/REQUIREMENT.md +0 -56
- package/claude/skills/ux-walkthrough/SKILL.md +0 -53
- package/claude/skills/ux-walkthrough/references/builds.md +0 -15
- package/claude/skills/ux-walkthrough/references/candidate-pages.md +0 -11
- package/claude/skills/ux-walkthrough/references/measuring.md +0 -22
- package/claude/skills/ux-walkthrough/references/record.md +0 -36
- package/claude/skills/ux-walkthrough/references/relay.md +0 -25
- package/docs/agents/architecture-record.md +0 -36
- package/docs/agents/review-classification.md +0 -76
- package/governance/rules/canon/601-indexes.md +0 -9
- package/governance/rules/canon/603-memory.md +0 -11
- package/governance/rules/claude/565-behavior.md +0 -27
- package/governance/rules/claude/567-planning.md +0 -16
- package/governance/rules/claude/575-hooks.md +0 -16
- package/governance/rules/claude/576-settings.md +0 -13
- package/governance/rules/claude/592-claude-md.md +0 -19
- package/governance/rules/lang/120-bash.md +0 -18
- package/governance/rules/standards/architecture.md +0 -13
- package/governance/rules/standards/groundwork.md +0 -13
- package/governance/rules/standards/intake.md +0 -12
- package/governance/rules/standards/markdown.md +0 -16
- package/governance/rules/standards/memory.md +0 -12
- package/governance/rules/standards/ready.md +0 -13
- package/governance/rules/standards/requirements.md +0 -12
- package/governance/rules/standards/session.md +0 -13
- package/governance/rules/standards/tasks.md +0 -15
- package/governance/rules/standards/teach.md +0 -14
- package/governance/rules/standards/wiki.md +0 -13
- package/governance/rules/standards/wireframes.md +0 -13
- package/governance/rules/writing/800-prose.md +0 -15
- package/src/autoship/classify.ts +0 -75
- package/src/autoship/paths.ts +0 -50
- package/src/commands/autoship.ts +0 -129
- package/src/commands/repo.ts +0 -393
- package/src/context/architecture.ts +0 -654
- package/src/context/wireframe-states.ts +0 -238
- package/src/repo/metadata.ts +0 -206
- package/standards/architecture.md +0 -127
- package/standards/memory.md +0 -158
- package/standards/mermaid.md +0 -64
- package/standards/requirements.md +0 -79
- package/standards/wiki.md +0 -77
- package/standards/wireframes.md +0 -143
- package/tooling/claude/seeds/.claude/memory/index.md +0 -8
- package/tooling/claude/seeds/canon/ARCHITECTURE.md +0 -23
- package/tooling/claude/seeds/canon/wireframes/index.md +0 -8
- /package/{standards → claude/skills/create-skill/references}/skill-practice.md +0 -0
- /package/{standards → claude/skills/create-skill/references}/skill-requirement.md +0 -0
- /package/{standards → claude/skills/plan-feature/references}/plan-lifecycle.md +0 -0
- /package/{standards → claude/skills/plan-groundwork/references}/groundwork-spikes.md +0 -0
- /package/{standards → claude/skills/task-board/references}/tasks-decline.md +0 -0
- /package/{standards → claude/skills/teach-workspace/references}/glossary.md +0 -0
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Review classification
|
|
3
|
-
description: Deciding whether a changed set needs the review pass, the two tests it runs, why an empty set refuses rather than skipping, and the written fallback a target on an older binary falls back to
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Review classification
|
|
7
|
-
|
|
8
|
-
`canon autoship classify` answers the one decision the ship chain used to make by reading a bulleted list out of a skill body. It takes the names a branch changed and returns whether the review pass can be skipped, which file decided it, and which of the two tests that file failed.
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
canon autoship classify docs/index.md README.md
|
|
12
|
-
canon autoship classify --json .claude/skills/deploy-check/SKILL.md
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
| Option | Behavior |
|
|
16
|
-
| -------- | ---------------------------------------------------------- |
|
|
17
|
-
| `--json` | Add a machine-readable record on stdout, keeping the frame |
|
|
18
|
-
|
|
19
|
-
Positional paths are the whole input. The verb never touches git, so it reads no baseline of its own and the caller hands over the set it already computed. A second read here could resolve a different range than the one the chain measured, which is the stale-baseline failure a prior row closed.
|
|
20
|
-
|
|
21
|
-
Under `--json` the record holds stdout alone and the frame still renders on stderr, refusals included, which is the split `output-shape.md` fixes for every mode.
|
|
22
|
-
|
|
23
|
-
## The two tests
|
|
24
|
-
|
|
25
|
-
A branch skips review only when both hold across every changed name:
|
|
26
|
-
|
|
27
|
-
- **Every path reads as prose.** The extension is `.md` or `.txt`, compared lowercased. Anything else is code, a config, or an asset.
|
|
28
|
-
- **No path sits under a behavior path.** Markdown under one of those surfaces states what an agent does, so a change there is a behavior change wearing a prose extension.
|
|
29
|
-
|
|
30
|
-
One failing file sends the whole branch to review. Documentation shipped beside a behavior change does not cancel it.
|
|
31
|
-
|
|
32
|
-
The record names the first file to fail, tested in the caller's own order, and each file is read for its extension before its path. A set failing both tests reports one file and one test, which is all a caller needs to route.
|
|
33
|
-
|
|
34
|
-
## The behavior paths
|
|
35
|
-
|
|
36
|
-
Most carry two spellings, the one a surface authors at and the one it reaches a session at, so the rule reads the same in this toolkit and in a project that consumed one.
|
|
37
|
-
|
|
38
|
-
| Surface | Spellings |
|
|
39
|
-
| ----------------- | ------------------------------------- |
|
|
40
|
-
| Plugin skills | `claude/skills/`, `.claude/skills/` |
|
|
41
|
-
| Governance rules | `governance/rules/`, `.claude/rules/` |
|
|
42
|
-
| Standards | `standards/` |
|
|
43
|
-
| Internal and seed | `internal/`, `tooling/` |
|
|
44
|
-
| Root instructions | `CLAUDE.md` |
|
|
45
|
-
|
|
46
|
-
`standards/` carries one spelling. It never installs into a project, reaching a reader by resolution, so there is no consumed copy to name.
|
|
47
|
-
|
|
48
|
-
`CLAUDE.md` is matched as a whole path rather than as a prefix, because a prefix reaches nothing that sits in no folder. A nested `docs/CLAUDE.md` stays informational.
|
|
49
|
-
|
|
50
|
-
The set is data at `src/autoship/paths.ts`. That makes it permanently exempt from any later design that folds a machine-parsed list back into the surface citing it, per the toolkit's machine-parsed clause: a rule restating the list a parser reads is two sources for one list.
|
|
51
|
-
|
|
52
|
-
## Exit codes and refusals
|
|
53
|
-
|
|
54
|
-
| Code | Meaning |
|
|
55
|
-
| ---- | ------------------------------------------------------------ |
|
|
56
|
-
| `0` | prose-only, so the review pass can be skipped |
|
|
57
|
-
| `1` | refused, with `reason` naming the cause |
|
|
58
|
-
| `2` | review is needed, with `file` and `test` naming what decided |
|
|
59
|
-
|
|
60
|
-
Branch on the record's `decision` rather than on the exit code. A shell function wrapping `canon` takes its status from whatever it runs last, so every non-zero exit can reach a caller as zero.
|
|
61
|
-
|
|
62
|
-
An empty set refuses with `no-changes` rather than skipping. Both tests are universally quantified, so an empty set satisfies them vacuously, and reading that as prose-only would route a branch past review for having produced no output at all.
|
|
63
|
-
|
|
64
|
-
## Why it is a verb
|
|
65
|
-
|
|
66
|
-
The decision was three sentences in `auto-ship`'s review step, applied by a session reading a bulleted list of paths. It failed three times. A driven arm on 2026-08-30 staged `.claude/skills/deploy-check/SKILL.md`, which that list names, and the chain skipped review and opened a draft pull request anyway. The rule was correct and the session did not apply it, and the two fixes before that one were each a rewrite of the same prose.
|
|
67
|
-
|
|
68
|
-
A rule a session can talk itself out of moves into a verb. That is the same argument the quiz-order draw in `canon teach lesson` was decided on: an instruction is a hope where a verb is a check.
|
|
69
|
-
|
|
70
|
-
## The written fallback
|
|
71
|
-
|
|
72
|
-
The verb ships with the CLI and Step 6 ships with the plugin, so a target holding an older binary meets a missing subcommand. The skill body keeps the written list and applies it by hand there, naming which of the two decided the run.
|
|
73
|
-
|
|
74
|
-
The fallback is never a skip. Failing open is the exact defect the verb closes, so a body that skips on anything other than a `skip` record would ship every branch unreviewed the moment the subcommand went absent.
|
|
75
|
-
|
|
76
|
-
Two copies of the path set is what the fallback costs, and it stands until a release retires the written half.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Check a folder's index before searching its contents
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Indexes standards
|
|
6
|
-
|
|
7
|
-
## Before searching
|
|
8
|
-
|
|
9
|
-
- Check a folder's `index.md` before grepping its source or reading its files, starting with `canon/context/` for a domain and `canon/wireframes/` for a UI surface. It orients faster than a blind search.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Keep memory writes scoped to .canon/memory/ and out of context-owned domains
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Memory standards
|
|
6
|
-
|
|
7
|
-
## Writing memory
|
|
8
|
-
|
|
9
|
-
- Write all memory files to `.canon/memory/`, not `~/.claude/projects/`
|
|
10
|
-
- A fact about a domain goes to that domain's `canon/context/` entry, not to memory. `canon:memory-capture` routes it there and `canon:context-fold` folds it in. Memory keeps only what no context entry owns. Report it rather than proceeding silently when either skill does not resolve. Both ship with the plugin and this rule ships with the CLI, so a project that installed governance alone does not have them.
|
|
11
|
-
- Never delete a memory entry. Retire one by moving it to `.canon/memory/archive/`, which `canon records push` backs. A bulk retire runs through the shell, where no file edit fires a path-scoped rule.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Handle judgment calls, scope discipline, and file-editing mechanics during a session
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Behavior standards
|
|
6
|
-
|
|
7
|
-
## Communication
|
|
8
|
-
|
|
9
|
-
- Flag concerns or alternatives when a proposed change has tradeoffs worth discussing
|
|
10
|
-
|
|
11
|
-
## Judgment calls
|
|
12
|
-
|
|
13
|
-
- When facing a judgment call with 2-3 reasonable options mid-flow, pick one and state the tradeoff in one sentence. Enumerate options only when the user's preference is the deciding factor.
|
|
14
|
-
- Put a call the user's preference decides through the structured question surface, such as `AskUserQuestion` in Claude Code, and fall back to a numbered list in one message where none exists. Rank the recommendation first and mark it, order the rest behind it, and give each option its cost, since an option with no stated cost is picked blind.
|
|
15
|
-
- Author the real choices only. A structured surface appends its own trailing escapes for a free-text answer and for reopening the question as conversation, so never write either as an option. On the numbered-list fallback, say that answering outside the list is fine.
|
|
16
|
-
- Answer from the artifact when one already put the question in writing with a suggestion, rather than re-asking it.
|
|
17
|
-
|
|
18
|
-
## Scope discipline
|
|
19
|
-
|
|
20
|
-
- Match edit scope to the request. Ship minimal v1 and queue extensions as follow-ups.
|
|
21
|
-
- On simplification requests, edit only what the user named
|
|
22
|
-
- Do not add features the user did not ask for
|
|
23
|
-
- When rewriting a section, preserve existing code blocks, tables, and grouped examples unless the user asked to remove them
|
|
24
|
-
|
|
25
|
-
## Editing mechanics
|
|
26
|
-
|
|
27
|
-
- Edit an existing file with the file-editing tool, never a shell stream editor. An unescaped `&` in a `sed` replacement expands to the whole match, and `sed -i` exits zero when its pattern matches nothing, so both fail silently while reporting success. This governs edits you make, not stream editors written into a project's own scripts.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Enforce planning standards before implementation
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# Planning standards
|
|
6
|
-
|
|
7
|
-
## Planning
|
|
8
|
-
|
|
9
|
-
- Confirm a numbered implementation plan before a change whose diff cannot be described in one sentence.
|
|
10
|
-
- Challenge ambiguous or over-engineered requests before implementation.
|
|
11
|
-
- Search the project, its dependencies, and the standard library for an existing implementation before writing new code.
|
|
12
|
-
- State where the search ran and why each candidate was rejected. Do not assert a search without naming its results.
|
|
13
|
-
- Propose the simplest solution that satisfies the requirement before implementing complex patterns.
|
|
14
|
-
- Write or update tests as part of every implementation plan.
|
|
15
|
-
- Write the test for a behavior before the code that implements it. Confirm visual output after implementing it, not before.
|
|
16
|
-
- Run `canon gov test-order` before shipping a branch. Fix what it names as reaching history ahead of its test.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: State the hook stdin guard and the silencing rule for .claude/hooks scripts
|
|
3
|
-
paths:
|
|
4
|
-
- '.claude/hooks/**/*.sh'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Hook standards
|
|
8
|
-
|
|
9
|
-
## Reading a payload
|
|
10
|
-
|
|
11
|
-
- Open a hook that reads a payload with a bounded `IFS= read -r -d '' -t 2 input`, exiting non-zero on an empty payload. An unbounded `cat` blocks forever against a hand run or an open socket, holding the session open with it.
|
|
12
|
-
|
|
13
|
-
## Silencing output
|
|
14
|
-
|
|
15
|
-
- Before silencing a hook's output, name the stage that catches the same failure. A hook that is the only enforcer of a rule makes its documented guarantee false when it discards that output.
|
|
16
|
-
- Where no other stage catches the failure, capture the output into a variable, exit 0 on success, and emit the error lines as `additionalContext`.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: State the autoContinueAtUsageLimit inversion and the autoCompactWindow cap for .claude/settings.json
|
|
3
|
-
paths:
|
|
4
|
-
- '.claude/settings.json'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Settings standards
|
|
8
|
-
|
|
9
|
-
## Session budget settings
|
|
10
|
-
|
|
11
|
-
- Never set `autoContinueAtUsageLimit` in this file. Its scope is user or managed, and a repository file setting it while no user, `--settings`, or managed value does makes Claude Code read the setting as off, so writing `true` here turns the behavior off for every operator carrying no value of their own.
|
|
12
|
-
- Treat `autoCompactWindow` as capped at the model's own context window. A value above that cap is inert on a session running a smaller window and bites only on one running the larger, so name the window a recorded value is meant for.
|
|
13
|
-
- Record why a session budget setting is left unset in the project's own development notes rather than in this file. JSON carries no pointer, so a session reading the settings file alone concludes the setting is unconfigured and sets it again.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Enforce the CLAUDE.md edit protocol and the test routing a fact into it rather than a rule
|
|
3
|
-
paths:
|
|
4
|
-
- 'CLAUDE.md'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# CLAUDE.md standards
|
|
8
|
-
|
|
9
|
-
## Editing
|
|
10
|
-
|
|
11
|
-
- Show the proposed change as a fenced `diff` block in chat first, then wait for approval before calling the file-editing tool.
|
|
12
|
-
|
|
13
|
-
## Routing
|
|
14
|
-
|
|
15
|
-
- Keep a rule here when it applies every session regardless of what is being edited, on firing alone.
|
|
16
|
-
- Move a rule into `.claude/rules/` when it fires only on a specific path being edited and violating it ships silently, the same firing axis judged the other way.
|
|
17
|
-
- Route a rule failing either half to a context entry or a skill body rather than here. Firing is one axis of three. Conditional presence and updatability are the other two, and this rule states the first alone.
|
|
18
|
-
- Name a rule's tier rather than a rule file. A path-scoped rule reaches the session on its own glob and needs no pointer from here.
|
|
19
|
-
- Point at a skill by name where one applies. A skill loads only when invoked, so an unreferenced skill is one no session finds.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Route bash script authoring to the wrapper skill, and name the lint gate
|
|
3
|
-
paths:
|
|
4
|
-
- '**/*.sh'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Bash standards
|
|
8
|
-
|
|
9
|
-
## Skill routing
|
|
10
|
-
|
|
11
|
-
- Use `canon:bash-cli-script` before writing a script, and follow its guards on what a shell script may be.
|
|
12
|
-
- Load the skill's own reference template rather than hand-rolling logging patterns outside it.
|
|
13
|
-
- Report it rather than proceeding silently when the skill does not resolve. It ships with the plugin and this rule ships with the CLI, so a project that installed governance alone does not have it.
|
|
14
|
-
|
|
15
|
-
## Lint gate
|
|
16
|
-
|
|
17
|
-
- Format with `shfmt --write --indent 2` and lint with `shellcheck --severity=warning` before committing a script.
|
|
18
|
-
- Fix a shellcheck finding at the source. Suppress one with a directive comment only for a genuine false positive, and state why beside the suppression.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/architecture.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Shape and content rules for canon/ARCHITECTURE.md
|
|
4
|
-
paths:
|
|
5
|
-
- 'canon/ARCHITECTURE.md'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Architecture standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the architecture standard for shape and content rules for canon/ARCHITECTURE.md. It is the single source. Read it with `canon standards architecture`.
|
|
13
|
-
- Add a decision here only when it fills one of the standard's slots, and write any other decision into the context entry for the domain it constrains. At the record's stated cap, merge or retire an entry before adding one.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/groundwork.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Folder layout, ordinal naming, reserved numbering, frontmatter and dating, required file contents, and conventions for a measurement track
|
|
4
|
-
paths:
|
|
5
|
-
- '.canon/groundwork/**'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Groundwork standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the groundwork standard for folder layout, ordinal naming, reserved numbering, frontmatter and dating, required file contents, and conventions for a measurement track. It is the single source. Read it with `canon standards groundwork`.
|
|
13
|
-
- Follow the groundwork spikes standard for `08-spikes.md` and the folders holding what a spike produced. Read it with `canon standards groundwork-spikes`.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/intake.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Folder layout, ordinal naming, reserved index number, frontmatter and dating, the item template, the answer contract, and retrieval
|
|
4
|
-
paths:
|
|
5
|
-
- '.canon/intake/**'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Intake standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the intake standard for folder layout, ordinal naming, reserved index number, frontmatter and dating, the item template, the answer contract, and retrieval. It is the single source. Read it with `canon standards intake`.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/markdown.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Headings, paragraph and list structure, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording
|
|
4
|
-
paths:
|
|
5
|
-
- '**/*.md'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Markdown standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the markdown standard for headings, paragraph and list structure, code spans, the date form, punctuation, emphasis, file references, American spelling, and frontmatter wording. It is the single source. Read it with `canon standards markdown`.
|
|
13
|
-
- Read it before a substantial markdown edit. Do not work the banned characters from memory.
|
|
14
|
-
- Run `canon markdown audit <path>` after the edit, and rewrite the sentence carrying a hit rather than swapping the token for a near-synonym.
|
|
15
|
-
- Voice, rhythm, and sentence construction are a separate topic. `800-prose` routes them.
|
|
16
|
-
- Load the `canon:draft-figure` skill before drafting or revising a Mermaid fence or a figure, and report it rather than proceeding silently when it does not resolve.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/memory.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Filename and type prefix, frontmatter, the body shape per type, links between entries, and the lifecycle from write to retire
|
|
4
|
-
paths:
|
|
5
|
-
- '.canon/memory/**'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Memory standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the memory standard for filename and type prefix, frontmatter, the body shape per type, links between entries, and the lifecycle from write to retire. It is the single source. Read it with `canon standards memory`.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/ready.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Folder layout, ordinal naming, the overview frontmatter, the thin-plan contract, and the archive lifecycle for a finished-file handoff
|
|
4
|
-
paths:
|
|
5
|
-
- '.canon/ready/**'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Ready standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the ready standard for folder layout, ordinal naming, the overview frontmatter, the thin-plan contract, and the archive lifecycle for a finished-file handoff. It is the single source. Read it with `canon standards ready`.
|
|
13
|
-
- Load the `canon:draft-ready` skill to write a ready folder, its overview, the thin plan, and the task row. It owns the procedure. Report it rather than proceeding silently when it does not resolve, since it ships with the plugin and this rule ships with the CLI.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/requirements.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Shape and content rules for canon/REQUIREMENTS.md
|
|
4
|
-
paths:
|
|
5
|
-
- 'canon/REQUIREMENTS.md'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Requirements standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the requirements standard for shape and content rules for canon/REQUIREMENTS.md. It is the single source. Read it with `canon standards requirements`.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/session.md. Edit that frontmatter, not this file.
|
|
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
|
-
---
|
|
7
|
-
|
|
8
|
-
# Session map standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the session standard for filename and location, the sections a handoff carries, the write and read procedures, and how a role extends it. It is the single source. Read it with `canon standards session`.
|
|
13
|
-
- Follow this rule rather than the tasks rule for a `session-` file. A handoff is not a task and carries neither `## Outcomes` nor `## Findings`.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/tasks.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Folder layout, filename convention, file format, origin lines, and archiving for task files under .canon/tasks/
|
|
4
|
-
paths:
|
|
5
|
-
- '.canon/tasks/**'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Tasks standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the tasks standard for folder layout, filename convention, file format, origin lines, and archiving for task files under .canon/tasks/. It is the single source. Read it with `canon standards tasks`.
|
|
13
|
-
- Follow the board standard for `priority.md` and `backlog.md`, their readiness groups, and row order. Read it with `canon standards board`.
|
|
14
|
-
- Never hand-edit `.canon/tasks/index.md`. A hook regenerates it from sibling frontmatter.
|
|
15
|
-
- Follow the task decline standard for a task decided against. Read it with `canon standards tasks-decline`.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/teach.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Workspace layout, ordinal naming, frontmatter, and the mission and learning-record formats for a learning workspace
|
|
4
|
-
paths:
|
|
5
|
-
- '.canon/teach/**'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Teach standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the teach standard for workspace layout, ordinal naming, frontmatter, and the mission and learning-record formats for a learning workspace. It is the single source. Read it with `canon standards teach`.
|
|
13
|
-
- Follow the glossary standard for the glossary every workspace carries at its root. It is the single source for the entry shape, the ordering, and which terms the file carries. Read it with `canon standards glossary`.
|
|
14
|
-
- Report it rather than proceeding silently when that file does not resolve. It ships with the plugin and this rule ships with the CLI, so a project that installed governance alone does not have it.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/wiki.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Folder split, frontmatter, naming convention, and sourcing for a wiki reference page
|
|
4
|
-
paths:
|
|
5
|
-
- 'wiki/**/*.md'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Wiki standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the wiki standard for folder split, frontmatter, naming convention, and sourcing for a wiki reference page. It is the single source. Read it with `canon standards wiki`.
|
|
13
|
-
- Read it before drafting a page. Do not work the placement criterion or the naming convention from memory.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
# Generated by `canon gov regen` from standards/wireframes.md. Edit that frontmatter, not this file.
|
|
3
|
-
description: Shape and content rules for canon/wireframes/<surface>.md files
|
|
4
|
-
paths:
|
|
5
|
-
- 'canon/wireframes/**'
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Wireframe standards
|
|
9
|
-
|
|
10
|
-
## Authority
|
|
11
|
-
|
|
12
|
-
- Follow the wireframes standard for shape and content rules for canon/wireframes/<surface>.md files. It is the single source. Read it with `canon standards wireframes`.
|
|
13
|
-
- Read it before adding or revising a surface.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Route markdown edits to the write-human skill for voice, rhythm, sentence construction, and information density
|
|
3
|
-
paths:
|
|
4
|
-
- '**/*.md'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Markdown voice standards
|
|
8
|
-
|
|
9
|
-
## Authority
|
|
10
|
-
|
|
11
|
-
- Load the `canon:write-human` skill for voice, rhythm, sentence construction, and information density. It is the single source for all four.
|
|
12
|
-
- Load it before drafting a passage, not after revising one.
|
|
13
|
-
- Report it rather than proceeding silently when the skill does not resolve.
|
|
14
|
-
- Do not work these rules from memory.
|
|
15
|
-
- Punctuation, formatting, and file references are a separate topic. The markdown rule routes them.
|
package/src/autoship/classify.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BEHAVIOR_FILES,
|
|
3
|
-
BEHAVIOR_PREFIXES,
|
|
4
|
-
PROSE_EXTENSIONS,
|
|
5
|
-
} from '@/autoship/paths'
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Which of the two tests a file failed.
|
|
9
|
-
*
|
|
10
|
-
* Named apart rather than folded into one boolean, because the repair differs.
|
|
11
|
-
* A non-prose extension means the branch carries code and review is ordinary. A
|
|
12
|
-
* behavior path means prose that states what an agent does, which is the half
|
|
13
|
-
* three sessions read past.
|
|
14
|
-
*/
|
|
15
|
-
export type FailedTest = 'extension' | 'behavior-path'
|
|
16
|
-
|
|
17
|
-
/** Why a classification produced no reading. */
|
|
18
|
-
export type ClassifyRefusal = 'no-changes'
|
|
19
|
-
|
|
20
|
-
export type Classification =
|
|
21
|
-
| { readonly kind: 'skip' }
|
|
22
|
-
| {
|
|
23
|
-
readonly kind: 'review'
|
|
24
|
-
readonly test: FailedTest
|
|
25
|
-
readonly file: string
|
|
26
|
-
}
|
|
27
|
-
| { readonly kind: 'refused'; readonly reason: ClassifyRefusal }
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Prefix-anchored against the folders, matching how `resolveCoverage` reads the
|
|
31
|
-
* label map, and equality against the whole paths a prefix cannot reach.
|
|
32
|
-
*/
|
|
33
|
-
function underBehaviorPath(path: string): boolean {
|
|
34
|
-
if (BEHAVIOR_FILES.some((file) => file === path)) return true
|
|
35
|
-
return BEHAVIOR_PREFIXES.some((prefix) => path.startsWith(prefix))
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function readsAsProse(path: string): boolean {
|
|
39
|
-
const lowered = path.toLowerCase()
|
|
40
|
-
return PROSE_EXTENSIONS.some((extension) => lowered.endsWith(extension))
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Decides whether a branch's changed set skips the review pass.
|
|
45
|
-
*
|
|
46
|
-
* The skip needs both tests to pass: every name reads as prose, and no name
|
|
47
|
-
* sits under a behavior path. One behavior file sends the whole branch to
|
|
48
|
-
* review, since documentation shipped beside a behavior change does not cancel
|
|
49
|
-
* it.
|
|
50
|
-
*
|
|
51
|
-
* An empty set refuses rather than skipping. Both tests are universally
|
|
52
|
-
* quantified, so an empty set satisfies them vacuously, and reading that as
|
|
53
|
-
* prose-only would route a branch past review for having produced no output at
|
|
54
|
-
* all.
|
|
55
|
-
*
|
|
56
|
-
* Names only. The caller hands the set the ship chain already computed, so no
|
|
57
|
-
* second baseline is read here and the stale-baseline half stays closed.
|
|
58
|
-
*/
|
|
59
|
-
export function classifyChanges(paths: readonly string[]): Classification {
|
|
60
|
-
if (paths.length === 0) return { kind: 'refused', reason: 'no-changes' }
|
|
61
|
-
|
|
62
|
-
// First failure in the caller's order wins, and each file is tested for its
|
|
63
|
-
// extension before its path. A set failing both tests reports one file and
|
|
64
|
-
// one test, which is all the branch needs to route.
|
|
65
|
-
for (const path of paths) {
|
|
66
|
-
if (!readsAsProse(path)) {
|
|
67
|
-
return { kind: 'review', test: 'extension', file: path }
|
|
68
|
-
}
|
|
69
|
-
if (underBehaviorPath(path)) {
|
|
70
|
-
return { kind: 'review', test: 'behavior-path', file: path }
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return { kind: 'skip' }
|
|
75
|
-
}
|
package/src/autoship/paths.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The surfaces where markdown states what an agent does, and the extensions
|
|
3
|
-
* that read as prose, held as data one command parses.
|
|
4
|
-
*
|
|
5
|
-
* Lifted verbatim in content from the list `auto-ship` Step 6 carried, whose
|
|
6
|
-
* written fallback copy now sits in `auto-ship/references/verb-absent.md`,
|
|
7
|
-
* which a session was asked to apply by hand. It failed that
|
|
8
|
-
* application three times, so the set moved here and the body now calls a verb
|
|
9
|
-
* that reads it. Being machine-parsed makes it permanently exempt from any
|
|
10
|
-
* later design that folds a standard back into the surface citing it, per the
|
|
11
|
-
* machine-parsed clause in `canon/context/standards/resolution.md`.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Path prefixes under which a markdown change is a behavior change.
|
|
16
|
-
*
|
|
17
|
-
* Most carry two spellings, the one a surface authors at and the one it reaches
|
|
18
|
-
* a session at, so the rule reads the same in this toolkit and in a project
|
|
19
|
-
* that consumed one. `standards/` carries one: it never installs into a
|
|
20
|
-
* project, reaching a reader by resolution, so no `.claude/` spelling exists
|
|
21
|
-
* to name.
|
|
22
|
-
*/
|
|
23
|
-
export const BEHAVIOR_PREFIXES = [
|
|
24
|
-
'claude/skills/',
|
|
25
|
-
'.claude/skills/',
|
|
26
|
-
'governance/rules/',
|
|
27
|
-
'.claude/rules/',
|
|
28
|
-
'standards/',
|
|
29
|
-
'internal/',
|
|
30
|
-
'tooling/',
|
|
31
|
-
] as const
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Behavior surfaces named as whole paths rather than as prefixes.
|
|
35
|
-
*
|
|
36
|
-
* A path prefix reaches nothing that sits in no folder, which is what the root
|
|
37
|
-
* instruction file is. Matching is equality rather than a suffix test, so a
|
|
38
|
-
* nested `docs/CLAUDE.md` stays informational the way the body's "at the
|
|
39
|
-
* repository root" qualifier says it should.
|
|
40
|
-
*/
|
|
41
|
-
export const BEHAVIOR_FILES = ['CLAUDE.md'] as const
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Extensions a changed file may carry for the branch to read as prose-only.
|
|
45
|
-
*
|
|
46
|
-
* Compared lowercased, so a `README.MD` is not routed to review for its
|
|
47
|
-
* spelling. Everything else is code, a config, or an asset, and one of them
|
|
48
|
-
* sends the whole branch to review.
|
|
49
|
-
*/
|
|
50
|
-
export const PROSE_EXTENSIONS = ['.md', '.txt'] as const
|