@thebassclef/lite 0.1.3 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/dist/cli.cjs +431 -135
  2. package/dist/cli.js +433 -137
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/lite/.bassclef-source.json +10 -0
  7. package/{substrate → dist/lite}/.claude/hooks/artifact-ingestion-gate.sh +0 -0
  8. package/{substrate → dist/lite}/.claude/hooks/assert-verify-steering.sh +0 -0
  9. package/{substrate → dist/lite}/.claude/hooks/bassclef-source-config-validate.sh +0 -0
  10. package/{substrate → dist/lite}/.claude/hooks/bassclef-sync.sh +0 -0
  11. package/{substrate → dist/lite}/.claude/hooks/compound-noun-scrub.sh +0 -0
  12. package/{substrate → dist/lite}/.claude/hooks/kiss-expansion-inject.sh +0 -0
  13. package/{substrate → dist/lite}/.claude/hooks/longrun-prep-compounding-sequence-check.sh +0 -0
  14. package/{substrate → dist/lite}/.claude/hooks/plain-english-steering.sh +0 -0
  15. package/{substrate → dist/lite}/.claude/hooks/post-skill-friction-check.sh +0 -0
  16. package/{substrate → dist/lite}/.claude/hooks/post-skill-telemetry.sh +0 -0
  17. package/{substrate → dist/lite}/.claude/hooks/pre-build-gate.sh +0 -0
  18. package/{substrate → dist/lite}/.claude/hooks/pre-commit-gate.sh +0 -0
  19. package/{substrate → dist/lite}/.claude/hooks/session-end.sh +0 -0
  20. package/{substrate → dist/lite}/.claude/hooks/session-reflection.sh +0 -0
  21. package/{substrate → dist/lite}/.claude/hooks/skill-body-grade-gate.sh +0 -0
  22. package/{substrate → dist/lite}/.claude/hooks/skill-body-intent-drift.sh +0 -0
  23. package/{substrate → dist/lite}/.claude/hooks/state-validate.sh +0 -0
  24. package/{substrate → dist/lite}/.claude/hooks/substrate-clarity-gate.sh +0 -0
  25. package/{substrate → dist/lite}/.claude/hooks/temperance-gate.sh +0 -0
  26. package/{substrate → dist/lite}/.claude/hooks/testing-tier-enforce.sh +0 -0
  27. package/{substrate → dist/lite}/.claude/hooks/turn-prose-grade-measure.sh +0 -0
  28. package/{substrate → dist/lite}/.claude/hooks/turn-prose-kiss-check.sh +0 -0
  29. package/{substrate → dist/lite}/.claude/hooks/vocabulary-migration-check.sh +0 -0
  30. package/{substrate → dist/lite}/.claude/hooks/whereami-utc-gate.sh +0 -0
  31. package/dist/lite/.claude/settings.json +212 -0
  32. package/dist/lite/CLAUDE.md +41 -0
  33. package/dist/lite/gitignore +58 -0
  34. package/dist/lite/standards/bassclef-wiring-manifest.json +497 -0
  35. package/dist/lite/whereami.md +24 -0
  36. package/package.json +8 -2
  37. package/substrate/.bassclef/lite-manifest.json +0 -2701
  38. package/substrate/.claude/agents/architect.md +0 -70
  39. package/substrate/.claude/agents/builder.md +0 -114
  40. package/substrate/.claude/agents/designer.md +0 -156
  41. package/substrate/.claude/agents/reviewer.md +0 -88
  42. package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +0 -492
  43. package/substrate/.claude/hooks/skill-step-list-check.sh +0 -171
  44. package/substrate/.claude/luminaries/alan-cooper.md +0 -170
  45. package/substrate/.claude/luminaries/alistair-cockburn.md +0 -140
  46. package/substrate/.claude/luminaries/amazon-pr-faq.md +0 -34
  47. package/substrate/.claude/luminaries/ash-maurya.md +0 -121
  48. package/substrate/.claude/luminaries/bill-buxton.md +0 -210
  49. package/substrate/.claude/luminaries/charles-sanders-peirce.md +0 -150
  50. package/substrate/.claude/luminaries/david-ogilvy.md +0 -192
  51. package/substrate/.claude/luminaries/don-norman.md +0 -173
  52. package/substrate/.claude/luminaries/edward-tufte.md +0 -179
  53. package/substrate/.claude/luminaries/eric-evans.md +0 -160
  54. package/substrate/.claude/luminaries/frederick-brooks.md +0 -50
  55. package/substrate/.claude/luminaries/gang-of-four.md +0 -157
  56. package/substrate/.claude/luminaries/glenford-myers.md +0 -230
  57. package/substrate/.claude/luminaries/hunt-thomas.md +0 -115
  58. package/substrate/.claude/luminaries/hyrum-wright.md +0 -94
  59. package/substrate/.claude/luminaries/jason-fried-dhh.md +0 -46
  60. package/substrate/.claude/luminaries/jesse-james-garrett.md +0 -154
  61. package/substrate/.claude/luminaries/john-ousterhout.md +0 -94
  62. package/substrate/.claude/luminaries/karl-popper.md +0 -132
  63. package/substrate/.claude/luminaries/kent-beck.md +0 -168
  64. package/substrate/.claude/luminaries/linus-torvalds.md +0 -218
  65. package/substrate/.claude/luminaries/martin-fowler.md +0 -164
  66. package/substrate/.claude/luminaries/michael-feathers.md +0 -125
  67. package/substrate/.claude/luminaries/michael-nygard.md +0 -118
  68. package/substrate/.claude/luminaries/robert-c-martin.md +0 -164
  69. package/substrate/.claude/luminaries/saltzer-schroeder.md +0 -194
  70. package/substrate/.claude/luminaries/sophia-prater.md +0 -193
  71. package/substrate/.claude/luminaries/stephen-toulmin.md +0 -131
  72. package/substrate/.claude/luminaries/tony-hoare.md +0 -170
  73. package/substrate/.claude/luminaries/vaughn-vernon.md +0 -50
  74. package/substrate/.claude/luminaries/w-edwards-deming.md +0 -158
  75. package/substrate/.claude/rules/accessor-library-discipline.md +0 -138
  76. package/substrate/.claude/rules/adr-discipline.md +0 -120
  77. package/substrate/.claude/rules/api-conventions.md +0 -125
  78. package/substrate/.claude/rules/artifact-ingestion.md +0 -179
  79. package/substrate/.claude/rules/assert-only-after-verify.md +0 -137
  80. package/substrate/.claude/rules/blocked-items.md +0 -146
  81. package/substrate/.claude/rules/bootstrap-pair-discipline.md +0 -141
  82. package/substrate/.claude/rules/branching.md +0 -28
  83. package/substrate/.claude/rules/cold-adopter-harness-discipline.md +0 -129
  84. package/substrate/.claude/rules/commit-conventions.md +0 -22
  85. package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +0 -188
  86. package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +0 -188
  87. package/substrate/.claude/rules/context-engineering.md +0 -202
  88. package/substrate/.claude/rules/context-management.md +0 -85
  89. package/substrate/.claude/rules/defensive-bash.md +0 -68
  90. package/substrate/.claude/rules/deferred-actions.md +0 -233
  91. package/substrate/.claude/rules/destructive-operations.md +0 -69
  92. package/substrate/.claude/rules/diagnosis.md +0 -38
  93. package/substrate/.claude/rules/github-issue-flash-tweet.md +0 -156
  94. package/substrate/.claude/rules/guardrails.md +0 -73
  95. package/substrate/.claude/rules/hook-wire-on-author.md +0 -103
  96. package/substrate/.claude/rules/identifier-leak-prevention.md +0 -104
  97. package/substrate/.claude/rules/iteration-bet-brief-completeness.md +0 -54
  98. package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +0 -98
  99. package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +0 -89
  100. package/substrate/.claude/rules/loop-discipline.md +0 -81
  101. package/substrate/.claude/rules/manual-prod-approval.md +0 -100
  102. package/substrate/.claude/rules/marker-enrichment-discipline.md +0 -99
  103. package/substrate/.claude/rules/mobile-ephemeral-session.md +0 -109
  104. package/substrate/.claude/rules/new-dependency-check.md +0 -51
  105. package/substrate/.claude/rules/oo-ad-entry-point.md +0 -117
  106. package/substrate/.claude/rules/operator-facing-prose.md +0 -196
  107. package/substrate/.claude/rules/option-label-discipline.md +0 -108
  108. package/substrate/.claude/rules/pattern-annotation.md +0 -100
  109. package/substrate/.claude/rules/plain-english-discipline.md +0 -156
  110. package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +0 -211
  111. package/substrate/.claude/rules/pr-body-shape.md +0 -317
  112. package/substrate/.claude/rules/pr-strategy.md +0 -167
  113. package/substrate/.claude/rules/pr-title-shape.md +0 -161
  114. package/substrate/.claude/rules/prototype-workflow.md +0 -65
  115. package/substrate/.claude/rules/reserved-skill-names.md +0 -123
  116. package/substrate/.claude/rules/schema-management.md +0 -49
  117. package/substrate/.claude/rules/sdlc-gates.md +0 -149
  118. package/substrate/.claude/rules/security.md +0 -37
  119. package/substrate/.claude/rules/session-artifacts.md +0 -236
  120. package/substrate/.claude/rules/skill-composition-declarations.md +0 -124
  121. package/substrate/.claude/rules/skill-description-clarity.md +0 -247
  122. package/substrate/.claude/rules/skill-procedure-step-list.md +0 -137
  123. package/substrate/.claude/rules/state-schema-validation.md +0 -162
  124. package/substrate/.claude/rules/stuck-signal-diagnostic.md +0 -140
  125. package/substrate/.claude/rules/substrate-config-schema.md +0 -98
  126. package/substrate/.claude/rules/test-list-discipline.md +0 -175
  127. package/substrate/.claude/rules/test-sufficiency.md +0 -210
  128. package/substrate/.claude/rules/testing-tier-config.md +0 -145
  129. package/substrate/.claude/rules/testing.md +0 -38
  130. package/substrate/.claude/rules/turn-estimate-grounding.md +0 -134
  131. package/substrate/.claude/rules/visual-hierarchy.md +0 -437
  132. package/substrate/.claude/rules/we-dont-break-adopters.md +0 -126
  133. package/substrate/.claude/rules/whereami-load-bearing.md +0 -202
  134. package/substrate/.claude/rules/writing-craft-discipline.md +0 -92
  135. package/substrate/.claude/rules/wu-sequencing-compounds.md +0 -145
  136. package/substrate/.claude/skills/build/SKILL.md +0 -640
  137. package/substrate/.claude/skills/chronicle/SKILL.md +0 -55
  138. package/substrate/.claude/skills/clean-artifacts/SKILL.md +0 -249
  139. package/substrate/.claude/skills/decompose/SKILL.md +0 -280
  140. package/substrate/.claude/skills/diagnose/SKILL.md +0 -297
  141. package/substrate/.claude/skills/feynman/SKILL.md +0 -90
  142. package/substrate/.claude/skills/howdoi/SKILL.md +0 -105
  143. package/substrate/.claude/skills/ia-model/SKILL.md +0 -108
  144. package/substrate/.claude/skills/interaction-design/SKILL.md +0 -112
  145. package/substrate/.claude/skills/interpret-input/SKILL.md +0 -180
  146. package/substrate/.claude/skills/journal/SKILL.md +0 -209
  147. package/substrate/.claude/skills/kiss/SKILL.md +0 -449
  148. package/substrate/.claude/skills/launch/SKILL.md +0 -915
  149. package/substrate/.claude/skills/lean-canvas/SKILL.md +0 -332
  150. package/substrate/.claude/skills/longrun/SKILL.md +0 -463
  151. package/substrate/.claude/skills/luminary/SKILL.md +0 -481
  152. package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +0 -177
  153. package/substrate/.claude/skills/onboard-repo/SKILL.md +0 -1624
  154. package/substrate/.claude/skills/pattern-review/SKILL.md +0 -99
  155. package/substrate/.claude/skills/personas/SKILL.md +0 -207
  156. package/substrate/.claude/skills/promote/SKILL.md +0 -283
  157. package/substrate/.claude/skills/requirement/SKILL.md +0 -98
  158. package/substrate/.claude/skills/retro/SKILL.md +0 -117
  159. package/substrate/.claude/skills/riff/SKILL.md +0 -114
  160. package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +0 -163
  161. package/substrate/.claude/skills/session-end/SKILL.md +0 -309
  162. package/substrate/.claude/skills/session-log/SKILL.md +0 -299
  163. package/substrate/.claude/skills/skills/SKILL.md +0 -228
  164. package/substrate/.claude/skills/spec/SKILL.md +0 -105
  165. package/substrate/.claude/skills/sprint/SKILL.md +0 -392
  166. package/substrate/.claude/skills/stage/SKILL.md +0 -384
  167. package/substrate/.claude/skills/state-a-problem/SKILL.md +0 -185
  168. package/substrate/.claude/skills/temperance/SKILL.md +0 -108
  169. package/substrate/.claude/skills/use-case/SKILL.md +0 -417
  170. package/substrate/.claude/skills/user-stories/SKILL.md +0 -268
  171. package/substrate/.claude/skills/value-prop/SKILL.md +0 -251
  172. package/substrate/.claude/skills/verify/SKILL.md +0 -160
  173. package/substrate/.claude/skills/visual-review/SKILL.md +0 -503
  174. package/substrate/.claude/skills/whats-the-plan/SKILL.md +0 -202
  175. package/substrate/.claude/skills/whereami/SKILL.md +0 -307
  176. package/substrate/AGENTS.md +0 -79
  177. package/substrate/CLAUDE-lite.md +0 -85
  178. package/substrate/CODE_OF_CONDUCT.md +0 -28
  179. package/substrate/CONTRIBUTING.md +0 -177
  180. package/substrate/README.md +0 -173
  181. package/substrate/SECURITY.md +0 -19
  182. package/substrate/architecture/decisions/ADR-029-release-pipeline.md +0 -79
  183. package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +0 -139
  184. package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +0 -192
  185. package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +0 -145
  186. package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +0 -155
  187. package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +0 -162
  188. package/substrate/lib/clean-artifacts-sweep.sh +0 -112
  189. package/substrate/lib/code-comment-discipline.sh +0 -144
  190. package/substrate/lib/composer-preflight.sh +0 -459
  191. package/substrate/lib/hook-inject.sh +0 -255
  192. package/substrate/lib/luminary-pick.sh +0 -96
  193. package/substrate/lib/output-discipline.sh +0 -143
  194. package/substrate/lib/prose-scan-boundary.sh +0 -171
  195. package/substrate/lib/rewrite-check.sh +0 -214
  196. package/substrate/lib/state.sh +0 -1372
  197. package/substrate/lib/telemetry.sh +0 -205
  198. package/substrate/lib/tier-check.sh +0 -187
  199. package/substrate/lib/tier-dependency-audit.sh +0 -1088
  200. package/substrate/presence/install/bassclef-hook-connect.sh +0 -178
  201. package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +0 -841
  202. package/substrate/presence/install/bassclef-sync.template.sh +0 -2076
  203. package/substrate/presence/install/schedule-auto-save.cron.sh +0 -88
  204. package/substrate/presence/install/schedule-auto-save.taskscheduler.md +0 -122
  205. package/substrate/scripts/aggregate-telemetry.sh +0 -217
  206. package/substrate/scripts/analyze-tier-dependencies.sh +0 -239
  207. package/substrate/scripts/generate-lite-manifest.sh +0 -505
  208. package/substrate/scripts/generate-tier-manifest.sh +0 -28
  209. package/substrate/scripts/intent-drift-check.sh +0 -456
  210. package/substrate/scripts/lite-manifest-drift-check.sh +0 -146
  211. package/substrate/scripts/render-lite-manifest-doc.sh +0 -150
  212. package/substrate/standards/adr-template.md +0 -86
  213. package/substrate/standards/api-conventions/nextjs.md +0 -84
  214. package/substrate/standards/artifact-composition.md +0 -209
  215. package/substrate/standards/bash-hook-safety.md +0 -246
  216. package/substrate/standards/bassclef-configs-schema.md +0 -232
  217. package/substrate/standards/bassclef-evolution.md +0 -143
  218. package/substrate/standards/bassclef-internal-jargon.md +0 -244
  219. package/substrate/standards/bassclef-managed-sentinel.md +0 -96
  220. package/substrate/standards/bassclef-source-config.md +0 -228
  221. package/substrate/standards/branch-stacking.md +0 -408
  222. package/substrate/standards/code-safety-principles.md +0 -176
  223. package/substrate/standards/composer-prerequisites.md +0 -155
  224. package/substrate/standards/deferred-actions-schema.md +0 -204
  225. package/substrate/standards/dependency-discipline/cargo.md +0 -39
  226. package/substrate/standards/dependency-discipline/gem.md +0 -43
  227. package/substrate/standards/dependency-discipline/go-mod.md +0 -41
  228. package/substrate/standards/dependency-discipline/npm.md +0 -42
  229. package/substrate/standards/dependency-discipline/pip.md +0 -42
  230. package/substrate/standards/deployment-topology/ec2-tailscale.md +0 -225
  231. package/substrate/standards/deployment-topology.md +0 -69
  232. package/substrate/standards/docs-sync-allowlist.md +0 -76
  233. package/substrate/standards/domain-and-dns.md +0 -145
  234. package/substrate/standards/frontend-stack.md +0 -67
  235. package/substrate/standards/frontmatter-schema.md +0 -154
  236. package/substrate/standards/graceful-exit.md +0 -227
  237. package/substrate/standards/hook-idempotency.md +0 -102
  238. package/substrate/standards/hook-injection-discipline.md +0 -202
  239. package/substrate/standards/hook-install-class.md +0 -215
  240. package/substrate/standards/input-handler-interface.md +0 -152
  241. package/substrate/standards/lite-manifest-schema-changes.md +0 -135
  242. package/substrate/standards/luminary-matching.md +0 -105
  243. package/substrate/standards/luminary-problem-patterns.md +0 -481
  244. package/substrate/standards/migration-discipline/active-record.md +0 -50
  245. package/substrate/standards/migration-discipline/alembic.md +0 -43
  246. package/substrate/standards/migration-discipline/gorm.md +0 -50
  247. package/substrate/standards/migration-discipline/prisma.md +0 -53
  248. package/substrate/standards/migration-discipline/sqlalchemy.md +0 -51
  249. package/substrate/standards/mobile-ephemeral-session.md +0 -167
  250. package/substrate/standards/model-routing-discipline.md +0 -160
  251. package/substrate/standards/ogilvy-writing-rules.md +0 -225
  252. package/substrate/standards/opener-discipline.md +0 -96
  253. package/substrate/standards/operator-facing-prose-discipline.md +0 -201
  254. package/substrate/standards/persona-schema.md +0 -229
  255. package/substrate/standards/pluggable-luminaries.md +0 -323
  256. package/substrate/standards/pr-body-discipline.md +0 -115
  257. package/substrate/standards/preview-state-schema.md +0 -189
  258. package/substrate/standards/project-directory-layout.md +0 -276
  259. package/substrate/standards/release-tagging.md +0 -137
  260. package/substrate/standards/reserved-skill-names.md +0 -120
  261. package/substrate/standards/scannable-multi-option-output.md +0 -261
  262. package/substrate/standards/sdlc-compliance.md +0 -286
  263. package/substrate/standards/sdlc-gates/typescript.md +0 -57
  264. package/substrate/standards/secrets-lifecycle.md +0 -210
  265. package/substrate/standards/security-scanner-adapter.md +0 -145
  266. package/substrate/standards/session-board.md +0 -256
  267. package/substrate/standards/skill-output-discipline.md +0 -90
  268. package/substrate/standards/state-spine-contract.md +0 -255
  269. package/substrate/standards/state-spine.md +0 -511
  270. package/substrate/standards/steering-hints/kiss-words.md +0 -11
  271. package/substrate/standards/substrate-config-schema.md +0 -267
  272. package/substrate/standards/tech-stack-config.md +0 -109
  273. package/substrate/standards/tier-dependency-analysis.md +0 -167
  274. package/substrate/standards/tier-runtime-deps/lite.md +0 -57
  275. package/substrate/standards/tier-tag-schema.md +0 -155
  276. package/substrate/standards/two-layer-config.md +0 -99
  277. package/substrate/standards/use-case-format.md +0 -292
  278. package/substrate/standards/user-story-invest.md +0 -268
  279. package/substrate/standards/velocity-and-appetite.md +0 -229
  280. package/substrate/standards/voice-input-pattern.md +0 -119
  281. package/substrate/standards/whereami-schema.md +0 -301
  282. package/substrate/standards/worktree-management.md +0 -211
  283. package/substrate/standards/writing-guide.md +0 -213
  284. package/substrate/templates/chronicle-template.md +0 -75
  285. package/substrate/templates/deferred-action-template.md +0 -45
  286. package/substrate/templates/memory-proposal-template.md +0 -77
  287. package/substrate/templates/persona-template.md +0 -200
  288. package/substrate/templates/pr-faq.md +0 -45
  289. package/substrate/templates/secret-rotation-template.md +0 -162
  290. package/substrate/templates/spec-template.md +0 -131
  291. package/substrate/templates/use-case-template.md +0 -194
  292. package/substrate/templates/user-story-template.md +0 -107
  293. package/substrate/templates/whereami-template.md +0 -101
