claude-flow-novice 2.14.18 → 2.14.19

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 (35) hide show
  1. package/.claude/commands/CFN_EXPERT_UPDATE.md +142 -0
  2. package/.claude/commands/cfn-docker/CFN_DOCKER_CLI.md +527 -0
  3. package/.claude/commands/cfn-docker/CFN_DOCKER_LOOP.md +377 -0
  4. package/.claude/commands/cfn-docker/CFN_DOCKER_TASK.md +490 -0
  5. package/.claude/commands/cfn-loop-cli.md +220 -46
  6. package/.claude/commands/deprecated/README.md +55 -0
  7. package/claude-assets/agents/docker-coordinators/cfn-docker-v3-coordinator.md +199 -0
  8. package/claude-assets/commands/CFN_EXPERT_UPDATE.md +142 -0
  9. package/claude-assets/commands/cfn-docker/CFN_DOCKER_CLI.md +527 -0
  10. package/claude-assets/commands/cfn-docker/CFN_DOCKER_LOOP.md +377 -0
  11. package/claude-assets/commands/cfn-docker/CFN_DOCKER_TASK.md +490 -0
  12. package/claude-assets/commands/cfn-loop-cli.md +220 -46
  13. package/claude-assets/commands/deprecated/README.md +55 -0
  14. package/claude-assets/skills/cfn-docker-agent-spawning/SKILL.md +394 -0
  15. package/claude-assets/skills/cfn-docker-agent-spawning/spawn-agent.sh +461 -0
  16. package/claude-assets/skills/cfn-docker-loop-orchestration/SKILL.md +449 -0
  17. package/claude-assets/skills/cfn-docker-loop-orchestration/orchestrate.sh +787 -0
  18. package/claude-assets/skills/cfn-docker-redis-coordination/SKILL.md +435 -0
  19. package/claude-assets/skills/cfn-docker-redis-coordination/coordinate.sh +635 -0
  20. package/claude-assets/skills/cfn-docker-skill-mcp-selection/SKILL.md +289 -0
  21. package/claude-assets/skills/cfn-docker-skill-mcp-selection/skill-mcp-selector.js +472 -0
  22. package/claude-assets/skills/cfn-expert-update/update-expert.sh +346 -0
  23. package/dist/agents/agent-loader.js +165 -146
  24. package/dist/agents/agent-loader.js.map +1 -1
  25. package/package.json +1 -1
  26. /package/.claude/commands/{cfn-loop-epic.md → deprecated/cfn-loop-epic.md} +0 -0
  27. /package/.claude/commands/{cfn-loop-single.md → deprecated/cfn-loop-single.md} +0 -0
  28. /package/.claude/commands/{cfn-loop-sprints.md → deprecated/cfn-loop-sprints.md} +0 -0
  29. /package/.claude/commands/{cfn-loop.md → deprecated/cfn-loop.md} +0 -0
  30. /package/.claude/commands/{cfn/run-tests.md → run-tests.md} +0 -0
  31. /package/claude-assets/commands/{cfn-loop-epic.md → deprecated/cfn-loop-epic.md} +0 -0
  32. /package/claude-assets/commands/{cfn-loop-single.md → deprecated/cfn-loop-single.md} +0 -0
  33. /package/claude-assets/commands/{cfn-loop-sprints.md → deprecated/cfn-loop-sprints.md} +0 -0
  34. /package/claude-assets/commands/{cfn-loop.md → deprecated/cfn-loop.md} +0 -0
  35. /package/claude-assets/commands/{cfn/run-tests.md → run-tests.md} +0 -0
