[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71S3B1WVTFW9FQ97828EPWX":3,"skill-same:01M71S3B1WVTFW9FQ97828EPWX":68},{"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":23,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":53,"install":54,"resources":67},"01M71S3B1WVTFW9FQ97828EPWX","sparc-methodology",null,"SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) comprehensive development methodology with multi-agent orchestration","manykarim\u002Frobotframework-agentguard","manykarim","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F61293164?v=4","01M71S15ZAXR15JHKM1N7BHT21","Many Kasiriha","01M71S160CWQXETSCYWXDVNYJ2",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmanykarim\u002Frobotframework-agentguard\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsparc-methodology\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"methodology","sparc","sparc methodology","tdd","orchestration","architecture","development","flow","multi-agent","pseudocode","agent orchestration","specification","multi","with","refinement","2026-11-10 13:02:02",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":44,"author":45,"version":46,"category":30,"description":7},[25,27,29,28,24,32],"Claude Flow","2.7.0","main","63caf799a0409377ce4fd434e24e9eac7c05c6fa",".claude\u002Fskills\u002Fsparc-methodology",0,"https:\u002F\u002Fgithub.com\u002Fmanykarim\u002Frobotframework-agentguard","https:\u002F\u002Fgithub.com\u002Fmanykarim","2026-07-27 14:20:37",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add manykarim\u002Frobotframework-agentguard --skill sparc-methodology",{"tool":60,"command":61},"bunx","bunx skills add manykarim\u002Frobotframework-agentguard --skill sparc-methodology",{"tool":63,"command":64},"pnpm","pnpm dlx skills add manykarim\u002Frobotframework-agentguard --skill sparc-methodology","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmanykarim\u002Frobotframework-agentguard\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsparc-methodology\u002FSKILL.md",true,[],[69,87,95,113,127,143],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":76,"publishedAt":39},"01M71S584X6G22VN1KZ42DZ33K","good-example","Demonstrate a minimal valid Agent Skill used by AgentGuard's own tests.","https:\u002F\u002Fgithub.com\u002Fmanykarim\u002Frobotframework-agentguard\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fgood-skill\u002FSKILL.md",[75],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[77,78,79,80,81,82,83,84,85,86],"good example","good","example","valid","agentguard","read","write","minimal","tests","agent skill",{"skillNo":88,"name":89,"nameZh":6,"description":6,"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":39},"01M71S55P2APRSAC0S9F5X556A","bad-example","https:\u002F\u002Fgithub.com\u002Fmanykarim\u002Frobotframework-agentguard\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fbad-skill\u002FSKILL.md",[],[93,79,94,82],"bad","bad example",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":102,"publishedAt":39},"01M71S53FGWCB5XXX4QGW3RF4P","injection-skill","Demonstrates a prompt-injection payload embedded in the body.","https:\u002F\u002Fgithub.com\u002Fmanykarim\u002Frobotframework-agentguard\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsecurity\u002Finjection-skill\u002FSKILL.md",[101],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[103,104,82,105,106,107,108,109,110,111,112],"injection skill","injection","payload","body","prompt","unknown","Bash","prompt-injection","author","embedded",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":120,"publishedAt":39},"01M71S518MA1JN7F1DZ5XVRH06","curl-pipe-skill","Skill whose installer script demonstrates the `curl ... | sh` antipattern.","https:\u002F\u002Fgithub.com\u002Fmanykarim\u002Frobotframework-agentguard\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsecurity\u002Fcurl-pipe-skill\u002FSKILL.md",[119],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[121,122,123,124,125,108,109,111,126],"curl","pipe","curl pipe skill","installer","antipattern","script",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":134,"publishedAt":39},"01M71S4YYFE3HJKDEQR5Z944ZW","clean-skill","A minimal, well-formed skill used as the security-scanner happy path.","https:\u002F\u002Fgithub.com\u002Fmanykarim\u002Frobotframework-agentguard\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fsecurity\u002Fclean-skill\u002FSKILL.md",[133],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[135,136,81,137,84,138,139,140,141,82,142],"clean skill","clean","scanner","grep","true","as","security","path",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":39},"01M71S4W60AZYGA57HJWYBQZMJ","rf-libdoc-search","Search Robot Framework library\u002Fresource\u002Fsuite documentation to find matching keywords for a use case. Use when asked to find keywords, search libdoc, match a use case to keywords, or scan multiple libraries\u002Fresources for relevant keywords.","https:\u002F\u002Fgithub.com\u002Fmanykarim\u002Frobotframework-agentguard\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fintegrations\u002Fskills\u002Frf-libdoc-search\u002FSKILL.md",[],[150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167],"search","rf libdoc search","case","for","resources","relevant","scan","libraries","documentation","robot","when","framework","use","match","library","suite","matching","find"]