claude-flow-novice 2.11.0 → 2.13.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 (43) hide show
  1. package/.claude/commands/README.md +177 -129
  2. package/.claude/skills/cfn-changelog-management/SKILL.md +349 -0
  3. package/.claude/skills/cfn-changelog-management/add-changelog-entry.sh +200 -0
  4. package/claude-assets/commands/cfn/README.md +177 -129
  5. package/claude-assets/commands/cfn/cfn-loop-cli.md +268 -0
  6. package/claude-assets/commands/cfn/cfn-loop-document.md +20 -1
  7. package/claude-assets/commands/cfn/cfn-loop-frontend.md +17 -2
  8. package/claude-assets/commands/cfn/cfn-loop-task.md +442 -0
  9. package/claude-assets/commands/cfn/context-curate.md +27 -38
  10. package/claude-assets/commands/cfn/context-inject.md +14 -25
  11. package/claude-assets/commands/cfn/context-query.md +40 -45
  12. package/claude-assets/commands/cfn/context-reflect.md +40 -38
  13. package/claude-assets/commands/cfn/context-stats.md +13 -38
  14. package/claude-assets/commands/cfn/launch-web-dashboard.md +0 -295
  15. package/claude-assets/commands/cfn/list-agents-rebuild.md +18 -18
  16. package/claude-assets/commands/cfn/write-plan.md +246 -75
  17. package/claude-assets/skills/cfn-changelog-management/SKILL.md +349 -0
  18. package/claude-assets/skills/cfn-changelog-management/add-changelog-entry.sh +200 -0
  19. package/package.json +2 -1
  20. package/claude-assets/commands/cfn/auto-compact.md +0 -80
  21. package/claude-assets/commands/cfn/cfn-loop-epic.md +0 -478
  22. package/claude-assets/commands/cfn/cfn-loop-single.md +0 -256
  23. package/claude-assets/commands/cfn/cfn-loop-sprints.md +0 -396
  24. package/claude-assets/commands/cfn/cfn-loop.md +0 -518
  25. package/claude-assets/commands/cfn/claude-md.md +0 -64
  26. package/claude-assets/commands/cfn/claude-soul.md +0 -22
  27. package/claude-assets/commands/cfn/cost-savings-off.md +0 -35
  28. package/claude-assets/commands/cfn/cost-savings-on.md +0 -35
  29. package/claude-assets/commands/cfn/cost-savings-status.md +0 -34
  30. package/claude-assets/commands/cfn/custom-routing-activate.md +0 -55
  31. package/claude-assets/commands/cfn/custom-routing-deactivate.md +0 -46
  32. package/claude-assets/commands/cfn/dependency-recommendations.md +0 -171
  33. package/claude-assets/commands/cfn/fullstack.md +0 -179
  34. package/claude-assets/commands/cfn/github.md +0 -221
  35. package/claude-assets/commands/cfn/hooks.md +0 -38
  36. package/claude-assets/commands/cfn/metrics-summary.md +0 -58
  37. package/claude-assets/commands/cfn/neural.md +0 -39
  38. package/claude-assets/commands/cfn/parse-epic.md +0 -357
  39. package/claude-assets/commands/cfn/performance.md +0 -41
  40. package/claude-assets/commands/cfn/sparc.md +0 -46
  41. package/claude-assets/commands/cfn/suggest-improvements.md +0 -95
  42. package/claude-assets/commands/cfn/suggest-templates.md +0 -147
  43. package/claude-assets/commands/cfn/swarm.md +0 -24
