claude-flow-novice 2.15.8 → 2.15.10
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/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +519 -0
- package/.claude/skills/cfn-loop-orchestration/ORCHESTRATOR_IMPLEMENTATION.md +493 -0
- package/.claude/skills/cfn-loop-orchestration/ORCHESTRATOR_QUICK_START.md +499 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/consensus-ts.sh +104 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/deliverable-verifier-ts.sh +123 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/iteration-manager-ts.sh +89 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +104 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/timeout-calculator-ts.sh +47 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +2 -2
- package/.claude/skills/cfn-loop-orchestration/src/orchestrate.ts +648 -0
- package/.claude/skills/cfn-loop-orchestration/tests/orchestrate.test.ts +836 -0
- package/.claude/skills/cfn-redis-coordination/report-completion.sh +55 -10
- package/.claude/skills/cfn-redis-coordination/store-context.sh +31 -1
- package/README.md +205 -10
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +6 -1
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +180 -229
- package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +6 -1
- package/claude-assets/agents/cfn-dev-team/coordinators/handoff-coordinator.md +6 -1
- package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +6 -1
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +20 -8
- package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +20 -8
- package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +20 -9
- package/claude-assets/agents/cfn-dev-team/developers/backend-developer.md +17 -7
- package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +3 -0
- package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +4 -1
- package/claude-assets/agents/cfn-dev-team/developers/frontend/react-frontend-engineer.md +4 -1
- package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +4 -1
- package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +5 -0
- package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +19 -9
- package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +20 -9
- package/claude-assets/agents/cfn-dev-team/documentation/pseudocode.md +2 -7
- package/claude-assets/agents/cfn-dev-team/reviewers/code-reviewer.md +9 -5
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +13 -6
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +13 -6
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +13 -6
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +15 -5
- package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +9 -5
- package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +8 -4
- package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +16 -13
- package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +9 -5
- package/claude-assets/agents/cfn-dev-team/testers/tester.md +9 -5
- package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +16 -9
- package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +16 -9
- package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +16 -9
- package/claude-assets/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +519 -0
- package/claude-assets/skills/cfn-loop-orchestration/ORCHESTRATOR_IMPLEMENTATION.md +493 -0
- package/claude-assets/skills/cfn-loop-orchestration/ORCHESTRATOR_QUICK_START.md +499 -0
- package/claude-assets/skills/cfn-loop-orchestration/helpers/consensus-ts.sh +104 -0
- package/claude-assets/skills/cfn-loop-orchestration/helpers/deliverable-verifier-ts.sh +123 -0
- package/claude-assets/skills/cfn-loop-orchestration/helpers/iteration-manager-ts.sh +89 -0
- package/claude-assets/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +104 -0
- package/claude-assets/skills/cfn-loop-orchestration/helpers/timeout-calculator-ts.sh +47 -0
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +2 -2
- package/claude-assets/skills/cfn-loop-orchestration/src/orchestrate.ts +648 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/orchestrate.test.ts +836 -0
- package/claude-assets/skills/cfn-redis-coordination/report-completion.sh +55 -10
- package/claude-assets/skills/cfn-redis-coordination/store-context.sh +31 -1
- package/dist/cli/config-manager.js +91 -109
- package/dist/cli/config-manager.js.map +1 -1
- package/dist/coordination/coordinate.js +369 -0
- package/dist/coordination/coordinate.js.map +1 -0
- package/dist/coordination/spawn-agent.js +364 -0
- package/dist/coordination/spawn-agent.js.map +1 -0
- package/dist/coordination/types-export.js +38 -0
- package/dist/coordination/types-export.js.map +1 -0
- package/package.json +1 -1
|
@@ -319,6 +319,184 @@ All generated criteria MUST conform to:
|
|
|
319
319
|
|
|
320
320
|
Orchestrate CFN Loop v3 execution using Redis coordination for CLI agent spawning, context management, and consensus collection.
|
|
321
321
|
|
|
322
|
+
## COORDINATOR EXECUTION (START HERE - MANDATORY)
|
|
323
|
+
|
|
324
|
+
**Execute ALL 5 actions in THIS bash script below. DO NOT execute actions separately.**
|
|
325
|
+
|
|
326
|
+
**CRITICAL:** This is THE execution path. Execute the complete bash script in ONE call.
|
|
327
|
+
|
|
328
|
+
### Unified Execution Script (Actions 1-5)
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
#!/bin/bash
|
|
332
|
+
set -euo pipefail
|
|
333
|
+
|
|
334
|
+
# ITERATION GUARD: Prevent infinite loops
|
|
335
|
+
if [[ ${BASH_EXECUTION_COUNT:-0} -gt 1 ]]; then
|
|
336
|
+
echo "❌ FATAL: Multiple executions detected - orchestrator should have been invoked" >&2
|
|
337
|
+
exit 1
|
|
338
|
+
fi
|
|
339
|
+
export BASH_EXECUTION_COUNT=$((${BASH_EXECUTION_COUNT:-0} + 1))
|
|
340
|
+
|
|
341
|
+
# ==============================================================================
|
|
342
|
+
# ACTION 1: Initialize Task Context
|
|
343
|
+
# ==============================================================================
|
|
344
|
+
TASK_ID="${TASK_ID:-$(date +%s)}"
|
|
345
|
+
TASK_DESCRIPTION="${TASK_DESCRIPTION:-Generic CFN Loop task}"
|
|
346
|
+
MODE="${MODE:-standard}"
|
|
347
|
+
MAX_ITERATIONS="${MAX_ITERATIONS:-10}" # Default to 10, can be overridden via context
|
|
348
|
+
PROJECT_ROOT="${PROJECT_ROOT:-.}"
|
|
349
|
+
|
|
350
|
+
echo "📋 COORDINATOR INITIALIZATION (CLI Mode v3.0)"
|
|
351
|
+
echo " TASK_ID: $TASK_ID"
|
|
352
|
+
echo " MODE: $MODE"
|
|
353
|
+
echo " TASK: $TASK_DESCRIPTION"
|
|
354
|
+
|
|
355
|
+
# ==============================================================================
|
|
356
|
+
# ACTION 2: Perform Task Classification
|
|
357
|
+
# ==============================================================================
|
|
358
|
+
TASK_TYPE="software-development" # Default fallback
|
|
359
|
+
|
|
360
|
+
if [[ -f "$PROJECT_ROOT/.claude/skills/task-classifier/classify-task.sh" ]]; then
|
|
361
|
+
CLASSIFIED=$(bash "$PROJECT_ROOT/.claude/skills/task-classifier/classify-task.sh" "$TASK_DESCRIPTION" 2>/dev/null || echo "")
|
|
362
|
+
[[ -n "$CLASSIFIED" ]] && TASK_TYPE="$CLASSIFIED"
|
|
363
|
+
fi
|
|
364
|
+
|
|
365
|
+
# Store in Redis for persistence across Bash tool calls
|
|
366
|
+
redis-cli -h "${REDIS_HOST:-localhost}" -p "${REDIS_PORT:-6379}" \
|
|
367
|
+
HSET "swarm:${TASK_ID}:config" "task_type" "$TASK_TYPE" 2>/dev/null || true
|
|
368
|
+
|
|
369
|
+
echo "✅ ACTION 2 Complete: Task classified as '$TASK_TYPE'"
|
|
370
|
+
|
|
371
|
+
# ==============================================================================
|
|
372
|
+
# ACTION 3: Select Agents Based on Task Type
|
|
373
|
+
# ==============================================================================
|
|
374
|
+
case "$TASK_TYPE" in
|
|
375
|
+
"infrastructure")
|
|
376
|
+
LOOP3_AGENTS="terraform-engineer,devops-engineer,cloud-architect"
|
|
377
|
+
LOOP2_AGENTS="security-auditor,compliance-checker,cost-optimizer"
|
|
378
|
+
PRODUCT_OWNER="infrastructure-product-owner"
|
|
379
|
+
;;
|
|
380
|
+
"software-development"|*)
|
|
381
|
+
LOOP3_AGENTS="backend-developer,frontend-developer,database-engineer"
|
|
382
|
+
LOOP2_AGENTS="code-reviewer,security-specialist,performance-tester"
|
|
383
|
+
PRODUCT_OWNER="technical-product-owner"
|
|
384
|
+
;;
|
|
385
|
+
esac
|
|
386
|
+
|
|
387
|
+
# Store in Redis
|
|
388
|
+
redis-cli -h "${REDIS_HOST:-localhost}" -p "${REDIS_PORT:-6379}" \
|
|
389
|
+
HSET "swarm:${TASK_ID}:config" "loop3_agents" "$LOOP3_AGENTS" 2>/dev/null || true
|
|
390
|
+
redis-cli -h "${REDIS_HOST:-localhost}" -p "${REDIS_PORT:-6379}" \
|
|
391
|
+
HSET "swarm:${TASK_ID}:config" "loop2_agents" "$LOOP2_AGENTS" 2>/dev/null || true
|
|
392
|
+
|
|
393
|
+
echo "✅ ACTION 3 Complete: Agents selected"
|
|
394
|
+
echo " Loop 3: $LOOP3_AGENTS"
|
|
395
|
+
echo " Loop 2: $LOOP2_AGENTS"
|
|
396
|
+
echo " Product Owner: $PRODUCT_OWNER"
|
|
397
|
+
|
|
398
|
+
# ==============================================================================
|
|
399
|
+
# ACTION 4: Validate Parameters
|
|
400
|
+
# ==============================================================================
|
|
401
|
+
if [[ -z "$TASK_ID" ]]; then
|
|
402
|
+
echo "❌ FATAL: TASK_ID is required" >&2
|
|
403
|
+
exit 1
|
|
404
|
+
fi
|
|
405
|
+
|
|
406
|
+
if [[ -z "$LOOP3_AGENTS" ]]; then
|
|
407
|
+
echo "❌ FATAL: No Loop 3 agents selected" >&2
|
|
408
|
+
exit 1
|
|
409
|
+
fi
|
|
410
|
+
|
|
411
|
+
if [[ -z "$LOOP2_AGENTS" ]]; then
|
|
412
|
+
echo "❌ FATAL: No Loop 2 agents selected" >&2
|
|
413
|
+
exit 1
|
|
414
|
+
fi
|
|
415
|
+
|
|
416
|
+
echo "✅ ACTION 4 Complete: Parameters validated"
|
|
417
|
+
|
|
418
|
+
# ==============================================================================
|
|
419
|
+
# ACTION 5: INVOKE ORCHESTRATOR - MANDATORY (This is your PRIMARY job)
|
|
420
|
+
# ==============================================================================
|
|
421
|
+
echo ""
|
|
422
|
+
echo "🚀 ACTION 5: INVOKING ORCHESTRATOR (MANDATORY)"
|
|
423
|
+
echo " This is the ONLY action that truly matters for coordinator"
|
|
424
|
+
echo " The orchestrator handles ALL remaining CFN Loop work"
|
|
425
|
+
|
|
426
|
+
ORCHESTRATOR_PATH="$PROJECT_ROOT/.claude/skills/cfn-loop-orchestration/orchestrate-wrapper.sh"
|
|
427
|
+
|
|
428
|
+
if [[ ! -f "$ORCHESTRATOR_PATH" ]]; then
|
|
429
|
+
echo "❌ FATAL: Orchestrator not found at $ORCHESTRATOR_PATH" >&2
|
|
430
|
+
echo " Expected path: $ORCHESTRATOR_PATH"
|
|
431
|
+
exit 1
|
|
432
|
+
fi
|
|
433
|
+
|
|
434
|
+
# Store success criteria in Redis BEFORE invoking orchestrator
|
|
435
|
+
# The orchestrator requires this when --success-criteria flag is set
|
|
436
|
+
CRITERIA_JSON='{
|
|
437
|
+
"test_suites": [
|
|
438
|
+
{
|
|
439
|
+
"name": "Unit Tests",
|
|
440
|
+
"command": "echo \"Simulated test execution\"",
|
|
441
|
+
"required": true,
|
|
442
|
+
"pass_threshold": 0.70
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"gate_mode": "test-driven",
|
|
446
|
+
"metadata": {
|
|
447
|
+
"created_by": "cfn-v3-coordinator",
|
|
448
|
+
"task_type": "general",
|
|
449
|
+
"mode": "'$MODE'"
|
|
450
|
+
}
|
|
451
|
+
}'
|
|
452
|
+
|
|
453
|
+
# Store in Redis
|
|
454
|
+
echo "$CRITERIA_JSON" | redis-cli -h "${REDIS_HOST:-localhost}" -p "${REDIS_PORT:-6379}" \
|
|
455
|
+
-x HSET "cfn_loop:task:${TASK_ID}:context" "success-criteria" >/dev/null 2>&1 || true
|
|
456
|
+
|
|
457
|
+
echo " ✅ Success criteria stored in Redis"
|
|
458
|
+
|
|
459
|
+
# Invoke orchestrator with validated parameters
|
|
460
|
+
# The orchestrator handles ALL remaining work:
|
|
461
|
+
# - Loop 3 agent spawning and execution
|
|
462
|
+
# - Test execution and gate validation
|
|
463
|
+
# - Loop 2 validator spawning and consensus
|
|
464
|
+
# - Product Owner decision (PROCEED/ITERATE/ABORT)
|
|
465
|
+
# - Git commits and result reporting
|
|
466
|
+
echo " Executing: $ORCHESTRATOR_PATH"
|
|
467
|
+
bash "$ORCHESTRATOR_PATH" \
|
|
468
|
+
--task-id "$TASK_ID" \
|
|
469
|
+
--mode "$MODE" \
|
|
470
|
+
--loop3-agents "$LOOP3_AGENTS" \
|
|
471
|
+
--loop2-agents "$LOOP2_AGENTS" \
|
|
472
|
+
--product-owner "$PRODUCT_OWNER" \
|
|
473
|
+
--max-iterations "$MAX_ITERATIONS" \
|
|
474
|
+
--success-criteria "enabled" 2>&1
|
|
475
|
+
|
|
476
|
+
ORCHESTRATOR_EXIT_CODE=$?
|
|
477
|
+
|
|
478
|
+
if [[ $ORCHESTRATOR_EXIT_CODE -eq 0 ]]; then
|
|
479
|
+
echo "✅ ORCHESTRATOR COMPLETED SUCCESSFULLY"
|
|
480
|
+
else
|
|
481
|
+
echo "❌ ORCHESTRATOR FAILED (exit code: $ORCHESTRATOR_EXIT_CODE)"
|
|
482
|
+
exit $ORCHESTRATOR_EXIT_CODE
|
|
483
|
+
fi
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
**What happens next:**
|
|
487
|
+
1. Orchestrator spawns Loop 3 agents (implementers)
|
|
488
|
+
2. Loop 3 agents complete work and execute tests
|
|
489
|
+
3. Orchestrator validates test pass rates against gate threshold
|
|
490
|
+
4. If gate passes, orchestrator spawns Loop 2 agents (validators)
|
|
491
|
+
5. Loop 2 validators review work and report consensus
|
|
492
|
+
6. Orchestrator spawns Product Owner for final decision
|
|
493
|
+
7. Product Owner decides: PROCEED / ITERATE / ABORT
|
|
494
|
+
8. Orchestrator creates git commit (if PROCEED) or starts next iteration (if ITERATE)
|
|
495
|
+
|
|
496
|
+
**Coordinator's job is now DONE.** The orchestrator handles everything else.
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
|
|
322
500
|
## CLI Mode Execution (Coordinator is ALWAYS CLI Mode)
|
|
323
501
|
|
|
324
502
|
**IMPORTANT:** This coordinator agent is **ALWAYS CLI mode**. Task mode coordination happens directly in Main Chat, not via coordinator agents.
|
|
@@ -748,234 +926,6 @@ Extract deliverables from task description:
|
|
|
748
926
|
- Estimate iteration count
|
|
749
927
|
- Provide reasoning for choices
|
|
750
928
|
|
|
751
|
-
## Execution Steps (CLI Mode Only)
|
|
752
|
-
|
|
753
|
-
**CRITICAL:** This coordinator is ALWAYS CLI mode. There is no Task Mode execution path.
|
|
754
|
-
|
|
755
|
-
### Step 1: Task Classification (REQUIRED)
|
|
756
|
-
```bash
|
|
757
|
-
# BUG #23 FIX: Store task classification in Redis to persist across Bash tool calls
|
|
758
|
-
# Each Bash tool call creates a new shell, so environment variables don't persist
|
|
759
|
-
# Redis provides persistence across iterations
|
|
760
|
-
|
|
761
|
-
# Classify task type (use hardcoded defaults if script fails)
|
|
762
|
-
TASK_TYPE="infrastructure" # Default fallback
|
|
763
|
-
if [[ -f ".claude/skills/task-classifier/classify-task.sh" ]]; then
|
|
764
|
-
CLASSIFIED_TYPE=$(bash .claude/skills/task-classifier/classify-task.sh "$TASK_DESCRIPTION" 2>/dev/null || echo "")
|
|
765
|
-
[[ -n "$CLASSIFIED_TYPE" ]] && TASK_TYPE="$CLASSIFIED_TYPE"
|
|
766
|
-
fi
|
|
767
|
-
|
|
768
|
-
# Store task type in Redis for persistence across Bash tool calls
|
|
769
|
-
echo "✅ Task type '$TASK_TYPE' stored in Redis: swarm:${TASK_ID}:config"
|
|
770
|
-
```
|
|
771
|
-
|
|
772
|
-
### Step 2: Agent Selection with Fallback (REQUIRED)
|
|
773
|
-
```bash
|
|
774
|
-
# BUG #23 FIX: Store agent selections in Redis to persist across Bash tool calls
|
|
775
|
-
# Environment variables are lost between Bash tool executions
|
|
776
|
-
# Redis ensures parameters persist through validation and orchestrator invocation
|
|
777
|
-
|
|
778
|
-
# Select agents with hardcoded fallbacks (never fail)
|
|
779
|
-
LOOP3_AGENTS="terraform-engineer,devops-engineer" # Infrastructure default
|
|
780
|
-
LOOP2_AGENTS="security-auditor,compliance-checker,cost-optimizer" # Validation default
|
|
781
|
-
PRODUCT_OWNER="product-owner"
|
|
782
|
-
|
|
783
|
-
# Try dynamic selection but fall back to defaults
|
|
784
|
-
if [[ -f ".claude/skills/cfn-agent-selector/select-agents.sh" ]]; then
|
|
785
|
-
SELECTED_AGENTS=$(bash .claude/skills/cfn-agent-selector/select-agents.sh --task-type "$TASK_TYPE" --description "$TASK_DESCRIPTION" 2>/dev/null || echo "")
|
|
786
|
-
if [[ -n "$SELECTED_AGENTS" ]]; then
|
|
787
|
-
PARSED_AGENTS=$(echo "$SELECTED_AGENTS" | jq -r '.loop3 // empty | join(",")')
|
|
788
|
-
[[ -n "$PARSED_AGENTS" ]] && LOOP3_AGENTS="$PARSED_AGENTS"
|
|
789
|
-
|
|
790
|
-
PARSED_AGENTS=$(echo "$SELECTED_AGENTS" | jq -r '.loop2 // empty | join(",")')
|
|
791
|
-
[[ -n "$PARSED_AGENTS" ]] && LOOP2_AGENTS="$PARSED_AGENTS"
|
|
792
|
-
fi
|
|
793
|
-
fi
|
|
794
|
-
|
|
795
|
-
# Store agent selections in Redis for persistence
|
|
796
|
-
|
|
797
|
-
echo "✅ Agent selections stored in Redis:"
|
|
798
|
-
echo " loop3_agents: $LOOP3_AGENTS"
|
|
799
|
-
echo " loop2_agents: $LOOP2_AGENTS"
|
|
800
|
-
echo " product_owner: $PRODUCT_OWNER"
|
|
801
|
-
```
|
|
802
|
-
|
|
803
|
-
### Step 2.5: MANDATORY Parameter Initialization (BUG #22 & BUG #23 FIX)
|
|
804
|
-
|
|
805
|
-
**CRITICAL: Execute this BEFORE orchestrator invocation to prevent empty parameter errors.**
|
|
806
|
-
|
|
807
|
-
This step implements defense-in-depth fixes for both BUG #22 and BUG #23:
|
|
808
|
-
- BUG #22: Empty parameter validation with hardcoded fallbacks
|
|
809
|
-
- BUG #23: Redis-first parameter retrieval to handle Bash tool session loss
|
|
810
|
-
|
|
811
|
-
```bash
|
|
812
|
-
# BUG #23 FIX: Read parameters from Redis with fallbacks
|
|
813
|
-
# Bash tool creates new shell each call, so variables set in Step 2 may be lost
|
|
814
|
-
# Redis provides persistent storage across all Bash tool executions
|
|
815
|
-
LOOP3_AGENTS=$(redis-cli HGET "swarm:${TASK_ID}:config" "loop3_agents" 2>/dev/null || echo "")
|
|
816
|
-
LOOP2_AGENTS=$(redis-cli HGET "swarm:${TASK_ID}:config" "loop2_agents" 2>/dev/null || echo "")
|
|
817
|
-
PRODUCT_OWNER=$(redis-cli HGET "swarm:${TASK_ID}:config" "product_owner" 2>/dev/null || echo "")
|
|
818
|
-
|
|
819
|
-
echo "🔄 Parameters retrieved from Redis (BUG #23 fix)"
|
|
820
|
-
echo " LOOP3_AGENTS='$LOOP3_AGENTS'"
|
|
821
|
-
echo " LOOP2_AGENTS='$LOOP2_AGENTS'"
|
|
822
|
-
echo " PRODUCT_OWNER='$PRODUCT_OWNER'"
|
|
823
|
-
|
|
824
|
-
# BUG #22 FIX: Apply fallbacks if Redis returns empty (defense-in-depth)
|
|
825
|
-
# Even if Redis succeeded, re-validate and apply defaults if empty
|
|
826
|
-
LOOP3_AGENTS="${LOOP3_AGENTS:-backend-developer,frontend-developer}"
|
|
827
|
-
LOOP2_AGENTS="${LOOP2_AGENTS:-code-reviewer,tester,security-specialist}"
|
|
828
|
-
PRODUCT_OWNER="${PRODUCT_OWNER:-product-owner}"
|
|
829
|
-
|
|
830
|
-
echo "🔒 Fallback parameters initialized (BUG #22 prevention)"
|
|
831
|
-
echo " LOOP3_AGENTS='$LOOP3_AGENTS'"
|
|
832
|
-
echo " LOOP2_AGENTS='$LOOP2_AGENTS'"
|
|
833
|
-
echo " PRODUCT_OWNER='$PRODUCT_OWNER'"
|
|
834
|
-
|
|
835
|
-
# MANDATORY: Validate before orchestrator invocation
|
|
836
|
-
if [[ -z "$LOOP3_AGENTS" ]] || [[ -z "$LOOP2_AGENTS" ]] || [[ -z "$PRODUCT_OWNER" ]]; then
|
|
837
|
-
echo "❌ FATAL: Agent parameters cannot be empty after Redis retrieval + fallback initialization" >&2
|
|
838
|
-
echo " This indicates a critical logic error in parameter handling (BUG #22 & #23)" >&2
|
|
839
|
-
echo " LOOP3_AGENTS='$LOOP3_AGENTS'" >&2
|
|
840
|
-
echo " LOOP2_AGENTS='$LOOP2_AGENTS'" >&2
|
|
841
|
-
echo " PRODUCT_OWNER='$PRODUCT_OWNER'" >&2
|
|
842
|
-
exit 1
|
|
843
|
-
fi
|
|
844
|
-
|
|
845
|
-
echo "✅ All parameters validated non-empty before orchestrator invocation (BUG #22 & #23 fixes applied)"
|
|
846
|
-
```
|
|
847
|
-
|
|
848
|
-
**Why This Matters:**
|
|
849
|
-
|
|
850
|
-
1. **BUG #23 Fix - Redis Persistence**: Each Bash tool call creates a new shell
|
|
851
|
-
- Environment variables set in iteration N are lost in iteration N+1
|
|
852
|
-
- Redis provides persistent storage across all Bash tool executions
|
|
853
|
-
- Parameters stored in Step 2 are reliably retrieved in Step 2.5
|
|
854
|
-
- Prevents coordinator from being stuck in validation loop
|
|
855
|
-
|
|
856
|
-
2. **BUG #22 Fix - Defense-in-Depth**: Multiple layers of protection against empty parameters
|
|
857
|
-
- Step 2 provides hardcoded defaults AND stores in Redis
|
|
858
|
-
- Step 2.5 reads from Redis then applies fallbacks if Redis fails
|
|
859
|
-
- Explicit validation catches any logic errors before orchestrator call
|
|
860
|
-
|
|
861
|
-
3. **Clear Error Messages**: If validation fails, provides:
|
|
862
|
-
- Exact parameter values (shows what went wrong)
|
|
863
|
-
- Context about where failure occurred (BUG #22 or BUG #23)
|
|
864
|
-
- Actionable error message (indicates critical logic error)
|
|
865
|
-
|
|
866
|
-
4. **Fail-Fast Principle**: Better to exit early with clear error than pass empty strings to orchestrator
|
|
867
|
-
- Orchestrator would fail with confusing error messages
|
|
868
|
-
- Empty parameters cause cascade failures in agent spawning
|
|
869
|
-
- Early validation prevents wasted iteration time
|
|
870
|
-
|
|
871
|
-
**Testing BUG #22 & BUG #23 Fixes:**
|
|
872
|
-
|
|
873
|
-
```bash
|
|
874
|
-
# Test BUG #23 fix (Redis persistence across Bash tool calls)
|
|
875
|
-
# Simulate multiple Bash tool executions (coordinator iterations)
|
|
876
|
-
npx claude-flow-novice agent-spawn cfn-v3-coordinator \
|
|
877
|
-
--task-id test-bug23 \
|
|
878
|
-
--env TASK_DESCRIPTION="Test Redis parameter persistence"
|
|
879
|
-
|
|
880
|
-
# Expected output in Step 2:
|
|
881
|
-
# ✅ Agent selections stored in Redis:
|
|
882
|
-
# loop3_agents: backend-developer,frontend-developer
|
|
883
|
-
# loop2_agents: code-reviewer,tester,security-specialist
|
|
884
|
-
# product_owner: product-owner
|
|
885
|
-
|
|
886
|
-
# Expected output in Step 2.5 (even in NEW Bash shell):
|
|
887
|
-
# 🔄 Parameters retrieved from Redis (BUG #23 fix)
|
|
888
|
-
# LOOP3_AGENTS='backend-developer,frontend-developer'
|
|
889
|
-
# LOOP2_AGENTS='code-reviewer,tester,security-specialist'
|
|
890
|
-
# PRODUCT_OWNER='product-owner'
|
|
891
|
-
# ✅ All parameters validated non-empty before orchestrator invocation (BUG #22 & #23 fixes applied)
|
|
892
|
-
|
|
893
|
-
# Test BUG #22 fix (fallbacks when Redis fails)
|
|
894
|
-
# Simulate Redis failure
|
|
895
|
-
redis-cli SHUTDOWN NOSAVE
|
|
896
|
-
|
|
897
|
-
# Run coordinator - should fall back to defaults
|
|
898
|
-
npx claude-flow-novice agent-spawn cfn-v3-coordinator \
|
|
899
|
-
--task-id test-bug22 \
|
|
900
|
-
--env TASK_DESCRIPTION="Test fallback parameters"
|
|
901
|
-
|
|
902
|
-
# Expected output:
|
|
903
|
-
# 🔄 Parameters retrieved from Redis (BUG #23 fix)
|
|
904
|
-
# LOOP3_AGENTS='' (Redis down)
|
|
905
|
-
# 🔒 Fallback parameters initialized (BUG #22 prevention)
|
|
906
|
-
# LOOP3_AGENTS='backend-developer,frontend-developer'
|
|
907
|
-
# ✅ All parameters validated non-empty before orchestrator invocation (BUG #22 & #23 fixes applied)
|
|
908
|
-
```
|
|
909
|
-
|
|
910
|
-
### Step 3: INVOKE ORCHESTRATOR (MANDATORY - NOT OPTIONAL)
|
|
911
|
-
|
|
912
|
-
**CRITICAL:** You MUST invoke orchestrator by iteration 3. DO NOT complete tasks directly.
|
|
913
|
-
|
|
914
|
-
```bash
|
|
915
|
-
# BUG #23 FIX: Read parameters from Redis before invoking orchestrator
|
|
916
|
-
# This ensures we use the SAME parameters that were validated in Step 2.5
|
|
917
|
-
# Even if this is executed in a NEW Bash shell (which it likely is)
|
|
918
|
-
LOOP3_AGENTS=$(redis-cli HGET "swarm:${TASK_ID}:config" "loop3_agents" 2>/dev/null || echo "backend-developer,frontend-developer")
|
|
919
|
-
LOOP2_AGENTS=$(redis-cli HGET "swarm:${TASK_ID}:config" "loop2_agents" 2>/dev/null || echo "code-reviewer,tester,security-specialist")
|
|
920
|
-
PRODUCT_OWNER=$(redis-cli HGET "swarm:${TASK_ID}:config" "product_owner" 2>/dev/null || echo "product-owner")
|
|
921
|
-
|
|
922
|
-
# Apply final fallbacks if Redis returns empty (defense-in-depth)
|
|
923
|
-
LOOP3_AGENTS="${LOOP3_AGENTS:-backend-developer,frontend-developer}"
|
|
924
|
-
LOOP2_AGENTS="${LOOP2_AGENTS:-code-reviewer,tester,security-specialist}"
|
|
925
|
-
PRODUCT_OWNER="${PRODUCT_OWNER:-product-owner}"
|
|
926
|
-
|
|
927
|
-
echo "🔄 Orchestrator parameters loaded from Redis (BUG #23 fix):"
|
|
928
|
-
echo " LOOP3_AGENTS='$LOOP3_AGENTS'"
|
|
929
|
-
echo " LOOP2_AGENTS='$LOOP2_AGENTS'"
|
|
930
|
-
echo " PRODUCT_OWNER='$PRODUCT_OWNER'"
|
|
931
|
-
|
|
932
|
-
# ALWAYS invoke orchestrator - this is your ONLY responsibility
|
|
933
|
-
|
|
934
|
-
# Store success criteria in Redis BEFORE spawning orchestrator
|
|
935
|
-
REDIS_KEY="swarm:${TASK_ID}:context"
|
|
936
|
-
cat <<'CRITERIA_EOF' | redis-cli -h "${REDIS_HOST:-localhost}" -p "${REDIS_PORT:-6379}" -x HSET "$REDIS_KEY" "success-criteria"
|
|
937
|
-
{
|
|
938
|
-
"deliverables": [],
|
|
939
|
-
"acceptanceCriteria": ["Implementation complete"],
|
|
940
|
-
"test_suites": []
|
|
941
|
-
}
|
|
942
|
-
CRITERIA_EOF
|
|
943
|
-
|
|
944
|
-
# Set TTL on context hash (24 hours)
|
|
945
|
-
redis-cli -h "${REDIS_HOST:-localhost}" -p "${REDIS_PORT:-6379}" EXPIRE "$REDIS_KEY" 86400
|
|
946
|
-
|
|
947
|
-
echo "✅ Success criteria stored in Redis: $REDIS_KEY"
|
|
948
|
-
|
|
949
|
-
# BUG #22 & BUG #23 FIX: Use orchestrate-wrapper.sh with Redis-backed parameters
|
|
950
|
-
# BUG #22: Wrapper provides additional validation and error handling
|
|
951
|
-
# BUG #23: Parameters are read from Redis to survive Bash tool session boundaries
|
|
952
|
-
./.claude/skills/cfn-loop-orchestration/orchestrate-wrapper.sh \
|
|
953
|
-
--task-id "$TASK_ID" \
|
|
954
|
-
--mode "standard" \
|
|
955
|
-
--loop3-agents "$LOOP3_AGENTS" \
|
|
956
|
-
--loop2-agents "$LOOP2_AGENTS" \
|
|
957
|
-
--product-owner "$PRODUCT_OWNER" \
|
|
958
|
-
--max-iterations 10 \
|
|
959
|
-
--success-criteria "enabled"
|
|
960
|
-
|
|
961
|
-
# The orchestrator handles ALL CFN Loop execution including:
|
|
962
|
-
# - Loop 3 agent spawning and iteration
|
|
963
|
-
# - Loop 2 validator spawning and consensus
|
|
964
|
-
# - Product Owner decision (PROCEED/ITERATE/ABORT)
|
|
965
|
-
# - Git commit and push (on PROCEED)
|
|
966
|
-
# - Sprint summary generation
|
|
967
|
-
|
|
968
|
-
# Your job is complete after invoking this command - DO NOT wait for results
|
|
969
|
-
```
|
|
970
|
-
|
|
971
|
-
**EXECUTION GUARANTEE:**
|
|
972
|
-
- If steps 1-2 fail, use hardcoded defaults and proceed to step 3
|
|
973
|
-
- **Step 2 stores parameters in Redis** (BUG #23 fix - persistence)
|
|
974
|
-
- **Step 2.5 validates parameters from Redis** (BUG #22 + BUG #23 fix - retrieval + fallbacks)
|
|
975
|
-
- **Step 3 reads parameters from Redis** (BUG #23 fix - fresh shell reads from persistent storage)
|
|
976
|
-
- **Never exit without invoking orchestrator**
|
|
977
|
-
- **Orchestrator invocation MUST happen by iteration 3**
|
|
978
|
-
- This coordinator's ONLY job is to configure and invoke the orchestrator
|
|
979
929
|
|
|
980
930
|
|
|
981
931
|
## Multi-Worktree Coordination
|
|
@@ -1022,4 +972,5 @@ npx claude-flow-novice agent-spawn backend-developer \
|
|
|
1022
972
|
- Validation criteria cover all critical requirements
|
|
1023
973
|
- Deliverable list is comprehensive
|
|
1024
974
|
- Confidence score ≥ 0.85 in analysis quality
|
|
1025
|
-
- **CRITICAL: Orchestrator invoked successfully**
|
|
975
|
+
- **CRITICAL: Orchestrator invoked successfully**
|
|
976
|
+
|
|
@@ -440,6 +440,8 @@ When spawned via Task() tool in Main Chat:
|
|
|
440
440
|
Complete your consensus-building work and provide test-based validation:
|
|
441
441
|
|
|
442
442
|
1. **Execute Tests**: Run all test suites from success criteria
|
|
443
|
+
|
|
444
|
+
```bash
|
|
443
445
|
# Parse natively (no external dependencies)
|
|
444
446
|
PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
|
|
445
447
|
FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
|
|
@@ -448,7 +450,10 @@ RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0
|
|
|
448
450
|
|
|
449
451
|
# Return results (Main Chat receives automatically in Task Mode)
|
|
450
452
|
echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
|
|
451
|
-
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
2. **Review Metrics**: Verify test pass rate ≥95%
|
|
456
|
+
3. **Coverage Check**: Ensure test coverage ≥80%
|
|
452
457
|
4. **Store in Redis**: Use test-results key (not confidence key)
|
|
453
458
|
5. **Signal Completion**: Push to completion queue
|
|
454
459
|
|
|
@@ -529,6 +529,8 @@ echo "CONFIDENCE: [0.0-1.0]"
|
|
|
529
529
|
Complete your handoff coordination work and provide test-based validation:
|
|
530
530
|
|
|
531
531
|
1. **Execute Tests**: Run all test suites from success criteria
|
|
532
|
+
|
|
533
|
+
```bash
|
|
532
534
|
# Parse natively (no external dependencies)
|
|
533
535
|
PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
|
|
534
536
|
FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
|
|
@@ -537,7 +539,10 @@ RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0
|
|
|
537
539
|
|
|
538
540
|
# Return results (Main Chat receives automatically in Task Mode)
|
|
539
541
|
echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
|
|
540
|
-
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
2. **Review Metrics**: Verify test pass rate ≥95%
|
|
545
|
+
3. **Coverage Check**: Ensure test coverage ≥80%
|
|
541
546
|
4. **Store in Redis**: Use test-results key (not confidence key)
|
|
542
547
|
5. **Signal Completion**: Push to completion queue
|
|
543
548
|
|
|
@@ -470,6 +470,8 @@ When spawned via Task() tool in Main Chat:
|
|
|
470
470
|
Complete your multi-sprint coordination work and provide test-based validation:
|
|
471
471
|
|
|
472
472
|
1. **Execute Tests**: Run all test suites from success criteria
|
|
473
|
+
|
|
474
|
+
```bash
|
|
473
475
|
# Parse natively (no external dependencies)
|
|
474
476
|
PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
|
|
475
477
|
FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
|
|
@@ -478,7 +480,10 @@ RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0
|
|
|
478
480
|
|
|
479
481
|
# Return results (Main Chat receives automatically in Task Mode)
|
|
480
482
|
echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
|
|
481
|
-
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
2. **Review Metrics**: Verify test pass rate ≥95%
|
|
486
|
+
3. **Coverage Check**: Ensure test coverage ≥80%
|
|
482
487
|
4. **Store in Redis**: Use test-results key (not confidence key)
|
|
483
488
|
5. **Signal Completion**: Push to completion queue
|
|
484
489
|
|
|
@@ -58,6 +58,8 @@ fi
|
|
|
58
58
|
|
|
59
59
|
**Old (Deprecated):**
|
|
60
60
|
```bash
|
|
61
|
+
# Not shown - deprecated pattern
|
|
62
|
+
```
|
|
61
63
|
|
|
62
64
|
**New (Required):**
|
|
63
65
|
```bash
|
|
@@ -624,16 +626,26 @@ networks:
|
|
|
624
626
|
Complete your work and provide test-based validation:
|
|
625
627
|
|
|
626
628
|
1. **Execute Tests**: Run all test suites from success criteria
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
629
|
+
```bash
|
|
630
|
+
# Parse natively (no external dependencies)
|
|
631
|
+
PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
|
|
632
|
+
FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
|
|
633
|
+
TOTAL=$((PASS + FAIL))
|
|
634
|
+
RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
|
|
635
|
+
|
|
636
|
+
# Return results (Main Chat receives automatically in Task Mode)
|
|
637
|
+
echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
2. **Parse Results**: Extract test counts and calculate pass rate
|
|
641
|
+
|
|
642
|
+
3. **Coverage Check**: Ensure coverage meets minimum thresholds
|
|
643
|
+
- Build tests: ≥95%
|
|
644
|
+
- Security tests: ≥90%
|
|
635
645
|
- Coverage: ≥80%
|
|
646
|
+
|
|
636
647
|
4. **Store in Redis**: Use test-results key (not confidence key)
|
|
648
|
+
|
|
637
649
|
5. **Signal Completion**: Push to completion queue
|
|
638
650
|
|
|
639
651
|
**Example Report:**
|
|
@@ -59,6 +59,8 @@ fi
|
|
|
59
59
|
|
|
60
60
|
**Old (Deprecated):**
|
|
61
61
|
```bash
|
|
62
|
+
# Not shown - deprecated pattern
|
|
63
|
+
```
|
|
62
64
|
|
|
63
65
|
**New (Required):**
|
|
64
66
|
```bash
|
|
@@ -598,16 +600,26 @@ Before reporting high confidence:
|
|
|
598
600
|
Complete your work and provide test-based validation:
|
|
599
601
|
|
|
600
602
|
1. **Execute Tests**: Run all test suites from success criteria
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
603
|
+
```bash
|
|
604
|
+
# Parse natively (no external dependencies)
|
|
605
|
+
PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
|
|
606
|
+
FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
|
|
607
|
+
TOTAL=$((PASS + FAIL))
|
|
608
|
+
RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
|
|
609
|
+
|
|
610
|
+
# Return results (Main Chat receives automatically in Task Mode)
|
|
611
|
+
echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
2. **Parse Results**: Extract test counts and calculate pass rate
|
|
615
|
+
|
|
616
|
+
3. **Coverage Check**: Ensure coverage meets minimum thresholds
|
|
617
|
+
- Manifest tests: ≥95%
|
|
618
|
+
- Deployment tests: ≥90%
|
|
609
619
|
- Coverage: ≥80%
|
|
620
|
+
|
|
610
621
|
4. **Store in Redis**: Use test-results key (not confidence key)
|
|
622
|
+
|
|
611
623
|
5. **Signal Completion**: Push to completion queue
|
|
612
624
|
|
|
613
625
|
**Example Report:**
|
|
@@ -69,6 +69,8 @@ fi
|
|
|
69
69
|
|
|
70
70
|
**Old (Deprecated):**
|
|
71
71
|
```bash
|
|
72
|
+
# Not shown - deprecated pattern
|
|
73
|
+
```
|
|
72
74
|
|
|
73
75
|
**New (Required):**
|
|
74
76
|
```bash
|
|
@@ -80,7 +82,6 @@ PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
|
|
|
80
82
|
FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
|
|
81
83
|
TOTAL=$((PASS + FAIL))
|
|
82
84
|
RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
|
|
83
|
-
|
|
84
85
|
```
|
|
85
86
|
|
|
86
87
|
# API Gateway Specialist Agent
|
|
@@ -963,16 +964,26 @@ Before reporting high confidence:
|
|
|
963
964
|
Complete your work and provide test-based validation:
|
|
964
965
|
|
|
965
966
|
1. **Execute Tests**: Run all test suites from success criteria
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
967
|
+
```bash
|
|
968
|
+
# Parse natively (no external dependencies)
|
|
969
|
+
PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
|
|
970
|
+
FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
|
|
971
|
+
TOTAL=$((PASS + FAIL))
|
|
972
|
+
RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
|
|
973
|
+
|
|
974
|
+
# Return results (Main Chat receives automatically in Task Mode)
|
|
975
|
+
echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
|
|
976
|
+
```
|
|
977
|
+
|
|
978
|
+
2. **Parse Results**: Extract test counts and calculate pass rate
|
|
979
|
+
|
|
980
|
+
3. **Coverage Check**: Ensure coverage meets minimum thresholds
|
|
981
|
+
- Core tests: ≥95%
|
|
982
|
+
- Configuration tests: ≥90%
|
|
974
983
|
- Coverage: ≥80%
|
|
984
|
+
|
|
975
985
|
4. **Store in Redis**: Use test-results key (not confidence key)
|
|
986
|
+
|
|
976
987
|
5. **Signal Completion**: Push to completion queue
|
|
977
988
|
|
|
978
989
|
**Example Report:**
|
|
@@ -164,16 +164,26 @@ DO NOT report subjective confidence scores. Instead:
|
|
|
164
164
|
Complete your work and provide test-based validation:
|
|
165
165
|
|
|
166
166
|
1. **Execute Tests**: Run all test suites from success criteria
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
167
|
+
```bash
|
|
168
|
+
# Parse natively (no external dependencies)
|
|
169
|
+
PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
|
|
170
|
+
FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
|
|
171
|
+
TOTAL=$((PASS + FAIL))
|
|
172
|
+
RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
|
|
173
|
+
|
|
174
|
+
# Return results (Main Chat receives automatically in Task Mode)
|
|
175
|
+
echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
2. **Parse Results**: Extract test counts and calculate pass rate
|
|
172
179
|
|
|
173
|
-
|
|
174
|
-
|
|
180
|
+
3. **Coverage Check**: Ensure coverage meets minimum thresholds
|
|
181
|
+
- Unit tests: ≥95%
|
|
182
|
+
- Integration tests: ≥90%
|
|
175
183
|
- Coverage: ≥80%
|
|
184
|
+
|
|
176
185
|
4. **Store in Redis**: Use test-results key (not confidence key)
|
|
186
|
+
|
|
177
187
|
5. **Signal Completion**: Push to completion queue
|
|
178
188
|
|
|
179
189
|
**Example Report:**
|