╔══════════════════════════════════════════════════════════════════╗
║           Cortex Three-Layer Architecture                    ║
╚══════════════════════════════════════════════════════════════════╝

┌────────────────────────────────────────────────────────────────┐
│                   LAYER 1: USER COMMANDS                        │
│                   43 Commands / 16 Namespaces                   │
├────────────────────────────────────────────────────────────────┤
│  /refactor:*     /workflow:*     /mode:*       /dev:*          │
│  /test:*         /deploy:*       /analyze:*    /docs:*         │
│  /quality:*      /design:*       /orchestrate:* /session:*     │
│  /reasoning:*    /cleanup:*      /tools:*      /collaboration:*│
└────────────────────────────────────────────────────────────────┘
                              ↓
                         activates
                              ↓
┌────────────────────────────────────────────────────────────────┐
│                   LAYER 2: BEHAVIORAL MODES                     │
│                         8 Modes                                 │
├────────────────────────────────────────────────────────────────┤
│  🤝 Brainstorm              🔬 Deep Analysis                    │
│  ✨ Quality Focus           📦 Token Efficient                  │
│  ⚡ Parallel Orchestration  🔥 Super Saiyan                     │
│  📋 Task Management         🌍 Super Saiyan Universal           │
└────────────────────────────────────────────────────────────────┘
                              ↓
                          influences
                              ↓
┌────────────────────────────────────────────────────────────────┐
│                    LAYER 3: WORKFLOWS                           │
│                      9 Workflows                                │
├────────────────────────────────────────────────────────────────┤
│  🚀 Feature Development     🐛 Bug Fix                          │
│  ♻️  Refactoring             🎯 API Design                       │
│  🧹 Technical Debt          🏗️  Architecture Review             │
│  👋 Developer Onboarding    🔒 Security Audit                   │
│  ⚡ Performance Optimize                                        │
└────────────────────────────────────────────────────────────────┘
                              ↓
                         coordinates
                              ↓
┌────────────────────────────────────────────────────────────────┐
│                    LAYER 4: EXECUTION                           │
│               Agents + MCP Servers + Tools                      │
├────────────────────────────────────────────────────────────────┤
│  🤖 25+ Specialized Agents                                      │
│  🔌 3 MCP Servers (Codanna, Context7, Sequential)              │
│  🛠️  Native Tools (Read, Write, Edit, Bash, etc.)              │
└────────────────────────────────────────────────────────────────┘

═══════════════════════════════════════════════════════════════════

EXAMPLE FLOW: Refactoring

  User: /refactor:analyze src/auth
    ↓
  Command Layer: refactor:analyze loads
    ↓
  Mode Layer: Deep_Analysis + Quality_Focus activate
    ↓
  Workflow Layer: Refactoring workflow (steps 1-3)
    ↓
  Execution Layer: code-reviewer + Codanna MCP
    ↓
  Output: Refactoring plan with priorities

═══════════════════════════════════════════════════════════════════

QUICK LOOKUP

Commands:     /refactor:analyze     Analyze code for refactoring
              /refactor:execute     Execute refactoring plan
              /workflow:run         Run multi-step workflow
              /mode:activate        Manually activate mode

Modes:        Brainstorm            Socratic dialogue & exploration
              Deep_Analysis         Maximum reasoning depth
              Quality_Focus         8/10 score, 90% coverage
              Parallel_Orch         Parallel execution + gates

Workflows:    feature-development   Complete feature lifecycle
              refactoring           Safe code refactoring
              api-design            End-to-end API design
              technical-debt        Quarterly cleanup

═══════════════════════════════════════════════════════════════════

STATISTICS

  43  Slash Commands
  16  Command Namespaces
   8  Behavioral Modes
   9  Multi-step Workflows
  25+ Specialized Agents
   3  MCP Servers

═══════════════════════════════════════════════════════════════════

DOCUMENTATION

  ~/.cortex/docs/architecture-diagrams.md  - Comprehensive diagrams
  ~/.cortex/docs/quick-reference.md        - One-page cheat sheet
  ~/.cortex/docs/DIAGRAMS_README.md        - This summary

═══════════════════════════════════════════════════════════════════
