claude-flow-novice 2.10.9 → 2.11.0

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 (177) hide show
  1. package/.claude/commands/README.md +157 -0
  2. package/.claude/hooks/cfn-invoke-post-edit.sh +1 -1
  3. package/.claude/skills/cfn-backlog-management/SKILL.md +199 -0
  4. package/.claude/skills/cfn-backlog-management/add-backlog-item.sh +210 -0
  5. package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +7 -21
  6. package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +312 -0
  7. package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +480 -115
  8. package/claude-assets/hooks/cfn-invoke-post-edit.sh +1 -1
  9. package/claude-assets/skills/cfn-backlog-management/SKILL.md +199 -0
  10. package/claude-assets/skills/cfn-backlog-management/add-backlog-item.sh +210 -0
  11. package/dist/cli/config-manager.js +109 -91
  12. package/dist/cli/config-manager.js.map +1 -1
  13. package/package.json +3 -2
  14. package/scripts/init-project.js +38 -3
  15. package/claude-assets/commands/agents/README.md +0 -10
  16. package/claude-assets/commands/agents/agent-capabilities.md +0 -21
  17. package/claude-assets/commands/agents/agent-coordination.md +0 -28
  18. package/claude-assets/commands/agents/agent-spawning.md +0 -28
  19. package/claude-assets/commands/agents/agent-types.md +0 -26
  20. package/claude-assets/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
  21. package/claude-assets/commands/analysis/README.md +0 -9
  22. package/claude-assets/commands/analysis/bottleneck-detect.md +0 -162
  23. package/claude-assets/commands/analysis/performance-bottlenecks.md +0 -59
  24. package/claude-assets/commands/analysis/performance-report.md +0 -25
  25. package/claude-assets/commands/analysis/token-efficiency.md +0 -45
  26. package/claude-assets/commands/analysis/token-usage.md +0 -25
  27. package/claude-assets/commands/automation/README.md +0 -9
  28. package/claude-assets/commands/automation/auto-agent.md +0 -122
  29. package/claude-assets/commands/automation/self-healing.md +0 -106
  30. package/claude-assets/commands/automation/session-memory.md +0 -90
  31. package/claude-assets/commands/automation/smart-agents.md +0 -73
  32. package/claude-assets/commands/automation/smart-spawn.md +0 -25
  33. package/claude-assets/commands/automation/workflow-select.md +0 -25
  34. package/claude-assets/commands/claude-md.js +0 -237
  35. package/claude-assets/commands/claude-soul.js +0 -28
  36. package/claude-assets/commands/cli-integration.js +0 -216
  37. package/claude-assets/commands/coordination/README.md +0 -9
  38. package/claude-assets/commands/coordination/agent-spawn.md +0 -25
  39. package/claude-assets/commands/coordination/coordination-system.md +0 -88
  40. package/claude-assets/commands/coordination/init.md +0 -44
  41. package/claude-assets/commands/coordination/orchestrate.md +0 -43
  42. package/claude-assets/commands/coordination/spawn.md +0 -45
  43. package/claude-assets/commands/coordination/swarm-init.md +0 -85
  44. package/claude-assets/commands/coordination/task-orchestrate.md +0 -25
  45. package/claude-assets/commands/github/README.md +0 -11
  46. package/claude-assets/commands/github/code-review-swarm.md +0 -514
  47. package/claude-assets/commands/github/code-review.md +0 -25
  48. package/claude-assets/commands/github/github-modes.md +0 -147
  49. package/claude-assets/commands/github/github-swarm.md +0 -121
  50. package/claude-assets/commands/github/issue-tracker.md +0 -292
  51. package/claude-assets/commands/github/issue-triage.md +0 -25
  52. package/claude-assets/commands/github/multi-repo-swarm.md +0 -519
  53. package/claude-assets/commands/github/pr-enhance.md +0 -26
  54. package/claude-assets/commands/github/pr-manager.md +0 -170
  55. package/claude-assets/commands/github/project-board-sync.md +0 -471
  56. package/claude-assets/commands/github/release-manager.md +0 -338
  57. package/claude-assets/commands/github/release-swarm.md +0 -544
  58. package/claude-assets/commands/github/repo-analyze.md +0 -25
  59. package/claude-assets/commands/github/repo-architect.md +0 -367
  60. package/claude-assets/commands/github/swarm-issue.md +0 -482
  61. package/claude-assets/commands/github/swarm-pr.md +0 -285
  62. package/claude-assets/commands/github/sync-coordinator.md +0 -301
  63. package/claude-assets/commands/github/workflow-automation.md +0 -442
  64. package/claude-assets/commands/github.js +0 -638
  65. package/claude-assets/commands/hive-mind/README.md +0 -17
  66. package/claude-assets/commands/hive-mind/hive-mind-consensus.md +0 -8
  67. package/claude-assets/commands/hive-mind/hive-mind-init.md +0 -18
  68. package/claude-assets/commands/hive-mind/hive-mind-memory.md +0 -8
  69. package/claude-assets/commands/hive-mind/hive-mind-metrics.md +0 -8
  70. package/claude-assets/commands/hive-mind/hive-mind-resume.md +0 -8
  71. package/claude-assets/commands/hive-mind/hive-mind-sessions.md +0 -8
  72. package/claude-assets/commands/hive-mind/hive-mind-spawn.md +0 -21
  73. package/claude-assets/commands/hive-mind/hive-mind-status.md +0 -8
  74. package/claude-assets/commands/hive-mind/hive-mind-stop.md +0 -8
  75. package/claude-assets/commands/hive-mind/hive-mind-wizard.md +0 -8
  76. package/claude-assets/commands/hive-mind/hive-mind.md +0 -27
  77. package/claude-assets/commands/hooks/README.md +0 -11
  78. package/claude-assets/commands/hooks/overview.md +0 -58
  79. package/claude-assets/commands/hooks/post-edit.md +0 -117
  80. package/claude-assets/commands/hooks/post-task.md +0 -112
  81. package/claude-assets/commands/hooks/pre-edit.md +0 -113
  82. package/claude-assets/commands/hooks/pre-task.md +0 -111
  83. package/claude-assets/commands/hooks/session-end.md +0 -118
  84. package/claude-assets/commands/hooks/session-start.md +0 -9
  85. package/claude-assets/commands/hooks/setup.md +0 -103
  86. package/claude-assets/commands/hooks.js +0 -651
  87. package/claude-assets/commands/index.js +0 -119
  88. package/claude-assets/commands/memory/README.md +0 -9
  89. package/claude-assets/commands/memory/memory-bank.md +0 -58
  90. package/claude-assets/commands/memory/memory-persist.md +0 -25
  91. package/claude-assets/commands/memory/memory-search.md +0 -25
  92. package/claude-assets/commands/memory/memory-usage.md +0 -25
  93. package/claude-assets/commands/memory/neural.md +0 -47
  94. package/claude-assets/commands/memory/usage.md +0 -46
  95. package/claude-assets/commands/monitoring/README.md +0 -9
  96. package/claude-assets/commands/monitoring/agent-metrics.md +0 -25
  97. package/claude-assets/commands/monitoring/agents.md +0 -44
  98. package/claude-assets/commands/monitoring/real-time-view.md +0 -25
  99. package/claude-assets/commands/monitoring/status.md +0 -46
  100. package/claude-assets/commands/monitoring/swarm-monitor.md +0 -25
  101. package/claude-assets/commands/neural.js +0 -572
  102. package/claude-assets/commands/optimization/README.md +0 -9
  103. package/claude-assets/commands/optimization/auto-topology.md +0 -62
  104. package/claude-assets/commands/optimization/cache-manage.md +0 -25
  105. package/claude-assets/commands/optimization/parallel-execute.md +0 -25
  106. package/claude-assets/commands/optimization/parallel-execution.md +0 -50
  107. package/claude-assets/commands/optimization/topology-optimize.md +0 -25
  108. package/claude-assets/commands/pair/README.md +0 -261
  109. package/claude-assets/commands/pair/commands.md +0 -546
  110. package/claude-assets/commands/pair/config.md +0 -510
  111. package/claude-assets/commands/pair/examples.md +0 -512
  112. package/claude-assets/commands/pair/modes.md +0 -348
  113. package/claude-assets/commands/pair/session.md +0 -407
  114. package/claude-assets/commands/pair/start.md +0 -209
  115. package/claude-assets/commands/parse-epic.js +0 -180
  116. package/claude-assets/commands/performance.js +0 -582
  117. package/claude-assets/commands/register-all-commands.js +0 -320
  118. package/claude-assets/commands/register-claude-md.js +0 -82
  119. package/claude-assets/commands/register-claude-soul.js +0 -80
  120. package/claude-assets/commands/sparc/analyzer.md +0 -52
  121. package/claude-assets/commands/sparc/architect.md +0 -53
  122. package/claude-assets/commands/sparc/batch-executor.md +0 -54
  123. package/claude-assets/commands/sparc/coder.md +0 -54
  124. package/claude-assets/commands/sparc/debugger.md +0 -54
  125. package/claude-assets/commands/sparc/designer.md +0 -53
  126. package/claude-assets/commands/sparc/documenter.md +0 -54
  127. package/claude-assets/commands/sparc/innovator.md +0 -54
  128. package/claude-assets/commands/sparc/memory-manager.md +0 -54
  129. package/claude-assets/commands/sparc/optimizer.md +0 -54
  130. package/claude-assets/commands/sparc/orchestrator.md +0 -132
  131. package/claude-assets/commands/sparc/researcher.md +0 -54
  132. package/claude-assets/commands/sparc/reviewer.md +0 -54
  133. package/claude-assets/commands/sparc/sparc-modes.md +0 -174
  134. package/claude-assets/commands/sparc/swarm-coordinator.md +0 -54
  135. package/claude-assets/commands/sparc/tdd.md +0 -54
  136. package/claude-assets/commands/sparc/tester.md +0 -54
  137. package/claude-assets/commands/sparc/workflow-manager.md +0 -54
  138. package/claude-assets/commands/sparc.js +0 -110
  139. package/claude-assets/commands/stream-chain/pipeline.md +0 -121
  140. package/claude-assets/commands/stream-chain/run.md +0 -70
  141. package/claude-assets/commands/swarm/README.md +0 -15
  142. package/claude-assets/commands/swarm/analysis.md +0 -95
  143. package/claude-assets/commands/swarm/development.md +0 -96
  144. package/claude-assets/commands/swarm/examples.md +0 -168
  145. package/claude-assets/commands/swarm/maintenance.md +0 -102
  146. package/claude-assets/commands/swarm/optimization.md +0 -117
  147. package/claude-assets/commands/swarm/research.md +0 -136
  148. package/claude-assets/commands/swarm/swarm-analysis.md +0 -8
  149. package/claude-assets/commands/swarm/swarm-background.md +0 -8
  150. package/claude-assets/commands/swarm/swarm-init.md +0 -19
  151. package/claude-assets/commands/swarm/swarm-modes.md +0 -8
  152. package/claude-assets/commands/swarm/swarm-monitor.md +0 -8
  153. package/claude-assets/commands/swarm/swarm-spawn.md +0 -19
  154. package/claude-assets/commands/swarm/swarm-status.md +0 -8
  155. package/claude-assets/commands/swarm/swarm-strategies.md +0 -8
  156. package/claude-assets/commands/swarm/swarm.md +0 -27
  157. package/claude-assets/commands/swarm/testing.md +0 -131
  158. package/claude-assets/commands/swarm.js +0 -423
  159. package/claude-assets/commands/testing/playwright-e2e.md +0 -288
  160. package/claude-assets/commands/training/README.md +0 -9
  161. package/claude-assets/commands/training/model-update.md +0 -25
  162. package/claude-assets/commands/training/neural-patterns.md +0 -74
  163. package/claude-assets/commands/training/neural-train.md +0 -25
  164. package/claude-assets/commands/training/pattern-learn.md +0 -25
  165. package/claude-assets/commands/training/specialization.md +0 -63
  166. package/claude-assets/commands/truth/start.md +0 -143
  167. package/claude-assets/commands/validate-commands.js +0 -223
  168. package/claude-assets/commands/verify/check.md +0 -50
  169. package/claude-assets/commands/verify/start.md +0 -128
  170. package/claude-assets/commands/workflow.js +0 -606
  171. package/claude-assets/commands/workflows/README.md +0 -9
  172. package/claude-assets/commands/workflows/development.md +0 -78
  173. package/claude-assets/commands/workflows/research.md +0 -63
  174. package/claude-assets/commands/workflows/workflow-create.md +0 -25
  175. package/claude-assets/commands/workflows/workflow-execute.md +0 -25
  176. package/claude-assets/commands/workflows/workflow-export.md +0 -25
  177. package/claude-assets/hooks/post-edit.config.json +0 -23