@@ -0,0 +1,449 @@
1
+ # CFN Docker Loop Orchestration Skill
2
+
3
+ **Purpose:** Orchestrate container-based CFN Loop execution with agent spawning, loop management, consensus collection, and product owner decision flow.
4
+
5
+ ## Overview
6
+
7
+ This skill manages the complete CFN Loop execution lifecycle for docker-based agents, coordinating Loop 3 (implementer) and Loop 2 (validator) phases, collecting confidence scores and consensus, and triggering Product Owner decisions.
8
+
9
+ ## Architecture
10
+
11
+ ```bash
12
+ CFN Docker V3 Coordinator
13
+ ↓ (task analysis)
14
+ CFN Docker Loop Orchestration
15
+ ↓ (context storage)
16
+ Redis (State Management)
17
+ ↓ (agent spawning)
18
+ CFN Docker Agent Spawning
19
+ ↓ (container execution)
20
+ Docker Containers (Agents)
21
+ ↓ (completion signals)
22
+ Consensus Collection
23
+ ↓ (decision flow)
24
+ Product Owner Decision
25
+ ```
26
+
27
+ ## Loop Execution Model
28
+
29
+ ### Loop 3: Primary Implementation (Implementers)
30
+ - **Purpose**: Create, build, and implement the solution
31
+ - **Agents**: 3 specialized implementers based on task requirements
32
+ - **Process**: Parallel execution → Confidence reporting → Gate check
33
+
34
+ ### Loop 2: Consensus Validation (Validators)
35
+ - **Purpose**: Review and validate Loop 3 work
36
+ - **Agents**: 2-4 validators (reviewers, testers, security specialists)
37
+ - **Process**: Sequential validation → Consensus collection → Decision
38
+
39
+ ### Loop 4: Product Owner Decision
40
+ - **Purpose**: Strategic decision based on consensus and deliverables
41
+ - **Agent**: Single product owner with GOAP methodology
42
+ - **Process**: Decision analysis → PROCEED/ITERATE/ABORT
43
+
44
+ ## Core Functions
45
+
46
+ ### 1. Task Analysis and Context Setup
47
+ Analyze task requirements and prepare execution context:
48
+
49
+ ```bash
50
+ # Initialize loop orchestration
51
+ cfn-docker-loop-orchestration init \
52
+ --task-id task-authentication \
53
+ --task-description "Implement user authentication system" \
54
+ --mode standard \
55
+ --max-iterations 5
56
+ ```
57
+
58
+ ### 2. Loop 3 Agent Spawning
59
+ Spawn implementer agents based on task requirements:
60
+
61
+ ```bash
62
+ # Spawn Loop 3 implementers
63
+ cfn-docker-loop-orchestration spawn-loop3 \
64
+ --task-id task-authentication \
65
+ --agents backend-developer,frontend-engineer,security-specialist \
66
+ --context "${TASK_CONTEXT}"
67
+ ```
68
+
69
+ ### 3. Loop 3 Completion Monitoring
70
+ Monitor implementer progress and collect confidence scores:
71
+
72
+ ```bash
73
+ # Monitor Loop 3 completion
74
+ cfn-docker-loop-orchestration monitor-loop3 \
75
+ --task-id task-authentication \
76
+ --wait-for-complete \
77
+ --gate-threshold 0.75
78
+ ```
79
+
80
+ ### 4. Gate Check and Decision
81
+ Evaluate Loop 3 results and decide next steps:
82
+
83
+ ```bash
84
+ # Check Loop 3 gate
85
+ cfn-docker-loop-orchestration gate-check \
86
+ --task-id task-authentication \
87
+ --gate-threshold 0.75 \
88
+ --max-iterations 5
89
+ ```
90
+
91
+ ### 5. Loop 2 Validator Spawning
92
+ Spawn validator agents if gate passed:
93
+
94
+ ```bash
95
+ # Spawn Loop 2 validators
96
+ cfn-docker-loop-orchestration spawn-loop2 \
97
+ --task-id task-authentication \
98
+ --agents reviewer,tester,security-specialist \
99
+ --loop3-work "${WORK_SUMMARY}"
100
+ ```
101
+
102
+ ### 6. Consensus Collection
103
+ Collect and analyze validator consensus:
104
+
105
+ ```bash
106
+ # Collect Loop 2 consensus
107
+ cfn-docker-loop-orchestration collect-consensus \
108
+ --task-id task-authentication \
109
+ --required-consensus 0.90 \
110
+ --timeout 300
111
+ ```
112
+
113
+ ### 7. Product Owner Decision
114
+ Trigger final decision process:
115
+
116
+ ```bash
117
+ # Trigger Product Owner decision
118
+ cfn-docker-loop-orchestration trigger-po-decision \
119
+ --task-id task-authentication \
120
+ --consensus-data "${CONSENSUS_RESULTS}"
121
+ ```
122
+
123
+ ## Loop Management
124
+
125
+ ### Iteration Control
126
+ ```bash
127
+ # Control loop iterations
128
+ cfn-docker-loop-orchestration control-iterations \
129
+ --task-id task-authentication \
130
+ --current-iteration 2 \
131
+ --max-iterations 5 \
132
+ --gate-threshold 0.75 \
133
+ --consensus-threshold 0.90
134
+ ```
135
+
136
+ ### Adaptive Agent Selection
137
+ ```bash
138
+ # Select agents based on iteration and feedback
139
+ cfn-docker-loop-orchestration select-adaptive-agents \
140
+ --task-id task-authentication \
141
+ --iteration 2 \
142
+ --previous-feedback "${FEEDBACK_DATA}"
143
+ ```
144
+
145
+ ### Error Handling and Recovery
146
+ ```bash
147
+ # Handle execution errors
148
+ cfn-docker-loop-orchestration handle-errors \
149
+ --task-id task-authentication \
150
+ --error-type agent-failure \
151
+ --failed-agent-id agent-backend-001 \
152
+ --restart-strategy adaptive
153
+ ```
154
+
155
+ ## Configuration Modes
156
+
157
+ ### MVP Mode (Quick Execution)
158
+ ```bash
159
+ cfn-docker-loop-orchestration execute \
160
+ --task-id task-authentication \
161
+ --mode mvp \
162
+ --max-iterations 3 \
163
+ --gate-threshold 0.70 \
164
+ --consensus-threshold 0.80 \
165
+ --validators 2
166
+ ```
167
+
168
+ ### Standard Mode (Balanced)
169
+ ```bash
170
+ cfn-docker-loop-orchestration execute \
171
+ --task-id task-authentication \
172
+ --mode standard \
173
+ --max-iterations 10 \
174
+ --gate-threshold 0.75 \
175
+ --consensus-threshold 0.90 \
176
+ --validators 3
177
+ ```
178
+
179
+ ### Enterprise Mode (Thorough)
180
+ ```bash
181
+ cfn-docker-loop-orchestration execute \
182
+ --task-id task-authentication \
183
+ --mode enterprise \
184
+ --max-iterations 15 \
185
+ --gate-threshold 0.85 \
186
+ --consensus-threshold 0.95 \
187
+ --validators 5
188
+ ```
189
+
190
+ ## Agent Selection Strategy
191
+
192
+ ### Task-Based Agent Selection
193
+ ```bash
194
+ # Analyze task and select appropriate agents
195
+ cfn-docker-loop-orchestration analyze-and-select \
196
+ --task-description "Implement secure user authentication" \
197
+ --output-agent-types
198
+ ```
199
+
200
+ ### Skill-Based Selection
201
+ ```bash
202
+ # Select agents based on required skills
203
+ cfn-docker-loop-orchestration select-by-skills \
204
+ --required-skills "security,backend-development,frontend-development" \
205
+ --agent-count 3
206
+ ```
207
+
208
+ ### Experience-Based Selection
209
+ ```bash
210
+ # Select agents based on previous performance
211
+ cfn-docker-loop-orchestration select-by-experience \
212
+ --task-domain authentication \
213
+ --success-threshold 0.85
214
+ ```
215
+
216
+ ## Integration with CFN Docker Skills
217
+
218
+ ### Redis Coordination Integration
219
+ ```bash
220
+ # Store loop state in Redis
221
+ cfn-docker-redis-coordination store-loop-state \
222
+ --task-id task-authentication \
223
+ --loop-number 3 \
224
+ --iteration 1 \
225
+ --state "in-progress"
226
+
227
+ # Retrieve loop state
228
+ cfn-docker-redis-coordination get-loop-state \
229
+ --task-id task-authentication \
230
+ --loop-number 3
231
+ ```
232
+
233
+ ### Agent Spawning Integration
234
+ ```bash
235
+ # Spawn agents with MCP configuration
236
+ cfn-docker-agent-spawn batch \
237
+ --agent-types backend-developer,frontend-engineer \
238
+ --task-id task-authentication \
239
+ --mcp-auto-select
240
+ ```
241
+
242
+ ### Skill Selection Integration
243
+ ```bash
244
+ # Configure MCP access for agents
245
+ for agent_type in backend-developer frontend-engineer; do
246
+ cfn-docker-skill-mcp-selector configure \
247
+ --agent-type $agent_type \
248
+ --task-id task-authentication
249
+ done
250
+ ```
251
+
252
+ ## Monitoring and Observability
253
+
254
+ ### Loop Progress Monitoring
255
+ ```bash
256
+ # Monitor overall loop progress
257
+ cfn-docker-loop-orchestration monitor-progress \
258
+ --task-id task-authentication \
259
+ --real-time \
260
+ --include-agents
261
+
262
+ # Monitor specific loop
263
+ cfn-docker-loop-orchestration monitor-loop \
264
+ --task-id task-authentication \
265
+ --loop-number 3 \
266
+ --detailed
267
+ ```
268
+
269
+ ### Performance Metrics
270
+ ```bash
271
+ # Collect performance metrics
272
+ cfn-docker-loop-orchestration metrics \
273
+ --task-id task-authentication \
274
+ --include-timing \
275
+ --include-resource-usage \
276
+ --include-confidence-trends
277
+ ```
278
+
279
+ ### Agent Performance Tracking
280
+ ```bash
281
+ # Track agent performance across loops
282
+ cfn-docker-loop-orchestration agent-performance \
283
+ --task-id task-authentication \
284
+ --agent-id agent-backend-001 \
285
+ --all-iterations
286
+ ```
287
+
288
+ ## Decision Flow Logic
289
+
290
+ ### Gate Check Algorithm
291
+ 1. **Collect Confidence Scores**: Gather all Loop 3 confidence scores
292
+ 2. **Calculate Average**: Compute mean confidence score
293
+ 3. **Check Threshold**: Compare against gate threshold
294
+ 4. **Decision Logic**:
295
+ - `confidence >= threshold` → Proceed to Loop 2
296
+ - `confidence < threshold` → Iterate Loop 3 (if iterations remaining)
297
+
298
+ ### Consensus Validation Algorithm
299
+ 1. **Collect Validator Feedback**: Gather all Loop 2 validator responses
300
+ 2. **Calculate Consensus**: Compute average confidence and agreement level
301
+ 3. **Check Threshold**: Compare against consensus threshold
302
+ 4. **Decision Logic**:
303
+ - `consensus >= threshold` → Trigger Product Owner
304
+ - `consensus < threshold` → Iterate (if iterations remaining)
305
+
306
+ ### Product Owner Decision Triggers
307
+ 1. **High Consensus (≥0.95)**: AUTO-COMPLETE
308
+ 2. **Good Consensus (≥threshold)**: PROCEED to Product Owner
309
+ 3. **Low Consensus (<threshold)**: ITERATE with specific feedback
310
+
311
+ ## Error Handling Strategies
312
+
313
+ ### Agent Failure Handling
314
+ ```bash
315
+ # Handle agent container failure
316
+ cfn-docker-loop-orchestration handle-agent-failure \
317
+ --task-id task-authentication \
318
+ --failed-agent-id agent-backend-001 \
319
+ --strategy respawn \
320
+ --backup-agent-type backend-developer
321
+ ```
322
+
323
+ ### Timeout Handling
324
+ ```bash
325
+ # Handle loop timeouts
326
+ cfn-docker-loop-orchestration handle-timeout \
327
+ --task-id task-authentication \
328
+ --loop-number 3 \
329
+ --timeout-extension 300
330
+ ```
331
+
332
+ ### MCP Server Failures
333
+ ```bash
334
+ # Handle MCP server connectivity issues
335
+ cfn-docker-loop-orchestration handle-mcp-failure \
336
+ --task-id task-authentication \
337
+ --failed-mcp playwright \
338
+ --fallback direct-tools
339
+ ```
340
+
341
+ ## Performance Optimization
342
+
343
+ ### Parallel Execution
344
+ - **Loop 3**: Spawn all implementers simultaneously
345
+ - **Loop 2**: Sequential validator execution to prevent conflicts
346
+ - **Resource Management**: Balance concurrent execution with resource limits
347
+
348
+ ### Adaptive Iteration
349
+ - **Smart Iteration**: Only iterate when specific issues identified
350
+ - **Agent Specialization**: Select different specialists based on feedback
351
+ - **Context Preservation**: Maintain context across iterations
352
+
353
+ ### Resource Optimization
354
+ - **Container Reuse**: Reuse containers where possible
355
+ - **MCP Server Optimization**: Share MCP servers across compatible agents
356
+ - **Memory Management**: Optimize memory usage across loop phases
357
+
358
+ ## Quality Assurance
359
+
360
+ ### Deliverable Validation
361
+ ```bash
362
+ # Validate required deliverables created
363
+ cfn-docker-loop-orchestration validate-deliverables \
364
+ --task-id task-authentication \
365
+ --required-files "auth-service.js,login.html" \
366
+ --acceptance-criteria "${CRITERIA}"
367
+ ```
368
+
369
+ ### Code Quality Checks
370
+ ```bash
371
+ # Run automated quality checks
372
+ cfn-docker-loop-orchestration quality-check \
373
+ --task-id task-authentication \
374
+ --include-linting \
375
+ --include-security-scan \
376
+ --include-tests
377
+ ```
378
+
379
+ ### Integration Testing
380
+ ```bash
381
+ # Run integration tests for complete solution
382
+ cfn-docker-loop-orchestration integration-test \
383
+ --task-id task-authentication \
384
+ --test-suite authentication-tests
385
+ ```
386
+
387
+ ## Best Practices
388
+
389
+ ### Loop Design
390
+ - **Clear Success Criteria**: Define measurable success criteria for each loop
391
+ - **Appropriate Thresholds**: Set realistic confidence and consensus thresholds
392
+ - **Iteration Limits**: Establish maximum iteration limits to prevent infinite loops
393
+
394
+ ### Agent Selection
395
+ - **Task-Appropriate Skills**: Select agents with relevant domain expertise
396
+ - **Diverse Perspectives**: Include different agent types for comprehensive coverage
397
+ - **Performance History**: Consider past agent performance when selecting
398
+
399
+ ### Error Recovery
400
+ - **Graceful Degradation**: Implement fallback mechanisms for failures
401
+ - **State Persistence**: Maintain state for recovery from interruptions
402
+ - **Monitoring**: Comprehensive monitoring for early issue detection
403
+
404
+ ## Configuration
405
+
406
+ ### Environment Variables
407
+ ```bash
408
+ # Loop configuration
409
+ CFN_DOCKER_MAX_ITERATIONS=10
410
+ CFN_DOCKER_GATE_THRESHOLD=0.75
411
+ CFN_DOCKER_CONSENSUS_THRESHOLD=0.90
412
+ CFN_DOCKER_LOOP_TIMEOUT=600
413
+
414
+ # Agent configuration
415
+ CFN_DOCKER_MAX_CONCURRENT_AGENTS=5
416
+ CFN_DOCKER_AGENT_TIMEOUT=300
417
+ CFN_DOCKER_CONTAINER_MEMORY_LIMIT=1g
418
+
419
+ # Decision configuration
420
+ CFN_DOCKER_AUTO_COMPLETE_THRESHOLD=0.95
421
+ CFN_DOCKER_FORCE_ITERATION_THRESHOLD=0.60
422
+ ```
423
+
424
+ ### Loop Configuration File
425
+ ```json
426
+ {
427
+ "loopConfig": {
428
+ "maxIterations": 10,
429
+ "gateThreshold": 0.75,
430
+ "consensusThreshold": 0.90,
431
+ "loopTimeouts": {
432
+ "loop3": 600,
433
+ "loop2": 300,
434
+ "productOwner": 180
435
+ }
436
+ },
437
+ "agentConfig": {
438
+ "maxConcurrentAgents": 5,
439
+ "defaultMemoryLimit": "1g",
440
+ "defaultCpuLimit": 1.0,
441
+ "restartPolicy": "on-failure"
442
+ },
443
+ "decisionConfig": {
444
+ "autoCompleteThreshold": 0.95,
445
+ "forceIterationThreshold": 0.60,
446
+ "enableAdaptiveSelection": true
447
+ }
448
+ }
449
+ ```