[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BXKSVSE2RX9CBQQ672QZMS":3,"skill-same:01M6BXKSVSE2RX9CBQQ672QZMS":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":40,"linkOnly":41,"markdownContent":42,"markdownBody":43,"frontMatter":44,"refName":48,"commitSha":49,"skillDirectory":50,"forksCount":51,"repositoryHtmlUrl":52,"repositoryHomepageUrl":17,"ownerHtmlUrl":53,"ownerBlogUrl":54,"ownerDescription":55,"updatedAt":56,"install":57,"resources":70},"01M6BXKSVSE2RX9CBQQ672QZMS","sparc-methodology","SPARC 多智能体开发方法论","SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) comprehensive development methodology with multi-agent orchestration","SPARC（规格、伪代码、架构、精炼、完成）综合开发方法论，支持多智能体编排。","diegopacheco\u002Fai-playground","diegopacheco","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121278?v=4","01M6BXCP8P7GGSJ8M1W2MFDTGT","Diego Pacheco","01M6BXCPD3WM51H465XW9YM4BV",21,"Unlicense",null,"https:\u002F\u002Fgithub.com\u002Fdiegopacheco\u002Fai-playground\u002Fblob\u002Fmain\u002Fpocs\u002Fclaude-flow-fun\u002F.claude\u002Fskills\u002Fsparc-methodology\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发","SCENARIO","使用场景",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C4ZVS0ZJKF2T2G58PW5VR2","系统架构师","PROFESSION","适用职业",[31,32,33,34,35,36,37,38,39],"methodology","sparc methodology","tdd","orchestration","architecture","development","flow","sparc","multi-agent","2026-11-10 10:12:30",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":45,"author":46,"version":47,"category":36,"description":7},[38,33,35,34,31,39],"Claude Flow","2.7.0","main","90d379e95fcc23dd9759654c345424e1752b0f3a","pocs\u002Fclaude-flow-fun\u002F.claude\u002Fskills\u002Fsparc-methodology",9,"https:\u002F\u002Fgithub.com\u002Fdiegopacheco\u002Fai-playground","https:\u002F\u002Fgithub.com\u002Fdiegopacheco","http:\u002F\u002Fdiego-pacheco.blogspot.com","Brazilian Hands-on Software Architect | 20+ years in Tech | Author | Father. Opinions are my own!","2026-11-15 01:01:48",{"source":9,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add diegopacheco\u002Fai-playground --skill sparc-methodology",{"tool":63,"command":64},"bunx","bunx skills add diegopacheco\u002Fai-playground --skill sparc-methodology",{"tool":66,"command":67},"pnpm","pnpm dlx skills add diegopacheco\u002Fai-playground --skill sparc-methodology","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdiegopacheco\u002Fai-playground\u002Fblob\u002Fmain\u002Fpocs\u002Fclaude-flow-fun\u002F.claude\u002Fskills\u002Fsparc-methodology\u002FSKILL.md",true,[],[72,85,95,108,124,143],{"skillNo":73,"name":74,"nameZh":17,"description":75,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":40},"01M6WJ537DN520XY8MSW9ZV0RP","word-count","Counts the words, lines and characters of a text or a file.","https:\u002F\u002Fgithub.com\u002Fdiegopacheco\u002Fai-playground\u002Fblob\u002Fmain\u002Fpocs\u002Fskills-gateway-router\u002Fupstream-skills\u002Ftext-skills\u002Fword-count\u002FSKILL.md",[],[79,80,81,82,83,84],"count","word count","Word","characters","text","file",{"skillNo":86,"name":87,"nameZh":17,"description":88,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":40},"01M6WJ4Y2GT5SECWAKKYHGES4F","slugify","Turns a title or a sentence into a URL slug, lowercase words joined by hyphens with accents removed.","https:\u002F\u002Fgithub.com\u002Fdiegopacheco\u002Fai-playground\u002Fblob\u002Fmain\u002Fpocs\u002Fskills-gateway-router\u002Fupstream-skills\u002Ftext-skills\u002Fslugify\u002FSKILL.md",[],[87,92,93,94],"title","with","URL",{"skillNo":96,"name":97,"nameZh":17,"description":98,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":40},"01M6WJ4V9CWHT9NVCD441VK5MH","json-format","Validates a JSON file and pretty prints it with two space indentation, or reports where the JSON is invalid.","https:\u002F\u002Fgithub.com\u002Fdiegopacheco\u002Fai-playground\u002Fblob\u002Fmain\u002Fpocs\u002Fskills-gateway-router\u002Fupstream-skills\u002Fdev-skills\u002Fjson-format\u002FSKILL.md",[],[102,103,104,84,105,106,107,93],"json","format","json format","reports","invalid","it",{"skillNo":109,"name":110,"nameZh":17,"description":111,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":40},"01M6WJ4QMRKW8EFP71F4KS2DHE","commit-message","Writes a conventional commit message for the staged git changes.","https:\u002F\u002Fgithub.com\u002Fdiegopacheco\u002Fai-playground\u002Fblob\u002Fmain\u002Fpocs\u002Fskills-gateway-router\u002Fupstream-skills\u002Fdev-skills\u002Fcommit-message\u002FSKILL.md",[],[115,116,117,118,119,120,121,122,123],"commit","commit message","message","git","conventional commit","for","changes","staged","conventional commit message",{"skillNo":125,"name":126,"nameZh":17,"description":127,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":40},"01M6WJ4MAM2CJH0GWYXFBB9GQC","skills-gateway","Gateway and router to a catalog of skills that are not registered directly. Use it before any task a specialized skill could handle, such as text, JSON or git chores. It finds the right skill and loads its instructions.","https:\u002F\u002Fgithub.com\u002Fdiegopacheco\u002Fai-playground\u002Fblob\u002Fmain\u002Fpocs\u002Fskills-gateway-router\u002F.claude\u002Fskills\u002Fskills-gateway\u002FSKILL.md",[],[131,132,107,133,134,118,135,102,83,136,137,138,139,140,141,142],"skills gateway","gateway","task","loads","Bash","node","specialized","instructions","catalog","use","router","as",{"skillNo":144,"name":145,"nameZh":17,"description":146,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":40},"01M6M2PYJJQKMWGX7XT7ZJK0H3","decision-log","Record, list, show and supersede architecture decisions that persist across sessions in the shared agent infra state store. Use when the user says \"record this decision\", \"log an ADR\", \"what did we decide about\", \"list decisions\", or \"supersede decision\".","https:\u002F\u002Fgithub.com\u002Fdiegopacheco\u002Fai-playground\u002Fblob\u002Fmain\u002Fpocs\u002Fagent-skills-infra-poc\u002Fskills\u002Fdecision-log\u002FSKILL.md",[],[150,151,152,153,35,154,155,156,157,158,140,159,160,161,162,163,164,165,166,167],"decision log","log","decision","persist","state","adr","decide","decisions","list","show","infra","record","across","shared","store","about","supersede","sessions"]