@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,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.
@@ -0,0 +1,125 @@
1
+ ---
2
+ tier: lite
3
+ name: Michael Feathers
4
+ slug: michael-feathers
5
+ claimed_by: [builder, reviewer]
6
+ referenced_by_skills: [verify, pattern-review]
7
+ primary_domain: engineering
8
+ depth: full
9
+ solves_problems_brownfield:
10
+ - "Codebase has no tests; any change risks unknown breakage across the system"
11
+ - "A class or function can't be tested without instantiating half the application"
12
+ - "New behavior needs to be added adjacent to legacy code that can't be safely changed"
13
+ - "A module is deeply coupled to its dependencies (database, filesystem, clock); tests require real infrastructure"
14
+ solves_problems_greenfield:
15
+ - "Designing a new module that will be introduced to a legacy system; seams must be planned from the start"
16
+ - "Building a service layer that wraps a third-party system; the wrap method must stay testable as the third-party evolves"
17
+ - "Planning a brownfield rescue effort; need a staged safety-net strategy before any refactoring begins"
18
+ - "Establishing the testing discipline a team will use as a system ages"
19
+ anti_patterns:
20
+ - "Greenfield systems with modern tooling and existing test culture — Feathers is the brownfield specialist"
21
+ - "Systems where a full rewrite is genuinely the right call and incremental safety-net building would slow the work"
22
+ - "Pure architectural redesigns where the code isn't the constraint"
23
+ sources:
24
+ - type: book
25
+ title: "Working Effectively with Legacy Code"
26
+ authors: ["Michael C. Feathers"]
27
+ year: 2004
28
+ url: "https://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052"
29
+ isbn: "9780131177055"
30
+ methodology_covered:
31
+ - "Characterization tests — pin current behavior before touching legacy code"
32
+ - "Seam identification — find places where behavior can change without editing in place (preprocessor, link, object seams)"
33
+ - "Sprout method / sprout class — add new testable behavior adjacent to legacy code"
34
+ - "Wrap method / wrap class — change behavior by wrapping; original is untouched"
35
+ - "Legacy code definition — code without tests"
36
+ - type: website
37
+ title: "Michael Feathers blog"
38
+ authors: ["Michael Feathers"]
39
+ year: 2008
40
+ url: "https://michaelfeathers.silvrback.com/"
41
+ methodology_covered:
42
+ - "Ongoing writing on software design, legacy systems, and refactoring discipline"
43
+ verification_status: verified
44
+ description: "\"Legacy code is code without tests. Everything else is detail.\" [ref:1]"
45
+ ---
46
+
47
+ # Michael Feathers
48
+
49
+ ## Signature
50
+
51
+ *"Legacy code is code without tests. Everything else is detail."* [ref:1]
52
+
53
+ Author of **Working Effectively with Legacy Code** (2004) [ref:1]. The bassclef voice on bringing old, test-less, or tightly-coupled code under control without a rewrite. Where Beck starts with TDD on a clean slate, Feathers starts with the code that actually exists in production today.
54
+
55
+ ## Core methods
56
+
57
+ - **Characterization tests** — Write tests that describe what the code currently does, not what it should do. Before touching anything, pin the current behavior. These tests are the safety net that makes refactoring safe. Only after pinning do you change behavior — and changing behavior means writing a failing test first. [ref:1]
58
+ - **Seam identification** — A seam is a place where you can change the program's behavior without editing in place. Seams come in three types: preprocessor seams (build-time), link seams (object-file substitution), and object seams (subclassing or interface injection). Finding seams is finding where you can insert a test double without rewriting the production code. [ref:1]
59
+ - **Sprout method / sprout class** — When you need to add new behavior to a function that is too risky to touch, add the new behavior in a new method or class that you CAN test. Wire the new code into the legacy code with minimal contact. The sprout is independently testable; the legacy code is preserved. [ref:1]
60
+ - **Wrap method / wrap class** — When you need to change a method's behavior, wrap it: create a new method (or class) that calls the original and adds or modifies behavior around it. The wrap is testable; the original is untouched. Like Decorator, but driven by safety rather than design. [ref:1]
61
+
62
+ ## When to channel this luminary
63
+
64
+ When the codebase has real production code that lacks tests, or where tests exist but the dependencies are so tangled that changing anything is risky. Feathers dominates legacy system rescue: adding a feature to a 10-year-old module, extracting a service from a monolith, or incrementally stabilizing a system before a modernization effort begins. Pair with Fowler (refactoring catalog) once the safety net is in place.
65
+
66
+ INSTEAD of channeling Feathers when the team is starting fresh: use Beck's TDD from the first line of production code. Feathers handles the before-state that TDD assumes away.
67
+
68
+ ## Stack translation
69
+
70
+ In Next.js + Prisma + TypeScript:
71
+
72
+ - **Characterization tests** — for a legacy API route, write integration tests against its actual behavior (inputs, outputs, side effects) before touching it. Use vitest + supertest or a test client. Pin the response shapes that downstream code depends on.
73
+ - **Seam identification** — TypeScript interfaces are the primary seam type. A service function that imports Prisma directly has no seam; extract an interface and inject via constructor or parameter. The seam enables swapping a real DB client for a test double.
74
+ - **Sprout method** — a 200-line server action that handles validation + database + notification: sprout the new validation logic into a standalone function tested in isolation. Wire it into the existing action with a single call. Ship both together.
75
+ - **Wrap class** — a third-party SDK (BizBuySell, an email provider) with no seam: create a thin wrapper class that implements your own interface and delegates to the SDK. Tests use a test double; production uses the wrapper. Swap SDKs later without touching callers.
76
+
77
+ ## Anti-patterns it prevents
78
+
79
+ - **Edit and pray** — making a change to legacy code without tests and hoping nothing breaks. Feathers's characterization tests create the safety net before any edit, making each change verifiable rather than hopeful.
80
+ - **The big refactor** — attempting to redesign a legacy system comprehensively before adding tests. Feathers insists: tests come first, then refactoring. The comprehensive redesign without tests is just a different legacy system that happens to be new. [ref:1]
81
+ - **Dependency grabbing** — adding a new dependency to a legacy class because it was "easier." Each new dependency reduces the seam surface and makes future testing harder. Feathers's discipline: find the seam, inject the dependency, preserve optionality.
82
+ - **Sprout regression** — the new behavior works; the old behavior was accidentally changed. Characterization tests catch this: the old behavior is pinned; if any characterization test fails, something changed that was not intended to change.
83
+
84
+ ## Worked example
85
+
86
+ For POA's legacy BizBuySell scraper module:
87
+
88
+ The scraper function is 300 lines; it fetches, parses, writes to the database, and sends a Slack notification. No tests. Before any change:
89
+
90
+ 1. **Characterization test**: run the scraper against a recorded HTTP fixture; capture the database rows it writes and the Slack payload it sends. These are the characterization tests. Any change that alters these outputs is a signal, not a surprise.
91
+
92
+ 2. **Seam identification**: the database write is not injectable — it calls Prisma directly. INSTEAD: extract a `ScrapeResultWriter` interface; pass it as a parameter in tests. The seam now exists.
93
+
94
+ 3. **Sprout method**: the new requirement is deduplication before writing. INSTEAD of editing the 300-line function: sprout `deduplicateResults(incoming: ScrapeResult[], existing: ScrapeResult[]): ScrapeResult[]` — pure function, fully testable. Wire it into the legacy function with one line.
95
+
96
+ 4. **Verify**: characterization tests still pass (old behavior preserved). New unit tests cover the deduplication logic independently.
97
+
98
+ ## Sources
99
+
100
+ - *Working Effectively with Legacy Code* — Feathers, Prentice Hall (2004) [ref:1]
101
+ - michaelfeathers.silvrback.com — primary blog [ref:2]
102
+ - "Getting Empirical About Refactoring" — Feathers, various conference talks
103
+
104
+ ## Related luminaries
105
+
106
+ - **Martin Fowler** — Refactoring is the next step after Feathers's safety net is in place; Fowler's catalog assumes tests exist, Feathers builds the before-state.
107
+ - **Kent Beck** — TDD is the end state Feathers helps teams reach incrementally.
108
+ - **Robert C. Martin** — Clean Code principles are the target; Feathers handles the path from legacy reality to that target.
109
+ - **Hunt & Thomas** — DRY and orthogonality are easier to maintain from the start; Feathers is the recovery discipline when they were not.
110
+
111
+ ## Substrate-as-system anchor (bassclef bet 27c, 2026-06-27)
112
+
113
+ Feathers's "code without characterization tests is legacy code by definition" became the anchor citation for the bassclef substrate-as-system tenet (ADR-035). The bet 24c architect-review (2026-06-24) anchored on comprehension-side lenses (Brooks + Linus + Ishikawa + Deming) and missed the mechanism-fidelity class — "rule names mechanical enforcement that does not actually fire." The recursive Act phase (`architecture/audits/2026-06-27-audit-method-blind-spot.md`) named the lens-gap; Feathers's verification-side framing supplied the cure.
114
+
115
+ The bet 27c foundation ships:
116
+ - `standards/mechanism-fidelity.md` (standard tier) — audit method spec; Feathers-style characterization tests pin every rule's mechanism claim
117
+ - `lib/mechanism-fidelity.sh` — shared scanner that runs the 5-step verification chain
118
+ - `.claude/skills/audit-rule-mechanism-fidelity/SKILL.md` — operator-invocable audit (Feathers + Beck primary luminaries)
119
+ - `scripts/cold-adopter-harness-sync.sh` Shape d — per-PR gate (4 check classes; Feathers + Saltzer-Schroeder + Ousterhout primary)
120
+ - `.claude/rules/substrate-as-system.md` (standard tier) — auto-loaded tenet rule (cites Feathers as primary)
121
+ - `.claude/skills/architect-review/SKILL.md` — amendment makes Feathers + Beck + Saltzer-Schroeder verification-side primaries alongside Brooks + Linus comprehension-side primaries
122
+
123
+ Feathers's brownfield-rescue framing applies recursively at the substrate level: bassclef's own substrate had legacy mechanism-fidelity claims (108 claims classified by WU-6 first audit; 76 non-CLEAN). The cure bet (Bet C-pre-2) drives them to zero via the same Feathers discipline — characterization tests, seam identification, sprout/wrap patterns — applied to substrate hooks rather than application code.
124
+
125
+ The substrate as a system needs Feathers as much as application code does. This anchor citation reflects that.
@@ -0,0 +1,118 @@
1
+ ---
2
+ tier: lite
3
+ name: Michael Nygard
4
+ slug: michael-nygard
5
+ claimed_by: [architect]
6
+ referenced_by_skills: [architect-review, decompose]
7
+ primary_domain: architecture
8
+ depth: full
9
+ solves_problems_brownfield:
10
+ - "A single slow external API call hangs the entire application because the thread pool exhausts"
11
+ - "One failing service causes a cascade that takes down services with no direct dependency on it"
12
+ - "The application works fine locally and in staging but fails in production under real load patterns"
13
+ - "There is no defined behavior when an external integration is unavailable"
14
+ solves_problems_greenfield:
15
+ - "Designing a service that will integrate with external systems of unknown reliability"
16
+ - "Planning the failure modes of a distributed system before any code is written"
17
+ - "Building a system that continues operating (in degraded mode) when individual integrations fail"
18
+ - "Establishing the production-readiness criteria a system must meet before going live"
19
+ anti_patterns:
20
+ - "Single-process applications with no external integrations — stability patterns add overhead without value"
21
+ - "Batch systems that run to completion and exit — patterns designed for long-lived services"
22
+ - "Early-stage prototypes where production reliability is deliberately out of scope"
23
+ sources:
24
+ - type: book
25
+ title: "Release It! Design and Deploy Production-Ready Software"
26
+ authors: ["Michael T. Nygard"]
27
+ year: 2018
28
+ url: "https://pragprog.com/titles/mnee2/release-it-second-edition/"
29
+ isbn: "9781680502398"
30
+ methodology_covered:
31
+ - "Circuit breaker — stateful wrapper with Closed/Open/Half-Open states; prevents cascading failure"
32
+ - "Bulkhead — partition resources by concern; failure in one partition cannot exhaust shared resources"
33
+ - "Timeout — every remote call must have connect + read timeout values"
34
+ - "Fail fast — reject requests immediately when a known failure condition exists"
35
+ - "Stability anti-patterns — cascading failure, blocked threads, self-denial, integration point failures"
36
+ - type: book
37
+ title: "Release It! Design and Deploy Production-Ready Software (1st edition)"
38
+ authors: ["Michael T. Nygard"]
39
+ year: 2007
40
+ url: "https://pragprog.com/titles/mnee/release-it/"
41
+ methodology_covered:
42
+ - "Original stability patterns catalog"
43
+ - type: blog_post
44
+ title: "Documenting Architecture Decisions"
45
+ authors: ["Michael Nygard"]
46
+ year: 2011
47
+ url: "https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions"
48
+ methodology_covered:
49
+ - "ADR (Architecture Decision Record) format — Title, Status, Context, Decision, Consequences"
50
+ - "Originated the ADR format; widely adopted across software organizations"
51
+ verification_status: verified
52
+ description: "\"Everything fails. Every remote call can hang. Every integration point is a liability. Design your system to be stable in the presence of failure, not to assume failure away.\"…"
53
+ ---
54
+
55
+ # Michael Nygard
56
+
57
+ ## Signature
58
+
59
+ *"Everything fails. Every remote call can hang. Every integration point is a liability. Design your system to be stable in the presence of failure, not to assume failure away."* [ref:1]
60
+
61
+ Author of **Release It! Design and Deploy Production-Ready Software** (2nd ed 2018) [ref:1]. Coined the ADR (Architecture Decision Record) format in his 2011 blog post [ref:3]. The bassclef voice on production-grade software: the stability patterns that prevent cascading failures and the anti-patterns that cause them.
62
+
63
+ ## Core methods
64
+
65
+ - **Circuit breaker** — A stateful wrapper around an integration point (external API, database, downstream service). Three states: Closed (normal operation), Open (fast-fail all calls without attempting contact), Half-Open (probe with one call to test recovery). When the failure rate exceeds a threshold, the circuit opens. Callers fail fast rather than hanging. After a timeout, one call is allowed through; if it succeeds, the circuit closes. [ref:1]
66
+ - **Bulkhead** — Partition resources by concern so that failure in one partition cannot exhaust resources needed by another. Named after the ship bulkhead that prevents water ingress in one compartment from sinking the ship. In software: separate thread pools for different integrations, separate connection pools for different databases, separate queue workers for different job types. [ref:1]
67
+ - **Timeout** — Every remote call must have a timeout. A call with no timeout can block a thread indefinitely. Two values needed: connect timeout (how long to wait for connection), read timeout (how long to wait for response). Timeouts must be tuned: too short creates unnecessary failures; too long creates unacceptable UX. [ref:1]
68
+ - **Fail fast** — When a system knows it cannot fulfill a request (circuit open, connection pool exhausted, downstream service unavailable), it should fail immediately with a clear error rather than accepting the request and failing slowly. Fail fast enables callers to retry or redirect; slow failure degrades the entire system. [ref:1]
69
+
70
+ ## When to channel this luminary
71
+
72
+ When the system will integrate with any external dependency (databases, third-party APIs, downstream services, message queues) and failure modes of those integrations need explicit design. Nygard dominates production readiness reviews, architecture reviews before launch, and any system that must remain partially operational when integrations fail. Pair with Newman (service decomposition that creates the integration boundaries Nygard's patterns protect), Hohpe (integration patterns at the messaging layer), and Brown (ADRs for recording stability-pattern decisions).
73
+
74
+ INSTEAD of channeling Nygard for internal application logic: stability patterns are for integration points and external boundaries. Business logic, UI composition, and domain modeling are governed by Evans, Cockburn, and Cooper. Nygard's scope is the edges where your system meets systems you cannot control.
75
+
76
+ ## Stack translation
77
+
78
+ In Next.js + Prisma + external APIs (BizBuySell, Anthropic, email providers):
79
+
80
+ - **Circuit breaker** — wrap each external API client (BizBuySell scraper, Anthropic enrichment, email delivery) in a circuit breaker. When the API is unavailable or slow, the circuit opens; callers receive a fast failure and can queue the work for retry. Libraries: `opossum` (Node.js) or a simple state machine per integration.
81
+ - **Bulkhead** — BullMQ workers for enrichment, for email, and for scraping use separate queues with separate concurrency limits. A spike in enrichment work cannot starve the email workers.
82
+ - **Timeout** — every `fetch()` call to an external API uses `AbortSignal.timeout()`. Anthropic API calls that exceed 30s abort; enrichment jobs that exceed 60s fail and are retried. Prisma connection pool has an explicit pool timeout.
83
+ - **Fail fast** — server actions that depend on an unavailable service return a clear `503` rather than hanging. The UI shows a retry state rather than a spinner.
84
+ - **ADRs** — every stability-pattern decision is recorded in `architecture/decisions/`: "ADR-009: circuit breaker for BizBuySell API — context, decision, consequences." [ref:3]
85
+
86
+ ## Anti-patterns it prevents
87
+
88
+ - **Cascading failure** — a slow external API causes thread pool exhaustion, which causes queue buildup, which causes memory pressure, which causes the entire application to fail. Circuit breaker and bulkhead prevent this: failures stay contained within their integration boundary. [ref:1]
89
+ - **Blocked threads** — a database query or HTTP call with no timeout holds a thread indefinitely. Ten such calls block ten threads. The system accepts new requests it cannot service.
90
+ INSTEAD: set connect + read timeouts on every remote call; set a maximum wait in every queue consumer. Threads that time out release and become available for other work.
91
+ - **Self-denial** — the application triggers its own overload: a scheduled job fans out thousands of API calls simultaneously, the API rate-limits, all calls fail, the job retries them immediately, the rate-limit worsens. Circuit breaker + exponential backoff prevent the retry cascade. [ref:1]
92
+ - **Test harness gap** — the system was tested with a fast, reliable test double for every integration; production uses real integrations that are sometimes slow or unavailable. The failure paths were tested with mocks that never fail.
93
+ INSTEAD: include chaos tests (slow responses, connection drops, partial failures) in the integration test suite. The failure behavior must be verified, not assumed.
94
+
95
+ ## Worked example
96
+
97
+ For POA's BizBuySell scraper integration:
98
+
99
+ **The failure mode without patterns**: BizBuySell returns 503 for 5-10 minutes. The scraper worker holds ten open HTTP connections waiting for responses that will not arrive; the BullMQ queue backs up; the worker crashes; manual intervention is required.
100
+
101
+ **With stability patterns**:
102
+ 1. **Timeout**: every BizBuySell fetch has a 10-second timeout. After 10 seconds, the call fails with a timeout error.
103
+ 2. **Circuit breaker**: after five consecutive timeouts within 60 seconds, the circuit opens. All subsequent scrape attempts fail fast. The circuit enters Half-Open after 60 seconds and allows one probe call through.
104
+ 3. **Bulkhead**: the scraper uses a separate BullMQ queue (max 5 concurrent workers) from the enrichment queue (max 10 workers). A BizBuySell outage fills the scraper queue but cannot starve enrichment workers.
105
+ 4. **ADR**: "ADR-010: BizBuySell API stability patterns — context: BizBuySell has 99.5% SLA (~43 hours downtime/year). We need scraping to be non-blocking during outages. Decision: circuit breaker with 5-failure threshold, 60s recovery. Consequences: scrape jobs may lag 60s during recovery; acceptable given the non-real-time nature of scrape data."
106
+
107
+ ## Sources
108
+
109
+ - *Release It! Design and Deploy Production-Ready Software* — Nygard, Pragmatic Bookshelf (1st ed 2007, 2nd ed 2018) [ref:1][ref:2]
110
+ - "Documenting Architecture Decisions" — Nygard, cognitect.com blog (2011) — original ADR proposal [ref:3]
111
+ - thinkrelevance.com / cognitect.com — Nygard's primary writing venues (thinkrelevance.com was the predecessor domain to cognitect.com)
112
+
113
+ ## Related luminaries
114
+
115
+ - **Sam Newman** — Microservices create the service boundaries where Nygard's stability patterns apply. Newman decomposes; Nygard hardens the resulting integration points.
116
+ - **Gregor Hohpe** — EIP messaging patterns operate at the same integration boundaries. Hohpe's dead letter channels and Nygard's circuit breakers are complementary: messaging + stability.
117
+ - **Simon Brown** — ADR format (Nygard's invention) is central to Brown's architecture communication approach. C4 documents the structure; ADRs record the stability decisions.
118
+ - **Alistair Cockburn** — Hexagonal architecture creates explicit integration ports; Nygard's stability patterns wrap those ports.
@@ -0,0 +1,164 @@
1
+ ---
2
+ tier: lite
3
+ name: Robert C. Martin (Uncle Bob)
4
+ slug: robert-c-martin
5
+ claimed_by: [architect, 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: "Clean Code: A Handbook of Agile Software Craftsmanship"
12
+ authors: ["Robert C. Martin"]
13
+ year: 2008
14
+ url: "https://www.pearson.com/en-us/subject-catalog/p/clean-code-a-handbook-of-agile-software-craftsmanship/P200000009044"
15
+ isbn: "9780132350884"
16
+ methodology_covered:
17
+ - "Functions should do one thing and do it well"
18
+ - "Meaningful names + small functions + no comments needed"
19
+ - "Code smells inventory + remediation patterns"
20
+ - "Boy Scout rule — leave the code cleaner than you found it"
21
+ - type: book
22
+ title: "Clean Architecture: A Craftsman's Guide to Software Structure and Design"
23
+ authors: ["Robert C. Martin"]
24
+ year: 2017
25
+ url: "https://www.pearson.com/en-us/subject-catalog/p/clean-architecture-a-craftsmans-guide-to-software-structure-and-design/P200000009454"
26
+ isbn: "9780134494166"
27
+ methodology_covered:
28
+ - "The Dependency Rule — source code dependencies always point inward"
29
+ - "Business rules never import frameworks, UI, or databases"
30
+ - "Boundaries between layers minimize ripple effects from external changes"
31
+ - type: book
32
+ title: "Agile Software Development: Principles, Patterns, and Practices"
33
+ authors: ["Robert C. Martin"]
34
+ year: 2002
35
+ url: "https://www.pearson.com/en-us/subject-catalog/p/agile-software-development-principles-patterns-and-practices/P200000009250"
36
+ isbn: "9780135974445"
37
+ methodology_covered:
38
+ - "SOLID principles — Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion"
39
+ - "Original codification of the SOLID acronym and each principle"
40
+ - type: book
41
+ title: "The Clean Coder: A Code of Conduct for Professional Programmers"
42
+ authors: ["Robert C. Martin"]
43
+ year: 2011
44
+ url: "https://www.pearson.com/en-us/subject-catalog/p/clean-coder-the-a-code-of-conduct-for-professional-programmers/P200000009422"
45
+ isbn: "9780137081073"
46
+ methodology_covered:
47
+ - "Professional discipline — saying no, estimating honestly, practicing"
48
+ - "Programming as profession with codes of conduct"
49
+ verification_status: verified
50
+ description: "\"Architecture is about intent, not frameworks."
51
+ ---
52
+
53
+ # Robert C. Martin (Uncle Bob)
54
+
55
+ ## Signature
56
+
57
+ *"Architecture is about intent, not frameworks. The only way to go fast is to go well."*
58
+
59
+ Author of **Clean Code**, **Clean Architecture**, and **Clean Coder**.
60
+ Coined SOLID. The bassclef voice on code quality as a continuous
61
+ practice, not an end-of-project polish. We invoke Martin for SOLID,
62
+ boundaries, testability, and functions that do one thing.
63
+
64
+ ## Core methods
65
+
66
+ - **SOLID principles** — Single Responsibility, Open/Closed, Liskov
67
+ Substitution, Interface Segregation, Dependency Inversion. Five
68
+ rules for OO design that survive decades of reapplication.
69
+ - **Clean Architecture / Dependency Rule** — Source-code dependencies
70
+ always point inward toward higher-level policy. Business rules don't
71
+ know about frameworks, UI, or databases. Frameworks are plugins.
72
+ - **Boundaries as architecture** — Architecture's job is defining which
73
+ parts of the system are volatile and which are stable, and drawing
74
+ boundaries between them. Boundaries allow deferral of decisions.
75
+ - **Functions do one thing** — Small, single-purpose functions with
76
+ descriptive names. Longest function should fit on a screen.
77
+ - **Tests as first-class design constraint** — Code not written for
78
+ testability produces code that can't be tested. TDD is the practice
79
+ that enforces this discipline from the start.
80
+
81
+ ## When to channel this luminary
82
+
83
+ When the primary risk is code entropy — the product works today but
84
+ becomes unmaintainable tomorrow. Martin dominates for long-lived
85
+ codebases, teams that rotate, and systems that will be extended over
86
+ years. Pair with Fowler (refactoring, patterns) and Beck (TDD,
87
+ XP practices) for the engineering-quality triad.
88
+
89
+ Do NOT channel Martin for: throwaway prototypes, one-off scripts,
90
+ pure research code where cleanup isn't the point.
91
+
92
+ ## Stack translation
93
+
94
+ In Next.js + Prisma + TypeScript:
95
+
96
+ - **Single Responsibility** → one component per concern; extract
97
+ `useXHook` when a component has multiple reasons to change.
98
+ - **Open/Closed** → extend via props/config, not by modifying existing
99
+ components. Strategy pattern for varying behavior.
100
+ - **Liskov** → interface contracts respected across implementations.
101
+ React component prop types that subtypes must honor.
102
+ - **Interface Segregation** → component prop types that don't force
103
+ consumers to provide unneeded props. Split large prop types into
104
+ focused ones.
105
+ - **Dependency Inversion** → depend on interfaces, not concrete
106
+ services. Facade pattern + interface → enables test stubs and
107
+ provider swaps (see `/decompose` Phase 1 Interface Registry).
108
+ - **Clean Architecture** → business logic in `lib/services/`;
109
+ adapters in `lib/adapters/`; controllers in `app/api/` + `app/actions/`;
110
+ frameworks stay at the edges.
111
+
112
+ ## Anti-patterns it prevents
113
+
114
+ - **God components** — one component doing validation + business logic
115
+ + DB call + side effects. Violates Single Responsibility.
116
+ - **Framework coupling in business logic** — Prisma imports in
117
+ domain-logic files, React hooks in pure computation. Violates
118
+ Dependency Rule.
119
+ - **Feature envy** — a class/component that reaches into another's
120
+ internals. Signal the responsibility is mis-assigned.
121
+ - **Untested code** — if it's not covered, it's broken by default.
122
+ Covered code is the minimum bar.
123
+ - **Clever code** — concise-but-unreadable constructs. Clean Code
124
+ requires clarity over brevity.
125
+
126
+ ## Worked example
127
+
128
+ For POA's deal-scoring system:
129
+
130
+ Martin's approach:
131
+ - `ScoringService` (Pure Fabrication per GRASP + SRP per SOLID) —
132
+ orchestrates scoring, doesn't own score data
133
+ - `IScoringStrategy` interface — Open/Closed: new scoring rules as
134
+ new classes, not edits to existing code
135
+ - `WeightedScorer` / `BooleanScorer` / `MLScorer` — concrete strategies
136
+ - `ScoringController` as a thin server action — no business logic,
137
+ just wires strategy + service + response
138
+ - All of the above: unit tested. The service mocks the strategy; the
139
+ strategy is tested in isolation; the controller is tested with
140
+ service stub.
141
+
142
+ What Martin would NOT produce: a 400-line server action that directly
143
+ queries Prisma, applies scoring math inline, sends notifications, and
144
+ logs telemetry. That's every SOLID principle violated in one route.
145
+
146
+ ## Sources
147
+
148
+ - *Clean Code* — Martin, Prentice Hall (2008)
149
+ - *Clean Architecture* — Martin, Prentice Hall (2017)
150
+ - *The Clean Coder* — Martin (2011)
151
+ - *Agile Software Development: Principles, Patterns, and Practices* — Martin (2002)
152
+ - cleancoders.com — video series
153
+ - blog.cleancoder.com
154
+
155
+ ## Related luminaries
156
+
157
+ - **Martin Fowler** — Shared rigor; Fowler provides patterns + refactoring,
158
+ Martin provides principles. Pair always.
159
+ - **Kent Beck** — TDD discipline Martin endorses; Beck operational,
160
+ Martin principles.
161
+ - **Alistair Cockburn** — Hexagonal Architecture is a specific
162
+ implementation of Clean Architecture's boundary rule.
163
+ - **Gang of Four** — Martin recommends GoF patterns as implementation
164
+ vocabulary for SOLID principles.