@thebassclef/lite 0.0.1 → 0.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.
Files changed (182) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +85 -4
  3. package/dist/cli.cjs +1610 -0
  4. package/dist/cli.js +1587 -0
  5. package/dist/index.cjs +4 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +4 -0
  8. package/package.json +51 -3
  9. package/substrate/.bassclef/lite-manifest.json +1794 -0
  10. package/substrate/.claude/agents/architect.md +70 -0
  11. package/substrate/.claude/agents/builder.md +114 -0
  12. package/substrate/.claude/agents/designer.md +156 -0
  13. package/substrate/.claude/agents/reviewer.md +88 -0
  14. package/substrate/.claude/hooks/artifact-ingestion-gate.sh +357 -0
  15. package/substrate/.claude/hooks/assert-verify-steering.sh +77 -0
  16. package/substrate/.claude/hooks/bassclef-source-config-validate.sh +215 -0
  17. package/substrate/.claude/hooks/bassclef-sync.sh +634 -0
  18. package/substrate/.claude/hooks/compound-noun-scrub.sh +292 -0
  19. package/substrate/.claude/hooks/kiss-expansion-inject.sh +69 -0
  20. package/substrate/.claude/hooks/plain-english-steering.sh +156 -0
  21. package/substrate/.claude/hooks/post-skill-friction-check.sh +177 -0
  22. package/substrate/.claude/hooks/post-skill-telemetry.sh +62 -0
  23. package/substrate/.claude/hooks/pre-build-gate.sh +511 -0
  24. package/substrate/.claude/hooks/pre-commit-gate.sh +452 -0
  25. package/substrate/.claude/hooks/session-end.sh +433 -0
  26. package/substrate/.claude/hooks/session-reflection.sh +303 -0
  27. package/substrate/.claude/hooks/skill-body-grade-gate.sh +219 -0
  28. package/substrate/.claude/hooks/skill-body-intent-drift.sh +107 -0
  29. package/substrate/.claude/hooks/skill-step-list-check.sh +171 -0
  30. package/substrate/.claude/hooks/state-validate.sh +271 -0
  31. package/substrate/.claude/hooks/substrate-clarity-gate.sh +1110 -0
  32. package/substrate/.claude/hooks/temperance-gate.sh +147 -0
  33. package/substrate/.claude/hooks/testing-tier-enforce.sh +233 -0
  34. package/substrate/.claude/hooks/turn-prose-grade-measure.sh +219 -0
  35. package/substrate/.claude/hooks/turn-prose-kiss-check.sh +434 -0
  36. package/substrate/.claude/hooks/vocabulary-migration-check.sh +171 -0
  37. package/substrate/.claude/hooks/whereami-utc-gate.sh +142 -0
  38. package/substrate/.claude/luminaries/alan-cooper.md +170 -0
  39. package/substrate/.claude/luminaries/alistair-cockburn.md +140 -0
  40. package/substrate/.claude/luminaries/amazon-pr-faq.md +34 -0
  41. package/substrate/.claude/luminaries/ash-maurya.md +121 -0
  42. package/substrate/.claude/luminaries/bill-buxton.md +210 -0
  43. package/substrate/.claude/luminaries/charles-sanders-peirce.md +150 -0
  44. package/substrate/.claude/luminaries/david-ogilvy.md +192 -0
  45. package/substrate/.claude/luminaries/don-norman.md +173 -0
  46. package/substrate/.claude/luminaries/edward-tufte.md +179 -0
  47. package/substrate/.claude/luminaries/eric-evans.md +160 -0
  48. package/substrate/.claude/luminaries/frederick-brooks.md +50 -0
  49. package/substrate/.claude/luminaries/gang-of-four.md +157 -0
  50. package/substrate/.claude/luminaries/jason-fried-dhh.md +46 -0
  51. package/substrate/.claude/luminaries/jesse-james-garrett.md +154 -0
  52. package/substrate/.claude/luminaries/john-ousterhout.md +94 -0
  53. package/substrate/.claude/luminaries/karl-popper.md +132 -0
  54. package/substrate/.claude/luminaries/kent-beck.md +168 -0
  55. package/substrate/.claude/luminaries/linus-torvalds.md +218 -0
  56. package/substrate/.claude/luminaries/martin-fowler.md +164 -0
  57. package/substrate/.claude/luminaries/michael-feathers.md +125 -0
  58. package/substrate/.claude/luminaries/michael-nygard.md +118 -0
  59. package/substrate/.claude/luminaries/robert-c-martin.md +164 -0
  60. package/substrate/.claude/luminaries/saltzer-schroeder.md +194 -0
  61. package/substrate/.claude/luminaries/sophia-prater.md +193 -0
  62. package/substrate/.claude/luminaries/stephen-toulmin.md +131 -0
  63. package/substrate/.claude/rules/artifact-ingestion.md +179 -0
  64. package/substrate/.claude/rules/assert-only-after-verify.md +137 -0
  65. package/substrate/.claude/rules/blocked-items.md +146 -0
  66. package/substrate/.claude/rules/branching.md +28 -0
  67. package/substrate/.claude/rules/commit-conventions.md +22 -0
  68. package/substrate/.claude/rules/context-engineering.md +202 -0
  69. package/substrate/.claude/rules/context-management.md +85 -0
  70. package/substrate/.claude/rules/destructive-operations.md +69 -0
  71. package/substrate/.claude/rules/diagnosis.md +38 -0
  72. package/substrate/.claude/rules/guardrails.md +73 -0
  73. package/substrate/.claude/rules/identifier-leak-prevention.md +104 -0
  74. package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +98 -0
  75. package/substrate/.claude/rules/oo-ad-entry-point.md +117 -0
  76. package/substrate/.claude/rules/operator-facing-prose.md +196 -0
  77. package/substrate/.claude/rules/plain-english-discipline.md +154 -0
  78. package/substrate/.claude/rules/pr-body-shape.md +317 -0
  79. package/substrate/.claude/rules/pr-strategy.md +167 -0
  80. package/substrate/.claude/rules/sdlc-gates.md +149 -0
  81. package/substrate/.claude/rules/session-artifacts.md +236 -0
  82. package/substrate/.claude/rules/state-schema-validation.md +162 -0
  83. package/substrate/.claude/rules/whereami-load-bearing.md +202 -0
  84. package/substrate/.claude/rules/writing-craft-discipline.md +92 -0
  85. package/substrate/.claude/skills/build/SKILL.md +640 -0
  86. package/substrate/.claude/skills/decompose/SKILL.md +280 -0
  87. package/substrate/.claude/skills/diagnose/SKILL.md +297 -0
  88. package/substrate/.claude/skills/howdoi/SKILL.md +105 -0
  89. package/substrate/.claude/skills/ia-model/SKILL.md +108 -0
  90. package/substrate/.claude/skills/interaction-design/SKILL.md +112 -0
  91. package/substrate/.claude/skills/interpret-input/SKILL.md +180 -0
  92. package/substrate/.claude/skills/kiss/SKILL.md +449 -0
  93. package/substrate/.claude/skills/launch/SKILL.md +924 -0
  94. package/substrate/.claude/skills/lean-canvas/SKILL.md +332 -0
  95. package/substrate/.claude/skills/longrun/SKILL.md +426 -0
  96. package/substrate/.claude/skills/luminary/SKILL.md +481 -0
  97. package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
  98. package/substrate/.claude/skills/onboard-repo/SKILL.md +2190 -0
  99. package/substrate/.claude/skills/pattern-review/SKILL.md +99 -0
  100. package/substrate/.claude/skills/personas/SKILL.md +207 -0
  101. package/substrate/.claude/skills/promote/SKILL.md +283 -0
  102. package/substrate/.claude/skills/requirement/SKILL.md +98 -0
  103. package/substrate/.claude/skills/retro/SKILL.md +117 -0
  104. package/substrate/.claude/skills/riff/SKILL.md +114 -0
  105. package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
  106. package/substrate/.claude/skills/session-end/SKILL.md +309 -0
  107. package/substrate/.claude/skills/session-log/SKILL.md +299 -0
  108. package/substrate/.claude/skills/skills/SKILL.md +228 -0
  109. package/substrate/.claude/skills/spec/SKILL.md +105 -0
  110. package/substrate/.claude/skills/sprint/SKILL.md +392 -0
  111. package/substrate/.claude/skills/stage/SKILL.md +384 -0
  112. package/substrate/.claude/skills/state-a-problem/SKILL.md +185 -0
  113. package/substrate/.claude/skills/temperance/SKILL.md +108 -0
  114. package/substrate/.claude/skills/use-case/SKILL.md +417 -0
  115. package/substrate/.claude/skills/user-stories/SKILL.md +268 -0
  116. package/substrate/.claude/skills/value-prop/SKILL.md +251 -0
  117. package/substrate/.claude/skills/verify/SKILL.md +160 -0
  118. package/substrate/.claude/skills/whereami/SKILL.md +307 -0
  119. package/substrate/AGENTS.md +79 -0
  120. package/substrate/CLAUDE-lite.md +85 -0
  121. package/substrate/CODE_OF_CONDUCT.md +28 -0
  122. package/substrate/CONTRIBUTING.md +177 -0
  123. package/substrate/README.md +173 -0
  124. package/substrate/SECURITY.md +19 -0
  125. package/substrate/architecture/decisions/ADR-029-release-pipeline.md +79 -0
  126. package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
  127. package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
  128. package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
  129. package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
  130. package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
  131. package/substrate/lib/clean-artifacts-sweep.sh +112 -0
  132. package/substrate/lib/code-comment-discipline.sh +144 -0
  133. package/substrate/lib/composer-preflight.sh +459 -0
  134. package/substrate/lib/hook-inject.sh +255 -0
  135. package/substrate/lib/luminary-pick.sh +96 -0
  136. package/substrate/lib/output-discipline.sh +143 -0
  137. package/substrate/lib/rewrite-check.sh +214 -0
  138. package/substrate/lib/state.sh +1372 -0
  139. package/substrate/lib/telemetry.sh +205 -0
  140. package/substrate/lib/tier-check.sh +138 -0
  141. package/substrate/lib/tier-dependency-audit.sh +933 -0
  142. package/substrate/presence/install/bassclef-hook-connect.sh +178 -0
  143. package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
  144. package/substrate/presence/install/bassclef-sync.template.sh +2076 -0
  145. package/substrate/presence/install/schedule-auto-save.cron.sh +88 -0
  146. package/substrate/presence/install/schedule-auto-save.taskscheduler.md +122 -0
  147. package/substrate/scripts/aggregate-telemetry.sh +217 -0
  148. package/substrate/scripts/analyze-tier-dependencies.sh +239 -0
  149. package/substrate/scripts/generate-lite-manifest.sh +489 -0
  150. package/substrate/scripts/generate-tier-manifest.sh +28 -0
  151. package/substrate/scripts/intent-drift-check.sh +456 -0
  152. package/substrate/scripts/lite-manifest-drift-check.sh +146 -0
  153. package/substrate/scripts/render-lite-manifest-doc.sh +150 -0
  154. package/substrate/standards/bassclef-configs-schema.md +232 -0
  155. package/substrate/standards/bassclef-evolution.md +143 -0
  156. package/substrate/standards/bassclef-internal-jargon.md +244 -0
  157. package/substrate/standards/bassclef-managed-sentinel.md +96 -0
  158. package/substrate/standards/bassclef-source-config.md +228 -0
  159. package/substrate/standards/deferred-actions-schema.md +204 -0
  160. package/substrate/standards/docs-sync-allowlist.md +76 -0
  161. package/substrate/standards/graceful-exit.md +227 -0
  162. package/substrate/standards/hook-idempotency.md +102 -0
  163. package/substrate/standards/lite-manifest-schema-changes.md +75 -0
  164. package/substrate/standards/luminary-problem-patterns.md +481 -0
  165. package/substrate/standards/ogilvy-writing-rules.md +225 -0
  166. package/substrate/standards/opener-discipline.md +96 -0
  167. package/substrate/standards/operator-facing-prose-discipline.md +201 -0
  168. package/substrate/standards/project-directory-layout.md +276 -0
  169. package/substrate/standards/release-tagging.md +137 -0
  170. package/substrate/standards/sdlc-compliance.md +286 -0
  171. package/substrate/standards/secrets-lifecycle.md +210 -0
  172. package/substrate/standards/security-scanner-adapter.md +145 -0
  173. package/substrate/standards/skill-output-discipline.md +90 -0
  174. package/substrate/standards/state-spine.md +511 -0
  175. package/substrate/standards/tech-stack-config.md +109 -0
  176. package/substrate/standards/tier-dependency-analysis.md +167 -0
  177. package/substrate/standards/tier-runtime-deps/lite.md +57 -0
  178. package/substrate/standards/tier-tag-schema.md +155 -0
  179. package/substrate/standards/whereami-schema.md +301 -0
  180. package/substrate/standards/writing-guide.md +213 -0
  181. package/substrate/templates/deferred-action-template.md +45 -0
  182. package/substrate/templates/whereami-template.md +101 -0
