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.
Files changed (164) 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 +100 -11
  40. package/.claude/commands/cfn-mode.md +2 -2
  41. package/.claude/skills/cfn-agent-spawning/spawn-agent.sh +12 -0
  42. package/.claude/skills/cfn-agent-spawning/spawn-agent.sh.backup +273 -0
  43. package/.claude/skills/cfn-hybrid-routing/README.md +1 -1
  44. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +95 -15
  45. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup +76 -11
  46. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.backup2 +959 -0
  47. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh.clean +949 -0
  48. package/.claude/skills/cfn-product-owner-decision/execute-decision.sh +82 -10
  49. package/claude-assets/agents/cfn-dev-team/CLAUDE.md +24 -14
  50. package/claude-assets/agents/cfn-dev-team/architecture/api-designer-persona.md +0 -7
  51. package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +12 -38
  52. package/claude-assets/agents/cfn-dev-team/architecture/goal-planner.md +0 -10
  53. package/claude-assets/agents/cfn-dev-team/architecture/planner.md +7 -57
  54. package/claude-assets/agents/cfn-dev-team/architecture/system-architect.md +8 -45
  55. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +365 -25
  56. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +504 -448
  57. package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +428 -167
  58. package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +472 -20
  59. package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +5 -5
  60. package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +5 -7
  61. package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +0 -6
  62. package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +3 -3
  63. package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +13 -14
  64. package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +0 -6
  65. package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +2 -2
  66. package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +10 -56
  67. package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +7 -26
  68. package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +8 -48
  69. package/claude-assets/agents/cfn-dev-team/documentation/api-documentation.md +1 -1
  70. package/claude-assets/agents/cfn-dev-team/documentation/pseudocode.md +3 -11
  71. package/claude-assets/agents/cfn-dev-team/documentation/specification-agent.md +6 -16
  72. package/claude-assets/agents/cfn-dev-team/product-owners/cto-agent.md +7 -19
  73. package/claude-assets/agents/cfn-dev-team/product-owners/power-user-persona.md +9 -49
  74. package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +291 -86
  75. package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +9 -81
  76. package/claude-assets/agents/cfn-dev-team/reviewers/quality/cyclomatic-complexity-reducer.md +4 -64
  77. package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +7 -87
  78. package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +8 -12
  79. package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +11 -129
  80. package/claude-assets/agents/cfn-dev-team/reviewers/reviewer.md +231 -280
  81. package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +0 -6
  82. package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +0 -6
  83. package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +7 -32
  84. package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +9 -47
  85. package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +0 -6
  86. package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +12 -28
  87. package/claude-assets/agents/cfn-dev-team/testers/tester.md +167 -236
  88. package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +7 -27
  89. package/claude-assets/agents/cfn-dev-team/testers/validation/validation-production-validator.md +7 -19
  90. package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +10 -47
  91. package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +40 -116
  92. package/claude-assets/agents/cfn-dev-team/utility/analyst.md +7 -47
  93. package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +7 -40
  94. package/claude-assets/agents/cfn-dev-team/utility/context-curator.md +7 -47
  95. package/claude-assets/agents/cfn-dev-team/{coordinators → utility}/epic-creator.md +29 -0
  96. package/claude-assets/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md +4 -14
  97. package/claude-assets/cfn-agents-ignore/cfn-seo-team/AGENT_CREATION_REPORT.md.backup +481 -0
  98. package/claude-assets/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md +3 -4
  99. package/claude-assets/cfn-agents-ignore/cfn-seo-team/DELEGATION_MATRIX.md.backup +371 -0
  100. package/claude-assets/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md +20 -26
  101. package/claude-assets/cfn-agents-ignore/cfn-seo-team/INTEGRATION_REQUIREMENTS.md.backup +637 -0
  102. package/claude-assets/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md +295 -50
  103. package/claude-assets/cfn-agents-ignore/cfn-seo-team/cfn-seo-coordinator.md.backup +398 -0
  104. package/claude-assets/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md +27 -25
  105. package/claude-assets/cfn-agents-ignore/cfn-seo-team/competitive-seo-analyst.md.backup +401 -0
  106. package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md +5 -106
  107. package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-atomization-specialist.md.backup +552 -0
  108. package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md +5 -25
  109. package/claude-assets/cfn-agents-ignore/cfn-seo-team/content-seo-strategist.md.backup +223 -0
  110. package/claude-assets/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md +5 -27
  111. package/claude-assets/cfn-agents-ignore/cfn-seo-team/eeat-content-auditor.md.backup +367 -0
  112. package/claude-assets/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md +5 -27
  113. package/claude-assets/cfn-agents-ignore/cfn-seo-team/geo-optimization-expert.md.backup +247 -0
  114. package/claude-assets/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md +5 -27
  115. package/claude-assets/cfn-agents-ignore/cfn-seo-team/link-building-specialist.md.backup +269 -0
  116. package/claude-assets/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md +5 -25
  117. package/claude-assets/cfn-agents-ignore/cfn-seo-team/local-seo-optimizer.md.backup +311 -0
  118. package/claude-assets/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md +6 -26
  119. package/claude-assets/cfn-agents-ignore/cfn-seo-team/programmatic-seo-engineer.md.backup +222 -0
  120. package/claude-assets/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md +5 -25
  121. package/claude-assets/cfn-agents-ignore/cfn-seo-team/schema-markup-engineer.md.backup +408 -0
  122. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md +6 -26
  123. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-analytics-specialist.md.backup +354 -0
  124. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md +4 -4
  125. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/accessibility-validator.md.backup +561 -0
  126. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md +2 -2
  127. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/audience-validator.md.backup +480 -0
  128. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md +1 -1
  129. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/branding-validator.md.backup +448 -0
  130. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md +2 -2
  131. package/claude-assets/cfn-agents-ignore/cfn-seo-team/seo-validators/humanizer-validator.md.backup +329 -0
  132. package/claude-assets/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md +361 -199
  133. package/claude-assets/cfn-agents-ignore/cfn-seo-team/technical-seo-specialist.md.backup +208 -0
  134. package/claude-assets/commands/CFN_LOOP_TASK_MODE.md +100 -11
  135. package/claude-assets/commands/cfn-mode.md +2 -2
  136. package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh +12 -0
  137. package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh.backup +273 -0
  138. package/claude-assets/skills/cfn-environment-sanitization/SKILL.md +200 -0
  139. package/claude-assets/skills/cfn-environment-sanitization/sanitize-environment.sh +244 -0
  140. package/claude-assets/skills/cfn-hybrid-routing/README.md +1 -1
  141. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +95 -15
  142. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.backup +76 -11
  143. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.backup2 +959 -0
  144. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh.clean +949 -0
  145. package/claude-assets/skills/cfn-node-heap-sizer/task-mode-heap-limiter.sh +326 -0
  146. package/claude-assets/skills/cfn-process-instrumentation/SKILL.md +279 -0
  147. package/claude-assets/skills/cfn-process-instrumentation/instrument-process.sh +323 -0
  148. package/claude-assets/skills/cfn-product-owner-decision/execute-decision.sh +82 -10
  149. package/claude-assets/skills/cfn-task-audit/get-audit-data.sh +376 -0
  150. package/claude-assets/skills/cfn-task-audit/store-task-audit.sh +184 -0
  151. package/claude-assets/skills/cfn-task-mode-safety/cli-coordination.sh +519 -0
  152. package/claude-assets/skills/cfn-task-mode-safety/mode-detection.sh +326 -0
  153. package/claude-assets/skills/cfn-task-mode-sanitize/task-mode-env-sanitizer.sh +224 -0
  154. package/claude-assets/skills/cfn-telemetry/collect-metrics.sh +249 -0
  155. package/claude-assets/skills/cfn-telemetry/start-telemetry.sh +111 -0
  156. package/claude-assets/skills/cfn-validation-runner-instrumentation/wrapped-executor.sh +327 -0
  157. package/dist/agents/agent-loader.js +146 -165
  158. package/dist/agents/agent-loader.js.map +1 -1
  159. package/dist/cli/config-manager.js +109 -91
  160. package/dist/cli/config-manager.js.map +1 -1
  161. package/package.json +1 -1
  162. package/scripts/mode-detection.sh +321 -0
  163. package/scripts/spawn-worker.sh +8 -0
  164. package/scripts/track-zai-costs-simple.sh +8 -0
