@thebassclef/lite 1.9.8 → 1.9.9

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.
Files changed (32) hide show
  1. package/README.md +6 -2
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/lite/.claude/hooks/git-stash-u-guard.sh +4 -1
  6. package/dist/lite/.claude/hooks/post-skill-friction-check.sh +6 -1
  7. package/dist/lite/.claude/hooks/pre-commit-gate.sh +18 -6
  8. package/dist/lite/.claude/hooks/pre-commit-identifier-leak-scrub.sh +10 -6
  9. package/dist/lite/.claude/hooks/pre-commit-manifest-autoregen.sh +4 -2
  10. package/dist/lite/.claude/hooks/save-state.sh +24 -0
  11. package/dist/lite/.claude/hooks/trace-helper.sh +29 -0
  12. package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +30 -0
  13. package/dist/lite/.claude/skills/build/SKILL.md +19 -7
  14. package/dist/lite/.claude/skills/onboard-repo/SKILL.md +41 -0
  15. package/dist/lite/.claude/skills/release-notes/SKILL.md +24 -0
  16. package/dist/lite/bassclef-version.json +5 -5
  17. package/dist/lite/gitignore +8 -0
  18. package/dist/lite/lib/deferred-actions.sh +4 -4
  19. package/dist/lite/lib/fixture-builder.sh +9 -9
  20. package/dist/lite/lib/identifier-leak-check.sh +85 -0
  21. package/dist/lite/lib/preview-state.sh +20 -20
  22. package/dist/lite/lib/skip-env-inline-check.sh +61 -0
  23. package/dist/lite/lib/state.sh +31 -28
  24. package/dist/lite/lib/tier-check.sh +9 -9
  25. package/dist/lite/lib/tier-dependency-audit.sh +23 -23
  26. package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +1 -1
  27. package/dist/lite/standards/lite-manifest-schema-changes.md +38 -0
  28. package/dist/lite/standards/lite-manifest.json +38 -38
  29. package/dist/lite/templates/spec-template.md +10 -6
  30. package/package.json +1 -1
  31. package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +0 -492
  32. package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +0 -173
