claude-flow-novice 1.5.1 → 1.5.3
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/architecture/system-architect.md +3 -44
- package/.claude/agents/benchmarking-tests/test-agent-code-heavy.md +747 -0
- package/.claude/agents/benchmarking-tests/test-agent-metadata.md +181 -0
- package/.claude/agents/benchmarking-tests/test-agent-minimal.md +67 -0
- package/.claude/agents/data/ml/data-ml-model.md +5 -119
- package/.claude/agents/development/backend/dev-backend-api.md +4 -115
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +4 -114
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +4 -113
- package/.claude/agents/github/multi-repo-swarm.md +1 -28
- package/.claude/agents/github/pr-manager.md +1 -29
- package/.claude/agents/github/project-board-sync.md +1 -32
- package/.claude/agents/github/release-manager.md +1 -32
- package/.claude/agents/github/release-swarm.md +1 -33
- package/.claude/agents/github/repo-architect.md +1 -34
- package/.claude/agents/github/swarm-issue.md +1 -26
- package/.claude/agents/github/swarm-pr.md +1 -30
- package/.claude/agents/github/sync-coordinator.md +1 -30
- package/.claude/agents/github/workflow-automation.md +1 -31
- package/.claude/agents/neural/neural-pattern-agent.md +2 -50
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +6 -142
- package/.claude/agents/sublinear/consciousness-evolution-agent.md +2 -18
- package/.claude/agents/sublinear/matrix-solver-agent.md +2 -16
- package/.claude/agents/sublinear/nanosecond-scheduler-agent.md +2 -19
- package/.claude/agents/sublinear/pagerank-agent.md +2 -19
- package/.claude/agents/sublinear/phi-calculator-agent.md +2 -19
- package/.claude/agents/sublinear/psycho-symbolic-agent.md +2 -19
- package/.claude/agents/sublinear/sublinear.md +2 -1
- package/.claude/agents/sublinear/temporal-advantage-agent.md +2 -16
- package/.claude/agents/testing/e2e/playwright-agent.md +7 -0
- package/.claude-flow-novice/.claude/agents/architecture/system-architect.md +3 -44
- package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-code-heavy.md +747 -0
- package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-metadata.md +181 -0
- package/.claude-flow-novice/.claude/agents/benchmarking-tests/test-agent-minimal.md +67 -0
- package/.claude-flow-novice/.claude/agents/data/ml/data-ml-model.md +5 -119
- package/.claude-flow-novice/.claude/agents/development/backend/dev-backend-api.md +4 -115
- package/.claude-flow-novice/.claude/agents/devops/ci-cd/ops-cicd-github.md +4 -114
- package/.claude-flow-novice/.claude/agents/documentation/api-docs/docs-api-openapi.md +4 -113
- package/.claude-flow-novice/.claude/agents/github/multi-repo-swarm.md +1 -28
- package/.claude-flow-novice/.claude/agents/github/pr-manager.md +1 -29
- package/.claude-flow-novice/.claude/agents/github/project-board-sync.md +1 -32
- package/.claude-flow-novice/.claude/agents/github/release-manager.md +1 -32
- package/.claude-flow-novice/.claude/agents/github/release-swarm.md +1 -33
- package/.claude-flow-novice/.claude/agents/github/repo-architect.md +1 -34
- package/.claude-flow-novice/.claude/agents/github/swarm-issue.md +1 -26
- package/.claude-flow-novice/.claude/agents/github/swarm-pr.md +1 -30
- package/.claude-flow-novice/.claude/agents/github/sync-coordinator.md +1 -30
- package/.claude-flow-novice/.claude/agents/github/workflow-automation.md +1 -31
- package/.claude-flow-novice/.claude/agents/neural/neural-pattern-agent.md +2 -50
- package/.claude-flow-novice/.claude/agents/specialized/mobile/spec-mobile-react-native.md +6 -142
- package/.claude-flow-novice/.claude/agents/sublinear/consciousness-evolution-agent.md +2 -18
- package/.claude-flow-novice/.claude/agents/sublinear/matrix-solver-agent.md +2 -16
- package/.claude-flow-novice/.claude/agents/sublinear/nanosecond-scheduler-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/pagerank-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/phi-calculator-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/psycho-symbolic-agent.md +2 -19
- package/.claude-flow-novice/.claude/agents/sublinear/sublinear.md +2 -1
- package/.claude-flow-novice/.claude/agents/sublinear/temporal-advantage-agent.md +2 -16
- package/.claude-flow-novice/.claude/agents/testing/e2e/playwright-agent.md +7 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/CLAUDE.md +188 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow-universal +81 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow.bat +18 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-flow.ps1 +24 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/claude-md.js +982 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/analysis/bottleneck-detect.md +162 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/automation/auto-agent.md +122 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/coordination/swarm-init.md +85 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/github/github-swarm.md +121 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/notification.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-command.md +116 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-edit.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/post-task.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-command.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-edit.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-search.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/pre-task.md +111 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-end.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-restore.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/commands/hooks/session-start.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/coordination-md.js +340 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/coordination.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/enhanced-templates.js +2347 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/github-safe-enhanced.js +331 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/github-safe.js +106 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/memory-bank-md.js +259 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/memory-bank.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/readme-files.js +72 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/safe-hook-patterns.js +430 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/settings.json +109 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/settings.json.enhanced +35 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/sparc-modes.js +1401 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/CLAUDE.md +188 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow-universal +81 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow.bat +18 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-flow.ps1 +24 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/claude-md.js +982 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/analysis/bottleneck-detect.md +162 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/automation/auto-agent.md +122 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/coordination/swarm-init.md +85 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/github/github-swarm.md +121 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/notification.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-command.md +116 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-edit.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/post-task.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-command.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-edit.md +113 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md +112 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md +111 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-end.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-restore.md +118 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/commands/hooks/session-start.md +117 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/coordination-md.js +340 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/coordination.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/enhanced-templates.js +2347 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/github-safe-enhanced.js +331 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/github-safe.js +106 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/memory-bank-md.js +259 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/memory-bank.md +16 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/readme-files.js +72 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/safe-hook-patterns.js +430 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/settings.json +109 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/settings.json.enhanced +35 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/sparc-modes.js +1401 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/verification-claude-md.js +432 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/verification-claude-md.js +432 -0
- package/.claude-flow-novice/dist/src/slash-commands/benchmark-prompts.js +281 -0
- package/CLAUDE.md +1 -1
- package/package.json +3 -3
- package/src/cli/simple-commands/init/index.js +39 -4
- package/src/cli/simple-commands/init/templates/CLAUDE.md +8 -10
- package/src/slash-commands/benchmark-prompts.js +281 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# Claude Flow Novice - AI Agent Orchestration
|
|
2
|
+
|
|
3
|
+
## Core Orchestration Patterns
|
|
4
|
+
|
|
5
|
+
## 🚨 CRITICAL: CONCURRENT EXECUTION & FILE MANAGEMENT
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
**ABSOLUTE RULES**:
|
|
9
|
+
1. ALL operations MUST be concurrent/parallel in a single message
|
|
10
|
+
2. **NEVER save working files, text/mds and tests to the root folder**
|
|
11
|
+
3. ALWAYS organize files in appropriate subdirectories
|
|
12
|
+
4. **USE CLAUDE CODE'S TASK TOOL** for spawning agents concurrently, not just MCP
|
|
13
|
+
|
|
14
|
+
### ⚡ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"
|
|
15
|
+
|
|
16
|
+
**MANDATORY PATTERNS:**
|
|
17
|
+
- **TodoWrite**: ALWAYS batch ALL todos in ONE call (5-10+ todos minimum)
|
|
18
|
+
- **Task tool (Claude Code)**: ALWAYS spawn ALL agents in ONE message with full instructions
|
|
19
|
+
- **File operations**: ALWAYS batch ALL reads/writes/edits in ONE message
|
|
20
|
+
- **Bash commands**: ALWAYS batch ALL terminal operations in ONE message
|
|
21
|
+
- **Memory operations**: ALWAYS batch ALL memory store/retrieve in ONE message
|
|
22
|
+
|
|
23
|
+
## 🎯 Claude Code vs MCP Tools
|
|
24
|
+
|
|
25
|
+
### Claude Code Handles ALL EXECUTION:
|
|
26
|
+
- **Task tool**: Spawn and run agents concurrently for actual work
|
|
27
|
+
- File operations (Read, Write, Edit, MultiEdit, Glob, Grep)
|
|
28
|
+
- Code generation and programming
|
|
29
|
+
- Bash commands and system operations
|
|
30
|
+
- Implementation work
|
|
31
|
+
- Project navigation and analysis
|
|
32
|
+
- TodoWrite and task management
|
|
33
|
+
- Git operations
|
|
34
|
+
- Package management
|
|
35
|
+
- Testing and debugging
|
|
36
|
+
|
|
37
|
+
### MCP Tools ONLY COORDINATE:
|
|
38
|
+
- Swarm initialization (topology setup)
|
|
39
|
+
- Agent type definitions (coordination patterns)
|
|
40
|
+
- Task orchestration (high-level planning)
|
|
41
|
+
- Memory management
|
|
42
|
+
- Neural features
|
|
43
|
+
- Performance tracking
|
|
44
|
+
- GitHub integration
|
|
45
|
+
|
|
46
|
+
**KEY**: MCP coordinates the strategy, Claude Code's Task tool executes with real agents.
|
|
47
|
+
|
|
48
|
+
### Agent Coordination Framework
|
|
49
|
+
|
|
50
|
+
#### Pre-Task Hooks (Setup & Validation)
|
|
51
|
+
```bash
|
|
52
|
+
# Validate safety and prepare resources
|
|
53
|
+
npx claude-flow-novice hooks pre-command --command "[command]" --validate-safety true --prepare-resources true
|
|
54
|
+
|
|
55
|
+
# Auto-assign agents and load context
|
|
56
|
+
npx claude-flow-novice hooks pre-edit --file "[file]" --auto-assign-agents true --load-context true
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### Post-Task Hooks (Validation & Quality)
|
|
60
|
+
```bash
|
|
61
|
+
# Track metrics and store results
|
|
62
|
+
npx claude-flow-novice hooks post-command --command "[command]" --track-metrics true --store-results true
|
|
63
|
+
|
|
64
|
+
# Enhanced post-edit pipeline with comprehensive TDD validation
|
|
65
|
+
npx enhanced-hooks post-edit "[file]" --memory-key "swarm/[agent]/[step]" --minimum-coverage 80 --structured
|
|
66
|
+
|
|
67
|
+
# Manual hook execution (guaranteed working)
|
|
68
|
+
node src/hooks/enhanced-hooks-cli.js post-edit "[file]" --memory-key "[key]" --structured
|
|
69
|
+
|
|
70
|
+
# Validates: formatting, linting, type checking, dependencies, security, tests, TDD compliance
|
|
71
|
+
# Progressive validation: graceful degradation when dependencies missing (beginner-friendly)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 🎯 **Enhanced Post-Edit Hook System**
|
|
75
|
+
|
|
76
|
+
### **🚨 MANDATORY: Manual Hook Execution After Every File Edit**
|
|
77
|
+
|
|
78
|
+
**CRITICAL RULE**: After **EVERY** file edit operation, you **MUST** run the enhanced post-edit hook:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# After editing any file, IMMEDIATELY run:
|
|
82
|
+
npx enhanced-hooks post-edit "[FILE_PATH]" --memory-key "swarm/[AGENT]/[STEP]" --minimum-coverage 80 --structured
|
|
83
|
+
|
|
84
|
+
# Or via slash command:
|
|
85
|
+
/hooks post-edit [FILE_PATH] --memory-key "[CONTEXT]" --structured
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**⚠️ NO EXCEPTIONS**: This applies to:
|
|
89
|
+
- All JavaScript/TypeScript files
|
|
90
|
+
- All Rust files
|
|
91
|
+
- All Python files
|
|
92
|
+
- All configuration files
|
|
93
|
+
- ALL file modifications
|
|
94
|
+
|
|
95
|
+
### **Enhanced Post-Edit Pipeline Features:**
|
|
96
|
+
- **🧪 TDD Testing**: Single-file testing without full system compilation
|
|
97
|
+
- **📊 Real-time Coverage**: Coverage analysis with configurable thresholds (default: 80%)
|
|
98
|
+
- **🌐 Multi-Language Support**:
|
|
99
|
+
- **JavaScript/TypeScript**: Jest, Mocha, Prettier, ESLint integration
|
|
100
|
+
- **Rust**: cargo check, cargo test, cargo-tarpaulin, rustfmt
|
|
101
|
+
- **Python**: pytest, unittest, black, pylint
|
|
102
|
+
- **Go**: go test, go fmt, go vet
|
|
103
|
+
- **Java**: JUnit, TestNG, google-java-format
|
|
104
|
+
- **C/C++**: GTest, Catch2, clang-format
|
|
105
|
+
- **🎨 Formatting**: Prettier, Black, RustFmt, GoFmt with diff preview
|
|
106
|
+
- **🔒 Security Analysis**: XSS, eval(), hardcoded credentials, SQL injection detection
|
|
107
|
+
- **✅ TDD Compliance**: Red-Green-Refactor phase detection and enforcement
|
|
108
|
+
- **🔍 Framework Detection**: Automatic test framework identification
|
|
109
|
+
- **🤖 Agent Feedback**: Structured JSON with actionable recommendations
|
|
110
|
+
- **💾 Memory Coordination**: Cross-agent state sharing and enhanced persistence
|
|
111
|
+
- **🚫 Blocking Mechanisms**: Quality gates for critical validation failures
|
|
112
|
+
|
|
113
|
+
### **Usage Examples:**
|
|
114
|
+
```bash
|
|
115
|
+
# For JavaScript/TypeScript files
|
|
116
|
+
npx enhanced-hooks post-edit "src/components/Button.tsx" --memory-key "frontend/button" --structured
|
|
117
|
+
|
|
118
|
+
# For Rust files (full cargo integration)
|
|
119
|
+
npx enhanced-hooks post-edit "src/lib.rs" --memory-key "backend/rust" --minimum-coverage 90 --structured
|
|
120
|
+
|
|
121
|
+
# Via slash commands in Claude Code
|
|
122
|
+
/hooks post-edit your-file.js --memory-key "agent-memory-key" --structured
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### **Response Structure:**
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"success": true,
|
|
129
|
+
"file": "src/component.js",
|
|
130
|
+
"validation": { "passed": true, "issues": [], "coverage": "advanced" },
|
|
131
|
+
"formatting": { "needed": true, "changes": 12, "formatter": "prettier" },
|
|
132
|
+
"testing": { "executed": true, "framework": "jest", "results": {...} },
|
|
133
|
+
"tddCompliance": { "hasTests": true, "coverage": 85, "recommendations": [...] },
|
|
134
|
+
"recommendations": [
|
|
135
|
+
{ "type": "security", "priority": "high", "message": "...", "action": "..." },
|
|
136
|
+
{ "type": "formatting", "priority": "medium", "action": "prettier file.js" }
|
|
137
|
+
],
|
|
138
|
+
"memory": { "stored": true, "enhancedStore": true }
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
#### Session Management
|
|
143
|
+
```bash
|
|
144
|
+
# Generate summaries and persist state
|
|
145
|
+
npx claude-flow-novice hooks session-end --generate-summary true --persist-state true --export-metrics true
|
|
146
|
+
```
|
|
147
|
+
**Claude Code's Task tool is the PRIMARY way to spawn agents:**
|
|
148
|
+
```javascript
|
|
149
|
+
// ✅ CORRECT: Use Claude Code's Task tool for parallel agent execution
|
|
150
|
+
[Single Message]:
|
|
151
|
+
Task("Research agent", "Analyze requirements and patterns...", "researcher")
|
|
152
|
+
Task("Coder agent", "Implement core features...", "coder")
|
|
153
|
+
Task("Tester agent", "Create comprehensive tests...", "tester")
|
|
154
|
+
Task("Reviewer agent", "Review code quality...", "reviewer")
|
|
155
|
+
Task("Architect agent", "Design system architecture...", "system-architect")
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**MCP tools are ONLY for coordination setup:**
|
|
159
|
+
### MCP Integration
|
|
160
|
+
**TRIGGER WORDS: SWARM, SPAWN, COORDINATE, TEAM**
|
|
161
|
+
- `mcp__claude-flow-novice__swarm_init` - Initialize coordination topology
|
|
162
|
+
- `mcp__claude-flow-novice__agent_spawn` - Define agent types for coordination
|
|
163
|
+
- `mcp__claude-flow-novice__task_orchestrate` - Orchestrate high-level workflows
|
|
164
|
+
- **Monitoring**: `swarm_status`, `agent_metrics`, `task_results`
|
|
165
|
+
- **Memory**: `memory_usage`, `memory_search`
|
|
166
|
+
|
|
167
|
+
## File Organization
|
|
168
|
+
- **Never save working files to root**
|
|
169
|
+
|
|
170
|
+
# Add MCP server
|
|
171
|
+
claude mcp add claude-flow-novice npx claude-flow-novice mcp start
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
## Essential Commands
|
|
175
|
+
- `npx claude-flow-novice status` - System health
|
|
176
|
+
- `npx claude-flow-novice --help` - Available commands
|
|
177
|
+
- `/fullstack "goal"` - Launch full-stack development team with consensus validation
|
|
178
|
+
- `/swarm`, `/sparc`, `/hooks` - Other slash commands (auto-discovered)
|
|
179
|
+
|
|
180
|
+
## DEVELOPMENT FLOW LOOP
|
|
181
|
+
1. Execute - Primary swarm (3-8 agents) produces deliverables with confidence score. Each agent MUST be using the enhanced post edit pipeline after file edits.
|
|
182
|
+
2. When the swarm believes its done with all tasks, move to step 4
|
|
183
|
+
3. If swarm does not believe it's done (confidence scores < 75%, relaunch agents for step 1)
|
|
184
|
+
4. Verify - Consensus swarm (2-4 validators) runs comprehensive checks with Byzantine voting
|
|
185
|
+
5. Decision - PASS (≥90% agreement + critical criteria) OR FAIL
|
|
186
|
+
6. Action -
|
|
187
|
+
- PASS → Store results → Move to next task
|
|
188
|
+
- FAIL → Round++ → If <10: inject feedback → Relaunch swarm on step 1 | If ≥10: Escalate to human
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Claude Flow CLI - Universal Wrapper
|
|
5
|
+
* Works in both CommonJS and ES Module projects
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// Use dynamic import to work in both CommonJS and ES modules
|
|
9
|
+
(async () => {
|
|
10
|
+
const { spawn } = await import('child_process');
|
|
11
|
+
const { resolve } = await import('path');
|
|
12
|
+
const { fileURLToPath } = await import('url');
|
|
13
|
+
|
|
14
|
+
// Detect if we're running in ES module context
|
|
15
|
+
let __dirname;
|
|
16
|
+
try {
|
|
17
|
+
// Check if import.meta is available (ES modules)
|
|
18
|
+
if (typeof import.meta !== 'undefined' && import.meta.url) {
|
|
19
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
20
|
+
__dirname = resolve(__filename, '..');
|
|
21
|
+
} else {
|
|
22
|
+
// Fallback for CommonJS
|
|
23
|
+
__dirname = process.cwd();
|
|
24
|
+
}
|
|
25
|
+
} catch {
|
|
26
|
+
// Fallback for CommonJS
|
|
27
|
+
__dirname = process.cwd();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Try multiple strategies to find claude-flow
|
|
31
|
+
const strategies = [
|
|
32
|
+
// 1. Local node_modules
|
|
33
|
+
async () => {
|
|
34
|
+
try {
|
|
35
|
+
const localPath = resolve(process.cwd(), 'node_modules/.bin/claude-flow');
|
|
36
|
+
const { existsSync } = await import('fs');
|
|
37
|
+
if (existsSync(localPath)) {
|
|
38
|
+
return spawn(localPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
39
|
+
}
|
|
40
|
+
} catch {}
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
// 2. Parent node_modules (monorepo)
|
|
44
|
+
async () => {
|
|
45
|
+
try {
|
|
46
|
+
const parentPath = resolve(process.cwd(), '../node_modules/.bin/claude-flow');
|
|
47
|
+
const { existsSync } = await import('fs');
|
|
48
|
+
if (existsSync(parentPath)) {
|
|
49
|
+
return spawn(parentPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
50
|
+
}
|
|
51
|
+
} catch {}
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
// 3. NPX with latest alpha version (prioritized over global)
|
|
55
|
+
async () => {
|
|
56
|
+
return spawn('npx', ['claude-flow@alpha', ...process.argv.slice(2)], {
|
|
57
|
+
stdio: 'inherit',
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
// Try each strategy
|
|
63
|
+
for (const strategy of strategies) {
|
|
64
|
+
try {
|
|
65
|
+
const child = await strategy();
|
|
66
|
+
if (child) {
|
|
67
|
+
child.on('exit', (code) => process.exit(code || 0));
|
|
68
|
+
child.on('error', (err) => {
|
|
69
|
+
if (err.code !== 'ENOENT') {
|
|
70
|
+
console.error('Error:', err);
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
} catch {}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
console.error('Could not find claude-flow. Please install it with: npm install claude-flow');
|
|
80
|
+
process.exit(1);
|
|
81
|
+
})();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
:: Claude Flow CLI for Windows
|
|
3
|
+
:: AI-Driven Development Toolkit
|
|
4
|
+
|
|
5
|
+
setlocal
|
|
6
|
+
|
|
7
|
+
:: Check if Node.js is installed
|
|
8
|
+
where node >nul 2>nul
|
|
9
|
+
if %errorlevel% neq 0 (
|
|
10
|
+
echo Error: Node.js is not installed or not in PATH
|
|
11
|
+
echo Please install Node.js from https://nodejs.org/
|
|
12
|
+
exit /b 1
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
:: Run Claude Flow CLI
|
|
16
|
+
node "%~dp0claude-flow" %*
|
|
17
|
+
|
|
18
|
+
endlocal
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env pwsh
|
|
2
|
+
# Claude Flow CLI for PowerShell
|
|
3
|
+
# AI-Driven Development Toolkit
|
|
4
|
+
|
|
5
|
+
param(
|
|
6
|
+
[Parameter(ValueFromRemainingArguments=$true)]
|
|
7
|
+
[string[]]$Arguments
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
# Check if Node.js is installed
|
|
11
|
+
if (-not (Get-Command node -ErrorAction SilentlyContinue)) {
|
|
12
|
+
Write-Error "Node.js is not installed or not in PATH"
|
|
13
|
+
Write-Error "Please install Node.js from https://nodejs.org/"
|
|
14
|
+
exit 1
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
# Get the script directory
|
|
18
|
+
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
19
|
+
|
|
20
|
+
# Run Claude Flow CLI
|
|
21
|
+
& node "$scriptDir\claude-flow" @Arguments
|
|
22
|
+
|
|
23
|
+
# Forward the exit code
|
|
24
|
+
exit $LASTEXITCODE
|