@@ -1,25 +0,0 @@
1
- # token-usage
2
-
3
- Analyze token usage patterns and optimize for efficiency.
4
-
5
- ## Usage
6
- ```bash
7
- npx claude-flow-novice analysis token-usage [options]
8
- ```
9
-
10
- ## Options
11
- - `--period <time>` - Analysis period (1h, 24h, 7d, 30d)
12
- - `--by-agent` - Break down by agent
13
- - `--by-operation` - Break down by operation type
14
-
15
- ## Examples
16
- ```bash
17
- # Last 24 hours token usage
18
- npx claude-flow-novice analysis token-usage --period 24h
19
-
20
- # By agent breakdown
21
- npx claude-flow-novice analysis token-usage --by-agent
22
-
23
- # Export detailed report
24
- npx claude-flow-novice analysis token-usage --period 7d --export tokens.csv
25
- ```
@@ -1,9 +0,0 @@
1
- # Automation Commands
2
-
3
- Commands for automation operations in Claude Flow.
4
-
5
- ## Available Commands
6
-
7
- - [auto-agent](./auto-agent.md)
8
- - [smart-spawn](./smart-spawn.md)
9
- - [workflow-select](./workflow-select.md)
@@ -1,122 +0,0 @@
1
- # auto agent
2
-
3
- Automatically spawn and manage agents based on task requirements.
4
-
5
- ## Usage
6
-
7
- ```bash
8
- npx claude-flow-novice auto agent [options]
9
- ```
10
-
11
- ## Options
12
-
13
- - `--task, -t <description>` - Task description for agent analysis
14
- - `--max-agents, -m <number>` - Maximum agents to spawn (default: auto)
15
- - `--min-agents <number>` - Minimum agents required (default: 1)
16
- - `--strategy, -s <type>` - Selection strategy: optimal, minimal, balanced
17
- - `--no-spawn` - Analyze only, don't spawn agents
18
-
19
- ## Examples
20
-
21
- ### Basic auto-spawning
22
-
23
- ```bash
24
- npx claude-flow-novice auto agent --task "Build a REST API with authentication"
25
- ```
26
-
27
- ### Constrained spawning
28
-
29
- ```bash
30
- npx claude-flow-novice auto agent -t "Debug performance issue" --max-agents 3
31
- ```
32
-
33
- ### Analysis only
34
-
35
- ```bash
36
- npx claude-flow-novice auto agent -t "Refactor codebase" --no-spawn
37
- ```
38
-
39
- ### Minimal strategy
40
-
41
- ```bash
42
- npx claude-flow-novice auto agent -t "Fix bug in login" -s minimal
43
- ```
44
-
45
- ## How It Works
46
-
47
- 1. **Task Analysis**
48
-
49
- - Parses task description
50
- - Identifies required skills
51
- - Estimates complexity
52
- - Determines parallelization opportunities
53
-
54
- 2. **Agent Selection**
55
-
56
- - Matches skills to agent types
57
- - Considers task dependencies
58
- - Optimizes for efficiency
59
- - Respects constraints
60
-
61
- 3. **Topology Selection**
62
-
63
- - Chooses optimal swarm structure
64
- - Configures communication patterns
65
- - Sets up coordination rules
66
- - Enables monitoring
67
-
68
- 4. **Automatic Spawning**
69
- - Creates selected agents
70
- - Assigns specific roles
71
- - Distributes subtasks
72
- - Initiates coordination
73
-
74
- ## Agent Types Selected
75
-
76
- - **Architect**: System design, architecture decisions
77
- - **Coder**: Implementation, code generation
78
- - **Tester**: Test creation, quality assurance
79
- - **Analyst**: Performance, optimization
80
- - **Researcher**: Documentation, best practices
81
- - **Coordinator**: Task management, progress tracking
82
-
83
- ## Strategies
84
-
85
- ### Optimal
86
-
87
- - Maximum efficiency
88
- - May spawn more agents
89
- - Best for complex tasks
90
- - Highest resource usage
91
-
92
- ### Minimal
93
-
94
- - Minimum viable agents
95
- - Conservative approach
96
- - Good for simple tasks
97
- - Lowest resource usage
98
-
99
- ### Balanced
100
-
101
- - Middle ground
102
- - Adaptive to complexity
103
- - Default strategy
104
- - Good performance/resource ratio
105
-
106
- ## Integration with Claude Code
107
-
108
- ```javascript
109
- // In Claude Code after auto-spawning
110
- mcp__claude-flow__auto_agent {
111
- task: "Build authentication system",
112
- strategy: "balanced",
113
- maxAgents: 6
114
- }
115
- ```
116
-
117
- ## See Also
118
-
119
- - `agent spawn` - Manual agent creation
120
- - `swarm init` - Initialize swarm manually
121
- - `smart spawn` - Intelligent agent spawning
122
- - `workflow select` - Choose predefined workflows
@@ -1,106 +0,0 @@
1
- # Self-Healing Workflows
2
-
3
- ## Purpose
4
- Automatically detect and recover from errors without interrupting your flow.
5
-
6
- ## Self-Healing Features
7
-
8
- ### 1. Error Detection
9
- Monitors for:
10
- - Failed commands
11
- - Syntax errors
12
- - Missing dependencies
13
- - Broken tests
14
-
15
- ### 2. Automatic Recovery
16
-
17
- **Missing Dependencies:**
18
- ```
19
- Error: Cannot find module 'express'
20
- → Automatically runs: npm install express
21
- → Retries original command
22
- ```
23
-
24
- **Syntax Errors:**
25
- ```
26
- Error: Unexpected token
27
- → Analyzes error location
28
- → Suggests fix through analyzer agent
29
- → Applies fix with confirmation
30
- ```
31
-
32
- **Test Failures:**
33
- ```
34
- Test failed: "user authentication"
35
- → Spawns debugger agent
36
- → Analyzes failure cause
37
- → Implements fix
38
- → Re-runs tests
39
- ```
40
-
41
- ### 3. Learning from Failures
42
- Each recovery improves future prevention:
43
- - Patterns saved to knowledge base
44
- - Similar errors prevented proactively
45
- - Recovery strategies optimized
46
-
47
- **Pattern Storage:**
48
- ```javascript
49
- // Store error patterns
50
- mcp__claude-flow__memory_usage({
51
- "action": "store",
52
- "key": "error-pattern-" + Date.now(),
53
- "value": JSON.stringify(errorData),
54
- "namespace": "error-patterns",
55
- "ttl": 2592000 // 30 days
56
- })
57
-
58
- // Analyze patterns
59
- mcp__claude-flow__neural_patterns({
60
- "action": "analyze",
61
- "operation": "error-recovery",
62
- "outcome": "success"
63
- })
64
- ```
65
-
66
- ## Self-Healing Integration
67
-
68
- ### MCP Tool Coordination
69
- ```javascript
70
- // Initialize self-healing swarm
71
- mcp__claude-flow__swarm_init({
72
- "topology": "star",
73
- "maxAgents": 4,
74
- "strategy": "adaptive"
75
- })
76
-
77
- // Spawn recovery agents
78
- mcp__claude-flow__agent_spawn({
79
- "type": "monitor",
80
- "name": "Error Monitor",
81
- "capabilities": ["error-detection", "recovery"]
82
- })
83
-
84
- // Orchestrate recovery
85
- mcp__claude-flow__task_orchestrate({
86
- "task": "recover from error",
87
- "strategy": "sequential",
88
- "priority": "critical"
89
- })
90
- ```
91
-
92
- ### Fallback Hook Configuration
93
- ```json
94
- {
95
- "PostToolUse": [{
96
- "matcher": "^Bash$",
97
- "command": "npx claude-flow-novice hook post-bash --exit-code '${tool.result.exitCode}' --auto-recover"
98
- }]
99
- }
100
- ```
101
-
102
- ## Benefits
103
- - 🛡️ Resilient workflows
104
- - 🔄 Automatic recovery
105
- - 📚 Learns from errors
106
- - ⏱️ Saves debugging time
@@ -1,90 +0,0 @@
1
- # Cross-Session Memory
2
-
3
- ## Purpose
4
- Maintain context and learnings across Claude Code sessions for continuous improvement.
5
-
6
- ## Memory Features
7
-
8
- ### 1. Automatic State Persistence
9
- At session end, automatically saves:
10
- - Active agents and specializations
11
- - Task history and patterns
12
- - Performance metrics
13
- - Neural network weights
14
- - Knowledge base updates
15
-
16
- ### 2. Session Restoration
17
- ```javascript
18
- // Using MCP tools for memory operations
19
- mcp__claude-flow__memory_usage({
20
- "action": "retrieve",
21
- "key": "session-state",
22
- "namespace": "sessions"
23
- })
24
-
25
- // Restore swarm state
26
- mcp__claude-flow__context_restore({
27
- "snapshotId": "sess-123"
28
- })
29
- ```
30
-
31
- **Fallback with npx:**
32
- ```bash
33
- npx claude-flow-novice hook session-restore --session-id "sess-123"
34
- ```
35
-
36
- ### 3. Memory Types
37
-
38
- **Project Memory:**
39
- - File relationships
40
- - Common edit patterns
41
- - Testing approaches
42
- - Build configurations
43
-
44
- **Agent Memory:**
45
- - Specialization levels
46
- - Task success rates
47
- - Optimization strategies
48
- - Error patterns
49
-
50
- **Performance Memory:**
51
- - Bottleneck history
52
- - Optimization results
53
- - Token usage patterns
54
- - Efficiency trends
55
-
56
- ### 4. Privacy & Control
57
- ```javascript
58
- // List memory contents
59
- mcp__claude-flow__memory_usage({
60
- "action": "list",
61
- "namespace": "sessions"
62
- })
63
-
64
- // Delete specific memory
65
- mcp__claude-flow__memory_usage({
66
- "action": "delete",
67
- "key": "session-123",
68
- "namespace": "sessions"
69
- })
70
-
71
- // Backup memory
72
- mcp__claude-flow__memory_backup({
73
- "path": "./backups/memory-backup.json"
74
- })
75
- ```
76
-
77
- **Manual control:**
78
- ```bash
79
- # View stored memory
80
- ls .claude-flow/memory/
81
-
82
- # Disable memory
83
- export CLAUDE_FLOW_MEMORY_PERSIST=false
84
- ```
85
-
86
- ## Benefits
87
- - 🧠 Contextual awareness
88
- - 📈 Cumulative learning
89
- - ⚡ Faster task completion
90
- - 🎯 Personalized optimization
@@ -1,73 +0,0 @@
1
- # Smart Agent Auto-Spawning
2
-
3
- ## Purpose
4
- Automatically spawn the right agents at the right time without manual intervention.
5
-
6
- ## Auto-Spawning Triggers
7
-
8
- ### 1. File Type Detection
9
- When editing files, agents auto-spawn:
10
- - **JavaScript/TypeScript**: Coder agent
11
- - **Markdown**: Researcher agent
12
- - **JSON/YAML**: Analyst agent
13
- - **Multiple files**: Coordinator agent
14
-
15
- ### 2. Task Complexity
16
- ```
17
- Simple task: "Fix typo"
18
- → Single coordinator agent
19
-
20
- Complex task: "Implement OAuth with Google"
21
- → Architect + Coder + Tester + Researcher
22
- ```
23
-
24
- ### 3. Dynamic Scaling
25
- The system monitors workload and spawns additional agents when:
26
- - Task queue grows
27
- - Complexity increases
28
- - Parallel opportunities exist
29
-
30
- **Status Monitoring:**
31
- ```javascript
32
- // Check swarm health
33
- mcp__claude-flow__swarm_status({
34
- "swarmId": "current"
35
- })
36
-
37
- // Monitor agent performance
38
- mcp__claude-flow__agent_metrics({
39
- "agentId": "agent-123"
40
- })
41
- ```
42
-
43
- ## Configuration
44
-
45
- ### MCP Tool Integration
46
- Uses Claude Flow MCP tools for agent coordination:
47
- ```javascript
48
- // Initialize swarm with appropriate topology
49
- mcp__claude-flow__swarm_init({
50
- "topology": "mesh",
51
- "maxAgents": 8,
52
- "strategy": "auto"
53
- })
54
-
55
- // Spawn agents based on file type
56
- mcp__claude-flow__agent_spawn({
57
- "type": "coder",
58
- "name": "JavaScript Handler",
59
- "capabilities": ["javascript", "typescript"]
60
- })
61
- ```
62
-
63
- ### Fallback Configuration
64
- If MCP tools are unavailable:
65
- ```bash
66
- npx claude-flow-novice hook pre-task --auto-spawn-agents
67
- ```
68
-
69
- ## Benefits
70
- - 🤖 Zero manual agent management
71
- - 🎯 Perfect agent selection
72
- - 📈 Dynamic scaling
73
- - 💾 Resource efficiency
@@ -1,25 +0,0 @@
1
- # smart-spawn
2
-
3
- Intelligently spawn agents based on workload analysis.
4
-
5
- ## Usage
6
- ```bash
7
- npx claude-flow-novice automation smart-spawn [options]
8
- ```
9
-
10
- ## Options
11
- - `--analyze` - Analyze before spawning
12
- - `--threshold <n>` - Spawn threshold
13
- - `--topology <type>` - Preferred topology
14
-
15
- ## Examples
16
- ```bash
17
- # Smart spawn with analysis
18
- npx claude-flow-novice automation smart-spawn --analyze
19
-
20
- # Set spawn threshold
21
- npx claude-flow-novice automation smart-spawn --threshold 5
22
-
23
- # Force topology
24
- npx claude-flow-novice automation smart-spawn --topology hierarchical
25
- ```
@@ -1,25 +0,0 @@
1
- # workflow-select
2
-
3
- Automatically select optimal workflow based on task type.
4
-
5
- ## Usage
6
- ```bash
7
- npx claude-flow-novice automation workflow-select [options]
8
- ```
9
-
10
- ## Options
11
- - `--task <description>` - Task description
12
- - `--constraints <list>` - Workflow constraints
13
- - `--preview` - Preview without executing
14
-
15
- ## Examples
16
- ```bash
17
- # Select workflow for task
18
- npx claude-flow-novice automation workflow-select --task "Deploy to production"
19
-
20
- # With constraints
21
- npx claude-flow-novice automation workflow-select --constraints "no-downtime,rollback"
22
-
23
- # Preview mode
24
- npx claude-flow-novice automation workflow-select --task "Database migration" --preview
25
- ```
@@ -1,237 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * CLAUDE.md Slash Command
5
- *
6
- * Simple wrapper around the existing CLAUDE.md generator with NPX protection
7
- * Keeps it focused and lightweight - no bloat!
8
- */
9
-
10
- import { ClaudeMdGenerator } from '../language/claude-md-generator.js';
11
- import { LanguageDetector } from '../language/language-detector.js';
12
- import fs from 'fs/promises';
13
- import path from 'path';
14
-
15
- export class ClaudeMdSlashCommand {
16
- constructor(projectPath = process.cwd()) {
17
- this.projectPath = projectPath;
18
- this.claudeMdPath = path.join(projectPath, 'CLAUDE.md');
19
- this.copyToMainPath = path.join(projectPath, 'claude-copy-to-main.md');
20
- }
21
-
22
- /**
23
- * Main slash command execution
24
- */
25
- async execute(options = {}) {
26
- const {
27
- backup = true,
28
- preview = false,
29
- force = false,
30
- isNpxInstall = false
31
- } = options;
32
-
33
- try {
34
- console.log('🚀 Generating CLAUDE.md...');
35
-
36
- // Step 1: Detect if this is an NPX install scenario
37
- const existingClaudeExists = await this.fileExists(this.claudeMdPath);
38
- const shouldUseNpxProtection = isNpxInstall && existingClaudeExists;
39
-
40
- // Step 2: Generate content using existing system
41
- const generator = new ClaudeMdGenerator(this.projectPath, {
42
- backupExisting: backup && !shouldUseNpxProtection,
43
- preserveCustomSections: true
44
- });
45
-
46
- const newContent = await generator.generateClaudeMd();
47
-
48
- // Step 3: Handle NPX protection
49
- if (shouldUseNpxProtection) {
50
- await this.handleNpxProtection(newContent);
51
- return {
52
- success: true,
53
- action: 'npx-protection',
54
- file: 'claude-copy-to-main.md',
55
- message: 'Generated claude-copy-to-main.md to protect your existing CLAUDE.md'
56
- };
57
- }
58
-
59
- // Step 4: Handle preview mode
60
- if (preview) {
61
- return {
62
- success: true,
63
- action: 'preview',
64
- content: newContent,
65
- message: 'Preview generated successfully'
66
- };
67
- }
68
-
69
- // Step 5: Handle force/confirmation for existing files
70
- if (existingClaudeExists && !force) {
71
- const shouldOverwrite = await this.confirmOverwrite();
72
- if (!shouldOverwrite) {
73
- return {
74
- success: false,
75
- action: 'cancelled',
76
- message: 'Generation cancelled by user'
77
- };
78
- }
79
- }
80
-
81
- // Step 6: Write the file
82
- await fs.writeFile(this.claudeMdPath, newContent, 'utf8');
83
-
84
- console.log('✅ CLAUDE.md generated successfully');
85
- return {
86
- success: true,
87
- action: 'generated',
88
- file: 'CLAUDE.md',
89
- length: newContent.length
90
- };
91
-
92
- } catch (error) {
93
- console.error('❌ CLAUDE.md generation failed:', error.message);
94
- return {
95
- success: false,
96
- action: 'error',
97
- error: error.message
98
- };
99
- }
100
- }
101
-
102
- /**
103
- * NPX Protection: Generate claude-copy-to-main.md instead of overwriting
104
- */
105
- async handleNpxProtection(newContent) {
106
- const protectedContent = this.createProtectedContent(newContent);
107
-
108
- await fs.writeFile(this.copyToMainPath, protectedContent, 'utf8');
109
-
110
- console.log('🛡️ NPX Protection Activated');
111
- console.log('📄 Generated: claude-copy-to-main.md');
112
- console.log('💡 Your existing CLAUDE.md is protected from overwrite');
113
- console.log('🔄 Review and merge changes manually as needed');
114
- }
115
-
116
- /**
117
- * Create content for the protected file with merge instructions
118
- */
119
- createProtectedContent(newContent) {
120
- return `# 🛡️ NPX-Protected CLAUDE.md Content
121
-
122
- ## 📋 Merge Instructions
123
-
124
- This file was generated because you have an existing CLAUDE.md file.
125
- To protect your customizations from being overwritten by NPX installs,
126
- the new content is provided here for manual review and merging.
127
-
128
- ### 🔄 How to Merge:
129
- 1. Review the content below
130
- 2. Copy sections you want to your main CLAUDE.md
131
- 3. Delete this file when done
132
- 4. Your customizations remain safe!
133
-
134
- ---
135
-
136
- # Generated CLAUDE.md Content
137
-
138
- ${newContent}
139
-
140
- ---
141
-
142
- ## 🗑️ Cleanup
143
- Delete this file after merging: \`rm claude-copy-to-main.md\`
144
- `;
145
- }
146
-
147
- /**
148
- * Simple confirmation prompt for overwriting existing files
149
- */
150
- async confirmOverwrite() {
151
- // In a real implementation, this would use readline or similar
152
- // For now, return true (could be enhanced with proper prompting)
153
- console.log('⚠️ CLAUDE.md exists. Use --force to overwrite or --preview to see changes.');
154
- return false;
155
- }
156
-
157
- /**
158
- * Check if file exists
159
- */
160
- async fileExists(filePath) {
161
- try {
162
- await fs.access(filePath);
163
- return true;
164
- } catch {
165
- return false;
166
- }
167
- }
168
-
169
- /**
170
- * Show preview of what would be generated
171
- */
172
- async showPreview() {
173
- const result = await this.execute({ preview: true });
174
-
175
- if (result.success) {
176
- console.log('📄 CLAUDE.md Preview:');
177
- console.log('━'.repeat(50));
178
- console.log(result.content.substring(0, 1000) + '...');
179
- console.log('━'.repeat(50));
180
- console.log(`📊 Total length: ${result.content.length} characters`);
181
- }
182
-
183
- return result;
184
- }
185
-
186
- /**
187
- * Auto-detect project and suggest generation
188
- */
189
- async autoDetectAndSuggest() {
190
- const detector = new LanguageDetector(this.projectPath);
191
- const detection = await detector.detectProject();
192
-
193
- console.log('🔍 Project Detection Results:');
194
- console.log(` Type: ${detection.projectType}`);
195
- console.log(` Confidence: ${(detection.confidence * 100).toFixed(1)}%`);
196
-
197
- if (detection.confidence > 0.7) {
198
- console.log('💡 High confidence - CLAUDE.md generation recommended');
199
- return true;
200
- } else {
201
- console.log('⚠️ Low confidence - manual review recommended');
202
- return false;
203
- }
204
- }
205
- }
206
-
207
- /**
208
- * CLI Interface for slash command
209
- */
210
- export async function executeClaudeMdCommand(args = {}) {
211
- const command = new ClaudeMdSlashCommand();
212
-
213
- // Handle different command modes
214
- if (args.preview) {
215
- return await command.showPreview();
216
- }
217
-
218
- if (args.detect) {
219
- return await command.autoDetectAndSuggest();
220
- }
221
-
222
- // Default: generate CLAUDE.md
223
- return await command.execute(args);
224
- }
225
-
226
- // For direct execution
227
- if (import.meta.url === `file://${process.argv[1]}`) {
228
- const args = {
229
- preview: process.argv.includes('--preview'),
230
- force: process.argv.includes('--force'),
231
- backup: !process.argv.includes('--no-backup'),
232
- detect: process.argv.includes('--detect'),
233
- isNpxInstall: process.env.NPX_INSTALL === 'true'
234
- };
235
-
236
- executeClaudeMdCommand(args);
237
- }