@thebassclef/lite 1.0.4 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/dist/cli.cjs +65 -0
  2. package/dist/cli.js +65 -0
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/lite/.claude/agents/architect.md +70 -0
  7. package/dist/lite/.claude/agents/builder.md +114 -0
  8. package/dist/lite/.claude/agents/designer.md +156 -0
  9. package/dist/lite/.claude/agents/reviewer.md +88 -0
  10. package/dist/lite/.claude/hooks/bassclef-sync.sh +85 -27
  11. package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
  12. package/dist/lite/.claude/hooks/longrun-prep-render-check.sh +236 -0
  13. package/dist/lite/.claude/hooks/persona-name-scrub-check.sh +105 -0
  14. package/dist/lite/.claude/hooks/skill-step-list-check.sh +171 -0
  15. package/dist/lite/.claude/luminaries/alan-cooper.md +170 -0
  16. package/dist/lite/.claude/luminaries/alistair-cockburn.md +140 -0
  17. package/dist/lite/.claude/luminaries/amazon-pr-faq.md +34 -0
  18. package/dist/lite/.claude/luminaries/andreas-zeller.md +74 -0
  19. package/dist/lite/.claude/luminaries/ash-maurya.md +121 -0
  20. package/dist/lite/.claude/luminaries/bill-buxton.md +210 -0
  21. package/dist/lite/.claude/luminaries/charles-sanders-peirce.md +150 -0
  22. package/dist/lite/.claude/luminaries/david-ogilvy.md +192 -0
  23. package/dist/lite/.claude/luminaries/don-norman.md +173 -0
  24. package/dist/lite/.claude/luminaries/edward-tufte.md +179 -0
  25. package/dist/lite/.claude/luminaries/eric-evans.md +160 -0
  26. package/dist/lite/.claude/luminaries/frederick-brooks.md +50 -0
  27. package/dist/lite/.claude/luminaries/gang-of-four.md +157 -0
  28. package/dist/lite/.claude/luminaries/glenford-myers.md +230 -0
  29. package/dist/lite/.claude/luminaries/hunt-thomas.md +115 -0
  30. package/dist/lite/.claude/luminaries/hyrum-wright.md +94 -0
  31. package/dist/lite/.claude/luminaries/jason-fried-dhh.md +46 -0
  32. package/dist/lite/.claude/luminaries/jesse-james-garrett.md +154 -0
  33. package/dist/lite/.claude/luminaries/john-ousterhout.md +94 -0
  34. package/dist/lite/.claude/luminaries/karl-popper.md +132 -0
  35. package/dist/lite/.claude/luminaries/kent-beck.md +168 -0
  36. package/dist/lite/.claude/luminaries/linus-torvalds.md +218 -0
  37. package/dist/lite/.claude/luminaries/martin-fowler.md +164 -0
  38. package/dist/lite/.claude/luminaries/michael-feathers.md +125 -0
  39. package/dist/lite/.claude/luminaries/michael-nygard.md +118 -0
  40. package/dist/lite/.claude/luminaries/robert-c-martin.md +164 -0
  41. package/dist/lite/.claude/luminaries/saltzer-schroeder.md +194 -0
  42. package/dist/lite/.claude/luminaries/sophia-prater.md +193 -0
  43. package/dist/lite/.claude/luminaries/stephen-toulmin.md +131 -0
  44. package/dist/lite/.claude/luminaries/tony-hoare.md +170 -0
  45. package/dist/lite/.claude/luminaries/vaughn-vernon.md +50 -0
  46. package/dist/lite/.claude/luminaries/w-edwards-deming.md +158 -0
  47. package/dist/lite/.claude/rules/accessor-library-discipline.md +110 -0
  48. package/dist/lite/.claude/rules/adr-discipline.md +96 -0
  49. package/dist/lite/.claude/rules/api-conventions.md +115 -0
  50. package/dist/lite/.claude/rules/artifact-ingestion.md +137 -0
  51. package/dist/lite/.claude/rules/assert-only-after-verify.md +111 -0
  52. package/dist/lite/.claude/rules/blocked-items.md +139 -0
  53. package/dist/lite/.claude/rules/bootstrap-pair-discipline.md +106 -0
  54. package/dist/lite/.claude/rules/branching.md +28 -0
  55. package/dist/lite/.claude/rules/cold-adopter-harness-discipline.md +93 -0
  56. package/dist/lite/.claude/rules/commit-conventions.md +22 -0
  57. package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +173 -0
  58. package/dist/lite/.claude/rules/compounding-sequence-fresh-analysis.md +173 -0
  59. package/dist/lite/.claude/rules/context-engineering.md +155 -0
  60. package/dist/lite/.claude/rules/context-management.md +85 -0
  61. package/dist/lite/.claude/rules/defensive-bash.md +52 -0
  62. package/dist/lite/.claude/rules/deferred-actions.md +233 -0
  63. package/dist/lite/.claude/rules/destructive-operations.md +69 -0
  64. package/dist/lite/.claude/rules/diagnosis.md +38 -0
  65. package/dist/lite/.claude/rules/github-issue-flash-tweet.md +114 -0
  66. package/dist/lite/.claude/rules/guardrails.md +73 -0
  67. package/dist/lite/.claude/rules/hook-wire-on-author.md +77 -0
  68. package/dist/lite/.claude/rules/identifier-leak-prevention.md +73 -0
  69. package/dist/lite/.claude/rules/iteration-bet-brief-completeness.md +43 -0
  70. package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +79 -0
  71. package/dist/lite/.claude/rules/longrun-prep-plan-doc-compression.md +77 -0
  72. package/dist/lite/.claude/rules/loop-discipline.md +71 -0
  73. package/dist/lite/.claude/rules/manual-prod-approval.md +100 -0
  74. package/dist/lite/.claude/rules/marker-enrichment-discipline.md +72 -0
  75. package/dist/lite/.claude/rules/mobile-ephemeral-session.md +109 -0
  76. package/dist/lite/.claude/rules/new-dependency-check.md +44 -0
  77. package/dist/lite/.claude/rules/oo-ad-entry-point.md +95 -0
  78. package/dist/lite/.claude/rules/operator-facing-prose.md +177 -0
  79. package/dist/lite/.claude/rules/option-label-discipline.md +82 -0
  80. package/dist/lite/.claude/rules/pattern-annotation.md +83 -0
  81. package/dist/lite/.claude/rules/persona-name-leak-scrub.md +90 -0
  82. package/dist/lite/.claude/rules/plain-english-discipline.md +132 -0
  83. package/dist/lite/.claude/rules/plan-enumeration-needs-value-props.md +177 -0
  84. package/dist/lite/.claude/rules/pr-body-shape.md +195 -0
  85. package/dist/lite/.claude/rules/pr-strategy.md +142 -0
  86. package/dist/lite/.claude/rules/pr-title-shape.md +90 -0
  87. package/dist/lite/.claude/rules/prototype-workflow.md +53 -0
  88. package/dist/lite/.claude/rules/reserved-skill-names.md +103 -0
  89. package/dist/lite/.claude/rules/schema-management.md +42 -0
  90. package/dist/lite/.claude/rules/sdlc-gates.md +149 -0
  91. package/dist/lite/.claude/rules/security.md +37 -0
  92. package/dist/lite/.claude/rules/session-artifacts.md +236 -0
  93. package/dist/lite/.claude/rules/skill-composition-declarations.md +105 -0
  94. package/dist/lite/.claude/rules/skill-description-clarity.md +196 -0
  95. package/dist/lite/.claude/rules/skill-procedure-step-list.md +119 -0
  96. package/dist/lite/.claude/rules/sprint-prep-preset-picker.md +76 -0
  97. package/dist/lite/.claude/rules/state-schema-validation.md +156 -0
  98. package/dist/lite/.claude/rules/stuck-signal-diagnostic.md +111 -0
  99. package/dist/lite/.claude/rules/substrate-config-schema.md +85 -0
  100. package/dist/lite/.claude/rules/test-list-discipline.md +129 -0
  101. package/dist/lite/.claude/rules/test-sufficiency.md +186 -0
  102. package/dist/lite/.claude/rules/testing-tier-config.md +125 -0
  103. package/dist/lite/.claude/rules/testing.md +38 -0
  104. package/dist/lite/.claude/rules/turn-estimate-grounding.md +82 -0
  105. package/dist/lite/.claude/rules/visual-hierarchy.md +427 -0
  106. package/dist/lite/.claude/rules/we-dont-break-adopters.md +103 -0
  107. package/dist/lite/.claude/rules/whereami-load-bearing.md +184 -0
  108. package/dist/lite/.claude/rules/writing-craft-discipline.md +72 -0
  109. package/dist/lite/.claude/rules/wu-sequencing-compounds.md +119 -0
  110. package/dist/lite/.claude/skills/build/SKILL.md +640 -0
  111. package/dist/lite/.claude/skills/chronicle/SKILL.md +55 -0
  112. package/dist/lite/.claude/skills/clean-artifacts/SKILL.md +249 -0
  113. package/dist/lite/.claude/skills/decompose/SKILL.md +280 -0
  114. package/dist/lite/.claude/skills/diagnose/SKILL.md +297 -0
  115. package/dist/lite/.claude/skills/feynman/SKILL.md +90 -0
  116. package/dist/lite/.claude/skills/howdoi/SKILL.md +105 -0
  117. package/dist/lite/.claude/skills/ia-model/SKILL.md +108 -0
  118. package/dist/lite/.claude/skills/interaction-design/SKILL.md +112 -0
  119. package/dist/lite/.claude/skills/interpret-input/SKILL.md +180 -0
  120. package/dist/lite/.claude/skills/journal/SKILL.md +209 -0
  121. package/dist/lite/.claude/skills/kiss/SKILL.md +449 -0
  122. package/dist/lite/.claude/skills/launch/SKILL.md +915 -0
  123. package/dist/lite/.claude/skills/lean-canvas/SKILL.md +332 -0
  124. package/dist/lite/.claude/skills/longrun/SKILL.md +512 -0
  125. package/dist/lite/.claude/skills/luminary/SKILL.md +481 -0
  126. package/dist/lite/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
  127. package/dist/lite/.claude/skills/onboard-repo/SKILL.md +1640 -0
  128. package/dist/lite/.claude/skills/pattern-review/SKILL.md +99 -0
  129. package/dist/lite/.claude/skills/personas/SKILL.md +207 -0
  130. package/dist/lite/.claude/skills/promote/SKILL.md +283 -0
  131. package/dist/lite/.claude/skills/requirement/SKILL.md +98 -0
  132. package/dist/lite/.claude/skills/retro/SKILL.md +117 -0
  133. package/dist/lite/.claude/skills/riff/SKILL.md +114 -0
  134. package/dist/lite/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
  135. package/dist/lite/.claude/skills/session-end/SKILL.md +309 -0
  136. package/dist/lite/.claude/skills/session-log/SKILL.md +299 -0
  137. package/dist/lite/.claude/skills/skills/SKILL.md +228 -0
  138. package/dist/lite/.claude/skills/spec/SKILL.md +105 -0
  139. package/dist/lite/.claude/skills/sprint/SKILL.md +418 -0
  140. package/dist/lite/.claude/skills/stage/SKILL.md +384 -0
  141. package/dist/lite/.claude/skills/state-a-problem/SKILL.md +185 -0
  142. package/dist/lite/.claude/skills/temperance/SKILL.md +108 -0
  143. package/dist/lite/.claude/skills/use-case/SKILL.md +417 -0
  144. package/dist/lite/.claude/skills/user-stories/SKILL.md +268 -0
  145. package/dist/lite/.claude/skills/value-prop/SKILL.md +251 -0
  146. package/dist/lite/.claude/skills/verify/SKILL.md +160 -0
  147. package/dist/lite/.claude/skills/visual-review/SKILL.md +503 -0
  148. package/dist/lite/.claude/skills/whats-the-plan/SKILL.md +202 -0
  149. package/dist/lite/.claude/skills/whereami/SKILL.md +307 -0
  150. package/dist/lite/AGENTS.md +79 -0
  151. package/dist/lite/CLAUDE-lite.md +85 -0
  152. package/dist/lite/CODE_OF_CONDUCT.md +28 -0
  153. package/dist/lite/CONTRIBUTING.md +177 -0
  154. package/dist/lite/README.md +173 -0
  155. package/dist/lite/SECURITY.md +19 -0
  156. package/dist/lite/architecture/decisions/ADR-029-release-pipeline.md +79 -0
  157. package/dist/lite/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
  158. package/dist/lite/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
  159. package/dist/lite/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
  160. package/dist/lite/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
  161. package/dist/lite/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
  162. package/dist/lite/lib/clean-artifacts-sweep.sh +112 -0
  163. package/dist/lite/lib/code-comment-discipline.sh +144 -0
  164. package/dist/lite/lib/composer-preflight.sh +459 -0
  165. package/dist/lite/lib/deferred-actions.sh +146 -0
  166. package/dist/lite/lib/hook-header-parser.sh +61 -0
  167. package/dist/lite/lib/hook-heartbeat.sh +152 -0
  168. package/dist/lite/lib/hook-inject.sh +255 -0
  169. package/dist/lite/lib/hook-installer.sh +195 -0
  170. package/dist/lite/lib/luminary-pick.sh +96 -0
  171. package/dist/lite/lib/output-discipline.sh +143 -0
  172. package/dist/lite/lib/prose-scan-boundary.sh +171 -0
  173. package/dist/lite/lib/rewrite-check.sh +214 -0
  174. package/dist/lite/lib/session-rescue.sh +151 -0
  175. package/dist/lite/lib/source-graph-walker.sh +277 -0
  176. package/dist/lite/lib/state.sh +1372 -0
  177. package/dist/lite/lib/telemetry.sh +205 -0
  178. package/dist/lite/lib/tier-check.sh +187 -0
  179. package/dist/lite/lib/tier-dependency-audit.sh +1088 -0
  180. package/dist/lite/presence/install/bassclef-hook-connect.sh +178 -0
  181. package/dist/lite/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
  182. package/dist/lite/presence/install/bassclef-sync.template.sh +2278 -0
  183. package/dist/lite/presence/install/schedule-auto-save.cron.sh +88 -0
  184. package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +122 -0
  185. package/dist/lite/scripts/aggregate-telemetry.sh +217 -0
  186. package/dist/lite/scripts/analyze-tier-dependencies.sh +239 -0
  187. package/dist/lite/scripts/generate-lite-manifest.sh +505 -0
  188. package/dist/lite/scripts/generate-tier-manifest.sh +28 -0
  189. package/dist/lite/scripts/intent-drift-check.sh +456 -0
  190. package/dist/lite/scripts/lite-manifest-drift-check.sh +146 -0
  191. package/dist/lite/scripts/render-lite-manifest-doc.sh +150 -0
  192. package/dist/lite/standards/adr-template.md +86 -0
  193. package/dist/lite/standards/api-conventions/nextjs.md +84 -0
  194. package/dist/lite/standards/artifact-composition.md +209 -0
  195. package/dist/lite/standards/bash-hook-safety.md +246 -0
  196. package/dist/lite/standards/bassclef-configs-schema.md +232 -0
  197. package/dist/lite/standards/bassclef-evolution.md +143 -0
  198. package/dist/lite/standards/bassclef-internal-jargon.md +244 -0
  199. package/dist/lite/standards/bassclef-managed-sentinel.md +96 -0
  200. package/dist/lite/standards/bassclef-source-config.md +228 -0
  201. package/dist/lite/standards/branch-stacking.md +408 -0
  202. package/dist/lite/standards/code-safety-principles.md +176 -0
  203. package/dist/lite/standards/composer-prerequisites.md +155 -0
  204. package/dist/lite/standards/deferred-actions-schema.md +204 -0
  205. package/dist/lite/standards/dependency-discipline/cargo.md +39 -0
  206. package/dist/lite/standards/dependency-discipline/gem.md +43 -0
  207. package/dist/lite/standards/dependency-discipline/go-mod.md +41 -0
  208. package/dist/lite/standards/dependency-discipline/npm.md +42 -0
  209. package/dist/lite/standards/dependency-discipline/pip.md +42 -0
  210. package/dist/lite/standards/deployment-topology/ec2-tailscale.md +225 -0
  211. package/dist/lite/standards/deployment-topology.md +69 -0
  212. package/dist/lite/standards/docs-sync-allowlist.md +76 -0
  213. package/dist/lite/standards/domain-and-dns.md +145 -0
  214. package/dist/lite/standards/frontend-stack.md +67 -0
  215. package/dist/lite/standards/frontmatter-schema.md +154 -0
  216. package/dist/lite/standards/graceful-exit.md +227 -0
  217. package/dist/lite/standards/hook-idempotency.md +102 -0
  218. package/dist/lite/standards/hook-injection-discipline.md +202 -0
  219. package/dist/lite/standards/hook-install-class.md +215 -0
  220. package/dist/lite/standards/input-handler-interface.md +152 -0
  221. package/dist/lite/standards/lite-manifest-schema-changes.md +180 -0
  222. package/dist/lite/standards/lite-manifest.json +2797 -0
  223. package/dist/lite/standards/luminary-matching.md +105 -0
  224. package/dist/lite/standards/luminary-problem-patterns.md +481 -0
  225. package/dist/lite/standards/migration-discipline/active-record.md +50 -0
  226. package/dist/lite/standards/migration-discipline/alembic.md +43 -0
  227. package/dist/lite/standards/migration-discipline/gorm.md +50 -0
  228. package/dist/lite/standards/migration-discipline/prisma.md +53 -0
  229. package/dist/lite/standards/migration-discipline/sqlalchemy.md +51 -0
  230. package/dist/lite/standards/mobile-ephemeral-session.md +167 -0
  231. package/dist/lite/standards/model-routing-discipline.md +160 -0
  232. package/dist/lite/standards/ogilvy-writing-rules.md +225 -0
  233. package/dist/lite/standards/opener-discipline.md +96 -0
  234. package/dist/lite/standards/operator-facing-prose-discipline.md +201 -0
  235. package/dist/lite/standards/persona-schema.md +229 -0
  236. package/dist/lite/standards/pluggable-luminaries.md +323 -0
  237. package/dist/lite/standards/pr-body-discipline.md +115 -0
  238. package/dist/lite/standards/preview-state-schema.md +189 -0
  239. package/dist/lite/standards/project-directory-layout.md +276 -0
  240. package/dist/lite/standards/release-tagging.md +137 -0
  241. package/dist/lite/standards/reserved-skill-names.md +120 -0
  242. package/dist/lite/standards/scannable-multi-option-output.md +265 -0
  243. package/dist/lite/standards/sdlc-compliance.md +286 -0
  244. package/dist/lite/standards/sdlc-gates/typescript.md +57 -0
  245. package/dist/lite/standards/secrets-lifecycle.md +210 -0
  246. package/dist/lite/standards/security-scanner-adapter.md +145 -0
  247. package/dist/lite/standards/session-board.md +256 -0
  248. package/dist/lite/standards/skill-output-discipline.md +121 -0
  249. package/dist/lite/standards/state-spine-contract.md +255 -0
  250. package/dist/lite/standards/state-spine.md +511 -0
  251. package/dist/lite/standards/steering-hints/kiss-words.md +11 -0
  252. package/dist/lite/standards/substrate-config-schema.md +267 -0
  253. package/dist/lite/standards/tech-stack-config.md +109 -0
  254. package/dist/lite/standards/tier-dependency-analysis.md +167 -0
  255. package/dist/lite/standards/tier-runtime-deps/lite.md +57 -0
  256. package/dist/lite/standards/tier-tag-schema.md +155 -0
  257. package/dist/lite/standards/two-layer-config.md +99 -0
  258. package/dist/lite/standards/use-case-format.md +292 -0
  259. package/dist/lite/standards/user-story-invest.md +268 -0
  260. package/dist/lite/standards/velocity-and-appetite.md +229 -0
  261. package/dist/lite/standards/voice-input-pattern.md +119 -0
  262. package/dist/lite/standards/whereami-schema.md +301 -0
  263. package/dist/lite/standards/worktree-management.md +211 -0
  264. package/dist/lite/standards/writing-guide.md +213 -0
  265. package/dist/lite/templates/chronicle-template.md +75 -0
  266. package/dist/lite/templates/deferred-action-template.md +45 -0
  267. package/dist/lite/templates/memory-proposal-template.md +77 -0
  268. package/dist/lite/templates/persona-template.md +200 -0
  269. package/dist/lite/templates/pr-faq.md +45 -0
  270. package/dist/lite/templates/secret-rotation-template.md +162 -0
  271. package/dist/lite/templates/spec-template.md +131 -0
  272. package/dist/lite/templates/use-case-template.md +194 -0
  273. package/dist/lite/templates/user-story-template.md +107 -0
  274. package/dist/lite/templates/whereami-template.md +101 -0
  275. package/package.json +1 -1
