[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BPB49REGEF6HHQ02NPBHC2":3,"skill-same:01M7BPB49REGEF6HHQ02NPBHC2":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":34,"commitSha":35,"skillDirectory":36,"forksCount":37,"repositoryHtmlUrl":38,"repositoryHomepageUrl":39,"ownerHtmlUrl":40,"ownerBlogUrl":6,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M7BPB49REGEF6HHQ02NPBHC2","sparc-methodology",null,"SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) comprehensive development methodology with multi-agent orchestration","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Agent-智能体\u002FYYC3-Agent-智能体-ruflo\u002Fv3\u002F@claude-flow\u002Fmcp\u002F.claude\u002Fskills\u002Fsparc-methodology\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: sparc-methodology\ndescription: SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) comprehensive development methodology with multi-agent orchestration\nversion: 2.7.0\ncategory: development\ntags:\n  - sparc\n  - tdd\n  - architecture\n  - orchestration\n  - methodology\n  - multi-agent\nauthor: Claude Flow\n---\n\n# SPARC Methodology - Comprehensive Development Framework\n\n## Overview\n\nSPARC (Specification, Pseudocode, Architecture, Refinement, Completion) is a systematic development methodology integrated with Claude Flow's multi-agent orchestration capabilities. It provides 17 specialized modes for comprehensive software development, from initial research through deployment and monitoring.\n\n## Table of Contents\n\n1. [Core Philosophy](#core-philosophy)\n2. [Development Phases](#development-phases)\n3. [Available Modes](#available-modes)\n4. [Activation Methods](#activation-methods)\n5. [Orchestration Patterns](#orchestration-patterns)\n6. [TDD Workflows](#tdd-workflows)\n7. [Best Practices](#best-practices)\n8. [Integration Examples](#integration-examples)\n9. [Common Workflows](#common-workflows)\n\n---\n\n## Core Philosophy\n\nSPARC methodology emphasizes:\n\n- **Systematic Approach**: Structured phases from specification to completion\n- **Test-Driven Development**: Tests written before implementation\n- **Parallel Execution**: Concurrent agent coordination for 2.8-4.4x speed improvements\n- **Memory Integration**: Persistent knowledge sharing across agents and sessions\n- **Quality First**: Comprehensive reviews, testing, and validation\n- **Modular Design**: Clean separation of concerns with clear interfaces\n\n### Key Principles\n\n1. **Specification Before Code**: Define requirements and constraints clearly\n2. **Design Before Implementation**: Plan architecture and components\n3. **Tests Before Features**: Write failing tests, then make them pass\n4. **Review Everything**: Code quality, security, and performance checks\n5. **Document Continuously**: Maintain current documentation throughout\n\n---\n\n## Development Phases\n\n### Phase 1: Specification\n**Goal**: Define requirements, constraints, and success criteria\n\n- Requirements analysis\n- User story mapping\n- Constraint identification\n- Success metrics definition\n- Pseudocode planning\n\n**Key Modes**: `researcher`, `analyzer`, `memory-manager`\n\n### Phase 2: Architecture\n**Goal**: Design system structure and component interfaces\n\n- System architecture design\n- Component interface definition\n- Database schema planning\n- API contract specification\n- Infrastructure planning\n\n**Key Modes**: `architect`, `designer`, `orchestrator`\n\n### Phase 3: Refinement (TDD Implementation)\n**Goal**: Implement features with test-first approach\n\n- Write failing tests\n- Implement minimum viable code\n- Make tests pass\n- Refactor for quality\n- Iterate until complete\n\n**Key Modes**: `tdd`, `coder`, `tester`\n\n### Phase 4: Review\n**Goal**: Ensure code quality, security, and performance\n\n- Code quality assessment\n- Security vulnerability scanning\n- Performance profiling\n- Best practices validation\n- Documentation review\n\n**Key Modes**: `reviewer`, `optimizer`, `debugger`\n\n### Phase 5: Completion\n**Goal**: Integration, deployment, and monitoring\n\n- System integration\n- Deployment automation\n- Monitoring setup\n- Documentation finalization\n- Knowledge capture\n\n**Key Modes**: `workflow-manager`, `documenter`, `memory-manager`\n\n---\n\n## Available Modes\n\n### Core Orchestration Modes\n\n#### `orchestrator`\nMulti-agent task orchestration with TodoWrite\u002FTask\u002FMemory coordination.\n\n**Capabilities**:\n- Task decomposition into manageable units\n- Agent coordination and resource allocation\n- Progress tracking and result synthesis\n- Adaptive strategy selection\n- Cross-agent communication\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"orchestrator\",\n  task_description: \"coordinate feature development\",\n  options: { parallel: true, monitor: true }\n}\n```\n\n#### `swarm-coordinator`\nSpecialized swarm management for complex multi-agent workflows.\n\n**Capabilities**:\n- Topology optimization (mesh, hierarchical, ring, star)\n- Agent lifecycle management\n- Dynamic scaling based on workload\n- Fault tolerance and recovery\n- Performance monitoring\n\n#### `workflow-manager`\nProcess automation and workflow orchestration.\n\n**Capabilities**:\n- Workflow definition and execution\n- Event-driven triggers\n- Sequential and parallel pipelines\n- State management\n- Error handling and retry logic\n\n#### `batch-executor`\nParallel task execution for high-throughput operations.\n\n**Capabilities**:\n- Concurrent file operations\n- Batch processing optimization\n- Resource pooling\n- Load balancing\n- Progress aggregation\n\n---\n\n### Development Modes\n\n#### `coder`\nAutonomous code generation with batch file operations.\n\n**Capabilities**:\n- Feature implementation\n- Code refactoring\n- Bug fixes and patches\n- API development\n- Algorithm implementation\n\n**Quality Standards**:\n- ES2022+ standards\n- TypeScript type safety\n- Comprehensive error handling\n- Performance optimization\n- Security best practices\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"implement user authentication with JWT\",\n  options: {\n    test_driven: true,\n    parallel_edits: true,\n    typescript: true\n  }\n}\n```\n\n#### `architect`\nSystem design with Memory-based coordination.\n\n**Capabilities**:\n- Microservices architecture\n- Event-driven design\n- Domain-driven design (DDD)\n- Hexagonal architecture\n- CQRS and Event Sourcing\n\n**Memory Integration**:\n- Store architectural decisions\n- Share component specifications\n- Maintain design consistency\n- Track architectural evolution\n\n**Design Patterns**:\n- Layered architecture\n- Microservices patterns\n- Event-driven patterns\n- Domain modeling\n- Infrastructure as Code\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"architect\",\n  task_description: \"design scalable e-commerce platform\",\n  options: {\n    detailed: true,\n    memory_enabled: true,\n    patterns: [\"microservices\", \"event-driven\"]\n  }\n}\n```\n\n#### `tdd`\nTest-driven development with comprehensive testing.\n\n**Capabilities**:\n- Test-first development\n- Red-green-refactor cycle\n- Test suite design\n- Coverage optimization (target: 90%+)\n- Continuous testing\n\n**TDD Workflow**:\n1. Write failing test (RED)\n2. Implement minimum code\n3. Make test pass (GREEN)\n4. Refactor for quality (REFACTOR)\n5. Repeat cycle\n\n**Testing Strategies**:\n- Unit testing (Jest, Mocha, Vitest)\n- Integration testing\n- End-to-end testing (Playwright, Cypress)\n- Performance testing\n- Security testing\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"tdd\",\n  task_description: \"shopping cart feature with payment integration\",\n  options: {\n    coverage_target: 90,\n    test_framework: \"jest\",\n    e2e_framework: \"playwright\"\n  }\n}\n```\n\n#### `reviewer`\nCode review using batch file analysis.\n\n**Capabilities**:\n- Code quality assessment\n- Security vulnerability detection\n- Performance analysis\n- Best practices validation\n- Documentation review\n\n**Review Criteria**:\n- Code correctness and logic\n- Design pattern adherence\n- Comprehensive error handling\n- Test coverage adequacy\n- Maintainability and readability\n- Security vulnerabilities\n- Performance bottlenecks\n\n**Batch Analysis**:\n- Parallel file review\n- Pattern detection\n- Dependency checking\n- Consistency validation\n- Automated reporting\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"reviewer\",\n  task_description: \"review authentication module PR #123\",\n  options: {\n    security_check: true,\n    performance_check: true,\n    test_coverage_check: true\n  }\n}\n```\n\n---\n\n### Analysis and Research Modes\n\n#### `researcher`\nDeep research with parallel WebSearch\u002FWebFetch and Memory coordination.\n\n**Capabilities**:\n- Comprehensive information gathering\n- Source credibility evaluation\n- Trend analysis and forecasting\n- Competitive research\n- Technology assessment\n\n**Research Methods**:\n- Parallel web searches\n- Academic paper analysis\n- Industry report synthesis\n- Expert opinion gathering\n- Statistical data compilation\n\n**Memory Integration**:\n- Store research findings with citations\n- Build knowledge graphs\n- Track information sources\n- Cross-reference insights\n- Maintain research history\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"researcher\",\n  task_description: \"research microservices best practices 2024\",\n  options: {\n    depth: \"comprehensive\",\n    sources: [\"academic\", \"industry\", \"news\"],\n    citations: true\n  }\n}\n```\n\n#### `analyzer`\nCode and data analysis with pattern recognition.\n\n**Capabilities**:\n- Static code analysis\n- Dependency analysis\n- Performance profiling\n- Security scanning\n- Data pattern recognition\n\n#### `optimizer`\nPerformance optimization and bottleneck resolution.\n\n**Capabilities**:\n- Algorithm optimization\n- Database query tuning\n- Caching strategy design\n- Bundle size reduction\n- Memory leak detection\n\n---\n\n### Creative and Support Modes\n\n#### `designer`\nUI\u002FUX design with accessibility focus.\n\n**Capabilities**:\n- Interface design\n- User experience optimization\n- Accessibility compliance (WCAG 2.1)\n- Design system creation\n- Responsive layout design\n\n#### `innovator`\nCreative problem-solving and novel solutions.\n\n**Capabilities**:\n- Brainstorming and ideation\n- Alternative approach generation\n- Technology evaluation\n- Proof of concept development\n- Innovation feasibility analysis\n\n#### `documenter`\nComprehensive documentation generation.\n\n**Capabilities**:\n- API documentation (OpenAPI\u002FSwagger)\n- Architecture diagrams\n- User guides and tutorials\n- Code comments and JSDoc\n- README and changelog maintenance\n\n#### `debugger`\nSystematic debugging and issue resolution.\n\n**Capabilities**:\n- Bug reproduction\n- Root cause analysis\n- Fix implementation\n- Regression prevention\n- Debug logging optimization\n\n#### `tester`\nComprehensive testing beyond TDD.\n\n**Capabilities**:\n- Test suite expansion\n- Edge case identification\n- Performance testing\n- Load testing\n- Chaos engineering\n\n#### `memory-manager`\nKnowledge management and context preservation.\n\n**Capabilities**:\n- Cross-session memory persistence\n- Knowledge graph construction\n- Context restoration\n- Learning pattern extraction\n- Decision tracking\n\n---\n\n## Activation Methods\n\n### Method 1: MCP Tools (Preferred in Claude Code)\n\n**Best for**: Integrated Claude Code workflows with full orchestration capabilities\n\n```javascript\n\u002F\u002F Basic mode execution\nmcp__claude-flow__sparc_mode {\n  mode: \"\u003Cmode-name>\",\n  task_description: \"\u003Ctask description>\",\n  options: {\n    \u002F\u002F mode-specific options\n  }\n}\n\n\u002F\u002F Initialize swarm for complex tasks\nmcp__claude-flow__swarm_init {\n  topology: \"hierarchical\",  \u002F\u002F or \"mesh\", \"ring\", \"star\"\n  strategy: \"auto\",           \u002F\u002F or \"balanced\", \"specialized\", \"adaptive\"\n  maxAgents: 8\n}\n\n\u002F\u002F Spawn specialized agents\nmcp__claude-flow__agent_spawn {\n  type: \"\u003Cagent-type>\",\n  capabilities: [\"\u003Ccapability1>\", \"\u003Ccapability2>\"]\n}\n\n\u002F\u002F Monitor execution\nmcp__claude-flow__swarm_monitor {\n  swarmId: \"current\",\n  interval: 5000\n}\n```\n\n### Method 2: NPX CLI (Fallback)\n\n**Best for**: Terminal usage or when MCP tools unavailable\n\n```bash\n# Execute specific mode\nnpx claude-flow sparc run \u003Cmode> \"task description\"\n\n# Use alpha features\nnpx claude-flow@alpha sparc run \u003Cmode> \"task description\"\n\n# List all available modes\nnpx claude-flow sparc modes\n\n# Get help for specific mode\nnpx claude-flow sparc help \u003Cmode>\n\n# Run with options\nnpx claude-flow sparc run \u003Cmode> \"task\" --parallel --monitor\n\n# Execute TDD workflow\nnpx claude-flow sparc tdd \"feature description\"\n\n# Batch execution\nnpx claude-flow sparc batch \u003Cmode1,mode2,mode3> \"task\"\n\n# Pipeline execution\nnpx claude-flow sparc pipeline \"task description\"\n```\n\n### Method 3: Local Installation\n\n**Best for**: Projects with local claude-flow installation\n\n```bash\n# If claude-flow is installed locally\n.\u002Fclaude-flow sparc run \u003Cmode> \"task description\"\n```\n\n---\n\n## Orchestration Patterns\n\n### Pattern 1: Hierarchical Coordination\n\n**Best for**: Complex projects with clear delegation hierarchy\n\n```javascript\n\u002F\u002F Initialize hierarchical swarm\nmcp__claude-flow__swarm_init {\n  topology: \"hierarchical\",\n  maxAgents: 12\n}\n\n\u002F\u002F Spawn coordinator\nmcp__claude-flow__agent_spawn {\n  type: \"coordinator\",\n  capabilities: [\"planning\", \"delegation\", \"monitoring\"]\n}\n\n\u002F\u002F Spawn specialized workers\nmcp__claude-flow__agent_spawn { type: \"architect\" }\nmcp__claude-flow__agent_spawn { type: \"coder\" }\nmcp__claude-flow__agent_spawn { type: \"tester\" }\nmcp__claude-flow__agent_spawn { type: \"reviewer\" }\n```\n\n### Pattern 2: Mesh Coordination\n\n**Best for**: Collaborative tasks requiring peer-to-peer communication\n\n```javascript\nmcp__claude-flow__swarm_init {\n  topology: \"mesh\",\n  strategy: \"balanced\",\n  maxAgents: 6\n}\n```\n\n### Pattern 3: Sequential Pipeline\n\n**Best for**: Ordered workflow execution (spec → design → code → test → review)\n\n```javascript\nmcp__claude-flow__workflow_create {\n  name: \"development-pipeline\",\n  steps: [\n    { mode: \"researcher\", task: \"gather requirements\" },\n    { mode: \"architect\", task: \"design system\" },\n    { mode: \"coder\", task: \"implement features\" },\n    { mode: \"tdd\", task: \"create tests\" },\n    { mode: \"reviewer\", task: \"review code\" }\n  ],\n  triggers: [\"on_step_complete\"]\n}\n```\n\n### Pattern 4: Parallel Execution\n\n**Best for**: Independent tasks that can run concurrently\n\n```javascript\nmcp__claude-flow__task_orchestrate {\n  task: \"build full-stack application\",\n  strategy: \"parallel\",\n  dependencies: {\n    backend: [],\n    frontend: [],\n    database: [],\n    tests: [\"backend\", \"frontend\"]\n  }\n}\n```\n\n### Pattern 5: Adaptive Strategy\n\n**Best for**: Dynamic workloads with changing requirements\n\n```javascript\nmcp__claude-flow__swarm_init {\n  topology: \"hierarchical\",\n  strategy: \"adaptive\",  \u002F\u002F Auto-adjusts based on workload\n  maxAgents: 20\n}\n```\n\n---\n\n## TDD Workflows\n\n### Complete TDD Workflow\n\n```javascript\n\u002F\u002F Step 1: Initialize TDD swarm\nmcp__claude-flow__swarm_init {\n  topology: \"hierarchical\",\n  maxAgents: 8\n}\n\n\u002F\u002F Step 2: Research and planning\nmcp__claude-flow__sparc_mode {\n  mode: \"researcher\",\n  task_description: \"research testing best practices for feature X\"\n}\n\n\u002F\u002F Step 3: Architecture design\nmcp__claude-flow__sparc_mode {\n  mode: \"architect\",\n  task_description: \"design testable architecture for feature X\"\n}\n\n\u002F\u002F Step 4: TDD implementation\nmcp__claude-flow__sparc_mode {\n  mode: \"tdd\",\n  task_description: \"implement feature X with 90% coverage\",\n  options: {\n    coverage_target: 90,\n    test_framework: \"jest\",\n    parallel_tests: true\n  }\n}\n\n\u002F\u002F Step 5: Code review\nmcp__claude-flow__sparc_mode {\n  mode: \"reviewer\",\n  task_description: \"review feature X implementation\",\n  options: {\n    test_coverage_check: true,\n    security_check: true\n  }\n}\n\n\u002F\u002F Step 6: Optimization\nmcp__claude-flow__sparc_mode {\n  mode: \"optimizer\",\n  task_description: \"optimize feature X performance\"\n}\n```\n\n### Red-Green-Refactor Cycle\n\n```javascript\n\u002F\u002F RED: Write failing test\nmcp__claude-flow__sparc_mode {\n  mode: \"tester\",\n  task_description: \"create failing test for shopping cart add item\",\n  options: { expect_failure: true }\n}\n\n\u002F\u002F GREEN: Minimal implementation\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"implement minimal code to pass test\",\n  options: { minimal: true }\n}\n\n\u002F\u002F REFACTOR: Improve code quality\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"refactor shopping cart implementation\",\n  options: { maintain_tests: true }\n}\n```\n\n---\n\n## Best Practices\n\n### 1. Memory Integration\n\n**Always use Memory for cross-agent coordination**:\n\n```javascript\n\u002F\u002F Store architectural decisions\nmcp__claude-flow__memory_usage {\n  action: \"store\",\n  namespace: \"architecture\",\n  key: \"api-design-v1\",\n  value: JSON.stringify(apiDesign),\n  ttl: 86400000  \u002F\u002F 24 hours\n}\n\n\u002F\u002F Retrieve in subsequent agents\nmcp__claude-flow__memory_usage {\n  action: \"retrieve\",\n  namespace: \"architecture\",\n  key: \"api-design-v1\"\n}\n```\n\n### 2. Parallel Operations\n\n**Batch all related operations in single message**:\n\n```javascript\n\u002F\u002F ✅ CORRECT: All operations together\n[Single Message]:\n  mcp__claude-flow__agent_spawn { type: \"researcher\" }\n  mcp__claude-flow__agent_spawn { type: \"coder\" }\n  mcp__claude-flow__agent_spawn { type: \"tester\" }\n  TodoWrite { todos: [8-10 todos] }\n\n\u002F\u002F ❌ WRONG: Multiple messages\nMessage 1: mcp__claude-flow__agent_spawn { type: \"researcher\" }\nMessage 2: mcp__claude-flow__agent_spawn { type: \"coder\" }\nMessage 3: TodoWrite { todos: [...] }\n```\n\n### 3. Hook Integration\n\n**Every SPARC mode should use hooks**:\n\n```bash\n# Before work\nnpx claude-flow@alpha hooks pre-task --description \"implement auth\"\n\n# During work\nnpx claude-flow@alpha hooks post-edit --file \"auth.js\"\n\n# After work\nnpx claude-flow@alpha hooks post-task --task-id \"task-123\"\n```\n\n### 4. Test Coverage\n\n**Maintain minimum 90% coverage**:\n\n- Unit tests for all functions\n- Integration tests for APIs\n- E2E tests for critical flows\n- Edge case coverage\n- Error path testing\n\n### 5. Documentation\n\n**Document as you build**:\n\n- API documentation (OpenAPI)\n- Architecture decision records (ADR)\n- Code comments for complex logic\n- README with setup instructions\n- Changelog for version tracking\n\n### 6. File Organization\n\n**Never save to root folder**:\n\n```\nproject\u002F\n├── src\u002F           # Source code\n├── tests\u002F         # Test files\n├── docs\u002F          # Documentation\n├── config\u002F        # Configuration\n├── scripts\u002F       # Utility scripts\n└── examples\u002F      # Example code\n```\n\n---\n\n## Integration Examples\n\n### Example 1: Full-Stack Development\n\n```javascript\n[Single Message - Parallel Agent Execution]:\n\n\u002F\u002F Initialize swarm\nmcp__claude-flow__swarm_init {\n  topology: \"hierarchical\",\n  maxAgents: 10\n}\n\n\u002F\u002F Architecture phase\nmcp__claude-flow__sparc_mode {\n  mode: \"architect\",\n  task_description: \"design REST API with authentication\",\n  options: { memory_enabled: true }\n}\n\n\u002F\u002F Research phase\nmcp__claude-flow__sparc_mode {\n  mode: \"researcher\",\n  task_description: \"research authentication best practices\"\n}\n\n\u002F\u002F Implementation phase\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"implement Express API with JWT auth\",\n  options: { test_driven: true }\n}\n\n\u002F\u002F Testing phase\nmcp__claude-flow__sparc_mode {\n  mode: \"tdd\",\n  task_description: \"comprehensive API tests\",\n  options: { coverage_target: 90 }\n}\n\n\u002F\u002F Review phase\nmcp__claude-flow__sparc_mode {\n  mode: \"reviewer\",\n  task_description: \"security and performance review\",\n  options: { security_check: true }\n}\n\n\u002F\u002F Batch todos\nTodoWrite {\n  todos: [\n    {content: \"Design API schema\", status: \"completed\"},\n    {content: \"Research JWT implementation\", status: \"completed\"},\n    {content: \"Implement authentication\", status: \"in_progress\"},\n    {content: \"Write API tests\", status: \"pending\"},\n    {content: \"Security review\", status: \"pending\"},\n    {content: \"Performance optimization\", status: \"pending\"},\n    {content: \"API documentation\", status: \"pending\"},\n    {content: \"Deployment setup\", status: \"pending\"}\n  ]\n}\n```\n\n### Example 2: Research-Driven Innovation\n\n```javascript\n\u002F\u002F Research phase\nmcp__claude-flow__sparc_mode {\n  mode: \"researcher\",\n  task_description: \"research AI-powered search implementations\",\n  options: {\n    depth: \"comprehensive\",\n    sources: [\"academic\", \"industry\"]\n  }\n}\n\n\u002F\u002F Innovation phase\nmcp__claude-flow__sparc_mode {\n  mode: \"innovator\",\n  task_description: \"propose novel search algorithm\",\n  options: { memory_enabled: true }\n}\n\n\u002F\u002F Architecture phase\nmcp__claude-flow__sparc_mode {\n  mode: \"architect\",\n  task_description: \"design scalable search system\"\n}\n\n\u002F\u002F Implementation phase\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"implement search algorithm\",\n  options: { test_driven: true }\n}\n\n\u002F\u002F Documentation phase\nmcp__claude-flow__sparc_mode {\n  mode: \"documenter\",\n  task_description: \"document search system architecture and API\"\n}\n```\n\n### Example 3: Legacy Code Refactoring\n\n```javascript\n\u002F\u002F Analysis phase\nmcp__claude-flow__sparc_mode {\n  mode: \"analyzer\",\n  task_description: \"analyze legacy codebase dependencies\"\n}\n\n\u002F\u002F Planning phase\nmcp__claude-flow__sparc_mode {\n  mode: \"orchestrator\",\n  task_description: \"plan incremental refactoring strategy\"\n}\n\n\u002F\u002F Testing phase (create safety net)\nmcp__claude-flow__sparc_mode {\n  mode: \"tester\",\n  task_description: \"create comprehensive test suite for legacy code\",\n  options: { coverage_target: 80 }\n}\n\n\u002F\u002F Refactoring phase\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"refactor module X with modern patterns\",\n  options: { maintain_tests: true }\n}\n\n\u002F\u002F Review phase\nmcp__claude-flow__sparc_mode {\n  mode: \"reviewer\",\n  task_description: \"validate refactoring maintains functionality\"\n}\n```\n\n---\n\n## Common Workflows\n\n### Workflow 1: Feature Development\n\n```bash\n# Step 1: Research and planning\nnpx claude-flow sparc run researcher \"authentication patterns\"\n\n# Step 2: Architecture design\nnpx claude-flow sparc run architect \"design auth system\"\n\n# Step 3: TDD implementation\nnpx claude-flow sparc tdd \"user authentication feature\"\n\n# Step 4: Code review\nnpx claude-flow sparc run reviewer \"review auth implementation\"\n\n# Step 5: Documentation\nnpx claude-flow sparc run documenter \"document auth API\"\n```\n\n### Workflow 2: Bug Investigation\n\n```bash\n# Step 1: Analyze issue\nnpx claude-flow sparc run analyzer \"investigate bug #456\"\n\n# Step 2: Debug systematically\nnpx claude-flow sparc run debugger \"fix memory leak in service X\"\n\n# Step 3: Create tests\nnpx claude-flow sparc run tester \"regression tests for bug #456\"\n\n# Step 4: Review fix\nnpx claude-flow sparc run reviewer \"validate bug fix\"\n```\n\n### Workflow 3: Performance Optimization\n\n```bash\n# Step 1: Profile performance\nnpx claude-flow sparc run analyzer \"profile API response times\"\n\n# Step 2: Identify bottlenecks\nnpx claude-flow sparc run optimizer \"optimize database queries\"\n\n# Step 3: Implement improvements\nnpx claude-flow sparc run coder \"implement caching layer\"\n\n# Step 4: Benchmark results\nnpx claude-flow sparc run tester \"performance benchmarks\"\n```\n\n### Workflow 4: Complete Pipeline\n\n```bash\n# Execute full development pipeline\nnpx claude-flow sparc pipeline \"e-commerce checkout feature\"\n\n# This automatically runs:\n# 1. researcher - Gather requirements\n# 2. architect - Design system\n# 3. coder - Implement features\n# 4. tdd - Create comprehensive tests\n# 5. reviewer - Code quality review\n# 6. optimizer - Performance tuning\n# 7. documenter - Documentation\n```\n\n---\n\n## Advanced Features\n\n### Neural Pattern Training\n\n```javascript\n\u002F\u002F Train patterns from successful workflows\nmcp__claude-flow__neural_train {\n  pattern_type: \"coordination\",\n  training_data: \"successful_tdd_workflow.json\",\n  epochs: 50\n}\n```\n\n### Cross-Session Memory\n\n```javascript\n\u002F\u002F Save session state\nmcp__claude-flow__memory_persist {\n  sessionId: \"feature-auth-v1\"\n}\n\n\u002F\u002F Restore in new session\nmcp__claude-flow__context_restore {\n  snapshotId: \"feature-auth-v1\"\n}\n```\n\n### GitHub Integration\n\n```javascript\n\u002F\u002F Analyze repository\nmcp__claude-flow__github_repo_analyze {\n  repo: \"owner\u002Frepo\",\n  analysis_type: \"code_quality\"\n}\n\n\u002F\u002F Manage pull requests\nmcp__claude-flow__github_pr_manage {\n  repo: \"owner\u002Frepo\",\n  pr_number: 123,\n  action: \"review\"\n}\n```\n\n### Performance Monitoring\n\n```javascript\n\u002F\u002F Real-time swarm monitoring\nmcp__claude-flow__swarm_monitor {\n  swarmId: \"current\",\n  interval: 5000\n}\n\n\u002F\u002F Bottleneck analysis\nmcp__claude-flow__bottleneck_analyze {\n  component: \"api-layer\",\n  metrics: [\"latency\", \"throughput\", \"errors\"]\n}\n\n\u002F\u002F Token usage tracking\nmcp__claude-flow__token_usage {\n  operation: \"feature-development\",\n  timeframe: \"24h\"\n}\n```\n\n---\n\n## Performance Benefits\n\n**Proven Results**:\n- **84.8%** SWE-Bench solve rate\n- **32.3%** token reduction through optimizations\n- **2.8-4.4x** speed improvement with parallel execution\n- **27+** neural models for pattern learning\n- **90%+** test coverage standard\n\n---\n\n## Support and Resources\n\n- **Documentation**: https:\u002F\u002Fgithub.com\u002Fruvnet\u002Fclaude-flow\n- **Issues**: https:\u002F\u002Fgithub.com\u002Fruvnet\u002Fclaude-flow\u002Fissues\n- **NPM Package**: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fclaude-flow\n- **Community**: Discord server (link in repository)\n\n---\n\n## Quick Reference\n\n### Most Common Commands\n\n```bash\n# List modes\nnpx claude-flow sparc modes\n\n# Run specific mode\nnpx claude-flow sparc run \u003Cmode> \"task\"\n\n# TDD workflow\nnpx claude-flow sparc tdd \"feature\"\n\n# Full pipeline\nnpx claude-flow sparc pipeline \"task\"\n\n# Batch execution\nnpx claude-flow sparc batch \u003Cmodes> \"task\"\n```\n\n### Most Common MCP Calls\n\n```javascript\n\u002F\u002F Initialize swarm\nmcp__claude-flow__swarm_init { topology: \"hierarchical\" }\n\n\u002F\u002F Execute mode\nmcp__claude-flow__sparc_mode { mode: \"coder\", task_description: \"...\" }\n\n\u002F\u002F Monitor progress\nmcp__claude-flow__swarm_monitor { interval: 5000 }\n\n\u002F\u002F Store in memory\nmcp__claude-flow__memory_usage { action: \"store\", key: \"...\", value: \"...\" }\n```\n\n---\n\nRemember: **SPARC = Systematic, Parallel, Agile, Refined, Complete**\n","# SPARC Methodology - Comprehensive Development Framework\n\n## Overview\n\nSPARC (Specification, Pseudocode, Architecture, Refinement, Completion) is a systematic development methodology integrated with Claude Flow's multi-agent orchestration capabilities. It provides 17 specialized modes for comprehensive software development, from initial research through deployment and monitoring.\n\n## Table of Contents\n\n1. [Core Philosophy](#core-philosophy)\n2. [Development Phases](#development-phases)\n3. [Available Modes](#available-modes)\n4. [Activation Methods](#activation-methods)\n5. [Orchestration Patterns](#orchestration-patterns)\n6. [TDD Workflows](#tdd-workflows)\n7. [Best Practices](#best-practices)\n8. [Integration Examples](#integration-examples)\n9. [Common Workflows](#common-workflows)\n\n---\n\n## Core Philosophy\n\nSPARC methodology emphasizes:\n\n- **Systematic Approach**: Structured phases from specification to completion\n- **Test-Driven Development**: Tests written before implementation\n- **Parallel Execution**: Concurrent agent coordination for 2.8-4.4x speed improvements\n- **Memory Integration**: Persistent knowledge sharing across agents and sessions\n- **Quality First**: Comprehensive reviews, testing, and validation\n- **Modular Design**: Clean separation of concerns with clear interfaces\n\n### Key Principles\n\n1. **Specification Before Code**: Define requirements and constraints clearly\n2. **Design Before Implementation**: Plan architecture and components\n3. **Tests Before Features**: Write failing tests, then make them pass\n4. **Review Everything**: Code quality, security, and performance checks\n5. **Document Continuously**: Maintain current documentation throughout\n\n---\n\n## Development Phases\n\n### Phase 1: Specification\n**Goal**: Define requirements, constraints, and success criteria\n\n- Requirements analysis\n- User story mapping\n- Constraint identification\n- Success metrics definition\n- Pseudocode planning\n\n**Key Modes**: `researcher`, `analyzer`, `memory-manager`\n\n### Phase 2: Architecture\n**Goal**: Design system structure and component interfaces\n\n- System architecture design\n- Component interface definition\n- Database schema planning\n- API contract specification\n- Infrastructure planning\n\n**Key Modes**: `architect`, `designer`, `orchestrator`\n\n### Phase 3: Refinement (TDD Implementation)\n**Goal**: Implement features with test-first approach\n\n- Write failing tests\n- Implement minimum viable code\n- Make tests pass\n- Refactor for quality\n- Iterate until complete\n\n**Key Modes**: `tdd`, `coder`, `tester`\n\n### Phase 4: Review\n**Goal**: Ensure code quality, security, and performance\n\n- Code quality assessment\n- Security vulnerability scanning\n- Performance profiling\n- Best practices validation\n- Documentation review\n\n**Key Modes**: `reviewer`, `optimizer`, `debugger`\n\n### Phase 5: Completion\n**Goal**: Integration, deployment, and monitoring\n\n- System integration\n- Deployment automation\n- Monitoring setup\n- Documentation finalization\n- Knowledge capture\n\n**Key Modes**: `workflow-manager`, `documenter`, `memory-manager`\n\n---\n\n## Available Modes\n\n### Core Orchestration Modes\n\n#### `orchestrator`\nMulti-agent task orchestration with TodoWrite\u002FTask\u002FMemory coordination.\n\n**Capabilities**:\n- Task decomposition into manageable units\n- Agent coordination and resource allocation\n- Progress tracking and result synthesis\n- Adaptive strategy selection\n- Cross-agent communication\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"orchestrator\",\n  task_description: \"coordinate feature development\",\n  options: { parallel: true, monitor: true }\n}\n```\n\n#### `swarm-coordinator`\nSpecialized swarm management for complex multi-agent workflows.\n\n**Capabilities**:\n- Topology optimization (mesh, hierarchical, ring, star)\n- Agent lifecycle management\n- Dynamic scaling based on workload\n- Fault tolerance and recovery\n- Performance monitoring\n\n#### `workflow-manager`\nProcess automation and workflow orchestration.\n\n**Capabilities**:\n- Workflow definition and execution\n- Event-driven triggers\n- Sequential and parallel pipelines\n- State management\n- Error handling and retry logic\n\n#### `batch-executor`\nParallel task execution for high-throughput operations.\n\n**Capabilities**:\n- Concurrent file operations\n- Batch processing optimization\n- Resource pooling\n- Load balancing\n- Progress aggregation\n\n---\n\n### Development Modes\n\n#### `coder`\nAutonomous code generation with batch file operations.\n\n**Capabilities**:\n- Feature implementation\n- Code refactoring\n- Bug fixes and patches\n- API development\n- Algorithm implementation\n\n**Quality Standards**:\n- ES2022+ standards\n- TypeScript type safety\n- Comprehensive error handling\n- Performance optimization\n- Security best practices\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"implement user authentication with JWT\",\n  options: {\n    test_driven: true,\n    parallel_edits: true,\n    typescript: true\n  }\n}\n```\n\n#### `architect`\nSystem design with Memory-based coordination.\n\n**Capabilities**:\n- Microservices architecture\n- Event-driven design\n- Domain-driven design (DDD)\n- Hexagonal architecture\n- CQRS and Event Sourcing\n\n**Memory Integration**:\n- Store architectural decisions\n- Share component specifications\n- Maintain design consistency\n- Track architectural evolution\n\n**Design Patterns**:\n- Layered architecture\n- Microservices patterns\n- Event-driven patterns\n- Domain modeling\n- Infrastructure as Code\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"architect\",\n  task_description: \"design scalable e-commerce platform\",\n  options: {\n    detailed: true,\n    memory_enabled: true,\n    patterns: [\"microservices\", \"event-driven\"]\n  }\n}\n```\n\n#### `tdd`\nTest-driven development with comprehensive testing.\n\n**Capabilities**:\n- Test-first development\n- Red-green-refactor cycle\n- Test suite design\n- Coverage optimization (target: 90%+)\n- Continuous testing\n\n**TDD Workflow**:\n1. Write failing test (RED)\n2. Implement minimum code\n3. Make test pass (GREEN)\n4. Refactor for quality (REFACTOR)\n5. Repeat cycle\n\n**Testing Strategies**:\n- Unit testing (Jest, Mocha, Vitest)\n- Integration testing\n- End-to-end testing (Playwright, Cypress)\n- Performance testing\n- Security testing\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"tdd\",\n  task_description: \"shopping cart feature with payment integration\",\n  options: {\n    coverage_target: 90,\n    test_framework: \"jest\",\n    e2e_framework: \"playwright\"\n  }\n}\n```\n\n#### `reviewer`\nCode review using batch file analysis.\n\n**Capabilities**:\n- Code quality assessment\n- Security vulnerability detection\n- Performance analysis\n- Best practices validation\n- Documentation review\n\n**Review Criteria**:\n- Code correctness and logic\n- Design pattern adherence\n- Comprehensive error handling\n- Test coverage adequacy\n- Maintainability and readability\n- Security vulnerabilities\n- Performance bottlenecks\n\n**Batch Analysis**:\n- Parallel file review\n- Pattern detection\n- Dependency checking\n- Consistency validation\n- Automated reporting\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"reviewer\",\n  task_description: \"review authentication module PR #123\",\n  options: {\n    security_check: true,\n    performance_check: true,\n    test_coverage_check: true\n  }\n}\n```\n\n---\n\n### Analysis and Research Modes\n\n#### `researcher`\nDeep research with parallel WebSearch\u002FWebFetch and Memory coordination.\n\n**Capabilities**:\n- Comprehensive information gathering\n- Source credibility evaluation\n- Trend analysis and forecasting\n- Competitive research\n- Technology assessment\n\n**Research Methods**:\n- Parallel web searches\n- Academic paper analysis\n- Industry report synthesis\n- Expert opinion gathering\n- Statistical data compilation\n\n**Memory Integration**:\n- Store research findings with citations\n- Build knowledge graphs\n- Track information sources\n- Cross-reference insights\n- Maintain research history\n\n**Usage**:\n```javascript\nmcp__claude-flow__sparc_mode {\n  mode: \"researcher\",\n  task_description: \"research microservices best practices 2024\",\n  options: {\n    depth: \"comprehensive\",\n    sources: [\"academic\", \"industry\", \"news\"],\n    citations: true\n  }\n}\n```\n\n#### `analyzer`\nCode and data analysis with pattern recognition.\n\n**Capabilities**:\n- Static code analysis\n- Dependency analysis\n- Performance profiling\n- Security scanning\n- Data pattern recognition\n\n#### `optimizer`\nPerformance optimization and bottleneck resolution.\n\n**Capabilities**:\n- Algorithm optimization\n- Database query tuning\n- Caching strategy design\n- Bundle size reduction\n- Memory leak detection\n\n---\n\n### Creative and Support Modes\n\n#### `designer`\nUI\u002FUX design with accessibility focus.\n\n**Capabilities**:\n- Interface design\n- User experience optimization\n- Accessibility compliance (WCAG 2.1)\n- Design system creation\n- Responsive layout design\n\n#### `innovator`\nCreative problem-solving and novel solutions.\n\n**Capabilities**:\n- Brainstorming and ideation\n- Alternative approach generation\n- Technology evaluation\n- Proof of concept development\n- Innovation feasibility analysis\n\n#### `documenter`\nComprehensive documentation generation.\n\n**Capabilities**:\n- API documentation (OpenAPI\u002FSwagger)\n- Architecture diagrams\n- User guides and tutorials\n- Code comments and JSDoc\n- README and changelog maintenance\n\n#### `debugger`\nSystematic debugging and issue resolution.\n\n**Capabilities**:\n- Bug reproduction\n- Root cause analysis\n- Fix implementation\n- Regression prevention\n- Debug logging optimization\n\n#### `tester`\nComprehensive testing beyond TDD.\n\n**Capabilities**:\n- Test suite expansion\n- Edge case identification\n- Performance testing\n- Load testing\n- Chaos engineering\n\n#### `memory-manager`\nKnowledge management and context preservation.\n\n**Capabilities**:\n- Cross-session memory persistence\n- Knowledge graph construction\n- Context restoration\n- Learning pattern extraction\n- Decision tracking\n\n---\n\n## Activation Methods\n\n### Method 1: MCP Tools (Preferred in Claude Code)\n\n**Best for**: Integrated Claude Code workflows with full orchestration capabilities\n\n```javascript\n\u002F\u002F Basic mode execution\nmcp__claude-flow__sparc_mode {\n  mode: \"\u003Cmode-name>\",\n  task_description: \"\u003Ctask description>\",\n  options: {\n    \u002F\u002F mode-specific options\n  }\n}\n\n\u002F\u002F Initialize swarm for complex tasks\nmcp__claude-flow__swarm_init {\n  topology: \"hierarchical\",  \u002F\u002F or \"mesh\", \"ring\", \"star\"\n  strategy: \"auto\",           \u002F\u002F or \"balanced\", \"specialized\", \"adaptive\"\n  maxAgents: 8\n}\n\n\u002F\u002F Spawn specialized agents\nmcp__claude-flow__agent_spawn {\n  type: \"\u003Cagent-type>\",\n  capabilities: [\"\u003Ccapability1>\", \"\u003Ccapability2>\"]\n}\n\n\u002F\u002F Monitor execution\nmcp__claude-flow__swarm_monitor {\n  swarmId: \"current\",\n  interval: 5000\n}\n```\n\n### Method 2: NPX CLI (Fallback)\n\n**Best for**: Terminal usage or when MCP tools unavailable\n\n```bash\n# Execute specific mode\nnpx claude-flow sparc run \u003Cmode> \"task description\"\n\n# Use alpha features\nnpx claude-flow@alpha sparc run \u003Cmode> \"task description\"\n\n# List all available modes\nnpx claude-flow sparc modes\n\n# Get help for specific mode\nnpx claude-flow sparc help \u003Cmode>\n\n# Run with options\nnpx claude-flow sparc run \u003Cmode> \"task\" --parallel --monitor\n\n# Execute TDD workflow\nnpx claude-flow sparc tdd \"feature description\"\n\n# Batch execution\nnpx claude-flow sparc batch \u003Cmode1,mode2,mode3> \"task\"\n\n# Pipeline execution\nnpx claude-flow sparc pipeline \"task description\"\n```\n\n### Method 3: Local Installation\n\n**Best for**: Projects with local claude-flow installation\n\n```bash\n# If claude-flow is installed locally\n.\u002Fclaude-flow sparc run \u003Cmode> \"task description\"\n```\n\n---\n\n## Orchestration Patterns\n\n### Pattern 1: Hierarchical Coordination\n\n**Best for**: Complex projects with clear delegation hierarchy\n\n```javascript\n\u002F\u002F Initialize hierarchical swarm\nmcp__claude-flow__swarm_init {\n  topology: \"hierarchical\",\n  maxAgents: 12\n}\n\n\u002F\u002F Spawn coordinator\nmcp__claude-flow__agent_spawn {\n  type: \"coordinator\",\n  capabilities: [\"planning\", \"delegation\", \"monitoring\"]\n}\n\n\u002F\u002F Spawn specialized workers\nmcp__claude-flow__agent_spawn { type: \"architect\" }\nmcp__claude-flow__agent_spawn { type: \"coder\" }\nmcp__claude-flow__agent_spawn { type: \"tester\" }\nmcp__claude-flow__agent_spawn { type: \"reviewer\" }\n```\n\n### Pattern 2: Mesh Coordination\n\n**Best for**: Collaborative tasks requiring peer-to-peer communication\n\n```javascript\nmcp__claude-flow__swarm_init {\n  topology: \"mesh\",\n  strategy: \"balanced\",\n  maxAgents: 6\n}\n```\n\n### Pattern 3: Sequential Pipeline\n\n**Best for**: Ordered workflow execution (spec → design → code → test → review)\n\n```javascript\nmcp__claude-flow__workflow_create {\n  name: \"development-pipeline\",\n  steps: [\n    { mode: \"researcher\", task: \"gather requirements\" },\n    { mode: \"architect\", task: \"design system\" },\n    { mode: \"coder\", task: \"implement features\" },\n    { mode: \"tdd\", task: \"create tests\" },\n    { mode: \"reviewer\", task: \"review code\" }\n  ],\n  triggers: [\"on_step_complete\"]\n}\n```\n\n### Pattern 4: Parallel Execution\n\n**Best for**: Independent tasks that can run concurrently\n\n```javascript\nmcp__claude-flow__task_orchestrate {\n  task: \"build full-stack application\",\n  strategy: \"parallel\",\n  dependencies: {\n    backend: [],\n    frontend: [],\n    database: [],\n    tests: [\"backend\", \"frontend\"]\n  }\n}\n```\n\n### Pattern 5: Adaptive Strategy\n\n**Best for**: Dynamic workloads with changing requirements\n\n```javascript\nmcp__claude-flow__swarm_init {\n  topology: \"hierarchical\",\n  strategy: \"adaptive\",  \u002F\u002F Auto-adjusts based on workload\n  maxAgents: 20\n}\n```\n\n---\n\n## TDD Workflows\n\n### Complete TDD Workflow\n\n```javascript\n\u002F\u002F Step 1: Initialize TDD swarm\nmcp__claude-flow__swarm_init {\n  topology: \"hierarchical\",\n  maxAgents: 8\n}\n\n\u002F\u002F Step 2: Research and planning\nmcp__claude-flow__sparc_mode {\n  mode: \"researcher\",\n  task_description: \"research testing best practices for feature X\"\n}\n\n\u002F\u002F Step 3: Architecture design\nmcp__claude-flow__sparc_mode {\n  mode: \"architect\",\n  task_description: \"design testable architecture for feature X\"\n}\n\n\u002F\u002F Step 4: TDD implementation\nmcp__claude-flow__sparc_mode {\n  mode: \"tdd\",\n  task_description: \"implement feature X with 90% coverage\",\n  options: {\n    coverage_target: 90,\n    test_framework: \"jest\",\n    parallel_tests: true\n  }\n}\n\n\u002F\u002F Step 5: Code review\nmcp__claude-flow__sparc_mode {\n  mode: \"reviewer\",\n  task_description: \"review feature X implementation\",\n  options: {\n    test_coverage_check: true,\n    security_check: true\n  }\n}\n\n\u002F\u002F Step 6: Optimization\nmcp__claude-flow__sparc_mode {\n  mode: \"optimizer\",\n  task_description: \"optimize feature X performance\"\n}\n```\n\n### Red-Green-Refactor Cycle\n\n```javascript\n\u002F\u002F RED: Write failing test\nmcp__claude-flow__sparc_mode {\n  mode: \"tester\",\n  task_description: \"create failing test for shopping cart add item\",\n  options: { expect_failure: true }\n}\n\n\u002F\u002F GREEN: Minimal implementation\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"implement minimal code to pass test\",\n  options: { minimal: true }\n}\n\n\u002F\u002F REFACTOR: Improve code quality\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"refactor shopping cart implementation\",\n  options: { maintain_tests: true }\n}\n```\n\n---\n\n## Best Practices\n\n### 1. Memory Integration\n\n**Always use Memory for cross-agent coordination**:\n\n```javascript\n\u002F\u002F Store architectural decisions\nmcp__claude-flow__memory_usage {\n  action: \"store\",\n  namespace: \"architecture\",\n  key: \"api-design-v1\",\n  value: JSON.stringify(apiDesign),\n  ttl: 86400000  \u002F\u002F 24 hours\n}\n\n\u002F\u002F Retrieve in subsequent agents\nmcp__claude-flow__memory_usage {\n  action: \"retrieve\",\n  namespace: \"architecture\",\n  key: \"api-design-v1\"\n}\n```\n\n### 2. Parallel Operations\n\n**Batch all related operations in single message**:\n\n```javascript\n\u002F\u002F ✅ CORRECT: All operations together\n[Single Message]:\n  mcp__claude-flow__agent_spawn { type: \"researcher\" }\n  mcp__claude-flow__agent_spawn { type: \"coder\" }\n  mcp__claude-flow__agent_spawn { type: \"tester\" }\n  TodoWrite { todos: [8-10 todos] }\n\n\u002F\u002F ❌ WRONG: Multiple messages\nMessage 1: mcp__claude-flow__agent_spawn { type: \"researcher\" }\nMessage 2: mcp__claude-flow__agent_spawn { type: \"coder\" }\nMessage 3: TodoWrite { todos: [...] }\n```\n\n### 3. Hook Integration\n\n**Every SPARC mode should use hooks**:\n\n```bash\n# Before work\nnpx claude-flow@alpha hooks pre-task --description \"implement auth\"\n\n# During work\nnpx claude-flow@alpha hooks post-edit --file \"auth.js\"\n\n# After work\nnpx claude-flow@alpha hooks post-task --task-id \"task-123\"\n```\n\n### 4. Test Coverage\n\n**Maintain minimum 90% coverage**:\n\n- Unit tests for all functions\n- Integration tests for APIs\n- E2E tests for critical flows\n- Edge case coverage\n- Error path testing\n\n### 5. Documentation\n\n**Document as you build**:\n\n- API documentation (OpenAPI)\n- Architecture decision records (ADR)\n- Code comments for complex logic\n- README with setup instructions\n- Changelog for version tracking\n\n### 6. File Organization\n\n**Never save to root folder**:\n\n```\nproject\u002F\n├── src\u002F           # Source code\n├── tests\u002F         # Test files\n├── docs\u002F          # Documentation\n├── config\u002F        # Configuration\n├── scripts\u002F       # Utility scripts\n└── examples\u002F      # Example code\n```\n\n---\n\n## Integration Examples\n\n### Example 1: Full-Stack Development\n\n```javascript\n[Single Message - Parallel Agent Execution]:\n\n\u002F\u002F Initialize swarm\nmcp__claude-flow__swarm_init {\n  topology: \"hierarchical\",\n  maxAgents: 10\n}\n\n\u002F\u002F Architecture phase\nmcp__claude-flow__sparc_mode {\n  mode: \"architect\",\n  task_description: \"design REST API with authentication\",\n  options: { memory_enabled: true }\n}\n\n\u002F\u002F Research phase\nmcp__claude-flow__sparc_mode {\n  mode: \"researcher\",\n  task_description: \"research authentication best practices\"\n}\n\n\u002F\u002F Implementation phase\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"implement Express API with JWT auth\",\n  options: { test_driven: true }\n}\n\n\u002F\u002F Testing phase\nmcp__claude-flow__sparc_mode {\n  mode: \"tdd\",\n  task_description: \"comprehensive API tests\",\n  options: { coverage_target: 90 }\n}\n\n\u002F\u002F Review phase\nmcp__claude-flow__sparc_mode {\n  mode: \"reviewer\",\n  task_description: \"security and performance review\",\n  options: { security_check: true }\n}\n\n\u002F\u002F Batch todos\nTodoWrite {\n  todos: [\n    {content: \"Design API schema\", status: \"completed\"},\n    {content: \"Research JWT implementation\", status: \"completed\"},\n    {content: \"Implement authentication\", status: \"in_progress\"},\n    {content: \"Write API tests\", status: \"pending\"},\n    {content: \"Security review\", status: \"pending\"},\n    {content: \"Performance optimization\", status: \"pending\"},\n    {content: \"API documentation\", status: \"pending\"},\n    {content: \"Deployment setup\", status: \"pending\"}\n  ]\n}\n```\n\n### Example 2: Research-Driven Innovation\n\n```javascript\n\u002F\u002F Research phase\nmcp__claude-flow__sparc_mode {\n  mode: \"researcher\",\n  task_description: \"research AI-powered search implementations\",\n  options: {\n    depth: \"comprehensive\",\n    sources: [\"academic\", \"industry\"]\n  }\n}\n\n\u002F\u002F Innovation phase\nmcp__claude-flow__sparc_mode {\n  mode: \"innovator\",\n  task_description: \"propose novel search algorithm\",\n  options: { memory_enabled: true }\n}\n\n\u002F\u002F Architecture phase\nmcp__claude-flow__sparc_mode {\n  mode: \"architect\",\n  task_description: \"design scalable search system\"\n}\n\n\u002F\u002F Implementation phase\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"implement search algorithm\",\n  options: { test_driven: true }\n}\n\n\u002F\u002F Documentation phase\nmcp__claude-flow__sparc_mode {\n  mode: \"documenter\",\n  task_description: \"document search system architecture and API\"\n}\n```\n\n### Example 3: Legacy Code Refactoring\n\n```javascript\n\u002F\u002F Analysis phase\nmcp__claude-flow__sparc_mode {\n  mode: \"analyzer\",\n  task_description: \"analyze legacy codebase dependencies\"\n}\n\n\u002F\u002F Planning phase\nmcp__claude-flow__sparc_mode {\n  mode: \"orchestrator\",\n  task_description: \"plan incremental refactoring strategy\"\n}\n\n\u002F\u002F Testing phase (create safety net)\nmcp__claude-flow__sparc_mode {\n  mode: \"tester\",\n  task_description: \"create comprehensive test suite for legacy code\",\n  options: { coverage_target: 80 }\n}\n\n\u002F\u002F Refactoring phase\nmcp__claude-flow__sparc_mode {\n  mode: \"coder\",\n  task_description: \"refactor module X with modern patterns\",\n  options: { maintain_tests: true }\n}\n\n\u002F\u002F Review phase\nmcp__claude-flow__sparc_mode {\n  mode: \"reviewer\",\n  task_description: \"validate refactoring maintains functionality\"\n}\n```\n\n---\n\n## Common Workflows\n\n### Workflow 1: Feature Development\n\n```bash\n# Step 1: Research and planning\nnpx claude-flow sparc run researcher \"authentication patterns\"\n\n# Step 2: Architecture design\nnpx claude-flow sparc run architect \"design auth system\"\n\n# Step 3: TDD implementation\nnpx claude-flow sparc tdd \"user authentication feature\"\n\n# Step 4: Code review\nnpx claude-flow sparc run reviewer \"review auth implementation\"\n\n# Step 5: Documentation\nnpx claude-flow sparc run documenter \"document auth API\"\n```\n\n### Workflow 2: Bug Investigation\n\n```bash\n# Step 1: Analyze issue\nnpx claude-flow sparc run analyzer \"investigate bug #456\"\n\n# Step 2: Debug systematically\nnpx claude-flow sparc run debugger \"fix memory leak in service X\"\n\n# Step 3: Create tests\nnpx claude-flow sparc run tester \"regression tests for bug #456\"\n\n# Step 4: Review fix\nnpx claude-flow sparc run reviewer \"validate bug fix\"\n```\n\n### Workflow 3: Performance Optimization\n\n```bash\n# Step 1: Profile performance\nnpx claude-flow sparc run analyzer \"profile API response times\"\n\n# Step 2: Identify bottlenecks\nnpx claude-flow sparc run optimizer \"optimize database queries\"\n\n# Step 3: Implement improvements\nnpx claude-flow sparc run coder \"implement caching layer\"\n\n# Step 4: Benchmark results\nnpx claude-flow sparc run tester \"performance benchmarks\"\n```\n\n### Workflow 4: Complete Pipeline\n\n```bash\n# Execute full development pipeline\nnpx claude-flow sparc pipeline \"e-commerce checkout feature\"\n\n# This automatically runs:\n# 1. researcher - Gather requirements\n# 2. architect - Design system\n# 3. coder - Implement features\n# 4. tdd - Create comprehensive tests\n# 5. reviewer - Code quality review\n# 6. optimizer - Performance tuning\n# 7. documenter - Documentation\n```\n\n---\n\n## Advanced Features\n\n### Neural Pattern Training\n\n```javascript\n\u002F\u002F Train patterns from successful workflows\nmcp__claude-flow__neural_train {\n  pattern_type: \"coordination\",\n  training_data: \"successful_tdd_workflow.json\",\n  epochs: 50\n}\n```\n\n### Cross-Session Memory\n\n```javascript\n\u002F\u002F Save session state\nmcp__claude-flow__memory_persist {\n  sessionId: \"feature-auth-v1\"\n}\n\n\u002F\u002F Restore in new session\nmcp__claude-flow__context_restore {\n  snapshotId: \"feature-auth-v1\"\n}\n```\n\n### GitHub Integration\n\n```javascript\n\u002F\u002F Analyze repository\nmcp__claude-flow__github_repo_analyze {\n  repo: \"owner\u002Frepo\",\n  analysis_type: \"code_quality\"\n}\n\n\u002F\u002F Manage pull requests\nmcp__claude-flow__github_pr_manage {\n  repo: \"owner\u002Frepo\",\n  pr_number: 123,\n  action: \"review\"\n}\n```\n\n### Performance Monitoring\n\n```javascript\n\u002F\u002F Real-time swarm monitoring\nmcp__claude-flow__swarm_monitor {\n  swarmId: \"current\",\n  interval: 5000\n}\n\n\u002F\u002F Bottleneck analysis\nmcp__claude-flow__bottleneck_analyze {\n  component: \"api-layer\",\n  metrics: [\"latency\", \"throughput\", \"errors\"]\n}\n\n\u002F\u002F Token usage tracking\nmcp__claude-flow__token_usage {\n  operation: \"feature-development\",\n  timeframe: \"24h\"\n}\n```\n\n---\n\n## Performance Benefits\n\n**Proven Results**:\n- **84.8%** SWE-Bench solve rate\n- **32.3%** token reduction through optimizations\n- **2.8-4.4x** speed improvement with parallel execution\n- **27+** neural models for pattern learning\n- **90%+** test coverage standard\n\n---\n\n## Support and Resources\n\n- **Documentation**: https:\u002F\u002Fgithub.com\u002Fruvnet\u002Fclaude-flow\n- **Issues**: https:\u002F\u002Fgithub.com\u002Fruvnet\u002Fclaude-flow\u002Fissues\n- **NPM Package**: https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fclaude-flow\n- **Community**: Discord server (link in repository)\n\n---\n\n## Quick Reference\n\n### Most Common Commands\n\n```bash\n# List modes\nnpx claude-flow sparc modes\n\n# Run specific mode\nnpx claude-flow sparc run \u003Cmode> \"task\"\n\n# TDD workflow\nnpx claude-flow sparc tdd \"feature\"\n\n# Full pipeline\nnpx claude-flow sparc pipeline \"task\"\n\n# Batch execution\nnpx claude-flow sparc batch \u003Cmodes> \"task\"\n```\n\n### Most Common MCP Calls\n\n```javascript\n\u002F\u002F Initialize swarm\nmcp__claude-flow__swarm_init { topology: \"hierarchical\" }\n\n\u002F\u002F Execute mode\nmcp__claude-flow__sparc_mode { mode: \"coder\", task_description: \"...\" }\n\n\u002F\u002F Monitor progress\nmcp__claude-flow__swarm_monitor { interval: 5000 }\n\n\u002F\u002F Store in memory\nmcp__claude-flow__memory_usage { action: \"store\", key: \"...\", value: \"...\" }\n```\n\n---\n\nRemember: **SPARC = Systematic, Parallel, Agile, Refined, Complete**\n",{"name":5,"tags":24,"author":31,"version":32,"category":33,"description":7},[25,26,27,28,29,30],"sparc","tdd","architecture","orchestration","methodology","multi-agent","Claude Flow","2.7.0","development","main","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-Agent-智能体\u002FYYC3-Agent-智能体-ruflo\u002Fv3\u002F@claude-flow\u002Fmcp\u002F.claude\u002Fskills\u002Fsparc-methodology",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill sparc-methodology",{"tool":49,"command":50},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill sparc-methodology",{"tool":52,"command":53},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill sparc-methodology","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-Agent-智能体\u002FYYC3-Agent-智能体-ruflo\u002Fv3\u002F@claude-flow\u002Fmcp\u002F.claude\u002Fskills\u002Fsparc-methodology\u002FSKILL.md",true,[],[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]