claude-flow-novice 2.14.13 → 2.14.15
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 +7 -51
- package/.claude/commands/cfn-loop-cli.md +50 -125
- package/.claude/skills/cfn-agent-selector/SKILL.md +2 -2
- package/.claude/skills/cfn-agent-selector/select-agents.sh +0 -45
- package/.claude/skills/cfn-loop-orchestration/helpers/context-injection.sh +6 -69
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +0 -17
- package/README.md +2 -2
- package/claude-assets/agents/cfn-dev-team/CLAUDE.md +3 -3
- package/claude-assets/agents/cfn-dev-team/README.md +1 -1
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +2 -2
- package/claude-assets/agents/cfn-dev-team/developers/README.md +3 -3
- package/claude-assets/agents/cfn-dev-team/documentation/agent-type-guidelines.md +1 -1
- package/claude-assets/agents/cfn-dev-team/test-agent.md +2 -2
- package/claude-assets/commands/CFN_LOOP_TASK_MODE.md +7 -51
- package/claude-assets/commands/cfn-loop-cli.md +50 -125
- package/claude-assets/skills/cfn-agent-selector/SKILL.md +2 -2
- package/claude-assets/skills/cfn-agent-selector/select-agents.sh +0 -45
- package/claude-assets/skills/cfn-loop-orchestration/helpers/context-injection.sh +6 -69
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +0 -17
- package/claude-assets/skills/cfn-multi-coordinator-planning/README.md +256 -0
- package/claude-assets/skills/cfn-multi-coordinator-planning/SKILL.md +62 -0
- package/claude-assets/skills/cfn-multi-coordinator-planning/map-dependencies-conflicts.sh +376 -0
- package/claude-assets/skills/cfn-multi-coordinator-planning/plan-coordinator-resources.sh +258 -0
- package/claude-assets/skills/cfn-multi-coordinator-planning/plan-multi-coordinator-work.sh +267 -0
- package/claude-assets/skills/cfn-multi-coordinator-planning/plan-risk-rollout.sh +350 -0
- package/claude-assets/skills/cfn-multi-coordinator-planning/test-multi-coordinator-planning.sh +338 -0
- package/claude-assets/skills/cfn-multi-coordinator-planning/validate-task-planning.sh +189 -0
- package/dist/agents/agent-loader.js +165 -146
- package/dist/agents/agent-loader.js.map +1 -1
- package/package.json +1 -1
- package/.claude/skills/cfn-agent-selector/SKILL.md.backup_before_replace +0 -91
- package/.claude/skills/cfn-loop-orchestration/helpers/validate-task-context.sh +0 -241
- package/.claude/skills/pre-edit-backup/backup.sh +0 -130
- package/.claude/skills/pre-edit-backup/cleanup.sh +0 -155
- package/.claude/skills/pre-edit-backup/restore.sh +0 -128
- package/.claude/skills/pre-edit-backup/revert-file.sh +0 -168
- package/claude-assets/agents/cfn-dev-team/CLAUDE.md.backup_before_replace +0 -1086
- package/claude-assets/agents/cfn-dev-team/README.md.backup_before_replace +0 -116
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md.backup_before_replace +0 -451
- package/claude-assets/agents/cfn-dev-team/developers/README.md.backup_before_replace +0 -69
- package/claude-assets/agents/cfn-dev-team/documentation/agent-type-guidelines.md.backup_before_replace +0 -465
- package/claude-assets/agents/cfn-dev-team/test-agent.md.backup_before_replace +0 -141
- package/claude-assets/skills/CFN-LOOP-VALIDATION.md +0 -202
- package/claude-assets/skills/REDIS-COORDINATION.md +0 -187
- package/claude-assets/skills/SKILL.md +0 -229
- package/claude-assets/skills/agent-discovery/agents-registry.json +0 -484
- package/claude-assets/skills/agent-name-validation/README.md +0 -28
- package/claude-assets/skills/agent-name-validation/SKILL.md +0 -168
- package/claude-assets/skills/agent-name-validation/validate-agent-names.sh +0 -47
- package/claude-assets/skills/cfn-agent-selector/SKILL.md.backup_before_replace +0 -91
- package/claude-assets/skills/cfn-loop-orchestration/helpers/validate-task-context.sh +0 -241
- package/claude-assets/skills/consensus-calculator.js +0 -45
- package/claude-assets/skills/evidence-chain.sql +0 -66
- package/claude-assets/skills/hook-pipeline/bash-dependency-checker.sh +0 -89
- package/claude-assets/skills/hook-pipeline/bash-pipe-safety.sh +0 -69
- package/claude-assets/skills/hook-pipeline/enforce-lf.sh +0 -36
- package/claude-assets/skills/hook-pipeline/js-promise-safety.sh +0 -110
- package/claude-assets/skills/hook-pipeline/python-async-safety.py +0 -124
- package/claude-assets/skills/hook-pipeline/python-import-checker.py +0 -114
- package/claude-assets/skills/hook-pipeline/python-subprocess-safety.py +0 -77
- package/claude-assets/skills/hook-pipeline/rust-command-safety.sh +0 -38
- package/claude-assets/skills/hook-pipeline/rust-dependency-checker.sh +0 -50
- package/claude-assets/skills/hook-pipeline/rust-future-safety.sh +0 -50
- package/claude-assets/skills/pre-edit-backup/backup.sh +0 -130
- package/claude-assets/skills/pre-edit-backup/cleanup.sh +0 -155
- package/claude-assets/skills/pre-edit-backup/restore.sh +0 -128
- package/claude-assets/skills/pre-edit-backup/revert-file.sh +0 -168
- package/claude-assets/skills/run-all-skill-tests.sh +0 -124
- package/claude-assets/skills/seo-orchestration/SKILL.md +0 -292
- package/claude-assets/skills/seo-orchestration/orchestrate-seo.sh +0 -566
- package/claude-assets/skills/seo-orchestration/orchestrate-seo.sh.backup +0 -755
- package/claude-assets/skills/seo-orchestration/validate-consensus.sh +0 -270
- package/claude-assets/skills/team-provider-routing/execute-agent.sh +0 -76
- package/claude-assets/skills/test-execution-coordinator-pattern.md +0 -228
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
Task Mode: Main Chat
|
|
9
|
+
Task Mode: Main Chat spawns coordinator and agents via Task() tool with full context injection and visibility.
|
|
10
10
|
|
|
11
11
|
| Aspect | Task Mode | CLI Mode |
|
|
12
12
|
|--------|-----------|----------|
|
|
13
|
-
| **Spawning** | Main Chat
|
|
13
|
+
| **Spawning** | Main Chat via Task() | Coordinator via npx CLI |
|
|
14
14
|
| **Visibility** | Full transparency in Main Chat | Background, Redis logs |
|
|
15
15
|
| **Provider** | All Anthropic | CLI uses Z.ai routing |
|
|
16
16
|
| **Cost** | ~$0.150/iteration | ~$0.054/iteration (64% savings) |
|
|
@@ -35,50 +35,6 @@ Task Mode: Main Chat acts as coordinator and spawns agents directly via Task() t
|
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
38
|
-
## Task Mode Execution Pattern
|
|
39
|
-
|
|
40
|
-
**Key Principle: Main Chat IS the coordinator**
|
|
41
|
-
|
|
42
|
-
In Task Mode, Main Chat directly spawns all agents via Task() tool. No coordinator agent is used.
|
|
43
|
-
|
|
44
|
-
### Example: Zone A React Router Migration
|
|
45
|
-
|
|
46
|
-
```javascript
|
|
47
|
-
// ✅ CORRECT - Main Chat spawns agents directly
|
|
48
|
-
Task("backend-developer", `
|
|
49
|
-
Migrate React Router from v4 to v6 in Zone A components
|
|
50
|
-
Deliverables: Updated Routes, component fixes, tests
|
|
51
|
-
Directory: frontend/src/zone-a/
|
|
52
|
-
`);
|
|
53
|
-
|
|
54
|
-
Task("react-frontend-engineer", `
|
|
55
|
-
Review and fix any component issues after router migration
|
|
56
|
-
Focus on route parameters, navigation, and component integration
|
|
57
|
-
`);
|
|
58
|
-
|
|
59
|
-
Task("tester", `
|
|
60
|
-
Test React Router v6 migration in Zone A
|
|
61
|
-
Verify all routes work, navigation functions, no regressions
|
|
62
|
-
`);
|
|
63
|
-
|
|
64
|
-
// Later: Process outputs, collect confidence, decide next iteration
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### What NOT to Do in Task Mode
|
|
68
|
-
|
|
69
|
-
```javascript
|
|
70
|
-
// ❌ INCORRECT - Don't spawn coordinator agent
|
|
71
|
-
Task("cfn-v3-coordinator", "Coordinate React Router migration");
|
|
72
|
-
|
|
73
|
-
// ❌ INCORRECT - Don't use CLI commands in Task Mode
|
|
74
|
-
Bash("npx claude-flow-novice swarm 'task description'");
|
|
75
|
-
|
|
76
|
-
// ❌ INCORRECT - Don't nest CFN Loop calls
|
|
77
|
-
Task("reviewer", "/cfn-loop 'review this code'"); // Causes infinite loops
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
38
|
## Agent Specialization
|
|
83
39
|
|
|
84
40
|
### Loop 3 (Implementation)
|
|
@@ -132,15 +88,15 @@ return validators.slice(0, 6); // Max 6
|
|
|
132
88
|
## Sprint Completion Workflow
|
|
133
89
|
|
|
134
90
|
**Key Difference in Task Mode:**
|
|
135
|
-
- Product Owner spawned via `Task()` by
|
|
91
|
+
- Product Owner spawned via `Task()` by coordinator (NOT via `execute-decision.sh`)
|
|
136
92
|
- Use helper scripts for parsing/validation: `parse-decision.sh`, `validate-deliverables.sh`
|
|
137
93
|
- CLI Mode uses `execute-decision.sh` which handles spawning + all logic
|
|
138
94
|
|
|
139
95
|
### 1. Consensus Validation
|
|
140
96
|
|
|
141
|
-
**Task Mode** -
|
|
97
|
+
**Task Mode** - Coordinator spawns Product Owner via Task():
|
|
142
98
|
```javascript
|
|
143
|
-
//
|
|
99
|
+
// Coordinator builds context and spawns PO
|
|
144
100
|
const poContext = `
|
|
145
101
|
CFN Loop iteration ${iteration} complete.
|
|
146
102
|
Loop 2 Consensus: ${consensus} (threshold: ${threshold})
|
|
@@ -208,7 +164,7 @@ EOF
|
|
|
208
164
|
### 5. Execute Product Owner Suggested Next Steps
|
|
209
165
|
|
|
210
166
|
**After PROCEED Decision:**
|
|
211
|
-
Product Owner may suggest follow-up tasks (documentation, testing, refactoring).
|
|
167
|
+
Product Owner may suggest follow-up tasks (documentation, testing, refactoring). Coordinator (main chat) must proceed by spawning specialized agents to execute these tasks:
|
|
212
168
|
|
|
213
169
|
```javascript
|
|
214
170
|
// Parse PO feedback for suggested next steps
|
|
@@ -349,7 +305,7 @@ threshold = Math.min(threshold, 0.98); // Cap at 0.98
|
|
|
349
305
|
## Background Backlog Worker
|
|
350
306
|
|
|
351
307
|
### Architecture
|
|
352
|
-
- **Main Chat
|
|
308
|
+
- **Main Chat**: Spawns Task() agents for Sprint N (foreground)
|
|
353
309
|
- **Background CLI**: Processes P3 backlog items (detached process)
|
|
354
310
|
|
|
355
311
|
### Launch Background Worker
|
|
@@ -14,12 +14,14 @@ Execute CFN Loop using CLI spawning for maximum cost savings (95-98% vs Task too
|
|
|
14
14
|
|
|
15
15
|
## What is CLI Mode?
|
|
16
16
|
|
|
17
|
-
**CLI Mode Architecture:**
|
|
17
|
+
**CLI Mode Architecture v3.0 (Enhanced):**
|
|
18
18
|
- Main Chat spawns **single coordinator agent** via Task()
|
|
19
|
-
-
|
|
19
|
+
- Enhanced coordinator spawns **all workers via CLI** with protocol compliance
|
|
20
20
|
- CLI agents use **Z.ai custom routing** (when enabled)
|
|
21
|
-
-
|
|
21
|
+
- **Real-time monitoring** with automatic recovery from stuck agents
|
|
22
|
+
- Background execution with **Redis monitoring** and progress visibility
|
|
22
23
|
- **95-98% cost savings** vs Task tool spawning
|
|
24
|
+
- **Enhanced features**: Process health checking, context validation, broadcast protocol
|
|
23
25
|
|
|
24
26
|
**Cost Breakdown:**
|
|
25
27
|
```
|
|
@@ -77,138 +79,57 @@ Savings: 64% with custom routing, 95-98% vs all-Task
|
|
|
77
79
|
|
|
78
80
|
## 🚨 CRITICAL EXECUTION INSTRUCTIONS
|
|
79
81
|
|
|
80
|
-
**
|
|
82
|
+
**THIS IS A SLASH COMMAND - MAIN CHAT EXECUTES THIS DIRECTLY**
|
|
81
83
|
|
|
84
|
+
**DO NOT manually spawn Task() agents for CFN Loop workflows**
|
|
85
|
+
**DO NOT spawn cfn-v3-coordinator manually**
|
|
82
86
|
**DO NOT spawn Loop 3 agents (backend-dev, researcher, etc.)**
|
|
83
87
|
**DO NOT spawn Loop 2 agents (reviewer, tester, etc.)**
|
|
84
88
|
**DO NOT spawn product-owner**
|
|
85
|
-
**DO NOT ask user which agents to use**
|
|
86
89
|
|
|
87
|
-
|
|
90
|
+
**Main Chat simply executes the slash command - everything else is automatic**
|
|
88
91
|
|
|
89
92
|
---
|
|
90
93
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
Acceptance Criteria:
|
|
110
|
-
- [ ] Core functionality implemented
|
|
111
|
-
- [ ] All tests pass with >80% coverage
|
|
112
|
-
- [ ] Security review completed
|
|
113
|
-
- [ ] Documentation updated
|
|
114
|
-
- [ ] No regression in existing features
|
|
115
|
-
|
|
116
|
-
Quality Gates (${mode.toUpperCase()} MODE):
|
|
117
|
-
- Loop 3 Gate Threshold: ${mode === 'enterprise' ? 0.85 : mode === 'standard' ? 0.75 : 0.70}
|
|
118
|
-
- Loop 2 Consensus Threshold: ${mode === 'enterprise' ? 0.95 : mode === 'standard' ? 0.90 : 0.80}
|
|
119
|
-
- Max Iterations: ${maxIterations}
|
|
120
|
-
|
|
121
|
-
Definition of Done:
|
|
122
|
-
- Consensus ≥ threshold achieved
|
|
123
|
-
- All acceptance criteria met
|
|
124
|
-
- Product Owner approval received
|
|
125
|
-
|
|
126
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
127
|
-
ORCHESTRATION CONFIGURATION
|
|
128
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
129
|
-
|
|
130
|
-
Mode: ${mode.toUpperCase()}
|
|
131
|
-
|
|
132
|
-
Loop 3 Agents (Implementation) - SELECT BASED ON TASK:
|
|
133
|
-
Examples:
|
|
134
|
-
- Backend API: backend-dev, researcher, devops
|
|
135
|
-
- Full-Stack: backend-dev, react-frontend-engineer, devops
|
|
136
|
-
- Infrastructure: devops, rust-developer, researcher
|
|
137
|
-
- Security: security-specialist, backend-dev, researcher
|
|
138
|
-
|
|
139
|
-
Loop 2 Agents (Validation) - SCALE BY COMPLEXITY:
|
|
140
|
-
Simple (1-2 files): reviewer, tester
|
|
141
|
-
Standard (3-5 files): reviewer, tester, architect, security-specialist
|
|
142
|
-
Complex (>5 files): +code-analyzer, +performance-benchmarker
|
|
143
|
-
|
|
144
|
-
Product Owner: product-owner
|
|
145
|
-
|
|
146
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
147
|
-
EXECUTION INSTRUCTIONS
|
|
148
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
149
|
-
|
|
150
|
-
1. INVOKE ORCHESTRATOR (CLI spawning):
|
|
151
|
-
|
|
152
|
-
TASK_ID="cfn-cli-$(date +%s%N | tail -c 7)-${RANDOM}"
|
|
153
|
-
MODE="${mode}"
|
|
154
|
-
LOOP3_AGENTS="backend-dev,researcher,devops" # Customize for task
|
|
155
|
-
LOOP2_AGENTS="reviewer,tester,architect,security-specialist" # Scale by complexity
|
|
156
|
-
|
|
157
|
-
./.claude/skills/cfn-loop-orchestration/orchestrate.sh \\
|
|
158
|
-
--task-id "$TASK_ID" \\
|
|
159
|
-
--mode "$MODE" \\
|
|
160
|
-
--loop3-agents "$LOOP3_AGENTS" \\
|
|
161
|
-
--loop2-agents "$LOOP2_AGENTS" \\
|
|
162
|
-
--product-owner "product-owner" \\
|
|
163
|
-
--max-iterations ${maxIterations}
|
|
164
|
-
|
|
165
|
-
2. ORCHESTRATOR HANDLES:
|
|
166
|
-
- Spawns all agents via CLI (background)
|
|
167
|
-
- Loop 3: Gate check (≥threshold) → PASS/ITERATE
|
|
168
|
-
- Loop 2: Consensus check (≥threshold) → COMPLETE/ITERATE
|
|
169
|
-
- Product Owner: PROCEED/ITERATE/ABORT decision
|
|
170
|
-
- Git commit/push on PROCEED
|
|
171
|
-
- Returns structured result to Main Chat
|
|
172
|
-
|
|
173
|
-
3. RETURN STRUCTURED RESULT:
|
|
174
|
-
{
|
|
175
|
-
"taskId": "cfn-cli-XXXXX",
|
|
176
|
-
"status": "complete|failed",
|
|
177
|
-
"iterations": {"loop3": N, "loop2": M},
|
|
178
|
-
"finalConsensus": 0.XX,
|
|
179
|
-
"acceptanceCriteria": {
|
|
180
|
-
"met": [...],
|
|
181
|
-
"pending": [...]
|
|
182
|
-
},
|
|
183
|
-
"deliverables": [...],
|
|
184
|
-
"recommendations": [...]
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
188
|
-
CRITICAL RULES
|
|
189
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
190
|
-
|
|
191
|
-
- DO NOT spawn agents with Task() - orchestrator uses CLI
|
|
192
|
-
- ALL agents run in background via npx claude-flow-novice
|
|
193
|
-
- USE Redis BLPOP for loop dependencies
|
|
194
|
-
- AGENTS use Z.ai routing automatically (when enabled)
|
|
195
|
-
- RETURN structured result when complete
|
|
196
|
-
`, "cfn-v3-coordinator")
|
|
197
|
-
```
|
|
94
|
+
## How This Command Works:
|
|
95
|
+
|
|
96
|
+
When Main Chat executes `/cfn-loop-cli "task description"`, this slash command:
|
|
97
|
+
|
|
98
|
+
1. **Automatically spawns cfn-v3-coordinator** with proper parameters
|
|
99
|
+
2. **Coordinator invokes enhanced orchestrator** with monitoring v3.0
|
|
100
|
+
3. **Orchestrator spawns all agents via CLI** (background execution)
|
|
101
|
+
4. **Handles complete CFN Loop workflow** with real-time monitoring
|
|
102
|
+
5. **Returns structured result** to Main Chat when complete
|
|
103
|
+
|
|
104
|
+
## Enhanced Features v3.0:
|
|
105
|
+
|
|
106
|
+
- ✅ **Real-time monitoring** with automatic stuck agent recovery
|
|
107
|
+
- ✅ **Process health checking** and dead process cleanup
|
|
108
|
+
- ✅ **Protocol compliance** preventing "consensus on vapor" anti-patterns
|
|
109
|
+
- ✅ **Progress visibility** with detailed timestamped reports
|
|
110
|
+
- ✅ **95-98% cost savings** with Z.ai routing optimization
|
|
111
|
+
- ✅ **Background execution** with Redis persistence
|
|
198
112
|
|
|
199
|
-
##
|
|
113
|
+
## Main Chat Execution Rules
|
|
114
|
+
|
|
115
|
+
**THIS SLASH COMMAND HANDLES EVERYTHING AUTOMATICALLY**
|
|
116
|
+
|
|
117
|
+
**Main Chat simply executes:**
|
|
118
|
+
```bash
|
|
119
|
+
/cfn-loop-cli "Task description" --mode=standard
|
|
120
|
+
```
|
|
200
121
|
|
|
201
|
-
**
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
-
|
|
122
|
+
**The slash command automatically:**
|
|
123
|
+
- ✅ Spawns coordinator with proper parameters
|
|
124
|
+
- ✅ Handles all agent spawning via CLI
|
|
125
|
+
- ✅ Manages complete CFN Loop workflow
|
|
126
|
+
- ✅ Returns structured result when complete
|
|
206
127
|
|
|
207
|
-
**
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
-
|
|
211
|
-
-
|
|
128
|
+
**Main Chat should NOT:**
|
|
129
|
+
- ❌ Manually spawn any Task() agents for CFN Loop
|
|
130
|
+
- ❌ Ask about retry/iteration decisions (handled automatically)
|
|
131
|
+
- ❌ Monitor agent progress (slash command handles this)
|
|
132
|
+
- ❌ Coordinate between agents (built-in coordination)
|
|
212
133
|
|
|
213
134
|
## CLI Mode Benefits
|
|
214
135
|
|
|
@@ -217,11 +138,15 @@ Task("cfn-v3-coordinator", `
|
|
|
217
138
|
- 95-98% savings vs Task tool spawning
|
|
218
139
|
- Scales linearly with iterations (Task mode scales exponentially)
|
|
219
140
|
|
|
220
|
-
**Production Features:**
|
|
141
|
+
**Production Features v3.0:**
|
|
221
142
|
- Background execution (no timeout issues)
|
|
222
143
|
- Redis state persistence (crash recovery)
|
|
223
144
|
- Zero-token waiting (BLPOP blocks without API calls)
|
|
224
145
|
- Web portal visibility (http://localhost:3000)
|
|
146
|
+
- **Enhanced monitoring**: Real-time agent progress tracking
|
|
147
|
+
- **Automatic recovery**: Dead process cleanup and agent restart
|
|
148
|
+
- **Protocol compliance**: Prevents "consensus on vapor" anti-patterns
|
|
149
|
+
- **Progress visibility**: Detailed reports with timestamps and health status
|
|
225
150
|
|
|
226
151
|
**Performance:**
|
|
227
152
|
- Parallel agent spawning (no sequential bottleneck)
|
|
@@ -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-dev", "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-dev, coder
|
|
39
39
|
**Add if keywords:**
|
|
40
40
|
- "security", "authentication", "JWT" → security-specialist
|
|
41
41
|
- "database", "SQL", "schema" → database-engineer (if exists)
|
|
@@ -28,57 +28,12 @@ if [[ ! -f "$REGISTRY_PATH" ]]; then
|
|
|
28
28
|
exit 1
|
|
29
29
|
fi
|
|
30
30
|
|
|
31
|
-
# Smart agent selection for React Router and specialized tasks
|
|
32
|
-
smart_agent_selection() {
|
|
33
|
-
local description="$1"
|
|
34
|
-
local task_type="$2"
|
|
35
|
-
|
|
36
|
-
# React Router specialization - Zone A fix
|
|
37
|
-
if [[ "$description" =~ (React Router|react-router|TS2786|jsx.*component|route.*migration) ]]; then
|
|
38
|
-
echo '["react-frontend-engineer", "reviewer", "tester"]'
|
|
39
|
-
return 0
|
|
40
|
-
fi
|
|
41
|
-
|
|
42
|
-
# TypeScript/TSX specialization
|
|
43
|
-
if [[ "$description" =~ (TypeScript|tsx|TS[0-9]+|interface.*error) ]]; then
|
|
44
|
-
echo '["react-frontend-engineer", "reviewer", "tester"]'
|
|
45
|
-
return 0
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
# Frontend UI specialization
|
|
49
|
-
if [[ "$description" =~ (frontend|ui|component|css|style|responsive) ]]; then
|
|
50
|
-
echo '["react-frontend-engineer", "reviewer", "accessibility-advocate-persona"]'
|
|
51
|
-
return 0
|
|
52
|
-
fi
|
|
53
|
-
|
|
54
|
-
# Authentication/Security specialization
|
|
55
|
-
if [[ "$description" =~ (auth|jwt|token|security|password|login|register) ]]; then
|
|
56
|
-
echo '["backend-developer", "security-specialist", "reviewer"]'
|
|
57
|
-
return 0
|
|
58
|
-
fi
|
|
59
|
-
|
|
60
|
-
# API/Backend specialization
|
|
61
|
-
if [[ "$description" =~ (api|endpoint|server|backend|database|orm|sql) ]]; then
|
|
62
|
-
echo '["backend-developer", "reviewer", "tester"]'
|
|
63
|
-
return 0
|
|
64
|
-
fi
|
|
65
|
-
|
|
66
|
-
return 1 # Fall back to registry-based selection
|
|
67
|
-
}
|
|
68
|
-
|
|
69
31
|
# Score agents function with improved flat namespace matching
|
|
70
32
|
score_agents() {
|
|
71
33
|
local registry_path="$1"
|
|
72
34
|
local description="$2"
|
|
73
35
|
local task_type="$3"
|
|
74
36
|
|
|
75
|
-
# Try smart selection first
|
|
76
|
-
local smart_result
|
|
77
|
-
if smart_result=$(smart_agent_selection "$description" "$task_type"); then
|
|
78
|
-
echo "$smart_result"
|
|
79
|
-
return 0
|
|
80
|
-
fi
|
|
81
|
-
|
|
82
37
|
# Complex JQ query for flexible matching
|
|
83
38
|
jq -r --arg desc "$description" --arg task_type "$task_type" '
|
|
84
39
|
[
|
|
@@ -116,79 +116,16 @@ inject_context_for_agent() {
|
|
|
116
116
|
local task_id="$2"
|
|
117
117
|
local iteration="${3:-1}"
|
|
118
118
|
|
|
119
|
-
# Retrieve
|
|
120
|
-
local task_context
|
|
121
|
-
local epic_context=""
|
|
122
|
-
local phase_context=""
|
|
123
|
-
local success_criteria=""
|
|
124
|
-
local expected_files=""
|
|
125
|
-
|
|
119
|
+
# Retrieve task context from Redis
|
|
120
|
+
local task_context
|
|
126
121
|
if command -v redis-cli &> /dev/null; then
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
phase_context=$(redis-cli HGET "swarm:$task_id:context" "phase-context" 2>/dev/null || echo "")
|
|
131
|
-
success_criteria=$(redis-cli HGET "swarm:$task_id:context" "success-criteria" 2>/dev/null || echo "")
|
|
132
|
-
expected_files=$(redis-cli HGET "swarm:$task_id:context" "expected-files" 2>/dev/null || echo "")
|
|
122
|
+
task_context=$(redis-cli HGET "cfn_loop:task:$task_id:context" "task_description" 2>/dev/null || echo "")
|
|
123
|
+
else
|
|
124
|
+
task_context=""
|
|
133
125
|
fi
|
|
134
126
|
|
|
135
|
-
# Build comprehensive task description from all available context
|
|
136
|
-
local comprehensive_context=""
|
|
137
|
-
|
|
138
|
-
# Start with task description if available
|
|
139
|
-
if [ -n "$task_context" ]; then
|
|
140
|
-
comprehensive_context="$task_context"
|
|
141
|
-
fi
|
|
142
|
-
|
|
143
|
-
# Add epic context
|
|
144
|
-
if [ -n "$epic_context" ]; then
|
|
145
|
-
if [ -n "$comprehensive_context" ]; then
|
|
146
|
-
comprehensive_context="$comprehensive_context
|
|
147
|
-
|
|
148
|
-
Epic Context: $epic_context"
|
|
149
|
-
else
|
|
150
|
-
comprehensive_context="Epic Context: $epic_context"
|
|
151
|
-
fi
|
|
152
|
-
fi
|
|
153
|
-
|
|
154
|
-
# Add phase context
|
|
155
|
-
if [ -n "$phase_context" ]; then
|
|
156
|
-
if [ -n "$comprehensive_context" ]; then
|
|
157
|
-
comprehensive_context="$comprehensive_context
|
|
158
|
-
|
|
159
|
-
Phase Context: $phase_context"
|
|
160
|
-
else
|
|
161
|
-
comprehensive_context="Phase Context: $phase_context"
|
|
162
|
-
fi
|
|
163
|
-
fi
|
|
164
|
-
|
|
165
|
-
# Add success criteria
|
|
166
|
-
if [ -n "$success_criteria" ]; then
|
|
167
|
-
if [ -n "$comprehensive_context" ]; then
|
|
168
|
-
comprehensive_context="$comprehensive_context
|
|
169
|
-
|
|
170
|
-
Success Criteria: $success_criteria"
|
|
171
|
-
else
|
|
172
|
-
comprehensive_context="Success Criteria: $success_criteria"
|
|
173
|
-
fi
|
|
174
|
-
fi
|
|
175
|
-
|
|
176
|
-
# Add expected files
|
|
177
|
-
if [ -n "$expected_files" ]; then
|
|
178
|
-
if [ -n "$comprehensive_context" ]; then
|
|
179
|
-
comprehensive_context="$comprehensive_context
|
|
180
|
-
|
|
181
|
-
Expected Files: $expected_files"
|
|
182
|
-
else
|
|
183
|
-
comprehensive_context="Expected Files: $expected_files"
|
|
184
|
-
fi
|
|
185
|
-
fi
|
|
186
|
-
|
|
187
|
-
# Use comprehensive context for further processing
|
|
188
|
-
task_context="$comprehensive_context"
|
|
189
|
-
|
|
190
127
|
if [ -z "$task_context" ]; then
|
|
191
|
-
echo "#
|
|
128
|
+
echo "# ACE Context (No Task Description)"
|
|
192
129
|
echo ""
|
|
193
130
|
echo "_Task description not available for context injection._"
|
|
194
131
|
return 1
|
|
@@ -697,23 +697,6 @@ EOF
|
|
|
697
697
|
# Store context in Redis
|
|
698
698
|
store_context "$TASK_ID"
|
|
699
699
|
|
|
700
|
-
# Validate context completeness (Zone A fix: prevent "consensus on vapor")
|
|
701
|
-
echo "Validating task context completeness..."
|
|
702
|
-
if [[ -n "$SUCCESS_CRITERIA" || -n "$EXPECTED_FILES" ]]; then
|
|
703
|
-
validation_script="$HELPERS_DIR/validate-task-context.sh"
|
|
704
|
-
if [[ -f "$validation_script" ]]; then
|
|
705
|
-
if ! "$validation_script" \
|
|
706
|
-
--task-id "$TASK_ID" \
|
|
707
|
-
--success-criteria "$SUCCESS_CRITERIA" \
|
|
708
|
-
--expected-files "$EXPECTED_FILES"; then
|
|
709
|
-
echo "⚠️ WARNING: Task context validation failed"
|
|
710
|
-
echo "⚠️ This may result in 'consensus on vapor' (high confidence, zero deliverables)"
|
|
711
|
-
echo "⚠️ Consider adding more specific task context"
|
|
712
|
-
echo ""
|
|
713
|
-
fi
|
|
714
|
-
fi
|
|
715
|
-
fi
|
|
716
|
-
|
|
717
700
|
# Iteration loop
|
|
718
701
|
for ((ITERATION=1; ITERATION<=MAX_ITERATIONS; ITERATION++)); do
|
|
719
702
|
echo ""
|