claude-flow-novice 2.10.6 → 2.10.8
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/CFN_LOOP_TASK_MODE.md +94 -0
- package/.claude/commands/cfn/cfn-loop.md +4 -3
- package/.claude/hooks/cfn-invoke-security-validation.sh +70 -0
- package/.claude/skills/cfn-hybrid-routing/spawn-worker.sh +43 -43
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +692 -0
- package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +739 -0
- package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +905 -0
- package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +707 -0
- package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +901 -0
- package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +757 -0
- package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +630 -0
- package/claude-assets/agents/docker-team/csuite/c-suite-template.md +529 -0
- package/claude-assets/agents/docker-team/infrastructure/team-coordinator-template.md +467 -0
- package/claude-assets/commands/cfn/CFN_LOOP_TASK_MODE.md +94 -0
- package/claude-assets/commands/cfn/cfn-loop.md +4 -3
- package/claude-assets/hooks/cfn-invoke-security-validation.sh +70 -0
- package/claude-assets/skills/cfn-hybrid-routing/spawn-worker.sh +43 -43
- package/claude-assets/skills/team-provider-routing/execute-agent.sh +76 -0
- package/claude-assets/skills/team-provider-routing/spawn-worker.sh +91 -0
- package/dist/agents/agent-loader.js +0 -315
- package/dist/agents/agent-loader.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,23 @@ Task Mode: Main Chat spawns coordinator and agents via Task() tool with full con
|
|
|
15
15
|
| **Provider** | All Anthropic | CLI uses Z.ai routing |
|
|
16
16
|
| **Cost** | ~$0.150/iteration | ~$0.054/iteration (64% savings) |
|
|
17
17
|
| **Use Case** | Debugging, prototyping, learning | Production, cost optimization |
|
|
18
|
+
| **ACE Reflection** | Optional via `--ace-reflect` flag | Always enabled |
|
|
19
|
+
|
|
20
|
+
### ACE Reflection Flag
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Enable ACE reflection after each sprint (captures lessons learned)
|
|
24
|
+
/cfn-loop "Task description" --spawn-mode=task --ace-reflect
|
|
25
|
+
|
|
26
|
+
# Without ACE reflection (default for backwards compatibility)
|
|
27
|
+
/cfn-loop "Task description" --spawn-mode=task
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**When to use `--ace-reflect`:**
|
|
31
|
+
- Long-running epics (3+ sprints) where learning accumulates
|
|
32
|
+
- Complex tasks with multiple iterations
|
|
33
|
+
- Teams building organizational knowledge
|
|
34
|
+
- Post-mortem analysis and continuous improvement
|
|
18
35
|
|
|
19
36
|
---
|
|
20
37
|
|
|
@@ -144,9 +161,30 @@ Iterations: Loop 3: ${L3}, Loop 2: ${L2} | Decision: PROCEED
|
|
|
144
161
|
EOF
|
|
145
162
|
```
|
|
146
163
|
|
|
164
|
+
### 5. ACE Reflection (Optional - If `--ace-reflect` flag enabled)
|
|
165
|
+
```bash
|
|
166
|
+
# Only run if --ace-reflect flag was passed to /cfn-loop command
|
|
167
|
+
if [[ "$ACE_REFLECT_ENABLED" == "true" ]]; then
|
|
168
|
+
echo "📊 Capturing ACE reflection..."
|
|
169
|
+
./.claude/skills/cfn-ace-system/invoke-context-reflect.sh \
|
|
170
|
+
--task-id "${TASK_ID}" \
|
|
171
|
+
--sprint-id "${SPRINT_NUM}" \
|
|
172
|
+
--consensus "${CONSENSUS}" \
|
|
173
|
+
--iterations-loop3 "${L3}" \
|
|
174
|
+
--iterations-loop2 "${L2}" \
|
|
175
|
+
--deliverables "$(git diff HEAD~1 --name-only | tr '\n' ',')"
|
|
176
|
+
|
|
177
|
+
# Output: Stores reflection in SQLite with tags, confidence, priority
|
|
178
|
+
# Categories: PATTERN, STRAT, ANTI, EDGE
|
|
179
|
+
# Automatic tag extraction and deduplication
|
|
180
|
+
echo "✅ ACE reflection captured: $(sqlite3 .claude/cfn-data/cfn-loop.db 'SELECT COUNT(*) FROM context_reflections WHERE task_id = \"'${TASK_ID}'\"') bullets"
|
|
181
|
+
fi
|
|
182
|
+
```
|
|
183
|
+
|
|
147
184
|
**Checklist:**
|
|
148
185
|
- [ ] Consensus ≥ threshold | [ ] Product Owner approved | [ ] Deliverables verified
|
|
149
186
|
- [ ] Tests passing | [ ] Git committed | [ ] Git pushed | [ ] Summary generated
|
|
187
|
+
- [ ] ACE reflection captured (if `--ace-reflect` enabled)
|
|
150
188
|
|
|
151
189
|
---
|
|
152
190
|
|
|
@@ -341,12 +379,68 @@ Complex/Enterprise (>5 files, >500 LOC): +code-analyzer
|
|
|
341
379
|
|
|
342
380
|
---
|
|
343
381
|
|
|
382
|
+
## ACE System Integration
|
|
383
|
+
|
|
384
|
+
### Reflection After Sprint
|
|
385
|
+
After each sprint completion, Task Mode should capture lessons learned:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
# Automatic reflection capture (called after git push)
|
|
389
|
+
./.claude/skills/cfn-ace-system/invoke-context-reflect.sh \
|
|
390
|
+
--task-id "${TASK_ID}" \
|
|
391
|
+
--sprint-id "${SPRINT_NUM}" \
|
|
392
|
+
--consensus "${CONSENSUS}" \
|
|
393
|
+
--iterations-loop3 "${L3}" \
|
|
394
|
+
--iterations-loop2 "${L2}" \
|
|
395
|
+
--deliverables "$(git diff HEAD~1 --name-only | tr '\n' ',')"
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
**What Gets Captured:**
|
|
399
|
+
- Patterns that worked well (consensus ≥0.90, low iterations)
|
|
400
|
+
- Anti-patterns that caused issues (high iterations, deliverable failures)
|
|
401
|
+
- Strategy patterns (agent selection, validator scaling effectiveness)
|
|
402
|
+
- Edge cases (timeout scenarios, race conditions, blocking issues)
|
|
403
|
+
|
|
404
|
+
**Storage:**
|
|
405
|
+
- SQLite database: `.claude/cfn-data/cfn-loop.db`
|
|
406
|
+
- Table: `context_reflections`
|
|
407
|
+
- Automatic tagging, deduplication, confidence scoring
|
|
408
|
+
|
|
409
|
+
**Benefits:**
|
|
410
|
+
- Future sprints learn from past mistakes
|
|
411
|
+
- Adaptive validator scaling improves over time
|
|
412
|
+
- Pattern recognition across projects
|
|
413
|
+
- Knowledge accumulation (not lost between sessions)
|
|
414
|
+
|
|
415
|
+
### Optional: Context Injection (Future Enhancement)
|
|
416
|
+
Before spawning agents, inject relevant lessons:
|
|
417
|
+
```bash
|
|
418
|
+
# Not yet implemented in Task Mode, but available:
|
|
419
|
+
./.claude/skills/cfn-ace-system/invoke-context-inject.sh \
|
|
420
|
+
--task "${TASK_DESCRIPTION}" \
|
|
421
|
+
--phase "${PHASE_NAME}" \
|
|
422
|
+
--tags "validation,consensus,deliverables"
|
|
423
|
+
# Returns: Top N relevant bullets from past reflections
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### Optional: Context Curation (Periodic Maintenance)
|
|
427
|
+
Merge and deduplicate reflection data:
|
|
428
|
+
```bash
|
|
429
|
+
# Run monthly or after major epics:
|
|
430
|
+
./.claude/skills/cfn-ace-system/invoke-context-curate.sh \
|
|
431
|
+
--confidence-threshold 0.85 \
|
|
432
|
+
--merge-similar-patterns
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
---
|
|
436
|
+
|
|
344
437
|
## Related Documentation
|
|
345
438
|
|
|
346
439
|
- **CFN Coordinator Parameters**: `.claude/commands/cfn/CFN_COORDINATOR_PARAMETERS.md`
|
|
347
440
|
- **Redis Coordination**: `.claude/skills/cfn-redis-coordination/SKILL.md`
|
|
348
441
|
- **Product Owner Decision**: `.claude/skills/cfn-product-owner-decision/SKILL.md`
|
|
349
442
|
- **Agent Output Standards**: `docs/AGENT_OUTPUT_STANDARDS.md`
|
|
443
|
+
- **ACE System**: `.claude/skills/cfn-ace-system/SKILL.md`
|
|
350
444
|
|
|
351
445
|
---
|
|
352
446
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Execute autonomous 3-loop self-correcting CFN workflow with automatic retry and consensus validation"
|
|
3
|
-
argument-hint: "<task description> [--phase=name] [--mode=mvp|standard|enterprise] [--spawn-mode=cli|task] [--max-loop2=10] [--max-loop3=10]"
|
|
3
|
+
argument-hint: "<task description> [--phase=name] [--mode=mvp|standard|enterprise] [--spawn-mode=cli|task] [--max-loop2=10] [--max-loop3=10] [--ace-reflect]"
|
|
4
4
|
allowed-tools: ["Task", "TodoWrite", "Read", "Write", "Edit", "Bash", "Glob", "Grep"]
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -38,10 +38,11 @@ LOOP 3: Primary Swarm Execution with subtask iterations
|
|
|
38
38
|
- `--phase=<name>`: Optional phase name for tracking
|
|
39
39
|
- `--mode=<mvp|standard|enterprise>`: Coordinator mode (default: standard)
|
|
40
40
|
- `--spawn-mode=<cli|task>`: Agent spawning method (default: cli)
|
|
41
|
-
- **cli**: Cost-optimized (95-98% savings), background execution, Redis monitoring
|
|
42
|
-
- **task**: Full visibility in Main Chat, direct spawning, debugging
|
|
41
|
+
- **cli**: Cost-optimized (95-98% savings), background execution, Redis monitoring, ACE always enabled
|
|
42
|
+
- **task**: Full visibility in Main Chat, direct spawning, debugging, ACE optional via flag
|
|
43
43
|
- `--max-loop2=<n>`: Max consensus iterations (default: 10)
|
|
44
44
|
- `--max-loop3=<n>`: Max primary swarm iterations (default: 10)
|
|
45
|
+
- `--ace-reflect`: Enable ACE reflection after each sprint (Task mode only, captures lessons learned)
|
|
45
46
|
|
|
46
47
|
## Coordinator Modes
|
|
47
48
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Security Validation Hook for Docker Hybrid Routing
|
|
3
|
+
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
# Validate secret management configurations
|
|
7
|
+
validate_secret_management() {
|
|
8
|
+
local file_path="$1"
|
|
9
|
+
|
|
10
|
+
# Check for hardcoded secrets
|
|
11
|
+
if grep -qE '(sk-ant-|token-|api_key=)' "$file_path"; then
|
|
12
|
+
echo "❌ SECURITY RISK: Potential secret exposure in $file_path"
|
|
13
|
+
return 1
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
# Check for proper environment variable naming
|
|
17
|
+
if grep -qE 'API_KEY=|SECRET=|TOKEN=' "$file_path"; then
|
|
18
|
+
echo "⚠️ NAMING RISK: Inconsistent secret variable names in $file_path"
|
|
19
|
+
return 2
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
return 0
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
# Validate Docker network configurations
|
|
26
|
+
validate_docker_network() {
|
|
27
|
+
local compose_file="$1"
|
|
28
|
+
|
|
29
|
+
# Check for overly permissive network configurations
|
|
30
|
+
if ! grep -qE 'driver_opts:\n\s*encrypted:\s*"true"' "$compose_file"; then
|
|
31
|
+
echo "❌ NETWORK RISK: Network encryption not enabled"
|
|
32
|
+
return 1
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
if ! grep -qE 'driver:\s*overlay' "$compose_file"; then
|
|
36
|
+
echo "⚠️ NETWORK CONFIG: Recommended to use overlay network for better isolation"
|
|
37
|
+
return 2
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
return 0
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
# Main validation function
|
|
44
|
+
main() {
|
|
45
|
+
local file_path="$1"
|
|
46
|
+
local file_name=$(basename "$file_path")
|
|
47
|
+
local exit_code=0
|
|
48
|
+
|
|
49
|
+
echo "🔒 Running security validation for $file_name"
|
|
50
|
+
|
|
51
|
+
case "$file_name" in
|
|
52
|
+
docker-compose.yml|docker-compose.*.yml)
|
|
53
|
+
validate_docker_network "$file_path" || exit_code=$?
|
|
54
|
+
;;
|
|
55
|
+
.env|*.env)
|
|
56
|
+
validate_secret_management "$file_path" || exit_code=$?
|
|
57
|
+
;;
|
|
58
|
+
esac
|
|
59
|
+
|
|
60
|
+
if [ $exit_code -eq 0 ]; then
|
|
61
|
+
echo "✅ Security validation passed for $file_name"
|
|
62
|
+
else
|
|
63
|
+
echo "🚨 Security validation failed for $file_name (Error code: $exit_code)"
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
return $exit_code
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
# Execute main validation
|
|
70
|
+
main "$@"
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
# Hybrid Routing Worker Spawner
|
|
5
|
-
# Dynamically configures and launches routing workers
|
|
6
|
-
|
|
7
|
-
CONFIG_PATH="$(dirname "$0")/config.json"
|
|
8
|
-
|
|
9
|
-
# Load configuration
|
|
10
|
-
SKILL_NAME=$(jq -r '.skill_name' "$CONFIG_PATH")
|
|
11
|
-
PRIMARY_CHANNEL=$(jq -r '.routing_strategies.primary.type' "$CONFIG_PATH")
|
|
12
|
-
SECONDARY_CHANNEL=$(jq -r '.routing_strategies.secondary.type' "$CONFIG_PATH")
|
|
13
|
-
|
|
14
|
-
# Worker spawning function
|
|
15
|
-
spawn_routing_worker() {
|
|
16
|
-
local channel_type="$1"
|
|
17
|
-
local worker_id="$2"
|
|
18
|
-
|
|
19
|
-
case "$channel_type" in
|
|
20
|
-
"redis-pubsub")
|
|
21
|
-
./.claude/skills/cfn-redis-coordination/spawn-agent.sh \
|
|
22
|
-
--skill-id "$SKILL_NAME" \
|
|
23
|
-
--agent-id "routing-worker-$worker_id" \
|
|
24
|
-
--strategy "$channel_type"
|
|
25
|
-
;;
|
|
26
|
-
"websocket")
|
|
27
|
-
./.claude/skills/cfn-agent-spawning/spawn-agent.sh \
|
|
28
|
-
--skill-id "$SKILL_NAME" \
|
|
29
|
-
--agent-id "routing-worker-$worker_id" \
|
|
30
|
-
--strategy "$channel_type"
|
|
31
|
-
;;
|
|
32
|
-
*)
|
|
33
|
-
echo "Unsupported channel type: $channel_type"
|
|
34
|
-
exit 1
|
|
35
|
-
;;
|
|
36
|
-
esac
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
# Spawn primary and secondary workers
|
|
40
|
-
spawn_routing_worker "$PRIMARY_CHANNEL" "primary"
|
|
41
|
-
spawn_routing_worker "$SECONDARY_CHANNEL" "secondary"
|
|
42
|
-
|
|
43
|
-
# Final status report
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
# Hybrid Routing Worker Spawner
|
|
5
|
+
# Dynamically configures and launches routing workers
|
|
6
|
+
|
|
7
|
+
CONFIG_PATH="$(dirname "$0")/config.json"
|
|
8
|
+
|
|
9
|
+
# Load configuration
|
|
10
|
+
SKILL_NAME=$(jq -r '.skill_name' "$CONFIG_PATH")
|
|
11
|
+
PRIMARY_CHANNEL=$(jq -r '.routing_strategies.primary.type' "$CONFIG_PATH")
|
|
12
|
+
SECONDARY_CHANNEL=$(jq -r '.routing_strategies.secondary.type' "$CONFIG_PATH")
|
|
13
|
+
|
|
14
|
+
# Worker spawning function
|
|
15
|
+
spawn_routing_worker() {
|
|
16
|
+
local channel_type="$1"
|
|
17
|
+
local worker_id="$2"
|
|
18
|
+
|
|
19
|
+
case "$channel_type" in
|
|
20
|
+
"redis-pubsub")
|
|
21
|
+
./.claude/skills/cfn-redis-coordination/spawn-agent.sh \
|
|
22
|
+
--skill-id "$SKILL_NAME" \
|
|
23
|
+
--agent-id "routing-worker-$worker_id" \
|
|
24
|
+
--strategy "$channel_type"
|
|
25
|
+
;;
|
|
26
|
+
"websocket")
|
|
27
|
+
./.claude/skills/cfn-agent-spawning/spawn-agent.sh \
|
|
28
|
+
--skill-id "$SKILL_NAME" \
|
|
29
|
+
--agent-id "routing-worker-$worker_id" \
|
|
30
|
+
--strategy "$channel_type"
|
|
31
|
+
;;
|
|
32
|
+
*)
|
|
33
|
+
echo "Unsupported channel type: $channel_type"
|
|
34
|
+
exit 1
|
|
35
|
+
;;
|
|
36
|
+
esac
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# Spawn primary and secondary workers
|
|
40
|
+
spawn_routing_worker "$PRIMARY_CHANNEL" "primary"
|
|
41
|
+
spawn_routing_worker "$SECONDARY_CHANNEL" "secondary"
|
|
42
|
+
|
|
43
|
+
# Final status report
|
|
44
44
|
echo "Hybrid Routing Workers Spawned Successfully"
|