agentic-qe 1.1.0 → 1.2.0

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 (297) hide show
  1. package/.claude/agents/qe-coverage-analyzer.md +8 -0
  2. package/.claude/agents/qe-flaky-test-hunter.md +9 -1
  3. package/.claude/agents/qe-test-generator.md +7 -0
  4. package/.claude/agents/reasoning/agent.md +816 -0
  5. package/.claude/agents/reasoning/goal-planner.md +73 -0
  6. package/.claude/settings.json +21 -20
  7. package/.claude/skills/README.md +124 -0
  8. package/.claude/skills/agentdb-advanced/SKILL.md +550 -0
  9. package/.claude/skills/agentdb-learning/SKILL.md +545 -0
  10. package/.claude/skills/agentdb-memory-patterns/SKILL.md +339 -0
  11. package/.claude/skills/agentdb-optimization/SKILL.md +509 -0
  12. package/.claude/skills/agentdb-vector-search/SKILL.md +339 -0
  13. package/.claude/skills/agentic-quality-engineering/SKILL.md +604 -0
  14. package/.claude/skills/api-testing-patterns/SKILL.md +686 -0
  15. package/.claude/skills/bug-reporting-excellence/SKILL.md +632 -0
  16. package/.claude/skills/code-review-quality/SKILL.md +683 -0
  17. package/.claude/skills/consultancy-practices/SKILL.md +540 -0
  18. package/.claude/skills/context-driven-testing/SKILL.md +466 -0
  19. package/.claude/skills/exploratory-testing-advanced/SKILL.md +676 -0
  20. package/.claude/skills/flow-nexus-neural/SKILL.md +738 -0
  21. package/.claude/skills/flow-nexus-platform/SKILL.md +1157 -0
  22. package/.claude/skills/flow-nexus-swarm/SKILL.md +610 -0
  23. package/.claude/skills/github-code-review/SKILL.md +1140 -0
  24. package/.claude/skills/github-multi-repo/SKILL.md +874 -0
  25. package/.claude/skills/github-project-management/SKILL.md +1277 -0
  26. package/.claude/skills/github-release-management/SKILL.md +1081 -0
  27. package/.claude/skills/github-workflow-automation/SKILL.md +1065 -0
  28. package/.claude/skills/hive-mind-advanced/SKILL.md +712 -0
  29. package/.claude/skills/holistic-testing-pact/SKILL.md +225 -0
  30. package/.claude/skills/hooks-automation/SKILL.md +1201 -0
  31. package/.claude/skills/pair-programming/SKILL.md +1202 -0
  32. package/.claude/skills/performance-analysis/SKILL.md +563 -0
  33. package/.claude/skills/performance-testing/SKILL.md +662 -0
  34. package/.claude/skills/quality-metrics/SKILL.md +592 -0
  35. package/.claude/skills/reasoningbank-agentdb/SKILL.md +446 -0
  36. package/.claude/skills/reasoningbank-intelligence/SKILL.md +201 -0
  37. package/.claude/skills/refactoring-patterns/SKILL.md +778 -0
  38. package/.claude/skills/risk-based-testing/SKILL.md +721 -0
  39. package/.claude/skills/security-testing/SKILL.md +651 -0
  40. package/.claude/skills/skill-builder/SKILL.md +910 -0
  41. package/.claude/skills/sparc-methodology/SKILL.md +1115 -0
  42. package/.claude/skills/stream-chain/SKILL.md +563 -0
  43. package/.claude/skills/swarm-advanced/SKILL.md +973 -0
  44. package/.claude/skills/swarm-orchestration/SKILL.md +179 -0
  45. package/.claude/skills/tdd-london-chicago/SKILL.md +567 -0
  46. package/.claude/skills/technical-writing/SKILL.md +235 -0
  47. package/.claude/skills/test-automation-strategy/SKILL.md +842 -0
  48. package/.claude/skills/verification-quality/SKILL.md +649 -0
  49. package/.claude/skills/xp-practices/SKILL.md +671 -0
  50. package/.claude/statusline-command.sh +176 -0
  51. package/CHANGELOG.md +536 -1
  52. package/README.md +92 -3
  53. package/config/improvement-loop.config.ts +323 -0
  54. package/config/neural-agent.config.ts +197 -0
  55. package/dist/adapters/MemoryStoreAdapter.d.ts +16 -16
  56. package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -1
  57. package/dist/adapters/MemoryStoreAdapter.js +16 -16
  58. package/dist/adapters/MemoryStoreAdapter.js.map +1 -1
  59. package/dist/agents/BaseAgent.d.ts +69 -0
  60. package/dist/agents/BaseAgent.d.ts.map +1 -1
  61. package/dist/agents/BaseAgent.js +382 -1
  62. package/dist/agents/BaseAgent.js.map +1 -1
  63. package/dist/agents/CoverageAnalyzerAgent.d.ts +13 -2
  64. package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -1
  65. package/dist/agents/CoverageAnalyzerAgent.js +105 -6
  66. package/dist/agents/CoverageAnalyzerAgent.js.map +1 -1
  67. package/dist/agents/DeploymentReadinessAgent.d.ts.map +1 -1
  68. package/dist/agents/DeploymentReadinessAgent.js +13 -13
  69. package/dist/agents/DeploymentReadinessAgent.js.map +1 -1
  70. package/dist/agents/FlakyTestHunterAgent.d.ts +28 -0
  71. package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -1
  72. package/dist/agents/FlakyTestHunterAgent.js +159 -4
  73. package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
  74. package/dist/agents/FleetCommanderAgent.d.ts.map +1 -1
  75. package/dist/agents/FleetCommanderAgent.js +2 -2
  76. package/dist/agents/FleetCommanderAgent.js.map +1 -1
  77. package/dist/agents/LearningAgent.d.ts +14 -5
  78. package/dist/agents/LearningAgent.d.ts.map +1 -1
  79. package/dist/agents/LearningAgent.js +36 -16
  80. package/dist/agents/LearningAgent.js.map +1 -1
  81. package/dist/agents/NeuralAgentExtension.d.ts +117 -0
  82. package/dist/agents/NeuralAgentExtension.d.ts.map +1 -0
  83. package/dist/agents/NeuralAgentExtension.js +288 -0
  84. package/dist/agents/NeuralAgentExtension.js.map +1 -0
  85. package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -1
  86. package/dist/agents/PerformanceTesterAgent.js +4 -3
  87. package/dist/agents/PerformanceTesterAgent.js.map +1 -1
  88. package/dist/agents/ProductionIntelligenceAgent.js +7 -7
  89. package/dist/agents/ProductionIntelligenceAgent.js.map +1 -1
  90. package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -1
  91. package/dist/agents/QualityAnalyzerAgent.js +2 -2
  92. package/dist/agents/QualityAnalyzerAgent.js.map +1 -1
  93. package/dist/agents/QualityGateAgent.js +5 -5
  94. package/dist/agents/QualityGateAgent.js.map +1 -1
  95. package/dist/agents/RegressionRiskAnalyzerAgent.js +7 -7
  96. package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -1
  97. package/dist/agents/RequirementsValidatorAgent.d.ts.map +1 -1
  98. package/dist/agents/RequirementsValidatorAgent.js +1 -1
  99. package/dist/agents/RequirementsValidatorAgent.js.map +1 -1
  100. package/dist/agents/SecurityScannerAgent.js +6 -6
  101. package/dist/agents/SecurityScannerAgent.js.map +1 -1
  102. package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
  103. package/dist/agents/TestExecutorAgent.js +1 -3
  104. package/dist/agents/TestExecutorAgent.js.map +1 -1
  105. package/dist/agents/TestGeneratorAgent.d.ts +15 -4
  106. package/dist/agents/TestGeneratorAgent.d.ts.map +1 -1
  107. package/dist/agents/TestGeneratorAgent.js +165 -43
  108. package/dist/agents/TestGeneratorAgent.js.map +1 -1
  109. package/dist/agents/mixins/NeuralCapableMixin.d.ts +130 -0
  110. package/dist/agents/mixins/NeuralCapableMixin.d.ts.map +1 -0
  111. package/dist/agents/mixins/NeuralCapableMixin.js +358 -0
  112. package/dist/agents/mixins/NeuralCapableMixin.js.map +1 -0
  113. package/dist/agents/mixins/QUICCapableMixin.d.ts +34 -0
  114. package/dist/agents/mixins/QUICCapableMixin.d.ts.map +1 -0
  115. package/dist/agents/mixins/QUICCapableMixin.js +346 -0
  116. package/dist/agents/mixins/QUICCapableMixin.js.map +1 -0
  117. package/dist/cli/commands/agent/index.d.ts +5 -0
  118. package/dist/cli/commands/agent/index.d.ts.map +1 -1
  119. package/dist/cli/commands/agent/index.js +11 -6
  120. package/dist/cli/commands/agent/index.js.map +1 -1
  121. package/dist/cli/commands/agent/kill.d.ts +13 -0
  122. package/dist/cli/commands/agent/kill.d.ts.map +1 -0
  123. package/dist/cli/commands/agent/kill.js +65 -0
  124. package/dist/cli/commands/agent/kill.js.map +1 -0
  125. package/dist/cli/commands/agent/list.d.ts +19 -0
  126. package/dist/cli/commands/agent/list.d.ts.map +1 -0
  127. package/dist/cli/commands/agent/list.js +92 -0
  128. package/dist/cli/commands/agent/list.js.map +1 -0
  129. package/dist/cli/commands/agent/logs.d.ts +14 -0
  130. package/dist/cli/commands/agent/logs.d.ts.map +1 -0
  131. package/dist/cli/commands/agent/logs.js +77 -0
  132. package/dist/cli/commands/agent/logs.js.map +1 -0
  133. package/dist/cli/commands/agent/metrics.d.ts +21 -0
  134. package/dist/cli/commands/agent/metrics.d.ts.map +1 -0
  135. package/dist/cli/commands/agent/metrics.js +87 -0
  136. package/dist/cli/commands/agent/metrics.js.map +1 -0
  137. package/dist/cli/commands/agent/spawn.d.ts +28 -0
  138. package/dist/cli/commands/agent/spawn.d.ts.map +1 -0
  139. package/dist/cli/commands/agent/spawn.js +83 -0
  140. package/dist/cli/commands/agent/spawn.js.map +1 -0
  141. package/dist/cli/commands/init.d.ts +24 -0
  142. package/dist/cli/commands/init.d.ts.map +1 -1
  143. package/dist/cli/commands/init.js +475 -7
  144. package/dist/cli/commands/init.js.map +1 -1
  145. package/dist/cli/commands/skills/index.d.ts +51 -0
  146. package/dist/cli/commands/skills/index.d.ts.map +1 -0
  147. package/dist/cli/commands/skills/index.js +364 -0
  148. package/dist/cli/commands/skills/index.js.map +1 -0
  149. package/dist/cli/index.js +92 -1
  150. package/dist/cli/index.js.map +1 -1
  151. package/dist/core/EventBus.d.ts +38 -0
  152. package/dist/core/EventBus.d.ts.map +1 -1
  153. package/dist/core/EventBus.js +176 -31
  154. package/dist/core/EventBus.js.map +1 -1
  155. package/dist/core/FleetManager.d.ts +35 -1
  156. package/dist/core/FleetManager.d.ts.map +1 -1
  157. package/dist/core/FleetManager.js +121 -45
  158. package/dist/core/FleetManager.js.map +1 -1
  159. package/dist/core/MemoryManager.d.ts +19 -1
  160. package/dist/core/MemoryManager.d.ts.map +1 -1
  161. package/dist/core/MemoryManager.js +25 -1
  162. package/dist/core/MemoryManager.js.map +1 -1
  163. package/dist/core/embeddings/EmbeddingCache.d.ts +134 -0
  164. package/dist/core/embeddings/EmbeddingCache.d.ts.map +1 -0
  165. package/dist/core/embeddings/EmbeddingCache.js +239 -0
  166. package/dist/core/embeddings/EmbeddingCache.js.map +1 -0
  167. package/dist/core/embeddings/EmbeddingGenerator.d.ts +224 -0
  168. package/dist/core/embeddings/EmbeddingGenerator.d.ts.map +1 -0
  169. package/dist/core/embeddings/EmbeddingGenerator.js +459 -0
  170. package/dist/core/embeddings/EmbeddingGenerator.js.map +1 -0
  171. package/dist/core/embeddings/index.d.ts +15 -0
  172. package/dist/core/embeddings/index.d.ts.map +1 -0
  173. package/dist/core/embeddings/index.js +22 -0
  174. package/dist/core/embeddings/index.js.map +1 -0
  175. package/dist/core/memory/AgentDBIntegration.d.ts +35 -0
  176. package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -0
  177. package/dist/core/memory/AgentDBIntegration.js +75 -0
  178. package/dist/core/memory/AgentDBIntegration.js.map +1 -0
  179. package/dist/core/memory/AgentDBManager.d.ts +200 -0
  180. package/dist/core/memory/AgentDBManager.d.ts.map +1 -0
  181. package/dist/core/memory/AgentDBManager.js +263 -0
  182. package/dist/core/memory/AgentDBManager.js.map +1 -0
  183. package/dist/core/memory/AgentDBService.d.ts +160 -0
  184. package/dist/core/memory/AgentDBService.d.ts.map +1 -0
  185. package/dist/core/memory/AgentDBService.js +450 -0
  186. package/dist/core/memory/AgentDBService.js.map +1 -0
  187. package/dist/core/memory/RealAgentDBAdapter.d.ts +51 -0
  188. package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -0
  189. package/dist/core/memory/RealAgentDBAdapter.js +230 -0
  190. package/dist/core/memory/RealAgentDBAdapter.js.map +1 -0
  191. package/dist/core/memory/ReasoningBankAdapter.d.ts +58 -0
  192. package/dist/core/memory/ReasoningBankAdapter.d.ts.map +1 -0
  193. package/dist/core/memory/ReasoningBankAdapter.js +80 -0
  194. package/dist/core/memory/ReasoningBankAdapter.js.map +1 -0
  195. package/dist/core/memory/SwarmMemoryManager.d.ts +75 -3
  196. package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
  197. package/dist/core/memory/SwarmMemoryManager.js +236 -52
  198. package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
  199. package/dist/core/memory/index.d.ts +4 -0
  200. package/dist/core/memory/index.d.ts.map +1 -1
  201. package/dist/core/memory/index.js +9 -1
  202. package/dist/core/memory/index.js.map +1 -1
  203. package/dist/core/neural/NeuralTrainer.d.ts +137 -0
  204. package/dist/core/neural/NeuralTrainer.d.ts.map +1 -0
  205. package/dist/core/neural/NeuralTrainer.js +543 -0
  206. package/dist/core/neural/NeuralTrainer.js.map +1 -0
  207. package/dist/core/neural/index.d.ts +8 -0
  208. package/dist/core/neural/index.d.ts.map +1 -0
  209. package/dist/core/neural/index.js +24 -0
  210. package/dist/core/neural/index.js.map +1 -0
  211. package/dist/core/neural/types.d.ts +216 -0
  212. package/dist/core/neural/types.d.ts.map +1 -0
  213. package/dist/core/neural/types.js +8 -0
  214. package/dist/core/neural/types.js.map +1 -0
  215. package/dist/core/security/CertificateValidator.d.ts +130 -0
  216. package/dist/core/security/CertificateValidator.d.ts.map +1 -0
  217. package/dist/core/security/CertificateValidator.js +376 -0
  218. package/dist/core/security/CertificateValidator.js.map +1 -0
  219. package/dist/core/transport/QUICTransport.d.ts +62 -0
  220. package/dist/core/transport/QUICTransport.d.ts.map +1 -0
  221. package/dist/core/transport/QUICTransport.js +381 -0
  222. package/dist/core/transport/QUICTransport.js.map +1 -0
  223. package/dist/core/transport/SecureQUICTransport.d.ts +71 -0
  224. package/dist/core/transport/SecureQUICTransport.d.ts.map +1 -0
  225. package/dist/core/transport/SecureQUICTransport.js +253 -0
  226. package/dist/core/transport/SecureQUICTransport.js.map +1 -0
  227. package/dist/learning/AdvancedFeatureExtractor.d.ts +123 -0
  228. package/dist/learning/AdvancedFeatureExtractor.d.ts.map +1 -0
  229. package/dist/learning/AdvancedFeatureExtractor.js +423 -0
  230. package/dist/learning/AdvancedFeatureExtractor.js.map +1 -0
  231. package/dist/learning/FlakyPredictionModel.d.ts +11 -1
  232. package/dist/learning/FlakyPredictionModel.d.ts.map +1 -1
  233. package/dist/learning/FlakyPredictionModel.js +82 -35
  234. package/dist/learning/FlakyPredictionModel.js.map +1 -1
  235. package/dist/learning/FlakyTestDetector.d.ts +9 -0
  236. package/dist/learning/FlakyTestDetector.d.ts.map +1 -1
  237. package/dist/learning/FlakyTestDetector.js +28 -6
  238. package/dist/learning/FlakyTestDetector.js.map +1 -1
  239. package/dist/learning/ImprovementLoop.d.ts +16 -2
  240. package/dist/learning/ImprovementLoop.d.ts.map +1 -1
  241. package/dist/learning/ImprovementLoop.js +67 -8
  242. package/dist/learning/ImprovementLoop.js.map +1 -1
  243. package/dist/learning/ImprovementWorker.d.ts +83 -0
  244. package/dist/learning/ImprovementWorker.d.ts.map +1 -0
  245. package/dist/learning/ImprovementWorker.js +164 -0
  246. package/dist/learning/ImprovementWorker.js.map +1 -0
  247. package/dist/learning/NeuralPatternMatcher.d.ts +184 -0
  248. package/dist/learning/NeuralPatternMatcher.d.ts.map +1 -0
  249. package/dist/learning/NeuralPatternMatcher.js +702 -0
  250. package/dist/learning/NeuralPatternMatcher.js.map +1 -0
  251. package/dist/learning/NeuralTrainer.d.ts +209 -0
  252. package/dist/learning/NeuralTrainer.d.ts.map +1 -0
  253. package/dist/learning/NeuralTrainer.js +478 -0
  254. package/dist/learning/NeuralTrainer.js.map +1 -0
  255. package/dist/learning/index.d.ts +13 -7
  256. package/dist/learning/index.d.ts.map +1 -1
  257. package/dist/learning/index.js +27 -11
  258. package/dist/learning/index.js.map +1 -1
  259. package/dist/learning/types.d.ts +1 -0
  260. package/dist/learning/types.d.ts.map +1 -1
  261. package/dist/learning/types.js +16 -0
  262. package/dist/learning/types.js.map +1 -1
  263. package/dist/mcp/MCPToolRegistry.d.ts +34 -0
  264. package/dist/mcp/MCPToolRegistry.d.ts.map +1 -0
  265. package/dist/mcp/MCPToolRegistry.js +48 -0
  266. package/dist/mcp/MCPToolRegistry.js.map +1 -0
  267. package/dist/mcp/server.d.ts +4 -4
  268. package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
  269. package/dist/mcp/services/AgentRegistry.js +7 -1
  270. package/dist/mcp/services/AgentRegistry.js.map +1 -1
  271. package/dist/transport/QUICTransport.d.ts +340 -0
  272. package/dist/transport/QUICTransport.d.ts.map +1 -0
  273. package/dist/transport/QUICTransport.js +814 -0
  274. package/dist/transport/QUICTransport.js.map +1 -0
  275. package/dist/transport/UDPTransport.d.ts +348 -0
  276. package/dist/transport/UDPTransport.d.ts.map +1 -0
  277. package/dist/transport/UDPTransport.js +820 -0
  278. package/dist/transport/UDPTransport.js.map +1 -0
  279. package/dist/types/errors.d.ts +1 -1
  280. package/dist/types/index.d.ts +37 -0
  281. package/dist/types/index.d.ts.map +1 -1
  282. package/dist/types/index.js +2 -0
  283. package/dist/types/index.js.map +1 -1
  284. package/dist/types/quic.d.ts +339 -0
  285. package/dist/types/quic.d.ts.map +1 -0
  286. package/dist/types/quic.js +48 -0
  287. package/dist/types/quic.js.map +1 -0
  288. package/dist/utils/Config.js +1 -1
  289. package/dist/utils/Config.js.map +1 -1
  290. package/dist/utils/Database.d.ts +14 -0
  291. package/dist/utils/Database.d.ts.map +1 -1
  292. package/dist/utils/Database.js +51 -4
  293. package/dist/utils/Database.js.map +1 -1
  294. package/dist/utils/Logger.d.ts.map +1 -1
  295. package/dist/utils/Logger.js +111 -26
  296. package/dist/utils/Logger.js.map +1 -1
  297. package/package.json +30 -7