@@ -1,247 +0,0 @@
1
- ---
2
- tier: lite
3
- description: "Every skill's frontmatter description field must be parseable by an engineer with no bassclef context in under 60 seconds."
4
- ---
5
-
6
- # Skill-Description Clarity
7
-
8
- Every skill's frontmatter `description` field must be parseable by an
9
- engineer with no bassclef context in under 60 seconds. Outcome-first.
10
- ≤280 chars. Plain language. INSTEAD-block discipline.
11
-
12
- This rule sits at the entry surface. It parallels bassclef#357 (which governs autonomous-run output). It applies `.claude/rules/context-engineering.md` at the description field: write for what the model can access. For this rule, that means write what a fresh engineer can read in 60 seconds.
13
-
14
- **Mechanical enforcement**: `.claude/hooks/substrate-clarity-gate.sh` fires at PreToolUse Edit|Write on substrate paths. It BLOCKs skill descriptions past 280 chars or without verb-first openers. The rule + luminary INSTEAD-block check runs ADVISORY today. It flips to BLOCK once the rule + luminary audits ship (tracked under bassclef-upstream#303). The allowlist at `.claude/hooks/substrate-clarity-allowlist.txt` grandfathers existing violators during the grace window. Per bassclef#382.
15
-
16
- ## The bar
17
-
18
- Anthropic's frontend-design description (per Welch's revision):
19
-
20
- > "Create distinctive, production-grade frontend interfaces with
21
- > high design quality. Avoids generic AI aesthetics."
22
-
23
- That's the bar. Outcome ("create distinctive interfaces"), one-line
24
- how ("with high design quality"), one-line why-distinct ("avoids
25
- generic AI aesthetics"). 117 chars. Engineer reads it; knows what
26
- the skill produces; knows when to use it.
27
-
28
- Compare to bassclef's pre-rule descriptions (representative):
29
-
30
- > "BUILD-tier composer (Construction transition). Chains the
31
- > prototype pipeline (input → variants → gallery → bind-subdomain)
32
- > PLUS the buildable-spec pipeline (use-case → user-stories →
33
- > ia-model → interaction-design → decompose → spec → ux-migration)."
34
-
35
- 571 chars. Methodology-laden. Requires knowing what every named
36
- component is. Engineer can't grok in 60 seconds.
37
-
38
- ## Format
39
-
40
- Every skill's frontmatter `description` field follows:
41
-
42
- ```
43
- <verb> <outcome>. <one-line how>. <one-line why-distinct>.
44
- ```
45
-
46
- - **Verb**: imperative — "Create," "Generate," "Run," "Compose," "Audit"
47
- - **Outcome**: what the skill PRODUCES (not how it works internally)
48
- - **One-line how**: the most distinguishing mechanism, in plain language
49
- - **One-line why-distinct**: what makes it different from adjacent skills (or what it specifically AVOIDS)
50
-
51
- Total ≤280 chars including spaces.
52
-
53
- ## INSTEAD-block discipline
54
-
55
- Every "DON'T" / "AVOID" / "NEVER" in the description gets paired with
56
- the actionable substitute, per `.claude/rules/context-engineering.md`.
57
-
58
- INSTEAD of bare negation: state the actionable substitute the engineer
59
- or model can verify in their current context. Bare "DON'T X" without
60
- "INSTEAD: Y" is a no-op for a stateless reader.
61
-
62
- In a description, this shows up in the why-distinct clause:
63
-
64
- - **Anti**: "Don't use this for short prompts."
65
- - **INSTEAD**: "Use for prompts ≥3 sentences; for one-liners, see /value-prop flash."
66
-
67
- The negation lives in context (when not to use). The substitute names the actionable path (which skill to use instead).
68
-
69
- ## Plain language (per /kiss words)
70
-
71
- Grade-10 reading level. Common substitutions bassclef-substrate writers should make:
72
-
73
- | Replace | With |
74
- |---|---|
75
- | "composer" | "runs" / "chains" / "combines" |
76
- | "primitive" | "building block" |
77
- | "tier-preset" | "preset" / "size" |
78
- | "operationalize" | "do" / "ship" |
79
- | "load-bearing" | "required" / "must work" |
80
- | "blast radius" | "impact" / "what it can break" |
81
- | "substrate" | "system" / "framework" |
82
- | "bassclef" (in description body) | use sparingly; prefer "the framework" |
83
- | "compose-with" | "uses" / "builds on" |
84
- | "scope-bounded" | "small" / "tight" |
85
-
86
- If the description still uses bassclef jargon after substitution,
87
- the description was assuming context the engineer doesn't have.
88
- Rewrite further.
89
-
90
- ## What MUST NOT appear in a description
91
-
92
- - References to other skills the engineer hasn't read yet (skill names OK; methodology references aren't)
93
- - Methodology chains ("X → Y → Z → ...")
94
- - Tier specifications without explaining what the tier does
95
- - Citations to bassclef issues (those go in the body)
96
- - Dates / versions / "renamed from X on Y" (those go in the body)
97
- - Assumed pipeline knowledge ("Phase 14 of the buildable-spec chain")
98
-
99
- ## What MUST appear in a description
100
-
101
- - The verb-outcome opener
102
- - A concrete sense of what the user gets back
103
- - A distinguishing characteristic vs. adjacent skills
104
- - **Modes / tiers / sizes named inline when frontmatter declares them** (bassclef#535) — see next section
105
-
106
- ## Description-mirrors-modes (bassclef#535)
107
-
108
- When a skill's frontmatter declares structured `modes:` / `tiers:` / `sizes:` (per bassclef#515), the description **text** MUST name each declared value inline. Operators see Claude Code's type-ahead BEFORE invoking `/skills`; type-ahead reads only the `description` field. Frontmatter `modes:` is machine-readable for bassclef's audit + render pipeline but invisible to type-ahead.
109
-
110
- **The discipline:**
111
-
112
- - If frontmatter has `modes: [scope, words]`, description must contain "scope" AND "words" (typically as "Two modes — scope ... and words ..." or similar)
113
- - If frontmatter has `tiers: [quick, light, medium, full]`, description must name all four
114
- - If frontmatter has `sizes: [flash, tweet, brief, verbose]`, description must name all four
115
- - Skills with `no_user_modes: true` (opt-out) are exempt
116
- - The 280-char ceiling still applies — naming N modes that won't fit means the description is over-claiming; collapse the verbiage around them
117
-
118
- **Why mirror, not auto-render?**
119
-
120
- Type-ahead reads `description`. bassclef doesn't control the harness; we control the data we put in `description`. Mirroring is the cheap fix that makes type-ahead useful for mode-bearing skills today. Frontmatter `modes:` stays machine-readable for `/skills` catalog rendering + audit + future structured uses; description text stays human-readable for type-ahead.
121
-
122
- **Conformance examples (all 7 skills with modes today):**
123
-
124
- | Skill | Frontmatter | Description names them? |
125
- |---|---|---|
126
- | `/value-prop` | `sizes: [flash, tweet, brief, verbose]` | ✓ "Four sizes — flash ... tweet ... brief ... verbose" |
127
- | `/kiss` | `modes: [scope, words]` | ✓ "Two modes — scope ... and words ..." |
128
- | `/stage` | `sizes: [quick, light]` | ✓ "Two sizes: quick ... and light ..." |
129
- | `/launch` | `sizes: [medium, full]` | ✓ "Two sizes: medium ... and full ..." |
130
- | `/shape` | `tiers: [quick, light, medium, full]` | ✓ "four sizes — quick, light, medium, full" |
131
- | `/longrun` | `modes: [prep, checkpoint, closeout]` | ✓ "three modes — prep, checkpoint, closeout" (after bassclef#535) |
132
- | `/interpret-input` | `modes: [text, url, image, repo, transcript, napkin, mixed]` | ✓ types listed in parens |
133
- | `/onboard-repo` | `modes: [default, --with-deploy-host, --with-secrets, --full]` | ❌ pending — fold into LR8.6 PR #526 amendment |
134
-
135
- **Mechanical enforcement (deferred follow-on):**
136
-
137
- - `scripts/audit-skills-modes.sh` (bassclef#515 PR #519) extends with `description-doesnt-mirror-modes` finding type
138
- - `.claude/hooks/substrate-clarity-gate.sh` extends with the same check at PreToolUse Edit/Write time
139
- - Both gated behind bassclef#515 + bassclef#382 landing first; until then, this rule is methodology-level + the operator runs the audit manually
140
-
141
- **Override:**
142
-
143
- `SKIP_DESCRIPTION_MIRRORS_MODES=1` per-call override (logged via trace-helper). Use only when the frontmatter declares modes that are too numerous to mention inline (>5) AND a higher-level grouping description suffices.
144
-
145
- ## Worked examples — applying the rule
146
-
147
- ### /sprint (before)
148
-
149
- > "Show current iteration goal, open issues by priority, and proposed next sprint. Quick orientation for any session."
150
-
151
- 132 chars. Decent — verb opener, outcome named. Could be tighter on
152
- why-distinct. **Score: B+. Acceptable.**
153
-
154
- ### /sprint (after)
155
-
156
- > "Show what's in flight and what's next. Reads project state, open issues, and the active iteration goal; proposes the next sprint. Run at session start to orient."
157
-
158
- 161 chars. Verb-outcome stronger. Why-distinct (when to use) explicit. **Score: A.**
159
-
160
- ### /longrun (before)
161
-
162
- > "Self-checkpointing long-session lifecycle (prep / checkpoint / closeout). Orchestrator-gated sequential by default. Use when ≥2 active goals OR estimated >50 turns OR session crosses compaction. Composes /temperance, /retro, /promote, /session-end. Replaces manual mid-session reflection that defeats fire-and-forget intent."
163
-
164
- 322 chars. Methodology-laden. "Orchestrator-gated sequential" is jargon. Composes-list dumps internal references. **Score: D.**
165
-
166
- ### /longrun (after)
167
-
168
- > "Run a long autonomous session that paces itself — prepares scope, checkpoints at phase boundaries, closes with chronicle + journal entry + retro. Use for sessions over 50 turns or with multiple bets. Replaces mid-session manual reflection."
169
-
170
- 249 chars. Outcome-first. Plain language. When-to-use explicit. **Score: A-.**
171
-
172
- ### /launch (formerly /preview-build) (before)
173
-
174
- > "BUILD-tier composer (Construction transition). Chains the prototype pipeline (input → variants → gallery → bind-subdomain) PLUS the buildable-spec pipeline (use-case → user-stories → ia-model → interaction-design → decompose → spec → ux-migration). Tiers: medium (~1 day, 3 variants + buildable spec + INVEST stories + GRASP matrix) and full..."
175
-
176
- 571 chars (truncated). Methodology dump. Tier specs without context.
177
- **Score: F.**
178
-
179
- ### /launch (after)
180
-
181
- > "Turn an idea into a buildable plan. Produces a clickable mock gallery PLUS the spec, decomposition, and migration plan needed to actually build the chosen direction. Two sizes: medium (~1 day) and full (~audit-grade). Operator dispatches when ready to ship."
182
-
183
- 275 chars. Outcome-first. The "PLUS" makes the differentiator vs.
184
- /stage (formerly /preview) clear. Tiers framed by time budget, not internal methodology.
185
- **Score: A.**
186
-
187
- ## Application
188
-
189
- ### Per skill (rewrites)
190
-
191
- 1. Read existing description
192
- 2. Score against rule (Verb? Outcome? ≤280 chars? Jargon? Plain language?)
193
- 3. Rewrite if score < B
194
- 4. Test the rewrite: would a senior engineer with no bassclef context understand it in 60 seconds?
195
-
196
- ### Per longrun (audit)
197
-
198
- The audit issue (bassclef#375 + sister WU-3 issues) tracks
199
- per-skill rewrites. WU-6 of this longrun ships top-7 (data + judgment
200
- based) as in-scope examples; rest filed as follow-up.
201
-
202
- ### Per new skill
203
-
204
- Every new skill's description goes through this rule before merge.
205
- Test: paste the description into a Slack DM to a senior engineer
206
- without bassclef context. If they ask "what does this DO?" you
207
- violated the rule.
208
-
209
- INSTEAD of testing against a bassclef-savvy reader: test against
210
- a fresh reader who carries no internal vocabulary. That's the
211
- audience the description has to serve.
212
-
213
- ## Relationship to other rules
214
-
215
- - `.claude/rules/context-engineering.md` — the foundational rule; this is one application
216
- - bassclef#357 (autonomous-run flash + kiss) — sibling discipline at output surface; this rule is at description surface
217
- - bassclef#367 (section-heading standardization) — sibling specificity discipline
218
- - bassclef#339 (plan-enumeration-needs-value-props) — sibling at choice-presentation surface
219
-
220
- ## Override
221
-
222
- There is no override. Skill descriptions are an entry surface for
223
- engineers and operators. Violating the rule means engineers won't
224
- adopt the skill, regardless of how good the skill itself is.
225
-
226
- If you can't write the description per the rule, the skill's job
227
- isn't clear enough — clarify the skill before clarifying the
228
- description.
229
-
230
- ## Audit pattern
231
-
232
- ```bash
233
- # Find skills whose descriptions exceed 280 chars
234
- grep -r "^description:" .claude/skills/*/SKILL.md | awk -F: '{ if (length($0) > 280) print $0 }'
235
-
236
- # Find skills whose descriptions use bassclef jargon
237
- git grep -niE 'composer|primitive|tier-preset|operationalize|load-bearing|blast radius|compose-with' .claude/skills/*/SKILL.md | grep -E '^.*:description:'
238
- ```
239
-
240
- ## Sources read
241
-
242
- - `.claude/rules/context-engineering.md` (bassclef#371) — foundational rule
243
- - bassclef#357 — sibling output-surface rule
244
- - bassclef#367 — sibling specificity rule
245
- - `.claude/skills/value-prop/SKILL.md` — flash mode (≤180 chars analog)
246
- - `.claude/skills/kiss/SKILL.md` — words mode (plain-language analog)
247
- - Anthropic `frontend-design` skill description — direct exemplar; bassclef declares this as baseline-composes-with in `/frontend-design`, `/riff-prototypes`, `/launch`, `/visual-review` skill frontmatter rather than carrying it as a luminary entry
@@ -1,137 +0,0 @@
1
- ---
2
- tier: lite
3
- description: Before executing any SKILL procedure, I write the numbered step list into the response.
4
- ---
5
-
6
- # Skill-procedure step-list
7
-
8
- Before executing any SKILL procedure, I write the numbered step list into the response. Each step is marked `[x]` executed with source cited OR `[~]` explicitly deferred with reason. No `[ ]` unchecked lines ship at output time. Silence is not deferral.
9
-
10
- This rule extends `.claude/rules/assert-only-after-verify.md` from the assertion surface to the SKILL-procedure surface. It is the methodology layer. The mechanical layer is `.claude/hooks/skill-step-list-check.sh` — Stop hook that scans the transcript for a Skill dispatch followed by an assistant response without a step-list block.
11
-
12
- ## Why this rule exists
13
-
14
- Session 2026-08-05a dispatched `/roadmap-reconcile --dry-run` during `/longrun` prep. The SKILL procedure names 5 steps. I ran Step 1 (enumerate surfaces), skipped Step 2 (read shipping reality), and jumped to Step 3 (build a diff). I substituted whereami queue narrative for the actual `gh pr view` + `gh issue view` cross-check Step 2 requires. Four stale drift rows shipped. Operator caught the class in one turn — three closed tickets (#1050, #1051, #1054) shown as pending because whereami queue said so and no cross-check verified.
15
-
16
- Memory alone catches nothing at write time. Two existing rule + hook pairs prove the pattern holds at scale — `.claude/rules/assert-only-after-verify.md` + `.claude/hooks/assert-verify-steering.sh`, and `.claude/rules/plain-english-discipline.md` + `.claude/hooks/turn-prose-kiss-check.sh`. This rule is the third pair, at the SKILL-procedure surface.
17
-
18
- ## When this rule fires
19
-
20
- Every SKILL dispatch. Agents self-check before writing the response. Hook fires at Stop event as the write-time backstop.
21
-
22
- Fires on:
23
-
24
- - Any Skill tool dispatch in the current turn
25
- - Any SKILL body whose procedure names 2+ steps
26
-
27
- Passes through on:
28
-
29
- - Non-Skill tool calls (Bash, Read, Edit, Write, Grep, etc.) — those follow their own discipline rules
30
- - SKILL body procedures with 0 or 1 step (no list needed)
31
- - Tool-output relays (test output, git output) that carry no assertions of their own
32
-
33
- ## What the rule requires
34
-
35
- Before shipping any response following a SKILL dispatch:
36
-
37
- 1. **Read the SKILL body Procedure section.** Enumerate the numbered steps.
38
- 2. **Write the step list at the top of the response.** Format: `Step N — <name>` followed by a status marker.
39
- 3. **Execute each step.** Cite the source inline as it runs.
40
- 4. **Mark each step's status:**
41
- - `[x]` executed with source cited
42
- - `[~]` explicitly deferred with reason (silence is not deferral)
43
- - Do not ship `[ ]` unchecked at output time.
44
- INSTEAD: mark every step `[x]` or `[~]` before the response ships. Unchecked shipped equals silent skip.
45
- 5. **Loaded context is a hint, not a substitute for a source read named by a step.** The context feels full. That is when the skip is easiest and the drift is worst.
46
- INSTEAD: cite the source per the SKILL step. Loaded context is a hint, not a substitute.
47
-
48
- ## Format contract
49
-
50
- Each step line matches one of these shapes:
51
-
52
- - `Step N — <name> — [x] <source cited>`
53
- - `Step N — <name> — [~] <deferral reason>`
54
-
55
- Or a block header + list format:
56
-
57
- ```
58
- Steps:
59
- - Step 1 — <name> — [x] <source>
60
- - Step 2 — <name> — [~] <reason>
61
- ```
62
-
63
- The hook scans for two markers together: the token `Step\s+\d+` AND either `[x]` or `[~]` bracketed. Both must appear in the assistant text following a Skill dispatch.
64
-
65
- ## Anti-patterns
66
-
67
- These shapes fail this rule.
68
-
69
- **Dispatch skill; write results with no step list.** The response ships without any `Step N` markers. Hook fires ADVISORY (or BLOCK under strict toggle).
70
- INSTEAD: enumerate the SKILL procedure steps at the top of the response before running them.
71
-
72
- **Silent skip.** A step gets no `[x]` and no `[~]` line — the response simply omits it.
73
- INSTEAD: every step from the SKILL procedure appears in the response, either done or explicitly deferred with reason.
74
-
75
- **Context as substitute.** Loaded context carries a plausible answer. Skip the SKILL step; use the context.
76
- INSTEAD: cite the source per the SKILL step. Loaded context is a hint, not a substitute for the read the step names.
77
-
78
- **Half-written list.** Some steps carry markers; others do not.
79
- INSTEAD: every step marked before response ships. Half-written lists cause reviewer confusion + trigger the hook.
80
-
81
- ## When this rule does NOT fire
82
-
83
- - Tool-output relays (test output, git output) — no assertion of the agent's own
84
- - SKILL body with 0 or 1 step — no list needed
85
- - Skill invoked purely for its output display (e.g., `/whereami` for a status snapshot)
86
- - Chat responses that do not follow a Skill dispatch
87
-
88
- ## Override
89
-
90
- `SKIP_SKILL_STEP_LIST=1 <command>` — per-call bypass, logged via trace-helper. Use rarely:
91
-
92
- - One-shot migration scripts that dispatch many SKILLs at once
93
- - Emergency rescue when the hook itself misbehaves
94
- - Explicitly-deferred rework where the step list ships in a follow-up response
95
-
96
- For routine SKILL dispatches, write the step list. The cost is small; the audit trail compounds.
97
-
98
- ## Toggle
99
-
100
- The hook reads `SKILL_STEP_LIST_TOGGLE` from env OR `skill_step_list.toggle` from `.claude/bassclef-configs.jsonc`:
101
-
102
- - `true` (default) — advisory (exit 0, findings to stderr)
103
- - `strict` — strict (exit 2, blocks the stop event, forces a rewrite)
104
- - `false` — silent (exit 0, no scan)
105
-
106
- V1 ships advisory. V2 may flip to strict after a calibration cycle observes drift stays under 10%.
107
-
108
- ## Anchor luminaries
109
-
110
- - `.claude/luminaries/saltzer-schroeder.md` (Saltzer & Schroeder 1975, IEEE 63(9)) — complete mediation. Every access to protected state is checked. Whereami narrative was a cached authorization. Rule + hook forces mediation at every SKILL dispatch.
111
- - `.claude/luminaries/tony-hoare.md` (Hoare 1969, CACM 12(10)) — pre/postcondition triple. Each step's postcondition is the next step's precondition. Skip breaks the chain.
112
- - `.claude/luminaries/michael-feathers.md` (Feathers 2004) — characterization tests. Pin actual behavior via source of record before naming it.
113
- - `.claude/luminaries/kent-beck.md` (Beck 2002) — list-before-execute. Sister discipline at test surface applied to SKILL surface.
114
-
115
- ## Composes with
116
-
117
- - `.claude/rules/assert-only-after-verify.md` — parent discipline at claim surface; this rule extends to SKILL-procedure surface
118
- - `.claude/rules/bootstrap-pair-discipline.md` — pair-shape pattern (rule + hook + Tier 0 test)
119
- - `.claude/rules/substrate-as-system.md` — ADR-035 tenet
120
- - `.claude/rules/test-list-discipline.md` — Beck's list-before-execute sister rule at test surface
121
- - `.claude/rules/testing-tier-config.md` — Tier 0 strict TDD on hook + tests
122
- - `.claude/rules/we-dont-break-adopters.md` — V1 ADVISORY default preserves adopter behavior
123
- - `.claude/rules/blocked-items.md` — BLOCK protocol the hook fires under strict toggle
124
- - `.claude/hooks/skill-step-list-check.sh` — mechanical implementation
125
- - `.claude/hooks/tests/skill-step-list-check.test.sh` — Tier 0 test coverage (10 tests)
126
-
127
- ## Refs
128
-
129
- - sunj-labs/bassclef-upstream#1119 — parent ticket
130
- - Session 2026-08-05a `/diagnose` output — root cause named (SKILL step skip + context-as-substitute)
131
- - Memory `feedback_skill_procedure_step_list_before_execute` — evidence anchor
132
- - Goal doc `docs/iteration-bets/2026-08-05a-skill-step-list-plus-whereami-hygiene.md` — bet frame
133
- - Sister ticket sunj-labs/bassclef-upstream#1121 — in-turn error stream subsystem (broader observability)
134
-
135
- ## Retirement condition
136
-
137
- This rule retires only if SKILL dispatch stops being the primary agent-to-substrate composition path. The mechanical layer may evolve (additional detection heuristics, integration with error-stream subsystem #1121). The discipline of write-time step verification persists.
@@ -1,162 +0,0 @@
1
- ---
2
- tier: lite
3
- description: State-spine entity writes MUST conform to their JSON Schema.
4
- ---
5
-
6
- # State Schema Validation
7
-
8
- State-spine entity writes MUST conform to their JSON Schema. The
9
- `state-validate.sh` PreToolUse hook enforces this mechanically: any
10
- Edit/Write to a state-spine path is validated against the entity's
11
- schema; failure BLOCKs the write.
12
-
13
- This rule is the methodology layer. The hook is the mechanical layer.
14
- Both load-bearing.
15
-
16
- ## When this rule fires
17
-
18
- Any Edit/Write/MultiEdit to a path matching a state-spine entity per
19
- `standards/state-spine.md` §"Storage format — four shapes":
20
-
21
- - **Shape A** (singleton JSON authoritative): `docs/whereami.json`,
22
- `substrate.config.json`, `docs/preview-state/<slug>.json`
23
- - **Shape B** (markdown + YAML frontmatter): `docs/iteration-bets/*.md`,
24
- `docs/roadmaps/*.md`, `docs/stacks/*.md`, `docs/decompositions/*.md`,
25
- `docs/personas/*.md`, `docs/deferred-actions/*.md`, `chronicle/*.md`,
26
- `docs/chronicle/*.md`
27
- - **Shape C** (pure JSON): `state/markers/*/*.json`,
28
- `docs/sessions/*.json`, `docs/input-artifacts/*.json`,
29
- `state/template-instances/*.json`, `state/inbox/*.json`,
30
- `state/stack-templates/*.json`
31
- - **Shape D** (pure YAML at sibling-repo root): `*/bassclef-platform.yml`
32
- (typically `~/src/<github_org>/platform-config/bassclef-platform.yml`)
33
-
34
- Non-spine paths pass through (e.g., README, source code, narrative
35
- markdown without YAML frontmatter, docs that aren't governed by the
36
- spine).
37
-
38
- ## What the hook validates
39
-
40
- | Storage shape | Extraction | Schema validates |
41
- |---|---|---|
42
- | A | reads whole JSON file | the entity object |
43
- | B | extracts YAML frontmatter, converts to JSON | the frontmatter object |
44
- | C | reads whole JSON file | the entity object |
45
- | D | reads whole YAML file, converts to JSON | the entity object |
46
-
47
- In all four cases, validator: `ajv-cli` draft-2020-12 with format
48
- support (per ADR-015 single-format).
49
-
50
- ## What the hook does NOT validate
51
-
52
- - **Markdown body content** of Shape B entities. Body sections (Procedure,
53
- Acceptance, Sources read, narrative descriptions) are operator-readable
54
- documentation; the schema doesn't constrain them.
55
- - **Cross-entity reference dangling.** `state_reference_check` (in
56
- `lib/state.sh`) is the read-time check; the hook validates that the
57
- `references` array's items conform to the reference shape (typed
58
- `{type, id, anchor?}`), not that every referenced entity exists. A
59
- dangling reference is a read-time concern, not a write-time one.
60
- - **Hash-as-index integrity.** Deferred to spine v1 per bassclef#316.
61
- - **Migration scripts** writing to state files during one-shot
62
- migrations (e.g., WU-4) — these explicitly bypass via
63
- `SKIP_STATE_VALIDATE=1` because they're bootstrapping prior shapes
64
- into the spine.
65
-
66
- ## What happens when validation fails
67
-
68
- The hook BLOCKs the write (exit code 3, structured stderr message).
69
- Output includes:
70
-
71
- - Entity type (which schema was applied)
72
- - Path being written
73
- - ajv error details (which field, which constraint, which line)
74
- - Three resolution paths:
75
- 1. Fix the data to match the schema (preferred)
76
- 2. Update the schema if it's wrong (requires PR review)
77
- 3. Override with `SKIP_STATE_VALIDATE=1` (logged; rare; not for normal work)
78
-
79
- The agent receiving the BLOCK should treat it as a `BLOCKED:` per
80
- `.claude/rules/blocked-items.md` — surface to operator, resolve, do
81
- not silently retry without diagnosis.
82
-
83
- ## When to override
84
-
85
- `SKIP_STATE_VALIDATE=1 <command>` is logged to stderr. Use only:
86
-
87
- - **One-shot migration scripts** (WU-4 pattern) — bootstrapping prior
88
- shapes into the spine; the data may not yet conform until migration
89
- completes
90
- - **Schema is genuinely wrong** AND a fix-the-schema PR is in flight
91
- AND blocking on validation would block the schema fix itself
92
- - **Emergency rescue** when the hook itself is broken (substrate-defect
93
- recovery)
94
-
95
- NOT for:
96
-
97
- - "I'll fix the data later" — fix it now or document as a deferred
98
- action
99
- - "The schema is too strict" — file an amendment PR, don't bypass
100
- - Routine work that happens to fail validation — the validation
101
- failure is the signal that something's wrong
102
-
103
- ## When to update the schema
104
-
105
- If the hook BLOCKs and the data is genuinely correct (the schema is
106
- overly restrictive), open a PR amending the schema:
107
-
108
- 1. Edit `standards/state-spine/schemas/<entity>.schema.json`
109
- 2. Update `standards/state-spine.md` if the entity catalog or
110
- storage-shape table changes
111
- 3. Validate the schema itself compiles cleanly under
112
- `ajv compile --spec=draft2020 --strict`
113
- 4. Re-run `bash .claude/hooks/tests/state-validate.test.sh` to ensure
114
- no regressions
115
- 5. Note the rationale in the PR body (what the schema previously
116
- forbade that should be allowed; why)
117
-
118
- Schema changes are themselves state changes — review accordingly.
119
-
120
- ## Relationship to other rules + standards
121
-
122
- - `standards/state-spine.md` — entity catalog + storage shapes (defines
123
- what gets validated and how)
124
- - `standards/state-spine/schemas/*.schema.json` — the schemas this
125
- rule enforces
126
- - `standards/state-spine-contract.md` — accessor contract; mutations
127
- via `state_<entity>_add/set/update_status` accessors invoke this
128
- validator before writing
129
- - `.claude/rules/accessor-library-discipline.md` — paired with this
130
- rule; together they enforce read-side + write-side discipline
131
- - `.claude/rules/blocked-items.md` — BLOCK protocol the hook fires
132
- (resolve or explicitly defer)
133
- - `.claude/hooks/state-validate.sh` — the mechanical implementation
134
- - `.claude/hooks/tests/state-validate.test.sh` — test coverage
135
- - `architecture/decisions/ADR-015-state-schema-format.md` — JSON Schema
136
- only for v0; this hook uses ajv-cli per that decision
137
- - bassclef#298 — chronicle Gate Evidence drops; this hook + Chronicle
138
- schema together make that failure class structurally impossible
139
- - bassclef#295, #296 — other defects from the four-incident set that
140
- the spine v0 (incl. this rule) retires
141
-
142
- ## Enforcement
143
-
144
- - **Hook**: `.claude/hooks/state-validate.sh` — fires on PreToolUse
145
- with matcher `Edit|Write|MultiEdit`; wired in `.claude/settings.json`
146
- - **Methodology**: this rule loads in every session; agents
147
- self-check before writing state
148
- - **Test coverage**: `.claude/hooks/tests/state-validate.test.sh` (14
149
- tests covering all three shapes, override path, tool-name filter,
150
- pass-through for non-state files)
151
-
152
- ## Override
153
-
154
- `SKIP_STATE_VALIDATE=1 <command>` — logged to stderr per existing
155
- bassclef hook idiom. Use sparingly; document rationale in commit
156
- message.
157
-
158
- ## Retirement condition
159
-
160
- This rule retires only if the state spine retires. The schemas may
161
- evolve (v1 adds Persona accessor methods; v2+ adds template entities)
162
- but the discipline of write-time validation persists.