ArchitectureΒΆ
Core architecture documentation for the Evolve framework.
Framework Architecture OverviewΒΆ
This document describes the architecture of the Claude Code Extended Framework, explaining how components work together to enable AI-powered software development.
Framework AttributionΒΆ
This architecture integrates capabilities from multiple proven frameworks:
Claude Flow ArchitectureΒΆ
Source: github.com/ruvnet/claude-flow
SPARC methodology implementation (Specification β Pseudocode β Architecture β Refinement β Completion)
54+ specialized agents across 9 categories
Hooks system for pre/post operation automation
Multi-agent coordination with adaptive topology selection
Neural pattern training and memory management
CCPM (Claude Code PM) ArchitectureΒΆ
Source: github.com/automazeio/ccpm
Spec-driven development workflow (PRD β Epic β Issue)
Epic decomposition with GitHub synchronization
Git worktree management for parallel development
Issue-driven development with specialized agent assignment
Integration Architecture (This Projectβs Contribution)ΒΆ
MCP server orchestration patterns
Parallel execution standards (β1 MESSAGE = ALL OPERATIONSβ)
Memory coordination protocols across agents
Cross-framework workflow automation
Production deployment patterns
For production implementation details, technology selections, and deployment architecture, see evolve-architecture.md.
Table of ContentsΒΆ
System ArchitectureΒΆ
High-Level ArchitectureΒΆ
flowchart TB
User["π€ User / Developer"]
User --> CLI["Claude Code CLI"]
subgraph Framework["Extended Framework Layer"]
Config["π CLAUDE.md<br/>Config File"]
ClaudeDir["π .claude/<br/>Directory"]
Scripts["π Scripts<br/>Helpers"]
end
CLI --> Framework
subgraph Services["Core Services"]
MCP["π MCP Servers<br/>β’ claude-flow<br/>β’ ruv-swarm<br/>β’ flow-nexus"]
SPARC["βοΈ SPARC<br/>Workflow"]
PM["π PM System<br/>(CCPM)<br/>β’ PRDs<br/>β’ Epics<br/>β’ Issues"]
end
Framework --> MCP
Framework --> SPARC
Framework --> PM
subgraph Agents["Multi-Agent System"]
AgentPool["π€ 54+ Specialized Agents with Coordination"]
end
MCP --> Agents
SPARC --> Agents
PM --> Agents
subgraph External["External Integrations"]
GitHub["GitHub"]
Git["Git"]
Shell["Shell"]
FS["File System"]
end
Agents --> External
Component OverviewΒΆ
1. Configuration LayerΒΆ
CLAUDE.mdΒΆ
Main configuration file loaded by Claude Code CLI:
Project overview and instructions
Concurrent execution rules
File organization standards
Agent coordination protocol
MCP server integration settings
.claude/ Directory StructureΒΆ
.claude/
βββ agents/ # Specialized agent definitions (54+)
β βββ analysis/ # Code analysis agents
β βββ architecture/ # System design agents
β βββ consensus/ # Distributed consensus agents
β βββ core/ # Core agents (coder, reviewer, tester, etc.)
β βββ development/ # Development specialists
β βββ devops/ # CI/CD and infrastructure agents
β βββ flow-nexus/ # Cloud platform agents
β βββ github/ # GitHub integration agents
β βββ goal/ # Goal-oriented planning agents
β βββ hive-mind/ # Collective intelligence agents
β βββ optimization/ # Performance optimization agents
β βββ sparc/ # SPARC methodology agents
β βββ swarm/ # Swarm coordination agents
β βββ testing/ # Testing specialists
βββ commands/ # Slash commands (214+ across 25 categories)
β βββ agents/ # Agent management commands
β βββ analysis/ # Analysis commands
β βββ automation/ # Workflow automation
β βββ consider/ # Decision framework commands
β βββ flow-nexus/ # Cloud platform commands
β βββ github/ # GitHub operations
β βββ hive-mind/ # Collective intelligence commands
β βββ hooks/ # Hook configuration commands
β βββ monitoring/ # System monitoring
β βββ optimization/ # Performance optimization
β βββ pair/ # Pair programming commands
β βββ pm/ # Project management (CCPM)
β βββ sc/ # SuperClaude meta commands
β βββ sparc/ # SPARC methodology commands
β βββ swarm/ # Swarm coordination commands
β βββ ui/ # UI/frontend commands
β βββ workflows/ # Workflow templates
βββ context/ # Project context files
βββ helpers/ # Shell utilities
βββ prds/ # Product requirements (CCPM)
βββ router/ # Command routing configuration
βββ rules/ # Operational rules
β βββ agent-coordination.md
β βββ command-routing.md
β βββ github-operations.md
β βββ path-standards.md
βββ sessions/ # Session persistence
βββ skills/ # Reusable skill definitions
β βββ agent-sandboxes/ # E2B sandbox operations
β βββ create-agent-skills/
β βββ create-hooks/
β βββ create-meta-prompts/
β βββ create-plans/
β βββ create-slash-commands/
β βββ create-subagents/
β βββ debug-like-expert/
β βββ expertise/ # Domain expertise (iOS, macOS)
βββ statusline/ # Status line config
βββ superclaude/ # SuperClaude framework files
βββ tools/ # Custom tool definitions
βββ ccpm.config # CCPM configuration
βββ settings.json # Claude Code settings
βββ statusline-command.sh # Status line shell script
2. SPARC Methodology EngineΒΆ
The SPARC engine orchestrates systematic development:
flowchart LR
S[Specification] --> P[Pseudocode] --> A[Architecture] --> R[Refinement] --> C[Completion]
S --- S1[Requirements<br/>Analysis]
P --- P1[Algorithm<br/>Design]
A --- A1[System<br/>Design]
R --- R1[TDD:<br/>TestβCode]
C --- C1[Integration<br/>Validation]
Implementation:
Provided by
claude-flowMCP serverCommands:
npx claude-flow sparc <mode>Supports batch and pipeline execution
Integrates with agent coordination
3. Project Management System (CCPM)ΒΆ
Spec-driven development workflow:
flowchart TB
PRD["π PRD<br/>.claude/prds/<br/>Product Requirement Document"]
Epic["π Epic<br/>.claude/epics/<br/>Decomposed into tasks"]
Issues["π« GitHub Issues<br/>Synced to repository<br/>Tracked and managed"]
Worktree["πΏ Git Worktree + Agent<br/>Parallel development<br/>Isolated work environment"]
PRD --> Epic --> Issues --> Worktree
Key Features:
PRD creation:
/pm:prd-newEpic decomposition:
/pm:epic-oneshotIssue tracking:
/pm:issue-startPriority management:
/pm:next
4. Multi-Agent CoordinationΒΆ
Agent CategoriesΒΆ
Core Development (5 agents):
coder, reviewer, tester, planner, researcher
Swarm Coordination (5 agents):
hierarchical-coordinator
mesh-coordinator
adaptive-coordinator
collective-intelligence-coordinator
swarm-memory-manager
Consensus & Distributed (7 agents):
byzantine-coordinator, raft-manager
gossip-coordinator, consensus-builder
crdt-synchronizer, quorum-manager
security-manager
GitHub & Repository (9 agents):
github-modes, pr-manager
code-review-swarm, issue-tracker
release-manager, workflow-automation
project-board-sync, repo-architect
multi-repo-swarm
Specialized Development (8 agents):
backend-dev, mobile-dev, ml-developer
cicd-engineer, api-docs, system-architect
code-analyzer, base-template-generator
And more (20+ additional agents)
Coordination PatternsΒΆ
Hierarchical (Queen-Worker):
flowchart TB
Queen["π Queen Coordinator"]
A["Worker A"]
B["Worker B"]
C["Worker C"]
Queen --> A
Queen --> B
Queen --> C
Mesh (Peer-to-Peer):
flowchart LR
A1["Agent"] <--> A2["Agent"]
A3["Agent"] <--> A4["Agent"]
A1 <--> A3
A2 <--> A4
Adaptive (Dynamic):
flowchart TB
Start["Starts: Hierarchical"]
Switch["Switches to: Mesh"]
Back["Back to: Hierarchical"]
Start -->|"conditions change"| Switch
Switch -->|"if needed"| Back
5. MCP Server IntegrationΒΆ
Claude Flow (Required)ΒΆ
SPARC methodology execution
Agent spawning and coordination
Hooks system (pre/post operations)
Memory management
Neural pattern training
Ruv-Swarm (Optional)ΒΆ
Enhanced swarm coordination
Advanced topology management
Performance optimization
Flow-Nexus (Optional - Cloud)ΒΆ
Cloud-based execution
Distributed sandboxes
Template marketplace
Real-time collaboration
6. GitHub Integration LayerΒΆ
Automated workflows and operations:
flowchart TB
Dev["π€ Developer Action"]
Event["GitHub Event"]
subgraph Workflows["βοΈ Workflows (CI/CD)"]
W1["shellcheck.yml"]
W2["health-check.yml"]
W3["auto-label.yml"]
W4["stale.yml"]
end
subgraph Issues["π Issue Templates"]
I1["bug_report.md"]
I2["feature_request.md"]
end
subgraph PR["π PR Template"]
P1["PULL_REQUEST_TEMPLATE.md"]
end
Dev --> Event
Event --> Workflows
Event --> Issues
Event --> PR
Data FlowΒΆ
Typical Development FlowΒΆ
flowchart TB
U["1. π€ User requests feature"]
PRD["2. /pm:prd-new creates PRD"]
Epic["3. /pm:epic-oneshot decomposes"]
Issues["4. GitHub issues created"]
Start["5. /pm:issue-start begins work"]
subgraph SPARC["6. SPARC Workflow"]
S1["Specification"]
S2["Pseudocode"]
S3["Architecture"]
S4["Refinement (TDD)"]
S5["Completion"]
end
subgraph Coord["7. Agent Coordination"]
C1["Parallel execution"]
C2["Memory sharing"]
C3["Hooks integration"]
end
Code["8. Code generation & testing"]
PR["9. PR creation & review"]
Deploy["10. Merge & deployment"]
U --> PRD --> Epic --> Issues --> Start --> SPARC --> Coord --> Code --> PR --> Deploy
Memory FlowΒΆ
flowchart TB
A["π€ Agent A"]
B["π€ Agent B"]
Mem["πΎ Memory Store"]
State["π¦ Session State"]
Next["π Next Session"]
A -->|"writes"| Mem
B -->|"reads"| Mem
Mem -->|"persists"| State
State -->|"restores"| Next
Integration PointsΒΆ
File System IntegrationΒΆ
flowchart LR
subgraph Claude[".claude/"]
C1["Read by: Claude Code CLI"]
C2["Modified by: PM commands"]
C3["Used by: All agents"]
end
subgraph Scripts["scripts/"]
S1["Executed by: Users, workflows"]
S2["Coordinated via: Hook system"]
end
subgraph GitHub[".github/"]
G1["Processed by: GitHub Actions"]
G2["Triggered by: Git events"]
end
Git IntegrationΒΆ
flowchart TB
Git["π Git Operations"]
subgraph Branch["Branch Management"]
B1["Worktrees for parallel work"]
end
subgraph Hooks["Commit Hooks"]
H1["Pre-commit: validation"]
H2["Post-commit: notifications"]
end
subgraph Sync["Remote Sync"]
S1["Push/Pull coordination"]
end
Git --> Branch
Git --> Hooks
Git --> Sync
GitHub API IntegrationΒΆ
Through gh CLI and GitHub Actions:
Issue creation/management
PR creation/review
Label management
Project boards
Discussions
Design PrinciplesΒΆ
1. Concurrent Execution FirstΒΆ
Principle: All operations should be parallel unless dependencies require sequential execution.
Implementation:
Batch file operations
Parallel agent spawning
Single-message multi-tool calls
2. Evidence-Based DevelopmentΒΆ
Principle: Code > Documentation, Evidence > Assumptions
Implementation:
Tests before implementation
Validation gates
Measurement-driven decisions
3. File Organization DisciplineΒΆ
Principle: Never pollute root directory, always use subdirectories.
Implementation:
Enforced directory structure
Path standardization
Gitignore patterns
4. Agent Autonomy with CoordinationΒΆ
Principle: Agents work independently but coordinate through shared memory and hooks.
Implementation:
Work stream assignment
File-level parallelism
Atomic commits
Progress tracking
5. Security by DefaultΒΆ
Principle: No secrets, validate inputs, protect privacy.
Implementation:
Path normalization (no usernames)
Repository validation
Input sanitization
No hardcoded credentials
Scalability & PerformanceΒΆ
Performance MetricsΒΆ
84.8% SWE-Bench solve rate
32.3% token reduction (via compression)
2.8-4.4x speed improvement (via parallelization)
27+ neural models for pattern learning
Scalability FeaturesΒΆ
Horizontal Scaling:
Multiple agents work in parallel
Git worktrees for isolation
Distributed coordination
Vertical Scaling:
Adaptive topology switching
Resource-aware execution
Token efficiency modes
Caching Strategy:
Search result caching (1 hour)
Pattern reuse
Session persistence
Neural training
Bottleneck MitigationΒΆ
flowchart LR
subgraph B1["β οΈ Sequential operations"]
S1["β
Parallel-first execution"]
end
subgraph B2["β οΈ Token limits"]
S2["β
Ultra-compressed mode"]
end
subgraph B3["β οΈ File conflicts"]
S3["β
Worktree isolation"]
end
subgraph B4["β οΈ API rate limits"]
S4["β
Batch operations"]
end
Extension PointsΒΆ
Adding Custom CommandsΒΆ
.claude/commands/my-namespace/my-command.md
Adding Helper ScriptsΒΆ
.claude/helpers/my-helper.sh
Adding Coordination RulesΒΆ
.claude/rules/my-rule.md
Extending WorkflowsΒΆ
.github/workflows/my-workflow.yml
Future ArchitectureΒΆ
Planned improvements:
Web interface for PM system
Real-time collaboration
AI-powered code review
Performance analytics dashboard
Plugin system for extensions
For implementation details, see: