claude-flow-novice 2.15.6 → 2.15.7

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 (113) hide show
  1. package/.claude/skills/cfn-loop-orchestration/helpers/gate-check.sh +39 -577
  2. package/.claude/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +49 -270
  3. package/.claude/skills/cfn-loop-orchestration/src/helpers/consensus.ts +87 -0
  4. package/.claude/skills/cfn-loop-orchestration/src/helpers/gate-check.ts +115 -0
  5. package/.claude/skills/cfn-loop-orchestration/src/helpers/parse-test-results.ts +372 -0
  6. package/.claude/skills/cfn-loop-orchestration/tests/consensus.test.ts +142 -0
  7. package/.claude/skills/cfn-loop-orchestration/tests/deliverable-verifier.test.ts +199 -0
  8. package/.claude/skills/cfn-loop-orchestration/tests/gate-check.test.ts +325 -0
  9. package/.claude/skills/cfn-loop-orchestration/tests/iteration-manager.test.ts +132 -0
  10. package/.claude/skills/cfn-loop-orchestration/tests/parse-test-results.test.ts +382 -0
  11. package/.claude/skills/cfn-loop-orchestration/tests/timeout-calculator.test.ts +118 -0
  12. package/.claude/skills/cfn-redis-coordination/coverage/clover.xml +1447 -0
  13. package/.claude/skills/cfn-redis-coordination/coverage/coverage-final.json +13 -0
  14. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/agent-logger.ts.html +1423 -0
  15. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/agent-recovery.ts.html +1447 -0
  16. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/base.css +224 -0
  17. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/block-navigation.js +87 -0
  18. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/completion-reporter.ts.html +1273 -0
  19. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/context-manager.ts.html +1066 -0
  20. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/favicon.png +0 -0
  21. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/index.html +281 -0
  22. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/mode-detector.ts.html +550 -0
  23. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/prettify.css +1 -0
  24. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/prettify.js +2 -0
  25. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/redis-client.ts.html +2047 -0
  26. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/result-collector.ts.html +1396 -0
  27. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  28. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/sorter.js +210 -0
  29. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/swarm-manager.ts.html +1567 -0
  30. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/task-analyzer.ts.html +1297 -0
  31. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/task-executor.ts.html +1354 -0
  32. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/types.ts.html +790 -0
  33. package/.claude/skills/cfn-redis-coordination/coverage/lcov-report/waiting-coordinator.ts.html +1846 -0
  34. package/.claude/skills/cfn-redis-coordination/coverage/lcov.info +2650 -0
  35. package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.js +1 -1
  36. package/.claude/skills/cfn-redis-coordination/src/task-analyzer.ts +1 -1
  37. package/.claude/skills/cfn-redis-coordination/tests/coordination.test.ts +18 -9
  38. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +13 -72
  39. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +5 -65
  40. package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +465 -508
  41. package/claude-assets/agents/cfn-dev-team/coordinators/handoff-coordinator.md +733 -743
  42. package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +13 -79
  43. package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +13 -18
  44. package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +13 -18
  45. package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +13 -18
  46. package/claude-assets/agents/cfn-dev-team/developers/backend-developer.md +15 -17
  47. package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +15 -17
  48. package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +15 -14
  49. package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +15 -17
  50. package/claude-assets/agents/cfn-dev-team/developers/frontend/react-frontend-engineer.md +15 -17
  51. package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +15 -17
  52. package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +23 -30
  53. package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +13 -18
  54. package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +13 -18
  55. package/claude-assets/agents/cfn-dev-team/reviewers/code-reviewer.md +312 -317
  56. package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +23 -20
  57. package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +23 -20
  58. package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +23 -20
  59. package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +23 -20
  60. package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +15 -20
  61. package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +15 -20
  62. package/claude-assets/agents/cfn-dev-team/testers/contract-tester.md +718 -737
  63. package/claude-assets/agents/cfn-dev-team/testers/integration-tester.md +817 -828
  64. package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +15 -20
  65. package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +8 -9
  66. package/claude-assets/agents/cfn-dev-team/testers/mutation-testing-specialist.md +668 -684
  67. package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +15 -20
  68. package/claude-assets/agents/cfn-dev-team/testers/tester.md +248 -253
  69. package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +13 -18
  70. package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +13 -18
  71. package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +13 -18
  72. package/claude-assets/skills/cfn-loop-orchestration/helpers/gate-check.sh +39 -577
  73. package/claude-assets/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +49 -270
  74. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/gate-check.ts +115 -0
  75. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/parse-test-results.ts +372 -0
  76. package/claude-assets/skills/cfn-loop-orchestration/tests/consensus.test.ts +142 -0
  77. package/claude-assets/skills/cfn-loop-orchestration/tests/deliverable-verifier.test.ts +199 -0
  78. package/claude-assets/skills/cfn-loop-orchestration/tests/gate-check.test.ts +325 -0
  79. package/claude-assets/skills/cfn-loop-orchestration/tests/iteration-manager.test.ts +132 -0
  80. package/claude-assets/skills/cfn-loop-orchestration/tests/parse-test-results.test.ts +382 -0
  81. package/claude-assets/skills/cfn-loop-orchestration/tests/timeout-calculator.test.ts +118 -0
  82. package/claude-assets/skills/cfn-redis-coordination/coverage/clover.xml +1447 -0
  83. package/claude-assets/skills/cfn-redis-coordination/coverage/coverage-final.json +13 -0
  84. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/agent-logger.ts.html +1423 -0
  85. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/agent-recovery.ts.html +1447 -0
  86. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/base.css +224 -0
  87. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/block-navigation.js +87 -0
  88. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/completion-reporter.ts.html +1273 -0
  89. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/context-manager.ts.html +1066 -0
  90. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/favicon.png +0 -0
  91. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/index.html +281 -0
  92. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/mode-detector.ts.html +550 -0
  93. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/prettify.css +1 -0
  94. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/prettify.js +2 -0
  95. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/redis-client.ts.html +2047 -0
  96. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/result-collector.ts.html +1396 -0
  97. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  98. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/sorter.js +210 -0
  99. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/swarm-manager.ts.html +1567 -0
  100. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/task-analyzer.ts.html +1297 -0
  101. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/task-executor.ts.html +1354 -0
  102. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/types.ts.html +790 -0
  103. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov-report/waiting-coordinator.ts.html +1846 -0
  104. package/claude-assets/skills/cfn-redis-coordination/coverage/lcov.info +2650 -0
  105. package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.js +1 -1
  106. package/claude-assets/skills/cfn-redis-coordination/src/task-analyzer.ts +1 -1
  107. package/claude-assets/skills/cfn-redis-coordination/tests/coordination.test.ts +18 -9
  108. package/dist/agents/agent-loader.js +165 -146
  109. package/dist/agents/agent-loader.js.map +1 -1
  110. package/dist/cli/config-manager.js +91 -109
  111. package/dist/cli/config-manager.js.map +1 -1
  112. package/package.json +1 -1
  113. package/scripts/clean-agent-profiles.sh +112 -0