@@ -0,0 +1,57 @@
1
+ ---
2
+ tier: lite
3
+ description: Stack-specific instantiation of .claude/rules/sdlc-gates.md for TypeScript.
4
+ ---
5
+
6
+ # SDLC Gates — TypeScript
7
+
8
+ Stack-specific instantiation of `.claude/rules/sdlc-gates.md` for TypeScript. Composed under ARCH-T0 #1133 Path A.
9
+
10
+ ## When this sibling fires
11
+
12
+ When adopter's `.claude/bassclef-configs.jsonc` has `tech_stack.lang: typescript`. The loader (future ticket) reads this sibling and applies the TypeScript-specific globs in addition to the universal gates in the parent rule.
13
+
14
+ Until the loader ships, this sibling is discoverable via the cross-reference table in the parent rule. The universal gates fire methodologically regardless of stack.
15
+
16
+ ## TypeScript-specific globs
17
+
18
+ ```yaml
19
+ globs:
20
+ - src/**/*.ts
21
+ - src/**/*.tsx
22
+ - scripts/**/*.ts
23
+ ```
24
+
25
+ These globs scope hook + tooling firing to TypeScript source files. The pre-build temperance + diagnose gates fire on these path matchers; the post-build `/verify` gate runs against these files.
26
+
27
+ ## TypeScript-specific tech_stack_match
28
+
29
+ ```yaml
30
+ tech_stack_match:
31
+ lang: typescript
32
+ backend: nodejs
33
+ ```
34
+
35
+ For adopter configs that opt into the per-stack loader, this match field anchors the sibling to the right adopter declaration in `.claude/bassclef-configs.jsonc`.
36
+
37
+ ## TypeScript-specific verify hooks
38
+
39
+ When the universal `/verify` gate fires post-build (per the parent rule), TypeScript-specific checks include:
40
+
41
+ - `tsc --noEmit` for type-checking
42
+ - `eslint` for static-analysis
43
+ - `vitest run` for unit tests
44
+ - (Optional, per adopter) `prettier --check` for formatting
45
+
46
+ The adopter's `package.json` scripts wire these into the `/verify` invocation.
47
+
48
+ ## Composition with universal gates
49
+
50
+ Apply the universal gates from `.claude/rules/sdlc-gates.md` first; the TypeScript-specific globs above add file-scoping detail. When the two conflict (e.g., a TypeScript-specific check contradicts the universal failure-chain rule), the universal principle wins; file a `/promote` ticket if you believe the convention should be amended.
51
+
52
+ ## Refs
53
+
54
+ - Parent rule: `.claude/rules/sdlc-gates.md`
55
+ - ARCH-T0 #1133 — operator-stack-leakage audit + remediation
56
+ - bassclef#1311 — this sibling (sdlc-gates Path A WU-7 of bet 2026-06-20e)
57
+ - bassclef#1309 — sister Path A (api-conventions WU-6)
@@ -0,0 +1,210 @@
1
+ ---
2
+ tier: lite
3
+ description: substrate.secrets.md is the single declarative source for secrets/token lifecycle in any bassclef-substrate repo.
4
+ ---
5
+
6
+ # Secrets Lifecycle
7
+
8
+ `substrate.secrets.md` is the single declarative source for secrets/token
9
+ lifecycle in any bassclef-substrate repo. Schema:
10
+ `standards/state-spine/schemas/substrate-secrets.schema.json`.
11
+
12
+ ## Why this exists
13
+
14
+ Before this standard: tokens silently expired mid-session. The operator
15
+ hit a 401, then grepped historical chronicles to remember which token,
16
+ where it lives, how to rotate it. Every consumer team reinvented the
17
+ tracking — file in 1Password, sticky note, calendar reminder, none of
18
+ the above.
19
+
20
+ After this standard: every secret has a tracked expiry, a documented
21
+ rotation procedure, and a session-start hook that surfaces the warning
22
+ weeks before expiry. Friction removed; operational story declarative.
23
+
24
+ ## Why a separate file from `substrate.config.md`
25
+
26
+ `substrate.config.md` holds external resource *references* (doc IDs,
27
+ URLs, repo refs). `substrate.secrets.md` holds secret *lifecycle*
28
+ (expiry, rotation, health checks). Two different concerns:
29
+
30
+ - **Privacy posture**: secrets references are sensitive metadata
31
+ (storage location, expiry windows leak operational structure);
32
+ config references are public.
33
+ - **Audit lifecycle**: `last_rotated` + `expires_at` need date discipline;
34
+ config rarely changes.
35
+ - **Read-time consumers**: `scripts/secrets-status.sh` parses secrets;
36
+ `substrate.config.md` is read by skills/hooks for resource lookup.
37
+
38
+ Cross-reference: `substrate.config.md` carries a one-line pointer
39
+ ("secrets tracked in `substrate.secrets.md`"); `substrate.secrets.md`
40
+ carries a one-line back-pointer.
41
+
42
+ ## File shape
43
+
44
+ `substrate.secrets.md` uses Shape B (YAML frontmatter + markdown body):
45
+
46
+ ```markdown
47
+ ---
48
+ schema_version: v0
49
+ secrets:
50
+ - name: SLACK_WEBHOOK
51
+ purpose: posting to bassclef-activity channel
52
+ storage:
53
+ type: github_actions_secret
54
+ reference: SLACK_WEBHOOK
55
+ rotation_cadence: 1y
56
+ expires_at: 2026-09-15
57
+ rotation_procedure: docs/runbooks/rotate-slack-webhook.md
58
+ alert_threshold_days: 30
59
+ owner: operator
60
+ last_rotated: 2025-09-15
61
+ health_check_command: ""
62
+ ---
63
+
64
+ # Secrets — <repo name>
65
+
66
+ Lifecycle tracking for external integration credentials.
67
+ See `standards/secrets-lifecycle.md`.
68
+
69
+ [Optional human-readable notes per secret in body sections.]
70
+ ```
71
+
72
+ ## Field reference
73
+
74
+ | Field | Required | Type | Notes |
75
+ |-------|----------|------|-------|
76
+ | `name` | yes | string | UPPER_SNAKE_CASE. Logical name (env-var convention). NEVER the value. |
77
+ | `purpose` | yes | string | One-line: what does this secret allow? |
78
+ | `storage.type` | yes | enum | `1password \| env \| file \| github_actions_secret \| aws_secrets_manager \| custom` |
79
+ | `storage.reference` | yes | string | How to fetch the value at runtime (shape per type — see below). |
80
+ | `rotation_cadence` | yes | duration \| enum | `1y`, `6mo`, `90d`, `30d` OR `manual` / `on-leak` / `never` |
81
+ | `expires_at` | yes | date \| `never` | ISO 8601 (YYYY-MM-DD) OR `never` (lifetime credential) |
82
+ | `rotation_procedure` | yes | path | Path to runbook (`docs/runbooks/rotate-<name>.md`). Empty string when cadence=`never`. |
83
+ | `alert_threshold_days` | yes | integer \| `n/a` | Days-before-expiry to start surfacing BLOCKED. Use `n/a` for `never`. |
84
+ | `owner` | yes | string | Who rotates. `operator` for solo; team/handle for multi-operator. |
85
+ | `last_rotated` | yes | date \| `unknown` | ISO 8601 OR `unknown` if pre-tracking. |
86
+ | `health_check_command` | no | string | Optional shell command verifying secret is live. Empty string skips. |
87
+
88
+ ## Storage type vocabulary (v0)
89
+
90
+ Closed enum in v0; extensible via `custom` per consumer.
91
+
92
+ | Type | Reference shape | Example |
93
+ |------|----------------|---------|
94
+ | `1password` | vault path | `vault://bassclef/anthropic-api-key` |
95
+ | `env` | env var name | `CLOUDFLARE_API_TOKEN` |
96
+ | `file` | absolute path | `~/.poa-gauth.json` |
97
+ | `github_actions_secret` | secret name | `SLACK_WEBHOOK` |
98
+ | `aws_secrets_manager` | ARN or secret id | `arn:aws:secretsmanager:us-east-1:...:secret:my-secret-AbCdEf` |
99
+ | `custom` | free-form (document inline in body) | per-consumer |
100
+
101
+ ## Rotation cadence
102
+
103
+ ISO 8601 duration OR controlled enum:
104
+
105
+ - **Duration shorthand**: `1y`, `6mo`, `90d`, `30d`, `1w` (bassclef's friendly form)
106
+ - **Full ISO 8601**: `P1Y`, `P6M`, `P90D` (also accepted)
107
+ - **`manual`**: rotate when notified (e.g., compromise, vendor migration)
108
+ - **`on-leak`**: rotate only on incident; otherwise lifetime
109
+ - **`never`**: lifetime credential (rare; flag for review)
110
+
111
+ ## Expiry tracking
112
+
113
+ `expires_at` is the hard date the credential becomes invalid. The
114
+ session-start hook (`90-secrets-expiry.sh`) compares `expires_at` to
115
+ today's date and surfaces BLOCKED when within `alert_threshold_days`.
116
+
117
+ When `expires_at: never` the entry is never alerted; `alert_threshold_days`
118
+ must be `n/a` and `rotation_procedure` may be empty.
119
+
120
+ After rotation: update both `last_rotated` (to today) AND `expires_at`
121
+ (to the new expiry). The runbook should remind the operator.
122
+
123
+ ## Health checks
124
+
125
+ `health_check_command` is optional. When set, it's a shell command that
126
+ returns exit code 0 when the secret is live. Used by `secrets-status.sh
127
+ --health-check`. Should reference the env var (not hardcoded value):
128
+
129
+ ```yaml
130
+ health_check_command: "curl -s -H 'x-api-key: $ANTHROPIC_API_KEY' https://api.anthropic.com/v1/models | jq -e '.data'"
131
+ ```
132
+
133
+ For `manual` / `on-leak` / `never` cadences, health checks are still
134
+ useful (verify the credential hasn't been revoked).
135
+
136
+ ## Hard rules
137
+
138
+ 1. **NO secret VALUES.** Only references, expiry dates, rotation procedures,
139
+ and health-check commands. Values stay in their authoritative storage
140
+ (1Password / GitHub Actions Secrets / .env / AWS Secrets Manager).
141
+ 2. **NO commits of `.env` files**. Use `storage.type=env` with the
142
+ reference being the env var name; the value lives in a gitignored
143
+ `.env` consumed at runtime.
144
+ 3. **`substrate.secrets.md` is git-tracked.** Its content is
145
+ non-sensitive metadata. If your storage references leak operational
146
+ structure (e.g., AWS account IDs you'd rather not publish), use
147
+ `custom` type with a private reference shape.
148
+ 4. **Rotation updates BOTH `last_rotated` AND `expires_at`.** The runbook
149
+ reminds the operator.
150
+ 5. **`alert_threshold_days` matches risk profile.** Webhooks: 30 days.
151
+ API keys with manual rotation: longer. OAuth refresh tokens: shorter
152
+ if vendor revokes proactively.
153
+ 6. **`~/.config/bassclef/secrets.env` lines MUST use `export VAR=value`
154
+ format.** When the env adapter writes to that file, plain `VAR=value`
155
+ sets a shell variable only — bash subprocesses (including every
156
+ bassclef hook + helper) don't inherit it. `export VAR=value` enters
157
+ the environment proper and is inherited by every subprocess the
158
+ shell launches. The env adapter (`scripts/adapters/secrets/env.sh`)
159
+ enforces this format on writes; `/secrets-bootstrap --repair`
160
+ retroactively fixes legacy files that lack the prefix
161
+ (bassclef#976).
162
+
163
+ ## Tooling
164
+
165
+ | Tool | Purpose |
166
+ |------|---------|
167
+ | `scripts/secrets-status.sh` | Parses `substrate.secrets.md`, prints traffic-light status table, optional `--health-check` flag |
168
+ | `scripts/secrets-bootstrap.sh --repair` | Adds missing `export ` prefix to assignment lines in `~/.config/bassclef/secrets.env`. Creates dated backup. Required when subprocess inheritance breaks (bassclef#976) |
169
+ | `.claude/hooks/session-reflection.d/90-secrets-expiry.sh` | Session-start BLOCKED surface for any secret within `alert_threshold_days` |
170
+ | `templates/secret-rotation-template.md` | Runbook template for new secret rotation procedures |
171
+
172
+ ## Override paths
173
+
174
+ - **`SKIP_SECRETS_EXPIRY_CHECK=1`**: bypass the session-start hook for
175
+ one command. Logged to stderr per bassclef idiom.
176
+ - **No `substrate.secrets.md`**: hook is silent (graceful in repos
177
+ without secrets).
178
+
179
+ ## Migration
180
+
181
+ For repos adopting this standard:
182
+
183
+ 1. Copy `presence/install/substrate-secrets-template.md` to repo root
184
+ as `substrate.secrets.md`
185
+ 2. Populate one entry per tracked secret (start with the most painful —
186
+ typically the one that last expired)
187
+ 3. Add cross-reference in `substrate.config.md`
188
+ 4. Run `bash scripts/secrets-status.sh` to verify schema parses
189
+ 5. Commit; the session-start hook activates immediately
190
+
191
+ ## Out of scope (v1+)
192
+
193
+ - Slack/email cron alerts (v0 surfaces at session start only)
194
+ - AWS Secrets Manager / 1Password programmatic retrieval (v0 uses
195
+ per-secret `health_check_command`)
196
+ - Storage-type validators (vs per-secret command) — would require
197
+ bassclef-side implementations per type
198
+ - SOC 2 / ISO 27001 audit-trail integration — rotation log feeding
199
+ external audit systems
200
+
201
+ ## Composes with
202
+
203
+ - `standards/substrate-config-schema.md` — sibling standard for
204
+ references (non-secret)
205
+ - `.claude/rules/substrate-config-schema.md` — agent behavior rule;
206
+ references-only-by-name discipline applies to secrets too
207
+ - `.claude/rules/manual-prod-approval.md` — sibling
208
+ infrastructure-rail pattern
209
+ - `.claude/rules/context-engineering.md` — same just-in-time
210
+ context-surface discipline applied to operator runbook
@@ -0,0 +1,145 @@
1
+ ---
2
+ tier: lite
3
+ description: "The adapter pattern that turns bassclef's per-language security defaults into adopter-runnable CI."
4
+ ---
5
+
6
+ # Security Scanner Adapter Standard
7
+
8
+ The adapter pattern that turns bassclef's per-language security defaults into adopter-runnable CI. This standard is the reference; per-stack reference workflows ship under `config/security-scanners/` (Phase Y-3); `/onboard-repo` writes the stack choice to `.claude/bassclef-configs.jsonc` (Phase Y-4).
9
+
10
+ ## Why this exists
11
+
12
+ Adopter repos run bassclef's substrate as their development methodology. The substrate has security disciplines (`standards/code-safety-principles.md`, `.claude/rules/security.md`, `standards/bash-hook-safety.md`) but the disciplines need *scanners* to enforce them in adopter CI.
13
+
14
+ Today's gap: every adopter chooses, installs, and configures their own security scanners. Bassclef has no opinion on which scanners fire for which language. New adopters who do not know the security tool landscape ship with no scanners; experienced adopters duplicate effort across repos.
15
+
16
+ INSTEAD of per-adopter scanner choice from scratch: bassclef ships per-stack defaults. Adopters declare their stack at onboard time; bassclef wires the default scanners + ships a reference workflow they copy + customize.
17
+
18
+ ## Anchor
19
+
20
+ `@luminary saltzer-schroeder` — the eight protection-mechanism principles. Scanners are the mechanical enforcement layer for the source-code disciplines.
21
+
22
+ This standard composes with:
23
+
24
+ - `standards/code-safety-principles.md` — language-agnostic principles the scanners check
25
+ - `standards/bash-hook-safety.md` — bash-specific discipline; shellcheck is the scanner
26
+ - `standards/bassclef-configs-schema.md` § Security scanning (Phase Y-2) — adopter config surface
27
+ - `standards/deployment-topology.md` — sibling adapter pattern; same shape
28
+
29
+ ## The adapter shape
30
+
31
+ ```
32
+ adopter declares stack → bassclef-configs reads stack → workflow template fires per-stack scanners → scanner output meets discipline gates
33
+ ```
34
+
35
+ Same shape as the deploy-host adapter. Adopter declares the runtime; bassclef ships defaults; adopter customizes per-need.
36
+
37
+ Three pieces:
38
+
39
+ 1. **Stack declaration** — `.claude/bassclef-configs.jsonc` `security_scanning.stack` field
40
+ 2. **Reference workflow** — `config/security-scanners/<stack>.yml` (template the adopter copies)
41
+ 3. **Per-stack defaults** — listed in this standard's matrix below
42
+
43
+ ## Stack reference matrix
44
+
45
+ Six stack values. Six default scanner sets. Adopter copies the reference workflow + adjusts.
46
+
47
+ | Stack | Default scanners | What they catch |
48
+ |---|---|---|
49
+ | `node-typescript` | eslint-plugin-security + audit-ci + gitleaks | Source: XSS / SQL injection / unsafe regex / weak crypto. Deps: known CVEs. Secrets: leaked tokens. |
50
+ | `python` | bandit + safety + gitleaks | Source: SQL injection / weak crypto / unsafe pickle / shell injection. Deps: known CVEs. Secrets: leaked tokens. |
51
+ | `ruby` | brakeman + bundler-audit + gitleaks | Source: Rails-specific findings (mass-assignment / unsafe redirects / SQL injection). Deps: known CVEs. Secrets: leaked tokens. |
52
+ | `java` | spotbugs-security + dependency-check + gitleaks | Source: deserialization / XXE / unsafe reflection. Deps: known CVEs (OWASP DC). Secrets: leaked tokens. |
53
+ | `go` | gosec + govulncheck + gitleaks | Source: weak crypto / unsafe error handling / SQL injection. Deps: known CVEs. Secrets: leaked tokens. |
54
+ | `custom` | adopter-supplied list | Adopter responsible for choice + coverage |
55
+
56
+ `gitleaks` appears in every default set because secret detection is stack-agnostic.
57
+
58
+ `custom` is for adopters with a stack not in the bassclef defaults OR with specific scanner requirements (e.g., commercial Snyk / Veracode / Checkmarx). The adapter pattern allows opt-out without losing the schema discipline.
59
+
60
+ ## Reference workflows
61
+
62
+ Phase Y-3 ships the first two reference workflows: `config/security-scanners/node-typescript.yml` + `config/security-scanners/python.yml`. Ruby + Java + Go follow per adopter demand.
63
+
64
+ Each reference workflow:
65
+
66
+ - Triggers on PR + push to main (matches bassclef-pr-ci.yml pattern)
67
+ - Installs scanners
68
+ - Runs each scanner
69
+ - Outputs findings as PR comments (advisory) AND as workflow status (potential BLOCK)
70
+ - Uses `block_on_high_severity` field from bassclef-configs to decide BLOCK vs advisory
71
+
72
+ Adopters copy the template to `.github/workflows/security-scan.yml` in their consumer repo + customize.
73
+
74
+ ## How the adopter configures
75
+
76
+ `.claude/bassclef-configs.jsonc` `security_scanning` block (Phase Y-2):
77
+
78
+ ```jsonc
79
+ {
80
+ "security_scanning": {
81
+ // Stack name from the matrix above OR "custom".
82
+ // null = OFF (no security scanning configured).
83
+ "stack": "node-typescript",
84
+
85
+ // Optional additional scanners (e.g., commercial tools).
86
+ // Names are advisory; adopter writes their own workflow steps.
87
+ "additional_scanners": [],
88
+
89
+ // Block CI on high-severity findings; advisory-only otherwise.
90
+ // Recommended: true for production-bound work; false for early
91
+ // exploratory adopters.
92
+ "block_on_high_severity": true
93
+ }
94
+ }
95
+ ```
96
+
97
+ `null` stack means the adopter has not yet configured scanners; `/onboard-repo` will prompt at the next session. After choice, the field stays static — adopter edits it manually OR re-runs `/onboard-repo --reconfigure-security`.
98
+
99
+ ## Stack auto-detection
100
+
101
+ Phase Y-4 extends `/onboard-repo` with stack auto-detection. Heuristics:
102
+
103
+ | Signal | Hint |
104
+ |---|---|
105
+ | `package.json` exists + `typescript` or `@types/*` in deps | node-typescript |
106
+ | `package.json` exists + JavaScript only | node-typescript (with TS opt-out) |
107
+ | `requirements.txt` OR `pyproject.toml` OR `setup.py` | python |
108
+ | `Gemfile` OR `*.gemspec` | ruby |
109
+ | `pom.xml` OR `build.gradle` OR `*.java` | java |
110
+ | `go.mod` OR `*.go` | go |
111
+ | Multiple signals OR none | prompt operator + offer `custom` |
112
+
113
+ INSTEAD of asking the operator to remember the stack name: auto-detect from build files + confirm. The operator overrides if the detection is wrong.
114
+
115
+ ## What this adapter does NOT do
116
+
117
+ - Does not install scanners on the adopter machine — only generates the CI workflow that installs them per-run
118
+ - Does not maintain the scanner lists (adopters update reference workflows when new tool versions ship)
119
+ - Does not unify scanner output formats — each scanner outputs its native format; the workflow presents per-scanner sections
120
+ - Does not configure scanner-specific rules — adopters edit the reference workflow for per-org tuning
121
+ - Does not replace SAST / DAST commercial tools — the defaults are open-source baselines; adopters add commercial tools via `additional_scanners`
122
+
123
+ ## When this adapter fires
124
+
125
+ | Surface | Action |
126
+ |---|---|
127
+ | New adopter onboarding | `/onboard-repo` auto-detects stack + asks for confirmation + writes config |
128
+ | Existing adopter without security_scanning block | `/onboard-repo --reconfigure-security` (Phase Y-4) |
129
+ | Per PR in adopter repo | Adopter's copy of reference workflow fires |
130
+ | Reference workflow update in bassclef | Adopter notices via bassclef-sync; opts in to refresh their workflow |
131
+
132
+ ## Refs
133
+
134
+ - `standards/code-safety-principles.md` — language-agnostic principles the scanners check
135
+ - `standards/bash-hook-safety.md` — bash-specific discipline (shellcheck is the bash scanner)
136
+ - `standards/bassclef-configs-schema.md` § Security scanning (Phase Y-2; this PR's sibling)
137
+ - `standards/deployment-topology.md` — sibling adapter pattern
138
+ - `.claude/skills/onboard-repo/SKILL.md` (Phase Y-4) — onboarding integration
139
+ - `@luminary saltzer-schroeder` — anchor; mechanical enforcement of protection principles
140
+ - bassclef#1058 — failure-as-evidence for why adopters need substrate-supplied defaults
141
+ - docs/iteration-bets/2026-06-17a-secure-coding-foundations-longrun.md — Phase Y-1
142
+
143
+ ## Retirement
144
+
145
+ This standard retires when scanner choice converges (one bassclef scanner per stack) OR when a different security-enforcement model replaces per-stack scanner-based CI (e.g., universal SAST API). The adapter shape persists; the matrix entries evolve.
@@ -0,0 +1,256 @@
1
+ ---
2
+ tier: lite
3
+ description: The session-board is a session-level coordinator artifact for multi-bet longrun sessions.
4
+ ---
5
+
6
+ # Session-Board Standard
7
+
8
+ The session-board is a session-level coordinator artifact for **multi-bet
9
+ longrun sessions**. It tracks state across N bets simultaneously so a
10
+ mid-session pickup is resumption from a known state, not reconstruction
11
+ from `gh pr list` plus N stack manifests plus operator memory.
12
+
13
+ ## When required
14
+
15
+ A session-board MUST exist when **either** holds:
16
+
17
+ 1. **Multi-bet** — ≥2 active iteration goals in the session
18
+ 2. **Multi-phase** — ≥2 phases of a single bet active in the same session
19
+ (rare, but possible when a bet's phase gate clears mid-session and the
20
+ operator rolls into the next phase without ending the session)
21
+
22
+ Singleton-bet single-phase sessions do NOT require a session-board. The
23
+ existing primitives are sufficient:
24
+
25
+ - `docs/whereami.md` — current state snapshot
26
+ - `docs/iteration-bets/<slug>.md` — scope contract
27
+ - `docs/branch-stacks/<slug>.md` (or `docs/stacks/<slug>-stack.md`) —
28
+ per-bet stack manifest
29
+
30
+ The session-board adds overhead. If you don't need it, don't write it.
31
+
32
+ ## Why this artifact exists
33
+
34
+ For multi-bet sessions, today's primitives leave a coordinator gap. If
35
+ an overnight session dies on branch 9 of 17 across 3 bets, the next
36
+ session reconstructs state from `gh pr list` + reading 3 stack manifests +
37
+ trying to remember which bet was active when context was lost.
38
+
39
+ That's "rebuild map from artifacts" — exactly the failure mode
40
+ `docs/whereami.md` was created to prevent at the project level. The
41
+ session-board is the same prevention at the session level.
42
+
43
+ The plural `active_sessions:` registry in whereami (proposed in pipeline
44
+ bet Phase A WS-2) is the **index**; the session-board is the **per-session
45
+ detail** the index points to.
46
+
47
+ ## Location
48
+
49
+ `docs/sessions/<YYYY-MM-DD>-<slug>.md` — one file per session.
50
+
51
+ The slug describes the session's shape, not its content. Examples:
52
+ - `2026-04-26-longrun.md` — multi-bet longrun
53
+ - `2026-05-03-overnight-pipeline-phase-b.md` — single-bet multi-phase overnight
54
+
55
+ ## Schema
56
+
57
+ ### Frontmatter
58
+
59
+ ```yaml
60
+ ---
61
+ session_id: <YYYY-MM-DD>-<slug>
62
+ session_started: <ISO-8601 UTC>
63
+ session_ended: <ISO-8601 UTC OR null while in-flight>
64
+ session_outcome: <short string OR null while in-flight>
65
+ mode: <gating>-<execution> # e.g. orchestrator-gated-sequential
66
+ operator: <github-username>
67
+ trigger: <one-line reason this session needed a board>
68
+ active_bets:
69
+ - slug: <bet-slug-without-extension>
70
+ phase_in_flight: <phase identifier OR "single" for non-phased bets>
71
+ appetite_turns: <integer>
72
+ stack_manifest: <path to stack manifest>
73
+ session_turn_budget: <integer — sum of bet appetites + buffer>
74
+ session_warning_threshold: <integer — typically 75% of budget>
75
+ ---
76
+ ```
77
+
78
+ ### Body sections (all required)
79
+
80
+ **`# Session board — <slug>`** — top-level heading
81
+
82
+ **`## Sources read`** — every artifact the session-board reader reads
83
+ during pickup (per `.claude/rules/artifact-ingestion.md`). At minimum:
84
+ each bet, each stack manifest, the survival kit (per
85
+ `.claude/rules/context-management.md`), and any /promote issues filed in
86
+ this session.
87
+
88
+ **`## Active bets — quick reference`** — table summarizing the goal.,
89
+ their phase, turn budget, and independence relationships:
90
+
91
+ ```markdown
92
+ | Bet | Phase | Turns | Independence |
93
+ |---|---|---|---|
94
+ | <bet> | <phase> | <n> | <how-disjoint-from-others> |
95
+ ```
96
+
97
+ Plus a **scope-disjointness** declaration: list which file paths each
98
+ bet touches. If two bets touch the same paths, they are NOT
99
+ parallel-safe and the session board MUST note the sequencing rule.
100
+
101
+ **`## Per-WS status`** — table of every workstream across every bet:
102
+
103
+ ```markdown
104
+ | Bet | WS | Branch | Status | PR | Notes |
105
+ |---|---|---|---|---|---|
106
+ | <bet> | <ws-id> | <branch-name> | todo \| in-flight \| pr-open \| merged \| rejected | <#NN OR —> | <one-line> |
107
+ ```
108
+
109
+ This is the **work breakdown across all bets** — the artifact a
110
+ post-compaction or next-session pickup reads first to know what's done
111
+ and what's next.
112
+
113
+ **`## Compaction anchors`** — checkpoints that drive context-management
114
+ decisions:
115
+
116
+ - **Last compaction**: ISO-8601 timestamp OR "none yet"
117
+ - **Last `/temperance` firing**: timestamp + scope (kickoff / scope-decision / etc.)
118
+ - **Last phase completed**: bet + phase identifier OR "none"
119
+ - **Survival kit declared**: bullet list of files to re-read after
120
+ compaction. MUST include this session-board file itself.
121
+
122
+ **`## Session-level /temperance — anchored at kickoff`** — the
123
+ right-thing / right-way / scope-drift-trigger answers from the kickoff
124
+ firing. Any subsequent `/temperance` re-firings during the session are
125
+ appended in the operator decision log below.
126
+
127
+ **`## Phase-boundary checkpoints scheduled`** — table of when the
128
+ session will checkpoint:
129
+
130
+ ```markdown
131
+ | When | Action |
132
+ |---|---|
133
+ | <trigger condition> | <what fires: re-temperance / update board / /sprint / etc.> |
134
+ ```
135
+
136
+ **`## Operator decision log`** — chronological record of mid-session
137
+ pivots, scope changes, re-anchors, scope-drift triggers. Each entry is
138
+ ISO-timestamped and one-or-two-sentence:
139
+
140
+ ```markdown
141
+ - <ISO-ts> — <decision summary>
142
+ ```
143
+
144
+ This is the audit trail when the next session asks "why did the operator
145
+ pivot from WS-3 to WS-7 mid-session?"
146
+
147
+ **`## Closeout audit checklist`** — final checks at session end. Owned
148
+ by `/longrun closeout` when that skill exists; until then, manually run.
149
+
150
+ **`## Out of scope this session`** — explicit deferrals, with the rule:
151
+ "if any of these activate, fire `/longrun checkpoint --now` and
152
+ re-anchor."
153
+
154
+ ## Lifecycle
155
+
156
+ | Stage | Trigger | Action |
157
+ |---|---|---|
158
+ | Create | `/longrun prep` (or manual scaffold from template) at session start | Write file with frontmatter + populated bets/WSes |
159
+ | Update | Each WS status change (todo → in-flight → pr-open → merged) | Edit the matching row in `## Per-WS status` |
160
+ | Update | Each compaction event | Append to `## Compaction anchors` |
161
+ | Update | Each operator pivot / scope decision | Append to `## Operator decision log` |
162
+ | Close | `/longrun closeout` at session end | Set `session_ended` + `session_outcome` in frontmatter; run closeout audit checklist |
163
+
164
+ The board is **append-mostly** — old entries are not edited or
165
+ backfilled. The only mutations are status table cells and frontmatter
166
+ close fields. This preserves audit trail.
167
+
168
+ ## Composition with existing primitives
169
+
170
+ - **`docs/whereami.md`** — project-state snapshot (load-bearing per
171
+ `.claude/rules/whereami-load-bearing.md`). Session-board adds
172
+ session-level detail; whereami stays the project-level index. After
173
+ the pipeline bet's WS-2 ships, whereami's `active_sessions:` registry
174
+ will point at session-boards by file path.
175
+ - **`docs/iteration-bets/<slug>.md`** — scope contract per bet. The
176
+ session-board references each active bet's path; never duplicates the
177
+ bet's content.
178
+ - **`docs/branch-stacks/<slug>.md`** (or `docs/stacks/<slug>-stack.md`)
179
+ — per-bet stack manifest. Session-board references each manifest
180
+ path; the WS table aggregates across bets but each WS row points to
181
+ the per-bet manifest as authority.
182
+ - **`chronicle/<date>-<slug>.md`** — retrospective narrative. Orthogonal
183
+ to the session-board (chronicle is what-happened; session-board is
184
+ what's-happening-now). At session close, the chronicle MAY cite the
185
+ session-board as evidence; the chronicle does NOT replace it.
186
+
187
+ ## Relationship to `/longrun` skill
188
+
189
+ The `/longrun` skill (separate /promote, bassclef#274) consumes this
190
+ standard. Specifically:
191
+
192
+ - **`/longrun prep`** — writes the initial session-board from the
193
+ template
194
+ - **`/longrun checkpoint`** — updates `## Per-WS status` + appends to
195
+ `## Operator decision log`
196
+ - **`/longrun closeout`** — runs the audit checklist + sets close
197
+ frontmatter fields
198
+
199
+ Until `/longrun` ships (after Phase A0 of the pipeline bet), session
200
+ boards are written and updated manually using the template.
201
+
202
+ ## Anti-patterns
203
+
204
+ **Don't write a session-board for a singleton-bet session.** It adds
205
+ overhead without coordination value. Singleton-bet pickup uses
206
+ whereami + bet + stack manifest; that's sufficient.
207
+
208
+ **Don't duplicate bet content into the session-board.** If you find
209
+ yourself copying a bet's scope or risk register into the session-board,
210
+ stop — reference the goal path instead. The session-board is index +
211
+ status, not content.
212
+
213
+ **Don't silently retire or merge bets without updating the board.** The
214
+ status table is the source of truth for "what's alive." If a WS is
215
+ merged but the table still says `pr-open`, next-session pickup will be
216
+ confused.
217
+
218
+ **Don't backfill `## Operator decision log` after the fact.** The log is
219
+ append-only and timestamped. If a decision was missed at the time it
220
+ was made, append a current-time entry noting "retrospective: <summary>"
221
+ rather than fabricating a prior timestamp.
222
+
223
+ ## Enforcement
224
+
225
+ Methodology-level today. The `/longrun` skill, when shipped, will
226
+ enforce session-board presence on `/longrun prep` for any session
227
+ declaring multi-goal scope. Until then, agent self-checks at session
228
+ start: "Am I about to manage ≥2 bets simultaneously? If yes, write a
229
+ session-board before starting work."
230
+
231
+ ## Override
232
+
233
+ Singleton-bet or single-phase sessions skip this artifact entirely. No
234
+ override needed — the trigger condition (multi-bet OR multi-phase) is
235
+ the only entry. If neither holds, the session-board is not the right
236
+ tool.
237
+
238
+ ## Retirement condition
239
+
240
+ If multi-bet longrun sessions are abandoned as a pattern (operator
241
+ prefers strict one-bet-per-session discipline), this standard retires
242
+ along with the `/longrun` skill. Until then, this standard is
243
+ load-bearing for any session that triggers the conditions above.
244
+
245
+ ## Relationship to other standards/rules
246
+
247
+ - `standards/branch-stacking.md` — per-bet stack manifest pattern; this
248
+ standard adds the session-level layer above it
249
+ - `.claude/rules/whereami-load-bearing.md` — project-level state
250
+ artifact; this standard is the session-level peer
251
+ - `.claude/rules/artifact-ingestion.md` — the `## Sources read` block
252
+ pattern this standard's body uses
253
+ - `.claude/rules/context-management.md` — survival kit declaration in
254
+ `## Compaction anchors` is the post-compaction re-read list
255
+ - bassclef#274 — `/longrun` skill (consumes this standard)
256
+ - bassclef#273 — promotion issue this standard closes