@@ -1,173 +0,0 @@
1
- ---
2
- tier: lite
3
- description: "When /longrun prep proposes scope shapes, each shape's compounding-sequence row comes from fresh analysis."
4
- ---
5
-
6
- # Compounding-Axis Fresh Analysis
7
-
8
- When `/longrun` prep proposes scope shapes, each shape's compounding-sequence row comes from fresh analysis. Hand-off documents do not satisfy Step 1.5 of the `/longrun` SKILL. That includes `docs/whereami.md`'s `next_longrun_queue` recommended order, an audit doc's `next_pending`, and a prior chronicle's pickup suggestion. Each shape gets its own row from the agent's own analysis at prep time.
9
-
10
- This rule is the methodology layer. The mechanical layer is `.claude/hooks/longrun-prep-compounding-sequence-check.sh`. That Stop hook is wired in `.claude/settings.json`. Tests at `.claude/hooks/tests/longrun-prep-compounding-sequence-check.test.sh`.
11
-
12
- The hook scans the latest assistant message when `state/markers/turn-prose-surface/longrun_prep_proposal.marker` is touched. It BLOCKs the stop (exit 2) when the compounding-sequence column headers are missing. Hook accepts EITHER shape per PR #1591 (bassclef#1555 PR-1): the new 6-axis frame (default, per plan doc `docs/next-session-plan-2026-09-09-compounding-axis-refactor.md`) OR the legacy 5-axis frame (grace window through 2026-10-31 per ADR-031). Backward compat opt-out: `COMPOUNDING_AXIS_TOGGLE=advisory` reverts to V1 (finding to stderr; exit 0).
13
-
14
- **V2 strict landed 2026-06-30.** The first `/longrun` prep after V1 ship surfaced only 3 of 5 columns at the operator-facing table. The hook caught the miss as designed. But it emitted ADVISORY to stderr. The agent could not see its own advisory in conversation. The operator could not see it on mobile. The operator asked "compounding sequence miss intact from the last substrate fix?" — that proved the visibility gap. The hook ships V2 strict as the next calibration step per ADR-035 (substrate-as-system — the mechanism must close the loop).
15
-
16
- ## When this rule fires
17
-
18
- Every `/longrun` prep that proposes scope shapes:
19
-
20
- - `/longrun prep` (operator types) — Step 1.5 compounding-sequence analysis per shape candidate
21
- - `/sprint` next-work proposals when scope-shape options are surfaced (sister surface; same shape contract)
22
- - Bet doc authoring — when the goal doc's `## Steps` section enumerates a per-shape table, the same axis applies
23
-
24
- The rule does NOT fire on:
25
-
26
- - Single-shape continuation prep where the operator has already confirmed scope (no shape PICK happening; per-shape compounding still applies per memory `feedback-compounding-sequence-mandatory-every-prep-surface`)
27
- - WU-sequencing inside a chosen shape (covered by sister rule `.claude/rules/wu-sequencing-compounds.md` for Step 1.7 INTRA-shape)
28
-
29
- ## What the rule requires
30
-
31
- Before the operator picks a scope shape:
32
-
33
- 1. **Touch the surface marker FIRST** — `mkdir -p state/markers/turn-prose-surface && touch state/markers/turn-prose-surface/longrun_prep_proposal.marker` BEFORE writing the proposal. The marker tells the Stop hook the next message is a prep proposal subject to the column-presence check.
34
- 2. **Per-option compounding row** — each option candidate carries 6 axes per `/longrun` SKILL Step 1.5 (new default per bassclef#1555). Per `#1193` cure, Step 1.5 prescribes the `### Compounding value — recommended only` section (old anchor `### Compounding value per option` still accepted through 2026-10-31 grace window per ADR-031). The 6 axes read as practical decision fields for Sam (Saturday evaluator) and Louis (context switcher) per plan doc `docs/next-session-plan-2026-09-09-compounding-axis-refactor.md` L36-45.
35
-
36
- The 6-axis default (new; per bassclef#1555 PR-2):
37
-
38
- | Axis | Source | Standard values |
39
- |---|---|---|
40
- | Deliverable | Plain sentence | What ships when this option lands |
41
- | Problem | `/state-a-problem brief` | ≤500 chars; framework implicit |
42
- | Value prop | `/value-prop tweet` | ≤280 chars; claim + sharpener |
43
- | Turns | Grounded range | Cite past goal actuals per `.claude/rules/turn-estimate-grounding.md` |
44
- | Risk | `🟢/🟡/🔴 <severity> — <failure mode>` | Bands (Klein blast radius): 🟢 fix-forward CI, no adopter impact, rework < 15 min · 🟡 rebuild cycle, local rollback, rework < 2h · 🔴 adopter-visible drift or compat shim, rework > 2h |
45
- | Shipping priority | P1 / P2 / P3 / P4 or blank | Blank prompts `Run /eisenhower to prioritize?`. Distinct from Eisenhower Q1-Q4 (importance × urgency); P-prefix matches bassclef `p1` GitHub label |
46
-
47
- The 5-axis legacy (grace window through 2026-10-31 per ADR-031; hook accepts both shapes):
48
-
49
- | Plain-English (preferred per ADR-040 D4) | Compressed (grace only) | Standard values |
50
- |---|---|---|
51
- | Where the payoff shows up | Compounding surface | per-PR / per-release / per-session / per-adopter / per-quarter |
52
- | How often it fires | Compounding rate | continuous / frequent / per-session / per-adopter / per-quarter |
53
- | What must be true first | Foundation prerequisites | none / specific goal / ticket / config flag |
54
- | Does this teach a shape later work reuses | Inverse-dependency | yes (names the later work) / no |
55
- | What breaks if we ship this half-done | Risk class | One line: severity glyph + failure mode + detection. Bands per 6-axis Risk row above. |
56
-
57
- R8 catch preservation: Deliverable + Problem + Value prop force fresh per-option analysis. `/state-a-problem` and `/value-prop` are themselves cognitive tools that resist copy-paste. The distinct-values check per option (bassclef#564) applies to whichever shape the prep uses.
58
- 3. **Fresh analysis** — the column values come from the agent's reading of the shape itself, not from a hand-off doc's recommended order. If the agent reads a hand-off doc and the order matches its own analysis, the row matches by coincidence, not by copy. If the order DOESN'T match, the rule surfaces the conflict to the operator.
59
- 4. **Recommended shape rationale** cites the compounding sequence + adopter-benefit mechanism (per sister rule for Step 1.6 bassclef-upstream#1302) explicitly.
60
- 5. **Remove the surface marker AFTER scope confirmation** — once the prep proposal has landed AND the operator has confirmed scope (or the proposal is being abandoned), remove `state/markers/turn-prose-surface/longrun_prep_proposal.marker`. The marker's purpose is satisfied. Leaving it present makes every post-prep Stop event block under V2 strict default. Most subsequent turns (status updates, commit summaries, WU work) do not carry a shape proposal table.
61
-
62
- ```bash
63
- rm -f state/markers/turn-prose-surface/longrun_prep_proposal.marker
64
- ```
65
-
66
- This step is mandatory at the prep→execution handoff. Hook auto-cleanup deferred to a follow-on (substrate-evolution ticket) — the rule names the discipline; the agent removes the marker today.
67
-
68
- ## Postcondition contract (per Hoare)
69
-
70
- Per bassclef-upstream#564 + luminary consultation (Ousterhout / Hoare / Feathers / Saltzer-Schroeder / Beck):
71
-
72
- **Precondition:** the /longrun prep proposes 2+ candidate shapes, each with a distinct scope.
73
-
74
- **Postcondition:** for every option O in the candidate set, for every axis A in the axis list of the shape the prep uses (6-axis default OR 5-axis legacy), the prep output contains a non-empty value V(O, A). The rendering satisfies the postcondition in one of two accepted shapes (per bassclef-upstream#1376):
75
-
76
- - **Per-option shape (pre-existing default).** V(O, A) renders under O's section as bullets or table rows. Each option gets a full section. Not only in a header row shared across options.
77
- - **Per-recommended-only shape (bassclef-upstream#1376 addition).** The prep opens with `**Recommend:** Option X`. V(recommended, A) renders under the recommended option's section as bullets. V(other, A) renders as scan-table row cells — one cell per axis per non-recommended option. Reader lands the recommended card fast; other options stay auditable from the scan-table row.
78
-
79
- The 6-axis default is: Deliverable, Problem, Value prop, Turns, Risk, Shipping priority. The 5-axis legacy (grace window through 2026-10-31) is: Where the payoff shows up, How often it fires, What must be true first, Does this teach a shape later work reuses, What breaks if we ship this half-done. Hook accepts either shape per PR #1591.
80
-
81
- The postcondition is stronger than the message-level check V2 ships. V2 verifies that the column names appear anywhere in the message. V3 (bassclef-upstream#564; ships with this rule amendment) verifies that each option section carries all axes of the chosen shape as distinct values. A single header row with axis names but no per-option values fails the postcondition. That is the R8 pattern this cure closes.
82
-
83
- Per `#1193` cure — the hook regex accepts both `Shape a-c` and `Option a-e` for the per-shape check during the grace window through 2026-10-31 per `.claude/rules/we-dont-break-adopters.md`. After that date only `Option [a-z]` matches. SKILL `#830` renamed the label; the rule postcondition applies equally to both vocabularies.
84
-
85
- **When shapes legitimately share an axis value** (e.g., all three shapes have `Risk class: low` because the work is small), the values still render per shape — same text under three sections. Rendering satisfies the postcondition. The check does not flag legitimate convergence.
86
-
87
- ### Per-preset axis sets (added bassclef-upstream#1598)
88
-
89
- The 6-axis default applies when prep runs in the FULL ceremony path — no plan doc, no preset picker fired, agent authoring option candidates from scratch.
90
-
91
- When the preset picker fires (mechanism ships under bassclef-upstream#1598 goal Step 2 — not present yet at PR 1 land), the axis set adjusts to fit the picked preset. The Stop hook reads a preset marker under `state/markers/longrun-preset/` to know which axis set to apply. This rule extension is methodology-only until the picker hook lands in the sister PR of the same goal:
92
-
93
- | Preset | Axis set the hook checks for | Rationale |
94
- |---|---|---|
95
- | **converged** | Deliverable, Problem, Value prop, Turns, Risk in the top block. Per-row: Scope, Turns, Risk. | Plan doc carries the depth. Prep shows the pick at the top, table stays lean. |
96
- | **exploratory** | Per-row: Scope, One-line description, Turns, Risk. Recommend row marked. | Operator hasn't converged; light shape helps scanning. |
97
- | **reversible-small** | One line per option carrying scope + risk. Recommend line + action line. | Small scope needs no ceremony. |
98
- | **no marker present** | Fall back to 6-axis default (legacy behavior). Grace window preserves. | Existing prep discipline holds when picker did not run. |
99
-
100
- The postcondition applies per axis set. The hook fires ADVISORY when a preset marker exists but the checked axes are missing from the message. The hook fires BLOCK when the 6-axis default is expected but missing (unchanged existing behavior).
101
-
102
- ## Anti-patterns
103
-
104
- These shapes fail this rule.
105
-
106
- **Agent ships scope shapes WITHOUT compounding-sequence columns.** Tonight's failure (caught by operator). Cure: include the columns; touch the marker BEFORE the proposal.
107
-
108
- **Agent ships scope shapes with columns COPIED from whereami's `next_longrun_queue` or an audit's `next_pending`.** The columns are present but the fresh-analysis precondition is violated (R2 Hoare — mechanically unverifiable from output). Cure: re-analyze each shape independently; surface conflict if hand-off order disagrees with fresh order.
109
-
110
- **Agent touches the surface marker AFTER writing the proposal.** Tonight's failure mode. The hook fires at the next Stop event with the marker-touch message as the latest assistant message — not the proposal. Cure: touch marker BEFORE proposal.
111
-
112
- **Agent leaves the surface marker present after scope confirmation.** Under V2 strict default this blocks every subsequent Stop event because the hook scans every assistant message and most post-prep turns do not carry a shape proposal table. Cure: remove the marker at the prep→execution handoff per step 5 above.
113
-
114
- **Agent labels a "risk ledger" / "decomposition" / "audit" / "sources-read" without doing the underlying work (R8 underlying pattern).** The label is the assertion; the work that produces it is the data the assertion claims. Tonight's risk-ledger catch by operator. Cure: cite the file path of the produced artifact in agent output; not just the label.
115
-
116
- INSTEAD of any of these: do the work first; touch the marker; write the proposal with the compounding row populated from fresh analysis; cite produced artifacts by file path.
117
-
118
- ## Hand-off documents that do NOT satisfy
119
-
120
- These all carry useful context but do not substitute for fresh analysis:
121
-
122
- - `docs/whereami.md` `next_longrun_queue` — operator + prior session's pickup suggestion; not compounding-derived
123
- - audit doc `next_pending` field — sequenced by audit author; may not match current compounding priorities
124
- - prior chronicle's "next pickup" suggestion — operator-facing handoff narrative; not analysis
125
- - prior goal doc's `next_bet` field — sequencing intent; not analysis
126
- - memory entry `feedback_*` — prior discipline; relevant context but not a substitute for the per-shape row
127
-
128
- Agent reads all of these for context. Agent then writes fresh compounding analysis per shape. The two activities are distinct.
129
-
130
- ## Override
131
-
132
- `SKIP_COMPOUNDING_AXIS_CHECK=1 <command>` — bypass the hook for one call (already exists; logged via trace-helper). The rule's methodology layer has no override — fresh analysis is the precondition; without it, the proposal is incomplete.
133
-
134
- For trivial single-shape continuation prep where the operator has already confirmed scope: the rule applies but cost is small (one row in the goal doc); no override needed.
135
-
136
- ## Composes with
137
-
138
- - `.claude/rules/wu-sequencing-compounds.md` — sister at Step 1.7 INTRA-shape (per-step produces/consumes)
139
- - `.claude/rules/operator-facing-prose.md` Rule 3 — marker touch BEFORE the named surface (this rule's mechanism precondition)
140
- - `.claude/rules/blocked-items.md` — BLOCKED protocol the hook fires under V2 strict
141
- - `.claude/rules/substrate-as-system.md` — every rule has a mechanism + every mechanism has a rule; this rule pairs the existing `longrun-prep-compounding-sequence-check.sh` mechanism with its rule body
142
- - `.claude/hooks/longrun-prep-compounding-sequence-check.sh` — the mechanical layer
143
- - `.claude/hooks/tests/longrun-prep-compounding-sequence-check.test.sh` — Tier 0 tests pinning the hook
144
- - `.claude/skills/longrun/SKILL.md` Step 1.5 — the procedure surface the rule serves
145
- - `@luminary jerome-saltzer-and-michael-schroeder` — complete mediation principle
146
- - `@luminary tony-hoare` — pre/postcondition contracts (R2 fresh-analysis is precondition, mechanically unverifiable)
147
- - `@luminary michael-feathers` — characterization tests pin REAL prep prose (R3 follow-on)
148
- - `@luminary kent-beck` — Tier 0 strict TDD on the hook (R4 follow-on covers each umbrella ticket instance)
149
-
150
- ## Deferred to follow-on
151
-
152
- The bet 30b risk ledger named these add-to-scope dispositions for WU-E; they ship in a follow-on goal:
153
-
154
- - **R3 (Feathers)** — extend Tier 0 tests with 3 characterization tests against REAL `/longrun` prep messages (tonight's + 2 from prior goal prep chronicles)
155
- - **R4 (Beck)** — extend Tier 0 tests with cases for each instance under umbrella #540 (release recommendation skip, cleanup proposal skip, visual-compare skip, session-orientation skip)
156
- - **R6 (Linus)** — cold-adopter harness check for session-reflection.d/05-active-bet.sh fragment presence (sister to WU-B)
157
- - **R7 (Norman)** — extend `longrun-prep-compounding-sequence-check.sh` to ALSO scan for proof-of-read line from `/longrun` Step 0.4 (sister to WU-B cure 3)
158
-
159
- The rule body is complete without these; the hook coverage extension is a separate ship vehicle.
160
-
161
- ## Per-WU coverage (bassclef-upstream#597 extension)
162
-
163
- Per-WU compounding-sequence rendering carries the same 5 axes at the step layer, alongside the produces/consumes table.
164
-
165
- When a `/longrun` prep proposal contains 2+ WU rows in the produces/consumes table (per Step 1.7), the proposal MUST also carry per-step compounding-sequence rendering — either a `## Compounding value per step` section OR per-step 5-axis bullets under each step.
166
-
167
- Anti-pattern that fails: shape-level 5 axes rendered per Step 1.5, WU produces/consumes rendered per Step 1.7, per-step compounding-sequence skipped. This shape passed as convention for weeks. It got displaced when PR #567 tightened Step 1.5 to per-shape distinct values, which shifted agent attention to shape-level. INSTEAD of trusting convention: mechanize the per-step coverage so sibling discipline tightening does not crowd it out.
168
-
169
- Correct shape: same 5 axes rendered per step with distinct values — plain-English names preferred per ADR-040 D4 (Where the payoff shows up / How often it fires / What must be true first / Does this teach a shape later work reuses / What breaks if we ship this half-done). Compressed forms accepted during the grace window through 2026-10-31.
170
-
171
- Mechanical layer: `.claude/hooks/longrun-prep-compounding-sequence-check.sh` extended with per-step check (V1 strict — BLOCK on missing per-step axes when 2+ WU rows present). Toggle `COMPOUNDING_AXIS_TOGGLE=advisory` retains backward-compat.
172
-
173
- Sister to Step 1.5 per-shape check (bassclef-upstream#564). Same discipline shape at a different layer.