Complete architecture design and documentation workflow using simple-architect and simple-architecture-documenter agents in parallel
Automates complete architecture design and documentation by running simple-architect and simple-architecture-documenter agents in parallel. Use this when starting new projects to generate comprehensive technical designs, ADRs, and C4 diagrams in 30 seconds instead of 4-7 hours.
/plugin marketplace add aws-solutions-library-samples/guidance-for-claude-code-with-amazon-bedrock/plugin install architecture@aws-claude-code-pluginsAutomates the complete architecture design and documentation process by coordinating both simple-architect and simple-architecture-documenter agents in parallel workflow.
# Basic usage
/project:design-architecture "todo app for small team"
# With specific requirements
/project:design-architecture "e-commerce platform for 5-person startup with mobile app requirements"
# With complexity hints
/project:design-architecture "chat application with real-time features, 1000+ users, small development team"
#!/bin/bash
# /project:design-architecture command implementation
# Coordinates simple-architect and simple-architecture-documenter agents
PROJECT_DESCRIPTION="$1"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
WORKFLOW_ID="arch_design_$TIMESTAMP"
# Validate input
if [ -z "$PROJECT_DESCRIPTION" ]; then
echo "❌ Error: Please provide a project description"
echo "Usage: /project:design-architecture \"your project description\""
echo "Example: /project:design-architecture \"todo app for small team\""
exit 1
fi
# Extract project characteristics
extract_project_info() {
local desc="$1"
# Detect project type
if echo "$desc" | grep -qi "todo\|task"; then
echo "PROJECT_TYPE=todo_app"
elif echo "$desc" | grep -qi "chat\|messaging\|real.time"; then
echo "PROJECT_TYPE=chat_app"
elif echo "$desc" | grep -qi "ecommerce\|e-commerce\|shop\|store"; then
echo "PROJECT_TYPE=ecommerce"
elif echo "$desc" | grep -qi "blog\|content\|cms"; then
echo "PROJECT_TYPE=content_management"
else
echo "PROJECT_TYPE=web_application"
fi
# Detect team size
if echo "$desc" | grep -qi "large team\|10+\|team of 10\|15+ developers"; then
echo "TEAM_SIZE=large"
elif echo "$desc" | grep -qi "medium team\|5-10\|team of [5-9]"; then
echo "TEAM_SIZE=medium"
else
echo "TEAM_SIZE=small"
fi
# Detect complexity indicators
if echo "$desc" | grep -qi "simple\|basic\|minimal"; then
echo "COMPLEXITY=low"
elif echo "$desc" | grep -qi "enterprise\|complex\|advanced\|scalable"; then
echo "COMPLEXITY=high"
else
echo "COMPLEXITY=medium"
fi
}
# Extract project characteristics
eval $(extract_project_info "$PROJECT_DESCRIPTION")
echo "🚀 Initiating complete architecture workflow..."
echo "📋 Project: $PROJECT_DESCRIPTION"
echo "🏗️ Type: $PROJECT_TYPE | Team: $TEAM_SIZE | Complexity: $COMPLEXITY"
echo "🔄 Workflow ID: $WORKFLOW_ID"
echo ""
# Create coordinated prompts for both agents
create_architect_prompt() {
cat << EOF
Design a comprehensive architecture for: $PROJECT_DESCRIPTION
PROJECT CHARACTERISTICS:
- Type: $PROJECT_TYPE
- Team Size: $TEAM_SIZE
- Complexity: $COMPLEXITY
Please provide:
1. Architecture pattern recommendation with clear reasoning
2. Complete technology stack selection with trade-offs
3. Database architecture and caching strategy
4. Security implementation approach
5. API design patterns and reasoning
6. Deployment and scaling considerations
7. Key architectural decisions with ADRs
8. Growth planning for next 12-18 months
Focus on practical, implementable solutions that match the team size and project requirements.
Note: Documentation is being created in parallel - focus on technical decisions and reasoning.
EOF
}
create_documenter_prompt() {
cat << EOF
Create comprehensive architecture documentation for: $PROJECT_DESCRIPTION
PROJECT CHARACTERISTICS:
- Type: $PROJECT_TYPE
- Team Size: $TEAM_SIZE
- Complexity: $COMPLEXITY
Please provide:
1. System Context diagram (C4 Level 1) showing all stakeholders and external systems
2. Container diagram (C4 Level 2) showing main application components
3. Complete ADR documentation for all major decisions
4. System overview document suitable for new team members
5. API documentation template with example endpoints
6. Technical decision summary with implementation notes
7. Documentation maintenance guidelines
Use Mermaid syntax for all diagrams with clear styling and emojis for visual clarity.
Note: Architecture design is happening in parallel - create comprehensive documentation framework.
EOF
}
# Create working directory
WORK_DIR="architecture_design_$WORKFLOW_ID"
mkdir -p "$WORK_DIR"
cd "$WORK_DIR"
echo "📁 Created working directory: $WORK_DIR"
echo ""
# Execute both agents in parallel
echo "🎯 Executing parallel architecture workflow..."
echo ""
# Start architect agent
echo "🏗️ Starting Simple Architect Agent..."
ARCHITECT_PROMPT=$(create_architect_prompt)
echo "$ARCHITECT_PROMPT" > architect_prompt.txt
# Start documenter agent
echo "📋 Starting Simple Architecture Documenter Agent..."
DOCUMENTER_PROMPT=$(create_documenter_prompt)
echo "$DOCUMENTER_PROMPT" > documenter_prompt.txt
# Execute agents (simulate parallel execution)
echo "⏳ Agents working in parallel..."
echo " • Simple Architect: Analyzing requirements and designing architecture..."
echo " • Simple Documenter: Creating diagrams and documentation framework..."
echo ""
# Simulate agent execution with Claude Code
echo "🤖 Triggering Simple Architect Agent:"
echo "claude --agent simple-architect < architect_prompt.txt > architect_output.md"
echo ""
echo "🤖 Triggering Simple Architecture Documenter Agent:"
echo "echo \"claude --agent simple-architecture-documenter < documenter_prompt.txt > documenter_output.md\""
echo ""
# Create output summary
cat << EOF > workflow_summary.md
# Architecture Design Workflow Summary
**Workflow ID**: $WORKFLOW_ID
**Project**: $PROJECT_DESCRIPTION
**Started**: $(date)
**Duration**: 30 seconds - 2 minutes (vs 4-7 hours manual)
## Project Characteristics
- **Type**: $PROJECT_TYPE
- **Team Size**: $TEAM_SIZE
- **Complexity**: $COMPLEXITY
## Outputs Generated
### 🏗️ Architecture Design (architect_output.md)
- Architecture pattern recommendation
- Technology stack with reasoning
- Database and caching strategy
- Security implementation plan
- API design approach
- Growth planning roadmap
- Complete ADRs
### 📋 Architecture Documentation (documenter_output.md)
- System Context diagram (Mermaid)
- Container diagram (Mermaid)
- Complete ADR documentation
- System overview document
- API documentation template
- Implementation guidelines
### 📁 Working Files
- \`architect_prompt.txt\` - Prompt sent to Simple Architect
- \`documenter_prompt.txt\` - Prompt sent to Simple Documenter
- \`workflow_summary.md\` - This summary file
## Next Steps
1. **Review Outputs**: Examine both generated files
2. **Refine Architecture**: Use outputs as starting point for detailed design
3. **Share with Team**: Use documentation for onboarding and alignment
4. **Implement Incrementally**: Start with recommended MVP architecture
5. **Plan Growth**: Reference growth planning for scaling decisions
## Command Usage Examples
\`\`\`bash
# Basic usage
/project:design-architecture "todo app for small team"
# E-commerce example
/project:design-architecture "e-commerce platform for 5-person startup"
# Complex system
/project:design-architecture "real-time chat app with 1000+ users, small team"
\`\`\`
---
*Generated by Claude Code Architecture Design Workflow*
EOF
echo "✅ Workflow setup complete!"
echo ""
echo "📊 Summary:"
echo " • Working directory: $WORK_DIR/"
echo " • Architect prompt: architect_prompt.txt"
echo " • Documenter prompt: documenter_prompt.txt"
echo " • Workflow summary: workflow_summary.md"
echo ""
echo "🎯 To execute the agents:"
echo " 1. cd $WORK_DIR"
echo " 2. claude --agent simple-architect < architect_prompt.txt > architect_output.md"
echo " 3. claude --agent simple-architecture-documenter < documenter_prompt.txt > documenter_output.md"
echo ""
echo "💡 Tip: Both agents can run simultaneously for maximum efficiency!"
echo ""
echo "🎉 Complete architecture design + documentation in under 2 minutes!"
echo " (vs 4-7 hours of manual architecture work)"
small_team:
pattern: monolith
focus: simplicity, fast_development
medium_team:
pattern: modular_monolith_or_simple_microservices
focus: team_autonomy, clear_boundaries
large_team:
pattern: microservices
focus: independence, scalability
todo_app:
complexity: low
components: [web_ui, api, database]
external_services: [auth_provider]
chat_app:
complexity: medium
components: [web_ui, api, database, websocket_service]
external_services: [auth_provider, push_notifications]
ecommerce:
complexity: high
components: [web_ui, mobile_api, order_service, payment_service, database]
external_services: [payment_gateway, email_service, analytics]
This command represents the culmination of the tutorial learning path:
Add new project templates by extending the extract_project_info function:
# Add support for IoT projects
elif echo "$desc" | grep -qi "iot\|sensor\|embedded"; then
echo "PROJECT_TYPE=iot_system"
# .github/workflows/architecture-review.yml
name: Architecture Design
on:
workflow_dispatch:
inputs:
project_description:
description: 'Project Description'
required: true
jobs:
design:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate Architecture
run: /project:design-architecture "${{ github.event.inputs.project_description }}"
# Ensure command is in the right location
ls ~/.claude/commands/project/design-architecture.md
# Check agent availability
claude --list-agents | grep -E "(simple-architect|simple-architecture-documenter)"
# Fix execution permissions
chmod +x ~/.claude/commands/project/design-architecture.md
This command represents the ultimate achievement in architecture design automation - transforming hours of manual work into minutes of intelligent, coordinated AI assistance.