@harness-engineering/cli 1.14.0 → 1.16.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 (499) hide show
  1. package/dist/agents/commands/codex/AGENTS.md +39 -0
  2. package/dist/agents/commands/codex/harness/add-harness-component/SKILL.md +195 -0
  3. package/dist/agents/commands/codex/harness/add-harness-component/agents/openai.yaml +3 -0
  4. package/dist/agents/commands/codex/harness/cleanup-dead-code/SKILL.md +248 -0
  5. package/dist/agents/commands/codex/harness/cleanup-dead-code/agents/openai.yaml +3 -0
  6. package/dist/agents/commands/codex/harness/detect-doc-drift/SKILL.md +182 -0
  7. package/dist/agents/commands/codex/harness/detect-doc-drift/agents/openai.yaml +3 -0
  8. package/dist/agents/commands/codex/harness/enforce-architecture/SKILL.md +299 -0
  9. package/dist/agents/commands/codex/harness/enforce-architecture/agents/openai.yaml +3 -0
  10. package/dist/agents/commands/codex/harness/harness-architecture-advisor/SKILL.md +452 -0
  11. package/dist/agents/commands/codex/harness/harness-architecture-advisor/agents/openai.yaml +3 -0
  12. package/dist/agents/commands/codex/harness/harness-autopilot/SKILL.md +919 -0
  13. package/dist/agents/commands/codex/harness/harness-autopilot/agents/openai.yaml +3 -0
  14. package/dist/agents/commands/codex/harness/harness-brainstorming/SKILL.md +409 -0
  15. package/dist/agents/commands/codex/harness/harness-brainstorming/agents/openai.yaml +3 -0
  16. package/dist/agents/commands/codex/harness/harness-code-review/SKILL.md +860 -0
  17. package/dist/agents/commands/codex/harness/harness-code-review/agents/openai.yaml +3 -0
  18. package/dist/agents/commands/codex/harness/harness-codebase-cleanup/SKILL.md +227 -0
  19. package/dist/agents/commands/codex/harness/harness-codebase-cleanup/agents/openai.yaml +3 -0
  20. package/dist/agents/commands/codex/harness/harness-debugging/SKILL.md +369 -0
  21. package/dist/agents/commands/codex/harness/harness-debugging/agents/openai.yaml +3 -0
  22. package/dist/agents/commands/codex/harness/harness-dependency-health/SKILL.md +182 -0
  23. package/dist/agents/commands/codex/harness/harness-dependency-health/agents/openai.yaml +3 -0
  24. package/dist/agents/commands/codex/harness/harness-docs-pipeline/SKILL.md +463 -0
  25. package/dist/agents/commands/codex/harness/harness-docs-pipeline/agents/openai.yaml +3 -0
  26. package/dist/agents/commands/codex/harness/harness-execution/SKILL.md +513 -0
  27. package/dist/agents/commands/codex/harness/harness-execution/agents/openai.yaml +3 -0
  28. package/dist/agents/commands/codex/harness/harness-hotspot-detector/SKILL.md +164 -0
  29. package/dist/agents/commands/codex/harness/harness-hotspot-detector/agents/openai.yaml +3 -0
  30. package/dist/agents/commands/codex/harness/harness-impact-analysis/SKILL.md +187 -0
  31. package/dist/agents/commands/codex/harness/harness-impact-analysis/agents/openai.yaml +3 -0
  32. package/dist/agents/commands/codex/harness/harness-integrity/SKILL.md +170 -0
  33. package/dist/agents/commands/codex/harness/harness-integrity/agents/openai.yaml +3 -0
  34. package/dist/agents/commands/codex/harness/harness-onboarding/SKILL.md +291 -0
  35. package/dist/agents/commands/codex/harness/harness-onboarding/agents/openai.yaml +3 -0
  36. package/dist/agents/commands/codex/harness/harness-perf/SKILL.md +263 -0
  37. package/dist/agents/commands/codex/harness/harness-perf/agents/openai.yaml +3 -0
  38. package/dist/agents/commands/codex/harness/harness-planning/SKILL.md +582 -0
  39. package/dist/agents/commands/codex/harness/harness-planning/agents/openai.yaml +3 -0
  40. package/dist/agents/commands/codex/harness/harness-refactoring/SKILL.md +172 -0
  41. package/dist/agents/commands/codex/harness/harness-refactoring/agents/openai.yaml +3 -0
  42. package/dist/agents/commands/codex/harness/harness-release-readiness/SKILL.md +692 -0
  43. package/dist/agents/commands/codex/harness/harness-release-readiness/agents/openai.yaml +3 -0
  44. package/dist/agents/commands/codex/harness/harness-roadmap/SKILL.md +598 -0
  45. package/dist/agents/commands/codex/harness/harness-roadmap/agents/openai.yaml +3 -0
  46. package/dist/agents/commands/codex/harness/harness-security-scan/SKILL.md +157 -0
  47. package/dist/agents/commands/codex/harness/harness-security-scan/agents/openai.yaml +3 -0
  48. package/dist/agents/commands/codex/harness/harness-skill-authoring/SKILL.md +295 -0
  49. package/dist/agents/commands/codex/harness/harness-skill-authoring/agents/openai.yaml +3 -0
  50. package/dist/agents/commands/codex/harness/harness-soundness-review/SKILL.md +1270 -0
  51. package/dist/agents/commands/codex/harness/harness-soundness-review/agents/openai.yaml +3 -0
  52. package/dist/agents/commands/codex/harness/harness-supply-chain-audit/SKILL.md +247 -0
  53. package/dist/agents/commands/codex/harness/harness-supply-chain-audit/agents/openai.yaml +3 -0
  54. package/dist/agents/commands/codex/harness/harness-tdd/SKILL.md +180 -0
  55. package/dist/agents/commands/codex/harness/harness-tdd/agents/openai.yaml +3 -0
  56. package/dist/agents/commands/codex/harness/harness-test-advisor/SKILL.md +163 -0
  57. package/dist/agents/commands/codex/harness/harness-test-advisor/agents/openai.yaml +3 -0
  58. package/dist/agents/commands/codex/harness/harness-verification/SKILL.md +424 -0
  59. package/dist/agents/commands/codex/harness/harness-verification/agents/openai.yaml +3 -0
  60. package/dist/agents/commands/codex/harness/harness-verify/SKILL.md +162 -0
  61. package/dist/agents/commands/codex/harness/harness-verify/agents/openai.yaml +3 -0
  62. package/dist/agents/commands/codex/harness/initialize-harness-project/SKILL.md +235 -0
  63. package/dist/agents/commands/codex/harness/initialize-harness-project/agents/openai.yaml +3 -0
  64. package/dist/agents/commands/cursor/harness/add-harness-component.mdc +200 -0
  65. package/dist/agents/commands/cursor/harness/cleanup-dead-code.mdc +253 -0
  66. package/dist/agents/commands/cursor/harness/detect-doc-drift.mdc +187 -0
  67. package/dist/agents/commands/cursor/harness/enforce-architecture.mdc +304 -0
  68. package/dist/agents/commands/cursor/harness/harness-architecture-advisor.mdc +457 -0
  69. package/dist/agents/commands/cursor/harness/harness-autopilot.mdc +924 -0
  70. package/dist/agents/commands/cursor/harness/harness-brainstorming.mdc +414 -0
  71. package/dist/agents/commands/cursor/harness/harness-code-review.mdc +865 -0
  72. package/dist/agents/commands/cursor/harness/harness-codebase-cleanup.mdc +232 -0
  73. package/dist/agents/commands/cursor/harness/harness-debugging.mdc +374 -0
  74. package/dist/agents/commands/cursor/harness/harness-dependency-health.mdc +187 -0
  75. package/dist/agents/commands/cursor/harness/harness-docs-pipeline.mdc +468 -0
  76. package/dist/agents/commands/cursor/harness/harness-execution.mdc +518 -0
  77. package/dist/agents/commands/cursor/harness/harness-hotspot-detector.mdc +169 -0
  78. package/dist/agents/commands/cursor/harness/harness-impact-analysis.mdc +192 -0
  79. package/dist/agents/commands/cursor/harness/harness-integrity.mdc +175 -0
  80. package/dist/agents/commands/cursor/harness/harness-onboarding.mdc +296 -0
  81. package/dist/agents/commands/cursor/harness/harness-perf.mdc +268 -0
  82. package/dist/agents/commands/cursor/harness/harness-planning.mdc +587 -0
  83. package/dist/agents/commands/cursor/harness/harness-refactoring.mdc +177 -0
  84. package/dist/agents/commands/cursor/harness/harness-release-readiness.mdc +697 -0
  85. package/dist/agents/commands/cursor/harness/harness-roadmap.mdc +603 -0
  86. package/dist/agents/commands/cursor/harness/harness-security-scan.mdc +162 -0
  87. package/dist/agents/commands/cursor/harness/harness-skill-authoring.mdc +300 -0
  88. package/dist/agents/commands/cursor/harness/harness-soundness-review.mdc +1275 -0
  89. package/dist/agents/commands/cursor/harness/harness-supply-chain-audit.mdc +252 -0
  90. package/dist/agents/commands/cursor/harness/harness-tdd.mdc +185 -0
  91. package/dist/agents/commands/cursor/harness/harness-test-advisor.mdc +168 -0
  92. package/dist/agents/commands/cursor/harness/harness-verification.mdc +429 -0
  93. package/dist/agents/commands/cursor/harness/harness-verify.mdc +167 -0
  94. package/dist/agents/commands/cursor/harness/initialize-harness-project.mdc +240 -0
  95. package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +52 -0
  96. package/dist/agents/skills/claude-code/harness-api-design/SKILL.md +52 -0
  97. package/dist/agents/skills/claude-code/harness-architecture-advisor/SKILL.md +52 -0
  98. package/dist/agents/skills/claude-code/harness-auth/SKILL.md +52 -0
  99. package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +355 -45
  100. package/dist/agents/skills/claude-code/harness-autopilot/skill.yaml +12 -0
  101. package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +97 -3
  102. package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +6 -0
  103. package/dist/agents/skills/claude-code/harness-codebase-cleanup/SKILL.md +2 -4
  104. package/dist/agents/skills/claude-code/harness-database/SKILL.md +52 -0
  105. package/dist/agents/skills/claude-code/harness-deployment/SKILL.md +52 -0
  106. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +99 -3
  107. package/dist/agents/skills/claude-code/harness-planning/skill.yaml +6 -0
  108. package/dist/agents/skills/claude-code/harness-pre-commit-review/SKILL.md +1 -1
  109. package/dist/agents/skills/claude-code/harness-product-spec/SKILL.md +5 -5
  110. package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +27 -7
  111. package/dist/agents/skills/claude-code/harness-security-scan/SKILL.md +52 -0
  112. package/dist/agents/skills/claude-code/harness-supply-chain-audit/SKILL.md +281 -0
  113. package/dist/agents/skills/claude-code/harness-supply-chain-audit/skill.yaml +51 -0
  114. package/dist/agents/skills/codex/add-harness-component/SKILL.md +192 -0
  115. package/dist/agents/skills/codex/add-harness-component/skill.yaml +33 -0
  116. package/dist/agents/skills/codex/align-documentation/SKILL.md +213 -0
  117. package/dist/agents/skills/codex/align-documentation/skill.yaml +32 -0
  118. package/dist/agents/skills/codex/check-mechanical-constraints/SKILL.md +191 -0
  119. package/dist/agents/skills/codex/check-mechanical-constraints/skill.yaml +33 -0
  120. package/dist/agents/skills/codex/cleanup-dead-code/SKILL.md +245 -0
  121. package/dist/agents/skills/codex/cleanup-dead-code/skill.yaml +34 -0
  122. package/dist/agents/skills/codex/detect-doc-drift/SKILL.md +179 -0
  123. package/dist/agents/skills/codex/detect-doc-drift/skill.yaml +31 -0
  124. package/dist/agents/skills/codex/enforce-architecture/SKILL.md +296 -0
  125. package/dist/agents/skills/codex/enforce-architecture/skill.yaml +35 -0
  126. package/dist/agents/skills/codex/harness-accessibility/SKILL.md +281 -0
  127. package/dist/agents/skills/codex/harness-accessibility/skill.yaml +52 -0
  128. package/dist/agents/skills/codex/harness-api-design/SKILL.md +356 -0
  129. package/dist/agents/skills/codex/harness-api-design/skill.yaml +74 -0
  130. package/dist/agents/skills/codex/harness-architecture-advisor/SKILL.md +449 -0
  131. package/dist/agents/skills/codex/harness-architecture-advisor/skill.yaml +49 -0
  132. package/dist/agents/skills/codex/harness-auth/SKILL.md +331 -0
  133. package/dist/agents/skills/codex/harness-auth/skill.yaml +81 -0
  134. package/dist/agents/skills/codex/harness-autopilot/SKILL.md +916 -0
  135. package/dist/agents/skills/codex/harness-autopilot/skill.yaml +67 -0
  136. package/dist/agents/skills/codex/harness-brainstorming/SKILL.md +406 -0
  137. package/dist/agents/skills/codex/harness-brainstorming/skill.yaml +50 -0
  138. package/dist/agents/skills/codex/harness-caching/SKILL.md +309 -0
  139. package/dist/agents/skills/codex/harness-caching/skill.yaml +73 -0
  140. package/dist/agents/skills/codex/harness-chaos/SKILL.md +295 -0
  141. package/dist/agents/skills/codex/harness-chaos/skill.yaml +72 -0
  142. package/dist/agents/skills/codex/harness-code-review/SKILL.md +857 -0
  143. package/dist/agents/skills/codex/harness-code-review/skill.yaml +52 -0
  144. package/dist/agents/skills/codex/harness-codebase-cleanup/SKILL.md +224 -0
  145. package/dist/agents/skills/codex/harness-codebase-cleanup/skill.yaml +65 -0
  146. package/dist/agents/skills/codex/harness-compliance/SKILL.md +303 -0
  147. package/dist/agents/skills/codex/harness-compliance/skill.yaml +78 -0
  148. package/dist/agents/skills/codex/harness-containerization/SKILL.md +284 -0
  149. package/dist/agents/skills/codex/harness-containerization/skill.yaml +80 -0
  150. package/dist/agents/skills/codex/harness-data-pipeline/SKILL.md +274 -0
  151. package/dist/agents/skills/codex/harness-data-pipeline/skill.yaml +81 -0
  152. package/dist/agents/skills/codex/harness-data-validation/SKILL.md +343 -0
  153. package/dist/agents/skills/codex/harness-data-validation/skill.yaml +75 -0
  154. package/dist/agents/skills/codex/harness-database/SKILL.md +310 -0
  155. package/dist/agents/skills/codex/harness-database/skill.yaml +80 -0
  156. package/dist/agents/skills/codex/harness-debugging/SKILL.md +366 -0
  157. package/dist/agents/skills/codex/harness-debugging/skill.yaml +48 -0
  158. package/dist/agents/skills/codex/harness-dependency-health/SKILL.md +179 -0
  159. package/dist/agents/skills/codex/harness-dependency-health/skill.yaml +42 -0
  160. package/dist/agents/skills/codex/harness-deployment/SKILL.md +307 -0
  161. package/dist/agents/skills/codex/harness-deployment/skill.yaml +77 -0
  162. package/dist/agents/skills/codex/harness-design/SKILL.md +265 -0
  163. package/dist/agents/skills/codex/harness-design/skill.yaml +54 -0
  164. package/dist/agents/skills/codex/harness-design-mobile/SKILL.md +336 -0
  165. package/dist/agents/skills/codex/harness-design-mobile/skill.yaml +50 -0
  166. package/dist/agents/skills/codex/harness-design-system/SKILL.md +282 -0
  167. package/dist/agents/skills/codex/harness-design-system/skill.yaml +51 -0
  168. package/dist/agents/skills/codex/harness-design-web/SKILL.md +360 -0
  169. package/dist/agents/skills/codex/harness-design-web/skill.yaml +53 -0
  170. package/dist/agents/skills/codex/harness-diagnostics/SKILL.md +318 -0
  171. package/dist/agents/skills/codex/harness-diagnostics/skill.yaml +51 -0
  172. package/dist/agents/skills/codex/harness-docs-pipeline/SKILL.md +460 -0
  173. package/dist/agents/skills/codex/harness-docs-pipeline/skill.yaml +70 -0
  174. package/dist/agents/skills/codex/harness-dx/SKILL.md +276 -0
  175. package/dist/agents/skills/codex/harness-dx/skill.yaml +76 -0
  176. package/dist/agents/skills/codex/harness-e2e/SKILL.md +245 -0
  177. package/dist/agents/skills/codex/harness-e2e/skill.yaml +78 -0
  178. package/dist/agents/skills/codex/harness-event-driven/SKILL.md +280 -0
  179. package/dist/agents/skills/codex/harness-event-driven/skill.yaml +77 -0
  180. package/dist/agents/skills/codex/harness-execution/SKILL.md +510 -0
  181. package/dist/agents/skills/codex/harness-execution/skill.yaml +52 -0
  182. package/dist/agents/skills/codex/harness-feature-flags/SKILL.md +287 -0
  183. package/dist/agents/skills/codex/harness-feature-flags/skill.yaml +74 -0
  184. package/dist/agents/skills/codex/harness-git-workflow/SKILL.md +268 -0
  185. package/dist/agents/skills/codex/harness-git-workflow/skill.yaml +32 -0
  186. package/dist/agents/skills/codex/harness-hotspot-detector/SKILL.md +161 -0
  187. package/dist/agents/skills/codex/harness-hotspot-detector/skill.yaml +45 -0
  188. package/dist/agents/skills/codex/harness-i18n/SKILL.md +484 -0
  189. package/dist/agents/skills/codex/harness-i18n/skill.yaml +55 -0
  190. package/dist/agents/skills/codex/harness-i18n-process/SKILL.md +388 -0
  191. package/dist/agents/skills/codex/harness-i18n-process/skill.yaml +44 -0
  192. package/dist/agents/skills/codex/harness-i18n-workflow/SKILL.md +512 -0
  193. package/dist/agents/skills/codex/harness-i18n-workflow/skill.yaml +54 -0
  194. package/dist/agents/skills/codex/harness-impact-analysis/SKILL.md +184 -0
  195. package/dist/agents/skills/codex/harness-impact-analysis/skill.yaml +45 -0
  196. package/dist/agents/skills/codex/harness-incident-response/SKILL.md +223 -0
  197. package/dist/agents/skills/codex/harness-incident-response/skill.yaml +78 -0
  198. package/dist/agents/skills/codex/harness-infrastructure-as-code/SKILL.md +279 -0
  199. package/dist/agents/skills/codex/harness-infrastructure-as-code/skill.yaml +80 -0
  200. package/dist/agents/skills/codex/harness-integration-test/SKILL.md +271 -0
  201. package/dist/agents/skills/codex/harness-integration-test/skill.yaml +73 -0
  202. package/dist/agents/skills/codex/harness-integrity/SKILL.md +167 -0
  203. package/dist/agents/skills/codex/harness-integrity/skill.yaml +48 -0
  204. package/dist/agents/skills/codex/harness-knowledge-mapper/SKILL.md +195 -0
  205. package/dist/agents/skills/codex/harness-knowledge-mapper/skill.yaml +50 -0
  206. package/dist/agents/skills/codex/harness-load-testing/SKILL.md +274 -0
  207. package/dist/agents/skills/codex/harness-load-testing/skill.yaml +79 -0
  208. package/dist/agents/skills/codex/harness-ml-ops/SKILL.md +341 -0
  209. package/dist/agents/skills/codex/harness-ml-ops/skill.yaml +79 -0
  210. package/dist/agents/skills/codex/harness-mobile-patterns/SKILL.md +326 -0
  211. package/dist/agents/skills/codex/harness-mobile-patterns/skill.yaml +82 -0
  212. package/dist/agents/skills/codex/harness-mutation-test/SKILL.md +251 -0
  213. package/dist/agents/skills/codex/harness-mutation-test/skill.yaml +70 -0
  214. package/dist/agents/skills/codex/harness-observability/SKILL.md +283 -0
  215. package/dist/agents/skills/codex/harness-observability/skill.yaml +78 -0
  216. package/dist/agents/skills/codex/harness-onboarding/SKILL.md +288 -0
  217. package/dist/agents/skills/codex/harness-onboarding/skill.yaml +31 -0
  218. package/dist/agents/skills/codex/harness-parallel-agents/SKILL.md +256 -0
  219. package/dist/agents/skills/codex/harness-parallel-agents/skill.yaml +34 -0
  220. package/dist/agents/skills/codex/harness-perf/SKILL.md +260 -0
  221. package/dist/agents/skills/codex/harness-perf/skill.yaml +51 -0
  222. package/dist/agents/skills/codex/harness-perf-tdd/SKILL.md +249 -0
  223. package/dist/agents/skills/codex/harness-perf-tdd/skill.yaml +48 -0
  224. package/dist/agents/skills/codex/harness-planning/SKILL.md +579 -0
  225. package/dist/agents/skills/codex/harness-planning/skill.yaml +56 -0
  226. package/dist/agents/skills/codex/harness-pre-commit-review/SKILL.md +324 -0
  227. package/dist/agents/skills/codex/harness-pre-commit-review/skill.yaml +34 -0
  228. package/dist/agents/skills/codex/harness-product-spec/SKILL.md +285 -0
  229. package/dist/agents/skills/codex/harness-product-spec/skill.yaml +72 -0
  230. package/dist/agents/skills/codex/harness-property-test/SKILL.md +281 -0
  231. package/dist/agents/skills/codex/harness-property-test/skill.yaml +71 -0
  232. package/dist/agents/skills/codex/harness-refactoring/SKILL.md +169 -0
  233. package/dist/agents/skills/codex/harness-refactoring/skill.yaml +34 -0
  234. package/dist/agents/skills/codex/harness-release-readiness/SKILL.md +689 -0
  235. package/dist/agents/skills/codex/harness-release-readiness/skill.yaml +58 -0
  236. package/dist/agents/skills/codex/harness-resilience/SKILL.md +255 -0
  237. package/dist/agents/skills/codex/harness-resilience/skill.yaml +76 -0
  238. package/dist/agents/skills/codex/harness-roadmap/SKILL.md +595 -0
  239. package/dist/agents/skills/codex/harness-roadmap/skill.yaml +44 -0
  240. package/dist/agents/skills/codex/harness-secrets/SKILL.md +293 -0
  241. package/dist/agents/skills/codex/harness-secrets/skill.yaml +76 -0
  242. package/dist/agents/skills/codex/harness-security-review/SKILL.md +260 -0
  243. package/dist/agents/skills/codex/harness-security-review/skill.yaml +53 -0
  244. package/dist/agents/skills/codex/harness-security-scan/SKILL.md +154 -0
  245. package/dist/agents/skills/codex/harness-security-scan/skill.yaml +42 -0
  246. package/dist/agents/skills/codex/harness-skill-authoring/SKILL.md +292 -0
  247. package/dist/agents/skills/codex/harness-skill-authoring/skill.yaml +33 -0
  248. package/dist/agents/skills/codex/harness-soundness-review/SKILL.md +1267 -0
  249. package/dist/agents/skills/codex/harness-soundness-review/skill.yaml +49 -0
  250. package/dist/agents/skills/codex/harness-sql-review/SKILL.md +315 -0
  251. package/dist/agents/skills/codex/harness-sql-review/skill.yaml +74 -0
  252. package/dist/agents/skills/codex/harness-state-management/SKILL.md +309 -0
  253. package/dist/agents/skills/codex/harness-state-management/skill.yaml +33 -0
  254. package/dist/agents/skills/codex/harness-supply-chain-audit/SKILL.md +281 -0
  255. package/dist/agents/skills/codex/harness-supply-chain-audit/skill.yaml +51 -0
  256. package/dist/agents/skills/codex/harness-tdd/SKILL.md +177 -0
  257. package/dist/agents/skills/codex/harness-tdd/skill.yaml +49 -0
  258. package/dist/agents/skills/codex/harness-test-advisor/SKILL.md +160 -0
  259. package/dist/agents/skills/codex/harness-test-advisor/skill.yaml +45 -0
  260. package/dist/agents/skills/codex/harness-test-data/SKILL.md +268 -0
  261. package/dist/agents/skills/codex/harness-test-data/skill.yaml +74 -0
  262. package/dist/agents/skills/codex/harness-ux-copy/SKILL.md +271 -0
  263. package/dist/agents/skills/codex/harness-ux-copy/skill.yaml +77 -0
  264. package/dist/agents/skills/codex/harness-verification/SKILL.md +421 -0
  265. package/dist/agents/skills/codex/harness-verification/skill.yaml +43 -0
  266. package/dist/agents/skills/codex/harness-verify/SKILL.md +159 -0
  267. package/dist/agents/skills/codex/harness-verify/skill.yaml +41 -0
  268. package/dist/agents/skills/codex/harness-visual-regression/SKILL.md +257 -0
  269. package/dist/agents/skills/codex/harness-visual-regression/skill.yaml +74 -0
  270. package/dist/agents/skills/codex/initialize-harness-project/SKILL.md +232 -0
  271. package/dist/agents/skills/codex/initialize-harness-project/skill.yaml +32 -0
  272. package/dist/agents/skills/codex/validate-context-engineering/SKILL.md +150 -0
  273. package/dist/agents/skills/codex/validate-context-engineering/skill.yaml +32 -0
  274. package/dist/agents/skills/cursor/add-harness-component/SKILL.md +192 -0
  275. package/dist/agents/skills/cursor/add-harness-component/skill.yaml +33 -0
  276. package/dist/agents/skills/cursor/align-documentation/SKILL.md +213 -0
  277. package/dist/agents/skills/cursor/align-documentation/skill.yaml +32 -0
  278. package/dist/agents/skills/cursor/check-mechanical-constraints/SKILL.md +191 -0
  279. package/dist/agents/skills/cursor/check-mechanical-constraints/skill.yaml +33 -0
  280. package/dist/agents/skills/cursor/cleanup-dead-code/SKILL.md +245 -0
  281. package/dist/agents/skills/cursor/cleanup-dead-code/skill.yaml +34 -0
  282. package/dist/agents/skills/cursor/detect-doc-drift/SKILL.md +179 -0
  283. package/dist/agents/skills/cursor/detect-doc-drift/skill.yaml +31 -0
  284. package/dist/agents/skills/cursor/enforce-architecture/SKILL.md +296 -0
  285. package/dist/agents/skills/cursor/enforce-architecture/skill.yaml +35 -0
  286. package/dist/agents/skills/cursor/harness-accessibility/SKILL.md +281 -0
  287. package/dist/agents/skills/cursor/harness-accessibility/skill.yaml +52 -0
  288. package/dist/agents/skills/cursor/harness-api-design/SKILL.md +356 -0
  289. package/dist/agents/skills/cursor/harness-api-design/skill.yaml +74 -0
  290. package/dist/agents/skills/cursor/harness-architecture-advisor/SKILL.md +449 -0
  291. package/dist/agents/skills/cursor/harness-architecture-advisor/skill.yaml +49 -0
  292. package/dist/agents/skills/cursor/harness-auth/SKILL.md +331 -0
  293. package/dist/agents/skills/cursor/harness-auth/skill.yaml +81 -0
  294. package/dist/agents/skills/cursor/harness-autopilot/SKILL.md +916 -0
  295. package/dist/agents/skills/cursor/harness-autopilot/skill.yaml +67 -0
  296. package/dist/agents/skills/cursor/harness-brainstorming/SKILL.md +406 -0
  297. package/dist/agents/skills/cursor/harness-brainstorming/skill.yaml +50 -0
  298. package/dist/agents/skills/cursor/harness-caching/SKILL.md +309 -0
  299. package/dist/agents/skills/cursor/harness-caching/skill.yaml +73 -0
  300. package/dist/agents/skills/cursor/harness-chaos/SKILL.md +295 -0
  301. package/dist/agents/skills/cursor/harness-chaos/skill.yaml +72 -0
  302. package/dist/agents/skills/cursor/harness-code-review/SKILL.md +857 -0
  303. package/dist/agents/skills/cursor/harness-code-review/skill.yaml +52 -0
  304. package/dist/agents/skills/cursor/harness-codebase-cleanup/SKILL.md +224 -0
  305. package/dist/agents/skills/cursor/harness-codebase-cleanup/skill.yaml +65 -0
  306. package/dist/agents/skills/cursor/harness-compliance/SKILL.md +303 -0
  307. package/dist/agents/skills/cursor/harness-compliance/skill.yaml +78 -0
  308. package/dist/agents/skills/cursor/harness-containerization/SKILL.md +284 -0
  309. package/dist/agents/skills/cursor/harness-containerization/skill.yaml +80 -0
  310. package/dist/agents/skills/cursor/harness-data-pipeline/SKILL.md +274 -0
  311. package/dist/agents/skills/cursor/harness-data-pipeline/skill.yaml +81 -0
  312. package/dist/agents/skills/cursor/harness-data-validation/SKILL.md +343 -0
  313. package/dist/agents/skills/cursor/harness-data-validation/skill.yaml +75 -0
  314. package/dist/agents/skills/cursor/harness-database/SKILL.md +310 -0
  315. package/dist/agents/skills/cursor/harness-database/skill.yaml +80 -0
  316. package/dist/agents/skills/cursor/harness-debugging/SKILL.md +366 -0
  317. package/dist/agents/skills/cursor/harness-debugging/skill.yaml +48 -0
  318. package/dist/agents/skills/cursor/harness-dependency-health/SKILL.md +179 -0
  319. package/dist/agents/skills/cursor/harness-dependency-health/skill.yaml +42 -0
  320. package/dist/agents/skills/cursor/harness-deployment/SKILL.md +307 -0
  321. package/dist/agents/skills/cursor/harness-deployment/skill.yaml +77 -0
  322. package/dist/agents/skills/cursor/harness-design/SKILL.md +265 -0
  323. package/dist/agents/skills/cursor/harness-design/skill.yaml +54 -0
  324. package/dist/agents/skills/cursor/harness-design-mobile/SKILL.md +336 -0
  325. package/dist/agents/skills/cursor/harness-design-mobile/skill.yaml +50 -0
  326. package/dist/agents/skills/cursor/harness-design-system/SKILL.md +282 -0
  327. package/dist/agents/skills/cursor/harness-design-system/skill.yaml +51 -0
  328. package/dist/agents/skills/cursor/harness-design-web/SKILL.md +360 -0
  329. package/dist/agents/skills/cursor/harness-design-web/skill.yaml +53 -0
  330. package/dist/agents/skills/cursor/harness-diagnostics/SKILL.md +318 -0
  331. package/dist/agents/skills/cursor/harness-diagnostics/skill.yaml +51 -0
  332. package/dist/agents/skills/cursor/harness-docs-pipeline/SKILL.md +460 -0
  333. package/dist/agents/skills/cursor/harness-docs-pipeline/skill.yaml +70 -0
  334. package/dist/agents/skills/cursor/harness-dx/SKILL.md +276 -0
  335. package/dist/agents/skills/cursor/harness-dx/skill.yaml +76 -0
  336. package/dist/agents/skills/cursor/harness-e2e/SKILL.md +245 -0
  337. package/dist/agents/skills/cursor/harness-e2e/skill.yaml +78 -0
  338. package/dist/agents/skills/cursor/harness-event-driven/SKILL.md +280 -0
  339. package/dist/agents/skills/cursor/harness-event-driven/skill.yaml +77 -0
  340. package/dist/agents/skills/cursor/harness-execution/SKILL.md +510 -0
  341. package/dist/agents/skills/cursor/harness-execution/skill.yaml +52 -0
  342. package/dist/agents/skills/cursor/harness-feature-flags/SKILL.md +287 -0
  343. package/dist/agents/skills/cursor/harness-feature-flags/skill.yaml +74 -0
  344. package/dist/agents/skills/cursor/harness-git-workflow/SKILL.md +268 -0
  345. package/dist/agents/skills/cursor/harness-git-workflow/skill.yaml +32 -0
  346. package/dist/agents/skills/cursor/harness-hotspot-detector/SKILL.md +161 -0
  347. package/dist/agents/skills/cursor/harness-hotspot-detector/skill.yaml +45 -0
  348. package/dist/agents/skills/cursor/harness-i18n/SKILL.md +484 -0
  349. package/dist/agents/skills/cursor/harness-i18n/skill.yaml +55 -0
  350. package/dist/agents/skills/cursor/harness-i18n-process/SKILL.md +388 -0
  351. package/dist/agents/skills/cursor/harness-i18n-process/skill.yaml +44 -0
  352. package/dist/agents/skills/cursor/harness-i18n-workflow/SKILL.md +512 -0
  353. package/dist/agents/skills/cursor/harness-i18n-workflow/skill.yaml +54 -0
  354. package/dist/agents/skills/cursor/harness-impact-analysis/SKILL.md +184 -0
  355. package/dist/agents/skills/cursor/harness-impact-analysis/skill.yaml +45 -0
  356. package/dist/agents/skills/cursor/harness-incident-response/SKILL.md +223 -0
  357. package/dist/agents/skills/cursor/harness-incident-response/skill.yaml +78 -0
  358. package/dist/agents/skills/cursor/harness-infrastructure-as-code/SKILL.md +279 -0
  359. package/dist/agents/skills/cursor/harness-infrastructure-as-code/skill.yaml +80 -0
  360. package/dist/agents/skills/cursor/harness-integration-test/SKILL.md +271 -0
  361. package/dist/agents/skills/cursor/harness-integration-test/skill.yaml +73 -0
  362. package/dist/agents/skills/cursor/harness-integrity/SKILL.md +167 -0
  363. package/dist/agents/skills/cursor/harness-integrity/skill.yaml +48 -0
  364. package/dist/agents/skills/cursor/harness-knowledge-mapper/SKILL.md +195 -0
  365. package/dist/agents/skills/cursor/harness-knowledge-mapper/skill.yaml +50 -0
  366. package/dist/agents/skills/cursor/harness-load-testing/SKILL.md +274 -0
  367. package/dist/agents/skills/cursor/harness-load-testing/skill.yaml +79 -0
  368. package/dist/agents/skills/cursor/harness-ml-ops/SKILL.md +341 -0
  369. package/dist/agents/skills/cursor/harness-ml-ops/skill.yaml +79 -0
  370. package/dist/agents/skills/cursor/harness-mobile-patterns/SKILL.md +326 -0
  371. package/dist/agents/skills/cursor/harness-mobile-patterns/skill.yaml +82 -0
  372. package/dist/agents/skills/cursor/harness-mutation-test/SKILL.md +251 -0
  373. package/dist/agents/skills/cursor/harness-mutation-test/skill.yaml +70 -0
  374. package/dist/agents/skills/cursor/harness-observability/SKILL.md +283 -0
  375. package/dist/agents/skills/cursor/harness-observability/skill.yaml +78 -0
  376. package/dist/agents/skills/cursor/harness-onboarding/SKILL.md +288 -0
  377. package/dist/agents/skills/cursor/harness-onboarding/skill.yaml +31 -0
  378. package/dist/agents/skills/cursor/harness-parallel-agents/SKILL.md +256 -0
  379. package/dist/agents/skills/cursor/harness-parallel-agents/skill.yaml +34 -0
  380. package/dist/agents/skills/cursor/harness-perf/SKILL.md +260 -0
  381. package/dist/agents/skills/cursor/harness-perf/skill.yaml +51 -0
  382. package/dist/agents/skills/cursor/harness-perf-tdd/SKILL.md +249 -0
  383. package/dist/agents/skills/cursor/harness-perf-tdd/skill.yaml +48 -0
  384. package/dist/agents/skills/cursor/harness-planning/SKILL.md +579 -0
  385. package/dist/agents/skills/cursor/harness-planning/skill.yaml +56 -0
  386. package/dist/agents/skills/cursor/harness-pre-commit-review/SKILL.md +324 -0
  387. package/dist/agents/skills/cursor/harness-pre-commit-review/skill.yaml +34 -0
  388. package/dist/agents/skills/cursor/harness-product-spec/SKILL.md +285 -0
  389. package/dist/agents/skills/cursor/harness-product-spec/skill.yaml +72 -0
  390. package/dist/agents/skills/cursor/harness-property-test/SKILL.md +281 -0
  391. package/dist/agents/skills/cursor/harness-property-test/skill.yaml +71 -0
  392. package/dist/agents/skills/cursor/harness-refactoring/SKILL.md +169 -0
  393. package/dist/agents/skills/cursor/harness-refactoring/skill.yaml +34 -0
  394. package/dist/agents/skills/cursor/harness-release-readiness/SKILL.md +689 -0
  395. package/dist/agents/skills/cursor/harness-release-readiness/skill.yaml +58 -0
  396. package/dist/agents/skills/cursor/harness-resilience/SKILL.md +255 -0
  397. package/dist/agents/skills/cursor/harness-resilience/skill.yaml +76 -0
  398. package/dist/agents/skills/cursor/harness-roadmap/SKILL.md +595 -0
  399. package/dist/agents/skills/cursor/harness-roadmap/skill.yaml +44 -0
  400. package/dist/agents/skills/cursor/harness-secrets/SKILL.md +293 -0
  401. package/dist/agents/skills/cursor/harness-secrets/skill.yaml +76 -0
  402. package/dist/agents/skills/cursor/harness-security-review/SKILL.md +260 -0
  403. package/dist/agents/skills/cursor/harness-security-review/skill.yaml +53 -0
  404. package/dist/agents/skills/cursor/harness-security-scan/SKILL.md +154 -0
  405. package/dist/agents/skills/cursor/harness-security-scan/skill.yaml +42 -0
  406. package/dist/agents/skills/cursor/harness-skill-authoring/SKILL.md +292 -0
  407. package/dist/agents/skills/cursor/harness-skill-authoring/skill.yaml +33 -0
  408. package/dist/agents/skills/cursor/harness-soundness-review/SKILL.md +1267 -0
  409. package/dist/agents/skills/cursor/harness-soundness-review/skill.yaml +49 -0
  410. package/dist/agents/skills/cursor/harness-sql-review/SKILL.md +315 -0
  411. package/dist/agents/skills/cursor/harness-sql-review/skill.yaml +74 -0
  412. package/dist/agents/skills/cursor/harness-state-management/SKILL.md +309 -0
  413. package/dist/agents/skills/cursor/harness-state-management/skill.yaml +33 -0
  414. package/dist/agents/skills/cursor/harness-supply-chain-audit/SKILL.md +281 -0
  415. package/dist/agents/skills/cursor/harness-supply-chain-audit/skill.yaml +51 -0
  416. package/dist/agents/skills/cursor/harness-tdd/SKILL.md +177 -0
  417. package/dist/agents/skills/cursor/harness-tdd/skill.yaml +49 -0
  418. package/dist/agents/skills/cursor/harness-test-advisor/SKILL.md +160 -0
  419. package/dist/agents/skills/cursor/harness-test-advisor/skill.yaml +45 -0
  420. package/dist/agents/skills/cursor/harness-test-data/SKILL.md +268 -0
  421. package/dist/agents/skills/cursor/harness-test-data/skill.yaml +74 -0
  422. package/dist/agents/skills/cursor/harness-ux-copy/SKILL.md +271 -0
  423. package/dist/agents/skills/cursor/harness-ux-copy/skill.yaml +77 -0
  424. package/dist/agents/skills/cursor/harness-verification/SKILL.md +421 -0
  425. package/dist/agents/skills/cursor/harness-verification/skill.yaml +43 -0
  426. package/dist/agents/skills/cursor/harness-verify/SKILL.md +159 -0
  427. package/dist/agents/skills/cursor/harness-verify/skill.yaml +41 -0
  428. package/dist/agents/skills/cursor/harness-visual-regression/SKILL.md +257 -0
  429. package/dist/agents/skills/cursor/harness-visual-regression/skill.yaml +74 -0
  430. package/dist/agents/skills/cursor/initialize-harness-project/SKILL.md +232 -0
  431. package/dist/agents/skills/cursor/initialize-harness-project/skill.yaml +32 -0
  432. package/dist/agents/skills/cursor/validate-context-engineering/SKILL.md +150 -0
  433. package/dist/agents/skills/cursor/validate-context-engineering/skill.yaml +32 -0
  434. package/dist/agents/skills/gemini-cli/enforce-architecture/SKILL.md +52 -0
  435. package/dist/agents/skills/gemini-cli/harness-api-design/SKILL.md +52 -0
  436. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/SKILL.md +52 -0
  437. package/dist/agents/skills/gemini-cli/harness-auth/SKILL.md +52 -0
  438. package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +355 -45
  439. package/dist/agents/skills/gemini-cli/harness-autopilot/skill.yaml +12 -0
  440. package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +97 -3
  441. package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +6 -0
  442. package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/SKILL.md +2 -4
  443. package/dist/agents/skills/gemini-cli/harness-database/SKILL.md +52 -0
  444. package/dist/agents/skills/gemini-cli/harness-deployment/SKILL.md +52 -0
  445. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +99 -3
  446. package/dist/agents/skills/gemini-cli/harness-planning/skill.yaml +6 -0
  447. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/SKILL.md +1 -1
  448. package/dist/agents/skills/gemini-cli/harness-product-spec/SKILL.md +5 -5
  449. package/dist/agents/skills/gemini-cli/harness-security-review/SKILL.md +27 -7
  450. package/dist/agents/skills/gemini-cli/harness-security-scan/SKILL.md +52 -0
  451. package/dist/agents/skills/gemini-cli/harness-supply-chain-audit/SKILL.md +281 -0
  452. package/dist/agents/skills/gemini-cli/harness-supply-chain-audit/skill.yaml +51 -0
  453. package/dist/agents/skills/package.json +1 -0
  454. package/dist/agents/skills/templates/discipline-template.md +49 -0
  455. package/dist/agents/skills/tests/schema.ts +1 -1
  456. package/dist/agents/skills/vitest.config.mts +5 -0
  457. package/dist/{agents-md-YTYQDA3P.js → agents-md-VYDFPIRW.js} +1 -1
  458. package/dist/{architecture-JQZYM4US.js → architecture-K5HSRBGB.js} +2 -2
  459. package/dist/bin/harness-mcp.js +13 -13
  460. package/dist/bin/harness.js +21 -19
  461. package/dist/{check-phase-gate-L3RADYWO.js → check-phase-gate-5AS6SXL6.js} +3 -3
  462. package/dist/{chunk-6KTUUFRN.js → chunk-5ZXHMCPL.js} +1 -1
  463. package/dist/{chunk-RCWZBSK5.js → chunk-6KWBH4EO.js} +1 -1
  464. package/dist/{chunk-ABQHQ6I5.js → chunk-ALFKNAZW.js} +2436 -233
  465. package/dist/{chunk-OXLLOSSR.js → chunk-AV6KMDO5.js} +2 -2
  466. package/dist/{chunk-7IP4JIFL.js → chunk-C7DTKLPW.js} +4 -4
  467. package/dist/{chunk-ZOAWBDWU.js → chunk-CJDVBBPB.js} +5 -1
  468. package/dist/{chunk-YPYGXRDR.js → chunk-DNDBFIZN.js} +18 -4
  469. package/dist/{chunk-XYLGHKG6.js → chunk-HKUX2X7O.js} +11 -2
  470. package/dist/{chunk-YZD2MRNQ.js → chunk-JOP2NDNB.js} +684 -142
  471. package/dist/{chunk-YBJ262QL.js → chunk-LRG3B43J.js} +1 -1
  472. package/dist/{chunk-AOZRDOIP.js → chunk-M6TIO6NF.js} +1 -1
  473. package/dist/{chunk-O5OJVPL6.js → chunk-OCDDCGDE.js} +9 -1
  474. package/dist/{chunk-OSXBPAMK.js → chunk-QDF7COPQ.js} +1 -1
  475. package/dist/{chunk-TPOTOBR7.js → chunk-RWZPHW4H.js} +3 -3
  476. package/dist/{chunk-3C2MLBPJ.js → chunk-SFRGPAK6.js} +1 -1
  477. package/dist/{chunk-XKECDXJS.js → chunk-SHYWICGA.js} +2184 -456
  478. package/dist/{chunk-S2FXOWOR.js → chunk-TF6ZLHJV.js} +2 -2
  479. package/dist/{chunk-NLVUVUGD.js → chunk-ZJMU7MEV.js} +1 -1
  480. package/dist/{ci-workflow-EQZFVX3P.js → ci-workflow-CRWU723U.js} +1 -1
  481. package/dist/{create-skill-XSWHMSM5.js → create-skill-NDXQSTIK.js} +2 -2
  482. package/dist/{dist-HWXF2C3R.js → dist-4LPXJYVZ.js} +105 -1
  483. package/dist/{docs-7ECGYMAV.js → docs-4JRHTLUZ.js} +3 -3
  484. package/dist/{engine-EG4EH4IX.js → engine-3G3VIM6L.js} +1 -1
  485. package/dist/{entropy-5USWKLVS.js → entropy-G6CZ2A6P.js} +2 -2
  486. package/dist/{feedback-UTBXZZHF.js → feedback-QYKQ65HB.js} +1 -1
  487. package/dist/{generate-agent-definitions-3PM5EU7V.js → generate-agent-definitions-SAAOAPT4.js} +3 -3
  488. package/dist/index.d.ts +25 -4
  489. package/dist/index.js +18 -18
  490. package/dist/{loader-ZPALXIVR.js → loader-VCOK3PF7.js} +1 -1
  491. package/dist/{mcp-362EZHF4.js → mcp-YENEPHBW.js} +13 -13
  492. package/dist/{performance-OQAFMJUD.js → performance-UBCFI2UP.js} +4 -2
  493. package/dist/{review-pipeline-C4GCFVGP.js → review-pipeline-IQAVCWAX.js} +1 -1
  494. package/dist/{runtime-7YLVK453.js → runtime-PYFFIESU.js} +1 -1
  495. package/dist/{security-PZOX7AQS.js → security-ZDADTPYW.js} +1 -1
  496. package/dist/{skill-executor-XZLYZYAK.js → skill-executor-XEVDGXUM.js} +2 -2
  497. package/dist/{validate-FD3Z6VJD.js → validate-VRTUHALQ.js} +2 -2
  498. package/dist/{validate-cross-check-WNJM6H2D.js → validate-cross-check-4Y6NHNK3.js} +1 -1
  499. package/package.json +8 -5
