doc-architecture
Generate Architecture Documentation
Create comprehensive architecture documentation for a system or component.
Process
1. Parse Arguments
Extract from user input:
- Subject: System/component to document (required)
- Format:
arc42,c4, orboth(default:c4) - Level: For C4 -
context,container, orcomponent(default:container)
2. Analyze System
Explore the codebase to understand:
- System boundaries: What is in scope?
- External dependencies: What systems does it interact with?
- Internal structure: How is it organized?
- Technology stack: What technologies are used?
- Key flows: What are the important scenarios?
Use file exploration to gather information:
- Solution/project files for structure
- Configuration files for dependencies
- Entry points for architecture clues
- Existing documentation
3. Generate Documentation
Based on the format argument:
If format = c4:
- Load the
c4-documentationskill - Generate diagrams at the requested level:
- context: System with users and external systems
- container: Internal applications and data stores
- component: Internal structure of a container
- Include narrative description with each diagram
If format = arc42:
- Load the
arc42-documentationskill - Generate relevant sections:
- Introduction and Goals
- Architecture Constraints
- System Scope and Context
- Solution Strategy
- Building Block View
- Runtime View (key scenarios)
- Deployment View
- Cross-cutting Concepts
If format = both:
- Generate arc42 document
- Embed C4 diagrams in appropriate sections
4. Output Structure
Create documentation file(s):
For C4:
docs/architecture/
└── {subject}-c4-{level}.md
For arc42:
docs/architecture/
└── {subject}-arc42.md
For both:
docs/architecture/
├── {subject}-architecture.md # arc42 with embedded C4
└── diagrams/
├── context.mmd
├── container.mmd
└── component.mmd
5. Include in Output
Every generated document should include:
-
Header with metadata
- Title
- Last updated date
- Author (if known)
- Version
-
Diagrams (Mermaid format)
- Properly formatted C4 diagrams
- Legend if needed
-
Narrative
- Context and purpose
- Key decisions and rationale
- Technology choices
- Trade-offs acknowledged
-
References
- Links to related docs
- External resources
- ADRs if applicable
Example Invocations
/doc-architecture "order service"
→ Generates C4 container diagram for order service
/doc-architecture "payment gateway" format=arc42
→ Generates full arc42 documentation
/doc-architecture "api gateway" format=c4 level=component
→ Generates C4 component diagram
/doc-architecture "entire system" format=both level=context
→ Generates arc42 with embedded C4 context diagram
Quality Criteria
Generated documentation must:
- Accurately reflect the system structure
- Use consistent terminology
- Include valid Mermaid/PlantUML syntax
- Explain the "why" not just the "what"
- Be actionable for readers
- Follow project documentation conventions
More from melodic-software/claude-code-plugins
design-thinking
Design Thinking methodology for human-centered innovation. Covers the 5-phase IDEO/Stanford d.school approach (Empathize, Define, Ideate, Prototype, Test) with workshop facilitation and exercise templates.
191plantuml-syntax
Authoritative reference for PlantUML diagram syntax. Provides UML and non-UML diagram types, syntax patterns, examples, and setup guidance for generating accurate PlantUML diagrams.
161system-prompt-engineering
Design effective system prompts for custom agents. Use when creating agent system prompts, defining agent identity and rules, or designing high-impact prompts that shape agent behavior.
141architecture-documentation
Generate architecture documents using templates with diagram integration. Use for creating C4 diagrams, viewpoint documents, and technical overviews.
126data-modeling
Data modeling with Entity-Relationship Diagrams (ERDs), data dictionaries, and conceptual/logical/physical models. Documents data structures, relationships, and attributes.
101resume-optimization
Resume structure, achievement bullet formulas, ATS optimization, and job-targeted tailoring for software engineers. Use when reviewing resumes, crafting achievement bullets, extracting keywords from job descriptions, or tailoring content for specific roles.
93