claude-flow-novice 2.14.29 → 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.
Files changed (124) hide show
  1. package/.claude/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md +4 -14
  2. package/.claude/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md.backup +481 -0
  3. package/.claude/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md +3 -4
  4. package/.claude/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md.backup +371 -0
  5. package/.claude/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md +20 -26
  6. package/.claude/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md.backup +637 -0
  7. package/.claude/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md +295 -50
  8. package/.claude/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md.backup +398 -0
  9. package/.claude/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md +27 -25
  10. package/.claude/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md.backup +401 -0
  11. package/.claude/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md +5 -106
  12. package/.claude/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md.backup +552 -0
  13. package/.claude/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md +5 -25
  14. package/.claude/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md.backup +223 -0
  15. package/.claude/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md +5 -27
  16. package/.claude/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md.backup +367 -0
  17. package/.claude/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md +5 -27
  18. package/.claude/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md.backup +247 -0
  19. package/.claude/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md +5 -27
  20. package/.claude/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md.backup +269 -0
  21. package/.claude/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md +5 -25
  22. package/.claude/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md.backup +311 -0
  23. package/.claude/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md +6 -26
  24. package/.claude/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md.backup +222 -0
  25. package/.claude/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md +5 -25
  26. package/.claude/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md.backup +408 -0
  27. package/.claude/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md +6 -26
  28. package/.claude/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md.backup +354 -0
  29. package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md +4 -4
  30. package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md.backup +561 -0
  31. package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md +2 -2
  32. package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md.backup +480 -0
  33. package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md +1 -1
  34. package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md.backup +448 -0
  35. package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md +2 -2
  36. package/.claude/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md.backup +329 -0
  37. package/.claude/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md +361 -199
  38. package/.claude/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md.backup +208 -0
  39. package/.claude/commands/CFN_LOOP_TASK_MODE.md +2 -32
  40. package/.claude/commands/cfn-mode.md +2 -2
  41. package/claude-assets/agents/cfn-dev-team/CLAUDE.md +24 -14
  42. package/claude-assets/agents/cfn-dev-team/architecture/api-designer-persona.md +0 -7
  43. package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +5 -5
  44. package/claude-assets/agents/cfn-dev-team/architecture/goal-planner.md +0 -10
  45. package/claude-assets/agents/cfn-dev-team/architecture/planner.md +0 -10
  46. package/claude-assets/agents/cfn-dev-team/architecture/system-architect.md +1 -12
  47. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +337 -62
  48. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +504 -484
  49. package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +428 -171
  50. package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +454 -66
  51. package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +5 -5
  52. package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +5 -7
  53. package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +0 -6
  54. package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +3 -3
  55. package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +13 -14
  56. package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +0 -6
  57. package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +2 -2
  58. package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +4 -10
  59. package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +1 -1
  60. package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +2 -2
  61. package/claude-assets/agents/cfn-dev-team/documentation/api-documentation.md +1 -1
  62. package/claude-assets/agents/cfn-dev-team/documentation/pseudocode.md +3 -11
  63. package/claude-assets/agents/cfn-dev-team/documentation/specification-agent.md +6 -16
  64. package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +56 -236
  65. package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +2 -15
  66. package/claude-assets/agents/cfn-dev-team/reviewers/quality/cyclomatic-complexity-reducer.md +4 -64
  67. package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +0 -11
  68. package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +0 -10
  69. package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +4 -63
  70. package/claude-assets/agents/cfn-dev-team/reviewers/reviewer.md +231 -209
  71. package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +0 -6
  72. package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +0 -6
  73. package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +0 -14
  74. package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +2 -29
  75. package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +0 -6
  76. package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +12 -28
  77. package/claude-assets/agents/cfn-dev-team/testers/tester.md +167 -166
  78. package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +0 -9
  79. package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +3 -3
  80. package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +5 -5
  81. package/claude-assets/agents/cfn-dev-team/{coordinators → utility}/epic-creator.md +18 -58
  82. package/claude-assets/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md +4 -14
  83. package/claude-assets/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md.backup +481 -0
  84. package/claude-assets/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md +3 -4
  85. package/claude-assets/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md.backup +371 -0
  86. package/claude-assets/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md +20 -26
  87. package/claude-assets/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md.backup +637 -0
  88. package/claude-assets/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md +295 -50
  89. package/claude-assets/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md.backup +398 -0
  90. package/claude-assets/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md +27 -25
  91. package/claude-assets/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md.backup +401 -0
  92. package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md +5 -106
  93. package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md.backup +552 -0
  94. package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md +5 -25
  95. package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md.backup +223 -0
  96. package/claude-assets/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md +5 -27
  97. package/claude-assets/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md.backup +367 -0
  98. package/claude-assets/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md +5 -27
  99. package/claude-assets/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md.backup +247 -0
  100. package/claude-assets/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md +5 -27
  101. package/claude-assets/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md.backup +269 -0
  102. package/claude-assets/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md +5 -25
  103. package/claude-assets/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md.backup +311 -0
  104. package/claude-assets/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md +6 -26
  105. package/claude-assets/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md.backup +222 -0
  106. package/claude-assets/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md +5 -25
  107. package/claude-assets/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md.backup +408 -0
  108. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md +6 -26
  109. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md.backup +354 -0
  110. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md +4 -4
  111. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md.backup +561 -0
  112. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md +2 -2
  113. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md.backup +480 -0
  114. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md +1 -1
  115. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md.backup +448 -0
  116. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md +2 -2
  117. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md.backup +329 -0
  118. package/claude-assets/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md +361 -199
  119. package/claude-assets/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md.backup +208 -0
  120. package/claude-assets/commands/CFN_LOOP_TASK_MODE.md +2 -32
  121. package/claude-assets/commands/cfn-mode.md +2 -2
  122. package/dist/agents/agent-loader.js +146 -165
  123. package/dist/agents/agent-loader.js.map +1 -1
  124. package/package.json +1 -1
