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-flow MCP server

  • Commands: 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-new

  • Epic decomposition: /pm:epic-oneshot

  • Issue tracking: /pm:issue-start

  • Priority 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:

Additional Architecture ResourcesΒΆ