@thebassclef/lite 0.1.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/dist/cli.cjs +216 -137
  2. package/dist/cli.js +218 -139
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/lite/.bassclef-source.json +10 -0
  7. package/dist/lite/.claude/settings.json +212 -0
  8. package/dist/lite/CLAUDE.md +41 -0
  9. package/dist/lite/gitignore +58 -0
  10. package/dist/lite/standards/bassclef-wiring-manifest.json +497 -0
  11. package/dist/lite/whereami.md +24 -0
  12. package/package.json +8 -2
  13. package/substrate/.bassclef/lite-manifest.json +0 -2701
  14. package/substrate/.claude/agents/architect.md +0 -70
  15. package/substrate/.claude/agents/builder.md +0 -114
  16. package/substrate/.claude/agents/designer.md +0 -156
  17. package/substrate/.claude/agents/reviewer.md +0 -88
  18. package/substrate/.claude/hooks/artifact-ingestion-gate.sh +0 -357
  19. package/substrate/.claude/hooks/assert-verify-steering.sh +0 -77
  20. package/substrate/.claude/hooks/bassclef-source-config-validate.sh +0 -215
  21. package/substrate/.claude/hooks/bassclef-sync.sh +0 -634
  22. package/substrate/.claude/hooks/compound-noun-scrub.sh +0 -292
  23. package/substrate/.claude/hooks/kiss-expansion-inject.sh +0 -69
  24. package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +0 -492
  25. package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +0 -492
  26. package/substrate/.claude/hooks/plain-english-steering.sh +0 -156
  27. package/substrate/.claude/hooks/post-skill-friction-check.sh +0 -177
  28. package/substrate/.claude/hooks/post-skill-telemetry.sh +0 -62
  29. package/substrate/.claude/hooks/pre-build-gate.sh +0 -511
  30. package/substrate/.claude/hooks/pre-commit-gate.sh +0 -451
  31. package/substrate/.claude/hooks/session-end.sh +0 -433
  32. package/substrate/.claude/hooks/session-reflection.sh +0 -303
  33. package/substrate/.claude/hooks/skill-body-grade-gate.sh +0 -219
  34. package/substrate/.claude/hooks/skill-body-intent-drift.sh +0 -107
  35. package/substrate/.claude/hooks/skill-step-list-check.sh +0 -171
  36. package/substrate/.claude/hooks/state-validate.sh +0 -271
  37. package/substrate/.claude/hooks/substrate-clarity-gate.sh +0 -1110
  38. package/substrate/.claude/hooks/temperance-gate.sh +0 -147
  39. package/substrate/.claude/hooks/testing-tier-enforce.sh +0 -233
  40. package/substrate/.claude/hooks/turn-prose-grade-measure.sh +0 -219
  41. package/substrate/.claude/hooks/turn-prose-kiss-check.sh +0 -463
  42. package/substrate/.claude/hooks/vocabulary-migration-check.sh +0 -171
  43. package/substrate/.claude/hooks/whereami-utc-gate.sh +0 -142
  44. package/substrate/.claude/luminaries/alan-cooper.md +0 -170
  45. package/substrate/.claude/luminaries/alistair-cockburn.md +0 -140
  46. package/substrate/.claude/luminaries/amazon-pr-faq.md +0 -34
  47. package/substrate/.claude/luminaries/ash-maurya.md +0 -121
  48. package/substrate/.claude/luminaries/bill-buxton.md +0 -210
  49. package/substrate/.claude/luminaries/charles-sanders-peirce.md +0 -150
  50. package/substrate/.claude/luminaries/david-ogilvy.md +0 -192
  51. package/substrate/.claude/luminaries/don-norman.md +0 -173
  52. package/substrate/.claude/luminaries/edward-tufte.md +0 -179
  53. package/substrate/.claude/luminaries/eric-evans.md +0 -160
  54. package/substrate/.claude/luminaries/frederick-brooks.md +0 -50
  55. package/substrate/.claude/luminaries/gang-of-four.md +0 -157
  56. package/substrate/.claude/luminaries/glenford-myers.md +0 -230
  57. package/substrate/.claude/luminaries/hunt-thomas.md +0 -115
  58. package/substrate/.claude/luminaries/hyrum-wright.md +0 -94
  59. package/substrate/.claude/luminaries/jason-fried-dhh.md +0 -46
  60. package/substrate/.claude/luminaries/jesse-james-garrett.md +0 -154
  61. package/substrate/.claude/luminaries/john-ousterhout.md +0 -94
  62. package/substrate/.claude/luminaries/karl-popper.md +0 -132
  63. package/substrate/.claude/luminaries/kent-beck.md +0 -168
  64. package/substrate/.claude/luminaries/linus-torvalds.md +0 -218
  65. package/substrate/.claude/luminaries/martin-fowler.md +0 -164
  66. package/substrate/.claude/luminaries/michael-feathers.md +0 -125
  67. package/substrate/.claude/luminaries/michael-nygard.md +0 -118
  68. package/substrate/.claude/luminaries/robert-c-martin.md +0 -164
  69. package/substrate/.claude/luminaries/saltzer-schroeder.md +0 -194
  70. package/substrate/.claude/luminaries/sophia-prater.md +0 -193
  71. package/substrate/.claude/luminaries/stephen-toulmin.md +0 -131
  72. package/substrate/.claude/luminaries/tony-hoare.md +0 -170
  73. package/substrate/.claude/luminaries/vaughn-vernon.md +0 -50
  74. package/substrate/.claude/luminaries/w-edwards-deming.md +0 -158
  75. package/substrate/.claude/rules/accessor-library-discipline.md +0 -138
  76. package/substrate/.claude/rules/adr-discipline.md +0 -120
  77. package/substrate/.claude/rules/api-conventions.md +0 -125
  78. package/substrate/.claude/rules/artifact-ingestion.md +0 -179
  79. package/substrate/.claude/rules/assert-only-after-verify.md +0 -137
  80. package/substrate/.claude/rules/blocked-items.md +0 -146
  81. package/substrate/.claude/rules/bootstrap-pair-discipline.md +0 -141
  82. package/substrate/.claude/rules/branching.md +0 -28
  83. package/substrate/.claude/rules/cold-adopter-harness-discipline.md +0 -129
  84. package/substrate/.claude/rules/commit-conventions.md +0 -22
  85. package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +0 -188
  86. package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +0 -188
  87. package/substrate/.claude/rules/context-engineering.md +0 -202
  88. package/substrate/.claude/rules/context-management.md +0 -85
  89. package/substrate/.claude/rules/defensive-bash.md +0 -68
  90. package/substrate/.claude/rules/deferred-actions.md +0 -233
  91. package/substrate/.claude/rules/destructive-operations.md +0 -69
  92. package/substrate/.claude/rules/diagnosis.md +0 -38
  93. package/substrate/.claude/rules/github-issue-flash-tweet.md +0 -156
  94. package/substrate/.claude/rules/guardrails.md +0 -73
  95. package/substrate/.claude/rules/hook-wire-on-author.md +0 -103
  96. package/substrate/.claude/rules/identifier-leak-prevention.md +0 -104
  97. package/substrate/.claude/rules/iteration-bet-brief-completeness.md +0 -54
  98. package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +0 -98
  99. package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +0 -89
  100. package/substrate/.claude/rules/loop-discipline.md +0 -81
  101. package/substrate/.claude/rules/manual-prod-approval.md +0 -100
  102. package/substrate/.claude/rules/marker-enrichment-discipline.md +0 -99
  103. package/substrate/.claude/rules/mobile-ephemeral-session.md +0 -109
  104. package/substrate/.claude/rules/new-dependency-check.md +0 -51
  105. package/substrate/.claude/rules/oo-ad-entry-point.md +0 -117
  106. package/substrate/.claude/rules/operator-facing-prose.md +0 -196
  107. package/substrate/.claude/rules/option-label-discipline.md +0 -108
  108. package/substrate/.claude/rules/pattern-annotation.md +0 -100
  109. package/substrate/.claude/rules/plain-english-discipline.md +0 -156
  110. package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +0 -211
  111. package/substrate/.claude/rules/pr-body-shape.md +0 -317
  112. package/substrate/.claude/rules/pr-strategy.md +0 -167
  113. package/substrate/.claude/rules/pr-title-shape.md +0 -161
  114. package/substrate/.claude/rules/prototype-workflow.md +0 -65
  115. package/substrate/.claude/rules/reserved-skill-names.md +0 -123
  116. package/substrate/.claude/rules/schema-management.md +0 -49
  117. package/substrate/.claude/rules/sdlc-gates.md +0 -149
  118. package/substrate/.claude/rules/security.md +0 -37
  119. package/substrate/.claude/rules/session-artifacts.md +0 -236
  120. package/substrate/.claude/rules/skill-composition-declarations.md +0 -124
  121. package/substrate/.claude/rules/skill-description-clarity.md +0 -247
  122. package/substrate/.claude/rules/skill-procedure-step-list.md +0 -137
  123. package/substrate/.claude/rules/state-schema-validation.md +0 -162
  124. package/substrate/.claude/rules/stuck-signal-diagnostic.md +0 -140
  125. package/substrate/.claude/rules/substrate-config-schema.md +0 -98
  126. package/substrate/.claude/rules/test-list-discipline.md +0 -175
  127. package/substrate/.claude/rules/test-sufficiency.md +0 -210
  128. package/substrate/.claude/rules/testing-tier-config.md +0 -145
  129. package/substrate/.claude/rules/testing.md +0 -38
  130. package/substrate/.claude/rules/turn-estimate-grounding.md +0 -134
  131. package/substrate/.claude/rules/visual-hierarchy.md +0 -437
  132. package/substrate/.claude/rules/we-dont-break-adopters.md +0 -126
  133. package/substrate/.claude/rules/whereami-load-bearing.md +0 -202
  134. package/substrate/.claude/rules/writing-craft-discipline.md +0 -92
  135. package/substrate/.claude/rules/wu-sequencing-compounds.md +0 -145
  136. package/substrate/.claude/skills/build/SKILL.md +0 -640
  137. package/substrate/.claude/skills/chronicle/SKILL.md +0 -55
  138. package/substrate/.claude/skills/clean-artifacts/SKILL.md +0 -249
  139. package/substrate/.claude/skills/decompose/SKILL.md +0 -280
  140. package/substrate/.claude/skills/diagnose/SKILL.md +0 -297
  141. package/substrate/.claude/skills/feynman/SKILL.md +0 -90
  142. package/substrate/.claude/skills/howdoi/SKILL.md +0 -105
  143. package/substrate/.claude/skills/ia-model/SKILL.md +0 -108
  144. package/substrate/.claude/skills/interaction-design/SKILL.md +0 -112
  145. package/substrate/.claude/skills/interpret-input/SKILL.md +0 -180
  146. package/substrate/.claude/skills/journal/SKILL.md +0 -209
  147. package/substrate/.claude/skills/kiss/SKILL.md +0 -449
  148. package/substrate/.claude/skills/launch/SKILL.md +0 -915
  149. package/substrate/.claude/skills/lean-canvas/SKILL.md +0 -332
  150. package/substrate/.claude/skills/longrun/SKILL.md +0 -463
  151. package/substrate/.claude/skills/luminary/SKILL.md +0 -481
  152. package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +0 -177
  153. package/substrate/.claude/skills/onboard-repo/SKILL.md +0 -1624
  154. package/substrate/.claude/skills/pattern-review/SKILL.md +0 -99
  155. package/substrate/.claude/skills/personas/SKILL.md +0 -207
  156. package/substrate/.claude/skills/promote/SKILL.md +0 -283
  157. package/substrate/.claude/skills/requirement/SKILL.md +0 -98
  158. package/substrate/.claude/skills/retro/SKILL.md +0 -117
  159. package/substrate/.claude/skills/riff/SKILL.md +0 -114
  160. package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +0 -163
  161. package/substrate/.claude/skills/session-end/SKILL.md +0 -309
  162. package/substrate/.claude/skills/session-log/SKILL.md +0 -299
  163. package/substrate/.claude/skills/skills/SKILL.md +0 -228
  164. package/substrate/.claude/skills/spec/SKILL.md +0 -105
  165. package/substrate/.claude/skills/sprint/SKILL.md +0 -392
  166. package/substrate/.claude/skills/stage/SKILL.md +0 -384
  167. package/substrate/.claude/skills/state-a-problem/SKILL.md +0 -185
  168. package/substrate/.claude/skills/temperance/SKILL.md +0 -108
  169. package/substrate/.claude/skills/use-case/SKILL.md +0 -417
  170. package/substrate/.claude/skills/user-stories/SKILL.md +0 -268
  171. package/substrate/.claude/skills/value-prop/SKILL.md +0 -251
  172. package/substrate/.claude/skills/verify/SKILL.md +0 -160
  173. package/substrate/.claude/skills/visual-review/SKILL.md +0 -503
  174. package/substrate/.claude/skills/whats-the-plan/SKILL.md +0 -202
  175. package/substrate/.claude/skills/whereami/SKILL.md +0 -307
  176. package/substrate/AGENTS.md +0 -79
  177. package/substrate/CLAUDE-lite.md +0 -85
  178. package/substrate/CODE_OF_CONDUCT.md +0 -28
  179. package/substrate/CONTRIBUTING.md +0 -177
  180. package/substrate/README.md +0 -173
  181. package/substrate/SECURITY.md +0 -19
  182. package/substrate/architecture/decisions/ADR-029-release-pipeline.md +0 -79
  183. package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +0 -139
  184. package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +0 -192
  185. package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +0 -145
  186. package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +0 -155
  187. package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +0 -162
  188. package/substrate/lib/clean-artifacts-sweep.sh +0 -112
  189. package/substrate/lib/code-comment-discipline.sh +0 -144
  190. package/substrate/lib/composer-preflight.sh +0 -459
  191. package/substrate/lib/hook-inject.sh +0 -255
  192. package/substrate/lib/luminary-pick.sh +0 -96
  193. package/substrate/lib/output-discipline.sh +0 -143
  194. package/substrate/lib/prose-scan-boundary.sh +0 -171
  195. package/substrate/lib/rewrite-check.sh +0 -214
  196. package/substrate/lib/state.sh +0 -1372
  197. package/substrate/lib/telemetry.sh +0 -205
  198. package/substrate/lib/tier-check.sh +0 -187
  199. package/substrate/lib/tier-dependency-audit.sh +0 -1088
  200. package/substrate/presence/install/bassclef-hook-connect.sh +0 -178
  201. package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +0 -841
  202. package/substrate/presence/install/bassclef-sync.template.sh +0 -2076
  203. package/substrate/presence/install/schedule-auto-save.cron.sh +0 -88
  204. package/substrate/presence/install/schedule-auto-save.taskscheduler.md +0 -122
  205. package/substrate/scripts/aggregate-telemetry.sh +0 -217
  206. package/substrate/scripts/analyze-tier-dependencies.sh +0 -239
  207. package/substrate/scripts/generate-lite-manifest.sh +0 -505
  208. package/substrate/scripts/generate-tier-manifest.sh +0 -28
  209. package/substrate/scripts/intent-drift-check.sh +0 -456
  210. package/substrate/scripts/lite-manifest-drift-check.sh +0 -146
  211. package/substrate/scripts/render-lite-manifest-doc.sh +0 -150
  212. package/substrate/standards/adr-template.md +0 -86
  213. package/substrate/standards/api-conventions/nextjs.md +0 -84
  214. package/substrate/standards/artifact-composition.md +0 -209
  215. package/substrate/standards/bash-hook-safety.md +0 -246
  216. package/substrate/standards/bassclef-configs-schema.md +0 -232
  217. package/substrate/standards/bassclef-evolution.md +0 -143
  218. package/substrate/standards/bassclef-internal-jargon.md +0 -244
  219. package/substrate/standards/bassclef-managed-sentinel.md +0 -96
  220. package/substrate/standards/bassclef-source-config.md +0 -228
  221. package/substrate/standards/branch-stacking.md +0 -408
  222. package/substrate/standards/code-safety-principles.md +0 -176
  223. package/substrate/standards/composer-prerequisites.md +0 -155
  224. package/substrate/standards/deferred-actions-schema.md +0 -204
  225. package/substrate/standards/dependency-discipline/cargo.md +0 -39
  226. package/substrate/standards/dependency-discipline/gem.md +0 -43
  227. package/substrate/standards/dependency-discipline/go-mod.md +0 -41
  228. package/substrate/standards/dependency-discipline/npm.md +0 -42
  229. package/substrate/standards/dependency-discipline/pip.md +0 -42
  230. package/substrate/standards/deployment-topology/ec2-tailscale.md +0 -225
  231. package/substrate/standards/deployment-topology.md +0 -69
  232. package/substrate/standards/docs-sync-allowlist.md +0 -76
  233. package/substrate/standards/domain-and-dns.md +0 -145
  234. package/substrate/standards/frontend-stack.md +0 -67
  235. package/substrate/standards/frontmatter-schema.md +0 -154
  236. package/substrate/standards/graceful-exit.md +0 -227
  237. package/substrate/standards/hook-idempotency.md +0 -102
  238. package/substrate/standards/hook-injection-discipline.md +0 -202
  239. package/substrate/standards/hook-install-class.md +0 -215
  240. package/substrate/standards/input-handler-interface.md +0 -152
  241. package/substrate/standards/lite-manifest-schema-changes.md +0 -135
  242. package/substrate/standards/luminary-matching.md +0 -105
  243. package/substrate/standards/luminary-problem-patterns.md +0 -481
  244. package/substrate/standards/migration-discipline/active-record.md +0 -50
  245. package/substrate/standards/migration-discipline/alembic.md +0 -43
  246. package/substrate/standards/migration-discipline/gorm.md +0 -50
  247. package/substrate/standards/migration-discipline/prisma.md +0 -53
  248. package/substrate/standards/migration-discipline/sqlalchemy.md +0 -51
  249. package/substrate/standards/mobile-ephemeral-session.md +0 -167
  250. package/substrate/standards/model-routing-discipline.md +0 -160
  251. package/substrate/standards/ogilvy-writing-rules.md +0 -225
  252. package/substrate/standards/opener-discipline.md +0 -96
  253. package/substrate/standards/operator-facing-prose-discipline.md +0 -201
  254. package/substrate/standards/persona-schema.md +0 -229
  255. package/substrate/standards/pluggable-luminaries.md +0 -323
  256. package/substrate/standards/pr-body-discipline.md +0 -115
  257. package/substrate/standards/preview-state-schema.md +0 -189
  258. package/substrate/standards/project-directory-layout.md +0 -276
  259. package/substrate/standards/release-tagging.md +0 -137
  260. package/substrate/standards/reserved-skill-names.md +0 -120
  261. package/substrate/standards/scannable-multi-option-output.md +0 -261
  262. package/substrate/standards/sdlc-compliance.md +0 -286
  263. package/substrate/standards/sdlc-gates/typescript.md +0 -57
  264. package/substrate/standards/secrets-lifecycle.md +0 -210
  265. package/substrate/standards/security-scanner-adapter.md +0 -145
  266. package/substrate/standards/session-board.md +0 -256
  267. package/substrate/standards/skill-output-discipline.md +0 -90
  268. package/substrate/standards/state-spine-contract.md +0 -255
  269. package/substrate/standards/state-spine.md +0 -511
  270. package/substrate/standards/steering-hints/kiss-words.md +0 -11
  271. package/substrate/standards/substrate-config-schema.md +0 -267
  272. package/substrate/standards/tech-stack-config.md +0 -109
  273. package/substrate/standards/tier-dependency-analysis.md +0 -167
  274. package/substrate/standards/tier-runtime-deps/lite.md +0 -57
  275. package/substrate/standards/tier-tag-schema.md +0 -155
  276. package/substrate/standards/two-layer-config.md +0 -99
  277. package/substrate/standards/use-case-format.md +0 -292
  278. package/substrate/standards/user-story-invest.md +0 -268
  279. package/substrate/standards/velocity-and-appetite.md +0 -229
  280. package/substrate/standards/voice-input-pattern.md +0 -119
  281. package/substrate/standards/whereami-schema.md +0 -301
  282. package/substrate/standards/worktree-management.md +0 -211
  283. package/substrate/standards/writing-guide.md +0 -213
  284. package/substrate/templates/chronicle-template.md +0 -75
  285. package/substrate/templates/deferred-action-template.md +0 -45
  286. package/substrate/templates/memory-proposal-template.md +0 -77
  287. package/substrate/templates/persona-template.md +0 -200
  288. package/substrate/templates/pr-faq.md +0 -45
  289. package/substrate/templates/secret-rotation-template.md +0 -162
  290. package/substrate/templates/spec-template.md +0 -131
  291. package/substrate/templates/use-case-template.md +0 -194
  292. package/substrate/templates/user-story-template.md +0 -107
  293. package/substrate/templates/whereami-template.md +0 -101
