claude-flow-novice 1.5.11 → 1.5.12
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.md +98 -102
- package/package.json +1 -1
- package/src/cli/simple-commands/init/templates/CLAUDE.md +4 -40
package/CLAUDE.md
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
**YOU MUST USE AGENTS FOR ALL NON-TRIVIAL WORK - NO EXCEPTIONS**
|
|
8
8
|
|
|
9
9
|
**ABSOLUTE RULES**:
|
|
10
|
-
1. **ALWAYS USE AGENTS** -
|
|
11
|
-
2. **
|
|
12
|
-
3. **
|
|
13
|
-
4.
|
|
14
|
-
5. **NEVER
|
|
15
|
-
6.
|
|
16
|
-
7. **USE CLAUDE CODE'S TASK TOOL**
|
|
10
|
+
1. **ALWAYS USE AGENTS** - Tasks requiring >3 steps MUST use agent coordination
|
|
11
|
+
2. **ALWAYS INITIALIZE SWARM** - ANY multi-agent task requires swarm_init FIRST
|
|
12
|
+
3. **ALWAYS RUN POST-EDIT HOOKS** - After EVERY file edit without exception
|
|
13
|
+
4. **ALWAYS BATCH OPERATIONS** - 1 MESSAGE = ALL RELATED OPERATIONS
|
|
14
|
+
5. **NEVER WORK SOLO** - Spawn multiple agents in parallel for ALL significant tasks
|
|
15
|
+
6. **NEVER SAVE TO ROOT** - Organize files in appropriate subdirectories
|
|
16
|
+
7. **USE CLAUDE CODE'S TASK TOOL** - For spawning agents concurrently, not just MCP
|
|
17
17
|
|
|
18
18
|
### 🚫 WHEN YOU MUST USE AGENTS (MANDATORY)
|
|
19
19
|
|
|
@@ -29,11 +29,14 @@
|
|
|
29
29
|
- Refactoring or optimization work
|
|
30
30
|
- ANY feature development (even "simple" ones)
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
### Agent Requirements by Task Complexity
|
|
33
|
+
|
|
34
|
+
| Task Size | Steps | Agent Count | Example Team Composition |
|
|
35
|
+
|-----------|-------|-------------|--------------------------|
|
|
36
|
+
| **Simple** | 3-5 | 2-3 agents | coder + tester + reviewer |
|
|
37
|
+
| **Medium** | 6-10 | 4-6 agents | + researcher + architect + security-specialist |
|
|
38
|
+
| **Complex** | 11-20 | 8-12 agents | Full specialist team with domain experts |
|
|
39
|
+
| **Enterprise** | 20+ | 15-20 agents | + devops + api-docs + perf-analyzer + coordinators |
|
|
37
40
|
|
|
38
41
|
### ⚡ GOLDEN RULE: "1 MESSAGE = ALL RELATED OPERATIONS"
|
|
39
42
|
|
|
@@ -179,95 +182,23 @@ npx enhanced-hooks post-edit "src/lib.rs" --memory-key "backend/rust" --minimum-
|
|
|
179
182
|
# Generate summaries and persist state
|
|
180
183
|
npx claude-flow-novice hooks session-end --generate-summary true --persist-state true --export-metrics true
|
|
181
184
|
```
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
**YOU MUST USE THESE PATTERNS FOR ALL NON-TRIVIAL WORK:**
|
|
185
|
-
|
|
186
|
-
### Pattern 1: Simple Tasks (2-3 agents MINIMUM)
|
|
187
|
-
```javascript
|
|
188
|
-
// ✅ MANDATORY for any code change - ALWAYS use swarm coordination
|
|
189
|
-
[Single Message]:
|
|
190
|
-
// Step 1: Initialize swarm (REQUIRED for consistency)
|
|
191
|
-
mcp__claude-flow-novice__swarm_init({
|
|
192
|
-
topology: "mesh",
|
|
193
|
-
maxAgents: 3,
|
|
194
|
-
strategy: "balanced"
|
|
195
|
-
})
|
|
196
|
-
|
|
197
|
-
// Step 2: Spawn agents with coordinated approach
|
|
198
|
-
Task("Coder", "Implement feature with TDD approach", "coder")
|
|
199
|
-
Task("Tester", "Create comprehensive test suite", "tester")
|
|
200
|
-
Task("Reviewer", "Review code quality and security", "reviewer")
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### Pattern 2: Medium Tasks (4-6 agents REQUIRED)
|
|
204
|
-
```javascript
|
|
205
|
-
// ✅ MANDATORY for multi-file features - ALWAYS use swarm coordination
|
|
206
|
-
[Single Message]:
|
|
207
|
-
// Step 1: Initialize swarm (REQUIRED for consistency)
|
|
208
|
-
mcp__claude-flow-novice__swarm_init({
|
|
209
|
-
topology: "mesh",
|
|
210
|
-
maxAgents: 6,
|
|
211
|
-
strategy: "balanced"
|
|
212
|
-
})
|
|
213
|
-
|
|
214
|
-
// Step 2: Spawn coordinated agents
|
|
215
|
-
Task("Researcher", "Analyze requirements and existing patterns", "researcher")
|
|
216
|
-
Task("Architect", "Design system architecture", "system-architect")
|
|
217
|
-
Task("Coder", "Implement core functionality with TDD", "coder")
|
|
218
|
-
Task("Tester", "Create unit, integration, and E2E tests", "tester")
|
|
219
|
-
Task("Security Reviewer", "Perform security audit", "security-specialist")
|
|
220
|
-
Task("Reviewer", "Final quality review", "reviewer")
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Pattern 3: Complex Tasks (8-12 agents REQUIRED)
|
|
224
|
-
```javascript
|
|
225
|
-
// ✅ MANDATORY for full features - MUST use swarm coordination
|
|
226
|
-
[Single Message]:
|
|
227
|
-
// Step 1: Initialize swarm coordination (REQUIRED for 8+ agents)
|
|
228
|
-
mcp__claude-flow-novice__swarm_init({
|
|
229
|
-
topology: "hierarchical",
|
|
230
|
-
maxAgents: 12,
|
|
231
|
-
strategy: "adaptive"
|
|
232
|
-
})
|
|
233
|
-
|
|
234
|
-
// Step 2: Spawn working agents using Task tool
|
|
235
|
-
Task("Product Owner", "Define requirements", "planner")
|
|
236
|
-
Task("System Architect", "Design architecture", "system-architect")
|
|
237
|
-
Task("Backend Developer", "Implement backend services", "backend-dev")
|
|
238
|
-
Task("Frontend Developer", "Create UI components", "coder")
|
|
239
|
-
Task("Tester", "Comprehensive testing", "tester")
|
|
240
|
-
Task("Security Specialist", "Security review", "security-specialist")
|
|
241
|
-
Task("Performance Analyst", "Performance optimization", "perf-analyzer")
|
|
242
|
-
Task("DevOps Engineer", "CI/CD setup", "cicd-engineer")
|
|
243
|
-
Task("API Documenter", "API documentation", "api-docs")
|
|
244
|
-
Task("Reviewer", "Final quality gate", "reviewer")
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### 🎯 SWARM INITIALIZATION RULE
|
|
185
|
+
### 🎯 Swarm Initialization (MANDATORY for ALL Multi-Agent Tasks)
|
|
248
186
|
|
|
249
|
-
**CRITICAL**: You MUST initialize swarm
|
|
187
|
+
**CRITICAL**: You MUST initialize swarm BEFORE spawning ANY multiple agents:
|
|
250
188
|
|
|
251
189
|
```javascript
|
|
252
190
|
[Single Message]:
|
|
253
|
-
// Step 1:
|
|
191
|
+
// Step 1: ALWAYS initialize swarm first
|
|
254
192
|
mcp__claude-flow-novice__swarm_init({
|
|
255
193
|
topology: "mesh", // mesh (2-7 agents), hierarchical (8+)
|
|
256
194
|
maxAgents: 3, // Match your actual agent count
|
|
257
195
|
strategy: "balanced" // ensures agents coordinate and stay consistent
|
|
258
196
|
})
|
|
259
197
|
|
|
260
|
-
// Step 2
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
capabilities: ["consistency_enforcement", "method_coordination"]
|
|
265
|
-
})
|
|
266
|
-
|
|
267
|
-
// Step 3: Spawn working agents via Task tool
|
|
268
|
-
Task("Agent 1", "Instructions...", "type")
|
|
269
|
-
Task("Agent 2", "Instructions...", "type")
|
|
270
|
-
Task("Agent 3", "Instructions...", "type")
|
|
198
|
+
// Step 2: Spawn working agents via Task tool
|
|
199
|
+
Task("Agent 1", "Specific instructions...", "type")
|
|
200
|
+
Task("Agent 2", "Specific instructions...", "type")
|
|
201
|
+
Task("Agent 3", "Specific instructions...", "type")
|
|
271
202
|
```
|
|
272
203
|
|
|
273
204
|
**WHY THIS MATTERS:**
|
|
@@ -287,9 +218,67 @@ npx claude-flow-novice hooks session-end --generate-summary true --persist-state
|
|
|
287
218
|
- **Monitoring**: `swarm_status`, `agent_metrics`, `task_results`
|
|
288
219
|
- **Memory**: `memory_usage`, `memory_search`
|
|
289
220
|
|
|
290
|
-
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## 📋 AGENT COORDINATION RULES
|
|
224
|
+
|
|
225
|
+
### Universal Agent Spawning Pattern
|
|
226
|
+
|
|
227
|
+
**EVERY multi-agent task follows this structure:**
|
|
291
228
|
|
|
292
|
-
|
|
229
|
+
```javascript
|
|
230
|
+
[Single Message]:
|
|
231
|
+
// Step 1: ALWAYS initialize swarm first
|
|
232
|
+
mcp__claude-flow-novice__swarm_init({
|
|
233
|
+
topology: "mesh", // or "hierarchical" for 8+ agents
|
|
234
|
+
maxAgents: X, // match your actual agent count
|
|
235
|
+
strategy: "balanced" // or "adaptive" for complex tasks
|
|
236
|
+
})
|
|
237
|
+
|
|
238
|
+
// Step 2: Spawn ALL agents concurrently
|
|
239
|
+
Task("Agent Name", "Specific task instructions", "agent-type")
|
|
240
|
+
Task("Agent Name", "Specific task instructions", "agent-type")
|
|
241
|
+
Task("Agent Name", "Specific task instructions", "agent-type")
|
|
242
|
+
// ... continue for all agents
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Coordination Checklist
|
|
246
|
+
|
|
247
|
+
**Before spawning agents, ensure:**
|
|
248
|
+
- ✅ Task analyzed and complexity assessed (Simple/Medium/Complex/Enterprise)
|
|
249
|
+
- ✅ Agent count determined from requirements table
|
|
250
|
+
- ✅ Agent types selected for specific needs (not generic roles)
|
|
251
|
+
- ✅ Topology chosen: mesh (2-7) or hierarchical (8+)
|
|
252
|
+
- ✅ All agents will spawn in SINGLE message
|
|
253
|
+
- ✅ Each agent has specific, non-overlapping instructions
|
|
254
|
+
|
|
255
|
+
**During execution:**
|
|
256
|
+
- ✅ Agents coordinate through SwarmMemory
|
|
257
|
+
- ✅ Self-validation runs before consensus
|
|
258
|
+
- ✅ Each agent runs Post-edit hooks execute after file changes
|
|
259
|
+
|
|
260
|
+
**After completion:**
|
|
261
|
+
- ✅ Consensus validation achieved (≥90% agreement)
|
|
262
|
+
- ✅ Results stored in memory
|
|
263
|
+
- ✅ Next steps provided with claude code continuing to the next documented phase or next steps provided to user if no todos left
|
|
264
|
+
|
|
265
|
+
### Agent Selection Guide
|
|
266
|
+
|
|
267
|
+
**Core Development**: coder, tester, reviewer
|
|
268
|
+
**Backend**: backend-dev, api-docs, system-architect
|
|
269
|
+
**Frontend**: coder (specialized), mobile-dev
|
|
270
|
+
**Quality**: tester, reviewer, security-specialist, perf-analyzer
|
|
271
|
+
**Planning**: researcher, planner, architect
|
|
272
|
+
**Operations**: devops-engineer, cicd-engineer
|
|
273
|
+
**Documentation**: api-docs, researcher
|
|
274
|
+
|
|
275
|
+
**Select agents based on actual task needs, not predefined patterns.**
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
### ⚠️ Real-World Example: Why Swarm Coordination Matters
|
|
280
|
+
|
|
281
|
+
**WITHOUT swarm_init (problematic):**
|
|
293
282
|
```javascript
|
|
294
283
|
// ❌ BAD: Agents work independently with no coordination
|
|
295
284
|
[Single Message]:
|
|
@@ -298,10 +287,10 @@ npx claude-flow-novice hooks session-end --generate-summary true --persist-state
|
|
|
298
287
|
Task("Agent 3", "Fix JWT secret issue", "coder")
|
|
299
288
|
|
|
300
289
|
// Result: 3 different solutions - environment variable, config file, hardcoded
|
|
301
|
-
// Problem: Inconsistent approach, wasted effort, conflicts
|
|
290
|
+
// Problem: Inconsistent approach, wasted effort, integration conflicts
|
|
302
291
|
```
|
|
303
292
|
|
|
304
|
-
**WITH swarm_init:**
|
|
293
|
+
**WITH swarm_init (correct):**
|
|
305
294
|
```javascript
|
|
306
295
|
// ✅ GOOD: Agents coordinate through swarm
|
|
307
296
|
[Single Message]:
|
|
@@ -356,10 +345,6 @@ claude mcp add claude-flow-novice npx claude-flow-novice mcp start
|
|
|
356
345
|
|
|
357
346
|
### Step 2: Execute - Primary Swarm (3-20 agents)
|
|
358
347
|
- **Primary swarm** (3-8 agents minimum) produces deliverables with confidence scores
|
|
359
|
-
- **Each agent MUST** use enhanced post-edit pipeline after file edits:
|
|
360
|
-
```bash
|
|
361
|
-
npx enhanced-hooks post-edit "[file]" --memory-key "swarm/[agent]/[step]" --structured
|
|
362
|
-
```
|
|
363
348
|
- **Self-validation**: Each agent validates own work (confidence threshold: 0.75)
|
|
364
349
|
- **Cross-agent coordination**: Agents share findings via SwarmMemory
|
|
365
350
|
|
|
@@ -388,7 +373,7 @@ claude mcp add claude-flow-novice npx claude-flow-novice mcp start
|
|
|
388
373
|
- **PASS** →
|
|
389
374
|
1. Store results in SwarmMemory
|
|
390
375
|
2. Update documentation
|
|
391
|
-
3.
|
|
376
|
+
3. Update todos and move to next task
|
|
392
377
|
|
|
393
378
|
- **FAIL** →
|
|
394
379
|
1. Round counter++
|
|
@@ -398,9 +383,20 @@ claude mcp add claude-flow-novice npx claude-flow-novice mcp start
|
|
|
398
383
|
### 🚨 ENFORCEMENT CHECKPOINTS
|
|
399
384
|
|
|
400
385
|
**MANDATORY before proceeding:**
|
|
401
|
-
1. ✅ Agents spawned
|
|
386
|
+
1. ✅ Agents spawned
|
|
402
387
|
2. ✅ Each file edit followed by enhanced post-edit hook
|
|
403
388
|
3. ✅ Self-validation confidence scores recorded
|
|
404
389
|
4. ✅ Consensus swarm spawned for verification
|
|
405
390
|
5. ✅ Byzantine voting completed
|
|
406
|
-
6. ✅ Results stored in SwarmMemory
|
|
391
|
+
6. ✅ Results stored in SwarmMemory
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## 🎯 MANDATORY: NEXT STEPS GUIDANCE
|
|
396
|
+
|
|
397
|
+
**After completing ANY task, you MUST provide:**
|
|
398
|
+
|
|
399
|
+
1. **✅ What was completed**: Brief summary of delivered work
|
|
400
|
+
2. **📊 Validation results**: Confidence scores, test coverage, consensus approval
|
|
401
|
+
3. **🔍 Identified issues**: Any technical debt, warnings, or concerns discovered
|
|
402
|
+
4. **💡 Recommended next steps**: Prioritized suggestions for logical continuation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow-novice",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.12",
|
|
4
4
|
"description": "Standalone Claude Flow for beginners - AI agent orchestration made easy with enhanced TDD testing pipeline. Enhanced init command creates complete agent system, MCP configuration with 30 essential tools, and automated hooks with single-file testing, real-time coverage analysis, and advanced validation. Fully standalone with zero external dependencies, complete project setup in one command.",
|
|
5
5
|
"mcpName": "io.github.ruvnet/claude-flow",
|
|
6
6
|
"main": ".claude-flow-novice/dist/index.js",
|
|
@@ -255,12 +255,12 @@ npx claude-flow-novice hooks session-end --generate-summary true --persist-state
|
|
|
255
255
|
**During execution:**
|
|
256
256
|
- ✅ Agents coordinate through SwarmMemory
|
|
257
257
|
- ✅ Self-validation runs before consensus
|
|
258
|
-
- ✅ Post-edit hooks execute after file changes
|
|
258
|
+
- ✅ Each agent runs Post-edit hooks execute after file changes
|
|
259
259
|
|
|
260
260
|
**After completion:**
|
|
261
261
|
- ✅ Consensus validation achieved (≥90% agreement)
|
|
262
262
|
- ✅ Results stored in memory
|
|
263
|
-
- ✅ Next steps provided to user
|
|
263
|
+
- ✅ Next steps provided with claude code continuing to the next documented phase or next steps provided to user if no todos left
|
|
264
264
|
|
|
265
265
|
### Agent Selection Guide
|
|
266
266
|
|
|
@@ -373,7 +373,7 @@ claude mcp add claude-flow-novice npx claude-flow-novice mcp start
|
|
|
373
373
|
- **PASS** →
|
|
374
374
|
1. Store results in SwarmMemory
|
|
375
375
|
2. Update documentation
|
|
376
|
-
3.
|
|
376
|
+
3. Update todos and move to next task
|
|
377
377
|
|
|
378
378
|
- **FAIL** →
|
|
379
379
|
1. Round counter++
|
|
@@ -383,7 +383,7 @@ claude mcp add claude-flow-novice npx claude-flow-novice mcp start
|
|
|
383
383
|
### 🚨 ENFORCEMENT CHECKPOINTS
|
|
384
384
|
|
|
385
385
|
**MANDATORY before proceeding:**
|
|
386
|
-
1. ✅ Agents spawned
|
|
386
|
+
1. ✅ Agents spawned
|
|
387
387
|
2. ✅ Each file edit followed by enhanced post-edit hook
|
|
388
388
|
3. ✅ Self-validation confidence scores recorded
|
|
389
389
|
4. ✅ Consensus swarm spawned for verification
|
|
@@ -400,39 +400,3 @@ claude mcp add claude-flow-novice npx claude-flow-novice mcp start
|
|
|
400
400
|
2. **📊 Validation results**: Confidence scores, test coverage, consensus approval
|
|
401
401
|
3. **🔍 Identified issues**: Any technical debt, warnings, or concerns discovered
|
|
402
402
|
4. **💡 Recommended next steps**: Prioritized suggestions for logical continuation
|
|
403
|
-
|
|
404
|
-
### Next Steps Template
|
|
405
|
-
|
|
406
|
-
```markdown
|
|
407
|
-
## Task Completion Summary
|
|
408
|
-
|
|
409
|
-
**✅ Completed**: [What was delivered]
|
|
410
|
-
**📊 Validation**:
|
|
411
|
-
- Confidence: X%
|
|
412
|
-
- Coverage: Y%
|
|
413
|
-
- Consensus: Z%
|
|
414
|
-
|
|
415
|
-
**⚠️ Identified Concerns**:
|
|
416
|
-
- [Issue 1] - Severity: [High/Medium/Low]
|
|
417
|
-
- [Issue 2] - Severity: [High/Medium/Low]
|
|
418
|
-
|
|
419
|
-
**💡 Recommended Next Steps** (in priority order):
|
|
420
|
-
|
|
421
|
-
1. **[High Priority]**: [Action item]
|
|
422
|
-
- Why: [Business/technical rationale]
|
|
423
|
-
- Effort: [Estimated time/complexity]
|
|
424
|
-
|
|
425
|
-
2. **[Medium Priority]**: [Action item]
|
|
426
|
-
- Why: [Value proposition]
|
|
427
|
-
- Effort: [Estimated time/complexity]
|
|
428
|
-
|
|
429
|
-
3. **[Low Priority]**: [Enhancement opportunity]
|
|
430
|
-
- Why: [Long-term benefit]
|
|
431
|
-
- Effort: [Estimated time/complexity]
|
|
432
|
-
|
|
433
|
-
**🤔 Questions for User**:
|
|
434
|
-
- [Decision point requiring clarification]?
|
|
435
|
-
- [Alternative approach consideration]?
|
|
436
|
-
```
|
|
437
|
-
|
|
438
|
-
**Rationale**: Proactive next steps ensure continuous progress, prevent workflow dead-ends, and help users understand logical task progression without requiring them to determine next actions.
|