@thebassclef/lite 1.0.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/dist/cli.cjs +92 -6
  2. package/dist/cli.js +92 -6
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/lite/.claude/agents/architect.md +70 -0
  7. package/dist/lite/.claude/agents/builder.md +114 -0
  8. package/dist/lite/.claude/agents/designer.md +156 -0
  9. package/dist/lite/.claude/agents/reviewer.md +88 -0
  10. package/dist/lite/.claude/hooks/bassclef-sync.sh +85 -27
  11. package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
  12. package/dist/lite/.claude/hooks/longrun-prep-render-check.sh +236 -0
  13. package/dist/lite/.claude/hooks/persona-name-scrub-check.sh +105 -0
  14. package/dist/lite/.claude/hooks/skill-step-list-check.sh +171 -0
  15. package/dist/lite/.claude/luminaries/alan-cooper.md +170 -0
  16. package/dist/lite/.claude/luminaries/alistair-cockburn.md +140 -0
  17. package/dist/lite/.claude/luminaries/amazon-pr-faq.md +34 -0
  18. package/dist/lite/.claude/luminaries/andreas-zeller.md +74 -0
  19. package/dist/lite/.claude/luminaries/ash-maurya.md +121 -0
  20. package/dist/lite/.claude/luminaries/bill-buxton.md +210 -0
  21. package/dist/lite/.claude/luminaries/charles-sanders-peirce.md +150 -0
  22. package/dist/lite/.claude/luminaries/david-ogilvy.md +192 -0
  23. package/dist/lite/.claude/luminaries/don-norman.md +173 -0
  24. package/dist/lite/.claude/luminaries/edward-tufte.md +179 -0
  25. package/dist/lite/.claude/luminaries/eric-evans.md +160 -0
  26. package/dist/lite/.claude/luminaries/frederick-brooks.md +50 -0
  27. package/dist/lite/.claude/luminaries/gang-of-four.md +157 -0
  28. package/dist/lite/.claude/luminaries/glenford-myers.md +230 -0
  29. package/dist/lite/.claude/luminaries/hunt-thomas.md +115 -0
  30. package/dist/lite/.claude/luminaries/hyrum-wright.md +94 -0
  31. package/dist/lite/.claude/luminaries/jason-fried-dhh.md +46 -0
  32. package/dist/lite/.claude/luminaries/jesse-james-garrett.md +154 -0
  33. package/dist/lite/.claude/luminaries/john-ousterhout.md +94 -0
  34. package/dist/lite/.claude/luminaries/karl-popper.md +132 -0
  35. package/dist/lite/.claude/luminaries/kent-beck.md +168 -0
  36. package/dist/lite/.claude/luminaries/linus-torvalds.md +218 -0
  37. package/dist/lite/.claude/luminaries/martin-fowler.md +164 -0
  38. package/dist/lite/.claude/luminaries/michael-feathers.md +125 -0
  39. package/dist/lite/.claude/luminaries/michael-nygard.md +118 -0
  40. package/dist/lite/.claude/luminaries/robert-c-martin.md +164 -0
  41. package/dist/lite/.claude/luminaries/saltzer-schroeder.md +194 -0
  42. package/dist/lite/.claude/luminaries/sophia-prater.md +193 -0
  43. package/dist/lite/.claude/luminaries/stephen-toulmin.md +131 -0
  44. package/dist/lite/.claude/luminaries/tony-hoare.md +170 -0
  45. package/dist/lite/.claude/luminaries/vaughn-vernon.md +50 -0
  46. package/dist/lite/.claude/luminaries/w-edwards-deming.md +158 -0
  47. package/dist/lite/.claude/rules/accessor-library-discipline.md +110 -0
  48. package/dist/lite/.claude/rules/adr-discipline.md +96 -0
  49. package/dist/lite/.claude/rules/api-conventions.md +115 -0
  50. package/dist/lite/.claude/rules/artifact-ingestion.md +137 -0
  51. package/dist/lite/.claude/rules/assert-only-after-verify.md +111 -0
  52. package/dist/lite/.claude/rules/blocked-items.md +139 -0
  53. package/dist/lite/.claude/rules/bootstrap-pair-discipline.md +106 -0
  54. package/dist/lite/.claude/rules/branching.md +28 -0
  55. package/dist/lite/.claude/rules/cold-adopter-harness-discipline.md +93 -0
  56. package/dist/lite/.claude/rules/commit-conventions.md +22 -0
  57. package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +173 -0
  58. package/dist/lite/.claude/rules/compounding-sequence-fresh-analysis.md +173 -0
  59. package/dist/lite/.claude/rules/context-engineering.md +155 -0
  60. package/dist/lite/.claude/rules/context-management.md +85 -0
  61. package/dist/lite/.claude/rules/defensive-bash.md +52 -0
  62. package/dist/lite/.claude/rules/deferred-actions.md +233 -0
  63. package/dist/lite/.claude/rules/destructive-operations.md +69 -0
  64. package/dist/lite/.claude/rules/diagnosis.md +38 -0
  65. package/dist/lite/.claude/rules/github-issue-flash-tweet.md +114 -0
  66. package/dist/lite/.claude/rules/guardrails.md +73 -0
  67. package/dist/lite/.claude/rules/hook-wire-on-author.md +77 -0
  68. package/dist/lite/.claude/rules/identifier-leak-prevention.md +73 -0
  69. package/dist/lite/.claude/rules/iteration-bet-brief-completeness.md +43 -0
  70. package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +79 -0
  71. package/dist/lite/.claude/rules/longrun-prep-plan-doc-compression.md +77 -0
  72. package/dist/lite/.claude/rules/loop-discipline.md +71 -0
  73. package/dist/lite/.claude/rules/manual-prod-approval.md +100 -0
  74. package/dist/lite/.claude/rules/marker-enrichment-discipline.md +72 -0
  75. package/dist/lite/.claude/rules/mobile-ephemeral-session.md +109 -0
  76. package/dist/lite/.claude/rules/new-dependency-check.md +44 -0
  77. package/dist/lite/.claude/rules/oo-ad-entry-point.md +95 -0
  78. package/dist/lite/.claude/rules/operator-facing-prose.md +177 -0
  79. package/dist/lite/.claude/rules/option-label-discipline.md +82 -0
  80. package/dist/lite/.claude/rules/pattern-annotation.md +83 -0
  81. package/dist/lite/.claude/rules/persona-name-leak-scrub.md +90 -0
  82. package/dist/lite/.claude/rules/plain-english-discipline.md +132 -0
  83. package/dist/lite/.claude/rules/plan-enumeration-needs-value-props.md +177 -0
  84. package/dist/lite/.claude/rules/pr-body-shape.md +195 -0
  85. package/dist/lite/.claude/rules/pr-strategy.md +142 -0
  86. package/dist/lite/.claude/rules/pr-title-shape.md +90 -0
  87. package/dist/lite/.claude/rules/prototype-workflow.md +53 -0
  88. package/dist/lite/.claude/rules/reserved-skill-names.md +103 -0
  89. package/dist/lite/.claude/rules/schema-management.md +42 -0
  90. package/dist/lite/.claude/rules/sdlc-gates.md +149 -0
  91. package/dist/lite/.claude/rules/security.md +37 -0
  92. package/dist/lite/.claude/rules/session-artifacts.md +236 -0
  93. package/dist/lite/.claude/rules/skill-composition-declarations.md +105 -0
  94. package/dist/lite/.claude/rules/skill-description-clarity.md +196 -0
  95. package/dist/lite/.claude/rules/skill-procedure-step-list.md +119 -0
  96. package/dist/lite/.claude/rules/sprint-prep-preset-picker.md +76 -0
  97. package/dist/lite/.claude/rules/state-schema-validation.md +156 -0
  98. package/dist/lite/.claude/rules/stuck-signal-diagnostic.md +111 -0
  99. package/dist/lite/.claude/rules/substrate-config-schema.md +85 -0
  100. package/dist/lite/.claude/rules/test-list-discipline.md +129 -0
  101. package/dist/lite/.claude/rules/test-sufficiency.md +186 -0
  102. package/dist/lite/.claude/rules/testing-tier-config.md +125 -0
  103. package/dist/lite/.claude/rules/testing.md +38 -0
  104. package/dist/lite/.claude/rules/turn-estimate-grounding.md +82 -0
  105. package/dist/lite/.claude/rules/visual-hierarchy.md +427 -0
  106. package/dist/lite/.claude/rules/we-dont-break-adopters.md +103 -0
  107. package/dist/lite/.claude/rules/whereami-load-bearing.md +184 -0
  108. package/dist/lite/.claude/rules/writing-craft-discipline.md +72 -0
  109. package/dist/lite/.claude/rules/wu-sequencing-compounds.md +119 -0
  110. package/dist/lite/.claude/skills/build/SKILL.md +640 -0
  111. package/dist/lite/.claude/skills/chronicle/SKILL.md +55 -0
  112. package/dist/lite/.claude/skills/clean-artifacts/SKILL.md +249 -0
  113. package/dist/lite/.claude/skills/decompose/SKILL.md +280 -0
  114. package/dist/lite/.claude/skills/diagnose/SKILL.md +297 -0
  115. package/dist/lite/.claude/skills/feynman/SKILL.md +90 -0
  116. package/dist/lite/.claude/skills/howdoi/SKILL.md +105 -0
  117. package/dist/lite/.claude/skills/ia-model/SKILL.md +108 -0
  118. package/dist/lite/.claude/skills/interaction-design/SKILL.md +112 -0
  119. package/dist/lite/.claude/skills/interpret-input/SKILL.md +180 -0
  120. package/dist/lite/.claude/skills/journal/SKILL.md +209 -0
  121. package/dist/lite/.claude/skills/kiss/SKILL.md +449 -0
  122. package/dist/lite/.claude/skills/launch/SKILL.md +915 -0
  123. package/dist/lite/.claude/skills/lean-canvas/SKILL.md +332 -0
  124. package/dist/lite/.claude/skills/longrun/SKILL.md +512 -0
  125. package/dist/lite/.claude/skills/luminary/SKILL.md +481 -0
  126. package/dist/lite/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
  127. package/dist/lite/.claude/skills/onboard-repo/SKILL.md +1640 -0
  128. package/dist/lite/.claude/skills/pattern-review/SKILL.md +99 -0
  129. package/dist/lite/.claude/skills/personas/SKILL.md +207 -0
  130. package/dist/lite/.claude/skills/promote/SKILL.md +283 -0
  131. package/dist/lite/.claude/skills/requirement/SKILL.md +98 -0
  132. package/dist/lite/.claude/skills/retro/SKILL.md +117 -0
  133. package/dist/lite/.claude/skills/riff/SKILL.md +114 -0
  134. package/dist/lite/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
  135. package/dist/lite/.claude/skills/session-end/SKILL.md +309 -0
  136. package/dist/lite/.claude/skills/session-log/SKILL.md +299 -0
  137. package/dist/lite/.claude/skills/skills/SKILL.md +228 -0
  138. package/dist/lite/.claude/skills/spec/SKILL.md +105 -0
  139. package/dist/lite/.claude/skills/sprint/SKILL.md +418 -0
  140. package/dist/lite/.claude/skills/stage/SKILL.md +384 -0
  141. package/dist/lite/.claude/skills/state-a-problem/SKILL.md +185 -0
  142. package/dist/lite/.claude/skills/temperance/SKILL.md +108 -0
  143. package/dist/lite/.claude/skills/use-case/SKILL.md +417 -0
  144. package/dist/lite/.claude/skills/user-stories/SKILL.md +268 -0
  145. package/dist/lite/.claude/skills/value-prop/SKILL.md +251 -0
  146. package/dist/lite/.claude/skills/verify/SKILL.md +160 -0
  147. package/dist/lite/.claude/skills/visual-review/SKILL.md +503 -0
  148. package/dist/lite/.claude/skills/whats-the-plan/SKILL.md +202 -0
  149. package/dist/lite/.claude/skills/whereami/SKILL.md +307 -0
  150. package/dist/lite/AGENTS.md +79 -0
  151. package/dist/lite/CLAUDE-lite.md +85 -0
  152. package/dist/lite/CODE_OF_CONDUCT.md +28 -0
  153. package/dist/lite/CONTRIBUTING.md +177 -0
  154. package/dist/lite/README.md +173 -0
  155. package/dist/lite/SECURITY.md +19 -0
  156. package/dist/lite/architecture/decisions/ADR-029-release-pipeline.md +79 -0
  157. package/dist/lite/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
  158. package/dist/lite/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
  159. package/dist/lite/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
  160. package/dist/lite/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
  161. package/dist/lite/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
  162. package/dist/lite/lib/clean-artifacts-sweep.sh +112 -0
  163. package/dist/lite/lib/code-comment-discipline.sh +144 -0
  164. package/dist/lite/lib/composer-preflight.sh +459 -0
  165. package/dist/lite/lib/deferred-actions.sh +146 -0
  166. package/dist/lite/lib/hook-header-parser.sh +61 -0
  167. package/dist/lite/lib/hook-heartbeat.sh +152 -0
  168. package/dist/lite/lib/hook-inject.sh +255 -0
  169. package/dist/lite/lib/hook-installer.sh +195 -0
  170. package/dist/lite/lib/luminary-pick.sh +96 -0
  171. package/dist/lite/lib/output-discipline.sh +143 -0
  172. package/dist/lite/lib/prose-scan-boundary.sh +171 -0
  173. package/dist/lite/lib/rewrite-check.sh +214 -0
  174. package/dist/lite/lib/session-rescue.sh +151 -0
  175. package/dist/lite/lib/source-graph-walker.sh +277 -0
  176. package/dist/lite/lib/state.sh +1372 -0
  177. package/dist/lite/lib/telemetry.sh +205 -0
  178. package/dist/lite/lib/tier-check.sh +187 -0
  179. package/dist/lite/lib/tier-dependency-audit.sh +1088 -0
  180. package/dist/lite/presence/install/bassclef-hook-connect.sh +178 -0
  181. package/dist/lite/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
  182. package/dist/lite/presence/install/bassclef-sync.template.sh +2278 -0
  183. package/dist/lite/presence/install/schedule-auto-save.cron.sh +88 -0
  184. package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +122 -0
  185. package/dist/lite/scripts/aggregate-telemetry.sh +217 -0
  186. package/dist/lite/scripts/analyze-tier-dependencies.sh +239 -0
  187. package/dist/lite/scripts/generate-lite-manifest.sh +505 -0
  188. package/dist/lite/scripts/generate-tier-manifest.sh +28 -0
  189. package/dist/lite/scripts/intent-drift-check.sh +456 -0
  190. package/dist/lite/scripts/lite-manifest-drift-check.sh +146 -0
  191. package/dist/lite/scripts/render-lite-manifest-doc.sh +150 -0
  192. package/dist/lite/standards/adr-template.md +86 -0
  193. package/dist/lite/standards/api-conventions/nextjs.md +84 -0
  194. package/dist/lite/standards/artifact-composition.md +209 -0
  195. package/dist/lite/standards/bash-hook-safety.md +246 -0
  196. package/dist/lite/standards/bassclef-configs-schema.md +232 -0
  197. package/dist/lite/standards/bassclef-evolution.md +143 -0
  198. package/dist/lite/standards/bassclef-internal-jargon.md +244 -0
  199. package/dist/lite/standards/bassclef-managed-sentinel.md +96 -0
  200. package/dist/lite/standards/bassclef-source-config.md +228 -0
  201. package/dist/lite/standards/branch-stacking.md +408 -0
  202. package/dist/lite/standards/code-safety-principles.md +176 -0
  203. package/dist/lite/standards/composer-prerequisites.md +155 -0
  204. package/dist/lite/standards/deferred-actions-schema.md +204 -0
  205. package/dist/lite/standards/dependency-discipline/cargo.md +39 -0
  206. package/dist/lite/standards/dependency-discipline/gem.md +43 -0
  207. package/dist/lite/standards/dependency-discipline/go-mod.md +41 -0
  208. package/dist/lite/standards/dependency-discipline/npm.md +42 -0
  209. package/dist/lite/standards/dependency-discipline/pip.md +42 -0
  210. package/dist/lite/standards/deployment-topology/ec2-tailscale.md +225 -0
  211. package/dist/lite/standards/deployment-topology.md +69 -0
  212. package/dist/lite/standards/docs-sync-allowlist.md +76 -0
  213. package/dist/lite/standards/domain-and-dns.md +145 -0
  214. package/dist/lite/standards/frontend-stack.md +67 -0
  215. package/dist/lite/standards/frontmatter-schema.md +154 -0
  216. package/dist/lite/standards/graceful-exit.md +227 -0
  217. package/dist/lite/standards/hook-idempotency.md +102 -0
  218. package/dist/lite/standards/hook-injection-discipline.md +202 -0
  219. package/dist/lite/standards/hook-install-class.md +215 -0
  220. package/dist/lite/standards/input-handler-interface.md +152 -0
  221. package/dist/lite/standards/lite-manifest-schema-changes.md +180 -0
  222. package/dist/lite/standards/lite-manifest.json +2797 -0
  223. package/dist/lite/standards/luminary-matching.md +105 -0
  224. package/dist/lite/standards/luminary-problem-patterns.md +481 -0
  225. package/dist/lite/standards/migration-discipline/active-record.md +50 -0
  226. package/dist/lite/standards/migration-discipline/alembic.md +43 -0
  227. package/dist/lite/standards/migration-discipline/gorm.md +50 -0
  228. package/dist/lite/standards/migration-discipline/prisma.md +53 -0
  229. package/dist/lite/standards/migration-discipline/sqlalchemy.md +51 -0
  230. package/dist/lite/standards/mobile-ephemeral-session.md +167 -0
  231. package/dist/lite/standards/model-routing-discipline.md +160 -0
  232. package/dist/lite/standards/ogilvy-writing-rules.md +225 -0
  233. package/dist/lite/standards/opener-discipline.md +96 -0
  234. package/dist/lite/standards/operator-facing-prose-discipline.md +201 -0
  235. package/dist/lite/standards/persona-schema.md +229 -0
  236. package/dist/lite/standards/pluggable-luminaries.md +323 -0
  237. package/dist/lite/standards/pr-body-discipline.md +115 -0
  238. package/dist/lite/standards/preview-state-schema.md +189 -0
  239. package/dist/lite/standards/project-directory-layout.md +276 -0
  240. package/dist/lite/standards/release-tagging.md +137 -0
  241. package/dist/lite/standards/reserved-skill-names.md +120 -0
  242. package/dist/lite/standards/scannable-multi-option-output.md +265 -0
  243. package/dist/lite/standards/sdlc-compliance.md +286 -0
  244. package/dist/lite/standards/sdlc-gates/typescript.md +57 -0
  245. package/dist/lite/standards/secrets-lifecycle.md +210 -0
  246. package/dist/lite/standards/security-scanner-adapter.md +145 -0
  247. package/dist/lite/standards/session-board.md +256 -0
  248. package/dist/lite/standards/skill-output-discipline.md +121 -0
  249. package/dist/lite/standards/state-spine-contract.md +255 -0
  250. package/dist/lite/standards/state-spine.md +511 -0
  251. package/dist/lite/standards/steering-hints/kiss-words.md +11 -0
  252. package/dist/lite/standards/substrate-config-schema.md +267 -0
  253. package/dist/lite/standards/tech-stack-config.md +109 -0
  254. package/dist/lite/standards/tier-dependency-analysis.md +167 -0
  255. package/dist/lite/standards/tier-runtime-deps/lite.md +57 -0
  256. package/dist/lite/standards/tier-tag-schema.md +155 -0
  257. package/dist/lite/standards/two-layer-config.md +99 -0
  258. package/dist/lite/standards/use-case-format.md +292 -0
  259. package/dist/lite/standards/user-story-invest.md +268 -0
  260. package/dist/lite/standards/velocity-and-appetite.md +229 -0
  261. package/dist/lite/standards/voice-input-pattern.md +119 -0
  262. package/dist/lite/standards/whereami-schema.md +301 -0
  263. package/dist/lite/standards/worktree-management.md +211 -0
  264. package/dist/lite/standards/writing-guide.md +213 -0
  265. package/dist/lite/templates/chronicle-template.md +75 -0
  266. package/dist/lite/templates/deferred-action-template.md +45 -0
  267. package/dist/lite/templates/memory-proposal-template.md +77 -0
  268. package/dist/lite/templates/persona-template.md +200 -0
  269. package/dist/lite/templates/pr-faq.md +45 -0
  270. package/dist/lite/templates/secret-rotation-template.md +162 -0
  271. package/dist/lite/templates/spec-template.md +131 -0
  272. package/dist/lite/templates/use-case-template.md +194 -0
  273. package/dist/lite/templates/user-story-template.md +107 -0
  274. package/dist/lite/templates/whereami-template.md +101 -0
  275. package/package.json +1 -1
