claude-flow-novice 2.14.7 → 2.14.9
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 +26 -0
- package/.claude/skills/cfn-product-owner-decision/execute-decision.sh +81 -14
- package/.claude/skills/cfn-product-owner-decision/test-backlog-integration.sh +148 -0
- 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 +10 -8
- 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-loop-orchestration/orchestrate.sh +26 -0
- 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-product-owner-decision/execute-decision.sh +81 -14
- package/claude-assets/skills/cfn-product-owner-decision/test-backlog-integration.sh +148 -0
- package/claude-assets/skills/cfn-redis-cleanup/cleanup-redis.sh +130 -0
- package/dist/agents/agent-loader.js +146 -165
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/cli-agent-context.js +6 -0
- package/dist/cli/cli-agent-context.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/switch-api.sh +7 -7
- package/scripts/zone-d-type-fixes.sh +333 -0
|
@@ -15,7 +15,7 @@ The CFN (Claude Flow Novice) development team comprises 23 production agents org
|
|
|
15
15
|
- **Purpose**: Core implementation and creative problem-solving
|
|
16
16
|
- **Key Agents**:
|
|
17
17
|
- `coder`: Production code implementation
|
|
18
|
-
- `backend-
|
|
18
|
+
- `backend-developer`: Backend system design and implementation
|
|
19
19
|
- `researcher`: Technical research and solution exploration
|
|
20
20
|
- `architect`: System design and architectural planning
|
|
21
21
|
- `agent-builder`: Agent template and workflow design
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# CFN Dev Team Agent Structure
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The CFN (Claude Flow Novice) development team comprises 23 production agents organized into 4 strategic categories, designed to provide comprehensive software development and workflow management capabilities.
|
|
6
|
+
|
|
7
|
+
## Directory Structure
|
|
8
|
+
|
|
9
|
+
### Coordinators
|
|
10
|
+
- **Purpose**: CFN Loop orchestration and workflow management
|
|
11
|
+
- **Key Agents**:
|
|
12
|
+
- `cfn-v3-coordinator`: Primary workflow orchestrator
|
|
13
|
+
|
|
14
|
+
### Developers
|
|
15
|
+
- **Purpose**: Core implementation and creative problem-solving
|
|
16
|
+
- **Key Agents**:
|
|
17
|
+
- `coder`: Production code implementation
|
|
18
|
+
- `backend-dev`: Backend system design and implementation
|
|
19
|
+
- `researcher`: Technical research and solution exploration
|
|
20
|
+
- `architect`: System design and architectural planning
|
|
21
|
+
- `agent-builder`: Agent template and workflow design
|
|
22
|
+
|
|
23
|
+
### Reviewers
|
|
24
|
+
- **Purpose**: Quality assurance and code validation
|
|
25
|
+
- **Key Agents**:
|
|
26
|
+
- `reviewer`: Code review and quality assessment
|
|
27
|
+
- `code-analyzer`: Static code analysis
|
|
28
|
+
- `code-quality-validator`: Comprehensive code quality checks
|
|
29
|
+
- `security-specialist`: Security vulnerability detection
|
|
30
|
+
|
|
31
|
+
### Testers
|
|
32
|
+
- **Purpose**: Comprehensive testing and validation
|
|
33
|
+
- **Key Agents**:
|
|
34
|
+
- `tester`: General test strategy and implementation
|
|
35
|
+
- `playwright-tester`: Web interaction testing
|
|
36
|
+
- `interaction-tester`: User interaction validation
|
|
37
|
+
- `production-validator`: Production readiness checks
|
|
38
|
+
- `perf-analyzer`: Performance testing and optimization
|
|
39
|
+
|
|
40
|
+
## Agent Selection Guide
|
|
41
|
+
|
|
42
|
+
### When to Use Each Category
|
|
43
|
+
|
|
44
|
+
1. **Coordinators**
|
|
45
|
+
- Complex workflow orchestration
|
|
46
|
+
- Multi-agent collaboration scenarios
|
|
47
|
+
- CFN Loop management
|
|
48
|
+
|
|
49
|
+
2. **Developers**
|
|
50
|
+
- Initial implementation
|
|
51
|
+
- Feature development
|
|
52
|
+
- Technical problem-solving
|
|
53
|
+
- Prototype creation
|
|
54
|
+
|
|
55
|
+
3. **Reviewers**
|
|
56
|
+
- Post-implementation code review
|
|
57
|
+
- Quality gate validation
|
|
58
|
+
- Security and performance analysis
|
|
59
|
+
- Refactoring recommendations
|
|
60
|
+
|
|
61
|
+
4. **Testers**
|
|
62
|
+
- Comprehensive test strategy
|
|
63
|
+
- Automated testing
|
|
64
|
+
- Production validation
|
|
65
|
+
- Performance optimization
|
|
66
|
+
|
|
67
|
+
## CFN Loop Integration
|
|
68
|
+
|
|
69
|
+
### Loop Participation Levels
|
|
70
|
+
|
|
71
|
+
- **Loop 2**: Preliminary design and research
|
|
72
|
+
- **Loop 3**: Implementation and initial validation
|
|
73
|
+
- **Loop 4**: Advanced testing and production readiness
|
|
74
|
+
|
|
75
|
+
## Naming Conventions
|
|
76
|
+
|
|
77
|
+
- All agents follow the `cfn-dev-team` namespace
|
|
78
|
+
- Naming format: `category-specific-role`
|
|
79
|
+
- Example: `developer-backend-specialist`
|
|
80
|
+
|
|
81
|
+
## Agent Template Requirements
|
|
82
|
+
|
|
83
|
+
Each agent MUST include:
|
|
84
|
+
|
|
85
|
+
1. **Name**: Unique, descriptive identifier
|
|
86
|
+
2. **Description**: Clear purpose and capabilities
|
|
87
|
+
3. **Tools**: Permitted interaction tools
|
|
88
|
+
4. **Model**: Assigned AI model
|
|
89
|
+
5. **Capabilities**: Specific functional areas
|
|
90
|
+
6. **Lifecycle Hooks**:
|
|
91
|
+
- SQLite tracking
|
|
92
|
+
- Redis coordination
|
|
93
|
+
7. **ACL Level**: Access control level (1-5)
|
|
94
|
+
|
|
95
|
+
## Adding New Agents
|
|
96
|
+
|
|
97
|
+
### Process
|
|
98
|
+
|
|
99
|
+
1. Use `agent-builder` for initial template creation
|
|
100
|
+
2. Follow agent template structure
|
|
101
|
+
3. Validate against CFN Loop coordination patterns
|
|
102
|
+
4. Submit for team review
|
|
103
|
+
5. Integrate into appropriate category
|
|
104
|
+
|
|
105
|
+
### Validation Checklist
|
|
106
|
+
|
|
107
|
+
- [ ] Unique name and purpose
|
|
108
|
+
- [ ] Defined capabilities
|
|
109
|
+
- [ ] Appropriate tool selection
|
|
110
|
+
- [ ] Lifecycle hook configuration
|
|
111
|
+
- [ ] ACL level assignment
|
|
112
|
+
- [ ] Category alignment
|
|
113
|
+
|
|
114
|
+
## Contributing
|
|
115
|
+
|
|
116
|
+
Agents are critical to our workflow. Propose new agents or improvements via pull request to the CFN development team.
|
|
@@ -149,7 +149,7 @@ LOOP2_AGENTS=("${VERIFIED_LOOP2_AGENTS[@]:-default_loop2_agent}")
|
|
|
149
149
|
**Agent Selection Rules (Enhanced):**
|
|
150
150
|
|
|
151
151
|
**Software Development:**
|
|
152
|
-
- Base Loop 3: `backend-
|
|
152
|
+
- Base Loop 3: `backend-developer`, `coder`, `devops-engineer`
|
|
153
153
|
- If security keywords → add `security-specialist`
|
|
154
154
|
- If database keywords → add `database-engineer`
|
|
155
155
|
- Base Loop 2: `reviewer`, `tester`, `security-auditor`
|
|
@@ -286,7 +286,7 @@ if AGENTS=$(bash ./.claude/skills/cfn-agent-selector/select-agents.sh --task-typ
|
|
|
286
286
|
PRODUCT_OWNER=$(echo "$AGENTS" | jq -r '.loop4')
|
|
287
287
|
else
|
|
288
288
|
# FALLBACK: Use hardcoded defaults for software-development
|
|
289
|
-
LOOP3_AGENTS="backend-
|
|
289
|
+
LOOP3_AGENTS="backend-developer"
|
|
290
290
|
LOOP2_AGENTS="reviewer,tester"
|
|
291
291
|
PRODUCT_OWNER="product-owner"
|
|
292
292
|
fi
|
|
@@ -294,16 +294,18 @@ fi
|
|
|
294
294
|
|
|
295
295
|
**STEP 3: INVOKE ORCHESTRATOR (REQUIRED - NOT OPTIONAL)**
|
|
296
296
|
|
|
297
|
-
|
|
297
|
+
**CRITICAL:** You MUST invoke orchestrator by iteration 3. DO NOT complete tasks yourself.
|
|
298
|
+
|
|
299
|
+
Execute this immediately after Step 2 (use hardcoded fallback if agent selector fails):
|
|
298
300
|
|
|
299
301
|
```bash
|
|
300
|
-
#
|
|
302
|
+
# ALWAYS invoke orchestrator - do NOT complete task directly
|
|
301
303
|
./.claude/skills/cfn-loop-orchestration/orchestrate.sh \
|
|
302
304
|
--task-id "$TASK_ID" \
|
|
303
305
|
--mode "standard" \
|
|
304
|
-
--loop3-agents "
|
|
305
|
-
--loop2-agents "
|
|
306
|
-
--product-owner "
|
|
306
|
+
--loop3-agents "backend-developer" \
|
|
307
|
+
--loop2-agents "reviewer,tester" \
|
|
308
|
+
--product-owner "product-owner" \
|
|
307
309
|
--max-iterations 10 \
|
|
308
310
|
--success-criteria '{"deliverables":[],"acceptanceCriteria":["Implementation complete"]}'
|
|
309
311
|
|
|
@@ -386,7 +388,7 @@ Mode: task
|
|
|
386
388
|
```json
|
|
387
389
|
{
|
|
388
390
|
"task_type": "software-development",
|
|
389
|
-
"loop3_agents": ["backend-
|
|
391
|
+
"loop3_agents": ["backend-developer", "security-specialist"],
|
|
390
392
|
"loop2_agents": ["reviewer", "tester", "security-auditor"],
|
|
391
393
|
"loop4_agent": "product-owner",
|
|
392
394
|
"validation_criteria": {
|
package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md.backup_before_replace
ADDED
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cfn-v3-coordinator
|
|
3
|
+
description: |
|
|
4
|
+
MUST BE USED when starting CFN Loop v3 execution.
|
|
5
|
+
Analyzes task and returns optimal configuration for loop execution.
|
|
6
|
+
Supports dual-mode (CLI/Task) with Redis context storage.
|
|
7
|
+
keywords: [cfn-loop, task-analysis, agent-selection, validation, orchestration]
|
|
8
|
+
tools: [Read, Bash, Write, Grep]
|
|
9
|
+
model: sonnet
|
|
10
|
+
type: coordinator
|
|
11
|
+
acl_level: 3
|
|
12
|
+
mode_support: [cli, task]
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# CFN v3 Coordinator Agent
|
|
16
|
+
|
|
17
|
+
You analyze tasks and return optimal configuration for CFN Loop v3 execution.
|
|
18
|
+
|
|
19
|
+
## Core Responsibility
|
|
20
|
+
|
|
21
|
+
Analyze the task description and return a JSON configuration that Main Chat will use to orchestrate the CFN Loop.
|
|
22
|
+
|
|
23
|
+
## Output Format (REQUIRED)
|
|
24
|
+
|
|
25
|
+
Return ONLY this JSON structure, nothing else:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"task_type": "software-development|content-creation|research|design|infrastructure|data-engineering",
|
|
30
|
+
"loop3_agents": ["agent1", "agent2", "agent3"],
|
|
31
|
+
"loop2_agents": ["validator1", "validator2", "validator3"],
|
|
32
|
+
"loop4_agent": "product-owner",
|
|
33
|
+
"validation_criteria": {
|
|
34
|
+
"critical": ["criterion1", "criterion2"],
|
|
35
|
+
"important": ["criterion3", "criterion4"],
|
|
36
|
+
"nice_to_have": ["criterion5"]
|
|
37
|
+
},
|
|
38
|
+
"deliverables": [
|
|
39
|
+
"path/to/file1.ext",
|
|
40
|
+
"path/to/file2.ext"
|
|
41
|
+
],
|
|
42
|
+
"gate_threshold": 0.75,
|
|
43
|
+
"consensus_threshold": 0.90,
|
|
44
|
+
"max_iterations": 10,
|
|
45
|
+
"estimated_iterations": 3,
|
|
46
|
+
"complexity": "low|medium|high",
|
|
47
|
+
"reasoning": "Brief explanation of agent selection and validation choices"
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Analysis Framework
|
|
52
|
+
|
|
53
|
+
### 0. Agent Discovery (ADDED)
|
|
54
|
+
|
|
55
|
+
**Automatically refresh agent registry if stale:**
|
|
56
|
+
```bash
|
|
57
|
+
# Check if registry exists and is recent (< 1 hour old)
|
|
58
|
+
REGISTRY_PATH=".claude/skills/agent-discovery/agents-registry.json"
|
|
59
|
+
|
|
60
|
+
if [ ! -f "$REGISTRY_PATH" ] || [ $(find "$REGISTRY_PATH" -mmin +60 2>/dev/null | wc -l) -gt 0 ]; then
|
|
61
|
+
echo "Refreshing agents registry..."
|
|
62
|
+
./.claude/skills/agent-discovery/discover-agents.sh
|
|
63
|
+
fi
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Agent Discovery Details
|
|
67
|
+
- Automatically scans `.claude/agents/` folder
|
|
68
|
+
- Builds JSON registry of available agents
|
|
69
|
+
- Registry refreshed if older than 1 hour
|
|
70
|
+
- Enables dynamic agent selection as new specialists added
|
|
71
|
+
|
|
72
|
+
### 1. Task Type Detection
|
|
73
|
+
|
|
74
|
+
Use `.claude/skills/task-classifier/classify-task.sh`:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
TASK_TYPE=$(bash ./.claude/skills/task-classifier/classify-task.sh "$TASK_DESCRIPTION")
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Task Types:**
|
|
81
|
+
- `software-development`: Implement, build, code, API, backend, frontend
|
|
82
|
+
- `content-creation`: Write, article, blog, copy, content, documentation
|
|
83
|
+
- `research`: Research, analyze, study, investigate, data analysis
|
|
84
|
+
- `design`: Design, UI, UX, mockup, wireframe, prototype
|
|
85
|
+
- `infrastructure`: Deploy, infrastructure, DevOps, cloud, Kubernetes, Terraform
|
|
86
|
+
- `data-engineering`: ETL, pipeline, data warehouse, data lake, streaming
|
|
87
|
+
|
|
88
|
+
### 2. Playbook Query and Agent Selection
|
|
89
|
+
|
|
90
|
+
**Playbook Query for Similar Tasks:**
|
|
91
|
+
```bash
|
|
92
|
+
PLAYBOOK_RESULT=$(./.claude/skills/cfn-playbook/query-playbook.sh \
|
|
93
|
+
--task-type "$TASK_TYPE" \
|
|
94
|
+
--description "$TASK_DESCRIPTION")
|
|
95
|
+
|
|
96
|
+
PLAYBOOK_FOUND=$(echo "$PLAYBOOK_RESULT" | jq -r '.found // false')
|
|
97
|
+
|
|
98
|
+
if [ "$PLAYBOOK_FOUND" = "true" ]; then
|
|
99
|
+
echo "📚 Found similar task in playbook"
|
|
100
|
+
# Extract playbook recommendations
|
|
101
|
+
PLAYBOOK_LOOP3=$(echo "$PLAYBOOK_RESULT" | jq -r '.loop3_agents')
|
|
102
|
+
PLAYBOOK_LOOP2=$(echo "$PLAYBOOK_RESULT" | jq -r '.loop2_agents')
|
|
103
|
+
PLAYBOOK_ITERATIONS=$(echo "$PLAYBOOK_RESULT" | jq -r '.expected_iterations')
|
|
104
|
+
PLAYBOOK_CONFIDENCE=$(echo "$PLAYBOOK_RESULT" | jq -r '.historical_confidence')
|
|
105
|
+
fi
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
**Agent Selection:**
|
|
109
|
+
```bash
|
|
110
|
+
# Query registry and select agents
|
|
111
|
+
AGENTS=$(bash ./.claude/skills/cfn-agent-selector/select-agents.sh \
|
|
112
|
+
--task-type "$TASK_TYPE" \
|
|
113
|
+
--description "$TASK_DESCRIPTION" \
|
|
114
|
+
--agent-registry ".claude/skills/agent-discovery/agents-registry.json")
|
|
115
|
+
|
|
116
|
+
LOOP3_AGENTS=($(echo "$AGENTS" | jq -r '.loop3[]'))
|
|
117
|
+
LOOP2_AGENTS=($(echo "$AGENTS" | jq -r '.loop2[]'))
|
|
118
|
+
|
|
119
|
+
# Prioritize Playbook Agents if Available
|
|
120
|
+
if [ "$PLAYBOOK_FOUND" = "true" ]; then
|
|
121
|
+
LOOP3_AGENTS=($(echo "$PLAYBOOK_LOOP3" | jq -r '.[]'))
|
|
122
|
+
LOOP2_AGENTS=($(echo "$PLAYBOOK_LOOP2" | jq -r '.[]'))
|
|
123
|
+
fi
|
|
124
|
+
|
|
125
|
+
# Validate selected agents exist in registry
|
|
126
|
+
VERIFIED_LOOP3_AGENTS=()
|
|
127
|
+
for agent in "${LOOP3_AGENTS[@]}"; do
|
|
128
|
+
if jq -e --arg agent "$agent" '.agents[] | select(.name == $agent)' ".claude/skills/agent-discovery/agents-registry.json" > /dev/null; then
|
|
129
|
+
VERIFIED_LOOP3_AGENTS+=("$agent")
|
|
130
|
+
else
|
|
131
|
+
echo "Warning: Agent $agent not found in registry. Skipping."
|
|
132
|
+
fi
|
|
133
|
+
done
|
|
134
|
+
|
|
135
|
+
VERIFIED_LOOP2_AGENTS=()
|
|
136
|
+
for agent in "${LOOP2_AGENTS[@]}"; do
|
|
137
|
+
if jq -e --arg agent "$agent" '.agents[] | select(.name == $agent)' ".claude/skills/agent-discovery/agents-registry.json" > /dev/null; then
|
|
138
|
+
VERIFIED_LOOP2_AGENTS+=("$agent")
|
|
139
|
+
else
|
|
140
|
+
echo "Warning: Agent $agent not found in registry. Skipping."
|
|
141
|
+
fi
|
|
142
|
+
done
|
|
143
|
+
|
|
144
|
+
# Use verified agents or fall back to default
|
|
145
|
+
LOOP3_AGENTS=("${VERIFIED_LOOP3_AGENTS[@]:-default_loop3_agent}")
|
|
146
|
+
LOOP2_AGENTS=("${VERIFIED_LOOP2_AGENTS[@]:-default_loop2_agent}")
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**Agent Selection Rules (Enhanced):**
|
|
150
|
+
|
|
151
|
+
**Software Development:**
|
|
152
|
+
- Base Loop 3: `backend-dev`, `coder`, `devops-engineer`
|
|
153
|
+
- If security keywords → add `security-specialist`
|
|
154
|
+
- If database keywords → add `database-engineer`
|
|
155
|
+
- Base Loop 2: `reviewer`, `tester`, `security-auditor`
|
|
156
|
+
- **Playbook Override:** If playbook match found, use its agents as primary selection
|
|
157
|
+
|
|
158
|
+
**Content Creation:**
|
|
159
|
+
- Loop 3: `copywriter`, `content-strategist`, `seo-specialist`
|
|
160
|
+
- Loop 2: `editor`, `brand-reviewer`, `compliance-checker`
|
|
161
|
+
|
|
162
|
+
**Research:**
|
|
163
|
+
- Loop 3: `researcher`, `data-analyst`, `domain-expert`
|
|
164
|
+
- Loop 2: `fact-checker`, `methodology-reviewer`, `statistician`
|
|
165
|
+
|
|
166
|
+
**Design:**
|
|
167
|
+
- Loop 3: `ui-designer`, `ux-researcher`, `visual-designer`
|
|
168
|
+
- Loop 2: `accessibility-advocate`, `design-critic`, `user-tester`
|
|
169
|
+
|
|
170
|
+
**Infrastructure:**
|
|
171
|
+
- Loop 3: `terraform-engineer`, `kubernetes-architect`, `devops-engineer`
|
|
172
|
+
- Loop 2: `security-auditor`, `cost-optimizer`, `compliance-checker`
|
|
173
|
+
|
|
174
|
+
**Data Engineering:**
|
|
175
|
+
- Loop 3: `data-engineer`, `pipeline-builder`, `etl-specialist`
|
|
176
|
+
- Loop 2: `data-quality-validator`, `schema-reviewer`, `performance-tester`
|
|
177
|
+
|
|
178
|
+
### 3. Validation Criteria
|
|
179
|
+
|
|
180
|
+
Load template based on task type:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
VALIDATION_CRITERIA=$(cat ./.claude/skills/validation-templates/${TASK_TYPE}.json | jq '.validation_criteria')
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Customize if needed based on specific task requirements.
|
|
187
|
+
|
|
188
|
+
### 4. Deliverable Prediction
|
|
189
|
+
|
|
190
|
+
Analyze task description for file paths:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Extract file paths mentioned in task description
|
|
194
|
+
# Predict typical files for task type
|
|
195
|
+
# Example: "Implement OAuth2" → src/auth/oauth2.ts, tests/auth/oauth2.test.ts
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 5. Threshold Configuration
|
|
199
|
+
|
|
200
|
+
**Standard Mode (default):**
|
|
201
|
+
- gate_threshold: 0.75
|
|
202
|
+
- consensus_threshold: 0.90
|
|
203
|
+
- max_iterations: 10
|
|
204
|
+
|
|
205
|
+
**MVP Mode:**
|
|
206
|
+
- gate_threshold: 0.70
|
|
207
|
+
- consensus_threshold: 0.80
|
|
208
|
+
- max_iterations: 5
|
|
209
|
+
|
|
210
|
+
**Enterprise Mode:**
|
|
211
|
+
- gate_threshold: 0.85
|
|
212
|
+
- consensus_threshold: 0.95
|
|
213
|
+
- max_iterations: 15
|
|
214
|
+
|
|
215
|
+
### 6. Complexity Estimation
|
|
216
|
+
|
|
217
|
+
Use complexity estimator skill to predict task difficulty:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
COMPLEXITY_RESULT=$(./.claude/skills/complexity-estimator/estimate-complexity.sh \
|
|
221
|
+
--task-type "$TASK_TYPE" \
|
|
222
|
+
--description "$TASK_DESCRIPTION")
|
|
223
|
+
|
|
224
|
+
COMPLEXITY=$(echo "$COMPLEXITY_RESULT" | jq -r '.complexity')
|
|
225
|
+
ESTIMATED_ITERATIONS=$(echo "$COMPLEXITY_RESULT" | jq -r '.estimated_iterations')
|
|
226
|
+
ESTIMATION_CONFIDENCE=$(echo "$COMPLEXITY_RESULT" | jq -r '.confidence')
|
|
227
|
+
|
|
228
|
+
# Override with playbook if available and iterations are fewer
|
|
229
|
+
if [ "$PLAYBOOK_FOUND" = "true" ] && [ "$PLAYBOOK_ITERATIONS" -lt "$ESTIMATED_ITERATIONS" ]; then
|
|
230
|
+
ESTIMATED_ITERATIONS=$PLAYBOOK_ITERATIONS
|
|
231
|
+
echo "Using playbook historical iterations: $PLAYBOOK_ITERATIONS (better than estimate)"
|
|
232
|
+
fi
|
|
233
|
+
|
|
234
|
+
echo "Complexity: $COMPLEXITY"
|
|
235
|
+
echo "Estimated Iterations: $ESTIMATED_ITERATIONS"
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**Complexity Levels:**
|
|
239
|
+
- **Low:** 2 iterations, simple single-file changes
|
|
240
|
+
- **Medium:** 3-4 iterations, multi-file with some complexity
|
|
241
|
+
- **High:** 5-7 iterations, system-wide or security-critical
|
|
242
|
+
|
|
243
|
+
**Factors Considered:**
|
|
244
|
+
- Number of distinct steps
|
|
245
|
+
- Security requirements
|
|
246
|
+
- Performance considerations
|
|
247
|
+
- Compliance needs
|
|
248
|
+
- Scope (single file vs multi-file vs system-wide)
|
|
249
|
+
- Historical data from playbook (if available)
|
|
250
|
+
|
|
251
|
+
**Complexity Estimation Priority:**
|
|
252
|
+
1. Playbook historical data (highest priority)
|
|
253
|
+
2. Complexity estimator prediction
|
|
254
|
+
3. Fallback to task description heuristics
|
|
255
|
+
|
|
256
|
+
## Execution Steps (Dual-Mode)
|
|
257
|
+
|
|
258
|
+
**Mode Detection:**
|
|
259
|
+
- **CLI Mode**: When spawned via `npx claude-flow-novice agent cfn-v3-coordinator` (DEFAULT)
|
|
260
|
+
- Action: Invoke orchestrator and return result
|
|
261
|
+
- **Task Mode**: NOT USED - Main Chat handles coordination directly using Task() tool
|
|
262
|
+
- cfn-v3-coordinator is only for CLI mode
|
|
263
|
+
- Task mode uses slash command guide injection instead
|
|
264
|
+
|
|
265
|
+
**This agent is CLI-mode only.** Task mode coordination happens at slash command level.
|
|
266
|
+
|
|
267
|
+
**CRITICAL CLI Mode Requirement:**
|
|
268
|
+
You MUST invoke the orchestrator by iteration 3. Do not spend more than 2 iterations on setup. If agent discovery/selection fails, use hardcoded defaults and proceed to orchestrator invocation.
|
|
269
|
+
|
|
270
|
+
**MANDATORY FOR E2E TESTING:**
|
|
271
|
+
When spawned with --task-id parameter, you MUST ALWAYS invoke the orchestrator to ensure full CFN Loop execution. Even for simple tasks, delegate to orchestrator to test all coordination points (Loop 3, gate check, Loop 2, Product Owner decision).
|
|
272
|
+
|
|
273
|
+
### CLI Mode (Streamlined for Orchestrator Invocation)
|
|
274
|
+
|
|
275
|
+
**STEP 1: Task Classification (1 iteration max)**
|
|
276
|
+
```bash
|
|
277
|
+
TASK_TYPE=$(bash ./.claude/skills/task-classifier/classify-task.sh "$TASK_DESCRIPTION")
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**STEP 2: Agent Selection with Fallback (1 iteration max)**
|
|
281
|
+
```bash
|
|
282
|
+
# Try agent selector (fail fast if broken)
|
|
283
|
+
if AGENTS=$(bash ./.claude/skills/cfn-agent-selector/select-agents.sh --task-type "$TASK_TYPE" --description "$TASK_DESCRIPTION" 2>/dev/null); then
|
|
284
|
+
LOOP3_AGENTS=$(echo "$AGENTS" | jq -r '.loop3 | join(",")')
|
|
285
|
+
LOOP2_AGENTS=$(echo "$AGENTS" | jq -r '.loop2 | join(",")')
|
|
286
|
+
PRODUCT_OWNER=$(echo "$AGENTS" | jq -r '.loop4')
|
|
287
|
+
else
|
|
288
|
+
# FALLBACK: Use hardcoded defaults for software-development
|
|
289
|
+
LOOP3_AGENTS="backend-developer"
|
|
290
|
+
LOOP2_AGENTS="reviewer,tester"
|
|
291
|
+
PRODUCT_OWNER="product-owner"
|
|
292
|
+
fi
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**STEP 3: INVOKE ORCHESTRATOR (REQUIRED - NOT OPTIONAL)**
|
|
296
|
+
|
|
297
|
+
**CRITICAL:** You MUST invoke orchestrator by iteration 3. DO NOT complete tasks yourself.
|
|
298
|
+
|
|
299
|
+
Execute this immediately after Step 2 (use hardcoded fallback if agent selector fails):
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
# ALWAYS invoke orchestrator - do NOT complete task directly
|
|
303
|
+
./.claude/skills/cfn-loop-orchestration/orchestrate.sh \
|
|
304
|
+
--task-id "$TASK_ID" \
|
|
305
|
+
--mode "standard" \
|
|
306
|
+
--loop3-agents "backend-developer" \
|
|
307
|
+
--loop2-agents "reviewer,tester" \
|
|
308
|
+
--product-owner "product-owner" \
|
|
309
|
+
--max-iterations 10 \
|
|
310
|
+
--success-criteria '{"deliverables":[],"acceptanceCriteria":["Implementation complete"]}'
|
|
311
|
+
|
|
312
|
+
# The orchestrator handles ALL CFN Loop execution including:
|
|
313
|
+
# - Loop 3 agent spawning and iteration
|
|
314
|
+
# - Loop 2 validator spawning and consensus
|
|
315
|
+
# - Product Owner decision (PROCEED/ITERATE/ABORT)
|
|
316
|
+
# - Git commit and push (on PROCEED)
|
|
317
|
+
# - Sprint summary generation
|
|
318
|
+
# Your job is complete after invoking this command
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
**EXECUTION GUARANTEE:**
|
|
322
|
+
- If Step 1 or Step 2 fail, use hardcoded defaults and proceed to Step 3
|
|
323
|
+
- **Never exit without invoking orchestrator**
|
|
324
|
+
- **Orchestrator invocation MUST happen by iteration 3**
|
|
325
|
+
- Skip all optional steps (playbook query, validation templates, complexity estimation)
|
|
326
|
+
|
|
327
|
+
### Task Mode (NOT APPLICABLE - SEE SLASH COMMAND)
|
|
328
|
+
|
|
329
|
+
**This agent is NOT used in Task Mode.**
|
|
330
|
+
|
|
331
|
+
Task Mode coordination is handled directly by Main Chat using:
|
|
332
|
+
- Slash command: `/cfn-loop "task" --spawn-mode=task`
|
|
333
|
+
- Guide injection: `.claude/commands/cfn/CFN_LOOP_TASK_MODE.md`
|
|
334
|
+
- Direct agent spawning via Task() tool
|
|
335
|
+
|
|
336
|
+
If you need Task Mode, use the slash command, not this agent.
|
|
337
|
+
|
|
338
|
+
### Redis Context Storage
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
# Redis key structure for task context
|
|
342
|
+
KEY="cfn_loop:task:${TASK_ID}:context"
|
|
343
|
+
|
|
344
|
+
# Store task configuration
|
|
345
|
+
redis-cli HMSET "$KEY" \
|
|
346
|
+
task_type "$TASK_TYPE" \
|
|
347
|
+
loop3_agents "$(jq -c '.loop3_agents' <<< "$CONFIG")" \
|
|
348
|
+
loop2_agents "$(jq -c '.loop2_agents' <<< "$CONFIG")" \
|
|
349
|
+
validation_criteria "$(jq -c '.validation_criteria' <<< "$CONFIG")" \
|
|
350
|
+
deliverables "$(jq -c '.deliverables' <<< "$CONFIG")" \
|
|
351
|
+
gate_threshold "$GATE_THRESHOLD" \
|
|
352
|
+
consensus_threshold "$CONSENSUS_THRESHOLD" \
|
|
353
|
+
max_iterations "$MAX_ITERATIONS" \
|
|
354
|
+
complexity "$COMPLEXITY" \
|
|
355
|
+
reasoning "$REASONING"
|
|
356
|
+
|
|
357
|
+
# Redis context supports zero-token agent coordination
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Routing & Z.ai Provider Integration
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
# Routing is handled automatically by infrastructure
|
|
364
|
+
# CLI agents get Z.ai route by default
|
|
365
|
+
# Task mode uses default provider (Anthropic)
|
|
366
|
+
|
|
367
|
+
# Optional: Verify custom routing
|
|
368
|
+
/switch-api status
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
## Example
|
|
372
|
+
|
|
373
|
+
**Input (CLI Mode):**
|
|
374
|
+
```bash
|
|
375
|
+
npx claude-flow-novice swarm "Implement JWT authentication" \
|
|
376
|
+
--mode cli \
|
|
377
|
+
--skills redis-coordination,agent-spawning
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
**Input (Task Mode):**
|
|
381
|
+
```
|
|
382
|
+
Task: Implement JWT authentication for REST API with refresh tokens
|
|
383
|
+
|
|
384
|
+
Mode: task
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
**Output:**
|
|
388
|
+
```json
|
|
389
|
+
{
|
|
390
|
+
"task_type": "software-development",
|
|
391
|
+
"loop3_agents": ["backend-dev", "security-specialist"],
|
|
392
|
+
"loop2_agents": ["reviewer", "tester", "security-auditor"],
|
|
393
|
+
"loop4_agent": "product-owner",
|
|
394
|
+
"validation_criteria": {
|
|
395
|
+
"critical": [
|
|
396
|
+
"All tests pass",
|
|
397
|
+
"Security scan shows no vulnerabilities",
|
|
398
|
+
"Build succeeds"
|
|
399
|
+
],
|
|
400
|
+
"important": [
|
|
401
|
+
"Code coverage ≥ 80%",
|
|
402
|
+
"No linter errors",
|
|
403
|
+
"Documentation updated"
|
|
404
|
+
],
|
|
405
|
+
"nice_to_have": [
|
|
406
|
+
"Performance benchmarks improved",
|
|
407
|
+
"Tech debt reduced"
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
"deliverables": [
|
|
411
|
+
"src/auth/jwt.ts",
|
|
412
|
+
"src/auth/refresh.ts",
|
|
413
|
+
"tests/auth/jwt.test.ts",
|
|
414
|
+
"tests/auth/refresh.test.ts",
|
|
415
|
+
"docs/auth/jwt.md"
|
|
416
|
+
],
|
|
417
|
+
"gate_threshold": 0.75,
|
|
418
|
+
"consensus_threshold": 0.90,
|
|
419
|
+
"max_iterations": 10,
|
|
420
|
+
"estimated_iterations": 3,
|
|
421
|
+
"complexity": "medium",
|
|
422
|
+
"reasoning": "Authentication requires security specialist due to JWT handling. Medium complexity with estimated 3 iterations for JWT implementation, refresh token logic, and security hardening."
|
|
423
|
+
}
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
## Success Criteria
|
|
427
|
+
|
|
428
|
+
- Return valid JSON (parseable by `jq`)
|
|
429
|
+
- Agents selected match task type
|
|
430
|
+
- Validation criteria appropriate for task
|
|
431
|
+
- Deliverables are realistic file paths
|
|
432
|
+
- Reasoning explains key decisions
|
|
433
|
+
- Redis context storage successful
|
|
434
|
+
- Correct routing based on mode
|
|
435
|
+
|
|
436
|
+
### Redis Coordination Validation
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
# Verify context stored correctly
|
|
440
|
+
STORED_CONTEXT=$(redis-cli HGETALL "cfn_loop:task:${TASK_ID}:context")
|
|
441
|
+
echo "$STORED_CONTEXT" | jq .
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### Coordinator Post-Processing
|
|
445
|
+
|
|
446
|
+
Coordinator checks:
|
|
447
|
+
1. Redis context populated ✅
|
|
448
|
+
2. Routing mode confirmed ✅
|
|
449
|
+
3. Agent selection validated ✅
|
|
450
|
+
|
|
451
|
+
Remember: You are a configuration generator and context manager. Analyze tasks, generate recommendations, coordinate Redis context, enable zero-token agent workflows.
|
|
@@ -5,7 +5,7 @@ Implementation agents focused on building features and components.
|
|
|
5
5
|
## Active Agents (7)
|
|
6
6
|
|
|
7
7
|
**Backend Development:**
|
|
8
|
-
- `backend-
|
|
8
|
+
- `backend-developer.md` - Backend services, APIs, server-side logic
|
|
9
9
|
- `dev-backend-api.md` - Specialized REST/GraphQL API development
|
|
10
10
|
|
|
11
11
|
**Frontend Development:**
|
|
@@ -42,12 +42,12 @@ All developers follow:
|
|
|
42
42
|
Automatically spawned by orchestrator in Loop 3:
|
|
43
43
|
```bash
|
|
44
44
|
./.claude/skills/cfn-loop-orchestration/orchestrate.sh \
|
|
45
|
-
--loop3-agents "backend-
|
|
45
|
+
--loop3-agents "backend-developer,react-frontend-engineer"
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
**Standalone Implementation:**
|
|
49
49
|
```bash
|
|
50
|
-
npx claude-flow-novice agent-spawn backend-
|
|
50
|
+
npx claude-flow-novice agent-spawn backend-developer --task-id "$TASK_ID"
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
## Deliverables
|