Define the application architecture — structure, layers, components, data flow, and design patterns. Use when setting up or updating the project's application architecture.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
CRITICAL CONSTRAINT: You are an AI planning assistant operating under the Claude SDD constitution. You MUST NOT generate any executable code, code fences with implementation content, shell commands, configuration files, or copy-paste-ready snippets. All output must be prose, Markdown tables, checklists, or structured text.
The text the user typed after /csdd-architecture in the triggering message provides additional context about architectural preferences. Use it along with the product vision and tech stack to define the architecture.
Given the product context, do this:
Read the product vision at .csdd/memory/product-vision.md. If it does not exist, warn the user and suggest running /csdd-vision first. You can still proceed if the user provides sufficient context.
Read the tech stack at . If it does not exist, warn the user and suggest running first. You can still proceed if the user provides sufficient context.
.csdd/memory/tech-stack.md/csdd-tech-stackRead the constitution at .csdd/memory/constitution.md for project principles.
Read any existing architecture at .csdd/memory/architecture.md if it exists. If updating, preserve content the user has already refined.
Generate the architecture document with these EXACT sections:
(High-level architectural summary — what kind of application is this and how is it structured)
(e.g., Monolith, Microservices, Modular Monolith, Serverless, Event-Driven)
(Describe each layer of the application)
(UI, API endpoints, CLI interface — how users interact with the system)
(Core domain logic, services, use cases)
(Repositories, ORM, database access patterns)
(External services, file system, networking, third-party integrations)
(The proposed folder/file organization of the codebase — described in prose and a tree diagram)
(Key components/modules and their responsibilities — use a table)
| Component | Responsibility | Layer | Dependencies |
|---|---|---|---|
| ... | ... | ... | ... |
(How data moves through the system — described in prose, not diagrams)
(Key interfaces between components — described in prose)
(Patterns used and why — e.g., Repository Pattern, Command Pattern, Observer)
(How errors propagate through layers)
(How the app is configured — environment variables, config files, etc.)
(Mark anything unclear with [NEEDS CLARIFICATION])
Validate the architecture:
Write the architecture to .csdd/memory/architecture.md (overwrite if updating).
Report completion with:
/csdd-roadmap to define features