claude-flow-novice 1.3.2 → 1.3.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.
- package/.claude/agents/github/release-manager.md +1 -1
- package/.claude/agents/github/repo-architect.md +2 -2
- package/.claude/agents/optimization/README.md +12 -12
- package/.claude/agents/optimization/benchmark-suite.md +8 -8
- package/.claude/agents/optimization/load-balancer.md +7 -7
- package/.claude/agents/optimization/performance-monitor.md +8 -8
- package/.claude/agents/optimization/resource-allocator.md +9 -9
- package/.claude/agents/optimization/topology-optimizer.md +8 -8
- package/.claude/agents/swarm/README.md +8 -8
- package/.claude/agents/testing/e2e/playwright-agent.md +1 -1
- package/.claude/commands/agents/agent-capabilities.md +2 -2
- package/.claude/commands/agents/agent-coordination.md +3 -3
- package/.claude/commands/agents/agent-types.md +1 -1
- package/.claude/commands/analysis/bottleneck-detect.md +5 -5
- package/.claude/commands/analysis/performance-report.md +4 -4
- package/.claude/commands/analysis/token-usage.md +4 -4
- package/.claude/commands/automation/auto-agent.md +5 -5
- package/.claude/commands/automation/self-healing.md +1 -1
- package/.claude/commands/automation/session-memory.md +1 -1
- package/.claude/commands/automation/smart-agents.md +1 -1
- package/.claude/commands/automation/smart-spawn.md +4 -4
- package/.claude/commands/automation/workflow-select.md +4 -4
- package/.claude/commands/claude-soul.js +22 -556
- package/.claude/commands/coordination/agent-spawn.md +4 -4
- package/.claude/commands/coordination/coordination-system.md +88 -0
- package/.claude/commands/coordination/swarm-init.md +5 -5
- package/.claude/commands/coordination/task-orchestrate.md +4 -4
- package/.claude/commands/github/code-review.md +4 -4
- package/.claude/commands/github/github-swarm.md +5 -5
- package/.claude/commands/github/issue-triage.md +4 -4
- package/.claude/commands/github/pr-enhance.md +4 -4
- package/.claude/commands/github/release-manager.md +1 -1
- package/.claude/commands/github/repo-analyze.md +4 -4
- package/.claude/commands/github/repo-architect.md +2 -2
- package/.claude/commands/hive-mind/hive-mind-consensus.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-init.md +3 -3
- package/.claude/commands/hive-mind/hive-mind-memory.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-metrics.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-resume.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-sessions.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-spawn.md +4 -4
- package/.claude/commands/hive-mind/hive-mind-status.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-stop.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-wizard.md +1 -1
- package/.claude/commands/hive-mind/hive-mind.md +4 -4
- package/.claude/commands/hooks/overview.md +1 -1
- package/.claude/commands/hooks/post-edit.md +6 -6
- package/.claude/commands/hooks/post-task.md +6 -6
- package/.claude/commands/hooks/pre-edit.md +6 -6
- package/.claude/commands/hooks/pre-task.md +6 -6
- package/.claude/commands/hooks/session-end.md +6 -6
- package/.claude/commands/hooks/setup.md +6 -6
- package/.claude/commands/hooks.md +1 -1
- package/.claude/commands/memory/memory-bank.md +58 -0
- package/.claude/commands/memory/memory-persist.md +4 -4
- package/.claude/commands/memory/memory-search.md +4 -4
- package/.claude/commands/memory/memory-usage.md +4 -4
- package/.claude/commands/monitoring/agent-metrics.md +4 -4
- package/.claude/commands/monitoring/real-time-view.md +4 -4
- package/.claude/commands/monitoring/swarm-monitor.md +4 -4
- package/.claude/commands/optimization/auto-topology.md +2 -2
- package/.claude/commands/optimization/cache-manage.md +4 -4
- package/.claude/commands/optimization/parallel-execute.md +4 -4
- package/.claude/commands/optimization/parallel-execution.md +1 -1
- package/.claude/commands/optimization/topology-optimize.md +4 -4
- package/.claude/commands/pair/README.md +20 -20
- package/.claude/commands/pair/config.md +16 -16
- package/.claude/commands/pair/examples.md +11 -11
- package/.claude/commands/pair/modes.md +17 -17
- package/.claude/commands/pair/session.md +27 -27
- package/.claude/commands/pair/start.md +12 -12
- package/.claude/commands/sparc/analyzer.md +3 -3
- package/.claude/commands/sparc/architect.md +3 -3
- package/.claude/commands/sparc/batch-executor.md +3 -3
- package/.claude/commands/sparc/coder.md +3 -3
- package/.claude/commands/sparc/debugger.md +3 -3
- package/.claude/commands/sparc/designer.md +3 -3
- package/.claude/commands/sparc/documenter.md +3 -3
- package/.claude/commands/sparc/innovator.md +3 -3
- package/.claude/commands/sparc/memory-manager.md +3 -3
- package/.claude/commands/sparc/optimizer.md +3 -3
- package/.claude/commands/sparc/orchestrator.md +10 -10
- package/.claude/commands/sparc/researcher.md +3 -3
- package/.claude/commands/sparc/reviewer.md +3 -3
- package/.claude/commands/sparc/sparc-modes.md +13 -13
- package/.claude/commands/sparc/swarm-coordinator.md +3 -3
- package/.claude/commands/sparc/tdd.md +3 -3
- package/.claude/commands/sparc/tester.md +3 -3
- package/.claude/commands/sparc/workflow-manager.md +3 -3
- package/.claude/commands/stream-chain/pipeline.md +10 -10
- package/.claude/commands/stream-chain/run.md +4 -4
- package/.claude/commands/swarm/analysis.md +1 -1
- package/.claude/commands/swarm/development.md +1 -1
- package/.claude/commands/swarm/examples.md +3 -3
- package/.claude/commands/swarm/maintenance.md +1 -1
- package/.claude/commands/swarm/optimization.md +1 -1
- package/.claude/commands/swarm/research.md +1 -1
- package/.claude/commands/swarm/swarm-analysis.md +1 -1
- package/.claude/commands/swarm/swarm-background.md +1 -1
- package/.claude/commands/swarm/swarm-init.md +3 -3
- package/.claude/commands/swarm/swarm-modes.md +1 -1
- package/.claude/commands/swarm/swarm-monitor.md +1 -1
- package/.claude/commands/swarm/swarm-spawn.md +3 -3
- package/.claude/commands/swarm/swarm-status.md +1 -1
- package/.claude/commands/swarm/swarm-strategies.md +1 -1
- package/.claude/commands/swarm/swarm.md +4 -4
- package/.claude/commands/swarm/testing.md +1 -1
- package/.claude/commands/testing/playwright-e2e.md +36 -36
- package/.claude/commands/training/model-update.md +4 -4
- package/.claude/commands/training/neural-patterns.md +3 -3
- package/.claude/commands/training/neural-train.md +4 -4
- package/.claude/commands/training/pattern-learn.md +4 -4
- package/.claude/commands/training/specialization.md +2 -2
- package/.claude/commands/truth/start.md +10 -10
- package/.claude/commands/verify/check.md +5 -5
- package/.claude/commands/verify/start.md +22 -22
- package/.claude/commands/workflows/development.md +3 -3
- package/.claude/commands/workflows/research.md +2 -2
- package/.claude/commands/workflows/workflow-create.md +4 -4
- package/.claude/commands/workflows/workflow-execute.md +4 -4
- package/.claude/commands/workflows/workflow-export.md +4 -4
- package/examples/01-configurations/README.md +5 -5
- package/examples/02-workflows/README.md +8 -8
- package/examples/04-testing/incremental-updates-guide.md +3 -3
- package/examples/06-tutorials/getting-started/01-first-swarm.md +4 -4
- package/examples/06-tutorials/sparc/sparc-tdd-guide.md +13 -13
- package/examples/06-tutorials/sparc-batchtool-orchestration.md +54 -54
- package/examples/06-tutorials/workflows/multi-agent-coordination.md +9 -9
- package/examples/README-batch-init.md +50 -50
- package/examples/README.md +2 -2
- package/examples/automation-examples.md +13 -13
- package/examples/rest-api-simple/README-ARCHITECTURE.md +7 -7
- package/examples/rest-api-simple/implementation-plan.md +7 -7
- package/examples/rest-api-simple/next-steps.md +5 -5
- package/examples/rest-api-simple/sparc-implementation-roadmap.md +12 -12
- package/package.json +1 -1
- package/src/cli/simple-commands/agent.js +9 -9
- package/src/cli/simple-commands/analysis.js +17 -17
- package/src/cli/simple-commands/automation-executor.js +1 -1
- package/src/cli/simple-commands/automation.js +14 -14
- package/src/cli/simple-commands/batch-manager.js +10 -10
- package/src/cli/simple-commands/config.js +14 -14
- package/src/cli/simple-commands/coordination.js +8 -8
- package/src/cli/simple-commands/fix-hook-variables.js +4 -4
- package/src/cli/simple-commands/github/init.js +2 -2
- package/src/cli/simple-commands/github.js +7 -7
- package/src/cli/simple-commands/goal.js +1 -1
- package/src/cli/simple-commands/hive-mind-optimize.js +10 -10
- package/src/cli/simple-commands/hive-mind-wizard.js +5 -5
- package/src/cli/simple-commands/hive-mind.js +34 -34
- package/src/cli/simple-commands/hive.js +4 -4
- package/src/cli/simple-commands/hook-safety.js +7 -7
- package/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +74 -74
- package/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +143 -143
- package/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +13 -13
- package/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +41 -41
- package/src/cli/simple-commands/init/claude-commands/slash-commands.js +1 -1
- package/src/cli/simple-commands/init/claude-commands/sparc-commands.js +24 -24
- package/src/cli/simple-commands/init/executable-wrapper.js +11 -11
- package/src/cli/simple-commands/init/help.js +19 -19
- package/src/cli/simple-commands/init/index.js +13 -13
- package/src/cli/simple-commands/init/rollback/recovery-manager.js +1 -1
- package/src/cli/simple-commands/init/rollback/rollback-executor.js +2 -2
- package/src/cli/simple-commands/init/sparc/roo-readme.js +5 -5
- package/src/cli/simple-commands/init/templates/claude-md.js +41 -41
- package/src/cli/simple-commands/init/templates/coordination-md.js +55 -55
- package/src/cli/simple-commands/init/templates/enhanced-templates.js +175 -175
- package/src/cli/simple-commands/init/templates/memory-bank-md.js +22 -22
- package/src/cli/simple-commands/init/templates/safe-hook-patterns.js +4 -4
- package/src/cli/simple-commands/init/templates/settings.json +1 -1
- package/src/cli/simple-commands/init/templates/sparc-modes.js +75 -75
- package/src/cli/simple-commands/init/templates/verification-claude-md.js +39 -39
- package/src/cli/simple-commands/init/validation/config-validator.js +3 -3
- package/src/cli/simple-commands/init/validation/health-checker.js +1 -1
- package/src/cli/simple-commands/init/validation/mode-validator.js +2 -2
- package/src/cli/simple-commands/mcp.js +9 -9
- package/src/cli/simple-commands/migrate-hooks.js +2 -2
- package/src/cli/simple-commands/monitor.js +4 -4
- package/src/cli/simple-commands/neural.js +1 -1
- package/src/cli/simple-commands/pair-autofix-only.js +4 -4
- package/src/cli/simple-commands/pair-basic.js +7 -7
- package/src/cli/simple-commands/pair-old.js +9 -9
- package/src/cli/simple-commands/pair-working.js +4 -4
- package/src/cli/simple-commands/pair.js +4 -4
- package/src/cli/simple-commands/sparc/commands.js +5 -5
- package/src/cli/simple-commands/sparc-modes/architect.js +23 -23
- package/src/cli/simple-commands/sparc-modes/ask.js +21 -21
- package/src/cli/simple-commands/sparc-modes/code.js +23 -23
- package/src/cli/simple-commands/sparc-modes/debug.js +10 -10
- package/src/cli/simple-commands/sparc-modes/devops.js +11 -11
- package/src/cli/simple-commands/sparc-modes/docs-writer.js +3 -3
- package/src/cli/simple-commands/sparc-modes/generic.js +4 -4
- package/src/cli/simple-commands/sparc-modes/index.js +22 -22
- package/src/cli/simple-commands/sparc-modes/integration.js +3 -3
- package/src/cli/simple-commands/sparc-modes/mcp.js +3 -3
- package/src/cli/simple-commands/sparc-modes/monitoring.js +3 -3
- package/src/cli/simple-commands/sparc-modes/optimization.js +3 -3
- package/src/cli/simple-commands/sparc-modes/security-review.js +11 -11
- package/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +37 -37
- package/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +3 -3
- package/src/cli/simple-commands/sparc-modes/supabase-admin.js +11 -11
- package/src/cli/simple-commands/sparc-modes/swarm.js +34 -34
- package/src/cli/simple-commands/sparc-modes/tdd.js +11 -11
- package/src/cli/simple-commands/sparc-modes/tutorial.js +30 -30
- package/src/cli/simple-commands/sparc.js +14 -14
- package/src/cli/simple-commands/start-ui.js +4 -4
- package/src/cli/simple-commands/start-wrapper.js +17 -17
- package/src/cli/simple-commands/status.js +3 -3
- package/src/cli/simple-commands/stream-chain.js +12 -12
- package/src/cli/simple-commands/swarm-metrics-integration.js +2 -2
- package/src/cli/simple-commands/swarm-ui.js +2 -2
- package/src/cli/simple-commands/swarm.js +19 -19
- package/src/cli/simple-commands/task.js +7 -7
- package/src/cli/simple-commands/training.js +5 -5
- package/src/cli/simple-commands/verification-training-integration.js +1 -1
- package/src/slash-commands/claude-soul.js +248 -365
- package/src/slash-commands/register-all-commands.js +1 -1
- package/wiki/README.md +2 -2
- package/wiki/accessibility/README.md +4 -4
- package/wiki/accessibility/assistive-tech/screen-reader-support.md +6 -6
- package/wiki/accessibility/automation/agent-testing-automation.md +13 -13
- package/wiki/accessibility/guidelines/wcag-compliance.md +6 -6
- package/wiki/accessibility/i18n/internationalization-strategies.md +6 -6
- package/wiki/accessibility/motor-accessibility/keyboard-navigation.md +7 -7
- package/wiki/accessibility/patterns/inclusive-design-patterns.md +4 -4
- package/wiki/accessibility/testing/automated-testing.md +9 -9
- package/wiki/accessibility/visual-design/color-contrast.md +7 -7
- package/wiki/accessibility/workflows/accessibility-first-development.md +22 -22
- package/wiki/accessibility/workflows/inclusive-design-review.md +9 -9
- package/wiki/api-reference/cli-api.md +15 -15
- package/wiki/api-reference/plugin-development.md +3 -3
- package/wiki/command-reference/README.md +34 -34
- package/wiki/command-reference/agent-commands.md +46 -46
- package/wiki/command-reference/cli-commands.md +21 -21
- package/wiki/command-reference/command-syntax.md +89 -89
- package/wiki/command-reference/expert-tier.md +184 -184
- package/wiki/command-reference/intermediate-tier.md +63 -63
- package/wiki/command-reference/mcp-integration.md +29 -29
- package/wiki/command-reference/mcp-tools/README.md +4 -4
- package/wiki/command-reference/mcp-tools/dual-access-workflows.md +1 -1
- package/wiki/command-reference/mcp-tools/index.md +2 -2
- package/wiki/command-reference/mcp-tools/quick-reference.md +4 -4
- package/wiki/command-reference/mcp-tools/session-management.md +2 -2
- package/wiki/command-reference/mcp-tools/task-tool-integration.md +3 -3
- package/wiki/command-reference/novice/README.md +1 -1
- package/wiki/command-reference/novice-tier.md +152 -152
- package/wiki/command-reference/progression-guide.md +107 -107
- package/wiki/command-reference/troubleshooting.md +113 -113
- package/wiki/command-reference/workflows.md +187 -187
- package/wiki/community/README.md +1 -1
- package/wiki/community/learning-resources.md +1 -1
- package/wiki/core-concepts/agents/agent-creation-guide.md +9 -9
- package/wiki/core-concepts/integration.md +7 -7
- package/wiki/core-concepts/sparc-workflow.md +5 -5
- package/wiki/examples/automation/cicd-pipeline/README.md +3 -3
- package/wiki/examples/basic/hello-world/README.md +7 -7
- package/wiki/examples/integration-patterns.md +15 -15
- package/wiki/examples/performance-benchmarks.md +11 -11
- package/wiki/examples/projects/rest-api/README.md +1 -1
- package/wiki/examples/scenarios/ecommerce/README.md +1 -1
- package/wiki/examples/swarm-patterns.md +63 -63
- package/wiki/examples/templates/download-system.md +1 -1
- package/wiki/examples/templates/javascript/README.md +2 -2
- package/wiki/examples/troubleshooting/README.md +2 -2
- package/wiki/examples/utilities/patterns/README.md +8 -8
- package/wiki/examples/videos/01-setup.md +16 -16
- package/wiki/examples/workflow-automation/README.md +5 -5
- package/wiki/getting-started/claude-code-mcp/README.md +2 -2
- package/wiki/getting-started/installation/README.md +7 -7
- package/wiki/getting-started/learning-path.md +2 -2
- package/wiki/getting-started/quick-start/README.md +2 -2
- package/wiki/getting-started/quick-start/cli-tutorial.md +1 -1
- package/wiki/governance/multi-project-coordination.md +1 -1
- package/wiki/languages/go/README.md +10 -10
- package/wiki/languages/go/examples/README.md +29 -29
- package/wiki/languages/go/frameworks/README.md +18 -18
- package/wiki/languages/go/integration/README.md +34 -34
- package/wiki/languages/go/microservices/README.md +17 -17
- package/wiki/languages/go/performance/README.md +13 -13
- package/wiki/languages/go/setup/README.md +20 -20
- package/wiki/languages/go/systems/README.md +10 -10
- package/wiki/languages/go/testing/README.md +14 -14
- package/wiki/languages/java/README.md +25 -25
- package/wiki/languages/java/claude-flow-integration.md +49 -49
- package/wiki/languages/java/enterprise-java.md +15 -15
- package/wiki/languages/java/examples.md +30 -30
- package/wiki/languages/java/microservices.md +22 -22
- package/wiki/languages/java/performance.md +13 -13
- package/wiki/languages/java/project-setup.md +10 -10
- package/wiki/languages/java/spring-boot.md +12 -12
- package/wiki/languages/java/testing.md +12 -12
- package/wiki/languages/javascript/api/README.md +20 -20
- package/wiki/languages/javascript/backend/README.md +19 -19
- package/wiki/languages/javascript/frontend/README.md +18 -18
- package/wiki/languages/javascript/integration.md +11 -11
- package/wiki/languages/javascript/setup/README.md +28 -28
- package/wiki/languages/javascript/testing/README.md +14 -14
- package/wiki/languages/python/README.md +3 -3
- package/wiki/languages/python/data-science/README.md +11 -11
- package/wiki/languages/python/examples/README.md +5 -5
- package/wiki/languages/python/integration.md +5 -5
- package/wiki/languages/python/mcp-integration.md +1 -1
- package/wiki/languages/python/setup/README.md +5 -5
- package/wiki/languages/python/testing/README.md +3 -3
- package/wiki/languages/python/web-development/README.md +1 -1
- package/wiki/languages/rust/README.md +1 -1
- package/wiki/languages/rust/examples/cli-mcp-workflows.md +33 -33
- package/wiki/languages/rust/examples/rest-api.md +5 -5
- package/wiki/languages/rust/setup/cargo-integration.md +14 -14
- package/wiki/languages/rust/testing/quality-validation.md +9 -9
- package/wiki/languages/rust/web-development/axum.md +6 -6
- package/wiki/languages/rust/workflows/systems-programming.md +5 -5
- package/wiki/languages/typescript/setup.md +2 -2
- package/wiki/troubleshooting/README.md +3 -3
- package/wiki/troubleshooting/common-issues/README.md +6 -6
- package/wiki/troubleshooting/common-issues.md +26 -26
- package/wiki/troubleshooting/error-resolution.md +5 -5
- package/wiki/troubleshooting/performance-optimization.md +11 -11
- package/wiki/tutorials/advanced/06-legacy-system-integration.md +1 -1
- package/wiki/tutorials/advanced/08-enterprise-scenarios.md +3 -3
- package/wiki/tutorials/advanced/performance-optimization.md +43 -43
- package/wiki/tutorials/advanced/swarm-orchestration.md +40 -40
- package/wiki/tutorials/intermediate/optimization.md +35 -35
- package/wiki/tutorials/skill-assessment.md +3 -3
- package/wiki/tutorials/skill-competency-matrix.md +1 -1
- package/wiki/tutorials/troubleshooting/setup-issues.md +3 -3
- package/wiki/video-tutorials/README.md +3 -3
- package/wiki/video-tutorials/accessibility/README.md +4 -4
- package/wiki/video-tutorials/community/README.md +1 -1
- package/wiki/video-tutorials/content-organization/README.md +5 -5
- package/wiki/video-tutorials/interactive/README.md +5 -5
- package/wiki/video-tutorials/planning/README.md +4 -4
- package/wiki/video-tutorials/technical-specs/README.md +2 -2
|
@@ -1,562 +1,28 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* CLAUDE-SOUL.md Slash Command
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Interactive questionnaire to create a project soul document.
|
|
7
|
+
* Guides users through defining their project's who, what, when, where, why
|
|
8
|
+
* to provide context for AI agents when they hit roadblocks.
|
|
9
|
+
* Document size: 250-500 words focusing on project essence and decision context.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = options;
|
|
28
|
-
|
|
29
|
-
try {
|
|
30
|
-
console.log('🚀 Generating claude-soul.md...');
|
|
31
|
-
|
|
32
|
-
// Step 1: Generate soul content
|
|
33
|
-
const soulContent = await this.generateSoulContent();
|
|
34
|
-
|
|
35
|
-
// Step 2: Handle preview mode
|
|
36
|
-
if (preview) {
|
|
37
|
-
return {
|
|
38
|
-
success: true,
|
|
39
|
-
action: 'preview',
|
|
40
|
-
content: soulContent,
|
|
41
|
-
message: 'Preview generated successfully'
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Step 3: Check for existing file
|
|
46
|
-
const existingSoulExists = await this.fileExists(this.claudeSoulPath);
|
|
47
|
-
|
|
48
|
-
// Step 4: Handle force/confirmation for existing files
|
|
49
|
-
if (existingSoulExists && !force) {
|
|
50
|
-
const shouldOverwrite = await this.confirmOverwrite();
|
|
51
|
-
if (!shouldOverwrite) {
|
|
52
|
-
return {
|
|
53
|
-
success: false,
|
|
54
|
-
action: 'cancelled',
|
|
55
|
-
message: 'Generation cancelled by user'
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Step 5: Create backup if requested
|
|
61
|
-
if (backup && existingSoulExists) {
|
|
62
|
-
await this.createBackup();
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Step 6: Write the file
|
|
66
|
-
await fs.writeFile(this.claudeSoulPath, soulContent, 'utf8');
|
|
67
|
-
|
|
68
|
-
console.log('✅ claude-soul.md generated successfully');
|
|
69
|
-
return {
|
|
70
|
-
success: true,
|
|
71
|
-
action: 'generated',
|
|
72
|
-
file: 'claude-soul.md',
|
|
73
|
-
length: soulContent.length,
|
|
74
|
-
lineCount: soulContent.split('\n').length
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
} catch (error) {
|
|
78
|
-
console.error('❌ claude-soul.md generation failed:', error.message);
|
|
79
|
-
return {
|
|
80
|
-
success: false,
|
|
81
|
-
action: 'error',
|
|
82
|
-
error: error.message
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Generate the soul content by analyzing the project
|
|
89
|
-
*/
|
|
90
|
-
async generateSoulContent() {
|
|
91
|
-
const projectAnalysis = await this.analyzeProject();
|
|
92
|
-
|
|
93
|
-
return `# ${projectAnalysis.name} - Project Soul
|
|
94
|
-
|
|
95
|
-
> **AI Context**: This document contains the project's essence, purpose, and philosophy. Use this context to understand project goals, make consistent decisions about code and architecture, and maintain alignment with project values throughout development.
|
|
96
|
-
|
|
97
|
-
## WHY - The Purpose
|
|
98
|
-
|
|
99
|
-
### Core Mission
|
|
100
|
-
${projectAnalysis.mission}
|
|
101
|
-
|
|
102
|
-
### Problem We Solve
|
|
103
|
-
${projectAnalysis.problem}
|
|
104
|
-
|
|
105
|
-
### Vision
|
|
106
|
-
${projectAnalysis.vision}
|
|
107
|
-
|
|
108
|
-
## WHAT - The Essence
|
|
109
|
-
|
|
110
|
-
### Project Identity
|
|
111
|
-
- **Type**: ${projectAnalysis.type}
|
|
112
|
-
- **Domain**: ${projectAnalysis.domain}
|
|
113
|
-
- **Scope**: ${projectAnalysis.scope}
|
|
114
|
-
|
|
115
|
-
### Core Capabilities
|
|
116
|
-
${projectAnalysis.capabilities.map(cap => `- ${cap}`).join('\n')}
|
|
117
|
-
|
|
118
|
-
### Key Features
|
|
119
|
-
${projectAnalysis.features.map(feature => `- ${feature}`).join('\n')}
|
|
120
|
-
|
|
121
|
-
### Architecture Philosophy
|
|
122
|
-
${projectAnalysis.architecture}
|
|
123
|
-
|
|
124
|
-
## HOW - The Approach
|
|
125
|
-
|
|
126
|
-
### Development Methodology
|
|
127
|
-
${projectAnalysis.methodology}
|
|
128
|
-
|
|
129
|
-
### Technology Stack
|
|
130
|
-
${projectAnalysis.techStack.map(tech => `- ${tech}`).join('\n')}
|
|
131
|
-
|
|
132
|
-
### Code Principles
|
|
133
|
-
${projectAnalysis.principles.map(principle => `- ${principle}`).join('\n')}
|
|
134
|
-
|
|
135
|
-
### Quality Standards
|
|
136
|
-
${projectAnalysis.quality}
|
|
137
|
-
|
|
138
|
-
## SOUL - The Spirit
|
|
139
|
-
|
|
140
|
-
### Values
|
|
141
|
-
${projectAnalysis.values.map(value => `- ${value}`).join('\n')}
|
|
142
|
-
|
|
143
|
-
### Community
|
|
144
|
-
${projectAnalysis.community}
|
|
145
|
-
|
|
146
|
-
### Future Vision
|
|
147
|
-
${projectAnalysis.future}
|
|
148
|
-
|
|
149
|
-
### Legacy Goals
|
|
150
|
-
${projectAnalysis.legacy}
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
> **For AI Assistants**: Reference this document when writing code, suggesting architecture changes, or making technical decisions. Ensure all recommendations align with the project's mission, values, and technical approach outlined above.
|
|
155
|
-
|
|
156
|
-
*Generated: ${new Date().toISOString().split('T')[0]} | Limit: 500 lines | Last updated: ${new Date().toLocaleDateString()}*
|
|
157
|
-
`;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Analyze the project to extract its soul
|
|
162
|
-
*/
|
|
163
|
-
async analyzeProject() {
|
|
164
|
-
const packageInfo = await this.getPackageInfo();
|
|
165
|
-
const repoInfo = await this.getRepositoryInfo();
|
|
166
|
-
const codebaseInfo = await this.getCodebaseInfo();
|
|
167
|
-
|
|
168
|
-
// Generate project analysis
|
|
169
|
-
return {
|
|
170
|
-
name: packageInfo.name || path.basename(this.projectPath),
|
|
171
|
-
mission: this.inferMission(packageInfo, repoInfo),
|
|
172
|
-
problem: this.inferProblem(packageInfo, codebaseInfo),
|
|
173
|
-
vision: this.inferVision(packageInfo, repoInfo),
|
|
174
|
-
type: this.inferProjectType(packageInfo, codebaseInfo),
|
|
175
|
-
domain: this.inferDomain(packageInfo, codebaseInfo),
|
|
176
|
-
scope: this.inferScope(packageInfo, codebaseInfo),
|
|
177
|
-
capabilities: this.inferCapabilities(packageInfo, codebaseInfo),
|
|
178
|
-
features: this.inferFeatures(packageInfo, codebaseInfo),
|
|
179
|
-
architecture: this.inferArchitecture(codebaseInfo),
|
|
180
|
-
methodology: this.inferMethodology(codebaseInfo),
|
|
181
|
-
techStack: this.inferTechStack(packageInfo, codebaseInfo),
|
|
182
|
-
principles: this.inferPrinciples(codebaseInfo),
|
|
183
|
-
quality: this.inferQuality(packageInfo, codebaseInfo),
|
|
184
|
-
values: this.inferValues(packageInfo, repoInfo),
|
|
185
|
-
community: this.inferCommunity(packageInfo, repoInfo),
|
|
186
|
-
future: this.inferFuture(packageInfo, repoInfo),
|
|
187
|
-
legacy: this.inferLegacy(packageInfo, repoInfo)
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Get package.json information
|
|
193
|
-
*/
|
|
194
|
-
async getPackageInfo() {
|
|
195
|
-
try {
|
|
196
|
-
const packagePath = path.join(this.projectPath, 'package.json');
|
|
197
|
-
const packageContent = await fs.readFile(packagePath, 'utf8');
|
|
198
|
-
return JSON.parse(packageContent);
|
|
199
|
-
} catch {
|
|
200
|
-
return {};
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Get repository information
|
|
206
|
-
*/
|
|
207
|
-
async getRepositoryInfo() {
|
|
208
|
-
const info = { hasGit: false, files: [] };
|
|
209
|
-
|
|
210
|
-
try {
|
|
211
|
-
await fs.access(path.join(this.projectPath, '.git'));
|
|
212
|
-
info.hasGit = true;
|
|
213
|
-
} catch {}
|
|
214
|
-
|
|
215
|
-
try {
|
|
216
|
-
const files = await fs.readdir(this.projectPath);
|
|
217
|
-
info.files = files;
|
|
218
|
-
} catch {}
|
|
219
|
-
|
|
220
|
-
return info;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Get codebase structure information
|
|
225
|
-
*/
|
|
226
|
-
async getCodebaseInfo() {
|
|
227
|
-
const info = {
|
|
228
|
-
directories: [],
|
|
229
|
-
languages: new Set(),
|
|
230
|
-
configFiles: [],
|
|
231
|
-
testFiles: [],
|
|
232
|
-
hasTests: false,
|
|
233
|
-
hasDocumentation: false
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
try {
|
|
237
|
-
const entries = await fs.readdir(this.projectPath, { withFileTypes: true });
|
|
238
|
-
|
|
239
|
-
for (const entry of entries) {
|
|
240
|
-
if (entry.isDirectory()) {
|
|
241
|
-
info.directories.push(entry.name);
|
|
242
|
-
} else {
|
|
243
|
-
const ext = path.extname(entry.name).toLowerCase();
|
|
244
|
-
const name = entry.name.toLowerCase();
|
|
245
|
-
|
|
246
|
-
// Track languages
|
|
247
|
-
const languageMap = {
|
|
248
|
-
'.js': 'JavaScript',
|
|
249
|
-
'.ts': 'TypeScript',
|
|
250
|
-
'.py': 'Python',
|
|
251
|
-
'.go': 'Go',
|
|
252
|
-
'.rs': 'Rust',
|
|
253
|
-
'.java': 'Java',
|
|
254
|
-
'.cpp': 'C++',
|
|
255
|
-
'.c': 'C'
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
if (languageMap[ext]) {
|
|
259
|
-
info.languages.add(languageMap[ext]);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// Track config files
|
|
263
|
-
if (name.includes('config') || name.includes('.json') ||
|
|
264
|
-
name.includes('.yml') || name.includes('.yaml')) {
|
|
265
|
-
info.configFiles.push(entry.name);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
// Track test files
|
|
269
|
-
if (name.includes('test') || name.includes('spec')) {
|
|
270
|
-
info.testFiles.push(entry.name);
|
|
271
|
-
info.hasTests = true;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// Track documentation
|
|
275
|
-
if (ext === '.md' || name.includes('readme') || name.includes('doc')) {
|
|
276
|
-
info.hasDocumentation = true;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
} catch {}
|
|
281
|
-
|
|
282
|
-
return info;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// Inference methods
|
|
286
|
-
inferMission(pkg, repo) {
|
|
287
|
-
if (pkg.description) {
|
|
288
|
-
return pkg.description;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
const name = pkg.name || path.basename(this.projectPath);
|
|
292
|
-
|
|
293
|
-
if (name.includes('flow') || name.includes('orchestrat')) {
|
|
294
|
-
return "Orchestrate and coordinate complex workflows with intelligent automation";
|
|
295
|
-
}
|
|
296
|
-
if (name.includes('api') || name.includes('server')) {
|
|
297
|
-
return "Provide robust API services and server-side functionality";
|
|
298
|
-
}
|
|
299
|
-
if (name.includes('cli') || name.includes('tool')) {
|
|
300
|
-
return "Deliver powerful command-line tools for developer productivity";
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
return "Solve complex problems through innovative software solutions";
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
inferProblem(pkg, codebase) {
|
|
307
|
-
if (pkg.name?.includes('flow')) {
|
|
308
|
-
return "Complex multi-agent coordination and workflow orchestration requires simplified interfaces while maintaining advanced capabilities";
|
|
309
|
-
}
|
|
310
|
-
if (codebase.languages.has('TypeScript') && codebase.hasTests) {
|
|
311
|
-
return "Enterprise-grade development workflows need reliable, type-safe, and well-tested solutions";
|
|
312
|
-
}
|
|
313
|
-
return "Modern software development requires efficient, maintainable, and scalable solutions";
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
inferVision(pkg, repo) {
|
|
317
|
-
if (pkg.name?.includes('novice')) {
|
|
318
|
-
return "Democratize advanced technology by making it accessible to users of all skill levels";
|
|
319
|
-
}
|
|
320
|
-
return "Create software that empowers users and teams to achieve more with less complexity";
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
inferProjectType(pkg, codebase) {
|
|
324
|
-
if (pkg.bin) return "CLI Tool";
|
|
325
|
-
if (codebase.directories.includes('src') && codebase.directories.includes('tests')) return "Library/Framework";
|
|
326
|
-
if (pkg.dependencies?.express || pkg.dependencies?.fastify) return "Web Service";
|
|
327
|
-
if (codebase.languages.has('TypeScript')) return "TypeScript Application";
|
|
328
|
-
return "Software Project";
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
inferDomain(pkg, codebase) {
|
|
332
|
-
const name = (pkg.name || '').toLowerCase();
|
|
333
|
-
if (name.includes('flow') || name.includes('orchestrat')) return "Workflow Orchestration";
|
|
334
|
-
if (name.includes('ai') || name.includes('ml')) return "Artificial Intelligence";
|
|
335
|
-
if (name.includes('api') || name.includes('web')) return "Web Development";
|
|
336
|
-
if (name.includes('cli') || name.includes('tool')) return "Developer Tools";
|
|
337
|
-
return "Software Development";
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
inferScope(pkg, codebase) {
|
|
341
|
-
const dirCount = codebase.directories.length;
|
|
342
|
-
const langCount = codebase.languages.size;
|
|
343
|
-
|
|
344
|
-
if (dirCount > 10 && langCount > 2) return "Enterprise-scale multi-language platform";
|
|
345
|
-
if (dirCount > 5) return "Medium-scale application with modular architecture";
|
|
346
|
-
return "Focused tool with clear boundaries";
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
inferCapabilities(pkg, codebase) {
|
|
350
|
-
const caps = [];
|
|
351
|
-
|
|
352
|
-
if (pkg.bin) caps.push("Command-line interface execution");
|
|
353
|
-
if (codebase.hasTests) caps.push("Automated testing and validation");
|
|
354
|
-
if (codebase.languages.has('TypeScript')) caps.push("Type-safe development");
|
|
355
|
-
if (pkg.dependencies?.sqlite3) caps.push("Persistent data storage");
|
|
356
|
-
if (pkg.scripts?.build) caps.push("Build and compilation");
|
|
357
|
-
if (pkg.name?.includes('flow')) caps.push("Workflow orchestration and automation");
|
|
358
|
-
|
|
359
|
-
return caps.length > 0 ? caps : ["Core functionality delivery", "Modular architecture"];
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
inferFeatures(pkg, codebase) {
|
|
363
|
-
const features = new Set();
|
|
364
|
-
|
|
365
|
-
if (pkg.scripts) {
|
|
366
|
-
Object.keys(pkg.scripts).forEach(script => {
|
|
367
|
-
if (script.includes('test') && !features.has("testing")) {
|
|
368
|
-
features.add("Comprehensive testing suite");
|
|
369
|
-
features.add("testing");
|
|
370
|
-
}
|
|
371
|
-
if (script.includes('build') && !features.has("build")) {
|
|
372
|
-
features.add("Automated build system");
|
|
373
|
-
features.add("build");
|
|
374
|
-
}
|
|
375
|
-
if (script.includes('dev') && !features.has("dev")) {
|
|
376
|
-
features.add("Development workflow tools");
|
|
377
|
-
features.add("dev");
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
if (codebase.configFiles.length > 0) features.add("Flexible configuration system");
|
|
383
|
-
if (codebase.hasDocumentation) features.add("Comprehensive documentation");
|
|
384
|
-
|
|
385
|
-
// Filter out the marker keys and return as array
|
|
386
|
-
const filteredFeatures = Array.from(features).filter(f =>
|
|
387
|
-
f !== "testing" && f !== "build" && f !== "dev"
|
|
388
|
-
);
|
|
389
|
-
|
|
390
|
-
return filteredFeatures.length > 0 ? filteredFeatures : ["Modular design", "Clean architecture"];
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
inferArchitecture(codebase) {
|
|
394
|
-
if (codebase.directories.includes('src') && codebase.directories.includes('dist')) {
|
|
395
|
-
return "Source-to-distribution compilation with clear separation of concerns";
|
|
396
|
-
}
|
|
397
|
-
if (codebase.directories.includes('lib') || codebase.directories.includes('src')) {
|
|
398
|
-
return "Modular architecture with logical component separation";
|
|
399
|
-
}
|
|
400
|
-
return "Clean, maintainable structure following best practices";
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
inferMethodology(codebase) {
|
|
404
|
-
if (codebase.hasTests && codebase.directories.includes('src')) {
|
|
405
|
-
return "Test-driven development with continuous integration";
|
|
406
|
-
}
|
|
407
|
-
if (codebase.hasTests) {
|
|
408
|
-
return "Quality-first development with automated validation";
|
|
409
|
-
}
|
|
410
|
-
return "Iterative development with focus on maintainability";
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
inferTechStack(pkg, codebase) {
|
|
414
|
-
const stack = [];
|
|
415
|
-
|
|
416
|
-
Array.from(codebase.languages).forEach(lang => stack.push(lang));
|
|
417
|
-
|
|
418
|
-
if (pkg.dependencies?.sqlite3) stack.push("SQLite Database");
|
|
419
|
-
if (pkg.dependencies?.express) stack.push("Express.js");
|
|
420
|
-
if (pkg.dependencies?.react) stack.push("React");
|
|
421
|
-
if (pkg.devDependencies?.jest) stack.push("Jest Testing");
|
|
422
|
-
if (pkg.devDependencies?.typescript) stack.push("TypeScript Compiler");
|
|
423
|
-
|
|
424
|
-
return stack.length > 0 ? stack : ["Modern JavaScript/TypeScript ecosystem"];
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
inferPrinciples(codebase) {
|
|
428
|
-
const principles = ["Clean, readable code"];
|
|
429
|
-
|
|
430
|
-
if (codebase.hasTests) principles.push("Test-driven development");
|
|
431
|
-
if (codebase.languages.has('TypeScript')) principles.push("Type safety and static analysis");
|
|
432
|
-
if (codebase.directories.includes('src')) principles.push("Separation of concerns");
|
|
433
|
-
|
|
434
|
-
principles.push("Progressive enhancement");
|
|
435
|
-
principles.push("Documentation-first approach");
|
|
436
|
-
|
|
437
|
-
return principles;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
inferQuality(pkg, codebase) {
|
|
441
|
-
let quality = "High standards with ";
|
|
442
|
-
|
|
443
|
-
if (codebase.hasTests) quality += "comprehensive testing, ";
|
|
444
|
-
if (codebase.languages.has('TypeScript')) quality += "type safety, ";
|
|
445
|
-
if (pkg.scripts?.lint) quality += "linting, ";
|
|
446
|
-
|
|
447
|
-
quality += "and continuous improvement";
|
|
448
|
-
|
|
449
|
-
return quality;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
inferValues(pkg, repo) {
|
|
453
|
-
const values = ["Simplicity without sacrificing power"];
|
|
454
|
-
|
|
455
|
-
if (pkg.name?.includes('novice')) values.push("Accessibility for all skill levels");
|
|
456
|
-
if (pkg.license === 'MIT') values.push("Open source collaboration");
|
|
457
|
-
|
|
458
|
-
values.push("Quality over quantity");
|
|
459
|
-
values.push("User-centric design");
|
|
460
|
-
|
|
461
|
-
return values;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
inferCommunity(pkg, repo) {
|
|
465
|
-
if (pkg.repository?.url) {
|
|
466
|
-
return `Open source project welcoming contributions. Repository: ${pkg.repository.url}`;
|
|
467
|
-
}
|
|
468
|
-
return "Collaborative development with focus on shared learning and improvement";
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
inferFuture(pkg, repo) {
|
|
472
|
-
if (pkg.name?.includes('flow')) {
|
|
473
|
-
return "Evolve into the premier platform for accessible AI workflow orchestration";
|
|
474
|
-
}
|
|
475
|
-
return "Continuous evolution to meet emerging developer needs and technological advances";
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
inferLegacy(pkg, repo) {
|
|
479
|
-
return "Create lasting impact by making complex technology accessible and empowering developers to build amazing things";
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* Create backup of existing file
|
|
484
|
-
*/
|
|
485
|
-
async createBackup() {
|
|
486
|
-
try {
|
|
487
|
-
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
|
|
488
|
-
const backupPath = path.join(this.projectPath, `claude-soul.md.backup.${timestamp}`);
|
|
489
|
-
|
|
490
|
-
const existingContent = await fs.readFile(this.claudeSoulPath, 'utf8');
|
|
491
|
-
await fs.writeFile(backupPath, existingContent, 'utf8');
|
|
492
|
-
|
|
493
|
-
console.log(`📄 Backup created: ${path.basename(backupPath)}`);
|
|
494
|
-
} catch (error) {
|
|
495
|
-
console.warn(`⚠️ Could not create backup: ${error.message}`);
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/**
|
|
500
|
-
* Simple confirmation prompt for overwriting existing files
|
|
501
|
-
*/
|
|
502
|
-
async confirmOverwrite() {
|
|
503
|
-
console.log('⚠️ claude-soul.md exists. Use --force to overwrite or --preview to see changes.');
|
|
504
|
-
return false;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
/**
|
|
508
|
-
* Check if file exists
|
|
509
|
-
*/
|
|
510
|
-
async fileExists(filePath) {
|
|
511
|
-
try {
|
|
512
|
-
await fs.access(filePath);
|
|
513
|
-
return true;
|
|
514
|
-
} catch {
|
|
515
|
-
return false;
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* Show preview of what would be generated
|
|
521
|
-
*/
|
|
522
|
-
async showPreview() {
|
|
523
|
-
const result = await this.execute({ preview: true });
|
|
524
|
-
|
|
525
|
-
if (result.success) {
|
|
526
|
-
console.log('📄 claude-soul.md Preview:');
|
|
527
|
-
console.log('━'.repeat(50));
|
|
528
|
-
console.log(result.content.substring(0, 1500) + '...');
|
|
529
|
-
console.log('━'.repeat(50));
|
|
530
|
-
console.log(`📊 Total length: ${result.content.length} characters`);
|
|
531
|
-
console.log(`📏 Lines: ${result.content.split('\n').length}`);
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
return result;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* CLI Interface for slash command
|
|
540
|
-
*/
|
|
541
|
-
export async function executeClaudeSoulCommand(args = {}) {
|
|
542
|
-
const command = new ClaudeSoulSlashCommand();
|
|
543
|
-
|
|
544
|
-
// Handle different command modes
|
|
545
|
-
if (args.preview) {
|
|
546
|
-
return await command.showPreview();
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
// Default: generate claude-soul.md
|
|
550
|
-
return await command.execute(args);
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
// For direct execution
|
|
554
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
555
|
-
const args = {
|
|
556
|
-
preview: process.argv.includes('--preview'),
|
|
557
|
-
force: process.argv.includes('--force'),
|
|
558
|
-
backup: !process.argv.includes('--no-backup')
|
|
559
|
-
};
|
|
560
|
-
|
|
561
|
-
executeClaudeSoulCommand(args);
|
|
562
|
-
}
|
|
12
|
+
// Import from the main implementation
|
|
13
|
+
import { executeClaudeSoulCommand } from '../../src/slash-commands/claude-soul.js';
|
|
14
|
+
|
|
15
|
+
// Parse arguments
|
|
16
|
+
const args = {
|
|
17
|
+
preview: process.argv.includes('--preview'),
|
|
18
|
+
force: process.argv.includes('--force'),
|
|
19
|
+
backup: !process.argv.includes('--no-backup'),
|
|
20
|
+
interactive: !process.argv.includes('--no-interactive'),
|
|
21
|
+
help: process.argv.includes('--help') || process.argv.includes('-h')
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// Execute the command
|
|
25
|
+
executeClaudeSoulCommand(args).catch(error => {
|
|
26
|
+
console.error('Error:', error.message);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
});
|
|
@@ -4,7 +4,7 @@ Spawn a new agent in the current swarm.
|
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
```bash
|
|
7
|
-
npx claude-flow agent spawn [options]
|
|
7
|
+
npx claude-flow-novice agent spawn [options]
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
## Options
|
|
@@ -15,11 +15,11 @@ npx claude-flow agent spawn [options]
|
|
|
15
15
|
## Examples
|
|
16
16
|
```bash
|
|
17
17
|
# Spawn coder agent
|
|
18
|
-
npx claude-flow agent spawn --type coder
|
|
18
|
+
npx claude-flow-novice agent spawn --type coder
|
|
19
19
|
|
|
20
20
|
# With custom name
|
|
21
|
-
npx claude-flow agent spawn --type researcher --name "API Expert"
|
|
21
|
+
npx claude-flow-novice agent spawn --type researcher --name "API Expert"
|
|
22
22
|
|
|
23
23
|
# With specific skills
|
|
24
|
-
npx claude-flow agent spawn --type coder --skills "python,fastapi,testing"
|
|
24
|
+
npx claude-flow-novice agent spawn --type coder --skills "python,fastapi,testing"
|
|
25
25
|
```
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Agent Coordination System
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
The Claude-Flow coordination system manages multiple AI agents working together on complex tasks. It provides intelligent task distribution, resource management, and inter-agent communication.
|
|
5
|
+
|
|
6
|
+
## Agent Types and Capabilities
|
|
7
|
+
- **Researcher**: Web search, information gathering, knowledge synthesis
|
|
8
|
+
- **Coder**: Code analysis, development, debugging, testing
|
|
9
|
+
- **Analyst**: Data processing, pattern recognition, insights generation
|
|
10
|
+
- **Coordinator**: Task planning, resource allocation, workflow management
|
|
11
|
+
- **General**: Multi-purpose agent with balanced capabilities
|
|
12
|
+
|
|
13
|
+
## Task Management
|
|
14
|
+
- **Priority Levels**: 1 (lowest) to 10 (highest)
|
|
15
|
+
- **Dependencies**: Tasks can depend on completion of other tasks
|
|
16
|
+
- **Parallel Execution**: Independent tasks run concurrently
|
|
17
|
+
- **Load Balancing**: Automatic distribution based on agent capacity
|
|
18
|
+
|
|
19
|
+
## Coordination Commands
|
|
20
|
+
```bash
|
|
21
|
+
# Agent Management
|
|
22
|
+
npx claude-flow-novice agent spawn <type> --name <name> --priority <1-10>
|
|
23
|
+
npx claude-flow-novice agent list
|
|
24
|
+
npx claude-flow-novice agent info <agent-id>
|
|
25
|
+
npx claude-flow-novice agent terminate <agent-id>
|
|
26
|
+
|
|
27
|
+
# Task Management
|
|
28
|
+
npx claude-flow-novice task create <type> <description> --priority <1-10> --deps <task-ids>
|
|
29
|
+
npx claude-flow-novice task list --verbose
|
|
30
|
+
npx claude-flow-novice task status <task-id>
|
|
31
|
+
npx claude-flow-novice task cancel <task-id>
|
|
32
|
+
|
|
33
|
+
# System Monitoring
|
|
34
|
+
npx claude-flow-novice status --verbose
|
|
35
|
+
npx claude-flow-novice monitor --interval 5000
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Workflow Execution
|
|
39
|
+
Workflows are defined in JSON format and can orchestrate complex multi-agent operations:
|
|
40
|
+
```bash
|
|
41
|
+
npx claude-flow-novice workflow examples/research-workflow.json
|
|
42
|
+
npx claude-flow-novice workflow examples/development-config.json --async
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Advanced Features
|
|
46
|
+
- **Circuit Breakers**: Automatic failure handling and recovery
|
|
47
|
+
- **Work Stealing**: Dynamic load redistribution for efficiency
|
|
48
|
+
- **Resource Limits**: Memory and CPU usage constraints
|
|
49
|
+
- **Metrics Collection**: Performance monitoring and optimization
|
|
50
|
+
|
|
51
|
+
## Configuration
|
|
52
|
+
Coordination settings in `claude-flow.config.json`:
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"orchestrator": {
|
|
56
|
+
"maxConcurrentTasks": 10,
|
|
57
|
+
"taskTimeout": 300000,
|
|
58
|
+
"defaultPriority": 5
|
|
59
|
+
},
|
|
60
|
+
"agents": {
|
|
61
|
+
"maxAgents": 20,
|
|
62
|
+
"defaultCapabilities": ["research", "code", "terminal"],
|
|
63
|
+
"resourceLimits": {
|
|
64
|
+
"memory": "1GB",
|
|
65
|
+
"cpu": "50%"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Communication Patterns
|
|
72
|
+
- **Direct Messaging**: Agent-to-agent communication
|
|
73
|
+
- **Event Broadcasting**: System-wide notifications
|
|
74
|
+
- **Shared Memory**: Common information access
|
|
75
|
+
- **Task Handoff**: Seamless work transfer between agents
|
|
76
|
+
|
|
77
|
+
## Best Practices
|
|
78
|
+
- Start with general agents and specialize as needed
|
|
79
|
+
- Use descriptive task names and clear requirements
|
|
80
|
+
- Monitor system resources during heavy workloads
|
|
81
|
+
- Implement proper error handling in workflows
|
|
82
|
+
- Regular cleanup of completed tasks and inactive agents
|
|
83
|
+
|
|
84
|
+
## Troubleshooting
|
|
85
|
+
- Check agent health with `npx claude-flow-novice status`
|
|
86
|
+
- View detailed logs with `npx claude-flow-novice monitor`
|
|
87
|
+
- Restart stuck agents with terminate/spawn cycle
|
|
88
|
+
- Use `--verbose` flags for detailed diagnostic information
|