@thebassclef/lite 0.1.3 → 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.
- package/dist/cli.cjs +216 -137
- package/dist/cli.js +218 -139
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite/.bassclef-source.json +10 -0
- package/dist/lite/.claude/settings.json +212 -0
- package/dist/lite/CLAUDE.md +41 -0
- package/dist/lite/gitignore +58 -0
- package/dist/lite/standards/bassclef-wiring-manifest.json +497 -0
- package/dist/lite/whereami.md +24 -0
- package/package.json +8 -2
- package/substrate/.bassclef/lite-manifest.json +0 -2701
- package/substrate/.claude/agents/architect.md +0 -70
- package/substrate/.claude/agents/builder.md +0 -114
- package/substrate/.claude/agents/designer.md +0 -156
- package/substrate/.claude/agents/reviewer.md +0 -88
- package/substrate/.claude/hooks/artifact-ingestion-gate.sh +0 -357
- package/substrate/.claude/hooks/assert-verify-steering.sh +0 -77
- package/substrate/.claude/hooks/bassclef-source-config-validate.sh +0 -215
- package/substrate/.claude/hooks/bassclef-sync.sh +0 -634
- package/substrate/.claude/hooks/compound-noun-scrub.sh +0 -292
- package/substrate/.claude/hooks/kiss-expansion-inject.sh +0 -69
- package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +0 -492
- package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +0 -492
- package/substrate/.claude/hooks/plain-english-steering.sh +0 -156
- package/substrate/.claude/hooks/post-skill-friction-check.sh +0 -177
- package/substrate/.claude/hooks/post-skill-telemetry.sh +0 -62
- package/substrate/.claude/hooks/pre-build-gate.sh +0 -511
- package/substrate/.claude/hooks/pre-commit-gate.sh +0 -451
- package/substrate/.claude/hooks/session-end.sh +0 -433
- package/substrate/.claude/hooks/session-reflection.sh +0 -303
- package/substrate/.claude/hooks/skill-body-grade-gate.sh +0 -219
- package/substrate/.claude/hooks/skill-body-intent-drift.sh +0 -107
- package/substrate/.claude/hooks/skill-step-list-check.sh +0 -171
- package/substrate/.claude/hooks/state-validate.sh +0 -271
- package/substrate/.claude/hooks/substrate-clarity-gate.sh +0 -1110
- package/substrate/.claude/hooks/temperance-gate.sh +0 -147
- package/substrate/.claude/hooks/testing-tier-enforce.sh +0 -233
- package/substrate/.claude/hooks/turn-prose-grade-measure.sh +0 -219
- package/substrate/.claude/hooks/turn-prose-kiss-check.sh +0 -463
- package/substrate/.claude/hooks/vocabulary-migration-check.sh +0 -171
- package/substrate/.claude/hooks/whereami-utc-gate.sh +0 -142
- package/substrate/.claude/luminaries/alan-cooper.md +0 -170
- package/substrate/.claude/luminaries/alistair-cockburn.md +0 -140
- package/substrate/.claude/luminaries/amazon-pr-faq.md +0 -34
- package/substrate/.claude/luminaries/ash-maurya.md +0 -121
- package/substrate/.claude/luminaries/bill-buxton.md +0 -210
- package/substrate/.claude/luminaries/charles-sanders-peirce.md +0 -150
- package/substrate/.claude/luminaries/david-ogilvy.md +0 -192
- package/substrate/.claude/luminaries/don-norman.md +0 -173
- package/substrate/.claude/luminaries/edward-tufte.md +0 -179
- package/substrate/.claude/luminaries/eric-evans.md +0 -160
- package/substrate/.claude/luminaries/frederick-brooks.md +0 -50
- package/substrate/.claude/luminaries/gang-of-four.md +0 -157
- package/substrate/.claude/luminaries/glenford-myers.md +0 -230
- package/substrate/.claude/luminaries/hunt-thomas.md +0 -115
- package/substrate/.claude/luminaries/hyrum-wright.md +0 -94
- package/substrate/.claude/luminaries/jason-fried-dhh.md +0 -46
- package/substrate/.claude/luminaries/jesse-james-garrett.md +0 -154
- package/substrate/.claude/luminaries/john-ousterhout.md +0 -94
- package/substrate/.claude/luminaries/karl-popper.md +0 -132
- package/substrate/.claude/luminaries/kent-beck.md +0 -168
- package/substrate/.claude/luminaries/linus-torvalds.md +0 -218
- package/substrate/.claude/luminaries/martin-fowler.md +0 -164
- package/substrate/.claude/luminaries/michael-feathers.md +0 -125
- package/substrate/.claude/luminaries/michael-nygard.md +0 -118
- package/substrate/.claude/luminaries/robert-c-martin.md +0 -164
- package/substrate/.claude/luminaries/saltzer-schroeder.md +0 -194
- package/substrate/.claude/luminaries/sophia-prater.md +0 -193
- package/substrate/.claude/luminaries/stephen-toulmin.md +0 -131
- package/substrate/.claude/luminaries/tony-hoare.md +0 -170
- package/substrate/.claude/luminaries/vaughn-vernon.md +0 -50
- package/substrate/.claude/luminaries/w-edwards-deming.md +0 -158
- package/substrate/.claude/rules/accessor-library-discipline.md +0 -138
- package/substrate/.claude/rules/adr-discipline.md +0 -120
- package/substrate/.claude/rules/api-conventions.md +0 -125
- package/substrate/.claude/rules/artifact-ingestion.md +0 -179
- package/substrate/.claude/rules/assert-only-after-verify.md +0 -137
- package/substrate/.claude/rules/blocked-items.md +0 -146
- package/substrate/.claude/rules/bootstrap-pair-discipline.md +0 -141
- package/substrate/.claude/rules/branching.md +0 -28
- package/substrate/.claude/rules/cold-adopter-harness-discipline.md +0 -129
- package/substrate/.claude/rules/commit-conventions.md +0 -22
- package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +0 -188
- package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +0 -188
- package/substrate/.claude/rules/context-engineering.md +0 -202
- package/substrate/.claude/rules/context-management.md +0 -85
- package/substrate/.claude/rules/defensive-bash.md +0 -68
- package/substrate/.claude/rules/deferred-actions.md +0 -233
- package/substrate/.claude/rules/destructive-operations.md +0 -69
- package/substrate/.claude/rules/diagnosis.md +0 -38
- package/substrate/.claude/rules/github-issue-flash-tweet.md +0 -156
- package/substrate/.claude/rules/guardrails.md +0 -73
- package/substrate/.claude/rules/hook-wire-on-author.md +0 -103
- package/substrate/.claude/rules/identifier-leak-prevention.md +0 -104
- package/substrate/.claude/rules/iteration-bet-brief-completeness.md +0 -54
- package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +0 -98
- package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +0 -89
- package/substrate/.claude/rules/loop-discipline.md +0 -81
- package/substrate/.claude/rules/manual-prod-approval.md +0 -100
- package/substrate/.claude/rules/marker-enrichment-discipline.md +0 -99
- package/substrate/.claude/rules/mobile-ephemeral-session.md +0 -109
- package/substrate/.claude/rules/new-dependency-check.md +0 -51
- package/substrate/.claude/rules/oo-ad-entry-point.md +0 -117
- package/substrate/.claude/rules/operator-facing-prose.md +0 -196
- package/substrate/.claude/rules/option-label-discipline.md +0 -108
- package/substrate/.claude/rules/pattern-annotation.md +0 -100
- package/substrate/.claude/rules/plain-english-discipline.md +0 -156
- package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +0 -211
- package/substrate/.claude/rules/pr-body-shape.md +0 -317
- package/substrate/.claude/rules/pr-strategy.md +0 -167
- package/substrate/.claude/rules/pr-title-shape.md +0 -161
- package/substrate/.claude/rules/prototype-workflow.md +0 -65
- package/substrate/.claude/rules/reserved-skill-names.md +0 -123
- package/substrate/.claude/rules/schema-management.md +0 -49
- package/substrate/.claude/rules/sdlc-gates.md +0 -149
- package/substrate/.claude/rules/security.md +0 -37
- package/substrate/.claude/rules/session-artifacts.md +0 -236
- package/substrate/.claude/rules/skill-composition-declarations.md +0 -124
- package/substrate/.claude/rules/skill-description-clarity.md +0 -247
- package/substrate/.claude/rules/skill-procedure-step-list.md +0 -137
- package/substrate/.claude/rules/state-schema-validation.md +0 -162
- package/substrate/.claude/rules/stuck-signal-diagnostic.md +0 -140
- package/substrate/.claude/rules/substrate-config-schema.md +0 -98
- package/substrate/.claude/rules/test-list-discipline.md +0 -175
- package/substrate/.claude/rules/test-sufficiency.md +0 -210
- package/substrate/.claude/rules/testing-tier-config.md +0 -145
- package/substrate/.claude/rules/testing.md +0 -38
- package/substrate/.claude/rules/turn-estimate-grounding.md +0 -134
- package/substrate/.claude/rules/visual-hierarchy.md +0 -437
- package/substrate/.claude/rules/we-dont-break-adopters.md +0 -126
- package/substrate/.claude/rules/whereami-load-bearing.md +0 -202
- package/substrate/.claude/rules/writing-craft-discipline.md +0 -92
- package/substrate/.claude/rules/wu-sequencing-compounds.md +0 -145
- package/substrate/.claude/skills/build/SKILL.md +0 -640
- package/substrate/.claude/skills/chronicle/SKILL.md +0 -55
- package/substrate/.claude/skills/clean-artifacts/SKILL.md +0 -249
- package/substrate/.claude/skills/decompose/SKILL.md +0 -280
- package/substrate/.claude/skills/diagnose/SKILL.md +0 -297
- package/substrate/.claude/skills/feynman/SKILL.md +0 -90
- package/substrate/.claude/skills/howdoi/SKILL.md +0 -105
- package/substrate/.claude/skills/ia-model/SKILL.md +0 -108
- package/substrate/.claude/skills/interaction-design/SKILL.md +0 -112
- package/substrate/.claude/skills/interpret-input/SKILL.md +0 -180
- package/substrate/.claude/skills/journal/SKILL.md +0 -209
- package/substrate/.claude/skills/kiss/SKILL.md +0 -449
- package/substrate/.claude/skills/launch/SKILL.md +0 -915
- package/substrate/.claude/skills/lean-canvas/SKILL.md +0 -332
- package/substrate/.claude/skills/longrun/SKILL.md +0 -463
- package/substrate/.claude/skills/luminary/SKILL.md +0 -481
- package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +0 -177
- package/substrate/.claude/skills/onboard-repo/SKILL.md +0 -1624
- package/substrate/.claude/skills/pattern-review/SKILL.md +0 -99
- package/substrate/.claude/skills/personas/SKILL.md +0 -207
- package/substrate/.claude/skills/promote/SKILL.md +0 -283
- package/substrate/.claude/skills/requirement/SKILL.md +0 -98
- package/substrate/.claude/skills/retro/SKILL.md +0 -117
- package/substrate/.claude/skills/riff/SKILL.md +0 -114
- package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +0 -163
- package/substrate/.claude/skills/session-end/SKILL.md +0 -309
- package/substrate/.claude/skills/session-log/SKILL.md +0 -299
- package/substrate/.claude/skills/skills/SKILL.md +0 -228
- package/substrate/.claude/skills/spec/SKILL.md +0 -105
- package/substrate/.claude/skills/sprint/SKILL.md +0 -392
- package/substrate/.claude/skills/stage/SKILL.md +0 -384
- package/substrate/.claude/skills/state-a-problem/SKILL.md +0 -185
- package/substrate/.claude/skills/temperance/SKILL.md +0 -108
- package/substrate/.claude/skills/use-case/SKILL.md +0 -417
- package/substrate/.claude/skills/user-stories/SKILL.md +0 -268
- package/substrate/.claude/skills/value-prop/SKILL.md +0 -251
- package/substrate/.claude/skills/verify/SKILL.md +0 -160
- package/substrate/.claude/skills/visual-review/SKILL.md +0 -503
- package/substrate/.claude/skills/whats-the-plan/SKILL.md +0 -202
- package/substrate/.claude/skills/whereami/SKILL.md +0 -307
- package/substrate/AGENTS.md +0 -79
- package/substrate/CLAUDE-lite.md +0 -85
- package/substrate/CODE_OF_CONDUCT.md +0 -28
- package/substrate/CONTRIBUTING.md +0 -177
- package/substrate/README.md +0 -173
- package/substrate/SECURITY.md +0 -19
- package/substrate/architecture/decisions/ADR-029-release-pipeline.md +0 -79
- package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +0 -139
- package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +0 -192
- package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +0 -145
- package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +0 -155
- package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +0 -162
- package/substrate/lib/clean-artifacts-sweep.sh +0 -112
- package/substrate/lib/code-comment-discipline.sh +0 -144
- package/substrate/lib/composer-preflight.sh +0 -459
- package/substrate/lib/hook-inject.sh +0 -255
- package/substrate/lib/luminary-pick.sh +0 -96
- package/substrate/lib/output-discipline.sh +0 -143
- package/substrate/lib/prose-scan-boundary.sh +0 -171
- package/substrate/lib/rewrite-check.sh +0 -214
- package/substrate/lib/state.sh +0 -1372
- package/substrate/lib/telemetry.sh +0 -205
- package/substrate/lib/tier-check.sh +0 -187
- package/substrate/lib/tier-dependency-audit.sh +0 -1088
- package/substrate/presence/install/bassclef-hook-connect.sh +0 -178
- package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +0 -841
- package/substrate/presence/install/bassclef-sync.template.sh +0 -2076
- package/substrate/presence/install/schedule-auto-save.cron.sh +0 -88
- package/substrate/presence/install/schedule-auto-save.taskscheduler.md +0 -122
- package/substrate/scripts/aggregate-telemetry.sh +0 -217
- package/substrate/scripts/analyze-tier-dependencies.sh +0 -239
- package/substrate/scripts/generate-lite-manifest.sh +0 -505
- package/substrate/scripts/generate-tier-manifest.sh +0 -28
- package/substrate/scripts/intent-drift-check.sh +0 -456
- package/substrate/scripts/lite-manifest-drift-check.sh +0 -146
- package/substrate/scripts/render-lite-manifest-doc.sh +0 -150
- package/substrate/standards/adr-template.md +0 -86
- package/substrate/standards/api-conventions/nextjs.md +0 -84
- package/substrate/standards/artifact-composition.md +0 -209
- package/substrate/standards/bash-hook-safety.md +0 -246
- package/substrate/standards/bassclef-configs-schema.md +0 -232
- package/substrate/standards/bassclef-evolution.md +0 -143
- package/substrate/standards/bassclef-internal-jargon.md +0 -244
- package/substrate/standards/bassclef-managed-sentinel.md +0 -96
- package/substrate/standards/bassclef-source-config.md +0 -228
- package/substrate/standards/branch-stacking.md +0 -408
- package/substrate/standards/code-safety-principles.md +0 -176
- package/substrate/standards/composer-prerequisites.md +0 -155
- package/substrate/standards/deferred-actions-schema.md +0 -204
- package/substrate/standards/dependency-discipline/cargo.md +0 -39
- package/substrate/standards/dependency-discipline/gem.md +0 -43
- package/substrate/standards/dependency-discipline/go-mod.md +0 -41
- package/substrate/standards/dependency-discipline/npm.md +0 -42
- package/substrate/standards/dependency-discipline/pip.md +0 -42
- package/substrate/standards/deployment-topology/ec2-tailscale.md +0 -225
- package/substrate/standards/deployment-topology.md +0 -69
- package/substrate/standards/docs-sync-allowlist.md +0 -76
- package/substrate/standards/domain-and-dns.md +0 -145
- package/substrate/standards/frontend-stack.md +0 -67
- package/substrate/standards/frontmatter-schema.md +0 -154
- package/substrate/standards/graceful-exit.md +0 -227
- package/substrate/standards/hook-idempotency.md +0 -102
- package/substrate/standards/hook-injection-discipline.md +0 -202
- package/substrate/standards/hook-install-class.md +0 -215
- package/substrate/standards/input-handler-interface.md +0 -152
- package/substrate/standards/lite-manifest-schema-changes.md +0 -135
- package/substrate/standards/luminary-matching.md +0 -105
- package/substrate/standards/luminary-problem-patterns.md +0 -481
- package/substrate/standards/migration-discipline/active-record.md +0 -50
- package/substrate/standards/migration-discipline/alembic.md +0 -43
- package/substrate/standards/migration-discipline/gorm.md +0 -50
- package/substrate/standards/migration-discipline/prisma.md +0 -53
- package/substrate/standards/migration-discipline/sqlalchemy.md +0 -51
- package/substrate/standards/mobile-ephemeral-session.md +0 -167
- package/substrate/standards/model-routing-discipline.md +0 -160
- package/substrate/standards/ogilvy-writing-rules.md +0 -225
- package/substrate/standards/opener-discipline.md +0 -96
- package/substrate/standards/operator-facing-prose-discipline.md +0 -201
- package/substrate/standards/persona-schema.md +0 -229
- package/substrate/standards/pluggable-luminaries.md +0 -323
- package/substrate/standards/pr-body-discipline.md +0 -115
- package/substrate/standards/preview-state-schema.md +0 -189
- package/substrate/standards/project-directory-layout.md +0 -276
- package/substrate/standards/release-tagging.md +0 -137
- package/substrate/standards/reserved-skill-names.md +0 -120
- package/substrate/standards/scannable-multi-option-output.md +0 -261
- package/substrate/standards/sdlc-compliance.md +0 -286
- package/substrate/standards/sdlc-gates/typescript.md +0 -57
- package/substrate/standards/secrets-lifecycle.md +0 -210
- package/substrate/standards/security-scanner-adapter.md +0 -145
- package/substrate/standards/session-board.md +0 -256
- package/substrate/standards/skill-output-discipline.md +0 -90
- package/substrate/standards/state-spine-contract.md +0 -255
- package/substrate/standards/state-spine.md +0 -511
- package/substrate/standards/steering-hints/kiss-words.md +0 -11
- package/substrate/standards/substrate-config-schema.md +0 -267
- package/substrate/standards/tech-stack-config.md +0 -109
- package/substrate/standards/tier-dependency-analysis.md +0 -167
- package/substrate/standards/tier-runtime-deps/lite.md +0 -57
- package/substrate/standards/tier-tag-schema.md +0 -155
- package/substrate/standards/two-layer-config.md +0 -99
- package/substrate/standards/use-case-format.md +0 -292
- package/substrate/standards/user-story-invest.md +0 -268
- package/substrate/standards/velocity-and-appetite.md +0 -229
- package/substrate/standards/voice-input-pattern.md +0 -119
- package/substrate/standards/whereami-schema.md +0 -301
- package/substrate/standards/worktree-management.md +0 -211
- package/substrate/standards/writing-guide.md +0 -213
- package/substrate/templates/chronicle-template.md +0 -75
- package/substrate/templates/deferred-action-template.md +0 -45
- package/substrate/templates/memory-proposal-template.md +0 -77
- package/substrate/templates/persona-template.md +0 -200
- package/substrate/templates/pr-faq.md +0 -45
- package/substrate/templates/secret-rotation-template.md +0 -162
- package/substrate/templates/spec-template.md +0 -131
- package/substrate/templates/use-case-template.md +0 -194
- package/substrate/templates/user-story-template.md +0 -107
- package/substrate/templates/whereami-template.md +0 -101
|
@@ -1,511 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: "Schema'd JSON state spine for bassclef's substrate."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# State Spine
|
|
7
|
-
|
|
8
|
-
Schema'd JSON state spine for bassclef's substrate. Replaces the current
|
|
9
|
-
files-and-text-scraping substrate with typed entities, validated at write
|
|
10
|
-
time, queryable via accessor library. Foundation for the cameo
|
|
11
|
-
fanout pipeline's Phase B+ work.
|
|
12
|
-
|
|
13
|
-
## Sources read
|
|
14
|
-
|
|
15
|
-
- `docs/iteration-bets/2026-04-27-state-spine-v0.md` — bet spec (WU-1 acceptance)
|
|
16
|
-
- `strategy/canvases/2026-04-26-state-spine.md` v4 — load-bearing canvas (entity model, ubiquitous language, accessor discipline, replay-determinism + write-once-immutable rules)
|
|
17
|
-
- `architecture/decisions/ADR-015-state-schema-format.md` — JSON Schema only for v0
|
|
18
|
-
- `standards/whereami-schema.md`, `standards/deferred-actions-schema.md`, `standards/preview-state-schema.md`, `standards/substrate-config-schema.md`, `standards/persona-schema.md` — five existing schema standards being formalized as JSON Schema files
|
|
19
|
-
- `.claude/luminaries/martin-fowler.md` — Repository pattern (informs accessor surface), expand-and-contract migration
|
|
20
|
-
- `.claude/luminaries/gang-of-four.md` — six selected patterns per canvas Stage 2
|
|
21
|
-
|
|
22
|
-
## What I'm NOT reading (with reason)
|
|
23
|
-
|
|
24
|
-
- Specific JSON Schema implementation libraries — schema author chooses; ajv (bash-side) and any TS validator (when v1 lands) both consume draft-2020-12
|
|
25
|
-
- Existing markers' on-disk format — WU-4's pre-read; this standard defines target shape, not migration mechanics
|
|
26
|
-
|
|
27
|
-
## Why this exists
|
|
28
|
-
|
|
29
|
-
Before the spine, bassclef state lived in six storage substrates with
|
|
30
|
-
no schema, no atomic operations, no validation, no concurrent-write
|
|
31
|
-
safety: loose markers, markdown chronicles, YAML-ish frontmatter, the
|
|
32
|
-
whereami structured-text artifact, git reflog, `/tmp/*` scratch markers.
|
|
33
|
-
Every consumer wrote its own bash text-scraper. Four substrate-defects
|
|
34
|
-
on 2026-04-26 (#293, #295, #296, #298) traced to the same root: state
|
|
35
|
-
was not a first-class noun.
|
|
36
|
-
|
|
37
|
-
The spine establishes state as the noun. Schema'd JSON files in git
|
|
38
|
-
form the foundation for every adopter — portable, mobile-friendly, no
|
|
39
|
-
infrastructure required. cxdb upgrade (bassclef#300) is an OPTIONAL
|
|
40
|
-
upgrade for adopters running concurrent multi-agent fanout; most never
|
|
41
|
-
need it.
|
|
42
|
-
|
|
43
|
-
## Conceptual model — four categories
|
|
44
|
-
|
|
45
|
-
Bassclef's state, runtime, and rulebook fit into four MECE categories.
|
|
46
|
-
Each has a primary verb. Knowing which category a thing belongs to
|
|
47
|
-
tells you where it lives, who writes it, and how it changes.
|
|
48
|
-
|
|
49
|
-
| Category | What it is | Primary verb | Where it lives |
|
|
50
|
-
|---|---|---|---|
|
|
51
|
-
| **Content** | Durable code — the rulebook | EDIT (rarely; reviewed) | `.claude/skills/`, `.claude/rules/`, `.claude/hooks/`, `.claude/agents/`, `standards/`, `architecture/` |
|
|
52
|
-
| **Entities** | Mutable state with identity | UPDATE (driven by Events) | `docs/`, `state/`, root singletons (`docs/whereami.md`, `substrate.config.md`) |
|
|
53
|
-
| **Events** | Things that happened (immutable, instantaneous) | FIRE (once) | No primary on-disk form; manifest as Entity field updates + Records |
|
|
54
|
-
| **Records** | Written artifacts documenting Events | APPEND (write-once) | `chronicle/`, `state/markers/`, `docs/deferred-actions/`, `last_event` field on Roadmap |
|
|
55
|
-
|
|
56
|
-
This frame connects to bassclef#342's drawer separation:
|
|
57
|
-
**Content lives in `.claude/` + `standards/` (rulebook). Entities + Events + Records live in `docs/` + `state/` + `chronicle/` (runtime).**
|
|
58
|
-
|
|
59
|
-
### The trinity (passive vs. active vs. checkpoint)
|
|
60
|
-
|
|
61
|
-
Three role-types interact across the categories:
|
|
62
|
-
|
|
63
|
-
| Role | What it is | Verb | Example |
|
|
64
|
-
|---|---|---|---|
|
|
65
|
-
| **Task** | Active driver — work to be done | DO | A WorkUnit row in `next_work_units`; workers claim, execute, release |
|
|
66
|
-
| **Gate** | Checkpoint asking "ready to proceed?" | GUARD | `/temperance`, `/verify`, `/diagnose`, citation gate |
|
|
67
|
-
| **Marker** | Passive recording of a Gate firing | DOCUMENT | The `.marker` file recording temperance fired on this branch |
|
|
68
|
-
|
|
69
|
-
**Tasks DO. Gates GUARD. Markers DOCUMENT what happened.**
|
|
70
|
-
|
|
71
|
-
A Task can't start until its Gate passes; once it passes, the Marker is
|
|
72
|
-
the proof. Tasks are Entities (have lifecycle: created → claimed →
|
|
73
|
-
released). Gates are Events (fire once). Markers are Records (written
|
|
74
|
-
once, read many).
|
|
75
|
-
|
|
76
|
-
### Verbs across the model
|
|
77
|
-
|
|
78
|
-
| Operating on | Verbs |
|
|
79
|
-
|---|---|
|
|
80
|
-
| Entity | create / add → update (state transitions driven by Events) → archive / close / abandon |
|
|
81
|
-
| Event | fire (an Event happens — instantaneous) → trigger Records (write the audit trail) |
|
|
82
|
-
| Record | append (write-once, immutable per Helland) — never mutated, only superseded by new records |
|
|
83
|
-
| Content | edit (operator-managed; reviewed via PR; bassclef-evolution gate) |
|
|
84
|
-
|
|
85
|
-
### Where current bassclef entities fit
|
|
86
|
-
|
|
87
|
-
| Bassclef entity | Category | Notes |
|
|
88
|
-
|---|---|---|
|
|
89
|
-
| Roadmap | Entity | Has identity (slug); state mutates via append to `last_event` + `next_work_units[*].status` projections |
|
|
90
|
-
| IterationBet | Entity | Lifecycle: active → closed/abandoned |
|
|
91
|
-
| Stack | Entity | Lifecycle: created → branches-resolved → merged |
|
|
92
|
-
| `Step` (formerly `Workunit`, Task) | Entity (and the active driver per the trinity) | Lifecycle: pending → in_progress → completed/abandoned |
|
|
93
|
-
| Decomposition | Entity | Snapshot at moment of design |
|
|
94
|
-
| InputArtifact | Entity | Lifecycle: created → consumed |
|
|
95
|
-
| Session | Entity | Lifecycle: started → compacted/continued/ended |
|
|
96
|
-
| DeferredAction | Entity AND Record | Command pattern — written once with payload, has lifecycle (claim → resolve) |
|
|
97
|
-
| InboxWorkItem | Entity AND Record | Same — Command pattern |
|
|
98
|
-
| Persona | Entity | Mutable definition; v0 schema only |
|
|
99
|
-
| Whereami | Entity (singleton) | Snapshot mutated by `state_whereami_set` |
|
|
100
|
-
| SubstrateConfig | Entity (singleton) | Per-repo external resource manifest |
|
|
101
|
-
| BassclefPlatform | Entity (singleton, sibling-repo) | Org-baseline platform manifest — sibling-repo placement (e.g., `sunj-labs/platform-config`) sets the enterprise-adoption seam |
|
|
102
|
-
| PreviewState | Entity (per-slug) | Per-product preview-cycle state |
|
|
103
|
-
| StackTemplate | Content (durable code, parameterizable) | Treated like a skill — versioned, reusable |
|
|
104
|
-
| TemplateInstance | Record | Audit "StackTemplate X instantiated as Stack Y at time Z" |
|
|
105
|
-
| Marker | Record | Persistence of a Gate firing |
|
|
106
|
-
| Chronicle | Record | Narrative session retrospective |
|
|
107
|
-
| Gate | Event | Has no on-disk form — manifests as Marker (recorded form) |
|
|
108
|
-
|
|
109
|
-
### Event types bassclef recognizes
|
|
110
|
-
|
|
111
|
-
Events fire constantly in an active session. Most leave Records (Markers
|
|
112
|
-
or chronicle entries); some only mutate Entity state.
|
|
113
|
-
|
|
114
|
-
| Event class | Examples | Recorded as |
|
|
115
|
-
|---|---|---|
|
|
116
|
-
| Gate firings | temperance fired (pass/fail/skip), verify fired, diagnose fired, citation-gate fired | Marker |
|
|
117
|
-
| Task lifecycle | task-created, task-claimed, task-released, task-abandoned, task-blocked | `last_event` field + `next_work_units[*].status` projection |
|
|
118
|
-
| Bet lifecycle | bet-opened, bet-closed, bet-abandoned, scope-changed | Iteration-bet `status` field; chronicle |
|
|
119
|
-
| Roadmap lifecycle | roadmap-created, milestone-passed, phase-boundary-crossed | Roadmap `last_event` field |
|
|
120
|
-
| Session lifecycle | session-started, session-compacted, continued-as, session-ended | Session entity `continued_as` field; chronicle |
|
|
121
|
-
| Operator decision | scope-confirmed, audit-caught-issue, defer-accepted | Chronicle decision-log; ad-hoc |
|
|
122
|
-
| Discovery | discovery-captured (operator/agent insight worth preserving) | `design/discoveries/<slug>.md` (Record); see bassclef#349 for first-class entity status |
|
|
123
|
-
|
|
124
|
-
### Read this section before extending the spine
|
|
125
|
-
|
|
126
|
-
When you propose a new entity for the spine, decide first:
|
|
127
|
-
|
|
128
|
-
1. **Is it Content, Entity, Event, or Record?**
|
|
129
|
-
2. **What verbs operate on it?** (the answer tells you what accessors to write)
|
|
130
|
-
3. **If Entity: what events drive its state transitions?** (those events should be recorded somewhere)
|
|
131
|
-
4. **If Record: what events does it document?** (and is the schema strict enough to validate the recording shape?)
|
|
132
|
-
|
|
133
|
-
Misclassifying — e.g., proposing a "Risk Entity" but only providing
|
|
134
|
-
narrative without lifecycle accessors, or proposing a "Gate Record"
|
|
135
|
-
that's actually an Event — leads to the kind of substrate drift the
|
|
136
|
-
spine v0 retired (#293, #295, #296, #298).
|
|
137
|
-
|
|
138
|
-
## Entity catalog (17 v0)
|
|
139
|
-
|
|
140
|
-
Four layers per canvas v3 entity audit. Each entity has a JSON Schema
|
|
141
|
-
file at `standards/state-spine/schemas/<entity>.schema.json`.
|
|
142
|
-
|
|
143
|
-
### Work composition (durable data, collection — 6 entities)
|
|
144
|
-
|
|
145
|
-
| Entity | Role | DDD framing |
|
|
146
|
-
|---|---|---|
|
|
147
|
-
| Roadmap | Top-level multi-bet plan | Aggregate root over IterationBets |
|
|
148
|
-
| `IterationBet` | Scoped commitment with time budget (Shape Up: `appetite`; Yegge: Epic) | Aggregate root over Stacks |
|
|
149
|
-
| Stack | Branch-stacking dependency manifest for parallel work (Yegge: Molecule) | Aggregate root over Workunits |
|
|
150
|
-
| `Step` (formerly `Workunit`, aka `WU`) | Atomic deliverable, becomes one PR (Yegge: Bead) | Entity (1 PR + 1 issue + 1 branch identity) |
|
|
151
|
-
| Decomposition | Pre-build entity-responsibility map for a step (formerly `workunit`) | Value object (snapshot at moment of design) |
|
|
152
|
-
| InputArtifact | Normalized intermediate from operator input (text/URL/image/repo/transcript) — see PR #304 | Entity (own identity per input session); produces value-object payload |
|
|
153
|
-
|
|
154
|
-
### Templates (durable code, sibling to composition — 1 v0 entity)
|
|
155
|
-
|
|
156
|
-
| Entity | Instantiates as | Notes |
|
|
157
|
-
|---|---|---|
|
|
158
|
-
| StackTemplate | Stack | LOAD-BEARING for cameo fanout (N parallel workunits from one template) |
|
|
159
|
-
|
|
160
|
-
BetTemplate, WorkunitTemplate, RoadmapTemplate defer to v2+ per canvas.
|
|
161
|
-
|
|
162
|
-
### Execution events (durable history, collection — 7 entities)
|
|
163
|
-
|
|
164
|
-
| Entity | Role | Sourcing framing |
|
|
165
|
-
|---|---|---|
|
|
166
|
-
| Session | Single execution context (one chat). Includes `continued_as: <next-session-id>` field (SWF `continue_as_new` analog) | Aggregate root over Gates + Markers within session |
|
|
167
|
-
| Gate | Compliance event (Marker is its persistence form) | Domain event (Greg Young: write-once event in the log) |
|
|
168
|
-
| Marker | Gate's persistence form (filename = stable id; payload = event body) | Value object (Helland: data on the outside) |
|
|
169
|
-
| Chronicle | Session retrospective narrative + sidecar JSON `gates_fired` | Read-side projection of Gates (CQRS read model) |
|
|
170
|
-
| InboxWorkItem | GoF Command — encapsulated work request routed between agents | Command (Greg Young: command bus) |
|
|
171
|
-
| TemplateInstance | Audit record: "StackTemplate X instantiated as Stack Y at time Z with parameters P" | Domain event |
|
|
172
|
-
| DeferredAction | Capability-routed handoff entry (per bassclef#226) — read by `60-deferred-actions.sh` at session-start | Command (deferred to capable session) |
|
|
173
|
-
|
|
174
|
-
### Singletons (one-per-repo — 3 entities)
|
|
175
|
-
|
|
176
|
-
| Entity | Role |
|
|
177
|
-
|---|---|
|
|
178
|
-
| Whereami | Project state snapshot — phase, active iteration, active agents, subsystem phases |
|
|
179
|
-
| SubstrateConfig | Repo manifest (gating, agents, deploy targets, external resource refs) |
|
|
180
|
-
| PreviewState | Per-product preview chain state (slug, current_tier, status, selected_variant, escalation history) |
|
|
181
|
-
|
|
182
|
-
### Persona — v1 deferral (separate entity)
|
|
183
|
-
|
|
184
|
-
Persona is schema'd via `standards/persona-schema.md` and consumed by
|
|
185
|
-
`/personas`, `/value-prop-canvas`, `/jtbd-tasks`, `/synthetic-user`,
|
|
186
|
-
`/risk-test-synthetic`, `/user-stories`. Not hot-path-read at
|
|
187
|
-
session-start; schema file ships in WU-1 for completeness, but
|
|
188
|
-
accessor methods defer to spine v1 (no spine v0 hot-path consumer
|
|
189
|
-
needs Persona reads).
|
|
190
|
-
|
|
191
|
-
**v0 entity count = 17** (with Persona ported as an v0 schema file but
|
|
192
|
-
its accessor methods deferred to v1; matches canvas v3 audit).
|
|
193
|
-
|
|
194
|
-
## Ubiquitous language (Evans DDD)
|
|
195
|
-
|
|
196
|
-
Bassclef lexicon. One name per concept, used consistently across
|
|
197
|
-
schemas, accessor methods, hooks, skills, and operator-facing surfaces.
|
|
198
|
-
|
|
199
|
-
| Term | Definition | Avoid |
|
|
200
|
-
|---|---|---|
|
|
201
|
-
| `Step` (formerly `Workunit`, aka `WU`) | Atomic deliverable becoming one PR | "WS" (legacy), "workpackage" (PMBOK term, ported in PR #304), "task" (too generic) |
|
|
202
|
-
| `Iteration Goal` (formerly `Iteration Bet`) | Scoped commitment with time budget (Shape Up: `appetite`); Yegge analog is Epic | "story" (too small), "feature" (too vague) |
|
|
203
|
-
| Stack | Multi-step (formerly multi-`WU`) dependency manifest for parallel work; Yegge analog is Molecule | "branch group" (loses dependency semantics) |
|
|
204
|
-
| Gate | Compliance event triggered by methodology rule | "check" (too vague), "verification" (too narrow) |
|
|
205
|
-
| Marker | Persisted form of a Gate (filename = stable id) | "log entry" (loses gate semantics) |
|
|
206
|
-
| Chronicle | Session retrospective narrative + sidecar JSON | "log", "diary" |
|
|
207
|
-
| Roadmap | Multi-bet plan over weeks-to-months horizon | "plan" (too generic), "spec" (different concern) |
|
|
208
|
-
| Decomposition | Pre-build entity-responsibility map (output of `/decompose`) | "design" (too broad) |
|
|
209
|
-
| InputArtifact | Normalized intermediate from operator input (text/URL/image/repo/transcript) | "input", "spec source" |
|
|
210
|
-
| StackTemplate | Parameterizable Stack definition that instantiates concrete Stacks | "template" (too generic) |
|
|
211
|
-
| Whereami | Project-state snapshot artifact (one per repo) | "status", "state file" |
|
|
212
|
-
| SubstrateConfig | Repo manifest of external resource references | "config" (too generic) |
|
|
213
|
-
| PreviewState | Per-slug preview-cycle state | "preview status" |
|
|
214
|
-
| DeferredAction | Capability-routed cross-modality handoff entry | "TODO", "deferred work" |
|
|
215
|
-
|
|
216
|
-
## Storage format — four shapes among v0 entities
|
|
217
|
-
|
|
218
|
-
Not every entity is stored as pure JSON. The schema defines the
|
|
219
|
-
contract; the on-disk shape varies by entity-type ergonomics. WU-3's
|
|
220
|
-
validator hook (`state-validate.sh`) detects entity type from path
|
|
221
|
-
and applies the appropriate extractor + validator.
|
|
222
|
-
|
|
223
|
-
### Shape A — JSON authoritative + markdown rendered (singletons)
|
|
224
|
-
|
|
225
|
-
| Entity | On-disk | Schema validates |
|
|
226
|
-
|---|---|---|
|
|
227
|
-
| Whereami | `docs/whereami.json` (auth) + `docs/whereami.md` (rendered, auto-generated banner) | whole JSON file |
|
|
228
|
-
| SubstrateConfig | `substrate.config.json` (auth) + `substrate.config.md` (rendered) | whole JSON file |
|
|
229
|
-
| PreviewState | `docs/preview-state/<slug>.json` (auth) + `<slug>.md` (rendered) | whole JSON file |
|
|
230
|
-
|
|
231
|
-
Operator never edits the markdown. Mutations go through accessor
|
|
232
|
-
(`state_<entity>_set`); markdown re-renders on demand. Per-field
|
|
233
|
-
narrative migrates to chronicles (typed `references` array).
|
|
234
|
-
|
|
235
|
-
### Shape B — Markdown + YAML frontmatter + narrative body (collection entities with operator-readable bodies)
|
|
236
|
-
|
|
237
|
-
| Entity | On-disk | Schema validates |
|
|
238
|
-
|---|---|---|
|
|
239
|
-
| DeferredAction | `docs/deferred-actions/<id>.md` (frontmatter + body) | YAML frontmatter only |
|
|
240
|
-
| Chronicle | `chronicle/<id>.md` (frontmatter + narrative) + optional `chronicle/<id>.json` sidecar for gates_fired | frontmatter + sidecar |
|
|
241
|
-
| IterationBet | `docs/iteration-bets/<slug>.md` (frontmatter + body) | YAML frontmatter only |
|
|
242
|
-
| Roadmap | `docs/roadmaps/<slug>.md` (frontmatter + body) | YAML frontmatter only |
|
|
243
|
-
| Stack | `docs/stacks/<slug>.md` (frontmatter + body) | YAML frontmatter only |
|
|
244
|
-
| Decomposition | `docs/decompositions/<slug>.md` (frontmatter + body) | YAML frontmatter only |
|
|
245
|
-
| `Step` (formerly `Workunit`) | inline within Stack body OR `docs/workunits/<slug>.md` | YAML frontmatter only |
|
|
246
|
-
| Persona | `docs/personas/<slug>.md` (frontmatter + body, per persona-schema.md) | YAML frontmatter only |
|
|
247
|
-
|
|
248
|
-
Validator extracts YAML frontmatter from `*.md` files and validates
|
|
249
|
-
against `<entity>.schema.json`. Body sections (Procedure, Acceptance,
|
|
250
|
-
Sources read, Notes, etc.) stay markdown for operator readability —
|
|
251
|
-
the schema doesn't constrain them.
|
|
252
|
-
|
|
253
|
-
### Shape C — Pure JSON (machine-only, no narrative needed)
|
|
254
|
-
|
|
255
|
-
| Entity | On-disk | Schema validates |
|
|
256
|
-
|---|---|---|
|
|
257
|
-
| Marker | `state/markers/<category>/<uuid>.json` (relocated from `.claude/gate-markers/` per bassclef#342 — markers are runtime workflow events, belong in `state/` runtime drawer not `.claude/` rulebook drawer) | whole file |
|
|
258
|
-
| Gate | derived from Marker via accessor; no on-disk file (Gate is the abstract event; Marker is the persistence) | n/a |
|
|
259
|
-
| TemplateInstance | `state/template-instances/<uuid>.json` | whole file |
|
|
260
|
-
| InboxWorkItem | `state/inbox/<uuid>.json` | whole file |
|
|
261
|
-
| Session | `docs/sessions/<id>.json` (sidecar to existing `docs/sessions/<id>.md` session-board) | JSON file |
|
|
262
|
-
| InputArtifact | `docs/input-artifacts/<slug>.json` | whole file |
|
|
263
|
-
| StackTemplate | `state/stack-templates/<slug>.json` | whole file |
|
|
264
|
-
| SubstrateHardening | `state/substrate-hardening/inventory.json` (per bassclef bet 2026-06-17a Phase Z) | whole file |
|
|
265
|
-
|
|
266
|
-
These entities are machine-consumed; operator-readability isn't
|
|
267
|
-
load-bearing. Pure JSON; schema validates the whole file.
|
|
268
|
-
|
|
269
|
-
### Shape D — Pure YAML (operator-edited, sibling-repo) — added bassclef#462
|
|
270
|
-
|
|
271
|
-
| Entity | On-disk | Schema validates |
|
|
272
|
-
|---|---|---|
|
|
273
|
-
| BassclefPlatform | `<sibling-repo-root>/bassclef-platform.yml` (e.g., `~/src/sunj-labs/platform-config/bassclef-platform.yml`) | whole file |
|
|
274
|
-
|
|
275
|
-
One entity, one shape. Pure YAML because:
|
|
276
|
-
- The file is operator-edited by hand on first adoption — flat YAML is
|
|
277
|
-
the lowest-ceremony format that survives mobile editing.
|
|
278
|
-
- The file lives in a SIBLING repo (not bassclef) so that adopters can
|
|
279
|
-
fork and edit per-org without forking bassclef itself.
|
|
280
|
-
- Validator extracts whole-file as YAML → JSON; same ajv-cli draft-2020
|
|
281
|
-
validation as Shape A/C.
|
|
282
|
-
|
|
283
|
-
Distinct from Shape A: no markdown rendered companion, no JSON
|
|
284
|
-
authoritative form. The YAML IS the source of truth.
|
|
285
|
-
|
|
286
|
-
### Why four shapes, not one
|
|
287
|
-
|
|
288
|
-
Forcing every entity into pure JSON would lose operator-readability
|
|
289
|
-
where it matters (DeferredAction body explains how to resolve;
|
|
290
|
-
Chronicle narrative is the retrospective; IterationBet body is
|
|
291
|
-
substantive scope). Forcing every entity into markdown would lose
|
|
292
|
-
machine-consumability where it matters (Marker payload is small,
|
|
293
|
-
structured, machine-only).
|
|
294
|
-
|
|
295
|
-
Three shapes match three concerns. The schema validates the structured
|
|
296
|
-
part regardless of shape. WU-3's validator handles all three via
|
|
297
|
-
entity-type detection from path.
|
|
298
|
-
|
|
299
|
-
## Schema format
|
|
300
|
-
|
|
301
|
-
**Single format: JSON Schema (draft-2020-12)** per ADR-015. Zod deferred
|
|
302
|
-
to v1 paired with the first TS consumer that reads state from TS code.
|
|
303
|
-
|
|
304
|
-
Each entity:
|
|
305
|
-
|
|
306
|
-
- Schema file: `standards/state-spine/schemas/<entity>.schema.json`
|
|
307
|
-
(filename uses kebab-case derived from the entity's SENTINEL_bassclef_name —
|
|
308
|
-
e.g., `DeferredAction` → `deferred-action.schema.json`)
|
|
309
|
-
- `$id`: `https://bassclef.sunj-labs/state-spine/schemas/<entity>.schema.json`
|
|
310
|
-
(semantic identifier; not network-resolved)
|
|
311
|
-
- `$schema`: `https://json-schema.org/draft/2020-12/schema`
|
|
312
|
-
|
|
313
|
-
## Replay-determinism rule (canvas v4, from SWF mining)
|
|
314
|
-
|
|
315
|
-
The accessor library `lib/state.sh` (WU-2) MUST derive counters and
|
|
316
|
-
computed state from history on every call. **Never cache derived
|
|
317
|
-
values as side state.** Same input history → same output value,
|
|
318
|
-
deterministically.
|
|
319
|
-
|
|
320
|
-
This is what failed in #296 (compliance-counter floor-lift): the
|
|
321
|
-
counter logic had cached state that drifted from the source. Fixing
|
|
322
|
-
the math without fixing the discipline left the failure-class open.
|
|
323
|
-
SWF's decider replay model is the precedent — deciders re-derive
|
|
324
|
-
their decisions on every poll; same history → same decisions.
|
|
325
|
-
|
|
326
|
-
| Rule | Concrete shape |
|
|
327
|
-
|---|---|
|
|
328
|
-
| Counters re-compute on every call | `state_gate_compliance_recent N` reads markers + chronicles + computes; no `latest_compliance` field stored anywhere |
|
|
329
|
-
| Markers are write-once-immutable (Helland) | Once written, marker filename + payload never updates. Updates produce NEW markers; readers consider the latest non-superseded one. |
|
|
330
|
-
| Chronicles are append-only, derive-from-events | Chronicle's `gates_fired` field is computed from session's marker history at write time, not maintained out-of-band |
|
|
331
|
-
| Singletons (Whereami, PreviewState) are derived snapshots | Computable from collection state. Exist as performance shortcuts + operator-readable artifacts; `state_whereami_recompute` regenerates them from source |
|
|
332
|
-
|
|
333
|
-
Enforced at WU-3 by `state-validate.sh` hook (any JSON file with a
|
|
334
|
-
`derived_from:` annotation gets recomputed + diff-checked at commit;
|
|
335
|
-
mismatch BLOCKs).
|
|
336
|
-
|
|
337
|
-
## Write-once-immutability rule (Helland — *"Immutability Changes Everything"*)
|
|
338
|
-
|
|
339
|
-
Markers, Chronicles, Discoveries, Sessions are write-once. Once
|
|
340
|
-
committed, the record is immutable. Updates require new records that
|
|
341
|
-
supersede prior ones; readers consider the latest non-superseded
|
|
342
|
-
record per business-key.
|
|
343
|
-
|
|
344
|
-
This makes auditability free: every state mutation is in git history;
|
|
345
|
-
no record is silently overwritten.
|
|
346
|
-
|
|
347
|
-
## Relationship to existing schema standards
|
|
348
|
-
|
|
349
|
-
The five existing markdown schema standards become the source-of-truth
|
|
350
|
-
for their corresponding JSON Schema files:
|
|
351
|
-
|
|
352
|
-
| Markdown standard | JSON Schema file |
|
|
353
|
-
|---|---|
|
|
354
|
-
| `standards/whereami-schema.md` | `standards/state-spine/schemas/whereami.schema.json` |
|
|
355
|
-
| `standards/deferred-actions-schema.md` | `standards/state-spine/schemas/deferred-action.schema.json` |
|
|
356
|
-
| `standards/preview-state-schema.md` | `standards/state-spine/schemas/preview-state.schema.json` |
|
|
357
|
-
| `standards/substrate-config-schema.md` | `standards/state-spine/schemas/substrate-config.schema.json` |
|
|
358
|
-
| `standards/persona-schema.md` | `standards/state-spine/schemas/persona.schema.json` |
|
|
359
|
-
|
|
360
|
-
The markdown standards remain as human-readable references describing
|
|
361
|
-
each entity's role + business rules. The JSON Schema files are the
|
|
362
|
-
machine-readable contract enforced at write-time by `state-validate.sh`
|
|
363
|
-
(WU-3).
|
|
364
|
-
|
|
365
|
-
## Singleton authority — JSON authoritative; markdown rendered
|
|
366
|
-
|
|
367
|
-
For singletons (Whereami, SubstrateConfig, PreviewState):
|
|
368
|
-
|
|
369
|
-
- **JSON file is authoritative** (`docs/whereami.json`, `substrate.config.json`,
|
|
370
|
-
`docs/preview-state/<slug>.json`). Schema-validated at write by
|
|
371
|
-
`state-validate.sh` (WU-3).
|
|
372
|
-
- **Markdown view is rendered on demand** from the JSON by the consuming
|
|
373
|
-
skill (`/whereami`, etc.). Carries `<!-- AUTO-GENERATED — edit JSON, not this file -->`
|
|
374
|
-
banner at the top.
|
|
375
|
-
- **Operator never `vim`s the markdown** — edits go through accessor
|
|
376
|
-
surface (`state_whereami_set <field> <value>`, etc., per WU-2).
|
|
377
|
-
- **Per-field narrative in today's whereami** (long `iteration_phase`
|
|
378
|
-
descriptions, append-only "Last updated" history block) **migrates
|
|
379
|
-
to chronicles** during WU-4. Whereami's `last_updated` field becomes
|
|
380
|
-
a single object per the schema, not a list.
|
|
381
|
-
|
|
382
|
-
Why JSON-authoritative not "JSON + markdown both git-tracked":
|
|
383
|
-
|
|
384
|
-
The "ship both, sync them" shape preserves operator's `vim
|
|
385
|
-
docs/whereami.md` workflow but reproduces the failure mode the spine
|
|
386
|
-
retires — operator-text-edits cause schema drift, consumers parse
|
|
387
|
-
markdown freehand, ambiguity about which file is the source. JSON-only
|
|
388
|
-
forces the discipline cleanly: state is typed, narrative is in
|
|
389
|
-
chronicles (a first-class entity), markdown is a view.
|
|
390
|
-
|
|
391
|
-
Authority hierarchy reminder (per accessor discipline §):
|
|
392
|
-
|
|
393
|
-
| Layer | Role | Format |
|
|
394
|
-
|---|---|---|
|
|
395
|
-
| Collection entities (Session, Gate, IterationBet, Chronicle, ...) | Authoritative source | individual JSON files |
|
|
396
|
-
| Singleton snapshot (Whereami) | Derived cache, schema-validated | JSON file |
|
|
397
|
-
| Singleton view (whereami.md) | Rendered for operator | markdown (auto-generated) |
|
|
398
|
-
|
|
399
|
-
`state_whereami_recompute` regenerates the singleton from collection
|
|
400
|
-
state per the replay-determinism rule.
|
|
401
|
-
|
|
402
|
-
## Cross-entity references — typed `references` array (v0)
|
|
403
|
-
|
|
404
|
-
Entities that benefit from linking to context (chronicles, discoveries,
|
|
405
|
-
ADRs, decompositions, specs) carry an optional `references: [reference]`
|
|
406
|
-
array. Each reference is a typed lookup, not a path or freeform string:
|
|
407
|
-
|
|
408
|
-
```json
|
|
409
|
-
"references": [
|
|
410
|
-
{"type": "chronicle", "id": "2026-04-27b-spine-v0-WU-1"},
|
|
411
|
-
{"type": "adr", "id": "ADR-015", "anchor": "Decision"}
|
|
412
|
-
]
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
Resolver `state_reference_get <type> <id>` returns the entity. WU-3
|
|
416
|
-
validator catches dangling references (no entity at `<type>/<id>`) at
|
|
417
|
-
write.
|
|
418
|
-
|
|
419
|
-
### Reference type vocabulary
|
|
420
|
-
|
|
421
|
-
Stable set; extend via this standard.
|
|
422
|
-
|
|
423
|
-
| `type` | Looked up in |
|
|
424
|
-
|---|---|
|
|
425
|
-
| `chronicle` | `chronicle/<id>.md` (bassclef) or `docs/chronicle/<id>.md` (consumer repos) |
|
|
426
|
-
| `discovery` | `design/discoveries/<id>.md` |
|
|
427
|
-
| `adr` | `architecture/decisions/<id>.md` (e.g., id=`ADR-015-state-schema-format`) |
|
|
428
|
-
| `decomposition` | `docs/decompositions/<id>.md` |
|
|
429
|
-
| `spec` | `docs/specs/<id>.md` |
|
|
430
|
-
| `session` | `docs/sessions/<id>.md` |
|
|
431
|
-
| `iteration-bet` | `docs/iteration-bets/<id>.md` |
|
|
432
|
-
| `roadmap` | `docs/roadmaps/<id>.md` |
|
|
433
|
-
|
|
434
|
-
### Why typed-id, not hash-as-index
|
|
435
|
-
|
|
436
|
-
Hash-as-index (content-addressed `context: "blake3:abc..."` opaque
|
|
437
|
-
string with object store + reverse-index + drift detection) is the
|
|
438
|
-
architecturally elegant pattern (Helland write-once-immutable,
|
|
439
|
-
cxdb Blob CAS-aligned, git-tree analog). Deferred to spine v1 per
|
|
440
|
-
bassclef#316 — gated on first observed context-drift incident.
|
|
441
|
-
|
|
442
|
-
Same "extend on real signal" discipline as ADR-015 (single-format
|
|
443
|
-
schemas; Zod deferred to v1).
|
|
444
|
-
|
|
445
|
-
v0 simple typed-references suffice for the dominant case: state needs
|
|
446
|
-
to point at chronicles/ADRs/decompositions for traceability, not for
|
|
447
|
-
versioned integrity.
|
|
448
|
-
|
|
449
|
-
## Migration bootstrap discipline
|
|
450
|
-
|
|
451
|
-
Every Shape A (singleton JSON authoritative) entity ships with a migration script that bootstraps its `.json` file from the prior `.md` frontmatter representation. Adopters mid-migration keep both files; the accessor reads Tier 0 JSON when present and falls back to Tier 1 md frontmatter otherwise (per ADR-054 D3).
|
|
452
|
-
|
|
453
|
-
Contract for every migration script:
|
|
454
|
-
|
|
455
|
-
- Path: `scripts/migrate-<entity>-to-json.sh`
|
|
456
|
-
- Idempotent: no-op when target `.json` already exists
|
|
457
|
-
- Atomic write: temp file + rename per @luminary michael-nygard
|
|
458
|
-
- Marker at `state/markers/migration/<entity>-json-bootstrap-<ts>.marker` per Helland write-once
|
|
459
|
-
- Exit codes: 0 success / no-op; 1 both missing; 3 md malformed; 4 write failed
|
|
460
|
-
- Tier 0 test coverage at `.claude/hooks/tests/migrate-<entity>-to-json.test.sh` — 5 tests: creates, idempotent, marker, both-missing, malformed
|
|
461
|
-
|
|
462
|
-
Shipped for Whereami — `scripts/migrate-whereami-to-json.sh` per goal 2026-09-06d Step 3 + UC-4. Pattern reusable for SubstrateConfig + PreviewState + future Shape A entities.
|
|
463
|
-
|
|
464
|
-
Extension of Cure 2 fallback to those entities is out of scope for this goal (own UC extension work per spec § Out of scope).
|
|
465
|
-
|
|
466
|
-
## Relationship to other standards
|
|
467
|
-
|
|
468
|
-
- `standards/whereami-schema.md`, `standards/deferred-actions-schema.md`,
|
|
469
|
-
`standards/preview-state-schema.md`, `standards/substrate-config-schema.md`,
|
|
470
|
-
`standards/persona-schema.md` — markdown specs ported into JSON Schema
|
|
471
|
-
here; markdown remains the human-readable reference
|
|
472
|
-
- `standards/branch-stacking.md` — Stack entity reads stack manifests
|
|
473
|
-
per this standard
|
|
474
|
-
- `standards/session-board.md` — Session entity references session
|
|
475
|
-
boards per this standard
|
|
476
|
-
- `standards/artifact-composition.md` — typed cross-refs across
|
|
477
|
-
entities (parent_roadmap, parent_canvas, stack_manifest, session_board)
|
|
478
|
-
enforced via JSON Schema `$ref` where structural; verified by
|
|
479
|
-
`state-validate.sh` (WU-3)
|
|
480
|
-
|
|
481
|
-
## Relationship to ADRs
|
|
482
|
-
|
|
483
|
-
- **ADR-015** (this bet) — JSON Schema only for v0; Zod v1
|
|
484
|
-
- **ADR-013** (substrate runtime portfolio) — orthogonal (storage
|
|
485
|
-
backend; spine v0 is filesystem-on-git; cxdb deferred to bassclef#300)
|
|
486
|
-
- **ADR-014** (substrate sync strategy) — orthogonal (distribution)
|
|
487
|
-
|
|
488
|
-
## Versioning
|
|
489
|
-
|
|
490
|
-
Schema files versioned via `$id` URL path (e.g.,
|
|
491
|
-
`/state-spine/v0/schemas/deferred-action.schema.json` for v0,
|
|
492
|
-
`/state-spine/v1/schemas/...` for v1+ if breaking changes land).
|
|
493
|
-
|
|
494
|
-
v0 schemas are stable through the spine v0 deprecation window. Breaking
|
|
495
|
-
changes ship as v1 schemas with migration guidance per Fowler's
|
|
496
|
-
expand-and-contract.
|
|
497
|
-
|
|
498
|
-
## Scrutiny
|
|
499
|
-
|
|
500
|
-
This standard meets the bar for bassclef inclusion because:
|
|
501
|
-
|
|
502
|
-
1. WU-2 accessor library reads schemas as its contract (load-bearing)
|
|
503
|
-
2. WU-3 validator hook validates writes against these schemas (load-bearing)
|
|
504
|
-
3. WU-4 migration script writes data conforming to these schemas (load-bearing)
|
|
505
|
-
4. WU-5 telemetry rewrite reads via accessor → ultimately reads these schemas (load-bearing)
|
|
506
|
-
5. WU-6 hook updates read via accessor (load-bearing)
|
|
507
|
-
6. WU-7 skill updates read via accessor (load-bearing)
|
|
508
|
-
7. WU-8 `/state` skill exposes schema-typed surface to operator (load-bearing)
|
|
509
|
-
|
|
510
|
-
Without these seven WU consumers, this standard would be premature
|
|
511
|
-
documentation. Spine v0's full WU sequence ships them.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
hint_id: kiss-words
|
|
4
|
-
priority: high
|
|
5
|
-
boundaries: [prompt-submit, skill-end, state-write]
|
|
6
|
-
token_budget: 50
|
|
7
|
-
refresh_interval_turns: 5
|
|
8
|
-
description: Write at grade 8. Cap grade 10. Short sentences. Subject-verb-object. Drop bassclef-only words per standards/bassclef-internal-jargon.md. Keep standard tech words (API, hook, PR, schema).
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
Write at grade 8. Cap grade 10. Short sentences. Subject-verb-object. Drop bassclef-only words per standards/bassclef-internal-jargon.md. Keep standard tech words (API, hook, PR, schema).
|