@thebassclef/lite 1.0.4 → 1.1.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/dist/cli.cjs +65 -0
- package/dist/cli.js +65 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite/.claude/agents/architect.md +70 -0
- package/dist/lite/.claude/agents/builder.md +114 -0
- package/dist/lite/.claude/agents/designer.md +156 -0
- package/dist/lite/.claude/agents/reviewer.md +88 -0
- package/dist/lite/.claude/hooks/bassclef-sync.sh +85 -27
- package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/dist/lite/.claude/hooks/longrun-prep-render-check.sh +236 -0
- package/dist/lite/.claude/hooks/persona-name-scrub-check.sh +105 -0
- package/dist/lite/.claude/hooks/skill-step-list-check.sh +171 -0
- package/dist/lite/.claude/luminaries/alan-cooper.md +170 -0
- package/dist/lite/.claude/luminaries/alistair-cockburn.md +140 -0
- package/dist/lite/.claude/luminaries/amazon-pr-faq.md +34 -0
- package/dist/lite/.claude/luminaries/andreas-zeller.md +74 -0
- package/dist/lite/.claude/luminaries/ash-maurya.md +121 -0
- package/dist/lite/.claude/luminaries/bill-buxton.md +210 -0
- package/dist/lite/.claude/luminaries/charles-sanders-peirce.md +150 -0
- package/dist/lite/.claude/luminaries/david-ogilvy.md +192 -0
- package/dist/lite/.claude/luminaries/don-norman.md +173 -0
- package/dist/lite/.claude/luminaries/edward-tufte.md +179 -0
- package/dist/lite/.claude/luminaries/eric-evans.md +160 -0
- package/dist/lite/.claude/luminaries/frederick-brooks.md +50 -0
- package/dist/lite/.claude/luminaries/gang-of-four.md +157 -0
- package/dist/lite/.claude/luminaries/glenford-myers.md +230 -0
- package/dist/lite/.claude/luminaries/hunt-thomas.md +115 -0
- package/dist/lite/.claude/luminaries/hyrum-wright.md +94 -0
- package/dist/lite/.claude/luminaries/jason-fried-dhh.md +46 -0
- package/dist/lite/.claude/luminaries/jesse-james-garrett.md +154 -0
- package/dist/lite/.claude/luminaries/john-ousterhout.md +94 -0
- package/dist/lite/.claude/luminaries/karl-popper.md +132 -0
- package/dist/lite/.claude/luminaries/kent-beck.md +168 -0
- package/dist/lite/.claude/luminaries/linus-torvalds.md +218 -0
- package/dist/lite/.claude/luminaries/martin-fowler.md +164 -0
- package/dist/lite/.claude/luminaries/michael-feathers.md +125 -0
- package/dist/lite/.claude/luminaries/michael-nygard.md +118 -0
- package/dist/lite/.claude/luminaries/robert-c-martin.md +164 -0
- package/dist/lite/.claude/luminaries/saltzer-schroeder.md +194 -0
- package/dist/lite/.claude/luminaries/sophia-prater.md +193 -0
- package/dist/lite/.claude/luminaries/stephen-toulmin.md +131 -0
- package/dist/lite/.claude/luminaries/tony-hoare.md +170 -0
- package/dist/lite/.claude/luminaries/vaughn-vernon.md +50 -0
- package/dist/lite/.claude/luminaries/w-edwards-deming.md +158 -0
- package/dist/lite/.claude/rules/accessor-library-discipline.md +110 -0
- package/dist/lite/.claude/rules/adr-discipline.md +96 -0
- package/dist/lite/.claude/rules/api-conventions.md +115 -0
- package/dist/lite/.claude/rules/artifact-ingestion.md +137 -0
- package/dist/lite/.claude/rules/assert-only-after-verify.md +111 -0
- package/dist/lite/.claude/rules/blocked-items.md +139 -0
- package/dist/lite/.claude/rules/bootstrap-pair-discipline.md +106 -0
- package/dist/lite/.claude/rules/branching.md +28 -0
- package/dist/lite/.claude/rules/cold-adopter-harness-discipline.md +93 -0
- package/dist/lite/.claude/rules/commit-conventions.md +22 -0
- package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/compounding-sequence-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/context-engineering.md +155 -0
- package/dist/lite/.claude/rules/context-management.md +85 -0
- package/dist/lite/.claude/rules/defensive-bash.md +52 -0
- package/dist/lite/.claude/rules/deferred-actions.md +233 -0
- package/dist/lite/.claude/rules/destructive-operations.md +69 -0
- package/dist/lite/.claude/rules/diagnosis.md +38 -0
- package/dist/lite/.claude/rules/github-issue-flash-tweet.md +114 -0
- package/dist/lite/.claude/rules/guardrails.md +73 -0
- package/dist/lite/.claude/rules/hook-wire-on-author.md +77 -0
- package/dist/lite/.claude/rules/identifier-leak-prevention.md +73 -0
- package/dist/lite/.claude/rules/iteration-bet-brief-completeness.md +43 -0
- package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +79 -0
- package/dist/lite/.claude/rules/longrun-prep-plan-doc-compression.md +77 -0
- package/dist/lite/.claude/rules/loop-discipline.md +71 -0
- package/dist/lite/.claude/rules/manual-prod-approval.md +100 -0
- package/dist/lite/.claude/rules/marker-enrichment-discipline.md +72 -0
- package/dist/lite/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/dist/lite/.claude/rules/new-dependency-check.md +44 -0
- package/dist/lite/.claude/rules/oo-ad-entry-point.md +95 -0
- package/dist/lite/.claude/rules/operator-facing-prose.md +177 -0
- package/dist/lite/.claude/rules/option-label-discipline.md +82 -0
- package/dist/lite/.claude/rules/pattern-annotation.md +83 -0
- package/dist/lite/.claude/rules/persona-name-leak-scrub.md +90 -0
- package/dist/lite/.claude/rules/plain-english-discipline.md +132 -0
- package/dist/lite/.claude/rules/plan-enumeration-needs-value-props.md +177 -0
- package/dist/lite/.claude/rules/pr-body-shape.md +195 -0
- package/dist/lite/.claude/rules/pr-strategy.md +142 -0
- package/dist/lite/.claude/rules/pr-title-shape.md +90 -0
- package/dist/lite/.claude/rules/prototype-workflow.md +53 -0
- package/dist/lite/.claude/rules/reserved-skill-names.md +103 -0
- package/dist/lite/.claude/rules/schema-management.md +42 -0
- package/dist/lite/.claude/rules/sdlc-gates.md +149 -0
- package/dist/lite/.claude/rules/security.md +37 -0
- package/dist/lite/.claude/rules/session-artifacts.md +236 -0
- package/dist/lite/.claude/rules/skill-composition-declarations.md +105 -0
- package/dist/lite/.claude/rules/skill-description-clarity.md +196 -0
- package/dist/lite/.claude/rules/skill-procedure-step-list.md +119 -0
- package/dist/lite/.claude/rules/sprint-prep-preset-picker.md +76 -0
- package/dist/lite/.claude/rules/state-schema-validation.md +156 -0
- package/dist/lite/.claude/rules/stuck-signal-diagnostic.md +111 -0
- package/dist/lite/.claude/rules/substrate-config-schema.md +85 -0
- package/dist/lite/.claude/rules/test-list-discipline.md +129 -0
- package/dist/lite/.claude/rules/test-sufficiency.md +186 -0
- package/dist/lite/.claude/rules/testing-tier-config.md +125 -0
- package/dist/lite/.claude/rules/testing.md +38 -0
- package/dist/lite/.claude/rules/turn-estimate-grounding.md +82 -0
- package/dist/lite/.claude/rules/visual-hierarchy.md +427 -0
- package/dist/lite/.claude/rules/we-dont-break-adopters.md +103 -0
- package/dist/lite/.claude/rules/whereami-load-bearing.md +184 -0
- package/dist/lite/.claude/rules/writing-craft-discipline.md +72 -0
- package/dist/lite/.claude/rules/wu-sequencing-compounds.md +119 -0
- package/dist/lite/.claude/skills/build/SKILL.md +640 -0
- package/dist/lite/.claude/skills/chronicle/SKILL.md +55 -0
- package/dist/lite/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/dist/lite/.claude/skills/decompose/SKILL.md +280 -0
- package/dist/lite/.claude/skills/diagnose/SKILL.md +297 -0
- package/dist/lite/.claude/skills/feynman/SKILL.md +90 -0
- package/dist/lite/.claude/skills/howdoi/SKILL.md +105 -0
- package/dist/lite/.claude/skills/ia-model/SKILL.md +108 -0
- package/dist/lite/.claude/skills/interaction-design/SKILL.md +112 -0
- package/dist/lite/.claude/skills/interpret-input/SKILL.md +180 -0
- package/dist/lite/.claude/skills/journal/SKILL.md +209 -0
- package/dist/lite/.claude/skills/kiss/SKILL.md +449 -0
- package/dist/lite/.claude/skills/launch/SKILL.md +915 -0
- package/dist/lite/.claude/skills/lean-canvas/SKILL.md +332 -0
- package/dist/lite/.claude/skills/longrun/SKILL.md +512 -0
- package/dist/lite/.claude/skills/luminary/SKILL.md +481 -0
- package/dist/lite/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
- package/dist/lite/.claude/skills/onboard-repo/SKILL.md +1640 -0
- package/dist/lite/.claude/skills/pattern-review/SKILL.md +99 -0
- package/dist/lite/.claude/skills/personas/SKILL.md +207 -0
- package/dist/lite/.claude/skills/promote/SKILL.md +283 -0
- package/dist/lite/.claude/skills/requirement/SKILL.md +98 -0
- package/dist/lite/.claude/skills/retro/SKILL.md +117 -0
- package/dist/lite/.claude/skills/riff/SKILL.md +114 -0
- package/dist/lite/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
- package/dist/lite/.claude/skills/session-end/SKILL.md +309 -0
- package/dist/lite/.claude/skills/session-log/SKILL.md +299 -0
- package/dist/lite/.claude/skills/skills/SKILL.md +228 -0
- package/dist/lite/.claude/skills/spec/SKILL.md +105 -0
- package/dist/lite/.claude/skills/sprint/SKILL.md +418 -0
- package/dist/lite/.claude/skills/stage/SKILL.md +384 -0
- package/dist/lite/.claude/skills/state-a-problem/SKILL.md +185 -0
- package/dist/lite/.claude/skills/temperance/SKILL.md +108 -0
- package/dist/lite/.claude/skills/use-case/SKILL.md +417 -0
- package/dist/lite/.claude/skills/user-stories/SKILL.md +268 -0
- package/dist/lite/.claude/skills/value-prop/SKILL.md +251 -0
- package/dist/lite/.claude/skills/verify/SKILL.md +160 -0
- package/dist/lite/.claude/skills/visual-review/SKILL.md +503 -0
- package/dist/lite/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/dist/lite/.claude/skills/whereami/SKILL.md +307 -0
- package/dist/lite/AGENTS.md +79 -0
- package/dist/lite/CLAUDE-lite.md +85 -0
- package/dist/lite/CODE_OF_CONDUCT.md +28 -0
- package/dist/lite/CONTRIBUTING.md +177 -0
- package/dist/lite/README.md +173 -0
- package/dist/lite/SECURITY.md +19 -0
- package/dist/lite/architecture/decisions/ADR-029-release-pipeline.md +79 -0
- package/dist/lite/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
- package/dist/lite/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
- package/dist/lite/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
- package/dist/lite/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
- package/dist/lite/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
- package/dist/lite/lib/clean-artifacts-sweep.sh +112 -0
- package/dist/lite/lib/code-comment-discipline.sh +144 -0
- package/dist/lite/lib/composer-preflight.sh +459 -0
- package/dist/lite/lib/deferred-actions.sh +146 -0
- package/dist/lite/lib/hook-header-parser.sh +61 -0
- package/dist/lite/lib/hook-heartbeat.sh +152 -0
- package/dist/lite/lib/hook-inject.sh +255 -0
- package/dist/lite/lib/hook-installer.sh +195 -0
- package/dist/lite/lib/luminary-pick.sh +96 -0
- package/dist/lite/lib/output-discipline.sh +143 -0
- package/dist/lite/lib/prose-scan-boundary.sh +171 -0
- package/dist/lite/lib/rewrite-check.sh +214 -0
- package/dist/lite/lib/session-rescue.sh +151 -0
- package/dist/lite/lib/source-graph-walker.sh +277 -0
- package/dist/lite/lib/state.sh +1372 -0
- package/dist/lite/lib/telemetry.sh +205 -0
- package/dist/lite/lib/tier-check.sh +187 -0
- package/dist/lite/lib/tier-dependency-audit.sh +1088 -0
- package/dist/lite/presence/install/bassclef-hook-connect.sh +178 -0
- package/dist/lite/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
- package/dist/lite/presence/install/bassclef-sync.template.sh +2278 -0
- package/dist/lite/presence/install/schedule-auto-save.cron.sh +88 -0
- package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +122 -0
- package/dist/lite/scripts/aggregate-telemetry.sh +217 -0
- package/dist/lite/scripts/analyze-tier-dependencies.sh +239 -0
- package/dist/lite/scripts/generate-lite-manifest.sh +505 -0
- package/dist/lite/scripts/generate-tier-manifest.sh +28 -0
- package/dist/lite/scripts/intent-drift-check.sh +456 -0
- package/dist/lite/scripts/lite-manifest-drift-check.sh +146 -0
- package/dist/lite/scripts/render-lite-manifest-doc.sh +150 -0
- package/dist/lite/standards/adr-template.md +86 -0
- package/dist/lite/standards/api-conventions/nextjs.md +84 -0
- package/dist/lite/standards/artifact-composition.md +209 -0
- package/dist/lite/standards/bash-hook-safety.md +246 -0
- package/dist/lite/standards/bassclef-configs-schema.md +232 -0
- package/dist/lite/standards/bassclef-evolution.md +143 -0
- package/dist/lite/standards/bassclef-internal-jargon.md +244 -0
- package/dist/lite/standards/bassclef-managed-sentinel.md +96 -0
- package/dist/lite/standards/bassclef-source-config.md +228 -0
- package/dist/lite/standards/branch-stacking.md +408 -0
- package/dist/lite/standards/code-safety-principles.md +176 -0
- package/dist/lite/standards/composer-prerequisites.md +155 -0
- package/dist/lite/standards/deferred-actions-schema.md +204 -0
- package/dist/lite/standards/dependency-discipline/cargo.md +39 -0
- package/dist/lite/standards/dependency-discipline/gem.md +43 -0
- package/dist/lite/standards/dependency-discipline/go-mod.md +41 -0
- package/dist/lite/standards/dependency-discipline/npm.md +42 -0
- package/dist/lite/standards/dependency-discipline/pip.md +42 -0
- package/dist/lite/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/dist/lite/standards/deployment-topology.md +69 -0
- package/dist/lite/standards/docs-sync-allowlist.md +76 -0
- package/dist/lite/standards/domain-and-dns.md +145 -0
- package/dist/lite/standards/frontend-stack.md +67 -0
- package/dist/lite/standards/frontmatter-schema.md +154 -0
- package/dist/lite/standards/graceful-exit.md +227 -0
- package/dist/lite/standards/hook-idempotency.md +102 -0
- package/dist/lite/standards/hook-injection-discipline.md +202 -0
- package/dist/lite/standards/hook-install-class.md +215 -0
- package/dist/lite/standards/input-handler-interface.md +152 -0
- package/dist/lite/standards/lite-manifest-schema-changes.md +180 -0
- package/dist/lite/standards/lite-manifest.json +2797 -0
- package/dist/lite/standards/luminary-matching.md +105 -0
- package/dist/lite/standards/luminary-problem-patterns.md +481 -0
- package/dist/lite/standards/migration-discipline/active-record.md +50 -0
- package/dist/lite/standards/migration-discipline/alembic.md +43 -0
- package/dist/lite/standards/migration-discipline/gorm.md +50 -0
- package/dist/lite/standards/migration-discipline/prisma.md +53 -0
- package/dist/lite/standards/migration-discipline/sqlalchemy.md +51 -0
- package/dist/lite/standards/mobile-ephemeral-session.md +167 -0
- package/dist/lite/standards/model-routing-discipline.md +160 -0
- package/dist/lite/standards/ogilvy-writing-rules.md +225 -0
- package/dist/lite/standards/opener-discipline.md +96 -0
- package/dist/lite/standards/operator-facing-prose-discipline.md +201 -0
- package/dist/lite/standards/persona-schema.md +229 -0
- package/dist/lite/standards/pluggable-luminaries.md +323 -0
- package/dist/lite/standards/pr-body-discipline.md +115 -0
- package/dist/lite/standards/preview-state-schema.md +189 -0
- package/dist/lite/standards/project-directory-layout.md +276 -0
- package/dist/lite/standards/release-tagging.md +137 -0
- package/dist/lite/standards/reserved-skill-names.md +120 -0
- package/dist/lite/standards/scannable-multi-option-output.md +265 -0
- package/dist/lite/standards/sdlc-compliance.md +286 -0
- package/dist/lite/standards/sdlc-gates/typescript.md +57 -0
- package/dist/lite/standards/secrets-lifecycle.md +210 -0
- package/dist/lite/standards/security-scanner-adapter.md +145 -0
- package/dist/lite/standards/session-board.md +256 -0
- package/dist/lite/standards/skill-output-discipline.md +121 -0
- package/dist/lite/standards/state-spine-contract.md +255 -0
- package/dist/lite/standards/state-spine.md +511 -0
- package/dist/lite/standards/steering-hints/kiss-words.md +11 -0
- package/dist/lite/standards/substrate-config-schema.md +267 -0
- package/dist/lite/standards/tech-stack-config.md +109 -0
- package/dist/lite/standards/tier-dependency-analysis.md +167 -0
- package/dist/lite/standards/tier-runtime-deps/lite.md +57 -0
- package/dist/lite/standards/tier-tag-schema.md +155 -0
- package/dist/lite/standards/two-layer-config.md +99 -0
- package/dist/lite/standards/use-case-format.md +292 -0
- package/dist/lite/standards/user-story-invest.md +268 -0
- package/dist/lite/standards/velocity-and-appetite.md +229 -0
- package/dist/lite/standards/voice-input-pattern.md +119 -0
- package/dist/lite/standards/whereami-schema.md +301 -0
- package/dist/lite/standards/worktree-management.md +211 -0
- package/dist/lite/standards/writing-guide.md +213 -0
- package/dist/lite/templates/chronicle-template.md +75 -0
- package/dist/lite/templates/deferred-action-template.md +45 -0
- package/dist/lite/templates/memory-proposal-template.md +77 -0
- package/dist/lite/templates/persona-template.md +200 -0
- package/dist/lite/templates/pr-faq.md +45 -0
- package/dist/lite/templates/secret-rotation-template.md +162 -0
- package/dist/lite/templates/spec-template.md +131 -0
- package/dist/lite/templates/use-case-template.md +194 -0
- package/dist/lite/templates/user-story-template.md +107 -0
- package/dist/lite/templates/whereami-template.md +101 -0
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: /sprint next-work proposals pick one of three presets (converged / exploratory / reversible-small) based on mode signals. Sister rule to longrun-prep-plan-doc-compression at /sprint surface.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /sprint — pick a preset that fits the mode
|
|
7
|
+
|
|
8
|
+
Every `/sprint` dispatch picks one of three presets at Step 6.85 of the `/sprint` SKILL. The picker reads mode signals. It writes a marker. It fires the matching shape. The three presets are converged, exploratory, and reversible-small — same set as `/longrun` Step 0.85 per bassclef-upstream#1598.
|
|
9
|
+
|
|
10
|
+
This rule is the methodology layer. The mechanism is the `/sprint` SKILL body Step 6.85. Both required per bootstrap-pair discipline.
|
|
11
|
+
|
|
12
|
+
## When this rule fires
|
|
13
|
+
|
|
14
|
+
Every `/sprint` dispatch. The SKILL body Step 6.85 checks the signals first. When converged fires, prep shows a scan-table plus one card. When exploratory fires, prep shows a scan-table with no cards. When reversible-small fires, prep shows a three-chunk compact block.
|
|
15
|
+
|
|
16
|
+
## The three presets
|
|
17
|
+
|
|
18
|
+
Per `.claude/skills/sprint/SKILL.md` Step 6.85. Signals differ from `/longrun` because `/sprint` reads different sources at pre-flight.
|
|
19
|
+
|
|
20
|
+
| Preset | Fires when | Shape |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| **converged** | Active goal has open acceptance items OR fresh `docs/next-session-plan-*.md` with `## Recommended` | Recommend at top + scan-table capped at 4 cols + one card for the recommended option only |
|
|
23
|
+
| **exploratory** | Between goals OR `browse` in invocation OR wide open backlog with no clear pick | Scan-table dominant (5-8 rows) + no cards until operator asks `show cards` |
|
|
24
|
+
| **reversible-small** | `quick fix` in invocation OR single-issue candidate under 20 turns | Three-chunk compact — one line per option + one recommend + one action |
|
|
25
|
+
|
|
26
|
+
Ambiguous cases: picker asks the operator — `Converged / Exploratory / Small? (c/e/s/skip)`.
|
|
27
|
+
|
|
28
|
+
## What the rule requires
|
|
29
|
+
|
|
30
|
+
Before shipping `/sprint` Step 7 output:
|
|
31
|
+
|
|
32
|
+
1. Fire Step 6.85 picker. Read the mode signals. Pick one preset.
|
|
33
|
+
2. Touch the preset marker at `state/markers/sprint-preset/<branch>.marker`. Cite the picked preset name.
|
|
34
|
+
3. Render Step 7 in the shape that fits the picked preset per Step 7c preset-aware rendering block.
|
|
35
|
+
|
|
36
|
+
Operator override at invocation flips the picker:
|
|
37
|
+
|
|
38
|
+
- `/sprint browse` → forces exploratory
|
|
39
|
+
- `/sprint quick fix` → forces reversible-small
|
|
40
|
+
- `/sprint full` → forces the classic full menu (3-4 shapes with full cards)
|
|
41
|
+
|
|
42
|
+
## Anti-patterns
|
|
43
|
+
|
|
44
|
+
**Skip the picker; ship the full menu every time.** Fails the class this rule closes. Long menus on every call bury the pick.
|
|
45
|
+
INSTEAD: run Step 6.85. Detect the mode. Ship the preset that fits.
|
|
46
|
+
|
|
47
|
+
**Fire converged when acceptance items are stale.** Fresh plan doc that points at shipped work fires the wrong preset.
|
|
48
|
+
INSTEAD: read the plan doc's `## Recommended` section. Cross-check against `git log`. Reshape to exploratory when the recommendation is stale.
|
|
49
|
+
|
|
50
|
+
**Ship exploratory with cards.** Defeats the progressive-disclosure discipline.
|
|
51
|
+
INSTEAD: scan-table only. Add signifier: "Ask 'show all cards' to expand."
|
|
52
|
+
|
|
53
|
+
**Author a new picker mechanism.** Duplicates `/longrun` Step 0.85 discipline.
|
|
54
|
+
INSTEAD: reuse the same agent-executed pattern. Sister mechanism ships once when it lands (goal 12a Step 2 or later).
|
|
55
|
+
|
|
56
|
+
## Override
|
|
57
|
+
|
|
58
|
+
`SKIP_SPRINT_PICKER=1 /sprint` — logged via trace-helper. Use only for:
|
|
59
|
+
|
|
60
|
+
- One-shot testing to verify the full-menu path still renders
|
|
61
|
+
- Migration scripts that dispatch many `/sprint` calls at once
|
|
62
|
+
- Emergency rescue when the picker signal reads wrong
|
|
63
|
+
|
|
64
|
+
INSTEAD of overriding for routine work: pick the preset. The cost is one check + one marker touch.
|
|
65
|
+
|
|
66
|
+
## Composes with
|
|
67
|
+
|
|
68
|
+
- `.claude/skills/sprint/SKILL.md` Step 6.85 — the SKILL body this rule prescribes
|
|
69
|
+
- `.claude/rules/longrun-prep-plan-doc-compression.md` — parent rule at `/longrun` surface (goal 12a)
|
|
70
|
+
- `.claude/rules/operator-facing-prose.md` Rule 3 — three-block opener still fires under compression
|
|
71
|
+
- `.claude/rules/plan-enumeration-needs-value-props.md` — every option carries a value prop
|
|
72
|
+
- `.claude/rules/bootstrap-pair-discipline.md` — this rule + SKILL body ship together
|
|
73
|
+
- `.claude/rules/we-dont-break-adopters.md` — grace window (V1 no-hook default)
|
|
74
|
+
- @luminary don-norman — signifier for mode + reshape path
|
|
75
|
+
- @luminary luke-wroblewski — mobile-first content prioritization
|
|
76
|
+
- @luminary sophia-prater — OOUX + progressive disclosure
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: State-spine entity writes MUST conform to their JSON Schema.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# State Schema Validation
|
|
7
|
+
|
|
8
|
+
State-spine entity writes MUST conform to their JSON Schema. The
|
|
9
|
+
`state-validate.sh` PreToolUse hook enforces this mechanically: any
|
|
10
|
+
Edit/Write to a state-spine path is validated against the entity's
|
|
11
|
+
schema; failure BLOCKs the write.
|
|
12
|
+
|
|
13
|
+
This rule is the methodology layer. The hook is the mechanical layer.
|
|
14
|
+
Both load-bearing.
|
|
15
|
+
|
|
16
|
+
## When this rule fires
|
|
17
|
+
|
|
18
|
+
Any Edit/Write/MultiEdit to a path matching a state-spine entity per
|
|
19
|
+
`standards/state-spine.md` §"Storage format — four shapes":
|
|
20
|
+
|
|
21
|
+
- **Shape A** (singleton JSON authoritative): `docs/whereami.json`,
|
|
22
|
+
`substrate.config.json`, `docs/preview-state/<slug>.json`
|
|
23
|
+
- **Shape B** (markdown + YAML frontmatter): `docs/iteration-bets/*.md`,
|
|
24
|
+
`docs/roadmaps/*.md`, `docs/stacks/*.md`, `docs/decompositions/*.md`,
|
|
25
|
+
`docs/personas/*.md`, `docs/deferred-actions/*.md`, `chronicle/*.md`,
|
|
26
|
+
`docs/chronicle/*.md`
|
|
27
|
+
- **Shape C** (pure JSON): `state/markers/*/*.json`,
|
|
28
|
+
`docs/sessions/*.json`, `docs/input-artifacts/*.json`,
|
|
29
|
+
`state/template-instances/*.json`, `state/inbox/*.json`,
|
|
30
|
+
`state/stack-templates/*.json`
|
|
31
|
+
- **Shape D** (pure YAML at sibling-repo root): `*/bassclef-platform.yml`
|
|
32
|
+
(typically `~/src/<github_org>/platform-config/bassclef-platform.yml`)
|
|
33
|
+
|
|
34
|
+
Non-spine paths pass through (e.g., README, source code, narrative
|
|
35
|
+
markdown without YAML frontmatter, docs that aren't governed by the
|
|
36
|
+
spine).
|
|
37
|
+
|
|
38
|
+
## What the hook validates
|
|
39
|
+
|
|
40
|
+
| Storage shape | Extraction | Schema validates |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| A | reads whole JSON file | the entity object |
|
|
43
|
+
| B | extracts YAML frontmatter, converts to JSON | the frontmatter object |
|
|
44
|
+
| C | reads whole JSON file | the entity object |
|
|
45
|
+
| D | reads whole YAML file, converts to JSON | the entity object |
|
|
46
|
+
|
|
47
|
+
In all four cases, validator: `ajv-cli` draft-2020-12 with format
|
|
48
|
+
support (per ADR-015 single-format).
|
|
49
|
+
|
|
50
|
+
## What the hook does NOT validate
|
|
51
|
+
|
|
52
|
+
- **Markdown body content** of Shape B entities. Body sections (Procedure,
|
|
53
|
+
Acceptance, Sources read, narrative descriptions) are operator-readable
|
|
54
|
+
documentation; the schema doesn't constrain them.
|
|
55
|
+
- **Cross-entity reference dangling.** `state_reference_check` (in
|
|
56
|
+
`lib/state.sh`) is the read-time check; the hook validates that the
|
|
57
|
+
`references` array's items conform to the reference shape (typed
|
|
58
|
+
`{type, id, anchor?}`), not that every referenced entity exists. A
|
|
59
|
+
dangling reference is a read-time concern, not a write-time one.
|
|
60
|
+
- **Hash-as-index integrity.** Deferred to spine v1 per bassclef#316.
|
|
61
|
+
- **Migration scripts** writing to state files during one-shot
|
|
62
|
+
migrations (e.g., WU-4) — these explicitly bypass via
|
|
63
|
+
`SKIP_STATE_VALIDATE=1` because they're bootstrapping prior shapes
|
|
64
|
+
into the spine.
|
|
65
|
+
|
|
66
|
+
## What happens when validation fails
|
|
67
|
+
|
|
68
|
+
The hook BLOCKs the write (exit code 3, structured stderr message).
|
|
69
|
+
Output includes:
|
|
70
|
+
|
|
71
|
+
- Entity type (which schema was applied)
|
|
72
|
+
- Path being written
|
|
73
|
+
- ajv error details (which field, which constraint, which line)
|
|
74
|
+
- Three resolution paths:
|
|
75
|
+
1. Fix the data to match the schema (preferred)
|
|
76
|
+
2. Update the schema if it's wrong (requires PR review)
|
|
77
|
+
3. Override with `SKIP_STATE_VALIDATE=1` (logged; rare; not for normal work)
|
|
78
|
+
|
|
79
|
+
The agent receiving the BLOCK should treat it as a `BLOCKED:` per
|
|
80
|
+
`.claude/rules/blocked-items.md` — surface to operator, resolve, do
|
|
81
|
+
not silently retry without diagnosis.
|
|
82
|
+
|
|
83
|
+
## When to override
|
|
84
|
+
|
|
85
|
+
`SKIP_STATE_VALIDATE=1 <command>` is logged to stderr. Use only:
|
|
86
|
+
|
|
87
|
+
- **One-shot migration scripts** (WU-4 pattern) — bootstrapping prior
|
|
88
|
+
shapes into the spine; the data may not yet conform until migration
|
|
89
|
+
completes
|
|
90
|
+
- **Schema is genuinely wrong** AND a fix-the-schema PR is in flight
|
|
91
|
+
AND blocking on validation would block the schema fix itself
|
|
92
|
+
- **Emergency rescue** when the hook itself is broken (substrate-defect
|
|
93
|
+
recovery)
|
|
94
|
+
|
|
95
|
+
NOT for:
|
|
96
|
+
|
|
97
|
+
- "I'll fix the data later" — fix it now or document as a deferred
|
|
98
|
+
action
|
|
99
|
+
- "The schema is too strict" — file an amendment PR, don't bypass
|
|
100
|
+
- Routine work that happens to fail validation — the validation
|
|
101
|
+
failure is the signal that something's wrong
|
|
102
|
+
|
|
103
|
+
## When to update the schema
|
|
104
|
+
|
|
105
|
+
If the hook BLOCKs and the data is genuinely correct (the schema is
|
|
106
|
+
overly restrictive), open a PR amending the schema:
|
|
107
|
+
|
|
108
|
+
1. Edit `standards/state-spine/schemas/<entity>.schema.json`
|
|
109
|
+
2. Update `standards/state-spine.md` if the entity catalog or
|
|
110
|
+
storage-shape table changes
|
|
111
|
+
3. Validate the schema itself compiles cleanly under
|
|
112
|
+
`ajv compile --spec=draft2020 --strict`
|
|
113
|
+
4. Re-run `bash .claude/hooks/tests/state-validate.test.sh` to ensure
|
|
114
|
+
no regressions
|
|
115
|
+
5. Note the rationale in the PR body (what the schema previously
|
|
116
|
+
forbade that should be allowed; why)
|
|
117
|
+
|
|
118
|
+
Schema changes are themselves state changes — review accordingly.
|
|
119
|
+
|
|
120
|
+
## Relationship to other rules + standards
|
|
121
|
+
|
|
122
|
+
- `standards/state-spine.md` — entity catalog + storage shapes (defines
|
|
123
|
+
what gets validated and how)
|
|
124
|
+
- `standards/state-spine/schemas/*.schema.json` — the schemas this
|
|
125
|
+
rule enforces
|
|
126
|
+
- `standards/state-spine-contract.md` — accessor contract; mutations
|
|
127
|
+
via `state_<entity>_add/set/update_status` accessors invoke this
|
|
128
|
+
validator before writing
|
|
129
|
+
- `.claude/rules/accessor-library-discipline.md` — paired with this
|
|
130
|
+
rule; together they enforce read-side + write-side discipline
|
|
131
|
+
- `.claude/rules/blocked-items.md` — BLOCK protocol the hook fires
|
|
132
|
+
(resolve or explicitly defer)
|
|
133
|
+
- `.claude/hooks/state-validate.sh` — the mechanical implementation
|
|
134
|
+
- `.claude/hooks/tests/state-validate.test.sh` — test coverage
|
|
135
|
+
- `architecture/decisions/ADR-015-state-schema-format.md` — JSON Schema
|
|
136
|
+
only for v0; this hook uses ajv-cli per that decision
|
|
137
|
+
- bassclef#298 — chronicle Gate Evidence drops; this hook + Chronicle
|
|
138
|
+
schema together make that failure class structurally impossible
|
|
139
|
+
- bassclef#295, #296 — other defects from the four-incident set that
|
|
140
|
+
the spine v0 (incl. this rule) retires
|
|
141
|
+
|
|
142
|
+
## Enforcement
|
|
143
|
+
|
|
144
|
+
- **Hook**: `.claude/hooks/state-validate.sh` — fires on PreToolUse
|
|
145
|
+
with matcher `Edit|Write|MultiEdit`; wired in `.claude/settings.json`
|
|
146
|
+
- **Methodology**: this rule loads in every session; agents
|
|
147
|
+
self-check before writing state
|
|
148
|
+
- **Test coverage**: `.claude/hooks/tests/state-validate.test.sh` (14
|
|
149
|
+
tests covering all three shapes, override path, tool-name filter,
|
|
150
|
+
pass-through for non-state files)
|
|
151
|
+
|
|
152
|
+
## Override
|
|
153
|
+
|
|
154
|
+
`SKIP_STATE_VALIDATE=1 <command>` — logged to stderr per existing
|
|
155
|
+
bassclef hook idiom. Use sparingly; document rationale in commit
|
|
156
|
+
message.
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "When a hook emits the same BLOCKED signal across ≥3 consecutive sessions and the underlying state counter hasn't moved, the signal is stuck."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Stuck-Signal Diagnostic
|
|
7
|
+
|
|
8
|
+
When a hook emits the same BLOCKED signal across ≥3 consecutive sessions
|
|
9
|
+
and the underlying state counter hasn't moved, the signal is stuck.
|
|
10
|
+
A stuck signal is evidence of a **substrate defect**, not operator
|
|
11
|
+
error — the hook is correctly detecting a condition the fix path
|
|
12
|
+
cannot clear. Continuing to fire the same banner without reading the
|
|
13
|
+
mechanism that produces it reproduces the acknowledge-and-skip loop
|
|
14
|
+
`blocked-items.md` was built to close.
|
|
15
|
+
|
|
16
|
+
## When this rule fires
|
|
17
|
+
|
|
18
|
+
Any BLOCKED banner whose underlying counter / state has not advanced
|
|
19
|
+
across ≥3 sessions. Observable shapes:
|
|
20
|
+
|
|
21
|
+
- `BLOCKED: verify-compliance — X%` where X is identical 3 sessions running
|
|
22
|
+
- `BLOCKED: temperance-compliance — X%` where X is identical 3 sessions running
|
|
23
|
+
- `BLOCKED: metrics — DORA stale` with identical staleness counts
|
|
24
|
+
- `BLOCKED: release-notes — last entry N days ago` where N grows but no
|
|
25
|
+
release is written
|
|
26
|
+
- Any hook-surfaced BLOCKED whose associated counter/timestamp/state
|
|
27
|
+
is numerically or categorically unchanged across the last 3 chronicles
|
|
28
|
+
|
|
29
|
+
The operator does not need to flag the staleness. The agent must
|
|
30
|
+
self-detect by comparing current banner text against the prior
|
|
31
|
+
session's banner text (visible in chronicles or `/sprint` output).
|
|
32
|
+
|
|
33
|
+
## Mandatory mechanism-read
|
|
34
|
+
|
|
35
|
+
When stuck-signal is detected, the agent MUST:
|
|
36
|
+
|
|
37
|
+
1. **Stop addressing the symptom.** Do not propose running the usual
|
|
38
|
+
fix (e.g., "let me run /verify more diligently this session"). The
|
|
39
|
+
fix has been tried and the counter hasn't moved. That's the signal.
|
|
40
|
+
|
|
41
|
+
2. **Read the mechanism files named in the banner.** The hook banner
|
|
42
|
+
names the exact paths. Follow the paths. Read every one.
|
|
43
|
+
|
|
44
|
+
3. **Trace the counter's update path.** From mechanism-file read,
|
|
45
|
+
answer:
|
|
46
|
+
- Where is the counter computed?
|
|
47
|
+
- What state does the counter consume?
|
|
48
|
+
- What action updates that state?
|
|
49
|
+
- Is the update actually landing, or landing to a surface the
|
|
50
|
+
counter doesn't read?
|
|
51
|
+
|
|
52
|
+
4. **Fire /diagnose on the mechanism.** Treat the stuck signal as a
|
|
53
|
+
substrate failure per `diagnosis.md`. Is/Is-Not + Five Whys +
|
|
54
|
+
Hypothesis applied to the hook + state-file + update path — not to
|
|
55
|
+
the surface behavior.
|
|
56
|
+
|
|
57
|
+
5. **Resolve via substrate edit or escalate.** The fix is almost
|
|
58
|
+
always in the mechanism: wrong path, stale regex, counter reading
|
|
59
|
+
a location the writer stopped using, `/tmp` marker lost across
|
|
60
|
+
sandbox teardown. Edit the substrate, commit, verify the counter
|
|
61
|
+
advances. If substrate-read reveals no defect, escalate — the
|
|
62
|
+
counter is correct and the work is genuinely undone; `blocked-items.md`
|
|
63
|
+
default (resolve) applies.
|
|
64
|
+
|
|
65
|
+
## Post-resolution obligation: mandatory /promote
|
|
66
|
+
|
|
67
|
+
When mechanism-read reveals a substrate defect (hook path wrong,
|
|
68
|
+
state file rotted, marker format changed, compliance calc broken),
|
|
69
|
+
resolution MUST include firing `/promote` with the `substrate-defect`
|
|
70
|
+
classifier. See `blocked-items.md` §"When resolution reveals a
|
|
71
|
+
substrate defect" for the full protocol and `promote/SKILL.md` for
|
|
72
|
+
the template.
|
|
73
|
+
|
|
74
|
+
Fixing the local instance without promoting means the same defect
|
|
75
|
+
keeps firing in consumer repos — which is exactly the
|
|
76
|
+
acknowledge-and-skip loop at a different layer.
|
|
77
|
+
|
|
78
|
+
## Relationship to other rules
|
|
79
|
+
|
|
80
|
+
- `blocked-items.md` — the base BLOCKED-resolve-or-explicit-defer
|
|
81
|
+
protocol; stuck-signal is a specific escalation branch
|
|
82
|
+
- `diagnosis.md` — Is/Is-Not + Five Whys applies to the mechanism
|
|
83
|
+
when the signal is stuck
|
|
84
|
+
- `sdlc-gates.md` — observed failure → temperance → diagnose chain;
|
|
85
|
+
stuck-signal is an observed failure in the meta-signal layer
|
|
86
|
+
- `artifact-ingestion.md` — "read the file before producing" extends
|
|
87
|
+
to "read the mechanism before resolving"
|
|
88
|
+
- Post-resolution `/promote` obligation: `blocked-items.md` §"When
|
|
89
|
+
resolution reveals a substrate defect"
|
|
90
|
+
|
|
91
|
+
## Enforcement
|
|
92
|
+
|
|
93
|
+
Methodology-level. The compliance-counter hooks
|
|
94
|
+
(`session-reflection.d/40-gate-compliance.sh` and siblings) name
|
|
95
|
+
mechanism paths in their BLOCKED banners so the agent has the
|
|
96
|
+
literal file paths to read — no guessing about what "mechanism"
|
|
97
|
+
means. If stuck-signal recurs without mechanism-read in the next 6
|
|
98
|
+
months, upgrade to hook-enforced: refuse session advance until an
|
|
99
|
+
Edit tool call lands on the named mechanism path.
|
|
100
|
+
|
|
101
|
+
## Override
|
|
102
|
+
|
|
103
|
+
There is no override. Stuck-signal is the condition under which
|
|
104
|
+
"proceed and try again" is the failure mode. If the counter is
|
|
105
|
+
stuck, the agent reads the mechanism. Full stop.
|
|
106
|
+
|
|
107
|
+
Operator may still explicitly defer the underlying BLOCKED item per
|
|
108
|
+
`blocked-items.md` deferral syntax ("skip metrics this session") —
|
|
109
|
+
but the mechanism-read obligation still fires the next session unless
|
|
110
|
+
the operator also defers that (rare, e.g., "mechanism-read next
|
|
111
|
+
week, I'm unblocking you manually this time").
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
globs: ["substrate.config.md", "substrate.secrets.md", ".claude/skills/**/*.md", ".claude/hooks/**/*", "standards/**/*.md"]
|
|
4
|
+
description: Substrate config + secrets schemas — single source of truth for external resource references and secret lifecycle
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Substrate Config + Secrets Schema (rule)
|
|
8
|
+
|
|
9
|
+
Two paired files; each owns one concern:
|
|
10
|
+
|
|
11
|
+
| File | Owns | Standard |
|
|
12
|
+
|------|------|----------|
|
|
13
|
+
| `substrate.config.md` | External resource *references* (Google Doc IDs, URLs, repo refs, env-var names) | `standards/substrate-config-schema.md` |
|
|
14
|
+
| `substrate.secrets.md` | Secret *lifecycle* (rotation cadence, expiry, runbooks, health checks) | `standards/secrets-lifecycle.md` |
|
|
15
|
+
|
|
16
|
+
Both are read at session-start; agents always source from these files.
|
|
17
|
+
|
|
18
|
+
INSTEAD of memory or hardcoded values: read at session-start from
|
|
19
|
+
`substrate.config.md` (resources) and `substrate.secrets.md` (lifecycle).
|
|
20
|
+
|
|
21
|
+
## Agent behavior rules
|
|
22
|
+
|
|
23
|
+
1. **Read resources only from `substrate.config.md`.** When a skill
|
|
24
|
+
or hook needs a doc ID, URL, or similar reference, the agent
|
|
25
|
+
reads it from this file at runtime. Don't hardcode. Don't cache.
|
|
26
|
+
|
|
27
|
+
INSTEAD: read at runtime from `substrate.config.md`. Field name is
|
|
28
|
+
the interface; raw value is implementation detail that can change.
|
|
29
|
+
|
|
30
|
+
2. **Reference by field name, not by raw value.** In project memory,
|
|
31
|
+
in chronicles, in commit messages: say `brand_corpus_doc_id`, not
|
|
32
|
+
`1gps7mmEYBCud...`. The raw value is an implementation detail;
|
|
33
|
+
the field name is the interface.
|
|
34
|
+
|
|
35
|
+
3. **When a resource is missing**, prompt the operator to add it to
|
|
36
|
+
`substrate.config.md` with a typed field name. Use the suffix
|
|
37
|
+
convention: `*_doc_id`, `*_url`, `*_repo`, `*_path`, `*_token_name`,
|
|
38
|
+
etc. (full list in the standard).
|
|
39
|
+
|
|
40
|
+
4. **No raw secrets in `substrate.config.md`.** That file is
|
|
41
|
+
committed to git. Store the *name* of the env var holding the
|
|
42
|
+
secret (`anthropic_key_name: ANTHROPIC_API_KEY`).
|
|
43
|
+
|
|
44
|
+
INSTEAD of inlining the secret value: keep values in their
|
|
45
|
+
authoritative storage (1Password / GitHub Actions Secrets /
|
|
46
|
+
AWS Secrets Manager / `.env`); the config file points by name.
|
|
47
|
+
|
|
48
|
+
5. **Secret *lifecycle* belongs in `substrate.secrets.md`**, not
|
|
49
|
+
`substrate.config.md`. References go in config; rotation cadence,
|
|
50
|
+
expiry dates, runbook paths, and health-check commands go in
|
|
51
|
+
secrets. Each file owns its concern.
|
|
52
|
+
|
|
53
|
+
INSTEAD of mixing concerns: lifecycle metadata (last_rotated,
|
|
54
|
+
expiry_at, rotation_procedure) lives in `substrate.secrets.md`;
|
|
55
|
+
resource references (doc IDs, URLs, env-var names) live in
|
|
56
|
+
`substrate.config.md`. Cross-reference between the two files.
|
|
57
|
+
|
|
58
|
+
6. **No secret VALUES anywhere in the repo.** `substrate.secrets.md`
|
|
59
|
+
tracks references and metadata only — values stay in their
|
|
60
|
+
authoritative storage (1Password / GitHub Actions Secrets / `.env`
|
|
61
|
+
/ AWS Secrets Manager). The session-start hook
|
|
62
|
+
(`.claude/hooks/session-reflection.d/90-secrets-expiry.sh`) surfaces
|
|
63
|
+
BLOCKED when any secret is within `alert_threshold_days`; resolve
|
|
64
|
+
per the entry's `rotation_procedure` runbook.
|
|
65
|
+
|
|
66
|
+
7. **When migrating old code**, replace hardcoded IDs with
|
|
67
|
+
`substrate.config.md` lookups. Grep for the raw ID value across
|
|
68
|
+
`.claude/`, `standards/`, `strategy/`, and the raw content of
|
|
69
|
+
project memory. Replace with field-name reference.
|
|
70
|
+
|
|
71
|
+
## Bootstrap path for new repos
|
|
72
|
+
|
|
73
|
+
When `/autonomous start` scaffolds a new repo's `substrate.config.md`,
|
|
74
|
+
it prompts for every known resource field (per the standard's "Known
|
|
75
|
+
fields" section). Operators can skip (defaults apply), but each known
|
|
76
|
+
field is surfaced once so nothing gets stored in memory or hardcoded
|
|
77
|
+
by accident.
|
|
78
|
+
|
|
79
|
+
## Related
|
|
80
|
+
|
|
81
|
+
- `standards/substrate-config-schema.md` — full standard
|
|
82
|
+
- `.claude/skills/autonomous/SKILL.md` — scaffold prompts for
|
|
83
|
+
each known field
|
|
84
|
+
- `.claude/skills/substrate-check/SKILL.md` — can validate config schema
|
|
85
|
+
compliance in a repo
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "Every test file opens with a # test-list: commented block enumerating the assertions the step owes."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test-List Discipline
|
|
7
|
+
|
|
8
|
+
Every test file opens with a `# test-list:` commented block enumerating
|
|
9
|
+
the assertions the step owes. Each line is one intended assertion,
|
|
10
|
+
written before any source is edited. Implemented assertions get `[x]`;
|
|
11
|
+
pending stay `[ ]`. Remaining `[ ]` lines visible at commit time are
|
|
12
|
+
honest in-flight signal — truth about what is still owed.
|
|
13
|
+
|
|
14
|
+
This rule is the **planning layer** of TDD discipline. The Tier 0 hook
|
|
15
|
+
(bassclef#1037) enforces test presence + recency: test file exists, test
|
|
16
|
+
mtime ≤ source mtime. That catches tests written after source. It does
|
|
17
|
+
not catch tests written before source that miss intended assertions.
|
|
18
|
+
|
|
19
|
+
INSTEAD: Beck's test list surfaces intent as a tangible artifact at the
|
|
20
|
+
top of the test file, where reviewer and future-reader can see what was
|
|
21
|
+
considered AND deferred vs what was missed entirely.
|
|
22
|
+
|
|
23
|
+
## Format contract
|
|
24
|
+
|
|
25
|
+
Every test file (any file matching `*test*.sh`, `*.test.*`, `test_*.py`,
|
|
26
|
+
`*_test.go`, etc. depending on stack) opens with this block before any
|
|
27
|
+
test code:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# test-list:
|
|
31
|
+
# [x] Skip case: empty stdin returns exit 0
|
|
32
|
+
# [x] Skip case: non-matching tool_name returns exit 0
|
|
33
|
+
# [ ] Behavior: matched tool with valid input writes marker
|
|
34
|
+
# [ ] Behavior: matched tool with invalid input returns exit 3 with stderr
|
|
35
|
+
# [ ] Override: SKIP_FOO=1 bypasses and logs to trace
|
|
36
|
+
# [ ] Edge: missing external binary (jq) returns exit 0 with warning
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Rules:
|
|
40
|
+
|
|
41
|
+
- `# test-list:` is the literal marker (greppable; future hook reads it)
|
|
42
|
+
- One assertion per line; `[ ]` pending, `[x]` implemented
|
|
43
|
+
- Each line is one sentence in plain English describing the assertion
|
|
44
|
+
- Lines added as new assertions surface during implementation (the list grows)
|
|
45
|
+
- Lines stay in place when an assertion turns out not to apply — mark `[~]` with one-line reason inline.
|
|
46
|
+
|
|
47
|
+
INSTEAD of removing the line: keep the `[~]` record so future-reader sees the assertion was considered and judged not-applicable, with the reason. Removal loses the consideration history.
|
|
48
|
+
|
|
49
|
+
- The block lives at the top of the test file, before any source code
|
|
50
|
+
|
|
51
|
+
## What this rule requires
|
|
52
|
+
|
|
53
|
+
When authoring or extending a test file:
|
|
54
|
+
|
|
55
|
+
1. **Before writing any test code**, write the `# test-list:` block enumerating intended assertions. Use the test-sufficiency rubric (sister rule) as the source for what categories of assertion a hook test needs.
|
|
56
|
+
2. **As each assertion is implemented**, change its `[ ]` to `[x]` in the same commit that ships the test.
|
|
57
|
+
3. **If new assertions surface during implementation**, add them to the list as `[ ]` lines. The list grows; that is honest signal.
|
|
58
|
+
4. **Before commit**, scan remaining `[ ]` lines. Each is either:
|
|
59
|
+
- Implemented in this commit (mark `[x]`)
|
|
60
|
+
- Genuinely deferred (mark `[~]` with one-line reason; commit that reason as the file's record)
|
|
61
|
+
- Required but missed — write the assertion now and mark `[x]`.
|
|
62
|
+
|
|
63
|
+
INSTEAD of committing with the line as `[ ]` when the assertion is owed by THIS commit: write the assertion, mark `[x]`, then commit. Pending lines are for genuinely-next-commit work.
|
|
64
|
+
|
|
65
|
+
## What satisfies the rule
|
|
66
|
+
|
|
67
|
+
A test file is conformant when:
|
|
68
|
+
|
|
69
|
+
- Top of file has `# test-list:` block
|
|
70
|
+
- Every line in the block has `[x]`, `[ ]`, or `[~]` prefix
|
|
71
|
+
- Every `[x]` line maps to at least one test function in the file
|
|
72
|
+
- Every `[~]` line has a one-line reason inline
|
|
73
|
+
- Pending `[ ]` lines at commit time are intentional (operator-visible signal that work continues)
|
|
74
|
+
|
|
75
|
+
## Anti-shapes (what fails the rule)
|
|
76
|
+
|
|
77
|
+
The hook-future-extension will BLOCK at these shapes. For now, reviewer + agent self-check.
|
|
78
|
+
|
|
79
|
+
- A test file with no `# test-list:` block at all.
|
|
80
|
+
|
|
81
|
+
INSTEAD: add the block before committing; even retrofitting a list from an existing test file's contents is better than missing one, because the act of writing the list surfaces assertions the existing tests missed.
|
|
82
|
+
|
|
83
|
+
- A test file with a block that contains only `[x]` lines while obvious assertions are missing.
|
|
84
|
+
|
|
85
|
+
INSTEAD: surface the gap by adding `[ ]` lines for the missing assertions; the visible gap is the call-to-action for the next commit.
|
|
86
|
+
|
|
87
|
+
- A `[~]` line without inline reason.
|
|
88
|
+
|
|
89
|
+
INSTEAD: add the one-line reason in the same commit that marks the line `[~]`; the reason IS the audit trail.
|
|
90
|
+
|
|
91
|
+
- A `[x]` line with no matching test function.
|
|
92
|
+
|
|
93
|
+
INSTEAD: either implement the test function (if the assertion was meant to ship) OR change `[x]` to `[~]` with reason (if the assertion turned out not to apply).
|
|
94
|
+
|
|
95
|
+
## When this rule fires
|
|
96
|
+
|
|
97
|
+
Auto-loaded into every session via `additionalDirectories`. Agents
|
|
98
|
+
self-check before committing any test file. The Tier 0 hook
|
|
99
|
+
(`testing-tier-enforce.sh`) does not currently enforce this block.
|
|
100
|
+
|
|
101
|
+
INSTEAD: methodology-level enforcement via agent + reviewer attention.
|
|
102
|
+
Mechanical extension deferred to follow-on ticket; see V2 section below.
|
|
103
|
+
|
|
104
|
+
## V2 — mechanical extension (deferred)
|
|
105
|
+
|
|
106
|
+
When operator observes recurring drift from manual self-check, file a
|
|
107
|
+
follow-on ticket extending Tier 0 hook with a grep for `# test-list:`
|
|
108
|
+
block in any test file being committed. BLOCK when missing. Allowlist
|
|
109
|
+
existing test files in a sister `.claude/hooks/test-list-allowlist.txt`
|
|
110
|
+
with grace window (same pattern as Phase A shellcheck-allowlist).
|
|
111
|
+
|
|
112
|
+
For now: methodology layer. Reviewer + agent self-check.
|
|
113
|
+
|
|
114
|
+
## Override
|
|
115
|
+
|
|
116
|
+
`SKIP_TEST_LIST=1` — logged via trace-helper per bassclef hook
|
|
117
|
+
override idiom. Use only for migration commits backfilling old test
|
|
118
|
+
files OR for emergency rescue when the rule itself appears wrong.
|
|
119
|
+
|
|
120
|
+
INSTEAD of overriding for routine work: write the test-list block. The
|
|
121
|
+
block costs ~30 seconds of typing; the override cost compounds across
|
|
122
|
+
every consumer repo's reviewer attention.
|
|
123
|
+
|
|
124
|
+
## Composes with
|
|
125
|
+
|
|
126
|
+
- `.claude/rules/testing-tier-config.md` — Tier 0 enforces presence + recency; this adds intent transparency
|
|
127
|
+
- `.claude/rules/test-sufficiency.md` — 10-criterion mechanical sufficiency rubric; supplies WHAT to assert; this supplies HOW to track
|
|
128
|
+
- `.claude/rules/testing.md` — what makes a good test (test-content guidance); this adds the planning artifact
|
|
129
|
+
- `@luminary kent-beck` — TDD anchor; chapters 1-3 of TDD By Example are the bassclef source
|