@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,52 @@
1
+ name: harness-code-review
2
+ version: "2.0.0"
3
+ description: Multi-phase code review pipeline with mechanical checks, graph-scoped context, and parallel review agents
4
+ cognitive_mode: adversarial-reviewer
5
+ triggers:
6
+ - manual
7
+ - on_pr
8
+ - on_review
9
+ platforms:
10
+ - claude-code
11
+ - gemini-cli
12
+ tools:
13
+ - Bash
14
+ - Read
15
+ - Glob
16
+ - Grep
17
+ - emit_interaction
18
+ cli:
19
+ command: harness skill run harness-code-review
20
+ args:
21
+ - name: path
22
+ description: Project root path
23
+ required: false
24
+ - name: --comment
25
+ description: Post inline comments to GitHub PR
26
+ required: false
27
+ - name: --deep
28
+ description: Add threat modeling pass (invokes security-review --deep)
29
+ required: false
30
+ - name: --no-mechanical
31
+ description: Skip mechanical checks (useful if already run)
32
+ required: false
33
+ - name: --ci
34
+ description: Enable eligibility gate, non-interactive output
35
+ required: false
36
+ - name: --fast
37
+ description: Reduced rigor — skip learnings integration, fast-tier agents only
38
+ required: false
39
+ - name: --thorough
40
+ description: Maximum rigor — always load learnings, full agent roster + meta-judge
41
+ required: false
42
+ mcp:
43
+ tool: run_skill
44
+ input:
45
+ skill: harness-code-review
46
+ path: string
47
+ type: rigid
48
+ tier: 2
49
+ state:
50
+ persistent: false
51
+ files: []
52
+ depends_on: []
@@ -0,0 +1,224 @@
1
+ # Harness Codebase Cleanup
2
+
3
+ > Orchestrate dead code removal and architecture violation fixes with a shared convergence loop. Catches cross-concern cascades that individual skills miss.
4
+
5
+ ## When to Use
6
+
7
+ - After a major refactoring or feature removal when both dead code and architecture violations are likely
8
+ - As a periodic comprehensive codebase hygiene task
9
+ - When `cleanup-dead-code` or `enforce-architecture` individually are not catching cascading issues
10
+ - When you want hotspot-aware safety classification
11
+ - NOT for quick single-concern checks -- use `cleanup-dead-code` or `enforce-architecture` directly
12
+ - NOT when tests are failing -- fix tests first
13
+ - NOT during active feature development
14
+
15
+ ## Flags
16
+
17
+ | Flag | Effect |
18
+ | --------------------- | ----------------------------------------------------------------- |
19
+ | `--fix` | Enable convergence-based auto-fix (default: detect + report only) |
20
+ | `--dead-code-only` | Skip architecture checks |
21
+ | `--architecture-only` | Skip dead code checks |
22
+ | `--dry-run` | Show what would be fixed without applying |
23
+ | `--ci` | Non-interactive: apply safe fixes only, report everything else |
24
+
25
+ ## Process
26
+
27
+ ### Phase 1: CONTEXT -- Build Hotspot Map
28
+
29
+ 1. **Run hotspot detection** via git log analysis:
30
+ ```bash
31
+ git log --format=format: --name-only --since="6 months ago" | sort | uniq -c | sort -rn | head -50
32
+ ```
33
+ 2. **Build churn map.** Parse output into a `file -> commit count` mapping.
34
+ 3. **Compute top 10% threshold.** Sort all files by commit count. The file at the 90th percentile defines the threshold. Files above this threshold are "high churn."
35
+ 4. **Store as HotspotContext** for use in Phase 3 (CLASSIFY).
36
+
37
+ ### Phase 2: DETECT -- Run Both Concerns in Parallel
38
+
39
+ 1. **Dead code detection** (skip if `--architecture-only`):
40
+ - Run `harness cleanup --type dead-code --json`
41
+ - Captures: dead files, dead exports, unused imports, dead internals, commented-out code blocks, orphaned dependencies
42
+
43
+ 2. **Architecture detection** (skip if `--dead-code-only`):
44
+ - Run `harness check-deps --json`
45
+ - Captures: layer violations, forbidden imports, circular dependencies, import ordering issues
46
+
47
+ 3. **Merge findings.** Convert all raw findings into `CleanupFinding` objects using `classifyFinding()`. This normalizes both concerns into a shared schema.
48
+
49
+ ### Phase 3: CLASSIFY -- Safety Classification and Dedup
50
+
51
+ 1. **Apply safety classification.** Each `CleanupFinding` already has a safety level from `classifyFinding()`. Review the classification rules:
52
+
53
+ **Dead code safety:**
54
+
55
+ | Finding | Safety | Condition |
56
+ | ------------------------- | ------------- | ------------------------------------------- |
57
+ | Dead files | Safe | Not entry point, no side effects |
58
+ | Unused imports | Safe | Zero references |
59
+ | Dead exports (non-public) | Safe | Zero importers, not in package entry point |
60
+ | Dead exports (public API) | Unsafe | In package entry point or published package |
61
+ | Commented-out code | Safe | Always (code is in git history) |
62
+ | Orphaned npm deps | Probably safe | Needs install + test verification |
63
+ | Dead internals | Unsafe | Cannot reliably determine all callers |
64
+
65
+ **Architecture safety:**
66
+
67
+ | Violation | Safety | Condition |
68
+ | ----------------------------------- | ------------- | -------------------------- |
69
+ | Import ordering | Safe | Mechanical reorder |
70
+ | Forbidden import (with alternative) | Probably safe | 1:1 replacement configured |
71
+ | Forbidden import (no alternative) | Unsafe | Requires restructuring |
72
+ | Design token (unambiguous) | Probably safe | Single token match |
73
+ | Design token (ambiguous) | Unsafe | Multiple candidates |
74
+ | Upward dependency | Unsafe | Always |
75
+ | Skip-layer dependency | Unsafe | Always |
76
+ | Circular dependency | Unsafe | Always |
77
+
78
+ 2. **Apply hotspot downgrade.** For each finding, check if the file is in the top 10% by churn (from Phase 1 HotspotContext). If so, downgrade `safe` to `probably-safe`. Do not downgrade `unsafe` findings.
79
+
80
+ 3. **Cross-concern dedup.** Call `deduplicateFindings()` to merge overlapping findings:
81
+ - A dead import from a forbidden layer = one finding (dead-code concern, noting architecture overlap)
82
+ - A dead file that has architecture violations = one finding (dead-code, noting violations resolved by deletion)
83
+
84
+ ### Phase 4: FIX -- Convergence Loop
85
+
86
+ **Only runs when `--fix` flag is set.** Without `--fix`, skip to Phase 5 (REPORT).
87
+
88
+ ```
89
+ findings = classified findings from Phase 3
90
+ previousCount = findings.length
91
+ iteration = 0
92
+
93
+ while iteration < 5:
94
+ iteration++
95
+
96
+ # Batch 1: Apply safe fixes silently
97
+ safeFixes = findings.filter(f => f.safety === 'safe')
98
+ apply(safeFixes)
99
+
100
+ # Batch 2: Present probably-safe fixes
101
+ if --ci mode:
102
+ skip probably-safe fixes (report only)
103
+ else:
104
+ probablySafeFixes = findings.filter(f => f.safety === 'probably-safe')
105
+ presentAsDiffs(probablySafeFixes)
106
+ apply(approved fixes)
107
+
108
+ # Verify: lint + typecheck + test
109
+ verifyResult = run("pnpm lint && pnpm tsc --noEmit && pnpm test")
110
+
111
+ if verifyResult.failed:
112
+ revertBatch()
113
+ reclassify failed fixes as unsafe
114
+ continue
115
+
116
+ # Re-detect both concerns
117
+ newFindings = runDetection() # Phase 2 again
118
+ newFindings = classify(newFindings) # Phase 3 again
119
+
120
+ if newFindings.length >= previousCount:
121
+ break # No progress, stop
122
+
123
+ previousCount = newFindings.length
124
+ findings = newFindings
125
+ ```
126
+
127
+ **Verification gate:** Every fix batch must pass lint + typecheck + test. If verification fails:
128
+
129
+ 1. Revert the entire batch (use git: `git checkout -- .`)
130
+ 2. Reclassify all findings in the batch as `unsafe`
131
+ 3. Continue the loop with remaining findings
132
+
133
+ **Cross-concern cascade examples:**
134
+
135
+ - Dead import from forbidden layer: removing the dead import also resolves the architecture violation. Single fix, both resolved.
136
+ - Architecture fix creates dead code: replacing a forbidden import makes the old module's export dead. Next detect cycle catches it.
137
+ - Dead file resolves multiple violations: deleting a dead file that imports from wrong layers resolves those violations too.
138
+
139
+ ### Phase 5: REPORT -- Actionable Output
140
+
141
+ Generate a structured report with two sections:
142
+
143
+ **1. Fixes Applied:**
144
+ For each fix that was applied:
145
+
146
+ - File and line
147
+ - What was fixed (finding type and description)
148
+ - What action was taken (delete, replace, reorder)
149
+ - Verification status (pass/fail)
150
+
151
+ **2. Remaining Findings (requires human action):**
152
+ For each unsafe finding that was not auto-fixed:
153
+
154
+ - **What is wrong:** The finding type, file, line, and description
155
+ - **Why it cannot be auto-fixed:** The safety reason and classification logic
156
+ - **Suggested approach:** Concrete next steps for manual resolution
157
+
158
+ Example report output:
159
+
160
+ ```
161
+ === HARNESS CODEBASE CLEANUP REPORT ===
162
+
163
+ Fixes applied: 12
164
+ - 5 unused imports removed (safe)
165
+ - 3 dead exports de-exported (safe)
166
+ - 2 commented-out code blocks deleted (safe)
167
+ - 1 forbidden import replaced (probably-safe, approved)
168
+ - 1 orphaned dependency removed (probably-safe, approved)
169
+
170
+ Convergence: 3 iterations, 12 → 8 → 3 → 3 (stopped)
171
+
172
+ Remaining findings: 3 (require human action)
173
+
174
+ 1. UNSAFE: Circular dependency
175
+ File: src/services/order-service.ts <-> src/services/inventory-service.ts
176
+ Why: Circular dependencies require structural refactoring
177
+ Suggested: Extract shared logic into src/services/stock-calculator.ts
178
+
179
+ 2. UNSAFE: Dead internal function
180
+ File: src/utils/legacy.ts:45 — processLegacyFormat()
181
+ Why: Cannot reliably determine all callers (possible dynamic usage)
182
+ Suggested: Search for string references, check config files, then delete if confirmed unused
183
+
184
+ 3. UNSAFE: Public API dead export
185
+ File: packages/core/src/index.ts — legacyHelper
186
+ Why: Export is in package entry point; external consumers may depend on it
187
+ Suggested: Deprecate with @deprecated JSDoc tag, remove in next major version
188
+ ```
189
+
190
+ ## Examples
191
+
192
+ ### Example: Post-Refactoring Cleanup
193
+
194
+ After removing the `legacy-auth` module:
195
+
196
+ 1. **Phase 1 (CONTEXT):** Hotspot analysis shows `src/services/auth.ts` has 42 commits (top 5%).
197
+ 2. **Phase 2 (DETECT):** Dead code detects 3 dead exports in `src/utils/token.ts` (were only used by legacy-auth). Architecture detects 1 forbidden import in `src/services/session.ts` (still importing from removed module's location).
198
+ 3. **Phase 3 (CLASSIFY):** Dead exports classified as `safe` but downgraded to `probably-safe` because `token.ts` is in a high-churn file. Forbidden import classified as `unsafe` (no alternative configured).
199
+ 4. **Phase 4 (FIX):** First iteration removes 3 dead exports (approved as probably-safe). Re-detect finds `token.ts` now has zero exports and becomes a dead file. Second iteration deletes the dead file. Convergence stops -- the forbidden import requires manual restructuring.
200
+ 5. **Phase 5 (REPORT):** 4 fixes applied (3 dead exports + 1 dead file), 1 remaining finding (forbidden import requiring restructuring).
201
+
202
+ ## Harness Integration
203
+
204
+ - **`harness cleanup --type dead-code --json`** -- Dead code detection input
205
+ - **`harness check-deps --json`** -- Architecture violation detection input
206
+ - **`git log` analysis** -- Hotspot context for safety classification (inline command, no skill invocation needed)
207
+ - **`harness validate`** -- Final validation after all fixes
208
+ - **`harness check-deps`** -- Final architecture check after all fixes
209
+
210
+ ## Success Criteria
211
+
212
+ - All safe fixes are applied without test failures
213
+ - Probably-safe fixes are presented as diffs for approval (or skipped in CI mode)
214
+ - Unsafe findings are never auto-fixed
215
+ - Convergence loop catches cross-concern cascades
216
+ - Report includes actionable guidance for every remaining finding
217
+ - `harness validate` passes after cleanup
218
+
219
+ ## Escalation
220
+
221
+ - **When convergence loop does not converge after 5 iterations:** The codebase has deeply tangled issues. Stop and report all remaining findings. Consider breaking the cleanup into focused sessions.
222
+ - **When a safe fix causes test failures:** The classification was wrong. Revert, reclassify as unsafe, and investigate the hidden dependency. Document the false positive for future improvement.
223
+ - **When the hotspot detector is unavailable:** Skip the hotspot downgrade. All safety classifications use their base level without churn context.
224
+ - **When dead code and architecture fixes conflict:** The convergence loop handles this naturally. If removing dead code creates an architecture issue (rare), the next detection cycle catches it.
@@ -0,0 +1,65 @@
1
+ name: harness-codebase-cleanup
2
+ version: "1.0.0"
3
+ description: Orchestrate dead code removal and architecture violation fixes with shared convergence loop
4
+ cognitive_mode: systematic-orchestrator
5
+ triggers:
6
+ - manual
7
+ platforms:
8
+ - claude-code
9
+ - gemini-cli
10
+ tools:
11
+ - Bash
12
+ - Read
13
+ - Glob
14
+ - Grep
15
+ cli:
16
+ command: harness skill run harness-codebase-cleanup
17
+ args:
18
+ - name: path
19
+ description: Project root path
20
+ required: false
21
+ - name: fix
22
+ description: Enable convergence-based auto-fix (default detect+report only)
23
+ required: false
24
+ - name: dead-code-only
25
+ description: Skip architecture checks
26
+ required: false
27
+ - name: architecture-only
28
+ description: Skip dead code checks
29
+ required: false
30
+ - name: dry-run
31
+ description: Show what would be fixed without applying
32
+ required: false
33
+ - name: ci
34
+ description: Non-interactive mode (safe fixes only, report everything else)
35
+ required: false
36
+ mcp:
37
+ tool: run_skill
38
+ input:
39
+ skill: harness-codebase-cleanup
40
+ path: string
41
+ type: flexible
42
+ tier: 2
43
+ phases:
44
+ - name: context
45
+ description: Run hotspot detection, build churn map
46
+ required: true
47
+ - name: detect
48
+ description: Run dead code and architecture detection in parallel
49
+ required: true
50
+ - name: classify
51
+ description: Classify findings, apply hotspot downgrade, cross-concern dedup
52
+ required: true
53
+ - name: fix
54
+ description: Convergence loop - apply safe fixes, verify, re-detect
55
+ required: false
56
+ - name: report
57
+ description: Generate actionable report of fixes applied and remaining findings
58
+ required: true
59
+ state:
60
+ persistent: false
61
+ files: []
62
+ depends_on:
63
+ - cleanup-dead-code
64
+ - enforce-architecture
65
+ - harness-hotspot-detector
@@ -0,0 +1,303 @@
1
+ # Harness Compliance
2
+
3
+ > SOC2, HIPAA, GDPR compliance checks, audit trails, and regulatory checklists. Scans codebases for compliance-relevant patterns, classifies data by sensitivity, audits implementation against framework-specific controls, and generates gap analysis reports with remediation plans.
4
+
5
+ ## When to Use
6
+
7
+ - At milestone boundaries to audit compliance posture before releases to regulated markets
8
+ - On PRs that modify data handling, storage, logging, or user-facing privacy features
9
+ - When preparing for external audits (SOC2 Type II, HIPAA assessment, GDPR DPA review)
10
+ - NOT for runtime security scanning or vulnerability detection (use harness-security-scan)
11
+ - NOT for authentication or authorization implementation (use harness-auth)
12
+ - NOT for infrastructure security hardening (use harness-security-review)
13
+
14
+ ## Process
15
+
16
+ ### Phase 1: SCAN -- Detect Applicable Frameworks and Data Patterns
17
+
18
+ 1. **Identify applicable compliance frameworks.** Scan for indicators:
19
+ - SOC2: presence of `docs/compliance/soc2/`, audit logging implementation, access control patterns
20
+ - HIPAA: healthcare-related data models (patient, diagnosis, prescription), PHI field markers
21
+ - GDPR: EU user data handling, consent collection, cookie banners, privacy policy references
22
+ - PCI-DSS: payment processing, credit card fields, tokenization, PCI scope markers
23
+ - Detect from existing compliance documentation, data models, and configuration files
24
+
25
+ 2. **Inventory data stores.** Map all locations where user data is persisted:
26
+ - Databases: table schemas, column names, migration files
27
+ - Object storage: S3 buckets, GCS buckets, Azure Blob containers
28
+ - Caches: Redis keys, Memcached namespaces
29
+ - Log files: structured logging output, log aggregation configuration
30
+ - Third-party services: analytics (Segment, Mixpanel), CRM (Salesforce, HubSpot), email (SendGrid, Mailchimp)
31
+
32
+ 3. **Trace data flows.** Map how user data moves through the system:
33
+ - Ingestion: API endpoints that accept user input, form submissions, file uploads
34
+ - Processing: services that transform, aggregate, or enrich user data
35
+ - Storage: where processed data is persisted (primary database, cache, search index)
36
+ - Egress: data shared with third parties, exported, or displayed to other users
37
+ - Deletion: how data is removed when retention expires or deletion is requested
38
+
39
+ 4. **Check for existing compliance artifacts.** Look for:
40
+ - Privacy policy: `PRIVACY.md`, `privacy-policy.md`, or served via web route
41
+ - Security policy: `SECURITY.md`, security disclosure process
42
+ - Data processing agreements: `docs/compliance/dpa/`
43
+ - Audit trail implementation: `src/**/audit/**`, event sourcing patterns
44
+ - Consent management: cookie consent banners, preference centers
45
+
46
+ 5. **Detect sensitive data patterns.** Grep for fields and patterns that indicate regulated data:
47
+ - PII: email, phone, address, SSN, date of birth, government ID
48
+ - PHI: diagnosis, treatment, prescription, medical record number, insurance ID
49
+ - Financial: credit card number, bank account, routing number, transaction amount
50
+ - Authentication: password (even hashed), API key, secret, token
51
+
52
+ ---
53
+
54
+ ### Phase 2: CLASSIFY -- Data Sensitivity and Regulatory Scope
55
+
56
+ 1. **Classify data fields by sensitivity.** Apply a tiered classification:
57
+ - **Critical:** Data whose exposure triggers mandatory breach notification (SSN, credit card, PHI)
58
+ - **Sensitive:** PII that identifies individuals (email, phone, address, name + DOB)
59
+ - **Internal:** Business data not publicly available (order history, usage metrics, preferences)
60
+ - **Public:** Data intentionally shared (username, public profile, published content)
61
+
62
+ 2. **Map regulatory scope per data class.** Determine which frameworks apply to each data class:
63
+ - Critical financial data -> PCI-DSS scope
64
+ - PHI data -> HIPAA scope
65
+ - EU resident PII -> GDPR scope
66
+ - All customer data in a SOC2-audited system -> SOC2 scope
67
+
68
+ 3. **Identify cross-border data flows.** For GDPR compliance:
69
+ - Where are data stores physically located? (AWS region, GCP region, Azure region)
70
+ - Does data transfer to non-EU countries? (US servers, CDN nodes, third-party processors)
71
+ - Are Standard Contractual Clauses (SCCs) or adequacy decisions in place?
72
+ - Is data residency configurable per tenant?
73
+
74
+ 4. **Document data retention policies.** For each data class:
75
+ - What is the defined retention period?
76
+ - Is automatic deletion implemented (TTL, scheduled job, lifecycle policy)?
77
+ - What happens to data in backups after retention expires?
78
+ - Are retention policies documented and accessible?
79
+
80
+ 5. **Produce the data classification matrix.** Output a structured inventory:
81
+ - Data field, classification tier, applicable frameworks, storage location, retention policy, encryption status
82
+
83
+ ---
84
+
85
+ ### Phase 3: AUDIT -- Check Against Framework Controls
86
+
87
+ 1. **SOC2 Trust Services Criteria audit.** Check implementation against key controls:
88
+ - **CC6.1 (Logical Access):** Are all endpoints authenticated? Is RBAC/ABAC enforced?
89
+ - **CC6.2 (Credential Management):** Are passwords hashed with strong algorithms? Is MFA available?
90
+ - **CC6.3 (Encryption):** Is data encrypted at rest (database, file storage) and in transit (TLS)?
91
+ - **CC7.2 (System Monitoring):** Are security events logged? Are alerts configured for anomalies?
92
+ - **CC8.1 (Change Management):** Is there a code review process? Are deployments auditable?
93
+
94
+ 2. **HIPAA Security Rule audit.** If PHI is present:
95
+ - **164.312(a)(1) Access Control:** Unique user identification, emergency access, automatic logoff, encryption
96
+ - **164.312(b) Audit Controls:** Record and examine activity in information systems containing PHI
97
+ - **164.312(c)(1) Integrity:** Protect electronic PHI from improper alteration or destruction
98
+ - **164.312(d) Authentication:** Verify identity of person or entity seeking access to PHI
99
+ - **164.312(e)(1) Transmission Security:** Encrypt PHI during electronic transmission
100
+
101
+ 3. **GDPR compliance audit.** If EU data is processed:
102
+ - **Article 6 (Lawful Basis):** Is consent collected? Is legitimate interest documented?
103
+ - **Article 13/14 (Transparency):** Is a privacy notice provided at data collection points?
104
+ - **Article 15 (Right of Access):** Can users export their data? Is there a data export endpoint?
105
+ - **Article 17 (Right to Erasure):** Can users request deletion? Is it implemented across all stores?
106
+ - **Article 25 (Data Protection by Design):** Are privacy defaults enforced (minimal data collection)?
107
+ - **Article 30 (Records of Processing):** Is there a processing activities register?
108
+ - **Article 32 (Security of Processing):** Encryption, pseudonymization, resilience, regular testing
109
+ - **Article 33 (Breach Notification):** Is there a 72-hour breach notification process?
110
+
111
+ 4. **PCI-DSS audit.** If payment data is present:
112
+ - **Requirement 3:** Is cardholder data encrypted at rest? Is PAN masked in displays?
113
+ - **Requirement 4:** Is cardholder data encrypted in transit?
114
+ - **Requirement 6:** Are secure development practices followed? Is input validated?
115
+ - **Requirement 8:** Is access to cardholder data authenticated and authorized?
116
+ - **Requirement 10:** Are all access events to cardholder data logged?
117
+
118
+ 5. **Audit trail verification.** For all applicable frameworks:
119
+ - Are audit events immutable (append-only log, write-once storage)?
120
+ - Do audit records include who, what, when, where, and outcome?
121
+ - Is the audit log protected from tampering (separate access controls, checksums)?
122
+ - Is the audit log retained for the required period (SOC2: 1 year, HIPAA: 6 years, GDPR: varies)?
123
+
124
+ ---
125
+
126
+ ### Phase 4: REPORT -- Generate Gap Analysis and Remediation Plan
127
+
128
+ 1. **Score compliance posture per framework.** For each applicable framework:
129
+ - Total controls assessed
130
+ - Controls fully met, partially met, and not met
131
+ - Overall compliance percentage
132
+ - Risk rating: High (critical controls missing), Medium (non-critical gaps), Low (minor gaps)
133
+
134
+ 2. **Produce the gap analysis.** For each control not fully met:
135
+ - Control identifier and description
136
+ - Current implementation status (not started, partial, misconfigured)
137
+ - Specific code locations or configurations that need change
138
+ - Remediation steps with effort estimate (hours/days)
139
+ - Priority based on risk and audit timeline
140
+
141
+ 3. **Generate audit-ready checklists.** Produce framework-specific checklists:
142
+ - SOC2: Trust Services Criteria checklist with evidence references
143
+ - HIPAA: Security Rule safeguard checklist with implementation status
144
+ - GDPR: Article-by-article compliance checklist with data flow references
145
+ - PCI-DSS: Requirement checklist with scope boundaries
146
+
147
+ 4. **Create remediation plan.** Organize gaps into actionable work:
148
+ - **Phase 1 (Critical, 0-2 weeks):** Fix blocking gaps that would fail an audit
149
+ - **Phase 2 (Important, 2-6 weeks):** Address significant gaps that reduce compliance posture
150
+ - **Phase 3 (Improvement, 6-12 weeks):** Enhance documentation, monitoring, and process maturity
151
+ - Each item includes: description, affected control, owner placeholder, effort estimate
152
+
153
+ 5. **Output the compliance report.** Generate `docs/compliance/audit-report-YYYY-MM-DD.md`:
154
+
155
+ ```
156
+ Compliance Audit Report — YYYY-MM-DD
157
+
158
+ Frameworks Assessed: SOC2, GDPR
159
+ Data Classifications: 12 critical, 28 sensitive, 45 internal, 15 public
160
+
161
+ SOC2 Status: 78% (18/23 controls met, 3 partial, 2 not met)
162
+ NOT MET:
163
+ CC7.2 — No security event alerting configured
164
+ CC8.1 — No deployment audit trail
165
+ PARTIAL:
166
+ CC6.1 — RBAC exists but 4 endpoints lack authorization checks
167
+ CC6.3 — TLS in transit, but database encryption at rest not configured
168
+ CC6.2 — Passwords hashed, but no MFA available
169
+
170
+ GDPR Status: 65% (11/17 controls met, 4 partial, 2 not met)
171
+ NOT MET:
172
+ Article 17 — No data deletion endpoint implemented
173
+ Article 30 — No processing activities register
174
+ PARTIAL:
175
+ Article 15 — Data export exists but incomplete (missing analytics data)
176
+ ...
177
+
178
+ Remediation Plan: 7 items (2 critical, 3 important, 2 improvement)
179
+ Estimated total effort: 45 engineering-hours
180
+ ```
181
+
182
+ ---
183
+
184
+ ## Harness Integration
185
+
186
+ - **`harness skill run harness-compliance`** -- Primary CLI entry point. Runs all four phases.
187
+ - **`harness validate`** -- Run after generating compliance artifacts to verify project structure.
188
+ - **`harness check-deps`** -- Verify that compliance-related dependencies (audit logging libraries, encryption modules) are declared.
189
+ - **`emit_interaction`** -- Used at framework selection (checkpoint:decision) when multiple frameworks apply and the team wants to prioritize, and at remediation plan review (checkpoint:human-verify).
190
+ - **`Glob`** -- Discover compliance documentation, audit trail implementations, privacy policies, and data models.
191
+ - **`Grep`** -- Search for PII field patterns, encryption configurations, consent collection, logging patterns, and sensitive data handling.
192
+ - **`Write`** -- Generate compliance reports, audit checklists, and remediation plans.
193
+ - **`Edit`** -- Update existing compliance documentation with current audit status.
194
+
195
+ ## Success Criteria
196
+
197
+ - All applicable compliance frameworks are identified with justification for inclusion
198
+ - Data classification matrix covers all persisted user data fields with sensitivity tier and storage location
199
+ - Audit checks reference specific framework control identifiers (SOC2 CC6.1, GDPR Article 17, etc.)
200
+ - Gap analysis includes specific file locations and code references, not just abstract control descriptions
201
+ - Remediation plan items have effort estimates and are prioritized by risk and audit timeline
202
+ - Audit-ready checklists can be handed directly to an external auditor as evidence documentation
203
+
204
+ ## Examples
205
+
206
+ ### Example: SaaS Application with SOC2 and GDPR Requirements
207
+
208
+ ```
209
+ Phase 1: SCAN
210
+ Frameworks detected:
211
+ - SOC2: docs/compliance/soc2/ directory exists, audit logging in src/audit/
212
+ - GDPR: EU customers present (detected from i18n locales and privacy policy)
213
+ - PCI-DSS: Not applicable (payments via Stripe, card data never touches servers)
214
+ Data stores: PostgreSQL (primary), Redis (cache/sessions), S3 (file uploads)
215
+ Third-party processors: Stripe, SendGrid, Segment, Datadog
216
+
217
+ Phase 2: CLASSIFY
218
+ Critical: None (no SSN, card data handled by Stripe)
219
+ Sensitive: email, phone, address (users table), IP address (access_logs)
220
+ Internal: order_history, preferences, usage_metrics
221
+ Public: username, display_name, avatar_url
222
+ Cross-border: Primary DB in us-east-1, CDN globally, Segment data to US
223
+ GDPR gap: No SCCs documented for US-based sub-processors
224
+
225
+ Phase 3: AUDIT
226
+ SOC2: 78% compliant (18/23)
227
+ CC6.3 — PostgreSQL not using column-level encryption for sensitive fields
228
+ CC7.2 — Datadog alerts exist but no security-specific monitors
229
+ GDPR: 65% compliant (11/17)
230
+ Article 17 — DELETE /api/users/:id exists but does not cascade to S3 files or Segment
231
+ Article 30 — No Records of Processing Activities document
232
+
233
+ Phase 4: REPORT
234
+ Generated: docs/compliance/audit-report-2026-03-27.md
235
+ Remediation plan:
236
+ Critical (week 1-2):
237
+ 1. Implement cascading deletion across PostgreSQL, S3, Segment, SendGrid
238
+ 2. Create Records of Processing Activities document
239
+ Important (week 3-6):
240
+ 3. Add column-level encryption for email, phone, address fields
241
+ 4. Create security-specific Datadog monitors for auth failures
242
+ 5. Document SCCs for all US-based sub-processors
243
+ Improvement (week 7-12):
244
+ 6. Implement data export endpoint including Segment analytics data
245
+ 7. Add automated retention enforcement with TTL-based cleanup jobs
246
+ ```
247
+
248
+ ### Example: Healthcare Platform with HIPAA Requirements
249
+
250
+ ```
251
+ Phase 1: SCAN
252
+ Frameworks detected:
253
+ - HIPAA: patient, diagnosis, prescription models in src/models/
254
+ - SOC2: Required by enterprise customers, docs/compliance/soc2/ present
255
+ Data stores: PostgreSQL (primary), Redis (session cache), AWS S3 (medical records)
256
+ Third-party processors: Twilio (patient notifications), AWS (infrastructure)
257
+ BAA status: AWS BAA signed, Twilio BAA signed
258
+
259
+ Phase 2: CLASSIFY
260
+ Critical (PHI):
261
+ - patient_records: name, DOB, SSN, diagnosis_code, treatment_plan
262
+ - prescriptions: medication, dosage, prescribing_physician
263
+ - medical_images: stored in S3 bucket 'patient-records-prod'
264
+ Sensitive: provider email, staff credentials, appointment schedules
265
+ PHI field count: 23 fields across 8 tables
266
+
267
+ Phase 3: AUDIT
268
+ HIPAA Security Rule: 72% compliant
269
+ 164.312(a)(1) — Access control exists but no automatic session logoff
270
+ 164.312(b) — Audit log captures reads but not all PHI access events
271
+ 164.312(c)(1) — No integrity checksums on medical records in S3
272
+ 164.312(e)(1) — TLS 1.2 in transit, AES-256 at rest in PostgreSQL and S3
273
+ SOC2: 81% compliant
274
+ All findings overlap with HIPAA gaps
275
+
276
+ Phase 4: REPORT
277
+ Generated: docs/compliance/hipaa-audit-2026-03-27.md
278
+ Remediation plan:
279
+ Critical (week 1-2):
280
+ 1. Add automatic session timeout (15 min idle) for clinical users
281
+ 2. Extend audit logging to capture all PHI read events with user context
282
+ 3. Add SHA-256 integrity checksums to S3 medical record objects
283
+ Important (week 3-6):
284
+ 4. Implement minimum necessary access — restrict PHI queries to treating providers
285
+ 5. Add PHI access review report for compliance officer (monthly)
286
+ Improvement (week 7-12):
287
+ 6. Implement emergency access ("break the glass") with post-access audit
288
+ 7. Add automated HIPAA compliance regression tests to CI pipeline
289
+ ```
290
+
291
+ ## Gates
292
+
293
+ - **No compliance report without data classification.** A compliance audit that does not inventory and classify data fields is incomplete. The classification matrix must be produced before controls can be meaningfully assessed. Without knowing what data exists and where, control checks are theoretical.
294
+ - **No critical control gaps left without remediation plan.** Every control marked "not met" must have a corresponding remediation item with effort estimate and priority. Identifying gaps without a path to closure is shelf-ware.
295
+ - **No PII/PHI field handling changes without re-audit.** When a PR adds or modifies fields classified as sensitive or critical, the compliance audit for affected frameworks must be re-run. Data handling changes can invalidate previous compliance assessments.
296
+ - **No third-party data sharing without documented basis.** Every third-party that receives user data must have a documented lawful basis (GDPR), BAA (HIPAA), or be within scope boundaries (SOC2/PCI-DSS). Undocumented data sharing is a blocking compliance gap.
297
+
298
+ ## Escalation
299
+
300
+ - **When compliance requirements conflict with business timelines:** Report: "The GDPR Article 17 implementation requires [N] engineering-hours and touches [M] services. If the audit deadline is [date], recommend prioritizing the critical controls and documenting a remediation timeline for the remaining gaps. Partial compliance with a credible plan is better than no plan."
301
+ - **When legal interpretation is needed:** Report: "The application of [specific regulation article] to [specific data handling pattern] requires legal interpretation. This skill identifies technical implementation gaps but cannot determine legal applicability. Recommend consulting with legal counsel on [specific question]."
302
+ - **When third-party processors lack required agreements:** Report: "[Processor] handles [data type] but no [BAA/DPA/SCC] is on file. This is a blocking compliance gap. Options: (1) execute the required agreement with the processor, (2) migrate to an alternative processor with agreements in place, (3) stop sending regulated data to this processor."
303
+ - **When audit trail implementation requires significant architecture changes:** Report: "The current logging infrastructure does not support immutable, tamper-evident audit trails required by [framework]. Options: (1) add append-only audit table with separate write credentials, (2) use a dedicated audit service (e.g., AWS CloudTrail, custom event store), (3) adopt event sourcing for regulated data flows. Effort estimate: [N] weeks."