@thebassclef/lite 0.0.1 → 0.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 (182) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +85 -4
  3. package/dist/cli.cjs +1610 -0
  4. package/dist/cli.js +1587 -0
  5. package/dist/index.cjs +4 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +4 -0
  8. package/package.json +51 -3
  9. package/substrate/.bassclef/lite-manifest.json +1794 -0
  10. package/substrate/.claude/agents/architect.md +70 -0
  11. package/substrate/.claude/agents/builder.md +114 -0
  12. package/substrate/.claude/agents/designer.md +156 -0
  13. package/substrate/.claude/agents/reviewer.md +88 -0
  14. package/substrate/.claude/hooks/artifact-ingestion-gate.sh +357 -0
  15. package/substrate/.claude/hooks/assert-verify-steering.sh +77 -0
  16. package/substrate/.claude/hooks/bassclef-source-config-validate.sh +215 -0
  17. package/substrate/.claude/hooks/bassclef-sync.sh +634 -0
  18. package/substrate/.claude/hooks/compound-noun-scrub.sh +292 -0
  19. package/substrate/.claude/hooks/kiss-expansion-inject.sh +69 -0
  20. package/substrate/.claude/hooks/plain-english-steering.sh +156 -0
  21. package/substrate/.claude/hooks/post-skill-friction-check.sh +177 -0
  22. package/substrate/.claude/hooks/post-skill-telemetry.sh +62 -0
  23. package/substrate/.claude/hooks/pre-build-gate.sh +511 -0
  24. package/substrate/.claude/hooks/pre-commit-gate.sh +452 -0
  25. package/substrate/.claude/hooks/session-end.sh +433 -0
  26. package/substrate/.claude/hooks/session-reflection.sh +303 -0
  27. package/substrate/.claude/hooks/skill-body-grade-gate.sh +219 -0
  28. package/substrate/.claude/hooks/skill-body-intent-drift.sh +107 -0
  29. package/substrate/.claude/hooks/skill-step-list-check.sh +171 -0
  30. package/substrate/.claude/hooks/state-validate.sh +271 -0
  31. package/substrate/.claude/hooks/substrate-clarity-gate.sh +1110 -0
  32. package/substrate/.claude/hooks/temperance-gate.sh +147 -0
  33. package/substrate/.claude/hooks/testing-tier-enforce.sh +233 -0
  34. package/substrate/.claude/hooks/turn-prose-grade-measure.sh +219 -0
  35. package/substrate/.claude/hooks/turn-prose-kiss-check.sh +434 -0
  36. package/substrate/.claude/hooks/vocabulary-migration-check.sh +171 -0
  37. package/substrate/.claude/hooks/whereami-utc-gate.sh +142 -0
  38. package/substrate/.claude/luminaries/alan-cooper.md +170 -0
  39. package/substrate/.claude/luminaries/alistair-cockburn.md +140 -0
  40. package/substrate/.claude/luminaries/amazon-pr-faq.md +34 -0
  41. package/substrate/.claude/luminaries/ash-maurya.md +121 -0
  42. package/substrate/.claude/luminaries/bill-buxton.md +210 -0
  43. package/substrate/.claude/luminaries/charles-sanders-peirce.md +150 -0
  44. package/substrate/.claude/luminaries/david-ogilvy.md +192 -0
  45. package/substrate/.claude/luminaries/don-norman.md +173 -0
  46. package/substrate/.claude/luminaries/edward-tufte.md +179 -0
  47. package/substrate/.claude/luminaries/eric-evans.md +160 -0
  48. package/substrate/.claude/luminaries/frederick-brooks.md +50 -0
  49. package/substrate/.claude/luminaries/gang-of-four.md +157 -0
  50. package/substrate/.claude/luminaries/jason-fried-dhh.md +46 -0
  51. package/substrate/.claude/luminaries/jesse-james-garrett.md +154 -0
  52. package/substrate/.claude/luminaries/john-ousterhout.md +94 -0
  53. package/substrate/.claude/luminaries/karl-popper.md +132 -0
  54. package/substrate/.claude/luminaries/kent-beck.md +168 -0
  55. package/substrate/.claude/luminaries/linus-torvalds.md +218 -0
  56. package/substrate/.claude/luminaries/martin-fowler.md +164 -0
  57. package/substrate/.claude/luminaries/michael-feathers.md +125 -0
  58. package/substrate/.claude/luminaries/michael-nygard.md +118 -0
  59. package/substrate/.claude/luminaries/robert-c-martin.md +164 -0
  60. package/substrate/.claude/luminaries/saltzer-schroeder.md +194 -0
  61. package/substrate/.claude/luminaries/sophia-prater.md +193 -0
  62. package/substrate/.claude/luminaries/stephen-toulmin.md +131 -0
  63. package/substrate/.claude/rules/artifact-ingestion.md +179 -0
  64. package/substrate/.claude/rules/assert-only-after-verify.md +137 -0
  65. package/substrate/.claude/rules/blocked-items.md +146 -0
  66. package/substrate/.claude/rules/branching.md +28 -0
  67. package/substrate/.claude/rules/commit-conventions.md +22 -0
  68. package/substrate/.claude/rules/context-engineering.md +202 -0
  69. package/substrate/.claude/rules/context-management.md +85 -0
  70. package/substrate/.claude/rules/destructive-operations.md +69 -0
  71. package/substrate/.claude/rules/diagnosis.md +38 -0
  72. package/substrate/.claude/rules/guardrails.md +73 -0
  73. package/substrate/.claude/rules/identifier-leak-prevention.md +104 -0
  74. package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +98 -0
  75. package/substrate/.claude/rules/oo-ad-entry-point.md +117 -0
  76. package/substrate/.claude/rules/operator-facing-prose.md +196 -0
  77. package/substrate/.claude/rules/plain-english-discipline.md +154 -0
  78. package/substrate/.claude/rules/pr-body-shape.md +317 -0
  79. package/substrate/.claude/rules/pr-strategy.md +167 -0
  80. package/substrate/.claude/rules/sdlc-gates.md +149 -0
  81. package/substrate/.claude/rules/session-artifacts.md +236 -0
  82. package/substrate/.claude/rules/state-schema-validation.md +162 -0
  83. package/substrate/.claude/rules/whereami-load-bearing.md +202 -0
  84. package/substrate/.claude/rules/writing-craft-discipline.md +92 -0
  85. package/substrate/.claude/skills/build/SKILL.md +640 -0
  86. package/substrate/.claude/skills/decompose/SKILL.md +280 -0
  87. package/substrate/.claude/skills/diagnose/SKILL.md +297 -0
  88. package/substrate/.claude/skills/howdoi/SKILL.md +105 -0
  89. package/substrate/.claude/skills/ia-model/SKILL.md +108 -0
  90. package/substrate/.claude/skills/interaction-design/SKILL.md +112 -0
  91. package/substrate/.claude/skills/interpret-input/SKILL.md +180 -0
  92. package/substrate/.claude/skills/kiss/SKILL.md +449 -0
  93. package/substrate/.claude/skills/launch/SKILL.md +924 -0
  94. package/substrate/.claude/skills/lean-canvas/SKILL.md +332 -0
  95. package/substrate/.claude/skills/longrun/SKILL.md +426 -0
  96. package/substrate/.claude/skills/luminary/SKILL.md +481 -0
  97. package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
  98. package/substrate/.claude/skills/onboard-repo/SKILL.md +2190 -0
  99. package/substrate/.claude/skills/pattern-review/SKILL.md +99 -0
  100. package/substrate/.claude/skills/personas/SKILL.md +207 -0
  101. package/substrate/.claude/skills/promote/SKILL.md +283 -0
  102. package/substrate/.claude/skills/requirement/SKILL.md +98 -0
  103. package/substrate/.claude/skills/retro/SKILL.md +117 -0
  104. package/substrate/.claude/skills/riff/SKILL.md +114 -0
  105. package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
  106. package/substrate/.claude/skills/session-end/SKILL.md +309 -0
  107. package/substrate/.claude/skills/session-log/SKILL.md +299 -0
  108. package/substrate/.claude/skills/skills/SKILL.md +228 -0
  109. package/substrate/.claude/skills/spec/SKILL.md +105 -0
  110. package/substrate/.claude/skills/sprint/SKILL.md +392 -0
  111. package/substrate/.claude/skills/stage/SKILL.md +384 -0
  112. package/substrate/.claude/skills/state-a-problem/SKILL.md +185 -0
  113. package/substrate/.claude/skills/temperance/SKILL.md +108 -0
  114. package/substrate/.claude/skills/use-case/SKILL.md +417 -0
  115. package/substrate/.claude/skills/user-stories/SKILL.md +268 -0
  116. package/substrate/.claude/skills/value-prop/SKILL.md +251 -0
  117. package/substrate/.claude/skills/verify/SKILL.md +160 -0
  118. package/substrate/.claude/skills/whereami/SKILL.md +307 -0
  119. package/substrate/AGENTS.md +79 -0
  120. package/substrate/CLAUDE-lite.md +85 -0
  121. package/substrate/CODE_OF_CONDUCT.md +28 -0
  122. package/substrate/CONTRIBUTING.md +177 -0
  123. package/substrate/README.md +173 -0
  124. package/substrate/SECURITY.md +19 -0
  125. package/substrate/architecture/decisions/ADR-029-release-pipeline.md +79 -0
  126. package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
  127. package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
  128. package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
  129. package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
  130. package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
  131. package/substrate/lib/clean-artifacts-sweep.sh +112 -0
  132. package/substrate/lib/code-comment-discipline.sh +144 -0
  133. package/substrate/lib/composer-preflight.sh +459 -0
  134. package/substrate/lib/hook-inject.sh +255 -0
  135. package/substrate/lib/luminary-pick.sh +96 -0
  136. package/substrate/lib/output-discipline.sh +143 -0
  137. package/substrate/lib/rewrite-check.sh +214 -0
  138. package/substrate/lib/state.sh +1372 -0
  139. package/substrate/lib/telemetry.sh +205 -0
  140. package/substrate/lib/tier-check.sh +138 -0
  141. package/substrate/lib/tier-dependency-audit.sh +933 -0
  142. package/substrate/presence/install/bassclef-hook-connect.sh +178 -0
  143. package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
  144. package/substrate/presence/install/bassclef-sync.template.sh +2076 -0
  145. package/substrate/presence/install/schedule-auto-save.cron.sh +88 -0
  146. package/substrate/presence/install/schedule-auto-save.taskscheduler.md +122 -0
  147. package/substrate/scripts/aggregate-telemetry.sh +217 -0
  148. package/substrate/scripts/analyze-tier-dependencies.sh +239 -0
  149. package/substrate/scripts/generate-lite-manifest.sh +489 -0
  150. package/substrate/scripts/generate-tier-manifest.sh +28 -0
  151. package/substrate/scripts/intent-drift-check.sh +456 -0
  152. package/substrate/scripts/lite-manifest-drift-check.sh +146 -0
  153. package/substrate/scripts/render-lite-manifest-doc.sh +150 -0
  154. package/substrate/standards/bassclef-configs-schema.md +232 -0
  155. package/substrate/standards/bassclef-evolution.md +143 -0
  156. package/substrate/standards/bassclef-internal-jargon.md +244 -0
  157. package/substrate/standards/bassclef-managed-sentinel.md +96 -0
  158. package/substrate/standards/bassclef-source-config.md +228 -0
  159. package/substrate/standards/deferred-actions-schema.md +204 -0
  160. package/substrate/standards/docs-sync-allowlist.md +76 -0
  161. package/substrate/standards/graceful-exit.md +227 -0
  162. package/substrate/standards/hook-idempotency.md +102 -0
  163. package/substrate/standards/lite-manifest-schema-changes.md +75 -0
  164. package/substrate/standards/luminary-problem-patterns.md +481 -0
  165. package/substrate/standards/ogilvy-writing-rules.md +225 -0
  166. package/substrate/standards/opener-discipline.md +96 -0
  167. package/substrate/standards/operator-facing-prose-discipline.md +201 -0
  168. package/substrate/standards/project-directory-layout.md +276 -0
  169. package/substrate/standards/release-tagging.md +137 -0
  170. package/substrate/standards/sdlc-compliance.md +286 -0
  171. package/substrate/standards/secrets-lifecycle.md +210 -0
  172. package/substrate/standards/security-scanner-adapter.md +145 -0
  173. package/substrate/standards/skill-output-discipline.md +90 -0
  174. package/substrate/standards/state-spine.md +511 -0
  175. package/substrate/standards/tech-stack-config.md +109 -0
  176. package/substrate/standards/tier-dependency-analysis.md +167 -0
  177. package/substrate/standards/tier-runtime-deps/lite.md +57 -0
  178. package/substrate/standards/tier-tag-schema.md +155 -0
  179. package/substrate/standards/whereami-schema.md +301 -0
  180. package/substrate/standards/writing-guide.md +213 -0
  181. package/substrate/templates/deferred-action-template.md +45 -0
  182. package/substrate/templates/whereami-template.md +101 -0
