Generate C4 architecture diagrams from subsystem catalog with proper abstraction levels
Generates C4 architecture diagrams from your subsystem catalog, creating proper Context, Container, and Component views. Use this to visualize system structure and dependencies when you need clear architectural documentation for technical and non-technical stakeholders.
/plugin marketplace add tachyon-beep/skillpacks/plugin install axiom-system-archaeologist@foundryside-marketplace[catalog_file_or_workspace]You are generating C4 architecture diagrams from analyzed subsystem data. Follow proper abstraction levels and notation conventions.
Diagrams communicate architecture. Wrong abstraction level = wrong understanding.
Each C4 level serves a different audience. Don't mix levels in one diagram.
Audience: Everyone (technical and non-technical) Shows: System as black box, external actors, external systems Hides: Internal structure
┌─────────────────────────────────────────────────────────┐
│ SYSTEM CONTEXT │
│ │
│ ┌──────┐ ┌──────────────┐ ┌──────┐ │
│ │ User │───────▶│ [System] │◀───────│ API │ │
│ └──────┘ │ │ └──────┘ │
│ │ Your system │ │
│ ┌──────┐ │ as a box │ ┌──────┐ │
│ │Admin │───────▶│ │◀───────│ DB │ │
│ └──────┘ └──────────────┘ └──────┘ │
│ │
└─────────────────────────────────────────────────────────┘
Audience: Technical stakeholders Shows: High-level technology choices, container relationships Hides: Component details within containers
┌─────────────────────────────────────────────────────────┐
│ CONTAINER │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌──────────┐ │
│ │ Web App │───▶│ API │───▶│ Database │ │
│ │ (React) │ │ (FastAPI) │ │ (Postgres)│ │
│ └─────────────┘ └─────────────┘ └──────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Mobile │ │ Worker │ │
│ │ (Flutter) │ │ (Celery) │ │
│ └─────────────┘ └─────────────┘ │
│ │
└─────────────────────────────────────────────────────────┘
Audience: Developers Shows: Components within a container, their responsibilities Hides: Code-level details
┌─────────────────────────────────────────────────────────┐
│ COMPONENT (API Container) │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌──────────┐ │
│ │ Auth │───▶│ Users │───▶│ Database │ │
│ │ Controller │ │ Service │ │ Layer │ │
│ └─────────────┘ └─────────────┘ └──────────┘ │
│ │ ▲ │
│ ▼ │ │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Orders │───▶│ Validation │ │
│ │ Controller │ │ Service │ │
│ └─────────────┘ └─────────────┘ │
│ │
└─────────────────────────────────────────────────────────┘
Audience: Developers working on specific component Shows: Class diagrams, code structure When to use: Only for complex components that need clarification
Load 02-subsystem-catalog.md and extract:
| Deliverable Option | Diagram Levels |
|---|---|
| Quick Overview (B) | Context + Container only |
| Full Analysis (A) | Context + Container + Component |
| Architect-Ready (C) | All levels + dependency flow |
From discovery findings, identify:
## C4 Level 1: System Context
[ASCII diagram or Mermaid]
**Actors:**
- [Actor 1]: [Description, interaction]
- [Actor 2]: [Description, interaction]
**External Systems:**
- [System 1]: [Description, data flow]
- [System 2]: [Description, data flow]
From subsystem catalog, group into containers:
## C4 Level 2: Container
[ASCII diagram or Mermaid]
**Containers:**
| Container | Technology | Responsibility |
|-----------|------------|----------------|
| [Name] | [Stack] | [One sentence] |
**Data Flows:**
- [Container A] → [Container B]: [Data description]
For each significant container:
## C4 Level 3: Component - [Container Name]
[ASCII diagram or Mermaid]
**Components:**
| Component | Type | Responsibility |
|-----------|------|----------------|
| [Name] | [Controller/Service/etc.] | [One sentence] |
**Dependencies:**
- [Component A] → [Component B]: [Reason]
Boxes: ┌───────┐
│ Name │
└───────┘
Arrows: ──▶ (data flow)
─── (relationship)
- - ▶ (async/optional)
Boundaries: ╔═══════════════╗
║ Boundary ║
╚═══════════════╝
graph TD
subgraph "System Boundary"
A[Web App] --> B[API]
B --> C[(Database)]
end
D[User] --> A
E[External API] --> B
Before finalizing diagrams:
Write to 03-diagrams.md:
# Architecture Diagrams
Generated from: `02-subsystem-catalog.md`
Date: [timestamp]
Confidence: [High/Medium/Low based on catalog confidence]
## C4 Level 1: System Context
[diagram + description]
## C4 Level 2: Container
[diagram + description]
## C4 Level 3: Component - [Container 1]
[diagram + description]
## C4 Level 3: Component - [Container 2]
[diagram + description]
## Diagram Limitations
- [Any gaps in source data]
- [Inferred relationships]
- [Unverified dependencies]
import glob
# For documentation formatting
writer_pack = glob.glob("plugins/muna-technical-writer/plugin.json")
if not writer_pack:
print("Recommend: muna-technical-writer for professional formatting")
This command covers:
Not covered: