Generate comprehensive technical documentation from codebases. Use when creating system docs, architecture guides, API references, or onboarding materials...
Expert in creating comprehensive technical documentation that captures system architecture, design decisions, and implementation details.
# Analyze project and generate 001-009 docs
"Generate MVP documentation analyzing the EventOS codebase"
# Document feature AND generate task structure
"Document the event wizard feature with task breakdown for Task Master"
# Output includes:
# - Feature documentation with code examples
# - Task hierarchy with 5-7 subtasks each
# - Dependencies and complexity scores
# - Success criteria for each task
# Generate comprehensive feature plan
"Create implementation plan for booking system including:
- Architecture diagrams
- Task breakdown (database, state, UI, API layers)
- Task Master commands
- Success criteria"
# Analyze and document existing code
"Analyze the dashboard feature and create documentation with:
- Architecture explanation
- Code walkthrough
- Task breakdown for improvements
- Testing strategy"
Standard EventOS documentation follows this pattern:
docs/mvp/
├── 001-overview.md # Executive summary
├── 002-architecture.md # System design, components
├── 003-setup-guide.md # Environment setup
├── 004-core-features.md # Core functionality
├── 005-intermediate-workflows.md # Automation, data flows
├── 006-advanced-features.md # AI agents, MCP servers
├── 007-best-practices.md # Standards, conventions
├── 008-success-criteria.md # Goals, metrics
└── 009-workflow-checklist.md # Task tracking
# [Number] - [Title]
**Purpose:** [One sentence explaining what this doc covers]
---
## 🎯 **Overview**
[High-level summary with key takeaways]
## 🏗️ **Architecture/Implementation**
[Technical details with code examples]
## 📊 **Flow Diagrams**
[Mermaid diagrams for sequences/architecture]
## ✅ **Success Criteria**
[Measurable validation points]
---
**Next Step:** Review [next-doc.md](next-doc.md)
Sequence Diagram:
sequenceDiagram
participant User
participant Frontend
participant Backend
participant Database
User->>Frontend: Action
Frontend->>Backend: API Call
Backend->>Database: Query
Database->>Backend: Result
Backend->>Frontend: Response
Frontend->>User: Update UI
Architecture Diagram:
graph TB
A[Client] --> B[API Gateway]
B --> C[Auth Service]
B --> D[Database]
C --> E[External Auth]
Start high-level, progressively add detail:
Always answer "why" questions:
## Why Supabase for Backend?
**Decision**: Use Supabase instead of custom backend
**Rationale**:
- Built-in RLS for security
- Real-time subscriptions out-of-box
- PostgreSQL for complex queries
- Edge Functions for serverless
- Faster MVP development (weeks vs months)
Show actual implementation, not pseudocode:
// ✅ Good: Real code from project
export function useEvents() {
return useQuery({
queryKey: ['events'],
queryFn: async () => {
const { data, error } = await supabase
.from('events')
.select('*')
.eq('status', 'published');
if (error) throw error;
return data;
}
});
}
// ❌ Bad: Generic pseudocode
function fetchEvents() {
// fetch events from database
// handle errors
// return results
}
Reference specific files:
Event creation logic in src/features/events/hooks/useEventMutations.ts:34-61
// Analyze codebase structure
1. List all source directories
2. Identify main components (pages, features, hooks)
3. Map dependencies and relationships
4. Extract key patterns (hooks, components, utils)
// Plan documentation hierarchy
1. Determine document types needed
2. Create logical chapter flow
3. Plan diagram requirements
4. Identify code examples to include
// Write documentation
1. Start with executive summary
2. Document architecture/design
3. Add implementation details
4. Include diagrams and examples
5. Add validation/testing sections
// Review and refine
1. Check for missing context
2. Verify code examples work
3. Ensure diagrams are clear
4. Test navigation and links
Request: "Generate MVP documentation for EventOS"
Output: 9 numbered documents covering:
Request: "Document the event wizard feature with task breakdown"
Output: Comprehensive guide including:
Request: "Create implementation plan for booking system"
Output: Complete plan with:
Task 1: Ticket System Database (5 subtasks)
Task 2: Booking State Management (5 subtasks)
Task 3: Cart UI Components (5 subtasks)
Task 4: Payment Integration (6 subtasks)
Task 5: Order Confirmation (4 subtasks)
Request: "Analyze dashboard and suggest improvements"
Output: Analysis including:
When documenting features, use systematic task breakdown:
# Generate task structure from feature documentation
"Analyze the Event Wizard feature and create Task Master task breakdown"
# Output: Task hierarchy with subtasks, dependencies, complexity scores
Key Principles:
Task: Database Schema
└─ Subtasks: Migration → Indexes → RLS → Functions → Validation
Task: Component Implementation
└─ Subtasks: Structure → Styling → Logic → Validation → Integration
Task: User Journey
└─ Subtasks: UI → State → API → Testing → Documentation
# Parse feature docs into tasks
task-master parse-prd --input="docs/mvp/004-core-features.md"
# Expand complex tasks
task-master expand-task --id=4 --num=5
# Track implementation
task-master set-status --id=4.1 --status=in-progress
See resources/task-breakdown-guide.md for complete methodology.
See resources/ folder for:
doc-template.md - Standard document structuretask-breakdown-guide.md - Feature task decomposition methodologymermaid-patterns.md - Diagram templates and patternsquick-reference.md - Command cheat sheet# Sequence Diagram
sequenceDiagram
A->>B: Request
B->>A: Response
# Graph
graph TB
A[Start] --> B[Process]
B --> C[End]
# ERD
erDiagram
USER ||--o{ ORDER : places
Issue: Documentation too verbose Solution: Focus on project-specific patterns only. Remove explanations of well-known concepts.
Issue: Diagrams unclear Solution: Add labels, limit to 5-7 nodes, use clear names, include legend if needed.
Issue: Code examples don't work Solution: Copy actual working code from project, verify file paths, test before including.
Issue: Documentation quickly outdated Solution: Document "why" and patterns, not implementation details. Include last-updated date.
Quick Commands:
# Generate full MVP docs
Skill("docs-architect") "Generate MVP documentation"
# Document specific area
Skill("docs-architect") "Document authentication system"
# Create diagrams
Skill("docs-architect") "Create architecture diagram for event booking flow"
Last Updated: 2025-10-19 Version: 1.0 Status: Production Ready