moflo 4.9.20 → 4.9.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/.claude/agents/analysis/analyze-code-quality.md +0 -121
  2. package/.claude/agents/analysis/code-analyzer.md +5 -26
  3. package/.claude/agents/architecture/system-design/arch-system-design.md +0 -119
  4. package/.claude/agents/base-template-generator.md +0 -1
  5. package/.claude/agents/core/coder.md +0 -22
  6. package/.claude/agents/core/planner.md +0 -16
  7. package/.claude/agents/core/researcher.md +0 -16
  8. package/.claude/agents/core/reviewer.md +0 -17
  9. package/.claude/agents/core/tester.md +0 -19
  10. package/.claude/agents/custom/test-long-runner.md +0 -2
  11. package/.claude/agents/development/dev-backend-api.md +0 -167
  12. package/.claude/agents/development/dev-database.md +43 -0
  13. package/.claude/agents/development/dev-frontend.md +42 -0
  14. package/.claude/agents/devops/ci-cd/ops-cicd-github.md +0 -112
  15. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +0 -111
  16. package/.claude/agents/security/security-auditor.md +45 -0
  17. package/.claude/guidance/shipped/moflo-agent-rules.md +172 -0
  18. package/.claude/guidance/shipped/moflo-claude-swarm-cohesion.md +73 -265
  19. package/.claude/guidance/shipped/moflo-cli-reference.md +6 -6
  20. package/.claude/guidance/shipped/moflo-core-guidance.md +66 -184
  21. package/.claude/guidance/shipped/moflo-cross-platform.md +1 -1
  22. package/.claude/guidance/shipped/moflo-error-handling.md +3 -3
  23. package/.claude/guidance/shipped/moflo-guidance-rules.md +17 -7
  24. package/.claude/guidance/shipped/moflo-memory-strategy.md +76 -182
  25. package/.claude/guidance/shipped/moflo-memorydb-maintenance.md +6 -8
  26. package/.claude/guidance/shipped/moflo-settings-injection.md +7 -9
  27. package/.claude/guidance/shipped/moflo-source-hygiene.md +5 -5
  28. package/.claude/guidance/shipped/moflo-spell-connectors.md +3 -4
  29. package/.claude/guidance/shipped/moflo-spell-custom-steps.md +3 -4
  30. package/.claude/guidance/shipped/moflo-spell-engine.md +40 -162
  31. package/.claude/guidance/shipped/moflo-spell-runner.md +134 -0
  32. package/.claude/guidance/shipped/moflo-spell-sandboxing.md +10 -57
  33. package/.claude/guidance/shipped/moflo-spell-troubleshooting.md +149 -0
  34. package/.claude/guidance/shipped/moflo-subagents.md +43 -114
  35. package/.claude/guidance/shipped/moflo-task-icons.md +4 -4
  36. package/.claude/guidance/shipped/moflo-user-facing-language.md +3 -3
  37. package/.claude/guidance/shipped/moflo-verbose-command-filtering.md +3 -3
  38. package/.claude/guidance/shipped/moflo-yaml-reference.md +4 -5
  39. package/.claude/helpers/gate.cjs +192 -15
  40. package/.claude/helpers/prompt-hook.mjs +4 -38
  41. package/.claude/helpers/simplify-classify.cjs +32 -11
  42. package/.claude/helpers/subagent-bootstrap.json +1 -1
  43. package/.claude/helpers/subagent-start.cjs +1 -1
  44. package/.claude/skills/connector-builder/SKILL.md +42 -429
  45. package/.claude/skills/connector-builder/templates/connector.md +189 -0
  46. package/.claude/skills/connector-builder/templates/step-command.md +176 -0
  47. package/.claude/skills/eldar/SKILL.md +7 -7
  48. package/.claude/skills/fl/SKILL.md +3 -3
  49. package/.claude/skills/fl/execution-modes.md +39 -16
  50. package/.claude/skills/fl/phases.md +3 -3
  51. package/.claude/skills/{simplify → flo-simplify}/SKILL.md +11 -11
  52. package/.claude/skills/guidance/SKILL.md +17 -9
  53. package/.claude/skills/memory-patterns/SKILL.md +1 -1
  54. package/.claude/skills/publish/SKILL.md +121 -36
  55. package/.claude/skills/reset-epic/SKILL.md +2 -2
  56. package/.claude/skills/spell-builder/SKILL.md +39 -226
  57. package/.claude/skills/spell-builder/architecture.md +1 -1
  58. package/.claude/skills/spell-builder/permissions.md +107 -0
  59. package/.claude/skills/spell-builder/preflight.md +101 -0
  60. package/.claude/skills/spell-schedule/SKILL.md +2 -3
  61. package/bin/gate.cjs +192 -15
  62. package/bin/lib/retired-files.mjs +146 -0
  63. package/bin/prompt-hook.mjs +4 -38
  64. package/bin/session-start-launcher.mjs +120 -1
  65. package/bin/setup-project.mjs +63 -69
  66. package/bin/simplify-classify.cjs +32 -11
  67. package/dist/src/cli/appliance/rvfa-builder.js +1 -1
  68. package/dist/src/cli/commands/agent.js +3 -9
  69. package/dist/src/cli/commands/doctor-checks-deep.js +4 -0
  70. package/dist/src/cli/commands/hooks.js +1 -3
  71. package/dist/src/cli/commands/index.js +2 -0
  72. package/dist/src/cli/commands/retire.js +111 -0
  73. package/dist/src/cli/hooks/reasoningbank/index.js +7 -7
  74. package/dist/src/cli/init/claudemd-generator.js +30 -33
  75. package/dist/src/cli/init/executor.js +53 -69
  76. package/dist/src/cli/init/helpers-generator.js +165 -52
  77. package/dist/src/cli/init/moflo-init.js +41 -114
  78. package/dist/src/cli/init/settings-generator.js +44 -14
  79. package/dist/src/cli/mcp-tools/agent-tools.js +9 -27
  80. package/dist/src/cli/mcp-tools/hooks-tools.js +23 -21
  81. package/dist/src/cli/memory/controllers/semantic-router.js +18 -12
  82. package/dist/src/cli/memory/sona-optimizer.js +6 -6
  83. package/dist/src/cli/neural/domain/services/learning-service.js +3 -3
  84. package/dist/src/cli/services/agent-router.js +2 -5
  85. package/dist/src/cli/services/hook-block-hash.js +11 -2
  86. package/dist/src/cli/services/hook-wiring.js +86 -3
  87. package/dist/src/cli/services/subagent-bootstrap.js +1 -1
  88. package/dist/src/cli/shared/events/example-usage.js +6 -6
  89. package/dist/src/cli/shared/hooks/task-hooks.js +8 -8
  90. package/dist/src/cli/version.js +1 -1
  91. package/package.json +3 -2
  92. package/retired-files.json +1989 -0
  93. package/scripts/post-install-bootstrap.mjs +19 -0
  94. package/src/cli/data/model-registry.json +2 -2
  95. package/.claude/agents/consensus/byzantine-coordinator.md +0 -63
  96. package/.claude/agents/consensus/crdt-synchronizer.md +0 -997
  97. package/.claude/agents/consensus/gossip-coordinator.md +0 -63
  98. package/.claude/agents/consensus/performance-benchmarker.md +0 -851
  99. package/.claude/agents/consensus/quorum-manager.md +0 -823
  100. package/.claude/agents/consensus/raft-manager.md +0 -63
  101. package/.claude/agents/consensus/security-manager.md +0 -622
  102. package/.claude/agents/data/ml/data-ml-model.md +0 -193
  103. package/.claude/agents/github/code-review-swarm.md +0 -538
  104. package/.claude/agents/github/github-modes.md +0 -172
  105. package/.claude/agents/github/issue-tracker.md +0 -311
  106. package/.claude/agents/github/multi-repo-swarm.md +0 -551
  107. package/.claude/agents/github/pr-manager.md +0 -183
  108. package/.claude/agents/github/project-board-sync.md +0 -508
  109. package/.claude/agents/github/release-manager.md +0 -360
  110. package/.claude/agents/github/release-swarm.md +0 -580
  111. package/.claude/agents/github/repo-architect.md +0 -391
  112. package/.claude/agents/github/swarm-issue.md +0 -566
  113. package/.claude/agents/github/swarm-pr.md +0 -414
  114. package/.claude/agents/github/sync-coordinator.md +0 -426
  115. package/.claude/agents/github/workflow-automation.md +0 -606
  116. package/.claude/agents/goal/code-goal-planner.md +0 -440
  117. package/.claude/agents/goal/goal-planner.md +0 -168
  118. package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -127
  119. package/.claude/agents/hive-mind/queen-coordinator.md +0 -198
  120. package/.claude/agents/hive-mind/scout-explorer.md +0 -233
  121. package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -184
  122. package/.claude/agents/hive-mind/worker-specialist.md +0 -208
  123. package/.claude/agents/neural/safla-neural.md +0 -73
  124. package/.claude/agents/optimization/benchmark-suite.md +0 -665
  125. package/.claude/agents/optimization/load-balancer.md +0 -431
  126. package/.claude/agents/optimization/performance-monitor.md +0 -672
  127. package/.claude/agents/optimization/resource-allocator.md +0 -674
  128. package/.claude/agents/optimization/topology-optimizer.md +0 -808
  129. package/.claude/agents/reasoning/goal-planner.md +0 -67
  130. package/.claude/agents/sona/sona-learning-optimizer.md +0 -74
  131. package/.claude/agents/sparc/architecture.md +0 -472
  132. package/.claude/agents/sparc/pseudocode.md +0 -318
  133. package/.claude/agents/sparc/refinement.md +0 -525
  134. package/.claude/agents/sparc/specification.md +0 -276
  135. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -225
  136. package/.claude/agents/swarm/adaptive-coordinator.md +0 -391
  137. package/.claude/agents/swarm/hierarchical-coordinator.md +0 -321
  138. package/.claude/agents/swarm/mesh-coordinator.md +0 -383
  139. package/.claude/agents/testing/production-validator.md +0 -395
  140. package/.claude/agents/testing/tdd-london-swarm.md +0 -244
  141. package/.claude/agents/v3/adr-architect.md +0 -184
  142. package/.claude/agents/v3/aidefence-guardian.md +0 -277
  143. package/.claude/agents/v3/claims-authorizer.md +0 -208
  144. package/.claude/agents/v3/collective-intelligence-coordinator.md +0 -988
  145. package/.claude/agents/v3/ddd-domain-expert.md +0 -220
  146. package/.claude/agents/v3/injection-analyst.md +0 -232
  147. package/.claude/agents/v3/memory-specialist.md +0 -987
  148. package/.claude/agents/v3/performance-engineer.md +0 -1225
  149. package/.claude/agents/v3/pii-detector.md +0 -146
  150. package/.claude/agents/v3/reasoningbank-learner.md +0 -213
  151. package/.claude/agents/v3/security-architect-aidefence.md +0 -405
  152. package/.claude/agents/v3/security-architect.md +0 -865
  153. package/.claude/agents/v3/security-auditor.md +0 -771
  154. package/.claude/agents/v3/sparc-orchestrator.md +0 -182
  155. package/.claude/agents/v3/swarm-memory-manager.md +0 -142
  156. package/.claude/agents/v3/v3-integration-architect.md +0 -205
  157. package/.claude/commands/claude-flow-help.md +0 -103
  158. package/.claude/commands/claude-flow-memory.md +0 -107
  159. package/.claude/commands/claude-flow-swarm.md +0 -205
  160. package/.claude/commands/github/README.md +0 -11
  161. package/.claude/commands/github/code-review-swarm.md +0 -514
  162. package/.claude/commands/github/code-review.md +0 -25
  163. package/.claude/commands/github/github-modes.md +0 -146
  164. package/.claude/commands/github/github-swarm.md +0 -113
  165. package/.claude/commands/github/issue-tracker.md +0 -284
  166. package/.claude/commands/github/issue-triage.md +0 -25
  167. package/.claude/commands/github/multi-repo-swarm.md +0 -519
  168. package/.claude/commands/github/pr-enhance.md +0 -26
  169. package/.claude/commands/github/pr-manager.md +0 -164
  170. package/.claude/commands/github/project-board-sync.md +0 -471
  171. package/.claude/commands/github/release-manager.md +0 -332
  172. package/.claude/commands/github/release-swarm.md +0 -544
  173. package/.claude/commands/github/repo-analyze.md +0 -25
  174. package/.claude/commands/github/repo-architect.md +0 -361
  175. package/.claude/commands/github/swarm-issue.md +0 -482
  176. package/.claude/commands/github/swarm-pr.md +0 -285
  177. package/.claude/commands/github/sync-coordinator.md +0 -294
  178. package/.claude/commands/github/workflow-automation.md +0 -442
  179. package/.claude/commands/hooks/README.md +0 -11
  180. package/.claude/commands/hooks/overview.md +0 -58
  181. package/.claude/commands/hooks/post-edit.md +0 -117
  182. package/.claude/commands/hooks/post-task.md +0 -112
  183. package/.claude/commands/hooks/pre-edit.md +0 -113
  184. package/.claude/commands/hooks/pre-task.md +0 -111
  185. package/.claude/commands/hooks/session-end.md +0 -118
  186. package/.claude/commands/hooks/setup.md +0 -103
  187. package/.claude/commands/simplify.md +0 -101
  188. package/.claude/commands/sparc/analyzer.md +0 -42
  189. package/.claude/commands/sparc/architect.md +0 -43
  190. package/.claude/commands/sparc/ask.md +0 -86
  191. package/.claude/commands/sparc/batch-executor.md +0 -44
  192. package/.claude/commands/sparc/code.md +0 -78
  193. package/.claude/commands/sparc/coder.md +0 -44
  194. package/.claude/commands/sparc/debug.md +0 -72
  195. package/.claude/commands/sparc/debugger.md +0 -44
  196. package/.claude/commands/sparc/designer.md +0 -43
  197. package/.claude/commands/sparc/devops.md +0 -98
  198. package/.claude/commands/sparc/docs-writer.md +0 -69
  199. package/.claude/commands/sparc/documenter.md +0 -44
  200. package/.claude/commands/sparc/innovator.md +0 -44
  201. package/.claude/commands/sparc/integration.md +0 -72
  202. package/.claude/commands/sparc/mcp.md +0 -106
  203. package/.claude/commands/sparc/memory-manager.md +0 -44
  204. package/.claude/commands/sparc/optimizer.md +0 -44
  205. package/.claude/commands/sparc/orchestrator.md +0 -116
  206. package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -72
  207. package/.claude/commands/sparc/refinement-optimization-mode.md +0 -72
  208. package/.claude/commands/sparc/researcher.md +0 -44
  209. package/.claude/commands/sparc/reviewer.md +0 -44
  210. package/.claude/commands/sparc/security-review.md +0 -69
  211. package/.claude/commands/sparc/sparc-modes.md +0 -139
  212. package/.claude/commands/sparc/sparc.md +0 -99
  213. package/.claude/commands/sparc/spec-pseudocode.md +0 -69
  214. package/.claude/commands/sparc/spell-manager.md +0 -44
  215. package/.claude/commands/sparc/supabase-admin.md +0 -337
  216. package/.claude/commands/sparc/swarm-coordinator.md +0 -44
  217. package/.claude/commands/sparc/tdd.md +0 -44
  218. package/.claude/commands/sparc/tester.md +0 -44
  219. package/.claude/commands/sparc/tutorial.md +0 -68
  220. package/.claude/commands/sparc.md +0 -151
  221. package/.claude/guidance/shipped/moflo-session-start.md +0 -154
  222. package/.claude/guidance/shipped/moflo-spell-engine-architecture.md +0 -145
  223. package/.claude/skills/browser/SKILL.md +0 -204
  224. package/.claude/skills/github-code-review/SKILL.md +0 -1140
  225. package/.claude/skills/github-multi-repo/SKILL.md +0 -866
  226. package/.claude/skills/github-project-management/SKILL.md +0 -1272
  227. package/.claude/skills/github-release-management/SKILL.md +0 -1074
  228. package/.claude/skills/github-workflow-automation/SKILL.md +0 -1060
  229. package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
  230. package/.claude/skills/hooks-automation/SKILL.md +0 -1193
  231. package/.claude/skills/pair-programming/SKILL.md +0 -1202
  232. package/.claude/skills/performance-analysis/SKILL.md +0 -563
  233. package/.claude/skills/skill-builder/SKILL.md +0 -910
  234. package/.claude/skills/sparc-methodology/SKILL.md +0 -904
  235. package/.claude/skills/stream-chain/SKILL.md +0 -563
  236. package/.claude/skills/swarm-advanced/SKILL.md +0 -811
  237. package/.claude/skills/swarm-orchestration/SKILL.md +0 -179
  238. package/.claude/skills/verification-quality/SKILL.md +0 -649
  239. package/.claude/skills/worker-benchmarks/skill.md +0 -135
  240. package/.claude/skills/worker-integration/skill.md +0 -154
