/decompose
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.
/decomposeType it bare, or paste it with loose context after — Claude figures out the rest.
Cross-cutting concerns bolt into implementations. Logging and tracing pile inside business code.
A responsibility matrix that keeps each concern in its own class. Decorators stay clean.
Takes in
- Sequence diagrams from spec
- A decomposition target — feature or defect
Returns
- Responsibility matrix
- Interface registry
- Pattern map for construction
What it does
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.
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.
Read the full skill
The complete instructions live at .claude/skills/decompose/SKILL.md in your repo after bassclef-sync. Open with your editor for phases, rules, and worked examples.
Where in the SDLC
Also relevant in: Build.
Why this phase: Pre-build responsibility audit + pattern selection. Feeds Build.
Related
- Skills catalog — browse all skills grouped by lifecycle phase
- Tier system — what each tier gives you
FAQ
Terms from bassclef vocabulary that appear on this page.
- luminary
- A design or engineering thinker whose discipline bassclef borrows as a review lens — the practitioner in the cameo pattern above. Cooper for personas, Norman for signifiers, Feathers for characterization tests, Beck for TDD rhythm, plus about 90 others. Skills invoke a lens to check work against a specific discipline. `/luminary` browses the catalog. See: /docs/skills/luminary, doi:10.5281/zenodo.22145491
- temperance
- The pause-and-think gate that fires before any non-trivial work. Two questions — am I building the right thing AND am I building it the right way? Bassclef enforces it with a pre-build hook that BLOCKs edits until a temperance marker exists on the branch. See: /docs/skills/temperance
- GRASP
- Craig Larman's General Responsibility Assignment Software Patterns — 9 principles for assigning responsibility to objects (Information Expert, Creator, Controller, Low Coupling, High Cohesion, Polymorphism, Pure Fabrication, Indirection, Protected Variations). `/decompose` uses GRASP to identify interfaces + responsibilities from a spec.
- hook
- A shell script bassclef wires into Claude Code's tool-invocation lifecycle. Hooks fire at events like PreToolUse (before an Edit lands) or SessionStart (when a session opens). Hooks enforce rules mechanically — a rule says 'don't do X'; a hook fires and BLOCKs if X happens.
- rule
- A markdown file auto-loaded into every session's context. Rules pin discipline the agent applies to every response (plain-English writing, blocked-items protocol, temperance gates). Different from a hook — rules are steering; hooks are enforcement.
- skill
- A user-invocable command (like `/kiss` or `/temperance`) that runs a specific bassclef workflow. Every skill lives at `.claude/skills/<name>/SKILL.md` with frontmatter + procedure. Adopters type the slash command; Claude Code loads the skill and runs it.
- bassclef-upstream
- The private repo where bassclef substrate is authored. Ships to a public `bassclef` npm package + a public `bassclef-web` docs site. Adopters read the public tier; the operator maintains upstream.
Shipped by @kingofrock · Read the essays
/whereami
Show project state in one glance — phase, active goal, agents in flight, subsystem progress, gate checklist, freshness. Reads docs/whereami.md. Run at session start before /sprint to orient.
/ia-model
Build information architecture from an entity inventory plus task flows. Derives nav structure, labeling, and screen map from the domain nouns.