incitaciones 0.1.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 (318) hide show
  1. package/LICENSE +395 -0
  2. package/README.md +410 -0
  3. package/content/distilled/abstraction-miner.md +32 -0
  4. package/content/distilled/adversarial-stakeholder-evaluation.md +121 -0
  5. package/content/distilled/anti-slop-prose.md +46 -0
  6. package/content/distilled/bias-audit.md +39 -0
  7. package/content/distilled/code-review/SKILL.md +53 -0
  8. package/content/distilled/code-review/references/criteria.md +50 -0
  9. package/content/distilled/code-review/references/templates.md +75 -0
  10. package/content/distilled/code-review/references/variants.md +32 -0
  11. package/content/distilled/commit/SKILL.md +41 -0
  12. package/content/distilled/commit/references/criteria.md +21 -0
  13. package/content/distilled/commit/references/templates.md +46 -0
  14. package/content/distilled/composability-diagnostician.md +67 -0
  15. package/content/distilled/context-guardian.md +20 -0
  16. package/content/distilled/create-handoff/SKILL.md +16 -0
  17. package/content/distilled/create-handoff/references/handoff-template.md +65 -0
  18. package/content/distilled/create-handoff/references/naming.md +7 -0
  19. package/content/distilled/create-issues/SKILL.md +72 -0
  20. package/content/distilled/create-issues/references/criteria.md +44 -0
  21. package/content/distilled/create-issues/references/templates.md +75 -0
  22. package/content/distilled/create-plan/SKILL.md +19 -0
  23. package/content/distilled/create-plan/references/plan-template.md +87 -0
  24. package/content/distilled/create-plan/references/scenarios.md +19 -0
  25. package/content/distilled/debug/SKILL.md +42 -0
  26. package/content/distilled/debug/references/criteria.md +27 -0
  27. package/content/distilled/debug/references/templates.md +39 -0
  28. package/content/distilled/describe-pr/SKILL.md +17 -0
  29. package/content/distilled/describe-pr/references/pr-template.md +62 -0
  30. package/content/distilled/design-practice.md +213 -0
  31. package/content/distilled/design-review/SKILL.md +29 -0
  32. package/content/distilled/design-review/references/combined-review.md +27 -0
  33. package/content/distilled/design-review/references/decision-matrix.md +122 -0
  34. package/content/distilled/design-review/references/problem-statement.md +141 -0
  35. package/content/distilled/design-review/references/report-template.md +36 -0
  36. package/content/distilled/design-review/references/scope-document.md +51 -0
  37. package/content/distilled/distill-prompt/SKILL.md +41 -0
  38. package/content/distilled/distill-prompt/references/criteria.md +26 -0
  39. package/content/distilled/distill-prompt/references/templates.md +30 -0
  40. package/content/distilled/doc-link-verifier/SKILL.md +212 -0
  41. package/content/distilled/doc-link-verifier/scripts/check_links.py +453 -0
  42. package/content/distilled/doc-link-verifier/scripts/extract_links.py +521 -0
  43. package/content/distilled/edge-case-discovery.md +123 -0
  44. package/content/distilled/error-handling-diagnostician.md +90 -0
  45. package/content/distilled/extract-prompt.md +220 -0
  46. package/content/distilled/formal-verification-evaluator.md +158 -0
  47. package/content/distilled/grill-me.md +24 -0
  48. package/content/distilled/guided-review.md +68 -0
  49. package/content/distilled/implement-documentation.md +68 -0
  50. package/content/distilled/implement-plan/SKILL.md +23 -0
  51. package/content/distilled/implement-plan/references/common-situations.md +36 -0
  52. package/content/distilled/implement-plan/references/verification-template.md +18 -0
  53. package/content/distilled/invalid-states-diagnostician.md +63 -0
  54. package/content/distilled/issue-review/SKILL.md +37 -0
  55. package/content/distilled/issue-review/references/convergence.md +19 -0
  56. package/content/distilled/issue-review/references/final-report.md +60 -0
  57. package/content/distilled/issue-review/references/pass-1-clarity.md +28 -0
  58. package/content/distilled/issue-review/references/pass-2-scope.md +22 -0
  59. package/content/distilled/issue-review/references/pass-3-dependencies.md +23 -0
  60. package/content/distilled/issue-review/references/pass-4-alignment.md +17 -0
  61. package/content/distilled/issue-review/references/pass-5-executability.md +17 -0
  62. package/content/distilled/issue-review/references/setup.md +25 -0
  63. package/content/distilled/iterate-plan/SKILL.md +24 -0
  64. package/content/distilled/iterate-plan/references/change-template.md +15 -0
  65. package/content/distilled/iterate-plan/references/common-scenarios.md +14 -0
  66. package/content/distilled/julia-performance-diagnostician.md +71 -0
  67. package/content/distilled/modularity-diagnostician.md +68 -0
  68. package/content/distilled/multi-agent-review.md +196 -0
  69. package/content/distilled/mutability-diagnostician.md +63 -0
  70. package/content/distilled/narrative-article.md +60 -0
  71. package/content/distilled/optionality-review.md +190 -0
  72. package/content/distilled/parallel-review/SKILL.md +49 -0
  73. package/content/distilled/parallel-review/references/criteria.md +34 -0
  74. package/content/distilled/parallel-review/references/templates.md +59 -0
  75. package/content/distilled/plan-review/SKILL.md +42 -0
  76. package/content/distilled/plan-review/references/criteria.md +51 -0
  77. package/content/distilled/plan-review/references/templates.md +67 -0
  78. package/content/distilled/pre-mortem.md +10 -0
  79. package/content/distilled/project-status-report.md +124 -0
  80. package/content/distilled/pwa-accessibility-review.md +81 -0
  81. package/content/distilled/rca-diagnostician/SKILL.md +30 -0
  82. package/content/distilled/rca-diagnostician/references/action-hierarchy.md +77 -0
  83. package/content/distilled/rca-diagnostician/references/bias-countermeasures.md +64 -0
  84. package/content/distilled/rca-diagnostician/references/evidence-timeline.md +49 -0
  85. package/content/distilled/rca-diagnostician/references/hypothesis-methods.md +53 -0
  86. package/content/distilled/rca-diagnostician/references/problem-definition.md +34 -0
  87. package/content/distilled/rca-diagnostician/references/report-template.md +75 -0
  88. package/content/distilled/rca-diagnostician/references/rigor-checklist.md +66 -0
  89. package/content/distilled/red-team-review.md +133 -0
  90. package/content/distilled/research-codebase/SKILL.md +22 -0
  91. package/content/distilled/research-codebase/references/report-template.md +75 -0
  92. package/content/distilled/research-codebase/references/search-patterns.md +27 -0
  93. package/content/distilled/research-documentation.md +79 -0
  94. package/content/distilled/research-review/SKILL.md +42 -0
  95. package/content/distilled/research-review/references/criteria.md +51 -0
  96. package/content/distilled/research-review/references/templates.md +73 -0
  97. package/content/distilled/resonant-refactor.md +45 -0
  98. package/content/distilled/resume-handoff/SKILL.md +19 -0
  99. package/content/distilled/resume-handoff/references/analysis-template.md +40 -0
  100. package/content/distilled/resume-handoff/references/locating.md +12 -0
  101. package/content/distilled/review-documentation.md +44 -0
  102. package/content/distilled/rigidity-diagnostician.md +70 -0
  103. package/content/distilled/rule-of-5-universal/SKILL.md +26 -0
  104. package/content/distilled/rule-of-5-universal/references/criteria.md +34 -0
  105. package/content/distilled/rule-of-5-universal/references/examples.md +69 -0
  106. package/content/distilled/rule-of-5-universal/references/templates.md +136 -0
  107. package/content/distilled/specification-evaluation-diagnostician.md +106 -0
  108. package/content/distilled/specification-review/SKILL.md +43 -0
  109. package/content/distilled/specification-review/references/criteria.md +51 -0
  110. package/content/distilled/specification-review/references/templates.md +67 -0
  111. package/content/distilled/systematic-housekeeping.md +27 -0
  112. package/content/distilled/tdd/SKILL.md +38 -0
  113. package/content/distilled/tdd/references/criteria.md +26 -0
  114. package/content/distilled/tdd/references/templates.md +53 -0
  115. package/content/distilled/test-abstraction-miner.md +43 -0
  116. package/content/distilled/test-friction.md +51 -0
  117. package/content/distilled/testability-implementability-evaluator.md +144 -0
  118. package/content/distilled/ui-align.md +32 -0
  119. package/content/distilled/ux-dx-evaluation-diagnostician/SKILL.md +21 -0
  120. package/content/distilled/ux-dx-evaluation-diagnostician/references/layer-1-product.md +20 -0
  121. package/content/distilled/ux-dx-evaluation-diagnostician/references/layer-2-engineering.md +20 -0
  122. package/content/distilled/ux-dx-evaluation-diagnostician/references/layer-3-interface.md +23 -0
  123. package/content/distilled/ux-dx-evaluation-diagnostician/references/layer-4-ecosystem.md +20 -0
  124. package/content/distilled/ux-dx-evaluation-diagnostician/references/layer-5-documentation.md +19 -0
  125. package/content/distilled/ux-dx-evaluation-diagnostician/references/report-template.md +36 -0
  126. package/content/distilled/verification-diagnostician.md +90 -0
  127. package/content/distilled/verify-prompt/SKILL.md +32 -0
  128. package/content/distilled/verify-prompt/references/criteria.md +21 -0
  129. package/content/manifest.json +3220 -0
  130. package/package.json +50 -0
  131. package/pi-package/README.md +9 -0
  132. package/pi-package/prompts/abstraction-miner.md +10 -0
  133. package/pi-package/prompts/adversarial-stakeholder-evaluation.md +10 -0
  134. package/pi-package/prompts/anti-slop-prose.md +10 -0
  135. package/pi-package/prompts/bias-audit.md +10 -0
  136. package/pi-package/prompts/code-review.md +10 -0
  137. package/pi-package/prompts/commit.md +10 -0
  138. package/pi-package/prompts/composability-diagnostician.md +10 -0
  139. package/pi-package/prompts/context-guardian.md +10 -0
  140. package/pi-package/prompts/create-handoff.md +10 -0
  141. package/pi-package/prompts/create-issues.md +10 -0
  142. package/pi-package/prompts/create-plan.md +10 -0
  143. package/pi-package/prompts/debug.md +10 -0
  144. package/pi-package/prompts/describe-pr.md +10 -0
  145. package/pi-package/prompts/design-practice.md +10 -0
  146. package/pi-package/prompts/design-review.md +10 -0
  147. package/pi-package/prompts/distill-prompt.md +10 -0
  148. package/pi-package/prompts/doc-link-verifier.md +10 -0
  149. package/pi-package/prompts/edge-case-discovery.md +10 -0
  150. package/pi-package/prompts/error-handling-diagnostician.md +10 -0
  151. package/pi-package/prompts/extract-prompt.md +10 -0
  152. package/pi-package/prompts/formal-verification-evaluator.md +10 -0
  153. package/pi-package/prompts/grill-me.md +10 -0
  154. package/pi-package/prompts/guided-review.md +10 -0
  155. package/pi-package/prompts/implement-documentation.md +10 -0
  156. package/pi-package/prompts/implement-plan.md +10 -0
  157. package/pi-package/prompts/invalid-states-diagnostician.md +10 -0
  158. package/pi-package/prompts/issue-review.md +10 -0
  159. package/pi-package/prompts/iterate-plan.md +10 -0
  160. package/pi-package/prompts/julia-performance-diagnostician.md +10 -0
  161. package/pi-package/prompts/modularity-diagnostician.md +10 -0
  162. package/pi-package/prompts/multi-agent-review.md +10 -0
  163. package/pi-package/prompts/mutability-diagnostician.md +10 -0
  164. package/pi-package/prompts/narrative-article.md +10 -0
  165. package/pi-package/prompts/optionality-review.md +10 -0
  166. package/pi-package/prompts/parallel-review.md +10 -0
  167. package/pi-package/prompts/plan-review.md +10 -0
  168. package/pi-package/prompts/pre-mortem.md +10 -0
  169. package/pi-package/prompts/project-status-report.md +10 -0
  170. package/pi-package/prompts/pwa-accessibility-review.md +10 -0
  171. package/pi-package/prompts/rca-diagnostician.md +10 -0
  172. package/pi-package/prompts/red-team-review.md +10 -0
  173. package/pi-package/prompts/research-codebase.md +10 -0
  174. package/pi-package/prompts/research-documentation.md +10 -0
  175. package/pi-package/prompts/research-review.md +10 -0
  176. package/pi-package/prompts/resonant-refactor.md +10 -0
  177. package/pi-package/prompts/resume-handoff.md +10 -0
  178. package/pi-package/prompts/review-documentation.md +10 -0
  179. package/pi-package/prompts/rigidity-diagnostician.md +10 -0
  180. package/pi-package/prompts/rule-of-5-universal.md +10 -0
  181. package/pi-package/prompts/specification-evaluation-diagnostician.md +10 -0
  182. package/pi-package/prompts/specification-review.md +10 -0
  183. package/pi-package/prompts/systematic-housekeeping.md +10 -0
  184. package/pi-package/prompts/tdd.md +10 -0
  185. package/pi-package/prompts/test-abstraction-miner.md +10 -0
  186. package/pi-package/prompts/test-friction.md +10 -0
  187. package/pi-package/prompts/testability-implementability-evaluator.md +10 -0
  188. package/pi-package/prompts/ui-align.md +10 -0
  189. package/pi-package/prompts/ux-dx-evaluation-diagnostician.md +10 -0
  190. package/pi-package/prompts/verification-diagnostician.md +10 -0
  191. package/pi-package/prompts/verify-prompt.md +10 -0
  192. package/pi-package/skills/abstraction-miner/SKILL.md +38 -0
  193. package/pi-package/skills/adversarial-stakeholder-evaluation/SKILL.md +127 -0
  194. package/pi-package/skills/anti-slop-prose/SKILL.md +52 -0
  195. package/pi-package/skills/bias-audit/SKILL.md +45 -0
  196. package/pi-package/skills/code-review/SKILL.md +59 -0
  197. package/pi-package/skills/code-review/references/criteria.md +50 -0
  198. package/pi-package/skills/code-review/references/templates.md +75 -0
  199. package/pi-package/skills/code-review/references/variants.md +32 -0
  200. package/pi-package/skills/commit/SKILL.md +47 -0
  201. package/pi-package/skills/commit/references/criteria.md +21 -0
  202. package/pi-package/skills/commit/references/templates.md +46 -0
  203. package/pi-package/skills/composability-diagnostician/SKILL.md +73 -0
  204. package/pi-package/skills/context-guardian/SKILL.md +26 -0
  205. package/pi-package/skills/create-handoff/SKILL.md +22 -0
  206. package/pi-package/skills/create-handoff/references/handoff-template.md +65 -0
  207. package/pi-package/skills/create-handoff/references/naming.md +7 -0
  208. package/pi-package/skills/create-issues/SKILL.md +78 -0
  209. package/pi-package/skills/create-issues/references/criteria.md +44 -0
  210. package/pi-package/skills/create-issues/references/templates.md +75 -0
  211. package/pi-package/skills/create-plan/SKILL.md +25 -0
  212. package/pi-package/skills/create-plan/references/plan-template.md +87 -0
  213. package/pi-package/skills/create-plan/references/scenarios.md +19 -0
  214. package/pi-package/skills/debug/SKILL.md +48 -0
  215. package/pi-package/skills/debug/references/criteria.md +27 -0
  216. package/pi-package/skills/debug/references/templates.md +39 -0
  217. package/pi-package/skills/describe-pr/SKILL.md +23 -0
  218. package/pi-package/skills/describe-pr/references/pr-template.md +62 -0
  219. package/pi-package/skills/design-practice/SKILL.md +219 -0
  220. package/pi-package/skills/design-review/SKILL.md +35 -0
  221. package/pi-package/skills/design-review/references/combined-review.md +27 -0
  222. package/pi-package/skills/design-review/references/decision-matrix.md +122 -0
  223. package/pi-package/skills/design-review/references/problem-statement.md +141 -0
  224. package/pi-package/skills/design-review/references/report-template.md +36 -0
  225. package/pi-package/skills/design-review/references/scope-document.md +51 -0
  226. package/pi-package/skills/distill-prompt/SKILL.md +47 -0
  227. package/pi-package/skills/distill-prompt/references/criteria.md +26 -0
  228. package/pi-package/skills/distill-prompt/references/templates.md +30 -0
  229. package/pi-package/skills/doc-link-verifier/SKILL.md +218 -0
  230. package/pi-package/skills/doc-link-verifier/scripts/check_links.py +453 -0
  231. package/pi-package/skills/doc-link-verifier/scripts/extract_links.py +521 -0
  232. package/pi-package/skills/edge-case-discovery/SKILL.md +129 -0
  233. package/pi-package/skills/error-handling-diagnostician/SKILL.md +96 -0
  234. package/pi-package/skills/extract-prompt/SKILL.md +226 -0
  235. package/pi-package/skills/formal-verification-evaluator/SKILL.md +164 -0
  236. package/pi-package/skills/grill-me/SKILL.md +30 -0
  237. package/pi-package/skills/guided-review/SKILL.md +74 -0
  238. package/pi-package/skills/implement-documentation/SKILL.md +74 -0
  239. package/pi-package/skills/implement-plan/SKILL.md +29 -0
  240. package/pi-package/skills/implement-plan/references/common-situations.md +36 -0
  241. package/pi-package/skills/implement-plan/references/verification-template.md +18 -0
  242. package/pi-package/skills/invalid-states-diagnostician/SKILL.md +69 -0
  243. package/pi-package/skills/issue-review/SKILL.md +43 -0
  244. package/pi-package/skills/issue-review/references/convergence.md +19 -0
  245. package/pi-package/skills/issue-review/references/final-report.md +60 -0
  246. package/pi-package/skills/issue-review/references/pass-1-clarity.md +28 -0
  247. package/pi-package/skills/issue-review/references/pass-2-scope.md +22 -0
  248. package/pi-package/skills/issue-review/references/pass-3-dependencies.md +23 -0
  249. package/pi-package/skills/issue-review/references/pass-4-alignment.md +17 -0
  250. package/pi-package/skills/issue-review/references/pass-5-executability.md +17 -0
  251. package/pi-package/skills/issue-review/references/setup.md +25 -0
  252. package/pi-package/skills/iterate-plan/SKILL.md +30 -0
  253. package/pi-package/skills/iterate-plan/references/change-template.md +15 -0
  254. package/pi-package/skills/iterate-plan/references/common-scenarios.md +14 -0
  255. package/pi-package/skills/julia-performance-diagnostician/SKILL.md +77 -0
  256. package/pi-package/skills/modularity-diagnostician/SKILL.md +74 -0
  257. package/pi-package/skills/multi-agent-review/SKILL.md +202 -0
  258. package/pi-package/skills/mutability-diagnostician/SKILL.md +69 -0
  259. package/pi-package/skills/narrative-article/SKILL.md +66 -0
  260. package/pi-package/skills/optionality-review/SKILL.md +196 -0
  261. package/pi-package/skills/parallel-review/SKILL.md +55 -0
  262. package/pi-package/skills/parallel-review/references/criteria.md +34 -0
  263. package/pi-package/skills/parallel-review/references/templates.md +59 -0
  264. package/pi-package/skills/plan-review/SKILL.md +48 -0
  265. package/pi-package/skills/plan-review/references/criteria.md +51 -0
  266. package/pi-package/skills/plan-review/references/templates.md +67 -0
  267. package/pi-package/skills/pre-mortem/SKILL.md +16 -0
  268. package/pi-package/skills/project-status-report/SKILL.md +130 -0
  269. package/pi-package/skills/pwa-accessibility-review/SKILL.md +87 -0
  270. package/pi-package/skills/rca-diagnostician/SKILL.md +36 -0
  271. package/pi-package/skills/rca-diagnostician/references/action-hierarchy.md +77 -0
  272. package/pi-package/skills/rca-diagnostician/references/bias-countermeasures.md +64 -0
  273. package/pi-package/skills/rca-diagnostician/references/evidence-timeline.md +49 -0
  274. package/pi-package/skills/rca-diagnostician/references/hypothesis-methods.md +53 -0
  275. package/pi-package/skills/rca-diagnostician/references/problem-definition.md +34 -0
  276. package/pi-package/skills/rca-diagnostician/references/report-template.md +75 -0
  277. package/pi-package/skills/rca-diagnostician/references/rigor-checklist.md +66 -0
  278. package/pi-package/skills/red-team-review/SKILL.md +139 -0
  279. package/pi-package/skills/research-codebase/SKILL.md +28 -0
  280. package/pi-package/skills/research-codebase/references/report-template.md +75 -0
  281. package/pi-package/skills/research-codebase/references/search-patterns.md +27 -0
  282. package/pi-package/skills/research-documentation/SKILL.md +85 -0
  283. package/pi-package/skills/research-review/SKILL.md +48 -0
  284. package/pi-package/skills/research-review/references/criteria.md +51 -0
  285. package/pi-package/skills/research-review/references/templates.md +73 -0
  286. package/pi-package/skills/resonant-refactor/SKILL.md +51 -0
  287. package/pi-package/skills/resume-handoff/SKILL.md +25 -0
  288. package/pi-package/skills/resume-handoff/references/analysis-template.md +40 -0
  289. package/pi-package/skills/resume-handoff/references/locating.md +12 -0
  290. package/pi-package/skills/review-documentation/SKILL.md +50 -0
  291. package/pi-package/skills/rigidity-diagnostician/SKILL.md +76 -0
  292. package/pi-package/skills/rule-of-5-universal/SKILL.md +32 -0
  293. package/pi-package/skills/rule-of-5-universal/references/criteria.md +34 -0
  294. package/pi-package/skills/rule-of-5-universal/references/examples.md +69 -0
  295. package/pi-package/skills/rule-of-5-universal/references/templates.md +136 -0
  296. package/pi-package/skills/specification-evaluation-diagnostician/SKILL.md +112 -0
  297. package/pi-package/skills/specification-review/SKILL.md +49 -0
  298. package/pi-package/skills/specification-review/references/criteria.md +51 -0
  299. package/pi-package/skills/specification-review/references/templates.md +67 -0
  300. package/pi-package/skills/systematic-housekeeping/SKILL.md +33 -0
  301. package/pi-package/skills/tdd/SKILL.md +44 -0
  302. package/pi-package/skills/tdd/references/criteria.md +26 -0
  303. package/pi-package/skills/tdd/references/templates.md +53 -0
  304. package/pi-package/skills/test-abstraction-miner/SKILL.md +49 -0
  305. package/pi-package/skills/test-friction/SKILL.md +57 -0
  306. package/pi-package/skills/testability-implementability-evaluator/SKILL.md +150 -0
  307. package/pi-package/skills/ui-align/SKILL.md +38 -0
  308. package/pi-package/skills/ux-dx-evaluation-diagnostician/SKILL.md +27 -0
  309. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/layer-1-product.md +20 -0
  310. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/layer-2-engineering.md +20 -0
  311. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/layer-3-interface.md +23 -0
  312. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/layer-4-ecosystem.md +20 -0
  313. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/layer-5-documentation.md +19 -0
  314. package/pi-package/skills/ux-dx-evaluation-diagnostician/references/report-template.md +36 -0
  315. package/pi-package/skills/verification-diagnostician/SKILL.md +96 -0
  316. package/pi-package/skills/verify-prompt/SKILL.md +38 -0
  317. package/pi-package/skills/verify-prompt/references/criteria.md +21 -0
  318. package/scripts/cli.mjs +453 -0
