@thebassclef/lite 0.1.2 → 1.0.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 (293) hide show
  1. package/dist/cli.cjs +238 -127
  2. package/dist/cli.js +240 -129
  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/.bassclef-source.json +10 -0
  7. package/dist/lite/.claude/settings.json +212 -0
  8. package/dist/lite/CLAUDE.md +41 -0
  9. package/dist/lite/gitignore +58 -0
  10. package/dist/lite/standards/bassclef-wiring-manifest.json +497 -0
  11. package/dist/lite/whereami.md +24 -0
  12. package/package.json +8 -2
  13. package/substrate/.bassclef/lite-manifest.json +0 -2701
  14. package/substrate/.claude/agents/architect.md +0 -70
  15. package/substrate/.claude/agents/builder.md +0 -114
  16. package/substrate/.claude/agents/designer.md +0 -156
  17. package/substrate/.claude/agents/reviewer.md +0 -88
  18. package/substrate/.claude/hooks/artifact-ingestion-gate.sh +0 -357
  19. package/substrate/.claude/hooks/assert-verify-steering.sh +0 -77
  20. package/substrate/.claude/hooks/bassclef-source-config-validate.sh +0 -215
  21. package/substrate/.claude/hooks/bassclef-sync.sh +0 -634
  22. package/substrate/.claude/hooks/compound-noun-scrub.sh +0 -292
  23. package/substrate/.claude/hooks/kiss-expansion-inject.sh +0 -69
  24. package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +0 -492
  25. package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +0 -492
  26. package/substrate/.claude/hooks/plain-english-steering.sh +0 -156
  27. package/substrate/.claude/hooks/post-skill-friction-check.sh +0 -177
  28. package/substrate/.claude/hooks/post-skill-telemetry.sh +0 -62
  29. package/substrate/.claude/hooks/pre-build-gate.sh +0 -511
  30. package/substrate/.claude/hooks/pre-commit-gate.sh +0 -451
  31. package/substrate/.claude/hooks/session-end.sh +0 -433
  32. package/substrate/.claude/hooks/session-reflection.sh +0 -303
  33. package/substrate/.claude/hooks/skill-body-grade-gate.sh +0 -219
  34. package/substrate/.claude/hooks/skill-body-intent-drift.sh +0 -107
  35. package/substrate/.claude/hooks/skill-step-list-check.sh +0 -171
  36. package/substrate/.claude/hooks/state-validate.sh +0 -271
  37. package/substrate/.claude/hooks/substrate-clarity-gate.sh +0 -1110
  38. package/substrate/.claude/hooks/temperance-gate.sh +0 -147
  39. package/substrate/.claude/hooks/testing-tier-enforce.sh +0 -233
  40. package/substrate/.claude/hooks/turn-prose-grade-measure.sh +0 -219
  41. package/substrate/.claude/hooks/turn-prose-kiss-check.sh +0 -463
  42. package/substrate/.claude/hooks/vocabulary-migration-check.sh +0 -171
  43. package/substrate/.claude/hooks/whereami-utc-gate.sh +0 -142
  44. package/substrate/.claude/luminaries/alan-cooper.md +0 -170
  45. package/substrate/.claude/luminaries/alistair-cockburn.md +0 -140
  46. package/substrate/.claude/luminaries/amazon-pr-faq.md +0 -34
  47. package/substrate/.claude/luminaries/ash-maurya.md +0 -121
  48. package/substrate/.claude/luminaries/bill-buxton.md +0 -210
  49. package/substrate/.claude/luminaries/charles-sanders-peirce.md +0 -150
  50. package/substrate/.claude/luminaries/david-ogilvy.md +0 -192
  51. package/substrate/.claude/luminaries/don-norman.md +0 -173
  52. package/substrate/.claude/luminaries/edward-tufte.md +0 -179
  53. package/substrate/.claude/luminaries/eric-evans.md +0 -160
  54. package/substrate/.claude/luminaries/frederick-brooks.md +0 -50
  55. package/substrate/.claude/luminaries/gang-of-four.md +0 -157
  56. package/substrate/.claude/luminaries/glenford-myers.md +0 -230
  57. package/substrate/.claude/luminaries/hunt-thomas.md +0 -115
  58. package/substrate/.claude/luminaries/hyrum-wright.md +0 -94
  59. package/substrate/.claude/luminaries/jason-fried-dhh.md +0 -46
  60. package/substrate/.claude/luminaries/jesse-james-garrett.md +0 -154
  61. package/substrate/.claude/luminaries/john-ousterhout.md +0 -94
  62. package/substrate/.claude/luminaries/karl-popper.md +0 -132
  63. package/substrate/.claude/luminaries/kent-beck.md +0 -168
  64. package/substrate/.claude/luminaries/linus-torvalds.md +0 -218
  65. package/substrate/.claude/luminaries/martin-fowler.md +0 -164
  66. package/substrate/.claude/luminaries/michael-feathers.md +0 -125
  67. package/substrate/.claude/luminaries/michael-nygard.md +0 -118
  68. package/substrate/.claude/luminaries/robert-c-martin.md +0 -164
  69. package/substrate/.claude/luminaries/saltzer-schroeder.md +0 -194
  70. package/substrate/.claude/luminaries/sophia-prater.md +0 -193
  71. package/substrate/.claude/luminaries/stephen-toulmin.md +0 -131
  72. package/substrate/.claude/luminaries/tony-hoare.md +0 -170
  73. package/substrate/.claude/luminaries/vaughn-vernon.md +0 -50
  74. package/substrate/.claude/luminaries/w-edwards-deming.md +0 -158
  75. package/substrate/.claude/rules/accessor-library-discipline.md +0 -138
  76. package/substrate/.claude/rules/adr-discipline.md +0 -120
  77. package/substrate/.claude/rules/api-conventions.md +0 -125
  78. package/substrate/.claude/rules/artifact-ingestion.md +0 -179
  79. package/substrate/.claude/rules/assert-only-after-verify.md +0 -137
  80. package/substrate/.claude/rules/blocked-items.md +0 -146
  81. package/substrate/.claude/rules/bootstrap-pair-discipline.md +0 -141
  82. package/substrate/.claude/rules/branching.md +0 -28
  83. package/substrate/.claude/rules/cold-adopter-harness-discipline.md +0 -129
  84. package/substrate/.claude/rules/commit-conventions.md +0 -22
  85. package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +0 -188
  86. package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +0 -188
  87. package/substrate/.claude/rules/context-engineering.md +0 -202
  88. package/substrate/.claude/rules/context-management.md +0 -85
  89. package/substrate/.claude/rules/defensive-bash.md +0 -68
  90. package/substrate/.claude/rules/deferred-actions.md +0 -233
  91. package/substrate/.claude/rules/destructive-operations.md +0 -69
  92. package/substrate/.claude/rules/diagnosis.md +0 -38
  93. package/substrate/.claude/rules/github-issue-flash-tweet.md +0 -156
  94. package/substrate/.claude/rules/guardrails.md +0 -73
  95. package/substrate/.claude/rules/hook-wire-on-author.md +0 -103
  96. package/substrate/.claude/rules/identifier-leak-prevention.md +0 -104
  97. package/substrate/.claude/rules/iteration-bet-brief-completeness.md +0 -54
  98. package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +0 -98
  99. package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +0 -89
  100. package/substrate/.claude/rules/loop-discipline.md +0 -81
  101. package/substrate/.claude/rules/manual-prod-approval.md +0 -100
  102. package/substrate/.claude/rules/marker-enrichment-discipline.md +0 -99
  103. package/substrate/.claude/rules/mobile-ephemeral-session.md +0 -109
  104. package/substrate/.claude/rules/new-dependency-check.md +0 -51
  105. package/substrate/.claude/rules/oo-ad-entry-point.md +0 -117
  106. package/substrate/.claude/rules/operator-facing-prose.md +0 -196
  107. package/substrate/.claude/rules/option-label-discipline.md +0 -108
  108. package/substrate/.claude/rules/pattern-annotation.md +0 -100
  109. package/substrate/.claude/rules/plain-english-discipline.md +0 -156
  110. package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +0 -211
  111. package/substrate/.claude/rules/pr-body-shape.md +0 -317
  112. package/substrate/.claude/rules/pr-strategy.md +0 -167
  113. package/substrate/.claude/rules/pr-title-shape.md +0 -161
  114. package/substrate/.claude/rules/prototype-workflow.md +0 -65
  115. package/substrate/.claude/rules/reserved-skill-names.md +0 -123
  116. package/substrate/.claude/rules/schema-management.md +0 -49
  117. package/substrate/.claude/rules/sdlc-gates.md +0 -149
  118. package/substrate/.claude/rules/security.md +0 -37
  119. package/substrate/.claude/rules/session-artifacts.md +0 -236
  120. package/substrate/.claude/rules/skill-composition-declarations.md +0 -124
  121. package/substrate/.claude/rules/skill-description-clarity.md +0 -247
  122. package/substrate/.claude/rules/skill-procedure-step-list.md +0 -137
  123. package/substrate/.claude/rules/state-schema-validation.md +0 -162
  124. package/substrate/.claude/rules/stuck-signal-diagnostic.md +0 -140
  125. package/substrate/.claude/rules/substrate-config-schema.md +0 -98
  126. package/substrate/.claude/rules/test-list-discipline.md +0 -175
  127. package/substrate/.claude/rules/test-sufficiency.md +0 -210
  128. package/substrate/.claude/rules/testing-tier-config.md +0 -145
  129. package/substrate/.claude/rules/testing.md +0 -38
  130. package/substrate/.claude/rules/turn-estimate-grounding.md +0 -134
  131. package/substrate/.claude/rules/visual-hierarchy.md +0 -437
  132. package/substrate/.claude/rules/we-dont-break-adopters.md +0 -126
  133. package/substrate/.claude/rules/whereami-load-bearing.md +0 -202
  134. package/substrate/.claude/rules/writing-craft-discipline.md +0 -92
  135. package/substrate/.claude/rules/wu-sequencing-compounds.md +0 -145
  136. package/substrate/.claude/skills/build/SKILL.md +0 -640
  137. package/substrate/.claude/skills/chronicle/SKILL.md +0 -55
  138. package/substrate/.claude/skills/clean-artifacts/SKILL.md +0 -249
  139. package/substrate/.claude/skills/decompose/SKILL.md +0 -280
  140. package/substrate/.claude/skills/diagnose/SKILL.md +0 -297
  141. package/substrate/.claude/skills/feynman/SKILL.md +0 -90
  142. package/substrate/.claude/skills/howdoi/SKILL.md +0 -105
  143. package/substrate/.claude/skills/ia-model/SKILL.md +0 -108
  144. package/substrate/.claude/skills/interaction-design/SKILL.md +0 -112
  145. package/substrate/.claude/skills/interpret-input/SKILL.md +0 -180
  146. package/substrate/.claude/skills/journal/SKILL.md +0 -209
  147. package/substrate/.claude/skills/kiss/SKILL.md +0 -449
  148. package/substrate/.claude/skills/launch/SKILL.md +0 -915
  149. package/substrate/.claude/skills/lean-canvas/SKILL.md +0 -332
  150. package/substrate/.claude/skills/longrun/SKILL.md +0 -463
  151. package/substrate/.claude/skills/luminary/SKILL.md +0 -481
  152. package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +0 -177
  153. package/substrate/.claude/skills/onboard-repo/SKILL.md +0 -1624
  154. package/substrate/.claude/skills/pattern-review/SKILL.md +0 -99
  155. package/substrate/.claude/skills/personas/SKILL.md +0 -207
  156. package/substrate/.claude/skills/promote/SKILL.md +0 -283
  157. package/substrate/.claude/skills/requirement/SKILL.md +0 -98
  158. package/substrate/.claude/skills/retro/SKILL.md +0 -117
  159. package/substrate/.claude/skills/riff/SKILL.md +0 -114
  160. package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +0 -163
  161. package/substrate/.claude/skills/session-end/SKILL.md +0 -309
  162. package/substrate/.claude/skills/session-log/SKILL.md +0 -299
  163. package/substrate/.claude/skills/skills/SKILL.md +0 -228
  164. package/substrate/.claude/skills/spec/SKILL.md +0 -105
  165. package/substrate/.claude/skills/sprint/SKILL.md +0 -392
  166. package/substrate/.claude/skills/stage/SKILL.md +0 -384
  167. package/substrate/.claude/skills/state-a-problem/SKILL.md +0 -185
  168. package/substrate/.claude/skills/temperance/SKILL.md +0 -108
  169. package/substrate/.claude/skills/use-case/SKILL.md +0 -417
  170. package/substrate/.claude/skills/user-stories/SKILL.md +0 -268
  171. package/substrate/.claude/skills/value-prop/SKILL.md +0 -251
  172. package/substrate/.claude/skills/verify/SKILL.md +0 -160
  173. package/substrate/.claude/skills/visual-review/SKILL.md +0 -503
  174. package/substrate/.claude/skills/whats-the-plan/SKILL.md +0 -202
  175. package/substrate/.claude/skills/whereami/SKILL.md +0 -307
  176. package/substrate/AGENTS.md +0 -79
  177. package/substrate/CLAUDE-lite.md +0 -85
  178. package/substrate/CODE_OF_CONDUCT.md +0 -28
  179. package/substrate/CONTRIBUTING.md +0 -177
  180. package/substrate/README.md +0 -173
  181. package/substrate/SECURITY.md +0 -19
  182. package/substrate/architecture/decisions/ADR-029-release-pipeline.md +0 -79
  183. package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +0 -139
  184. package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +0 -192
  185. package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +0 -145
  186. package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +0 -155
  187. package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +0 -162
  188. package/substrate/lib/clean-artifacts-sweep.sh +0 -112
  189. package/substrate/lib/code-comment-discipline.sh +0 -144
  190. package/substrate/lib/composer-preflight.sh +0 -459
  191. package/substrate/lib/hook-inject.sh +0 -255
  192. package/substrate/lib/luminary-pick.sh +0 -96
  193. package/substrate/lib/output-discipline.sh +0 -143
  194. package/substrate/lib/prose-scan-boundary.sh +0 -171
  195. package/substrate/lib/rewrite-check.sh +0 -214
  196. package/substrate/lib/state.sh +0 -1372
  197. package/substrate/lib/telemetry.sh +0 -205
  198. package/substrate/lib/tier-check.sh +0 -187
  199. package/substrate/lib/tier-dependency-audit.sh +0 -1088
  200. package/substrate/presence/install/bassclef-hook-connect.sh +0 -178
  201. package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +0 -841
  202. package/substrate/presence/install/bassclef-sync.template.sh +0 -2076
  203. package/substrate/presence/install/schedule-auto-save.cron.sh +0 -88
  204. package/substrate/presence/install/schedule-auto-save.taskscheduler.md +0 -122
  205. package/substrate/scripts/aggregate-telemetry.sh +0 -217
  206. package/substrate/scripts/analyze-tier-dependencies.sh +0 -239
  207. package/substrate/scripts/generate-lite-manifest.sh +0 -505
  208. package/substrate/scripts/generate-tier-manifest.sh +0 -28
  209. package/substrate/scripts/intent-drift-check.sh +0 -456
  210. package/substrate/scripts/lite-manifest-drift-check.sh +0 -146
  211. package/substrate/scripts/render-lite-manifest-doc.sh +0 -150
  212. package/substrate/standards/adr-template.md +0 -86
  213. package/substrate/standards/api-conventions/nextjs.md +0 -84
  214. package/substrate/standards/artifact-composition.md +0 -209
  215. package/substrate/standards/bash-hook-safety.md +0 -246
  216. package/substrate/standards/bassclef-configs-schema.md +0 -232
  217. package/substrate/standards/bassclef-evolution.md +0 -143
  218. package/substrate/standards/bassclef-internal-jargon.md +0 -244
  219. package/substrate/standards/bassclef-managed-sentinel.md +0 -96
  220. package/substrate/standards/bassclef-source-config.md +0 -228
  221. package/substrate/standards/branch-stacking.md +0 -408
  222. package/substrate/standards/code-safety-principles.md +0 -176
  223. package/substrate/standards/composer-prerequisites.md +0 -155
  224. package/substrate/standards/deferred-actions-schema.md +0 -204
  225. package/substrate/standards/dependency-discipline/cargo.md +0 -39
  226. package/substrate/standards/dependency-discipline/gem.md +0 -43
  227. package/substrate/standards/dependency-discipline/go-mod.md +0 -41
  228. package/substrate/standards/dependency-discipline/npm.md +0 -42
  229. package/substrate/standards/dependency-discipline/pip.md +0 -42
  230. package/substrate/standards/deployment-topology/ec2-tailscale.md +0 -225
  231. package/substrate/standards/deployment-topology.md +0 -69
  232. package/substrate/standards/docs-sync-allowlist.md +0 -76
  233. package/substrate/standards/domain-and-dns.md +0 -145
  234. package/substrate/standards/frontend-stack.md +0 -67
  235. package/substrate/standards/frontmatter-schema.md +0 -154
  236. package/substrate/standards/graceful-exit.md +0 -227
  237. package/substrate/standards/hook-idempotency.md +0 -102
  238. package/substrate/standards/hook-injection-discipline.md +0 -202
  239. package/substrate/standards/hook-install-class.md +0 -215
  240. package/substrate/standards/input-handler-interface.md +0 -152
  241. package/substrate/standards/lite-manifest-schema-changes.md +0 -135
  242. package/substrate/standards/luminary-matching.md +0 -105
  243. package/substrate/standards/luminary-problem-patterns.md +0 -481
  244. package/substrate/standards/migration-discipline/active-record.md +0 -50
  245. package/substrate/standards/migration-discipline/alembic.md +0 -43
  246. package/substrate/standards/migration-discipline/gorm.md +0 -50
  247. package/substrate/standards/migration-discipline/prisma.md +0 -53
  248. package/substrate/standards/migration-discipline/sqlalchemy.md +0 -51
  249. package/substrate/standards/mobile-ephemeral-session.md +0 -167
  250. package/substrate/standards/model-routing-discipline.md +0 -160
  251. package/substrate/standards/ogilvy-writing-rules.md +0 -225
  252. package/substrate/standards/opener-discipline.md +0 -96
  253. package/substrate/standards/operator-facing-prose-discipline.md +0 -201
  254. package/substrate/standards/persona-schema.md +0 -229
  255. package/substrate/standards/pluggable-luminaries.md +0 -323
  256. package/substrate/standards/pr-body-discipline.md +0 -115
  257. package/substrate/standards/preview-state-schema.md +0 -189
  258. package/substrate/standards/project-directory-layout.md +0 -276
  259. package/substrate/standards/release-tagging.md +0 -137
  260. package/substrate/standards/reserved-skill-names.md +0 -120
  261. package/substrate/standards/scannable-multi-option-output.md +0 -261
  262. package/substrate/standards/sdlc-compliance.md +0 -286
  263. package/substrate/standards/sdlc-gates/typescript.md +0 -57
  264. package/substrate/standards/secrets-lifecycle.md +0 -210
  265. package/substrate/standards/security-scanner-adapter.md +0 -145
  266. package/substrate/standards/session-board.md +0 -256
  267. package/substrate/standards/skill-output-discipline.md +0 -90
  268. package/substrate/standards/state-spine-contract.md +0 -255
  269. package/substrate/standards/state-spine.md +0 -511
  270. package/substrate/standards/steering-hints/kiss-words.md +0 -11
  271. package/substrate/standards/substrate-config-schema.md +0 -267
  272. package/substrate/standards/tech-stack-config.md +0 -109
  273. package/substrate/standards/tier-dependency-analysis.md +0 -167
  274. package/substrate/standards/tier-runtime-deps/lite.md +0 -57
  275. package/substrate/standards/tier-tag-schema.md +0 -155
  276. package/substrate/standards/two-layer-config.md +0 -99
  277. package/substrate/standards/use-case-format.md +0 -292
  278. package/substrate/standards/user-story-invest.md +0 -268
  279. package/substrate/standards/velocity-and-appetite.md +0 -229
  280. package/substrate/standards/voice-input-pattern.md +0 -119
  281. package/substrate/standards/whereami-schema.md +0 -301
  282. package/substrate/standards/worktree-management.md +0 -211
  283. package/substrate/standards/writing-guide.md +0 -213
  284. package/substrate/templates/chronicle-template.md +0 -75
  285. package/substrate/templates/deferred-action-template.md +0 -45
  286. package/substrate/templates/memory-proposal-template.md +0 -77
  287. package/substrate/templates/persona-template.md +0 -200
  288. package/substrate/templates/pr-faq.md +0 -45
  289. package/substrate/templates/secret-rotation-template.md +0 -162
  290. package/substrate/templates/spec-template.md +0 -131
  291. package/substrate/templates/use-case-template.md +0 -194
  292. package/substrate/templates/user-story-template.md +0 -107
  293. package/substrate/templates/whereami-template.md +0 -101
