@thebassclef/lite 0.0.1 → 0.1.2

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 (289) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +85 -4
  3. package/dist/cli.cjs +1612 -0
  4. package/dist/cli.js +1589 -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 +2701 -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/longrun-prep-compounding-axis-check.sh +492 -0
  21. package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +492 -0
  22. package/substrate/.claude/hooks/plain-english-steering.sh +156 -0
  23. package/substrate/.claude/hooks/post-skill-friction-check.sh +177 -0
  24. package/substrate/.claude/hooks/post-skill-telemetry.sh +62 -0
  25. package/substrate/.claude/hooks/pre-build-gate.sh +511 -0
  26. package/substrate/.claude/hooks/pre-commit-gate.sh +451 -0
  27. package/substrate/.claude/hooks/session-end.sh +433 -0
  28. package/substrate/.claude/hooks/session-reflection.sh +303 -0
  29. package/substrate/.claude/hooks/skill-body-grade-gate.sh +219 -0
  30. package/substrate/.claude/hooks/skill-body-intent-drift.sh +107 -0
  31. package/substrate/.claude/hooks/skill-step-list-check.sh +171 -0
  32. package/substrate/.claude/hooks/state-validate.sh +271 -0
  33. package/substrate/.claude/hooks/substrate-clarity-gate.sh +1110 -0
  34. package/substrate/.claude/hooks/temperance-gate.sh +147 -0
  35. package/substrate/.claude/hooks/testing-tier-enforce.sh +233 -0
  36. package/substrate/.claude/hooks/turn-prose-grade-measure.sh +219 -0
  37. package/substrate/.claude/hooks/turn-prose-kiss-check.sh +463 -0
  38. package/substrate/.claude/hooks/vocabulary-migration-check.sh +171 -0
  39. package/substrate/.claude/hooks/whereami-utc-gate.sh +142 -0
  40. package/substrate/.claude/luminaries/alan-cooper.md +170 -0
  41. package/substrate/.claude/luminaries/alistair-cockburn.md +140 -0
  42. package/substrate/.claude/luminaries/amazon-pr-faq.md +34 -0
  43. package/substrate/.claude/luminaries/ash-maurya.md +121 -0
  44. package/substrate/.claude/luminaries/bill-buxton.md +210 -0
  45. package/substrate/.claude/luminaries/charles-sanders-peirce.md +150 -0
  46. package/substrate/.claude/luminaries/david-ogilvy.md +192 -0
  47. package/substrate/.claude/luminaries/don-norman.md +173 -0
  48. package/substrate/.claude/luminaries/edward-tufte.md +179 -0
  49. package/substrate/.claude/luminaries/eric-evans.md +160 -0
  50. package/substrate/.claude/luminaries/frederick-brooks.md +50 -0
  51. package/substrate/.claude/luminaries/gang-of-four.md +157 -0
  52. package/substrate/.claude/luminaries/glenford-myers.md +230 -0
  53. package/substrate/.claude/luminaries/hunt-thomas.md +115 -0
  54. package/substrate/.claude/luminaries/hyrum-wright.md +94 -0
  55. package/substrate/.claude/luminaries/jason-fried-dhh.md +46 -0
  56. package/substrate/.claude/luminaries/jesse-james-garrett.md +154 -0
  57. package/substrate/.claude/luminaries/john-ousterhout.md +94 -0
  58. package/substrate/.claude/luminaries/karl-popper.md +132 -0
  59. package/substrate/.claude/luminaries/kent-beck.md +168 -0
  60. package/substrate/.claude/luminaries/linus-torvalds.md +218 -0
  61. package/substrate/.claude/luminaries/martin-fowler.md +164 -0
  62. package/substrate/.claude/luminaries/michael-feathers.md +125 -0
  63. package/substrate/.claude/luminaries/michael-nygard.md +118 -0
  64. package/substrate/.claude/luminaries/robert-c-martin.md +164 -0
  65. package/substrate/.claude/luminaries/saltzer-schroeder.md +194 -0
  66. package/substrate/.claude/luminaries/sophia-prater.md +193 -0
  67. package/substrate/.claude/luminaries/stephen-toulmin.md +131 -0
  68. package/substrate/.claude/luminaries/tony-hoare.md +170 -0
  69. package/substrate/.claude/luminaries/vaughn-vernon.md +50 -0
  70. package/substrate/.claude/luminaries/w-edwards-deming.md +158 -0
  71. package/substrate/.claude/rules/accessor-library-discipline.md +138 -0
  72. package/substrate/.claude/rules/adr-discipline.md +120 -0
  73. package/substrate/.claude/rules/api-conventions.md +125 -0
  74. package/substrate/.claude/rules/artifact-ingestion.md +179 -0
  75. package/substrate/.claude/rules/assert-only-after-verify.md +137 -0
  76. package/substrate/.claude/rules/blocked-items.md +146 -0
  77. package/substrate/.claude/rules/bootstrap-pair-discipline.md +141 -0
  78. package/substrate/.claude/rules/branching.md +28 -0
  79. package/substrate/.claude/rules/cold-adopter-harness-discipline.md +129 -0
  80. package/substrate/.claude/rules/commit-conventions.md +22 -0
  81. package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +188 -0
  82. package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +188 -0
  83. package/substrate/.claude/rules/context-engineering.md +202 -0
  84. package/substrate/.claude/rules/context-management.md +85 -0
  85. package/substrate/.claude/rules/defensive-bash.md +68 -0
  86. package/substrate/.claude/rules/deferred-actions.md +233 -0
  87. package/substrate/.claude/rules/destructive-operations.md +69 -0
  88. package/substrate/.claude/rules/diagnosis.md +38 -0
  89. package/substrate/.claude/rules/github-issue-flash-tweet.md +156 -0
  90. package/substrate/.claude/rules/guardrails.md +73 -0
  91. package/substrate/.claude/rules/hook-wire-on-author.md +103 -0
  92. package/substrate/.claude/rules/identifier-leak-prevention.md +104 -0
  93. package/substrate/.claude/rules/iteration-bet-brief-completeness.md +54 -0
  94. package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +98 -0
  95. package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +89 -0
  96. package/substrate/.claude/rules/loop-discipline.md +81 -0
  97. package/substrate/.claude/rules/manual-prod-approval.md +100 -0
  98. package/substrate/.claude/rules/marker-enrichment-discipline.md +99 -0
  99. package/substrate/.claude/rules/mobile-ephemeral-session.md +109 -0
  100. package/substrate/.claude/rules/new-dependency-check.md +51 -0
  101. package/substrate/.claude/rules/oo-ad-entry-point.md +117 -0
  102. package/substrate/.claude/rules/operator-facing-prose.md +196 -0
  103. package/substrate/.claude/rules/option-label-discipline.md +108 -0
  104. package/substrate/.claude/rules/pattern-annotation.md +100 -0
  105. package/substrate/.claude/rules/plain-english-discipline.md +156 -0
  106. package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +211 -0
  107. package/substrate/.claude/rules/pr-body-shape.md +317 -0
  108. package/substrate/.claude/rules/pr-strategy.md +167 -0
  109. package/substrate/.claude/rules/pr-title-shape.md +161 -0
  110. package/substrate/.claude/rules/prototype-workflow.md +65 -0
  111. package/substrate/.claude/rules/reserved-skill-names.md +123 -0
  112. package/substrate/.claude/rules/schema-management.md +49 -0
  113. package/substrate/.claude/rules/sdlc-gates.md +149 -0
  114. package/substrate/.claude/rules/security.md +37 -0
  115. package/substrate/.claude/rules/session-artifacts.md +236 -0
  116. package/substrate/.claude/rules/skill-composition-declarations.md +124 -0
  117. package/substrate/.claude/rules/skill-description-clarity.md +247 -0
  118. package/substrate/.claude/rules/skill-procedure-step-list.md +137 -0
  119. package/substrate/.claude/rules/state-schema-validation.md +162 -0
  120. package/substrate/.claude/rules/stuck-signal-diagnostic.md +140 -0
  121. package/substrate/.claude/rules/substrate-config-schema.md +98 -0
  122. package/substrate/.claude/rules/test-list-discipline.md +175 -0
  123. package/substrate/.claude/rules/test-sufficiency.md +210 -0
  124. package/substrate/.claude/rules/testing-tier-config.md +145 -0
  125. package/substrate/.claude/rules/testing.md +38 -0
  126. package/substrate/.claude/rules/turn-estimate-grounding.md +134 -0
  127. package/substrate/.claude/rules/visual-hierarchy.md +437 -0
  128. package/substrate/.claude/rules/we-dont-break-adopters.md +126 -0
  129. package/substrate/.claude/rules/whereami-load-bearing.md +202 -0
  130. package/substrate/.claude/rules/writing-craft-discipline.md +92 -0
  131. package/substrate/.claude/rules/wu-sequencing-compounds.md +145 -0
  132. package/substrate/.claude/skills/build/SKILL.md +640 -0
  133. package/substrate/.claude/skills/chronicle/SKILL.md +55 -0
  134. package/substrate/.claude/skills/clean-artifacts/SKILL.md +249 -0
  135. package/substrate/.claude/skills/decompose/SKILL.md +280 -0
  136. package/substrate/.claude/skills/diagnose/SKILL.md +297 -0
  137. package/substrate/.claude/skills/feynman/SKILL.md +90 -0
  138. package/substrate/.claude/skills/howdoi/SKILL.md +105 -0
  139. package/substrate/.claude/skills/ia-model/SKILL.md +108 -0
  140. package/substrate/.claude/skills/interaction-design/SKILL.md +112 -0
  141. package/substrate/.claude/skills/interpret-input/SKILL.md +180 -0
  142. package/substrate/.claude/skills/journal/SKILL.md +209 -0
  143. package/substrate/.claude/skills/kiss/SKILL.md +449 -0
  144. package/substrate/.claude/skills/launch/SKILL.md +915 -0
  145. package/substrate/.claude/skills/lean-canvas/SKILL.md +332 -0
  146. package/substrate/.claude/skills/longrun/SKILL.md +463 -0
  147. package/substrate/.claude/skills/luminary/SKILL.md +481 -0
  148. package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
  149. package/substrate/.claude/skills/onboard-repo/SKILL.md +1624 -0
  150. package/substrate/.claude/skills/pattern-review/SKILL.md +99 -0
  151. package/substrate/.claude/skills/personas/SKILL.md +207 -0
  152. package/substrate/.claude/skills/promote/SKILL.md +283 -0
  153. package/substrate/.claude/skills/requirement/SKILL.md +98 -0
  154. package/substrate/.claude/skills/retro/SKILL.md +117 -0
  155. package/substrate/.claude/skills/riff/SKILL.md +114 -0
  156. package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
  157. package/substrate/.claude/skills/session-end/SKILL.md +309 -0
  158. package/substrate/.claude/skills/session-log/SKILL.md +299 -0
  159. package/substrate/.claude/skills/skills/SKILL.md +228 -0
  160. package/substrate/.claude/skills/spec/SKILL.md +105 -0
  161. package/substrate/.claude/skills/sprint/SKILL.md +392 -0
  162. package/substrate/.claude/skills/stage/SKILL.md +384 -0
  163. package/substrate/.claude/skills/state-a-problem/SKILL.md +185 -0
  164. package/substrate/.claude/skills/temperance/SKILL.md +108 -0
  165. package/substrate/.claude/skills/use-case/SKILL.md +417 -0
  166. package/substrate/.claude/skills/user-stories/SKILL.md +268 -0
  167. package/substrate/.claude/skills/value-prop/SKILL.md +251 -0
  168. package/substrate/.claude/skills/verify/SKILL.md +160 -0
  169. package/substrate/.claude/skills/visual-review/SKILL.md +503 -0
  170. package/substrate/.claude/skills/whats-the-plan/SKILL.md +202 -0
  171. package/substrate/.claude/skills/whereami/SKILL.md +307 -0
  172. package/substrate/AGENTS.md +79 -0
  173. package/substrate/CLAUDE-lite.md +85 -0
  174. package/substrate/CODE_OF_CONDUCT.md +28 -0
  175. package/substrate/CONTRIBUTING.md +177 -0
  176. package/substrate/README.md +173 -0
  177. package/substrate/SECURITY.md +19 -0
  178. package/substrate/architecture/decisions/ADR-029-release-pipeline.md +79 -0
  179. package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
  180. package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
  181. package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
  182. package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
  183. package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
  184. package/substrate/lib/clean-artifacts-sweep.sh +112 -0
  185. package/substrate/lib/code-comment-discipline.sh +144 -0
  186. package/substrate/lib/composer-preflight.sh +459 -0
  187. package/substrate/lib/hook-inject.sh +255 -0
  188. package/substrate/lib/luminary-pick.sh +96 -0
  189. package/substrate/lib/output-discipline.sh +143 -0
  190. package/substrate/lib/prose-scan-boundary.sh +171 -0
  191. package/substrate/lib/rewrite-check.sh +214 -0
  192. package/substrate/lib/state.sh +1372 -0
  193. package/substrate/lib/telemetry.sh +205 -0
  194. package/substrate/lib/tier-check.sh +187 -0
  195. package/substrate/lib/tier-dependency-audit.sh +1088 -0
  196. package/substrate/presence/install/bassclef-hook-connect.sh +178 -0
  197. package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
  198. package/substrate/presence/install/bassclef-sync.template.sh +2076 -0
  199. package/substrate/presence/install/schedule-auto-save.cron.sh +88 -0
  200. package/substrate/presence/install/schedule-auto-save.taskscheduler.md +122 -0
  201. package/substrate/scripts/aggregate-telemetry.sh +217 -0
  202. package/substrate/scripts/analyze-tier-dependencies.sh +239 -0
  203. package/substrate/scripts/generate-lite-manifest.sh +505 -0
  204. package/substrate/scripts/generate-tier-manifest.sh +28 -0
  205. package/substrate/scripts/intent-drift-check.sh +456 -0
  206. package/substrate/scripts/lite-manifest-drift-check.sh +146 -0
  207. package/substrate/scripts/render-lite-manifest-doc.sh +150 -0
  208. package/substrate/standards/adr-template.md +86 -0
  209. package/substrate/standards/api-conventions/nextjs.md +84 -0
  210. package/substrate/standards/artifact-composition.md +209 -0
  211. package/substrate/standards/bash-hook-safety.md +246 -0
  212. package/substrate/standards/bassclef-configs-schema.md +232 -0
  213. package/substrate/standards/bassclef-evolution.md +143 -0
  214. package/substrate/standards/bassclef-internal-jargon.md +244 -0
  215. package/substrate/standards/bassclef-managed-sentinel.md +96 -0
  216. package/substrate/standards/bassclef-source-config.md +228 -0
  217. package/substrate/standards/branch-stacking.md +408 -0
  218. package/substrate/standards/code-safety-principles.md +176 -0
  219. package/substrate/standards/composer-prerequisites.md +155 -0
  220. package/substrate/standards/deferred-actions-schema.md +204 -0
  221. package/substrate/standards/dependency-discipline/cargo.md +39 -0
  222. package/substrate/standards/dependency-discipline/gem.md +43 -0
  223. package/substrate/standards/dependency-discipline/go-mod.md +41 -0
  224. package/substrate/standards/dependency-discipline/npm.md +42 -0
  225. package/substrate/standards/dependency-discipline/pip.md +42 -0
  226. package/substrate/standards/deployment-topology/ec2-tailscale.md +225 -0
  227. package/substrate/standards/deployment-topology.md +69 -0
  228. package/substrate/standards/docs-sync-allowlist.md +76 -0
  229. package/substrate/standards/domain-and-dns.md +145 -0
  230. package/substrate/standards/frontend-stack.md +67 -0
  231. package/substrate/standards/frontmatter-schema.md +154 -0
  232. package/substrate/standards/graceful-exit.md +227 -0
  233. package/substrate/standards/hook-idempotency.md +102 -0
  234. package/substrate/standards/hook-injection-discipline.md +202 -0
  235. package/substrate/standards/hook-install-class.md +215 -0
  236. package/substrate/standards/input-handler-interface.md +152 -0
  237. package/substrate/standards/lite-manifest-schema-changes.md +135 -0
  238. package/substrate/standards/luminary-matching.md +105 -0
  239. package/substrate/standards/luminary-problem-patterns.md +481 -0
  240. package/substrate/standards/migration-discipline/active-record.md +50 -0
  241. package/substrate/standards/migration-discipline/alembic.md +43 -0
  242. package/substrate/standards/migration-discipline/gorm.md +50 -0
  243. package/substrate/standards/migration-discipline/prisma.md +53 -0
  244. package/substrate/standards/migration-discipline/sqlalchemy.md +51 -0
  245. package/substrate/standards/mobile-ephemeral-session.md +167 -0
  246. package/substrate/standards/model-routing-discipline.md +160 -0
  247. package/substrate/standards/ogilvy-writing-rules.md +225 -0
  248. package/substrate/standards/opener-discipline.md +96 -0
  249. package/substrate/standards/operator-facing-prose-discipline.md +201 -0
  250. package/substrate/standards/persona-schema.md +229 -0
  251. package/substrate/standards/pluggable-luminaries.md +323 -0
  252. package/substrate/standards/pr-body-discipline.md +115 -0
  253. package/substrate/standards/preview-state-schema.md +189 -0
  254. package/substrate/standards/project-directory-layout.md +276 -0
  255. package/substrate/standards/release-tagging.md +137 -0
  256. package/substrate/standards/reserved-skill-names.md +120 -0
  257. package/substrate/standards/scannable-multi-option-output.md +261 -0
  258. package/substrate/standards/sdlc-compliance.md +286 -0
  259. package/substrate/standards/sdlc-gates/typescript.md +57 -0
  260. package/substrate/standards/secrets-lifecycle.md +210 -0
  261. package/substrate/standards/security-scanner-adapter.md +145 -0
  262. package/substrate/standards/session-board.md +256 -0
  263. package/substrate/standards/skill-output-discipline.md +90 -0
  264. package/substrate/standards/state-spine-contract.md +255 -0
  265. package/substrate/standards/state-spine.md +511 -0
  266. package/substrate/standards/steering-hints/kiss-words.md +11 -0
  267. package/substrate/standards/substrate-config-schema.md +267 -0
  268. package/substrate/standards/tech-stack-config.md +109 -0
  269. package/substrate/standards/tier-dependency-analysis.md +167 -0
  270. package/substrate/standards/tier-runtime-deps/lite.md +57 -0
  271. package/substrate/standards/tier-tag-schema.md +155 -0
  272. package/substrate/standards/two-layer-config.md +99 -0
  273. package/substrate/standards/use-case-format.md +292 -0
  274. package/substrate/standards/user-story-invest.md +268 -0
  275. package/substrate/standards/velocity-and-appetite.md +229 -0
  276. package/substrate/standards/voice-input-pattern.md +119 -0
  277. package/substrate/standards/whereami-schema.md +301 -0
  278. package/substrate/standards/worktree-management.md +211 -0
  279. package/substrate/standards/writing-guide.md +213 -0
  280. package/substrate/templates/chronicle-template.md +75 -0
  281. package/substrate/templates/deferred-action-template.md +45 -0
  282. package/substrate/templates/memory-proposal-template.md +77 -0
  283. package/substrate/templates/persona-template.md +200 -0
  284. package/substrate/templates/pr-faq.md +45 -0
  285. package/substrate/templates/secret-rotation-template.md +162 -0
  286. package/substrate/templates/spec-template.md +131 -0
  287. package/substrate/templates/use-case-template.md +194 -0
  288. package/substrate/templates/user-story-template.md +107 -0
  289. package/substrate/templates/whereami-template.md +101 -0
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: chronicle
3
+ description: "Write the session log \u2014 alias for /session-log during the grace window through 2026-10-31. Renamed per ADR-040 Decision 1. Both names resolve to the same behavior; after grace ends, only /session-log resolves."
4
+ problem: "Grace-window sessions still call for /chronicle. New alias for /session-log keeps both live."
5
+ value: "Writes the session log through the grace window. Same output as /session-log."
6
+ inputs: [Optional session or goal ref]
7
+ outputs: [Session log entry at chronicle/*]
8
+ tier: lite
9
+ user_invocable: true
10
+ disable_model_invocation: false
11
+ modes: [default]
12
+ composes_with: [session-log]
13
+ ---
14
+
15
+ # /chronicle (alias — renamed to /session-log)
16
+
17
+ ## What you get
18
+
19
+ `/chronicle` is the old name for `/session-log`. It still works during the grace window through 2026-10-31 per ADR-031 and `.claude/rules/we-dont-break-adopters.md`. Both names produce the same session log entry with the same shape and the same Gate Evidence table.
20
+
21
+ The rename is per ADR-040 Decision 1 (planning-skill vocabulary rewrite). "Chronicle" was borrowed from Ryan Singer's Shape Up; "session log" reads plain per Krug and Cooper consultations documented at ADR-040.
22
+
23
+ ## When to use it
24
+
25
+ Prefer `/session-log`. Existing operator habit or existing scripts that call `/chronicle` still work through the grace window. After 2026-10-31 the alias stops resolving; migrate to `/session-log` before then.
26
+
27
+ ## What this alias does
28
+
29
+ Runs the same procedure as `/session-log`. See `.claude/skills/session-log/SKILL.md` for the full body. Both files ship the same behavior during the grace window; the pointer in `standards/file-renames.json` records the rename.
30
+
31
+ ## Grace window details
32
+
33
+ - **Renamed at:** 2026-07-17 per ADR-040
34
+ - **Alias active until:** 2026-10-31
35
+ - **After grace window:** `/chronicle` invocation returns "unknown skill"; only `/session-log` resolves
36
+ - **Registered in:** `standards/file-renames.json`
37
+ - **Fixture test:** `.claude/hooks/tests/fixtures/adopter-2026-07-17-chronicle-rename/` per `.claude/rules/file-rename-discipline.md`
38
+ - **Artifact directory names:** stay as `chronicle/` (bassclef) and `docs/chronicle/` (app repos) during this window. A separate migration handles the directory rename after the SKILL rename settles.
39
+
40
+ ## Composes with
41
+
42
+ - `/session-log` — canonical name; this file is the alias
43
+ - `/session-end` — the closeout skill that calls the log entry as part of the MUST tier
44
+
45
+ ## Refs
46
+
47
+ - ADR-040 planning-skill vocabulary and lite profile
48
+ - `.claude/rules/we-dont-break-adopters.md` — grace window discipline
49
+ - `.claude/rules/file-rename-discipline.md` — rename registration
50
+ - `standards/file-renames.json` — this rename registered here
51
+ - `.claude/skills/session-log/SKILL.md` — canonical target
52
+
53
+ ## Output discipline
54
+
55
+ Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
@@ -0,0 +1,249 @@
1
+ ---
2
+ tier: lite
3
+ name: clean-artifacts
4
+ description: "Sweep workflow exhaust from the repo (stale verify markers, old Playwright screenshots, expired SDLC traces). Strict allowlist; never touches git-tracked files or critical artifacts. Dry-run by default. Runs standalone or via /session-end."
5
+ problem: "Workflow exhaust piles up \u2014 stale verify markers, old screenshots, expired SDLC traces."
6
+ value: "Sweeps three classes of exhaust from the working tree. Idempotent. Safe by exclusion list."
7
+ inputs: [Optional --dry-run flag]
8
+ outputs: [Files removed by class, Skipped safety-list entries, Total space reclaimed]
9
+ user_invocable: true
10
+ disable_model_invocation: false
11
+ ---
12
+
13
+ # /clean-artifacts — Workflow Exhaust Sweeper
14
+
15
+ Over time, bassclef-substrate repos accumulate workflow exhaust in
16
+ predictable locations:
17
+
18
+ - `state/markers/verify/` files for merged branches (`/verify` leftovers)
19
+ - `.playwright-mcp/` screenshots from old visual reviews
20
+ - `docs/sdlc-traces/` hook-output logs from prior sessions
21
+ - `/tmp/claude-*` markers belonging to expired sessions
22
+ - `.test-baseline` and similar transient verify outputs at repo root
23
+
24
+ None of these are load-bearing once their session ends. None are
25
+ git-tracked (all covered by `.gitignore`). But without an explicit
26
+ sweep, they rot in place.
27
+
28
+ `/clean-artifacts` does the sweep. **Strict allowlist** — only touches
29
+ paths this skill knows about. **Dry-run default** — requires explicit
30
+ `--delete` flag to actually remove anything. **Age-gated** — never
31
+ touches files newer than configurable thresholds (default 7 days).
32
+
33
+ ## When to use
34
+
35
+ - At session-end (hooked via `/session-end` May tier — see below)
36
+ - Ad-hoc, when repo root feels cluttered
37
+ - Before a long flight / offline period when you want to reduce
38
+ checkout size
39
+ - After merging many PRs — verify-markers for merged branches pile up
40
+
41
+ ## When NOT to use
42
+
43
+ - When investigating an issue that might reference recent markers
44
+ (keep evidence intact until resolved)
45
+ - Immediately after `/verify` — the marker you just wrote is fresh
46
+ and load-bearing for the pre-commit gate
47
+ - Before `/session-end` runs its Must tier (sweep happens AFTER
48
+ chronicle + whereami are written, never before)
49
+
50
+ ## Usage
51
+
52
+ ```
53
+ /clean-artifacts → dry-run; list what would be removed
54
+ /clean-artifacts dry-run → same as default
55
+ /clean-artifacts --delete → actually remove files
56
+ /clean-artifacts --age=3 → override age threshold (default 7 days)
57
+ /clean-artifacts --delete --age=14 → combine flags
58
+ ```
59
+
60
+ ## Implementation
61
+
62
+ As of goal `2026-08-25-tier-consistency-clean-artifacts-inline`, the sweep logic lives in `lib/clean-artifacts-sweep.sh`. The lib is a shared deep module. Both this skill and `/session-end` (lite tier) source it. The skill body wraps the lib with dry-run default plus the operator-facing dispatch surface.
63
+
64
+ To invoke the lib directly:
65
+
66
+ ```bash
67
+ source lib/clean-artifacts-sweep.sh
68
+ clean_artifacts_sweep # dry-run
69
+ clean_artifacts_sweep --delete # remove files
70
+ clean_artifacts_sweep --age=14 # override age threshold
71
+ ```
72
+
73
+ The strict allowlist, safety list, and refusal thresholds live inside the lib. See `docs/decompositions/2026-08-25-clean-artifacts-sweep.md` for the responsibility model + interface contract. See `lib/tests/clean-artifacts-sweep.test.sh` for Tier 0 tests.
74
+
75
+ ## Clean targets (strict allowlist)
76
+
77
+ The skill NEVER touches anything outside this list.
78
+
79
+ | Path | What | Age gate | Notes |
80
+ |------|------|----------|-------|
81
+ | `state/markers/verify/*.marker` | `/verify` markers for branches | >7d default | Skip markers matching current branch |
82
+ | `.playwright-mcp/*.png` | Playwright screenshots | >7d default | Skip if referenced by open visual-review |
83
+ | `.playwright-mcp/*.yaml` | Playwright trace snapshots | >7d default | — |
84
+ | `docs/sdlc-traces/*.log` | SDLC hook traces | >30d default | Longer keep for audit |
85
+ | `/tmp/claude-verify-*` | Temp verify markers (machine-local) | any age | Current branch marker excluded |
86
+ | `/tmp/claude-session-timing-*` | Session timing files | >1d | Current session's excluded |
87
+ | `*.test-baseline` (repo root only) | Transient vitest baseline output | any age | Only at root — never in test dirs |
88
+
89
+ ### NEVER touched (safety list — explicit exclusions)
90
+
91
+ | Path | Why excluded |
92
+ |------|-------------|
93
+ | `.claude/CHECKPOINT.md` | Load-bearing for graceful-exit recovery |
94
+ | `.claude/SESSION_LOCK` | Only removed by save-state.sh or session-end |
95
+ | `.claude/LAST_SAVE` | Referenced by session-start hook |
96
+ | `state/markers/verify/<current-branch>.marker` | Fresh; pre-commit gate depends on it |
97
+ | Any git-tracked file | Git history is authority |
98
+ | `docs/chronicle/**` | Chronicles are permanent record |
99
+ | `docs/whereami.md` | Load-bearing project state |
100
+ | `docs/operator-private/journals/**` | Pending push to Google Doc |
101
+ | `docs/iteration-bets/**` | Active + historical goal records |
102
+ | `docs/decompositions/**` | Decomposition artifacts |
103
+ | `docs/designs/**` | Design docs |
104
+ | `docs/release-notes/**` | Release history |
105
+ | `research/**` | Spike output (ignored by git but kept locally) |
106
+
107
+ Any target not in the clean-targets table is untouched — no matter
108
+ how old, no matter how unused-looking. Safety before tidiness.
109
+
110
+ ## Procedure
111
+
112
+ ### Step 1: Enumerate candidates
113
+
114
+ For each clean-target path, glob the matching files. Apply the age
115
+ gate (skip files modified within the threshold). Apply the
116
+ never-touched exclusions.
117
+
118
+ Emit to stdout:
119
+
120
+ ```
121
+ ## Clean-artifacts dry-run — [timestamp]
122
+
123
+ **Clean targets** (would remove with --delete):
124
+
125
+ state/markers/verify/ (5 candidates, >7d):
126
+ feature-150-xxx.marker (12d old)
127
+ feature-152-xxx.marker (18d old)
128
+ ...
129
+
130
+ .playwright-mcp/ (3 candidates, >7d):
131
+ review-2026-04-05.png (13d old)
132
+ ...
133
+
134
+ **Skipped** (protected):
135
+
136
+ state/markers/verify/feature-176-stack-3-clean-artifacts.marker
137
+ (current branch marker — protected)
138
+ .claude/CHECKPOINT.md (load-bearing, never cleaned)
139
+
140
+ **Summary**
141
+ - 8 files would be removed (~240KB)
142
+ - Run with --delete to proceed
143
+ ```
144
+
145
+ ### Step 2: Safety checks (if --delete)
146
+
147
+ Before actually deleting, perform these checks:
148
+
149
+ 1. Confirm current branch marker is in the skip list
150
+ 2. Confirm `.claude/CHECKPOINT.md` was not flagged
151
+ 3. Count candidates — if >100, refuse and surface a warning
152
+ ("unexpected volume; inspect clean-targets table before overriding")
153
+ 4. Check total size — if >50MB, refuse similarly
154
+ 5. If any path outside clean-targets table appears, abort — bug in
155
+ the skill, not a situation to override
156
+
157
+ ### Step 3: Delete (only if --delete)
158
+
159
+ Iterate the candidate list, remove each file. Log each removal. On
160
+ any error, stop and report partial state — never continue past an
161
+ unexpected failure.
162
+
163
+ ### Step 4: Report
164
+
165
+ ```
166
+ ## Clean-artifacts complete — [timestamp]
167
+
168
+ Removed: N files (~M KB)
169
+ Skipped: N protected
170
+ Errors: N (details below if any)
171
+ ```
172
+
173
+ ## Session-end integration
174
+
175
+ `/clean-artifacts` is invoked at the end of `/session-end`'s May
176
+ tier — AFTER chronicle, whereami, journal entries, and tag push
177
+ have all completed. Never before.
178
+
179
+ Rationale: May tier is conditional and best-effort. If `/session-end`
180
+ is in a degraded state (timeout pending, network flaky), skipping the
181
+ sweep is fine. Chronicle + whereami are not.
182
+
183
+ The `/session-end` SKILL.md May tier should include:
184
+
185
+ ```markdown
186
+ 11. **Clean workflow exhaust** (May — conditional)
187
+ Run /clean-artifacts --delete to sweep stale markers, screenshots,
188
+ and traces. Dry-run first if session was unusual (spikes, aborts).
189
+ ```
190
+
191
+ ## Hook integration (optional, future)
192
+
193
+ A mechanical helper could live at `.claude/hooks/clean-artifacts.sh`
194
+ that invokes the skill's dry-run logic deterministically without
195
+ requiring the agent. Not required for v1; skill invocation from
196
+ `/session-end` is sufficient.
197
+
198
+ ## Rules
199
+
200
+ - **Dry-run is the default.** `--delete` must be explicit.
201
+ - **Strict allowlist only.** If a path isn't in the clean-targets
202
+ table, don't clean it.
203
+ - **Never touch git-tracked files.** Check with `git ls-files` before
204
+ deleting. Even if a git-tracked file matches a clean-target glob,
205
+ skip it and report.
206
+ - **Age gate before delete.** Every clean-target has a minimum age;
207
+ never delete fresh files.
208
+ - **Current-session markers protected.** Current branch's verify
209
+ marker, current session's timing file, the active `.claude/SESSION_LOCK`.
210
+ - **Report on every sweep.** Even if no candidates found, emit a
211
+ one-line "nothing to clean" so the operator knows the sweep ran.
212
+
213
+ ## Common pitfalls
214
+
215
+ - **Running during active verify**: if `/verify` just wrote a marker
216
+ and you run `/clean-artifacts --delete --age=0`, that marker could
217
+ disappear before the pre-commit hook reads it. Always respect the
218
+ age gate.
219
+ - **Expanding the clean-targets table without safety review**: adding
220
+ a path is a one-way door if files were already deleted. Require a
221
+ review against the NEVER touched list before expanding.
222
+ - **Running in CI**: CI runs are ephemeral; the checkout is a fresh
223
+ clone. Sweep is wasted work there. Don't wire this into CI
224
+ pipelines.
225
+
226
+ ## Relationship to other skills
227
+
228
+ | Skill | Relationship |
229
+ |-------|-------------|
230
+ | `/session-end` | Composer includes `/clean-artifacts` as May-tier step |
231
+ | `/verify` | Writes markers; `/clean-artifacts` cleans stale ones (different lifetime) |
232
+ | `/substrate-check` | Validates wiring; doesn't clean |
233
+ | `/visual-review` | Writes screenshots; `/clean-artifacts` ages them out |
234
+
235
+ ## Why this skill exists
236
+
237
+ Observed across multiple bassclef + POA sessions: verify-markers for
238
+ merged branches accumulate indefinitely. Playwright screenshots from
239
+ old visual reviews sit in `.playwright-mcp/` until manually removed.
240
+ SDLC traces grow without bound. Each is individually small; collectively
241
+ they make `git status` noisy and `du` numbers embarrassing.
242
+
243
+ Codified from `/onboard-repo`'s observation that repo roots in new
244
+ consumer repos start clean but accumulate exhaust rapidly. Rather
245
+ than ask each operator to sweep manually, give them one command.
246
+
247
+ ## Output discipline
248
+
249
+ Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
@@ -0,0 +1,280 @@
1
+ ---
2
+ tier: lite
3
+ name: decompose
4
+ description: "Audit responsibilities before you build. Reads sequence diagrams. Assigns GRASP roles. Identifies interfaces. Audits cross-cutting concerns. Selects patterns from GoF, Fowler, and stack idioms. Bridges design and build."
5
+ problem: "Cross-cutting concerns bolt into implementations. Logging and tracing pile inside business code."
6
+ value: "A responsibility matrix that keeps each concern in its own class. Decorators stay clean."
7
+ inputs: [Sequence diagrams from spec, A decomposition target — feature or defect]
8
+ outputs: [Responsibility matrix, Interface registry, Pattern map for construction]
9
+ user_invocable: true
10
+ disable_model_invocation: false
11
+ composes_with: [spec, ia-model, interaction-design, pattern-review, temperance]
12
+ ---
13
+
14
+ # /decompose
15
+
16
+ ## What you get
17
+
18
+ A responsibility matrix + interface registry + pattern map for any non-trivial construction work. Three phases — GRASP responsibility assignment with mandatory interface names, coupling / variation / stability audit plus cross-cutting concerns (the -ilities), and pattern selection from GoF / Fowler / DDD / Clean Architecture vocabularies. The output answers "who handles what, through which interfaces, with what cross-cutting concerns" before the Builder writes a line of code.
19
+
20
+ Key principle: GRASP is applied literally, not conceptually. Every Indirection and Protected Variation assignment MUST produce a named interface. Every cross-cutting concern (observability, testability, extensibility, security, cacheability) MUST be identified in the NFR check and resolved as a Decorator or Proxy wrapping an interface — never bolted inside an implementation.
21
+
22
+ ## When to use it
23
+
24
+ - **Before any non-trivial build.** If the work touches 2+ layers (UI + API, API + DB, worker + queue), decompose first.
25
+ - **After `/interaction-design`** produces sequence diagrams. Those diagrams are the primary input.
26
+ - **When responsibility is ambiguous.** "Should this logic live in the API route or a service?" — decompose answers that structurally, not by gut feel.
27
+ - **On any Construction branch** (`feature/`, `fix/`) creating changes to `src/` per `.claude/rules/oo-ad-entry-point.md`.
28
+
29
+ Skip for single-file changes, config updates, docs, simple CRUD with obvious ownership, or pure refactors within one function.
30
+
31
+ ## ADR-consult — fire before scope confirmation (per bassclef-upstream#424)
32
+
33
+ Read every relevant ADR in `architecture/decisions/` before confirming scope. If your scope deviates from any ADR's decision or constraints, surface the deviation as the first agenda item — the operator decides amend-ADR vs revise-scope.
34
+
35
+ Per `.claude/rules/adr-discipline.md`. Mechanism: `adr-discipline-check.sh` fires on architectural edits (wired in `.claude/settings.json` since bet 28a WU-1).
36
+
37
+ ## FAQ
38
+
39
+ ### What are the three entry-point states?
40
+
41
+ - **State 1 — Canvas/greenfield.** Full flow preceded (canvas → spec → ia-model → interaction-design → sequence diagrams). `/decompose` reads sequence diagrams as primary input. If `/use-case` produced fully-dressed cases at `docs/use-cases/UC-NNN-*.md`, those feed in parallel.
42
+ - **State 2 — Epic/defect (no sequence diagrams, spec exists).** Reverse-engineer — read the spec, read current implementation, identify system events from ticket + code, treat current as "as-is" and ticket as "to-be." Phase 2 NFR check becomes especially critical.
43
+ - **State 3 — Bug/hotfix (symptom known, cause unknown).** `/diagnose` already ran per SDLC gates. Read the diagnose output (Is/Is Not, Five Whys, Hypothesis), identify which responsibility is mis-assigned OR which cross-cutting concern is missing (the bug is often a missing interface / decorator, not a logic error). Phase 1 is targeted.
44
+
45
+ ### Why must every Indirection or Protected Variation produce a named interface?
46
+
47
+ Because "Indirection: adapter wraps provider" without naming `IProviderAdapter` has not completed the decomposition. The interface IS the artifact, not the principle citation. Bet 2026-07-04 experience — the POA session bolted Langfuse tracing inside HaikuImputer because the earlier decomposition named "Indirection" without producing `IAssociationImputer`. Interface name forces the concrete artifact.
48
+
49
+ ### What are the -ilities?
50
+
51
+ Five cross-cutting concerns Phase 2 audits — observability, testability, extensibility, security, cacheability. Each maps to a Decorator or Proxy wrapping an interface. Missing any -ility from the audit is the same failure mode as skipping tests. If an -ility applies to a responsibility, it MUST appear as its own row with a named interface or wrapper.
52
+
53
+ ### When does a luminary lens influence pattern choice?
54
+
55
+ Phase 1 (Responsibility Matrix) and Phase 2 (Friction Points + NFR) are luminary-agnostic — they are structural facts about the domain. Phase 3 is the first phase where a luminary POV legitimately influences pattern choice among valid options. A luminary cannot override GRASP or NFR gates; the luminary shapes pattern choice among valid options only.
56
+
57
+ If the iteration goal declares multiple `primary_luminaries`, each pattern choice in Phase 3 cites which luminary drove it. All-one-name attribution when the goal lists multiple luminaries is the collapse-to-single failure.
58
+
59
+ ### What's the output artifact?
60
+
61
+ A single Decomposition Summary at `docs/decompositions/[feature-name].md` containing the three-phase output plus an Interface Registry (the primary Builder handoff artifact) plus proposed file structure plus decisions.
62
+
63
+ The Interface Registry answers "what interfaces do I need to implement?" before any code lands.
64
+
65
+ ### How does /decompose compose with /temperance and /pattern-review?
66
+
67
+ `/temperance` fires BEFORE `/decompose`. Temperance asks "should we build this?" Decompose asks "how should we structure it?" — different questions, different answers.
68
+
69
+ `/pattern-review` fires DURING or AFTER build. Decompose selects patterns before code lands; pattern-review validates they were applied per the decomposition.
70
+
71
+ ## Details below the fold
72
+
73
+ ### Position in the chain
74
+
75
+ ```
76
+ /interaction-design (sequence diagrams, state diagrams)
77
+
78
+ /decompose (responsibility audit → pattern map)
79
+
80
+ Builder implements against the decomposition
81
+
82
+ /pattern-review (validates patterns during/after build)
83
+ ```
84
+
85
+ ### Phase 1 — Responsibility Matrix (GRASP)
86
+
87
+ For each system event in the sequence diagrams, assign responsibility using Larman's GRASP principles:
88
+
89
+ | Principle | Question it answers | Stack translation |
90
+ |---|---|---|
91
+ | **Information Expert** | Who has the data needed to do this? | Prisma model → repository / service. React component with local state → handler stays in component. |
92
+ | **Creator** | Who should create this object? | API route creates via Prisma. Factory if creation varies by type. |
93
+ | **Controller** | Entry point for this system event? | API route (server boundary) or server action. One controller per use case, not per entity. |
94
+ | **Low Coupling** | Does A need to know B's internals? | If yes → introduce indirection (service layer, repository, adapter). |
95
+ | **High Cohesion** | Is this module doing too many unrelated things? | If a route handles validation + business logic + DB + email → extract. |
96
+ | **Pure Fabrication** | No natural home for this logic? | `lib/services/ScoringService.ts`, `lib/repositories/DealRepository.ts`. |
97
+ | **Indirection** | Need to decouple two things? | Middleware, event bus, service layer between route and DB. |
98
+ | **Protected Variations** | What changes? What stays stable? | Interface / adapter around unstable external APIs. Strategy for varying business rules. |
99
+
100
+ Output — Responsibility Matrix:
101
+
102
+ ```markdown
103
+ | System Event | Controller | Expert | Fabrications | Interfaces | GRASP Justification |
104
+ |---|---|---|---|---|---|
105
+ | User submits deal | `POST /api/deals` | `Deal` (Prisma) | `DealRepository` | `IDealRepository` | Expert: Deal model owns fields. Pure Fabrication: repository isolates query logic from route. |
106
+ | Score recalculates | Server action | `ScoreConfig`, `Deal` | `ScoringService` | `IScoringStrategy` | Expert: ScoreConfig owns dimensions. Protected Variation: scoring rules vary. |
107
+ ```
108
+
109
+ Rules:
110
+
111
+ - Every row cites at least one GRASP principle.
112
+ - Interfaces column is mandatory. Every Indirection / Protected Variation names its interface.
113
+ - If you cannot name the Expert, the entity model is incomplete — go back to `/ia-model`.
114
+ - If a Controller handles 3+ responsibilities, split it.
115
+ - Names in the matrix match the ubiquitous language of the domain (Evans DDD) — not database schema.
116
+ - Each fabrication is a deep module (Ousterhout) — small interface, complex implementation hidden. A Service passing calls through to a Repository is two shallow modules pretending to be one deep.
117
+
118
+ ### Phase 2 — Coupling, Variation, NFR Audit
119
+
120
+ Review the Responsibility Matrix. For each row, run four checks:
121
+
122
+ 1. **Coupling check.** Does the Controller reach into the Expert's internals? If yes → introduce a Repository or Service.
123
+ 2. **Variation check.** Does behavior vary by type / configuration / context? If yes → Protected Variation.
124
+ 3. **Stability check.** Does this touch an external API that could change? If yes → Adapter.
125
+ 4. **NFR check** (the -ilities):
126
+
127
+ | -ility | Question | What it catches |
128
+ |---|---|---|
129
+ | **Observability** | Who traces this? Records latency / cost / input / output? | Missing Decorator — the Langfuse-inside-HaikuImputer mistake. Tracing bolted inside implementation instead of wrapping interface. |
130
+ | **Testability** | Can I test this in isolation? What needs mocking? | Concrete dependencies without interfaces. Cannot swap implementation in a test. |
131
+ | **Extensibility** | What's the next provider / strategy / channel? | Missing interface for Protected Variation. "Add SMS" means editing the email service. |
132
+ | **Security** | Who authenticates / authorizes? Where is tenant context resolved? | Auth wired inside business logic instead of at the boundary. |
133
+ | **Cacheability** | What's read-heavy and stable enough to cache? Where does invalidation live? | Cache logic mixed into business logic instead of isolated as Proxy / Decorator. |
134
+
135
+ Rule: if an -ility concern applies to a responsibility, it MUST appear as its own row in Friction Points with a named interface or wrapper. "Add observability later" is the same failure as "add tests later."
136
+
137
+ Output — Friction Points:
138
+
139
+ ```markdown
140
+ | Location | Type | Risk | Resolution |
141
+ |---|---|---|---|
142
+ | `POST /api/deals` → Prisma query | Coupling | Route knows schema shape | Extract `DealRepository` |
143
+ | Scoring dimensions | Variation | Rules vary per deal type | Strategy — `IScoringStrategy` |
144
+ | Association imputation | Observability | Tracing lives inside HaikuImputer; swapping to Gemma loses traces | Decorator — `ObservedImputer(IAssociationImputer)` traces via Langfuse |
145
+ | Association imputation | Testability | Cannot test imputation without LLM call | Interface — `IAssociationImputer` enables stub / mock |
146
+ ```
147
+
148
+ ### Phase 3 — Pattern Map
149
+
150
+ Select concrete patterns from the vocabulary:
151
+
152
+ **Functional patterns:**
153
+
154
+ | Friction | Pattern sources |
155
+ |---|---|
156
+ | Variation by type | GoF: Strategy, State. React: polymorphic components, render props. |
157
+ | Complex creation | GoF: Factory Method, Abstract Factory. Prisma: nested create, transaction. |
158
+ | Unstable external API | GoF: Adapter. Next.js: route handler wrapping SDK. |
159
+ | Complex orchestration | GoF: Facade. Next.js: server action composing services. |
160
+ | Event propagation | GoF: Observer. Prisma: middleware hooks. Next.js: revalidation. |
161
+ | Data access isolation | Fowler: Repository, Unit of Work. |
162
+ | State complexity | GoF: State. React: useReducer, state machines (XState). |
163
+ | Caching / memoization | React: useMemo, React.cache. Next.js: ISR, unstable_cache. |
164
+
165
+ **Cross-cutting patterns (from NFR check):**
166
+
167
+ | -ility | Pattern sources | Structural principle |
168
+ |---|---|---|
169
+ | Observability | GoF: Decorator, Observer. Langfuse: trace wrapper. OpenTelemetry: span instrumentation. | Decorator wraps the interface, not the implementation. Tracing MUST survive provider swap. |
170
+ | Testability | Interface extraction → stub / mock. Fowler: Test Double. | Cannot swap implementation in a test = coupled to concrete class. |
171
+ | Extensibility | GoF: Strategy, Abstract Factory. Plugin registries. | New provider = new class implementing existing interface. Zero edits to existing code. |
172
+ | Security | Middleware chain. Next.js: middleware.ts. Fowler: Gateway. | Auth resolved at boundary, passed as context. Business logic never checks auth. |
173
+ | Cacheability | GoF: Proxy. React: React.cache. Next.js: ISR. Redis wrapper. | Cache as Proxy / Decorator wrapping interface. Invalidation strategy declared, not bolted on. |
174
+
175
+ Per @luminary gang-of-four: program to an interface, not an implementation; favor object composition over class inheritance. Cross-cutting concerns wrap interfaces via Decorator — they never live inside the concrete implementation.
176
+
177
+ ### Luminary lens on Phase 3
178
+
179
+ Read the iteration goal's `primary_luminaries` field (list form) — treat scalar `primary_luminary` as single-element list for backward compat. For each entry, read `.claude/luminaries/[slug].md`.
180
+
181
+ Multi-luminary handling: each luminary should have a `role` annotation. Phase 3 Pattern Map cites which luminary drove each pattern choice — no "applied the primary" language when 2+ luminaries active. Add an Attribution column to the pattern table.
182
+
183
+ Stub-depth luminary — emit BLOCKED (per `.claude/rules/blocked-items.md`) and either upgrade the luminary or explicitly defer.
184
+
185
+ Common preferences:
186
+
187
+ | Primary luminary | Pattern preferences |
188
+ |---|---|
189
+ | Sophia Prater | Componentized content, progressive disclosure, entity-derived nav; Strategy over Factory when behavior varies by entity type |
190
+ | Don Norman | Explicit affordances, feedback wrappers, constraint-first validation; Decorator for feedback consistency |
191
+ | Edward Tufte | Small-multiples for comparison, sparklines in tables; data-dense patterns over card-based |
192
+ | Dieter Rams / Jony Ive | Minimal API surface on components, removal over addition; Facade to hide complexity |
193
+ | Alan Cooper | Role-based UI variants, primary-persona-optimized Controllers; Strategy per persona-role |
194
+ | @luminary alistair-cockburn | Walking Skeleton as first PR; Hexagonal Architecture with Ports & Adapters — business logic at center, adapters at outside |
195
+
196
+ ### Final Output — Decomposition Summary
197
+
198
+ Combine all three phases into `docs/decompositions/[feature-name].md`:
199
+
200
+ ```markdown
201
+ # Decomposition: [Feature Name]
202
+
203
+ **Source**: [sequence diagram reference or entry-point state]
204
+ **Date**: YYYY-MM-DD
205
+
206
+ ## Responsibility Matrix
207
+ [Phase 1 table with Interfaces column]
208
+
209
+ ## Friction Points
210
+ ### Functional
211
+ [Phase 2 coupling / variation / stability rows]
212
+ ### Non-Functional (-ilities)
213
+ [Phase 2 NFR rows]
214
+
215
+ ## Pattern Map
216
+ ### Functional patterns
217
+ [Phase 3 functional table]
218
+ ### Cross-cutting patterns
219
+ [Phase 3 cross-cutting table]
220
+
221
+ ## Interface Registry
222
+ | Interface | Purpose | Implementations (known) |
223
+ |---|---|---|
224
+ | `IAssociationImputer` | Abstract LLM provider | `HaikuImputer`, `GemmaImputer` (future) |
225
+
226
+ ## File Structure (proposed)
227
+ src/
228
+ app/api/[route]/ ← Controllers
229
+ app/actions/ ← Facades (server actions)
230
+ lib/
231
+ services/ ← Pure Fabrications
232
+ repositories/ ← Data access (Fowler Repository)
233
+ adapters/ ← External API wrappers
234
+ decorators/ ← Cross-cutting: Observed*, Cached*, Logged*
235
+ [domain]/
236
+ types.ts ← Interface definitions (I* contracts)
237
+ strategies/ ← Strategy implementations
238
+
239
+ ## Decisions
240
+ - [Why X is a service, not inline in the route]
241
+ - [Why observability is a Decorator, not inline tracing]
242
+ - [Why caching is a Proxy, not inline Redis calls]
243
+ ```
244
+
245
+ ### Anti-patterns
246
+
247
+ - Decomposing trivial work
248
+ - Forcing patterns when the friction table is empty (say "no friction — build directly")
249
+ - Skipping Phase 1 and jumping to "use a Factory"
250
+ - Decomposing without sequence diagrams (State 1) or without spec / current code (State 2)
251
+ - Skipping the NFR check — cross-cutting concerns identified later become bolt-on hacks
252
+ - Naming principles without interfaces — the interface IS the artifact
253
+ - Cross-cutting logic inside implementations — tracing inside HaikuImputer, caching inside DealRepository, auth inside a route handler are all the same mistake
254
+
255
+ ### Composes with
256
+
257
+ | Skill | Relationship |
258
+ |---|---|
259
+ | `/temperance` | Fires BEFORE. Should we build this at all? |
260
+ | `/interaction-design` | Produces sequence diagrams `/decompose` consumes |
261
+ | `/ia-model` | Produces entity model that informs Information Expert assignments |
262
+ | `/pattern-review` | Validates patterns DURING or AFTER build. Decompose selects BEFORE. |
263
+ | `/spec` | May contain sequence diagrams inline. Decompose reads from spec or standalone artifacts. |
264
+ | `/use-case` | Fully-dressed cases feed Phase 1 in parallel with sequence diagrams |
265
+
266
+ ### Refs
267
+
268
+ - Craig Larman, *Applying UML and Patterns* — GRASP patterns
269
+ - @luminary gang-of-four — *Design Patterns* — 23 pattern vocabulary
270
+ - @luminary martin-fowler — *Patterns of Enterprise Application Architecture* + *Refactoring* catalog
271
+ - @luminary eric-evans — *Domain-Driven Design* — Ubiquitous Language + Bounded Contexts + Aggregates
272
+ - @luminary alistair-cockburn — *Writing Effective Use Cases* + Hexagonal Architecture (Ports & Adapters)
273
+ - @luminary robert-c-martin — *Clean Architecture* — SOLID + Dependency Rule
274
+ - @luminary john-ousterhout — *A Philosophy of Software Design* — deep modules + comments-as-design
275
+ - `.claude/rules/oo-ad-entry-point.md` — entry-point rule requiring `/decompose` evidence
276
+ - `.claude/rules/adr-discipline.md` — ADR-consult before scope confirmation
277
+
278
+ ## Output discipline
279
+
280
+ Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.