@@ -0,0 +1,168 @@
1
+ ---
2
+ tier: lite
3
+ name: Kent Beck
4
+ slug: kent-beck
5
+ claimed_by: [builder, reviewer]
6
+ referenced_by_skills: [verify, pattern-review]
7
+ primary_domain: engineering
8
+ depth: full
9
+ sources:
10
+ - type: book
11
+ title: "Test-Driven Development: By Example"
12
+ authors: ["Kent Beck"]
13
+ year: 2002
14
+ url: "https://www.pearson.com/en-us/subject-catalog/p/test-driven-development-by-example/P200000009450"
15
+ isbn: "9780321146533"
16
+ methodology_covered:
17
+ - "TDD red/green/refactor cycle"
18
+ - "Test-first as design discipline, not verification afterthought"
19
+ - "Tests as the first client of your code"
20
+ - type: book
21
+ title: "Extreme Programming Explained: Embrace Change"
22
+ authors: ["Kent Beck", "Cynthia Andres"]
23
+ year: 2004
24
+ url: "https://www.pearson.com/en-us/subject-catalog/p/extreme-programming-explained-embrace-change/P200000009290"
25
+ isbn: "9780321278654"
26
+ methodology_covered:
27
+ - "XP practices: TDD, pair programming, continuous integration, simple design"
28
+ - "Embrace change as a competitive advantage"
29
+ - "Four rules of simple design — passes tests, reveals intention, no duplication, fewest elements"
30
+ - type: book
31
+ title: "Tidy First? A Personal Exercise in Empirical Software Design"
32
+ authors: ["Kent Beck"]
33
+ year: 2023
34
+ url: "https://www.oreilly.com/library/view/tidy-first/9781098151232/"
35
+ isbn: "9781098151249"
36
+ methodology_covered:
37
+ - "Tidy First — structural changes commit separately from behavioral changes"
38
+ - "Don't bundle refactor and feature in one PR"
39
+ - "Empirical software design — measure what works, adjust accordingly"
40
+ verification_status: verified
41
+ description: "\"Make it work. Make it right. Make it fast. Tests are the first client of your code.\""
42
+ ---
43
+
44
+ # Kent Beck
45
+
46
+ ## Signature
47
+
48
+ *"Make it work. Make it right. Make it fast. Tests are the first client of your code."*
49
+
50
+ Extreme Programming (XP) creator. Co-author of **the JUnit framework**.
51
+ Author of **Test-Driven Development: By Example** and **Extreme Programming
52
+ Explained**. The bassclef voice on TDD, simple design, and iterative
53
+ engineering practice.
54
+
55
+ ## Core methods
56
+
57
+ - **TDD red/green/refactor** — write failing test, write minimum code
58
+ to pass, refactor with tests passing. Not "write tests after" — the
59
+ test comes first and drives the design.
60
+ - **Four rules of simple design** — (1) passes all tests, (2) reveals
61
+ intention, (3) no duplication, (4) fewest elements. Apply in order
62
+ during refactoring.
63
+ - **Three phases of development** — Make it work (get the feature
64
+ functional), make it right (clean it up with tests protecting),
65
+ make it fast (optimize, measured).
66
+ - **Patterns for testability** — Fake It ('Til You Make It, Obvious
67
+ Implementation, Triangulation. Techniques for moving from red to
68
+ green without skipping steps.
69
+ - **XP practices** — pair programming, continuous integration, small
70
+ releases, simple design, refactoring, collective ownership.
71
+ Practices reinforce each other; removing any degrades the rest.
72
+ - **Tidy First** — distinguishing between structural changes (tidying,
73
+ no behavior change) and behavioral changes. Commit them separately.
74
+
75
+ ## When to channel this luminary
76
+
77
+ When the primary risk is code quality degrading under change pressure.
78
+ Beck dominates for teams new to TDD, Construction work where tests
79
+ aren't yet a reflex, and refactoring-heavy iterations. Pair with Fowler
80
+ (refactoring catalog) and Uncle Bob (SOLID principles) for the
81
+ engineering-quality triad.
82
+
83
+ Do NOT channel Beck for: research code that will be thrown away,
84
+ spike work where discovery matters more than sustainability, or work
85
+ on systems where the test infrastructure doesn't yet exist (wrong
86
+ layer — infrastructure first).
87
+
88
+ ## Stack translation
89
+
90
+ In Next.js + vitest + Playwright:
91
+
92
+ - **TDD for pure functions** → write failing unit test in
93
+ `src/__tests__/`, write function to pass, refactor. Scoring logic,
94
+ parsing, validation all belong here.
95
+ - **TDD for components** → failing React Testing Library assertion,
96
+ minimum component to pass, refactor for structure.
97
+ - **TDD for API routes** → failing integration test against real DB +
98
+ Redis, minimum route implementation to pass.
99
+ - **Tidy First** → structural refactor commits separate from feature
100
+ commits. "refactor: extract ScoringStrategy interface" + "feat: add
101
+ ML scorer" as two PRs, not one.
102
+ - **Three phases** → first PR makes feature work, subsequent PRs
103
+ right/fast. Don't bundle all three.
104
+
105
+ ## Anti-patterns it prevents
106
+
107
+ - **Test-after** — writing tests once the code "works" produces tests
108
+ that confirm what exists, not tests that drive design. Beck rejects
109
+ this as TDD.
110
+ - **Batched refactoring** — saving all cleanup for a quarterly "tech
111
+ debt sprint." Refactoring is continuous, inside the red/green/refactor
112
+ loop.
113
+ - **Premature optimization** — making it fast before making it work.
114
+ The order matters.
115
+ - **Pristine-never-commits** — holding a branch to "get it perfect"
116
+ before merging. Beck's XP favors small, frequent merges.
117
+ - **Test-less refactors** — rearranging code without tests is just
118
+ changing code. Can't claim refactor without behavior preservation,
119
+ and you can't prove preservation without tests.
120
+ - **Tidy mixed with feature** — commit that both refactors and adds
121
+ behavior makes review and revert harder.
122
+
123
+ ## Worked example
124
+
125
+ For adding POA deal-stage validation:
126
+
127
+ Beck's approach:
128
+ 1. **Red**: write failing test
129
+ `test('deal cannot advance past LOI without signed NDA', ...)`
130
+ 2. **Green**: add minimum code to pass — if-check in the stage-advance
131
+ controller
132
+ 3. **Refactor**: extract `IStageTransitionPolicy` interface,
133
+ `NdaSignedPolicy` implementation, `StagePolicyRegistry`
134
+ 4. **Tidy commit** separate from feature: "refactor: extract stage
135
+ transition policy interface" → PR merged first
136
+ 5. **Feature commit**: "feat: enforce NDA-signed requirement for LOI
137
+ advance" → PR merged second
138
+
139
+ What Beck would NOT produce: a single 400-line PR that adds the
140
+ feature, refactors the policy structure, adds telemetry, and fixes
141
+ three unrelated smells. That's everything bundled.
142
+
143
+ ## Sources
144
+
145
+ - *Test-Driven Development: By Example* — Beck, Addison-Wesley (2002)
146
+ - *Extreme Programming Explained: Embrace Change* — Beck, Addison-Wesley
147
+ (2nd ed 2004)
148
+ - *Tidy First?* — Beck, O'Reilly (2023)
149
+ - *Implementation Patterns* — Beck (2007)
150
+ - kentbeck.com + kent-beck.com — primary sites
151
+ - JUnit — software itself is bassclef reference
152
+
153
+ ## Related luminaries
154
+
155
+ - **Martin Fowler** — Refactoring catalog operationalizes Beck's
156
+ red/green/refactor loop. Beck credited Fowler's work as foundational.
157
+ - **Robert C. Martin** — SOLID principles frame what "right" looks
158
+ like in Beck's make-it-right step.
159
+ - **Ward Cunningham** — XP co-creator, Wiki inventor. Historically
160
+ inseparable from Beck.
161
+ - **Michael Feathers** — Working with Legacy Code handles the
162
+ before-state (no tests exist) that TDD assumes away. Both
163
+ luminaries became verification-side primaries on bassclef's
164
+ `/architect-review` SKILL per bet 27c WU-9.5 (2026-06-27); per
165
+ ADR-035 substrate-as-system tenet, every rule's mechanism claim
166
+ is a contract Beck's TDD pins + Feathers's characterization
167
+ tests verify. See `architecture/audits/2026-06-27-audit-method-blind-spot.md`
168
+ for the recursive Act phase that named the lens-gap.
@@ -0,0 +1,218 @@
1
+ ---
2
+ tier: lite
3
+ name: Linus Torvalds
4
+ slug: linus-torvalds
5
+ claimed_by: [architect, reviewer]
6
+ referenced_by_skills: [release, decompose, architect-review]
7
+ primary_domain: distribution-stability
8
+ depth: full
9
+ solves_problems_brownfield:
10
+ - "Substrate rename / refactor / path-change broke adopter sessions silently after merge"
11
+ - "Adopter following a citation in shipped substrate hit a 404 because the referenced path was renamed"
12
+ - "Hook filename change in bassclef caused adopter's session-start hook to fire stale logic"
13
+ - "PR ships a cleaner name for a hook / skill / rule and breaks every adopter inheriting through additionalDirectories"
14
+ - "Sync template version bumped without compat shim — adopter on prior version is in undefined behavior"
15
+ solves_problems_greenfield:
16
+ - "Designing a new adopter-observable surface where future renames must stay non-breaking"
17
+ - "Planning a release pipeline that catches adopter-breaking changes before they ship"
18
+ - "Authoring the first version of an adopter-facing manifest schema where every field becomes load-bearing once used"
19
+ - "Designing a compat-shim layer ahead of a planned rename so the deprecation window drains cleanly"
20
+ - "Building a representative-adopter integration test that runs against every substrate change"
21
+ anti_patterns:
22
+ - "Dev-machine-only test — works for the author, breaks at sync time for adopters"
23
+ - "Clean-break rename motivated by conceptual integrity — costs more than it saves once observers exist"
24
+ - "Announcement-as-shim — written notice that the old name has gone away, with no surviving artifact"
25
+ - "Deprecation window without a real-adopter migration test — the deprecation tail outlasts the window"
26
+ sources:
27
+ - type: archive
28
+ title: "LKML 2012-12-23: 'We do not break userspace'"
29
+ authors: ["Linus Torvalds"]
30
+ year: 2012
31
+ url: "https://lkml.org/lkml/2012/12/23/75"
32
+ methodology_covered:
33
+ - "Userspace stability as non-negotiable kernel discipline"
34
+ - "Regressions are bugs even when prior behavior was buggy"
35
+ - type: book
36
+ title: "Linux Kernel Development (3rd ed.)"
37
+ authors: ["Robert Love"]
38
+ year: 2010
39
+ url: ""
40
+ methodology_covered:
41
+ - "Kernel ABI stability discipline across versions"
42
+ - "Syscall number preservation; new behavior gets new syscall"
43
+ - type: archive
44
+ title: "Stability of the Linux ABI — Linux Foundation TAB"
45
+ authors: ["Linux Foundation Technical Advisory Board"]
46
+ year: 2014
47
+ url: "https://www.linuxfoundation.org/"
48
+ methodology_covered:
49
+ - "Module ABI stability commitments"
50
+ - "Internal API churn vs external ABI freeze"
51
+ - type: talk
52
+ title: "Driver ABI Stability"
53
+ authors: ["Greg Kroah-Hartman"]
54
+ year: 2015
55
+ url: "https://elinux.org/ELC_2015_Presentations"
56
+ methodology_covered:
57
+ - "Why kernel internals stay unstable on purpose; why exported ABI stays frozen"
58
+ - type: archive
59
+ title: "LKML 'regressions are bugs' thread (multiple instances 2008–2021)"
60
+ authors: ["Linus Torvalds", "LKML community"]
61
+ year: 2008
62
+ url: "https://lkml.org/"
63
+ methodology_covered:
64
+ - "Revert-on-regression default"
65
+ - "Producer pays migration cost, adopter pays nothing"
66
+ verification_status: verified
67
+ description: "\"We do not break userspace.\" — INSTEAD: the kernel team pays the migration cost so every program that ran yesterday keeps running today."
68
+ ---
69
+
70
+ # Linus Torvalds
71
+
72
+ ## Signature
73
+
74
+ *"We do not break userspace."* — INSTEAD: the kernel team pays the migration cost so every program that ran yesterday keeps running today.
75
+
76
+ Principal architect of Linux. The kernel's single most-cited rule across 30+ years of evolution is the userspace stability commitment. The cost of evolution rides with the kernel team. Adopters carry zero migration burden. This is the discipline bassclef applies at the substrate → adopter boundary.
77
+
78
+ ## Core principle
79
+
80
+ Userspace stability is the ceiling, not a tradeoff. Linus's framing (LKML 2012, restated dozens of times since): a change that breaks user programs is a kernel bug, regardless of whether the user program was relying on documented or undocumented behavior. The kernel team has rejected technically-better designs because the migration cost to userspace was too high. Shipped compatibility shims have outlived the original feature by a decade. Permanent code complexity is accepted as the price of adopter trust.
81
+
82
+ Three operational consequences flow from this:
83
+
84
+ 1. **Regressions are bugs even when prior behavior was buggy.** INSTEAD of fixing forward into a cleaner state: revert, fix the underlying problem from a different angle, ship the fix without changing the observable surface adopters depend on.
85
+ 2. **The producer pays the cost.** INSTEAD of telling adopters to migrate: ship the compat shim, keep the old surface alive, document the retirement condition as "when the last known adopter migrates."
86
+ 3. **Conceptual integrity has a budget.** INSTEAD of treating rename-for-cleanliness as free: weigh the rename benefit against migration cost × adopter count. When the cost exceeds the benefit, hold the rename.
87
+
88
+ ## What this looks like in Linux
89
+
90
+ - **Syscall ABI is permanent.** Once a syscall ships, the signature stays. INSTEAD of changing an existing syscall: a new behavior gets a new syscall number; the old one keeps working forever.
91
+ - **Struct layouts grow but stay backward-compatible.** Removed fields stay as reserved holes. INSTEAD of rearranging fields: a new struct gets introduced; the old one stays usable.
92
+ - **/proc and /sys accumulate compatibility commitments.** Even ad-hoc debug surfaces become quasi-stable once tools parse them.
93
+ - **Compatibility shims live forever.** The kernel still supports 32-bit syscalls on 64-bit kernels for old binaries — INSTEAD of forcing a migration to 64-bit.
94
+ - **Regressions revert by default.** When a feature change breaks any adopter, the change reverts. INSTEAD of asking the adopter to adapt: the kernel team re-engineers from a different angle.
95
+
96
+ ## Core methods
97
+
98
+ Five named methods an agent can invoke by name during review or design:
99
+
100
+ - **Adopter-observable surface enumeration** — Before any substrate change, list every surface adopters can observe (filesystem paths, hook filenames, schema field names, skill names referenced by settings.json, symlink targets, sync-template version markers). When the enumeration is missing from the PR body, the change is not yet reviewable. INSTEAD of reviewing on faith: send the PR back with a request for the surface list.
101
+
102
+ - **Compat-shim-first ship discipline** — Build the shim in the same release as the change. Symlink at the old path, alias at the old name, forwarding stub at the old hook filename, schema accommodation that accepts both names during transition. INSTEAD of "ship the rename now, add the shim later": ship both together; the gap between them is the window where adopters break.
103
+
104
+ - **Real-adopter integration test** — Test the change against a clone of a representative adopter. Run the adopter's actual sync hook against proposed substrate HEAD. Confirm zero observable change. INSTEAD of dev-machine validation: the cold-adopter harness IS the real-adopter test surface; the change waits for the harness when it isn't yet built.
105
+
106
+ - **Revert-on-regression default** — When a feature change breaks any adopter, revert by default and fix from a different angle. INSTEAD of trading adopter trust for the partial win: adopter trust is the ceiling; the feature is re-engineered.
107
+
108
+ - **Permanent-shim acceptance** — Accept that some compat shims live forever. The kernel still supports 32-bit syscalls for old binaries. INSTEAD of cycling shims through deprecation: document the retirement condition honestly ("when all known adopters migrate") and expect the answer is "forever."
109
+
110
+ ## When to channel this luminary
111
+
112
+ When the primary risk is **adopter-observable surface change**. Linus dominates the review lens any time a PR touches:
113
+
114
+ - Filesystem paths under `~/src/sunj-labs/` that adopter symlinks resolve through
115
+ - Filenames inside `.claude/hooks/`, `.claude/skills/`, `.claude/rules/`, `.claude/agents/` (adopter settings.json + symlinks reference them by name)
116
+ - Schema shapes in `standards/state-spine/schemas/`
117
+ - Sync-template version markers in `presence/install/`
118
+ - `.bassclef-source.json` schema
119
+ - Adopter migration tooling under `scripts/migrate-*`
120
+ - Release pipeline andon decisions (per ADR-029)
121
+ - Rename / move / refactor of any of the above
122
+
123
+ Pair with Hyrum Wright (provides the theoretical why — observability creates dependency), Michael Nygard (ADR lifecycle for the breaking-change decision), and Vaughn Vernon (anticorruption layer is the structural shape Linus's discipline produces).
124
+
125
+ Outside this scope, route elsewhere. INSTEAD of channeling Linus for bassclef-internal refactors that touch zero adopter-observable surface: channel John Ousterhout (deep modules) or Kent Beck (TDD cycle). INSTEAD of channeling Linus for operator-private content under `docs/operator-private/`: that content stays in bassclef-upstream and doesn't ship to adopters; Linus's discipline is silent there. INSTEAD of channeling Linus for chronicles and journal entries: those are operator narrative, not contract; voice luminaries apply.
126
+
127
+ ## Stack translation
128
+
129
+ bassclef is a substrate. Adopters are the userspace. Every adopter-observable surface is a syscall: once shipped, the surface keeps working forever unless an explicit multi-cycle deprecation runs.
130
+
131
+ Map:
132
+
133
+ | Linux kernel | bassclef substrate |
134
+ |---|---|
135
+ | Syscall ABI | hook filenames, skill names, agent names referenced by adopter settings.json |
136
+ | `/proc` + `/sys` | filesystem paths under `~/src/sunj-labs/` that adopter symlinks resolve through |
137
+ | Struct layouts | state-spine schema shapes |
138
+ | Module ABI | sync-template version markers in `presence/install/bassclef-sync.template.sh` |
139
+ | Boot interface | `.bassclef-source.json` schema fields |
140
+ | LKML release announcements | `/release` PR body Summary section + adopter changelog entry |
141
+ | Kernel-internal refactors | bassclef-internal refactors touching only `docs/operator-private/`, chronicles, internal scripts unexposed to adopters |
142
+
143
+ When bassclef renames `canonical → bassclef`, that is the equivalent of removing a syscall. The discipline answer: leave a compatibility shim (symlink, alias, forwarding stub) at the old name. Deprecate explicitly. Give adopters a grace period measured in `/release` cycles. INSTEAD of removing the shim once a deadline passes: remove only with an explicit ADR documenting the breaking change and citing the migration test that proves zero adopter remains on the old name.
144
+
145
+ ## Anti-patterns it prevents
146
+
147
+ - **Dev-machine-only test.** "It works on my machine." INSTEAD: clone a representative adopter; run their sync hook; confirm zero observable change. The dev machine is one environment among many.
148
+
149
+ - **Clean-break rename motivated by conceptual integrity.** "The new name is clearer." INSTEAD: weigh the rename benefit against migration cost × adopter count. Hold the rename when the math tips against it. Brooks's conceptual-integrity is a budget, not a license.
150
+
151
+ - **Announcement-as-shim.** "We told them in advance." INSTEAD: ship the technical artifact (symlink, alias, forwarding stub) that keeps the old name working. Communication is necessary AND insufficient on its own.
152
+
153
+ - **Single-adopter dismissal.** "Only one adopter uses this surface." INSTEAD: ship the shim anyway. Hyrum's Law applies the moment any adopter observes the surface; declared user count fails as the metric.
154
+
155
+ - **Deprecation window without a real-adopter migration test.** "We gave them three release cycles." INSTEAD: the migration test verifies adopters actually moved; the calendar window verifies only that time passed.
156
+
157
+ ## Worked example
158
+
159
+ **Scenario:** Tonight's bet 25e shipped a structural cold-adopter harness. The next bet ships shape b — a sync round-trip harness that runs against a fresh clone. The harness will catch regressions like #336 (bassclef-sync.sh §4 missing PreToolUse template embedding).
160
+
161
+ **The Linus lens applied at PR-review time for #336 fix:**
162
+
163
+ 1. **Adopter-observable surface enumeration** — the agent reviewing the #336 PR lists every adopter-observable surface the fix touches: the PreToolUse hook matcher, the settings.json template merged into adopter sessions, the hook firing order, and the stderr contract on BLOCK exits. All four are observable; all four must stay stable across the fix. INSTEAD of accepting a PR body that lists only the bug fix: send back for the surface enumeration.
164
+
165
+ 2. **Compat-shim-first** — the fix ships the embedding template AND the test that catches it in the same PR. INSTEAD of "add the embedding now, add the test next bet": same release, or the gap between fix and verification is the window where adopters silently inherit the buggy state.
166
+
167
+ 3. **Real-adopter integration test** — the new shape b harness IS the real-adopter test. Once the harness ships (next bet), the #336 fix gets re-run against the cold-adopter clone and the PreToolUse path fires correctly post-sync. INSTEAD of trusting unit tests alone: the harness validates the adopter-observable surface end-to-end.
168
+
169
+ 4. **Revert-on-regression default** — if the #336 fix causes any adopter-observable regression (a different hook stops firing, a stderr message changes, the merge logic drops an operator key like #340 did), the fix reverts. INSTEAD of trading adopter trust for the partial win: revert, re-engineer from a different angle, ship without changing the observable surface.
170
+
171
+ 5. **Permanent-shim acceptance** — the cp-fallback in additive_merge_settings (the surface #340 patches) is exactly the kind of shim that lives forever. Adopters on older `jq` versions, adopters without `jq` at all, adopters whose settings.json predates the new schema — the cp-fallback covers them all. INSTEAD of removing the fallback once a new merger ships: keep both paths alive; the cost is permanent merge-logic complexity; the benefit is permanent adopter compatibility.
172
+
173
+ The shape-b harness shipping as a methodology-only document with a deferred mechanical layer fails this lens. INSTEAD: the mechanical layer IS the discipline — without the harness running against every PR, the adopter-observable surface stays untested and the next #336-class regression ships silently.
174
+
175
+ ## How to apply
176
+
177
+ When designing or reviewing a substrate change:
178
+
179
+ 1. **Identify every adopter-observable surface the change touches.** When the surface list is missing from the PR body, the change is not yet ready. INSTEAD of guessing: enumerate explicitly.
180
+ 2. **Ask "would an adopter's existing program break?"** INSTEAD of "should it" — would it. Think about every adopter shape: vendored snapshot, thin-pointer, cold-onboarding, partial-sync.
181
+ 3. **When the answer is yes, build the shim first.** Symlink, alias, forwarding stub, schema accommodation. Whatever makes the old name keep working.
182
+ 4. **Document the shim's retirement condition.** "When all known adopters migrate" or "after N release cycles." INSTEAD of "forever": match Linus's commitment to permanent code when the data demands it.
183
+ 5. **Test the shim against a real adopter.** The cold-adopter harness is the substrate's vehicle for this. INSTEAD of dev-machine validation: clone a representative adopter, run their sync hook, confirm zero observable change.
184
+ 6. **Ship the shim in the SAME release as the rename.** INSTEAD of "we'll add a shim later": same PR, same release; the gap between rename and shim is the breakage window.
185
+
186
+ ## How bassclef channels Linus
187
+
188
+ The discipline lives in:
189
+
190
+ - `.claude/rules/we-dont-break-adopters.md` — methodology layer; cites Hyrum's Law as the theoretical why and Linus's discipline as the operational answer
191
+ - `architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md` — decision layer; adopts the discipline as Tier 1
192
+ - `architecture/dual-repo-flow.md` "Non-breaking changes to adopters" section — architectural layer
193
+ - `scripts/migrate-adopter-references.sh` — adopter self-healing tool for the canonical → bassclef cascade
194
+ - `presence/install/bassclef-sync.template.sh` — the sync surface that adopters depend on; load-bearing per this discipline
195
+ - `scripts/cold-adopter-harness.sh` (bet 25e) + planned shape b sync round-trip (#341) — the real-adopter integration test surface
196
+ - bassclef-upstream#1360 — Phase 2 mechanical layer (pre-rename CI test against representative adopter, redirect registry, versioned sync protocol)
197
+
198
+ ## Sources
199
+
200
+ - LKML 2012-12-23 — "We do not break userspace" thread (Linus Torvalds, re: PowerPC syscall change)
201
+ - *Linux Kernel Development* — Robert Love, Addison-Wesley (3rd ed. 2010)
202
+ - *Stability of the Linux ABI* — Linux Foundation Technical Advisory Board (2014)
203
+ - ELC 2015 — Greg Kroah-Hartman, "Driver ABI Stability"
204
+ - LKML "regressions are bugs" thread — multiple instances 2008, 2011, 2014, 2017, 2021
205
+
206
+ ## Related luminaries
207
+
208
+ - **Hyrum Wright** — provides the theoretical why (observability creates dependency); Linus provides the operational answer (we just keep userspace working). They pair as why + how.
209
+ - **Michael Nygard** — stability patterns at runtime; ADR lifecycle for the breaking-change decision. Operates at runtime-failure layer where Linus operates at API-surface layer; complementary.
210
+ - **Vaughn Vernon** — anticorruption layer is the structural pattern Linus's discipline produces in practice. When the substrate must do an internal rename, the anticorruption layer between substrate-internal and adopter-observable preserves stability.
211
+ - **Frederick Brooks** — frames the conceptual-integrity-vs-migration-cost tradeoff. Linus picks adopter stability every time; Brooks gives the language to reason about when the tradeoff actually costs more than it saves.
212
+ - **Kent Beck** — adjacent at the test-first layer. Linus's real-adopter integration test IS Beck's red-first discipline applied at the adopter boundary.
213
+
214
+ ## Refs
215
+
216
+ - bassclef-upstream#1360 — Phase 2 mechanical layer
217
+ - 2026-06-21 chronicle — the canonical → bassclef cascade + recovery + rule authoring
218
+ - ADR-031 — non-breaking-change adopter discipline (decision layer)
@@ -0,0 +1,164 @@
1
+ ---
2
+ tier: lite
3
+ name: Martin Fowler
4
+ slug: martin-fowler
5
+ claimed_by: [builder, reviewer]
6
+ referenced_by_skills: [pattern-review, decompose, architect-review]
7
+ primary_domain: engineering
8
+ depth: full
9
+ sources:
10
+ - type: book
11
+ title: "Refactoring: Improving the Design of Existing Code (2nd edition)"
12
+ authors: ["Martin Fowler"]
13
+ year: 2018
14
+ url: "https://martinfowler.com/books/refactoring.html"
15
+ isbn: "9780134757599"
16
+ methodology_covered:
17
+ - "Refactoring catalog with named transformations"
18
+ - "When a change is hard, first refactor to make the change easy — then make the easy change"
19
+ - "Code smells: Long Method, Feature Envy, Shotgun Surgery, Primitive Obsession, Data Clumps"
20
+ - type: book
21
+ title: "Patterns of Enterprise Application Architecture"
22
+ authors: ["Martin Fowler"]
23
+ year: 2002
24
+ url: "https://martinfowler.com/books/eaa.html"
25
+ isbn: "9780321127426"
26
+ methodology_covered:
27
+ - "Repository pattern — domain object persistence behind a collection-like interface"
28
+ - "Service Layer — defines an application's boundary and its set of available operations"
29
+ - "Domain Model + Active Record + Data Mapper — three approaches to domain logic and data access"
30
+ - "Unit of Work — maintain a list of objects affected by a business transaction"
31
+ - type: book
32
+ title: "Domain-Specific Languages"
33
+ authors: ["Martin Fowler", "Rebecca Parsons"]
34
+ year: 2010
35
+ url: "https://martinfowler.com/books/dsl.html"
36
+ isbn: "9780321712943"
37
+ methodology_covered:
38
+ - "Internal vs external DSL design choices"
39
+ - "DSL design patterns — when to build, when to embed, when to skip"
40
+ - type: blog_post
41
+ title: "martinfowler.com (primary methodology venue)"
42
+ authors: ["Martin Fowler"]
43
+ year: 2025
44
+ url: "https://martinfowler.com/"
45
+ methodology_covered:
46
+ - "Continuous refactoring as engineering discipline, not a scheduled event"
47
+ - "Microservices framing + architectural design notes"
48
+ - "Patterns evolve through the blog before landing in books"
49
+ verification_status: verified
50
+ description: "\"Any fool can write code that a computer can understand."
51
+ ---
52
+
53
+ # Martin Fowler
54
+
55
+ ## Signature
56
+
57
+ *"Any fool can write code that a computer can understand. Good programmers write code that humans can understand. Is the code in the right place?"*
58
+
59
+ ThoughtWorks Chief Scientist. Author of **Refactoring**, **Patterns of
60
+ Enterprise Application Architecture**, **Domain-Specific Languages**,
61
+ and countless seminal essays. The bassclef voice on code smells,
62
+ refactoring, and enterprise patterns.
63
+
64
+ ## Core methods
65
+
66
+ - **Code smells catalog** — Long Method, Large Class, Feature Envy,
67
+ Shotgun Surgery, Primitive Obsession, Data Clumps, and dozens more.
68
+ Named patterns make smells recognizable on sight.
69
+ - **Refactoring catalog** — Extract Method, Move Method, Replace
70
+ Conditional with Polymorphism, Introduce Parameter Object, and ~70
71
+ others. Each is a mechanical transformation that preserves behavior.
72
+ - **Enterprise patterns (PoEAA)** — Repository, Unit of Work, Service
73
+ Layer, Domain Model, Table Data Gateway, Data Mapper. Vocabulary for
74
+ how business logic meets persistence.
75
+ - **Strangler Fig pattern** — migrate legacy by routing calls through
76
+ a new layer while old shrinks. Reversible at every step.
77
+ - **Expand-and-contract schema migrations** — add new column → backfill
78
+ → switch reads → remove old column. Zero-downtime migration pattern.
79
+
80
+ ## When to channel this luminary
81
+
82
+ When the primary risk is that existing code will become unworkable
83
+ under change. Fowler dominates for refactoring work, legacy migration,
84
+ pattern selection in Construction, and code review. Pair with Uncle Bob
85
+ (SOLID principles), Beck (TDD), and Feathers (legacy code) for the
86
+ engineering quality stack.
87
+
88
+ Do NOT channel Fowler as primary for: greenfield architecture (use
89
+ Simon Brown or Evans), pure language design, or brand-new frameworks
90
+ where patterns haven't settled.
91
+
92
+ ## Stack translation
93
+
94
+ In Next.js + Prisma + TypeScript:
95
+
96
+ - **Repository pattern** → `lib/repositories/deal.ts` wraps Prisma
97
+ queries; routes and services call the repository, not Prisma
98
+ directly. Decouples storage from business logic.
99
+ - **Service Layer** → `lib/services/ScoringService.ts` orchestrates
100
+ multiple repositories + policies for a single business operation.
101
+ - **Refactoring before feature** — when a change is hard, first refactor
102
+ to make the change easy, then make the easy change.
103
+ - **Strangler Fig** → route old API calls through a facade that
104
+ progressively delegates to new implementation; remove old route
105
+ only when all traffic has shifted.
106
+ - **Expand-and-contract migrations** → Prisma migrations add nullable
107
+ column first, backfill via job, then add NOT NULL constraint, then
108
+ remove old column in subsequent migration.
109
+
110
+ ## Anti-patterns it prevents
111
+
112
+ - **Shotgun Surgery** — one logical change touches many unrelated files.
113
+ Signal that abstraction is missing; responsibility is smeared.
114
+ - **Feature Envy** — a method/component uses more of another's data
115
+ than its own. The logic belongs there, not here.
116
+ - **Primitive Obsession** — using primitive types (string, number) when
117
+ a domain concept (DealId, Money, EmailAddress) would clarify intent.
118
+ - **Long Parameter List** — functions with 6+ params. Extract Parameter
119
+ Object.
120
+ - **Data Clumps** — the same group of fields appearing together across
121
+ many places. Extract a class/type for the clump.
122
+ - **Inappropriate Intimacy** — class A peering into class B's privates.
123
+ Violates encapsulation; signals poor boundary placement.
124
+
125
+ ## Worked example
126
+
127
+ For POA's deal-enrichment pipeline:
128
+
129
+ Fowler's approach:
130
+ - Identify **code smells** in current implementation: `enrichmentService.ts`
131
+ has 300 lines (Large Class), nested callbacks (Complex Method), and
132
+ direct Prisma + vendor-API calls (Feature Envy + Inappropriate Intimacy).
133
+ - Apply **Extract Class**: split into `EnrichmentOrchestrator`,
134
+ `EnrichmentRepository`, and `EnrichmentVendorAdapter`.
135
+ - Apply **Replace Conditional with Polymorphism**: if-else over enrichment
136
+ provider types becomes a Strategy with `IEnrichmentProvider` interface.
137
+ - Apply **Repository pattern** to the Prisma access.
138
+ - **Strangler Fig** the migration: new code runs behind feature flag,
139
+ old code runs in parallel with comparison logging, switch cutover
140
+ once comparison shows parity.
141
+
142
+ What Fowler would NOT produce: a rewrite from scratch. Fowler's
143
+ discipline is incremental, behavior-preserving refactoring — not
144
+ greenfield redos.
145
+
146
+ ## Sources
147
+
148
+ - *Refactoring: Improving the Design of Existing Code* — Fowler,
149
+ Addison-Wesley (2nd ed 2018)
150
+ - *Patterns of Enterprise Application Architecture* — Fowler (2002)
151
+ - *Domain-Specific Languages* — Fowler (2010)
152
+ - *NoSQL Distilled* — Fowler, Sadalage (2012)
153
+ - martinfowler.com — primary site with decades of essays, bliki entries
154
+
155
+ ## Related luminaries
156
+
157
+ - **Robert C. Martin** — SOLID + Clean Code; pair with Fowler's refactoring
158
+ catalog for complete engineering-quality practice.
159
+ - **Kent Beck** — TDD + Extreme Programming; Fowler credits Beck for
160
+ much of the refactoring discipline.
161
+ - **Michael Feathers** — Working with Legacy Code extends Fowler's
162
+ refactoring to the before-state (no tests exist yet).
163
+ - **Eric Evans** — DDD complements Fowler's Service Layer + Repository
164
+ at the strategic domain-modeling level.