@@ -0,0 +1,170 @@
1
+ ---
2
+ tier: lite
3
+ name: Tony Hoare
4
+ slug: tony-hoare
5
+ claimed_by: [builder, reviewer, architect]
6
+ referenced_by_skills: [verify, pattern-review, decompose]
7
+ primary_domain: engineering
8
+ depth: full
9
+ sources:
10
+ - type: paper
11
+ title: "An Axiomatic Basis for Computer Programming"
12
+ authors: ["C. A. R. Hoare"]
13
+ year: 1969
14
+ venue: "Communications of the ACM, 12(10), 576-580"
15
+ url: "https://dl.acm.org/doi/10.1145/363235.363259"
16
+ methodology_covered:
17
+ - "Hoare logic — the triple {P} S {Q} relating precondition P, statement S, postcondition Q"
18
+ - "Formal reasoning about program correctness through assertion calculus"
19
+ - "Axiomatic semantics — meaning of a program is what can be proved about it"
20
+ - type: paper
21
+ title: "Hints on Programming Language Design"
22
+ authors: ["C. A. R. Hoare"]
23
+ year: 1973
24
+ venue: "Stanford Computer Science Department, STAN-CS-73-403"
25
+ url: "https://www.cs.tufts.edu/~nr/cs257/archive/tony-hoare/hints-pl-design.pdf"
26
+ methodology_covered:
27
+ - "Simplicity is the unique selling proposition of a programming language"
28
+ - "Security via construction — design out classes of error rather than detect them"
29
+ - "Readability primacy — a program is read more often than it is written"
30
+ - type: paper
31
+ title: "Communicating Sequential Processes"
32
+ authors: ["C. A. R. Hoare"]
33
+ year: 1978
34
+ venue: "Communications of the ACM, 21(8), 666-677"
35
+ url: "https://dl.acm.org/doi/10.1145/359576.359585"
36
+ methodology_covered:
37
+ - "CSP — concurrency as composition of independent processes communicating via synchronous channels"
38
+ - "Influenced Go's goroutines + channels, Erlang's actor model, occam"
39
+ - type: talk
40
+ title: "Null References: The Billion Dollar Mistake"
41
+ authors: ["C. A. R. Hoare"]
42
+ year: 2009
43
+ venue: "QCon London"
44
+ url: "https://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare/"
45
+ methodology_covered:
46
+ - "Reflection on ALGOL W (1965) decision to allow null references — admits as billion-dollar mistake"
47
+ - "Design errors out of existence via type system — modern relevance to Option / Result / NonNullable types"
48
+ verification_status: verified
49
+ description: "\"There are two ways of constructing a software design: one is to make it so simple that there are obviously no deficiencies; the other is to make it so complicated that there are…"
50
+ ---
51
+
52
+ # Tony Hoare
53
+
54
+ ## Signature
55
+
56
+ *"There are two ways of constructing a software design: one is to make it so simple that there are obviously no deficiencies; the other is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult."*
57
+
58
+ Sir Charles Antony Richard Hoare. Turing Award winner (1980) for "fundamental contributions to the definition and design of programming languages." Author of **Quicksort** (1959), **Hoare logic** (1969), and **Communicating Sequential Processes** (1978). Oxford professor emeritus and Microsoft Research senior researcher. The bassclef voice on contract-driven reasoning, simplicity-as-discipline, and designing errors out of existence.
59
+
60
+ ## Core methods
61
+
62
+ - **Hoare logic — the `{P} S {Q}` triple** — A program statement `S` is correct with respect to precondition `P` and postcondition `Q` if: when `P` holds before `S` executes, then `Q` holds after `S` terminates. The triple is the formal contract between caller and callee. Test sufficiency for a function is: cover every meaningful `(P, Q)` pair the function commits to.
63
+ - **Precondition discipline** — A function's precondition is what the caller must guarantee. Violations are programmer errors, not runtime errors. Pre-validate at the boundary; trust internally.
64
+ - **Postcondition discipline** — A function's postcondition is what it guarantees on return. The test asserts the postcondition; the implementation establishes it.
65
+ - **Loop invariant** — A condition true before the loop, after every iteration, and on exit. The invariant IS the proof that the loop establishes its postcondition.
66
+ - **Class invariant** (operationalized by Bertrand Meyer in Eiffel's Design by Contract, 1986) — A condition that holds at every observable state of an instance. Constructors must establish it; methods must preserve it.
67
+ - **Communicating Sequential Processes (CSP)** — Concurrency as composition of independent processes that synchronize only through explicit channels. Shared mutable state replaced by message-passing. Direct ancestor of Go's goroutines + channels, Erlang's actor model.
68
+ - **Simplicity as design discipline** — Hoare's most-cited prescription: choose the design where deficiencies are obvious, not the design where there are no obvious deficiencies. The two are not equivalent; the second hides bugs the first surfaces.
69
+ - **Design errors out of existence** — Null references were a 1965 design choice Hoare publicly regrets. The lens: if a class of error CAN be made impossible by construction (type system, API shape, invariant enforcement), make it so. Detection is strictly weaker than prevention.
70
+
71
+ ## When to channel this luminary
72
+
73
+ When the primary risk is correctness under interaction — multiple callers, multiple states, contracts implicit but unenforced. Hoare dominates for state-spine accessors, hook input/output contracts, concurrent code (locks, queues, event ordering), and API boundaries where the contract has to survive every caller.
74
+
75
+ Pair with Beck (TDD rhythm), Myers (coverage taxonomy of what to assert), Ousterhout (design judgment for where to draw the boundary). Beck owns the cycle; Myers owns the categories; Ousterhout owns the shape; Hoare owns the contract itself.
76
+
77
+ Skip Hoare when: the work is exploratory spike code with no caller, the interface is genuinely throwaway, or the relevant risk is design-quality rather than contract-correctness (route to Ousterhout). Hoare's discipline carries overhead; apply where the overhead earns its keep.
78
+
79
+ INSTEAD of citing Hoare for refactoring tactics, design-pattern selection, or test rhythm: route to Fowler, GoF, and Beck respectively.
80
+
81
+ ## Stack translation
82
+
83
+ In bassclef's bash hook + state-spine substrate:
84
+
85
+ - **Hook tests as contract assertions** — Every hook test case is a Hoare triple in disguise. Test name = `(P, Q)` pair; arrange-act-assert is `establish P → run S → check Q`. Example: for `auto-save-idle.sh`, `test('SESSION_LOCK present suppresses auto-save', ...)` is `{LOCK file exists} run hook {no commit happens}`. The test sufficiency rubric's "stdin contract" criterion IS Hoare's precondition discipline.
86
+ - **State-spine accessors as contracts** — `state_whereami_set "key" "value"` has precondition (`key` is a valid Whereami field path; `value` is JSON-serializable + schema-conformant) and postcondition (state stored + queryable via `state_whereami_get "key"`). The `state-validate.sh` PreToolUse hook IS the mechanical enforcement of the precondition; the schema IS the contract.
87
+ - **Pre-build-gate hook as precondition enforcement** — Every gate the hook fires (temperance marker present? diagnose evidence on fix/ branches? state markers in place?) is a precondition the substrate refuses to relax. The hook BLOCKs to prevent the agent from violating a contract that downstream consumers depend on.
88
+ - **Bash strict mode as invariant** — `set -euo pipefail` establishes an invariant: any unhandled error terminates the script. The invariant must hold across every function; `trap EXIT` cleanup respects the invariant by running regardless of exit path.
89
+ - **CSP-style channels in bassclef** — Inter-session coordination via roadmap event_history (bassclef#337) follows CSP shape: each session is a process; the roadmap is the synchronization channel; atomic claim/release primitives are the synchronous message-pass. Direct application of Hoare's 1978 paper to multi-agent SDLC.
90
+
91
+ In Next.js + TypeScript adopter stacks:
92
+
93
+ - **Type system as precondition encoder** — `Option<T>` / `Result<T, E>` / branded types make Hoare's "design errors out of existence" mechanical. `NonNullable<T>` is null-as-billion-dollar-mistake corrected at compile time.
94
+ - **Zod schemas as boundary contracts** — Validate at the system boundary (API route handler, message consumer); trust internally. Zod parse failure IS the precondition violation Hoare's framing makes explicit.
95
+ - **Class invariants in domain models** — A `Deal` instance with `status: 'closed' && closingPrice: undefined` violates an invariant. Constructors + factories enforce it; methods preserve it.
96
+
97
+ ## Anti-patterns it prevents
98
+
99
+ - **Implicit contracts that drift** — A function with no documented precondition has every caller guessing. When one caller's assumption diverges from another's, bugs appear at the seam. Hoare's discipline forces the contract to be explicit (test, type, assertion, or comment).
100
+ - **Defensive coding scattered across callers** — Every caller checking the same precondition is a contract that should have been centralized at the callee's boundary. Pre-validate once at the entry; trust thereafter.
101
+ - **Postcondition-by-vibe** — "It seems to work" is not a contract. Hoare's framing requires the postcondition be statable and testable. If it is not statable, the function's purpose is unclear.
102
+ - **Loop-by-mutation-tracking** — A loop where correctness depends on tracking which variables mutated in which order is harder to reason about than a loop with an explicit invariant. Hoare's invariant discipline asks: what is true at the top of every iteration?
103
+ - **Null-as-default** — Returning `null` (or `undefined`) for "not found" forces every caller to handle the missing case. Returning `Option<T>` (or `NotFound<T>`) encodes the precondition into the type system. Hoare's billion-dollar-mistake talk is the bassclef case against null-as-default.
104
+ - **Shared mutable state for coordination** — Two processes synchronizing through a shared variable hold an implicit lock the language has no visibility into. CSP-style channels make the synchronization explicit; the channel IS the synchronization.
105
+
106
+ ## Worked example
107
+
108
+ Tightening bassclef's `auto-save-idle.sh` hook under Hoare's discipline:
109
+
110
+ **Before — implicit contract:**
111
+
112
+ ```bash
113
+ # Pseudocode of pre-#1085 state
114
+ if [ -z "$(git status --porcelain)" ]; then exit 0; fi
115
+ git add -A
116
+ git commit -m "auto-save: $(date -u)"
117
+ ```
118
+
119
+ What is the precondition? Caller assumes: working tree dirty, no SESSION_LOCK, no commit-sequence in flight. None of these are stated. Three different sessions can produce three different definitions of "should this commit?"
120
+
121
+ **After — Hoare-explicit contract:**
122
+
123
+ ```bash
124
+ # {P}: working tree dirty AND no SESSION_LOCK AND no defer marker for commit-sequence
125
+ [ -n "$(git status --porcelain)" ] || { exit 0; } # P-1: dirty
126
+ [ ! -f .claude/SESSION_LOCK ] || { exit 0; } # P-2: no lock
127
+ [ ! -f state/markers/auto-save-defer/commit-sequence.marker ] || { exit 0; } # P-3: no defer
128
+
129
+ # S: stage + commit
130
+ git add -A
131
+ git commit -m "auto-save: $(date -u)"
132
+
133
+ # {Q}: HEAD advanced by exactly one commit AND working tree clean
134
+ [ "$(git status --porcelain)" = "" ] # Q-1: clean
135
+ ```
136
+
137
+ What the test owes (Hoare-derived test list):
138
+
139
+ ```bash
140
+ # test-list:
141
+ # [x] {dirty AND no LOCK AND no defer} → commit happens AND tree clean (P all true, Q holds)
142
+ # [x] {LOCK present} → no commit (P-2 false; hook returns early before S)
143
+ # [x] {defer marker present} → no commit (P-3 false; hook returns early before S)
144
+ # [x] {clean tree} → no commit (P-1 false; nothing to commit)
145
+ # [x] {LOCK AND defer present} → no commit, LOCK takes precedence in early-exit order
146
+ ```
147
+
148
+ The test list IS the Hoare triple decomposed. Each line names one `(P, Q)` pair. The hook is the implementation that establishes Q when P holds.
149
+
150
+ What this discipline catches: PR #1058 (the auto-save-scope-hole that bassclef#1059 closed) shipped without P-2 enforced. A Hoare-explicit contract from day one would have surfaced the missing precondition at write time, not after the failure ran in production substrate.
151
+
152
+ ## Sources
153
+
154
+ - "An Axiomatic Basis for Computer Programming" — Hoare, *Communications of the ACM* 12(10), 1969
155
+ - "Hints on Programming Language Design" — Hoare, Stanford CS, 1973
156
+ - "Communicating Sequential Processes" — Hoare, *Communications of the ACM* 21(8), 1978; book Prentice Hall, 1985
157
+ - "Null References: The Billion Dollar Mistake" — Hoare, QCon London 2009
158
+ - "Quicksort" — Hoare, *Computer Journal* 5(1), 1962
159
+ - ACM Turing Award citation (1980)
160
+ - Oxford Department of Computer Science emeritus page
161
+ - Microsoft Research Cambridge senior researcher page
162
+
163
+ ## Related luminaries
164
+
165
+ - **Bertrand Meyer** — Design by Contract operationalized Hoare's logic for Eiffel (1986); same lens with practitioner-grade tooling. Modern type systems (TypeScript, Rust, Scala) carry DBC patterns Meyer named.
166
+ - **Edsger Dijkstra** — Structured programming + weakest-precondition calculus extended Hoare's axiomatic basis. Famously argued "testing shows the presence, not the absence, of bugs" — the counterweight that says even Hoare-explicit contracts do not prove correctness in the formal sense.
167
+ - **Glenford Myers** — Coverage taxonomy supplies the WHICH categories of input exercise a contract; Hoare supplies WHAT the contract is. Both are required for a complete test suite.
168
+ - **Kent Beck** — TDD rhythm produces tests; Hoare contracts decide what those tests must assert. Beck's "make it work" needs Hoare's "what does it commit to" to be testable.
169
+ - **John Ousterhout** — Deep modules with small interfaces are easier to contract-test (small surface area for `(P, Q)` pairs). Ousterhout's design quality lens implicitly rewards Hoare-explicit interfaces.
170
+ - **Tony Hoare's own work on CSP** — direct ancestor of Go (channels + goroutines), Erlang (actor model), occam. Bassclef's event_history + atomic claim/release pattern (bassclef#337) is CSP applied to multi-session SDLC.
@@ -0,0 +1,50 @@
1
+ ---
2
+ tier: lite
3
+ name: Vaughn Vernon
4
+ slug: vaughn-vernon
5
+ claimed_by: [architect]
6
+ referenced_by_skills: [decompose, architect-review]
7
+ primary_domain: architecture
8
+ depth: stub
9
+ description: "\"DDD is implementable. Here's how.\""
10
+ ---
11
+
12
+ # Vaughn Vernon
13
+
14
+ ## Signature
15
+
16
+ *"DDD is implementable. Here's how."*
17
+
18
+ Author of **Implementing Domain-Driven Design** (the "red book") and
19
+ **Domain-Driven Design Distilled**. The canonical operational voice for
20
+ DDD — where Evans provides the philosophy, Vernon provides the code.
21
+
22
+ ## Core methods
23
+
24
+ - **Bounded Context Canvas** — Structured workshop output that defines a
25
+ bounded context's purpose, strategic classification, domain roles,
26
+ ubiquitous language, and inbound/outbound communication.
27
+ - **Context mapping patterns** — Partnership, Shared Kernel,
28
+ Customer/Supplier, Conformist, Anticorruption Layer, Open Host Service,
29
+ Published Language, Separate Ways, Big Ball of Mud. Vocabulary for how
30
+ bounded contexts relate.
31
+ - **Aggregate design rules** — Small aggregates; reference other
32
+ aggregates by ID only; update one aggregate per transaction; use
33
+ eventual consistency between aggregates.
34
+ - **Event Storming (via Alberto Brandolini)** — Vernon popularized this
35
+ modeling method as the pragmatic entry point to DDD for teams new to it.
36
+
37
+ ## Sources
38
+
39
+ - *Implementing Domain-Driven Design* — Vernon, Addison-Wesley (2013)
40
+ - *Domain-Driven Design Distilled* — Vernon, Addison-Wesley (2016)
41
+ - *Strategic Monoliths and Microservices* — Vernon, Jaskuła (2021)
42
+ - kalele.io — Vernon's consultancy and ongoing DDD content
43
+
44
+ ## Related luminaries
45
+
46
+ - **Eric Evans** — Vernon operationalizes Evans; pair them always.
47
+ - **Alistair Cockburn** — Hexagonal Architecture pairs naturally with
48
+ bounded contexts; aggregates live inside hexagons.
49
+ - **Gregor Hohpe** — EIP's anticorruption-layer aligns with Vernon's
50
+ context mapping.
@@ -0,0 +1,158 @@
1
+ ---
2
+ tier: lite
3
+ name: W. Edwards Deming
4
+ slug: w-edwards-deming
5
+ claimed_by: [builder, architect, closer, shaper]
6
+ primary_domain: engineering
7
+ depth: full
8
+ description: "\"A bad system will beat a good person every time.\""
9
+ ---
10
+
11
+ # W. Edwards Deming
12
+
13
+ ## Signature
14
+
15
+ *"A bad system will beat a good person every time."*
16
+
17
+ W. Edwards Deming (1900–1993) was a statistician who taught Japanese
18
+ industry to read the system, not the person, when results disappoint.
19
+ His finding from decades of plant data: roughly **94% of variation in
20
+ outcomes traces to the system**, and roughly **6% traces to people**.
21
+ The implication was strict — every time results land badly and the
22
+ default reaction is "the person should have been more careful," the
23
+ default is wrong 94% of the time. Deming's full discipline ran from the
24
+ ground up: a cycle for improvement (**PDSA / PDCA**), a framing for
25
+ what management owed the system (**14 Points**), and a system view
26
+ called the **System of Profound Knowledge** that tied it all together.
27
+
28
+ ## Core methods
29
+
30
+ - **PDCA / PDSA cycle (Plan-Do-Check-Act, later Plan-Do-Study-Act)** —
31
+ the discipline of substrate improvement. Plan a change. Do it small
32
+ first. Study what actually happened. Act on the finding (standardize
33
+ or revise). Loop. Use when the change is non-trivial AND the team is
34
+ about to ship without a structured way to learn from the result.
35
+ - **14 Points for Management** — the duties of leadership in a system
36
+ that produces variation. Headline points: drive out fear; break down
37
+ barriers between departments; cease dependence on inspection (build
38
+ quality in); institute leadership; remove arbitrary numerical quotas.
39
+ Read the full 14 when shaping team structure or substrate-discipline
40
+ rules — many bassclef rules are 14-Points applied to agents.
41
+ - **System of Profound Knowledge** — four lenses applied together:
42
+ appreciation for a system (the whole, not the parts); theory of
43
+ variation (special vs common causes); theory of knowledge (no
44
+ knowledge without prediction); psychology (people respond to
45
+ systems). Use when the question is "what kind of fix is this" —
46
+ process-level, structural, learning, or human.
47
+ - **Common cause vs special cause** — variation has two flavors. Common
48
+ cause is built into the system (every run produces it). Special
49
+ cause is a specific event (a one-time trigger). The diagnosis path is
50
+ different for each. Use when picking remediation: common cause needs
51
+ a system change; special cause needs a single intervention.
52
+
53
+ ## When to channel this luminary
54
+
55
+ Channel Deming whenever the default explanation reaches for
56
+ operator-forgetfulness, agent-laziness, adopter-skill-gaps, or any
57
+ "person should have been more careful" framing. Deming forces the
58
+ question: is the system designed to make the right behavior easy? If
59
+ not, the system is the defect.
60
+
61
+ Also channel when shaping a hardening pass. The four lenses of the
62
+ System of Profound Knowledge are the architect-review lenses Deming
63
+ would apply in order. Specifically:
64
+
65
+ - Appreciation for a system → C4 Context + Container diagrams; see the
66
+ whole substrate before zooming into hooks
67
+ - Theory of variation → distinguish substrate-wide failure classes
68
+ (common cause) from one-off PR breakage (special cause)
69
+ - Theory of knowledge → every hardening proposal predicts an outcome;
70
+ no prediction means no learning when the result lands
71
+ - Psychology → adopters respond to substrate friction; reduce the
72
+ friction rather than asking adopters to push through it
73
+
74
+ ## Stack translation
75
+
76
+ Bassclef's hooks, rules, validators, and skills are the **system**
77
+ Deming describes. Operators and Claude Code agents are the **people**.
78
+ When a defect surfaces:
79
+
80
+ - If the same defect surfaces across three sessions, that is common
81
+ cause — patch the system (hook, validator, rule)
82
+ - If the defect is a one-time slip (a typo, a missed paste), that is
83
+ special cause — fix the instance; do not change the substrate
84
+ - If the defect surfaces because the discipline is methodology-only
85
+ (no mechanical gate), the system is the defect — escalate to hook
86
+
87
+ PDCA maps onto substrate evolution: a /promote ticket is the **Plan**.
88
+ Shipping the rule + hook is the **Do**. Watching for stuck-signal
89
+ diagnostics across the next month is the **Study**. Closing or revising
90
+ the rule based on usage data is the **Act**. Bassclef's
91
+ `stuck-signal-diagnostic.md` rule is Deming's Study phase made
92
+ mechanical.
93
+
94
+ ## Anti-patterns it prevents
95
+
96
+ - **Operator-forgetfulness framing** — When a SessionStart hook fires
97
+ on a missing field, the first instinct can be "the operator forgot
98
+ to add it." Deming asks: is the hook design such that the field is
99
+ obvious? Is the bootstrap row shipped with the validator? If the
100
+ answer to either is no, the system is the defect — not the operator.
101
+ - **Inspection-as-quality** — When a substrate gate fires repeatedly
102
+ and the answer is "more vigilance," that is inspection-instead-of-
103
+ quality-built-in. Deming Point #3: cease dependence on inspection.
104
+ Instead, build the validation INTO the surface that produces the
105
+ artifact (template that includes the required field; schema
106
+ validation at write time; pre-commit gate that emits the missing
107
+ row).
108
+ - **Quota-driven scope-cutting** — When a session's appetite framing
109
+ drives toward (a) narrow fix because (c) full audit feels too big,
110
+ Deming Point #11 fires: remove arbitrary numerical quotas. Appetite
111
+ is a budget for shape-picking, not a quota for cause-categorization.
112
+ Run fishbone first; THEN pick the scope that fits the cause.
113
+
114
+ ## Worked example
115
+
116
+ 2026-06-24 chronicle reads: "Operator-side rot has structural cause,
117
+ not operator forgetfulness." That single sentence is Deming applied.
118
+ The 51-hour-stale `~/.claude/hooks/bassclef-sync.sh` did not happen
119
+ because the operator forgot to update; it happened because the cp-list
120
+ in §3 of the sync script omitted the script itself — the hook could
121
+ not update itself. ADR-034 closed the gap with the two-stage rocket
122
+ pattern — a SYSTEM change, not a person change.
123
+
124
+ The four 2026-06-24 substrate defects all share the same Deming class:
125
+
126
+ | Defect | System fix shipped | If Deming had been ignored |
127
+ |---|---|---|
128
+ | Operator-side rot | ADR-034 two-stage bootstrap | Tell operator to remember to sync |
129
+ | 32 unwired hooks | #319 + #320 audit | Tell agent to remember to wire |
130
+ | /kiss skip on PRs | bassclef#915 → hook | Tell agent to remember /kiss |
131
+ | Public-scripts origin | #320 audit + WU-2 C4 Container | Tell operator to remember |
132
+
133
+ The right-column reactions are the 6% framing. The left-column fixes
134
+ are the 94% framing. Bassclef ships the 94% reactions by default; this
135
+ luminary names the discipline.
136
+
137
+ ## Sources
138
+
139
+ - *Out of the Crisis* — Deming (1986)
140
+ - *The New Economics for Industry, Government, Education* — Deming (1993)
141
+ - *Statistical Quality Control* — Deming (1939)
142
+
143
+ ## Related luminaries
144
+
145
+ - **Walter Shewhart** — Deming's mentor; originator of PDCA (then
146
+ PDSA). Bassclef does not yet ship a Shewhart entry; the discipline
147
+ comes through Deming.
148
+ - **Kaoru Ishikawa** — fishbone categorizes; PDCA improves. Use
149
+ Ishikawa to see the categories; use Deming to run the improvement
150
+ cycle.
151
+ - **Taiichi Ohno** — Five Whys traces one chain; Deming asks whether
152
+ the chain is common-cause or special-cause variation.
153
+ - **Linus Torvalds** — "we do not break userspace" is Deming Point #1
154
+ (constancy of purpose) applied to kernel stability. Bassclef's
155
+ adopter-respect rule is the same shape.
156
+ - **John Ousterhout** — deep modules hide complexity; Deming would
157
+ call this designing the system so the surface is easy to use
158
+ correctly.
@@ -0,0 +1,110 @@
1
+ ---
2
+ tier: lite
3
+ description: State spine consumers (skills, hooks, rules, scripts) MUST go through the typed accessor library lib/state.sh to read or write bassclef state.
4
+ ---
5
+
6
+ # Accessor Library Discipline
7
+
8
+ State spine consumers (skills, hooks, rules, scripts) MUST go through
9
+ the typed accessor library `lib/state.sh` to read or write bassclef
10
+ state. Direct filesystem access (cat, jq, awk, grep over JSON state
11
+ files) is forbidden when an accessor exists.
12
+
13
+ This rule is the Adapter discipline that preserves cxdb portability —
14
+ exit criterion 1 of the 7 in canvas v4 §"Adapter discipline":
15
+
16
+ > **Accessor library is the ONLY consumer of cxdb APIs.** No skill,
17
+ > hook, rule, or script invokes cxdb directly. All access goes through
18
+ > `lib/state.sh`.
19
+
20
+ Same principle applied at v0 (where the storage backend IS the
21
+ filesystem): no consumer reaches around the accessor to the raw files.
22
+
23
+ ## What this rule forbids
24
+
25
+ In any skill, hook, rule, or script:
26
+
27
+ - `cat docs/whereami.json` → use `state_whereami_get`
28
+ - `jq '.field' docs/whereami.json` → use `state_whereami_get | jq '.field'`
29
+ - `find state/markers -name '*.json' | wc -l` → use `state_marker_count`
30
+ - `awk '/gates_fired:/' chronicle/*.md` → use `state_chronicle_gate_evidence`
31
+ - `ls docs/deferred-actions/*.md | grep -v completed` → use `state_deferred_action_pending`
32
+ - `cat docs/iteration-bets/<slug>.md | yq frontmatter` → use `state_iteration_bet_get`
33
+
34
+ In general: any pattern that reaches into a state file (JSON or
35
+ markdown frontmatter) is the violation. Read the contract at
36
+ `standards/state-spine-contract.md` for the bassclef accessor surface.
37
+
38
+ ## What this rule allows
39
+
40
+ - **Reading the accessor library itself** — `source lib/state.sh` and
41
+ call its functions. That's the entire point.
42
+ - **Reading non-state markdown content** — body sections of Shape B
43
+ entities (the narrative parts, not the YAML frontmatter) can be
44
+ read directly. Example: `awk '/## Procedure/,/^## /' docs/iteration-bets/<slug>.md`
45
+ to extract the Procedure section is fine; that's narrative content,
46
+ not state.
47
+ - **Reading non-spine files** — `cat .claude/skills/<skill>/SKILL.md`,
48
+ `cat README.md`, etc. State spine entities are enumerated in
49
+ `standards/state-spine.md`; other files aren't governed.
50
+ - **Direct JSON writes during one-shot migrations** (e.g., WU-4
51
+ migration script). Migration scripts are explicitly out-of-band —
52
+ they bootstrap state into the spine from prior shapes.
53
+
54
+ ## What about new accessors that don't exist yet?
55
+
56
+ If a consumer needs an accessor not yet in `lib/state.sh`:
57
+
58
+ 1. **Check if a generic verb suffices** — `state_<entity>_get`,
59
+ `state_<entity>_list`, `state_<entity>_count` cover most reads.
60
+ 2. **If a special-purpose accessor is needed**, propose it to the
61
+ contract first (`standards/state-spine-contract.md` §"Special-purpose
62
+ accessors"), then implement in `lib/state.sh`, then consume.
63
+ 3. **Do NOT bypass with direct file access** "just for now." That's
64
+ the path that produced bassclef#296.
65
+
66
+ The cost of adding a new accessor is small (~5-10 lines + tests). The
67
+ cost of accumulating ad-hoc bypass patterns is large and compounds
68
+ (every consumer needs a fix when the storage backend changes).
69
+
70
+ ## Enforcement
71
+
72
+ ### Methodology level
73
+
74
+ This rule loads into every session via `additionalDirectories`. Agents
75
+ self-check against it before reading or writing state. Code review
76
+ flags any direct state-file access in PRs.
77
+
78
+ ### Mechanical level (paired with WU-3)
79
+
80
+ The `state-validate.sh` PreToolUse hook (WU-3) detects direct writes
81
+ to state files and BLOCKs unless the change is going through an
82
+ accessor. Read-side enforcement is harder to mechanize but the
83
+ write-side gate covers the most damaging case.
84
+
85
+ ### Future mechanical level (post-v0)
86
+
87
+ A pre-commit hook could grep for forbidden patterns (`cat docs/whereami.json`,
88
+ `jq.*docs/whereami.json`, etc.) in staged changes and BLOCK unless an
89
+ override comment is present. Defer to v1 once empirical violation rate
90
+ is observable.
91
+
92
+ ## Override
93
+
94
+ `SKIP_ACCESSOR_DISCIPLINE=1 <command>` — logged to trace per existing
95
+ bassclef hook idiom. Use only for genuinely-not-yet-covered cases
96
+ where adding the accessor is in flight; not as a habitual workaround.
97
+
98
+ ## Relationship to other rules + standards
99
+
100
+ - `standards/state-spine.md` — entity catalog + storage shapes
101
+ - `standards/state-spine-contract.md` — the accessor surface this rule
102
+ enforces consumption through
103
+ - `lib/state.sh` — the implementation
104
+ - `.claude/rules/state-schema-validation.md` (paired with WU-3) —
105
+ write-time validation; the accessor's `add`/`set`/`update_status`
106
+ methods invoke this validator before writing
107
+ - canvas v4 §"Adapter discipline" — the source of this discipline; one
108
+ of 7 exit criteria for cxdb portability
109
+ - bassclef#296 — the compliance-counter floor-lift incident that
110
+ motivates pure-derivation discipline (this rule + replay-determinism)
@@ -0,0 +1,96 @@
1
+ ---
2
+ tier: lite
3
+ description: "Every load-bearing architectural decision MUST be recorded as an ADR (Architecture Decision Record) per Michael Nygard's lifecycle: proposed → accepted → deprecated → superseded."
4
+ ---
5
+
6
+ # ADR Discipline
7
+
8
+ Every load-bearing architectural decision MUST be recorded as an ADR (Architecture Decision Record) per Michael Nygard's lifecycle: `proposed` → `accepted` → `deprecated` → `superseded`.
9
+
10
+ ADR discipline lives at the rule layer (this file) plus the mechanical layer (`.claude/hooks/adr-discipline-check.sh` — PreToolUse hook on architectural-decision paths). Both load-bearing for adopter architecture quality.
11
+
12
+ ## When this rule fires
13
+
14
+ Any session writing or editing a file matching architectural-decision shape:
15
+
16
+ - `prisma/schema.prisma` or per-ORM schema equivalent (schema-change)
17
+ - `docker-compose*.yml` or `docker-compose*.yaml` (deployment-topology-change)
18
+ - `src/middleware.ts` or per-stack middleware equivalent (middleware-change)
19
+ - `*/alembic/versions/*.py` / `*/db/migrate/*.rb` / `*/migrations/*.go` (schema-migration)
20
+ - `package.json` / `pyproject.toml` / `Gemfile` / `go.mod` / `Cargo.toml` on Write only (dependency-manifest-change)
21
+
22
+ When match fires, the hook checks for an ADR marker at `state/markers/adr/<decision-slug>-*.md`. The marker is required — generic ADRs in `docs/adrs/` or `architecture/decisions/` are not sufficient because they may be unrelated to the current decision class. When the marker is absent, the hook BLOCKs with template + writeup prompt.
23
+
24
+ ## Load-bearing definition
25
+
26
+ A decision is load-bearing when:
27
+
28
+ - It establishes an invariant future decisions must respect
29
+ - Reversing it would require substantial migration work (>1 day operator time)
30
+ - Multiple parts of the codebase depend on it
31
+ - It crosses a bounded context boundary (per Evans DDD)
32
+ - It changes a cross-cutting concern (auth, logging, multi-tenancy, observability stack)
33
+
34
+ Non-load-bearing (skip ADR):
35
+
36
+ - Bug fixes within existing patterns
37
+ - Component-level library choices (icon library, date-picker)
38
+ - Cosmetic refactors (renames, file reorganizations without behavior change)
39
+ - Test additions
40
+ - Documentation edits
41
+
42
+ When in doubt, write the ADR. Ten-minute cost; high-value record.
43
+
44
+ ## ADR format
45
+
46
+ Use `standards/adr-template.md`. Required sections:
47
+
48
+ - Frontmatter: id, title, status, date, supersedes, superseded_by
49
+ - Context — what motivated the decision
50
+ - Decision — the choice + rationale
51
+ - Status — proposed / accepted / deprecated / superseded
52
+ - Consequences — what becomes easier / harder / enables / blocks
53
+ - References — related ADRs, external sources, source incidents
54
+
55
+ ## Marker convention
56
+
57
+ After writing the ADR, touch the marker:
58
+
59
+ ```bash
60
+ mkdir -p state/markers/adr
61
+ touch state/markers/adr/<decision-slug>-ADR-NNN.md
62
+ ```
63
+
64
+ The marker is the audit trail: the hook reads it; reviewers can grep for it; chronicle Gate Evidence sections can cite it.
65
+
66
+ ## Override path
67
+
68
+ `SKIP_ADR_CHECK=1 <command>` — logged via trace-helper. Use rarely:
69
+
70
+ - Trivial revert of a previously-decided architectural change (the revert is reversing the prior decision per its `superseded_by` field)
71
+ - Emergency rescue when the hook itself misclassifies (file substrate-defect)
72
+ - One-shot migration script that touches many architectural files (operator has reviewed externally)
73
+ - Bulk dependency-manifest regen where every dep was already declared in a prior ADR
74
+
75
+ INSTEAD of overriding for routine work: write the ADR. The ten-minute cost is one of the cheapest substrate disciplines to follow.
76
+
77
+ ## Tech-stack-aware composition
78
+
79
+ ADR discipline is stack-agnostic. The same template applies across stacks. Per-stack ADR examples may ship as siblings under `standards/adr-examples/<stack>.md` over time, with the discipline itself staying the same across stacks.
80
+
81
+ ## What the rule does NOT cover
82
+
83
+ - ADR review process (operator + Architect agent collaboration)
84
+ - ADR retirement (status change to `deprecated` or `superseded`; the file stays in place)
85
+ - Cross-project ADR sharing (bassclef's ADRs and adopter's ADRs stay in separate directories)
86
+ - ADR templates for non-software architecture (deployment-process ADRs, team-structure ADRs — out of scope for this rule)
87
+
88
+ INSTEAD: each of the above lives in a sibling rule or template if it becomes relevant.
89
+
90
+ ## Composition with other rules
91
+
92
+ - `.claude/rules/testing-tier-config.md` — Tier 0 strict-TDD on hook + tests (this hook + its test file land Tier 0)
93
+ - `.claude/rules/blocked-items.md` — BLOCK protocol the hook fires
94
+ - `.claude/rules/oo-ad-entry-point.md` — `/decompose` evidence is sister discipline at Construction boundary
95
+ - `.claude/rules/schema-management.md` — schema-change ADR aligns with migration-discipline
96
+ - `standards/adr-template.md` — the template the rule references