C4 architecture diagram expert...
Expert at generating C4 model architecture diagrams.
The C4 model provides four levels of abstraction:
Shows how the system fits into the world.
C4Context
title System Context Diagram for guilde-lite
Person(dev, "Developer", "Uses Claude Code for development")
System(guilde, "guilde-lite", "Development environment automation")
System_Ext(homebrew, "Homebrew", "Package manager")
System_Ext(mise, "mise", "Runtime version manager")
System_Ext(orbstack, "OrbStack", "Container runtime")
System_Ext(claude, "Claude Code", "AI assistant")
Rel(dev, guilde, "Uses")
Rel(guilde, homebrew, "Installs system packages")
Rel(guilde, mise, "Manages runtimes")
Rel(guilde, orbstack, "Runs containers")
Rel(dev, claude, "Interacts with")
Rel(claude, guilde, "Automates")
Shows the technical building blocks.
C4Container
title Container Diagram for guilde-lite
Person(dev, "Developer")
System_Boundary(guilde, "guilde-lite") {
Container(taskfile, "Taskfile", "YAML", "Task automation")
Container(scripts, "Scripts", "Bash", "Automation scripts")
Container(conductor, "Conductor", "Markdown", "Workflow orchestration")
Container(claude_config, "Claude Config", "JSON/MD", "AI assistant configuration")
}
System_Boundary(databases, "Database Stack") {
ContainerDb(postgres, "PostgreSQL", "Database", "Primary data store")
ContainerDb(redis, "Redis", "Cache", "Caching and queues")
ContainerDb(qdrant, "Qdrant", "Vector DB", "Embeddings storage")
}
Rel(dev, taskfile, "Runs tasks")
Rel(taskfile, scripts, "Executes")
Rel(scripts, databases, "Manages")
Rel(dev, conductor, "Follows workflow")
Rel(dev, claude_config, "Configures AI")
Shows components within a container.
C4Component
title Component Diagram for Conductor
Container_Boundary(conductor, "Conductor") {
Component(tracks, "Tracks", "Markdown", "Work item definitions")
Component(workflow, "Workflow", "Markdown", "Development process")
Component(tech_stack, "Tech Stack", "Markdown", "Technology decisions")
Component(product, "Product", "Markdown", "Product context")
}
Container_Boundary(hooks, "Claude Hooks") {
Component(session_start, "SessionStart", "JSON", "Context loading")
Component(pre_compact, "PreCompact", "JSON", "Context preservation")
Component(pre_tool, "PreToolUse", "JSON", "TDD enforcement")
Component(post_tool, "PostToolUse", "JSON", "Review reminders")
}
Rel(workflow, tracks, "References")
Rel(session_start, tracks, "Loads")
Rel(pre_compact, tracks, "Preserves state")
Since native C4 support varies, you can also use standard Mermaid flowcharts:
flowchart TB
subgraph Users
dev[("Developer")]
end
subgraph guilde-lite["guilde-lite System"]
automation["Automation<br/>Taskfile + Scripts"]
conductor["Conductor<br/>Workflow Management"]
claude_cfg["Claude Config<br/>AI Settings"]
end
subgraph External["External Systems"]
mise["mise<br/>Runtime Manager"]
orbstack["OrbStack<br/>Containers"]
claude["Claude Code<br/>AI Assistant"]
end
dev --> automation
dev --> conductor
automation --> mise
automation --> orbstack
dev --> claude
claude --> claude_cfg
Recommended documentation structure:
docs/
āāā architecture/
ā āāā c4-context.md # Level 1: Context
ā āāā c4-containers.md # Level 2: Containers
ā āāā c4-components/ # Level 3: Components
ā ā āāā conductor.md
ā ā āāā automation.md
ā ā āāā hooks.md
ā āāā decisions/ # Architecture Decision Records
ā āāā ADR-001-mise-first.md
ā āāā ADR-002-orbstack.md
Use the c4-architecture agents for comprehensive documentation:
c4-context - System context levelc4-container - Container levelc4-component - Component levelc4-code - Code level# Check architecture docs
bash scripts/doc-sync-check.sh check docs/architecture/c4-context.md
# Validate all documentation
task docs:validate