claude-flow-novice 2.14.27 → 2.14.29
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/commands/CFN_LOOP_TASK_MODE.md +119 -0
- package/.claude/skills/cfn-agent-spawning/spawn-agent.sh +22 -0
- package/.claude/skills/cfn-agent-spawning/spawn-agent.sh.backup +273 -0
- package/.claude/skills/cfn-hybrid-routing/README.md +1 -1
- package/.claude/skills/cfn-loop-orchestration/helpers/consensus.sh +10 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/spawn-agents.sh +10 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +105 -15
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup +76 -11
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup2 +959 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.clean +949 -0
- package/.claude/skills/cfn-product-owner-decision/execute-decision.sh +82 -10
- package/.claude/skills/cfn-redis-coordination/report-completion.sh +10 -0
- package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +7 -33
- package/claude-assets/agents/cfn-dev-team/architecture/planner.md +7 -47
- package/claude-assets/agents/cfn-dev-team/architecture/system-architect.md +7 -33
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +88 -23
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +59 -23
- package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +43 -39
- package/claude-assets/agents/cfn-dev-team/coordinators/epic-creator.md +69 -0
- package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +65 -1
- package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +7 -47
- package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +7 -26
- package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +7 -47
- package/claude-assets/agents/cfn-dev-team/product-owners/cto-agent.md +7 -19
- package/claude-assets/agents/cfn-dev-team/product-owners/power-user-persona.md +9 -49
- package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +407 -22
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +7 -66
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +7 -76
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +8 -2
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +7 -66
- package/claude-assets/agents/cfn-dev-team/reviewers/reviewer.md +7 -78
- package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +7 -18
- package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +7 -18
- package/claude-assets/agents/cfn-dev-team/testers/tester.md +7 -77
- package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +7 -18
- package/claude-assets/agents/cfn-dev-team/testers/validation/validation-production-validator.md +7 -19
- package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +7 -44
- package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +35 -111
- package/claude-assets/agents/cfn-dev-team/utility/analyst.md +7 -47
- package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +7 -40
- package/claude-assets/agents/cfn-dev-team/utility/context-curator.md +7 -47
- package/claude-assets/commands/CFN_LOOP_TASK_MODE.md +119 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh +22 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh.backup +273 -0
- package/claude-assets/skills/cfn-environment-sanitization/SKILL.md +200 -0
- package/claude-assets/skills/cfn-environment-sanitization/sanitize-environment.sh +244 -0
- package/claude-assets/skills/cfn-hybrid-routing/README.md +1 -1
- package/claude-assets/skills/cfn-loop-orchestration/helpers/consensus.sh +10 -0
- package/claude-assets/skills/cfn-loop-orchestration/helpers/spawn-agents.sh +10 -0
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +105 -15
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.backup +76 -11
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.backup2 +959 -0
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.clean +949 -0
- package/claude-assets/skills/cfn-node-heap-sizer/task-mode-heap-limiter.sh +326 -0
- package/claude-assets/skills/cfn-process-instrumentation/SKILL.md +279 -0
- package/claude-assets/skills/cfn-process-instrumentation/instrument-process.sh +323 -0
- package/claude-assets/skills/cfn-product-owner-decision/execute-decision.sh +82 -10
- package/claude-assets/skills/cfn-redis-coordination/report-completion.sh +10 -0
- package/claude-assets/skills/cfn-task-audit/get-audit-data.sh +376 -0
- package/claude-assets/skills/cfn-task-audit/store-task-audit.sh +184 -0
- package/claude-assets/skills/cfn-task-mode-safety/cli-coordination.sh +519 -0
- package/claude-assets/skills/cfn-task-mode-safety/mode-detection.sh +326 -0
- package/claude-assets/skills/cfn-task-mode-sanitize/task-mode-env-sanitizer.sh +224 -0
- package/claude-assets/skills/cfn-telemetry/collect-metrics.sh +249 -0
- package/claude-assets/skills/cfn-telemetry/start-telemetry.sh +111 -0
- package/claude-assets/skills/cfn-validation-runner-instrumentation/wrapped-executor.sh +327 -0
- package/dist/agents/agent-loader.js +467 -133
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/config-manager.js.map +1 -1
- package/package.json +1 -1
- package/scripts/mode-detection.sh +321 -0
- package/scripts/spawn-worker.sh +8 -0
- package/scripts/track-zai-costs-simple.sh +8 -0
|
@@ -21,6 +21,16 @@
|
|
|
21
21
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
24
|
+
# ⚠️ ANTI-023 MEMORY LEAK PROTECTION: Block Task Mode agents
|
|
25
|
+
# Task Mode agents spawn via Task() tool and should NOT use orchestration scripts
|
|
26
|
+
if [[ -z "${TASK_ID:-}" || -z "${LOOP3_AGENTS:-}" ]]; then
|
|
27
|
+
echo "❌ TASK MODE DETECTED - Orchestration forbidden" >&2
|
|
28
|
+
echo "🚨 ANTI-023: This script is for CLI-spawned coordinators only" >&2
|
|
29
|
+
echo "💡 Task Mode coordination should be handled directly by Main Chat" >&2
|
|
30
|
+
echo "🔧 Coordinator spawned via Task() tool - Main Chat should coordinate directly" >&2
|
|
31
|
+
exit 1
|
|
32
|
+
fi
|
|
33
|
+
|
|
24
34
|
# Load security utilities
|
|
25
35
|
# shellcheck source=./security_utils.sh
|
|
26
36
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/security_utils.sh"
|
|
@@ -317,23 +327,78 @@ function store_context() {
|
|
|
317
327
|
}
|
|
318
328
|
|
|
319
329
|
build_agent_context() {
|
|
320
|
-
local
|
|
321
|
-
local
|
|
322
|
-
local
|
|
323
|
-
local
|
|
330
|
+
local task_id="$1"
|
|
331
|
+
local iteration="$2"
|
|
332
|
+
local agent_type="$3"
|
|
333
|
+
local feedback="$4"
|
|
334
|
+
local loop_type="${5:-}" # NEW: loop3, loop2, or loop4 (optional)
|
|
324
335
|
|
|
325
|
-
#
|
|
336
|
+
# Initialize context variables
|
|
326
337
|
local task_desc="CFN Loop implementation"
|
|
327
|
-
local deliverables
|
|
328
|
-
local acceptance
|
|
338
|
+
local deliverables=""
|
|
339
|
+
local acceptance=""
|
|
340
|
+
local epic_context=""
|
|
341
|
+
local phase_context=""
|
|
342
|
+
local target_files=""
|
|
343
|
+
|
|
344
|
+
# Try to retrieve complete context from Redis
|
|
345
|
+
if command -v "$REDIS_COORD_SKILL/get-context.sh" >/dev/null 2>&1; then
|
|
346
|
+
if redis_context=$("$REDIS_COORD_SKILL/get-context.sh" --task-id "$task_id" --namespace "swarm" 2>/dev/null); then
|
|
347
|
+
echo "📥 Retrieved Redis context for task: $task_id" >&2
|
|
348
|
+
|
|
349
|
+
# Extract fields from Redis context
|
|
350
|
+
task_desc=$(echo "$redis_context" | jq -r '.["epic-context"] // .epic_context // "CFN Loop implementation"' 2>/dev/null || echo "CFN Loop implementation")
|
|
351
|
+
deliverables=$(echo "$redis_context" | jq -r '.deliverables // [] | if type == "array" then join(", ") else . end' 2>/dev/null || echo "")
|
|
352
|
+
acceptance=$(echo "$redis_context" | jq -r '.acceptanceCriteria // .["acceptance-criteria"] // [] | if type == "array" then join(", ") else . end' 2>/dev/null || echo "")
|
|
353
|
+
epic_context=$(echo "$redis_context" | jq -r '.["epic-context"] // ""' 2>/dev/null || echo "")
|
|
354
|
+
phase_context=$(echo "$redis_context" | jq -r '.["phase-context"] // ""' 2>/dev/null || echo "")
|
|
355
|
+
target_files=$(echo "$redis_context" | jq -r '.["target-files"] // ""' 2>/dev/null || echo "")
|
|
356
|
+
|
|
357
|
+
echo "📋 Redis context extracted - Task: $task_desc" >&2
|
|
358
|
+
else
|
|
359
|
+
echo "⚠️ Failed to retrieve Redis context, using local SUCCESS_CRITERIA" >&2
|
|
360
|
+
fi
|
|
361
|
+
else
|
|
362
|
+
echo "⚠️ get-context.sh not found, using local SUCCESS_CRITERIA" >&2
|
|
363
|
+
fi
|
|
364
|
+
|
|
365
|
+
# Fallback to local SUCCESS_CRITERIA if Redis retrieval failed or incomplete
|
|
366
|
+
if [ -z "$deliverables" ] && [ -n "$SUCCESS_CRITERIA" ]; then
|
|
367
|
+
deliverables=$(echo "$SUCCESS_CRITERIA" | jq -r '.deliverables // [] | join(", ")' 2>/dev/null || echo "")
|
|
368
|
+
acceptance=$(echo "$SUCCESS_CRITERIA" | jq -r '.acceptanceCriteria // [] | join(", ")' 2>/dev/null || echo "")
|
|
369
|
+
echo "🔄 Using local SUCCESS_CRITERIA as fallback" >&2
|
|
370
|
+
fi
|
|
371
|
+
|
|
372
|
+
# Build comprehensive context string
|
|
373
|
+
local context="Task: $task_desc"
|
|
374
|
+
|
|
375
|
+
if [ -n "$deliverables" ]; then
|
|
376
|
+
context="$context | Deliverables: $deliverables"
|
|
377
|
+
fi
|
|
378
|
+
|
|
379
|
+
if [ -n "$acceptance" ]; then
|
|
380
|
+
context="$context | Acceptance Criteria: $acceptance"
|
|
381
|
+
fi
|
|
382
|
+
|
|
383
|
+
if [ -n "$target_files" ]; then
|
|
384
|
+
context="$context | Target Files: $target_files"
|
|
385
|
+
fi
|
|
329
386
|
|
|
330
|
-
|
|
331
|
-
local context="Task: $task_desc | Deliverables: $deliverables | Acceptance: $acceptance | Iteration: $iteration"
|
|
387
|
+
context="$context | Iteration: $iteration"
|
|
332
388
|
|
|
333
389
|
if [[ -n "$feedback" ]]; then
|
|
334
390
|
context="$context | Feedback: $feedback"
|
|
335
391
|
fi
|
|
336
392
|
|
|
393
|
+
# Add epic/phase context if available
|
|
394
|
+
if [ -n "$epic_context" ]; then
|
|
395
|
+
context="$context | Epic: $epic_context"
|
|
396
|
+
fi
|
|
397
|
+
|
|
398
|
+
if [ -n "$phase_context" ]; then
|
|
399
|
+
context="$context | Phase: $phase_context"
|
|
400
|
+
fi
|
|
401
|
+
|
|
337
402
|
# Inject CFN Loop context if injection script exists and loop_type provided
|
|
338
403
|
if [[ -n "$loop_type" ]] && [[ -x "$SCRIPT_DIR/inject-loop-context.sh" ]]; then
|
|
339
404
|
context=$("$SCRIPT_DIR/inject-loop-context.sh" "$loop_type" "$context" 2>/dev/null || echo "$context")
|
|
@@ -375,7 +440,7 @@ function spawn_loop3_agents() {
|
|
|
375
440
|
--task-id "$safe_task_id" \
|
|
376
441
|
--agent-id "$safe_agent_id" \
|
|
377
442
|
--iteration "$iteration" \
|
|
378
|
-
--context "$(build_agent_context "$iteration" "$safe_agent_type" "" "loop3")" &
|
|
443
|
+
--context "$(build_agent_context "$safe_task_id" "$iteration" "$safe_agent_type" "" "loop3")" &
|
|
379
444
|
|
|
380
445
|
# Store PID for monitoring using unique agent ID
|
|
381
446
|
AGENT_PID=$!
|
|
@@ -608,7 +673,7 @@ function spawn_loop2_agents() {
|
|
|
608
673
|
--task-id "$task_id" \
|
|
609
674
|
--agent-id "$UNIQUE_VALIDATOR_ID" \
|
|
610
675
|
--iteration "$iteration" \
|
|
611
|
-
--context "$(build_agent_context "$iteration" "$agent_type" "" "loop2")" &
|
|
676
|
+
--context "$(build_agent_context "$task_id" "$iteration" "$agent_type" "" "loop2")" &
|
|
612
677
|
|
|
613
678
|
# Store PID for monitoring using unique agent ID
|
|
614
679
|
AGENT_PID=$!
|