@@ -1,145 +0,0 @@
1
- ---
2
- tier: lite
3
- description: "Bassclef's testing discipline is configured per path-matcher in .claude/bassclef-configs.jsonc under the testing section."
4
- ---
5
-
6
- # Testing-Tier Config
7
-
8
- Bassclef's testing discipline is configured per path-matcher in `.claude/bassclef-configs.jsonc` under the `testing` section. Four tiers — 0 strict TDD / 1 test-with / 2 smoke / 3 manual-verify — pick by blast radius. Most-specific path-matcher wins. The mtime-checking hook (`testing-tier-enforce.sh`) enforces Tier 0 mechanically; Tier 1 WARNs; Tier 2 + Tier 3 stay silent.
9
-
10
- This rule supersedes the honor-system framing of `.claude/rules/testing.md`. That rule remains the test-content guidance (what makes a good test); this rule governs which paths require tests and what enforcement fires.
11
-
12
- ## Why this rule exists
13
-
14
- Bassclef shipped `.claude/rules/testing.md` with three layers — unit + integration + smoke — and a "skip glue code, trivial getters" exemption. That exemption ran on the honor system. No check fires when a new exported function ships without a test. No check fires when someone edits source without touching the test. No check fires when a hook update skips its test.
15
-
16
- The 2026-06-15 substrate-archaeology session named the pattern. TDD-everywhere runs too verbose for adopter surfaces like chronicles and one-off scripts. TDD-nowhere runs too lax for bassclef's own hooks and schemas, where a silent bug hits every adopter. The tier framework lets impact pick the enforcement level.
17
-
18
- The Tier 0 mtime hook does the actual work. INSTEAD of asking the agent to run tests from memory: the hook BLOCKs the commit when the test mtime did not advance with the source. A gate at the moment of failure beats a rule that fires after.
19
-
20
- ## The four tiers
21
-
22
- | Tier | Name | What it means | Enforcement |
23
- |---|---|---|---|
24
- | **0** | Strict TDD | Test mtime ≤ source mtime AND test file present | BLOCK at pre-commit |
25
- | **1** | Test-with | New test expected when new source ships | WARN at pre-commit |
26
- | **2** | Smoke | Smoke test exists somewhere for this surface | Silent (advisory only) |
27
- | **3** | Manual verify | Operator eyeballs the change | Silent (no enforcement) |
28
-
29
- **Tier 0** is for surfaces where silent bugs compound across every adopter. Bassclef hooks, state-spine schemas, lib/state.sh accessors, and the substrate's own pre-commit gates live here.
30
-
31
- **Tier 1** is for bassclef's own glue scripts (`scripts/*.sh`) and adopter-app source files where TDD is expected but the WARN gives leeway for in-progress work.
32
-
33
- **Tier 2** is for adopter-app routes and components where end-to-end smoke tests cover the surface without per-file unit tests. The path-matcher does not look for a sibling test file; the operator confirms a smoke test exists.
34
-
35
- **Tier 3** is the silent default for narrative content. Chronicles, journal entries, iteration-goal docs, decompositions, and operator-private narrative all live here. INSTEAD of testing narrative: the operator reads it.
36
-
37
- ## Path-matcher precedence
38
-
39
- Two categories of path matchers, with different ownership:
40
-
41
- 1. **Substrate-internal paths** — bassclef's own infrastructure. **Hard-coded in this rule body.** NOT adopter-configurable. Adopters read the discipline; they cannot edit it.
42
- 2. **Adopter-app paths** — adopter's own code paths. Configured in adopter's `bassclef-configs.jsonc` `testing.path_matchers`. Per-adopter.
43
-
44
- The hook walks both lists. Substrate paths take precedence; adopter overrides on substrate paths are silently ignored. When no entry matches, `testing.global_floor` applies. The default global floor is Tier 1 (WARN on missing test).
45
-
46
- ### Substrate-internal path-matchers (HARD-CODED — not adopter-configurable)
47
-
48
- | Path | Tier | Why this is Tier 0 / fixed |
49
- |---|---|---|
50
- | `.claude/hooks/*.sh` | 0 | Silent bugs compound across every adopter using bassclef |
51
- | `scripts/migrate-adopter-references.sh` | 0 | Adopter-facing migration tool; Tier 0 hooks call it at session-start (per ADR-031); a defect hits every adopter machine. (Moved from `strategy/templates/` per bassclef-upstream#317 Phase 1b.) |
52
- | `scripts/bassclef-orphan-parking.sh` | 0 | Adopter-facing migration tooling — same reason as above |
53
- | `scripts/bassclef-migrate-summary.sh` | 0 | Adopter-facing migration tooling — same reason as above |
54
- | `presence/install/*.sh` | 0 | Adopter-facing distribution dispatcher + sync + install bootstrap; a defect hits every adopter machine. (Moved from `strategy/templates/` per bassclef-upstream#317 Phase 1a.) |
55
- | `standards/state-spine/schemas/*.json` | 0 | Schema defects corrupt the state spine universally |
56
- | `lib/state.sh` | 0 | Accessor library central to all state reads; one defect breaks every consumer |
57
- | `lib/intent-matcher.sh` | 0 | Intent dispatch — a defect breaks every chain |
58
- | `scripts/*.sh` | 1 | Other operator-class scripts not listed above; WARN if missing test |
59
- | `chronicle/*.md` | 3 | Narrative content; operator-read, no test |
60
- | `docs/iteration-bets/*.md` | 3 | Narrative; operator-read |
61
- | `docs/decompositions/*.md` | 3 | Narrative; operator-read |
62
- | `docs/operator-private/journals/*.md` | 3 | Narrative; operator-read |
63
-
64
- These are bassclef's substrate. Per ADR-031 and Linus's rule that bassclef keeps adopters working — discipline is a contract, not a preference. INSTEAD of letting adopters lower their tier: bassclef holds the discipline for its own substrate. Adopters read this rule; they cannot lower it themselves.
65
-
66
- Why not adopter-configurable:
67
- - **Substrate integrity is a contract.** Adopters rely on bassclef's reliability guarantee; lowering bassclef's own tier would undermine the contract while still depending on it.
68
- - **Hyrum's Law applied to discipline.** Configurable tier means some adopter lowers it; their substrate degrades silently; bassclef's future fixes that assumed the discipline break their setup.
69
- - **Linus's kernel/userspace boundary.** Linux exposes kernel state as READ surfaces, not WRITE permission over kernel correctness machinery. bassclef's tier discipline is the same shape.
70
- - **Brooks's conceptual integrity.** Discipline is bassclef's coherent vision; configurability creates per-adopter drift.
71
-
72
- ### Adopter-app path-matchers (configurable per adopter)
73
-
74
- Adopters edit `testing.path_matchers` in their own `.claude/bassclef-configs.jsonc` for THEIR code:
75
-
76
- ```jsonc
77
- "testing": {
78
- "global_floor": 1,
79
- "path_matchers": [
80
- { "match": "src/middleware.ts", "tier": 0 },
81
- { "match": "src/lib/auth/**", "tier": 0 },
82
- { "match": "src/app/**/route.ts", "tier": 2 },
83
- { "match": "src/components/**/*.tsx", "tier": 2 }
84
- ]
85
- }
86
- ```
87
-
88
- The substrate entry wins when an adopter's `path_matchers` entry matches a substrate path (above). The hook ignores adopter attempts to lower substrate tiers — by design.
89
-
90
- ## Test-file sibling mapping (Tier 0 only)
91
-
92
- For Tier 0 paths, the hook expects a sibling test file:
93
-
94
- | Source path | Expected test path |
95
- |---|---|
96
- | `.claude/hooks/<name>.sh` | `.claude/hooks/tests/<name>.test.sh` |
97
- | `standards/state-spine/schemas/<name>.schema.json` | `standards/state-spine/schemas/tests/<name>.test.sh` |
98
- | `lib/<name>.sh` | `lib/tests/<name>.test.sh` |
99
-
100
- The hook BLOCKs when the source is edited and the test mtime did not advance. The BLOCK message names three things: the source path, the expected test path, and the mtime gap. INSTEAD of failing silently: the message tells the agent which test file to touch.
101
-
102
- ## Override discipline
103
-
104
- `SKIP_TESTING_TIER_ENFORCE=1 <command>` bypasses the hook for one command. The bypass is logged via `trace-helper.sh` per bassclef's existing override idiom.
105
-
106
- Use it sparingly. Three cases warrant the override. One-shot migration scripts that bootstrap state. Emergency rescues when the hook itself is broken. Documentation changes where the agent has clear evidence the source change carries no behavior.
107
-
108
- INSTEAD of overriding for routine work that fails the check: write the test. The hook fires at the cheapest moment to add one. Deferred test-writing almost never happens.
109
-
110
- ## Allowlist baseline (grace window)
111
-
112
- `.claude/hooks/testing-tier-enforce-allowlist.txt` lists existing Tier 0 sources that ship without tests as of the hook's land date. Each entry carries a dated grace window. The hook BLOCKs on listed paths in two cases. First — the grace window expires. Second — the source gets edited (new edits during grace still BLOCK). The allowlist covers pre-existing unedited state only.
113
-
114
- The grace window is set per-adopter at `/onboard-repo` (default 60 days). Operator decides whether to backfill tests for grandfathered hooks or to remove them from the allowlist as they are next touched.
115
-
116
- INSTEAD of forcing retroactive backfill at hook-land: the grace window covers existing untested bassclef hooks while new edits trigger enforcement. Per-hook backfill happens as those hooks are next touched.
117
-
118
- ## When this rule fires
119
-
120
- This rule is methodology — it loads in every session via `additionalDirectories`. Agents self-check before writing source files in Tier 0 paths. The `testing-tier-enforce.sh` hook is the mechanical layer (bassclef#1037 WU-3).
121
-
122
- Together: rule supplies the why; hook fires at the moment of failure.
123
-
124
- ## Composes with
125
-
126
- - **@luminary kent-beck** — TDD anchor. Beck's red-green-refactor cycle is the discipline this rule does for Tier 0. A test written before source naturally satisfies "test mtime ≤ source mtime" — the test came first.
127
- - **@luminary john-ousterhout** — Design-judgment anchor. The tier choice IS a design decision. Push every path to Tier 0 and you get shallow modules where tests just mirror source. Push every path to Tier 3 and you get silent regressions. The tier slider applies Ousterhout's "complexity is incremental" — pick the right tier per surface. Do not flatten the answer.
128
- - `.claude/rules/testing.md` — the existing rule on test content (what makes a good test). This rule does not replace it; it adds the per-path tier decision that testing.md left implicit.
129
- - `.claude/rules/state-schema-validation.md` — sister mechanical-enforcement rule at the state-spine write surface.
130
- - `.claude/rules/blocked-items.md` — the BLOCK protocol the hook fires.
131
- - `.claude/hooks/pre-commit-gate.sh` — the chain the new hook joins.
132
- - `.claude/hooks/testing-tier-enforce.sh` — the mechanical implementation (bassclef#1037 WU-3).
133
- - `.claude/bassclef-configs.jsonc` — the adopter-edit surface with inline comments.
134
-
135
- ## Refs
136
-
137
- - bassclef#1037 — this rule's filing ticket (testing-tier-config primitive)
138
- - bassclef#1036 — sister ticket; Ousterhout luminary stub
139
- - bassclef#867 — anchor-luminary verification pattern
140
- - `docs/iteration-bets/2026-06-15a-discipline-and-versioning-foundations.md` — Phase A bet
141
- - `docs/roadmaps/2026-06-15-engineering-discipline-and-versioning.md` — parent roadmap
142
-
143
- ## Retirement condition
144
-
145
- This rule retires only if the testing-tier framework itself is replaced by a different enforcement model (for example, vitest coverage gates per tier — Phase E). The discipline of per-path tier choice survives any future enforcement-mechanism swap.
@@ -1,38 +0,0 @@
1
- ---
2
- tier: lite
3
- globs: ["**/*.ts", "**/*.tsx", "**/*.test.*", "**/*.spec.*"]
4
- description: Three-layer test strategy — loads when touching source or test files
5
- ---
6
-
7
- > **Companion rule (bassclef#1037):** `.claude/rules/testing-tier-config.md` governs WHICH paths require which level of test enforcement (Tier 0 strict TDD / 1 test-with / 2 smoke / 3 manual verify). This rule (testing.md) governs WHAT makes a good test once a tier requires one. The tier-config rule supersedes the honor-system framing implicit in "skip glue code, trivial getters" below — tier choice is now configured per path-matcher in `.claude/bassclef-configs.jsonc`, and the `testing-tier-enforce.sh` hook fires mechanically.
8
-
9
- Three layers, all required. Skipping shifts cost to production debugging.
10
-
11
- Layer 1 — Unit (vitest):
12
- Pure function logic. New pure function = new test, no exceptions.
13
- Pre-commit WARNs if new source file has no matching test.
14
- CI BLOCKs on failure.
15
-
16
- Layer 2 — Integration:
17
- Pipeline wiring. Real DB + real Redis, mock only external APIs at HTTP level.
18
- CI BLOCKs on failure.
19
-
20
- Layer 3 — E2E/Smoke:
21
- Post-deploy. Curl-based minimum (health, API, auth redirect).
22
- Playwright for critical user paths when needed.
23
-
24
- Coverage policy:
25
- 100% branch for safety rules. ≥80% line for business logic.
26
- Skip glue code, trivial getters, third-party internals, LLM output content.
27
-
28
- Naming: `test_{what}_{scenario}_{expected_outcome}`
29
- Fixtures: factories not hardcoded data.
30
-
31
- Change matrix:
32
- Pure function → unit. Agent/worker → integration. API route → integration + smoke.
33
- Schema migration → integration. Middleware/auth → E2E. UI component → smoke.
34
-
35
- Order:
36
- For pure functions and non-trivial logic, write the test before or
37
- alongside the implementation — not after. If you wrote the test after,
38
- state so in the verify summary so the reviewer can audit for tautology.
@@ -1,134 +0,0 @@
1
- ---
2
- tier: lite
3
- description: "Plain check: Before I ship a turn estimate to an adopter, I cite a past bet's actuals + write a range + name the shape."
4
- ---
5
-
6
- # Turn-Estimate Grounding
7
-
8
- **Plain check:** Before I ship a turn estimate to an adopter, I cite a past bet's actuals + write a range + name the shape. Ungrounded numbers do not ship.
9
-
10
- ---
11
-
12
- Every turn estimate that lands in adopter-facing prose (goal docs, PR bodies, canvases, ticket bodies) carries three parts:
13
-
14
- 1. **Source** — cite a past bet's closeout actuals with comparable scope shape (WU count, test-heavy vs docs-heavy, defect diagnosis interludes)
15
- 2. **Range not point** — write a range (e.g., "40-80 turns") not a point ("60 turns")
16
- 3. **Plain-language framing** — name the shape driving the number in one sentence
17
-
18
- Ungrounded turn estimates do not ship to adopter-facing prose. This rule extends the argument shape from `.claude/rules/assert-only-after-verify.md` to numeric claims. It applies at the same reasoning surface — the moment a number gets written down for an adopter to read.
19
-
20
- ## When this rule fires
21
-
22
- Every time budget estimate, turn count, or effort range that lands in prose an adopter will read:
23
-
24
- - `docs/iteration-bets/*.md` frontmatter `appetite:` line
25
- - `docs/iteration-bets/*.md` body when narrative surfaces a number
26
- - PR body `Test plan` or `Summary` sections when they cite effort
27
- - `docs/canvases/*.md` sizing sections
28
- - Ticket body `Estimate` fields (INVEST format uses S/M/L; this rule fires when a turn count appears instead)
29
- - Chronicle time-budget actuals sections when they cite the filed number
30
- - Journal drafts when they cite bet actuals for a past bet
31
-
32
- Does NOT fire on:
33
-
34
- - **Chronicle body actuals** for a past bet (backward-looking; the number IS the source itself)
35
- - **Operator-only surfaces** — internal chronicles, private strategy docs, session-timing markers
36
- - **Runtime numbers** at checkpoint or closeout time — those cite what happened, not what will happen
37
-
38
- ## What the rule requires
39
-
40
- Before any turn estimate ships to adopter-facing prose:
41
-
42
- 1. **Cite a past bet by path** — one or two bets whose closeout actuals inform this estimate. Format: `bet 2026-07-09c (5 WUs; heavy test setup; ~110 turns actual)`. Path optional but preferred when the calibration goal is recent.
43
- 2. **Write a range** — the range spans enough to cover the estimate's uncertainty. A 40-80 turn range signals the shape is well-understood but has natural variance. A 200-600 turn range signals real uncertainty and prompts the operator to consider splitting the goal.
44
- 3. **Name the shape** — one sentence stating what drives the number. Examples: "documentation-heavy; single-file SKILL edit + rule text," "5 WUs riding a shared fixture; each cure ships end-to-end with 10-15 Tier 0 tests," "test-first Beck TDD with 4 substantive WUs sharing a fixture foundation."
45
-
46
- ## Worked examples
47
-
48
- ### Anti-pattern (what NOT to do)
49
-
50
- ```yaml
51
- appetite: 500-700 turns
52
- ```
53
-
54
- Ungrounded. Range too wide. No shape named. Adopter reads this and either dismisses the goal as heavyweight or trusts an ungrounded number.
55
-
56
- ### Anti-pattern (point estimate)
57
-
58
- ```yaml
59
- appetite: 250 turns
60
- ```
61
-
62
- Point not range. False precision. No source cited.
63
-
64
- ### Anti-pattern (source-free range)
65
-
66
- ```yaml
67
- appetite: 40-80 turns
68
- ```
69
-
70
- Range is fine but ungrounded. Adopter has no way to check if 40-80 is realistic.
71
-
72
- ### Conformant pattern
73
-
74
- ```yaml
75
- appetite: 40-80 turns
76
- appetite_source: "bet 2026-07-09d (documentation-heavy adopter polish; 2 substantive WUs; ~30 turns actual). Similar shape — single-file SKILL edit + rule text; no new test infrastructure."
77
- ```
78
-
79
- Or in narrative form:
80
-
81
- > **Appetite:** 40-80 turns. Similar shape to bet 09d (~30 turns actual for 2 WUs of single-file SKILL edits + rule text). This bet adds one more WU so the top of the range widens.
82
-
83
- Both forms carry source + range + shape.
84
-
85
- ## Trivial-fix exception
86
-
87
- Fix branches and quick-fix PRs may skip the discipline when the change is under 10 lines AND no goal doc time budget line is being authored. Silence about effort is fine on trivial fixes.
88
-
89
- ## Adopter-friendly framing
90
-
91
- Numbers can be honest AND friendly. Instead of:
92
-
93
- > "This goal needs 500-700 turns"
94
-
95
- Prefer:
96
-
97
- > "This bet groups 5 substantive changes. Past bets of this shape landed around 100-350 turns. The wider top of the range covers defect diagnosis interludes that add 30-50 turns per step when they fire."
98
-
99
- The friendly version:
100
- - Cites a past shape ("bets of this shape landed around 100-350")
101
- - Names the shape driver ("5 substantive changes")
102
- - Explains the top-of-range variance ("defect diagnosis interludes")
103
-
104
- ## Composes with
105
-
106
- - `.claude/rules/assert-only-after-verify.md` — parent discipline; this rule extends argument shape to numeric claims
107
- - `.claude/rules/plain-english-discipline.md` — grade 8 target with grade 10 ceiling; friendly numbers pass the same reading-level test as prose
108
- - `.claude/rules/pr-body-shape.md` — Test plan and Summary sections that cite effort follow this rule
109
- - `.claude/rules/pr-title-shape.md` — sister at title surface
110
- - `.claude/skills/longrun/SKILL.md` Step 1 pre-flight — cites this rule at time budget estimation
111
- - @luminary stephen-toulmin — argument shape (claim + evidence + why the evidence supports the claim)
112
- - @luminary karl-popper — falsifiability (grounded estimates check against past actuals; ungrounded ones cannot be checked)
113
- - Memory `feedback_no_token_estimates.md` — sister at token-estimate surface
114
- - Memory `feedback_tight_ticket_appetite.md` — calibration for infra tickets
115
- - Memory `feedback_longrun_appetite_estimates_too_tight.md` — calibration for WU-heavy bets (3-4x off pattern)
116
-
117
- ## Override
118
-
119
- `SKIP_TURN_ESTIMATE_GROUNDING=1` — logged via trace-helper. Use only when quoting an external number verbatim (e.g., citing a Shape Up appetite from Basecamp's book).
120
-
121
- INSTEAD of overriding for routine work: cite the past bet. The cost is one sentence; the discipline compounds across every future adopter who reads a goal doc.
122
-
123
- ## Refs
124
-
125
- - sunj-labs/bassclef-upstream#670 — this rule's filing ticket
126
- - sunj-labs/bassclef-upstream#559 — R8 mechanization umbrella (parent argument-shape work)
127
- - sunj-labs/bassclef-upstream#582 — assert-verify-steering hook (sister at prose-scan surface)
128
- - Bet 2026-07-09e — this rule's ship vehicle (eats own dogfood on the time budget line)
129
- - Toulmin — *The Uses of Argument* (Cambridge, 1958)
130
- - Popper — *The Logic of Scientific Discovery* (Hutchinson, 1959)
131
-
132
- ## Retirement condition
133
-
134
- This rule retires only if goal docs stop surfacing turn estimates in adopter-facing prose. A mechanical layer (Stop hook that scans goal doc frontmatter for ungrounded time budget lines) may ship as a follow-on when methodology drift is observed. Until then, this rule is methodology; the discipline holds at reasoning origin per ADR-035 substrate-as-system tenet.