@@ -0,0 +1,268 @@
1
+ ---
2
+ description: "Execute CFN Loop in CLI mode (production, cost-optimized, 95-98% savings)"
3
+ argument-hint: "<task description> [--mode=mvp|standard|enterprise] [--max-iterations=n]"
4
+ allowed-tools: ["Task", "TodoWrite", "Read", "Bash"]
5
+ ---
6
+
7
+ # CFN Loop CLI Mode - Production Execution
8
+
9
+ Execute CFN Loop using CLI spawning for maximum cost savings (95-98% vs Task tool).
10
+
11
+ 🚨 **CLI MODE: Production, Cost-Optimized, Background Execution**
12
+
13
+ **Task**: $ARGUMENTS
14
+
15
+ ## What is CLI Mode?
16
+
17
+ **CLI Mode Architecture:**
18
+ - Main Chat spawns **single coordinator agent** via Task()
19
+ - Coordinator spawns **all workers via CLI** (`npx claude-flow-novice`)
20
+ - CLI agents use **Z.ai custom routing** (when enabled)
21
+ - Background execution with **Redis monitoring**
22
+ - **95-98% cost savings** vs Task tool spawning
23
+
24
+ **Cost Breakdown:**
25
+ ```
26
+ ┌─────────────────────┬──────────────┬────────────┐
27
+ │ Component │ Provider │ Cost/Call │
28
+ ├─────────────────────┼──────────────┼────────────┤
29
+ │ Main Chat │ Anthropic │ $0.015 │
30
+ │ Coordinator (Task) │ Anthropic │ $0.015 │
31
+ │ Loop 3 Agents (CLI) │ Z.ai │ $0.003 ea │
32
+ │ Loop 2 Agents (CLI) │ Z.ai │ $0.003 ea │
33
+ │ Product Owner (CLI) │ Z.ai │ $0.003 │
34
+ └─────────────────────┴──────────────┴────────────┘
35
+
36
+ Total per iteration: ~$0.054 (vs $0.150 Task mode)
37
+ Savings: 64% with custom routing, 95-98% vs all-Task
38
+ ```
39
+
40
+ ## Prerequisites
41
+
42
+ **Enable Z.ai Custom Routing (One-Time Setup):**
43
+ ```bash
44
+ /switch-api zai
45
+ ```
46
+
47
+ **Verify Status:**
48
+ ```bash
49
+ /switch-api status
50
+ # Expected: Main Chat=Anthropic, Task=Anthropic, CLI=Z.ai
51
+ ```
52
+
53
+ ## Command Options
54
+
55
+ ```bash
56
+ # Standard mode (recommended)
57
+ /cfn-loop-cli "Implement JWT authentication"
58
+
59
+ # MVP mode (fast, lower quality gates)
60
+ /cfn-loop-cli "Build prototype feature" --mode=mvp
61
+
62
+ # Enterprise mode (high quality, more validators)
63
+ /cfn-loop-cli "Production security feature" --mode=enterprise --max-iterations=15
64
+ ```
65
+
66
+ **Options:**
67
+ - `--mode=<mvp|standard|enterprise>`: Quality mode (default: standard)
68
+ - `--max-iterations=<n>`: Max iterations per loop (default: 10)
69
+
70
+ ## Mode Comparison
71
+
72
+ | Mode | Gate | Consensus | Iterations | Validators | Use Case |
73
+ |------|------|-----------|------------|------------|----------|
74
+ | MVP | ≥0.70 | ≥0.80 | 5 | 2 | Prototypes, proof-of-concept |
75
+ | Standard | ≥0.75 | ≥0.90 | 10 | 3-4 | Production features |
76
+ | Enterprise | ≥0.85 | ≥0.95 | 15 | 5 | Security, compliance, critical systems |
77
+
78
+ ## Execution Instructions
79
+
80
+ **Main Chat will spawn ONLY the coordinator. Do NOT spawn workers directly.**
81
+
82
+ ```javascript
83
+ Task("cfn-v3-coordinator", `
84
+ CFN LOOP CLI MODE - PRODUCTION EXECUTION
85
+
86
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
87
+ TASK SPECIFICATION
88
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
89
+
90
+ Task Description: $ARGUMENTS
91
+ Task ID: cfn-cli-$(date +%s)
92
+ Mode: ${mode.toUpperCase()}
93
+
94
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
95
+ SUCCESS CRITERIA
96
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
97
+
98
+ Acceptance Criteria:
99
+ - [ ] Core functionality implemented
100
+ - [ ] All tests pass with >80% coverage
101
+ - [ ] Security review completed
102
+ - [ ] Documentation updated
103
+ - [ ] No regression in existing features
104
+
105
+ Quality Gates (${mode.toUpperCase()} MODE):
106
+ - Loop 3 Gate Threshold: ${mode === 'enterprise' ? 0.85 : mode === 'standard' ? 0.75 : 0.70}
107
+ - Loop 2 Consensus Threshold: ${mode === 'enterprise' ? 0.95 : mode === 'standard' ? 0.90 : 0.80}
108
+ - Max Iterations: ${maxIterations}
109
+
110
+ Definition of Done:
111
+ - Consensus ≥ threshold achieved
112
+ - All acceptance criteria met
113
+ - Product Owner approval received
114
+
115
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
116
+ ORCHESTRATION CONFIGURATION
117
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
118
+
119
+ Mode: ${mode.toUpperCase()}
120
+
121
+ Loop 3 Agents (Implementation) - SELECT BASED ON TASK:
122
+ Examples:
123
+ - Backend API: backend-dev, researcher, devops
124
+ - Full-Stack: backend-dev, react-frontend-engineer, devops
125
+ - Infrastructure: devops, rust-developer, researcher
126
+ - Security: security-specialist, backend-dev, researcher
127
+
128
+ Loop 2 Agents (Validation) - SCALE BY COMPLEXITY:
129
+ Simple (1-2 files): reviewer, tester
130
+ Standard (3-5 files): reviewer, tester, architect, security-specialist
131
+ Complex (>5 files): +code-analyzer, +performance-benchmarker
132
+
133
+ Product Owner: product-owner
134
+
135
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
136
+ EXECUTION INSTRUCTIONS
137
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
138
+
139
+ 1. INVOKE ORCHESTRATOR (CLI spawning):
140
+
141
+ TASK_ID="cfn-cli-$(date +%s)"
142
+ MODE="${mode}"
143
+ LOOP3_AGENTS="backend-dev,researcher,devops" # Customize for task
144
+ LOOP2_AGENTS="reviewer,tester,architect,security-specialist" # Scale by complexity
145
+
146
+ ./.claude/skills/cfn-loop-orchestration/orchestrate.sh \\
147
+ --task-id "$TASK_ID" \\
148
+ --mode "$MODE" \\
149
+ --loop3-agents "$LOOP3_AGENTS" \\
150
+ --loop2-agents "$LOOP2_AGENTS" \\
151
+ --product-owner "product-owner" \\
152
+ --max-iterations ${maxIterations}
153
+
154
+ 2. ORCHESTRATOR HANDLES:
155
+ - Spawns all agents via CLI (background)
156
+ - Loop 3: Gate check (≥threshold) → PASS/ITERATE
157
+ - Loop 2: Consensus check (≥threshold) → COMPLETE/ITERATE
158
+ - Product Owner: PROCEED/ITERATE/ABORT decision
159
+ - Git commit/push on PROCEED
160
+ - Returns structured result to Main Chat
161
+
162
+ 3. RETURN STRUCTURED RESULT:
163
+ {
164
+ "taskId": "cfn-cli-XXXXX",
165
+ "status": "complete|failed",
166
+ "iterations": {"loop3": N, "loop2": M},
167
+ "finalConsensus": 0.XX,
168
+ "acceptanceCriteria": {
169
+ "met": [...],
170
+ "pending": [...]
171
+ },
172
+ "deliverables": [...],
173
+ "recommendations": [...]
174
+ }
175
+
176
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
177
+ CRITICAL RULES
178
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
179
+
180
+ - DO NOT spawn agents with Task() - orchestrator uses CLI
181
+ - ALL agents run in background via npx claude-flow-novice
182
+ - USE Redis BLPOP for loop dependencies
183
+ - AGENTS use Z.ai routing automatically (when enabled)
184
+ - RETURN structured result when complete
185
+ `, "cfn-v3-coordinator")
186
+ ```
187
+
188
+ ## Autonomous Execution Rules
189
+
190
+ **YOU ARE FORBIDDEN FROM:**
191
+ - ❌ Asking "Should I retry?" (coordinator handles automatically)
192
+ - ❌ Asking "Proceed to consensus?" (orchestrator decides)
193
+ - ❌ Waiting for approval during CFN Loop cycles
194
+ - ❌ Spawning workers with Task() (use coordinator only)
195
+
196
+ **YOU MUST:**
197
+ - ✅ ALWAYS spawn single coordinator agent
198
+ - ✅ LET coordinator invoke orchestrator internally
199
+ - ✅ COORDINATOR handles all loop execution autonomously
200
+ - ✅ ONLY return to chat when complete or blocked
201
+
202
+ ## CLI Mode Benefits
203
+
204
+ **Cost Savings:**
205
+ - 64% savings with Z.ai routing vs all-Anthropic
206
+ - 95-98% savings vs Task tool spawning
207
+ - Scales linearly with iterations (Task mode scales exponentially)
208
+
209
+ **Production Features:**
210
+ - Background execution (no timeout issues)
211
+ - Redis state persistence (crash recovery)
212
+ - Zero-token waiting (BLPOP blocks without API calls)
213
+ - Web portal visibility (http://localhost:3000)
214
+
215
+ **Performance:**
216
+ - Parallel agent spawning (no sequential bottleneck)
217
+ - Instant wake-up (<100ms latency)
218
+ - Scalable (10+ agents, indefinite cycles)
219
+
220
+ ## When to Use CLI Mode
221
+
222
+ **Use CLI Mode for:**
223
+ - ✅ Production features
224
+ - ✅ Long-running tasks (>10 min)
225
+ - ✅ Multi-iteration workflows
226
+ - ✅ Cost-sensitive projects
227
+ - ✅ Background execution
228
+
229
+ **Use Task Mode for:**
230
+ - Debugging (full visibility needed)
231
+ - Learning CFN Loop workflow
232
+ - Short prototypes (<5 min)
233
+ - Single-iteration tasks
234
+
235
+ ## Troubleshooting
236
+
237
+ **Custom routing not working:**
238
+ ```bash
239
+ /switch-api status # Check current provider
240
+ /switch-api zai # Enable Z.ai routing
241
+ ```
242
+
243
+ **Coordinator timeout:**
244
+ - Expected for long tasks (>10 min)
245
+ - Check web portal for progress: http://localhost:3000
246
+ - Query Redis: `redis-cli HGETALL "cfn_loop:task:$TASK_ID:context"`
247
+
248
+ **No deliverables created:**
249
+ - Orchestrator validates deliverables before PROCEED
250
+ - Will force ITERATE if git diff shows zero changes
251
+ - Check coordinator output for validation failures
252
+
253
+ ## Related Commands
254
+
255
+ - **Task Mode**: `/cfn-loop-task` (debugging, full visibility)
256
+ - **Frontend**: `/cfn-loop-frontend` (visual iteration workflow)
257
+ - **Documentation**: `/cfn-loop-document` (generate docs)
258
+
259
+ ## Related Documentation
260
+
261
+ - Task Mode Guide: `.claude/commands/cfn/CFN_LOOP_TASK_MODE.md`
262
+ - Coordinator Parameters: `.claude/commands/cfn/CFN_COORDINATOR_PARAMETERS.md`
263
+ - Redis Coordination: `.claude/skills/cfn-redis-coordination/SKILL.md`
264
+ - Orchestration: `.claude/skills/cfn-loop-orchestration/SKILL.md`
265
+
266
+ ---
267
+
268
+ **Version:** 1.0.0 (2025-10-31) - CLI mode: production execution, cost-optimized, background processing
@@ -398,13 +398,32 @@ Validating documentation...
398
398
  Documentation update complete.
399
399
  ```
400
400
 
401
+ ## CFN Loop Command Structure (v3.0)
402
+
403
+ **Current Commands (as of 2025-10-31):**
404
+ 1. `/cfn-loop-task` - Task mode (debugging, full visibility)
405
+ 2. `/cfn-loop-cli` - CLI mode (production, cost-optimized)
406
+ 3. `/cfn-loop-frontend` - Visual iteration (screenshot + video validation)
407
+ 4. `/cfn-loop-document` - Documentation generation (this command)
408
+
409
+ **Removed Commands (deprecated 2025-10-31):**
410
+ - ❌ `/cfn-loop` (replaced by `/cfn-loop-cli` or `/cfn-loop-task`)
411
+ - ❌ `/cfn-loop-single` (replaced by `/cfn-loop-cli`)
412
+ - ❌ `/cfn-loop-epic` (use multiple `/cfn-loop-cli` executions)
413
+ - ❌ `/cfn-loop-sprints` (use `/cfn-loop-cli` per sprint)
414
+
415
+ **When documenting CFN Loop features:**
416
+ - Reference correct command names (task/cli/frontend/document)
417
+ - Update examples to use new commands
418
+ - Mark deprecated commands clearly in changelog
419
+ - Maintain backward compatibility notes
420
+
401
421
  ## Integration with CFN Loop
402
422
 
403
423
  ### Auto-Trigger Conditions
404
424
  ```javascript
405
425
  // Automatically trigger documentation after:
406
426
  if (
407
- epicComplete || // Epic completion
408
427
  sprintComplete || // Sprint completion
409
428
  majorPhaseComplete || // Major phase completion
410
429
  newSlashCommandAdded || // New slash command
@@ -94,7 +94,7 @@ npm install -D @playwright/test
94
94
 
95
95
  ## Execution Pattern
96
96
 
97
- ### Step 1: Parse Command Arguments
97
+ ### Step 1: Parse Command Arguments & Determine Mode
98
98
 
99
99
  ```javascript
100
100
  const params = {
@@ -107,9 +107,24 @@ const params = {
107
107
  };
108
108
 
109
109
  console.log(`Frontend CFN Loop: ${params.mode} mode, ${params.spawnMode} spawning`);
110
+
111
+ // MODE DETECTION: Inject mode-specific instructions
112
+ if (params.spawnMode === 'cli') {
113
+ console.log('━━━ CLI MODE INSTRUCTIONS ━━━');
114
+ console.log('Main Chat spawns ONLY cfn-frontend-coordinator');
115
+ console.log('Coordinator handles all visual iteration internally');
116
+ console.log('CLI agents use Z.ai routing (when enabled)');
117
+ console.log('Background execution with Redis monitoring');
118
+ } else {
119
+ console.log('━━━ TASK MODE INSTRUCTIONS ━━━');
120
+ console.log('Main Chat coordinates entire visual iteration workflow');
121
+ console.log('NO coordinator agent spawned');
122
+ console.log('Main Chat spawns all agents via Task()');
123
+ console.log('Full visibility in Main Chat');
124
+ }
110
125
  ```
111
126
 
112
- ### Step 2: Mode Selection
127
+ ### Step 2: Execute Based on Mode
113
128
 
114
129
  #### CLI Mode (Default) - Spawn Frontend Coordinator
115
130