claude-flow-novice 1.5.2 → 1.5.4

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 (138) hide show
  1. package/.claude/agents/SPARSE_LANGUAGE_FINDINGS.md +991 -0
  2. package/.claude/agents/architecture/system-architect.md +3 -44
  3. package/.claude/agents/benchmarking-tests/test-agent-code-heavy.md +747 -0
  4. package/.claude/agents/benchmarking-tests/test-agent-metadata.md +181 -0
  5. package/.claude/agents/benchmarking-tests/test-agent-minimal.md +67 -0
  6. package/.claude/agents/data/ml/data-ml-model.md +5 -119
  7. package/.claude/agents/development/backend/dev-backend-api.md +4 -115
  8. package/.claude/agents/devops/ci-cd/ops-cicd-github.md +4 -114
  9. package/.claude/agents/documentation/api-docs/docs-api-openapi.md +4 -113
  10. package/.claude/agents/github/multi-repo-swarm.md +1 -28
  11. package/.claude/agents/github/pr-manager.md +1 -29
  12. package/.claude/agents/github/project-board-sync.md +1 -32
  13. package/.claude/agents/github/release-manager.md +1 -32
  14. package/.claude/agents/github/release-swarm.md +1 -33
  15. package/.claude/agents/github/repo-architect.md +1 -34
  16. package/.claude/agents/github/swarm-issue.md +1 -26
  17. package/.claude/agents/github/swarm-pr.md +1 -30
  18. package/.claude/agents/github/sync-coordinator.md +1 -30
  19. package/.claude/agents/github/workflow-automation.md +1 -31
  20. package/.claude/agents/neural/neural-pattern-agent.md +2 -50
  21. package/.claude/agents/specialized/CODER_AGENT_GUIDELINES.md +1245 -0
  22. package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +6 -142
  23. package/.claude/agents/sublinear/consciousness-evolution-agent.md +2 -18
  24. package/.claude/agents/sublinear/matrix-solver-agent.md +2 -16
  25. package/.claude/agents/sublinear/nanosecond-scheduler-agent.md +2 -19
  26. package/.claude/agents/sublinear/pagerank-agent.md +2 -19
  27. package/.claude/agents/sublinear/phi-calculator-agent.md +2 -19
  28. package/.claude/agents/sublinear/psycho-symbolic-agent.md +2 -19
  29. package/.claude/agents/sublinear/sublinear.md +2 -1
  30. package/.claude/agents/sublinear/temporal-advantage-agent.md +2 -16
  31. package/.claude/agents/testing/e2e/playwright-agent.md +7 -0
  32. package/.claude-flow-novice/.claude/agents/SPARSE_LANGUAGE_FINDINGS.md +991 -0
  33. package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +3 -44
  34. package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-code-heavy.md +747 -0
  35. package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-metadata.md +181 -0
  36. package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-minimal.md +67 -0
  37. package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +5 -119
  38. package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +4 -115
  39. package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +4 -114
  40. package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +4 -113
  41. package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +1 -28
  42. package/.claude-flow-novice/.claude/agents/github/pr-manager.md +1 -29
  43. package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +1 -32
  44. package/.claude-flow-novice/.claude/agents/github/release-manager.md +1 -32
  45. package/.claude-flow-novice/.claude/agents/github/release-swarm.md +1 -33
  46. package/.claude-flow-novice/.claude/agents/github/repo-architect.md +1 -34
  47. package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +1 -26
  48. package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +1 -30
  49. package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +1 -30
  50. package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +1 -31
  51. package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +2 -50
  52. package/.claude-flow-novice/.claude/agents/specialized/CODER_AGENT_GUIDELINES.md +1245 -0
  53. package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +6 -142
  54. package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +2 -18
  55. package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +2 -16
  56. package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +2 -19
  57. package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +2 -19
  58. package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +2 -19
  59. package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +2 -19
  60. package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +2 -1
  61. package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +2 -16
  62. package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +7 -0
  63. package/.claude-flow-novice/dist/src/cli/simple-commands/init/CLAUDE.md +188 -0
  64. package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow-universal +81 -0
  65. package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow.bat +18 -0
  66. package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow.ps1 +24 -0
  67. package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-md.js +982 -0
  68. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/analysis/bottleneck-detect.md +162 -0
  69. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/automation/auto-agent.md +122 -0
  70. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/coordination/swarm-init.md +85 -0
  71. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/github/github-swarm.md +121 -0
  72. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/helpers/standard-checkpoint-hooks.sh +179 -0
  73. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/notification.md +113 -0
  74. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-command.md +116 -0
  75. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-edit.md +117 -0
  76. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-task.md +112 -0
  77. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-command.md +113 -0
  78. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-edit.md +113 -0
  79. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-search.md +112 -0
  80. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-task.md +111 -0
  81. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-end.md +118 -0
  82. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-restore.md +118 -0
  83. package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-start.md +117 -0
  84. package/.claude-flow-novice/dist/src/cli/simple-commands/init/coordination-md.js +340 -0
  85. package/.claude-flow-novice/dist/src/cli/simple-commands/init/coordination.md +16 -0
  86. package/.claude-flow-novice/dist/src/cli/simple-commands/init/enhanced-templates.js +2347 -0
  87. package/.claude-flow-novice/dist/src/cli/simple-commands/init/github-safe-enhanced.js +331 -0
  88. package/.claude-flow-novice/dist/src/cli/simple-commands/init/github-safe.js +106 -0
  89. package/.claude-flow-novice/dist/src/cli/simple-commands/init/index.js +1896 -0
  90. package/.claude-flow-novice/dist/src/cli/simple-commands/init/memory-bank-md.js +259 -0
  91. package/.claude-flow-novice/dist/src/cli/simple-commands/init/memory-bank.md +16 -0
  92. package/.claude-flow-novice/dist/src/cli/simple-commands/init/readme-files.js +72 -0
  93. package/.claude-flow-novice/dist/src/cli/simple-commands/init/safe-hook-patterns.js +430 -0
  94. package/.claude-flow-novice/dist/src/cli/simple-commands/init/settings.json +109 -0
  95. package/.claude-flow-novice/dist/src/cli/simple-commands/init/settings.json.enhanced +35 -0
  96. package/.claude-flow-novice/dist/src/cli/simple-commands/init/sparc-modes.js +1401 -0
  97. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/CLAUDE.md +188 -0
  98. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow-universal +81 -0
  99. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow.bat +18 -0
  100. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow.ps1 +24 -0
  101. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +982 -0
  102. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/analysis/bottleneck-detect.md +162 -0
  103. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/automation/auto-agent.md +122 -0
  104. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/coordination/swarm-init.md +85 -0
  105. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/github/github-swarm.md +121 -0
  106. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/helpers/standard-checkpoint-hooks.sh +179 -0
  107. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/notification.md +113 -0
  108. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-command.md +116 -0
  109. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-edit.md +117 -0
  110. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-task.md +112 -0
  111. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-command.md +113 -0
  112. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-edit.md +113 -0
  113. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md +112 -0
  114. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md +111 -0
  115. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-end.md +118 -0
  116. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-restore.md +118 -0
  117. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-start.md +117 -0
  118. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/coordination-md.js +340 -0
  119. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/coordination.md +16 -0
  120. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/enhanced-templates.js +2347 -0
  121. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/github-safe-enhanced.js +331 -0
  122. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/github-safe.js +106 -0
  123. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/memory-bank-md.js +259 -0
  124. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/memory-bank.md +16 -0
  125. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/readme-files.js +72 -0
  126. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/safe-hook-patterns.js +430 -0
  127. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/settings.json +109 -0
  128. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/settings.json.enhanced +35 -0
  129. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/sparc-modes.js +1401 -0
  130. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/verification-claude-md.js +432 -0
  131. package/.claude-flow-novice/dist/src/cli/simple-commands/init/verification-claude-md.js +432 -0
  132. package/.claude-flow-novice/dist/src/cli/simple-commands/init.js +4 -0
  133. package/.claude-flow-novice/dist/src/slash-commands/benchmark-prompts.js +281 -0
  134. package/CLAUDE.md +1927 -127
  135. package/package.json +3 -3
  136. package/src/cli/simple-commands/init/index.js +39 -4
  137. package/src/cli/simple-commands/init/templates/CLAUDE.md +8 -10
  138. package/src/slash-commands/benchmark-prompts.js +281 -0