@@ -1,301 +0,0 @@
1
- ---
2
- tier: lite
3
- description: docs/whereami.md is the authoritative project-state snapshot in any bassclef-substrate repo.
4
- ---
5
-
6
- # Whereami Schema
7
-
8
- `docs/whereami.md` is the **authoritative project-state snapshot** in
9
- any bassclef-substrate repo. One per repo, maintained at session-end,
10
- read at session-start. Functionally it is the current-state header —
11
- whereas `docs/iteration-bets/` holds the goal.contracts and `chronicle/`
12
- holds the narrative log, `whereami.md` answers "where is the project
13
- right now?" in one glance.
14
-
15
- ## Why this exists
16
-
17
- Before this standard: each agent reconstructed project state by
18
- reading iteration-bets + chronicles + git log + substrate.config.md
19
- at session-start. This reconstruction:
20
-
21
- - Duplicates ~5 reads per session-start
22
- - Drifts silently when phase or iteration changes without cross-artifact
23
- updates
24
- - Produces inconsistent answers to "what phase are we in?" depending on
25
- which agent asked and which files it read
26
-
27
- Making whereami load-bearing solves all three by establishing one
28
- source, maintained at session boundaries.
29
-
30
- ## The artifact
31
-
32
- Location: `docs/whereami.md` (every consumer repo). Bassclef itself
33
- maintains one at the same path.
34
-
35
- Format: Markdown with a standard structure (schema below). Plain prose
36
- allowed in descriptive fields. No YAML frontmatter — simpler to eyeball.
37
-
38
- ## Schema
39
-
40
- Nine sections, in this order. Missing fields acceptable when no data
41
- exists yet (new repo, no active iteration); empty sections MUST render
42
- as "—" rather than be omitted, so the reader knows what's unset vs. what
43
- was forgotten.
44
-
45
- Section 2a (Active sessions registry) is OPTIONAL in singleton mode and
46
- REQUIRED in plural / parallel mode. Section count is "8 + optional 1."
47
-
48
- ### 1. Project-level phase
49
-
50
- ```markdown
51
- ## Project-level phase
52
-
53
- phase: [Inception | Elaboration | Construction | Transition]
54
- note: [one-paragraph description of what this phase means for this repo]
55
- ```
56
-
57
- Bassclef values only. If you're tempted to write a custom phase, the
58
- project is either between standard phases (write "Construction, tail
59
- end of iteration X") or the phase model doesn't fit (surface as a
60
- bassclef-evolution proposal, don't invent a value).
61
-
62
- ### 2. Active iteration
63
-
64
- Two shapes — singleton (sequential mode, one goal at a time) and plural
65
- (parallel mode, multiple bets in flight on the same repo). Singleton is
66
- the bassclef default; plural is the parallel-fanout extension (Phase
67
- A WS-2 of example-pipeline bet).
68
-
69
- #### Singleton (default — sequential mode)
70
-
71
- ```markdown
72
- ## Active iteration
73
-
74
- iteration_bet: [path to current bet, or "none — between iterations"]
75
- iteration_started: [YYYY-MM-DD]
76
- iteration_phase: [current WS or stage within the goal. or "—"]
77
- previous_bet: [path to last closed bet]
78
- next_bet: [one-line description of planned next bet, or "—"]
79
- ```
80
-
81
- If `iteration_bet` is "none," `iteration_phase` MUST be "—".
82
-
83
- #### Plural (parallel mode — Stage 4+)
84
-
85
- ```markdown
86
- ## Active iteration
87
-
88
- iteration_bets:
89
- - bet: docs/iteration-bets/2026-04-25-example-pipeline.md
90
- started: 2026-04-25
91
- phase: Phase A
92
- session: 2026-04-26-phase-a-autonomous
93
- - bet: docs/iteration-bets/2026-04-26-quorum-prototype-gallery.md
94
- started: 2026-04-26
95
- phase: WS-1
96
- session: 2026-04-26-quorum-wire
97
- previous_bet: [path to last closed bet]
98
- next_bet: [one-line description of planned next bet, or "—"]
99
- ```
100
-
101
- **Backward-compatibility window**: readers MUST accept BOTH the
102
- singleton field (`iteration_bet:`) AND the plural field
103
- (`iteration_bets:`). Writers in sequential mode SHOULD continue using
104
- the singleton form. The plural form activates when ≥2 bets are
105
- in-flight against the same repo — typically via worktree-based
106
- parallel sessions. Plural form deprecates singleton 30 days after
107
- parallel-mode adoption stabilizes; until then both are valid.
108
-
109
- ### 2a. Active sessions registry (parallel mode)
110
-
111
- ```markdown
112
- ## Active sessions
113
-
114
- active_sessions:
115
- - session_id: 2026-04-26-phase-a-autonomous
116
- started: 2026-04-26T01:00:00+0000
117
- working_dir: /Users/<operator>/src/<org>/bassclef
118
- agent: orchestrator-gated-sequential
119
- bet: docs/iteration-bets/2026-04-25-example-pipeline.md
120
- tier: longrun
121
- - session_id: 2026-04-26-quorum-wire
122
- started: 2026-04-26T02:30:00+0000
123
- working_dir: /Users/<operator>/src/<org>/bassclef-quorum-worktree
124
- agent: builder
125
- bet: docs/iteration-bets/2026-04-26-quorum-prototype-gallery.md
126
- tier: short
127
- ```
128
-
129
- Empty when only one session is active (singleton mode). Each session
130
- appends an entry at `/longrun prep` and removes its entry at
131
- `/longrun closeout`. Stale entries (session_id has no live process
132
- AND age > 24h) are reaped by `bassclef-sync.sh` session-start hook.
133
-
134
- The session-id MUST match the session-board filename slug (per
135
- `standards/session-board.md`) so cross-references resolve cleanly.
136
-
137
- ### 3. Active agents
138
-
139
- ```markdown
140
- ## Active agents
141
-
142
- [sequential mode]
143
- - [role-name] ([current task])
144
-
145
- [multi-agent mode]
146
- - [role-name] on branch [branch-name] ([status])
147
- ```
148
-
149
- For sequential sessions, typically one entry. For multi-agent /
150
- multi-worktree sessions, one entry per active agent. If between
151
- iterations: "None (between iterations)".
152
-
153
- ### 4. Subsystem phases (table)
154
-
155
- ```markdown
156
- ## Subsystem phases
157
-
158
- | Subsystem | Phase | Last iteration | Notes |
159
- |-----------|-------|---------------|-------|
160
- | [name] | [phase] | [YYYY-MM-DD] | [one-line] |
161
- ```
162
-
163
- Subsystems are the repo's own decomposition — in bassclef, these are
164
- standards / skills / agents / SDLC-process / session-continuity /
165
- design-system. Each consumer repo defines its own list.
166
-
167
- ### 5. Gate progress (project-level)
168
-
169
- ```markdown
170
- ## Gate progress (project-level)
171
-
172
- ### Inception — [COMPLETE (YYYY-MM-DD) | IN PROGRESS | PENDING]
173
- - [x] Vision doc
174
- - [x] Risk register populated
175
- ...
176
-
177
- ### Elaboration — [status]
178
- - [ ] ADRs drafted
179
- ...
180
-
181
- ### Construction — [status]
182
- ...
183
-
184
- ### Transition — [status]
185
- ...
186
- ```
187
-
188
- Checkbox format. Gate items are repo-specific. Bassclef values
189
- only for phase status: COMPLETE / IN PROGRESS / PENDING.
190
-
191
- ### 6. Risk register
192
-
193
- ```markdown
194
- ## Risk register
195
-
196
- See docs/risk-register.md
197
- ```
198
-
199
- One-line pointer. The register itself is a separate artifact; this
200
- field just establishes the reference. If no register exists, write
201
- "none yet — file when first risk materializes."
202
-
203
- ### 7. Last updated (MUST)
204
-
205
- ```markdown
206
- ## Last updated
207
-
208
- 2026-04-16T19:00:00Z — session-end
209
- session: [chronicle filename, e.g., 2026-04-16c-plan-declaration-and-whereami.md]
210
- ```
211
-
212
- ISO 8601 UTC timestamp. Auto-stamped by `/session-end` skill when it
213
- updates whereami. Hook-read to detect staleness.
214
-
215
- ### 8. Configuration pointer
216
-
217
- ```markdown
218
- ## Configuration
219
-
220
- See substrate.config.md for external resource references.
221
- ```
222
-
223
- One-line pointer. Decouples state tracking (whereami) from resource
224
- references (substrate.config.md) — both are single-source but for
225
- different concerns.
226
-
227
- ## Freshness rules
228
-
229
- Hook-enforced via `bassclef-sync.sh` section emitted on session-start:
230
-
231
- - `last_updated` newer than 3 days → green, session proceeds normally
232
- - `last_updated` 3–7 days old → warning surfaced, session proceeds
233
- - `last_updated` older than 7 days → BLOCKED (per `blocked-items.md`)
234
- - File missing → BLOCKED
235
-
236
- Threshold is tuneable. 3 days v1 default. Consumer repos may override
237
- via `substrate.config.md` field (proposed: `whereami_freshness_days`).
238
-
239
- ## Who updates it
240
-
241
- | Trigger | Who | Action |
242
- |---------|-----|--------|
243
- | Session end | `/session-end` skill (MUST tier) | Update last_updated + any field that changed |
244
- | Phase transition | Closer / operator | Update phase + gate progress |
245
- | Iteration start | `/autonomous start` or equivalent | Update iteration_bet + active agents |
246
- | Iteration end | `/session-end` + closeout | Update previous_bet; clear iteration_phase |
247
- | Subsystem change | Agent performing the change | Update subsystem row with one-line + date |
248
-
249
- ## Who reads it
250
-
251
- | Reader | When | What it expects |
252
- |--------|------|-----------------|
253
- | `/sprint` skill | Session-start orientation | Primary source (no longer fallback) |
254
- | `bassclef-sync.sh` hook | Session-start | Freshness check only |
255
- | `/substrate-check` skill | On-demand validation | Presence + schema conformance |
256
- | Operator eyeballing | Any time | Human-readable summary |
257
- | Chronicle writer | Session-end | Phase context for narrative |
258
-
259
- ## What whereami is NOT
260
-
261
- - **Not the iteration goal** — iteration goal is the scope contract for
262
- the current work; whereami references it by path
263
- - **Not the chronicle** — chronicle is retrospective narrative;
264
- whereami is current snapshot
265
- - **Not substrate.config.md** — that file is resource references
266
- (where is X); whereami is state (where are we)
267
- - **Not a risk register** — register is a separate artifact; whereami
268
- points to it
269
- - **Not an ADR log** — ADRs are decisions; whereami is state
270
- - **Not `/sprint` output** — `/sprint` READS whereami; it doesn't
271
- replace it
272
-
273
- ## Relationship to other standards
274
-
275
- - `standards/substrate-config-schema.md` — same single-source-of-truth
276
- pattern, different concern (resources vs. state)
277
- - `strategy/session-continuity.md` — three-layer memory architecture
278
- where whereami is the "current state" layer
279
- - `strategy/agent-choreography.md` — which agent updates whereami at
280
- which gate is defined here
281
- - `.claude/rules/whereami-load-bearing.md` — enforces read + write
282
- obligations per session
283
-
284
- ## Template
285
-
286
- See `templates/whereami-template.md` for a fillable starting
287
- point. `/autonomous start` creates one when scaffolding a new repo.
288
-
289
- ## Scrutiny
290
-
291
- Bar for adding a schema: the artifact must have load-bearing behavior
292
- elsewhere in the methodology, or it's documentation for documentation's
293
- sake. Whereami meets the bar because:
294
-
295
- 1. `/sprint` will read it as primary source (not fallback)
296
- 2. `bassclef-sync.sh` will block on staleness
297
- 3. `/session-end` will write to it as MUST tier
298
- 4. `/substrate-check` will validate its shape
299
-
300
- Without those four hooks, this standard would be shelfware. Ship the
301
- hooks with the schema.
@@ -1,211 +0,0 @@
1
- ---
2
- tier: lite
3
- description: Defines the lifecycle for git worktrees in autonomous agent sessions.
4
- ---
5
-
6
- # Worktree Management Standard
7
-
8
- Defines the lifecycle for git worktrees in autonomous agent sessions.
9
- Worktrees enable parallel branch work but create operational hazards when
10
- agents crash, hit rate limits, or exhaust context without cleanup.
11
-
12
- This standard applies whenever agents use `git worktree add` — whether
13
- in parallel autonomous mode or manual multi-branch work.
14
-
15
- ---
16
-
17
- ## Worktree Lifecycle
18
-
19
- ```
20
- CREATE → WORK → COMMIT → PR → CLEANUP
21
- ```
22
-
23
- Every worktree must complete this lifecycle. A worktree that skips CLEANUP
24
- leaves a branch lock, consumes disk, and confuses the next session.
25
-
26
- ---
27
-
28
- ## Pre-Session Audit (MUST — session start)
29
-
30
- Before creating any new worktrees, audit existing ones:
31
-
32
- ```bash
33
- git worktree list
34
- ```
35
-
36
- For each worktree that is not the main working tree:
37
-
38
- 1. **Check if prunable**: `git worktree list` shows `prunable` for worktrees
39
- whose directory no longer exists
40
- 2. **Check age**: if the worktree is from a previous session (different date
41
- or session ID), it is stale
42
- 3. **Check for uncommitted work**: `git -C <worktree-path> status` — if dirty,
43
- the previous agent died mid-work
44
-
45
- ### Stale worktree resolution
46
-
47
- | State | Action |
48
- |-------|--------|
49
- | Prunable (directory gone) | `git worktree prune` — safe, just cleans metadata |
50
- | Clean (no uncommitted changes) | `git worktree remove <path>` — safe to remove |
51
- | Dirty (uncommitted changes) | Commit as `chore: wip — recovered from stale worktree`, then remove |
52
- | Branch has open PR | Remove worktree, leave PR open for review |
53
- | Branch has no PR and no useful commits | Remove worktree, delete branch |
54
-
55
- Present stale worktrees to the operator at session start. In orchestrator-gated
56
- mode, auto-clean prunable and clean worktrees; prompt for dirty ones.
57
-
58
- The session-start hook should surface stale worktrees. If it doesn't, the
59
- agent checks manually.
60
-
61
- ---
62
-
63
- ## Creating Worktrees
64
-
65
- ### Naming convention
66
-
67
- ```
68
- .claude/worktrees/<slug>
69
- ```
70
-
71
- Where `<slug>` matches the branch's short description. Example:
72
- `feature/100-stack-1-worktree-mgmt` → `.claude/worktrees/worktree-mgmt`
73
-
74
- ### Creation checklist
75
-
76
- 1. Verify the branch doesn't already exist: `git branch --list <name>`
77
- 2. Create from main (not from another worktree's branch):
78
- ```bash
79
- git worktree add .claude/worktrees/<slug> -b <branch-name>
80
- ```
81
- 3. Record the worktree in the stack manifest if one exists
82
- 4. Never `cd` into the worktree — use `git -C <path>` for all operations
83
-
84
- ### Why never `cd` into a worktree
85
-
86
- If the agent's working directory is inside a worktree and the worktree is
87
- removed (by cleanup, crash recovery, or another agent), the shell's cwd
88
- becomes invalid. All subsequent commands fail with "Unable to read current
89
- working directory." This was observed in POA parallel run 2026-04-07.
90
-
91
- Instead:
92
- ```bash
93
- # Good — run from main working tree
94
- git -C .claude/worktrees/my-feature add .
95
- git -C .claude/worktrees/my-feature commit -m "feat: description"
96
-
97
- # Bad — changes cwd, creates cleanup hazard
98
- cd .claude/worktrees/my-feature
99
- git add .
100
- ```
101
-
102
- ---
103
-
104
- ## File Watcher Conflicts
105
-
106
- ### Problem
107
-
108
- Dev servers (Next.js, Vite), linters (ESLint watch mode), formatters
109
- (Prettier watch), and IDE file sync tools monitor the filesystem. When a
110
- worktree agent writes a file, watchers may:
111
-
112
- - Revert the file to their cached state
113
- - Trigger a rebuild that overwrites agent output
114
- - Lock files that the agent needs to write
115
-
116
- ### Mitigation
117
-
118
- Before creating worktrees for parallel work:
119
-
120
- 1. **Stop all file watchers**: dev server, lint --watch, test --watch
121
- 2. **Check for processes holding files**:
122
- ```bash
123
- lsof +D <worktree-path> 2>/dev/null
124
- ```
125
- 3. **If watchers can't be stopped** (e.g., IDE integration), document in
126
- the stack manifest that this branch is not parallel-safe
127
-
128
- The `/autonomous start` boot sequence should check for running dev servers
129
- and warn before spawning parallel agents.
130
-
131
- ### IDE-specific notes
132
-
133
- - **VS Code**: File watcher is aggressive. If the worktree is inside the
134
- project directory (which `.claude/worktrees/` is), VS Code will watch it.
135
- Consider creating worktrees outside the project directory for parallel runs.
136
- - **Cursor/JetBrains**: Similar behavior. Same mitigation.
137
-
138
- ---
139
-
140
- ## Cleanup Protocol (MUST — before session end)
141
-
142
- Every agent that creates a worktree MUST clean it up before exiting.
143
- This is part of the graceful exit protocol (see `standards/graceful-exit.md`).
144
-
145
- ### Normal cleanup (work complete, PR open)
146
-
147
- ```bash
148
- git worktree remove .claude/worktrees/<slug>
149
- ```
150
-
151
- If the branch was merged, also delete the branch:
152
- ```bash
153
- git branch -d <branch-name>
154
- ```
155
-
156
- ### Abnormal cleanup (agent dying, context exhaustion)
157
-
158
- If the agent knows it's about to die (context pressure, rate limit, budget):
159
-
160
- 1. Commit any in-progress work: `git -C <worktree-path> commit -am "chore: wip"`
161
- 2. Push the branch: `git -C <worktree-path> push -u origin <branch>`
162
- 3. Remove the worktree: `git worktree remove <path>`
163
- 4. Note in checkpoint: "worktree cleaned, branch pushed, PR not yet open"
164
-
165
- If the agent dies without cleanup (crash, kill, timeout), the next session's
166
- pre-session audit handles recovery.
167
-
168
- ### Cleanup order
169
-
170
- When multiple worktrees exist:
171
-
172
- 1. Remove worktrees with merged PRs first (safest)
173
- 2. Remove worktrees with open PRs next (work is preserved in the PR)
174
- 3. Remove worktrees with unpushed work last (commit and push first)
175
-
176
- ---
177
-
178
- ## Rate Limit Awareness
179
-
180
- Parallel worktree agents multiply API request rate against the same account
181
- quota. This was observed in POA 2026-04-07: 3 agents = 3x RPM pressure,
182
- causing 429 errors.
183
-
184
- ### Mitigations
185
-
186
- | Strategy | When to use |
187
- |----------|------------|
188
- | Sequential mode | Default. Zero rate limit risk. Recommended for most work. |
189
- | Staggered starts | If parallel: delay 30s between agent spawns |
190
- | Reduced context | Send only relevant files to each agent, not full repo |
191
- | Fewer parallel agents | Max 2 concurrent for most account tiers |
192
-
193
- ### Rate limit detection
194
-
195
- If an agent receives a 429 or rate limit error:
196
-
197
- 1. Do NOT retry immediately — this makes it worse
198
- 2. Wait the duration specified in the Retry-After header (or 60s default)
199
- 3. If rate limits persist after 3 retries: save state, report to operator,
200
- recommend switching to sequential mode
201
-
202
- ---
203
-
204
- ## Relationship to Other Standards
205
-
206
- | Standard | Relationship |
207
- |----------|-------------|
208
- | `standards/graceful-exit.md` | Worktree cleanup is a MUST gate in exit protocol |
209
- | `standards/branch-stacking.md` | Stack manifest tracks worktree branches |
210
- | `.claude/rules/cost-governance.md` | Rate limit cost of parallel worktrees |
211
- | `strategy/agent-choreography.md` | Orchestrator manages worktree lifecycle in parallel mode |