claude-flow-novice 2.14.8 → 2.14.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/commands/cfn-loop-cli.md +1 -1
- package/.claude/skills/cfn-agent-selector/SKILL.md +2 -2
- package/.claude/skills/cfn-agent-selector/SKILL.md.backup_before_replace +91 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +72 -5
- package/README.md +4 -4
- package/README.md.backup_before_replace +781 -0
- package/claude-assets/agents/AGENT_LIFECYCLE.md +3 -3
- package/claude-assets/agents/AGENT_LIFECYCLE.md.backup_before_replace +530 -0
- package/claude-assets/agents/README-AGENT_LIFECYCLE.md +3 -3
- package/claude-assets/agents/README-AGENT_LIFECYCLE.md.backup_before_replace +522 -0
- package/claude-assets/agents/cfn-dev-team/CLAUDE.md +3 -3
- package/claude-assets/agents/cfn-dev-team/CLAUDE.md.backup_before_replace +1086 -0
- package/claude-assets/agents/cfn-dev-team/README.md +1 -1
- package/claude-assets/agents/cfn-dev-team/README.md.backup_before_replace +116 -0
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +2 -2
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md.backup_before_replace +451 -0
- package/claude-assets/agents/cfn-dev-team/developers/README.md +3 -3
- package/claude-assets/agents/cfn-dev-team/developers/README.md.backup_before_replace +69 -0
- package/claude-assets/agents/cfn-dev-team/documentation/agent-type-guidelines.md +1 -1
- package/claude-assets/agents/cfn-dev-team/documentation/agent-type-guidelines.md.backup_before_replace +465 -0
- package/claude-assets/agents/cfn-dev-team/test-agent.md +2 -2
- package/claude-assets/agents/cfn-dev-team/test-agent.md.backup_before_replace +141 -0
- package/claude-assets/commands/cfn-loop-cli.md +1 -1
- package/claude-assets/skills/cfn-agent-selector/SKILL.md +2 -2
- package/claude-assets/skills/cfn-agent-selector/SKILL.md.backup_before_replace +91 -0
- package/claude-assets/skills/cfn-cli-setup/validate-cli-environment.sh +192 -0
- package/claude-assets/skills/cfn-deliverable-validation/confidence-calculator.sh +262 -0
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +72 -5
- package/claude-assets/skills/cfn-mcp-container-selector/SKILL.md +555 -0
- package/claude-assets/skills/cfn-memory-monitoring/SKILL.md +531 -0
- package/claude-assets/skills/cfn-redis-cleanup/cleanup-redis.sh +130 -0
- package/claude-assets/skills/cfn-task-decomposition/task-decomposer.sh +279 -0
- package/dist/agents/agent-loader.js +165 -146
- package/dist/cli/cli-agent-context.js +6 -0
- package/dist/cli/cli-agent-context.js.map +1 -1
- package/dist/cli/config-manager.js +109 -91
- package/dist/cli/config-manager.js.map +1 -1
- package/dist/types/index.js +11 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/user.js +22 -0
- package/dist/types/user.js.map +1 -0
- package/package.json +1 -1
- package/readme/README.md +1 -1
- package/scripts/docker-playwright-fix.sh +312 -0
- package/scripts/zone-d-type-fixes.sh +333 -0
|
@@ -149,7 +149,7 @@ Task("cfn-v3-coordinator", `
|
|
|
149
149
|
|
|
150
150
|
1. INVOKE ORCHESTRATOR (CLI spawning):
|
|
151
151
|
|
|
152
|
-
TASK_ID="cfn-cli-$(date +%s)"
|
|
152
|
+
TASK_ID="cfn-cli-$(date +%s%N | tail -c 7)-${RANDOM}"
|
|
153
153
|
MODE="${mode}"
|
|
154
154
|
LOOP3_AGENTS="backend-dev,researcher,devops" # Customize for task
|
|
155
155
|
LOOP2_AGENTS="reviewer,tester,architect,security-specialist" # Scale by complexity
|
|
@@ -17,7 +17,7 @@ AGENTS=$(./.claude/skills/cfn-agent-selector/select-agents.sh \
|
|
|
17
17
|
--task-type "software-development" \
|
|
18
18
|
--description "Implement JWT authentication with refresh tokens")
|
|
19
19
|
|
|
20
|
-
echo "$AGENTS" | jq '.loop3[]' # ["backend-
|
|
20
|
+
echo "$AGENTS" | jq '.loop3[]' # ["backend-developer", "security-specialist"]
|
|
21
21
|
echo "$AGENTS" | jq '.loop2[]' # ["reviewer", "tester", "security-auditor"]
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -35,7 +35,7 @@ echo "$AGENTS" | jq '.loop2[]' # ["reviewer", "tester", "security-auditor"]
|
|
|
35
35
|
## Agent Selection Rules
|
|
36
36
|
|
|
37
37
|
### Software Development
|
|
38
|
-
**Base Loop 3:** backend-
|
|
38
|
+
**Base Loop 3:** backend-developer, coder
|
|
39
39
|
**Add if keywords:**
|
|
40
40
|
- "security", "authentication", "JWT" → security-specialist
|
|
41
41
|
- "database", "SQL", "schema" → database-engineer (if exists)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Agent Selector Skill
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Purpose:** Select optimal agents for CFN Loop v3 based on task type and requirements
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
Recommends Loop 3 (producers) and Loop 2 (evaluators) agents based on:
|
|
9
|
+
- Task type (from task-classifier)
|
|
10
|
+
- Task description keywords
|
|
11
|
+
- Complexity requirements
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
AGENTS=$(./.claude/skills/cfn-agent-selector/select-agents.sh \
|
|
17
|
+
--task-type "software-development" \
|
|
18
|
+
--description "Implement JWT authentication with refresh tokens")
|
|
19
|
+
|
|
20
|
+
echo "$AGENTS" | jq '.loop3[]' # ["backend-dev", "security-specialist"]
|
|
21
|
+
echo "$AGENTS" | jq '.loop2[]' # ["reviewer", "tester", "security-auditor"]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Output Format
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"loop3": ["agent1", "agent2", "agent3"],
|
|
29
|
+
"loop2": ["validator1", "validator2", "validator3"],
|
|
30
|
+
"loop4": "product-owner",
|
|
31
|
+
"reasoning": "Explanation of agent selection"
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Agent Selection Rules
|
|
36
|
+
|
|
37
|
+
### Software Development
|
|
38
|
+
**Base Loop 3:** backend-dev, coder
|
|
39
|
+
**Add if keywords:**
|
|
40
|
+
- "security", "authentication", "JWT" → security-specialist
|
|
41
|
+
- "database", "SQL", "schema" → database-engineer (if exists)
|
|
42
|
+
- "deploy", "CI/CD", "infrastructure" → devops-engineer
|
|
43
|
+
- "frontend", "React", "UI" → react-frontend-engineer
|
|
44
|
+
|
|
45
|
+
**Loop 2:** reviewer, tester, security-auditor
|
|
46
|
+
|
|
47
|
+
### Content Creation
|
|
48
|
+
**Base Loop 3:** copywriter, content-strategist
|
|
49
|
+
**Add if keywords:**
|
|
50
|
+
- "SEO", "search", "keywords" → seo-specialist
|
|
51
|
+
- "technical", "documentation" → technical-writer (if exists)
|
|
52
|
+
|
|
53
|
+
**Loop 2:** editor, brand-reviewer, compliance-checker
|
|
54
|
+
|
|
55
|
+
### Research
|
|
56
|
+
**Base Loop 3:** researcher, data-analyst
|
|
57
|
+
**Add if keywords:**
|
|
58
|
+
- "statistics", "data analysis" → statistician (if exists)
|
|
59
|
+
- "domain-specific" → domain-expert
|
|
60
|
+
|
|
61
|
+
**Loop 2:** fact-checker, methodology-reviewer, statistician
|
|
62
|
+
|
|
63
|
+
### Design
|
|
64
|
+
**Base Loop 3:** ui-designer, ux-researcher
|
|
65
|
+
**Add if keywords:**
|
|
66
|
+
- "visual", "branding" → visual-designer
|
|
67
|
+
- "accessibility" → accessibility-advocate
|
|
68
|
+
|
|
69
|
+
**Loop 2:** accessibility-advocate, design-critic, user-tester
|
|
70
|
+
|
|
71
|
+
### Infrastructure
|
|
72
|
+
**Base Loop 3:** devops-engineer, terraform-engineer
|
|
73
|
+
**Add if keywords:**
|
|
74
|
+
- "Kubernetes", "k8s", "container" → kubernetes-architect
|
|
75
|
+
- "network", "security" → network-engineer (if exists)
|
|
76
|
+
|
|
77
|
+
**Loop 2:** security-auditor, cost-optimizer, compliance-checker
|
|
78
|
+
|
|
79
|
+
### Data Engineering
|
|
80
|
+
**Base Loop 3:** data-engineer, pipeline-builder
|
|
81
|
+
**Add if keywords:**
|
|
82
|
+
- "ETL", "transformation" → etl-specialist
|
|
83
|
+
- "streaming", "real-time" → streaming-specialist (if exists)
|
|
84
|
+
|
|
85
|
+
**Loop 2:** data-quality-validator, schema-reviewer, performance-tester
|
|
86
|
+
|
|
87
|
+
## Integration
|
|
88
|
+
|
|
89
|
+
Used by:
|
|
90
|
+
- `.claude/agents/cfn-v3-coordinator.md` - Agent selection
|
|
91
|
+
- `.claude/skills/cfn-agent-selector/select-agents.sh` - Primary selection script
|
|
@@ -66,6 +66,19 @@ LOOP3_FINAL_CONFIDENCE=0.0
|
|
|
66
66
|
LOOP2_FINAL_CONSENSUS=0.0
|
|
67
67
|
DELIVERABLES_VERIFIED=false
|
|
68
68
|
|
|
69
|
+
# Cleanup Redis keys before exit
|
|
70
|
+
cleanup_redis_keys() {
|
|
71
|
+
if [ -n "$TASK_ID" ]; then
|
|
72
|
+
echo "🧹 Cleaning up Redis keys for task $TASK_ID"
|
|
73
|
+
# Set TTL on remaining task keys (1 hour)
|
|
74
|
+
redis-cli keys "swarm:${TASK_ID}:*" 2>/dev/null | xargs -I {} redis-cli expire {} 3600 2>/dev/null || true
|
|
75
|
+
redis-cli keys "cfn_loop:task:${TASK_ID}:*" 2>/dev/null | xargs -I {} redis-cli expire {} 3600 2>/dev/null || true
|
|
76
|
+
fi
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
# Trap cleanup on script exit
|
|
80
|
+
trap cleanup_redis_keys EXIT
|
|
81
|
+
|
|
69
82
|
##############################################################################
|
|
70
83
|
# Argument Parsing
|
|
71
84
|
##############################################################################
|
|
@@ -694,6 +707,17 @@ EOF
|
|
|
694
707
|
# Main CFN Loop
|
|
695
708
|
##############################################################################
|
|
696
709
|
|
|
710
|
+
# Validate CLI environment before spawning agents
|
|
711
|
+
echo "🔧 Validating CLI environment..."
|
|
712
|
+
if [ -f "$PROJECT_ROOT/.claude/skills/cfn-cli-setup/validate-cli-environment.sh" ]; then
|
|
713
|
+
if ! bash "$PROJECT_ROOT/.claude/skills/cfn-cli-setup/validate-cli-environment.sh"; then
|
|
714
|
+
echo "❌ CLI environment validation failed. Agents may not have required tools."
|
|
715
|
+
echo "⚠️ Continuing anyway, but expect potential tool failures..."
|
|
716
|
+
fi
|
|
717
|
+
else
|
|
718
|
+
echo "⚠️ CLI environment validation script not found. Skipping validation."
|
|
719
|
+
fi
|
|
720
|
+
|
|
697
721
|
# Store context in Redis
|
|
698
722
|
store_context "$TASK_ID"
|
|
699
723
|
|
|
@@ -751,11 +775,41 @@ for ((ITERATION=1; ITERATION<=MAX_ITERATIONS; ITERATION++)); do
|
|
|
751
775
|
--agents "$LOOP3_IDS" \
|
|
752
776
|
--threshold "$GATE" \
|
|
753
777
|
--min-quorum "$MIN_QUORUM_LOOP3"; then
|
|
754
|
-
# Gate passed -
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
778
|
+
# Gate passed - validate confidence based on deliverables
|
|
779
|
+
echo "🔍 Validating agent confidence scores against deliverables..."
|
|
780
|
+
|
|
781
|
+
# Re-calculate confidence based on actual deliverables
|
|
782
|
+
if [ -n "$EXPECTED_FILES" ] && [ -f "$PROJECT_ROOT/.claude/skills/cfn-deliverable-validation/confidence-calculator.sh" ]; then
|
|
783
|
+
VALIDATED_CONFIDENCE=0
|
|
784
|
+
|
|
785
|
+
for agent_id in ${LOOP3_IDS//,/ }; do
|
|
786
|
+
# Get agent's reported confidence
|
|
787
|
+
agent_confidence=$(redis-cli get "swarm:${TASK_ID}:${agent_id}:confidence" 2>/dev/null || echo "0.5")
|
|
788
|
+
|
|
789
|
+
# Calculate deliverable-based confidence
|
|
790
|
+
deliverable_confidence=$("$PROJECT_ROOT/.claude/skills/cfn-deliverable-validation/confidence-calculator.sh" \
|
|
791
|
+
"$TASK_ID" "$agent_id" "$EXPECTED_FILES" "$PROJECT_ROOT")
|
|
792
|
+
|
|
793
|
+
echo " Agent $agent_id: reported=$agent_confidence, deliverable-based=$deliverable_confidence"
|
|
794
|
+
|
|
795
|
+
# Use the lower of the two scores (inflation prevention)
|
|
796
|
+
if (( $(echo "$deliverable_confidence < $agent_confidence" | bc -l) )); then
|
|
797
|
+
echo " ⚠️ Downgrading confidence for $agent_id (inflated score detected)"
|
|
798
|
+
VALIDATED_CONFIDENCE=$deliverable_confidence
|
|
799
|
+
else
|
|
800
|
+
VALIDATED_CONFIDENCE=$agent_confidence
|
|
801
|
+
fi
|
|
802
|
+
done
|
|
803
|
+
|
|
804
|
+
LOOP3_FINAL_CONFIDENCE=$VALIDATED_CONFIDENCE
|
|
805
|
+
echo "✅ Final validated Loop 3 confidence: $LOOP3_FINAL_CONFIDENCE"
|
|
806
|
+
else
|
|
807
|
+
# Store confidence (fallback method)
|
|
808
|
+
LOOP3_FINAL_CONFIDENCE=$("$REDIS_COORD_SKILL/invoke-waiting-mode.sh" collect \
|
|
809
|
+
--task-id "$TASK_ID" \
|
|
810
|
+
--agent-ids "$LOOP3_IDS" \
|
|
811
|
+
--min-quorum "$MIN_QUORUM_LOOP3")
|
|
812
|
+
fi
|
|
759
813
|
else
|
|
760
814
|
# Gate failed - iterate Loop 3
|
|
761
815
|
echo "❌ Gate check failed - iterating Loop 3"
|
|
@@ -878,6 +932,19 @@ EOF
|
|
|
878
932
|
esac
|
|
879
933
|
done
|
|
880
934
|
|
|
935
|
+
# Cleanup Redis keys before exit
|
|
936
|
+
cleanup_redis_keys() {
|
|
937
|
+
if [ -n "$TASK_ID" ]; then
|
|
938
|
+
echo "🧹 Cleaning up Redis keys for task $TASK_ID"
|
|
939
|
+
# Set TTL on remaining task keys (1 hour)
|
|
940
|
+
redis-cli keys "swarm:${TASK_ID}:*" 2>/dev/null | xargs -I {} redis-cli expire {} 3600 2>/dev/null || true
|
|
941
|
+
redis-cli keys "cfn_loop:task:${TASK_ID}:*" 2>/dev/null | xargs -I {} redis-cli expire {} 3600 2>/dev/null || true
|
|
942
|
+
fi
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
# Trap cleanup on script exit
|
|
946
|
+
trap cleanup_redis_keys EXIT
|
|
947
|
+
|
|
881
948
|
# Max iterations reached without success
|
|
882
949
|
echo "❌ Max iterations ($MAX_ITERATIONS) reached without PROCEED decision"
|
|
883
950
|
output_result "failed"
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ cp CFN-CLAUDE.md CLAUDE.md
|
|
|
19
19
|
npx cfn-loop "Implement JWT authentication system" --mode=standard
|
|
20
20
|
|
|
21
21
|
# Or spawn agents directly
|
|
22
|
-
npx cfn-spawn backend-
|
|
22
|
+
npx cfn-spawn backend-developer --task-id auth-task
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
**What happens on install**:
|
|
@@ -76,7 +76,7 @@ User Task Description
|
|
|
76
76
|
│ │
|
|
77
77
|
│ ┌─────────────────────────────────────────────┐ │
|
|
78
78
|
│ │ Loop 3: Implementation (parallel agents) │ │
|
|
79
|
-
│ │ • backend-
|
|
79
|
+
│ │ • backend-developer, coder, devops-engineer, etc │ │
|
|
80
80
|
│ │ • Each reports confidence score (0.0-1.0) │ │
|
|
81
81
|
│ └─────────────────┬───────────────────────────┘ │
|
|
82
82
|
│ ↓ │
|
|
@@ -240,7 +240,7 @@ User Task Description
|
|
|
240
240
|
|
|
241
241
|
**Implementation**
|
|
242
242
|
- `coder` - General-purpose code implementation
|
|
243
|
-
- `backend-
|
|
243
|
+
- `backend-developer` - Backend services and APIs
|
|
244
244
|
- `frontend-dev` - Frontend applications
|
|
245
245
|
- `mobile-dev` - React Native and cross-platform
|
|
246
246
|
- `rust-developer` - Rust language specialist
|
|
@@ -348,7 +348,7 @@ cfn-redis # Redis coordination utilities
|
|
|
348
348
|
## 📊 Multi-Domain Support (6 Task Types)
|
|
349
349
|
|
|
350
350
|
### 1. Software Development
|
|
351
|
-
**Agents**: backend-
|
|
351
|
+
**Agents**: backend-developer, coder, devops-engineer, security-specialist
|
|
352
352
|
**Validation**: Tests pass, security scan clean, build succeeds, coverage ≥80%
|
|
353
353
|
**Deliverables**: Source files, test files, docs
|
|
354
354
|
|