@@ -0,0 +1,1401 @@
1
+ // sparc-modes.js - SPARC mode file templates
2
+
3
+ export function createSparcModesOverview() {
4
+ return `# SPARC Modes Overview
5
+
6
+ SPARC (Specification, Planning, Architecture, Review, Code) is a comprehensive development methodology with 17 specialized modes.
7
+
8
+ ## Available Modes
9
+
10
+ ### Core Orchestration Modes
11
+ - **orchestrator**: Multi-agent task orchestration
12
+ - **swarm-coordinator**: Specialized swarm management
13
+ - **workflow-manager**: Process automation
14
+ - **batch-executor**: Parallel task execution
15
+
16
+ ### Development Modes
17
+ - **coder**: Autonomous code generation
18
+ - **architect**: System design
19
+ - **reviewer**: Code review
20
+ - **tdd**: Test-driven development
21
+
22
+ ### Analysis and Research Modes
23
+ - **researcher**: Deep research capabilities
24
+ - **analyzer**: Code and data analysis
25
+ - **optimizer**: Performance optimization
26
+
27
+ ### Creative and Support Modes
28
+ - **designer**: UI/UX design
29
+ - **innovator**: Creative problem solving
30
+ - **documenter**: Documentation generation
31
+ - **debugger**: Systematic debugging
32
+ - **tester**: Comprehensive testing
33
+ - **memory-manager**: Knowledge management
34
+
35
+ ## Usage
36
+ \`\`\`bash
37
+ # Run a specific mode
38
+ ./claude-flow-novice sparc run <mode> "task description"
39
+
40
+ # List all modes
41
+ ./claude-flow-novice sparc modes
42
+
43
+ # Get help for a mode
44
+ ./claude-flow-novice sparc help <mode>
45
+ \`\`\`
46
+ `;
47
+ }
48
+
49
+ export function createSwarmStrategyTemplates() {
50
+ return {
51
+ 'analysis.md': createAnalysisStrategy(),
52
+ 'development.md': createDevelopmentStrategy(),
53
+ 'examples.md': createExamplesStrategy(),
54
+ 'maintenance.md': createMaintenanceStrategy(),
55
+ 'optimization.md': createOptimizationStrategy(),
56
+ 'research.md': createResearchStrategy(),
57
+ 'testing.md': createTestingStrategy(),
58
+ };
59
+ }
60
+
61
+ function createAnalysisStrategy() {
62
+ return `# Analysis Swarm Strategy
63
+
64
+ ## Purpose
65
+ Comprehensive analysis through distributed agent coordination.
66
+
67
+ ## Activation
68
+
69
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
70
+ \`\`\`javascript
71
+ mcp__claude-flow__swarm_init {
72
+ topology: "mesh",
73
+ strategy: "analysis",
74
+ maxAgents: 6
75
+ }
76
+
77
+ mcp__claude-flow__task_orchestrate {
78
+ task: "analyze system performance",
79
+ strategy: "distributed"
80
+ }
81
+ \`\`\`
82
+
83
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
84
+ \`\`\`bash
85
+ # Use when running from terminal or MCP tools unavailable
86
+ npx claude-flow-novice swarm "analyze system performance" --strategy analysis
87
+
88
+ # For alpha features
89
+ npx claude-flow@alpha swarm "analyze system performance" --strategy analysis
90
+ \`\`\`
91
+
92
+ ### Option 3: Local Installation
93
+ \`\`\`bash
94
+ # If claude-flow-novice is installed locally
95
+ ./claude-flow-novice swarm "analyze system performance" --strategy analysis
96
+ \`\`\`
97
+
98
+ ## Agent Roles
99
+ - Data Collector: Gathers metrics and logs
100
+ - Pattern Analyzer: Identifies trends and anomalies
101
+ - Report Generator: Creates comprehensive reports
102
+ - Insight Synthesizer: Combines findings
103
+
104
+ ## Coordination Modes
105
+ - Mesh: For exploratory analysis
106
+ - Pipeline: For sequential processing
107
+ - Hierarchical: For complex systems
108
+ `;
109
+ }
110
+
111
+ function createDevelopmentStrategy() {
112
+ return `# Development Swarm Strategy
113
+
114
+ ## Purpose
115
+ Coordinated development through specialized agent teams.
116
+
117
+ ## Activation
118
+
119
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
120
+ \`\`\`javascript
121
+ mcp__claude-flow__swarm_init {
122
+ topology: "hierarchical",
123
+ strategy: "development",
124
+ maxAgents: 8
125
+ }
126
+
127
+ mcp__claude-flow__task_orchestrate {
128
+ task: "build feature X",
129
+ strategy: "parallel"
130
+ }
131
+ \`\`\`
132
+
133
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
134
+ \`\`\`bash
135
+ # Use when running from terminal or MCP tools unavailable
136
+ npx claude-flow-novice swarm "build feature X" --strategy development
137
+
138
+ # For alpha features
139
+ npx claude-flow@alpha swarm "build feature X" --strategy development
140
+ \`\`\`
141
+
142
+ ### Option 3: Local Installation
143
+ \`\`\`bash
144
+ # If claude-flow-novice is installed locally
145
+ ./claude-flow-novice swarm "build feature X" --strategy development
146
+ \`\`\`
147
+
148
+ ## Agent Roles
149
+ - Architect: Designs system structure
150
+ - Frontend Developer: Implements UI
151
+ - Backend Developer: Creates APIs
152
+ - Database Specialist: Manages data layer
153
+ - Integration Expert: Connects components
154
+
155
+ ## Best Practices
156
+ - Use hierarchical mode for large projects
157
+ - Enable parallel execution
158
+ - Implement continuous testing
159
+ `;
160
+ }
161
+
162
+ function createExamplesStrategy() {
163
+ return `# Examples Swarm Strategy
164
+
165
+ ## Common Swarm Patterns
166
+
167
+ ### Research Swarm
168
+ \`\`\`bash
169
+ ./claude-flow-novice swarm "research AI trends" \\
170
+ --strategy research \\
171
+ --mode distributed \\
172
+ --max-agents 6 \\
173
+ --parallel
174
+ \`\`\`
175
+
176
+ ### Development Swarm
177
+ \`\`\`bash
178
+ ./claude-flow-novice swarm "build REST API" \\
179
+ --strategy development \\
180
+ --mode hierarchical \\
181
+ --monitor \\
182
+ --output sqlite
183
+ \`\`\`
184
+
185
+ ### Analysis Swarm
186
+ \`\`\`bash
187
+ ./claude-flow-novice swarm "analyze codebase" \\
188
+ --strategy analysis \\
189
+ --mode mesh \\
190
+ --parallel \\
191
+ --timeout 300
192
+ \`\`\`
193
+ `;
194
+ }
195
+
196
+ function createMaintenanceStrategy() {
197
+ return `# Maintenance Swarm Strategy
198
+
199
+ ## Purpose
200
+ System maintenance and updates through coordinated agents.
201
+
202
+ ## Activation
203
+
204
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
205
+ \`\`\`javascript
206
+ mcp__claude-flow__swarm_init {
207
+ topology: "hierarchical",
208
+ strategy: "maintenance",
209
+ maxAgents: 5
210
+ }
211
+
212
+ mcp__claude-flow__task_orchestrate {
213
+ task: "update dependencies",
214
+ strategy: "sequential",
215
+ priority: "high"
216
+ }
217
+ \`\`\`
218
+
219
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
220
+ \`\`\`bash
221
+ # Use when running from terminal or MCP tools unavailable
222
+ npx claude-flow-novice swarm "update dependencies" --strategy maintenance
223
+
224
+ # For alpha features
225
+ npx claude-flow@alpha swarm "update dependencies" --strategy maintenance
226
+ \`\`\`
227
+
228
+ ### Option 3: Local Installation
229
+ \`\`\`bash
230
+ # If claude-flow-novice is installed locally
231
+ ./claude-flow-novice swarm "update dependencies" --strategy maintenance
232
+ \`\`\`
233
+
234
+ ## Agent Roles
235
+ - Dependency Analyzer: Checks for updates
236
+ - Security Scanner: Identifies vulnerabilities
237
+ - Test Runner: Validates changes
238
+ - Documentation Updater: Maintains docs
239
+
240
+ ## Safety Features
241
+ - Automatic backups
242
+ - Rollback capability
243
+ - Incremental updates
244
+ `;
245
+ }
246
+
247
+ function createOptimizationStrategy() {
248
+ return `# Optimization Swarm Strategy
249
+
250
+ ## Purpose
251
+ Performance optimization through specialized analysis.
252
+
253
+ ## Activation
254
+
255
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
256
+ \`\`\`javascript
257
+ mcp__claude-flow__swarm_init {
258
+ topology: "mesh",
259
+ strategy: "optimization",
260
+ maxAgents: 6
261
+ }
262
+
263
+ mcp__claude-flow__task_orchestrate {
264
+ task: "optimize performance",
265
+ strategy: "parallel"
266
+ }
267
+ \`\`\`
268
+
269
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
270
+ \`\`\`bash
271
+ # Use when running from terminal or MCP tools unavailable
272
+ npx claude-flow-novice swarm "optimize performance" --strategy optimization
273
+
274
+ # For alpha features
275
+ npx claude-flow@alpha swarm "optimize performance" --strategy optimization
276
+ \`\`\`
277
+
278
+ ### Option 3: Local Installation
279
+ \`\`\`bash
280
+ # If claude-flow-novice is installed locally
281
+ ./claude-flow-novice swarm "optimize performance" --strategy optimization
282
+ \`\`\`
283
+
284
+ ## Agent Roles
285
+ - Performance Profiler: Identifies bottlenecks
286
+ - Memory Analyzer: Detects leaks
287
+ - Code Optimizer: Implements improvements
288
+ - Benchmark Runner: Measures impact
289
+
290
+ ## Optimization Areas
291
+ - Execution speed
292
+ - Memory usage
293
+ - Network efficiency
294
+ - Bundle size
295
+ `;
296
+ }
297
+
298
+ function createResearchStrategy() {
299
+ return `# Research Swarm Strategy
300
+
301
+ ## Purpose
302
+ Deep research through parallel information gathering.
303
+
304
+ ## Activation
305
+
306
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
307
+ \`\`\`javascript
308
+ mcp__claude-flow__swarm_init {
309
+ topology: "distributed",
310
+ strategy: "research",
311
+ maxAgents: 6
312
+ }
313
+
314
+ mcp__claude-flow__task_orchestrate {
315
+ task: "research topic X",
316
+ strategy: "parallel"
317
+ }
318
+ \`\`\`
319
+
320
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
321
+ \`\`\`bash
322
+ # Use when running from terminal or MCP tools unavailable
323
+ npx claude-flow-novice swarm "research topic X" --strategy research
324
+
325
+ # For alpha features
326
+ npx claude-flow@alpha swarm "research topic X" --strategy research
327
+ \`\`\`
328
+
329
+ ### Option 3: Local Installation
330
+ \`\`\`bash
331
+ # If claude-flow-novice is installed locally
332
+ ./claude-flow-novice swarm "research topic X" --strategy research
333
+ \`\`\`
334
+
335
+ ## Agent Roles
336
+ - Web Researcher: Searches online sources
337
+ - Academic Researcher: Analyzes papers
338
+ - Data Analyst: Processes findings
339
+ - Report Writer: Synthesizes results
340
+
341
+ ## Research Methods
342
+ - Parallel web searches
343
+ - Cross-reference validation
344
+ - Source credibility assessment
345
+ `;
346
+ }
347
+
348
+ function createTestingStrategy() {
349
+ return `# Testing Swarm Strategy
350
+
351
+ ## Purpose
352
+ Comprehensive testing through distributed execution.
353
+
354
+ ## Activation
355
+
356
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
357
+ \`\`\`javascript
358
+ mcp__claude-flow__swarm_init {
359
+ topology: "distributed",
360
+ strategy: "testing",
361
+ maxAgents: 5
362
+ }
363
+
364
+ mcp__claude-flow__task_orchestrate {
365
+ task: "test application",
366
+ strategy: "parallel"
367
+ }
368
+ \`\`\`
369
+
370
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
371
+ \`\`\`bash
372
+ # Use when running from terminal or MCP tools unavailable
373
+ npx claude-flow-novice swarm "test application" --strategy testing
374
+
375
+ # For alpha features
376
+ npx claude-flow@alpha swarm "test application" --strategy testing
377
+ \`\`\`
378
+
379
+ ### Option 3: Local Installation
380
+ \`\`\`bash
381
+ # If claude-flow-novice is installed locally
382
+ ./claude-flow-novice swarm "test application" --strategy testing
383
+ \`\`\`
384
+
385
+ ## Agent Roles
386
+ - Unit Tester: Tests individual components
387
+ - Integration Tester: Validates interactions
388
+ - E2E Tester: Tests user flows
389
+ - Performance Tester: Measures metrics
390
+ - Security Tester: Finds vulnerabilities
391
+
392
+ ## Test Coverage
393
+ - Code coverage analysis
394
+ - Edge case identification
395
+ - Regression prevention
396
+ `;
397
+ }
398
+
399
+ export function createSparcModeTemplates() {
400
+ return {
401
+ 'analyzer.md': createAnalyzerMode(),
402
+ 'architect.md': createArchitectMode(),
403
+ 'batch-executor.md': createBatchExecutorMode(),
404
+ 'coder.md': createCoderMode(),
405
+ 'debugger.md': createDebuggerMode(),
406
+ 'designer.md': createDesignerMode(),
407
+ 'documenter.md': createDocumenterMode(),
408
+ 'innovator.md': createInnovatorMode(),
409
+ 'memory-manager.md': createMemoryManagerMode(),
410
+ 'optimizer.md': createOptimizerMode(),
411
+ 'orchestrator.md': createOrchestratorMode(),
412
+ 'researcher.md': createResearcherMode(),
413
+ 'reviewer.md': createReviewerMode(),
414
+ 'swarm-coordinator.md': createSwarmCoordinatorMode(),
415
+ 'tdd.md': createTddMode(),
416
+ 'tester.md': createTesterMode(),
417
+ 'workflow-manager.md': createWorkflowManagerMode(),
418
+ };
419
+ }
420
+
421
+ function createAnalyzerMode() {
422
+ return `# SPARC Analyzer Mode
423
+
424
+ ## Purpose
425
+ Deep code and data analysis with batch processing capabilities.
426
+
427
+ ## Activation
428
+
429
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
430
+ \`\`\`javascript
431
+ mcp__claude-flow__sparc_mode {
432
+ mode: "analyzer",
433
+ task_description: "analyze codebase performance",
434
+ options: {
435
+ parallel: true,
436
+ detailed: true
437
+ }
438
+ }
439
+ \`\`\`
440
+
441
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
442
+ \`\`\`bash
443
+ # Use when running from terminal or MCP tools unavailable
444
+ npx claude-flow-novice sparc run analyzer "analyze codebase performance"
445
+
446
+ # For alpha features
447
+ npx claude-flow@alpha sparc run analyzer "analyze codebase performance"
448
+ \`\`\`
449
+
450
+ ### Option 3: Local Installation
451
+ \`\`\`bash
452
+ # If claude-flow-novice is installed locally
453
+ ./claude-flow-novice sparc run analyzer "analyze codebase performance"
454
+ \`\`\`
455
+
456
+ ## Core Capabilities
457
+ - Code analysis with parallel file processing
458
+ - Data pattern recognition
459
+ - Performance profiling
460
+ - Memory usage analysis
461
+ - Dependency mapping
462
+
463
+ ## Batch Operations
464
+ - Parallel file analysis using concurrent Read operations
465
+ - Batch pattern matching with Grep tool
466
+ - Simultaneous metric collection
467
+ - Aggregated reporting
468
+
469
+ ## Output Format
470
+ - Detailed analysis reports
471
+ - Performance metrics
472
+ - Improvement recommendations
473
+ - Visualizations when applicable
474
+ `;
475
+ }
476
+
477
+ function createArchitectMode() {
478
+ return `# SPARC Architect Mode
479
+
480
+ ## Purpose
481
+ System design with Memory-based coordination for scalable architectures.
482
+
483
+ ## Activation
484
+
485
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
486
+ \`\`\`javascript
487
+ mcp__claude-flow__sparc_mode {
488
+ mode: "architect",
489
+ task_description: "design microservices architecture",
490
+ options: {
491
+ detailed: true,
492
+ memory_enabled: true
493
+ }
494
+ }
495
+ \`\`\`
496
+
497
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
498
+ \`\`\`bash
499
+ # Use when running from terminal or MCP tools unavailable
500
+ npx claude-flow-novice sparc run architect "design microservices architecture"
501
+
502
+ # For alpha features
503
+ npx claude-flow@alpha sparc run architect "design microservices architecture"
504
+ \`\`\`
505
+
506
+ ### Option 3: Local Installation
507
+ \`\`\`bash
508
+ # If claude-flow-novice is installed locally
509
+ ./claude-flow-novice sparc run architect "design microservices architecture"
510
+ \`\`\`
511
+
512
+ ## Core Capabilities
513
+ - System architecture design
514
+ - Component interface definition
515
+ - Database schema design
516
+ - API contract specification
517
+ - Infrastructure planning
518
+
519
+ ## Memory Integration
520
+ - Store architecture decisions in Memory
521
+ - Share component specifications across agents
522
+ - Maintain design consistency
523
+ - Track architectural evolution
524
+
525
+ ## Design Patterns
526
+ - Microservices
527
+ - Event-driven architecture
528
+ - Domain-driven design
529
+ - Hexagonal architecture
530
+ - CQRS and Event Sourcing
531
+ `;
532
+ }
533
+
534
+ function createBatchExecutorMode() {
535
+ return `# SPARC Batch Executor Mode
536
+
537
+ ## Purpose
538
+ Parallel task execution specialist using batch operations.
539
+
540
+ ## Activation
541
+
542
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
543
+ \`\`\`javascript
544
+ mcp__claude-flow__sparc_mode {
545
+ mode: "batch-executor",
546
+ task_description: "process multiple files",
547
+ options: {
548
+ parallel: true,
549
+ batch_size: 10
550
+ }
551
+ }
552
+ \`\`\`
553
+
554
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
555
+ \`\`\`bash
556
+ # Use when running from terminal or MCP tools unavailable
557
+ npx claude-flow-novice sparc run batch-executor "process multiple files"
558
+
559
+ # For alpha features
560
+ npx claude-flow@alpha sparc run batch-executor "process multiple files"
561
+ \`\`\`
562
+
563
+ ### Option 3: Local Installation
564
+ \`\`\`bash
565
+ # If claude-flow-novice is installed locally
566
+ ./claude-flow-novice sparc run batch-executor "process multiple files"
567
+ \`\`\`
568
+
569
+ ## Core Capabilities
570
+ - Parallel file operations
571
+ - Concurrent task execution
572
+ - Resource optimization
573
+ - Load balancing
574
+ - Progress tracking
575
+
576
+ ## Execution Patterns
577
+ - Parallel Read/Write operations
578
+ - Concurrent Edit operations
579
+ - Batch file transformations
580
+ - Distributed processing
581
+ - Pipeline orchestration
582
+
583
+ ## Performance Features
584
+ - Dynamic resource allocation
585
+ - Automatic load balancing
586
+ - Progress monitoring
587
+ - Error recovery
588
+ - Result aggregation
589
+ `;
590
+ }
591
+
592
+ function createCoderMode() {
593
+ return `# SPARC Coder Mode
594
+
595
+ ## Purpose
596
+ Autonomous code generation with batch file operations.
597
+
598
+ ## Activation
599
+
600
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
601
+ \`\`\`javascript
602
+ mcp__claude-flow__sparc_mode {
603
+ mode: "coder",
604
+ task_description: "implement user authentication",
605
+ options: {
606
+ test_driven: true,
607
+ parallel_edits: true
608
+ }
609
+ }
610
+ \`\`\`
611
+
612
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
613
+ \`\`\`bash
614
+ # Use when running from terminal or MCP tools unavailable
615
+ npx claude-flow-novice sparc run coder "implement user authentication"
616
+
617
+ # For alpha features
618
+ npx claude-flow@alpha sparc run coder "implement user authentication"
619
+ \`\`\`
620
+
621
+ ### Option 3: Local Installation
622
+ \`\`\`bash
623
+ # If claude-flow-novice is installed locally
624
+ ./claude-flow-novice sparc run coder "implement user authentication"
625
+ \`\`\`
626
+
627
+ ## Core Capabilities
628
+ - Feature implementation
629
+ - Code refactoring
630
+ - Bug fixes
631
+ - API development
632
+ - Algorithm implementation
633
+
634
+ ## Batch Operations
635
+ - Parallel file creation
636
+ - Concurrent code modifications
637
+ - Batch import updates
638
+ - Test file generation
639
+ - Documentation updates
640
+
641
+ ## Code Quality
642
+ - ES2022 standards
643
+ - Type safety with TypeScript
644
+ - Comprehensive error handling
645
+ - Performance optimization
646
+ - Security best practices
647
+ `;
648
+ }
649
+
650
+ function createDebuggerMode() {
651
+ return `# SPARC Debugger Mode
652
+
653
+ ## Purpose
654
+ Systematic debugging with TodoWrite and Memory integration.
655
+
656
+ ## Activation
657
+
658
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
659
+ \`\`\`javascript
660
+ mcp__claude-flow__sparc_mode {
661
+ mode: "debugger",
662
+ task_description: "fix authentication issues",
663
+ options: {
664
+ verbose: true,
665
+ trace: true
666
+ }
667
+ }
668
+ \`\`\`
669
+
670
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
671
+ \`\`\`bash
672
+ # Use when running from terminal or MCP tools unavailable
673
+ npx claude-flow-novice sparc run debugger "fix authentication issues"
674
+
675
+ # For alpha features
676
+ npx claude-flow@alpha sparc run debugger "fix authentication issues"
677
+ \`\`\`
678
+
679
+ ### Option 3: Local Installation
680
+ \`\`\`bash
681
+ # If claude-flow-novice is installed locally
682
+ ./claude-flow-novice sparc run debugger "fix authentication issues"
683
+ \`\`\`
684
+
685
+ ## Core Capabilities
686
+ - Issue reproduction
687
+ - Root cause analysis
688
+ - Stack trace analysis
689
+ - Memory leak detection
690
+ - Performance bottleneck identification
691
+
692
+ ## Debugging Workflow
693
+ 1. Create debugging plan with TodoWrite
694
+ 2. Systematic issue investigation
695
+ 3. Store findings in Memory
696
+ 4. Track fix progress
697
+ 5. Verify resolution
698
+
699
+ ## Tools Integration
700
+ - Error log analysis
701
+ - Breakpoint simulation
702
+ - Variable inspection
703
+ - Call stack tracing
704
+ - Memory profiling
705
+ `;
706
+ }
707
+
708
+ function createDesignerMode() {
709
+ return `# SPARC Designer Mode
710
+
711
+ ## Purpose
712
+ UI/UX design with Memory coordination for consistent experiences.
713
+
714
+ ## Activation
715
+
716
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
717
+ \`\`\`javascript
718
+ mcp__claude-flow__sparc_mode {
719
+ mode: "designer",
720
+ task_description: "create dashboard UI",
721
+ options: {
722
+ design_system: true,
723
+ responsive: true
724
+ }
725
+ }
726
+ \`\`\`
727
+
728
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
729
+ \`\`\`bash
730
+ # Use when running from terminal or MCP tools unavailable
731
+ npx claude-flow-novice sparc run designer "create dashboard UI"
732
+
733
+ # For alpha features
734
+ npx claude-flow@alpha sparc run designer "create dashboard UI"
735
+ \`\`\`
736
+
737
+ ### Option 3: Local Installation
738
+ \`\`\`bash
739
+ # If claude-flow-novice is installed locally
740
+ ./claude-flow-novice sparc run designer "create dashboard UI"
741
+ \`\`\`
742
+
743
+ ## Core Capabilities
744
+ - Interface design
745
+ - Component architecture
746
+ - Design system creation
747
+ - Accessibility planning
748
+ - Responsive layouts
749
+
750
+ ## Design Process
751
+ - User research insights
752
+ - Wireframe creation
753
+ - Component design
754
+ - Interaction patterns
755
+ - Design token management
756
+
757
+ ## Memory Coordination
758
+ - Store design decisions
759
+ - Share component specs
760
+ - Maintain consistency
761
+ - Track design evolution
762
+ `;
763
+ }
764
+
765
+ function createDocumenterMode() {
766
+ return `# SPARC Documenter Mode
767
+
768
+ ## Purpose
769
+ Documentation with batch file operations for comprehensive docs.
770
+
771
+ ## Activation
772
+
773
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
774
+ \`\`\`javascript
775
+ mcp__claude-flow__sparc_mode {
776
+ mode: "documenter",
777
+ task_description: "create API documentation",
778
+ options: {
779
+ format: "markdown",
780
+ include_examples: true
781
+ }
782
+ }
783
+ \`\`\`
784
+
785
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
786
+ \`\`\`bash
787
+ # Use when running from terminal or MCP tools unavailable
788
+ npx claude-flow-novice sparc run documenter "create API documentation"
789
+
790
+ # For alpha features
791
+ npx claude-flow@alpha sparc run documenter "create API documentation"
792
+ \`\`\`
793
+
794
+ ### Option 3: Local Installation
795
+ \`\`\`bash
796
+ # If claude-flow-novice is installed locally
797
+ ./claude-flow-novice sparc run documenter "create API documentation"
798
+ \`\`\`
799
+
800
+ ## Core Capabilities
801
+ - API documentation
802
+ - Code documentation
803
+ - User guides
804
+ - Architecture docs
805
+ - README files
806
+
807
+ ## Documentation Types
808
+ - Markdown documentation
809
+ - JSDoc comments
810
+ - API specifications
811
+ - Integration guides
812
+ - Deployment docs
813
+
814
+ ## Batch Features
815
+ - Parallel doc generation
816
+ - Bulk file updates
817
+ - Cross-reference management
818
+ - Example generation
819
+ - Diagram creation
820
+ `;
821
+ }
822
+
823
+ function createInnovatorMode() {
824
+ return `# SPARC Innovator Mode
825
+
826
+ ## Purpose
827
+ Creative problem solving with WebSearch and Memory integration.
828
+
829
+ ## Activation
830
+
831
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
832
+ \`\`\`javascript
833
+ mcp__claude-flow__sparc_mode {
834
+ mode: "innovator",
835
+ task_description: "innovative solutions for scaling",
836
+ options: {
837
+ research_depth: "comprehensive",
838
+ creativity_level: "high"
839
+ }
840
+ }
841
+ \`\`\`
842
+
843
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
844
+ \`\`\`bash
845
+ # Use when running from terminal or MCP tools unavailable
846
+ npx claude-flow-novice sparc run innovator "innovative solutions for scaling"
847
+
848
+ # For alpha features
849
+ npx claude-flow@alpha sparc run innovator "innovative solutions for scaling"
850
+ \`\`\`
851
+
852
+ ### Option 3: Local Installation
853
+ \`\`\`bash
854
+ # If claude-flow-novice is installed locally
855
+ ./claude-flow-novice sparc run innovator "innovative solutions for scaling"
856
+ \`\`\`
857
+
858
+ ## Core Capabilities
859
+ - Creative ideation
860
+ - Solution brainstorming
861
+ - Technology exploration
862
+ - Pattern innovation
863
+ - Proof of concept
864
+
865
+ ## Innovation Process
866
+ - Divergent thinking phase
867
+ - Research and exploration
868
+ - Convergent synthesis
869
+ - Prototype planning
870
+ - Feasibility analysis
871
+
872
+ ## Knowledge Sources
873
+ - WebSearch for trends
874
+ - Memory for context
875
+ - Cross-domain insights
876
+ - Pattern recognition
877
+ - Analogical reasoning
878
+ `;
879
+ }
880
+
881
+ function createMemoryManagerMode() {
882
+ return `# SPARC Memory Manager Mode
883
+
884
+ ## Purpose
885
+ Knowledge management with Memory tools for persistent insights.
886
+
887
+ ## Activation
888
+
889
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
890
+ \`\`\`javascript
891
+ mcp__claude-flow__sparc_mode {
892
+ mode: "memory-manager",
893
+ task_description: "organize project knowledge",
894
+ options: {
895
+ namespace: "project",
896
+ auto_organize: true
897
+ }
898
+ }
899
+ \`\`\`
900
+
901
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
902
+ \`\`\`bash
903
+ # Use when running from terminal or MCP tools unavailable
904
+ npx claude-flow-novice sparc run memory-manager "organize project knowledge"
905
+
906
+ # For alpha features
907
+ npx claude-flow@alpha sparc run memory-manager "organize project knowledge"
908
+ \`\`\`
909
+
910
+ ### Option 3: Local Installation
911
+ \`\`\`bash
912
+ # If claude-flow-novice is installed locally
913
+ ./claude-flow-novice sparc run memory-manager "organize project knowledge"
914
+ \`\`\`
915
+
916
+ ## Core Capabilities
917
+ - Knowledge organization
918
+ - Information retrieval
919
+ - Context management
920
+ - Insight preservation
921
+ - Cross-session persistence
922
+
923
+ ## Memory Strategies
924
+ - Hierarchical organization
925
+ - Tag-based categorization
926
+ - Temporal tracking
927
+ - Relationship mapping
928
+ - Priority management
929
+
930
+ ## Knowledge Operations
931
+ - Store critical insights
932
+ - Retrieve relevant context
933
+ - Update knowledge base
934
+ - Merge related information
935
+ - Archive obsolete data
936
+ `;
937
+ }
938
+
939
+ function createOptimizerMode() {
940
+ return `# SPARC Optimizer Mode
941
+
942
+ ## Purpose
943
+ Performance optimization with systematic analysis and improvements.
944
+
945
+ ## Activation
946
+
947
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
948
+ \`\`\`javascript
949
+ mcp__claude-flow__sparc_mode {
950
+ mode: "optimizer",
951
+ task_description: "optimize application performance",
952
+ options: {
953
+ profile: true,
954
+ benchmark: true
955
+ }
956
+ }
957
+ \`\`\`
958
+
959
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
960
+ \`\`\`bash
961
+ # Use when running from terminal or MCP tools unavailable
962
+ npx claude-flow-novice sparc run optimizer "optimize application performance"
963
+
964
+ # For alpha features
965
+ npx claude-flow@alpha sparc run optimizer "optimize application performance"
966
+ \`\`\`
967
+
968
+ ### Option 3: Local Installation
969
+ \`\`\`bash
970
+ # If claude-flow-novice is installed locally
971
+ ./claude-flow-novice sparc run optimizer "optimize application performance"
972
+ \`\`\`
973
+
974
+ ## Core Capabilities
975
+ - Performance profiling
976
+ - Code optimization
977
+ - Resource optimization
978
+ - Algorithm improvement
979
+ - Scalability enhancement
980
+
981
+ ## Optimization Areas
982
+ - Execution speed
983
+ - Memory usage
984
+ - Network efficiency
985
+ - Database queries
986
+ - Bundle size
987
+
988
+ ## Systematic Approach
989
+ 1. Baseline measurement
990
+ 2. Bottleneck identification
991
+ 3. Optimization implementation
992
+ 4. Impact verification
993
+ 5. Continuous monitoring
994
+ `;
995
+ }
996
+
997
+ function createOrchestratorMode() {
998
+ return `# SPARC Orchestrator Mode
999
+
1000
+ ## Purpose
1001
+ Multi-agent task orchestration with TodoWrite/TodoRead/Task/Memory.
1002
+
1003
+ ## Activation
1004
+
1005
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
1006
+ \`\`\`javascript
1007
+ mcp__claude-flow__sparc_mode {
1008
+ mode: "orchestrator",
1009
+ task_description: "coordinate feature development",
1010
+ options: {
1011
+ parallel: true,
1012
+ monitor: true
1013
+ }
1014
+ }
1015
+ \`\`\`
1016
+
1017
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
1018
+ \`\`\`bash
1019
+ # Use when running from terminal or MCP tools unavailable
1020
+ npx claude-flow-novice sparc run orchestrator "coordinate feature development"
1021
+
1022
+ # For alpha features
1023
+ npx claude-flow@alpha sparc run orchestrator "coordinate feature development"
1024
+ \`\`\`
1025
+
1026
+ ### Option 3: Local Installation
1027
+ \`\`\`bash
1028
+ # If claude-flow-novice is installed locally
1029
+ ./claude-flow-novice sparc run orchestrator "coordinate feature development"
1030
+ \`\`\`
1031
+
1032
+ ## Core Capabilities
1033
+ - Task decomposition
1034
+ - Agent coordination
1035
+ - Resource allocation
1036
+ - Progress tracking
1037
+ - Result synthesis
1038
+
1039
+ ## Orchestration Patterns
1040
+ - Hierarchical coordination
1041
+ - Parallel execution
1042
+ - Sequential pipelines
1043
+ - Event-driven flows
1044
+ - Adaptive strategies
1045
+
1046
+ ## Coordination Tools
1047
+ - TodoWrite for planning
1048
+ - Task for agent launch
1049
+ - Memory for sharing
1050
+ - Progress monitoring
1051
+ - Result aggregation
1052
+ `;
1053
+ }
1054
+
1055
+ function createResearcherMode() {
1056
+ return `# SPARC Researcher Mode
1057
+
1058
+ ## Purpose
1059
+ Deep research with parallel WebSearch/WebFetch and Memory coordination.
1060
+
1061
+ ## Activation
1062
+
1063
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
1064
+ \`\`\`javascript
1065
+ mcp__claude-flow__sparc_mode {
1066
+ mode: "researcher",
1067
+ task_description: "research AI trends 2024",
1068
+ options: {
1069
+ depth: "comprehensive",
1070
+ sources: ["academic", "industry", "news"]
1071
+ }
1072
+ }
1073
+ \`\`\`
1074
+
1075
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
1076
+ \`\`\`bash
1077
+ # Use when running from terminal or MCP tools unavailable
1078
+ npx claude-flow-novice sparc run researcher "research AI trends 2024"
1079
+
1080
+ # For alpha features
1081
+ npx claude-flow@alpha sparc run researcher "research AI trends 2024"
1082
+ \`\`\`
1083
+
1084
+ ### Option 3: Local Installation
1085
+ \`\`\`bash
1086
+ # If claude-flow-novice is installed locally
1087
+ ./claude-flow-novice sparc run researcher "research AI trends 2024"
1088
+ \`\`\`
1089
+
1090
+ ## Core Capabilities
1091
+ - Information gathering
1092
+ - Source evaluation
1093
+ - Trend analysis
1094
+ - Competitive research
1095
+ - Technology assessment
1096
+
1097
+ ## Research Methods
1098
+ - Parallel web searches
1099
+ - Academic paper analysis
1100
+ - Industry report synthesis
1101
+ - Expert opinion gathering
1102
+ - Data compilation
1103
+
1104
+ ## Memory Integration
1105
+ - Store research findings
1106
+ - Build knowledge graphs
1107
+ - Track information sources
1108
+ - Cross-reference insights
1109
+ - Maintain research history
1110
+ `;
1111
+ }
1112
+
1113
+ function createReviewerMode() {
1114
+ return `# SPARC Reviewer Mode
1115
+
1116
+ ## Purpose
1117
+ Code review using batch file analysis for comprehensive reviews.
1118
+
1119
+ ## Activation
1120
+
1121
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
1122
+ \`\`\`javascript
1123
+ mcp__claude-flow__sparc_mode {
1124
+ mode: "reviewer",
1125
+ task_description: "review pull request #123",
1126
+ options: {
1127
+ security_check: true,
1128
+ performance_check: true
1129
+ }
1130
+ }
1131
+ \`\`\`
1132
+
1133
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
1134
+ \`\`\`bash
1135
+ # Use when running from terminal or MCP tools unavailable
1136
+ npx claude-flow-novice sparc run reviewer "review pull request #123"
1137
+
1138
+ # For alpha features
1139
+ npx claude-flow@alpha sparc run reviewer "review pull request #123"
1140
+ \`\`\`
1141
+
1142
+ ### Option 3: Local Installation
1143
+ \`\`\`bash
1144
+ # If claude-flow-novice is installed locally
1145
+ ./claude-flow-novice sparc run reviewer "review pull request #123"
1146
+ \`\`\`
1147
+
1148
+ ## Core Capabilities
1149
+ - Code quality assessment
1150
+ - Security review
1151
+ - Performance analysis
1152
+ - Best practices check
1153
+ - Documentation review
1154
+
1155
+ ## Review Criteria
1156
+ - Code correctness
1157
+ - Design patterns
1158
+ - Error handling
1159
+ - Test coverage
1160
+ - Maintainability
1161
+
1162
+ ## Batch Analysis
1163
+ - Parallel file review
1164
+ - Pattern detection
1165
+ - Dependency checking
1166
+ - Consistency validation
1167
+ - Automated reporting
1168
+ `;
1169
+ }
1170
+
1171
+ function createSwarmCoordinatorMode() {
1172
+ return `# SPARC Swarm Coordinator Mode
1173
+
1174
+ ## Purpose
1175
+ Specialized swarm management with batch coordination capabilities.
1176
+
1177
+ ## Activation
1178
+
1179
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
1180
+ \`\`\`javascript
1181
+ mcp__claude-flow__sparc_mode {
1182
+ mode: "swarm-coordinator",
1183
+ task_description: "manage development swarm",
1184
+ options: {
1185
+ topology: "hierarchical",
1186
+ max_agents: 10
1187
+ }
1188
+ }
1189
+ \`\`\`
1190
+
1191
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
1192
+ \`\`\`bash
1193
+ # Use when running from terminal or MCP tools unavailable
1194
+ npx claude-flow-novice sparc run swarm-coordinator "manage development swarm"
1195
+
1196
+ # For alpha features
1197
+ npx claude-flow@alpha sparc run swarm-coordinator "manage development swarm"
1198
+ \`\`\`
1199
+
1200
+ ### Option 3: Local Installation
1201
+ \`\`\`bash
1202
+ # If claude-flow-novice is installed locally
1203
+ ./claude-flow-novice sparc run swarm-coordinator "manage development swarm"
1204
+ \`\`\`
1205
+
1206
+ ## Core Capabilities
1207
+ - Swarm initialization
1208
+ - Agent management
1209
+ - Task distribution
1210
+ - Load balancing
1211
+ - Result collection
1212
+
1213
+ ## Coordination Modes
1214
+ - Hierarchical swarms
1215
+ - Mesh networks
1216
+ - Pipeline coordination
1217
+ - Adaptive strategies
1218
+ - Hybrid approaches
1219
+
1220
+ ## Management Features
1221
+ - Dynamic scaling
1222
+ - Resource optimization
1223
+ - Failure recovery
1224
+ - Performance monitoring
1225
+ - Quality assurance
1226
+ `;
1227
+ }
1228
+
1229
+ function createTddMode() {
1230
+ return `# SPARC TDD Mode
1231
+
1232
+ ## Purpose
1233
+ Test-driven development with TodoWrite planning and comprehensive testing.
1234
+
1235
+ ## Activation
1236
+
1237
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
1238
+ \`\`\`javascript
1239
+ mcp__claude-flow__sparc_mode {
1240
+ mode: "tdd",
1241
+ task_description: "shopping cart feature",
1242
+ options: {
1243
+ coverage_target: 90,
1244
+ test_framework: "jest"
1245
+ }
1246
+ }
1247
+ \`\`\`
1248
+
1249
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
1250
+ \`\`\`bash
1251
+ # Use when running from terminal or MCP tools unavailable
1252
+ npx claude-flow-novice sparc run tdd "shopping cart feature"
1253
+
1254
+ # For alpha features
1255
+ npx claude-flow@alpha sparc run tdd "shopping cart feature"
1256
+ \`\`\`
1257
+
1258
+ ### Option 3: Local Installation
1259
+ \`\`\`bash
1260
+ # If claude-flow-novice is installed locally
1261
+ ./claude-flow-novice sparc run tdd "shopping cart feature"
1262
+ \`\`\`
1263
+
1264
+ ## Core Capabilities
1265
+ - Test-first development
1266
+ - Red-green-refactor cycle
1267
+ - Test suite design
1268
+ - Coverage optimization
1269
+ - Continuous testing
1270
+
1271
+ ## TDD Workflow
1272
+ 1. Write failing tests
1273
+ 2. Implement minimum code
1274
+ 3. Make tests pass
1275
+ 4. Refactor code
1276
+ 5. Repeat cycle
1277
+
1278
+ ## Testing Strategies
1279
+ - Unit testing
1280
+ - Integration testing
1281
+ - End-to-end testing
1282
+ - Performance testing
1283
+ - Security testing
1284
+ `;
1285
+ }
1286
+
1287
+ function createTesterMode() {
1288
+ return `# SPARC Tester Mode
1289
+
1290
+ ## Purpose
1291
+ Comprehensive testing with parallel execution capabilities.
1292
+
1293
+ ## Activation
1294
+
1295
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
1296
+ \`\`\`javascript
1297
+ mcp__claude-flow__sparc_mode {
1298
+ mode: "tester",
1299
+ task_description: "full regression suite",
1300
+ options: {
1301
+ parallel: true,
1302
+ coverage: true
1303
+ }
1304
+ }
1305
+ \`\`\`
1306
+
1307
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
1308
+ \`\`\`bash
1309
+ # Use when running from terminal or MCP tools unavailable
1310
+ npx claude-flow-novice sparc run tester "full regression suite"
1311
+
1312
+ # For alpha features
1313
+ npx claude-flow@alpha sparc run tester "full regression suite"
1314
+ \`\`\`
1315
+
1316
+ ### Option 3: Local Installation
1317
+ \`\`\`bash
1318
+ # If claude-flow-novice is installed locally
1319
+ ./claude-flow-novice sparc run tester "full regression suite"
1320
+ \`\`\`
1321
+
1322
+ ## Core Capabilities
1323
+ - Test planning
1324
+ - Test execution
1325
+ - Bug detection
1326
+ - Coverage analysis
1327
+ - Report generation
1328
+
1329
+ ## Test Types
1330
+ - Unit tests
1331
+ - Integration tests
1332
+ - E2E tests
1333
+ - Performance tests
1334
+ - Security tests
1335
+
1336
+ ## Parallel Features
1337
+ - Concurrent test runs
1338
+ - Distributed testing
1339
+ - Load testing
1340
+ - Cross-browser testing
1341
+ - Multi-environment validation
1342
+ `;
1343
+ }
1344
+
1345
+ function createWorkflowManagerMode() {
1346
+ return `# SPARC Workflow Manager Mode
1347
+
1348
+ ## Purpose
1349
+ Process automation with TodoWrite planning and Task execution.
1350
+
1351
+ ## Activation
1352
+
1353
+ ### Option 1: Using MCP Tools (Preferred in Claude Code)
1354
+ \`\`\`javascript
1355
+ mcp__claude-flow__sparc_mode {
1356
+ mode: "workflow-manager",
1357
+ task_description: "automate deployment",
1358
+ options: {
1359
+ pipeline: "ci-cd",
1360
+ rollback_enabled: true
1361
+ }
1362
+ }
1363
+ \`\`\`
1364
+
1365
+ ### Option 2: Using NPX CLI (Fallback when MCP not available)
1366
+ \`\`\`bash
1367
+ # Use when running from terminal or MCP tools unavailable
1368
+ npx claude-flow-novice sparc run workflow-manager "automate deployment"
1369
+
1370
+ # For alpha features
1371
+ npx claude-flow@alpha sparc run workflow-manager "automate deployment"
1372
+ \`\`\`
1373
+
1374
+ ### Option 3: Local Installation
1375
+ \`\`\`bash
1376
+ # If claude-flow-novice is installed locally
1377
+ ./claude-flow-novice sparc run workflow-manager "automate deployment"
1378
+ \`\`\`
1379
+
1380
+ ## Core Capabilities
1381
+ - Workflow design
1382
+ - Process automation
1383
+ - Pipeline creation
1384
+ - Event handling
1385
+ - State management
1386
+
1387
+ ## Workflow Patterns
1388
+ - Sequential flows
1389
+ - Parallel branches
1390
+ - Conditional logic
1391
+ - Loop iterations
1392
+ - Error handling
1393
+
1394
+ ## Automation Features
1395
+ - Trigger management
1396
+ - Task scheduling
1397
+ - Progress tracking
1398
+ - Result validation
1399
+ - Rollback capability
1400
+ `;
1401
+ }