@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,90 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
standard: skill-output-discipline
|
|
4
|
-
title: Skill output discipline — dispatch /kiss on operator-facing prose before returning
|
|
5
|
-
authoring_luminaries:
|
|
6
|
-
primary:
|
|
7
|
-
- john-ousterhout # deep module — one contract, many call sites
|
|
8
|
-
- saltzer-schroeder # complete mediation — every output surface passes /kiss
|
|
9
|
-
supporting:
|
|
10
|
-
- alan-cooper # persona-driven — Sam skims, Louis copies, Morgan inspects
|
|
11
|
-
- don-norman # signifier — the "## Output discipline" heading names the contract
|
|
12
|
-
- michael-nygard # stability — cosine gate pins post-cure behavior
|
|
13
|
-
version: 1
|
|
14
|
-
supersedes: none
|
|
15
|
-
verification_status: accepted
|
|
16
|
-
description: Every skill that returns operator-facing prose runs /kiss words --rewrite on the full output before returning.
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# Skill output discipline
|
|
20
|
-
|
|
21
|
-
Every skill that returns operator-facing prose runs `/kiss words --rewrite` on the full output before returning. This standard names the contract. Each skill body carries a 3-line pointer to this file, not the full contract.
|
|
22
|
-
|
|
23
|
-
## The contract
|
|
24
|
-
|
|
25
|
-
Before returning any operator-facing text from a skill (opener, tables, cards, findings, status, closing prose):
|
|
26
|
-
|
|
27
|
-
1. Dispatch `/kiss words --rewrite` on the full rendered draft. Not just the opener. Not an inline block-term scan. Actual skill dispatch. The two-flag form runs vocabulary substitution AND six heuristic checks — passive voice, hyphen words, long sentences, non-SVO openers, noun stacks, adverb density.
|
|
28
|
-
2. Apply the rewrite. When `/kiss` returns no changes, accept the pass.
|
|
29
|
-
3. Cite the dispatched skill inline per `.claude/rules/operator-facing-prose.md` Rule 3.
|
|
30
|
-
4. Return the response.
|
|
31
|
-
|
|
32
|
-
`/kiss` reads `standards/bassclef-internal-jargon.md` per bassclef#907 as the single source of truth for BLOCK + ADVISE + ADVISE-PHRASE terms. The `--rewrite` heuristics live at `lib/rewrite-check.sh` and are grounded in UK ONS Style Guide + Nielsen Norman Group Plain Language + US Federal Plain Language Guidelines + Hemingway Editor. Heuristics surface candidates for review; they do not block.
|
|
33
|
-
|
|
34
|
-
**Writing-craft anchor.** The full craft rules live at `standards/ogilvy-writing-rules.md` — Ogilvy's 10 rules plus Roman + Raphaelson's principles. `/kiss words` covers vocabulary substitution. `/ogilvy-writing-audit` covers the craft-audit. Skills producing operator-facing prose benefit from both — kiss for words, ogilvy-audit for shape.
|
|
35
|
-
|
|
36
|
-
## What counts as operator-facing prose
|
|
37
|
-
|
|
38
|
-
- Skill output the operator reads on screen (opener, tables, cards, recommendations)
|
|
39
|
-
- Findings tables and audit results
|
|
40
|
-
- Status updates between phases
|
|
41
|
-
- Closing prose (recommendations, confirm-to-proceed, next-step lines)
|
|
42
|
-
|
|
43
|
-
Skill output that is machine-parsed only (JSON, CSV, structured markers) does not count. Skills that emit only machine output declare `no_operator_output: true` in frontmatter.
|
|
44
|
-
|
|
45
|
-
## The body snippet each skill carries
|
|
46
|
-
|
|
47
|
-
Every skill that emits operator-facing prose appends this 3-line section to its body:
|
|
48
|
-
|
|
49
|
-
```markdown
|
|
50
|
-
## Output discipline
|
|
51
|
-
|
|
52
|
-
Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
The snippet grades around 5.0 on Flesch-Kincaid. That passes the grade gate at `.claude/hooks/skill-body-grade-gate.sh` (target 80% at grade 8-9).
|
|
56
|
-
|
|
57
|
-
The classifier in `lib/output-discipline.sh` `has_kiss_dispatch` matches either the full canonical form or the pointer sentence, in single-flag OR two-flag shape. Skills using the two-flag pointer (`/kiss words --rewrite`) count as PRESENT. Skills still using the single-flag pointer (`/kiss words`) also count as PRESENT during the grace window per ADR-031.
|
|
58
|
-
|
|
59
|
-
## Why the pointer, not the full contract
|
|
60
|
-
|
|
61
|
-
Sam skims the skill body. He reads the section heading `## Output discipline` and knows a contract exists. He can move on.
|
|
62
|
-
|
|
63
|
-
Louis writes his own skills for the community. He copies the 3-line snippet verbatim. He does not have to internalize the full contract.
|
|
64
|
-
|
|
65
|
-
Morgan reads for over-claim. He clicks through to this standards file. He sees one source of truth, not 90 duplicated contracts scattered across skill bodies.
|
|
66
|
-
|
|
67
|
-
The pattern follows Ousterhout's deep module — small interface (3 lines in each skill), large implementation (this standard) hidden behind it.
|
|
68
|
-
|
|
69
|
-
## Opt-out
|
|
70
|
-
|
|
71
|
-
Skills whose only output is machine-parsed (JSON, structured markers, exit codes) declare `no_operator_output: true` in frontmatter. The `has_opt_out` classifier reads this and returns `OPT_OUT`.
|
|
72
|
-
|
|
73
|
-
## Sources read
|
|
74
|
-
|
|
75
|
-
- `docs/canvases/2026-07-25-substrate-output-discipline.md` — parent canvas naming the pattern
|
|
76
|
-
- `lib/output-discipline.sh` L36-49 — the classifier this contract feeds
|
|
77
|
-
- `.claude/rules/operator-facing-prose.md` Rule 3 — inline citation discipline
|
|
78
|
-
- `.claude/luminaries/john-ousterhout.md` — deep module framing
|
|
79
|
-
- `docs/personas/sam.md`, `docs/personas/2026-07-12-bet11c-louis.md`, `docs/personas/morgan.md` — persona lens for the design
|
|
80
|
-
|
|
81
|
-
## Refs
|
|
82
|
-
|
|
83
|
-
- bassclef-upstream#859 (parent epic — substrate-wide output discipline)
|
|
84
|
-
- bassclef-upstream#858 (pilot — /longrun + /sprint dispatch pattern)
|
|
85
|
-
- Canvas `docs/canvases/2026-07-25-substrate-output-discipline.md`
|
|
86
|
-
- Standard `standards/bassclef-internal-jargon.md` (SSOT for /kiss vocabulary)
|
|
87
|
-
|
|
88
|
-
## Retirement condition
|
|
89
|
-
|
|
90
|
-
This standard retires only if `/kiss` itself retires or if all skill output moves to a machine-parsed shape. Until then, the 3-line snippet is the interface every skill body carries.
|
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: "The interface contract for lib/state.sh — the typed accessor library over bassclef's state spine."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# State Spine Accessor Contract
|
|
7
|
-
|
|
8
|
-
The interface contract for `lib/state.sh` — the typed accessor library
|
|
9
|
-
over bassclef's state spine. Repository pattern (Fowler PoEAA): hides
|
|
10
|
-
storage backend (JSON-on-git for v0; cxdb for opt-in adopters per
|
|
11
|
-
bassclef#300) from consumers via a stable accessor surface.
|
|
12
|
-
|
|
13
|
-
This standard is the contract. The implementation is `lib/state.sh`.
|
|
14
|
-
Adapter discipline (per canvas Stage 3 §"Adapter discipline") preserves
|
|
15
|
-
the swap surface — when cxdb adoption ships, the implementation changes
|
|
16
|
-
but this contract does not.
|
|
17
|
-
|
|
18
|
-
## Sources read
|
|
19
|
-
|
|
20
|
-
- `docs/iteration-bets/2026-04-27-state-spine-v0.md` §"WU-2 Typed accessor library" — procedure + acceptance
|
|
21
|
-
- `strategy/canvases/2026-04-26-state-spine.md` v4 — accessor discipline (replay-determinism); pattern-set (Repository/Facade); cxdb-adapter exit criteria
|
|
22
|
-
- `architecture/decisions/ADR-015-state-schema-format.md` — JSON Schema only for v0 (no Zod runtime)
|
|
23
|
-
- `standards/state-spine.md` — entity catalog (17 v0 + Persona); storage shapes (3 — A/B/C); replay-determinism rule; write-once-immutability rule
|
|
24
|
-
- All 18 v0 entity schemas in `standards/state-spine/schemas/` — define what each accessor returns
|
|
25
|
-
- `.claude/luminaries/martin-fowler.md` — Repository pattern + Strangler Fig
|
|
26
|
-
- `.claude/rules/diagnosis.md` — error-shape conventions (return non-zero + stderr message; never silent failure)
|
|
27
|
-
|
|
28
|
-
## What I'm NOT reading (with reason)
|
|
29
|
-
|
|
30
|
-
- cxdb / Dolt vendor docs — out of v0 scope (Track B)
|
|
31
|
-
- `extract-session-telemetry.sh` line-by-line — WU-5's pre-read; this contract defines the surface telemetry will consume, not telemetry itself
|
|
32
|
-
|
|
33
|
-
## Naming convention
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
state_<entity>_<verb>[_<modifier>]
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
- **entity** — kebab-case entity name from state-spine.md (e.g., `whereami`, `iteration_bet`, `deferred_action`, `chronicle`, `marker`)
|
|
40
|
-
- **verb** — operation (bassclef set below)
|
|
41
|
-
- **modifier** — optional qualifier for special-purpose accessors
|
|
42
|
-
|
|
43
|
-
Examples:
|
|
44
|
-
- `state_whereami_get` — get the singleton
|
|
45
|
-
- `state_iteration_bet_list` — list all bets
|
|
46
|
-
- `state_marker_count` — count markers (with optional filter args)
|
|
47
|
-
- `state_chronicle_gate_evidence` — special-purpose: extract gates_fired from a chronicle
|
|
48
|
-
- `state_deferred_action_pending` — special-purpose: list pending actions matching capabilities
|
|
49
|
-
|
|
50
|
-
## Verb vocabulary
|
|
51
|
-
|
|
52
|
-
Stable set. Extend via this contract (with a paired schema-side rationale).
|
|
53
|
-
|
|
54
|
-
| Verb | Semantics | Allowed for |
|
|
55
|
-
|---|---|---|
|
|
56
|
-
| `get` | Single entity by id; returns JSON to stdout, 1 to stderr if not found | All entities |
|
|
57
|
-
| `list` | Collection (optional filter args); returns JSON array to stdout (empty array `[]` if none) | All entities |
|
|
58
|
-
| `count` | Counter (optional filter args); returns integer to stdout | All entities |
|
|
59
|
-
| `add` | Append a new entity; takes JSON on stdin, writes file, returns id to stdout | Write-many entities (Marker, Chronicle, Decomposition, InputArtifact, Session, Gate, InboxWorkItem, TemplateInstance, DeferredAction) |
|
|
60
|
-
| `set` | Update field on singleton; takes field + value, validates against schema, writes | Singletons only (Whereami, SubstrateConfig, PreviewState, BassclefPlatform) |
|
|
61
|
-
| `update_status` | Change status field; validates new value against entity's status enum | Mutable-status entities (IterationBet, Step, InboxWorkItem, DeferredAction) |
|
|
62
|
-
| `render` | Generate operator-readable markdown from JSON authoritative source | Singletons (Whereami, SubstrateConfig, PreviewState) |
|
|
63
|
-
|
|
64
|
-
Forbidden verbs: any mutation on Markers, Chronicles, Discoveries,
|
|
65
|
-
Sessions (write-once-immutable per Helland — see canvas §"Accessor
|
|
66
|
-
discipline"). Updates produce NEW records; readers consider the latest
|
|
67
|
-
non-superseded record per business-key.
|
|
68
|
-
|
|
69
|
-
## Return semantics
|
|
70
|
-
|
|
71
|
-
| Outcome | Stdout | Stderr | Exit code |
|
|
72
|
-
|---|---|---|---|
|
|
73
|
-
| Success (single entity) | JSON object | (empty) | 0 |
|
|
74
|
-
| Success (list) | JSON array (possibly empty) | (empty) | 0 |
|
|
75
|
-
| Success (count) | integer | (empty) | 0 |
|
|
76
|
-
| Success (add) | new id | (empty) | 0 |
|
|
77
|
-
| Not found | (empty) | (empty) | 1 |
|
|
78
|
-
| Invalid input | (empty) | error message | 2 |
|
|
79
|
-
| Schema validation failed | (empty) | jq/ajv error | 3 |
|
|
80
|
-
| File system error | (empty) | error message | 4 |
|
|
81
|
-
| Unsupported entity / verb | (empty) | error message | 5 |
|
|
82
|
-
|
|
83
|
-
Consumers check exit code; non-zero is failure. Never silent — error
|
|
84
|
-
messages always go to stderr per `.claude/rules/diagnosis.md`
|
|
85
|
-
("Step 0 — Reproduce" requires the failure to surface).
|
|
86
|
-
|
|
87
|
-
## Replay-determinism rule (canvas v4 SWF mining)
|
|
88
|
-
|
|
89
|
-
Counters and computed state derived from history on every call. **Never
|
|
90
|
-
cache derived values as side state.**
|
|
91
|
-
|
|
92
|
-
Concretely:
|
|
93
|
-
- `state_marker_count [category] [since-N-sessions]` reads the Marker
|
|
94
|
-
collection + computes; no `latest_count` field stored anywhere
|
|
95
|
-
- `state_chronicle_gate_evidence <id>` derives from session's marker
|
|
96
|
-
history at chronicle write time, not maintained out-of-band
|
|
97
|
-
- `state_whereami_recompute` regenerates the Whereami singleton from
|
|
98
|
-
collection state; the JSON sidecar at `docs/whereami.json` is a
|
|
99
|
-
cache, not authority
|
|
100
|
-
|
|
101
|
-
This is the bassclef analog of SWF's "decider must be idempotent on
|
|
102
|
-
replay." Same input history → same output, deterministically. Failing
|
|
103
|
-
at this is what produced bassclef#296 (compliance counter floor-lift).
|
|
104
|
-
|
|
105
|
-
## Write-once-immutability rule (Helland)
|
|
106
|
-
|
|
107
|
-
Markers, Chronicles, Discoveries, Sessions are write-once. Once
|
|
108
|
-
committed:
|
|
109
|
-
- Filename never changes (UUID for Markers; ID-based for others)
|
|
110
|
-
- Body content never changes
|
|
111
|
-
- Updates produce NEW records that supersede the prior (via
|
|
112
|
-
`supersedes` field per the Marker schema)
|
|
113
|
-
|
|
114
|
-
Accessors that mutate (`add`) write atomic — file lands or fails. No
|
|
115
|
-
partial writes. Use temp-file + rename pattern.
|
|
116
|
-
|
|
117
|
-
Accessors that don't mutate (`get`, `list`, `count`, `update_status`)
|
|
118
|
-
operate on whatever's on disk; consumers responsible for any
|
|
119
|
-
serializability they need (out of v0 scope; cxdb upgrade addresses for
|
|
120
|
-
concurrent fanout).
|
|
121
|
-
|
|
122
|
-
## Storage-shape extraction (per state-spine.md §"Storage format")
|
|
123
|
-
|
|
124
|
-
The accessor handles all three on-disk shapes via entity-type-aware
|
|
125
|
-
extraction:
|
|
126
|
-
|
|
127
|
-
### Shape A entities (singleton JSON authoritative + markdown rendered)
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
state_whereami_get() { cat docs/whereami.json; }
|
|
131
|
-
state_whereami_set <field> <value> # jq update + atomic rename
|
|
132
|
-
state_whereami_render # JSON → markdown (with auto-generated banner)
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Shape B entities (markdown + YAML frontmatter + body)
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
state_iteration_bet_get <slug> {
|
|
139
|
-
# Extract YAML frontmatter, convert to JSON
|
|
140
|
-
awk '/^---$/{c++; next} c==1' docs/iteration-bets/$slug.md | yq2json
|
|
141
|
-
}
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
`yq2json` is implemented as `python3 -c "import sys,yaml,json; print(json.dumps(yaml.safe_load(sys.stdin), default=str))"` (yaml + json stdlib, available everywhere).
|
|
145
|
-
|
|
146
|
-
### Shape C entities (pure JSON)
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
state_marker_get <uuid> {
|
|
150
|
-
# Find by UUID across category dirs
|
|
151
|
-
find state/markers -name "${uuid}.json" -type f -print -quit | xargs cat
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Shape D entities (pure YAML at sibling-repo root) — added bassclef#462
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
state_platform_get [dot.path.key] {
|
|
159
|
-
# Resolves file via BASSCLEF_PLATFORM_CONFIG_PATH env or default
|
|
160
|
-
# ~/src/sunj-labs/platform-config/bassclef-platform.yml; converts
|
|
161
|
-
# YAML to JSON; if a key is given, jq-walks the path.
|
|
162
|
-
python3 -c "import yaml,json; print(json.dumps(yaml.safe_load(open('$path'))))" \
|
|
163
|
-
| jq -r --arg key "$key" 'getpath($key | split("."))'
|
|
164
|
-
}
|
|
165
|
-
state_platform_path # returns the resolved file path (no read)
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## Special-purpose accessors (v0 hot-path consumers)
|
|
169
|
-
|
|
170
|
-
Beyond generic verbs, the following exist for known v0 consumers:
|
|
171
|
-
|
|
172
|
-
| Accessor | Returns | Consumer |
|
|
173
|
-
|---|---|---|
|
|
174
|
-
| `state_marker_count [category] [since-days]` | int | `extract-session-telemetry.sh` (WU-5); `40-gate-compliance.sh` (WU-6). v0 since-days = mtime-based; v1 will redefine as session-boundary-mapped per canvas v4 SWF mining. Accepts both `.json` (spine) and `.marker` (legacy verify-markers) extensions. |
|
|
175
|
-
| `state_chronicle_list [--recent N]` | newline-separated chronicle IDs (lex order) | `extract-session-telemetry.sh` (WU-5); `/sprint`, `/chronicle` (WU-7). Tries `chronicle/` then `docs/chronicle/`. |
|
|
176
|
-
| `state_chronicle_gate_evidence <id>` | JSON of `gates_fired` frontmatter array | `extract-session-telemetry.sh` (WU-5) — frontmatter-only. Legacy chronicles with body-table Gate Evidence return `[]`; consumers may parse markdown body directly per `accessor-library-discipline.md` §"What this rule allows". |
|
|
177
|
-
| `state_session_recent <N>` | JSON array of recent N sessions | `/sprint`, `/chronicle` (WU-7) |
|
|
178
|
-
| `state_step_for_branch <branch-name>` | JSON of Step | status checks; `/longrun checkpoint` |
|
|
179
|
-
| `state_deferred_action_pending [requires-capability...]` | JSON array of resolvable entries (capability-filtered) | `60-deferred-actions.sh` (WU-6) |
|
|
180
|
-
| `state_deferred_action_list [pending\|completed\|all]` | JSON array of all entries in scope (no capability filter) | `/state` skill (WU-8); ad-hoc inspection |
|
|
181
|
-
| `state_iteration_bet_active` | JSON of currently-active bet (or empty if none) | `/sprint` (WU-7) |
|
|
182
|
-
| `state_iteration_bet_list` | JSON array of all bets (lexicographic order) | `/state` skill (WU-8) |
|
|
183
|
-
| `state_reference_get <type> <id>` | JSON of referenced entity (resolves typed cross-refs) | validator (WU-3); render (WU-7) |
|
|
184
|
-
| `state_reference_check <type> <id>` | exit 0 if exists, 1 if dangling | validator (WU-3) |
|
|
185
|
-
| `state_validate <path>` | empty stdout on success; BLOCK message on stderr if schema violation | `/state` skill (WU-8); ad-hoc operator validation |
|
|
186
|
-
| `state_roadmap_get <slug>` | JSON of roadmap frontmatter | `/sprint`, `/longrun` first-turn orientation (bassclef#337 WU-4) |
|
|
187
|
-
| `state_roadmap_next_pending <slug>` | JSON of next claimable WU (depends_on satisfied + status=pending) | claim_wu's default arg path |
|
|
188
|
-
| `state_platform_get [dot.path]` | JSON object (whole file) or scalar (when dot-path given) | `/provision-deploy-host` (bassclef#457), `/secrets-bootstrap` (bassclef#461), `/scaffold-stack` (bassclef#460), `/bind-subdomain` (existing — V2 reads zone via this rather than per-repo substrate.config); reads sibling-repo `bassclef-platform.yml` |
|
|
189
|
-
| `state_platform_path` | filesystem path string | tooling that displays where state_platform_get reads from without reading |
|
|
190
|
-
| `state_roadmap_claim_wu <slug> [wu-slug] [session-id]` | JSON of claimed WU; advances `last_event` with `task-claimed` (bassclef#349 tail-1) | distributed agent coordination — atomic claim via flock |
|
|
191
|
-
| `state_roadmap_release_wu <slug> <wu-slug> [event] [refs-json]` | JSON of new `last_event`; advances `last_event` with completion | distributed agent coordination — completion |
|
|
192
|
-
| `state_roadmap_abandon_wu <slug> <wu-slug> [reason] [--terminal]` | JSON of new `last_event`; advances `last_event` with `task-abandoned` (bassclef#349 tail-2) | scope-change exit path; default returns to pending, `--terminal` marks abandoned |
|
|
193
|
-
| `state_roadmap_add_task <slug> <wu-slug> <issue> <wu-id> <title> [depends_on-json]` | JSON of new task; advances `last_event` with `task-added` (bassclef#349 tail-3) | proper accessor entry point for populating roadmap task list — replaces hand-edits per `accessor-library-discipline.md` |
|
|
194
|
-
|
|
195
|
-
## Adapter discipline — preserved swap surface
|
|
196
|
-
|
|
197
|
-
Per canvas Stage 3 §"Adapter discipline" (7 exit criteria):
|
|
198
|
-
|
|
199
|
-
1. **Accessor library is the ONLY consumer of storage backend APIs.**
|
|
200
|
-
No skill/hook/rule/script invokes `cat docs/whereami.json` directly
|
|
201
|
-
when an accessor exists. Enforced via `accessor-library-discipline.md`
|
|
202
|
-
rule (paired with this contract; ships in same PR as `lib/state.sh`).
|
|
203
|
-
2. **Accessor surface exposes only operations expressible in BOTH
|
|
204
|
-
backends** (JSON-on-git AND cxdb). No JSON-on-git-specific features
|
|
205
|
-
(e.g., `find`-based glob queries, jq paths in public surface) leak
|
|
206
|
-
into the contract. cxdb-adopter would re-implement these accessors
|
|
207
|
-
against Turn DAG + Blob CAS; surface stays unchanged.
|
|
208
|
-
3. **JSON spine remains writable from cxdb.** When cxdb adoption ships,
|
|
209
|
-
`state_marker_add` etc. continue to write JSON files (cxdb is a
|
|
210
|
-
read-side projection); JSON files in git are still authoritative.
|
|
211
|
-
4. **Contract is schema-first, not implementation-first.** Entity
|
|
212
|
-
definitions live in `standards/state-spine/schemas/`. cxdb's Type
|
|
213
|
-
Registry would be loaded FROM bassclef's schema, not derived.
|
|
214
|
-
5. **A working cxdb fork is maintained** when adopted. (Out of v0 scope.)
|
|
215
|
-
6. **Migration tooling (cxdb → Dolt) is designable from the entity
|
|
216
|
-
model.** (Out of v0 scope; ADR bassclef#300 placeholder.)
|
|
217
|
-
7. **Dolt-as-fallback design is sketched in the cxdb ADR.** (Out of
|
|
218
|
-
v0 scope.)
|
|
219
|
-
|
|
220
|
-
For v0: criteria 1-4 apply now. They constrain `lib/state.sh` design
|
|
221
|
-
even though only criterion 1 is enforceable in v0 (the rule).
|
|
222
|
-
|
|
223
|
-
## Test coverage requirement
|
|
224
|
-
|
|
225
|
-
≥95% test coverage on `lib/state.sh` per step-2 acceptance. Test scaffold
|
|
226
|
-
at `scripts/tests/state.test.sh` per existing bassclef bash-test
|
|
227
|
-
pattern (`scripts/tests/bind-subdomain.test.sh`).
|
|
228
|
-
|
|
229
|
-
Each accessor has at minimum:
|
|
230
|
-
- Happy path (successful return)
|
|
231
|
-
- Not-found path (exit 1, empty stdout)
|
|
232
|
-
- Invalid-input path (exit 2, stderr message)
|
|
233
|
-
- Schema-validation path where applicable (exit 3)
|
|
234
|
-
|
|
235
|
-
## Versioning
|
|
236
|
-
|
|
237
|
-
Accessor surface versioned via this standard. Breaking changes
|
|
238
|
-
(removing accessors, changing return shapes, changing exit codes) are
|
|
239
|
-
v1 changes — ship as `state_v1.sh` alongside `state.sh` during
|
|
240
|
-
deprecation window per Fowler expand-and-contract.
|
|
241
|
-
|
|
242
|
-
Adding new accessors is non-breaking; can land in v0 patches.
|
|
243
|
-
|
|
244
|
-
## Relationship to other standards
|
|
245
|
-
|
|
246
|
-
- `standards/state-spine.md` — entity catalog + storage shapes; this
|
|
247
|
-
contract operates on
|
|
248
|
-
- `standards/branch-stacking.md` — Stack entity uses retarget protocol;
|
|
249
|
-
WU-2 PR will need this on merge
|
|
250
|
-
- `.claude/rules/state-schema-validation.md` (paired with WU-3) — write-time
|
|
251
|
-
validation; this contract's `add`/`set`/`update_status` accessors invoke
|
|
252
|
-
the validator before writing
|
|
253
|
-
- `.claude/rules/accessor-library-discipline.md` (paired with this
|
|
254
|
-
standard) — enforces "no skill/hook/rule reads state directly; all
|
|
255
|
-
access goes through `lib/state.sh`"
|