@@ -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
 
@@ -191,81 +180,12 @@ const analyzeLoadTest = (result: LoadTestResult): PerformanceIssue[] => {
191
180
  - [ ] Results persisted to SQLite
192
181
 
193
182
  Remember: Optimize for highest impact with reasonable effort. Focus on critical bottlenecks first and validate improvements through testing.
194
- ## ⚠️ CRITICAL: Mode-Specific Completion Protocol (ANTI-023 MEMORY LEAK FIX)
195
-
196
- **First, determine how you were spawned:**
197
-
198
- **Task Mode (95%):** You were called via `Task("perf-analyzer", "...")` in Main Chat
199
- - Simply complete your performance analysis and return structured JSON output
200
- - **❌ DO NOT:** Use Redis commands, execute bash scripts, signal completion via CLI tools
201
- - Main Chat receives your output automatically
202
-
203
- **CLI Mode (5%):** You were spawned via `npx claude-flow-novice agent-spawn ...` command
204
- - Use Redis signals and completion scripts as outlined below
205
-
206
- ### Task Mode (Spawned via Task() tool in Main Chat)
207
-
208
- **Simply complete your work and return structured output.**
209
-
210
- ```json
211
- {
212
- "confidence": 0.85,
213
- "status": "COMPLETE|NEEDS_WORK",
214
- "summary": "Performance analysis completed with X bottlenecks identified",
215
- "deliverables": ["performance-report.md", "optimization-recommendations.json"],
216
- "findings": {
217
- "bottlenecks": 3,
218
- "optimizations": 5,
219
- "expected_improvement": "45%"
220
- }
221
- }
222
- ```
223
-
224
- **❌ FORBIDDEN in Task Mode:**
225
- - **DO NOT** run `redis-cli` commands
226
- - **DO NOT** execute `invoke-waiting-mode.sh` scripts
227
- - **DO NOT** use bash completion scripts
228
- - **DO NOT** signal completion via CLI tools
229
- - **Main Chat receives your output automatically - no coordination needed**
230
-
231
- ### CLI Mode (Spawned via `npx claude-flow-novice agent-spawn`)
232
-
233
- **Step 1: Complete Work**
234
- Execute assigned performance analysis (bottleneck detection, optimization recommendations)
235
-
236
- **Step 2: Signal Completion**
237
- ```bash
238
- # Automatic Task Mode detection - will exit if in Task Mode
239
- detect_task_mode_and_exit() {
240
- if [[ -z "${TASK_ID:-}" || -z "${AGENT_ID:-}" ]]; then
241
- echo "❌ TASK MODE DETECTED - CLI commands forbidden" >&2
242
- echo "🚨 SECURITY: perf-analyzer spawned via Task() tool - use JSON output only" >&2
243
- echo "💡 ANTI-023: Preventing memory leak from CLI command execution" >&2
244
- exit 1
245
- fi
246
- }
247
-
248
- detect_task_mode_and_exit && redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
249
- ```
250
-
251
- **Step 3: Report Confidence Score and Exit**
252
- ```bash
253
- # Automatic Task Mode detection - will exit if in Task Mode
254
- detect_task_mode_and_exit && ./.claude/skills/redis-coordination/invoke-waiting-mode.sh report \
255
- --task-id "$TASK_ID" \
256
- --agent-id "$AGENT_ID" \
257
- --confidence [0.0-1.0] \
258
- --iteration 1
259
- ```
260
-
261
- **Why This Matters:**
262
- - **ANTI-023 MEMORY LEAK:** Task Mode agents attempting CLI commands hang indefinitely
263
- - Task Mode uses direct JSON output, CLI Mode uses Redis coordination
264
- - Mixing protocols causes memory leaks and process hanging
265
- - **Check your spawn method FIRST before using any completion protocol**
183
+ ## Completion Protocol
266
184
 
267
- ### How to Tell Which Mode You're In
185
+ Complete your work and provide a structured response with:
186
+ - Confidence score (0.0-1.0) based on performance analysis quality
187
+ - Summary of performance analysis completed
188
+ - List of bottlenecks and performance issues identified
189
+ - Optimization recommendations and expected improvements
268
190
 
269
- - **Task Mode**: You see a direct task assignment in Main Chat context
270
- - **CLI Mode**: You have TASK_ID and AGENT_ID environment variables
271
- - **When in doubt, assume Task Mode and return structured JSON output**
191
+ **Note:** Coordination instructions are provided when spawned via CLI.
@@ -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
 
@@ -35,9 +25,15 @@ Refer to [.claude/templates/post-edit-validation.md](../templates/post-edit-vali
35
25
  /hooks post-edit [FILE_PATH] --memory-key "performance-benchmarker/[TASK_ID]"
36
26
  ```
37
27
 
38
- ## Redis Coordination
28
+ ## Completion Protocol
29
+
30
+ Complete your work and provide a structured response with:
31
+ - Confidence score (0.0-1.0) based on benchmark quality
32
+ - Summary of performance analysis completed
33
+ - List of performance metrics and findings
34
+ - Optimization recommendations
39
35
 
40
- Refer to [.claude/templates/redis-coordination.md](../templates/redis-coordination.md) for pub/sub communication patterns.
36
+ **Note:** Coordination instructions are provided when spawned via CLI.
41
37
 
42
38
  ## Team Dynamics
43
39
 
@@ -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
 
@@ -129,74 +70,15 @@ await redis.publish('swarm:security:critical', {
129
70
  - Security code review
130
71
  - Penetration testing scenarios
131
72
 
132
- ## ⚠️ CRITICAL: Mode-Specific Completion Protocol (ANTI-023 MEMORY LEAK FIX)
133
-
134
- **First, determine how you were spawned:**
135
-
136
- **Task Mode (95%):** You were called via `Task("security-specialist", "...")` in Main Chat
137
- - Simply complete your security audit and return structured JSON output
138
- - **❌ DO NOT:** Use Redis commands, execute bash scripts, signal completion via CLI tools
139
- - Main Chat receives your output automatically
140
-
141
- **CLI Mode (5%):** You were spawned via `npx claude-flow-novice agent-spawn ...` command
142
- - Use Redis signals and completion scripts as outlined below
143
-
144
- ### Task Mode (Spawned via Task() tool in Main Chat)
145
-
146
- **Simply complete your work and return structured output.**
147
-
148
- ```json
149
- {
150
- "confidence": 0.85,
151
- "status": "COMPLETE|NEEDS_WORK",
152
- "summary": "Security audit completed with X findings",
153
- "deliverables": ["security-report.md", "vulnerability-scan.json"],
154
- "findings": {
155
- "critical": 0,
156
- "high": 2,
157
- "medium": 5,
158
- "low": 3
159
- }
160
- }
161
- ```
162
-
163
- **❌ FORBIDDEN in Task Mode:**
164
- - **DO NOT** run `redis-cli` commands
165
- - **DO NOT** execute `invoke-waiting-mode.sh` scripts
166
- - **DO NOT** use bash completion scripts
167
- - **DO NOT** signal completion via CLI tools
168
- - **Main Chat receives your output automatically - no coordination needed**
169
-
170
- ### CLI Mode (Spawned via `npx claude-flow-novice agent-spawn`)
171
-
172
- **Step 1: Complete Work**
173
- Execute assigned security audit (vulnerability assessment, threat modeling, etc.)
174
-
175
- **Step 2: Signal Completion**
176
- ```bash
177
- redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
178
- ```
179
-
180
- **Step 3: Report Confidence Score and Exit**
181
- ```bash
182
- ./.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh report \
183
- --task-id "$TASK_ID" \
184
- --agent-id "$AGENT_ID" \
185
- --confidence [0.0-1.0] \
186
- --iteration 1
187
- ```
188
-
189
- **Why This Matters:**
190
- - **ANTI-023 MEMORY LEAK:** Task Mode agents attempting CLI commands hang indefinitely
191
- - Task Mode uses direct JSON output, CLI Mode uses Redis coordination
192
- - Mixing protocols causes memory leaks and process hanging
193
- - **Check your spawn method FIRST before using any completion protocol**
73
+ ## Completion Protocol
194
74
 
195
- ### How to Tell Which Mode You're In
75
+ Complete your work and provide a structured response with:
76
+ - Confidence score (0.0-1.0) based on security audit quality
77
+ - Summary of security analysis completed
78
+ - List of findings and vulnerabilities identified
79
+ - Risk assessment and remediation recommendations
196
80
 
197
- - **Task Mode**: You see a direct task assignment in Main Chat context
198
- - **CLI Mode**: You have TASK_ID and AGENT_ID environment variables
199
- - **When in doubt, assume Task Mode and return structured JSON output**
81
+ **Note:** Coordination instructions are provided when spawned via CLI.
200
82
 
201
83
  ## Success Metrics
202
84