claude-flow-novice 2.14.3 → 2.14.5
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 +4 -47
- package/.claude/commands/seo/SEO_TASK_MODE.md +892 -0
- package/.claude/commands/seo/seo-blog.md +428 -0
- package/.claude/commands/seo/seo-landing.md +91 -0
- package/.claude/commands/seo/seo-product.md +104 -0
- package/.claude/skills/cfn-redis-coordination/demos/test-cancel-swarm.sh +0 -276
- package/claude-assets/agents/cfn-dev-team/coordinators/epic-creator.md +120 -0
- package/claude-assets/agents/cfn-seo-team/AGENT_CREATION_REPORT.md +481 -0
- package/claude-assets/agents/cfn-seo-team/DELEGATION_MATRIX.md +371 -0
- package/claude-assets/agents/cfn-seo-team/HUMANIZER_PROMPTS.md +536 -0
- package/claude-assets/agents/cfn-seo-team/INTEGRATION_REQUIREMENTS.md +642 -0
- package/claude-assets/agents/cfn-seo-team/cfn-seo-coordinator.md +414 -0
- package/claude-assets/agents/cfn-seo-team/competitive-seo-analyst.md +423 -0
- package/claude-assets/agents/cfn-seo-team/content-atomization-specialist.md +580 -0
- package/claude-assets/agents/cfn-seo-team/content-seo-strategist.md +245 -0
- package/claude-assets/agents/cfn-seo-team/eeat-content-auditor.md +389 -0
- package/claude-assets/agents/cfn-seo-team/geo-optimization-expert.md +269 -0
- package/claude-assets/agents/cfn-seo-team/link-building-specialist.md +291 -0
- package/claude-assets/agents/cfn-seo-team/local-seo-optimizer.md +333 -0
- package/claude-assets/agents/cfn-seo-team/programmatic-seo-engineer.md +244 -0
- package/claude-assets/agents/cfn-seo-team/schema-markup-engineer.md +430 -0
- package/claude-assets/agents/cfn-seo-team/seo-analytics-specialist.md +376 -0
- package/claude-assets/agents/cfn-seo-team/seo-validators/accessibility-validator.md +565 -0
- package/claude-assets/agents/cfn-seo-team/seo-validators/audience-validator.md +484 -0
- package/claude-assets/agents/cfn-seo-team/seo-validators/branding-validator.md +452 -0
- package/claude-assets/agents/cfn-seo-team/seo-validators/humanizer-validator.md +333 -0
- package/claude-assets/agents/cfn-seo-team/technical-seo-specialist.md +228 -0
- package/claude-assets/commands/CFN_LOOP_TASK_MODE.md +4 -47
- package/claude-assets/commands/seo/SEO_TASK_MODE.md +892 -0
- package/claude-assets/commands/seo/seo-blog.md +428 -0
- package/claude-assets/commands/seo/seo-landing.md +91 -0
- package/claude-assets/commands/seo/seo-product.md +104 -0
- package/claude-assets/skills/cfn-redis-coordination/demos/test-cancel-swarm.sh +0 -276
- package/claude-assets/skills/seo-orchestration/SKILL.md +292 -0
- package/claude-assets/skills/seo-orchestration/orchestrate-seo.sh +566 -0
- package/claude-assets/skills/seo-orchestration/orchestrate-seo.sh.backup +755 -0
- package/claude-assets/skills/seo-orchestration/validate-consensus.sh +270 -0
- package/dist/agents/agent-loader.js +165 -146
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/agent-prompt-builder.js +25 -0
- package/dist/cli/agent-prompt-builder.js.map +1 -1
- package/package.json +1 -1
- package/.claude/skills/cfn-redis-coordination/HEARTBEAT.md +0 -57
- package/.claude/skills/cfn-redis-coordination/HEARTBEAT_MONITORING.md +0 -267
- package/.claude/skills/cfn-redis-coordination/LOGGING.md +0 -260
- package/.claude/skills/cfn-redis-coordination/README.md +0 -65
- package/.claude/skills/cfn-redis-coordination/SECURITY_REVIEW.md +0 -25
- package/.claude/skills/cfn-redis-coordination/SHUTDOWN_HANDLING.md +0 -164
- package/.claude/skills/cfn-redis-coordination/SKILL.md +0 -720
- package/.claude/skills/cfn-redis-coordination/demos/test-dlq.sh +0 -129
- package/.claude/skills/cfn-redis-coordination/demos/test-iteration-feedback.sh +0 -320
- package/.claude/skills/cfn-redis-coordination/demos/test-orchestrator.sh +0 -249
- package/.claude/skills/cfn-redis-coordination/demos/test-priority-wake-phase4-unix.sh +0 -148
- package/.claude/skills/cfn-redis-coordination/demos/test-priority-wake-phase4.sh +0 -163
- package/.claude/skills/cfn-redis-coordination/demos/test-priority-wake.sh +0 -138
- package/.claude/skills/cfn-redis-coordination/demos/test-quick-fix.sh +0 -81
- package/.claude/skills/cfn-redis-coordination/demos/test-quorum-absolute.sh +0 -45
- package/.claude/skills/cfn-redis-coordination/demos/test-quorum-fallback.sh +0 -68
- package/.claude/skills/cfn-redis-coordination/demos/test-quorum-percentage.sh +0 -56
- package/.claude/skills/cfn-redis-coordination/demos/test-quorum-with-retry.sh +0 -81
- package/.claude/skills/cfn-redis-coordination/demos/test-quorum.sh +0 -57
- package/.claude/skills/cfn-redis-coordination/demos/test-shutdown-handling.sh +0 -187
- package/.claude/skills/cfn-redis-coordination/demos/test-shutdown.sh +0 -160
- package/.claude/skills/cfn-redis-coordination/demos/test-utils-unix.sh +0 -97
- package/.claude/skills/cfn-redis-coordination/demos/test-utils.sh +0 -97
- package/.claude/skills/cfn-redis-coordination/demos/test-waiting-mode.sh +0 -59
- package/.claude/skills/cfn-redis-coordination/examples/README.md +0 -73
- package/.claude/skills/cfn-redis-coordination/examples/grafana-dashboard.json +0 -352
- package/.claude/skills/cfn-redis-coordination/examples/hierarchical-pattern.sh +0 -127
- package/.claude/skills/cfn-redis-coordination/examples/mesh-pattern.sh +0 -171
- package/.claude/skills/cfn-redis-coordination/examples/timeout-handling.sh +0 -227
- package/.claude/skills/cfn-redis-coordination/examples/waiting-mode-pattern.sh +0 -239
- package/.claude/skills/cfn-redis-coordination/execute-product-owner-decision.sh +0 -258
- package/.claude/skills/cfn-redis-coordination/get-agent-timeout.sh +0 -177
- package/.claude/skills/cfn-redis-coordination/heartbeat-functions.sh +0 -137
- package/.claude/skills/cfn-redis-coordination/heartbeat-protocol.md +0 -106
- package/.claude/skills/cfn-redis-coordination/heartbeat.sh +0 -126
- package/.claude/skills/cfn-redis-coordination/init-swarm.sh +0 -148
- package/.claude/skills/cfn-redis-coordination/invoke-redis-pattern.sh +0 -220
- package/.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh +0 -283
- package/.claude/skills/cfn-redis-coordination/list-active-swarms.sh +0 -147
- package/.claude/skills/cfn-redis-coordination/log-event.sh +0 -109
- package/.claude/skills/cfn-redis-coordination/metrics-export.sh +0 -674
- package/.claude/skills/cfn-redis-coordination/metrics-schema.json +0 -66
- package/.claude/skills/cfn-redis-coordination/metrics-storage.md +0 -31
- package/.claude/skills/cfn-redis-coordination/monitor-cfn-violations.sh +0 -391
- package/.claude/skills/cfn-redis-coordination/monitor-heartbeats.sh +0 -101
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop-v3.sh +0 -141
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh +0 -31
- package/.claude/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.bak +0 -0
- package/.claude/skills/cfn-redis-coordination/priority-wake-mechanism.md +0 -75
- package/.claude/skills/cfn-redis-coordination/priority_wake.py +0 -134
- package/.claude/skills/cfn-redis-coordination/query-dlq.sh +0 -162
- package/.claude/skills/cfn-redis-coordination/query-logs.sh +0 -103
- package/.claude/skills/cfn-redis-coordination/redis-pattern.sh +0 -619
- package/.claude/skills/cfn-redis-coordination/retrieve-context.sh +0 -58
- package/.claude/skills/cfn-redis-coordination/select-specialist-agent.sh +0 -371
- package/.claude/skills/cfn-redis-coordination/semantic-match-tfidf.py +0 -252
- package/.claude/skills/cfn-redis-coordination/send-heartbeat.sh +0 -165
- package/.claude/skills/cfn-redis-coordination/signal.sh +0 -38
- package/.claude/skills/cfn-redis-coordination/store-context.sh +0 -86
- package/.claude/skills/cfn-redis-coordination/store-epic-context.sh +0 -123
- package/.claude/skills/cfn-redis-coordination/test-context-injection.sh +0 -354
- package/.claude/skills/cfn-redis-coordination/test-timeout-enforcement.sh +0 -513
- package/.claude/skills/cfn-redis-coordination/tests/convert-line-endings.sh +0 -15
- package/.claude/skills/cfn-redis-coordination/tests/dlq-functionality-test.sh +0 -102
- package/.claude/skills/cfn-redis-coordination/tests/edge-cases-test.sh +0 -99
- package/.claude/skills/cfn-redis-coordination/tests/integration-test.sh +0 -170
- package/.claude/skills/cfn-redis-coordination/tests/retry-mechanism-test.sh +0 -82
- package/.claude/skills/cfn-redis-coordination/tests/run-test-suite.sh +0 -92
- package/.claude/skills/cfn-redis-coordination/tests/run-tests.sh +0 -4
- package/.claude/skills/cfn-redis-coordination/tests/test-heartbeat-monitoring.sh +0 -418
- package/.claude/skills/cfn-redis-coordination/tests/test-heartbeat-simple.sh +0 -124
- package/.claude/skills/cfn-redis-coordination/tests/test-primitives.sh +0 -166
- package/.claude/skills/cfn-redis-coordination/tests/test-utils.sh +0 -54
- package/.claude/skills/cfn-redis-coordination/tests/test_utils.sh +0 -49
- package/.claude/skills/cfn-redis-coordination/v2_modularization/core_orchestration.sh +0 -76
- package/.claude/skills/cfn-redis-coordination/validate-parameters.sh +0 -492
- package/claude-assets/skills/cfn-redis-coordination/HEARTBEAT.md +0 -57
- package/claude-assets/skills/cfn-redis-coordination/HEARTBEAT_MONITORING.md +0 -267
- package/claude-assets/skills/cfn-redis-coordination/LOGGING.md +0 -260
- package/claude-assets/skills/cfn-redis-coordination/README.md +0 -65
- package/claude-assets/skills/cfn-redis-coordination/SECURITY_REVIEW.md +0 -25
- package/claude-assets/skills/cfn-redis-coordination/SHUTDOWN_HANDLING.md +0 -164
- package/claude-assets/skills/cfn-redis-coordination/SKILL.md +0 -720
- package/claude-assets/skills/cfn-redis-coordination/demos/test-dlq.sh +0 -129
- package/claude-assets/skills/cfn-redis-coordination/demos/test-iteration-feedback.sh +0 -320
- package/claude-assets/skills/cfn-redis-coordination/demos/test-orchestrator.sh +0 -249
- package/claude-assets/skills/cfn-redis-coordination/demos/test-priority-wake-phase4-unix.sh +0 -148
- package/claude-assets/skills/cfn-redis-coordination/demos/test-priority-wake-phase4.sh +0 -163
- package/claude-assets/skills/cfn-redis-coordination/demos/test-priority-wake.sh +0 -138
- package/claude-assets/skills/cfn-redis-coordination/demos/test-quick-fix.sh +0 -81
- package/claude-assets/skills/cfn-redis-coordination/demos/test-quorum-absolute.sh +0 -45
- package/claude-assets/skills/cfn-redis-coordination/demos/test-quorum-fallback.sh +0 -68
- package/claude-assets/skills/cfn-redis-coordination/demos/test-quorum-percentage.sh +0 -56
- package/claude-assets/skills/cfn-redis-coordination/demos/test-quorum-with-retry.sh +0 -81
- package/claude-assets/skills/cfn-redis-coordination/demos/test-quorum.sh +0 -57
- package/claude-assets/skills/cfn-redis-coordination/demos/test-shutdown-handling.sh +0 -187
- package/claude-assets/skills/cfn-redis-coordination/demos/test-shutdown.sh +0 -160
- package/claude-assets/skills/cfn-redis-coordination/demos/test-utils-unix.sh +0 -97
- package/claude-assets/skills/cfn-redis-coordination/demos/test-utils.sh +0 -97
- package/claude-assets/skills/cfn-redis-coordination/demos/test-waiting-mode.sh +0 -59
- package/claude-assets/skills/cfn-redis-coordination/examples/README.md +0 -73
- package/claude-assets/skills/cfn-redis-coordination/examples/grafana-dashboard.json +0 -352
- package/claude-assets/skills/cfn-redis-coordination/examples/hierarchical-pattern.sh +0 -127
- package/claude-assets/skills/cfn-redis-coordination/examples/mesh-pattern.sh +0 -171
- package/claude-assets/skills/cfn-redis-coordination/examples/timeout-handling.sh +0 -227
- package/claude-assets/skills/cfn-redis-coordination/examples/waiting-mode-pattern.sh +0 -239
- package/claude-assets/skills/cfn-redis-coordination/execute-product-owner-decision.sh +0 -258
- package/claude-assets/skills/cfn-redis-coordination/get-agent-timeout.sh +0 -177
- package/claude-assets/skills/cfn-redis-coordination/heartbeat-functions.sh +0 -137
- package/claude-assets/skills/cfn-redis-coordination/heartbeat-protocol.md +0 -106
- package/claude-assets/skills/cfn-redis-coordination/heartbeat.sh +0 -126
- package/claude-assets/skills/cfn-redis-coordination/init-swarm.sh +0 -148
- package/claude-assets/skills/cfn-redis-coordination/invoke-redis-pattern.sh +0 -220
- package/claude-assets/skills/cfn-redis-coordination/invoke-waiting-mode.sh +0 -283
- package/claude-assets/skills/cfn-redis-coordination/list-active-swarms.sh +0 -147
- package/claude-assets/skills/cfn-redis-coordination/log-event.sh +0 -109
- package/claude-assets/skills/cfn-redis-coordination/metrics-export.sh +0 -674
- package/claude-assets/skills/cfn-redis-coordination/metrics-schema.json +0 -66
- package/claude-assets/skills/cfn-redis-coordination/metrics-storage.md +0 -31
- package/claude-assets/skills/cfn-redis-coordination/monitor-cfn-violations.sh +0 -391
- package/claude-assets/skills/cfn-redis-coordination/monitor-heartbeats.sh +0 -101
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop-v3.sh +0 -141
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh +0 -31
- package/claude-assets/skills/cfn-redis-coordination/orchestrate-cfn-loop.sh.bak +0 -0
- package/claude-assets/skills/cfn-redis-coordination/priority-wake-mechanism.md +0 -75
- package/claude-assets/skills/cfn-redis-coordination/priority_wake.py +0 -134
- package/claude-assets/skills/cfn-redis-coordination/query-dlq.sh +0 -162
- package/claude-assets/skills/cfn-redis-coordination/query-logs.sh +0 -103
- package/claude-assets/skills/cfn-redis-coordination/redis-pattern.sh +0 -619
- package/claude-assets/skills/cfn-redis-coordination/retrieve-context.sh +0 -58
- package/claude-assets/skills/cfn-redis-coordination/select-specialist-agent.sh +0 -371
- package/claude-assets/skills/cfn-redis-coordination/semantic-match-tfidf.py +0 -252
- package/claude-assets/skills/cfn-redis-coordination/send-heartbeat.sh +0 -165
- package/claude-assets/skills/cfn-redis-coordination/signal.sh +0 -38
- package/claude-assets/skills/cfn-redis-coordination/store-context.sh +0 -86
- package/claude-assets/skills/cfn-redis-coordination/store-epic-context.sh +0 -123
- package/claude-assets/skills/cfn-redis-coordination/test-context-injection.sh +0 -354
- package/claude-assets/skills/cfn-redis-coordination/test-timeout-enforcement.sh +0 -513
- package/claude-assets/skills/cfn-redis-coordination/tests/convert-line-endings.sh +0 -15
- package/claude-assets/skills/cfn-redis-coordination/tests/dlq-functionality-test.sh +0 -102
- package/claude-assets/skills/cfn-redis-coordination/tests/edge-cases-test.sh +0 -99
- package/claude-assets/skills/cfn-redis-coordination/tests/integration-test.sh +0 -170
- package/claude-assets/skills/cfn-redis-coordination/tests/retry-mechanism-test.sh +0 -82
- package/claude-assets/skills/cfn-redis-coordination/tests/run-test-suite.sh +0 -92
- package/claude-assets/skills/cfn-redis-coordination/tests/run-tests.sh +0 -4
- package/claude-assets/skills/cfn-redis-coordination/tests/test-heartbeat-monitoring.sh +0 -418
- package/claude-assets/skills/cfn-redis-coordination/tests/test-heartbeat-simple.sh +0 -124
- package/claude-assets/skills/cfn-redis-coordination/tests/test-primitives.sh +0 -166
- package/claude-assets/skills/cfn-redis-coordination/tests/test-utils.sh +0 -54
- package/claude-assets/skills/cfn-redis-coordination/tests/test_utils.sh +0 -49
- package/claude-assets/skills/cfn-redis-coordination/v2_modularization/core_orchestration.sh +0 -76
- package/claude-assets/skills/cfn-redis-coordination/validate-parameters.sh +0 -492
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
##############################################################################
|
|
4
|
-
# Test Cancel Swarm - Validates graceful shutdown functionality
|
|
5
|
-
#
|
|
6
|
-
# Tests:
|
|
7
|
-
# 1. Cancel active swarm (success path)
|
|
8
|
-
# 2. Cancel with custom reason and initiator
|
|
9
|
-
# 3. Cancel non-existent swarm (error handling)
|
|
10
|
-
# 4. Verify shutdown signals delivered to all agents
|
|
11
|
-
# 5. Verify swarm metadata updated correctly
|
|
12
|
-
# 6. Test force flag (skip confirmation)
|
|
13
|
-
##############################################################################
|
|
14
|
-
|
|
15
|
-
# Disable strict error handling for tests
|
|
16
|
-
set -uo pipefail
|
|
17
|
-
|
|
18
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
19
|
-
TEST_TASK_ID="test-cancel-$(date +%s)"
|
|
20
|
-
FAILED_TESTS=0
|
|
21
|
-
PASSED_TESTS=0
|
|
22
|
-
|
|
23
|
-
# Colors for output
|
|
24
|
-
RED='\033[0;31m'
|
|
25
|
-
GREEN='\033[0;32m'
|
|
26
|
-
YELLOW='\033[1;33m'
|
|
27
|
-
NC='\033[0m' # No Color
|
|
28
|
-
|
|
29
|
-
log_test() {
|
|
30
|
-
echo ""
|
|
31
|
-
echo "========================================="
|
|
32
|
-
echo "TEST: $1"
|
|
33
|
-
echo "========================================="
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
log_pass() {
|
|
37
|
-
echo -e "${GREEN}✓ PASS:${NC} $1"
|
|
38
|
-
((PASSED_TESTS++))
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
log_fail() {
|
|
42
|
-
echo -e "${RED}✗ FAIL:${NC} $1"
|
|
43
|
-
((FAILED_TESTS++))
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
log_info() {
|
|
47
|
-
echo -e "${YELLOW}ℹ INFO:${NC} $1"
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
cleanup() {
|
|
51
|
-
log_info "Cleaning up test data..."
|
|
52
|
-
|
|
53
|
-
# Delete test keys matching patterns
|
|
54
|
-
KEYS=$(redis-cli --scan --pattern "swarm:${TEST_TASK_ID}*" 2>/dev/null || true)
|
|
55
|
-
if [ -n "$KEYS" ]; then
|
|
56
|
-
echo "$KEYS" | while read -r KEY; do
|
|
57
|
-
redis-cli del "$KEY" > /dev/null 2>&1 || true
|
|
58
|
-
done
|
|
59
|
-
fi
|
|
60
|
-
|
|
61
|
-
KEYS=$(redis-cli --scan --pattern "swarm:test-cancel-*" 2>/dev/null || true)
|
|
62
|
-
if [ -n "$KEYS" ]; then
|
|
63
|
-
echo "$KEYS" | while read -r KEY; do
|
|
64
|
-
redis-cli del "$KEY" > /dev/null 2>&1 || true
|
|
65
|
-
done
|
|
66
|
-
fi
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
# Cleanup on exit
|
|
70
|
-
trap cleanup EXIT
|
|
71
|
-
|
|
72
|
-
echo "========================================="
|
|
73
|
-
echo "Cancel Swarm Test Suite"
|
|
74
|
-
echo "========================================="
|
|
75
|
-
echo "Test Task ID: $TEST_TASK_ID"
|
|
76
|
-
echo ""
|
|
77
|
-
|
|
78
|
-
# =============================================================================
|
|
79
|
-
# Test 1: Cancel active swarm (success path)
|
|
80
|
-
# =============================================================================
|
|
81
|
-
log_test "Cancel Active Swarm"
|
|
82
|
-
|
|
83
|
-
# Initialize test swarm
|
|
84
|
-
SWARM_ID="${TEST_TASK_ID}-swarm1"
|
|
85
|
-
AGENTS="coder-1,reviewer-1,tester-1"
|
|
86
|
-
|
|
87
|
-
"$SCRIPT_DIR/init-swarm.sh" \
|
|
88
|
-
--swarm-id "$SWARM_ID" \
|
|
89
|
-
--task-id "$TEST_TASK_ID" \
|
|
90
|
-
--agents "$AGENTS" > /dev/null
|
|
91
|
-
|
|
92
|
-
log_info "Swarm initialized: $SWARM_ID"
|
|
93
|
-
|
|
94
|
-
# Cancel swarm with force flag (skip confirmation)
|
|
95
|
-
OUTPUT=$("$SCRIPT_DIR/cancel-swarm.sh" \
|
|
96
|
-
--task-id "$TEST_TASK_ID" \
|
|
97
|
-
--force 2>&1 || true)
|
|
98
|
-
|
|
99
|
-
# Verify status updated
|
|
100
|
-
STATUS=$(redis-cli hget "swarm:${SWARM_ID}:metadata" status)
|
|
101
|
-
if [ "$STATUS" = "cancelled" ]; then
|
|
102
|
-
log_pass "Swarm status updated to 'cancelled'"
|
|
103
|
-
else
|
|
104
|
-
log_fail "Expected status 'cancelled', got: $STATUS"
|
|
105
|
-
fi
|
|
106
|
-
|
|
107
|
-
# Verify agents_notified count
|
|
108
|
-
NOTIFIED=$(redis-cli hget "swarm:${SWARM_ID}:metadata" agents_notified)
|
|
109
|
-
if [ "$NOTIFIED" = "3" ]; then
|
|
110
|
-
log_pass "All 3 agents notified"
|
|
111
|
-
else
|
|
112
|
-
log_fail "Expected 3 agents notified, got: $NOTIFIED"
|
|
113
|
-
fi
|
|
114
|
-
|
|
115
|
-
# Verify shutdown signal broadcasted
|
|
116
|
-
SHUTDOWN_KEY="swarm:${TEST_TASK_ID}:shutdown"
|
|
117
|
-
SHUTDOWN_MSG=$(redis-cli --raw lindex "$SHUTDOWN_KEY" 0 2>/dev/null || echo "{}")
|
|
118
|
-
|
|
119
|
-
if [ -n "$SHUTDOWN_MSG" ] && [ "$SHUTDOWN_MSG" != "(nil)" ]; then
|
|
120
|
-
log_pass "Shutdown signal broadcasted to $SHUTDOWN_KEY"
|
|
121
|
-
|
|
122
|
-
# Verify message content
|
|
123
|
-
REASON=$(echo "$SHUTDOWN_MSG" | jq -r '.reason // empty')
|
|
124
|
-
INITIATOR=$(echo "$SHUTDOWN_MSG" | jq -r '.initiator // empty')
|
|
125
|
-
|
|
126
|
-
if [ "$REASON" = "user_requested_cancellation" ]; then
|
|
127
|
-
log_pass "Shutdown signal has correct reason"
|
|
128
|
-
else
|
|
129
|
-
log_fail "Expected reason 'user_requested_cancellation', got: $REASON"
|
|
130
|
-
fi
|
|
131
|
-
|
|
132
|
-
if [ "$INITIATOR" = "main-chat" ]; then
|
|
133
|
-
log_pass "Shutdown signal has correct initiator"
|
|
134
|
-
else
|
|
135
|
-
log_fail "Expected initiator 'main-chat', got: $INITIATOR"
|
|
136
|
-
fi
|
|
137
|
-
else
|
|
138
|
-
log_fail "No shutdown signal found"
|
|
139
|
-
fi
|
|
140
|
-
|
|
141
|
-
# =============================================================================
|
|
142
|
-
# Test 2: Cancel with custom reason and initiator
|
|
143
|
-
# =============================================================================
|
|
144
|
-
log_test "Cancel with Custom Reason and Initiator"
|
|
145
|
-
|
|
146
|
-
SWARM_ID2="${TEST_TASK_ID}-swarm2"
|
|
147
|
-
"$SCRIPT_DIR/init-swarm.sh" \
|
|
148
|
-
--swarm-id "$SWARM_ID2" \
|
|
149
|
-
--task-id "${TEST_TASK_ID}-custom" \
|
|
150
|
-
--agents "backend-dev-1" > /dev/null
|
|
151
|
-
|
|
152
|
-
OUTPUT=$("$SCRIPT_DIR/cancel-swarm.sh" \
|
|
153
|
-
--task-id "${TEST_TASK_ID}-custom" \
|
|
154
|
-
--reason "integration_test_timeout" \
|
|
155
|
-
--initiator "test-runner" \
|
|
156
|
-
--force 2>&1 || true)
|
|
157
|
-
|
|
158
|
-
CANCEL_REASON=$(redis-cli hget "swarm:${SWARM_ID2}:metadata" cancellation_reason)
|
|
159
|
-
CANCEL_INIT=$(redis-cli hget "swarm:${SWARM_ID2}:metadata" cancellation_initiator)
|
|
160
|
-
|
|
161
|
-
if [ "$CANCEL_REASON" = "integration_test_timeout" ]; then
|
|
162
|
-
log_pass "Custom cancellation reason recorded"
|
|
163
|
-
else
|
|
164
|
-
log_fail "Expected reason 'integration_test_timeout', got: $CANCEL_REASON"
|
|
165
|
-
fi
|
|
166
|
-
|
|
167
|
-
if [ "$CANCEL_INIT" = "test-runner" ]; then
|
|
168
|
-
log_pass "Custom initiator recorded"
|
|
169
|
-
else
|
|
170
|
-
log_fail "Expected initiator 'test-runner', got: $CANCEL_INIT"
|
|
171
|
-
fi
|
|
172
|
-
|
|
173
|
-
# =============================================================================
|
|
174
|
-
# Test 3: Cancel non-existent swarm (error handling)
|
|
175
|
-
# =============================================================================
|
|
176
|
-
log_test "Cancel Non-Existent Swarm (Error Handling)"
|
|
177
|
-
|
|
178
|
-
OUTPUT=$("$SCRIPT_DIR/cancel-swarm.sh" \
|
|
179
|
-
--task-id "non-existent-task-id-12345" \
|
|
180
|
-
--force 2>&1 || true)
|
|
181
|
-
|
|
182
|
-
if echo "$OUTPUT" | grep -q "No swarm found"; then
|
|
183
|
-
log_pass "Error message displayed for non-existent swarm"
|
|
184
|
-
else
|
|
185
|
-
log_fail "Expected error message, got: $OUTPUT"
|
|
186
|
-
fi
|
|
187
|
-
|
|
188
|
-
# =============================================================================
|
|
189
|
-
# Test 4: Verify shutdown message format
|
|
190
|
-
# =============================================================================
|
|
191
|
-
log_test "Verify Shutdown Message Format"
|
|
192
|
-
|
|
193
|
-
SWARM_ID3="${TEST_TASK_ID}-swarm3"
|
|
194
|
-
"$SCRIPT_DIR/init-swarm.sh" \
|
|
195
|
-
--swarm-id "$SWARM_ID3" \
|
|
196
|
-
--task-id "${TEST_TASK_ID}-format" \
|
|
197
|
-
--agents "security-1" > /dev/null
|
|
198
|
-
|
|
199
|
-
"$SCRIPT_DIR/cancel-swarm.sh" \
|
|
200
|
-
--task-id "${TEST_TASK_ID}-format" \
|
|
201
|
-
--reason "test_message_format" \
|
|
202
|
-
--initiator "validator" \
|
|
203
|
-
--force > /dev/null 2>&1
|
|
204
|
-
|
|
205
|
-
SHUTDOWN_KEY="swarm:${TEST_TASK_ID}-format:shutdown"
|
|
206
|
-
MSG=$(redis-cli --raw lindex "$SHUTDOWN_KEY" 0 2>/dev/null || echo "{}")
|
|
207
|
-
|
|
208
|
-
# Validate JSON structure
|
|
209
|
-
REASON=$(echo "$MSG" | jq -r '.reason // empty')
|
|
210
|
-
TIMESTAMP=$(echo "$MSG" | jq -r '.timestamp // empty')
|
|
211
|
-
INITIATOR=$(echo "$MSG" | jq -r '.initiator // empty')
|
|
212
|
-
|
|
213
|
-
if [ "$REASON" = "test_message_format" ] && \
|
|
214
|
-
[ -n "$TIMESTAMP" ] && \
|
|
215
|
-
[ "$INITIATOR" = "validator" ]; then
|
|
216
|
-
log_pass "Shutdown message has correct format"
|
|
217
|
-
else
|
|
218
|
-
log_fail "Shutdown message format incorrect: $MSG"
|
|
219
|
-
fi
|
|
220
|
-
|
|
221
|
-
# =============================================================================
|
|
222
|
-
# Test 5: Verify cancelled_at timestamp
|
|
223
|
-
# =============================================================================
|
|
224
|
-
log_test "Verify Cancelled Timestamp"
|
|
225
|
-
|
|
226
|
-
CANCELLED_AT=$(redis-cli hget "swarm:${SWARM_ID3}:metadata" cancelled_at)
|
|
227
|
-
|
|
228
|
-
if [[ "$CANCELLED_AT" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$ ]]; then
|
|
229
|
-
log_pass "Cancelled timestamp in ISO 8601 format: $CANCELLED_AT"
|
|
230
|
-
else
|
|
231
|
-
log_fail "Invalid timestamp format: $CANCELLED_AT"
|
|
232
|
-
fi
|
|
233
|
-
|
|
234
|
-
# =============================================================================
|
|
235
|
-
# Test 6: Empty agent list handling
|
|
236
|
-
# =============================================================================
|
|
237
|
-
log_test "Handle Swarm with Empty Agent List"
|
|
238
|
-
|
|
239
|
-
SWARM_ID4="${TEST_TASK_ID}-swarm4"
|
|
240
|
-
redis-cli hset "swarm:${SWARM_ID4}:metadata" \
|
|
241
|
-
swarm_id "$SWARM_ID4" \
|
|
242
|
-
task_id "${TEST_TASK_ID}-empty" \
|
|
243
|
-
agents "" \
|
|
244
|
-
status "in_progress" > /dev/null
|
|
245
|
-
|
|
246
|
-
OUTPUT=$("$SCRIPT_DIR/cancel-swarm.sh" \
|
|
247
|
-
--task-id "${TEST_TASK_ID}-empty" \
|
|
248
|
-
--force 2>&1 || true)
|
|
249
|
-
|
|
250
|
-
STATUS=$(redis-cli hget "swarm:${SWARM_ID4}:metadata" status)
|
|
251
|
-
NOTIFIED=$(redis-cli hget "swarm:${SWARM_ID4}:metadata" agents_notified)
|
|
252
|
-
|
|
253
|
-
if [ "$STATUS" = "cancelled" ] && [ "$NOTIFIED" = "0" ]; then
|
|
254
|
-
log_pass "Empty agent list handled correctly"
|
|
255
|
-
else
|
|
256
|
-
log_fail "Empty agent list handling failed (status: $STATUS, notified: $NOTIFIED)"
|
|
257
|
-
fi
|
|
258
|
-
|
|
259
|
-
# =============================================================================
|
|
260
|
-
# Summary
|
|
261
|
-
# =============================================================================
|
|
262
|
-
echo ""
|
|
263
|
-
echo "========================================="
|
|
264
|
-
echo "Test Summary"
|
|
265
|
-
echo "========================================="
|
|
266
|
-
echo -e "${GREEN}Passed:${NC} $PASSED_TESTS"
|
|
267
|
-
echo -e "${RED}Failed:${NC} $FAILED_TESTS"
|
|
268
|
-
echo "========================================="
|
|
269
|
-
|
|
270
|
-
if [ $FAILED_TESTS -eq 0 ]; then
|
|
271
|
-
echo -e "${GREEN}✓ All tests passed!${NC}"
|
|
272
|
-
exit 0
|
|
273
|
-
else
|
|
274
|
-
echo -e "${RED}✗ Some tests failed${NC}"
|
|
275
|
-
exit 1
|
|
276
|
-
fi
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: epic-creator
|
|
3
|
+
description: |
|
|
4
|
+
MUST BE USED when creating epic configuration JSON files from natural language descriptions.
|
|
5
|
+
Combines CTO strategic vision, product owner prioritization, and project manager execution planning.
|
|
6
|
+
Use PROACTIVELY for epic decomposition, phase planning, and CFN Loop configuration.
|
|
7
|
+
Keywords - epic, phases, planning, configuration, strategy, decomposition
|
|
8
|
+
tools: [Read, Write, Bash, Grep, Glob, TodoWrite]
|
|
9
|
+
model: sonnet
|
|
10
|
+
type: coordinator
|
|
11
|
+
capabilities:
|
|
12
|
+
- strategic-planning
|
|
13
|
+
- epic-decomposition
|
|
14
|
+
- phase-configuration
|
|
15
|
+
- agent-selection
|
|
16
|
+
- deliverable-mapping
|
|
17
|
+
acl_level: 3
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Epic Creator Agent
|
|
21
|
+
|
|
22
|
+
You transform high-level product requirements into structured epic configuration JSON files suitable for CFN Loop execution.
|
|
23
|
+
|
|
24
|
+
## Core Identity
|
|
25
|
+
|
|
26
|
+
You embody three complementary personas:
|
|
27
|
+
|
|
28
|
+
### CTO - Strategic Technical Vision
|
|
29
|
+
- Define technical architecture and implementation approach
|
|
30
|
+
- Identify system dependencies and integration points
|
|
31
|
+
- Assess technical risk and complexity
|
|
32
|
+
- Set technical quality standards
|
|
33
|
+
|
|
34
|
+
### Product Owner - Value Prioritization
|
|
35
|
+
- Define clear success criteria and business value
|
|
36
|
+
- Prioritize phases by customer impact
|
|
37
|
+
- Ensure scope boundaries prevent feature creep
|
|
38
|
+
- Validate deliverables serve user needs
|
|
39
|
+
|
|
40
|
+
### Project Manager - Execution Planning
|
|
41
|
+
- Break epics into manageable phases
|
|
42
|
+
- Estimate effort and sequence dependencies
|
|
43
|
+
- Define concrete deliverables with file paths
|
|
44
|
+
- Allocate appropriate agent specialists
|
|
45
|
+
|
|
46
|
+
## Core Responsibilities
|
|
47
|
+
|
|
48
|
+
### 1. Epic Analysis
|
|
49
|
+
- Parse natural language epic descriptions
|
|
50
|
+
- Extract core goals and constraints
|
|
51
|
+
- Identify technical and business requirements
|
|
52
|
+
- Assess scope and complexity
|
|
53
|
+
|
|
54
|
+
### 2. Phase Decomposition
|
|
55
|
+
- Break epic into 3-7 focused phases
|
|
56
|
+
- Define clear phase objectives
|
|
57
|
+
- Establish phase dependencies
|
|
58
|
+
- Ensure incremental value delivery
|
|
59
|
+
|
|
60
|
+
### 3. Agent Selection
|
|
61
|
+
- Identify appropriate Loop 3 implementers (2-3 per phase)
|
|
62
|
+
- Select relevant Loop 2 validators (2-4 per phase)
|
|
63
|
+
- Assign product owner for strategic decisions
|
|
64
|
+
- Consider agent specialization needs
|
|
65
|
+
|
|
66
|
+
### 4. Deliverable Specification
|
|
67
|
+
- Define concrete file paths for each phase
|
|
68
|
+
- Map deliverables to acceptance criteria
|
|
69
|
+
- Ensure deliverables are measurable
|
|
70
|
+
- Validate completeness
|
|
71
|
+
|
|
72
|
+
### 5. Configuration Generation
|
|
73
|
+
- Generate valid JSON configuration
|
|
74
|
+
- Include all required fields
|
|
75
|
+
- Apply appropriate thresholds (gate, consensus)
|
|
76
|
+
- Set realistic iteration estimates
|
|
77
|
+
|
|
78
|
+
## Epic Configuration Structure
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"epic_name": "Descriptive Epic Name",
|
|
83
|
+
"epic_goal": "1-2 sentence strategic objective",
|
|
84
|
+
"total_phases": 5,
|
|
85
|
+
"mode": "standard",
|
|
86
|
+
"phases": [
|
|
87
|
+
{
|
|
88
|
+
"phase_name": "P1 Foundation",
|
|
89
|
+
"phase_num": 1,
|
|
90
|
+
"description": "What this phase accomplishes",
|
|
91
|
+
"deliverables": ["path/to/file1.ext", "path/to/file2.ext"],
|
|
92
|
+
"in_scope": ["Specific requirement 1", "Specific requirement 2"],
|
|
93
|
+
"out_of_scope": ["Future phase concern 1", "Out of bounds requirement"],
|
|
94
|
+
"loop3_agents": ["agent1", "agent2"],
|
|
95
|
+
"loop2_agents": ["validator1", "validator2", "validator3"],
|
|
96
|
+
"loop4_agent": "product-owner",
|
|
97
|
+
"gate_threshold": 0.75,
|
|
98
|
+
"consensus_threshold": 0.90,
|
|
99
|
+
"max_iterations": 10,
|
|
100
|
+
"estimated_iterations": 3,
|
|
101
|
+
"directory": "/absolute/path/to/phase/output"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"success_criteria": {
|
|
105
|
+
"critical": ["All phases complete", "All tests passing"],
|
|
106
|
+
"important": ["Performance benchmarks met"],
|
|
107
|
+
"nice_to_have": ["Additional optimizations"]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Success Metrics
|
|
113
|
+
|
|
114
|
+
- Valid JSON configuration generated
|
|
115
|
+
- 3-7 well-defined phases
|
|
116
|
+
- Appropriate agent selection
|
|
117
|
+
- Concrete deliverables (no vague paths)
|
|
118
|
+
- Realistic iteration estimates
|
|
119
|
+
- Clear scope boundaries
|
|
120
|
+
- Mode-appropriate thresholds
|