From architecture-design
Designs new systems from requirements: C4 model diagrams, service boundaries, API contracts, data design, failure modes, and cross-cutting concerns.
npx claudepluginhub realdougeubanks/claudemarketplace --plugin architecture-design/architecture-designDesign architecture and create Architecture Decision Records (ADRs) for complex features
Guide the design of a system or feature from requirements to a documented architecture. Produces C4-model diagrams (Context → Container → Component), service boundary definitions, API contracts, data flow diagrams, failure mode analysis, and an ADR for the key decisions made. Works standalone or as the /abd-design agent in the ABD workflow.
Ask the user for (or read from existing artifacts):
If docs/requirements/ exists, use Glob and Read to load relevant requirements documents.
Based on the inputs, recommend and justify one of these patterns. Explain the tradeoffs in the context of the stated constraints:
| Pattern | Best For | Avoid When |
|---|---|---|
| Monolith (Modular) | Small teams, early stage, unclear domain boundaries | Team > 10, independent scaling needed |
| Microservices | Large teams, independent scaling, polyglot | Small team, immature domain model |
| Event-Driven | Async workflows, loose coupling, audit trail needed | Simple CRUD, low latency required |
| Hexagonal (Ports & Adapters) | Complex domain logic, testability, multiple I/O adapters | Simple CRUD apps |
| CQRS + Event Sourcing | Complex queries, audit history, high write/read ratio difference | Simple domains, small teams |
| Serverless | Unpredictable traffic, low ops overhead, event-driven | Long-running jobs, high cold-start sensitivity |
| BFF (Backend for Frontend) | Multiple client types with different data needs | Single client type |
Ask the user to confirm the pattern before proceeding.
Produce a Mermaid diagram showing the system in context:
C4Context
title System Context — <System Name>
Person(user, "End User", "Uses the system via web/mobile")
System(system, "<System Name>", "The system being designed")
System_Ext(auth, "Auth Provider", "OAuth2/OIDC — e.g. Auth0")
System_Ext(email, "Email Service", "Transactional email — e.g. SendGrid")
Rel(user, system, "Uses", "HTTPS")
Rel(system, auth, "Authenticates via", "HTTPS/OIDC")
Rel(system, email, "Sends email via", "HTTPS/API")
If C4 Mermaid syntax is not supported, use graph LR with clear labels.
Decompose the system into containers (deployable units):
For each container specify: technology choice, responsibility, and communication protocol with other containers.
For the most complex container (usually the API server), decompose into components:
For each major API surface, define:
For each external dependency and critical path, define:
Address explicitly:
Use Write to save the full design to docs/architecture/<feature-or-system-name>-design.md.
If handoffs/designs/ exists (ABD workflow), also write a JSON artifact to handoffs/designs/{taskId}_design_{unixTimestamp}.json using the ABD envelope schema.
Offer to run /adr to capture the key architectural decisions as ADRs.
The design document should contain all diagrams inline as Mermaid fenced code blocks, all tables, and a "Key Decisions" section summarising the choices made and why. End with "Open Questions" — any decisions that need stakeholder input before implementation begins.