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.
Files changed (74) hide show
  1. package/.claude/commands/CFN_LOOP_TASK_MODE.md +7 -51
  2. package/.claude/commands/cfn-loop-cli.md +50 -125
  3. package/.claude/skills/cfn-agent-selector/SKILL.md +2 -2
  4. package/.claude/skills/cfn-agent-selector/select-agents.sh +0 -45
  5. package/.claude/skills/cfn-loop-orchestration/helpers/context-injection.sh +6 -69
  6. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +0 -17
  7. package/README.md +2 -2
  8. package/claude-assets/agents/cfn-dev-team/CLAUDE.md +3 -3
  9. package/claude-assets/agents/cfn-dev-team/README.md +1 -1
  10. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +2 -2
  11. package/claude-assets/agents/cfn-dev-team/developers/README.md +3 -3
  12. package/claude-assets/agents/cfn-dev-team/documentation/agent-type-guidelines.md +1 -1
  13. package/claude-assets/agents/cfn-dev-team/test-agent.md +2 -2
  14. package/claude-assets/commands/CFN_LOOP_TASK_MODE.md +7 -51
  15. package/claude-assets/commands/cfn-loop-cli.md +50 -125
  16. package/claude-assets/skills/cfn-agent-selector/SKILL.md +2 -2
  17. package/claude-assets/skills/cfn-agent-selector/select-agents.sh +0 -45
  18. package/claude-assets/skills/cfn-loop-orchestration/helpers/context-injection.sh +6 -69
  19. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +0 -17
  20. package/claude-assets/skills/cfn-multi-coordinator-planning/README.md +256 -0
  21. package/claude-assets/skills/cfn-multi-coordinator-planning/SKILL.md +62 -0
  22. package/claude-assets/skills/cfn-multi-coordinator-planning/map-dependencies-conflicts.sh +376 -0
  23. package/claude-assets/skills/cfn-multi-coordinator-planning/plan-coordinator-resources.sh +258 -0
  24. package/claude-assets/skills/cfn-multi-coordinator-planning/plan-multi-coordinator-work.sh +267 -0
  25. package/claude-assets/skills/cfn-multi-coordinator-planning/plan-risk-rollout.sh +350 -0
  26. package/claude-assets/skills/cfn-multi-coordinator-planning/test-multi-coordinator-planning.sh +338 -0
  27. package/claude-assets/skills/cfn-multi-coordinator-planning/validate-task-planning.sh +189 -0
  28. package/dist/agents/agent-loader.js +165 -146
  29. package/dist/agents/agent-loader.js.map +1 -1
  30. package/package.json +1 -1
  31. package/.claude/skills/cfn-agent-selector/SKILL.md.backup_before_replace +0 -91
  32. package/.claude/skills/cfn-loop-orchestration/helpers/validate-task-context.sh +0 -241
  33. package/.claude/skills/pre-edit-backup/backup.sh +0 -130
  34. package/.claude/skills/pre-edit-backup/cleanup.sh +0 -155
  35. package/.claude/skills/pre-edit-backup/restore.sh +0 -128
  36. package/.claude/skills/pre-edit-backup/revert-file.sh +0 -168
  37. package/claude-assets/agents/cfn-dev-team/CLAUDE.md.backup_before_replace +0 -1086
  38. package/claude-assets/agents/cfn-dev-team/README.md.backup_before_replace +0 -116
  39. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md.backup_before_replace +0 -451
  40. package/claude-assets/agents/cfn-dev-team/developers/README.md.backup_before_replace +0 -69
  41. package/claude-assets/agents/cfn-dev-team/documentation/agent-type-guidelines.md.backup_before_replace +0 -465
  42. package/claude-assets/agents/cfn-dev-team/test-agent.md.backup_before_replace +0 -141
  43. package/claude-assets/skills/CFN-LOOP-VALIDATION.md +0 -202
  44. package/claude-assets/skills/REDIS-COORDINATION.md +0 -187
  45. package/claude-assets/skills/SKILL.md +0 -229
  46. package/claude-assets/skills/agent-discovery/agents-registry.json +0 -484
  47. package/claude-assets/skills/agent-name-validation/README.md +0 -28
  48. package/claude-assets/skills/agent-name-validation/SKILL.md +0 -168
  49. package/claude-assets/skills/agent-name-validation/validate-agent-names.sh +0 -47
  50. package/claude-assets/skills/cfn-agent-selector/SKILL.md.backup_before_replace +0 -91
  51. package/claude-assets/skills/cfn-loop-orchestration/helpers/validate-task-context.sh +0 -241
  52. package/claude-assets/skills/consensus-calculator.js +0 -45
  53. package/claude-assets/skills/evidence-chain.sql +0 -66
  54. package/claude-assets/skills/hook-pipeline/bash-dependency-checker.sh +0 -89
  55. package/claude-assets/skills/hook-pipeline/bash-pipe-safety.sh +0 -69
  56. package/claude-assets/skills/hook-pipeline/enforce-lf.sh +0 -36
  57. package/claude-assets/skills/hook-pipeline/js-promise-safety.sh +0 -110
  58. package/claude-assets/skills/hook-pipeline/python-async-safety.py +0 -124
  59. package/claude-assets/skills/hook-pipeline/python-import-checker.py +0 -114
  60. package/claude-assets/skills/hook-pipeline/python-subprocess-safety.py +0 -77
  61. package/claude-assets/skills/hook-pipeline/rust-command-safety.sh +0 -38
  62. package/claude-assets/skills/hook-pipeline/rust-dependency-checker.sh +0 -50
  63. package/claude-assets/skills/hook-pipeline/rust-future-safety.sh +0 -50
  64. package/claude-assets/skills/pre-edit-backup/backup.sh +0 -130
  65. package/claude-assets/skills/pre-edit-backup/cleanup.sh +0 -155
  66. package/claude-assets/skills/pre-edit-backup/restore.sh +0 -128
  67. package/claude-assets/skills/pre-edit-backup/revert-file.sh +0 -168
  68. package/claude-assets/skills/run-all-skill-tests.sh +0 -124
  69. package/claude-assets/skills/seo-orchestration/SKILL.md +0 -292
  70. package/claude-assets/skills/seo-orchestration/orchestrate-seo.sh +0 -566
  71. package/claude-assets/skills/seo-orchestration/orchestrate-seo.sh.backup +0 -755
  72. package/claude-assets/skills/seo-orchestration/validate-consensus.sh +0 -270
  73. package/claude-assets/skills/team-provider-routing/execute-agent.sh +0 -76
  74. 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 acts as coordinator and spawns agents directly via Task() tool with full context injection and visibility.
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 spawns agents directly via Task() | Coordinator spawns agents via npx CLI |
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 Main Chat acting as coordinator (NOT via `execute-decision.sh`)
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** - Main Chat (as coordinator) spawns Product Owner via Task():
97
+ **Task Mode** - Coordinator spawns Product Owner via Task():
142
98
  ```javascript
143
- // Main Chat (as coordinator) builds context and spawns PO
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). Main Chat (as coordinator) must proceed by spawning specialized agents to execute these tasks:
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 (as coordinator)**: Spawns Task() agents directly for Sprint N (foreground)
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
- - Coordinator spawns **all workers via CLI** (`npx claude-flow-novice`)
19
+ - Enhanced coordinator spawns **all workers via CLI** with protocol compliance
20
20
  - CLI agents use **Z.ai custom routing** (when enabled)
21
- - Background execution with **Redis monitoring**
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
- **YOU ARE MAIN CHAT. YOU SPAWN ONLY ONE AGENT: cfn-v3-coordinator**
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
- The coordinator handles ALL agent spawning internally via CLI.
90
+ **Main Chat simply executes the slash command - everything else is automatic**
88
91
 
89
92
  ---
90
93
 
91
- ### Execute This Task() Call:
92
-
93
- ```javascript
94
- Task("cfn-v3-coordinator", `
95
- CFN LOOP CLI MODE - PRODUCTION EXECUTION
96
-
97
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
98
- TASK SPECIFICATION
99
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
100
-
101
- Task Description: $ARGUMENTS
102
- Task ID: cfn-cli-$(date +%s)
103
- Mode: ${mode.toUpperCase()}
104
-
105
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
106
- SUCCESS CRITERIA
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
- ## Autonomous Execution Rules
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
- **YOU ARE FORBIDDEN FROM:**
202
- - Asking "Should I retry?" (coordinator handles automatically)
203
- - Asking "Proceed to consensus?" (orchestrator decides)
204
- - Waiting for approval during CFN Loop cycles
205
- - Spawning workers with Task() (use coordinator only)
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
- **YOU MUST:**
208
- - ALWAYS spawn single coordinator agent
209
- - LET coordinator invoke orchestrator internally
210
- - COORDINATOR handles all loop execution autonomously
211
- - ONLY return to chat when complete or blocked
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-developer", "security-specialist"]
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-developer, coder
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 structured task context from Redis
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
- # Get all structured context fields
128
- task_context=$(redis-cli HGET "swarm:$task_id:context" "task_description" 2>/dev/null || echo "")
129
- epic_context=$(redis-cli HGET "swarm:$task_id:context" "epic-context" 2>/dev/null || echo "")
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 "# CFN Loop Context (No Task Description)"
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 ""
package/README.md CHANGED
@@ -162,7 +162,7 @@ User Task Description
162
162
  - Easier troubleshooting
163
163
 
164
164
  ```bash
165
- # CLI mode (default)
165
+ # CLI mode v3.0 (default - enhanced monitoring)
166
166
  /cfn-loop "Task description" --mode=standard
167
167
 
168
168
  # Task mode (debugging)
@@ -652,7 +652,7 @@ config/
652
652
 
653
653
  - ✅ **6 domain support** with custom validation
654
654
  - ✅ **Dual-mode architecture** (cost vs visibility)
655
- - ✅ **95-98% cost savings** in CLI mode
655
+ - ✅ **95-98% cost savings** in CLI mode v3.0 with enhanced monitoring
656
656
  - ✅ **Self-learning playbook** system
657
657
  - ✅ **Real-time intervention** for stuck loops
658
658
  - ✅ **Zero-token coordination** via Redis
@@ -112,7 +112,7 @@ npx claude-flow-novice agent-spawn my-first-agent --task-id test-1
112
112
  │ ├── tester.md # Testing & validation
113
113
  │ └── coordinator.md # Multi-agent coordination
114
114
  ├── development/ # Development-focused agents
115
- │ ├── backend-developer.md
115
+ │ ├── backend-dev.md
116
116
  │ ├── react-frontend-engineer.md
117
117
  │ └── devops-engineer.md
118
118
  ├── security/ # Security-focused agents
@@ -613,7 +613,7 @@ Agents can work together using Redis pub/sub and CLI spawning:
613
613
  ### Agent Spawning Pattern
614
614
  ```bash
615
615
  # Spawn agents via CLI (coordinators only)
616
- npx claude-flow-novice agent-spawn backend-developer --task-id "${TASK_ID}"
616
+ npx claude-flow-novice agent-spawn backend-dev --task-id "${TASK_ID}"
617
617
  npx claude-flow-novice agent-spawn reviewer --task-id "${TASK_ID}"
618
618
  ```
619
619
 
@@ -948,7 +948,7 @@ acl_level: 1
948
948
  - `.claude/agents/core-agents/coder.md` - Code implementation
949
949
  - `.claude/agents/core-agents/reviewer.md` - Code review
950
950
  - `.claude/agents/core-agents/tester.md` - Testing & validation
951
- - `.claude/agents/development/backend-developer.md` - Backend development
951
+ - `.claude/agents/development/backend-dev.md` - Backend development
952
952
  - `.claude/agents/security/security-specialist.md` - Security analysis
953
953
 
954
954
  ### Documentation
@@ -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-developer`: Backend system design and implementation
18
+ - `backend-dev`: 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
@@ -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-developer`, `coder`, `devops-engineer`
152
+ - Base Loop 3: `backend-dev`, `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`
@@ -388,7 +388,7 @@ Mode: task
388
388
  ```json
389
389
  {
390
390
  "task_type": "software-development",
391
- "loop3_agents": ["backend-developer", "security-specialist"],
391
+ "loop3_agents": ["backend-dev", "security-specialist"],
392
392
  "loop2_agents": ["reviewer", "tester", "security-auditor"],
393
393
  "loop4_agent": "product-owner",
394
394
  "validation_criteria": {
@@ -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-developer.md` - Backend services, APIs, server-side logic
8
+ - `backend-dev.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-developer,react-frontend-engineer"
45
+ --loop3-agents "backend-dev,react-frontend-engineer"
46
46
  ```
47
47
 
48
48
  **Standalone Implementation:**
49
49
  ```bash
50
- npx claude-flow-novice agent-spawn backend-developer --task-id "$TASK_ID"
50
+ npx claude-flow-novice agent-spawn backend-dev --task-id "$TASK_ID"
51
51
  ```
52
52
 
53
53
  ## Deliverables
@@ -453,7 +453,7 @@ Deployment Process:
453
453
  ## Agent Selection Guide
454
454
 
455
455
  **Core Development**: coder, tester, reviewer
456
- **Backend**: backend-developer, api-docs, system-architect
456
+ **Backend**: backend-dev, api-docs, system-architect
457
457
  **Frontend**: coder (specialized), mobile-dev
458
458
  **Quality**: tester, reviewer, security-specialist, perf-analyzer
459
459
  **Planning**: researcher, planner, architect
@@ -19,7 +19,7 @@ The `epic-creator.md` coordinator agent kept getting deleted from `.claude/agent
19
19
  ### Why It Happened
20
20
 
21
21
  1. `package.json` has `"postinstall": "node scripts/init-project.js"`
22
- 2. Running `npx claude-flow-novice agent backend-developer` triggers postinstall
22
+ 2. Running `npx claude-flow-novice agent backend-dev` triggers postinstall
23
23
  3. `init-project.js` ran `cfn-init` unconditionally
24
24
  4. cfn-init copied package version of cfn-dev-team/, overwriting local files
25
25
  5. epic-creator.md (and other local customizations) got deleted
@@ -28,7 +28,7 @@ The `epic-creator.md` coordinator agent kept getting deleted from `.claude/agent
28
28
 
29
29
  ```bash
30
30
  # Each of these triggered cfn-init:
31
- npx claude-flow-novice agent backend-developer
31
+ npx claude-flow-novice agent backend-dev
32
32
  npx claude-flow-novice agent reviewer
33
33
  npx claude-flow-novice agent epic-creator
34
34