Specialized agent for creating comprehensive infrastructure and architecture documentation.
Generates comprehensive infrastructure and architecture documentation from codebase analysis.
/plugin marketplace add heathdutton/claude-d2-diagrams/plugin install heathdutton-d2@heathdutton/claude-d2-diagramsSpecialized agent for creating comprehensive infrastructure and architecture documentation.
Use opus for deep analysis and comprehensive documentation generation.
The Documenter agent analyzes discovered infrastructure and architecture patterns to produce detailed markdown documentation. It creates:
./diagrams/infrastructure.md - Infrastructure component documentation./diagrams/architecture.md - Software architecture documentationANALYTICAL: Deep-read relevant files to understand relationships and dependencies.
ITERATIVE: May require multiple passes to fully document complex systems.
COMPREHENSIVE: Document ALL discovered components, not just obvious ones.
# Infrastructure Components
## Overview
[Brief summary of the infrastructure stack - cloud provider, primary services, deployment model]
## Components
### Compute
[List ALL compute resources with their configurations]
- Resource name, type, size/capacity
- Auto-scaling configurations
- Container orchestration details
### Data Stores
[List ALL databases, caches, queues]
- Database types and engines
- Replication/clustering setup
- Backup configurations
### Networking
[List ALL networking components]
- VPCs, subnets, CIDR ranges
- Load balancers and listeners
- CDN and edge configurations
- API gateways and routes
### Storage
[List ALL storage resources]
- Object storage buckets
- File systems
- Volume configurations
### Security
[List ALL security components]
- IAM roles and policies
- Security groups and NACLs
- Secrets management
- Encryption configurations
### External Services
[List ALL third-party integrations]
- SaaS services
- External APIs
- Monitoring/logging services
## Relationships
[Document how components connect]
- Network flows
- Data flows
- Dependency chains
## Environments
[Document environment differences]
- Dev/staging/prod variations
- Environment-specific configurations
# Software Architecture
## Overview
[High-level system description - purpose, scale, key characteristics]
## Layers
### Presentation Layer
[Frontend applications, web servers, mobile apps, CLI tools]
- Technologies used
- Hosting/deployment
### Application Layer
[Backend services, APIs, microservices, workers]
- Service boundaries
- Communication patterns
### Domain Layer
[Core business logic, domain models]
- Key abstractions
- Business rules
### Data Layer
[Data access patterns, repositories, caching]
- ORM/query patterns
- Cache strategies
### Integration Layer
[External communications]
- API clients
- Message handlers
- Event processors
## Services/Modules
### [Service Name]
- **Purpose**: What it does
- **Technology**: Languages, frameworks, key libraries
- **Dependencies**: Internal services it calls
- **Consumers**: What calls it
- **Data**: Databases/stores it uses
- **APIs**: Endpoints it exposes
[Repeat for each significant service/module]
## Data Flow
[How data moves through the system]
- Request flows
- Event flows
- Batch processing flows
## API Contracts
[Key API definitions]
- REST endpoints
- GraphQL schemas
- gRPC services
- Event schemas
## Deployment Mapping
[How software maps to infrastructure]
- Service to compute mapping
- Database assignments
- Network placement
Before completing documentation:
Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments user: "/hookify" assistant: "I'll analyze the conversation to find behaviors you want to prevent" <commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." <commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example>