@@ -0,0 +1,857 @@
1
+ # Harness Code Review
2
+
3
+ > Multi-phase code review pipeline — mechanical checks, graph-scoped context, parallel review agents, cross-agent deduplication, and structured output with technical rigor over social performance.
4
+
5
+ ## When to Use
6
+
7
+ - When performing a code review (manual invocation or triggered by `on_pr` / `on_review`)
8
+ - When requesting a review of completed work (see Role A at the end of this document)
9
+ - When responding to review feedback (see Role C at the end of this document)
10
+ - NOT for in-progress work (complete the feature first)
11
+ - NOT for rubber-stamping (if you cannot find issues, look harder or state confidence level)
12
+ - NOT for style-only feedback (leave that to linters and mechanical checks)
13
+
14
+ ## Process
15
+
16
+ The review runs as a 7-phase pipeline. Each phase has a clear input, output, and exit condition.
17
+
18
+ ```
19
+ Phase 1: GATE ──→ Phase 2: MECHANICAL ──→ Phase 3: CONTEXT ──→ Phase 4: FAN-OUT
20
+
21
+ Phase 7: OUTPUT ←── Phase 6: DEDUP+MERGE ←── Phase 5: VALIDATE ←──────┘
22
+ ```
23
+
24
+ | Phase | Tier | Purpose | Exit Condition |
25
+ | -------------- | ----- | -------------------------------------------------- | ----------------------------------------------------- |
26
+ | 1. GATE | fast | Skip ineligible PRs (CI mode only) | PR is eligible, or exit with reason |
27
+ | 2. MECHANICAL | none | Lint, typecheck, test, security scan | All pass → continue; any fail → report and stop |
28
+ | 3. CONTEXT | fast | Scope context per review domain | Context bundles assembled for each subagent |
29
+ | 4. FAN-OUT | mixed | Parallel review subagents | All subagents return findings in ReviewFinding schema |
30
+ | 5. VALIDATE | none | Exclude mechanical duplicates, verify reachability | Unvalidated findings discarded |
31
+ | 6. DEDUP+MERGE | none | Group, merge, assign final severity | Deduplicated finding list with merged evidence |
32
+ | 7. OUTPUT | none | Text output or inline GitHub comments | Review delivered, exit code set |
33
+
34
+ ### Finding Schema
35
+
36
+ Each review agent produces findings in this common format:
37
+
38
+ ```typescript
39
+ interface ReviewFinding {
40
+ id: string; // unique, for dedup
41
+ file: string; // file path
42
+ lineRange: [number, number]; // start, end
43
+ domain: 'compliance' | 'bug' | 'security' | 'architecture';
44
+ severity: 'critical' | 'important' | 'suggestion';
45
+ title: string; // one-line summary
46
+ rationale: string; // why this is an issue
47
+ suggestion?: string; // fix, if available
48
+ evidence: string[]; // supporting context from agent
49
+ validatedBy: 'mechanical' | 'graph' | 'heuristic';
50
+ }
51
+ ```
52
+
53
+ ### Flags
54
+
55
+ | Flag | Effect |
56
+ | ----------------- | ------------------------------------------------------------------------------------------- |
57
+ | `--comment` | Post inline comments to GitHub PR via `gh` CLI or GitHub MCP |
58
+ | `--deep` | Pass `--deep` to `harness-security-review` for threat modeling in the security fan-out slot |
59
+ | `--no-mechanical` | Skip mechanical checks (useful if already run in CI) |
60
+ | `--ci` | Enable eligibility gate, non-interactive output |
61
+ | `--fast` | Reduced rigor: skip learnings integration, fast-tier agents for all fan-out slots |
62
+ | `--thorough` | Maximum rigor: always load learnings, full agent roster + meta-judge, learnings in output |
63
+
64
+ ### Rigor Levels
65
+
66
+ The `rigorLevel` is set via `--fast` or `--thorough` flags (or passed by autopilot). Default is `standard`. Rigor controls learnings integration, agent tier selection, and output verbosity.
67
+
68
+ | Phase | `fast` | `standard` (default) | `thorough` |
69
+ | ---------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
70
+ | 3. CONTEXT | Skip learnings integration entirely. No `filterByRelevance` call. | Load learnings if `.harness/review-learnings.md` exists. Score and filter via `filterByRelevance`. | Always load learnings. Score and filter via `filterByRelevance`. Fail loudly if learnings file is missing. |
71
+ | 4. FAN-OUT | All agents run at fast tier. Reduced focus areas. | Default tier assignments (see Model Tiers table). | Full agent roster at default tiers + meta-judge pass that cross-validates findings across domains. |
72
+ | 7. OUTPUT | Standard output format. | Standard output format. | Include a "Learnings Applied" section listing which learnings influenced the review and their relevance scores. |
73
+
74
+ When `rigorLevel` is `fast`, the pipeline optimizes for speed: learnings are skipped entirely and all fan-out agents run at fast tier. When `rigorLevel` is `thorough`, the pipeline optimizes for depth: learnings are always scored and included, the full agent roster runs, a meta-judge validates cross-domain findings, and the output includes which learnings were applied.
75
+
76
+ ### Model Tiers
77
+
78
+ Tiers are abstract labels resolved at runtime from project config. If no config exists, all phases use the current model (no tiering).
79
+
80
+ | Tier | Default | Used By |
81
+ | ---------- | ------------ | ------------------------------------ |
82
+ | `fast` | haiku-class | GATE, CONTEXT |
83
+ | `standard` | sonnet-class | Compliance agent, Architecture agent |
84
+ | `strong` | opus-class | Bug Detection agent, Security agent |
85
+
86
+ ### Review Learnings Calibration
87
+
88
+ Before starting the pipeline, check for a project-specific calibration file. Learnings integration is gated by rigor level:
89
+
90
+ - **`fast`:** Skip this section entirely. Do not read or score learnings.
91
+ - **`standard`:** Read learnings if the file exists. Score and filter. If the file does not exist, proceed with default focus areas.
92
+ - **`thorough`:** Always read learnings. If `.harness/review-learnings.md` does not exist, log a warning: "No review-learnings.md found -- thorough mode expects calibration data."
93
+
94
+ ```bash
95
+ cat .harness/review-learnings.md 2>/dev/null
96
+ ```
97
+
98
+ If `.harness/review-learnings.md` exists (and rigor is not `fast`):
99
+
100
+ 1. **Read the Useful Findings section.** Prioritize these categories during review — they have historically caught real issues in this project.
101
+ 2. **Read the Noise / False Positives section.** De-prioritize or skip these categories — flagging them wastes the author's time and erodes trust in the review process.
102
+ 3. **Read the Calibration Notes section.** Apply these project-specific overrides to your review judgment. These represent deliberate team decisions, not oversights.
103
+
104
+ #### Learnings Relevance Scoring
105
+
106
+ When learnings are loaded (standard or thorough mode), score them against the diff context before applying:
107
+
108
+ 1. **Build the diff context string.** Concatenate: changed file paths (one per line) + diff summary (commit message or PR description).
109
+ 2. **Score each learning** using `filterByRelevance(learnings, diffContext, 0.7, 1000)` from `packages/core/src/state/learnings-relevance.ts`.
110
+ - Each learning is scored against the diff context via Jaccard similarity.
111
+ - Only learnings scoring >= 0.7 are retained.
112
+ - Results are sorted by score descending.
113
+ - Results are truncated to fit within the 1000-token budget.
114
+ 3. **Apply filtered learnings** to the review focus areas:
115
+ - Useful Findings entries that pass the filter: boost priority for those categories.
116
+ - Noise/False Positive entries that pass the filter: actively suppress those patterns.
117
+ - Calibration Notes entries that pass the filter: apply as overrides.
118
+ 4. **If no learnings pass the 0.7 threshold,** proceed with default focus areas. Do not fall back to unscored inclusion.
119
+
120
+ If the file does not exist and rigor is `standard`, proceed with default review focus areas. After completing the review, consider suggesting that the team create `.harness/review-learnings.md` if you notice patterns that would benefit from calibration.
121
+
122
+ ## Pipeline Phases
123
+
124
+ ### Phase 1: GATE
125
+
126
+ **Tier:** fast
127
+ **Mode:** CI only (`--ci` flag). When invoked manually, skip this phase entirely.
128
+
129
+ Check whether the PR should be reviewed at all. This prevents wasted compute in CI pipelines.
130
+
131
+ **Checks:**
132
+
133
+ 1. **PR state:** Is the PR closed or merged? → Skip with reason "PR is closed."
134
+ 2. **Draft status:** Is the PR marked as draft? → Skip with reason "PR is draft."
135
+ 3. **Trivial change:** Is the diff documentation-only (all changed files are `.md`)? → Skip with reason "Documentation-only change."
136
+ 4. **Already reviewed:** Has this exact commit range been reviewed before (check for prior review comment from this tool)? → Skip with reason "Already reviewed at {sha}."
137
+
138
+ ```bash
139
+ # Check PR state
140
+ gh pr view --json state,isDraft,files
141
+
142
+ # Check if documentation-only
143
+ gh pr diff --name-only | grep -v '\.md$' | wc -l # 0 means docs-only
144
+ ```
145
+
146
+ **Exit:** If any check triggers a skip, output the reason and exit with code 0. Otherwise, continue to Phase 2.
147
+
148
+ ---
149
+
150
+ ### Phase 2: MECHANICAL
151
+
152
+ **Tier:** none (no LLM)
153
+ **Mode:** Skipped if `--no-mechanical` flag is set.
154
+
155
+ Run mechanical checks to establish an exclusion boundary. Any issue caught mechanically is excluded from AI review (Phase 4) to prevent duplicate findings.
156
+
157
+ **Checks:**
158
+
159
+ 1. **Harness validation:** Use `assess_project` to run all harness health checks in parallel:
160
+ ```json
161
+ assess_project({
162
+ path: "<project-root>",
163
+ checks: ["validate", "deps", "docs"],
164
+ mode: "detailed"
165
+ })
166
+ ```
167
+ This runs `harness validate`, `harness check-deps`, and `harness check-docs` in parallel and returns a unified report. Any check failure is reported in the `checks` array with `passed: false`.
168
+ 2. **Security scan:** Run `run_security_scan` MCP tool on changed files. Record findings with rule ID, file, line, and remediation.
169
+ 3. **Type checking:** Run the project's type checker (e.g., `tsc --noEmit`). Record any type errors.
170
+ 4. **Linting:** Run the project's linter (e.g., `eslint`). Record any lint violations.
171
+ 5. **Tests:** Run the project's test suite. Record any failures.
172
+
173
+ **Output:** A set of mechanical findings (file, line, tool, message). This set becomes the exclusion list for Phase 5.
174
+
175
+ #### Evidence Gate (session-aware)
176
+
177
+ When a `sessionSlug` is available (e.g., via autopilot dispatch or `--session` flag), the pipeline loads evidence entries from the session state and cross-references them with review findings:
178
+
179
+ 1. Load evidence entries: `readSessionSection(projectRoot, sessionSlug, 'evidence')`
180
+ 2. For each finding, check if any active evidence entry references the same file:line location
181
+ 3. Findings without matching evidence are tagged with `[UNVERIFIED]` prefix in their title
182
+ 4. An evidence coverage report is appended to the review output:
183
+ ```
184
+ Evidence Coverage:
185
+ Evidence entries: 12
186
+ Findings with evidence: 8/10
187
+ Uncited findings: 2 (flagged as [UNVERIFIED])
188
+ Coverage: 80%
189
+ ```
190
+
191
+ When no session is available, evidence checking is skipped silently. This is not an error -- evidence checking enhances reviews but does not gate them.
192
+
193
+ **Exit:** If any mechanical check fails (harness validate, typecheck, or tests), report the mechanical failures in Strengths/Issues/Assessment format and stop the pipeline. The code has fundamental issues that must be fixed before AI review adds value. Lint warnings and security scan findings do not stop the pipeline — they are recorded for exclusion only.
194
+
195
+ ---
196
+
197
+ ### Phase 3: CONTEXT
198
+
199
+ **Tier:** fast
200
+ **Purpose:** Assemble scoped context bundles for each review domain. Each subagent in Phase 4 receives only the context relevant to its domain, not the full diff.
201
+
202
+ #### Change-Type Detection
203
+
204
+ Before scoping context, determine the change type. This shapes which review focus areas apply.
205
+
206
+ 1. **Commit message prefix:** Parse the most recent commit message for conventional commit prefixes:
207
+ - `feat:` or `feature:` → **feature**
208
+ - `fix:` or `bugfix:` → **bugfix**
209
+ - `refactor:` → **refactor**
210
+ - `docs:` or `doc:` → **docs**
211
+ 2. **Diff pattern heuristic:** If no prefix is found, examine the diff:
212
+ - New files added + tests added → likely **feature**
213
+ - Small changes to existing files + test added → likely **bugfix**
214
+ - File renames, moves, or restructuring with no behavior change → likely **refactor**
215
+ - Only `.md` files or comments changed → likely **docs**
216
+ 3. **Default:** If detection is ambiguous, treat as **feature** (the most thorough review).
217
+
218
+ ```bash
219
+ # Parse commit message prefix
220
+ git log --oneline -1 | head -1
221
+
222
+ # Check for new files
223
+ git diff --name-status HEAD~1 | grep "^A"
224
+
225
+ # Check if only docs changed
226
+ git diff --name-only HEAD~1 | grep -v '\.md$' | wc -l # 0 means docs-only
227
+ ```
228
+
229
+ #### Context Scoping
230
+
231
+ Scope context per review domain. When a knowledge graph exists at `.harness/graph/`, use graph queries. Otherwise, fall back to file-based heuristics.
232
+
233
+ | Domain | With Graph | Without Graph (Fallback) |
234
+ | ----------------- | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------- |
235
+ | **Compliance** | Convention files (`CLAUDE.md`, `AGENTS.md`, `.harness/`) + changed files | Convention files + changed files (same — no graph needed) |
236
+ | **Bug Detection** | Changed files + direct dependencies via `query_graph` | Changed files + files imported by changed files (`grep import`) |
237
+ | **Security** | Security-relevant paths + data flow traversal via `query_graph` | Changed files + files containing security-sensitive patterns (auth, crypto, SQL, shell) |
238
+ | **Architecture** | Layer boundaries + import graph via `query_graph` + `get_impact` | Changed files + `harness check-deps` output |
239
+
240
+ #### 1:1 Context Ratio Rule
241
+
242
+ For every N lines of diff, gather approximately N lines of surrounding context:
243
+
244
+ - **Small diffs (<20 lines):** Gather proportionally more context — aim for 3:1 context-to-diff.
245
+ - **Medium diffs (20-200 lines):** Target 1:1 ratio. Read full files containing changes, plus immediate dependencies.
246
+ - **Large diffs (>200 lines):** 1:1 ratio is the floor. Prioritize ruthlessly. Flag large diffs as a review concern.
247
+
248
+ #### Context Gathering Priority Order
249
+
250
+ Gather context in this order until the ratio is met:
251
+
252
+ 1. **Files directly imported/referenced by changed files** — read the modules the changed code calls or depends on.
253
+ 2. **Corresponding test files** — find tests for changed code. If tests are missing, note this as a finding.
254
+ 3. **Spec/design docs mentioning changed components** — search `docs/changes/`, `docs/design-docs/`, `docs/plans/`.
255
+ 4. **Type definitions used by changed code** — read interfaces, types, schemas consumed or produced.
256
+ 5. **Recent commits touching the same files** — see Commit History below.
257
+
258
+ #### Graph-Enhanced Context (when available)
259
+
260
+ When a knowledge graph exists at `.harness/graph/`, use `gather_context` for efficient context assembly:
261
+
262
+ ```json
263
+ gather_context({
264
+ path: "<project-root>",
265
+ intent: "Code review of <change description>",
266
+ skill: "harness-code-review",
267
+ session: "<session-slug-if-provided>",
268
+ tokenBudget: 8000,
269
+ include: ["graph", "learnings", "validation"]
270
+ })
271
+ ```
272
+
273
+ This replaces manual `query_graph` + `get_impact` + `find_context_for` calls with a single composite call that assembles review context in parallel, ranked by relevance. Falls back gracefully when no graph is available (`meta.graphAvailable: false`). When `session` is provided (e.g., via autopilot dispatch), learnings and state are scoped to the session directory. If no session is known, omit the parameter — `gather_context` falls back to global files.
274
+
275
+ For domain-specific scoping (compliance, bug detection, security, architecture), supplement `gather_context` output with targeted `query_graph` calls as needed.
276
+
277
+ #### Context Assembly Commands
278
+
279
+ ```bash
280
+ # 1. Get the diff and measure its size
281
+ git diff --stat HEAD~1 # or the relevant commit range
282
+ git diff HEAD~1 -- <file> # per-file diff
283
+
284
+ # 2. Find imports/references in changed files
285
+ grep -n "import\|require\|from " <changed-file>
286
+
287
+ # 3. Find corresponding test files
288
+ find . -name "*<module-name>*test*" -o -name "*<module-name>*spec*"
289
+
290
+ # 4. Search for spec/design references
291
+ grep -rl "<component-name>" docs/changes/ docs/design-docs/ docs/plans/
292
+
293
+ # 5. Find type definitions
294
+ grep -rn "interface\|type\|schema" <changed-file> | head -20
295
+ ```
296
+
297
+ #### Commit History Context
298
+
299
+ Retrieve recent commit history for every affected file:
300
+
301
+ ```bash
302
+ # Recent commits touching affected files (5 per file)
303
+ git log --oneline -5 -- <affected-file>
304
+ ```
305
+
306
+ Use commit history to answer:
307
+
308
+ - **Is this a hotspot?** Changed 3+ times in last 5 commits → volatile, pay extra attention.
309
+ - **Was this recently refactored?** Recent "refactor" commits → check alignment with refactoring direction.
310
+ - **Who has been working here?** Multiple authors → look for conflicting assumptions.
311
+ - **What was the last change?** Bugfix followed by change in same area → yellow flag.
312
+
313
+ **Exit:** Context bundles are assembled for each of the four review domains. Continue to Phase 4.
314
+
315
+ ---
316
+
317
+ ### Phase 4: FAN-OUT
318
+
319
+ **Tier:** mixed (see per-agent tiers below)
320
+ **Purpose:** Run four parallel review subagents, each with domain-scoped context from Phase 3. Each agent produces findings in the `ReviewFinding` schema.
321
+
322
+ **Rigor overrides:**
323
+
324
+ - **`fast`:** All four agents run at **fast tier** (haiku-class). Focus areas are unchanged but agents operate with reduced reasoning depth.
325
+ - **`standard`:** Default tier assignments as listed per agent below.
326
+ - **`thorough`:** Default tier assignments + a **meta-judge pass** after all agents return. The meta-judge (strong tier) cross-validates findings across domains: confirms findings cited by multiple agents, flags contradictions, and surfaces cross-cutting concerns that individual agents missed.
327
+
328
+ #### Compliance Agent (standard tier)
329
+
330
+ Reviews adherence to project conventions, standards, and documentation requirements.
331
+
332
+ **Input:** Compliance context bundle (convention files + changed files + change type)
333
+
334
+ **Focus by change type:**
335
+
336
+ _Feature:_
337
+
338
+ - [ ] **Spec alignment:** Does the implementation match the spec/design doc? Are all specified behaviors present?
339
+ - [ ] **API surface:** Are new public interfaces minimal and well-named? Could any new export be kept internal?
340
+ - [ ] **Backward compatibility:** Does this break existing callers? If so, is the migration path documented?
341
+
342
+ _Bugfix:_
343
+
344
+ - [ ] **Root cause identified:** Does the fix address the root cause, not just the symptom?
345
+ - [ ] **Original issue referenced:** Does the commit or PR reference the bug report or issue number?
346
+ - [ ] **No collateral changes:** Does the fix change only what is necessary?
347
+
348
+ _Refactor:_
349
+
350
+ - [ ] **Behavioral equivalence:** Do all existing tests still pass without modification?
351
+ - [ ] **No functionality changes:** Does the refactor introduce any new behavior?
352
+
353
+ _Docs:_
354
+
355
+ - [ ] **Accuracy vs. current code:** Do documented behaviors match what the code actually does?
356
+ - [ ] **Completeness:** Are all public interfaces documented?
357
+ - [ ] **Consistency:** Does new documentation follow existing style and terminology?
358
+ - [ ] **Links valid:** Do all internal links resolve?
359
+
360
+ **Output:** `ReviewFinding[]` with `domain: 'compliance'`
361
+
362
+ ---
363
+
364
+ #### Bug Detection Agent (strong tier)
365
+
366
+ Reviews for logic errors, edge cases, and correctness issues.
367
+
368
+ **Input:** Bug detection context bundle (changed files + dependencies)
369
+
370
+ **Focus areas:**
371
+
372
+ - [ ] **Edge cases:** Boundary conditions (empty input, max values, null, concurrent access)
373
+ - [ ] **Error handling:** Errors handled at appropriate level, helpful messages, no silent swallowing
374
+ - [ ] **Logic errors:** Off-by-one, incorrect boolean logic, missing early returns
375
+ - [ ] **Race conditions:** Concurrent access to shared state, missing locks or atomic operations
376
+ - [ ] **Resource leaks:** Unclosed handles, missing cleanup in error paths
377
+ - [ ] **Type safety:** Type mismatches, unsafe casts, missing null checks
378
+ - [ ] **Test coverage:** Tests for happy path, error paths, and edge cases. Coverage meaningful, not just present.
379
+ - [ ] **Regression tests:** For bugfixes — test that would have caught the bug before the fix
380
+
381
+ **Output:** `ReviewFinding[]` with `domain: 'bug'`
382
+
383
+ ---
384
+
385
+ #### Security Agent (strong tier) -- via harness-security-review
386
+
387
+ Invokes `harness-security-review` in changed-files mode as the security slot in the fan-out.
388
+
389
+ **Input:** Security context bundle (security-relevant paths + data flows)
390
+
391
+ **Invocation:** The pipeline invokes `harness-security-review` with scope `changed-files`. The skill:
392
+
393
+ - Skips its own Phase 1 (SCAN) -- reads mechanical findings from PipelineContext (Phase 2 already ran `run_security_scan`)
394
+ - Runs Phase 2 (REVIEW) -- OWASP baseline + stack-adaptive on changed files and their direct imports
395
+ - Skips Phase 3 (THREAT-MODEL) unless `--deep` was passed to code review
396
+ - Returns `ReviewFinding[]` with populated security fields (`cweId`, `owaspCategory`, `confidence`, `remediation`, `references`)
397
+
398
+ If `--deep` flag is set on code review, additionally pass `--deep` to `harness-security-review` for threat modeling.
399
+
400
+ **Focus areas:**
401
+
402
+ 1. **Semantic security review** (issues mechanical scanners cannot catch):
403
+ - User input flowing through multiple functions to dangerous sinks (SQL, shell, HTML)
404
+ - Missing authorization checks on new or modified endpoints
405
+ - Sensitive data exposed in logs, error messages, or API responses
406
+ - Authentication bypass paths introduced by the change
407
+ - Insecure defaults in new configuration options
408
+
409
+ 2. **Stack-adaptive focus:** Based on the project's tech stack:
410
+ - Node.js: prototype pollution, ReDoS, path traversal
411
+ - React: XSS, dangerouslySetInnerHTML, state injection
412
+ - Go: race conditions, integer overflow, unsafe pointer
413
+ - Python: pickle deserialization, SSTI, command injection
414
+
415
+ 3. **CWE/OWASP references:** All security findings include `cweId`, `owaspCategory`, and `remediation` fields.
416
+
417
+ Security findings with confirmed vulnerabilities are always `severity: 'critical'`.
418
+
419
+ **Dedup with mechanical scan:** The pipeline's Phase 5 (VALIDATE) uses the exclusion set from Phase 2 mechanical findings to discard any security-review finding that overlaps with an already-reported mechanical finding. This prevents duplicate reporting of the same issue.
420
+
421
+ **Output:** `ReviewFinding[]` with `domain: 'security'`
422
+
423
+ ---
424
+
425
+ #### Architecture Agent (standard tier)
426
+
427
+ Reviews for architectural violations, dependency direction, and design pattern compliance.
428
+
429
+ **Input:** Architecture context bundle (layer boundaries + import graph)
430
+
431
+ **Focus areas:**
432
+
433
+ - [ ] **Layer compliance:** Does the code respect the project's architectural layers? Are imports flowing in the correct direction?
434
+ - [ ] **Dependency direction:** Do modules depend on abstractions, not concretions? (Dependency Inversion)
435
+ - [ ] **Single Responsibility:** Does each module have one reason to change?
436
+ - [ ] **Open/Closed:** Can behavior be extended without modifying existing code?
437
+ - [ ] **Pattern consistency:** Does the code follow established codebase patterns? If introducing a new pattern, is it justified?
438
+ - [ ] **Separation of concerns:** Business logic separated from infrastructure? Each function/module does one thing?
439
+ - [ ] **DRY violations:** Duplicated logic that should be extracted — but NOT intentional duplication of things that will diverge.
440
+ - [ ] **Performance preserved:** Could restructuring introduce regressions (extra allocations, changed query patterns)?
441
+
442
+ **Output:** `ReviewFinding[]` with `domain: 'architecture'`
443
+
444
+ **Exit:** All four agents have returned their findings. Continue to Phase 5.
445
+
446
+ ---
447
+
448
+ ### Phase 5: VALIDATE
449
+
450
+ **Tier:** none (mechanical)
451
+ **Purpose:** Remove false positives by cross-referencing AI findings against mechanical results and graph reachability.
452
+
453
+ **Steps:**
454
+
455
+ 1. **Mechanical exclusion:** For each finding from Phase 4, check if the same file + line range was already flagged by a mechanical check in Phase 2. If so, discard the AI finding — the mechanical check is authoritative and the issue is already reported.
456
+
457
+ 2. **Graph reachability validation (if graph available):** For findings that claim an issue affects other parts of the system (e.g., "this change breaks callers"), verify via `query_graph` that the claimed dependency path exists. Discard findings with invalid reachability claims.
458
+
459
+ 3. **Import-chain heuristic (fallback, no graph):** Follow imports 2 levels deep from the flagged file. If the finding claims impact on a file not reachable within 2 import hops, downgrade severity to `suggestion` rather than discarding.
460
+
461
+ **Exit:** Validated finding set. Continue to Phase 6.
462
+
463
+ ---
464
+
465
+ ### Phase 6: DEDUP + MERGE
466
+
467
+ **Tier:** none (mechanical)
468
+ **Purpose:** Eliminate redundant findings across agents and produce the final finding list.
469
+
470
+ **Steps:**
471
+
472
+ 1. **Group by location:** Group findings by `file` + overlapping `lineRange`. Two findings overlap if their line ranges intersect or are within 3 lines of each other.
473
+
474
+ 2. **Merge overlapping findings:** When multiple agents flag the same location:
475
+ - Keep the highest `severity` from any agent
476
+ - Combine `evidence` arrays from all agents
477
+ - Preserve the `rationale` with the strongest justification
478
+ - Merge `domain` tags (a finding can be both `bug` and `security`)
479
+ - Generate a single merged `id`
480
+
481
+ 3. **Assign final severity:**
482
+ - **Critical** — Must fix before merge. Bugs, security vulnerabilities, failing harness checks, architectural violations that break boundaries.
483
+ - **Important** — Should fix before merge. Missing error handling, missing tests for critical paths, unclear naming.
484
+ - **Suggestion** — Consider for improvement. Style preferences, minor optimizations, alternative approaches. Does not block merge.
485
+
486
+ **Exit:** Deduplicated, severity-assigned finding list. Continue to Phase 7.
487
+
488
+ ---
489
+
490
+ ### Phase 7: OUTPUT
491
+
492
+ **Tier:** none
493
+ **Purpose:** Deliver the review in the requested format.
494
+
495
+ #### Text Output (default)
496
+
497
+ When rendering the review output, use conventional markdown patterns:
498
+
499
+ For strengths:
500
+
501
+ ```
502
+ **[STRENGTH]** Clean separation between route handler and service logic
503
+ ```
504
+
505
+ For issues by severity:
506
+
507
+ ```
508
+ **[CRITICAL]** api/routes/users.ts:12-15 — Direct import from db/queries.ts bypasses service layer
509
+ **[IMPORTANT]** services/user-service.ts:45 — createUser does not handle duplicate email
510
+ **[SUGGESTION]** Consider extracting validation into a shared utility
511
+ ```
512
+
513
+ Structure the review as:
514
+
515
+ **Strengths:** What is done well. Be specific. "Clean separation between X and Y" is useful. "Looks good" is not.
516
+
517
+ **Issues:** List each finding from Phase 6, grouped by severity:
518
+
519
+ - **Critical:** [findings with severity 'critical']
520
+ - **Important:** [findings with severity 'important']
521
+ - **Suggestion:** [findings with severity 'suggestion']
522
+
523
+ For each issue, provide:
524
+
525
+ 1. The specific location (file and line range)
526
+ 2. What the problem is (title)
527
+ 3. Why it matters (rationale)
528
+ 4. A suggested fix (if available)
529
+
530
+ **Assessment:** One of:
531
+
532
+ - **Approve** — No critical or important issues. Ready to merge.
533
+ - **Request Changes** — Critical or important issues must be addressed.
534
+ - **Comment** — Observations only, no blocking issues.
535
+
536
+ **Learnings Applied (thorough mode only):** When `rigorLevel` is `thorough`, append a "Learnings Applied" section after the Assessment:
537
+
538
+ ```
539
+ **Learnings Applied:**
540
+ - [0.85] "Useful Finding: Missing error handling in service layer" — boosted priority for error handling checks
541
+ - [0.72] "Noise: Style-only import ordering" — suppressed import order findings
542
+ ```
543
+
544
+ Each entry shows the Jaccard relevance score and how the learning influenced the review. This section is omitted in `fast` and `standard` modes.
545
+
546
+ **Exit code:** 0 for Approve/Comment, 1 for Request Changes.
547
+
548
+ #### Inline GitHub Comments (`--comment` flag)
549
+
550
+ When `--comment` is set, post findings as inline PR comments via `gh` CLI or GitHub MCP:
551
+
552
+ - **Small fixes** (suggestion is < 10 lines): Post as committable suggestion block using GitHub's suggestion syntax.
553
+ - **Large fixes** (suggestion is >= 10 lines or no concrete suggestion): Post description + rationale as a regular comment.
554
+ - **Summary comment:** Post the Strengths/Issues/Assessment as a top-level PR review comment.
555
+
556
+ ```bash
557
+ # Post a review with inline comments
558
+ gh pr review --event APPROVE|REQUEST_CHANGES|COMMENT --body "<summary>"
559
+
560
+ # Post inline comment with suggestion
561
+ gh api repos/{owner}/{repo}/pulls/{pr}/comments \
562
+ --field body="<rationale>\n\`\`\`suggestion\n<fix>\n\`\`\`" \
563
+ --field path="<file>" --field line=<line>
564
+ ```
565
+
566
+ ### Review Acceptance
567
+
568
+ After delivering the review output, request acceptance:
569
+
570
+ ```json
571
+ emit_interaction({
572
+ path: "<project-root>",
573
+ type: "confirmation",
574
+ confirmation: {
575
+ text: "Review complete: <Assessment>. Accept review?",
576
+ context: "<N critical, N important, N suggestion findings>",
577
+ impact: "Accepting the review finalizes findings. If 'approve', ready for merge. If 'request-changes', fixes are needed.",
578
+ risk: "<low if approve, high if critical findings>"
579
+ }
580
+ })
581
+ ```
582
+
583
+ #### Handoff and Transition
584
+
585
+ After delivering the review output, write the handoff and conditionally transition:
586
+
587
+ Write `.harness/handoff.json`:
588
+
589
+ ```json
590
+ {
591
+ "fromSkill": "harness-code-review",
592
+ "phase": "OUTPUT",
593
+ "summary": "<assessment summary>",
594
+ "assessment": "approve | request-changes | comment",
595
+ "findingCount": { "critical": 0, "important": 0, "suggestion": 0 },
596
+ "artifacts": ["<reviewed files>"]
597
+ }
598
+ ```
599
+
600
+ **Write session summary (if session is known).** If running within a session context, update the session summary:
601
+
602
+ ```json
603
+ writeSessionSummary(projectPath, sessionSlug, {
604
+ session: "<session-slug>",
605
+ lastActive: "<ISO timestamp>",
606
+ skill: "harness-code-review",
607
+ status: "Review complete. Assessment: <approve|request-changes|comment>. <N> findings.",
608
+ spec: "<spec path if known>",
609
+ keyContext: "<1-2 sentences: review outcome, key findings>",
610
+ nextStep: "<e.g., Address blocking findings / Ready to merge / Observations delivered>"
611
+ })
612
+ ```
613
+
614
+ If no session slug is known, skip this step.
615
+
616
+ **If assessment is "approve":**
617
+
618
+ Call `emit_interaction`:
619
+
620
+ ```json
621
+ {
622
+ "type": "transition",
623
+ "transition": {
624
+ "completedPhase": "review",
625
+ "suggestedNext": "merge",
626
+ "reason": "Review approved with no blocking issues",
627
+ "artifacts": ["<reviewed files>"],
628
+ "requiresConfirmation": true,
629
+ "summary": "Review approved. <N> suggestions noted. Ready to create PR or merge.",
630
+ "qualityGate": {
631
+ "checks": [
632
+ { "name": "mechanical-checks", "passed": true },
633
+ { "name": "no-critical-findings", "passed": true },
634
+ { "name": "no-important-findings", "passed": true },
635
+ { "name": "harness-validate", "passed": true }
636
+ ],
637
+ "allPassed": true
638
+ }
639
+ }
640
+ }
641
+ ```
642
+
643
+ If the user confirms: proceed to create PR or merge.
644
+ If the user declines: stop. The handoff is written for future invocation.
645
+
646
+ **If assessment is "request-changes":**
647
+
648
+ Do NOT emit a transition. Surface the critical and important findings to the user for resolution. After fixes are applied, re-run the review pipeline.
649
+
650
+ **If assessment is "comment":**
651
+
652
+ Do NOT emit a transition. Observations have been delivered. No further action is implied.
653
+
654
+ ---
655
+
656
+ ## Role A: Requesting a Review
657
+
658
+ _This section is not part of the pipeline. It documents the process for requesting a review from others._
659
+
660
+ When you have completed work and need it reviewed:
661
+
662
+ 1. **Prepare the review context:**
663
+ - Commit range (exact SHAs or branch diff)
664
+ - Description (WHAT changed and WHY — not a commit-by-commit retelling)
665
+ - Plan reference (link to spec/plan if applicable)
666
+ - Test evidence (`harness validate` and test suite results)
667
+ - Harness check results (`harness validate`, `harness check-deps`)
668
+
669
+ 2. **Dispatch the review:** Identify the right reviewer, provide the context package, state what kind of feedback you want.
670
+
671
+ 3. **Wait.** Do not modify code under review. Note issues but do not push fixes until review is complete.
672
+
673
+ ---
674
+
675
+ ## Role C: Responding to Review Feedback
676
+
677
+ _This section is not part of the pipeline. It documents the process for responding to review feedback._
678
+
679
+ 1. **Read all feedback first.** Understand the full picture before responding.
680
+
681
+ 2. **Verify before implementing.** For each piece of feedback:
682
+ - Do you understand it? If not, ask for clarification.
683
+ - Is it correct? Verify the claim — reviewers make mistakes too.
684
+ - Is it actionable? Vague feedback requires clarification.
685
+
686
+ 3. **Technical rigor over social performance:**
687
+ - Do NOT agree with feedback just to be agreeable. Push back with evidence if wrong.
688
+ - Do NOT implement every suggestion. Apply YAGNI.
689
+ - Do NOT make changes you do not understand. Ask for explanation.
690
+ - DO acknowledge when feedback is correct.
691
+ - DO push back when feedback contradicts the approved plan/spec.
692
+
693
+ 4. **Implement fixes:** For each accepted piece of feedback: make the change, run tests, run `harness validate` and `harness check-deps`, commit with a message referencing the review feedback.
694
+
695
+ 5. **Re-request review** with summary of changes, which feedback was addressed vs. pushed back on, and fresh harness check results.
696
+
697
+ ---
698
+
699
+ ## Evidence Requirements
700
+
701
+ When this skill produces review findings, every finding MUST include evidence citations. The `ReviewFinding.evidence` array field already exists in the finding schema -- this section defines the citation standard for populating it.
702
+
703
+ Every review finding MUST cite evidence using one of:
704
+
705
+ 1. **File reference:** `file:line` format (e.g., `src/api/routes/users.ts:12-15` -- "direct import from db/queries.ts bypasses service layer")
706
+ 2. **Diff evidence:** Before/after code from the PR diff with file path and line numbers
707
+ 3. **Dependency chain:** Import path showing the violation (e.g., `routes/users.ts:3 imports db/queries.ts` -- "violates routes -> services -> db layer direction")
708
+ 4. **Test evidence:** Include test command and output when findings relate to missing or failing tests
709
+ 5. **Convention reference:** Cite the specific convention file and rule (e.g., `AGENTS.md:45` -- "convention requires services layer between routes and db")
710
+ 6. **Session evidence:** Write significant findings to the `evidence` session section:
711
+ ```json
712
+ manage_state({
713
+ action: "append_entry",
714
+ session: "<current-session>",
715
+ section: "evidence",
716
+ authorSkill: "harness-code-review",
717
+ content: "src/api/routes/users.ts:12-15 -- layer violation: direct import from db/queries.ts"
718
+ })
719
+ ```
720
+
721
+ **When to cite:** In Phase 4 (FAN-OUT), each subagent populates the `evidence` array in every `ReviewFinding`. In Phase 5 (VALIDATE), evidence is used to verify reachability claims. In Phase 7 (OUTPUT), every issue in the review includes its file:line location and rationale backed by evidence.
722
+
723
+ **Uncited claims:** Review findings without evidence in the `evidence` array are discarded during Phase 5 (VALIDATE). Observations that cannot be tied to specific file:line references MUST be prefixed with `[UNVERIFIED]` and downgraded to `severity: 'suggestion'`.
724
+
725
+ ## Harness Integration
726
+
727
+ - **`assess_project`** — Used in Phase 2 (MECHANICAL) to run `validate`, `deps`, and `docs` checks in parallel. Must pass for the pipeline to continue to AI review. Failures are Critical issues that stop the pipeline.
728
+ - **`gather_context`** — Used in Phase 3 (CONTEXT) for efficient parallel context assembly. The `session` parameter scopes learnings and state to the session directory when provided by autopilot dispatch. Replaces separate graph query calls.
729
+ - **`harness cleanup`** — Optional check during Phase 2 for entropy accumulation in changed files.
730
+ - **Graph queries** — Used in Phase 3 (CONTEXT) for dependency-scoped context and in Phase 5 (VALIDATE) for reachability verification. Graceful fallback when no graph exists.
731
+ - **`emit_interaction`** -- Call after review approval to suggest transitioning to merge/PR creation. Only emitted on APPROVE assessment. Uses confirmed transition (waits for user approval).
732
+ - **Rigor levels** — `--fast` / `--thorough` flags control learnings integration and agent tiers. Fast skips learnings and runs all agents at fast tier. Standard includes learnings if available. Thorough always loads learnings, runs a meta-judge pass, and includes a "Learnings Applied" section in output. See the Rigor Levels table for details.
733
+ - **`filterByRelevance`** — Used in the Review Learnings Calibration section (Phase 3) to score learnings against diff context. Threshold 0.7, token budget 1000. From `packages/core/src/state/learnings-relevance.ts`.
734
+
735
+ ## Success Criteria
736
+
737
+ - The pipeline runs all 7 phases in order when invoked manually (skipping GATE)
738
+ - The pipeline runs all 7 phases including GATE when invoked with `--ci`
739
+ - Mechanical failures in Phase 2 stop the pipeline before AI review (Phase 4)
740
+ - Each Phase 4 subagent receives only its domain-scoped context, not the full diff
741
+ - All findings use the ReviewFinding schema
742
+ - Mechanical findings from Phase 2 are excluded from Phase 4 output in Phase 5
743
+ - Cross-agent duplicate findings are merged in Phase 6
744
+ - Text output uses Strengths/Issues/Assessment format with Critical/Important/Suggestion severity
745
+ - `--comment` posts inline GitHub comments with committable suggestion blocks for small fixes
746
+ - `--deep` adds threat modeling to the Security agent
747
+ - No code merges with Critical issues unresolved
748
+ - No code merges with failing harness checks
749
+ - Response to feedback (Role C) is verified before implementation
750
+ - Pushback on incorrect feedback is evidence-based
751
+ - When `rigorLevel` is `fast`, learnings integration is skipped and all fan-out agents run at fast tier
752
+ - When `rigorLevel` is `thorough`, learnings are always loaded and scored, a meta-judge validates cross-domain findings, and a "Learnings Applied" section appears in the output
753
+ - When `rigorLevel` is `standard`, learnings are included if `.harness/review-learnings.md` exists, scored via `filterByRelevance` at 0.7 threshold
754
+ - When all learnings score below 0.7 threshold, zero learnings are included (no fallback to unscored inclusion)
755
+
756
+ ## Examples
757
+
758
+ ### Example: Pipeline Review of a New API Endpoint
759
+
760
+ **Phase 1 (GATE):** Skipped — manual invocation.
761
+
762
+ **Phase 2 (MECHANICAL):** `harness validate` passes. `harness check-deps` passes. Security scan finds no issues. `tsc --noEmit` passes. Lint passes.
763
+
764
+ **Phase 3 (CONTEXT):** Change type detected as `feature` (commit prefix `feat:`). Context bundles assembled:
765
+
766
+ - Compliance: `CLAUDE.md` + changed files
767
+ - Bug detection: `api/routes/users.ts`, `services/user-service.ts`, `db/queries.ts`
768
+ - Security: `api/routes/users.ts` (endpoint), `services/user-service.ts` (data flow)
769
+ - Architecture: import graph showing `routes → services → db` layers
770
+
771
+ **Phase 4 (FAN-OUT):** Four agents run in parallel:
772
+
773
+ - Compliance agent: 0 findings (spec alignment confirmed)
774
+ - Bug detection agent: 1 finding (missing duplicate email handling in createUser)
775
+ - Security agent: 0 findings (no vulnerabilities detected)
776
+ - Architecture agent: 1 finding (routes/users.ts imports directly from db/queries.ts)
777
+
778
+ **Phase 5 (VALIDATE):** No mechanical exclusions apply. Architecture finding validated by `check-deps` output showing layer violation.
779
+
780
+ **Phase 6 (DEDUP+MERGE):** No overlaps — 2 distinct findings in different files.
781
+
782
+ **Phase 7 (OUTPUT):**
783
+
784
+ **Strengths:**
785
+
786
+ - Clean separation between route handler and service logic
787
+ - Input validation using Zod schemas with clear error messages
788
+ - Comprehensive test coverage including error paths
789
+
790
+ **Issues:**
791
+
792
+ **Critical:**
793
+
794
+ - `api/routes/users.ts:12-15` — Direct import from `db/queries.ts` bypasses service layer. Must route through `services/user-service.ts`. (domain: architecture, validatedBy: heuristic)
795
+
796
+ **Important:**
797
+
798
+ - `services/user-service.ts:45` — `createUser` does not handle duplicate email. Database will throw constraint violation surfacing as 500. Should catch and return 409. (domain: bug, validatedBy: heuristic)
799
+
800
+ **Suggestion:** (none)
801
+
802
+ **Assessment:** Request Changes — one critical layer violation and one important missing error handler.
803
+
804
+ ## Gates
805
+
806
+ - **Never skip mechanical checks without `--no-mechanical`.** If mechanical checks have not run (in CI or locally), they must run in Phase 2 before AI review.
807
+ - **Never merge with failing harness checks.** `harness validate` and `harness check-deps` must pass. This is a Critical issue, always.
808
+ - **Never implement feedback without verification.** Before changing code based on review feedback, verify the feedback is correct. Run the scenario. Read the code. Do not blindly comply.
809
+ - **Never agree performatively.** "Sure, I'll change that" without understanding why is forbidden. Every change must be understood.
810
+ - **Never skip the YAGNI check.** Every suggestion must answer: "Does this serve a current, concrete need?" Speculative improvements are rejected.
811
+
812
+ ## Red Flags
813
+
814
+ ### Universal
815
+
816
+ These apply to ALL skills. If you catch yourself doing any of these, STOP.
817
+
818
+ - **"I believe the codebase does X"** — Stop. Read the code and cite a file:line
819
+ reference. Belief is not evidence.
820
+ - **"Let me recommend [pattern] for this"** without checking existing patterns — Stop.
821
+ Search the codebase first. The project may already have a convention.
822
+ - **"While we're here, we should also [unrelated improvement]"** — Stop. Flag the idea
823
+ but do not expand scope beyond the stated task.
824
+
825
+ ### Domain-Specific
826
+
827
+ - **"The change looks reasonable, approving"** — Stop. Have you read every changed file? Approval without full review is rubber-stamping.
828
+ - **"Let me fix this issue I found"** — Stop. Review identifies issues; it does not fix them. Suggest the fix, do not apply it.
829
+ - **"This is a minor style issue"** — Stop. Is it a style issue or a readability/maintainability concern? Classify accurately before dismissing.
830
+ - **"The author probably meant to..."** — Stop. Do not infer intent. If the code is ambiguous, flag it as a question for the author.
831
+
832
+ ## Rationalizations to Reject
833
+
834
+ ### Universal
835
+
836
+ These reasoning patterns sound plausible but lead to bad outcomes. Reject them.
837
+
838
+ - **"It's probably fine"** — "Probably" is not evidence. Verify before asserting.
839
+ - **"This is best practice"** — Best practice in what context? Cite the source and
840
+ confirm it applies to this codebase.
841
+ - **"We can fix it later"** — If it is worth flagging, it is worth documenting now
842
+ with a concrete follow-up plan.
843
+
844
+ ### Domain-Specific
845
+
846
+ - **"The tests pass, so the logic must be correct"** — Tests can be incomplete. Review the logic independently of test results.
847
+ - **"This is how it was done elsewhere in the codebase"** — Existing patterns can be wrong. Evaluate the pattern on its merits, not just its precedent.
848
+ - **"It's just a refactor, low risk"** — Refactors change behavior surfaces. Review them with the same rigor as feature changes.
849
+
850
+ ## Escalation
851
+
852
+ - **When reviewers disagree:** If two reviewers give contradictory feedback, escalate to the human or tech lead.
853
+ - **When review feedback changes the plan:** If feedback requires altering the approved plan or spec, pause the review. The plan must be updated first.
854
+ - **When you cannot reproduce a reported issue:** Ask the reviewer for exact reproduction steps.
855
+ - **When review is taking more than 2 rounds:** Something is fundamentally misaligned. Stop and discuss the approach synchronously.
856
+ - **When harness checks fail and you believe the check is wrong:** Do not override or skip. File an issue against the harness configuration.
857
+ - **When the pipeline produces a false positive after validation:** Add the pattern to `.harness/review-learnings.md` in the Noise / False Positives section for future calibration.