@thebassclef/lite 1.0.4 → 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.
- package/dist/cli.cjs +65 -0
- package/dist/cli.js +65 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite/.claude/agents/architect.md +70 -0
- package/dist/lite/.claude/agents/builder.md +114 -0
- package/dist/lite/.claude/agents/designer.md +156 -0
- package/dist/lite/.claude/agents/reviewer.md +88 -0
- package/dist/lite/.claude/hooks/bassclef-sync.sh +85 -27
- package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/dist/lite/.claude/hooks/longrun-prep-render-check.sh +236 -0
- package/dist/lite/.claude/hooks/persona-name-scrub-check.sh +105 -0
- package/dist/lite/.claude/hooks/skill-step-list-check.sh +171 -0
- package/dist/lite/.claude/luminaries/alan-cooper.md +170 -0
- package/dist/lite/.claude/luminaries/alistair-cockburn.md +140 -0
- package/dist/lite/.claude/luminaries/amazon-pr-faq.md +34 -0
- package/dist/lite/.claude/luminaries/andreas-zeller.md +74 -0
- package/dist/lite/.claude/luminaries/ash-maurya.md +121 -0
- package/dist/lite/.claude/luminaries/bill-buxton.md +210 -0
- package/dist/lite/.claude/luminaries/charles-sanders-peirce.md +150 -0
- package/dist/lite/.claude/luminaries/david-ogilvy.md +192 -0
- package/dist/lite/.claude/luminaries/don-norman.md +173 -0
- package/dist/lite/.claude/luminaries/edward-tufte.md +179 -0
- package/dist/lite/.claude/luminaries/eric-evans.md +160 -0
- package/dist/lite/.claude/luminaries/frederick-brooks.md +50 -0
- package/dist/lite/.claude/luminaries/gang-of-four.md +157 -0
- package/dist/lite/.claude/luminaries/glenford-myers.md +230 -0
- package/dist/lite/.claude/luminaries/hunt-thomas.md +115 -0
- package/dist/lite/.claude/luminaries/hyrum-wright.md +94 -0
- package/dist/lite/.claude/luminaries/jason-fried-dhh.md +46 -0
- package/dist/lite/.claude/luminaries/jesse-james-garrett.md +154 -0
- package/dist/lite/.claude/luminaries/john-ousterhout.md +94 -0
- package/dist/lite/.claude/luminaries/karl-popper.md +132 -0
- package/dist/lite/.claude/luminaries/kent-beck.md +168 -0
- package/dist/lite/.claude/luminaries/linus-torvalds.md +218 -0
- package/dist/lite/.claude/luminaries/martin-fowler.md +164 -0
- package/dist/lite/.claude/luminaries/michael-feathers.md +125 -0
- package/dist/lite/.claude/luminaries/michael-nygard.md +118 -0
- package/dist/lite/.claude/luminaries/robert-c-martin.md +164 -0
- package/dist/lite/.claude/luminaries/saltzer-schroeder.md +194 -0
- package/dist/lite/.claude/luminaries/sophia-prater.md +193 -0
- package/dist/lite/.claude/luminaries/stephen-toulmin.md +131 -0
- package/dist/lite/.claude/luminaries/tony-hoare.md +170 -0
- package/dist/lite/.claude/luminaries/vaughn-vernon.md +50 -0
- package/dist/lite/.claude/luminaries/w-edwards-deming.md +158 -0
- package/dist/lite/.claude/rules/accessor-library-discipline.md +110 -0
- package/dist/lite/.claude/rules/adr-discipline.md +96 -0
- package/dist/lite/.claude/rules/api-conventions.md +115 -0
- package/dist/lite/.claude/rules/artifact-ingestion.md +137 -0
- package/dist/lite/.claude/rules/assert-only-after-verify.md +111 -0
- package/dist/lite/.claude/rules/blocked-items.md +139 -0
- package/dist/lite/.claude/rules/bootstrap-pair-discipline.md +106 -0
- package/dist/lite/.claude/rules/branching.md +28 -0
- package/dist/lite/.claude/rules/cold-adopter-harness-discipline.md +93 -0
- package/dist/lite/.claude/rules/commit-conventions.md +22 -0
- package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/compounding-sequence-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/context-engineering.md +155 -0
- package/dist/lite/.claude/rules/context-management.md +85 -0
- package/dist/lite/.claude/rules/defensive-bash.md +52 -0
- package/dist/lite/.claude/rules/deferred-actions.md +233 -0
- package/dist/lite/.claude/rules/destructive-operations.md +69 -0
- package/dist/lite/.claude/rules/diagnosis.md +38 -0
- package/dist/lite/.claude/rules/github-issue-flash-tweet.md +114 -0
- package/dist/lite/.claude/rules/guardrails.md +73 -0
- package/dist/lite/.claude/rules/hook-wire-on-author.md +77 -0
- package/dist/lite/.claude/rules/identifier-leak-prevention.md +73 -0
- package/dist/lite/.claude/rules/iteration-bet-brief-completeness.md +43 -0
- package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +79 -0
- package/dist/lite/.claude/rules/longrun-prep-plan-doc-compression.md +77 -0
- package/dist/lite/.claude/rules/loop-discipline.md +71 -0
- package/dist/lite/.claude/rules/manual-prod-approval.md +100 -0
- package/dist/lite/.claude/rules/marker-enrichment-discipline.md +72 -0
- package/dist/lite/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/dist/lite/.claude/rules/new-dependency-check.md +44 -0
- package/dist/lite/.claude/rules/oo-ad-entry-point.md +95 -0
- package/dist/lite/.claude/rules/operator-facing-prose.md +177 -0
- package/dist/lite/.claude/rules/option-label-discipline.md +82 -0
- package/dist/lite/.claude/rules/pattern-annotation.md +83 -0
- package/dist/lite/.claude/rules/persona-name-leak-scrub.md +90 -0
- package/dist/lite/.claude/rules/plain-english-discipline.md +132 -0
- package/dist/lite/.claude/rules/plan-enumeration-needs-value-props.md +177 -0
- package/dist/lite/.claude/rules/pr-body-shape.md +195 -0
- package/dist/lite/.claude/rules/pr-strategy.md +142 -0
- package/dist/lite/.claude/rules/pr-title-shape.md +90 -0
- package/dist/lite/.claude/rules/prototype-workflow.md +53 -0
- package/dist/lite/.claude/rules/reserved-skill-names.md +103 -0
- package/dist/lite/.claude/rules/schema-management.md +42 -0
- package/dist/lite/.claude/rules/sdlc-gates.md +149 -0
- package/dist/lite/.claude/rules/security.md +37 -0
- package/dist/lite/.claude/rules/session-artifacts.md +236 -0
- package/dist/lite/.claude/rules/skill-composition-declarations.md +105 -0
- package/dist/lite/.claude/rules/skill-description-clarity.md +196 -0
- package/dist/lite/.claude/rules/skill-procedure-step-list.md +119 -0
- package/dist/lite/.claude/rules/sprint-prep-preset-picker.md +76 -0
- package/dist/lite/.claude/rules/state-schema-validation.md +156 -0
- package/dist/lite/.claude/rules/stuck-signal-diagnostic.md +111 -0
- package/dist/lite/.claude/rules/substrate-config-schema.md +85 -0
- package/dist/lite/.claude/rules/test-list-discipline.md +129 -0
- package/dist/lite/.claude/rules/test-sufficiency.md +186 -0
- package/dist/lite/.claude/rules/testing-tier-config.md +125 -0
- package/dist/lite/.claude/rules/testing.md +38 -0
- package/dist/lite/.claude/rules/turn-estimate-grounding.md +82 -0
- package/dist/lite/.claude/rules/visual-hierarchy.md +427 -0
- package/dist/lite/.claude/rules/we-dont-break-adopters.md +103 -0
- package/dist/lite/.claude/rules/whereami-load-bearing.md +184 -0
- package/dist/lite/.claude/rules/writing-craft-discipline.md +72 -0
- package/dist/lite/.claude/rules/wu-sequencing-compounds.md +119 -0
- package/dist/lite/.claude/skills/build/SKILL.md +640 -0
- package/dist/lite/.claude/skills/chronicle/SKILL.md +55 -0
- package/dist/lite/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/dist/lite/.claude/skills/decompose/SKILL.md +280 -0
- package/dist/lite/.claude/skills/diagnose/SKILL.md +297 -0
- package/dist/lite/.claude/skills/feynman/SKILL.md +90 -0
- package/dist/lite/.claude/skills/howdoi/SKILL.md +105 -0
- package/dist/lite/.claude/skills/ia-model/SKILL.md +108 -0
- package/dist/lite/.claude/skills/interaction-design/SKILL.md +112 -0
- package/dist/lite/.claude/skills/interpret-input/SKILL.md +180 -0
- package/dist/lite/.claude/skills/journal/SKILL.md +209 -0
- package/dist/lite/.claude/skills/kiss/SKILL.md +449 -0
- package/dist/lite/.claude/skills/launch/SKILL.md +915 -0
- package/dist/lite/.claude/skills/lean-canvas/SKILL.md +332 -0
- package/dist/lite/.claude/skills/longrun/SKILL.md +512 -0
- package/dist/lite/.claude/skills/luminary/SKILL.md +481 -0
- package/dist/lite/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
- package/dist/lite/.claude/skills/onboard-repo/SKILL.md +1640 -0
- package/dist/lite/.claude/skills/pattern-review/SKILL.md +99 -0
- package/dist/lite/.claude/skills/personas/SKILL.md +207 -0
- package/dist/lite/.claude/skills/promote/SKILL.md +283 -0
- package/dist/lite/.claude/skills/requirement/SKILL.md +98 -0
- package/dist/lite/.claude/skills/retro/SKILL.md +117 -0
- package/dist/lite/.claude/skills/riff/SKILL.md +114 -0
- package/dist/lite/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
- package/dist/lite/.claude/skills/session-end/SKILL.md +309 -0
- package/dist/lite/.claude/skills/session-log/SKILL.md +299 -0
- package/dist/lite/.claude/skills/skills/SKILL.md +228 -0
- package/dist/lite/.claude/skills/spec/SKILL.md +105 -0
- package/dist/lite/.claude/skills/sprint/SKILL.md +418 -0
- package/dist/lite/.claude/skills/stage/SKILL.md +384 -0
- package/dist/lite/.claude/skills/state-a-problem/SKILL.md +185 -0
- package/dist/lite/.claude/skills/temperance/SKILL.md +108 -0
- package/dist/lite/.claude/skills/use-case/SKILL.md +417 -0
- package/dist/lite/.claude/skills/user-stories/SKILL.md +268 -0
- package/dist/lite/.claude/skills/value-prop/SKILL.md +251 -0
- package/dist/lite/.claude/skills/verify/SKILL.md +160 -0
- package/dist/lite/.claude/skills/visual-review/SKILL.md +503 -0
- package/dist/lite/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/dist/lite/.claude/skills/whereami/SKILL.md +307 -0
- package/dist/lite/AGENTS.md +79 -0
- package/dist/lite/CLAUDE-lite.md +85 -0
- package/dist/lite/CODE_OF_CONDUCT.md +28 -0
- package/dist/lite/CONTRIBUTING.md +177 -0
- package/dist/lite/README.md +173 -0
- package/dist/lite/SECURITY.md +19 -0
- package/dist/lite/architecture/decisions/ADR-029-release-pipeline.md +79 -0
- package/dist/lite/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
- package/dist/lite/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
- package/dist/lite/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
- package/dist/lite/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
- package/dist/lite/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
- package/dist/lite/lib/clean-artifacts-sweep.sh +112 -0
- package/dist/lite/lib/code-comment-discipline.sh +144 -0
- package/dist/lite/lib/composer-preflight.sh +459 -0
- package/dist/lite/lib/deferred-actions.sh +146 -0
- package/dist/lite/lib/hook-header-parser.sh +61 -0
- package/dist/lite/lib/hook-heartbeat.sh +152 -0
- package/dist/lite/lib/hook-inject.sh +255 -0
- package/dist/lite/lib/hook-installer.sh +195 -0
- package/dist/lite/lib/luminary-pick.sh +96 -0
- package/dist/lite/lib/output-discipline.sh +143 -0
- package/dist/lite/lib/prose-scan-boundary.sh +171 -0
- package/dist/lite/lib/rewrite-check.sh +214 -0
- package/dist/lite/lib/session-rescue.sh +151 -0
- package/dist/lite/lib/source-graph-walker.sh +277 -0
- package/dist/lite/lib/state.sh +1372 -0
- package/dist/lite/lib/telemetry.sh +205 -0
- package/dist/lite/lib/tier-check.sh +187 -0
- package/dist/lite/lib/tier-dependency-audit.sh +1088 -0
- package/dist/lite/presence/install/bassclef-hook-connect.sh +178 -0
- package/dist/lite/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
- package/dist/lite/presence/install/bassclef-sync.template.sh +2278 -0
- package/dist/lite/presence/install/schedule-auto-save.cron.sh +88 -0
- package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +122 -0
- package/dist/lite/scripts/aggregate-telemetry.sh +217 -0
- package/dist/lite/scripts/analyze-tier-dependencies.sh +239 -0
- package/dist/lite/scripts/generate-lite-manifest.sh +505 -0
- package/dist/lite/scripts/generate-tier-manifest.sh +28 -0
- package/dist/lite/scripts/intent-drift-check.sh +456 -0
- package/dist/lite/scripts/lite-manifest-drift-check.sh +146 -0
- package/dist/lite/scripts/render-lite-manifest-doc.sh +150 -0
- package/dist/lite/standards/adr-template.md +86 -0
- package/dist/lite/standards/api-conventions/nextjs.md +84 -0
- package/dist/lite/standards/artifact-composition.md +209 -0
- package/dist/lite/standards/bash-hook-safety.md +246 -0
- package/dist/lite/standards/bassclef-configs-schema.md +232 -0
- package/dist/lite/standards/bassclef-evolution.md +143 -0
- package/dist/lite/standards/bassclef-internal-jargon.md +244 -0
- package/dist/lite/standards/bassclef-managed-sentinel.md +96 -0
- package/dist/lite/standards/bassclef-source-config.md +228 -0
- package/dist/lite/standards/branch-stacking.md +408 -0
- package/dist/lite/standards/code-safety-principles.md +176 -0
- package/dist/lite/standards/composer-prerequisites.md +155 -0
- package/dist/lite/standards/deferred-actions-schema.md +204 -0
- package/dist/lite/standards/dependency-discipline/cargo.md +39 -0
- package/dist/lite/standards/dependency-discipline/gem.md +43 -0
- package/dist/lite/standards/dependency-discipline/go-mod.md +41 -0
- package/dist/lite/standards/dependency-discipline/npm.md +42 -0
- package/dist/lite/standards/dependency-discipline/pip.md +42 -0
- package/dist/lite/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/dist/lite/standards/deployment-topology.md +69 -0
- package/dist/lite/standards/docs-sync-allowlist.md +76 -0
- package/dist/lite/standards/domain-and-dns.md +145 -0
- package/dist/lite/standards/frontend-stack.md +67 -0
- package/dist/lite/standards/frontmatter-schema.md +154 -0
- package/dist/lite/standards/graceful-exit.md +227 -0
- package/dist/lite/standards/hook-idempotency.md +102 -0
- package/dist/lite/standards/hook-injection-discipline.md +202 -0
- package/dist/lite/standards/hook-install-class.md +215 -0
- package/dist/lite/standards/input-handler-interface.md +152 -0
- package/dist/lite/standards/lite-manifest-schema-changes.md +180 -0
- package/dist/lite/standards/lite-manifest.json +2797 -0
- package/dist/lite/standards/luminary-matching.md +105 -0
- package/dist/lite/standards/luminary-problem-patterns.md +481 -0
- package/dist/lite/standards/migration-discipline/active-record.md +50 -0
- package/dist/lite/standards/migration-discipline/alembic.md +43 -0
- package/dist/lite/standards/migration-discipline/gorm.md +50 -0
- package/dist/lite/standards/migration-discipline/prisma.md +53 -0
- package/dist/lite/standards/migration-discipline/sqlalchemy.md +51 -0
- package/dist/lite/standards/mobile-ephemeral-session.md +167 -0
- package/dist/lite/standards/model-routing-discipline.md +160 -0
- package/dist/lite/standards/ogilvy-writing-rules.md +225 -0
- package/dist/lite/standards/opener-discipline.md +96 -0
- package/dist/lite/standards/operator-facing-prose-discipline.md +201 -0
- package/dist/lite/standards/persona-schema.md +229 -0
- package/dist/lite/standards/pluggable-luminaries.md +323 -0
- package/dist/lite/standards/pr-body-discipline.md +115 -0
- package/dist/lite/standards/preview-state-schema.md +189 -0
- package/dist/lite/standards/project-directory-layout.md +276 -0
- package/dist/lite/standards/release-tagging.md +137 -0
- package/dist/lite/standards/reserved-skill-names.md +120 -0
- package/dist/lite/standards/scannable-multi-option-output.md +265 -0
- package/dist/lite/standards/sdlc-compliance.md +286 -0
- package/dist/lite/standards/sdlc-gates/typescript.md +57 -0
- package/dist/lite/standards/secrets-lifecycle.md +210 -0
- package/dist/lite/standards/security-scanner-adapter.md +145 -0
- package/dist/lite/standards/session-board.md +256 -0
- package/dist/lite/standards/skill-output-discipline.md +121 -0
- package/dist/lite/standards/state-spine-contract.md +255 -0
- package/dist/lite/standards/state-spine.md +511 -0
- package/dist/lite/standards/steering-hints/kiss-words.md +11 -0
- package/dist/lite/standards/substrate-config-schema.md +267 -0
- package/dist/lite/standards/tech-stack-config.md +109 -0
- package/dist/lite/standards/tier-dependency-analysis.md +167 -0
- package/dist/lite/standards/tier-runtime-deps/lite.md +57 -0
- package/dist/lite/standards/tier-tag-schema.md +155 -0
- package/dist/lite/standards/two-layer-config.md +99 -0
- package/dist/lite/standards/use-case-format.md +292 -0
- package/dist/lite/standards/user-story-invest.md +268 -0
- package/dist/lite/standards/velocity-and-appetite.md +229 -0
- package/dist/lite/standards/voice-input-pattern.md +119 -0
- package/dist/lite/standards/whereami-schema.md +301 -0
- package/dist/lite/standards/worktree-management.md +211 -0
- package/dist/lite/standards/writing-guide.md +213 -0
- package/dist/lite/templates/chronicle-template.md +75 -0
- package/dist/lite/templates/deferred-action-template.md +45 -0
- package/dist/lite/templates/memory-proposal-template.md +77 -0
- package/dist/lite/templates/persona-template.md +200 -0
- package/dist/lite/templates/pr-faq.md +45 -0
- package/dist/lite/templates/secret-rotation-template.md +162 -0
- package/dist/lite/templates/spec-template.md +131 -0
- package/dist/lite/templates/use-case-template.md +194 -0
- package/dist/lite/templates/user-story-template.md +107 -0
- package/dist/lite/templates/whereami-template.md +101 -0
- package/package.json +1 -1
|
@@ -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` | Workflow 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.
|