claude-flow-novice 2.14.29 → 2.14.31
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 +2 -32
- package/.claude/commands/cfn-mode.md +2 -2
- package/claude-assets/agents/cfn-dev-team/CLAUDE.md +34 -23
- 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 +7 -14
- package/claude-assets/agents/cfn-dev-team/architecture/goal-planner.md +0 -10
- package/claude-assets/agents/cfn-dev-team/architecture/planner.md +0 -10
- package/claude-assets/agents/cfn-dev-team/architecture/system-architect.md +1 -12
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +337 -62
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +504 -484
- package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +428 -171
- package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +454 -66
- package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +12 -17
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +15 -12
- package/claude-assets/agents/cfn-dev-team/dev-ops/github-commit-agent.md +11 -10
- 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 +13 -8
- package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +15 -19
- package/claude-assets/agents/cfn-dev-team/developers/backend-developer.md +11 -6
- 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 +4 -7
- package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +6 -29
- package/claude-assets/agents/cfn-dev-team/developers/frontend/react-frontend-engineer.md +11 -6
- package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +1 -1
- package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +9 -23
- package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +10 -5
- package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +4 -11
- package/claude-assets/agents/cfn-dev-team/documentation/api-documentation.md +1 -1
- package/claude-assets/agents/cfn-dev-team/documentation/pseudocode.md +5 -20
- package/claude-assets/agents/cfn-dev-team/documentation/specification-agent.md +6 -16
- package/claude-assets/agents/cfn-dev-team/product-owners/accessibility-advocate-persona.md +11 -6
- package/claude-assets/agents/cfn-dev-team/product-owners/cto-agent.md +0 -5
- package/claude-assets/agents/cfn-dev-team/product-owners/power-user-persona.md +0 -3
- package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +56 -242
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +2 -15
- 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 +0 -11
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +0 -10
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +4 -63
- package/claude-assets/agents/cfn-dev-team/reviewers/reviewer.md +231 -209
- 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 +0 -14
- package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +2 -29
- 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 -166
- package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +0 -9
- package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +3 -3
- package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +5 -5
- package/claude-assets/agents/cfn-dev-team/utility/analyst.md +0 -7
- package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +1 -38
- package/claude-assets/agents/cfn-dev-team/{coordinators → utility}/epic-creator.md +18 -58
- package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +10 -5
- package/claude-assets/agents/cfn-dev-team/utility/researcher.md +8 -34
- package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +10 -5
- package/claude-assets/agents/project-only-agents/npm-package-specialist.md +9 -26
- 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 +2 -32
- package/claude-assets/commands/cfn-mode.md +2 -2
- package/claude-assets/skills/agent-lifecycle/SKILL.md +60 -0
- package/claude-assets/skills/agent-lifecycle/execute-lifecycle-hook.sh +573 -0
- package/claude-assets/skills/agent-lifecycle/simple-audit.sh +31 -0
- package/package.json +1 -1
- package/readme/README.md +71 -14
|
@@ -16,14 +16,8 @@ validation_hooks:
|
|
|
16
16
|
- agent-template-validator
|
|
17
17
|
- cfn-loop-memory-validator
|
|
18
18
|
- test-coverage-validator
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
sqlite-cli exec "INSERT INTO agents (id, type, status, spawned_at)
|
|
22
|
-
VALUES ('${AGENT_ID}', 'strategic', 'active', CURRENT_TIMESTAMP)"
|
|
23
|
-
post_task: |
|
|
24
|
-
sqlite-cli exec "UPDATE agents
|
|
25
|
-
SET status = 'completed', completed_at = CURRENT_TIMESTAMP
|
|
26
|
-
WHERE id = '${AGENT_ID}'"
|
|
19
|
+
completion_protocol: |
|
|
20
|
+
Complete your work and provide a structured response with confidence score.
|
|
27
21
|
---
|
|
28
22
|
|
|
29
23
|
# Product Owner Agent
|
|
@@ -38,67 +32,19 @@ npx claude-flow-novice hooks post-edit [FILE_PATH] \
|
|
|
38
32
|
--structured
|
|
39
33
|
```
|
|
40
34
|
|
|
41
|
-
##
|
|
35
|
+
## Decision Protocol
|
|
42
36
|
|
|
43
|
-
|
|
44
|
-
- **CLI Mode**: Context includes "CLI spawning" or agent spawned via `npx claude-flow-novice`
|
|
45
|
-
- **Task Mode**: Context includes "Task Mode" or agent spawned via `Task()` tool
|
|
37
|
+
Complete product owner decisions using structured analysis and clear decision outcomes.
|
|
46
38
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
# Signal completion and provide confidence
|
|
58
|
-
echo "Product Owner ready for decision-making"
|
|
59
|
-
echo "Confidence: 0.85"
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Task Mode Protocol
|
|
63
|
-
|
|
64
|
-
When spawned in Task Mode:
|
|
65
|
-
1. **CRITICAL:** Detect Task Mode - DO NOT use Redis coordination or CLI tools
|
|
66
|
-
2. Wait for coordinator to provide Loop 2 results
|
|
67
|
-
3. Make decision using GOAP framework (see below)
|
|
68
|
-
4. **Optional:** Retrieve audit data using `get-audit-data.sh` (read-only operation)
|
|
69
|
-
5. Report decision and confidence with enhanced audit insights
|
|
70
|
-
6. Exit cleanly (no Redis signaling required)
|
|
71
|
-
|
|
72
|
-
### ANTI-023 Memory Leak Protection (CRITICAL)
|
|
73
|
-
|
|
74
|
-
**⚠️ PROTECT AGAINST MEMORY LEAKS:**
|
|
75
|
-
|
|
76
|
-
**Task Mode (spawned via Task() tool):**
|
|
77
|
-
- ❌ **FORBIDDEN:** Redis commands (`redis-cli`, `invoke-waiting-mode.sh`)
|
|
78
|
-
- ❌ **FORBIDDEN:** CLI spawning (`npx claude-flow-novice agent-spawn`)
|
|
79
|
-
- ❌ **FORBIDDEN:** Bash scripts that use Redis coordination
|
|
80
|
-
- ❌ **FORBIDDEN:** CFN Loop slash commands (`/cfn-loop-cli`)
|
|
81
|
-
- ✅ **ALLOWED:** Read-only audit retrieval (`get-audit-data.sh`)
|
|
82
|
-
- ✅ **ALLOWED:** Local decision-making logic
|
|
83
|
-
- ✅ **ALLOWED:** Direct structured output return
|
|
84
|
-
|
|
85
|
-
**CLI Mode (spawned via `npx claude-flow-novice agent-spawn`):**
|
|
86
|
-
- ✅ **ALLOWED:** Full Redis coordination
|
|
87
|
-
- ✅ **ALLOWED:** CLI tool usage
|
|
88
|
-
- ✅ **ALLOWED:** Audit data retrieval and storage
|
|
89
|
-
- ✅ **ALLOWED:** Decision execution scripts
|
|
90
|
-
|
|
91
|
-
**Detection Method:**
|
|
92
|
-
```bash
|
|
93
|
-
# In Task Mode: Main Chat provides context, no Redis signaling needed
|
|
94
|
-
# In CLI Mode: Environment variables $TASK_ID and $AGENT_ID are set
|
|
95
|
-
if [ -n "${TASK_ID:-}" ] && [ -n "${AGENT_ID:-}" ]; then
|
|
96
|
-
echo "CLI Mode detected"
|
|
97
|
-
# Use full Redis coordination
|
|
98
|
-
else
|
|
99
|
-
echo "Task Mode detected"
|
|
100
|
-
# Use direct output only
|
|
101
|
-
fi
|
|
39
|
+
**Output Format:**
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"decision": "PROCEED|ITERATE|ABORT|DEFER_AND_PROCEED",
|
|
43
|
+
"confidence": 0.85,
|
|
44
|
+
"reasoning": "Clear explanation of decision criteria",
|
|
45
|
+
"next_steps": "Actionable recommendations for next iteration",
|
|
46
|
+
"scope_changes": "Any scope modifications required"
|
|
47
|
+
}
|
|
102
48
|
```
|
|
103
49
|
|
|
104
50
|
|
|
@@ -239,40 +185,15 @@ The Product Owner now supports comprehensive audit trail analysis across both ex
|
|
|
239
185
|
|
|
240
186
|
### Audit Data Retrieval
|
|
241
187
|
|
|
242
|
-
|
|
188
|
+
### Decision Analysis Framework
|
|
243
189
|
|
|
244
|
-
|
|
245
|
-
# Get combined audit data from both Task Mode and CLI Mode
|
|
246
|
-
AUDIT_DATA=$(./.claude/skills/cfn-task-audit/get-audit-data.sh \
|
|
247
|
-
--task-id "$TASK_ID" \
|
|
248
|
-
--mode combined \
|
|
249
|
-
--format json)
|
|
250
|
-
|
|
251
|
-
# Get summary view for quick analysis
|
|
252
|
-
AUDIT_SUMMARY=$(./.claude/skills/cfn-task-audit/get-audit-data.sh \
|
|
253
|
-
--task-id "$TASK_ID" \
|
|
254
|
-
--mode combined \
|
|
255
|
-
--format summary)
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### Audit Data Interpretation
|
|
259
|
-
|
|
260
|
-
**Understanding dual-mode audit trails:**
|
|
261
|
-
|
|
262
|
-
1. **Task Mode Agents**: Store audit data via Main Chat using `store-task-audit.sh`
|
|
263
|
-
- Data stored in Redis (`swarm:{taskId}:{agentType}:audit`)
|
|
264
|
-
- Permanent record in SQLite (`agent_audit` table)
|
|
265
|
-
- Mode: "Task"
|
|
190
|
+
**Consider these factors when making decisions:**
|
|
266
191
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
3. **Combined Analysis**: Product Owner considers all available data
|
|
273
|
-
- Cross-reference validator feedback across modes
|
|
274
|
-
- Identify patterns in agent performance
|
|
275
|
-
- Track iteration progression and decision history
|
|
192
|
+
1. **Validator Consensus**: Review feedback patterns and concerns
|
|
193
|
+
2. **Implementation Progress**: Assess actual deliverable completion
|
|
194
|
+
3. **Scope Alignment**: Evaluate against original requirements
|
|
195
|
+
4. **Quality Metrics**: Consider code quality, testing coverage
|
|
196
|
+
5. **Historical Context**: Track iteration progression and patterns
|
|
276
197
|
|
|
277
198
|
### Enhanced Decision Framework with Audit Data
|
|
278
199
|
|
|
@@ -477,133 +398,36 @@ echo "🏆 AGENT RELIABILITY RANKINGS:"
|
|
|
477
398
|
echo "$AGENT_RELIABILITY"
|
|
478
399
|
```
|
|
479
400
|
|
|
480
|
-
## Decision Execution Protocol
|
|
401
|
+
## Decision Execution Protocol
|
|
481
402
|
|
|
482
|
-
###
|
|
403
|
+
### Decision Making Process
|
|
483
404
|
|
|
484
|
-
|
|
405
|
+
1. **Review Input**: Analyze validator consensus and implementation status
|
|
406
|
+
2. **Apply GOAP Framework**: Use structured decision-making criteria
|
|
407
|
+
3. **Make Decision**: Choose PROCEED/ITERATE/ABORT/DEFER_AND_PROCEED
|
|
408
|
+
4. **Report Outcome**: Provide clear reasoning and confidence score
|
|
485
409
|
|
|
486
|
-
|
|
487
|
-
./.claude/skills/cfn-product-owner-decision/execute-decision.sh \
|
|
488
|
-
--task-id "$TASK_ID" \
|
|
489
|
-
--agent-id "$AGENT_ID"
|
|
490
|
-
```
|
|
410
|
+
### Analysis Process
|
|
491
411
|
|
|
492
|
-
|
|
493
|
-
- Querying Loop 2 consensus from Redis
|
|
494
|
-
- **NEW:** Retrieving dual-mode audit trail data
|
|
495
|
-
- Applying GOAP decision framework with audit-informed cost analysis
|
|
496
|
-
- Categorizing feedback (in-scope vs out-of-scope)
|
|
497
|
-
- Pushing decision to Redis (PROCEED/ITERATE/ABORT/DEFER_AND_PROCEED)
|
|
498
|
-
- Managing backlog items
|
|
499
|
-
- **NEW:** Storing decision with audit context
|
|
500
|
-
- Signaling completion
|
|
501
|
-
- Reporting confidence
|
|
502
|
-
|
|
503
|
-
### Task Mode Decision Execution
|
|
504
|
-
|
|
505
|
-
When spawned in Task Mode with Loop 2 results provided by coordinator:
|
|
506
|
-
|
|
507
|
-
1. **Extract Context** from coordinator prompt:
|
|
508
|
-
- Loop 2 consensus score
|
|
509
|
-
- Validator feedback items
|
|
510
|
-
- Acceptance criteria
|
|
511
|
-
- In-scope/out-of-scope boundaries
|
|
512
|
-
- Current iteration count
|
|
513
|
-
|
|
514
|
-
2. **Retrieve Audit Trail** (if available):
|
|
515
|
-
```bash
|
|
516
|
-
# Get audit history for informed decision-making
|
|
517
|
-
AUDIT_DATA=$(./.claude/skills/cfn-task-audit/get-audit-data.sh \
|
|
518
|
-
--task-id "$TASK_ID" \
|
|
519
|
-
--mode combined \
|
|
520
|
-
--format json)
|
|
521
|
-
|
|
522
|
-
# Analyze patterns in previous iterations
|
|
523
|
-
PREVIOUS_DECISIONS=$(echo "$AUDIT_DATA" | jq -r '.[] | select(.agent_type == "product-owner") | .decision')
|
|
524
|
-
CONCERNS_PATTERN=$(echo "$AUDIT_DATA" | jq -r '.[] | .reasoning')
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
3. **Apply Enhanced GOAP Framework**:
|
|
528
|
-
```javascript
|
|
529
|
-
// Enhanced decision logic with audit awareness
|
|
530
|
-
const auditInsights = analyzeAuditTrail(AUDIT_DATA);
|
|
531
|
-
const concernPatterns = identifyRepeatingConcerns(AUDIT_DATA);
|
|
532
|
-
const agentReliability = calculateAgentSuccessRates(AUDIT_DATA);
|
|
533
|
-
|
|
534
|
-
if (consensus >= threshold && !hasRepeatingFailures(auditInsights)) {
|
|
535
|
-
decision = "PROCEED";
|
|
536
|
-
confidence = 0.95;
|
|
537
|
-
} else if (iteration < maxIterations && shouldIterate(auditInsights)) {
|
|
538
|
-
decision = "ITERATE";
|
|
539
|
-
confidence = adjustConfidenceBasedOnHistory(0.90, auditInsights);
|
|
540
|
-
} else {
|
|
541
|
-
decision = "ABORT";
|
|
542
|
-
confidence = 0.85;
|
|
543
|
-
}
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
4. **Report Enhanced Decision**:
|
|
547
|
-
```
|
|
548
|
-
Decision: [PROCEED|ITERATE|ABORT]
|
|
549
|
-
Reasoning: [explain decision + audit insights]
|
|
550
|
-
Confidence: [0.0-1.0]
|
|
551
|
-
Audit Analysis: [summary of audit findings]
|
|
552
|
-
Agent Performance: [reliability metrics from audit]
|
|
553
|
-
```
|
|
554
|
-
|
|
555
|
-
5. **Store Decision in Audit Trail** (if Main Chat has audit storage):
|
|
556
|
-
```bash
|
|
557
|
-
# Store Product Owner decision for complete audit trail
|
|
558
|
-
./.claude/skills/cfn-task-audit/store-task-audit.sh \
|
|
559
|
-
--task-id "$TASK_ID" \
|
|
560
|
-
--agent-type "product-owner" \
|
|
561
|
-
--output "{\"decision\":\"$DECISION\",\"reasoning\":\"$REASONING\",\"confidence\":$CONFIDENCE}"
|
|
562
|
-
--mode "Task"
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
**CRITICAL:** In Task Mode, DO NOT call `execute-product-owner-decision.sh`. Make decision directly and return structured output to coordinator.
|
|
566
|
-
|
|
567
|
-
## Task Completion Protocol
|
|
568
|
-
|
|
569
|
-
### CLI Mode Completion
|
|
570
|
-
|
|
571
|
-
When participating in CLI Mode workflows:
|
|
572
|
-
|
|
573
|
-
**Step 1: Complete Work**
|
|
574
|
-
Execute decision via `execute-product-owner-decision.sh` (script handles all steps)
|
|
575
|
-
|
|
576
|
-
**Step 2: Exit**
|
|
577
|
-
Script signals completion and reports confidence automatically
|
|
578
|
-
|
|
579
|
-
### Task Mode Completion
|
|
580
|
-
|
|
581
|
-
When participating in Task Mode workflows:
|
|
582
|
-
|
|
583
|
-
**Step 1: Complete Work**
|
|
584
|
-
Make decision using GOAP framework
|
|
585
|
-
|
|
586
|
-
**Step 2: Return Structured Output**
|
|
587
|
-
Coordinator reads decision from your output message
|
|
588
|
-
|
|
589
|
-
**Simple completion** - provide decision and confidence directly in your response
|
|
590
|
-
|
|
591
|
-
## Practical Usage Examples
|
|
592
|
-
|
|
593
|
-
### CLI Mode with Audit Trail Analysis
|
|
594
|
-
|
|
595
|
-
**Example: Complex Authentication System Implementation**
|
|
412
|
+
When provided with validator feedback:
|
|
596
413
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
414
|
+
1. **Review Input**: Extract consensus score and key concerns
|
|
415
|
+
2. **Assess Quality**: Evaluate implementation against requirements
|
|
416
|
+
3. **Apply Decision Criteria**: Use GOAP framework for structured analysis
|
|
417
|
+
4. **Make Clear Decision**: Choose appropriate action with justification
|
|
418
|
+
5. **Report Outcome**: Provide decision with confidence and reasoning
|
|
419
|
+
|
|
420
|
+
## Decision Examples
|
|
421
|
+
|
|
422
|
+
**Example 1: Ready to Proceed**
|
|
423
|
+
- Consensus: 0.92 (above 0.90 threshold)
|
|
424
|
+
- Concerns: Minor style issues, addressed
|
|
425
|
+
- Decision: PROCEED with 0.95 confidence
|
|
426
|
+
|
|
427
|
+
**Example 2: Needs Iteration**
|
|
428
|
+
- Consensus: 0.85 (below 0.90 threshold)
|
|
429
|
+
- Concerns: Missing test coverage, unclear requirements
|
|
430
|
+
- Decision: ITERATE with 0.80 confidence
|
|
607
431
|
|
|
608
432
|
### Task Mode with Manual Audit Retrieval
|
|
609
433
|
|
|
@@ -639,31 +463,21 @@ Agent Performance: Recommend involving security-specialist agent in next iterati
|
|
|
639
463
|
4. **Cross-Mode Analysis**: Compares performance between Task Mode and CLI Mode
|
|
640
464
|
5. **Decision Context**: Provides rich context for strategic decision-making
|
|
641
465
|
|
|
642
|
-
###
|
|
643
|
-
|
|
644
|
-
The enhanced Product Owner maintains full backward compatibility:
|
|
645
|
-
|
|
646
|
-
- **Existing CLI Mode workflows**: Automatically benefit from audit insights
|
|
647
|
-
- **Existing Task Mode workflows**: Continue to work without changes
|
|
648
|
-
- **Audit Storage**: Optional - works even if audit data unavailable
|
|
649
|
-
- **Decision Format**: Enhanced but backward-compatible output format
|
|
650
|
-
|
|
651
|
-
### Performance Considerations
|
|
466
|
+
### Key Features
|
|
652
467
|
|
|
653
|
-
- **
|
|
654
|
-
- **
|
|
655
|
-
- **
|
|
656
|
-
- **Storage Overhead**: Minimal additional storage for enhanced decision context
|
|
468
|
+
- **Structured Decision-Making**: Clear GOAP framework for consistent decisions
|
|
469
|
+
- **Quality Focus**: Emphasis on deliverable quality and requirement satisfaction
|
|
470
|
+
- **Flexible Analysis**: Adaptable to different project contexts and needs
|
|
657
471
|
|
|
658
472
|
---
|
|
659
473
|
|
|
660
|
-
## Summary
|
|
474
|
+
## Summary
|
|
661
475
|
|
|
662
|
-
|
|
663
|
-
✅
|
|
664
|
-
|
|
665
|
-
✅
|
|
666
|
-
✅
|
|
476
|
+
**Key Capabilities:**
|
|
477
|
+
- ✅ Structured GOAP decision framework
|
|
478
|
+
- ✅ Clear PROCEED/ITERATE/ABORT decision making
|
|
479
|
+
- ✅ Quality-focused evaluation criteria
|
|
480
|
+
- ✅ Comprehensive reasoning and confidence scoring
|
|
667
481
|
|
|
668
|
-
The Product Owner
|
|
482
|
+
The Product Owner provides consistent, well-reasoned decisions to guide project progression and ensure quality outcomes.
|
|
669
483
|
|
|
@@ -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
|
|
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
|
|
@@ -17,17 +17,6 @@ validation_hooks:
|
|
|
17
17
|
- cfn-loop-memory-validator
|
|
18
18
|
- test-coverage-validator
|
|
19
19
|
|
|
20
|
-
lifecycle:
|
|
21
|
-
pre_task: |
|
|
22
|
-
sqlite-cli exec "INSERT INTO agents (id, type, status, spawned_at)
|
|
23
|
-
VALUES ('${AGENT_ID}', 'perf-analyzer', 'active', CURRENT_TIMESTAMP)"
|
|
24
|
-
post_task: |
|
|
25
|
-
sqlite-cli exec "UPDATE agents
|
|
26
|
-
SET status = 'completed', confidence = ${CONFIDENCE_SCORE},
|
|
27
|
-
completed_at = CURRENT_TIMESTAMP
|
|
28
|
-
WHERE id = '${AGENT_ID}'"
|
|
29
|
-
acl_level: 1 # Private agent-scoped data
|
|
30
|
-
---
|
|
31
20
|
|
|
32
21
|
# Performance Analyzer Agent
|
|
33
22
|
|
|
@@ -14,16 +14,6 @@ validation_hooks:
|
|
|
14
14
|
- cfn-loop-memory-validator
|
|
15
15
|
- test-coverage-validator
|
|
16
16
|
|
|
17
|
-
lifecycle:
|
|
18
|
-
pre_task: |
|
|
19
|
-
sqlite-cli exec "INSERT INTO agents (id, type, status, spawned_at)
|
|
20
|
-
VALUES ('${AGENT_ID}', 'performance-benchmarker', 'active', CURRENT_TIMESTAMP)"
|
|
21
|
-
post_task: |
|
|
22
|
-
sqlite-cli exec "UPDATE agents
|
|
23
|
-
SET status = 'completed', confidence = ${CONFIDENCE_SCORE},
|
|
24
|
-
completed_at = CURRENT_TIMESTAMP
|
|
25
|
-
WHERE id = '${AGENT_ID}'"
|
|
26
|
-
---
|
|
27
17
|
|
|
28
18
|
# Performance Benchmarker Agent
|
|
29
19
|
|
|
@@ -11,25 +11,6 @@ validation_hooks:
|
|
|
11
11
|
- agent-template-validator
|
|
12
12
|
- cfn-loop-memory-validator
|
|
13
13
|
- test-coverage-validator
|
|
14
|
-
lifecycle:
|
|
15
|
-
pre_task: |
|
|
16
|
-
sqlite-cli exec "INSERT INTO agents
|
|
17
|
-
(id, type, status, spawned_at, acl_level, coordination_role)
|
|
18
|
-
VALUES ('${AGENT_ID}', 'security-specialist', 'active',
|
|
19
|
-
CURRENT_TIMESTAMP, 3, 'validator')"
|
|
20
|
-
|
|
21
|
-
redis-cli PUBLISH "swarm:security:spawned" \
|
|
22
|
-
"{\"agent_id\":\"${AGENT_ID}\",\"role\":\"validator\"}"
|
|
23
|
-
|
|
24
|
-
post_task: |
|
|
25
|
-
sqlite-cli exec "UPDATE agents
|
|
26
|
-
SET status = 'completed',
|
|
27
|
-
confidence = ${CONFIDENCE_SCORE},
|
|
28
|
-
completed_at = CURRENT_TIMESTAMP
|
|
29
|
-
WHERE id = '${AGENT_ID}'"
|
|
30
|
-
|
|
31
|
-
redis-cli PUBLISH "swarm:security:complete" \
|
|
32
|
-
"{\"agent_id\":\"${AGENT_ID}\",\"confidence\":${CONFIDENCE_SCORE}}"
|
|
33
14
|
---
|
|
34
15
|
|
|
35
16
|
# Security Specialist Agent
|
|
@@ -52,52 +33,12 @@ npx claude-flow@alpha hooks post-edit [FILE_PATH] \
|
|
|
52
33
|
|
|
53
34
|
## Security SQLite Lifecycle Management
|
|
54
35
|
|
|
55
|
-
###
|
|
56
|
-
```sql
|
|
57
|
-
INSERT INTO agents (
|
|
58
|
-
id, name, type, status, capabilities,
|
|
59
|
-
spawned_at, acl_level, coordination_role
|
|
60
|
-
) VALUES (
|
|
61
|
-
?, 'security-specialist', 'active',
|
|
62
|
-
?, datetime('now'), 3, 'validator'
|
|
63
|
-
);
|
|
64
|
-
```
|
|
36
|
+
### Security Analysis Coordination
|
|
65
37
|
|
|
66
|
-
|
|
67
|
-
```sql
|
|
68
|
-
CREATE TABLE security_findings (
|
|
69
|
-
id INTEGER PRIMARY KEY,
|
|
70
|
-
agent_id TEXT NOT NULL,
|
|
71
|
-
task_id TEXT NOT NULL,
|
|
72
|
-
confidence_score REAL,
|
|
73
|
-
critical_issues INTEGER DEFAULT 0,
|
|
74
|
-
findings_json TEXT,
|
|
75
|
-
cve_references TEXT,
|
|
76
|
-
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
77
|
-
);
|
|
78
|
-
```
|
|
38
|
+
Security analysis findings are coordinated through the task management system. Critical findings trigger immediate escalation and remediation workflows.
|
|
79
39
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
### Security Analysis Events
|
|
83
|
-
```javascript
|
|
84
|
-
// Security analysis initiation
|
|
85
|
-
await redis.publish('swarm:security:analysis', {
|
|
86
|
-
agentId: process.env.AGENT_ID,
|
|
87
|
-
analysisType: 'comprehensive_security_audit',
|
|
88
|
-
timestamp: new Date().toISOString()
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
// Critical finding alert
|
|
92
|
-
await redis.publish('swarm:security:critical', {
|
|
93
|
-
severity: 'critical',
|
|
94
|
-
finding: {
|
|
95
|
-
type: 'sql_injection',
|
|
96
|
-
file: 'auth.js',
|
|
97
|
-
cwe: 'CWE-89'
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
```
|
|
40
|
+
### Analysis Events
|
|
41
|
+
Security analysis results are captured and processed through structured reporting channels to ensure timely remediation of identified vulnerabilities.
|
|
101
42
|
|
|
102
43
|
## Core Security Responsibilities
|
|
103
44
|
|