@@ -0,0 +1,196 @@
1
+ I need a comprehensive multi-agent parallel code review using the Wave/Gate architecture.
2
+
3
+ CODE TO REVIEW:
4
+ [paste code or specify: "Review all files in src/auth/"]
5
+
6
+ ARCHITECTURE:
7
+ Wave 1 (Parallel) → Gate 1 (Sequential) → Wave 2 (Parallel) → Gate 2 (Sequential) → Wave 3 (Sequential)
8
+
9
+ Execute this workflow:
10
+
11
+ ═══════════════════════════════════════════════════════════════
12
+ WAVE 1: PARALLEL INDEPENDENT ANALYSIS
13
+ ═══════════════════════════════════════════════════════════════
14
+
15
+ Launch 5 parallel tasks. Each task is independent and can run simultaneously.
16
+
17
+ TASK 1: Security Review
18
+ Role: Security Engineer
19
+ Focus:
20
+ - OWASP Top 10 vulnerabilities
21
+ - Input validation and sanitization
22
+ - Authentication and authorization flaws
23
+ - SQL injection, XSS, CSRF, SSRF
24
+ - Secret management and data exposure
25
+ - API security and rate limiting
26
+ - Cryptography usage
27
+
28
+ Output JSON format:
29
+ {
30
+ "issues": [
31
+ {
32
+ "id": "SEC-001",
33
+ "severity": "CRITICAL|HIGH|MEDIUM|LOW",
34
+ "category": "authentication|input-validation|data-exposure|cryptography",
35
+ "cwe_id": "CWE-XXX",
36
+ "location": "file.js:line",
37
+ "description": "Detailed description",
38
+ "attack_vector": "How an attacker could exploit this",
39
+ "recommendation": "Specific fix with code example"
40
+ }
41
+ ],
42
+ "security_score": 0-3,
43
+ "summary": "One-line summary"
44
+ }
45
+
46
+ TASK 2: Performance Review
47
+ Role: Performance Engineer
48
+ Focus:
49
+ - Time complexity (O(n²), O(n³) patterns)
50
+ - Database queries (N+1, missing indexes, full table scans)
51
+ - Memory allocation and leaks
52
+ - Unnecessary loops and iterations
53
+ - Caching opportunities
54
+ - Blocking I/O operations
55
+ - Resource pooling
56
+
57
+ TASK 3: Maintainability Review
58
+ Role: Future Developer (6 months out, original author gone)
59
+ Focus:
60
+ - Code clarity and readability
61
+ - Documentation (comments, docstrings, README)
62
+ - Pattern consistency across codebase
63
+ - Naming conventions (clear, descriptive)
64
+ - Technical debt indicators
65
+ - DRY violations
66
+ - Magic numbers and hard-coded values
67
+ - Complex conditionals
68
+
69
+ TASK 4: Requirements Validation
70
+ Role: QA Engineer
71
+ Focus:
72
+ - Requirements coverage (are all requirements implemented?)
73
+ - Edge case handling
74
+ - Test coverage gaps
75
+ - Behavioral correctness
76
+ - Missing functionality
77
+ - Acceptance criteria satisfaction
78
+
79
+ TASK 5: Operations Review
80
+ Role: SRE (on-call at 3am when this breaks)
81
+ Focus:
82
+ - Failure modes and error handling
83
+ - Observability (logging, metrics, tracing)
84
+ - Timeout and retry logic
85
+ - Circuit breakers and graceful degradation
86
+ - Resource management (connections, files, memory)
87
+ - Deployment/rollback complexity
88
+ - Configuration management
89
+ - Health checks and readiness probes
90
+
91
+ ═══════════════════════════════════════════════════════════════
92
+ GATE 1: CONFLICT RESOLUTION (Wait for all Wave 1 tasks)
93
+ ═══════════════════════════════════════════════════════════════
94
+
95
+ After all 5 tasks complete, consolidate findings:
96
+
97
+ TASK 6: Consolidation
98
+ Role: Senior Technical Lead
99
+
100
+ Tasks:
101
+ 1. DEDUPLICATE ISSUES
102
+ - Same issue reported by multiple reviewers → merge
103
+ - Similar issues → merge if same root cause
104
+ - Different perspectives on same code → keep separate if addressing different concerns
105
+
106
+ 2. RESOLVE SEVERITY CONFLICTS
107
+ Rules:
108
+ - Security CRITICAL always wins
109
+ - Take highest severity if 2+ reviewers agree it's a problem
110
+ - Downgrade if only 1 reviewer flagged and others cleared
111
+
112
+ 3. CALCULATE CONFIDENCE
113
+ - Found by 1 reviewer: confidence = 0.60
114
+ - Found by 2 reviewers: confidence = 0.80
115
+ - Found by 3+ reviewers: confidence = 0.95
116
+ - Severity disagreement: reduce confidence by 0.15
117
+
118
+ 4. IDENTIFY CROSS-CUTTING CONCERNS
119
+ - Issues affecting multiple domains
120
+ - Systemic patterns (same problem in multiple places)
121
+
122
+ ═══════════════════════════════════════════════════════════════
123
+ WAVE 2: PARALLEL CROSS-VALIDATION
124
+ ═══════════════════════════════════════════════════════════════
125
+
126
+ Launch 2-3 parallel tasks reviewing the consolidated findings.
127
+
128
+ TASK 7: Meta-Review
129
+ Role: Quality Control Lead
130
+
131
+ Check:
132
+ 1. COVERAGE GAPS - What wasn't examined?
133
+ 2. FALSE POSITIVES - Are flagged issues actually problems?
134
+ 3. SEVERITY CALIBRATION - Are CRITICAL ratings actually critical?
135
+ 4. REVIEWER QUALITY - Did reviewers follow their focus areas?
136
+ 5. SYSTEMIC PATTERNS - Do issues indicate deeper architectural problems?
137
+
138
+ TASK 8: Integration Analysis
139
+ Role: Systems Architect
140
+
141
+ Check for:
142
+ - System-wide impacts of issues
143
+ - Cascading failure scenarios
144
+ - Service dependency problems
145
+ - Data flow issues across boundaries
146
+
147
+ ═══════════════════════════════════════════════════════════════
148
+ GATE 2: FINAL SYNTHESIS (Wait for Wave 2)
149
+ ═══════════════════════════════════════════════════════════════
150
+
151
+ TASK 9: Final Report
152
+
153
+ Generate:
154
+ 1. EXECUTIVE SUMMARY
155
+ - Total issues by severity
156
+ - Blockers (CRITICAL issues that prevent merge/deploy)
157
+ - Key systemic issues
158
+
159
+ 2. PRIORITIZED ACTION LIST
160
+ - Must fix before merge (CRITICAL)
161
+ - Should fix before deploy (HIGH)
162
+ - Can fix later (MEDIUM/LOW)
163
+
164
+ 3. BLOCKING ASSESSMENT
165
+ - BLOCKS MERGE: Has CRITICAL issues
166
+ - BLOCKS DEPLOY: Has HIGH operational risks
167
+ - APPROVED: Ready for production
168
+ - APPROVED_WITH_NOTES: Deploy with monitoring plan
169
+
170
+ 4. CONVERGENCE METRICS
171
+ - Number of issues found: CRITICAL/HIGH/MEDIUM/LOW
172
+ - Confidence level: X% high-confidence issues
173
+ - False positive estimate: X%
174
+ - Coverage assessment: X% of code reviewed thoroughly
175
+
176
+ ═══════════════════════════════════════════════════════════════
177
+ WAVE 3: CONVERGENCE CHECK
178
+ ═══════════════════════════════════════════════════════════════
179
+
180
+ Determine if another iteration is needed:
181
+
182
+ CONVERGED if:
183
+ - new_critical_count == 0 AND
184
+ - new_issue_rate < 0.10 AND
185
+ - false_positive_rate < 0.20
186
+
187
+ ESCALATE_TO_HUMAN if:
188
+ - iteration >= 3 OR
189
+ - Found conflicting CRITICAL issues OR
190
+ - Uncertain about severity
191
+
192
+ ITERATE if:
193
+ - new_critical_count > 0 OR
194
+ - new_issue_rate >= 0.10
195
+
196
+ If ITERATE: Start Wave 1 again focusing only on CRITICAL and HIGH issues.
@@ -0,0 +1,63 @@
1
+ <!-- Full version: content/prompt-task-mutability-diagnostician.md -->
2
+ You are a Functional Architecture Analyst. Diagnose pathological mutable state — shared mutation, side effect entanglement, temporal coupling, and missing domain encapsulation — and map each finding to an immutability refactoring pattern. Do NOT modify any files — advisory only.
3
+
4
+ **GUARD:** Do not apply to greenfield projects, codebases already using functional architecture with isolated side effects, or when the problem is structural coupling/inheritance (use rigidity-diagnostician). Local mutation within pure functions (loop accumulators, builders) is acceptable — only flag mutation that crosses boundaries.
5
+
6
+ **INPUT**
7
+ - Target files/directory: [SPECIFY]
8
+ - High-churn files (optional): [git log output OR "none"]
9
+ - Architecture reference (optional): [AGENTS.md rules OR "none"]
10
+ - Language/framework (optional): [e.g., "TypeScript/React" — or "infer"]
11
+
12
+ **PROTOCOL (Five-Step Pipeline)**
13
+
14
+ Step 1 — Detect Mutability Signals: Read all files. Identify:
15
+ - Shared Mutable State (Critical): fields modified by multiple methods/classes; globals; mutable state across thread/async boundaries
16
+ - Side Effect Entanglement (High): functions mixing I/O (DB, API, file, clock) with business logic in the same method
17
+ - Temporal Coupling (High): methods requiring specific call order; setup-before-use with invalid intermediate states
18
+ - Primitive Obsession (High): domain concepts (money, email, coordinates) as raw strings/numbers without validation
19
+ - Void Mutation Methods (Medium): void return mutating objects in place — callers can't track changes
20
+ - Mutable Variable Overuse (Medium): `let`/`var`/non-final where `const`/`val`/`final`/`readonly` suffices
21
+ - Defensive Copy Absence (Medium): getters returning direct references to internal mutable collections
22
+ - Check-Then-Act Races (High): validation followed by operation assuming state unchanged — concurrent modification risk
23
+ Note file, line range, and description for each.
24
+
25
+ Step 2 — Classify Mutation Scope: For each signal, assess:
26
+ - Scope: Local (within function) / Object (instance state) / Cross-Object (shared between classes) / Global (singleton/static)
27
+ - Concurrency exposure: multi-threaded shared (Critical) / async shared (High) / single-threaded (Low)
28
+ - Temporal coupling: does correctness depend on call ordering? (High if yes)
29
+ - Test isolation: requires I/O mocking (High) / requires specific setup (Medium) / testable in isolation (Low)
30
+
31
+ Step 3 — Analyze Side Effect Boundaries: Classify every function as:
32
+ - **Data**: inert values/structures
33
+ - **Calculation**: pure — same inputs always produce same outputs, no side effects
34
+ - **Action**: impure — depends on when/how many times called (network, disk, clock, mutable external state)
35
+ For top 5-10 Actions by severity, identify Calculations trapped inside: business logic lines interleaved with I/O. Map which lines are Actions vs Calculations.
36
+
37
+ Step 4 — Map to Refactoring Pattern:
38
+ - Business logic tangled with I/O → **FC/IS**: extract pure calculations into functional core; push all I/O to imperative shell
39
+ - Read→compute→write in handlers → **Sandwich**: (1) impure read, (2) pure calculation, (3) impure write
40
+ - Domain concepts as raw primitives → **Value Object**: self-validating, immutable, equality-by-value types
41
+ - Void methods mutating in place → **Return-New-Instance** (Gilded Rose kata): return new instances instead of modifying
42
+ - Deep nested immutable updates (3+ levels) → **Optics/Lenses**: composable getter/setter abstractions
43
+ - `let`/`var` where `const` suffices → **Direct const migration**; loop-and-mutate → `map`/`filter`/`reduce`. Python: `Final` (PEP 591), `@dataclass(frozen=True)`
44
+ - Internal state leaked via getters → **Defensive copy / unmodifiable wrapper**
45
+
46
+ Native equivalents: Value Object → records (Java/C#/Kotlin); Return-New-Instance → `with` (C#), `copy()` (Kotlin), spread (JS/TS); Optics → FSharpPlus, monocle-ts, Higher-Kinded-J.
47
+
48
+ Step 5 — Prioritize: Score = Concurrency Risk (Multi-threaded=3, Async=2, Single=1) × Testability Impact (I/O mocking=3, Setup ordering=2, Isolated=1) × Mutation Scope (Global=3, Cross-object=2, Object or Local=1). Sequence: Value Objects first (smallest, safest), FC/IS extractions next (largest testability gain), const migrations opportunistically, Optics last (only after simpler patterns established). Each step independently deployable.
49
+
50
+ **OUTPUT**
51
+
52
+ Summary table:
53
+ | Location | Mutability Signal | Mutation Scope | Side Effect Type | Refactoring Pattern | Priority |
54
+
55
+ If multiple signals share root cause, consolidate. Then per finding: signal (files, lines, names), mutation scope (propagation + concurrency/temporal risk), side effect analysis (Action vs Calculation lines), recommended pattern (sketch, not full code), refactoring sequence (safe steps), success signals (pure functions testable with static data, side effects in thin shell, domain types rejecting invalid state).
56
+
57
+ Enforcement recommendations per language: JS/TS → ESLint (`functional/no-let`, `functional/immutable-data`, `ts-immutable/readonly-keyword`); Java → Mutability Detector, records; C#/.NET → Roslyn analyzers, `record` with `with`. For unlisted languages: Python (`@dataclass(frozen=True)`, `Final`, `NamedTuple`), Kotlin (`data class`, `val`), Go (unexported fields + constructors), Rust (default immutable bindings).
58
+
59
+ Needs Human Review: list ambiguous cases — local mutation that's clearest algorithm expression, performance-critical hot paths, framework-mandated mutability (ORM entity hydration), state that appears shared but is thread-confined by framework guarantees, reactive/observable patterns where side effects are deferred to subscription (classify pipeline as Calculation, `subscribe()` as Action).
60
+
61
+ If no signals found: "No pathological mutability found. Functions are pure or have well-isolated side effects, domain concepts are properly encapsulated, mutable state is appropriately scoped." Do not fabricate findings.
62
+
63
+ Stop when all files analyzed. Do not modify anything.
@@ -0,0 +1,60 @@
1
+ # Write a Narrative-Driven Article
2
+
3
+ We will collaborate to write a compelling article or blog post using the Three-Act narrative structure. We will work through four phases: Idea, Outline, Draft, and Review.
4
+
5
+ ## Phase 1: The Idea (The Setup)
6
+
7
+ First, we must define the core of our story. Please answer these questions:
8
+
9
+ 1. **What is the main topic or subject?**
10
+ 2. **Who is the target audience?** What do they currently know or believe about this topic (The Ordinary World)?
11
+ 3. **What is the central question or problem you want to address?** This is the "Inciting Incident" that will hook the reader. What puzzle will this article solve?
12
+ 4. **What is the key takeaway or "new normal"?** What should the reader understand or be able to do after reading the article? This is the ultimate Resolution.
13
+
14
+ Based on your answers, I will propose a title and a "hook" for the introduction.
15
+
16
+ ---
17
+
18
+ ## Phase 2: The Outline (The Three Acts)
19
+
20
+ Once we agree on the core idea, I will create a detailed outline based on the Three-Act Structure:
21
+
22
+ ### Act I: The Setup
23
+ - **Hook:** Grab the reader's attention.
24
+ - **Introduce the Problem:** State the central question or conflict.
25
+ - **Establish the Stakes:** Explain why the reader should care.
26
+ - **Thesis Statement:** Promise the reader what they will learn.
27
+
28
+ ### Act II: The Exploration
29
+ - **Point 1 (Rising Action):** The first major argument or piece of evidence.
30
+ - **Point 2 (Obstacles):** Address counter-arguments, complexities, or common misconceptions.
31
+ - **Point 3 (The Midpoint):** A key turning point or "aha!" moment in the argument.
32
+ - **Point 4 (Escalation):** Deeper insights that build on the midpoint.
33
+
34
+ ### Act III: The Resolution
35
+ - **Climax (The Synthesis):** Present the main conclusion, tying all the points together.
36
+ - **Falling Action (Practical Application):** Provide concrete examples, practical steps, or implications.
37
+ - **The New Normal (The Call to Action):** State the key takeaway and what the reader should do or think now.
38
+
39
+ We will review and refine this outline before moving on.
40
+
41
+ ---
42
+
43
+ ## Phase 3: The Draft (The Writing)
44
+
45
+ With an approved outline, I will write the full draft of the article. I will focus on:
46
+ - Following the narrative flow of the outline.
47
+ - Maintaining a consistent tone and voice.
48
+ - Using clear and engaging language.
49
+
50
+ ---
51
+
52
+ ## Phase 4: The Review (The Refinement)
53
+
54
+ Finally, I will perform an editorial review of the draft, checking for:
55
+ - **Clarity and Flow:** Is the article easy to read and understand?
56
+ - **Strength of Argument:** Is the narrative compelling and persuasive?
57
+ - **Grammar and Style:** Are there any grammatical errors or stylistic issues?
58
+ - **Impact:** Does the introduction hook the reader effectively? Does the conclusion provide a satisfying resolution?
59
+
60
+ I will provide a list of suggested revisions for your approval.
@@ -0,0 +1,190 @@
1
+ # Optionality Review
2
+
3
+ Review this [CODE/ARCHITECTURE/PLAN/DECISION] through the lens of strategic optionality.
4
+
5
+ (See Quick Reference section below for optionality principles and red/green flags)
6
+
7
+ ## Work to Review
8
+
9
+ [PASTE YOUR WORK OR SPECIFY FILE PATH]
10
+
11
+ ## Context (optional)
12
+
13
+ [Any relevant context: timeline, constraints, uncertainty level]
14
+
15
+ ---
16
+
17
+ ## Phase 1: Decision Classification
18
+
19
+ First, classify the key decisions using Bezos's framework:
20
+
21
+ **Type 1 (One-Way Doors):** Consequential and irreversible
22
+ - Require careful, methodical consideration
23
+ - Need broad consultation
24
+ - Examples: Core architecture, public APIs, major vendor commitments
25
+
26
+ **Type 2 (Two-Way Doors):** Changeable and reversible
27
+ - Should be made quickly with ~70% information
28
+ - Can be changed if wrong
29
+ - Examples: Internal tooling, feature flags, config choices
30
+
31
+ For each major decision in this work:
32
+
33
+ | Decision | Type | Reversibility | Decision Deadline | Justification |
34
+ |----------|------|---------------|-------------------|---------------|
35
+ | [What's being decided] | [1 or 2] | [EASY/MODERATE/HARD/IRREVERSIBLE] | [When must we decide?] | [Why this classification] |
36
+
37
+ **Early Exit:** If NO Type 1 decisions identified, output abbreviated report:
38
+ - List Type 2 decisions with brief notes
39
+ - Recommend: "Proceed quickly - all decisions are reversible"
40
+ - Skip Phases 2-6
41
+
42
+ ---
43
+
44
+ ## Phase 2: Alternative Paths
45
+
46
+ For Type 1 decisions, evaluate the option space (2-4 alternatives):
47
+
48
+ ### Current Approach
49
+ - Description: [Brief summary]
50
+ - Locks in: [What future choices this constrains]
51
+ - Enables: [What this makes possible]
52
+
53
+ ### Alternative A
54
+ - Description: [Different approach]
55
+ - Would preserve: [What options stay open]
56
+ - Trade-off: [What we'd give up]
57
+
58
+ ### Alternative B (if applicable)
59
+ - Description: [Another approach]
60
+ - Would preserve: [What options stay open]
61
+ - Trade-off: [What we'd give up]
62
+
63
+ ### Alternative C, D... (add more if needed for complex decisions)
64
+
65
+ **Assessment:** Are alternatives adequately explored? [YES/NO]
66
+ If NO, what should be investigated before committing?
67
+
68
+ **For Type 2 decisions:** Don't deep-dive. Briefly note 1-2 alternatives, then move on - speed matters more than exhaustive analysis for reversible decisions.
69
+
70
+ ---
71
+
72
+ ## Phase 3: Exit Costs & Escape Hatches
73
+
74
+ For Type 1 decisions from Phase 1, map the exit strategy:
75
+
76
+ | Decision | Reversal Cost | Reversal Time | Escape Hatch |
77
+ |----------|---------------|---------------|--------------|
78
+ | [Choice made] | [LOW/MED/HIGH] | [hours/days/weeks/months] | [Concrete path to undo if needed] |
79
+ | [Another choice] | [LOW/MED/HIGH] | [hours/days/weeks/months] | [How to exit] |
80
+
81
+ **Red Flags:**
82
+ - [ ] Irreversible decisions without clear justification
83
+ - [ ] No escape hatches for major commitments
84
+ - [ ] Assumptions treated as facts
85
+ - [ ] "We can refactor later" without a concrete path
86
+
87
+ **Reversibility Score:** [1-10] (10 = easily reversible)
88
+
89
+ ---
90
+
91
+ ## Phase 4: Failure Modes & Fallbacks
92
+
93
+ What if things go wrong?
94
+
95
+ | Failure Scenario | Probability | Impact | Fallback Plan | Recovery Cost |
96
+ |------------------|-------------|--------|---------------|---------------|
97
+ | [What could fail] | [L/M/H] | [L/M/H/CRITICAL] | [Plan B] | [time/effort] |
98
+
99
+ **External Dependencies:**
100
+ - [ ] Vendor lock-in: [None / Acceptable / Concerning]
101
+ - [ ] Technology bets: [Reversible / Locked]
102
+ - [ ] Regulatory assumptions: [Validated / Assumed]
103
+ - [ ] Single points of failure identified: [YES/NO]
104
+
105
+ **Resilience Score:** [1-10] (10 = multiple fallbacks, graceful degradation)
106
+
107
+ **Convergence Check:** If Reversibility ≥7 AND Resilience ≥7, consider skipping to Final Report.
108
+
109
+ ---
110
+
111
+ ## Phase 5: Future Value Assessment
112
+
113
+ Does this create or destroy options?
114
+
115
+ ### Options CREATED
116
+ 1. [New capability enabled]
117
+ - Enables: [What becomes possible]
118
+ - Value: [Why this matters]
119
+
120
+ 2. [Another capability]
121
+ - Enables: [What becomes possible]
122
+ - Value: [Why this matters]
123
+
124
+ ### Options DESTROYED (with justification)
125
+ 1. [Closed off possibility]
126
+ - Prevents: [What becomes harder/impossible]
127
+ - Justified because: [Why trade-off is acceptable]
128
+
129
+ ### Growth Potential
130
+ - Can scale to 10x: [YES/PARTIALLY/NO]
131
+ - Can add features without rewrite: [YES/PARTIALLY/NO]
132
+ - Can be extracted/reused: [YES/PARTIALLY/NO]
133
+ - Learning/telemetry built in: [YES/NO]
134
+
135
+ **Future Value Score:** [1-10] (10 = maximum option creation)
136
+
137
+ ---
138
+
139
+ ## Phase 6: Decision Points & Triggers
140
+
141
+ Where should we reassess?
142
+
143
+ | Milestone | What to Assess | Reassess Trigger | Go/No-Go Criteria |
144
+ |-----------|----------------|------------------|-------------------|
145
+ | [When] | [What we're evaluating] | [What would cause review] | [How to decide] |
146
+ | [Next milestone] | [Another assessment] | [Trigger condition] | [Decision criteria] |
147
+ | [Future checkpoint] | [Long-term assessment] | [Warning sign] | [How to decide] |
148
+
149
+ **Assumption Validation:**
150
+ - [ ] Key assumptions explicitly stated
151
+ - [ ] Validation checkpoints defined
152
+ - [ ] Early warning metrics identified
153
+
154
+ ---
155
+
156
+ ## Final Report
157
+
158
+ ### Scores Summary
159
+ - Reversibility: [X/10]
160
+ - Resilience: [X/10]
161
+ - Future Value: [X/10]
162
+ - **Overall Optionality: [X/10]** (average, or lowest score if any ≤3)
163
+
164
+ ### Verdict
165
+
166
+ **Optionality Assessment:** [FLEXIBLE | BALANCED | LOCKED_IN | CONCERNING]
167
+ - FLEXIBLE (8-10): Excellent strategic flexibility
168
+ - BALANCED (5-7): Acceptable trade-offs, some lock-in justified
169
+ - LOCKED_IN (3-4): Significant constraints, ensure they're intentional
170
+ - CONCERNING (1-2): High risk, reconsider approach
171
+
172
+ **Key Findings:**
173
+ 1. [Most significant optionality issue or strength]
174
+ 2. [Second finding]
175
+ 3. [Third finding]
176
+
177
+ ### Recommendations
178
+
179
+ **Before proceeding:**
180
+ - [Critical actions to preserve flexibility]
181
+
182
+ **Build in over time:**
183
+ - [Strategic improvements for future flexibility]
184
+
185
+ ### The Bottom Line
186
+
187
+ [2-3 sentences: Is the level of lock-in appropriate for our uncertainty level? Are we preserving the right options? What's the key trade-off?]
188
+
189
+ **Human review recommended:** [YES/NO]
190
+ **Reason:** [Why human judgment needed, or why assessment is sufficient]
@@ -0,0 +1,49 @@
1
+ <!-- skill: parallel-review, version: 1.2.0, status: verified -->
2
+ # Parallel Review (Multi-Agent Code Review)
3
+
4
+ Orchestrate a comprehensive, multi-agent code review using an extended parallel review workflow inspired by the Rule of 5 principle to achieve maximum defect detection (85-92%).
5
+
6
+ ## Role
7
+ You are a Lead Orchestration Engineer. Your goal is to simulate and synthesize the perspectives of multiple specialist agents to uncover critical vulnerabilities, performance bottlenecks, and reliability risks that a single-pass review would miss.
8
+
9
+ ## Procedure
10
+
11
+ 1. **Context Building:**
12
+ * Identify the code to review.
13
+ * Identify the core requirements or user stories the code aims to satisfy.
14
+ * Read the code and any existing tests completely.
15
+
16
+ 2. **Wave 1: Parallel Specialist Analysis:**
17
+ Simulate five independent reviewers, each producing a prioritized list of findings (CRITICAL, HIGH, MEDIUM, LOW):
18
+ * **Security Reviewer:** OWASP Top 10, input validation, auth, and data leaks.
19
+ * **Performance Reviewer:** Algorithmic complexity, DB efficiency, and memory.
20
+ * **Maintainer Reviewer:** Readability, structure, design patterns, and tech debt.
21
+ * **Requirements Validator:** Correctness, requirement coverage, and edge cases.
22
+ * **Operations Reviewer (SRE):** Failure modes, logging, metrics, and resilience.
23
+
24
+ 3. **Gate 1: Synthesis & Conflict Resolution:**
25
+ Consolidate findings into a single deduplicated list. Resolve severity conflicts (Security CRITICALs outrank all; 3+ agents flagging an issue elevates its severity).
26
+
27
+ 4. **Wave 2: Cross-Validation:**
28
+ Simulate two validation agents:
29
+ * **False Positive Checker:** Scrutinize the list for misunderstandings or irrelevant findings.
30
+ * **Integration Validator:** Identify system-wide risks or cascading failures.
31
+
32
+ 5. **Gate 2: Final Synthesis:**
33
+ Remove false positives, add integration risks, and produce the final prioritized list of actionable issues.
34
+
35
+ 6. **Verification (CRITICAL):**
36
+ * **DO NOT** rely on simulated agent findings without checking them against the code. As the orchestrator, you MUST use `read_file` or `grep_search` to verify the validity of any CRITICAL or HIGH severity issues before final reporting.
37
+ * Verify that suggested fixes (e.g., using a specific library) are actually feasible within the current project's environment.
38
+
39
+ 7. **Wave 3: Convergence Check:**
40
+ Assess if the review has CONVERGED or if the findings are contradictory/unclear enough to require another iteration or human judgment.
41
+
42
+ ## Rules
43
+ - **Specific Locations:** Every finding must include a file:line reference.
44
+ - **Actionable Advice:** Every issue must have a specific recommendation for a fix.
45
+ - **Verification Mandate:** You are responsible for the truth of the simulated findings. Verify high-severity claims manually.
46
+
47
+ ## References
48
+ - **Templates:** Use `references/templates.md` for wave outputs and the final report.
49
+ - **Criteria:** See `references/criteria.md` for severity definitions and convergence rules.
@@ -0,0 +1,34 @@
1
+ # Multi-Agent Code Review Criteria
2
+
3
+ Use these criteria to categorize findings and determine when the review process is complete.
4
+
5
+ ## Issue Severity Definitions
6
+
7
+ | Severity | Criteria | Example Findings |
8
+ | :--- | :--- | :--- |
9
+ | **CRITICAL** | Severe security vulnerability, data loss risk, or fundamental logic failure that makes the code unshipable. | SQL Injection, plaintext passwords, unhandled exceptions in core path. |
10
+ | **HIGH** | Significant performance issue, major regression risk, or violation of key requirements. | Missing index on hot query, non-singular requirement, missing error states. |
11
+ | **MEDIUM** | Minor technical debt, sub-optimal pattern, or readability issues. | Magic strings, DRY violations, lack of docstrings, magic numbers. |
12
+ | **LOW** | Nice to have. Stylistic improvements, minor metadata gaps, or typos in non-critical comments. | Minor formatting, redundant comments, small consistency improvements. |
13
+
14
+ ## Convergence Criteria
15
+
16
+ **CONVERGED** if:
17
+ - All CRITICAL and HIGH severity issues have been cross-validated by at least two agents (e.g., Security Reviewer and False Positive Checker).
18
+ - Gate 1 and Gate 2 synthesis steps result in a stable list of issues with no major contradictions.
19
+ - The Integration Validator confirms that no new cascading failures are likely.
20
+
21
+ **ITERATE** if:
22
+ - Wave 2 identifies more than two HIGH or one CRITICAL severity issue that were missed in Wave 1.
23
+ - Specialist agents have directly contradictory findings on a CRITICAL issue.
24
+
25
+ **NEEDS_HUMAN** if:
26
+ - After two full multi-agent cycles, no consensus is reached on a CRITICAL issue.
27
+ - The specialist agents identify a foundational architectural conflict.
28
+
29
+ ## Verification Checklist (For Orchestrator)
30
+
31
+ As the Lead Orchestration Engineer, you MUST:
32
+ - [ ] Use `read_file` to confirm that every CRITICAL finding actually exists at the cited file:line.
33
+ - [ ] Cross-check the "Requirements Validator" findings against the actual specification file (if provided).
34
+ - [ ] Verify that suggested performance optimizations don't violate existing project constraints (e.g., using a library that is explicitly forbidden).
@@ -0,0 +1,59 @@
1
+ # Multi-Agent Code Review Templates
2
+
3
+ Use these templates to structure the waves and final reporting of the multi-agent code review.
4
+
5
+ ## Wave 1 Output Template
6
+
7
+ ```markdown
8
+ ### WAVE 1: Parallel Analysis Findings
9
+
10
+ #### 1. Security Reviewer
11
+ - [Severity] [Description] - [File:Line]
12
+ - [Severity] ...
13
+
14
+ #### 2. Performance Reviewer
15
+ - [Severity] [Description] - [File:Line]
16
+
17
+ ... [Remaining Reviewers]
18
+ ```
19
+
20
+ ## Wave 2 & 3 Convergence Check Template
21
+
22
+ ```markdown
23
+ ### WAVE 3: Convergence Check
24
+
25
+ **Status:** [CONVERGED | ITERATE | NEEDS_HUMAN]
26
+ **Confidence Score:** [0-100%]
27
+ **Rationale:** [1-2 sentences explaining why the review is complete or requires more focus]
28
+ ```
29
+
30
+ ## Final Report Template
31
+
32
+ ```markdown
33
+ # Multi-Agent Code Review Final Report
34
+
35
+ **Code:** [Short description/path] | **Convergence:** Wave [N]
36
+
37
+ ## Synthesized Issue Summary
38
+ | Severity | Count | Primary Focus |
39
+ | :--- | :--- | :--- |
40
+ | **CRITICAL** | [count] | Security / Logic Failures |
41
+ | **HIGH** | [count] | Performance / Reliability |
42
+ | **MEDIUM** | [count] | Maintainability / Tech Debt |
43
+ | **LOW** | [count] | Clarity / Style |
44
+
45
+ ## Top 3 Critical Findings (Verified)
46
+ 1. **[ID] [Description]** - [File:Line]
47
+ * **Impact:** [Why this blocks implementation or causes failure]
48
+ * **Fix:** [Specific actionable step]
49
+
50
+ 2. **[ID] ...**
51
+
52
+ ## Final Actionable List
53
+ 1. [Verified Action 1 - specific and actionable]
54
+ 2. [Verified Action 2 - specific and actionable]
55
+ 3. [Verified Action 3 - specific and actionable]
56
+
57
+ ## Verdict: [READY_TO_MERGE | NEEDS_FIXES | BLOCKS_MERGE]
58
+ **Rationale:** [Final summary of system-wide health and prioritized fixes]
59
+ ```