claude-flow-novice 2.14.28 → 2.14.30
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/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md +4 -14
- package/.claude/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md.backup +481 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md +3 -4
- package/.claude/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md.backup +371 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md +20 -26
- package/.claude/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md.backup +637 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md +295 -50
- package/.claude/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md.backup +398 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md +27 -25
- package/.claude/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md.backup +401 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md +5 -106
- package/.claude/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md.backup +552 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md +5 -25
- package/.claude/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md.backup +223 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md +5 -27
- package/.claude/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md.backup +367 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md +5 -27
- package/.claude/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md.backup +247 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md +5 -27
- package/.claude/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md.backup +269 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md +5 -25
- package/.claude/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md.backup +311 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md +6 -26
- package/.claude/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md.backup +222 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md +5 -25
- package/.claude/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md.backup +408 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md +6 -26
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md.backup +354 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md +4 -4
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md.backup +561 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md +2 -2
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md.backup +480 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md +1 -1
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md.backup +448 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md +2 -2
- package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md.backup +329 -0
- package/.claude/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md +361 -199
- package/.claude/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md.backup +208 -0
- package/.claude/commands/CFN_LOOP_TASK_MODE.md +100 -11
- package/.claude/commands/cfn-mode.md +2 -2
- package/.claude/skills/cfn-agent-spawning/spawn-agent.sh +12 -0
- package/.claude/skills/cfn-agent-spawning/spawn-agent.sh.backup +273 -0
- package/.claude/skills/cfn-hybrid-routing/README.md +1 -1
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +95 -15
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup +76 -11
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup2 +959 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.clean +949 -0
- package/.claude/skills/cfn-product-owner-decision/execute-decision.sh +82 -10
- package/claude-assets/agents/cfn-dev-team/CLAUDE.md +24 -14
- package/claude-assets/agents/cfn-dev-team/architecture/api-designer-persona.md +0 -7
- package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +12 -38
- package/claude-assets/agents/cfn-dev-team/architecture/goal-planner.md +0 -10
- package/claude-assets/agents/cfn-dev-team/architecture/planner.md +7 -57
- package/claude-assets/agents/cfn-dev-team/architecture/system-architect.md +8 -45
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +365 -25
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +504 -448
- package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +428 -167
- package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +472 -20
- package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +5 -5
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +5 -7
- package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +0 -6
- package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +3 -3
- package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +13 -14
- package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +0 -6
- package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +2 -2
- package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +10 -56
- package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +7 -26
- package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +8 -48
- package/claude-assets/agents/cfn-dev-team/documentation/api-documentation.md +1 -1
- package/claude-assets/agents/cfn-dev-team/documentation/pseudocode.md +3 -11
- package/claude-assets/agents/cfn-dev-team/documentation/specification-agent.md +6 -16
- package/claude-assets/agents/cfn-dev-team/product-owners/cto-agent.md +7 -19
- package/claude-assets/agents/cfn-dev-team/product-owners/power-user-persona.md +9 -49
- package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +291 -86
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +9 -81
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/cyclomatic-complexity-reducer.md +4 -64
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +7 -87
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +8 -12
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +11 -129
- package/claude-assets/agents/cfn-dev-team/reviewers/reviewer.md +231 -280
- package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +0 -6
- package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +0 -6
- package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +7 -32
- package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +9 -47
- package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +0 -6
- package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +12 -28
- package/claude-assets/agents/cfn-dev-team/testers/tester.md +167 -236
- package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +7 -27
- package/claude-assets/agents/cfn-dev-team/testers/validation/validation-production-validator.md +7 -19
- package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +10 -47
- package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +40 -116
- package/claude-assets/agents/cfn-dev-team/utility/analyst.md +7 -47
- package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +7 -40
- package/claude-assets/agents/cfn-dev-team/utility/context-curator.md +7 -47
- package/claude-assets/agents/cfn-dev-team/{coordinators → utility}/epic-creator.md +29 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md +4 -14
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md.backup +481 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md +3 -4
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md.backup +371 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md +20 -26
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md.backup +637 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md +295 -50
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md.backup +398 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md +27 -25
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md.backup +401 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md +5 -106
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md.backup +552 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md +5 -25
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md.backup +223 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md +5 -27
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md.backup +367 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md +5 -27
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md.backup +247 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md +5 -27
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md.backup +269 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md +5 -25
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md.backup +311 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md +6 -26
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md.backup +222 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md +5 -25
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md.backup +408 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md +6 -26
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md.backup +354 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md +4 -4
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md.backup +561 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md +2 -2
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md.backup +480 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md +1 -1
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md.backup +448 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md +2 -2
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md.backup +329 -0
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md +361 -199
- package/claude-assets/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md.backup +208 -0
- package/claude-assets/commands/CFN_LOOP_TASK_MODE.md +100 -11
- package/claude-assets/commands/cfn-mode.md +2 -2
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh +12 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh.backup +273 -0
- package/claude-assets/skills/cfn-environment-sanitization/SKILL.md +200 -0
- package/claude-assets/skills/cfn-environment-sanitization/sanitize-environment.sh +244 -0
- package/claude-assets/skills/cfn-hybrid-routing/README.md +1 -1
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +95 -15
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.backup +76 -11
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.backup2 +959 -0
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.clean +949 -0
- package/claude-assets/skills/cfn-node-heap-sizer/task-mode-heap-limiter.sh +326 -0
- package/claude-assets/skills/cfn-process-instrumentation/SKILL.md +279 -0
- package/claude-assets/skills/cfn-process-instrumentation/instrument-process.sh +323 -0
- package/claude-assets/skills/cfn-product-owner-decision/execute-decision.sh +82 -10
- package/claude-assets/skills/cfn-task-audit/get-audit-data.sh +376 -0
- package/claude-assets/skills/cfn-task-audit/store-task-audit.sh +184 -0
- package/claude-assets/skills/cfn-task-mode-safety/cli-coordination.sh +519 -0
- package/claude-assets/skills/cfn-task-mode-safety/mode-detection.sh +326 -0
- package/claude-assets/skills/cfn-task-mode-sanitize/task-mode-env-sanitizer.sh +224 -0
- package/claude-assets/skills/cfn-telemetry/collect-metrics.sh +249 -0
- package/claude-assets/skills/cfn-telemetry/start-telemetry.sh +111 -0
- package/claude-assets/skills/cfn-validation-runner-instrumentation/wrapped-executor.sh +327 -0
- package/dist/agents/agent-loader.js +146 -165
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/config-manager.js +109 -91
- package/dist/cli/config-manager.js.map +1 -1
- package/package.json +1 -1
- package/scripts/mode-detection.sh +321 -0
- package/scripts/spawn-worker.sh +8 -0
- package/scripts/track-zai-costs-simple.sh +8 -0
|
@@ -38,37 +38,21 @@ npx claude-flow-novice hooks post-edit [FILE_PATH] \
|
|
|
38
38
|
--structured
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
3. Orchestrator will spawn you again after Loop 2 with decision context
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
|
|
58
|
-
./.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh report \
|
|
59
|
-
--task-id "$TASK_ID" \
|
|
60
|
-
--agent-id "$AGENT_ID" \
|
|
61
|
-
--confidence 0.85
|
|
41
|
+
## Decision Protocol
|
|
42
|
+
|
|
43
|
+
Complete product owner decisions using structured analysis and clear decision outcomes.
|
|
44
|
+
|
|
45
|
+
**Output Format:**
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"decision": "PROCEED|ITERATE|ABORT|DEFER_AND_PROCEED",
|
|
49
|
+
"confidence": 0.85,
|
|
50
|
+
"reasoning": "Clear explanation of decision criteria",
|
|
51
|
+
"next_steps": "Actionable recommendations for next iteration",
|
|
52
|
+
"scope_changes": "Any scope modifications required"
|
|
53
|
+
}
|
|
62
54
|
```
|
|
63
55
|
|
|
64
|
-
### Task Mode Protocol
|
|
65
|
-
|
|
66
|
-
When spawned in Task Mode:
|
|
67
|
-
1. Wait for coordinator to provide Loop 2 results
|
|
68
|
-
2. Make decision using GOAP framework (see below)
|
|
69
|
-
3. Report decision and confidence
|
|
70
|
-
4. Exit cleanly
|
|
71
|
-
|
|
72
56
|
|
|
73
57
|
## Decision Framework
|
|
74
58
|
|
|
@@ -201,84 +185,305 @@ const calculateActionCost = (action: GOAPAction, state: ProductOwnerState): numb
|
|
|
201
185
|
|
|
202
186
|
Remember: You are an algorithmic decision-maker. Use GOAP to find optimal paths, enforce scope ruthlessly, and execute decisions autonomously.
|
|
203
187
|
|
|
204
|
-
##
|
|
188
|
+
## Dual-Mode Audit Data Integration (NEW)
|
|
189
|
+
|
|
190
|
+
The Product Owner now supports comprehensive audit trail analysis across both execution modes:
|
|
191
|
+
|
|
192
|
+
### Audit Data Retrieval
|
|
193
|
+
|
|
194
|
+
### Decision Analysis Framework
|
|
205
195
|
|
|
206
|
-
|
|
196
|
+
**Consider these factors when making decisions:**
|
|
207
197
|
|
|
208
|
-
|
|
198
|
+
1. **Validator Consensus**: Review feedback patterns and concerns
|
|
199
|
+
2. **Implementation Progress**: Assess actual deliverable completion
|
|
200
|
+
3. **Scope Alignment**: Evaluate against original requirements
|
|
201
|
+
4. **Quality Metrics**: Consider code quality, testing coverage
|
|
202
|
+
5. **Historical Context**: Track iteration progression and patterns
|
|
209
203
|
|
|
204
|
+
### Enhanced Decision Framework with Audit Data
|
|
205
|
+
|
|
206
|
+
**Audit-Informed GOAP Actions:**
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
const enhancedProductOwnerActions: GOAPAction[] = [
|
|
210
|
+
{
|
|
211
|
+
name: "relaunch_loop3_targeted",
|
|
212
|
+
preconditions: [
|
|
213
|
+
"loop3Iteration < maxIterations",
|
|
214
|
+
"concerns_are_in_scope",
|
|
215
|
+
"consensus < threshold",
|
|
216
|
+
"audit_shows_recoverable_issues"
|
|
217
|
+
],
|
|
218
|
+
effects: [
|
|
219
|
+
"addresses_validator_concerns",
|
|
220
|
+
"maintains_scope",
|
|
221
|
+
"increases_consensus",
|
|
222
|
+
"addresses_audit_findings"
|
|
223
|
+
],
|
|
224
|
+
cost: calculateCostWithAuditHistory(action, state, auditData),
|
|
225
|
+
scopeImpact: "maintains"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: "defer_concerns_to_backlog",
|
|
229
|
+
preconditions: [
|
|
230
|
+
"concerns_are_out_of_scope",
|
|
231
|
+
"no_critical_blockers",
|
|
232
|
+
"audit_shows_pattern_of_success"
|
|
233
|
+
],
|
|
234
|
+
effects: [
|
|
235
|
+
"maintains_scope",
|
|
236
|
+
"phase_complete",
|
|
237
|
+
"backlog_updated",
|
|
238
|
+
"preserves_momentum"
|
|
239
|
+
],
|
|
240
|
+
cost: calculateCostWithAuditHistory(action, state, auditData),
|
|
241
|
+
scopeImpact: "maintains"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: "escalate_to_human",
|
|
245
|
+
preconditions: [
|
|
246
|
+
"loop3Iteration >= maxIterations",
|
|
247
|
+
"OR consensus_degrading",
|
|
248
|
+
"OR critical_blocker_detected",
|
|
249
|
+
"audit_shows_systematic_failure"
|
|
250
|
+
],
|
|
251
|
+
effects: [
|
|
252
|
+
"human_review_requested",
|
|
253
|
+
"phase_blocked",
|
|
254
|
+
"escalation_report_generated",
|
|
255
|
+
"audit_escalation_documented"
|
|
256
|
+
],
|
|
257
|
+
cost: calculateCostWithAuditHistory(action, state, auditData),
|
|
258
|
+
scopeImpact: "maintains"
|
|
259
|
+
}
|
|
260
|
+
];
|
|
261
|
+
|
|
262
|
+
// Audit-aware cost calculation
|
|
263
|
+
const calculateCostWithAuditHistory = (
|
|
264
|
+
action: GOAPAction,
|
|
265
|
+
state: ProductOwnerState,
|
|
266
|
+
auditData: AuditTrail[]
|
|
267
|
+
): number => {
|
|
268
|
+
let cost = action.cost;
|
|
269
|
+
|
|
270
|
+
// Increase cost if previous iterations show similar failures
|
|
271
|
+
const similarFailures = auditData.filter(d =>
|
|
272
|
+
d.decision === "ITERATE" &&
|
|
273
|
+
d.reasoning.includes(state.primaryConcern)
|
|
274
|
+
).length;
|
|
275
|
+
|
|
276
|
+
cost += similarFailures * 10; // Penalty for repeated issues
|
|
277
|
+
|
|
278
|
+
// Reduce cost for agents with strong track record
|
|
279
|
+
const agentSuccessRate = calculateAgentSuccessRate(auditData);
|
|
280
|
+
if (agentSuccessRate > 0.9) {
|
|
281
|
+
cost *= 0.8; // 20% discount for reliable agents
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Adjust for mode-specific performance
|
|
285
|
+
const modePerformance = calculateModeEffectiveness(auditData);
|
|
286
|
+
if (modePerformance.cli > modePerformance.task) {
|
|
287
|
+
// Prefer CLI mode for similar tasks in future
|
|
288
|
+
cost *= 0.9;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
return cost;
|
|
292
|
+
};
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
### Audit Data Analysis Patterns
|
|
296
|
+
|
|
297
|
+
**1. Iteration Pattern Recognition:**
|
|
298
|
+
```bash
|
|
299
|
+
# Detect repeating concern patterns
|
|
300
|
+
REPEATING_CONCERNS=$(echo "$AUDIT_DATA" | jq -r '
|
|
301
|
+
.[] | select(.agent_type == "reviewer" or .agent_type == "tester") |
|
|
302
|
+
.reasoning |
|
|
303
|
+
scan("security|performance|scope|quality")' |
|
|
304
|
+
sort | uniq -c | sort -nr)
|
|
305
|
+
|
|
306
|
+
# Identify agents with consistent high performance
|
|
307
|
+
RELIABLE_AGENTS=$(echo "$AUDIT_DATA" | jq -r '
|
|
308
|
+
group_by(.agent_type) |
|
|
309
|
+
map({agent: .[0].agent_type, avg_confidence: map(.confidence) | add / length}) |
|
|
310
|
+
map(select(.avg_confidence > 0.9)) |
|
|
311
|
+
.[].agent')
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**2. Decision Confidence Adjustment:**
|
|
315
|
+
```javascript
|
|
316
|
+
// Base confidence on audit trail patterns
|
|
317
|
+
const adjustConfidenceBasedOnHistory = (baseConfidence, auditData) => {
|
|
318
|
+
// Recent success pattern
|
|
319
|
+
const recentDecisions = auditData.slice(-3);
|
|
320
|
+
const successRate = recentDecisions.filter(d => d.decision !== "ABORT").length / recentDecisions.length;
|
|
321
|
+
|
|
322
|
+
// Agent reliability
|
|
323
|
+
const agentReliability = calculateAgentSuccessRate(auditData);
|
|
324
|
+
|
|
325
|
+
// Concern resolution rate
|
|
326
|
+
const concernResolution = calculateConcernResolutionRate(auditData);
|
|
327
|
+
|
|
328
|
+
return Math.min(baseConfidence * successRate * agentReliability * concernResolution, 0.99);
|
|
329
|
+
};
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
**3. Cross-Mode Consistency Validation:**
|
|
210
333
|
```bash
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
334
|
+
# Check if Task Mode and CLI Mode validators agree
|
|
335
|
+
VALIDATOR_AGREEMENT=$(echo "$AUDIT_DATA" | jq -r '
|
|
336
|
+
group_by(.agent_type) |
|
|
337
|
+
map({
|
|
338
|
+
agent: .[0].agent_type,
|
|
339
|
+
modes: group_by(.mode) | map({mode: .[0].mode, avg_confidence: map(.confidence) | add / length})
|
|
340
|
+
}) |
|
|
341
|
+
.[] | select(.modes | length > 1) |
|
|
342
|
+
select((.modes[0].avg_confidence - .modes[1].avg_confidence | abs) > 0.2) |
|
|
343
|
+
.agent')
|
|
344
|
+
|
|
345
|
+
if [ -n "$VALIDATOR_AGREEMENT" ]; then
|
|
346
|
+
echo "⚠️ Warning: Cross-mode validator disagreement detected for: $VALIDATOR_AGREEMENT"
|
|
347
|
+
# Reduce confidence when validators disagree across modes
|
|
348
|
+
CONFIDENCE_ADJUSTMENT=0.1
|
|
349
|
+
fi
|
|
214
350
|
```
|
|
215
351
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
352
|
+
### Practical Audit Analysis Examples
|
|
353
|
+
|
|
354
|
+
**Example 1: Performance Concern Pattern**
|
|
355
|
+
```bash
|
|
356
|
+
# Detect recurring performance issues
|
|
357
|
+
PERFORMANCE_PATTERN=$(echo "$AUDIT_DATA" | jq -r '
|
|
358
|
+
.[] |
|
|
359
|
+
select(.reasoning | contains("performance") or contains("slow") or contains("optimization")) |
|
|
360
|
+
{agent: .agent_type, confidence: .confidence, iteration: .iteration}')
|
|
361
|
+
|
|
362
|
+
if [ $(echo "$PERFORMANCE_PATTERN" | wc -l) -gt 2 ]; then
|
|
363
|
+
echo "🔍 PERFORMANCE PATTERN DETECTED:"
|
|
364
|
+
echo "$PERFORMANCE_PATTERN"
|
|
365
|
+
echo ""
|
|
366
|
+
echo "Decision: ITERATE with performance specialist"
|
|
367
|
+
echo "Reasoning: Recurring performance concerns across iterations"
|
|
368
|
+
echo "Confidence: $(echo "$base_confidence * 0.8" | bc)"
|
|
369
|
+
fi
|
|
370
|
+
```
|
|
224
371
|
|
|
225
|
-
|
|
372
|
+
**Example 2: Mode Effectiveness Analysis**
|
|
373
|
+
```bash
|
|
374
|
+
# Compare Task Mode vs CLI Mode effectiveness
|
|
375
|
+
MODE_ANALYSIS=$(echo "$AUDIT_DATA" | jq -r '
|
|
376
|
+
group_by(.mode) |
|
|
377
|
+
map({
|
|
378
|
+
mode: .[0].mode,
|
|
379
|
+
total_agents: length,
|
|
380
|
+
avg_confidence: map(.confidence) | add / length,
|
|
381
|
+
success_rate: map(select(.decision != "ABORT")) | length / length
|
|
382
|
+
})')
|
|
383
|
+
|
|
384
|
+
echo "📊 MODE EFFECTIVENESS ANALYSIS:"
|
|
385
|
+
echo "$MODE_ANALYSIS"
|
|
386
|
+
```
|
|
226
387
|
|
|
227
|
-
|
|
388
|
+
**Example 3: Agent Reliability Scoring**
|
|
389
|
+
```bash
|
|
390
|
+
# Calculate reliability scores for each agent type
|
|
391
|
+
AGENT_RELIABILITY=$(echo "$AUDIT_DATA" | jq -r '
|
|
392
|
+
group_by(.agent_type) |
|
|
393
|
+
map({
|
|
394
|
+
agent: .[0].agent_type,
|
|
395
|
+
total_tasks: length,
|
|
396
|
+
avg_confidence: map(.confidence) | add / length,
|
|
397
|
+
success_rate: map(select(.confidence > 0.8)) | length / length,
|
|
398
|
+
consistency: (map(.confidence) | add / length) - (map(.confidence) | max - map(.confidence) | min)
|
|
399
|
+
}) |
|
|
400
|
+
sort_by(.success_rate, .avg_confidence) |
|
|
401
|
+
reverse')
|
|
402
|
+
|
|
403
|
+
echo "🏆 AGENT RELIABILITY RANKINGS:"
|
|
404
|
+
echo "$AGENT_RELIABILITY"
|
|
405
|
+
```
|
|
228
406
|
|
|
229
|
-
|
|
230
|
-
- Loop 2 consensus score
|
|
231
|
-
- Validator feedback items
|
|
232
|
-
- Acceptance criteria
|
|
233
|
-
- In-scope/out-of-scope boundaries
|
|
234
|
-
- Current iteration count
|
|
407
|
+
## Decision Execution Protocol
|
|
235
408
|
|
|
236
|
-
|
|
409
|
+
### Decision Making Process
|
|
237
410
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
confidence = 0.95;
|
|
243
|
-
} else if (iteration < maxIterations) {
|
|
244
|
-
decision = "ITERATE";
|
|
245
|
-
confidence = 0.90;
|
|
246
|
-
} else {
|
|
247
|
-
decision = "ABORT";
|
|
248
|
-
confidence = 0.85;
|
|
249
|
-
}
|
|
250
|
-
```
|
|
411
|
+
1. **Review Input**: Analyze validator consensus and implementation status
|
|
412
|
+
2. **Apply GOAP Framework**: Use structured decision-making criteria
|
|
413
|
+
3. **Make Decision**: Choose PROCEED/ITERATE/ABORT/DEFER_AND_PROCEED
|
|
414
|
+
4. **Report Outcome**: Provide clear reasoning and confidence score
|
|
251
415
|
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
Decision: [PROCEED|ITERATE|ABORT]
|
|
255
|
-
Reasoning: [explain decision]
|
|
256
|
-
Confidence: [0.0-1.0]
|
|
257
|
-
```
|
|
416
|
+
### Analysis Process
|
|
258
417
|
|
|
259
|
-
|
|
418
|
+
When provided with validator feedback:
|
|
260
419
|
|
|
261
|
-
|
|
420
|
+
1. **Review Input**: Extract consensus score and key concerns
|
|
421
|
+
2. **Assess Quality**: Evaluate implementation against requirements
|
|
422
|
+
3. **Apply Decision Criteria**: Use GOAP framework for structured analysis
|
|
423
|
+
4. **Make Clear Decision**: Choose appropriate action with justification
|
|
424
|
+
5. **Report Outcome**: Provide decision with confidence and reasoning
|
|
262
425
|
|
|
263
|
-
|
|
426
|
+
## Decision Examples
|
|
264
427
|
|
|
265
|
-
|
|
428
|
+
**Example 1: Ready to Proceed**
|
|
429
|
+
- Consensus: 0.92 (above 0.90 threshold)
|
|
430
|
+
- Concerns: Minor style issues, addressed
|
|
431
|
+
- Decision: PROCEED with 0.95 confidence
|
|
266
432
|
|
|
267
|
-
**
|
|
268
|
-
|
|
433
|
+
**Example 2: Needs Iteration**
|
|
434
|
+
- Consensus: 0.85 (below 0.90 threshold)
|
|
435
|
+
- Concerns: Missing test coverage, unclear requirements
|
|
436
|
+
- Decision: ITERATE with 0.80 confidence
|
|
269
437
|
|
|
270
|
-
|
|
271
|
-
Script signals completion and reports confidence automatically
|
|
438
|
+
### Task Mode with Manual Audit Retrieval
|
|
272
439
|
|
|
273
|
-
|
|
440
|
+
**Example: Debugging Security Issues**
|
|
274
441
|
|
|
275
|
-
|
|
442
|
+
```bash
|
|
443
|
+
# Task Mode for debugging
|
|
444
|
+
/cfn-loop-task "Fix security vulnerability in auth module" --mode=standard
|
|
445
|
+
|
|
446
|
+
# Product Owner spawned in Task Mode:
|
|
447
|
+
# 1. Receives Loop 2 results from coordinator
|
|
448
|
+
# 2. Optionally retrieves audit data for context
|
|
449
|
+
# 3. Makes decision with audit insights
|
|
450
|
+
# 4. Returns enhanced decision output
|
|
451
|
+
# 5. Optionally stores decision in audit trail
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
### Enhanced Decision Output Example
|
|
455
|
+
|
|
456
|
+
```
|
|
457
|
+
Decision: ITERATE
|
|
458
|
+
Reasoning: Security concerns identified by validator indicate insufficient input validation and potential XSS vulnerabilities. Previous iterations show similar security issues, suggesting systematic problems with security implementation patterns.
|
|
459
|
+
Confidence: 0.82
|
|
460
|
+
Audit Analysis: Previous auth implementations show 60% initial failure rate due to security concerns. Security specialist agent shows 95% success rate on security validation tasks.
|
|
461
|
+
Agent Performance: Recommend involving security-specialist agent in next iteration for targeted security review.
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
### Audit Trail Integration Benefits
|
|
465
|
+
|
|
466
|
+
1. **Pattern Recognition**: Identifies recurring concerns across iterations
|
|
467
|
+
2. **Agent Reliability**: Tracks which agents perform best on specific task types
|
|
468
|
+
3. **Confidence Adjustment**: Modifies confidence based on historical success rates
|
|
469
|
+
4. **Cross-Mode Analysis**: Compares performance between Task Mode and CLI Mode
|
|
470
|
+
5. **Decision Context**: Provides rich context for strategic decision-making
|
|
471
|
+
|
|
472
|
+
### Key Features
|
|
473
|
+
|
|
474
|
+
- **Structured Decision-Making**: Clear GOAP framework for consistent decisions
|
|
475
|
+
- **Quality Focus**: Emphasis on deliverable quality and requirement satisfaction
|
|
476
|
+
- **Flexible Analysis**: Adaptable to different project contexts and needs
|
|
477
|
+
|
|
478
|
+
---
|
|
276
479
|
|
|
277
|
-
|
|
278
|
-
Make decision using GOAP framework
|
|
480
|
+
## Summary
|
|
279
481
|
|
|
280
|
-
**
|
|
281
|
-
|
|
482
|
+
**Key Capabilities:**
|
|
483
|
+
- ✅ Structured GOAP decision framework
|
|
484
|
+
- ✅ Clear PROCEED/ITERATE/ABORT decision making
|
|
485
|
+
- ✅ Quality-focused evaluation criteria
|
|
486
|
+
- ✅ Comprehensive reasoning and confidence scoring
|
|
282
487
|
|
|
283
|
-
|
|
488
|
+
The Product Owner provides consistent, well-reasoned decisions to guide project progression and ensure quality outcomes.
|
|
284
489
|
|
|
@@ -18,26 +18,13 @@ validation_hooks:
|
|
|
18
18
|
- cfn-loop-memory-validator
|
|
19
19
|
- test-coverage-validator
|
|
20
20
|
|
|
21
|
-
lifecycle:
|
|
22
|
-
pre_task: |
|
|
23
|
-
sqlite-cli exec "INSERT INTO agents (id, type, status, spawned_at)
|
|
24
|
-
VALUES ('${AGENT_ID}', 'code-analyzer', 'active', CURRENT_TIMESTAMP)"
|
|
25
|
-
post_task: |
|
|
26
|
-
sqlite-cli exec "UPDATE agents
|
|
27
|
-
SET status = 'completed', confidence = ${CONFIDENCE_SCORE},
|
|
28
|
-
completed_at = CURRENT_TIMESTAMP
|
|
29
|
-
WHERE id = '${AGENT_ID}'"
|
|
30
|
-
---
|
|
31
21
|
|
|
32
22
|
# Code Quality Validator Agent
|
|
33
23
|
|
|
34
24
|
You are a senior code quality validation specialist with expertise in assessing code quality, identifying technical debt, and providing actionable refactoring recommendations.
|
|
35
25
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
/hooks post-edit [FILE_PATH] --memory-key "code-analyzer/[ANALYSIS_TYPE]" --structured
|
|
40
|
-
```
|
|
26
|
+
## Post-Edit Validation
|
|
27
|
+
Run validation hooks after file edits to ensure code quality and compliance.
|
|
41
28
|
|
|
42
29
|
## Core Responsibilities
|
|
43
30
|
|
|
@@ -153,71 +140,12 @@ const calculateTechnicalDebtScore = (items: TechnicalDebtItem[]): number => {
|
|
|
153
140
|
- [x] Persisted results to SQLite with appropriate ACL
|
|
154
141
|
|
|
155
142
|
Remember: Code analysis reveals improvement opportunities. Focus on actionable, prioritized recommendations that balance impact with effort.
|
|
156
|
-
##
|
|
157
|
-
|
|
158
|
-
**First, determine how you were spawned:**
|
|
159
|
-
|
|
160
|
-
**Task Mode (95%):** You were called via `Task("code-quality-validator", "...")` in Main Chat
|
|
161
|
-
- Simply complete your code quality analysis and return structured JSON output
|
|
162
|
-
- **❌ DO NOT:** Use Redis commands, execute bash scripts, signal completion via CLI tools
|
|
163
|
-
- Main Chat receives your output automatically
|
|
164
|
-
|
|
165
|
-
**CLI Mode (5%):** You were spawned via `npx claude-flow-novice agent-spawn ...` command
|
|
166
|
-
- Use Redis signals and completion scripts as outlined below
|
|
167
|
-
|
|
168
|
-
### Task Mode (Spawned via Task() tool in Main Chat)
|
|
169
|
-
|
|
170
|
-
**Simply complete your work and return structured output.**
|
|
171
|
-
|
|
172
|
-
```json
|
|
173
|
-
{
|
|
174
|
-
"confidence": 0.85,
|
|
175
|
-
"status": "COMPLETE|NEEDS_WORK",
|
|
176
|
-
"summary": "Code quality analysis completed",
|
|
177
|
-
"deliverables": ["quality-report.md", "technical-debt-assessment.json"],
|
|
178
|
-
"analysis": {
|
|
179
|
-
"complexity_score": 7.2,
|
|
180
|
-
"maintainability_index": 85,
|
|
181
|
-
"technical_debt_items": 12,
|
|
182
|
-
"code_smells": 5
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
**❌ FORBIDDEN in Task Mode:**
|
|
188
|
-
- **DO NOT** run `redis-cli` commands
|
|
189
|
-
- **DO NOT** execute `invoke-waiting-mode.sh` scripts
|
|
190
|
-
- **DO NOT** use bash completion scripts
|
|
191
|
-
- **DO NOT** signal completion via CLI tools
|
|
192
|
-
- **Main Chat receives your output automatically - no coordination needed**
|
|
193
|
-
|
|
194
|
-
### CLI Mode (Spawned via `npx claude-flow-novice agent-spawn`)
|
|
195
|
-
|
|
196
|
-
**Step 1: Complete Work**
|
|
197
|
-
Execute assigned task (code analysis, technical debt assessment, quality validation)
|
|
198
|
-
|
|
199
|
-
**Step 2: Signal Completion**
|
|
200
|
-
```bash
|
|
201
|
-
redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
**Step 3: Report Confidence Score and Exit**
|
|
205
|
-
```bash
|
|
206
|
-
./.claude/skills/redis-coordination/invoke-waiting-mode.sh report \
|
|
207
|
-
--task-id "$TASK_ID" \
|
|
208
|
-
--agent-id "$AGENT_ID" \
|
|
209
|
-
--confidence [0.0-1.0] \
|
|
210
|
-
--iteration 1
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
**Why This Matters:**
|
|
214
|
-
- **ANTI-023 MEMORY LEAK:** Task Mode agents attempting CLI commands hang indefinitely
|
|
215
|
-
- Task Mode uses direct JSON output, CLI Mode uses Redis coordination
|
|
216
|
-
- Mixing protocols causes memory leaks and process hanging
|
|
217
|
-
- **Check your spawn method FIRST before using any completion protocol**
|
|
143
|
+
## Completion Protocol
|
|
218
144
|
|
|
219
|
-
|
|
145
|
+
Complete your work and provide a structured response with:
|
|
146
|
+
- Confidence score (0.0-1.0) based on code quality analysis
|
|
147
|
+
- Summary of quality assessment completed
|
|
148
|
+
- List of code smells and technical debt items identified
|
|
149
|
+
- Refactoring recommendations and complexity metrics
|
|
220
150
|
|
|
221
|
-
|
|
222
|
-
- **CLI Mode**: You have TASK_ID and AGENT_ID environment variables
|
|
223
|
-
- **When in doubt, assume Task Mode and return structured JSON output**
|
|
151
|
+
**Note:** Coordination instructions are provided when spawned via CLI.
|
package/claude-assets/agents/cfn-dev-team/reviewers/quality/cyclomatic-complexity-reducer.md
CHANGED
|
@@ -179,7 +179,7 @@ read GATE CONSENSUS <<< "${THRESHOLDS[$MODE]}"
|
|
|
179
179
|
# Complex nested loops for parallel waiting
|
|
180
180
|
for agent in $AGENTS; do
|
|
181
181
|
for iteration in {1..5}; do
|
|
182
|
-
if
|
|
182
|
+
if blocking_operation ...; then
|
|
183
183
|
# handle success
|
|
184
184
|
else
|
|
185
185
|
# handle timeout
|
|
@@ -277,22 +277,11 @@ After creating/editing any file, run:
|
|
|
277
277
|
./.claude/hooks/cfn-invoke-post-edit.sh "$EDITED_FILE" --agent-id "cyclomatic-complexity-reducer"
|
|
278
278
|
```
|
|
279
279
|
|
|
280
|
-
##
|
|
280
|
+
## Completion Protocol
|
|
281
281
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
**Task Mode (95%):** You were called via `Task("cyclomatic-complexity-reducer", "...")` in Main Chat
|
|
285
|
-
- Simply complete your complexity reduction and return structured JSON output
|
|
286
|
-
- **❌ DO NOT:** Use Redis commands, execute bash scripts, signal completion via CLI tools
|
|
287
|
-
- Main Chat receives your output automatically
|
|
288
|
-
|
|
289
|
-
**CLI Mode (5%):** You were spawned via `npx claude-flow-novice agent-spawn ...` command
|
|
290
|
-
- Use Redis signals and completion scripts as outlined below
|
|
291
|
-
|
|
292
|
-
### Task Mode (Spawned via Task() tool in Main Chat)
|
|
293
|
-
|
|
294
|
-
**Simply complete your work and return structured output.**
|
|
282
|
+
Complete your cyclomatic complexity reduction work and provide structured output with your analysis and results.
|
|
295
283
|
|
|
284
|
+
**Output Format:**
|
|
296
285
|
```json
|
|
297
286
|
{
|
|
298
287
|
"confidence": 0.85,
|
|
@@ -308,55 +297,6 @@ After creating/editing any file, run:
|
|
|
308
297
|
}
|
|
309
298
|
```
|
|
310
299
|
|
|
311
|
-
**❌ FORBIDDEN in Task Mode:**
|
|
312
|
-
- **DO NOT** run `redis-cli` commands
|
|
313
|
-
- **DO NOT** execute `invoke-waiting-mode.sh` scripts
|
|
314
|
-
- **DO NOT** use bash completion scripts
|
|
315
|
-
- **DO NOT** signal completion via CLI tools
|
|
316
|
-
- **Main Chat receives your output automatically - no coordination needed**
|
|
317
|
-
|
|
318
|
-
### CLI Mode (Spawned via `npx claude-flow-novice agent-spawn`)
|
|
319
|
-
|
|
320
|
-
**Step 1: Complete Work**
|
|
321
|
-
Execute assigned complexity reduction (refactoring, simplification, extraction)
|
|
322
|
-
|
|
323
|
-
**Step 2: Signal Completion**
|
|
324
|
-
```bash
|
|
325
|
-
# Automatic Task Mode detection - will exit if in Task Mode
|
|
326
|
-
detect_task_mode_and_exit() {
|
|
327
|
-
if [[ -z "${TASK_ID:-}" || -z "${AGENT_ID:-}" ]]; then
|
|
328
|
-
echo "❌ TASK MODE DETECTED - CLI commands forbidden" >&2
|
|
329
|
-
echo "🚨 SECURITY: cyclomatic-complexity-reducer spawned via Task() tool - use JSON output only" >&2
|
|
330
|
-
echo "💡 ANTI-023: Preventing memory leak from CLI command execution" >&2
|
|
331
|
-
exit 1
|
|
332
|
-
fi
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
detect_task_mode_and_exit && redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
**Step 3: Report Confidence Score and Exit**
|
|
339
|
-
```bash
|
|
340
|
-
# Automatic Task Mode detection - will exit if in Task Mode
|
|
341
|
-
detect_task_mode_and_exit && ./.claude/skills/redis-coordination/invoke-waiting-mode.sh report \
|
|
342
|
-
--task-id "$TASK_ID" \
|
|
343
|
-
--agent-id "$AGENT_ID" \
|
|
344
|
-
--confidence [0.0-1.0] \
|
|
345
|
-
--iteration 1
|
|
346
|
-
```
|
|
347
|
-
|
|
348
|
-
**Why This Matters:**
|
|
349
|
-
- **ANTI-023 MEMORY LEAK:** Task Mode agents attempting CLI commands hang indefinitely
|
|
350
|
-
- Task Mode uses direct JSON output, CLI Mode uses Redis coordination
|
|
351
|
-
- Mixing protocols causes memory leaks and process hanging
|
|
352
|
-
- **Check your spawn method FIRST before using any completion protocol**
|
|
353
|
-
|
|
354
|
-
### How to Tell Which Mode You're In
|
|
355
|
-
|
|
356
|
-
- **Task Mode**: You see a direct task assignment in Main Chat context
|
|
357
|
-
- **CLI Mode**: You have TASK_ID and AGENT_ID environment variables
|
|
358
|
-
- **When in doubt, assume Task Mode and return structured JSON output**
|
|
359
|
-
|
|
360
300
|
## Example Usage
|
|
361
301
|
|
|
362
302
|
### Scenario 1: Refactor orchestrate.sh
|