@thebassclef/lite 0.1.0 → 0.1.3
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 +40 -6
- package/dist/cli.js +40 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/substrate/.bassclef/lite-manifest.json +999 -92
- package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +492 -0
- package/substrate/.claude/hooks/pre-commit-gate.sh +1 -2
- package/substrate/.claude/hooks/turn-prose-kiss-check.sh +30 -1
- package/substrate/.claude/luminaries/glenford-myers.md +230 -0
- package/substrate/.claude/luminaries/hunt-thomas.md +115 -0
- package/substrate/.claude/luminaries/hyrum-wright.md +94 -0
- package/substrate/.claude/luminaries/michael-feathers.md +2 -2
- package/substrate/.claude/luminaries/tony-hoare.md +170 -0
- package/substrate/.claude/luminaries/vaughn-vernon.md +50 -0
- package/substrate/.claude/luminaries/w-edwards-deming.md +158 -0
- package/substrate/.claude/rules/accessor-library-discipline.md +138 -0
- package/substrate/.claude/rules/adr-discipline.md +120 -0
- package/substrate/.claude/rules/api-conventions.md +125 -0
- package/substrate/.claude/rules/bootstrap-pair-discipline.md +141 -0
- package/substrate/.claude/rules/cold-adopter-harness-discipline.md +129 -0
- package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +188 -0
- package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +188 -0
- package/substrate/.claude/rules/defensive-bash.md +68 -0
- package/substrate/.claude/rules/deferred-actions.md +233 -0
- package/substrate/.claude/rules/github-issue-flash-tweet.md +156 -0
- package/substrate/.claude/rules/hook-wire-on-author.md +103 -0
- package/substrate/.claude/rules/iteration-bet-brief-completeness.md +54 -0
- package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +3 -3
- package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +89 -0
- package/substrate/.claude/rules/loop-discipline.md +81 -0
- package/substrate/.claude/rules/manual-prod-approval.md +100 -0
- package/substrate/.claude/rules/marker-enrichment-discipline.md +99 -0
- package/substrate/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/substrate/.claude/rules/new-dependency-check.md +51 -0
- package/substrate/.claude/rules/option-label-discipline.md +108 -0
- package/substrate/.claude/rules/pattern-annotation.md +100 -0
- package/substrate/.claude/rules/plain-english-discipline.md +11 -9
- package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +211 -0
- package/substrate/.claude/rules/pr-title-shape.md +161 -0
- package/substrate/.claude/rules/prototype-workflow.md +65 -0
- package/substrate/.claude/rules/reserved-skill-names.md +123 -0
- package/substrate/.claude/rules/schema-management.md +49 -0
- package/substrate/.claude/rules/security.md +37 -0
- package/substrate/.claude/rules/skill-composition-declarations.md +124 -0
- package/substrate/.claude/rules/skill-description-clarity.md +247 -0
- package/substrate/.claude/rules/skill-procedure-step-list.md +137 -0
- package/substrate/.claude/rules/stuck-signal-diagnostic.md +140 -0
- package/substrate/.claude/rules/substrate-config-schema.md +98 -0
- package/substrate/.claude/rules/test-list-discipline.md +175 -0
- package/substrate/.claude/rules/test-sufficiency.md +210 -0
- package/substrate/.claude/rules/testing-tier-config.md +145 -0
- package/substrate/.claude/rules/testing.md +38 -0
- package/substrate/.claude/rules/turn-estimate-grounding.md +134 -0
- package/substrate/.claude/rules/visual-hierarchy.md +437 -0
- package/substrate/.claude/rules/we-dont-break-adopters.md +126 -0
- package/substrate/.claude/rules/wu-sequencing-compounds.md +145 -0
- package/substrate/.claude/skills/build/SKILL.md +1 -1
- package/substrate/.claude/skills/chronicle/SKILL.md +55 -0
- package/substrate/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/substrate/.claude/skills/decompose/SKILL.md +1 -1
- package/substrate/.claude/skills/diagnose/SKILL.md +1 -1
- package/substrate/.claude/skills/feynman/SKILL.md +90 -0
- package/substrate/.claude/skills/howdoi/SKILL.md +1 -1
- package/substrate/.claude/skills/ia-model/SKILL.md +1 -1
- package/substrate/.claude/skills/interaction-design/SKILL.md +1 -1
- package/substrate/.claude/skills/interpret-input/SKILL.md +8 -8
- package/substrate/.claude/skills/journal/SKILL.md +209 -0
- package/substrate/.claude/skills/kiss/SKILL.md +1 -1
- package/substrate/.claude/skills/launch/SKILL.md +14 -23
- package/substrate/.claude/skills/lean-canvas/SKILL.md +1 -1
- package/substrate/.claude/skills/longrun/SKILL.md +45 -8
- package/substrate/.claude/skills/luminary/SKILL.md +1 -1
- package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +1 -1
- package/substrate/.claude/skills/onboard-repo/SKILL.md +143 -709
- package/substrate/.claude/skills/pattern-review/SKILL.md +1 -1
- package/substrate/.claude/skills/personas/SKILL.md +5 -5
- package/substrate/.claude/skills/promote/SKILL.md +1 -1
- package/substrate/.claude/skills/requirement/SKILL.md +1 -1
- package/substrate/.claude/skills/retro/SKILL.md +1 -1
- package/substrate/.claude/skills/riff/SKILL.md +1 -1
- package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +1 -1
- package/substrate/.claude/skills/session-end/SKILL.md +1 -1
- package/substrate/.claude/skills/session-log/SKILL.md +3 -3
- package/substrate/.claude/skills/skills/SKILL.md +1 -1
- package/substrate/.claude/skills/spec/SKILL.md +1 -1
- package/substrate/.claude/skills/sprint/SKILL.md +1 -1
- package/substrate/.claude/skills/stage/SKILL.md +1 -1
- package/substrate/.claude/skills/state-a-problem/SKILL.md +1 -1
- package/substrate/.claude/skills/temperance/SKILL.md +1 -1
- package/substrate/.claude/skills/use-case/SKILL.md +1 -1
- package/substrate/.claude/skills/user-stories/SKILL.md +1 -1
- package/substrate/.claude/skills/value-prop/SKILL.md +1 -1
- package/substrate/.claude/skills/verify/SKILL.md +1 -1
- package/substrate/.claude/skills/visual-review/SKILL.md +503 -0
- package/substrate/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/substrate/.claude/skills/whereami/SKILL.md +2 -2
- package/substrate/CONTRIBUTING.md +1 -1
- package/substrate/README.md +5 -5
- package/substrate/lib/prose-scan-boundary.sh +171 -0
- package/substrate/lib/tier-check.sh +50 -1
- package/substrate/lib/tier-dependency-audit.sh +159 -4
- package/substrate/presence/install/bassclef-sync.template.sh +1 -1
- package/substrate/scripts/generate-lite-manifest.sh +21 -5
- package/substrate/standards/adr-template.md +86 -0
- package/substrate/standards/api-conventions/nextjs.md +84 -0
- package/substrate/standards/artifact-composition.md +209 -0
- package/substrate/standards/bash-hook-safety.md +246 -0
- package/substrate/standards/branch-stacking.md +408 -0
- package/substrate/standards/code-safety-principles.md +176 -0
- package/substrate/standards/composer-prerequisites.md +155 -0
- package/substrate/standards/dependency-discipline/cargo.md +39 -0
- package/substrate/standards/dependency-discipline/gem.md +43 -0
- package/substrate/standards/dependency-discipline/go-mod.md +41 -0
- package/substrate/standards/dependency-discipline/npm.md +42 -0
- package/substrate/standards/dependency-discipline/pip.md +42 -0
- package/substrate/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/substrate/standards/deployment-topology.md +69 -0
- package/substrate/standards/docs-sync-allowlist.md +4 -4
- package/substrate/standards/domain-and-dns.md +145 -0
- package/substrate/standards/frontend-stack.md +67 -0
- package/substrate/standards/frontmatter-schema.md +154 -0
- package/substrate/standards/hook-injection-discipline.md +202 -0
- package/substrate/standards/hook-install-class.md +215 -0
- package/substrate/standards/input-handler-interface.md +152 -0
- package/substrate/standards/lite-manifest-schema-changes.md +60 -0
- package/substrate/standards/luminary-matching.md +105 -0
- package/substrate/standards/migration-discipline/active-record.md +50 -0
- package/substrate/standards/migration-discipline/alembic.md +43 -0
- package/substrate/standards/migration-discipline/gorm.md +50 -0
- package/substrate/standards/migration-discipline/prisma.md +53 -0
- package/substrate/standards/migration-discipline/sqlalchemy.md +51 -0
- package/substrate/standards/mobile-ephemeral-session.md +167 -0
- package/substrate/standards/model-routing-discipline.md +160 -0
- package/substrate/standards/persona-schema.md +229 -0
- package/substrate/standards/pluggable-luminaries.md +323 -0
- package/substrate/standards/pr-body-discipline.md +115 -0
- package/substrate/standards/preview-state-schema.md +189 -0
- package/substrate/standards/reserved-skill-names.md +120 -0
- package/substrate/standards/scannable-multi-option-output.md +261 -0
- package/substrate/standards/sdlc-gates/typescript.md +57 -0
- package/substrate/standards/session-board.md +256 -0
- package/substrate/standards/state-spine-contract.md +255 -0
- package/substrate/standards/steering-hints/kiss-words.md +11 -0
- package/substrate/standards/substrate-config-schema.md +267 -0
- package/substrate/standards/tier-dependency-analysis.md +1 -1
- package/substrate/standards/tier-tag-schema.md +1 -1
- package/substrate/standards/two-layer-config.md +99 -0
- package/substrate/standards/use-case-format.md +292 -0
- package/substrate/standards/user-story-invest.md +268 -0
- package/substrate/standards/velocity-and-appetite.md +229 -0
- package/substrate/standards/voice-input-pattern.md +119 -0
- package/substrate/standards/worktree-management.md +211 -0
- package/substrate/templates/chronicle-template.md +75 -0
- package/substrate/templates/memory-proposal-template.md +77 -0
- package/substrate/templates/persona-template.md +200 -0
- package/substrate/templates/pr-faq.md +45 -0
- package/substrate/templates/secret-rotation-template.md +162 -0
- package/substrate/templates/spec-template.md +131 -0
- package/substrate/templates/use-case-template.md +194 -0
- package/substrate/templates/user-story-template.md +107 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Every new bassclef hook (a file under .claude/hooks/*.sh) MUST be added to project .claude/settings.json in the same PR that authors it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hook Wire On Author
|
|
7
|
+
|
|
8
|
+
Every new bassclef hook (a file under `.claude/hooks/*.sh`) MUST be added to project `.claude/settings.json` in the same PR that authors it. Hooks without settings entries are dead-letter — they exist on disk but stay silent on every tool call. The substrate appears to ship the safety net; in reality, every adopter session runs without it.
|
|
9
|
+
|
|
10
|
+
INSTEAD of shipping the hook on its own: include the settings entry in the same PR. The cost is one settings.json edit; the work compounds across every adopter session.
|
|
11
|
+
|
|
12
|
+
This rule closes the substrate-defect class that produced bassclef-upstream#319 (phase-1, closed 2026-06-24) + #376 (phase-2, this rule's filing context).
|
|
13
|
+
|
|
14
|
+
## Why this rule exists
|
|
15
|
+
|
|
16
|
+
Audit during PR #318 surfaced 32 of 42 bassclef hooks without settings entries. The defect class: write hook → ship hook → forget the settings entry. No mechanical check existed to flag these at PR-author boundary.
|
|
17
|
+
|
|
18
|
+
INSTEAD of letting the gap repeat: this rule + the V2 mechanical layer in `pre-commit-gate.sh` close the class at the authoring boundary so phase-3 never has to file.
|
|
19
|
+
|
|
20
|
+
Phase-1 (#319) shipped a subset of P0 entries during the 2026-06-24 architect-review longrun. Phase-2 (#376) shipped the remaining 11 during the 2026-06-26 ultra-plus thread longrun. Both bets exist because the discipline was methodology-only.
|
|
21
|
+
|
|
22
|
+
## When this rule fires
|
|
23
|
+
|
|
24
|
+
Any PR that adds a new `.claude/hooks/*.sh` file. The rule passes through on:
|
|
25
|
+
|
|
26
|
+
- Edits to existing hooks (only NEW hook files trigger)
|
|
27
|
+
- Test files under `.claude/hooks/tests/`
|
|
28
|
+
- Library scripts under `lib/` (those are sourced; not hooks)
|
|
29
|
+
- Documentation under `.claude/hooks/*.md`
|
|
30
|
+
|
|
31
|
+
## What the rule requires
|
|
32
|
+
|
|
33
|
+
When a PR adds a new hook file, the same PR MUST also include an edit to `.claude/settings.json` adding the hook at its correct matcher. The hook's header MUST declare its intended matcher per these conventions:
|
|
34
|
+
|
|
35
|
+
- `# PreToolUse: <matcher>` — added under `hooks.PreToolUse[].matcher`
|
|
36
|
+
- `# Stop` — added under `hooks.Stop[].hooks`
|
|
37
|
+
- `# PostToolUse: <matcher>` — added under `hooks.PostToolUse[].matcher`
|
|
38
|
+
- `# SessionStart` — added under `hooks.SessionStart[].hooks`
|
|
39
|
+
- `# UserPromptSubmit` — added under `hooks.UserPromptSubmit[].hooks`
|
|
40
|
+
|
|
41
|
+
The PR body MUST include a `Bootstrap pair shipped` block per `.claude/rules/bootstrap-pair-discipline.md` naming both the hook file AND the settings.json entry line.
|
|
42
|
+
|
|
43
|
+
## Anti-patterns
|
|
44
|
+
|
|
45
|
+
These shapes fail this rule.
|
|
46
|
+
|
|
47
|
+
**Hook shipped without settings entry.** Author edits `.claude/hooks/foo.sh`, commits, opens PR. Settings.json untouched.
|
|
48
|
+
|
|
49
|
+
INSTEAD: ship the settings entry in the same PR. The cost is small (one settings.json line); the work compounds across every adopter session.
|
|
50
|
+
|
|
51
|
+
**Hook references "sourced-only by design" in header.** Hook docstring says "this hook is sourced by other hooks, not connected directly." Phase-1 audit treated this as exempt; phase-2 reshape clarifies: composite/sourced libraries belong under `lib/`, not `.claude/hooks/`.
|
|
52
|
+
|
|
53
|
+
INSTEAD of marking the hook exempt: move sourced-only libraries to `lib/`. Hooks under `.claude/hooks/` either get a settings entry or get moved.
|
|
54
|
+
|
|
55
|
+
**Hook shipped at wrong matcher.** Author adds `pre-build-gate.sh` under PreToolUse Bash when its header says PreToolUse Edit|Write|MultiEdit. Hook stays silent.
|
|
56
|
+
|
|
57
|
+
INSTEAD of guessing the matcher: read the hook's header before adding the entry. The matcher convention is documented above.
|
|
58
|
+
|
|
59
|
+
## Mechanical layer
|
|
60
|
+
|
|
61
|
+
**V1.5 (bassclef-upstream#1163 Layer 4, shipped 2026-08-08):** `.claude/hooks/hook-classifier-canary.sh` fires as PreToolUse Edit|Write|MultiEdit against paths under `.claude/hooks/*.sh` (excludes tests dir + fixtures). Detects new hook files that lack any recognized wiring signal (settings.json / .github/workflows / scripts/release-to-bassclef.sh / launchd header / sourced-lib header). Emits ADVISORY to stderr naming 5 remediation paths. Sources `lib/mechanism-fidelity.sh` for the classifier vocabulary. Override: `SKIP_HOOK_CLASSIFIER_CANARY=1`. Tier 0 test at `.claude/hooks/tests/hook-classifier-canary.test.sh` (10 tests).
|
|
62
|
+
|
|
63
|
+
**V2 (deferred):** flip canary from ADVISORY to BLOCK once one calibration cycle passes with zero operator-reported false positives.
|
|
64
|
+
|
|
65
|
+
**V3 (deferred to pre-commit sibling):** extend `pre-commit-gate.sh` to scan `git diff --staged --name-only` for new hooks and BLOCK when settings entry absent. Two-layer defense (author-time canary + commit-time gate) closes the class end-to-end.
|
|
66
|
+
|
|
67
|
+
Defer V3 to a separate goal when V1.5+V2 have shipped through enough PRs that the failure modes are stable.
|
|
68
|
+
|
|
69
|
+
## Override
|
|
70
|
+
|
|
71
|
+
`SKIP_HOOK_WIRE_ON_AUTHOR=1 <command>` — logged via trace-helper. Use only when:
|
|
72
|
+
|
|
73
|
+
- The hook is genuinely "in development" and ships without settings entry with a follow-on ticket filed AND the current PR cites the follow-on
|
|
74
|
+
- Emergency rescue where adding the entry would break the harness
|
|
75
|
+
|
|
76
|
+
INSTEAD of overriding for routine work: ship the settings entry in the same PR. The cost is small (one settings.json line); the discipline compounds across every adopter session.
|
|
77
|
+
|
|
78
|
+
## Composes with
|
|
79
|
+
|
|
80
|
+
- `.claude/rules/bootstrap-pair-discipline.md` — sister discipline (this rule extends the bootstrap-pair contract to hook + settings entry)
|
|
81
|
+
- `.claude/rules/cold-adopter-harness-discipline.md` — sister discipline at adopter-observable boundary (settings.json IS adopter-observable)
|
|
82
|
+
- `.claude/rules/blocked-items.md` — BLOCK protocol the V2 mechanical layer fires
|
|
83
|
+
- `@luminary saltzer-schroeder` — complete mediation (the safety net is connected, not dead-letter)
|
|
84
|
+
- `@luminary michael-nygard` — stability pattern (the settings entry is what makes the safety net real)
|
|
85
|
+
- `@luminary linus-torvalds` — adopter-trust ceiling (bassclef hooks without settings entries equal adopter hooks without settings entries)
|
|
86
|
+
|
|
87
|
+
## Distinct from
|
|
88
|
+
|
|
89
|
+
- `.claude/rules/bootstrap-pair-discipline.md` — that rule covers any substrate building block + its pair; this rule covers the specific hook + settings entry case
|
|
90
|
+
- `.claude/rules/testing-tier-config.md` — that rule covers Tier 0 strict TDD on the hook itself; this rule covers the settings entry beyond the test
|
|
91
|
+
- `.claude/rules/cold-adopter-harness-discipline.md` — that rule covers adopter-observable changes broadly; this rule covers the hook-settings slice
|
|
92
|
+
|
|
93
|
+
## Refs
|
|
94
|
+
|
|
95
|
+
- bassclef-upstream#376 (parent — V1 ships this rule)
|
|
96
|
+
- bassclef-upstream#319 (phase-1 closed; the sweep that surfaced the discipline gap)
|
|
97
|
+
- bet `docs/iteration-bets/2026-06-26c-hook-wiring-phase-2.md` § WU-3 (this rule)
|
|
98
|
+
- `.claude/rules/bootstrap-pair-discipline.md` (sister)
|
|
99
|
+
- `@luminary saltzer-schroeder` + `@luminary michael-nygard` (anchors)
|
|
100
|
+
|
|
101
|
+
## Retirement condition
|
|
102
|
+
|
|
103
|
+
This rule retires only if bassclef migrates off hooks-as-substrate-primitives (very unlikely; hooks are the operational layer for substrate-discipline enforcement). The V2 mechanical extension may absorb the methodology check; the discipline at author time persists.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: When Orchestrator (or any agent) delegates a Construction stack to a subagent (Builder, Designer, Architect), the brief MUST include, verbatim and with file paths, every artifact…
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Iteration Goal Brief Completeness
|
|
7
|
+
|
|
8
|
+
When Orchestrator (or any agent) delegates a Construction stack to a
|
|
9
|
+
subagent (Builder, Designer, Architect), the brief MUST include, verbatim
|
|
10
|
+
and with file paths, every artifact the iteration goal cites that applies
|
|
11
|
+
to the stack's scope.
|
|
12
|
+
|
|
13
|
+
## Required in every delegation brief
|
|
14
|
+
|
|
15
|
+
- Canvas (if scope touches a subsystem covered by the canvas)
|
|
16
|
+
- Spec or decomposition artifact
|
|
17
|
+
- **All prototypes** listed in the goal's References, scoped to which apply per surface
|
|
18
|
+
- ADRs the goal pins as governing constraints
|
|
19
|
+
- Design token file(s) if the scope touches token-governed surfaces
|
|
20
|
+
- Prior PRs that shipped shared primitives the stack should reuse
|
|
21
|
+
- Luminary map (primary pair + any extended pairs tagged to surfaces in scope)
|
|
22
|
+
|
|
23
|
+
## Checkpoint before spawning the subagent
|
|
24
|
+
|
|
25
|
+
Before the Task/Agent call, enumerate the goal's reference list and confirm
|
|
26
|
+
each relevant entry is in the brief. Missing entries = re-brief before
|
|
27
|
+
spawn. In sequential mode, same checkpoint applies to the role handoff
|
|
28
|
+
within a single session.
|
|
29
|
+
|
|
30
|
+
## Operator- vs orchestrator-gated
|
|
31
|
+
|
|
32
|
+
- **Orchestrator-gated**: Orchestrator constructs the brief and validates
|
|
33
|
+
completeness before delegation. No operator prompt required.
|
|
34
|
+
- **Operator-gated**: operator may shape or override, but the default is
|
|
35
|
+
full transmission. Partial briefs require explicit operator choice.
|
|
36
|
+
|
|
37
|
+
## Why this rule exists
|
|
38
|
+
|
|
39
|
+
POA iteration #499 (2026-04-12): bet cited an approved prototype under
|
|
40
|
+
Reference artifacts. Orchestrator delegated Stack-1 (Review Queue UI) to
|
|
41
|
+
Builder with decomposition + verbal density guidance but without the
|
|
42
|
+
prototype path. Builder built against decomposition only → cramped UI
|
|
43
|
+
shipped → rebuild required.
|
|
44
|
+
|
|
45
|
+
The goal was correct. The delegation dropped information. Every bassclef
|
|
46
|
+
repo using the iteration-bet pattern has this exposure.
|
|
47
|
+
|
|
48
|
+
## Relationship to other rules
|
|
49
|
+
|
|
50
|
+
- `artifact-ingestion.md` — Builder's obligation to read staged artifacts;
|
|
51
|
+
this rule is Orchestrator's reciprocal obligation to surface them
|
|
52
|
+
- `design-direction.md` — approvals are load-bearing; bet references
|
|
53
|
+
carry the approvals and must reach Builder intact
|
|
54
|
+
- `sdlc-gates.md` — pre-build gates; brief completeness is itself a gate
|
|
@@ -9,7 +9,7 @@ Every change to `standards/lite-manifest.schema.json` (schema shape) or to the o
|
|
|
9
9
|
|
|
10
10
|
This rule is the methodology layer. The mechanical layer is a pre-flight check in `scripts/release-to-bassclef.sh` (Step 3.6, added in goal 2026-09-07c Step 4). Both required.
|
|
11
11
|
|
|
12
|
-
Sister discipline
|
|
12
|
+
Sister discipline at the file-rename surface; same shape at a different surface — files there, schema fields here.
|
|
13
13
|
|
|
14
14
|
## Why this exists
|
|
15
15
|
|
|
@@ -68,7 +68,7 @@ INSTEAD of overriding for routine work: write the entry. The cost is small (one
|
|
|
68
68
|
|
|
69
69
|
## Composes with
|
|
70
70
|
|
|
71
|
-
-
|
|
71
|
+
- file-rename-discipline (standard tier) — sister at the file surface
|
|
72
72
|
- `.claude/rules/we-dont-break-adopters.md` — parent discipline (ADR-031)
|
|
73
73
|
- `.claude/rules/cold-adopter-harness-discipline.md` — sibling smoke fires against ledger entries before release
|
|
74
74
|
- `.claude/rules/bootstrap-pair-discipline.md` — this rule + hook + tests + settings wire ship together
|
|
@@ -90,7 +90,7 @@ INSTEAD of overriding for routine work: write the entry. The cost is small (one
|
|
|
90
90
|
- Root cause: v0.36.0 upstream_commit removal broke 3 bassclef-web scripts (commit `c9a9da7` on bassclef-web repaired downstream)
|
|
91
91
|
- Goal: `docs/iteration-bets/2026-09-07c-lite-manifest-schema-plus-extractor-plus-backfill-plus-ledger.md`
|
|
92
92
|
- Risk ledger: `docs/risk-ledgers/2026-09-07c-lite-manifest-schema-extractor-backfill-ledger.md` Linus L6 + Hoare H6
|
|
93
|
-
- Sister rule:
|
|
93
|
+
- Sister rule: file-rename-discipline (standard tier)
|
|
94
94
|
- @luminary linus-torvalds — Torvalds's rule at the schema surface
|
|
95
95
|
|
|
96
96
|
## Retirement condition
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: When a plan doc at docs/next-session-plan-*.md (modified within 48 hours) carries a ## Recommended session sequence (or equivalent) section, /longrun prep MUST skip the full Steps…
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /longrun prep — compress when plan doc pre-picks scope
|
|
7
|
+
|
|
8
|
+
When a plan doc at `docs/next-session-plan-*.md` (modified within 48 hours) carries a `## Recommended session sequence` (or equivalent) section, `/longrun prep` MUST skip the full Steps 1.4c-1.7b option-table ceremony and present the pre-authored sequence directly. This rule closes bassclef-upstream#1307 R1 — the workflow-overhead class where prep re-authors 15-25 turns of ceremony an earlier session already shipped in a plan doc.
|
|
9
|
+
|
|
10
|
+
This rule is the methodology layer. The mechanism is the /longrun SKILL body Step 0.85 (bassclef-upstream#1307 R1). V2 Stop-hook enforcement is deferred per pre-mortem R5.
|
|
11
|
+
|
|
12
|
+
## When this rule fires
|
|
13
|
+
|
|
14
|
+
Every `/longrun prep` dispatch. The SKILL body Step 0.85 checks for a plan doc first. When one is found, the compressed prep path fires. When none matches, the full ceremony holds.
|
|
15
|
+
|
|
16
|
+
Detection criteria (all three must match):
|
|
17
|
+
|
|
18
|
+
1. File matching `docs/next-session-plan-*.md` exists at repo root
|
|
19
|
+
2. File was modified within the last 48 hours (`find -mtime -2`)
|
|
20
|
+
3. File body contains one of: `## Recommended session sequence`, `## Recommended sequence`, `## Next-session pickup`
|
|
21
|
+
|
|
22
|
+
## What the compressed path requires
|
|
23
|
+
|
|
24
|
+
When the compressed path fires, prep still ships the three-block opener per `.claude/rules/operator-facing-prose.md` Rule 3 (Problem + Value + Evidence). The compression targets Steps 1.4c-1.7b:
|
|
25
|
+
|
|
26
|
+
- **Skip:** re-authoring the full 5-axis-per-option block for every option (SKILL Step 1.5)
|
|
27
|
+
- **Skip:** re-authoring a full card for every non-recommended option (SKILL Step 1.6)
|
|
28
|
+
- **Skip:** re-authoring step cards + per-step compounding blocks (SKILL Steps 1.7 + 1.7a) for options the plan doc did not recommend
|
|
29
|
+
- **Keep:** scan-table at the top (3-5 rows summarizing the plan doc's items)
|
|
30
|
+
- **Keep:** one card for the recommended item per SKILL Step 1.6
|
|
31
|
+
- **Keep:** step cards + per-step compounding for the recommended item only per SKILL Steps 1.7 + 1.7a
|
|
32
|
+
- **Keep:** recommendation sentence per SKILL Step 1.7b
|
|
33
|
+
- **Add:** plan doc file path cited inline as source
|
|
34
|
+
|
|
35
|
+
Operators still pick from the scan table. The plan doc's ranking becomes the default, not a mandate.
|
|
36
|
+
|
|
37
|
+
## Anti-patterns
|
|
38
|
+
|
|
39
|
+
**Full ceremony fires despite plan doc present.** The exact class #1307 R1 filed. Cure: run the SKILL Step 0.85 detection first.
|
|
40
|
+
|
|
41
|
+
**Plan doc detection succeeds but prep still authors 5-axis blocks for every option.** Partial compression is not compression. Cure: skip the per-option 5-axis blocks; keep them only for the recommended item's card.
|
|
42
|
+
|
|
43
|
+
**Compressed prep drops the recommendation sentence.** Operators still need one-line rationale. Cure: keep Step 1.7b.
|
|
44
|
+
|
|
45
|
+
**Compressed prep skips the three-block opener.** Rule 3 discipline holds regardless of compression. Cure: Problem + Value + Evidence always land before scan-table.
|
|
46
|
+
|
|
47
|
+
INSTEAD of any of these: check for plan doc first (SKILL Step 0.85 detection); use the recommended sequence verbatim; ask operator to confirm or reshape.
|
|
48
|
+
|
|
49
|
+
## Override
|
|
50
|
+
|
|
51
|
+
`SKIP_LONGRUN_COMPRESS=1 <command>` — logged via trace-helper. Use only when the plan doc is out of date and the operator wants a fresh option set. In that case, dispatch full ceremony and note the override reason in the prep opener.
|
|
52
|
+
|
|
53
|
+
INSTEAD of overriding routinely: update the plan doc. A stale plan doc is a bad plan doc; fixing it upstream compounds across every future prep.
|
|
54
|
+
|
|
55
|
+
## V2 mechanical layer (deferred)
|
|
56
|
+
|
|
57
|
+
V1 ships this rule + SKILL body Step 0.85 amendment. V2 (deferred follow-on ticket) will add a Stop hook that:
|
|
58
|
+
|
|
59
|
+
1. Detects `/longrun prep` output in the assistant's most recent message
|
|
60
|
+
2. Detects presence of a fresh plan doc via `find -mtime -2`
|
|
61
|
+
3. Checks whether the prep output carries 3+ per-option 5-axis blocks (evidence of full ceremony)
|
|
62
|
+
4. Emits ADVISORY finding when full ceremony fires despite plan doc being present
|
|
63
|
+
|
|
64
|
+
Defer V2 until this rule (V1 methodology) has shipped through 3-5 preps and the mechanical extension has stable heuristics.
|
|
65
|
+
|
|
66
|
+
## Composes with
|
|
67
|
+
|
|
68
|
+
- `.claude/skills/longrun/SKILL.md` Step 0.85 — the SKILL amendment this rule prescribes
|
|
69
|
+
- `.claude/rules/operator-facing-prose.md` Rule 3 — three-block opener still fires under compression
|
|
70
|
+
- `.claude/rules/compounding-sequence-fresh-analysis.md` — per-option 5-axis fresh analysis still holds for the recommended item's card
|
|
71
|
+
- `.claude/rules/plan-enumeration-needs-value-props.md` — every option in the compressed scan-table still carries a value-prop cell
|
|
72
|
+
- `.claude/rules/blocked-items.md` — silence is not deferral (plan doc detection reports fire vs skip explicitly)
|
|
73
|
+
- `.claude/rules/bootstrap-pair-discipline.md` — this rule + SKILL amendment ship as paired bootstrap
|
|
74
|
+
- @luminary john-ousterhout — deep module (compression path hides plan-doc detection behind narrow interface)
|
|
75
|
+
- @luminary donald-norman — signifier + feedback (plan doc presence is a signifier; compressed vs full ceremony is user feedback)
|
|
76
|
+
- @luminary frederick-brooks — conceptual integrity (compression preserves the option-table + card + step-card shape; only volume shrinks)
|
|
77
|
+
|
|
78
|
+
## Refs
|
|
79
|
+
|
|
80
|
+
- bassclef-upstream#1307 R1 — this rule's filing ticket
|
|
81
|
+
- `docs/next-session-plan-2026-08-20.md` — the plan doc that motivated the R1 class filing
|
|
82
|
+
- operator_recap_2026-08-19e L96 — evidence source (25-40t ceremony vs 5t needed)
|
|
83
|
+
- `.claude/skills/longrun/SKILL.md` Step 0.85 — mechanism this rule prescribes
|
|
84
|
+
|
|
85
|
+
## Retirement condition
|
|
86
|
+
|
|
87
|
+
This rule retires only if `/longrun` stops accepting plan docs as pre-authored scope. Until then, the discipline of compressing prep against pre-authored sequences survives.
|
|
88
|
+
|
|
89
|
+
Closes bassclef-upstream#1307 R1.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Every step that ships code or substrate runs the six-step cycle for shipping code or substrate.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /loop discipline — methodology layer
|
|
7
|
+
|
|
8
|
+
Every step that ships code or substrate runs the six-step cycle below. This rule is the methodology layer; the full cycle spec lives with operator substrate.
|
|
9
|
+
|
|
10
|
+
## When this rule fires
|
|
11
|
+
|
|
12
|
+
The rule fires when an agent or operator opens a feature branch, commits, opens a PR, runs review, or merges. The discipline applies regardless of work scope — single-issue fix, multi-step /longrun, and substrate-defect filing all run the same six steps.
|
|
13
|
+
|
|
14
|
+
## What the rule requires
|
|
15
|
+
|
|
16
|
+
Before merging a PR that touches code or substrate, the agent has done all six main steps plus three sub-steps:
|
|
17
|
+
|
|
18
|
+
0.5. `/pre-mortem` light fired (3 luminary lenses, 5-8 risks per lens, 30 min per Klein workshop shape) BEFORE Step 1 /temperance. Marker exists at `state/markers/pre-mortem/<branch-slug>.marker` citing the risk ledger path. Strongest concerns fold into the plan before edits begin. Per `.claude/skills/pre-mortem/SKILL.md` light mode.
|
|
19
|
+
1. `/temperance` fired with answers stated (smallest shape, blast radius, brute-force check). Marker exists at `state/markers/temperance/<branch-slug>.marker`.
|
|
20
|
+
2. `/luminary` picked at least one primary lens. Marker exists at `state/markers/luminary/<branch-slug>.marker`. Slugs recorded in the evidence row's `authoring_luminaries` field.
|
|
21
|
+
2a. Marker declares `lead` field naming one primary luminary; `supporting` field lists the others. Lead is the luminary whose lens verifies the ship at Step 5.5. Format mirrors bet-doc frontmatter `authoring_luminaries.primary` and `.supporting`.
|
|
22
|
+
3. Tier 0 strict TDD satisfied where the testing tier requires it. Tests pass. The `testing-tier-enforce` hook has not blocked the commit.
|
|
23
|
+
4. Review run. Findings categorized as red, amber, green, note. CodeReviewer agent dispatched OR inline review with luminary lens applied.
|
|
24
|
+
5. Red and amber findings resolved through one or more iterations. Iteration count recorded. When the change is a SKILL body rewrite (any file under `.claude/skills/*/SKILL.md`), the intent check is measurable — run `scripts/intent-drift-check.sh --skill <slug>`. Cosine at or above 0.90 versus the saved vector at `.claude/embeddings/skills/<slug>.json` passes. Cosine below threshold means intent drifted and the rewrite iterates or reverts. Subjective promise-list checks satisfy the step ONLY when no saved vector exists (new skill). Threshold raised from 0.85 to 0.90 per #790 (2026-07-19) after first-6-cures median landed at 0.987.
|
|
25
|
+
5.5. Lead lens confirms all red and amber findings cleared before Step 6 merge. Marker exists at `state/markers/lead-lens-signoff/<branch-slug>.marker` naming the lead luminary and either "no findings" or the specific finding IDs cleared. Rubber-stamp sign-off is a discipline miss — sign-off must cite finding IDs or state "no findings" with rationale.
|
|
26
|
+
6. PR body carries the structured evidence including the three markers from Steps 0.5, 2a, 5.5. Squash merge. Evidence row status flips to merged.
|
|
27
|
+
|
|
28
|
+
Silence at any step is not deferral. Explicit deferral with stated rationale is the only acceptable skip.
|
|
29
|
+
|
|
30
|
+
The three sub-steps (0.5 + 2a + 5.5) close the aggregate-GREEN balancing check gap named in #845 body Cure B. When every gate reports GREEN independently but the fix ships in the wrong shape, the missing signal is a balancing check — a lens that reads the aggregate and asks "does this actually solve the problem." The lead luminary IS the balancing check. Ships per #836.
|
|
31
|
+
|
|
32
|
+
## What this rule does NOT require
|
|
33
|
+
|
|
34
|
+
- A specific number of luminaries (one minimum; five maximum per `/luminary` skill ceiling).
|
|
35
|
+
- A specific finding count (red and amber findings should exist; zero on every PR signals shallow review).
|
|
36
|
+
- A specific iteration count (zero is acceptable when first review is clean).
|
|
37
|
+
- The CodeReviewer agent specifically — inline review with luminary lens is acceptable for smaller scope.
|
|
38
|
+
- A standalone evidence document. Tier 1 evidence rows live in PR body sections; tier 0 in standalone files. Both satisfy the rule.
|
|
39
|
+
|
|
40
|
+
## Skip path with explicit deferral
|
|
41
|
+
|
|
42
|
+
Some work skips part of the cycle by declaration:
|
|
43
|
+
|
|
44
|
+
- **Trivial change** — typo, dependency bump, single-line rename. Commit message line `loop: skipped — trivial change, no review surface` records the skip.
|
|
45
|
+
- **Documented emergency** — production incident with operator-approved bypass. PR body carries authorization.
|
|
46
|
+
- **Operator direct merge** — operator authors the change and merges. The discipline applies to the agent work that surfaces it, not to the operator's edit.
|
|
47
|
+
|
|
48
|
+
Silence is not skip. Default is run the cycle.
|
|
49
|
+
|
|
50
|
+
## Composes with
|
|
51
|
+
|
|
52
|
+
- `standards/construction-evidence-discipline.md` — the artifact produced per cycle
|
|
53
|
+
- `.claude/rules/testing-tier-config.md` — step 3 enforcement
|
|
54
|
+
- `.claude/rules/wu-sequencing-compounds.md` — sister discipline at the multi-step bet level
|
|
55
|
+
- `.claude/rules/blocked-items.md` — the protocol for surfacing skipped steps that should have run
|
|
56
|
+
- `.claude/skills/pre-mortem/SKILL.md` — Step 0.5 method; light mode shape (3 lenses, 30 min)
|
|
57
|
+
- `.claude/luminaries/gary-klein.md` — Step 0.5 anchor (pre-mortem originator)
|
|
58
|
+
|
|
59
|
+
## Mechanical enforcement
|
|
60
|
+
|
|
61
|
+
V1 ships this rule + the standard. V2 (deferred) extends `pre-commit-gate.sh` to verify both markers exist for the branch before any commit, and adds a PR-open hook that verifies the evidence section is present in the PR body.
|
|
62
|
+
|
|
63
|
+
Per memory `feedback_hooks_beat_methodology_for_substrate_quality`: V2 hook ships alongside the methodology — both required for the discipline to hold across context boundaries.
|
|
64
|
+
|
|
65
|
+
## Override path
|
|
66
|
+
|
|
67
|
+
`SKIP_LOOP_DISCIPLINE=1 <command>` — logged via trace-helper. Use only for migration scripts that author many goal docs at once, or for emergency rescue. Routine skip is not an override target; routine skip is a methodology miss.
|
|
68
|
+
|
|
69
|
+
## Source dialogue
|
|
70
|
+
|
|
71
|
+
2026-06-23 overnight bet 23a (discipline mechanization three disciplines). The loop was exercised on every step during the goal; this rule and the companion standard codify what the goal did.
|
|
72
|
+
|
|
73
|
+
## Refs
|
|
74
|
+
|
|
75
|
+
- goal doc `docs/iteration-bets/2026-06-23a-discipline-mechanization-three-disciplines.md` — the goal that ran the loop and proved the discipline
|
|
76
|
+
- `.claude/luminaries/kent-beck.md` — primary lineage (red-green-refactor)
|
|
77
|
+
- `.claude/luminaries/gary-klein.md` — Step 0.5 pre-mortem lineage
|
|
78
|
+
- Memory `feedback_hooks_beat_methodology_for_substrate_quality` — pattern for V2 mechanical layer
|
|
79
|
+
- Ticket 836 — parent filing (three sub-steps + hook extension)
|
|
80
|
+
- Ticket 845 — Cure B (aggregate-GREEN balancing check) — Step 5.5 lead-lens sign-off ships that cure
|
|
81
|
+
- Goal doc `docs/iteration-bets/2026-07-24a-ship-836-loop-discipline-extension.md` — ship vehicle for the three sub-steps
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
globs: [".github/workflows/**/*.yml", ".github/workflows/**/*.yaml"]
|
|
4
|
+
description: Prod deploys require GitHub Environments with required_reviewers — no exceptions
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Manual Prod Approval Rule
|
|
8
|
+
|
|
9
|
+
Every app repo's production deploy MUST gate on GitHub Environments
|
|
10
|
+
with `required_reviewers` configured. Auto-deploy-to-prod on any
|
|
11
|
+
branch push is a rule violation.
|
|
12
|
+
|
|
13
|
+
## Why
|
|
14
|
+
|
|
15
|
+
`guardrails.md` already says: "Deploy to production without human
|
|
16
|
+
approval — even in orchestrator-gated mode. This is the hardest
|
|
17
|
+
guardrail. No exceptions."
|
|
18
|
+
|
|
19
|
+
This rule specifies the **mechanism** for enforcement: GitHub's
|
|
20
|
+
native Environments feature with reviewer requirements, not agent
|
|
21
|
+
discipline. Agents can and will skip softer forms. Infrastructure-
|
|
22
|
+
enforced gates cannot be skipped.
|
|
23
|
+
|
|
24
|
+
## What satisfies the rule
|
|
25
|
+
|
|
26
|
+
A deploy workflow with a job referencing a GitHub Environment that
|
|
27
|
+
has `required_reviewers` configured:
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
jobs:
|
|
31
|
+
deploy-prod:
|
|
32
|
+
environment:
|
|
33
|
+
name: prod # ← this environment must exist in repo settings
|
|
34
|
+
# with required_reviewers set
|
|
35
|
+
steps:
|
|
36
|
+
- ... actual deploy steps
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Repo settings at github.com/[owner]/[repo]/settings/environments
|
|
40
|
+
must show:
|
|
41
|
+
- Environment named `prod`
|
|
42
|
+
- Deployment protection rules enabled
|
|
43
|
+
- Required reviewers populated (at least one operator)
|
|
44
|
+
|
|
45
|
+
## What violates the rule
|
|
46
|
+
|
|
47
|
+
- `main` branch push auto-deploys to prod without Environment gating
|
|
48
|
+
- Any workflow job deploying to prod without `environment:` field
|
|
49
|
+
- Environment exists but has no required reviewers (empty list = auto-approved)
|
|
50
|
+
- Reviewers are GitHub bots / service accounts (must be human identity)
|
|
51
|
+
|
|
52
|
+
## Detection
|
|
53
|
+
|
|
54
|
+
This rule fires when:
|
|
55
|
+
- A new app repo is scaffolded by `/autonomous start` with
|
|
56
|
+
`deploy_targets.prod` set to a URL
|
|
57
|
+
- `.github/workflows/deploy.yml` is added or modified
|
|
58
|
+
- Pre-commit-gate hook detects workflow changes touching prod deploy steps
|
|
59
|
+
|
|
60
|
+
## Enforcement
|
|
61
|
+
|
|
62
|
+
- Pre-commit-gate hook surfaces a warning if deploy workflow
|
|
63
|
+
touches prod without Environment reference
|
|
64
|
+
- `/substrate-check` skill validates Environment + reviewer configuration
|
|
65
|
+
when `deploy_targets.prod` is set
|
|
66
|
+
- `/deploy-prod` skill refuses to run if Environment validation
|
|
67
|
+
fails
|
|
68
|
+
|
|
69
|
+
## What agents do when rule is violated
|
|
70
|
+
|
|
71
|
+
Fire BLOCKED: (per `blocked-items.md`):
|
|
72
|
+
- `BLOCKED: prod deploy without approval gate — configure GitHub
|
|
73
|
+
Environment 'prod' with required_reviewers before proceeding`
|
|
74
|
+
- Resolve (configure via `gh api` or UI) or explicit defer with
|
|
75
|
+
rationale. Silence is not deferral.
|
|
76
|
+
|
|
77
|
+
## Setup commands (one-time per repo)
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Get your user ID
|
|
81
|
+
USER_ID=$(gh api user --jq '.id')
|
|
82
|
+
|
|
83
|
+
# Create prod environment with yourself as reviewer
|
|
84
|
+
gh api repos/$OWNER/$REPO/environments/prod --method PUT -f "wait_timer=0" \
|
|
85
|
+
-f "deployment_branch_policy[protected_branches]=false" \
|
|
86
|
+
-f "deployment_branch_policy[custom_branch_policies]=true"
|
|
87
|
+
|
|
88
|
+
# Add required reviewer
|
|
89
|
+
gh api repos/$OWNER/$REPO/environments/prod \
|
|
90
|
+
--method PUT \
|
|
91
|
+
-F "reviewers[][type]=User" \
|
|
92
|
+
-F "reviewers[][id]=$USER_ID"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Related
|
|
96
|
+
|
|
97
|
+
- `.claude/rules/guardrails.md` — prod deploy human-approved
|
|
98
|
+
- `standards/deployment-topology.md` — bassclef deploy pattern
|
|
99
|
+
- `standards/substrate-config-schema.md` — `prod_approval_reviewers`
|
|
100
|
+
field convention
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Gate marker files (under state/markers/temperance/, state/markers/luminary/, state/markers/arc-walk/, state/markers/orientation-gate/, state/markers/roadmap-reconcile-gate/) MUST…
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Marker Enrichment Discipline
|
|
7
|
+
|
|
8
|
+
Gate marker files (under `state/markers/temperance/`, `state/markers/luminary/`, `state/markers/arc-walk/`, `state/markers/orientation-gate/`, `state/markers/roadmap-reconcile-gate/`) MUST carry body content within the same WU or PR that creates them. Touching a marker without body content satisfies the gate's existence check but leaves no audit trail — months later, a reader cannot recover the scope-decision, luminary lens, or thread context that the marker is supposed to record.
|
|
9
|
+
|
|
10
|
+
This rule is the methodology layer. The mechanical layer is `pre-build-gate.sh` extended with a non-empty-body check on the 5 gate-marker classes (advisory in V1 per the allowlist baseline; BLOCK in V2 after the allowlist is empty).
|
|
11
|
+
|
|
12
|
+
## Why this rule exists
|
|
13
|
+
|
|
14
|
+
Bet 27c WU-11 surfaced "marker-enrichment-gap" as candidate substrate-defect 5. The gate hooks (`pre-build-gate.sh`) check marker file EXISTENCE only. An agent satisfies the gate by running `touch state/markers/temperance/<branch>.marker`. The marker exists; the gate clears; substantive work proceeds. Months later, a reader looking at the marker has zero evidence of what scope decision was made.
|
|
15
|
+
|
|
16
|
+
Bet 27c shipped 13 PRs across the foundation work. Most markers in `state/markers/` are empty files from earlier sessions where the agent satisfied the gate without recording reasoning. The audit trail is missing.
|
|
17
|
+
|
|
18
|
+
INSTEAD of writing empty markers to clear gates: the WU/PR that creates a marker writes its body content in the same change. Format conventions:
|
|
19
|
+
|
|
20
|
+
- **Temperance marker** — date + branch + scope-decision (right-thing answer, right-way answer, drift trigger)
|
|
21
|
+
- **Luminary marker** — date + branch + primary lens(es) + supporting lens(es) + one-line rationale per lens
|
|
22
|
+
- **Arc-walk marker** — date + branch + parent_bet chain (recursive walk) + drivers consumed
|
|
23
|
+
- **Orientation-gate marker** — date + branch + thread-level read completion notes
|
|
24
|
+
- **Roadmap-reconcile-gate marker** — date + branch + reconcile result (no drift / drift detected / no roadmap declared)
|
|
25
|
+
|
|
26
|
+
The bet 28a WU-0 prep + WU-1..5 markers ship as the exemplar pattern.
|
|
27
|
+
|
|
28
|
+
## When this rule fires
|
|
29
|
+
|
|
30
|
+
Any session creating a marker file in the 5 gate-marker directories:
|
|
31
|
+
|
|
32
|
+
- `state/markers/temperance/`
|
|
33
|
+
- `state/markers/luminary/`
|
|
34
|
+
- `state/markers/arc-walk/`
|
|
35
|
+
- `state/markers/orientation-gate/`
|
|
36
|
+
- `state/markers/roadmap-reconcile-gate/`
|
|
37
|
+
|
|
38
|
+
Does NOT fire on:
|
|
39
|
+
|
|
40
|
+
- `state/markers/session-timing/` — transient timing data, machine-written
|
|
41
|
+
- `state/markers/diagnose/` — fix-branch evidence (uses different format)
|
|
42
|
+
- `state/markers/adr/` — ADR decision markers (different rule)
|
|
43
|
+
- `state/markers/turn-prose-surface/` — kiss-surface flags (different rule)
|
|
44
|
+
- Markers in the allowlist `state/markers/marker-enrichment-allowlist.txt` (grandfathered baseline; cleared over time)
|
|
45
|
+
|
|
46
|
+
## What the rule requires
|
|
47
|
+
|
|
48
|
+
When the step that creates a marker commits:
|
|
49
|
+
|
|
50
|
+
1. Marker file exists at the expected path
|
|
51
|
+
2. Marker file is non-empty (>0 bytes)
|
|
52
|
+
3. Marker body contains the format conventions above (date + branch + decision-content; advisory check in V1, mechanical in V2)
|
|
53
|
+
|
|
54
|
+
INSTEAD of `touch state/markers/temperance/<branch>.marker`: use heredoc to write the body inline:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
cat > state/markers/temperance/<branch>.marker << 'EOF'
|
|
58
|
+
# Temperance marker — <bet> <WU>
|
|
59
|
+
- date: <ISO date>
|
|
60
|
+
- branch: <branch>
|
|
61
|
+
- scope-decision: <right-thing + right-way + drift-trigger>
|
|
62
|
+
EOF
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Mechanical layer (V1 advisory)
|
|
66
|
+
|
|
67
|
+
`pre-build-gate.sh` extended with `check_marker_non_empty()` function. Fires on existence check; if marker exists but is 0 bytes AND not in the allowlist, emits ADVISORY warning to stderr. Does NOT block in V1.
|
|
68
|
+
|
|
69
|
+
V2 (deferred to follow-on goal): flip to BLOCK once the allowlist baseline is fully cleared (operator backfills over time).
|
|
70
|
+
|
|
71
|
+
## Allowlist
|
|
72
|
+
|
|
73
|
+
`.claude/hooks/marker-enrichment-allowlist.txt` lists existing empty markers as of bet 28a WU-5 land date. Entries grandfathered indefinitely. Operator backfills body content over time; when the allowlist is empty, V2 BLOCK flip becomes eligible.
|
|
74
|
+
|
|
75
|
+
## Override
|
|
76
|
+
|
|
77
|
+
`SKIP_MARKER_ENRICHMENT=1 <command>` — for one-shot migration scripts that bootstrap markers from external state. Logged via trace-helper.
|
|
78
|
+
|
|
79
|
+
INSTEAD of overriding for routine work: write the body. The cost is seconds; the audit trail compounds across every future session reading the marker.
|
|
80
|
+
|
|
81
|
+
## Composes with
|
|
82
|
+
|
|
83
|
+
- `.claude/rules/sdlc-gates.md` — temperance + diagnose gate firing semantics
|
|
84
|
+
- `.claude/rules/blocked-items.md` — BLOCK protocol (V2 will use this)
|
|
85
|
+
- `.claude/rules/testing-tier-config.md` — Tier 0 strict-TDD on the hook + tests
|
|
86
|
+
- `.claude/rules/mechanism-fidelity.md` — sister mechanical-enforcement discipline
|
|
87
|
+
- `.claude/hooks/pre-build-gate.sh` — the mechanical implementation
|
|
88
|
+
- `@luminary michael-feathers` — characterization tests as cure; existing empty markers are legacy; cure by enriching as touched
|
|
89
|
+
|
|
90
|
+
## Refs
|
|
91
|
+
|
|
92
|
+
- bet `docs/iteration-bets/2026-06-28a-mechanism-fidelity-cures-proposal.md` (WU-5)
|
|
93
|
+
- bet 27c WU-11 (substrate-defect candidate 5 identification)
|
|
94
|
+
- Closes bassclef-upstream#438
|
|
95
|
+
- Closes part of bassclef-upstream#440
|
|
96
|
+
|
|
97
|
+
## Retirement condition
|
|
98
|
+
|
|
99
|
+
This rule retires only if the gate-marker primitive itself retires. Body-content conventions may evolve; the discipline of marker-as-audit-trail persists.
|