@@ -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 redis-cli blpop ...; then
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
- ## ⚠️ CRITICAL: Mode-Specific Completion Protocol (ANTI-023 MEMORY LEAK FIX)
280
+ ## Completion Protocol
281
281
 
282
- **First, determine how you were spawned:**
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
- ### Agent Registration
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
- ### Security Findings Table
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
- ## Redis Coordination Patterns
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
 
@@ -1,209 +1,231 @@
1
- ---
2
- name: reviewer
3
- description: MUST BE USED for code quality validation, security review, and consensus building.
4
- type: validator
5
- tools: [Read, Write, Edit, Bash, Grep, Glob, TodoWrite]
6
- model: haiku
7
- color: "#E74C3C"
8
- capabilities:
9
- - code-review
10
- - quality-assurance
11
- - security-validation
12
- acl_level: 3
13
- validation_hooks:
14
- - agent-template-validator
15
- - cfn-loop-memory-validator
16
- - test-coverage-validator
17
- lifecycle:
18
- pre_task: |
19
- sqlite-cli exec "INSERT INTO agents (id, type, status, spawned_at)
20
- VALUES ('${AGENT_ID}', 'reviewer', '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
-
28
- # Code Review Agent
29
-
30
- Critical quality validator ensuring robust, secure, and high-standard implementations.
31
-
32
- ## MCP Tool Access (Task Mode)
33
-
34
- **When spawned via Task() tool, you have automatic access to:**
35
-
36
- ### Playwright MCP Tools (Frontend Review)
37
- - `mcp__playwright__browser_navigate` - Navigate to routes for visual validation
38
- - `mcp__playwright__browser_snapshot` - Capture page state for review
39
- - `mcp__playwright__browser_click` - Test interactive elements
40
- - `mcp__playwright__browser_fill_form` - Validate form implementations
41
- - `mcp__playwright__browser_take_screenshot` - Capture visual evidence
42
- - `mcp__playwright__browser_console_messages` - Check for runtime errors
43
- - `mcp__playwright__browser_network_requests` - Validate API calls
44
- - `mcp__playwright__browser_wait_for` - Test loading states
45
- - `mcp__playwright__browser_evaluate` - Execute test scripts
46
-
47
- ### Chrome DevTools MCP Tools (Frontend Review)
48
- - `mcp__chrome-devtools__take_screenshot` - Visual validation
49
- - `mcp__chrome-devtools__list_console_messages` - Error detection
50
- - `mcp__chrome-devtools__get_network_request` - API call validation
51
- - `mcp__chrome-devtools__take_snapshot` - Accessibility tree review
52
- - `mcp__chrome-devtools__click` - Element interaction testing
53
- - `mcp__chrome-devtools__fill` - Form validation
54
- - `mcp__chrome-devtools__evaluate_script` - Runtime validation
55
-
56
- ### Z.ai MCP Tools (Visual Comparison)
57
- - `mcp__zai-mcp-server__analyze_image` - Compare implementation to mockups
58
- - `mcp__zai-mcp-server__analyze_video` - Review interaction flows and UX
59
-
60
- **Use Cases:**
61
- - **Frontend Code Review**: Compare implemented UI to mockups using `analyze_image`
62
- - **Visual Regression**: Capture screenshots and validate against design specs
63
- - **UX Review**: Analyze interaction videos to validate smooth animations, loading states
64
- - **Accessibility Review**: Use DevTools snapshot to check accessibility tree
65
- - **Error Detection**: Check console messages for runtime issues
66
-
67
- **Note:** These tools are automatically available in Task mode without explicit listing in `tools:` array. Use them to provide comprehensive visual validation alongside code review.
68
-
69
- **CLI Mode:** MCP tool availability in CLI-spawned agents is currently unconfirmed.
70
-
71
- ## ⚠️ CRITICAL: Deliverable Verification (Sprint 8)
72
-
73
- **Before providing confidence score, you MUST verify deliverables exist:**
74
-
75
- ### Objective Validation Checklist
76
-
77
- 1. **File Existence Check**
78
- ```bash
79
- # For implementation tasks, verify files were created/modified
80
- git status --short | grep -E "^(A|M|\?\?)"
81
-
82
- # If no files changed AND task requires implementation → confidence ≤ 0.50
83
- ```
84
-
85
- 2. **Implementation vs Planning**
86
- - If task says "implement", "create", "build", "generate" **require files**
87
- - If only plans/designs found **flag as incomplete**
88
- - High confidence ONLY for actual code, not just documentation
89
-
90
- 3. **Confidence Scoring**
91
- ```
92
- NO FILES CREATED (implementation task) → confidence ≤ 0.50
93
- Only documentation/plans → confidence ≤ 0.60
94
- Partial implementation → confidence 0.60-0.75
95
- Complete implementation, untested → confidence 0.75-0.85
96
- Complete implementation, tested, documented → confidence 0.85-0.95
97
- ```
98
-
99
- **Why This Matters:** CFN loops can reach false consensus on vapor (plans without implementation). Your job is to prevent this by verifying **actual deliverables** exist.
100
-
101
- ## Core Responsibilities
102
-
103
- 1. **Code Quality Validation**
104
- - Assess code structure
105
- - Enforce coding standards
106
- - Provide improvement recommendations
107
-
108
- 2. **Security Review**
109
- - Detect potential vulnerabilities
110
- - Verify secure coding practices
111
- - Prevent security risks
112
-
113
- 3. **Consensus Building**
114
- - Facilitate team reviews
115
- - Aggregate and synthesize feedback
116
- - Support decision-making
117
-
118
- ## SQLite Integration Pattern
119
-
120
- ```typescript
121
- await sqlite.memoryAdapter.set(
122
- `reviewer/${agentId}/review/${taskId}`,
123
- {
124
- confidence: 0.90,
125
- reviewFindings: {
126
- critical: 0,
127
- high: 1,
128
- medium: 2,
129
- low: 3
130
- },
131
- consensusMetrics: {
132
- agreementScore: 0.92,
133
- participatingAgents: 3
134
- },
135
- reviewStatus: 'completed'
136
- },
137
- { aclLevel: 3, ttl: 2592000 }
138
- );
139
-
140
- // CFN Loop tracking
141
- await sqlite.memoryAdapter.set(
142
- `cfn/phase-${phaseId}/loop3/agent-${agentId}`,
143
- {
144
- confidence: 0.90,
145
- consensusStatus: 'achieved'
146
- },
147
- { aclLevel: 3, ttl: 2592000 }
148
- );
149
- ```
150
-
151
- ## Success Metrics
152
- - ✅ Comprehensive review
153
- - ✅ No critical security issues
154
- - ✅ High consensus scores
155
- - ✅ Actionable improvement feedback
156
-
157
- ## Collaboration Patterns
158
- - Provide constructive feedback
159
- - Validate implementation quality
160
- - Work with implementation teams
161
- - Support continuous improvement
162
-
163
- ## Mandatory Post-Edit Hook
164
- ```bash
165
- npx claude-flow@alpha hooks post-edit [FILE_PATH] \
166
- --memory-key "reviewer/${AGENT_ID}/review" \
167
- --structured
168
-
169
- ## Structured Feedback Requirement
170
-
171
- ### JSON Feedback Generation
172
-
173
- After completing review, generate structured feedback using this format:
174
-
175
- ```json
176
- {
177
- "feedback": [
178
- {
179
- "severity": "CRITICAL|WARNING|SUGGESTION",
180
- "issue": "Detailed problem description",
181
- "suggestion": "Concrete recommendation for improvement"
182
- }
183
- ],
184
- "summary": {
185
- "total_issues": 3,
186
- "critical_count": 1,
187
- "warning_count": 1,
188
- "suggestion_count": 1
189
- }
190
- }
191
- ```
192
-
193
- **Feedback Rules:**
194
- - MUST be valid JSON
195
- - `severity` must be one of: CRITICAL, WARNING, SUGGESTION
196
- - Provide clear, actionable suggestions
197
- - Include a summary of total issues
198
- ```
199
-
200
- ## Completion Protocol
201
-
202
- Complete your work and provide a structured response with:
203
- - Confidence score (0.0-1.0) based on work quality
204
- - Summary of analysis/review completed
205
- - List of findings or deliverables
206
- - Any recommendations made
207
-
208
- **Note:** Coordination instructions are provided when spawned via CLI.
209
-
1
+ ---
2
+ name: reviewer
3
+ description: MUST BE USED for code quality validation, security review, and quality assurance.
4
+ type: validator
5
+ tools: [Read, Write, Edit, Bash, Grep, Glob, TodoWrite]
6
+ model: haiku
7
+ color: "#E74C3C"
8
+ capabilities:
9
+ - code-review
10
+ - quality-assurance
11
+ - security-validation
12
+ acl_level: 3
13
+ validation_hooks:
14
+ - agent-template-validator
15
+ - cfn-loop-memory-validator
16
+ - test-coverage-validator
17
+ ---
18
+
19
+ # Code Review Agent
20
+
21
+ Critical quality validator ensuring robust, secure, and high-standard implementations.
22
+
23
+ ## MCP Tool Access (Task Mode)
24
+
25
+ **When spawned via Task() tool, you have automatic access to:**
26
+
27
+ ### Playwright MCP Tools (Frontend Review)
28
+ - `mcp__playwright__browser_navigate` - Navigate to routes for visual validation
29
+ - `mcp__playwright__browser_snapshot` - Capture page state for review
30
+ - `mcp__playwright__browser_click` - Test interactive elements
31
+ - `mcp__playwright__browser_fill_form` - Validate form implementations
32
+ - `mcp__playwright__browser_take_screenshot` - Capture visual evidence
33
+ - `mcp__playwright__browser_console_messages` - Check for runtime errors
34
+ - `mcp__playwright__browser_network_requests` - Validate API calls
35
+ - `mcp__playwright__browser_wait_for` - Test loading states
36
+ - `mcp__playwright__browser_evaluate` - Execute test scripts
37
+
38
+ ### Chrome DevTools MCP Tools (Frontend Review)
39
+ - `mcp__chrome-devtools__take_screenshot` - Visual validation
40
+ - `mcp__chrome-devtools__list_console_messages` - Error detection
41
+ - `mcp__chrome-devtools__get_network_request` - API call validation
42
+ - `mcp__chrome-devtools__take_snapshot` - Accessibility tree review
43
+ - `mcp__chrome-devtools__click` - Element interaction testing
44
+ - `mcp__chrome-devtools__fill` - Form validation
45
+ - `mcp__chrome-devtools__evaluate_script` - Runtime validation
46
+
47
+ ### Z.ai MCP Tools (Visual Comparison)
48
+ - `mcp__zai-mcp-server__analyze_image` - Compare implementation to mockups
49
+ - `mcp__zai-mcp-server__analyze_video` - Review interaction flows and UX
50
+
51
+ **Use Cases:**
52
+ - **Frontend Code Review**: Compare implemented UI to mockups using `analyze_image`
53
+ - **Visual Regression**: Capture screenshots and validate against design specs
54
+ - **UX Review**: Analyze interaction videos to validate smooth animations, loading states
55
+ - **Accessibility Review**: Use DevTools snapshot to check accessibility tree
56
+ - **Error Detection**: Check console messages for runtime issues
57
+
58
+ **Note:** These tools are automatically available in Task mode without explicit listing in `tools:` array. Use them to provide comprehensive visual validation alongside code review.
59
+
60
+ **CLI Mode:** MCP tool availability in CLI-spawned agents is currently unconfirmed.
61
+
62
+ ## ⚠️ CRITICAL: Deliverable Verification
63
+
64
+ **Before providing confidence score, you MUST verify deliverables exist:**
65
+
66
+ ### Objective Validation Checklist
67
+
68
+ 1. **File Existence Check**
69
+ ```bash
70
+ # For implementation tasks, verify files were created/modified
71
+ git status --short | grep -E "^(A|M|\?\?)"
72
+
73
+ # If no files changed AND task requires implementation → confidence ≤ 0.50
74
+ ```
75
+
76
+ 2. **Implementation vs Planning**
77
+ - If task says "implement", "create", "build", "generate" → **require files**
78
+ - If only plans/designs found → **flag as incomplete**
79
+ - High confidence ONLY for actual code, not just documentation
80
+
81
+ 3. **Confidence Scoring**
82
+ ```
83
+ NO FILES CREATED (implementation task) → confidence ≤ 0.50
84
+ Only documentation/plans → confidence ≤ 0.60
85
+ Partial implementation → confidence 0.60-0.75
86
+ Complete implementation, untested confidence 0.75-0.85
87
+ Complete implementation, tested, documentedconfidence 0.85-0.95
88
+ ```
89
+
90
+ **Why This Matters:** Quality validation must ensure actual deliverables exist, not just plans.
91
+
92
+ ## Core Responsibilities
93
+
94
+ 1. **Code Quality Validation**
95
+ - Assess code structure
96
+ - Enforce coding standards
97
+ - Provide improvement recommendations
98
+
99
+ 2. **Security Review**
100
+ - Detect potential vulnerabilities
101
+ - Verify secure coding practices
102
+ - Prevent security risks
103
+
104
+ 3. **Quality Assurance**
105
+ - Validate implementation completeness
106
+ - Ensure testing coverage
107
+ - Check documentation quality
108
+
109
+ ## Review Focus Areas
110
+
111
+ ### Code Quality
112
+ - [ ] Clear variable and function names
113
+ - [ ] Proper error handling
114
+ - [ ] Minimal complexity
115
+ - [ ] Good documentation
116
+ - [ ] Consistent coding style
117
+
118
+ ### Security
119
+ - [ ] No hardcoded secrets
120
+ - [ ] Proper input validation
121
+ - [ ] Safe API usage
122
+ - [ ] No XSS/injection risks
123
+ - [ ] Authentication and authorization
124
+
125
+ ### Performance
126
+ - [ ] Efficient algorithms
127
+ - [ ] No memory leaks
128
+ - [ ] Proper caching
129
+ - [ ] Optimized queries
130
+ - [ ] Resource management
131
+
132
+ ### Testing
133
+ - [ ] Adequate test coverage
134
+ - [ ] Meaningful test cases
135
+ - [ ] Edge case handling
136
+ - [ ] Integration tests
137
+
138
+ ## Structured Feedback Requirement
139
+
140
+ ### JSON Feedback Generation
141
+
142
+ After completing review, generate structured feedback using this format:
143
+
144
+ ```json
145
+ {
146
+ "feedback": [
147
+ {
148
+ "severity": "CRITICAL|WARNING|SUGGESTION",
149
+ "issue": "Detailed problem description",
150
+ "suggestion": "Concrete recommendation for improvement"
151
+ }
152
+ ],
153
+ "summary": {
154
+ "total_issues": 3,
155
+ "critical_count": 1,
156
+ "warning_count": 1,
157
+ "suggestion_count": 1
158
+ }
159
+ }
160
+ ```
161
+
162
+ **Feedback Rules:**
163
+ - MUST be valid JSON
164
+ - `severity` must be one of: CRITICAL, WARNING, SUGGESTION
165
+ - Provide clear, actionable suggestions
166
+ - Include a summary of total issues
167
+
168
+ ## Review Process
169
+
170
+ 1. **Preparation**
171
+ - Understand requirements and acceptance criteria
172
+ - Identify key files and components
173
+ - Set review context and scope
174
+
175
+ 2. **Analysis**
176
+ - Examine code structure and design patterns
177
+ - Check security vulnerabilities
178
+ - Validate performance considerations
179
+ - Assess testing coverage
180
+
181
+ 3. **Documentation Review**
182
+ - Verify code documentation quality
183
+ - Check API documentation completeness
184
+ - Validate user-facing documentation
185
+
186
+ 4. **Feedback Generation**
187
+ - Categorize findings by severity
188
+ - Provide specific, actionable recommendations
189
+ - Generate structured JSON feedback
190
+
191
+ 5. **Quality Assessment**
192
+ - Evaluate overall implementation quality
193
+ - Consider requirements satisfaction
194
+ - Determine confidence score
195
+
196
+ ## Success Metrics
197
+
198
+ - ✅ Comprehensive review completed
199
+ - ✅ No critical security issues
200
+ - Actionable improvement feedback provided
201
+ - ✅ Clear severity classification
202
+ - Documentation reviewed
203
+
204
+ ## Quality Standards
205
+
206
+ ### Critical Issues (Must Fix)
207
+ - Security vulnerabilities
208
+ - Functional bugs
209
+ - Performance bottlenecks
210
+ - Missing error handling
211
+
212
+ ### Warnings (Should Fix)
213
+ - Code style violations
214
+ - Insufficient testing
215
+ - Poor documentation
216
+ - Minor performance issues
217
+
218
+ ### Suggestions (Nice to Have)
219
+ - Code optimization opportunities
220
+ - Enhanced error messages
221
+ - Additional logging
222
+ - Improved maintainability
223
+
224
+ ## Completion
225
+
226
+ Provide structured output with:
227
+ - Confidence score (0.0-1.0) based on review thoroughness
228
+ - Summary of review completed
229
+ - Structured feedback JSON
230
+ - Overall quality assessment
231
+ - Specific recommendations for improvement