claude-flow-novice 2.14.15 β 2.14.16
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 +113 -42
- package/claude-assets/commands/cfn-loop-cli.md +113 -42
- package/dist/agent/skill-mcp-selector.js +459 -0
- package/dist/agent/skill-mcp-selector.js.map +1 -0
- package/dist/cli/agent-token-manager.js +382 -0
- package/dist/cli/agent-token-manager.js.map +1 -0
- package/dist/cli/config-manager.js +91 -109
- package/dist/cli/config-manager.js.map +1 -1
- package/dist/mcp/auth-middleware.js +367 -0
- package/dist/mcp/auth-middleware.js.map +1 -0
- package/dist/mcp/playwright-mcp-server-auth.js +515 -0
- package/dist/mcp/playwright-mcp-server-auth.js.map +1 -0
- package/package.json +1 -1
|
@@ -79,58 +79,129 @@ Savings: 64% with custom routing, 95-98% vs all-Task
|
|
|
79
79
|
|
|
80
80
|
## π¨ CRITICAL EXECUTION INSTRUCTIONS
|
|
81
81
|
|
|
82
|
-
**
|
|
82
|
+
**YOU ARE MAIN CHAT. YOU SPAWN ONLY THE cfn-v3-coordinator AGENT.**
|
|
83
83
|
|
|
84
|
-
**DO NOT manually spawn Task() agents for CFN Loop workflows**
|
|
85
|
-
**DO NOT spawn cfn-v3-coordinator manually**
|
|
86
84
|
**DO NOT spawn Loop 3 agents (backend-dev, researcher, etc.)**
|
|
87
85
|
**DO NOT spawn Loop 2 agents (reviewer, tester, etc.)**
|
|
88
86
|
**DO NOT spawn product-owner**
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
The coordinator handles ALL agent spawning internally via enhanced CLI mode v3.0.
|
|
91
89
|
|
|
92
90
|
---
|
|
93
91
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
92
|
+
### Execute This Task() Call:
|
|
93
|
+
|
|
94
|
+
```javascript
|
|
95
|
+
Task("cfn-v3-coordinator", `
|
|
96
|
+
CFN LOOP CLI MODE - ENHANCED PRODUCTION EXECUTION v3.0
|
|
97
|
+
|
|
98
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
99
|
+
TASK SPECIFICATION
|
|
100
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
101
|
+
|
|
102
|
+
Task Description: $ARGUMENTS
|
|
103
|
+
Task ID: cfn-cli-$(date +%s%N | tail -c 7)-${RANDOM}
|
|
104
|
+
Mode: ${mode.toUpperCase()}
|
|
105
|
+
|
|
106
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
107
|
+
SUCCESS CRITERIA
|
|
108
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
109
|
+
|
|
110
|
+
Acceptance Criteria:
|
|
111
|
+
- [ ] Core functionality implemented
|
|
112
|
+
- [ ] All tests pass with >80% coverage
|
|
113
|
+
- [ ] Security review completed
|
|
114
|
+
- [ ] Documentation updated
|
|
115
|
+
- [ ] No regression in existing features
|
|
116
|
+
|
|
117
|
+
Quality Gates (${mode.toUpperCase()} MODE):
|
|
118
|
+
- Loop 3 Gate Threshold: ${mode === 'enterprise' ? 0.85 : mode === 'standard' ? 0.75 : 0.70}
|
|
119
|
+
- Loop 2 Consensus Threshold: ${mode === 'enterprise' ? 0.95 : mode === 'standard' ? 0.90 : 0.80}
|
|
120
|
+
- Max Iterations: ${maxIterations}
|
|
121
|
+
|
|
122
|
+
Definition of Done:
|
|
123
|
+
- Consensus β₯ threshold achieved
|
|
124
|
+
- All acceptance criteria met
|
|
125
|
+
- Product Owner approval received
|
|
126
|
+
|
|
127
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
128
|
+
ENHANCED ORCHESTRATION CONFIGURATION v3.0
|
|
129
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
130
|
+
|
|
131
|
+
Mode: ${mode.toUpperCase()}
|
|
132
|
+
|
|
133
|
+
Loop 3 Agents (Implementation) - SELECT BASED ON TASK:
|
|
134
|
+
Examples:
|
|
135
|
+
- Backend API: backend-dev, researcher, devops
|
|
136
|
+
- Full-Stack: backend-dev, react-frontend-engineer, devops
|
|
137
|
+
- Infrastructure: devops, rust-developer, researcher
|
|
138
|
+
- Security: security-specialist, backend-dev, researcher
|
|
139
|
+
|
|
140
|
+
Loop 2 Agents (Validation) - SCALE BY COMPLEXITY:
|
|
141
|
+
Simple (1-2 files): reviewer, tester
|
|
142
|
+
Standard (3-5 files): reviewer, tester, architect, security-specialist
|
|
143
|
+
Complex (>5 files): +code-analyzer, +performance-benchmarker
|
|
144
|
+
|
|
145
|
+
Product Owner: product-owner
|
|
146
|
+
|
|
147
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
148
|
+
ENHANCED EXECUTION INSTRUCTIONS v3.0
|
|
149
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
150
|
+
|
|
151
|
+
1. INVOKE ENHANCED ORCHESTRATOR (CLI spawning v3.0):
|
|
152
|
+
|
|
153
|
+
TASK_ID="cfn-cli-$(date +%s%N | tail -c 7)-${RANDOM}"
|
|
154
|
+
MODE="${mode}"
|
|
155
|
+
LOOP3_AGENTS="backend-dev,researcher,devops" # Customize for task
|
|
156
|
+
LOOP2_AGENTS="reviewer,tester,architect,security-specialist" # Scale by complexity
|
|
157
|
+
|
|
158
|
+
./.claude/skills/cfn-loop-orchestration/orchestrate.sh \\
|
|
159
|
+
--task-id "$TASK_ID" \\
|
|
160
|
+
--mode "$MODE" \\
|
|
161
|
+
--loop3-agents "$LOOP3_AGENTS" \\
|
|
162
|
+
--loop2-agents "$LOOP2_AGENTS" \\
|
|
163
|
+
--product-owner "product-owner" \\
|
|
164
|
+
--max-iterations ${maxIterations}
|
|
165
|
+
|
|
166
|
+
2. ENHANCED ORCHESTRATOR HANDLES v3.0:
|
|
167
|
+
- **Real-time monitoring** with automatic stuck agent recovery
|
|
168
|
+
- **Process health checking** and dead process cleanup
|
|
169
|
+
- **Protocol compliance** preventing "consensus on vapor" anti-patterns
|
|
170
|
+
- **Progress visibility** with detailed timestamped reports
|
|
171
|
+
- Spawns all agents via enhanced CLI (background)
|
|
172
|
+
- Loop 3: Gate check (β₯threshold) β PASS/ITERATE
|
|
173
|
+
- Loop 2: Consensus check (β₯threshold) β COMPLETE/ITERATE
|
|
174
|
+
- Product Owner: PROCEED/ITERATE/ABORT decision
|
|
175
|
+
- Git commit/push on PROCEED
|
|
176
|
+
- Returns structured result to Main Chat
|
|
177
|
+
|
|
178
|
+
3. RETURN STRUCTURED RESULT:
|
|
179
|
+
{
|
|
180
|
+
"taskId": "cfn-cli-XXXXX",
|
|
181
|
+
"status": "complete|failed",
|
|
182
|
+
"iterations": {"loop3": N, "loop2": M},
|
|
183
|
+
"finalConsensus": 0.XX,
|
|
184
|
+
"acceptanceCriteria": {
|
|
185
|
+
"met": [...],
|
|
186
|
+
"pending": [...]
|
|
187
|
+
},
|
|
188
|
+
"deliverables": [...],
|
|
189
|
+
"recommendations": [...]
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
193
|
+
CRITICAL RULES
|
|
194
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
195
|
+
|
|
196
|
+
- DO NOT spawn agents with Task() - orchestrator uses enhanced CLI
|
|
197
|
+
- ALL agents run in background via npx claude-flow-novice
|
|
198
|
+
- USE Redis BLPOP for loop dependencies
|
|
199
|
+
- AGENTS use Z.ai routing automatically (when enabled)
|
|
200
|
+
- ORCHESTRATOR provides real-time monitoring and recovery
|
|
201
|
+
- RETURN structured result when complete
|
|
202
|
+
`, "cfn-v3-coordinator")
|
|
120
203
|
```
|
|
121
204
|
|
|
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
|
|
127
|
-
|
|
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)
|
|
133
|
-
|
|
134
205
|
## CLI Mode Benefits
|
|
135
206
|
|
|
136
207
|
**Cost Savings:**
|
|
@@ -79,58 +79,129 @@ Savings: 64% with custom routing, 95-98% vs all-Task
|
|
|
79
79
|
|
|
80
80
|
## π¨ CRITICAL EXECUTION INSTRUCTIONS
|
|
81
81
|
|
|
82
|
-
**
|
|
82
|
+
**YOU ARE MAIN CHAT. YOU SPAWN ONLY THE cfn-v3-coordinator AGENT.**
|
|
83
83
|
|
|
84
|
-
**DO NOT manually spawn Task() agents for CFN Loop workflows**
|
|
85
|
-
**DO NOT spawn cfn-v3-coordinator manually**
|
|
86
84
|
**DO NOT spawn Loop 3 agents (backend-dev, researcher, etc.)**
|
|
87
85
|
**DO NOT spawn Loop 2 agents (reviewer, tester, etc.)**
|
|
88
86
|
**DO NOT spawn product-owner**
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
The coordinator handles ALL agent spawning internally via enhanced CLI mode v3.0.
|
|
91
89
|
|
|
92
90
|
---
|
|
93
91
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
92
|
+
### Execute This Task() Call:
|
|
93
|
+
|
|
94
|
+
```javascript
|
|
95
|
+
Task("cfn-v3-coordinator", `
|
|
96
|
+
CFN LOOP CLI MODE - ENHANCED PRODUCTION EXECUTION v3.0
|
|
97
|
+
|
|
98
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
99
|
+
TASK SPECIFICATION
|
|
100
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
101
|
+
|
|
102
|
+
Task Description: $ARGUMENTS
|
|
103
|
+
Task ID: cfn-cli-$(date +%s%N | tail -c 7)-${RANDOM}
|
|
104
|
+
Mode: ${mode.toUpperCase()}
|
|
105
|
+
|
|
106
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
107
|
+
SUCCESS CRITERIA
|
|
108
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
109
|
+
|
|
110
|
+
Acceptance Criteria:
|
|
111
|
+
- [ ] Core functionality implemented
|
|
112
|
+
- [ ] All tests pass with >80% coverage
|
|
113
|
+
- [ ] Security review completed
|
|
114
|
+
- [ ] Documentation updated
|
|
115
|
+
- [ ] No regression in existing features
|
|
116
|
+
|
|
117
|
+
Quality Gates (${mode.toUpperCase()} MODE):
|
|
118
|
+
- Loop 3 Gate Threshold: ${mode === 'enterprise' ? 0.85 : mode === 'standard' ? 0.75 : 0.70}
|
|
119
|
+
- Loop 2 Consensus Threshold: ${mode === 'enterprise' ? 0.95 : mode === 'standard' ? 0.90 : 0.80}
|
|
120
|
+
- Max Iterations: ${maxIterations}
|
|
121
|
+
|
|
122
|
+
Definition of Done:
|
|
123
|
+
- Consensus β₯ threshold achieved
|
|
124
|
+
- All acceptance criteria met
|
|
125
|
+
- Product Owner approval received
|
|
126
|
+
|
|
127
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
128
|
+
ENHANCED ORCHESTRATION CONFIGURATION v3.0
|
|
129
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
130
|
+
|
|
131
|
+
Mode: ${mode.toUpperCase()}
|
|
132
|
+
|
|
133
|
+
Loop 3 Agents (Implementation) - SELECT BASED ON TASK:
|
|
134
|
+
Examples:
|
|
135
|
+
- Backend API: backend-dev, researcher, devops
|
|
136
|
+
- Full-Stack: backend-dev, react-frontend-engineer, devops
|
|
137
|
+
- Infrastructure: devops, rust-developer, researcher
|
|
138
|
+
- Security: security-specialist, backend-dev, researcher
|
|
139
|
+
|
|
140
|
+
Loop 2 Agents (Validation) - SCALE BY COMPLEXITY:
|
|
141
|
+
Simple (1-2 files): reviewer, tester
|
|
142
|
+
Standard (3-5 files): reviewer, tester, architect, security-specialist
|
|
143
|
+
Complex (>5 files): +code-analyzer, +performance-benchmarker
|
|
144
|
+
|
|
145
|
+
Product Owner: product-owner
|
|
146
|
+
|
|
147
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
148
|
+
ENHANCED EXECUTION INSTRUCTIONS v3.0
|
|
149
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
150
|
+
|
|
151
|
+
1. INVOKE ENHANCED ORCHESTRATOR (CLI spawning v3.0):
|
|
152
|
+
|
|
153
|
+
TASK_ID="cfn-cli-$(date +%s%N | tail -c 7)-${RANDOM}"
|
|
154
|
+
MODE="${mode}"
|
|
155
|
+
LOOP3_AGENTS="backend-dev,researcher,devops" # Customize for task
|
|
156
|
+
LOOP2_AGENTS="reviewer,tester,architect,security-specialist" # Scale by complexity
|
|
157
|
+
|
|
158
|
+
./.claude/skills/cfn-loop-orchestration/orchestrate.sh \\
|
|
159
|
+
--task-id "$TASK_ID" \\
|
|
160
|
+
--mode "$MODE" \\
|
|
161
|
+
--loop3-agents "$LOOP3_AGENTS" \\
|
|
162
|
+
--loop2-agents "$LOOP2_AGENTS" \\
|
|
163
|
+
--product-owner "product-owner" \\
|
|
164
|
+
--max-iterations ${maxIterations}
|
|
165
|
+
|
|
166
|
+
2. ENHANCED ORCHESTRATOR HANDLES v3.0:
|
|
167
|
+
- **Real-time monitoring** with automatic stuck agent recovery
|
|
168
|
+
- **Process health checking** and dead process cleanup
|
|
169
|
+
- **Protocol compliance** preventing "consensus on vapor" anti-patterns
|
|
170
|
+
- **Progress visibility** with detailed timestamped reports
|
|
171
|
+
- Spawns all agents via enhanced CLI (background)
|
|
172
|
+
- Loop 3: Gate check (β₯threshold) β PASS/ITERATE
|
|
173
|
+
- Loop 2: Consensus check (β₯threshold) β COMPLETE/ITERATE
|
|
174
|
+
- Product Owner: PROCEED/ITERATE/ABORT decision
|
|
175
|
+
- Git commit/push on PROCEED
|
|
176
|
+
- Returns structured result to Main Chat
|
|
177
|
+
|
|
178
|
+
3. RETURN STRUCTURED RESULT:
|
|
179
|
+
{
|
|
180
|
+
"taskId": "cfn-cli-XXXXX",
|
|
181
|
+
"status": "complete|failed",
|
|
182
|
+
"iterations": {"loop3": N, "loop2": M},
|
|
183
|
+
"finalConsensus": 0.XX,
|
|
184
|
+
"acceptanceCriteria": {
|
|
185
|
+
"met": [...],
|
|
186
|
+
"pending": [...]
|
|
187
|
+
},
|
|
188
|
+
"deliverables": [...],
|
|
189
|
+
"recommendations": [...]
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
193
|
+
CRITICAL RULES
|
|
194
|
+
ββββββββββββββββββββββββββββββββββββββββββββββ
|
|
195
|
+
|
|
196
|
+
- DO NOT spawn agents with Task() - orchestrator uses enhanced CLI
|
|
197
|
+
- ALL agents run in background via npx claude-flow-novice
|
|
198
|
+
- USE Redis BLPOP for loop dependencies
|
|
199
|
+
- AGENTS use Z.ai routing automatically (when enabled)
|
|
200
|
+
- ORCHESTRATOR provides real-time monitoring and recovery
|
|
201
|
+
- RETURN structured result when complete
|
|
202
|
+
`, "cfn-v3-coordinator")
|
|
120
203
|
```
|
|
121
204
|
|
|
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
|
|
127
|
-
|
|
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)
|
|
133
|
-
|
|
134
205
|
## CLI Mode Benefits
|
|
135
206
|
|
|
136
207
|
**Cost Savings:**
|