claude-flow 2.7.24 → 2.7.26
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.
- package/bin/claude-flow +1 -1
- package/dist/src/cli/help-formatter.js +0 -5
- package/dist/src/cli/simple-cli.js +172 -182
- package/dist/src/cli/simple-cli.js.map +1 -1
- package/dist/src/cli/simple-commands/config.js +257 -115
- package/dist/src/cli/simple-commands/config.js.map +1 -1
- package/dist/src/memory/swarm-memory.js +416 -348
- package/dist/src/memory/swarm-memory.js.map +1 -1
- package/docs/TRANSFORMER_INITIALIZATION_ISSUE.md +434 -0
- package/docs/V2.7.25_RELEASE_NOTES.md +249 -0
- package/package.json +2 -2
package/bin/claude-flow
CHANGED
|
@@ -1,18 +1,47 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
import { promises as fs } from 'node:fs';
|
|
1
|
+
#!/usr/bin/env node
|
|
3
2
|
import { executeCommand, hasCommand, showCommandHelp, listCommands } from './command-registry.js';
|
|
4
3
|
import { parseFlags } from './utils.js';
|
|
4
|
+
import { args, cwd, isMainModule, exit, readTextFile, writeTextFile, mkdirAsync, errors } from './node-compat.js';
|
|
5
|
+
import { spawn } from 'child_process';
|
|
6
|
+
import process from 'process';
|
|
7
|
+
import readline from 'readline';
|
|
8
|
+
import { getMainHelp, getCommandHelp, getStandardizedCommandHelp } from './help-text.js';
|
|
5
9
|
import { VERSION } from '../core/version.js';
|
|
6
|
-
|
|
10
|
+
const LEGACY_AGENT_MAPPING = {
|
|
11
|
+
analyst: 'code-analyzer',
|
|
12
|
+
coordinator: 'task-orchestrator',
|
|
13
|
+
optimizer: 'perf-analyzer',
|
|
14
|
+
documenter: 'api-docs',
|
|
15
|
+
monitor: 'performance-benchmarker',
|
|
16
|
+
specialist: 'system-architect',
|
|
17
|
+
architect: 'system-architect'
|
|
18
|
+
};
|
|
19
|
+
function resolveLegacyAgentType(legacyType) {
|
|
20
|
+
return LEGACY_AGENT_MAPPING[legacyType] || legacyType;
|
|
21
|
+
}
|
|
22
|
+
function printHelp(plain = false) {
|
|
23
|
+
console.log(getMainHelp(plain));
|
|
24
|
+
}
|
|
25
|
+
function printCommandHelp(command) {
|
|
26
|
+
const standardCommands = [
|
|
27
|
+
'agent',
|
|
28
|
+
'sparc',
|
|
29
|
+
'memory'
|
|
30
|
+
];
|
|
31
|
+
if (standardCommands.includes(command)) {
|
|
32
|
+
const help = getStandardizedCommandHelp(command);
|
|
33
|
+
console.log(help);
|
|
34
|
+
} else {
|
|
35
|
+
const help = getCommandHelp(command);
|
|
36
|
+
console.log(help);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function printLegacyHelp() {
|
|
7
40
|
console.log(`
|
|
8
41
|
🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform
|
|
9
42
|
|
|
10
|
-
🎯
|
|
11
|
-
|
|
12
|
-
• 99% cost savings with OpenRouter, 352x faster local edits with Agent Booster
|
|
13
|
-
• Complete backwards compatibility with existing features
|
|
14
|
-
|
|
15
|
-
🎯 ENTERPRISE FEATURES: Complete ruv-swarm integration with 27 MCP tools, neural networking, and production-ready infrastructure
|
|
43
|
+
🎯 ENTERPRISE FEATURES: Complete ruv-swarm integration with 90+ MCP tools, neural networking, and production-ready infrastructure
|
|
44
|
+
⚡ ALPHA 85: Advanced automation capabilities & stream-JSON chaining for multi-agent pipelines
|
|
16
45
|
|
|
17
46
|
USAGE:
|
|
18
47
|
claude-flow <command> [options]
|
|
@@ -48,10 +77,9 @@ USAGE:
|
|
|
48
77
|
init [--sparc] # Initialize with enterprise environment + ruv-swarm
|
|
49
78
|
start [--ui] [--swarm] # Start orchestration with swarm intelligence
|
|
50
79
|
spawn <type> [--name] # Create AI agent with swarm coordination
|
|
51
|
-
agent <subcommand> #
|
|
80
|
+
agent <subcommand> # Advanced agent management with neural patterns
|
|
52
81
|
sparc <subcommand> # 17 SPARC modes with neural enhancement
|
|
53
82
|
memory <subcommand> # Cross-session persistent memory with neural learning
|
|
54
|
-
config <subcommand> # 🆕 Provider configuration management
|
|
55
83
|
status # Comprehensive system status with performance metrics
|
|
56
84
|
|
|
57
85
|
🤖 NEURAL AGENT TYPES (ruv-swarm Integration):
|
|
@@ -66,25 +94,20 @@ USAGE:
|
|
|
66
94
|
|
|
67
95
|
🎮 ENTERPRISE QUICK START:
|
|
68
96
|
# Initialize enterprise environment
|
|
69
|
-
npx claude-flow@2.
|
|
70
|
-
|
|
71
|
-
# 🆕 Execute agents with multi-provider support
|
|
72
|
-
./claude-flow agent run coder "Build REST API with auth" --provider anthropic
|
|
73
|
-
./claude-flow agent run researcher "Research React 19" --provider openrouter # 99% cost savings
|
|
74
|
-
./claude-flow agent agents # List all 66+ available agents
|
|
75
|
-
|
|
97
|
+
npx claude-flow@2.0.0 init --sparc
|
|
98
|
+
|
|
76
99
|
# Start enterprise orchestration with swarm intelligence
|
|
77
100
|
./claude-flow start --ui --swarm
|
|
78
|
-
|
|
101
|
+
|
|
79
102
|
# Deploy intelligent multi-agent development workflow
|
|
80
103
|
./claude-flow swarm "build enterprise API" --strategy development --parallel --monitor
|
|
81
|
-
|
|
104
|
+
|
|
82
105
|
# GitHub workflow automation
|
|
83
106
|
./claude-flow github pr-manager "coordinate release with automated testing"
|
|
84
|
-
|
|
107
|
+
|
|
85
108
|
# Neural memory management
|
|
86
109
|
./claude-flow memory store "architecture" "microservices with API gateway pattern"
|
|
87
|
-
|
|
110
|
+
|
|
88
111
|
# Real-time system monitoring
|
|
89
112
|
./claude-flow status --verbose
|
|
90
113
|
|
|
@@ -152,8 +175,8 @@ function printSuccess(message) {
|
|
|
152
175
|
function printWarning(message) {
|
|
153
176
|
console.warn(`⚠️ Warning: ${message}`);
|
|
154
177
|
}
|
|
155
|
-
function showHelpWithCommands() {
|
|
156
|
-
printHelp();
|
|
178
|
+
function showHelpWithCommands(plain = false) {
|
|
179
|
+
printHelp(plain);
|
|
157
180
|
console.log('\nRegistered Commands:');
|
|
158
181
|
const commands = listCommands();
|
|
159
182
|
for (const command of commands){
|
|
@@ -162,14 +185,58 @@ function showHelpWithCommands() {
|
|
|
162
185
|
console.log('\nUse "claude-flow help <command>" for detailed usage information');
|
|
163
186
|
}
|
|
164
187
|
async function main() {
|
|
165
|
-
const args = Deno.args;
|
|
166
188
|
if (args.length === 0) {
|
|
167
|
-
printHelp();
|
|
189
|
+
printHelp(usePlainHelp);
|
|
168
190
|
return;
|
|
169
191
|
}
|
|
170
192
|
const command = args[0];
|
|
171
193
|
const { flags, args: parsedArgs } = parseFlags(args.slice(1));
|
|
194
|
+
const usePlainHelp = args.includes('--plain');
|
|
195
|
+
let enhancedFlags = flags;
|
|
196
|
+
try {
|
|
197
|
+
const { detectExecutionEnvironment, applySmartDefaults } = await import('./utils/environment-detector.js');
|
|
198
|
+
enhancedFlags = applySmartDefaults(flags);
|
|
199
|
+
enhancedFlags._environment = detectExecutionEnvironment({
|
|
200
|
+
skipWarnings: true
|
|
201
|
+
});
|
|
202
|
+
} catch (e) {
|
|
203
|
+
enhancedFlags = flags;
|
|
204
|
+
}
|
|
205
|
+
if (command !== 'help' && command !== '--help' && command !== '-h' && (enhancedFlags.help || enhancedFlags.h)) {
|
|
206
|
+
const detailedHelp = getCommandHelp(command);
|
|
207
|
+
if (detailedHelp && !detailedHelp.includes('Help not available')) {
|
|
208
|
+
printCommandHelp(command);
|
|
209
|
+
} else if (hasCommand(command)) {
|
|
210
|
+
showCommandHelp(command);
|
|
211
|
+
} else {
|
|
212
|
+
printError(`Unknown command: ${command}`);
|
|
213
|
+
console.log('\nRun "claude-flow --help" to see available commands.');
|
|
214
|
+
}
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
172
217
|
switch(command){
|
|
218
|
+
case 'env-check':
|
|
219
|
+
case 'environment':
|
|
220
|
+
if (enhancedFlags._environment) {
|
|
221
|
+
const env = enhancedFlags._environment;
|
|
222
|
+
console.log(`\n🖥️ Environment Detection Results:`);
|
|
223
|
+
console.log(` Terminal: ${env.terminalType}`);
|
|
224
|
+
console.log(` Interactive: ${env.isInteractive ? 'Yes' : 'No'}`);
|
|
225
|
+
console.log(` TTY Support: ${env.supportsRawMode ? 'Yes' : 'No'}`);
|
|
226
|
+
console.log(` Detected: ${env.isVSCode ? 'VS Code' : env.isCI ? 'CI/CD' : env.isDocker ? 'Docker' : env.isSSH ? 'SSH' : 'Standard Terminal'}`);
|
|
227
|
+
if (env.recommendedFlags.length > 0) {
|
|
228
|
+
console.log(`\n💡 Recommended flags:`);
|
|
229
|
+
console.log(` ${env.recommendedFlags.join(' ')}`);
|
|
230
|
+
}
|
|
231
|
+
if (enhancedFlags.appliedDefaults && enhancedFlags.appliedDefaults.length > 0) {
|
|
232
|
+
console.log(`\n✅ Auto-applied:`);
|
|
233
|
+
console.log(` ${enhancedFlags.appliedDefaults.join(' ')}`);
|
|
234
|
+
}
|
|
235
|
+
console.log();
|
|
236
|
+
} else {
|
|
237
|
+
console.log('Environment detection not available');
|
|
238
|
+
}
|
|
239
|
+
return;
|
|
173
240
|
case 'version':
|
|
174
241
|
case '--version':
|
|
175
242
|
case '-v':
|
|
@@ -179,9 +246,14 @@ async function main() {
|
|
|
179
246
|
case '--help':
|
|
180
247
|
case '-h':
|
|
181
248
|
if (parsedArgs.length > 0) {
|
|
182
|
-
|
|
249
|
+
const detailedHelp = getCommandHelp(parsedArgs[0]);
|
|
250
|
+
if (detailedHelp && !detailedHelp.includes('Help not available')) {
|
|
251
|
+
printCommandHelp(parsedArgs[0]);
|
|
252
|
+
} else {
|
|
253
|
+
showCommandHelp(parsedArgs[0]);
|
|
254
|
+
}
|
|
183
255
|
} else {
|
|
184
|
-
|
|
256
|
+
printHelp(usePlainHelp);
|
|
185
257
|
}
|
|
186
258
|
return;
|
|
187
259
|
}
|
|
@@ -191,6 +263,7 @@ async function main() {
|
|
|
191
263
|
return;
|
|
192
264
|
} catch (err) {
|
|
193
265
|
printError(err.message);
|
|
266
|
+
console.log(`\nRun "claude-flow ${command} --help" for usage information.`);
|
|
194
267
|
return;
|
|
195
268
|
}
|
|
196
269
|
}
|
|
@@ -210,11 +283,12 @@ async function main() {
|
|
|
210
283
|
console.log('📊 Real-time monitoring would display here');
|
|
211
284
|
break;
|
|
212
285
|
case 'spawn':
|
|
213
|
-
const
|
|
286
|
+
const rawSpawnType = subArgs[0] || 'general';
|
|
287
|
+
const spawnType = resolveLegacyAgentType(rawSpawnType);
|
|
214
288
|
const spawnName = flags.name || `agent-${Date.now()}`;
|
|
215
289
|
printSuccess(`Spawning ${spawnType} agent: ${spawnName}`);
|
|
216
290
|
console.log('🤖 Agent would be created with the following configuration:');
|
|
217
|
-
console.log(` Type: ${spawnType}`);
|
|
291
|
+
console.log(` Type: ${spawnType}${rawSpawnType !== spawnType ? ` (resolved from: ${rawSpawnType})` : ''}`);
|
|
218
292
|
console.log(` Name: ${spawnName}`);
|
|
219
293
|
console.log(' Capabilities: Research, Analysis, Code Generation');
|
|
220
294
|
console.log(' Status: Ready');
|
|
@@ -239,7 +313,7 @@ async function main() {
|
|
|
239
313
|
console.log(' • Max Pool Size: 10');
|
|
240
314
|
console.log(' • Idle Timeout: 5 minutes');
|
|
241
315
|
console.log(' • Shell: /bin/bash');
|
|
242
|
-
console.log(' • Working Directory: ' +
|
|
316
|
+
console.log(' • Working Directory: ' + cwd());
|
|
243
317
|
console.log(' Performance:');
|
|
244
318
|
console.log(' • Average Response Time: N/A');
|
|
245
319
|
console.log(' • Terminal Creation Time: N/A');
|
|
@@ -288,7 +362,7 @@ async function main() {
|
|
|
288
362
|
const terminalConfig = {
|
|
289
363
|
name: nameIndex >= 0 ? subArgs[nameIndex + 1] : 'terminal-' + Date.now(),
|
|
290
364
|
shell: shellIndex >= 0 ? subArgs[shellIndex + 1] : 'bash',
|
|
291
|
-
workingDirectory: wdIndex >= 0 ? subArgs[wdIndex + 1] :
|
|
365
|
+
workingDirectory: wdIndex >= 0 ? subArgs[wdIndex + 1] : cwd(),
|
|
292
366
|
env: envIndex >= 0 ? subArgs[envIndex + 1] : '',
|
|
293
367
|
persistent: persistentIndex >= 0
|
|
294
368
|
};
|
|
@@ -1245,10 +1319,9 @@ ${flags1.mode === 'full' || !flags1.mode ? `Full-stack development covering all
|
|
|
1245
1319
|
console.log('Debug - Executing command:');
|
|
1246
1320
|
console.log(`claude ${claudeArgs.map((arg)=>arg.includes(' ') || arg.includes('\n') ? `"${arg}"` : arg).join(' ')}`);
|
|
1247
1321
|
}
|
|
1248
|
-
const
|
|
1249
|
-
args: claudeArgs,
|
|
1322
|
+
const child = spawn('claude', claudeArgs, {
|
|
1250
1323
|
env: {
|
|
1251
|
-
...
|
|
1324
|
+
...process.env,
|
|
1252
1325
|
CLAUDE_INSTANCE_ID: instanceId,
|
|
1253
1326
|
CLAUDE_FLOW_MODE: flags1.mode || 'full',
|
|
1254
1327
|
CLAUDE_FLOW_COVERAGE: (flags1.coverage || 80).toString(),
|
|
@@ -1258,17 +1331,18 @@ ${flags1.mode === 'full' || !flags1.mode ? `Full-stack development covering all
|
|
|
1258
1331
|
CLAUDE_FLOW_COORDINATION_ENABLED: flags1.parallel ? 'true' : 'false',
|
|
1259
1332
|
CLAUDE_FLOW_FEATURES: 'memory,coordination,swarm'
|
|
1260
1333
|
},
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1334
|
+
stdio: 'inherit'
|
|
1335
|
+
});
|
|
1336
|
+
await new Promise((resolve)=>{
|
|
1337
|
+
child.on('exit', (code)=>{
|
|
1338
|
+
if (code === 0) {
|
|
1339
|
+
printSuccess(`Claude instance ${instanceId} completed successfully`);
|
|
1340
|
+
} else {
|
|
1341
|
+
printError(`Claude instance ${instanceId} exited with code ${code}`);
|
|
1342
|
+
}
|
|
1343
|
+
resolve();
|
|
1344
|
+
});
|
|
1264
1345
|
});
|
|
1265
|
-
const child = command.spawn();
|
|
1266
|
-
const status = await child.status;
|
|
1267
|
-
if (status.success) {
|
|
1268
|
-
printSuccess(`Claude instance ${instanceId} completed successfully`);
|
|
1269
|
-
} else {
|
|
1270
|
-
printError(`Claude instance ${instanceId} exited with code ${status.code}`);
|
|
1271
|
-
}
|
|
1272
1346
|
} catch (err) {
|
|
1273
1347
|
printError(`Failed to spawn Claude: ${err.message}`);
|
|
1274
1348
|
console.log('Make sure you have the Claude CLI installed.');
|
|
@@ -1821,7 +1895,7 @@ ${flags1.mode === 'full' || !flags1.mode ? `Full-stack development covering all
|
|
|
1821
1895
|
console.log('\nDid you mean:');
|
|
1822
1896
|
suggestions.forEach((cmd)=>console.log(` claude-flow ${cmd}`));
|
|
1823
1897
|
}
|
|
1824
|
-
|
|
1898
|
+
exit(1);
|
|
1825
1899
|
}
|
|
1826
1900
|
}
|
|
1827
1901
|
async function startRepl() {
|
|
@@ -1899,7 +1973,7 @@ Shortcuts:
|
|
|
1899
1973
|
},
|
|
1900
1974
|
config: async (key)=>{
|
|
1901
1975
|
try {
|
|
1902
|
-
const config = JSON.parse(await
|
|
1976
|
+
const config = JSON.parse(await readTextFile('claude-flow.config.json'));
|
|
1903
1977
|
if (key) {
|
|
1904
1978
|
const keys = key.split('.');
|
|
1905
1979
|
let value = config;
|
|
@@ -1927,21 +2001,25 @@ Shortcuts:
|
|
|
1927
2001
|
if (trimmed.startsWith('!')) {
|
|
1928
2002
|
const shellCmd = trimmed.substring(1);
|
|
1929
2003
|
try {
|
|
1930
|
-
|
|
1931
|
-
|
|
2004
|
+
await new Promise((resolve)=>{
|
|
2005
|
+
const proc = spawn('sh', [
|
|
1932
2006
|
'-c',
|
|
1933
2007
|
shellCmd
|
|
1934
|
-
],
|
|
1935
|
-
|
|
1936
|
-
|
|
2008
|
+
], {
|
|
2009
|
+
stdio: [
|
|
2010
|
+
'inherit',
|
|
2011
|
+
'pipe',
|
|
2012
|
+
'pipe'
|
|
2013
|
+
]
|
|
2014
|
+
});
|
|
2015
|
+
proc.stdout.on('data', (data)=>{
|
|
2016
|
+
console.log(data.toString());
|
|
2017
|
+
});
|
|
2018
|
+
proc.stderr.on('data', (data)=>{
|
|
2019
|
+
console.error(data.toString());
|
|
2020
|
+
});
|
|
2021
|
+
proc.on('exit', resolve);
|
|
1937
2022
|
});
|
|
1938
|
-
const { stdout, stderr } = await command.output();
|
|
1939
|
-
if (stdout.length > 0) {
|
|
1940
|
-
console.log(new TextDecoder().decode(stdout));
|
|
1941
|
-
}
|
|
1942
|
-
if (stderr.length > 0) {
|
|
1943
|
-
console.error(new TextDecoder().decode(stderr));
|
|
1944
|
-
}
|
|
1945
2023
|
} catch (err) {
|
|
1946
2024
|
console.error(`Shell error: ${err.message}`);
|
|
1947
2025
|
}
|
|
@@ -1961,7 +2039,7 @@ Shortcuts:
|
|
|
1961
2039
|
const parts = trimmed.split(' ');
|
|
1962
2040
|
const command = parts[0];
|
|
1963
2041
|
const args = parts.slice(1);
|
|
1964
|
-
if (command
|
|
2042
|
+
if (replCommands[command]) {
|
|
1965
2043
|
await replCommands[command](...args);
|
|
1966
2044
|
return true;
|
|
1967
2045
|
}
|
|
@@ -1982,7 +2060,8 @@ Shortcuts:
|
|
|
1982
2060
|
const subCmd = args[0];
|
|
1983
2061
|
switch(subCmd){
|
|
1984
2062
|
case 'spawn':
|
|
1985
|
-
const
|
|
2063
|
+
const rawType = args[1] || 'researcher';
|
|
2064
|
+
const type = resolveLegacyAgentType(rawType);
|
|
1986
2065
|
const name = args[2] || `agent-${Date.now()}`;
|
|
1987
2066
|
const agent = {
|
|
1988
2067
|
id: `agent-${Date.now()}`,
|
|
@@ -2187,18 +2266,33 @@ Shortcuts:
|
|
|
2187
2266
|
console.log('Terminal commands: create, list, exec, attach, detach');
|
|
2188
2267
|
}
|
|
2189
2268
|
}
|
|
2190
|
-
const
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
const n = await Deno.stdin.read(buf);
|
|
2197
|
-
if (n === null) break;
|
|
2198
|
-
const input = decoder.decode(buf.subarray(0, n)).trim();
|
|
2199
|
-
const shouldContinue = await processReplCommand(input);
|
|
2200
|
-
if (!shouldContinue) break;
|
|
2269
|
+
const rl = readline.createInterface({
|
|
2270
|
+
input: process.stdin,
|
|
2271
|
+
output: process.stdout
|
|
2272
|
+
});
|
|
2273
|
+
function updatePrompt() {
|
|
2274
|
+
rl.setPrompt(replState.currentSession ? `claude-flow:${replState.currentSession}> ` : 'claude-flow> ');
|
|
2201
2275
|
}
|
|
2276
|
+
updatePrompt();
|
|
2277
|
+
rl.prompt();
|
|
2278
|
+
rl.on('line', async (input)=>{
|
|
2279
|
+
input = input.trim();
|
|
2280
|
+
const shouldContinue = await processReplCommand(input);
|
|
2281
|
+
if (!shouldContinue) {
|
|
2282
|
+
rl.close();
|
|
2283
|
+
} else {
|
|
2284
|
+
updatePrompt();
|
|
2285
|
+
rl.prompt();
|
|
2286
|
+
}
|
|
2287
|
+
});
|
|
2288
|
+
rl.on('SIGINT', ()=>{
|
|
2289
|
+
console.log('\nExiting Claude-Flow...');
|
|
2290
|
+
rl.close();
|
|
2291
|
+
process.exit(0);
|
|
2292
|
+
});
|
|
2293
|
+
return new Promise((resolve)=>{
|
|
2294
|
+
rl.on('close', resolve);
|
|
2295
|
+
});
|
|
2202
2296
|
}
|
|
2203
2297
|
function createMinimalClaudeMd() {
|
|
2204
2298
|
return `# Claude Code Integration
|
|
@@ -2515,30 +2609,30 @@ async function createSparcStructureManually() {
|
|
|
2515
2609
|
];
|
|
2516
2610
|
for (const dir of rooDirectories){
|
|
2517
2611
|
try {
|
|
2518
|
-
await
|
|
2612
|
+
await mkdirAsync(dir, {
|
|
2519
2613
|
recursive: true
|
|
2520
2614
|
});
|
|
2521
2615
|
console.log(` ✓ Created ${dir}/`);
|
|
2522
2616
|
} catch (err) {
|
|
2523
|
-
if (!(err instanceof
|
|
2617
|
+
if (!(err instanceof errors.AlreadyExists)) {
|
|
2524
2618
|
throw err;
|
|
2525
2619
|
}
|
|
2526
2620
|
}
|
|
2527
2621
|
}
|
|
2528
2622
|
let roomodesContent;
|
|
2529
2623
|
try {
|
|
2530
|
-
roomodesContent = await
|
|
2624
|
+
roomodesContent = await readTextFile('.roomodes');
|
|
2531
2625
|
console.log(' ✓ Using existing .roomodes configuration');
|
|
2532
2626
|
} catch {
|
|
2533
2627
|
roomodesContent = createBasicRoomodesConfig();
|
|
2534
|
-
await
|
|
2628
|
+
await writeTextFile('.roomodes', roomodesContent);
|
|
2535
2629
|
console.log(' ✓ Created .roomodes configuration');
|
|
2536
2630
|
}
|
|
2537
2631
|
const basicWorkflow = createBasicSparcWorkflow();
|
|
2538
|
-
await
|
|
2632
|
+
await writeTextFile('.roo/workflows/basic-tdd.json', basicWorkflow);
|
|
2539
2633
|
console.log(' ✓ Created .roo/workflows/basic-tdd.json');
|
|
2540
2634
|
const rooReadme = createRooReadme();
|
|
2541
|
-
await
|
|
2635
|
+
await writeTextFile('.roo/README.md', rooReadme);
|
|
2542
2636
|
console.log(' ✓ Created .roo/README.md');
|
|
2543
2637
|
console.log(' ✅ Basic SPARC structure created successfully');
|
|
2544
2638
|
} catch (err) {
|
|
@@ -2966,110 +3060,6 @@ This SPARC-enabled project follows a systematic development approach:
|
|
|
2966
3060
|
- Document architectural decisions in memory for future reference
|
|
2967
3061
|
- Regular security reviews for any authentication or data handling code
|
|
2968
3062
|
|
|
2969
|
-
For more information about SPARC methodology, see: https://github.com/ruvnet/claude-code-flow/docs/sparc.md
|
|
2970
|
-
`;
|
|
2971
|
-
}
|
|
2972
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
2973
|
-
await main();
|
|
2974
|
-
}
|
|
2975
|
-
|
|
2976
|
-
//# sourceMappingURL=simple-cli.js.map sparc run spec-pseudocode "User profile management feature"
|
|
2977
|
-
|
|
2978
|
-
# 2. Design architecture
|
|
2979
|
-
npx claude-flow sparc run architect "Profile service architecture with data validation"
|
|
2980
|
-
|
|
2981
|
-
# 3. Implement with TDD
|
|
2982
|
-
npx claude-flow sparc tdd "user profile CRUD operations"
|
|
2983
|
-
|
|
2984
|
-
# 4. Security review
|
|
2985
|
-
npx claude-flow sparc run security-review "profile data access and validation"
|
|
2986
|
-
|
|
2987
|
-
# 5. Integration testing
|
|
2988
|
-
npx claude-flow sparc run integration "profile service with authentication system"
|
|
2989
|
-
|
|
2990
|
-
# 6. Documentation
|
|
2991
|
-
npx claude-flow sparc run docs-writer "profile service API documentation"
|
|
2992
|
-
\`\`\`
|
|
2993
|
-
|
|
2994
|
-
### Bug Fix Workflow
|
|
2995
|
-
\`\`\`bash
|
|
2996
|
-
# 1. Debug and analyze
|
|
2997
|
-
npx claude-flow sparc run debug "authentication token expiration issue"
|
|
2998
|
-
|
|
2999
|
-
# 2. Write regression tests
|
|
3000
|
-
npx claude-flow sparc run tdd "token refresh mechanism tests"
|
|
3001
|
-
|
|
3002
|
-
# 3. Implement fix
|
|
3003
|
-
npx claude-flow sparc run code "fix token refresh in authentication service"
|
|
3004
|
-
|
|
3005
|
-
# 4. Security review
|
|
3006
|
-
npx claude-flow sparc run security-review "token handling security implications"
|
|
3007
|
-
\`\`\`
|
|
3008
|
-
|
|
3009
|
-
## Configuration Files
|
|
3010
|
-
|
|
3011
|
-
### SPARC Configuration
|
|
3012
|
-
- **\`.roomodes\`**: SPARC mode definitions and configurations
|
|
3013
|
-
- **\`.roo/\`**: Templates, workflows, and mode-specific rules
|
|
3014
|
-
|
|
3015
|
-
### Claude-Flow Configuration
|
|
3016
|
-
- **\`memory/\`**: Persistent memory and session data
|
|
3017
|
-
- **\`coordination/\`**: Multi-agent coordination settings
|
|
3018
|
-
|
|
3019
|
-
## Git Workflow Integration
|
|
3020
|
-
|
|
3021
|
-
### Commit Strategy with SPARC
|
|
3022
|
-
- **Specification commits**: After completing requirements analysis
|
|
3023
|
-
- **Architecture commits**: After design phase completion
|
|
3024
|
-
- **TDD commits**: After each Red-Green-Refactor cycle
|
|
3025
|
-
- **Integration commits**: After successful component integration
|
|
3026
|
-
- **Documentation commits**: After completing documentation updates
|
|
3027
|
-
|
|
3028
|
-
### Branch Strategy
|
|
3029
|
-
- **\`feature/sparc-<feature-name>\`**: Feature development with SPARC methodology
|
|
3030
|
-
- **\`hotfix/sparc-<issue>\`**: Bug fixes using SPARC debugging workflow
|
|
3031
|
-
- **\`refactor/sparc-<component>\`**: Refactoring using optimization mode
|
|
3032
|
-
|
|
3033
|
-
## Troubleshooting
|
|
3034
|
-
|
|
3035
|
-
### Common SPARC Issues
|
|
3036
|
-
- **Mode not found**: Check \`.roomodes\` file exists and is valid JSON
|
|
3037
|
-
- **Memory persistence**: Ensure \`memory/\` directory has write permissions
|
|
3038
|
-
- **Tool access**: Verify required tools are available for the selected mode
|
|
3039
|
-
- **Namespace conflicts**: Use unique memory namespaces for different features
|
|
3040
|
-
|
|
3041
|
-
### Debug Commands
|
|
3042
|
-
\`\`\`bash
|
|
3043
|
-
# Check SPARC configuration
|
|
3044
|
-
npx claude-flow sparc modes
|
|
3045
|
-
|
|
3046
|
-
# Verify memory system
|
|
3047
|
-
npx claude-flow memory stats
|
|
3048
|
-
|
|
3049
|
-
# Check system status
|
|
3050
|
-
npx claude-flow status
|
|
3051
|
-
|
|
3052
|
-
# View detailed mode information
|
|
3053
|
-
npx claude-flow sparc info <mode-name>
|
|
3054
|
-
\`\`\`
|
|
3055
|
-
|
|
3056
|
-
## Project Architecture
|
|
3057
|
-
|
|
3058
|
-
This SPARC-enabled project follows a systematic development approach:
|
|
3059
|
-
- **Clear separation of concerns** through modular design
|
|
3060
|
-
- **Test-driven development** ensuring reliability and maintainability
|
|
3061
|
-
- **Iterative refinement** for continuous improvement
|
|
3062
|
-
- **Comprehensive documentation** for team collaboration
|
|
3063
|
-
- **AI-assisted development** through specialized SPARC modes
|
|
3064
|
-
|
|
3065
|
-
## Important Notes
|
|
3066
|
-
|
|
3067
|
-
- Always run tests before committing (\`npm run test\`)
|
|
3068
|
-
- Use SPARC memory system to maintain context across sessions
|
|
3069
|
-
- Follow the Red-Green-Refactor cycle during TDD phases
|
|
3070
|
-
- Document architectural decisions in memory for future reference
|
|
3071
|
-
- Regular security reviews for any authentication or data handling code
|
|
3072
|
-
|
|
3073
3063
|
For more information about SPARC methodology, see: https://github.com/ruvnet/claude-code-flow/docs/sparc.md
|
|
3074
3064
|
`;
|
|
3075
3065
|
}
|