/enterprise-software-playbook:designfrom enterprise-software-playbook
Pick the right in-process code pattern for refactoring or extensibility (GoF creational/structural/behavioral) and access implementation guides. Use as a decision workflow when unsure which pattern fits.
Ships in enterprise-software-playbook. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Pick the simplest design that fits, then map it to a code pattern only if it buys you clear leverage (change isolation, testability, reuse, or performance).
In TypeScript systems, also watch for “complications” that patterns can accidentally amplify (hidden lifetimes, implicit throw, unchecked boundary data, cyclic deps). Prefer patterns that keep boundaries and ownership explicit.
If the main pressure is system-level (multiple services/processes, partial failures, retries/idempotency, sagas, event-driven architecture, domain boundaries), use architecture first; then come back here to pick any code patterns needed for the in-process implementation.
If you’re standardizing cross-cutting boundary behavior across multiple services, consider extracting the primitive into a shared package (see platform) so the pattern becomes a consistent “golden path” instead of copy/paste.
Monolith edge case: In a monolith, use design to isolate modules within the process (Facade for subsystem boundaries, Adapter for third-party libs, Strategy for swappable implementations). If the goal is decomposing the monolith into separate deployable units or defining service boundaries, start with architecture — then return here for the in-process patterns each new service needs.
Inputs: Archobs JSON — file coupling (xnbr, hubness), cluster leakage (required); architecture output (if exists); forecast lifecycle data (if wrapping external dep).
Outputs: Pattern selection with rationale, implementation sketch, trade-offs. Consumed by testing (test strategy), finish (verification).
Load archobs data (required): Run archobs show risks --format json and archobs show clusters --format json to get risk scores and coupling signals for the files under consideration. Use xnbr to identify files bridging multiple concerns, hubness to find fan-in bottlenecks, and cluster leakage to see where boundaries are porous. This data helps narrow the pattern choice — e.g., high xnbr suggests Facade or Strategy; high hubness suggests Mediator. If the artifacts do not exist, run archobs report --repo <path> --out .archobs --suggestions-provider rules and wait for it to complete before continuing.
Decide whether the context is scriptic vs systemic (short-lived script vs long-lived system). Set policies for boundary validation, error semantics, and ownership/lifetimes.
Restate the problem as: what varies and what must stay stable (API, data model, timing, performance). 2b. Pattern Longevity Check (conditional — run when the selected pattern wraps or isolates an external dependency):
intel forecast # lifecycle phase for the wrapped dependency
Decision mapping: See Lifecycle Decision Mapping — Design: Pattern Longevity for lifecycle phase → pattern adjustment tables and compound signal (archobs x forecast) implications.
Identify the main pressure:
Pick 1 primary pattern (avoid "pattern soup"). Add a 2nd only if it addresses a different pressure.
Stress-test the decision (if 2+ viable approaches exist; skip for single viable approach):
workflow orchestration), refine it instead of re-running.Validate with 2 examples: a "happy path" and a likely future change.
Confirm the choice reduces coupling and increases testability (or has a clear perf win).
When context or time is constrained, these are the load-bearing steps:
Steps that can be cut under pressure: pattern longevity check (step 2b), stress-test probes (step 5), scriptic/systemic policy decision (step 1).
unknown and how will it be decoded?Result/tagged unions)?AbortSignal) or long-running “agents”?architecture), not in-process (design).archobsarchitectureplatformtypescript../references/ (checklists for inline probes, templates for escalation)When you need implementation details for a specific pattern:
references/patterns-creational.mdreferences/patterns-structural.mdreferences/patterns-behavioral.mdreferences/creational/ (factory-method, abstract-factory, builder, prototype, singleton)references/structural/ (adapter, bridge, composite, decorator, facade, flyweight, proxy)references/behavioral/ (chain-of-responsibility, command, iterator, mediator, memento, observer, state, strategy, template-method, visitor)references/snippets/typescript.mdreferences/snippets/react.mdWhen recommending a pattern, return:
references/behavioral/chain-of-responsibility.md (opens in a new tab)references/behavioral/command.md (opens in a new tab)references/behavioral/iterator.md (opens in a new tab)references/behavioral/mediator.md (opens in a new tab)references/behavioral/memento.md (opens in a new tab)references/behavioral/observer.md (opens in a new tab)references/behavioral/state.md (opens in a new tab)references/behavioral/strategy.md (opens in a new tab)references/behavioral/template-method.md (opens in a new tab)references/behavioral/visitor.md (opens in a new tab)references/creational/abstract-factory.md (opens in a new tab)references/creational/builder.md (opens in a new tab)references/creational/factory-method.md (opens in a new tab)references/creational/prototype.md (opens in a new tab)references/creational/singleton.md (opens in a new tab)references/patterns-behavioral.md (opens in a new tab)references/patterns-creational.md (opens in a new tab)references/patterns-structural.md (opens in a new tab)references/snippets/react.md (opens in a new tab)references/snippets/typescript.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bricerising/enterprise-software-playbook --plugin enterprise-software-playbook17 skills in this plugin
/architectureDesign or refactor multi-service system architecture (domain boundaries, service decomposition, event-driven vs request/response, CQRS, sagas, API gateways, data ownership). Use when work spans multiple processes/services, needs eventual consistency, or requires clearer integration seams. NOT for in-process code structure like GoF patterns (use design); NOT for applying timeouts/retries/breakers to a single call (use resilience)./archobsRun architecture observability analysis on a git repository to measure coupling, boundary health, risk hotspots, and temporal drift. Use when you need empirical data about code structure before making architecture or refactoring decisions, or to validate that changes improved boundary discipline. NOT for choosing architecture patterns (use architecture); NOT for choosing code patterns (use design); NOT for adversarial code review (use review); NOT for trajectory prediction or trend forecasting from cluster activity (use forecast)./debugTriage and diagnose production or local issues by following logs → traces → metrics (HTTP/gRPC/async). Use when investigating errors, latency spikes, 5xx responses, SLO violations, or regressions in an instrumented app. NOT for adding new instrumentation (use observability); NOT for applying resilience patterns (use resilience)./finishRun a final "definition of done" check before shipping: verify correctness, tighten contracts/docs, and produce a change summary. Use at the end of non-trivial work to confirm nothing was missed before merge/release. NOT for writing tests (use testing); NOT for adversarial code review (use review); NOT for initial planning (use plan)./forecastPredict likely next developments from internal development patterns (git history, archobs clusters) and external signals (intel feeds). Use when you need forward-looking intelligence — what's GOING to happen, not what already happened. NOT for gathering raw signals (use intel); NOT for static code-structure analysis (coupling, boundary health, risk scores — use archobs); NOT for implementation planning (use plan)./intelGather and shape intelligence signals from collected feeds (RSS, HackerNews, EDGAR) into audience-aware output. Use when you need current context on a technology, industry trend, or domain — or when you need to present signals to a specific audience. NOT for forward-looking predictions (use forecast); NOT for architecture analysis (use archobs); NOT for writing specs (use spec).