@@ -0,0 +1,426 @@
1
+ ---
2
+ name: longrun
3
+ description: "Run a long autonomous session that paces itself — prepares scope, checkpoints at phase boundaries, closes with session log and retrospective. Three modes: prep, checkpoint, closeout."
4
+ problem: "Sessions over 50 turns drift. Context compacts and the goal disappears."
5
+ value: "A long autonomous session that paces itself. Prep and checkpoint and closeout \u2014 clean state every wake."
6
+ inputs: [prep or checkpoint or closeout mode plus scope hints]
7
+ outputs: [Goal doc with time budget, Checkpoint status at phase boundaries, Session log at closeout]
8
+ tier: lite
9
+ modes: [prep, checkpoint, closeout]
10
+ composes_with: [value-prop, kiss, temperance, luminary, roadmap-reconcile, retro, promote, session-end, chronicle, pattern-review]
11
+ authoring_luminaries:
12
+ primary:
13
+ - john-ousterhout
14
+ - sophia-prater
15
+ supporting:
16
+ - alistair-cockburn
17
+ - don-norman
18
+ - edward-tufte
19
+ - jason-fried-dhh
20
+ - amazon-pr-faq
21
+ - kent-beck
22
+ - linus-torvalds
23
+ ---
24
+
25
+ # /longrun
26
+
27
+ ## What you get
28
+
29
+ A long autonomous session that stays on track. You type `/longrun prep` once at session start. I set up scope, land the goal doc, touch gate markers, and start work. I checkpoint at every phase boundary, after each compaction, and every 25 steps. At close I write the session log, update whereami, run the retrospective, and open the PR. You get one clean landing when I finish — not a session that drifts mid-way.
30
+
31
+ ## When to use it
32
+
33
+ Use `/longrun` when any of these hold:
34
+
35
+ - Two or more goals in flight this session
36
+ - Estimated more than 50 steps of work
37
+ - The session will cross at least one context compaction
38
+ - You state "longrun" explicitly
39
+
40
+ <!-- FKGL-EXEMPT: mirrors precedent shape from /shape /spec /build /launch /decompose per bassclef-upstream#1363 — literal header + prose required by scripts/tests/adr-consult-step.test.sh -->
41
+ ## ADR-consult — fire before scope confirmation (per bassclef-upstream#424)
42
+
43
+ Read every relevant ADR in `architecture/decisions/` before confirming scope. If your scope deviates from any ADR's decision or constraints, surface the deviation as the first agenda item — operator decides amend-ADR vs. revise-scope.
44
+
45
+ Per `.claude/rules/adr-discipline.md`. Mechanism: `adr-discipline-check.sh` fires on substantive architectural edits (wired in `.claude/settings.json` since goal 28a Step 1). The Tier 0 test for this step greps for the literal header `## ADR-consult — fire before scope confirmation` in each of `/build /launch /spec /decompose /shape /longrun`.
46
+ <!-- /FKGL-EXEMPT -->
47
+
48
+ ## Tier gate (bassclef#740 Task 1.4; amended bassclef#1383)
49
+
50
+ `/roadmap-reconcile` and `/retro` both flipped to `tier: lite` as deep modules per canvas 2026-07-19-bassclef-lite Q6 Option E. Both run identically at every tier. Prep Step 0.5 and Closeout Step 2 run as documented for every adopter — lite, standard, and ultra.
51
+
52
+ The tier-check pattern below stays available for future skills that need per-tier branching:
53
+
54
+ ```bash
55
+ source lib/tier-check.sh
56
+ tier=$(resolve_adopter_tier)
57
+ ```
58
+
59
+ Per canvas 2026-07-19-bassclef-lite Q6 Option E — one SKILL.md file, same name in both tiers. When a skill's body genuinely diverges per tier, the body carries runtime tier awareness with graceful degrade. Skills that share behavior across tiers stay simple and drop the branch.
60
+
61
+ For single-goal sessions under 50 steps with no compaction risk, use `/autonomous start` directly. `/longrun` adds prep and checkpoint discipline whose overhead exceeds value on shorter work.
62
+
63
+ ## Composes with — cluster shape
64
+
65
+ `/longrun` sits at the center of a larger cluster. Skills around it feed in, close out, or fire mid-session as helpers.
66
+
67
+ **Upstream — feed the session:**
68
+
69
+ - Discovery layer (Sam bootstrap, Louis kickoff): `/interview-me`, `/extract-intent`, `/interpret-input`, `/empathy-map`, `/jtbd-tasks`, `/lean-canvas`, `/value-prop-canvas`, `/personas`
70
+ - Strategy authoring (mid-session per persona): `/state-a-problem`, `/value-prop`, `/requirement`, `/use-case`, `/user-stories`, `/spec`, `/ticket`
71
+
72
+ **Downstream — close the session:**
73
+
74
+ - `/session-log` — write the session's log entry
75
+ - `/session-end` — tiered obligations (must + should + may)
76
+
77
+ **Helpers — fire mid-session across every stage:**
78
+
79
+ - 5 gates — `/temperance`, `/verify`, `/diagnose`, `/kiss`, `/luminary`
80
+
81
+ The verb is porcelain (Git's word for a small user-typed command). All discipline runs by composition inside — you type `/longrun` and the cluster runs itself.
82
+
83
+ Strategy skills serve Sam AND Louis directly. Sam types `/state-a-problem` when a ticket needs a problem opener. Louis types `/lean-canvas` when designing a business shape. They stand alone at lite. `/longrun` composes them per stage of a spec-authoring session.
84
+
85
+ ## FAQ
86
+
87
+ ### What are the three modes?
88
+
89
+ - **prep** — you type this once at session start. I set up scope, mount the goal doc, touch markers, and confirm ready state.
90
+ - **checkpoint** — I fire this on my own at phase boundaries, after compaction events, every ~25 steps, or when a step exceeds 1.5× its time budget. Updates the session board; audits for `/promote` candidates; reports status.
91
+ - **closeout** — I fire this when the Stop hook fires or you invoke `/session-end`. Runs `/retro`, files missed `/promote` items, extracts insights, updates whereami, then runs `/session-end`.
92
+
93
+ ### What is the default configuration?
94
+
95
+ Orchestrator-gated and sequential. You only step in at real decision points — phase boundaries, PR merges, scope beyond time budget (the steps you'll spend at your current pace before cutting scope), hard ceilings, production deploy approvals. Everything else runs on its own.
96
+
97
+ I read `longrun.orchestrator_merge.mode` from `.claude/bassclef-configs.jsonc`:
98
+
99
+ - `operator-gated` (default) — every PR pauses for your review.
100
+ - `agent-merges-within-scope` — I merge PRs on my own when the change stays inside the goal's scope and does not hit a hard ceiling.
101
+
102
+ Hard ceilings are not overridable: `auth`, `schema`, `security`, `prod-deploy`, `blast-radius-floor`.
103
+
104
+ ### What are the checkpoint triggers?
105
+
106
+ - **Phase boundary** — the last step in a phase lands. I re-fire session `/temperance`. I update the session board.
107
+ - **Post-compaction** — a compaction event fires. I re-read the survival kit and re-anchor on the goal.
108
+ - **Turn-counter** — every ~25 steps. Verify no scope drift; surface budget status.
109
+ - **Context saturation** — I self-check for context pressure (large file reads, broad codebase exploration, test output accumulation). Fires proactively before the system compacts.
110
+ - **Scope drift** — a step exceeds its time budget × 1.5. Pause and re-anchor.
111
+ - **/promote audit** — I detected a bug in the rules or a pattern to file. Do it now; do not defer to closeout.
112
+
113
+ ### How does /longrun compose with other skills?
114
+
115
+ | Skill | Where it fires |
116
+ |---|---|
117
+ | `/temperance` | Prep (scope anchor), checkpoint (re-anchor) |
118
+ | `/luminary` | Prep (pick lenses), applied at authoring |
119
+ | `/retro` | Closeout (retrospective) |
120
+ | `/promote` | Checkpoint (proactive), closeout (audit backstop) |
121
+ | `/session-end` | Closeout (extends; does not replace) |
122
+ | `/whereami` | Closeout (update at session end) |
123
+ | `/sprint` | Post-compaction checkpoint (re-orient) |
124
+ | `/session-log` (formerly `/chronicle`) | Closeout (write narrative record) |
125
+ | `/autonomous start` | Prep delegates after pre-flight clears |
126
+
127
+ ### How is /longrun distinct from /retro, /autonomous start, and /session-end?
128
+
129
+ - `/retro` covers a single goal at end only. No `/promote` audit; no insight extraction. `/longrun closeout` builds on `/retro` and adds those two.
130
+ - `/autonomous start` boots agents but does not manage the reflection cycle. `/longrun prep` delegates to `/autonomous start` AFTER installing the reflection scaffolding.
131
+ - `/session-end` covers tiered obligations (MUST/SHOULD/MAY). `/longrun closeout` runs `/retro`, files `/promote` items, extracts insights, then runs `/session-end`.
132
+
133
+ ### How does the operator dispatch each mode?
134
+
135
+ You type `/longrun prep` once. Checkpoint and closeout fire on their own. Overrides:
136
+
137
+ - `/longrun checkpoint --now` — you noticed a pattern and want to anchor before the next auto-firing.
138
+ - `/longrun closeout --now` — you want to end deliberately before Stop fires.
139
+
140
+ Unknown args are rejected with a helpful message. `/longrun` does NOT silently proceed with defaults.
141
+
142
+ ## Details below the fold
143
+
144
+ ### Prep procedure — you type once at session start
145
+
146
+ **Step 0** — Open with a `/value-prop tweet` claim and a `/kiss words` grade-10 summary before any tables land. The operator scans on mobile; the tables come after.
147
+
148
+ **Step 0.4** — Read `docs/whereami.md` before scope confirmation. Post the line that shows the read landed: `**Whereami read:** docs/whereami.md at <ISO timestamp>`. Whereami is the source of truth for in-flight work.
149
+
150
+ **Step 0.5** — Dispatch `/roadmap-reconcile --dry-run`. Silent when no drift. Surface the diff inline when drift is detected; wait for operator acknowledgement, canvas amend, or explicit deferral.
151
+
152
+ **Step 0.6** — Read related goals across repos. Read the active goal's `parent_drivers`, `acceptance`, and `out_of_scope`. Read each parent goal up the chain until there is no parent. Read `parent_roadmap` if any goal in the chain has one. Touch `state/markers/orientation-gate/<branch-slug>.marker`.
153
+
154
+ **Step 0.65** — Complete lookback. List every open item before you pick scope. `parent_drivers` names what the parent knew. This step names what is open now. Closes bassclef-upstream#776.
155
+
156
+ Cover each class:
157
+
158
+ - Every ticket named in whereami recap sections. The `operator_recap` and `prior_operator_recap` blocks list them by number.
159
+ - Every entry from a grade audit that reads above the ceiling.
160
+ - Every deferred, paused, or stuck item from a prior recap.
161
+ - Every canvas at `docs/canvases/` and curation doc at `docs/curation/`.
162
+ - Every consultation output at `docs/operator-private/consultations/` tied to open threads.
163
+ - Chained skills that lite skills dispatch. Read tier tags of skills the active goal calls. Lite work needs to know which chained skills need inlining or tagging.
164
+
165
+ Silence on any class is not deferral. Enumerate the items or state which classes are out of scope this session and why.
166
+
167
+ **Step 0.66** — Read active canvases. List `docs/canvases/*.md`. For each canvas whose frontmatter carries `verification_status: draft` or `accepted`, Read the full body before proposing options. Cite the canvas file path plus the Q number that informs each option. Whereami recap is a summary. Read the canvas file for the source. Closes bassclef-upstream#813.
168
+
169
+ **Step 0.7** — Release pipeline status check (bassclef-upstream only). Surface open release PRs older than 24 hours, CI failures, or commits ahead of public before scope confirmation. Stuck PRs get first priority.
170
+
171
+ **Step 0.8** — Run the pre-flight helper for code work. Source the helper. Call it with the /longrun name and turn estimate. Skip when the session plans no code. Fire when the session plans to touch app code, hooks, libs, or scripts. The helper runs Check 7. Check 7 looks for a use case, spec, or decomposition on disk. The floor per code class lives at `.claude/rules/oo-ad-entry-point.md`.
172
+
173
+ ```bash
174
+ source "${BASSCLEF_DIR:-$REPO_ROOT}/lib/composer-preflight.sh"
175
+ composer_preflight_check "longrun" "${ESTIMATED_TURNS:-100}" | composer_preflight_render "longrun"
176
+ ```
177
+
178
+ The helper stays advisory through 2026-10-31 per ADR-031. Old hooks and libs land without a retrofit brief use case. New hooks and libs merit one per Cockburn tiering.
179
+
180
+ **Step 0.85** — Plan-doc detection (per bassclef-upstream#1307 R1). Check for `docs/next-session-plan-*.md` files newer than 48 hours. If a matching plan doc exists AND its body carries a `## Recommended session sequence` (or `## Recommended sequence` OR `## Next-session pickup`) section, enter compressed prep mode. In compressed mode:
181
+
182
+ 1. Read the plan doc's Recommended section
183
+ 2. Cite the plan doc path inline as source
184
+ 3. Present the pre-authored sequence as-is (scan-table + step cards for the recommended item only)
185
+ 4. Skip Step 1.4c full ceremony (section-anchor rule still holds; the option-table + 5-axis-per-option blocks compress to one recommended-option card)
186
+ 5. Ask operator "proceed with plan doc pick, pick a smaller item, or reshape?"
187
+
188
+ If no plan doc matches: run the full Steps 1.4c-1.7b ceremony as documented.
189
+
190
+ Detection command:
191
+
192
+ ```bash
193
+ find docs -maxdepth 1 -name 'next-session-plan-*.md' -mtime -2 -type f 2>/dev/null | head -1
194
+ ```
195
+
196
+ Rule extension: `.claude/rules/longrun-prep-plan-doc-compression.md`. Anchor luminary: @luminary john-ousterhout (deep module — compression path hides plan-doc detection behind a narrow interface).
197
+
198
+ Rationale: operator files a plan doc AFTER a prior session to pre-pick next scope. Re-authoring the full option table at the next prep wastes ~15-25 turns. #1307 filed 2026-08-19 as workflow-overhead R1 with evidence — one session ran ~25-40 turns of ceremony vs ~5 turns needed.
199
+
200
+ **Step 0.87 — Amendment A1: OOAD chain read at pre-flight (per #1150 + #1167 + #1414).** When the goal doc references touch adopter app paths (`src/`, `apps/`, `packages/`, `app/`) OR substrate paths (`lib/`, `scripts/`, `.claude/hooks/`, `.claude/skills/`, `.claude/rules/`, `.claude/luminaries/`, `standards/state-spine/schemas/`, `presence/install/`) OR scope prose names UI or code work, read the design chain per `.claude/bassclef-orientation.md` L100-108. Ceremony depth scales per `.claude/rules/oo-ad-entry-point.md` matrix — script bug fix = skip tier; script extension = brief use case; hook + lib = fully-dressed:
201
+
202
+ ```
203
+ Canvas → Spec → Personas → JTBD → Task-scenarios / Use-case → IA-model → Interaction-design → Decompose
204
+ ```
205
+
206
+ For each of the 9 chain steps, check whether a matching artifact exists on disk:
207
+
208
+ - Canvas — `docs/canvases/*.md`
209
+ - Spec — `docs/specs/*.md`
210
+ - Personas — `docs/personas/*.md`
211
+ - JTBD — `docs/jtbd/*.md`
212
+ - Task-scenarios — `docs/task-scenarios/*.md`
213
+ - Use-case — `docs/use-cases/*.md`
214
+ - IA-model — `docs/ia-models/*.md`
215
+ - Interaction-design — `docs/interaction-designs/*.md`
216
+ - Decomposition — `docs/decompositions/*.md`
217
+
218
+ Emit one-line note per gap. Do not BLOCK. Operator picks fold-or-skip per gap. Skip this step when the scope is prose only. This keeps the adopter contract per ADR-031. Old prose sessions see no new dispatches.
219
+
220
+ The step trigger reads two sources. First the goal doc frontmatter `references` array. Second the scope prose from the goal's Problem and Goal sections. Scope signal present means chain read fires. Absent means chain read skips. Vernon anti-corruption layer per pattern annotation. Bug-fix scope does not fire the chain. Prose-only scope does not fire the chain.
221
+
222
+ **Step 1** — Pre-flight check:
223
+
224
+ - Parent roadmap state read via `state_roadmap_get`
225
+ - Recursive parent-goal walk complete
226
+ - BLOCKED items resolved or explicit deferral stated
227
+ - Stack manifests written upfront (one per goal)
228
+ - Session board written if two or more goals or phases are active
229
+ - Survival kit declared (paths to re-read after compaction)
230
+ - Time budget grounded per `.claude/rules/turn-estimate-grounding.md` — cite past goal actuals, range not point, name the shape driver
231
+ - Orchestrator merge mode surfaced
232
+
233
+ **Step 1.4b** — Name the option-set shape (per bassclef-upstream#832). Two choices:
234
+
235
+ - **MECE** — each option covers a different scope. No overlap.
236
+ - **Nested** — option a is smallest. Option b builds on a. Option c builds on b.
237
+
238
+ Pick one shape. Do not mix them.
239
+
240
+ **Step 1.4c** — Section-anchor rule (per bassclef-upstream#853; Norman + Garrett). Every table in prep output ships under a distinct `###` header. One anchor per concern:
241
+
242
+ - `### Options` — the option-set table
243
+ - `### Compounding value per option` — the 5-axis block (Step 1.5)
244
+ - `### Adopter benefit per option` — the 3-axis block (Step 1.6)
245
+ - `### Step sequencing` — the step table (Step 1.7)
246
+ - `### Per-step compounding` — the 5-axis-per-step block (Step 1.7a)
247
+
248
+ Between top-level `###` anchors, use at least 2 blank lines OR a horizontal rule (`---`). Never stack two tables under one anchor. See the Norman + Garrett debate subsection below for the underlying design principles.
249
+
250
+ **Step 1.4d** — Delta-rendering rule (per bassclef-upstream#853; Norman feedback loop). When the operator asks for a refinement (add column, change filter, reshape one option), render ONLY the delta. Cite the source anchor by name.
251
+
252
+ Anti-pattern — silent rebuild:
253
+
254
+ > Operator: "add a change-class column"
255
+ > Agent re-renders all 4-5 tables verbatim plus one new column
256
+
257
+ Correct pattern — named delta:
258
+
259
+ > Operator: "add a change-class column"
260
+ > Agent: "Adding column to § Options above:"
261
+ > [renders only the new column with the option labels]
262
+
263
+ Full re-render is only correct when the operator asks for it explicitly ("show me the full picture again") OR the underlying option set changed.
264
+
265
+ **Step 1.4e** — Card + scan-table shape (per goal 24e; Tufte + Prater). Multi-option output has three parts. First, a compact scan-table on top. Second, one card per option. Third, step cards for the recommended option only. See `standards/scannable-multi-option-output.md` § Card template + § Glyph legend + § Progressive disclosure.
266
+
267
+ **Step 1.5** — Recommendation lands FIRST at the top of Step 1.5 (per bassclef-web#152 R1). One sentence naming the recommended option, its scope, turn range, and risk. Reader sees the pick before scrolling. Format:
268
+
269
+ > **Recommend:** Option a (scope X · N-M turns · risk 🟢/🟡/🔴) because Y.
270
+
271
+ Then under `### Compare options`, render a compact scan-table. Then under `### Compounding value per option`, render the 5-axis block for every option (hook postcondition per compounding-sequence-fresh-analysis.md requires per-option coverage today; hook extension to recommended-only lives at a follow-on ticket per bassclef-web#152).
272
+
273
+ <!-- FKGL-EXEMPT: column enumeration + glyph-legend cross-ref -->
274
+ Scan-table columns: `Option`, `Scope`, `Turns`, `Compounds`, `Risk`, `Why not (non-rec.)`. Glyphs encode risk (🟢/🟡/🔴). Words carry compounding rate. The `Why not` column carries one line per non-recommended option — what the operator gives up. The recommended option's cell reads `—` (recommended). Fresh analysis per option; do not copy from other docs.
275
+ <!-- /FKGL-EXEMPT -->
276
+
277
+ Then the 5-axis block under `### Compounding value per option`. Each option carries all 5 axes as bullets with distinct values. Per `.claude/rules/compounding-sequence-fresh-analysis.md` postcondition — the section satisfies both the rule postcondition and the `longrun-prep-compounding-sequence-check.sh` hook. The scan-table's `Compounds` column is a one-line summary; the per-option block carries the distinct values.
278
+
279
+ <!-- FKGL-EXEMPT: axis enumeration + grace-window note -->
280
+ The 5 axes (plain-English preferred per ADR-040 D4; compressed compound-noun forms accepted through 2026-10-31 grace window per `.claude/rules/we-dont-break-adopters.md`):
281
+
282
+ - **Where the payoff shows up** (was: Compounding surface) — per-PR / per-release / per-session / per-adopter / per-quarter
283
+ - **How often it fires** (was: Compounding rate) — continuous / frequent / per-session / per-adopter / per-quarter
284
+ - **What must be true first** (was: Foundation prereq) — none, or specific ticket / config flag / prior goal
285
+ - **Does this teach a shape later work reuses** (was: Inverse-dependency) — yes (name the later work) / no
286
+ - **What breaks if we ship this half-done** (was: Risk class) — low / medium / high
287
+
288
+ Both label forms match the hook regex through the grace window. After 2026-10-31 only plain-English forms match.
289
+ <!-- /FKGL-EXEMPT -->
290
+
291
+ **Step 1.6** — Under `### <label> · <scope> · <turns> · <risk>`, render a full card for recommended-only. Non-recommended options do NOT get a card by default (per #959 + bassclef-web#152 R2; Prater + Tufte + Cooper). They ship their rationale in the Step 1.5 `Why not` column plus the § Compounding value per option block above. Default prep volume drops by roughly half. Operators pick from the scan table. They read the card only for the option they lean toward. Progressive disclosure per Prater. Operator asks "show cards for B and C too" to expand.
292
+
293
+ <!-- FKGL-EXEMPT: card field enumeration + progressive disclosure rule -->
294
+ The recommended card carries `**Problem**`, `**Value**`, `**Compounds**` (one-line summary — 5 axes live in the § Compounding value per option section per Step 1.5), `**Adopter**` (mechanism + visibility + action). Full field spec at `standards/scannable-multi-option-output.md` § Card template.
295
+
296
+ On operator ask ("show cards for B and C too") — render full cards for every option using the same template. Progressive disclosure per Prater.
297
+ <!-- /FKGL-EXEMPT -->
298
+
299
+ **Step 1.7** — Under `### Steps for <recommended option>`, render step cards only for the option this run recommends.
300
+
301
+ <!-- FKGL-EXEMPT: step-card field enumeration + progressive disclosure rule -->
302
+ Each step card carries `**Problem**`, `**Produces**`, `**Consumes**`, `**Teaches**`, risk glyph. Not for all options. Progressive disclosure per Prater. On operator ask ("show steps for B and C too"), expand for all.
303
+ <!-- /FKGL-EXEMPT -->
304
+
305
+ **Step 1.7b** — Recommendation at end. One sentence citing compounding + risk. Reader scans anchors first. Recommendation lands after.
306
+
307
+ **Step 2** — Session `/temperance` fires with the stated scope question: "Am I about to ship X (inside the time budget) — or am I drifting into adjacent scope Y or Z?" Right thing, right way, scope drift trigger declared.
308
+
309
+ **Step 2a — /pre-mortem light BEFORE any code work (per `.claude/rules/loop-discipline.md` Step 0.5).** When the session will ship code or substrate, dispatch `/pre-mortem light` — 3 luminary lenses × 5-8 risks per lens, 30 min per Klein workshop shape. Write the risk ledger to `docs/risk-ledgers/<date>-<slug>.md`. Touch the marker at `state/markers/pre-mortem/<branch-slug>.marker` citing the ledger path. Strongest concerns fold into the plan before edits begin. Skip Step 2a when scope is prose-only or research-only. The pre-commit-gate hook enforces the marker at first Edit on substrate paths per goal 24a / #836.
310
+
311
+ **Step 2b — Amendment A2: /luminary consult on design decision (per #1150 + #1167).** When scope signals a design decision, dispatch /luminary consult. Design decision means new SKILL, new rule, new hook, new lib, structural refactor, or UX surface change. Read the goal doc `authoring_luminaries.primary` frontmatter field. Pass the primary lens to /luminary. Skip Step 2b when scope is a bug-fix or a one-line change per `.claude/rules/oo-ad-entry-point.md` matrix skip tier.
312
+
313
+ **Step 3** — Register checkpoint triggers (phase boundary, compaction detection, turn counter, saturation milestone, scope drift, `/promote` audit).
314
+
315
+ **Step 4** — Register closeout trigger. The Stop hook composes `/longrun closeout` before existing `/session-end` runs.
316
+
317
+ ### Checkpoint procedure — I fire on my own
318
+
319
+ 1. State the trigger.
320
+ 2. Lead with a `/value-prop tweet` claim and a `/kiss words` grade-10 opener.
321
+ 3. Re-read the parent roadmap state via accessor. Detect if another worker released a step.
322
+ 4. Re-anchor `/temperance` with the current scope question.
323
+ 5. Update the session board.
324
+ 6. Audit for `/promote` candidates. File proactively rather than deferring.
325
+ 6.5. **Amendment A3: /pattern-review per step (per #1150 + #1167).** When the current step's goal references a decomposition doc AND that doc names `@pattern` references, dispatch `/pattern-review` with the decomposition path. Skip when the decomposition names no `@pattern`. Contract per `.claude/rules/pattern-annotation.md` L57-62.
326
+ 7. Report status: steps used, time budget remaining, goals in flight, next step, any pivots since last checkpoint.
327
+ 8. Continue vs pause: continue on budget; pause if a step exceeds 1.5× time budget; pause if a hard ceiling is hit.
328
+
329
+ ### Closeout procedure — I fire on my own
330
+
331
+ 1. Lead with a `/value-prop tweet` claim and a `/kiss words` grade-10 opener.
332
+ 2. Run `/retro`.
333
+ 3. Audit for `/promote` candidates. Backstop for anything missed at checkpoints.
334
+ 4. Extract discoveries from the session log. Propose `design/discoveries/` files.
335
+ 4.5. **Amendment A4: OOAD chain-dispatch counter (per #1150 + #1167).** Read the session-wide count of chain-dispatch events fired during this session (A1 chain reads + A2 luminary consults + A3 /pattern-review dispatches). Surface at closeout as: "OOAD chain fired N times across M steps." Audit trail for operator confirming the chain honored the promise.
336
+ 5. Release pipeline status check (bassclef-upstream only). Flag stuck PRs or commits ahead.
337
+ 5.5. Clean up turn-prose-surface markers. Remove any prep + checkpoint markers left in `state/markers/turn-prose-surface/` — `longrun_prep_proposal.marker`, `longrun_checkpoint.marker`, `longrun_closeout.marker`, `status_update.marker`. Per `.claude/rules/compounding-sequence-fresh-analysis.md` § "Remove the surface marker AFTER scope confirmation". The marker's purpose is satisfied once the surface it gates has landed. Leaving it present makes every post-prep Stop event block under V2 strict default. Bootstrap-pair discipline per `.claude/rules/bootstrap-pair-discipline.md` — every touch owes a paired remove.
338
+
339
+ ```bash
340
+ rm -f state/markers/turn-prose-surface/longrun_prep_proposal.marker \
341
+ state/markers/turn-prose-surface/longrun_checkpoint.marker \
342
+ state/markers/turn-prose-surface/longrun_closeout.marker \
343
+ state/markers/turn-prose-surface/status_update.marker
344
+ ```
345
+
346
+ Idempotent — the `-f` flag makes missing markers a no-op. Closes sunj-labs/bassclef-upstream#866.
347
+ 6. Update the session board frontmatter (`session_ended`, `session_outcome`).
348
+ 7. Update `docs/whereami.md` via `state_whereami_set` accessor, or fallback to direct edit.
349
+
350
+ <!-- FKGL-EXEMPT: Step 7.5 references paths + skip criteria per architect-review SKILL; technical dispatch step resists further simplification without losing precision -->
351
+ 7.5. **/architect-review auto-dispatch (per #1437 Step 2 wiring).** Check skip criteria per `.claude/skills/architect-review/SKILL.md` § Skip criteria. If any skip criterion holds (docs-only session, single-file quick-fix, under 10 commits since last review, operator explicit-defer), log a one-line skip note in the session log Step 8 and continue. Otherwise dispatch `/architect-review`. The review writes its own report at `docs/architecture/reviews/YYYY-MM-DD.md` + creates finding tickets. Return summary line into the session log's Work Done section. See `.claude/skills/architect-review/SKILL.md` § Distinct from Reviewer agent for boundary vs the per-PR CodeReviewer agent.
352
+ <!-- /FKGL-EXEMPT -->
353
+
354
+ 8. Run `/session-end` for tiered obligations (session log, journal, etc.).
355
+ 9. Wiki refresh check: did this run produce material surface changes that need a wiki refresh? Discriminator list per `.claude/rules/session-artifacts.md`.
356
+ 10. Retroactive sweep against the newest discipline shipped this run.
357
+
358
+ ### Self-check step — before posting any operator facing prose
359
+
360
+ Before I post any prep, checkpoint, closeout, or status response, I:
361
+
362
+ 1. Touch the surface marker at `state/markers/turn-prose-surface/<surface>.marker`.
363
+ <!-- FKGL-EXEMPT: technical enumeration — prose part list + 6-check list are reference content -->
364
+ 2. Dispatch `/kiss words --rewrite` on the full rendered draft — opener + tables + cards + step details + recommendation + closing prose. Not just the opener. Not an inline BLOCK-term scan. Actual skill dispatch. The two-flag form runs vocabulary substitution AND six heuristic checks (passive voice, hyphen words, long sentences, non-SVO openers, noun stacks, adverb density). The skill reads `standards/bassclef-internal-jargon.md` as single source of truth per bassclef#907.
365
+ <!-- /FKGL-EXEMPT -->
366
+ 3. Apply the rewrite. When /kiss returns no changes, accept the pass.
367
+ 4. Cite the dispatched skill inline per `.claude/rules/operator-facing-prose.md` Rule 3.
368
+ 5. Post the response.
369
+
370
+ The Stop hook `.claude/hooks/turn-prose-kiss-check.sh` is the post-write safety net. This self-check catches misses before you read. The full-draft dispatch closes bassclef-upstream#858 — the opener carried /kiss but tables + cards + steps + recommendations did not.
371
+
372
+ ### Design principles for Steps 1.4c + 1.4d
373
+
374
+ Steps 1.4c and 1.4d encode 6 principles. Norman + Garrett drove them. Sam + Louis are the readers.
375
+
376
+ See `standards/scannable-multi-option-output.md` for the full debate + principle set. Closes bassclef-upstream#853.
377
+
378
+ ### Args reference
379
+
380
+ | Position | Accepted |
381
+ |---|---|
382
+ | mode | `prep`, `checkpoint`, `closeout` |
383
+ | `--now` | modifier on checkpoint or closeout; rejected on prep |
384
+ | `--operator-gated` | modifier on prep; rejected on checkpoint or closeout |
385
+ | `--parallel` | reserved; not implemented today |
386
+
387
+ ### Rules
388
+
389
+ - Never start `/longrun prep` without operator confirmation.
390
+ - Pre-flight items must be resolved or explicitly deferred. Silence is not deferral.
391
+ - Hard ceilings are operator-gated regardless of `/longrun` config.
392
+ - Every checkpoint must update the session board (no silent skips).
393
+ - Closeout must run `/retro` and `/promote` audit and insight extraction. The three are not optional.
394
+ - `/longrun` is not a substitute for `/autonomous`; it composes it.
395
+ - Scope choices presented to the operator carry a value-prop per option per `.claude/rules/plan-enumeration-needs-value-props.md`. Bare names are not options.
396
+
397
+ ### Grace window on old vocabulary
398
+
399
+ Old vocabulary (bet → goal, appetite → time budget, WU → step, parent bet → parent goal, arc → thread, chronicle → session log) still works through 2026-10-31 per ADR-031 and `.claude/rules/we-dont-break-adopters.md`. The old `/chronicle` skill name still resolves alongside the new `/session-log` name during the same window.
400
+
401
+ ### Refs
402
+
403
+ - ADR-040 planning skill vocabulary and lite profile — vocabulary rename table + template shape
404
+ - `.claude/rules/plain-english-discipline.md` — master rule
405
+ - `.claude/rules/we-dont-break-adopters.md` — grace window discipline
406
+ - `.claude/rules/turn-estimate-grounding.md` — time budget grounding
407
+ - `.claude/rules/plan-enumeration-needs-value-props.md` — scope choice discipline
408
+ - `.claude/rules/longrun-prep-plan-doc-compression.md` — Step 0.85 compressed prep discipline (bassclef-upstream#1307 R1)
409
+ - `standards/bassclef-internal-jargon.md` — self-check wordlist
410
+ - `.claude/luminaries/don-norman.md` — signifiers + mapping + feedback lens for Steps 1.4c + 1.4d
411
+ - `.claude/luminaries/jesse-james-garrett.md` — five planes lens for section-anchor discipline
412
+ - `.claude/luminaries/sophia-prater.md` — OOUX + progressive disclosure lens for Steps 1.5-1.7 card format
413
+ - `.claude/luminaries/edward-tufte.md` — data-ink + glyph-encodes-data lens for scan-table + glyph legend
414
+ - `docs/personas/sam.md` — primary reader (15-30 min budget; bounces on friction)
415
+ - `docs/personas/2026-07-12-bet11c-louis.md` — secondary reader (skims group headings first)
416
+ - `standards/scannable-multi-option-output.md` — full 12 principles + card template + glyph legend
417
+ - bassclef-upstream#853 — parent ticket (Steps 1.4c + 1.4d + Norman + Garrett debate)
418
+ - bassclef-upstream#830 — Shape to Option rename (already applied in this file)
419
+ - bassclef-upstream#1150 — auto-inject /decompose + /pattern-review + /architect-review (A1 + A3 chain wiring)
420
+ - bassclef-upstream#1167 — per-step OOAD dispatch chain (A2 + A4 luminary consult + counter)
421
+ - bassclef-web#152 — iterate /longrun prep output shape (R1 + R2 + R3 reshape)
422
+ - `.claude/rules/pattern-annotation.md` L57-62 — @pattern annotation contract (A3 trigger)
423
+ - `.claude/rules/oo-ad-entry-point.md` — ceremony matrix (A2 skip tier)
424
+ - `.claude/bassclef-orientation.md` L100-108 — OOAD chain sequence (A1 canonical list)
425
+ - `.claude/luminaries/john-ousterhout.md` — co-lead (deep modules + narrow interface)
426
+ - `.claude/luminaries/amazon-pr-faq.md` — supporting (decision at top; PR/FAQ working-backwards)