@@ -0,0 +1,1140 @@
1
+ ---
2
+ name: github-code-review
3
+ version: 1.0.0
4
+ description: Comprehensive GitHub code review with AI-powered swarm coordination
5
+ category: github
6
+ tags: [code-review, github, swarm, pr-management, automation]
7
+ author: Claude Code Flow
8
+ requires:
9
+ - github-cli
10
+ - ruv-swarm
11
+ - claude-flow
12
+ capabilities:
13
+ - Multi-agent code review
14
+ - Automated PR management
15
+ - Security and performance analysis
16
+ - Swarm-based review orchestration
17
+ - Intelligent comment generation
18
+ - Quality gate enforcement
19
+ ---
20
+
21
+ # GitHub Code Review Skill
22
+
23
+ > **AI-Powered Code Review**: Deploy specialized review agents to perform comprehensive, intelligent code reviews that go beyond traditional static analysis.
24
+
25
+ ## 🎯 Quick Start
26
+
27
+ ### Simple Review
28
+ ```bash
29
+ # Initialize review swarm for PR
30
+ gh pr view 123 --json files,diff | npx ruv-swarm github review-init --pr 123
31
+
32
+ # Post review status
33
+ gh pr comment 123 --body "🔍 Multi-agent code review initiated"
34
+ ```
35
+
36
+ ### Complete Review Workflow
37
+ ```bash
38
+ # Get PR context with gh CLI
39
+ PR_DATA=$(gh pr view 123 --json files,additions,deletions,title,body)
40
+ PR_DIFF=$(gh pr diff 123)
41
+
42
+ # Initialize comprehensive review
43
+ npx ruv-swarm github review-init \
44
+ --pr 123 \
45
+ --pr-data "$PR_DATA" \
46
+ --diff "$PR_DIFF" \
47
+ --agents "security,performance,style,architecture,accessibility" \
48
+ --depth comprehensive
49
+ ```
50
+
51
+ ---
52
+
53
+ ## 📚 Table of Contents
54
+
55
+ <details>
56
+ <summary><strong>Core Features</strong></summary>
57
+
58
+ - [Multi-Agent Review System](#multi-agent-review-system)
59
+ - [Specialized Review Agents](#specialized-review-agents)
60
+ - [PR-Based Swarm Management](#pr-based-swarm-management)
61
+ - [Automated Workflows](#automated-workflows)
62
+ - [Quality Gates & Checks](#quality-gates--checks)
63
+
64
+ </details>
65
+
66
+ <details>
67
+ <summary><strong>Review Agents</strong></summary>
68
+
69
+ - [Security Review Agent](#security-review-agent)
70
+ - [Performance Review Agent](#performance-review-agent)
71
+ - [Architecture Review Agent](#architecture-review-agent)
72
+ - [Style & Convention Agent](#style--convention-agent)
73
+ - [Accessibility Agent](#accessibility-agent)
74
+
75
+ </details>
76
+
77
+ <details>
78
+ <summary><strong>Advanced Features</strong></summary>
79
+
80
+ - [Context-Aware Reviews](#context-aware-reviews)
81
+ - [Learning from History](#learning-from-history)
82
+ - [Cross-PR Analysis](#cross-pr-analysis)
83
+ - [Custom Review Agents](#custom-review-agents)
84
+
85
+ </details>
86
+
87
+ <details>
88
+ <summary><strong>Integration & Automation</strong></summary>
89
+
90
+ - [CI/CD Integration](#cicd-integration)
91
+ - [Webhook Handlers](#webhook-handlers)
92
+ - [PR Comment Commands](#pr-comment-commands)
93
+ - [Automated Fixes](#automated-fixes)
94
+
95
+ </details>
96
+
97
+ ---
98
+
99
+ ## 🚀 Core Features
100
+
101
+ ### Multi-Agent Review System
102
+
103
+ Deploy specialized AI agents for comprehensive code review:
104
+
105
+ ```bash
106
+ # Initialize review swarm with GitHub CLI integration
107
+ PR_DATA=$(gh pr view 123 --json files,additions,deletions,title,body)
108
+ PR_DIFF=$(gh pr diff 123)
109
+
110
+ # Start multi-agent review
111
+ npx ruv-swarm github review-init \
112
+ --pr 123 \
113
+ --pr-data "$PR_DATA" \
114
+ --diff "$PR_DIFF" \
115
+ --agents "security,performance,style,architecture,accessibility" \
116
+ --depth comprehensive
117
+
118
+ # Post initial review status
119
+ gh pr comment 123 --body "🔍 Multi-agent code review initiated"
120
+ ```
121
+
122
+ **Benefits:**
123
+ - ✅ Parallel review by specialized agents
124
+ - ✅ Comprehensive coverage across multiple domains
125
+ - ✅ Faster review cycles with coordinated analysis
126
+ - ✅ Consistent quality standards enforcement
127
+
128
+ ---
129
+
130
+ ## 🤖 Specialized Review Agents
131
+
132
+ ### Security Review Agent
133
+
134
+ **Focus:** Identify security vulnerabilities and suggest fixes
135
+
136
+ ```bash
137
+ # Get changed files from PR
138
+ CHANGED_FILES=$(gh pr view 123 --json files --jq '.files[].path')
139
+
140
+ # Run security-focused review
141
+ SECURITY_RESULTS=$(npx ruv-swarm github review-security \
142
+ --pr 123 \
143
+ --files "$CHANGED_FILES" \
144
+ --check "owasp,cve,secrets,permissions" \
145
+ --suggest-fixes)
146
+
147
+ # Post findings based on severity
148
+ if echo "$SECURITY_RESULTS" | grep -q "critical"; then
149
+ # Request changes for critical issues
150
+ gh pr review 123 --request-changes --body "$SECURITY_RESULTS"
151
+ gh pr edit 123 --add-label "security-review-required"
152
+ else
153
+ # Post as comment for non-critical issues
154
+ gh pr comment 123 --body "$SECURITY_RESULTS"
155
+ fi
156
+ ```
157
+
158
+ <details>
159
+ <summary><strong>Security Checks Performed</strong></summary>
160
+
161
+ ```javascript
162
+ {
163
+ "checks": [
164
+ "SQL injection vulnerabilities",
165
+ "XSS attack vectors",
166
+ "Authentication bypasses",
167
+ "Authorization flaws",
168
+ "Cryptographic weaknesses",
169
+ "Dependency vulnerabilities",
170
+ "Secret exposure",
171
+ "CORS misconfigurations"
172
+ ],
173
+ "actions": [
174
+ "Block PR on critical issues",
175
+ "Suggest secure alternatives",
176
+ "Add security test cases",
177
+ "Update security documentation"
178
+ ]
179
+ }
180
+ ```
181
+
182
+ </details>
183
+
184
+ <details>
185
+ <summary><strong>Comment Template: Security Issue</strong></summary>
186
+
187
+ ```markdown
188
+ 🔒 **Security Issue: [Type]**
189
+
190
+ **Severity**: 🔴 Critical / 🟡 High / 🟢 Low
191
+
192
+ **Description**:
193
+ [Clear explanation of the security issue]
194
+
195
+ **Impact**:
196
+ [Potential consequences if not addressed]
197
+
198
+ **Suggested Fix**:
199
+ ```language
200
+ [Code example of the fix]
201
+ ```
202
+
203
+ **References**:
204
+ - [OWASP Guide](link)
205
+ - [Security Best Practices](link)
206
+ ```
207
+
208
+ </details>
209
+
210
+ ---
211
+
212
+ ### Performance Review Agent
213
+
214
+ **Focus:** Analyze performance impact and optimization opportunities
215
+
216
+ ```bash
217
+ # Run performance analysis
218
+ npx ruv-swarm github review-performance \
219
+ --pr 123 \
220
+ --profile "cpu,memory,io" \
221
+ --benchmark-against main \
222
+ --suggest-optimizations
223
+ ```
224
+
225
+ <details>
226
+ <summary><strong>Performance Metrics Analyzed</strong></summary>
227
+
228
+ ```javascript
229
+ {
230
+ "metrics": [
231
+ "Algorithm complexity (Big O analysis)",
232
+ "Database query efficiency",
233
+ "Memory allocation patterns",
234
+ "Cache utilization",
235
+ "Network request optimization",
236
+ "Bundle size impact",
237
+ "Render performance"
238
+ ],
239
+ "benchmarks": [
240
+ "Compare with baseline",
241
+ "Load test simulations",
242
+ "Memory leak detection",
243
+ "Bottleneck identification"
244
+ ]
245
+ }
246
+ ```
247
+
248
+ </details>
249
+
250
+ ---
251
+
252
+ ### Architecture Review Agent
253
+
254
+ **Focus:** Evaluate design patterns and architectural decisions
255
+
256
+ ```bash
257
+ # Architecture review
258
+ npx ruv-swarm github review-architecture \
259
+ --pr 123 \
260
+ --check "patterns,coupling,cohesion,solid" \
261
+ --visualize-impact \
262
+ --suggest-refactoring
263
+ ```
264
+
265
+ <details>
266
+ <summary><strong>Architecture Analysis</strong></summary>
267
+
268
+ ```javascript
269
+ {
270
+ "patterns": [
271
+ "Design pattern adherence",
272
+ "SOLID principles",
273
+ "DRY violations",
274
+ "Separation of concerns",
275
+ "Dependency injection",
276
+ "Layer violations",
277
+ "Circular dependencies"
278
+ ],
279
+ "metrics": [
280
+ "Coupling metrics",
281
+ "Cohesion scores",
282
+ "Complexity measures",
283
+ "Maintainability index"
284
+ ]
285
+ }
286
+ ```
287
+
288
+ </details>
289
+
290
+ ---
291
+
292
+ ### Style & Convention Agent
293
+
294
+ **Focus:** Enforce coding standards and best practices
295
+
296
+ ```bash
297
+ # Style enforcement with auto-fix
298
+ npx ruv-swarm github review-style \
299
+ --pr 123 \
300
+ --check "formatting,naming,docs,tests" \
301
+ --auto-fix "formatting,imports,whitespace"
302
+ ```
303
+
304
+ <details>
305
+ <summary><strong>Style Checks</strong></summary>
306
+
307
+ ```javascript
308
+ {
309
+ "checks": [
310
+ "Code formatting",
311
+ "Naming conventions",
312
+ "Documentation standards",
313
+ "Comment quality",
314
+ "Test coverage",
315
+ "Error handling patterns",
316
+ "Logging standards"
317
+ ],
318
+ "auto-fix": [
319
+ "Formatting issues",
320
+ "Import organization",
321
+ "Trailing whitespace",
322
+ "Simple naming issues"
323
+ ]
324
+ }
325
+ ```
326
+
327
+ </details>
328
+
329
+ ---
330
+
331
+ ## 🔄 PR-Based Swarm Management
332
+
333
+ ### Create Swarm from PR
334
+
335
+ ```bash
336
+ # Create swarm from PR description using gh CLI
337
+ gh pr view 123 --json body,title,labels,files | npx ruv-swarm swarm create-from-pr
338
+
339
+ # Auto-spawn agents based on PR labels
340
+ gh pr view 123 --json labels | npx ruv-swarm swarm auto-spawn
341
+
342
+ # Create swarm with full PR context
343
+ gh pr view 123 --json body,labels,author,assignees | \
344
+ npx ruv-swarm swarm init --from-pr-data
345
+ ```
346
+
347
+ ### Label-Based Agent Assignment
348
+
349
+ Map PR labels to specialized agents:
350
+
351
+ ```json
352
+ {
353
+ "label-mapping": {
354
+ "bug": ["debugger", "tester"],
355
+ "feature": ["architect", "coder", "tester"],
356
+ "refactor": ["analyst", "coder"],
357
+ "docs": ["researcher", "writer"],
358
+ "performance": ["analyst", "optimizer"],
359
+ "security": ["security", "authentication", "audit"]
360
+ }
361
+ }
362
+ ```
363
+
364
+ ### Topology Selection by PR Size
365
+
366
+ ```bash
367
+ # Automatic topology selection based on PR complexity
368
+ # Small PR (< 100 lines): ring topology
369
+ # Medium PR (100-500 lines): mesh topology
370
+ # Large PR (> 500 lines): hierarchical topology
371
+ npx ruv-swarm github pr-topology --pr 123
372
+ ```
373
+
374
+ ---
375
+
376
+ ## 🎬 PR Comment Commands
377
+
378
+ Execute swarm commands directly from PR comments:
379
+
380
+ ```markdown
381
+ <!-- In PR comment -->
382
+ /swarm init mesh 6
383
+ /swarm spawn coder "Implement authentication"
384
+ /swarm spawn tester "Write unit tests"
385
+ /swarm status
386
+ /swarm review --agents security,performance
387
+ ```
388
+
389
+ <details>
390
+ <summary><strong>Webhook Handler for Comment Commands</strong></summary>
391
+
392
+ ```javascript
393
+ // webhook-handler.js
394
+ const { createServer } = require('http');
395
+ const { execSync } = require('child_process');
396
+
397
+ createServer((req, res) => {
398
+ if (req.url === '/github-webhook') {
399
+ const event = JSON.parse(body);
400
+
401
+ if (event.action === 'opened' && event.pull_request) {
402
+ execSync(`npx ruv-swarm github pr-init ${event.pull_request.number}`);
403
+ }
404
+
405
+ if (event.comment && event.comment.body.startsWith('/swarm')) {
406
+ const command = event.comment.body;
407
+ execSync(`npx ruv-swarm github handle-comment --pr ${event.issue.number} --command "${command}"`);
408
+ }
409
+
410
+ res.writeHead(200);
411
+ res.end('OK');
412
+ }
413
+ }).listen(3000);
414
+ ```
415
+
416
+ </details>
417
+
418
+ ---
419
+
420
+ ## ⚙️ Review Configuration
421
+
422
+ ### Configuration File
423
+
424
+ ```yaml
425
+ # .github/review-swarm.yml
426
+ version: 1
427
+ review:
428
+ auto-trigger: true
429
+ required-agents:
430
+ - security
431
+ - performance
432
+ - style
433
+ optional-agents:
434
+ - architecture
435
+ - accessibility
436
+ - i18n
437
+
438
+ thresholds:
439
+ security: block # Block merge on security issues
440
+ performance: warn # Warn on performance issues
441
+ style: suggest # Suggest style improvements
442
+
443
+ rules:
444
+ security:
445
+ - no-eval
446
+ - no-hardcoded-secrets
447
+ - proper-auth-checks
448
+ - validate-input
449
+ performance:
450
+ - no-n-plus-one
451
+ - efficient-queries
452
+ - proper-caching
453
+ - optimize-loops
454
+ architecture:
455
+ - max-coupling: 5
456
+ - min-cohesion: 0.7
457
+ - follow-patterns
458
+ - avoid-circular-deps
459
+ ```
460
+
461
+ ### Custom Review Triggers
462
+
463
+ ```javascript
464
+ {
465
+ "triggers": {
466
+ "high-risk-files": {
467
+ "paths": ["**/auth/**", "**/payment/**", "**/admin/**"],
468
+ "agents": ["security", "architecture"],
469
+ "depth": "comprehensive",
470
+ "require-approval": true
471
+ },
472
+ "performance-critical": {
473
+ "paths": ["**/api/**", "**/database/**", "**/cache/**"],
474
+ "agents": ["performance", "database"],
475
+ "benchmarks": true,
476
+ "regression-threshold": "5%"
477
+ },
478
+ "ui-changes": {
479
+ "paths": ["**/components/**", "**/styles/**", "**/pages/**"],
480
+ "agents": ["accessibility", "style", "i18n"],
481
+ "visual-tests": true,
482
+ "responsive-check": true
483
+ }
484
+ }
485
+ }
486
+ ```
487
+
488
+ ---
489
+
490
+ ## 🤖 Automated Workflows
491
+
492
+ ### Auto-Review on PR Creation
493
+
494
+ ```yaml
495
+ # .github/workflows/auto-review.yml
496
+ name: Automated Code Review
497
+ on:
498
+ pull_request:
499
+ types: [opened, synchronize]
500
+ issue_comment:
501
+ types: [created]
502
+
503
+ jobs:
504
+ swarm-review:
505
+ runs-on: ubuntu-latest
506
+ steps:
507
+ - uses: actions/checkout@v3
508
+ with:
509
+ fetch-depth: 0
510
+
511
+ - name: Setup GitHub CLI
512
+ run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
513
+
514
+ - name: Run Review Swarm
515
+ run: |
516
+ # Get PR context with gh CLI
517
+ PR_NUM=${{ github.event.pull_request.number }}
518
+ PR_DATA=$(gh pr view $PR_NUM --json files,title,body,labels)
519
+ PR_DIFF=$(gh pr diff $PR_NUM)
520
+
521
+ # Run swarm review
522
+ REVIEW_OUTPUT=$(npx ruv-swarm github review-all \
523
+ --pr $PR_NUM \
524
+ --pr-data "$PR_DATA" \
525
+ --diff "$PR_DIFF" \
526
+ --agents "security,performance,style,architecture")
527
+
528
+ # Post review results
529
+ echo "$REVIEW_OUTPUT" | gh pr review $PR_NUM --comment -F -
530
+
531
+ # Update PR status
532
+ if echo "$REVIEW_OUTPUT" | grep -q "approved"; then
533
+ gh pr review $PR_NUM --approve
534
+ elif echo "$REVIEW_OUTPUT" | grep -q "changes-requested"; then
535
+ gh pr review $PR_NUM --request-changes -b "See review comments above"
536
+ fi
537
+
538
+ - name: Update Labels
539
+ run: |
540
+ # Add labels based on review results
541
+ if echo "$REVIEW_OUTPUT" | grep -q "security"; then
542
+ gh pr edit $PR_NUM --add-label "security-review"
543
+ fi
544
+ if echo "$REVIEW_OUTPUT" | grep -q "performance"; then
545
+ gh pr edit $PR_NUM --add-label "performance-review"
546
+ fi
547
+ ```
548
+
549
+ ---
550
+
551
+ ## 💬 Intelligent Comment Generation
552
+
553
+ ### Generate Contextual Review Comments
554
+
555
+ ```bash
556
+ # Get PR diff with context
557
+ PR_DIFF=$(gh pr diff 123 --color never)
558
+ PR_FILES=$(gh pr view 123 --json files)
559
+
560
+ # Generate review comments
561
+ COMMENTS=$(npx ruv-swarm github review-comment \
562
+ --pr 123 \
563
+ --diff "$PR_DIFF" \
564
+ --files "$PR_FILES" \
565
+ --style "constructive" \
566
+ --include-examples \
567
+ --suggest-fixes)
568
+
569
+ # Post comments using gh CLI
570
+ echo "$COMMENTS" | jq -c '.[]' | while read -r comment; do
571
+ FILE=$(echo "$comment" | jq -r '.path')
572
+ LINE=$(echo "$comment" | jq -r '.line')
573
+ BODY=$(echo "$comment" | jq -r '.body')
574
+ COMMIT_ID=$(gh pr view 123 --json headRefOid -q .headRefOid)
575
+
576
+ # Create inline review comments
577
+ gh api \
578
+ --method POST \
579
+ /repos/:owner/:repo/pulls/123/comments \
580
+ -f path="$FILE" \
581
+ -f line="$LINE" \
582
+ -f body="$BODY" \
583
+ -f commit_id="$COMMIT_ID"
584
+ done
585
+ ```
586
+
587
+ ### Batch Comment Management
588
+
589
+ ```bash
590
+ # Manage review comments efficiently
591
+ npx ruv-swarm github review-comments \
592
+ --pr 123 \
593
+ --group-by "agent,severity" \
594
+ --summarize \
595
+ --resolve-outdated
596
+ ```
597
+
598
+ ---
599
+
600
+ ## 🚪 Quality Gates & Checks
601
+
602
+ ### Status Checks
603
+
604
+ ```yaml
605
+ # Required status checks in branch protection
606
+ protection_rules:
607
+ required_status_checks:
608
+ strict: true
609
+ contexts:
610
+ - "review-swarm/security"
611
+ - "review-swarm/performance"
612
+ - "review-swarm/architecture"
613
+ - "review-swarm/tests"
614
+ ```
615
+
616
+ ### Define Quality Gates
617
+
618
+ ```bash
619
+ # Set quality gate thresholds
620
+ npx ruv-swarm github quality-gates \
621
+ --define '{
622
+ "security": {"threshold": "no-critical"},
623
+ "performance": {"regression": "<5%"},
624
+ "coverage": {"minimum": "80%"},
625
+ "architecture": {"complexity": "<10"},
626
+ "duplication": {"maximum": "5%"}
627
+ }'
628
+ ```
629
+
630
+ ### Track Review Metrics
631
+
632
+ ```bash
633
+ # Monitor review effectiveness
634
+ npx ruv-swarm github review-metrics \
635
+ --period 30d \
636
+ --metrics "issues-found,false-positives,fix-rate,time-to-review" \
637
+ --export-dashboard \
638
+ --format json
639
+ ```
640
+
641
+ ---
642
+
643
+ ## 🎓 Advanced Features
644
+
645
+ ### Context-Aware Reviews
646
+
647
+ Analyze PRs with full project context:
648
+
649
+ ```bash
650
+ # Review with comprehensive context
651
+ npx ruv-swarm github review-context \
652
+ --pr 123 \
653
+ --load-related-prs \
654
+ --analyze-impact \
655
+ --check-breaking-changes \
656
+ --dependency-analysis
657
+ ```
658
+
659
+ ### Learning from History
660
+
661
+ Train review agents on your codebase patterns:
662
+
663
+ ```bash
664
+ # Learn from past reviews
665
+ npx ruv-swarm github review-learn \
666
+ --analyze-past-reviews \
667
+ --identify-patterns \
668
+ --improve-suggestions \
669
+ --reduce-false-positives
670
+
671
+ # Train on your codebase
672
+ npx ruv-swarm github review-train \
673
+ --learn-patterns \
674
+ --adapt-to-style \
675
+ --improve-accuracy
676
+ ```
677
+
678
+ ### Cross-PR Analysis
679
+
680
+ Coordinate reviews across related pull requests:
681
+
682
+ ```bash
683
+ # Analyze related PRs together
684
+ npx ruv-swarm github review-batch \
685
+ --prs "123,124,125" \
686
+ --check-consistency \
687
+ --verify-integration \
688
+ --combined-impact
689
+ ```
690
+
691
+ ### Multi-PR Swarm Coordination
692
+
693
+ ```bash
694
+ # Coordinate swarms across related PRs
695
+ npx ruv-swarm github multi-pr \
696
+ --prs "123,124,125" \
697
+ --strategy "parallel" \
698
+ --share-memory
699
+ ```
700
+
701
+ ---
702
+
703
+ ## 🛠️ Custom Review Agents
704
+
705
+ ### Create Custom Agent
706
+
707
+ ```javascript
708
+ // custom-review-agent.js
709
+ class CustomReviewAgent {
710
+ constructor(config) {
711
+ this.config = config;
712
+ this.rules = config.rules || [];
713
+ }
714
+
715
+ async review(pr) {
716
+ const issues = [];
717
+
718
+ // Custom logic: Check for TODO comments in production code
719
+ if (await this.checkTodoComments(pr)) {
720
+ issues.push({
721
+ severity: 'warning',
722
+ file: pr.file,
723
+ line: pr.line,
724
+ message: 'TODO comment found in production code',
725
+ suggestion: 'Resolve TODO or create issue to track it'
726
+ });
727
+ }
728
+
729
+ // Custom logic: Verify API versioning
730
+ if (await this.checkApiVersioning(pr)) {
731
+ issues.push({
732
+ severity: 'error',
733
+ file: pr.file,
734
+ line: pr.line,
735
+ message: 'API endpoint missing versioning',
736
+ suggestion: 'Add /v1/, /v2/ prefix to API routes'
737
+ });
738
+ }
739
+
740
+ return issues;
741
+ }
742
+
743
+ async checkTodoComments(pr) {
744
+ // Implementation
745
+ const todoRegex = /\/\/\s*TODO|\/\*\s*TODO/gi;
746
+ return todoRegex.test(pr.diff);
747
+ }
748
+
749
+ async checkApiVersioning(pr) {
750
+ // Implementation
751
+ const apiRegex = /app\.(get|post|put|delete)\(['"]\/api\/(?!v\d+)/;
752
+ return apiRegex.test(pr.diff);
753
+ }
754
+ }
755
+
756
+ module.exports = CustomReviewAgent;
757
+ ```
758
+
759
+ ### Register Custom Agent
760
+
761
+ ```bash
762
+ # Register custom review agent
763
+ npx ruv-swarm github register-agent \
764
+ --name "custom-reviewer" \
765
+ --file "./custom-review-agent.js" \
766
+ --category "standards"
767
+ ```
768
+
769
+ ---
770
+
771
+ ## 🔧 CI/CD Integration
772
+
773
+ ### Integration with Build Pipeline
774
+
775
+ ```yaml
776
+ # .github/workflows/build-and-review.yml
777
+ name: Build and Review
778
+ on: [pull_request]
779
+
780
+ jobs:
781
+ build-and-test:
782
+ runs-on: ubuntu-latest
783
+ steps:
784
+ - uses: actions/checkout@v3
785
+ - run: npm install
786
+ - run: npm test
787
+ - run: npm run build
788
+
789
+ swarm-review:
790
+ needs: build-and-test
791
+ runs-on: ubuntu-latest
792
+ steps:
793
+ - name: Run Swarm Review
794
+ run: |
795
+ npx ruv-swarm github review-all \
796
+ --pr ${{ github.event.pull_request.number }} \
797
+ --include-build-results
798
+ ```
799
+
800
+ ### Automated PR Fixes
801
+
802
+ ```bash
803
+ # Auto-fix common issues
804
+ npx ruv-swarm github pr-fix 123 \
805
+ --issues "lint,test-failures,formatting" \
806
+ --commit-fixes \
807
+ --push-changes
808
+ ```
809
+
810
+ ### Progress Updates to PR
811
+
812
+ ```bash
813
+ # Post swarm progress to PR using gh CLI
814
+ PROGRESS=$(npx ruv-swarm github pr-progress 123 --format markdown)
815
+
816
+ gh pr comment 123 --body "$PROGRESS"
817
+
818
+ # Update PR labels based on progress
819
+ if [[ $(echo "$PROGRESS" | grep -o '[0-9]\+%' | sed 's/%//') -gt 90 ]]; then
820
+ gh pr edit 123 --add-label "ready-for-review"
821
+ fi
822
+ ```
823
+
824
+ ---
825
+
826
+ ## 📋 Complete Workflow Examples
827
+
828
+ ### Example 1: Security-Critical PR
829
+
830
+ ```bash
831
+ # Review authentication system changes
832
+ npx ruv-swarm github review-init \
833
+ --pr 456 \
834
+ --agents "security,authentication,audit" \
835
+ --depth "maximum" \
836
+ --require-security-approval \
837
+ --penetration-test
838
+ ```
839
+
840
+ ### Example 2: Performance-Sensitive PR
841
+
842
+ ```bash
843
+ # Review database optimization
844
+ npx ruv-swarm github review-init \
845
+ --pr 789 \
846
+ --agents "performance,database,caching" \
847
+ --benchmark \
848
+ --profile \
849
+ --load-test
850
+ ```
851
+
852
+ ### Example 3: UI Component PR
853
+
854
+ ```bash
855
+ # Review new component library
856
+ npx ruv-swarm github review-init \
857
+ --pr 321 \
858
+ --agents "accessibility,style,i18n,docs" \
859
+ --visual-regression \
860
+ --component-tests \
861
+ --responsive-check
862
+ ```
863
+
864
+ ### Example 4: Feature Development PR
865
+
866
+ ```bash
867
+ # Review new feature implementation
868
+ gh pr view 456 --json body,labels,files | \
869
+ npx ruv-swarm github pr-init 456 \
870
+ --topology hierarchical \
871
+ --agents "architect,coder,tester,security" \
872
+ --auto-assign-tasks
873
+ ```
874
+
875
+ ### Example 5: Bug Fix PR
876
+
877
+ ```bash
878
+ # Review bug fix with debugging focus
879
+ npx ruv-swarm github pr-init 789 \
880
+ --topology mesh \
881
+ --agents "debugger,analyst,tester" \
882
+ --priority high \
883
+ --regression-test
884
+ ```
885
+
886
+ ---
887
+
888
+ ## 📊 Monitoring & Analytics
889
+
890
+ ### Review Dashboard
891
+
892
+ ```bash
893
+ # Launch real-time review dashboard
894
+ npx ruv-swarm github review-dashboard \
895
+ --real-time \
896
+ --show "agent-activity,issue-trends,fix-rates,coverage"
897
+ ```
898
+
899
+ ### Generate Review Reports
900
+
901
+ ```bash
902
+ # Create comprehensive review report
903
+ npx ruv-swarm github review-report \
904
+ --format "markdown" \
905
+ --include "summary,details,trends,recommendations" \
906
+ --email-stakeholders \
907
+ --export-pdf
908
+ ```
909
+
910
+ ### PR Swarm Analytics
911
+
912
+ ```bash
913
+ # Generate PR-specific analytics
914
+ npx ruv-swarm github pr-report 123 \
915
+ --metrics "completion-time,agent-efficiency,token-usage,issue-density" \
916
+ --format markdown \
917
+ --compare-baseline
918
+ ```
919
+
920
+ ### Export to GitHub Insights
921
+
922
+ ```bash
923
+ # Export metrics to GitHub Insights
924
+ npx ruv-swarm github export-metrics \
925
+ --pr 123 \
926
+ --to-insights \
927
+ --dashboard-url
928
+ ```
929
+
930
+ ---
931
+
932
+ ## 🔐 Security Considerations
933
+
934
+ ### Best Practices
935
+
936
+ 1. **Token Permissions**: Ensure GitHub tokens have minimal required scopes
937
+ 2. **Command Validation**: Validate all PR comments before execution
938
+ 3. **Rate Limiting**: Implement rate limits for PR operations
939
+ 4. **Audit Trail**: Log all swarm operations for compliance
940
+ 5. **Secret Management**: Never expose API keys in PR comments or logs
941
+
942
+ ### Security Checklist
943
+
944
+ - [ ] GitHub token scoped to repository only
945
+ - [ ] Webhook signatures verified
946
+ - [ ] Command injection protection enabled
947
+ - [ ] Rate limiting configured
948
+ - [ ] Audit logging enabled
949
+ - [ ] Secrets scanning active
950
+ - [ ] Branch protection rules enforced
951
+
952
+ ---
953
+
954
+ ## 📚 Best Practices
955
+
956
+ ### 1. Review Configuration
957
+ - ✅ Define clear review criteria upfront
958
+ - ✅ Set appropriate severity thresholds
959
+ - ✅ Configure agent specializations for your stack
960
+ - ✅ Establish override procedures for emergencies
961
+
962
+ ### 2. Comment Quality
963
+ - ✅ Provide actionable, specific feedback
964
+ - ✅ Include code examples with suggestions
965
+ - ✅ Reference documentation and best practices
966
+ - ✅ Maintain respectful, constructive tone
967
+
968
+ ### 3. Performance Optimization
969
+ - ✅ Cache analysis results to avoid redundant work
970
+ - ✅ Use incremental reviews for large PRs
971
+ - ✅ Enable parallel agent execution
972
+ - ✅ Batch comment operations efficiently
973
+
974
+ ### 4. PR Templates
975
+
976
+ ```markdown
977
+ <!-- .github/pull_request_template.md -->
978
+ ## Swarm Configuration
979
+ - Topology: [mesh/hierarchical/ring/star]
980
+ - Max Agents: [number]
981
+ - Auto-spawn: [yes/no]
982
+ - Priority: [high/medium/low]
983
+
984
+ ## Tasks for Swarm
985
+ - [ ] Task 1 description
986
+ - [ ] Task 2 description
987
+ - [ ] Task 3 description
988
+
989
+ ## Review Focus Areas
990
+ - [ ] Security review
991
+ - [ ] Performance analysis
992
+ - [ ] Architecture validation
993
+ - [ ] Accessibility check
994
+ ```
995
+
996
+ ### 5. Auto-Merge When Ready
997
+
998
+ ```bash
999
+ # Auto-merge when swarm completes and passes checks
1000
+ SWARM_STATUS=$(npx ruv-swarm github pr-status 123)
1001
+
1002
+ if [[ "$SWARM_STATUS" == "complete" ]]; then
1003
+ # Check review requirements
1004
+ REVIEWS=$(gh pr view 123 --json reviews --jq '.reviews | length')
1005
+
1006
+ if [[ $REVIEWS -ge 2 ]]; then
1007
+ # Enable auto-merge
1008
+ gh pr merge 123 --auto --squash
1009
+ fi
1010
+ fi
1011
+ ```
1012
+
1013
+ ---
1014
+
1015
+ ## 🔗 Integration with Claude Code
1016
+
1017
+ ### Workflow Pattern
1018
+
1019
+ 1. **Claude Code** reads PR diff and context
1020
+ 2. **Swarm** coordinates review approach based on PR type
1021
+ 3. **Agents** work in parallel on different review aspects
1022
+ 4. **Progress** updates posted to PR automatically
1023
+ 5. **Final review** performed before marking ready
1024
+
1025
+ ### Example: Complete PR Management
1026
+
1027
+ ```javascript
1028
+ [Single Message - Parallel Execution]:
1029
+ // Initialize coordination
1030
+ mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 5 }
1031
+ mcp__claude-flow__agent_spawn { type: "reviewer", name: "Senior Reviewer" }
1032
+ mcp__claude-flow__agent_spawn { type: "tester", name: "QA Engineer" }
1033
+ mcp__claude-flow__agent_spawn { type: "coordinator", name: "Merge Coordinator" }
1034
+
1035
+ // Create and manage PR using gh CLI
1036
+ Bash("gh pr create --title 'Feature: Add authentication' --base main")
1037
+ Bash("gh pr view 54 --json files,diff")
1038
+ Bash("gh pr review 54 --approve --body 'LGTM after automated review'")
1039
+
1040
+ // Execute tests and validation
1041
+ Bash("npm test")
1042
+ Bash("npm run lint")
1043
+ Bash("npm run build")
1044
+
1045
+ // Track progress
1046
+ TodoWrite { todos: [
1047
+ { content: "Complete code review", status: "completed", activeForm: "Completing code review" },
1048
+ { content: "Run test suite", status: "completed", activeForm: "Running test suite" },
1049
+ { content: "Validate security", status: "completed", activeForm: "Validating security" },
1050
+ { content: "Merge when ready", status: "pending", activeForm: "Merging when ready" }
1051
+ ]}
1052
+ ```
1053
+
1054
+ ---
1055
+
1056
+ ## 🆘 Troubleshooting
1057
+
1058
+ ### Common Issues
1059
+
1060
+ <details>
1061
+ <summary><strong>Issue: Review agents not spawning</strong></summary>
1062
+
1063
+ **Solution:**
1064
+ ```bash
1065
+ # Check swarm status
1066
+ npx ruv-swarm swarm-status
1067
+
1068
+ # Verify GitHub CLI authentication
1069
+ gh auth status
1070
+
1071
+ # Re-initialize swarm
1072
+ npx ruv-swarm github review-init --pr 123 --force
1073
+ ```
1074
+
1075
+ </details>
1076
+
1077
+ <details>
1078
+ <summary><strong>Issue: Comments not posting to PR</strong></summary>
1079
+
1080
+ **Solution:**
1081
+ ```bash
1082
+ # Verify GitHub token permissions
1083
+ gh auth status
1084
+
1085
+ # Check API rate limits
1086
+ gh api rate_limit
1087
+
1088
+ # Use batch comment posting
1089
+ npx ruv-swarm github review-comments --pr 123 --batch
1090
+ ```
1091
+
1092
+ </details>
1093
+
1094
+ <details>
1095
+ <summary><strong>Issue: Review taking too long</strong></summary>
1096
+
1097
+ **Solution:**
1098
+ ```bash
1099
+ # Use incremental review for large PRs
1100
+ npx ruv-swarm github review-init --pr 123 --incremental
1101
+
1102
+ # Reduce agent count
1103
+ npx ruv-swarm github review-init --pr 123 --agents "security,style" --max-agents 3
1104
+
1105
+ # Enable parallel processing
1106
+ npx ruv-swarm github review-init --pr 123 --parallel --cache-results
1107
+ ```
1108
+
1109
+ </details>
1110
+
1111
+ ---
1112
+
1113
+ ## 📖 Additional Resources
1114
+
1115
+ ### Related Skills
1116
+ - `github-pr-manager` - Comprehensive PR lifecycle management
1117
+ - `github-workflow-automation` - Automate GitHub workflows
1118
+ - `swarm-coordination` - Advanced swarm orchestration
1119
+
1120
+ ### Documentation
1121
+ - [GitHub CLI Documentation](https://cli.github.com/manual/)
1122
+ - [RUV Swarm Guide](https://github.com/ruvnet/ruv-swarm)
1123
+ - [Claude Flow Integration](https://github.com/ruvnet/claude-flow)
1124
+
1125
+ ### Support
1126
+ - GitHub Issues: Report bugs and request features
1127
+ - Community: Join discussions and share experiences
1128
+ - Examples: Browse example configurations and workflows
1129
+
1130
+ ---
1131
+
1132
+ ## 📄 License
1133
+
1134
+ This skill is part of the Claude Code Flow project and is licensed under the MIT License.
1135
+
1136
+ ---
1137
+
1138
+ **Last Updated:** 2025-10-19
1139
+ **Version:** 1.0.0
1140
+ **Maintainer:** Claude Code Flow Team