@@ -1,904 +0,0 @@
1
- ---
2
- name: sparc-methodology
3
- description: SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) comprehensive development methodology with multi-agent orchestration
4
- version: 2.7.0
5
- category: development
6
- tags:
7
- - sparc
8
- - tdd
9
- - architecture
10
- - orchestration
11
- - methodology
12
- - multi-agent
13
- author: Claude Flow
14
- ---
15
-
16
- # SPARC Methodology - Comprehensive Development Framework
17
-
18
- ## Overview
19
-
20
- SPARC (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.
21
-
22
- ## Table of Contents
23
-
24
- 1. [Core Philosophy](#core-philosophy)
25
- 2. [Development Phases](#development-phases)
26
- 3. [Available Modes](#available-modes)
27
- 4. [Activation Methods](#activation-methods)
28
- 5. [Orchestration Patterns](#orchestration-patterns)
29
- 6. [TDD Workflows](#tdd-workflows)
30
- 7. [Best Practices](#best-practices)
31
- 8. [Integration Examples](#integration-examples)
32
- 9. [Common Workflows](#common-workflows)
33
-
34
- ---
35
-
36
- ## Core Philosophy
37
-
38
- SPARC methodology emphasizes:
39
-
40
- - **Systematic Approach**: Structured phases from specification to completion
41
- - **Test-Driven Development**: Tests written before implementation
42
- - **Parallel Execution**: Concurrent agent coordination for 2.8-4.4x speed improvements
43
- - **Memory Integration**: Persistent knowledge sharing across agents and sessions
44
- - **Quality First**: Comprehensive reviews, testing, and validation
45
- - **Modular Design**: Clean separation of concerns with clear interfaces
46
-
47
- ### Key Principles
48
-
49
- 1. **Specification Before Code**: Define requirements and constraints clearly
50
- 2. **Design Before Implementation**: Plan architecture and components
51
- 3. **Tests Before Features**: Write failing tests, then make them pass
52
- 4. **Review Everything**: Code quality, security, and performance checks
53
- 5. **Document Continuously**: Maintain current documentation throughout
54
-
55
- ---
56
-
57
- ## Development Phases
58
-
59
- ### Phase 1: Specification
60
- **Goal**: Define requirements, constraints, and success criteria
61
-
62
- - Requirements analysis
63
- - User story mapping
64
- - Constraint identification
65
- - Success metrics definition
66
- - Pseudocode planning
67
-
68
- **Key Modes**: `researcher`, `analyzer`, `memory-manager`
69
-
70
- ### Phase 2: Architecture
71
- **Goal**: Design system structure and component interfaces
72
-
73
- - System architecture design
74
- - Component interface definition
75
- - Database schema planning
76
- - API contract specification
77
- - Infrastructure planning
78
-
79
- **Key Modes**: `architect`, `designer`, `orchestrator`
80
-
81
- ### Phase 3: Refinement (TDD Implementation)
82
- **Goal**: Implement features with test-first approach
83
-
84
- - Write failing tests
85
- - Implement minimum viable code
86
- - Make tests pass
87
- - Refactor for quality
88
- - Iterate until complete
89
-
90
- **Key Modes**: `tdd`, `coder`, `tester`
91
-
92
- ### Phase 4: Review
93
- **Goal**: Ensure code quality, security, and performance
94
-
95
- - Code quality assessment
96
- - Security vulnerability scanning
97
- - Performance profiling
98
- - Best practices validation
99
- - Documentation review
100
-
101
- **Key Modes**: `reviewer`, `optimizer`, `debugger`
102
-
103
- ### Phase 5: Completion
104
- **Goal**: Integration, deployment, and monitoring
105
-
106
- - System integration
107
- - Deployment automation
108
- - Monitoring setup
109
- - Documentation finalization
110
- - Knowledge capture
111
-
112
- **Key Modes**: `spell-manager`, `documenter`, `memory-manager`
113
-
114
- ---
115
-
116
- ## Available Modes
117
-
118
- ### Core Orchestration Modes
119
-
120
- #### `orchestrator`
121
- Multi-agent task orchestration with TodoWrite/Task/Memory coordination.
122
-
123
- **Capabilities**:
124
- - Task decomposition into manageable units
125
- - Agent coordination and resource allocation
126
- - Progress tracking and result synthesis
127
- - Adaptive strategy selection
128
- - Cross-agent communication
129
-
130
- **Usage**:
131
-
132
- #### `swarm-coordinator`
133
- Specialized swarm management for complex multi-agent coordination.
134
-
135
- **Capabilities**:
136
- - Topology optimization (mesh, hierarchical, ring, star)
137
- - Agent lifecycle management
138
- - Dynamic scaling based on workload
139
- - Fault tolerance and recovery
140
- - Performance monitoring
141
-
142
- #### `spell-manager`
143
- Process automation and spell orchestration.
144
-
145
- **Capabilities**:
146
- - Spell definition and execution
147
- - Event-driven triggers
148
- - Sequential and parallel pipelines
149
- - State management
150
- - Error handling and retry logic
151
-
152
- #### `batch-executor`
153
- Parallel task execution for high-throughput operations.
154
-
155
- **Capabilities**:
156
- - Concurrent file operations
157
- - Batch processing optimization
158
- - Resource pooling
159
- - Load balancing
160
- - Progress aggregation
161
-
162
- ---
163
-
164
- ### Development Modes
165
-
166
- #### `coder`
167
- Autonomous code generation with batch file operations.
168
-
169
- **Capabilities**:
170
- - Feature implementation
171
- - Code refactoring
172
- - Bug fixes and patches
173
- - API development
174
- - Algorithm implementation
175
-
176
- **Quality Standards**:
177
- - ES2022+ standards
178
- - TypeScript type safety
179
- - Comprehensive error handling
180
- - Performance optimization
181
- - Security best practices
182
-
183
- **Usage**:
184
-
185
- #### `architect`
186
- System design with Memory-based coordination.
187
-
188
- **Capabilities**:
189
- - Microservices architecture
190
- - Event-driven design
191
- - Domain-driven design (DDD)
192
- - Hexagonal architecture
193
- - CQRS and Event Sourcing
194
-
195
- **Memory Integration**:
196
- - Store architectural decisions
197
- - Share component specifications
198
- - Maintain design consistency
199
- - Track architectural evolution
200
-
201
- **Design Patterns**:
202
- - Layered architecture
203
- - Microservices patterns
204
- - Event-driven patterns
205
- - Domain modeling
206
- - Infrastructure as Code
207
-
208
- **Usage**:
209
-
210
- #### `tdd`
211
- Test-driven development with comprehensive testing.
212
-
213
- **Capabilities**:
214
- - Test-first development
215
- - Red-green-refactor cycle
216
- - Test suite design
217
- - Coverage optimization (target: 90%+)
218
- - Continuous testing
219
-
220
- **TDD Workflow**:
221
- 1. Write failing test (RED)
222
- 2. Implement minimum code
223
- 3. Make test pass (GREEN)
224
- 4. Refactor for quality (REFACTOR)
225
- 5. Repeat cycle
226
-
227
- **Testing Strategies**:
228
- - Unit testing (Jest, Mocha, Vitest)
229
- - Integration testing
230
- - End-to-end testing (Playwright, Cypress)
231
- - Performance testing
232
- - Security testing
233
-
234
- **Usage**:
235
-
236
- #### `reviewer`
237
- Code review using batch file analysis.
238
-
239
- **Capabilities**:
240
- - Code quality assessment
241
- - Security vulnerability detection
242
- - Performance analysis
243
- - Best practices validation
244
- - Documentation review
245
-
246
- **Review Criteria**:
247
- - Code correctness and logic
248
- - Design pattern adherence
249
- - Comprehensive error handling
250
- - Test coverage adequacy
251
- - Maintainability and readability
252
- - Security vulnerabilities
253
- - Performance bottlenecks
254
-
255
- **Batch Analysis**:
256
- - Parallel file review
257
- - Pattern detection
258
- - Dependency checking
259
- - Consistency validation
260
- - Automated reporting
261
-
262
- **Usage**:
263
-
264
- ---
265
-
266
- ### Analysis and Research Modes
267
-
268
- #### `researcher`
269
- Deep research with parallel WebSearch/WebFetch and Memory coordination.
270
-
271
- **Capabilities**:
272
- - Comprehensive information gathering
273
- - Source credibility evaluation
274
- - Trend analysis and forecasting
275
- - Competitive research
276
- - Technology assessment
277
-
278
- **Research Methods**:
279
- - Parallel web searches
280
- - Academic paper analysis
281
- - Industry report synthesis
282
- - Expert opinion gathering
283
- - Statistical data compilation
284
-
285
- **Memory Integration**:
286
- - Store research findings with citations
287
- - Build knowledge graphs
288
- - Track information sources
289
- - Cross-reference insights
290
- - Maintain research history
291
-
292
- **Usage**:
293
-
294
- #### `analyzer`
295
- Code and data analysis with pattern recognition.
296
-
297
- **Capabilities**:
298
- - Static code analysis
299
- - Dependency analysis
300
- - Performance profiling
301
- - Security scanning
302
- - Data pattern recognition
303
-
304
- #### `optimizer`
305
- Performance optimization and bottleneck resolution.
306
-
307
- **Capabilities**:
308
- - Algorithm optimization
309
- - Database query tuning
310
- - Caching strategy design
311
- - Bundle size reduction
312
- - Memory leak detection
313
-
314
- ---
315
-
316
- ### Creative and Support Modes
317
-
318
- #### `designer`
319
- UI/UX design with accessibility focus.
320
-
321
- **Capabilities**:
322
- - Interface design
323
- - User experience optimization
324
- - Accessibility compliance (WCAG 2.1)
325
- - Design system creation
326
- - Responsive layout design
327
-
328
- #### `innovator`
329
- Creative problem-solving and novel solutions.
330
-
331
- **Capabilities**:
332
- - Brainstorming and ideation
333
- - Alternative approach generation
334
- - Technology evaluation
335
- - Proof of concept development
336
- - Innovation feasibility analysis
337
-
338
- #### `documenter`
339
- Comprehensive documentation generation.
340
-
341
- **Capabilities**:
342
- - API documentation (OpenAPI/Swagger)
343
- - Architecture diagrams
344
- - User guides and tutorials
345
- - Code comments and JSDoc
346
- - README and changelog maintenance
347
-
348
- #### `debugger`
349
- Systematic debugging and issue resolution.
350
-
351
- **Capabilities**:
352
- - Bug reproduction
353
- - Root cause analysis
354
- - Fix implementation
355
- - Regression prevention
356
- - Debug logging optimization
357
-
358
- #### `tester`
359
- Comprehensive testing beyond TDD.
360
-
361
- **Capabilities**:
362
- - Test suite expansion
363
- - Edge case identification
364
- - Performance testing
365
- - Load testing
366
- - Chaos engineering
367
-
368
- #### `memory-manager`
369
- Knowledge management and context preservation.
370
-
371
- **Capabilities**:
372
- - Cross-session memory persistence
373
- - Knowledge graph construction
374
- - Context restoration
375
- - Learning pattern extraction
376
- - Decision tracking
377
-
378
- ---
379
-
380
- ## Activation Methods
381
-
382
- ### Method 1: MCP Tools (Preferred in Claude Code)
383
-
384
- **Best for**: Integrated Claude Code workflows with full orchestration capabilities
385
-
386
- ```javascript
387
- // Basic mode execution
388
-
389
- // Initialize swarm for complex tasks
390
- mcp__moflo__swarm_init {
391
- topology: "hierarchical", // or "mesh", "ring", "star"
392
- strategy: "auto", // or "balanced", "specialized", "adaptive"
393
- maxAgents: 8
394
- }
395
-
396
- // Spawn specialized agents
397
- mcp__moflo__agent_spawn {
398
- type: "<agent-type>",
399
- capabilities: ["<capability1>", "<capability2>"]
400
- }
401
-
402
- // Monitor execution
403
- mcp__moflo__swarm_status {
404
- swarmId: "current",
405
- interval: 5000
406
- }
407
- ```
408
-
409
- ### Method 2: NPX CLI (Fallback)
410
-
411
- **Best for**: Terminal usage or when MCP tools unavailable
412
-
413
- ```bash
414
- # Execute specific mode
415
- npx claude-flow sparc run <mode> "task description"
416
-
417
- # Use alpha features
418
- npx claude-flow@alpha sparc run <mode> "task description"
419
-
420
- # List all available modes
421
- npx claude-flow sparc modes
422
-
423
- # Get help for specific mode
424
- npx claude-flow sparc help <mode>
425
-
426
- # Run with options
427
- npx claude-flow sparc run <mode> "task" --parallel --monitor
428
-
429
- # Execute TDD workflow
430
- npx claude-flow sparc tdd "feature description"
431
-
432
- # Batch execution
433
- npx claude-flow sparc batch <mode1,mode2,mode3> "task"
434
-
435
- # Pipeline execution
436
- npx claude-flow sparc pipeline "task description"
437
- ```
438
-
439
- ### Method 3: Local Installation
440
-
441
- **Best for**: Projects with local claude-flow installation
442
-
443
- ```bash
444
- # If claude-flow is installed locally
445
- ./claude-flow sparc run <mode> "task description"
446
- ```
447
-
448
- ---
449
-
450
- ## Orchestration Patterns
451
-
452
- ### Pattern 1: Hierarchical Coordination
453
-
454
- **Best for**: Complex projects with clear delegation hierarchy
455
-
456
- ```javascript
457
- // Initialize hierarchical swarm
458
- mcp__moflo__swarm_init {
459
- topology: "hierarchical",
460
- maxAgents: 12
461
- }
462
-
463
- // Spawn coordinator
464
- mcp__moflo__agent_spawn {
465
- type: "coordinator",
466
- capabilities: ["planning", "delegation", "monitoring"]
467
- }
468
-
469
- // Spawn specialized workers
470
- mcp__moflo__agent_spawn { type: "architect" }
471
- mcp__moflo__agent_spawn { type: "coder" }
472
- mcp__moflo__agent_spawn { type: "tester" }
473
- mcp__moflo__agent_spawn { type: "reviewer" }
474
- ```
475
-
476
- ### Pattern 2: Mesh Coordination
477
-
478
- **Best for**: Collaborative tasks requiring peer-to-peer communication
479
-
480
- ```javascript
481
- mcp__moflo__swarm_init {
482
- topology: "mesh",
483
- strategy: "balanced",
484
- maxAgents: 6
485
- }
486
- ```
487
-
488
- ### Pattern 3: Sequential Pipeline
489
-
490
- **Best for**: Ordered workflow execution (spec → design → code → test → review)
491
-
492
- ```javascript
493
- mcp__moflo__spell_create {
494
- name: "sparc-methodology",
495
- steps: [
496
- { mode: "researcher", task: "gather requirements" },
497
- { mode: "architect", task: "design system" },
498
- { mode: "coder", task: "implement features" },
499
- { mode: "tdd", task: "create tests" },
500
- { mode: "reviewer", task: "review code" }
501
- ],
502
- triggers: ["on_step_complete"]
503
- }
504
- ```
505
-
506
- ### Pattern 4: Parallel Execution
507
-
508
- **Best for**: Independent tasks that can run concurrently
509
-
510
- ### Pattern 5: Adaptive Strategy
511
-
512
- **Best for**: Dynamic workloads with changing requirements
513
-
514
- ```javascript
515
- mcp__moflo__swarm_init {
516
- topology: "hierarchical",
517
- strategy: "adaptive", // Auto-adjusts based on workload
518
- maxAgents: 20
519
- }
520
- ```
521
-
522
- ---
523
-
524
- ## TDD Workflows
525
-
526
- ### Complete TDD Workflow
527
-
528
- ```javascript
529
- // Step 1: Initialize TDD swarm
530
- mcp__moflo__swarm_init {
531
- topology: "hierarchical",
532
- maxAgents: 8
533
- }
534
-
535
- // Step 2: Research and planning
536
-
537
- // Step 3: Architecture design
538
-
539
- // Step 4: TDD implementation
540
-
541
- // Step 5: Code review
542
-
543
- // Step 6: Optimization
544
- ```
545
-
546
- ### Red-Green-Refactor Cycle
547
-
548
- ```javascript
549
- // RED: Write failing test
550
-
551
- // GREEN: Minimal implementation
552
-
553
- // REFACTOR: Improve code quality
554
- ```
555
-
556
- ---
557
-
558
- ## Best Practices
559
-
560
- ### 1. Memory Integration
561
-
562
- **Always use Memory for cross-agent coordination**:
563
-
564
- ```javascript
565
- // Store architectural decisions
566
- mcp__moflo__memory_store {
567
- namespace: "architecture",
568
- key: "api-design-v1",
569
- value: JSON.stringify(apiDesign),
570
- ttl: 86400000 // 24 hours
571
- }
572
-
573
- // Retrieve in subsequent agents
574
- mcp__moflo__memory_retrieve {
575
- namespace: "architecture",
576
- key: "api-design-v1"
577
- }
578
- ```
579
-
580
- ### 2. Parallel Operations
581
-
582
- **Batch all related operations in single message**:
583
-
584
- ```javascript
585
- // ✅ CORRECT: All operations together
586
- [Single Message]:
587
- mcp__moflo__agent_spawn { type: "researcher" }
588
- mcp__moflo__agent_spawn { type: "coder" }
589
- mcp__moflo__agent_spawn { type: "tester" }
590
- TodoWrite { todos: [8-10 todos] }
591
-
592
- // ❌ WRONG: Multiple messages
593
- Message 1: mcp__moflo__agent_spawn { type: "researcher" }
594
- Message 2: mcp__moflo__agent_spawn { type: "coder" }
595
- Message 3: TodoWrite { todos: [...] }
596
- ```
597
-
598
- ### 3. Hook Integration
599
-
600
- **Every SPARC mode should use hooks**:
601
-
602
- ```bash
603
- # Before work
604
- npx claude-flow@alpha hooks pre-task --description "implement auth"
605
-
606
- # During work
607
- npx claude-flow@alpha hooks post-edit --file "auth.js"
608
-
609
- # After work
610
- npx claude-flow@alpha hooks post-task --task-id "task-123"
611
- ```
612
-
613
- ### 4. Test Coverage
614
-
615
- **Maintain minimum 90% coverage**:
616
-
617
- - Unit tests for all functions
618
- - Integration tests for APIs
619
- - E2E tests for critical flows
620
- - Edge case coverage
621
- - Error path testing
622
-
623
- ### 5. Documentation
624
-
625
- **Document as you build**:
626
-
627
- - API documentation (OpenAPI)
628
- - Architecture decision records (ADR)
629
- - Code comments for complex logic
630
- - README with setup instructions
631
- - Changelog for version tracking
632
-
633
- ### 6. File Organization
634
-
635
- **Never save to root folder**:
636
-
637
- ```
638
- project/
639
- ├── src/ # Source code
640
- ├── tests/ # Test files
641
- ├── docs/ # Documentation
642
- ├── config/ # Configuration
643
- ├── scripts/ # Utility scripts
644
- └── examples/ # Example code
645
- ```
646
-
647
- ---
648
-
649
- ## Integration Examples
650
-
651
- ### Example 1: Full-Stack Development
652
-
653
- ```javascript
654
- [Single Message - Parallel Agent Execution]:
655
-
656
- // Initialize swarm
657
- mcp__moflo__swarm_init {
658
- topology: "hierarchical",
659
- maxAgents: 10
660
- }
661
-
662
- // Architecture phase
663
-
664
- // Research phase
665
-
666
- // Implementation phase
667
-
668
- // Testing phase
669
-
670
- // Review phase
671
-
672
- // Batch todos
673
- TodoWrite {
674
- todos: [
675
- {content: "Design API schema", status: "completed"},
676
- {content: "Research JWT implementation", status: "completed"},
677
- {content: "Implement authentication", status: "in_progress"},
678
- {content: "Write API tests", status: "pending"},
679
- {content: "Security review", status: "pending"},
680
- {content: "Performance optimization", status: "pending"},
681
- {content: "API documentation", status: "pending"},
682
- {content: "Deployment setup", status: "pending"}
683
- ]
684
- }
685
- ```
686
-
687
- ### Example 2: Research-Driven Innovation
688
-
689
- ```javascript
690
- // Research phase
691
-
692
- // Innovation phase
693
-
694
- // Architecture phase
695
-
696
- // Implementation phase
697
-
698
- // Documentation phase
699
- ```
700
-
701
- ### Example 3: Legacy Code Refactoring
702
-
703
- ```javascript
704
- // Analysis phase
705
-
706
- // Planning phase
707
-
708
- // Testing phase (create safety net)
709
-
710
- // Refactoring phase
711
-
712
- // Review phase
713
- ```
714
-
715
- ---
716
-
717
- ## Common Workflows
718
-
719
- ### Workflow 1: Feature Development
720
-
721
- ```bash
722
- # Step 1: Research and planning
723
- npx claude-flow sparc run researcher "authentication patterns"
724
-
725
- # Step 2: Architecture design
726
- npx claude-flow sparc run architect "design auth system"
727
-
728
- # Step 3: TDD implementation
729
- npx claude-flow sparc tdd "user authentication feature"
730
-
731
- # Step 4: Code review
732
- npx claude-flow sparc run reviewer "review auth implementation"
733
-
734
- # Step 5: Documentation
735
- npx claude-flow sparc run documenter "document auth API"
736
- ```
737
-
738
- ### Workflow 2: Bug Investigation
739
-
740
- ```bash
741
- # Step 1: Analyze issue
742
- npx claude-flow sparc run analyzer "investigate bug #456"
743
-
744
- # Step 2: Debug systematically
745
- npx claude-flow sparc run debugger "fix memory leak in service X"
746
-
747
- # Step 3: Create tests
748
- npx claude-flow sparc run tester "regression tests for bug #456"
749
-
750
- # Step 4: Review fix
751
- npx claude-flow sparc run reviewer "validate bug fix"
752
- ```
753
-
754
- ### Workflow 3: Performance Optimization
755
-
756
- ```bash
757
- # Step 1: Profile performance
758
- npx claude-flow sparc run analyzer "profile API response times"
759
-
760
- # Step 2: Identify bottlenecks
761
- npx claude-flow sparc run optimizer "optimize database queries"
762
-
763
- # Step 3: Implement improvements
764
- npx claude-flow sparc run coder "implement caching layer"
765
-
766
- # Step 4: Benchmark results
767
- npx claude-flow sparc run tester "performance benchmarks"
768
- ```
769
-
770
- ### Workflow 4: Complete Workflow
771
-
772
- ```bash
773
- # Execute full development pipeline
774
- npx claude-flow sparc pipeline "e-commerce checkout feature"
775
-
776
- # This automatically runs:
777
- # 1. researcher - Gather requirements
778
- # 2. architect - Design system
779
- # 3. coder - Implement features
780
- # 4. tdd - Create comprehensive tests
781
- # 5. reviewer - Code quality review
782
- # 6. optimizer - Performance tuning
783
- # 7. documenter - Documentation
784
- ```
785
-
786
- ---
787
-
788
- ## Advanced Features
789
-
790
- ### Neural Pattern Training
791
-
792
- ```javascript
793
- // Train patterns from successful workflows
794
- mcp__moflo__neural_train {
795
- pattern_type: "coordination",
796
- training_data: "successful_tdd_workflow.json",
797
- epochs: 50
798
- }
799
- ```
800
-
801
- ### Cross-Session Memory
802
-
803
- ```javascript
804
- // Save session state
805
-
806
- // Restore in new session
807
- ```
808
-
809
- ### GitHub Integration
810
-
811
- ```javascript
812
- // Analyze repository
813
- mcp__moflo__github_repo_analyze {
814
- repo: "owner/repo",
815
- analysis_type: "code_quality"
816
- }
817
-
818
- // Manage pull requests
819
- mcp__moflo__github_pr_manage {
820
- repo: "owner/repo",
821
- pr_number: 123,
822
- action: "review"
823
- }
824
- ```
825
-
826
- ### Performance Monitoring
827
-
828
- ```javascript
829
- // Real-time swarm monitoring
830
- mcp__moflo__swarm_status {
831
- swarmId: "current",
832
- interval: 5000
833
- }
834
-
835
- // Bottleneck analysis
836
- mcp__moflo__performance_report {
837
- component: "api-layer",
838
- metrics: ["latency", "throughput", "errors"]
839
- }
840
-
841
- // Token usage tracking
842
- ```
843
-
844
- ---
845
-
846
- ## Performance Benefits
847
-
848
- **Proven Results**:
849
- - **84.8%** SWE-Bench solve rate
850
- - **32.3%** token reduction through optimizations
851
- - **2.8-4.4x** speed improvement with parallel execution
852
- - **27+** neural models for pattern learning
853
- - **90%+** test coverage standard
854
-
855
- ---
856
-
857
- ## Support and Resources
858
-
859
- - **Documentation**: https://github.com/eric-cielo/moflo
860
- - **Issues**: https://github.com/eric-cielo/moflo/issues
861
- - **NPM Package**: https://www.npmjs.com/package/claude-flow
862
- - **Community**: Discord server (link in repository)
863
-
864
- ---
865
-
866
- ## Quick Reference
867
-
868
- ### Most Common Commands
869
-
870
- ```bash
871
- # List modes
872
- npx claude-flow sparc modes
873
-
874
- # Run specific mode
875
- npx claude-flow sparc run <mode> "task"
876
-
877
- # TDD workflow
878
- npx claude-flow sparc tdd "feature"
879
-
880
- # Full pipeline
881
- npx claude-flow sparc pipeline "task"
882
-
883
- # Batch execution
884
- npx claude-flow sparc batch <modes> "task"
885
- ```
886
-
887
- ### Most Common MCP Calls
888
-
889
- ```javascript
890
- // Initialize swarm
891
- mcp__moflo__swarm_init { topology: "hierarchical" }
892
-
893
- // Execute mode
894
-
895
- // Monitor progress
896
- mcp__moflo__swarm_status { interval: 5000 }
897
-
898
- // Store in memory
899
- mcp__moflo__memory_store { action: "store", key: "...", value: "..." }
900
- ```
901
-
902
- ---
903
-
904
- Remember: **SPARC = Systematic, Parallel, Agile, Refined, Complete**