@@ -100,7 +100,7 @@ class TaskAnalyzer {
100
100
  else if (complexityScore <= 9) {
101
101
  finalDifficulty = 'standard';
102
102
  }
103
- else if (complexityScore <= 15) {
103
+ else if (complexityScore <= 12) {
104
104
  finalDifficulty = 'complex';
105
105
  }
106
106
  else {
@@ -139,7 +139,7 @@ export class TaskAnalyzer {
139
139
  finalDifficulty = 'simple';
140
140
  } else if (complexityScore <= 9) {
141
141
  finalDifficulty = 'standard';
142
- } else if (complexityScore <= 15) {
142
+ } else if (complexityScore <= 12) {
143
143
  finalDifficulty = 'complex';
144
144
  } else {
145
145
  finalDifficulty = 'enterprise';
@@ -323,6 +323,8 @@ describe('Completion Reporter', () => {
323
323
  });
324
324
 
325
325
  it('should report test results with valid pass rate', async () => {
326
+ jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
327
+
326
328
  const taskId = 'task-123' as any;
327
329
  const agentId = 'agent-1' as any;
328
330
  const results = {
@@ -333,7 +335,7 @@ describe('Completion Reporter', () => {
333
335
  timestamp: new Date().toISOString()
334
336
  };
335
337
 
336
- // Should not throw
338
+ // Should not throw in Task Mode
337
339
  await expect(
338
340
  reporter.reportTestResults(taskId, agentId, results)
339
341
  ).resolves.not.toThrow();
@@ -574,7 +576,7 @@ describe('Task Analyzer', () => {
574
576
  expect(analyzer.suggestMode(simple)).toBe('mvp');
575
577
 
576
578
  const complex = analyzer.analyzeComplexity(
577
- 'Enterprise multi-tenant distributed system with ML integration'
579
+ 'Enterprise multi-tenant distributed system with ML integration and compliance requirements'
578
580
  );
579
581
  expect(analyzer.suggestMode(complex)).toBe('enterprise');
580
582
  });
@@ -676,7 +678,8 @@ describe('Integration scenarios', () => {
676
678
  const redis = new RedisCoordinator();
677
679
  const logger = new ConsoleLogger('[Integration]');
678
680
 
679
- jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(true);
681
+ // Task Mode: graceful no-op behavior
682
+ jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
680
683
 
681
684
  const context = new ContextManager(redis, logger);
682
685
  const completion = new CompletionReporter(redis, logger);
@@ -685,11 +688,15 @@ describe('Integration scenarios', () => {
685
688
  const taskId = 'integration-test' as any;
686
689
  const agentId = 'test-agent' as any;
687
690
 
688
- // Agent starts work
689
- await recovery.recordHeartbeat(taskId, agentId, 12345);
691
+ // Agent starts work (Task Mode no-op)
692
+ await expect(
693
+ recovery.recordHeartbeat(taskId, agentId, 12345)
694
+ ).resolves.not.toThrow();
690
695
 
691
- // Agent completes
692
- await completion.reportCompletion(taskId, agentId, 0.92);
696
+ // Agent completes (Task Mode no-op)
697
+ await expect(
698
+ completion.reportCompletion(taskId, agentId, 0.92)
699
+ ).resolves.not.toThrow();
693
700
 
694
701
  // Verify context was handled correctly
695
702
  expect(context).toBeDefined();
@@ -699,7 +706,8 @@ describe('Integration scenarios', () => {
699
706
  const redis = new RedisCoordinator();
700
707
  const logger = new ConsoleLogger('[MultiAgent]');
701
708
 
702
- jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(true);
709
+ // Task Mode: graceful no-op behavior
710
+ jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
703
711
 
704
712
  const coordinator = new WaitingCoordinator(redis, logger);
705
713
  const taskId = 'multi-agent-test' as any;
@@ -710,7 +718,7 @@ describe('Integration scenarios', () => {
710
718
  ];
711
719
 
712
720
  // All agents try to complete
713
- // In Task Mode, should return immediately and successfully
721
+ // In Task Mode, should return immediately and successfully with empty results
714
722
  const result = await coordinator.waitForMultipleAgents(
715
723
  taskId,
716
724
  agents,
@@ -718,6 +726,7 @@ describe('Integration scenarios', () => {
718
726
  );
719
727
 
720
728
  expect(result.completed).toBeDefined();
729
+ expect(Array.isArray(result.completed)).toBe(true);
721
730
  });
722
731
  });
723
732
 
@@ -46,25 +46,18 @@ fi
46
46
 
47
47
  **Old (Deprecated):**
48
48
  ```bash
49
- redis-cli HSET "swarm:${TASK_ID}:confidence:iteration${ITERATION}" \
50
- "${AGENT_ID}" "0.85"
51
- ```
52
49
 
53
50
  **New (Required):**
54
51
  ```bash
55
52
  # Execute tests and capture output
56
53
  TEST_OUTPUT=$(npm test -- --reporter=json 2>&1)
57
54
 
58
- # Parse test results
59
- RESULTS=$(./.claude/skills/cfn-loop-orchestration/helpers/parse-test-results.sh \
60
- "jest" "$TEST_OUTPUT")
61
-
62
- # Store in Redis
63
- redis-cli HSET "swarm:${TASK_ID}:test-results:iteration${ITERATION}" \
64
- "${AGENT_ID}" "$RESULTS"
55
+ # Parse natively (no external dependencies)
56
+ PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
57
+ FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
58
+ TOTAL=$((PASS + FAIL))
59
+ RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
65
60
 
66
- # Signal completion
67
- redis-cli LPUSH "swarm:${TASK_ID}:completion:${AGENT_ID}" "done"
68
61
  ```
69
62
 
70
63
  ## Core Responsibility
@@ -78,22 +71,10 @@ redis-cli LPUSH "swarm:${TASK_ID}:completion:${AGENT_ID}" "done"
78
71
  ### Frontend Context Storage in Redis
79
72
  ```bash
80
73
  # Store frontend coordination context
81
- redis-cli HSET "frontend:task:${TASK_ID}:context" \
82
- "component_name" "${COMPONENT_NAME}" \
83
- "mockup_path" "${MOCKUP_PATH}" \
84
- "brand_guidelines" "${BRAND_GUIDELINES}" \
85
- "mode" "${MODE}" \
86
- "visual_threshold" "${VISUAL_THRESHOLD}" \
87
- "max_iterations" "${MAX_ITERATIONS}" \
88
- "current_iteration" "1"
89
74
 
90
75
  # Store brand guidelines for agent reference
91
76
  redis-cli SET "frontend:task:${TASK_ID}:brand-guidelines" "${BRAND_GUIDELINES_JSON}"
92
77
  redis-cli SET "frontend:task:${TASK_ID}:mockup-path" "${MOCKUP_PATH}"
93
- redis-cli HSET "frontend:task:${TASK_ID}:config" \
94
- "visual_threshold" "85" \
95
- "interaction_threshold" "80" \
96
- "accessibility_threshold" "90"
97
78
  ```
98
79
 
99
80
  ### Agent Spawning with Redis Context
@@ -103,13 +84,6 @@ for agent in "${loop3Agents[@]}"; do
103
84
  AGENT_ID="${TASK_ID}-${agent}-$(date +%s)"
104
85
 
105
86
  # Store agent coordination data
106
- redis-cli HSET "frontend:agent:${AGENT_ID}" \
107
- "agent_type" "${agent}" \
108
- "task_id" "${TASK_ID}" \
109
- "loop_number" "3" \
110
- "iteration" "${CURRENT_ITERATION}" \
111
- "component_name" "${COMPONENT_NAME}" \
112
- "status" "spawning"
113
87
 
114
88
  # Prepare enhanced context with brand guidelines
115
89
  CONTEXT_WITH_BRAND=$(cat <<EOF
@@ -161,13 +135,6 @@ store_visual_analysis() {
161
135
  local overall_score="$3"
162
136
  local iteration="$4"
163
137
 
164
- redis-cli HSET "frontend:task:${TASK_ID}:visual:${iteration}" \
165
- "similarity_score" "$similarity_score" \
166
- "interaction_score" "$interaction_score" \
167
- "overall_score" "$overall_score" \
168
- "analyzed_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
169
- "screenshot_path" "${SCREENSHOT_PATH}" \
170
- "video_path" "${VIDEO_PATH}"
171
138
 
172
139
  # Store visual feedback for iteration
173
140
  redis-cli SET "frontend:task:${TASK_ID}:feedback:${iteration}" "$VISUAL_FEEDBACK_JSON"
@@ -196,13 +163,6 @@ spawn_visual_validators() {
196
163
  AGENT_ID="${TASK_ID}-${validator}-$(date +%s)"
197
164
 
198
165
  # Store validator context
199
- redis-cli HSET "frontend:agent:${AGENT_ID}" \
200
- "agent_type" "${validator}" \
201
- "task_id" "${TASK_ID}" \
202
- "loop_number" "2" \
203
- "iteration" "${CURRENT_ITERATION}" \
204
- "component_name" "${COMPONENT_NAME}" \
205
- "visual_score" "$OVERALL_SCORE"
206
166
 
207
167
  # Prepare validation context with visual artifacts
208
168
  VALIDATION_CONTEXT=$(cat <<EOF
@@ -255,11 +215,6 @@ signal_agent_completion() {
255
215
 
256
216
  if [[ -n "${TASK_ID:-}" && -n "${AGENT_ID:-}" ]]; then
257
217
  # Store completion data
258
- redis-cli HSET "frontend:task:${TASK_ID}:completion:${AGENT_ID}" \
259
- "confidence" "$confidence" \
260
- "iteration" "$iteration" \
261
- "deliverables" "$deliverables" \
262
- "completed_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
263
218
 
264
219
  # Signal completion
265
220
  redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
@@ -281,10 +236,6 @@ signal_validator_completion() {
281
236
 
282
237
  if [[ -n "${TASK_ID:-}" && -n "${AGENT_ID:-}" ]]; then
283
238
  # Store validator consensus
284
- redis-cli HSET "frontend:task:${TASK_ID}:validator:${AGENT_ID}" \
285
- "consensus_score" "$consensus_score" \
286
- "feedback" "$validation_feedback" \
287
- "validated_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
288
239
 
289
240
  # Signal validation completion
290
241
  redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
@@ -306,13 +257,6 @@ signal_product_owner_decision() {
306
257
 
307
258
  if [[ -n "${TASK_ID:-}" && -n "${AGENT_ID:-}" ]]; then
308
259
  # Store PO decision
309
- redis-cli HSET "frontend:task:${TASK_ID}:po-decision" \
310
- "decision" "$decision" \
311
- "reasoning" "$reasoning" \
312
- "final_score" "$OVERALL_SCORE" \
313
- "final_consensus" "$FINAL_CONSENSUS" \
314
- "total_iterations" "$CURRENT_ITERATION" \
315
- "decided_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
316
260
 
317
261
  # Signal decision completion
318
262
  redis-cli lpush "swarm:${TASK_ID}:product-owner:done" "$decision"
@@ -355,11 +299,6 @@ store_iteration_result() {
355
299
  local score="$3"
356
300
  local feedback="$4"
357
301
 
358
- redis-cli HSET "frontend:task:${TASK_ID}:audit:${iteration}" \
359
- "status" "$status" \
360
- "score" "$score" \
361
- "feedback" "$feedback" \
362
- "timestamp" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
363
302
  }
364
303
  ```
365
304
 
@@ -906,12 +845,14 @@ fi
906
845
  Complete your frontend coordination work and provide test-based validation:
907
846
 
908
847
  1. **Execute Tests**: Run all test suites from success criteria
909
- 2. **Parse Results**: Use parse-test-results.sh helper
910
- 3. **Report Metrics**:
911
- - Total tests: X
912
- - Passed: Y
913
- - Failed: Z
914
- - Pass rate: Y/X (e.g., 0.95)
848
+ # Parse natively (no external dependencies)
849
+ PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
850
+ FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
851
+ TOTAL=$((PASS + FAIL))
852
+ RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
853
+
854
+ # Return results (Main Chat receives automatically in Task Mode)
855
+ echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
915
856
  - Coverage: ≥80%
916
857
  4. **Store in Redis**: Use test-results key (not confidence key)
917
858
  5. **Signal Completion**: Push to completion queue
@@ -46,25 +46,18 @@ fi
46
46
 
47
47
  **Old (Deprecated):**
48
48
  ```bash
49
- redis-cli HSET "swarm:${TASK_ID}:confidence:iteration${ITERATION}" \
50
- "${AGENT_ID}" "0.85"
51
- ```
52
49
 
53
50
  **New (Required):**
54
51
  ```bash
55
52
  # Execute tests and capture output
56
53
  TEST_OUTPUT=$(npm test 2>&1)
57
54
 
58
- # Parse test results
59
- RESULTS=$(./.claude/skills/cfn-loop-orchestration/helpers/parse-test-results.sh \
60
- "jest" "$TEST_OUTPUT")
61
-
62
- # Store in Redis
63
- redis-cli HSET "swarm:${TASK_ID}:test-results:iteration${ITERATION}" \
64
- "${AGENT_ID}" "$RESULTS"
55
+ # Parse natively (no external dependencies)
56
+ PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
57
+ FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
58
+ TOTAL=$((PASS + FAIL))
59
+ RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
65
60
 
66
- # Signal completion
67
- redis-cli LPUSH "swarm:${TASK_ID}:completion:${AGENT_ID}" "done"
68
61
  ```
69
62
 
70
63
  ## Success Criteria Auto-Generation (Phase 3)
@@ -346,23 +339,8 @@ When spawned via CLI (`cfn-spawn agent`), implement full Redis coordination:
346
339
  #### 1. Task Context Storage
347
340
  ```bash
348
341
  # Store task context in Redis for swarm recovery
349
- redis-cli HSET "cfn_loop:task:${TASK_ID}:context" \
350
- "epic_goal" "${EPIC_GOAL}" \
351
- "in_scope" "${IN_SCOPE}" \
352
- "out_of_scope" "${OUT_OF_SCOPE}" \
353
- "deliverables" "${DELIVERABLES}" \
354
- "acceptance_criteria" "${ACCEPTANCE_CRITERIA}" \
355
- "mode" "${MODE}" \
356
- "gate_threshold" "${GATE_THRESHOLD}" \
357
- "consensus_threshold" "${CONSENSUS_THRESHOLD}" \
358
- "max_iterations" "${MAX_ITERATIONS}"
359
342
 
360
343
  # Store agent configuration
361
- redis-cli HSET "cfn_loop:task:${TASK_ID}:config" \
362
- "loop3_agents" "${LOOP3_AGENTS}" \
363
- "loop2_agents" "${LOOP2_AGENTS}" \
364
- "product_owner" "${PRODUCT_OWNER}" \
365
- "complexity" "${COMPLEXITY}"
366
344
  ```
367
345
 
368
346
  #### 2. Agent Spawning with Context Injection
@@ -372,12 +350,6 @@ for agent in "${loop3_agents[@]}"; do
372
350
  AGENT_ID="${TASK_ID}-${agent}-$(date +%s)"
373
351
 
374
352
  # Store agent-specific context
375
- redis-cli HSET "cfn_loop:agent:${AGENT_ID}" \
376
- "agent_type" "${agent}" \
377
- "task_id" "${TASK_ID}" \
378
- "loop_number" "3" \
379
- "iteration" "1" \
380
- "status" "spawning"
381
353
 
382
354
  # Inject context and spawn via CLI
383
355
  cfn-spawn agent "${agent}" \
@@ -426,10 +398,6 @@ if (( $(echo "$AVERAGE_CONFIDENCE >= $GATE_THRESHOLD" | bc -l) )); then
426
398
  echo "✅ Gate PASSED - signaling Loop 2"
427
399
 
428
400
  # Store gate result and broadcast signal
429
- redis-cli HSET "cfn_loop:task:${TASK_ID}:gate_result" \
430
- "status" "passed" \
431
- "confidence" "$AVERAGE_CONFIDENCE" \
432
- "iteration" "$CURRENT_ITERATION"
433
401
 
434
402
  # Signal Loop 2 agents to start
435
403
  redis-cli lpush "swarm:${TASK_ID}:gate-passed" "1"
@@ -440,10 +408,6 @@ else
440
408
  echo "❌ Gate FAILED - preparing Loop 3 iteration"
441
409
 
442
410
  # Store gate failure and prepare feedback
443
- redis-cli HSET "cfn_loop:task:${TASK_ID}:gate_result" \
444
- "status" "failed" \
445
- "confidence" "$AVERAGE_CONFIDENCE" \
446
- "iteration" "$CURRENT_ITERATION"
447
411
 
448
412
  # Prepare iteration feedback
449
413
  prepare_loop3_feedback
@@ -458,11 +422,6 @@ spawn_loop2_validators() {
458
422
  AGENT_ID="${TASK_ID}-${validator}-$(date +%s)"
459
423
 
460
424
  # Store validator context
461
- redis-cli HSET "cfn_loop:agent:${AGENT_ID}" \
462
- "agent_type" "${validator}" \
463
- "task_id" "${TASK_ID}" \
464
- "loop_number" "2" \
465
- "iteration" "$CURRENT_ITERATION"
466
425
 
467
426
  # Inject validation context
468
427
  VALIDATION_CONTEXT=$(cat <<EOF
@@ -547,12 +506,6 @@ if [ -n "$PO_SIGNAL" ]; then
547
506
  PO_DECISION=$(redis-cli HGET "cfn_loop:task:${TASK_ID}:po_decision")
548
507
 
549
508
  # Store final result
550
- redis-cli HSET "cfn_loop:task:${TASK_ID}:result" \
551
- "decision" "$PO_DECISION" \
552
- "final_confidence" "$AVERAGE_CONFIDENCE" \
553
- "final_consensus" "$AVERAGE_CONSENSUS" \
554
- "iterations_completed" "$CURRENT_ITERATION" \
555
- "completion_time" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
556
509
 
557
510
  execute_decision "$PO_DECISION"
558
511
  fi
@@ -597,10 +550,6 @@ Co-Authored-By: Claude <noreply@anthropic.com>"
597
550
  CURRENT_ITERATION=$((CURRENT_ITERATION + 1))
598
551
 
599
552
  # Store iteration context
600
- redis-cli HSET "cfn_loop:task:${TASK_ID}:iteration:${CURRENT_ITERATION}" \
601
- "confidence" "$AVERAGE_CONFIDENCE" \
602
- "consensus" "$AVERAGE_CONSENSUS" \
603
- "feedback" "$(prepare_iteration_feedback)"
604
553
 
605
554
  # Restart Loop 3 with fresh agents
606
555
  restart_loop3_agents
@@ -631,10 +580,6 @@ signal_agent_completion() {
631
580
  redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
632
581
 
633
582
  # Report confidence score
634
- redis-cli HSET "cfn_loop:task:${TASK_ID}:confidence:${AGENT_ID}" \
635
- "confidence" "$confidence" \
636
- "iteration" "$iteration" \
637
- "reported_at" "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
638
583
 
639
584
  # Use coordination script for structured reporting
640
585
  ./.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh report \
@@ -821,7 +766,6 @@ if [[ -f ".claude/skills/task-classifier/classify-task.sh" ]]; then
821
766
  fi
822
767
 
823
768
  # Store task type in Redis for persistence across Bash tool calls
824
- redis-cli HSET "swarm:${TASK_ID}:config" "task_type" "$TASK_TYPE"
825
769
  echo "✅ Task type '$TASK_TYPE' stored in Redis: swarm:${TASK_ID}:config"
826
770
  ```
827
771
 
@@ -849,9 +793,6 @@ if [[ -f ".claude/skills/cfn-agent-selector/select-agents.sh" ]]; then
849
793
  fi
850
794
 
851
795
  # Store agent selections in Redis for persistence
852
- redis-cli HSET "swarm:${TASK_ID}:config" "loop3_agents" "$LOOP3_AGENTS"
853
- redis-cli HSET "swarm:${TASK_ID}:config" "loop2_agents" "$LOOP2_AGENTS"
854
- redis-cli HSET "swarm:${TASK_ID}:config" "product_owner" "$PRODUCT_OWNER"
855
796
 
856
797
  echo "✅ Agent selections stored in Redis:"
857
798
  echo " loop3_agents: $LOOP3_AGENTS"
@@ -991,7 +932,6 @@ echo " PRODUCT_OWNER='$PRODUCT_OWNER'"
991
932
  # ALWAYS invoke orchestrator - this is your ONLY responsibility
992
933
 
993
934
  # Store success criteria in Redis BEFORE spawning orchestrator
994
- # Using redis-cli HSET with stdin (-x) to avoid shell escaping issues
995
935
  REDIS_KEY="swarm:${TASK_ID}:context"
996
936
  cat <<'CRITERIA_EOF' | redis-cli -h "${REDIS_HOST:-localhost}" -p "${REDIS_PORT:-6379}" -x HSET "$REDIS_KEY" "success-criteria"
997
937
  {