@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,296 @@
1
+ # Enforce Architecture
2
+
3
+ > Validate architectural layer boundaries and detect dependency violations. No code may violate layer constraints — this is a hard gate, not a suggestion.
4
+
5
+ ## When to Use
6
+
7
+ - Before approving any pull request or merge
8
+ - After writing new imports or module references
9
+ - When adding a new module or package to the project
10
+ - When `on_pre_commit` or `on_architecture_check` triggers fire
11
+ - After refactoring that moves code between layers or modules
12
+ - NOT when editing documentation, configuration, or non-code files
13
+ - NOT when the violation is intentional and requires a constraint update (escalate instead)
14
+
15
+ ## Process
16
+
17
+ ### Phase 1: Load Constraints
18
+
19
+ 1. **Read `harness.config.json`** to understand the project's architectural constraints. The config defines:
20
+ - **Layers** — ordered list of architectural layers (e.g., `ui -> service -> repository -> domain`)
21
+ - **Dependency rules** — which layers may import from which (typically: layers may only import from layers below them)
22
+ - **Forbidden imports** — specific import paths that are never allowed in certain contexts
23
+ - **Boundary definitions** — which directories/packages belong to which layer
24
+
25
+ - **Design constraints** — when `design` config exists, also load design constraint rules:
26
+ - Token compliance — components must reference design tokens, not hardcoded values
27
+ - Accessibility compliance — color pairs must meet WCAG contrast ratios
28
+ - Anti-pattern enforcement — project-specific anti-patterns from `design-system/DESIGN.md`
29
+ - Platform binding — tokens must have appropriate platform bindings for enabled platforms
30
+
31
+ 2. **Understand the layer model.** In a typical layered architecture:
32
+ - Higher layers depend on lower layers (UI depends on Service, Service depends on Repository)
33
+ - Lower layers NEVER depend on higher layers (Repository must not import from UI)
34
+ - Same-layer imports may or may not be allowed depending on project config
35
+ - Cross-cutting concerns (logging, config) have their own rules
36
+
37
+ ### Graph-Enhanced Context (when available)
38
+
39
+ When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate violation detection:
40
+
41
+ - `query_graph` — traverse `imports` edges against layer constraint nodes to find all violations in a single query
42
+ - `get_relationships` — find all code dependent on a violation target to show the full scope of impact
43
+
44
+ Graph queries show the complete violation scope (not just the first occurrence per file) and reveal transitive violations that single-file analysis misses. Fall back to file-based commands if no graph is available.
45
+
46
+ ### Phase 2: Run Dependency Checks
47
+
48
+ 1. **Run `harness check-deps`** to analyze all import statements against the constraint model. Capture the full JSON output.
49
+
50
+ 1b. **Optionally run `harness check-arch`** for comprehensive architecture analysis beyond dependency checking. This covers circular dependencies, complexity, coupling, module size, and dependency depth in addition to layer violations.
51
+
52
+ 2. **Parse the results.** Each violation includes:
53
+ - The violating file and line number
54
+ - The forbidden import target
55
+ - The source layer and target layer
56
+ - The specific rule being violated
57
+
58
+ ### Phase 3: Analyze Violations
59
+
60
+ For each violation, determine:
61
+
62
+ 1. **Which layers are involved.** Identify the source file's layer and the imported module's layer. Map them to the constraint model.
63
+
64
+ 2. **What rule is violated.** Common violation types:
65
+ - **Upward dependency** — a lower layer imports from a higher layer (e.g., repository importing from UI). This is the most serious type. It creates coupling that makes the lower layer untestable in isolation.
66
+ - **Skip-layer dependency** — a layer reaches past its immediate neighbor (e.g., UI importing directly from Repository, bypassing Service). This breaks encapsulation and makes the middle layer pointless.
67
+ - **Circular dependency** — two modules or layers depend on each other. This creates fragile coupling where changing either module risks breaking the other.
68
+ - **Forbidden import** — a specific import that is explicitly banned (e.g., importing a database driver outside the repository layer). This prevents implementation details from leaking.
69
+ - **Design constraint violation** — a component uses hardcoded values instead of design tokens, or violates a declared anti-pattern. Severity depends on `design.strictness` in config. These violations surface as DESIGN-xxx codes:
70
+ - `DESIGN-001` [warn] — Hardcoded color/font/spacing instead of token reference
71
+ - `DESIGN-002` [warn] — Value matches a project anti-pattern
72
+ - `DESIGN-003` [error] — WCAG contrast ratio failure (error in strict mode)
73
+ - `DESIGN-004` [info] — Missing platform binding for enabled platform
74
+
75
+ 3. **Explain the impact.** For each violation, state:
76
+ - WHY the constraint exists (what architectural property it protects)
77
+ - WHAT would happen if the violation were allowed to persist
78
+ - HOW it affects testability, maintainability, and changeability
79
+
80
+ ### Phase 3.5: Apply Safe Architecture Fixes
81
+
82
+ Some architecture violations can be auto-fixed. Apply these before surfacing remaining violations.
83
+
84
+ **Import ordering violations:**
85
+
86
+ 1. Identify files where imports are not ordered according to the project's layer convention.
87
+ 2. Reorder imports: external packages first, then by layer (lowest to highest), then relative imports.
88
+ 3. Verify with lint + typecheck. This is a safe, mechanical fix.
89
+
90
+ **Forbidden import replacement (with configured alternative):**
91
+
92
+ 1. Check `harness.config.json` for `forbiddenImports` entries that include an `alternative` field.
93
+ 2. For each violation where an alternative exists, replace the import path with the alternative.
94
+ 3. Verify with typecheck + test. This is "probably safe" -- present as a diff for approval in interactive mode, apply silently in CI mode.
95
+
96
+ **Design token substitution (unambiguous mapping):**
97
+
98
+ 1. When a hardcoded value has exactly one matching design token, replace the literal with the token reference.
99
+ 2. Verify with typecheck + test.
100
+ 3. If the mapping is ambiguous (multiple candidate tokens), surface to user.
101
+
102
+ **Never auto-fix these (always surface to user):**
103
+
104
+ - Upward dependencies
105
+ - Skip-layer dependencies
106
+ - Circular dependencies
107
+ - Forbidden imports without a configured alternative
108
+
109
+ ### Phase 3.6: Convergence Loop (Standalone)
110
+
111
+ When running standalone (not through the orchestrator), apply a single-concern convergence loop:
112
+
113
+ 1. **Re-run detection.** After applying all safe/probably-safe fixes, run `harness check-deps` again.
114
+ 2. **Check if violation count decreased.** Compare the new count to the previous count.
115
+ 3. **If decreased: loop.** Fixing one violation can resolve others (e.g., replacing a forbidden import may eliminate a transitive skip-layer violation). Go back to Phase 2 with the new results.
116
+ 4. **If unchanged: stop.** Proceed to Phase 4 (Guide Resolution) for remaining violations.
117
+ 5. **Maximum iterations: 5.** To prevent infinite loops.
118
+
119
+ **Verification gate:** After each fix batch, run:
120
+
121
+ ```
122
+ pnpm lint && pnpm tsc --noEmit && pnpm test
123
+ ```
124
+
125
+ If any command fails, revert the batch and reclassify those findings as unsafe.
126
+
127
+ ### Phase 4: Guide Resolution
128
+
129
+ For each violation, provide a specific fix:
130
+
131
+ - **Upward dependency:** Introduce an interface or abstraction in the lower layer. The higher layer implements it; the lower layer depends only on the abstraction. Alternatively, use dependency injection.
132
+ - **Skip-layer dependency:** Route the call through the intermediate layer. Add a method to the Service layer that delegates to the Repository, then have the UI call the Service.
133
+ - **Circular dependency:** Break the cycle by extracting shared types into a common module that both can depend on, or restructure so the dependency flows in one direction only.
134
+ - **Forbidden import:** Check `harness.config.json` for an `alternative` field. If present, this should have been auto-fixed in Phase 3.5. If not present, replace the forbidden import with the approved alternative or restructure the code.
135
+ - **Design constraint violation:** Replace hardcoded values with token references from `design-system/tokens.json`. For anti-pattern violations, consult `design-system/DESIGN.md` for the project's aesthetic intent and approved alternatives. For contrast failures, use `harness-accessibility` to find compliant color pairs.
136
+
137
+ ## Common Violation Patterns
138
+
139
+ ### Pattern: "I just need one thing from that layer"
140
+
141
+ A UI component imports a repository function directly because "it is just one query." Fix: add the query to the Service layer. The extra indirection is the architecture working correctly.
142
+
143
+ ### Pattern: "Shared types across layers"
144
+
145
+ Two layers both need the same type definition. Fix: place shared types in the lowest layer that both depend on, or create a dedicated `types` or `shared` module at the bottom of the layer stack.
146
+
147
+ ### Pattern: "Test utilities importing production code from wrong layer"
148
+
149
+ Test helpers import across layer boundaries for convenience. Fix: each layer's tests should only import from that layer and below. Test utilities should follow the same constraints as production code.
150
+
151
+ ### Pattern: "Hardcoded colors in components"
152
+
153
+ A component uses `#3b82f6` directly instead of referencing `color.primary` from the design token system. Fix: import and reference the token. In Tailwind: use the token-mapped utility class. In CSS: use the custom property `var(--color-primary)`.
154
+
155
+ ### Pattern: "Circular dependency through re-exports"
156
+
157
+ Module A re-exports from Module B, and Module B imports from Module A. The circular dependency is hidden by the re-export. Fix: identify the true dependency direction and remove the reverse path.
158
+
159
+ ## Harness Integration
160
+
161
+ - **`harness check-deps`** — Primary tool. Analyzes all imports against the layer model defined in `harness.config.json`. Returns structured violation data including file, line, source layer, target layer, and rule violated.
162
+ - **`harness check-deps --json`** — Machine-readable output for automated pipelines. Use this when parsing results programmatically.
163
+ - **`harness validate`** — Includes dependency checking as part of full project validation. Use when you want a complete health check, not just architecture.
164
+ - **`harness-design-system`** — Provides the design token source of truth (`tokens.json`) that constraints validate against.
165
+ - **`harness-accessibility`** — Provides WCAG contrast validation used by DESIGN-003 constraints.
166
+ - **Design constraint category** — Controlled by `design.strictness` in `harness.config.json`. Design violations surface alongside architectural violations in the same report.
167
+ - **`harness check-arch`** — Architecture assertion framework. Runs all 7 metric collectors against baseline and thresholds. Use for comprehensive structural health checks beyond layer dependencies. Supports `--update-baseline` to capture current state and `--json` for machine-readable output.
168
+ - **`harness check-arch --module <path>`** — Scoped architecture check for a single module. Use when validating a specific subsystem.
169
+
170
+ ## Success Criteria
171
+
172
+ - `harness check-deps` reports zero violations
173
+ - All imports flow downward through the layer stack (or follow explicitly configured exceptions)
174
+ - No circular dependencies exist between modules or layers
175
+ - No forbidden imports are present anywhere in the codebase
176
+ - Every new module is assigned to the correct layer in the config
177
+ - The layer model in `harness.config.json` accurately reflects the intended architecture
178
+
179
+ ## Examples
180
+
181
+ ### Example: Service layer importing from UI layer
182
+
183
+ **Violation from `harness check-deps`:**
184
+
185
+ ```
186
+ VIOLATION: Upward dependency
187
+ File: src/services/user-service.ts:12
188
+ Import: import { UserForm } from '../components/UserForm'
189
+ Source layer: service (level 2)
190
+ Target layer: ui (level 3)
191
+ Rule: service layer must not depend on ui layer
192
+ ```
193
+
194
+ **Impact:** The UserService now depends on a React component. It cannot be used in a CLI tool, a background job, or tested without a DOM. The service layer should be framework-agnostic.
195
+
196
+ **Resolution:**
197
+
198
+ ```typescript
199
+ // BEFORE (violating)
200
+ import { UserForm } from '../components/UserForm';
201
+ const data = UserForm.defaultValues; // using UI defaults in service
202
+
203
+ // AFTER (fixed)
204
+ // Define the defaults where they belong — in the service layer
205
+ const DEFAULT_USER_DATA: UserInput = { name: '', email: '' };
206
+ ```
207
+
208
+ ### Example: Circular dependency between modules
209
+
210
+ **Violation from `harness check-deps`:**
211
+
212
+ ```
213
+ VIOLATION: Circular dependency detected
214
+ Cycle: src/services/order-service.ts -> src/services/inventory-service.ts -> src/services/order-service.ts
215
+ order-service imports checkStock from inventory-service
216
+ inventory-service imports getOrderQuantity from order-service
217
+ ```
218
+
219
+ **Resolution:** Extract the shared concern into a new module:
220
+
221
+ ```typescript
222
+ // src/services/stock-calculator.ts (new, shared module)
223
+ export function calculateRequiredStock(quantity: number, reserved: number): number {
224
+ return quantity - reserved;
225
+ }
226
+ ```
227
+
228
+ Both services import from `stock-calculator` instead of from each other. The cycle is broken.
229
+
230
+ ## Gates
231
+
232
+ These are hard stops. Architecture violations are not warnings — they are errors.
233
+
234
+ - **No code with layer violations may be approved or merged.** If `harness check-deps` reports violations, the code must be fixed before it proceeds.
235
+ - **No new modules without layer assignment.** Every new directory or package must be mapped to a layer in `harness.config.json` before code is written in it.
236
+ - **No "temporary" violations.** There is no TODO for architecture. Either the code respects the constraints or it does not ship.
237
+ - **No suppressing violations without team approval.** If a violation needs to be allowed, the constraint in `harness.config.json` must be explicitly updated with a comment explaining why.
238
+
239
+ ## Evidence Requirements
240
+
241
+ When this skill makes claims about existing code, architecture, or behavior,
242
+ it MUST cite evidence using one of:
243
+
244
+ 1. **File reference:** `file:line` format (e.g., `src/auth.ts:42`)
245
+ 2. **Code pattern reference:** `file` with description (e.g., `src/utils/hash.ts` —
246
+ "existing bcrypt wrapper")
247
+ 3. **Test/command output:** Inline or referenced output from a test run or CLI command
248
+ 4. **Session evidence:** Write to the `evidence` session section via `manage_state`
249
+
250
+ **Uncited claims:** Technical assertions without citations MUST be prefixed with
251
+ `[UNVERIFIED]`. Example: `[UNVERIFIED] The auth middleware supports refresh tokens`.
252
+
253
+ ## Red Flags
254
+
255
+ ### Universal
256
+
257
+ These apply to ALL skills. If you catch yourself doing any of these, STOP.
258
+
259
+ - **"I believe the codebase does X"** — Stop. Read the code and cite a file:line
260
+ reference. Belief is not evidence.
261
+ - **"Let me recommend [pattern] for this"** without checking existing patterns — Stop.
262
+ Search the codebase first. The project may already have a convention.
263
+ - **"While we're here, we should also [unrelated improvement]"** — Stop. Flag the idea
264
+ but do not expand scope beyond the stated task.
265
+
266
+ ### Domain-Specific
267
+
268
+ - **"Auto-fixing this import to use the correct layer"** without verifying the replacement module exists — Stop. Verify the target exists and exports the needed symbol before rewriting an import.
269
+ - **"This file is in a test directory, skipping violation"** — Stop. Test directories have architectural rules too. Check the constraint definition before assuming tests are exempt.
270
+ - **"Removing this circular dependency by moving the import"** without tracing downstream effects — Stop. Moving imports can break consumers. Trace the dependency chain first.
271
+ - **"This violation is from generated code, ignoring"** — Stop. Generated files can still violate architecture if the generator is misconfigured. Check the source template.
272
+
273
+ ## Rationalizations to Reject
274
+
275
+ ### Universal
276
+
277
+ These reasoning patterns sound plausible but lead to bad outcomes. Reject them.
278
+
279
+ - **"It's probably fine"** — "Probably" is not evidence. Verify before asserting.
280
+ - **"This is best practice"** — Best practice in what context? Cite the source and
281
+ confirm it applies to this codebase.
282
+ - **"We can fix it later"** — If it is worth flagging, it is worth documenting now
283
+ with a concrete follow-up plan.
284
+
285
+ ### Domain-Specific
286
+
287
+ - **"The violation is minor — just one import"** — One violation sets a precedent. Enforce the constraint or document an explicit exception with rationale.
288
+ - **"It works, so the architecture must be fine"** — Working code with bad architecture is technical debt with compound interest. Correct function does not excuse structural violations.
289
+ - **"This is a legacy module, different rules apply"** — Legacy does not mean exempt. Either the constraint applies or it needs an explicit documented exception.
290
+
291
+ ## Escalation
292
+
293
+ - **When a violation seems impossible to fix within the current architecture:** The architecture may need to evolve. Escalate to the human with a clear explanation of the constraint, the use case, and why they conflict. Propose options: update the constraint, restructure the code, or add a new layer.
294
+ - **When `harness check-deps` reports false positives:** Verify the layer assignments in `harness.config.json` are correct. If a file is assigned to the wrong layer, fix the config. If the tool is genuinely wrong, report the issue.
295
+ - **When fixing one violation creates another:** This usually indicates a deeper structural issue. Step back and look at the dependency graph as a whole rather than fixing violations one at a time.
296
+ - **When the team wants to change the layer model:** This is a significant architectural decision. All existing code must be migrated to the new model. Plan this as a dedicated refactoring effort, not a side task.
@@ -0,0 +1,35 @@
1
+ name: enforce-architecture
2
+ version: "1.1.0"
3
+ description: Validate architectural layer boundaries, detect violations, and auto-fix import ordering and forbidden import replacement
4
+ cognitive_mode: meticulous-verifier
5
+ triggers:
6
+ - manual
7
+ - on_pr
8
+ - on_commit
9
+ platforms:
10
+ - claude-code
11
+ - gemini-cli
12
+ tools:
13
+ - Bash
14
+ - Read
15
+ - Glob
16
+ cli:
17
+ command: harness skill run enforce-architecture
18
+ args:
19
+ - name: path
20
+ description: Project root path
21
+ required: false
22
+ - name: fix
23
+ description: Enable auto-fix with convergence loop
24
+ required: false
25
+ mcp:
26
+ tool: run_skill
27
+ input:
28
+ skill: enforce-architecture
29
+ path: string
30
+ type: rigid
31
+ tier: 2
32
+ state:
33
+ persistent: false
34
+ files: []
35
+ depends_on: []
@@ -0,0 +1,281 @@
1
+ # Harness Accessibility
2
+
3
+ > WCAG compliance verification and remediation. Scan components for accessibility violations, evaluate severity against design strictness, generate actionable reports, and apply automated fixes for mechanical issues.
4
+
5
+ ## When to Use
6
+
7
+ - Auditing new or existing UI components for WCAG AA accessibility compliance
8
+ - Before PR merge to catch accessibility regressions in UI changes
9
+ - When `on_new_feature` triggers fire and the feature includes UI components
10
+ - When design tokens change (color updates may break contrast compliance)
11
+ - After running harness-design-system to validate the generated palette
12
+ - When `on_project_init` triggers fire to establish an accessibility baseline
13
+ - NOT for design token generation or palette selection (use harness-design-system)
14
+ - NOT for visual design review or aesthetic direction (use harness-design, Phase 4)
15
+ - NOT for non-UI code (backend services, CLI tools, data pipelines)
16
+
17
+ ## Process
18
+
19
+ ### Phase 1: SCAN -- Detect Accessibility Violations
20
+
21
+ 1. **Load design tokens.** Read `design-system/tokens.json` (if it exists) to identify declared color values and contrast pairs. Token-defined colors are the source of truth -- hardcoded colors in components are themselves a violation.
22
+
23
+ 2. **Read design strictness.** Check `harness.config.json` for `design.strictness`:
24
+ - `strict` -- all findings are errors that block (CI fails, PR cannot merge)
25
+ - `standard` -- warnings are visible, errors block (default behavior)
26
+ - `permissive` -- all findings are informational (nothing blocks, but everything is reported)
27
+
28
+ 2.5. **Check for i18n skill overlap.** Read `harness.config.json` for `i18n.enabled`:
29
+
30
+ - If `i18n.enabled: true`, **defer** `lang` and `dir` attribute checks to `harness-i18n`. Do not scan for missing `lang` on `<html>` or missing `dir` on user-content containers -- those checks are covered by the i18n skill's scan phase with more context (locale-aware, RTL-aware).
31
+ - If `i18n.enabled` is false or absent, scan for `lang`/`dir` as normal (these remain part of the accessibility audit).
32
+ - This deduplication prevents the same finding from appearing in both the accessibility report and the i18n report.
33
+
34
+ 3. **Scan component files.** Search all files matching `.tsx`, `.jsx`, `.vue`, `.svelte`, `.html` for the following violations:
35
+
36
+ **Images and media:**
37
+ - `<img>` tags without `alt` attribute (`A11Y-001`)
38
+ - `<img>` tags with empty `alt=""` on non-decorative images (`A11Y-002`)
39
+ - `<video>` and `<audio>` without captions/transcripts (`A11Y-003`)
40
+
41
+ **ARIA and semantics:**
42
+ - Interactive elements (`<button>`, `<a>`, `<input>`) without accessible labels (`A11Y-010`)
43
+ - Icon-only buttons without `aria-label` or visually hidden text (`A11Y-011`)
44
+ - Clickable `<div>` or `<span>` without `role="button"` and keyboard handler (`A11Y-012`)
45
+ - Missing `role` attributes on custom interactive widgets (`A11Y-013`)
46
+ - `aria-hidden="true"` on focusable elements (`A11Y-014`)
47
+
48
+ **Heading structure:**
49
+ - Non-sequential heading levels (e.g., `<h1>` followed by `<h3>`, skipping `<h2>`) (`A11Y-020`)
50
+ - Multiple `<h1>` elements on a single page/component (`A11Y-021`)
51
+ - Empty headings (`A11Y-022`)
52
+
53
+ **Color and contrast:**
54
+ - Hardcoded color values not from the token set (`A11Y-030`)
55
+ - Inline styles with color/background-color that may fail contrast (`A11Y-031`)
56
+
57
+ **Keyboard navigation:**
58
+ - `onClick` handlers without corresponding `onKeyDown`/`onKeyUp` (`A11Y-040`)
59
+ - Missing `tabIndex` on custom interactive elements (`A11Y-041`)
60
+ - Positive `tabIndex` values (disrupts natural tab order) (`A11Y-042`)
61
+ - Missing focus indicators (`:focus` or `:focus-visible` styles) (`A11Y-043`)
62
+
63
+ **Forms:**
64
+ - `<input>`, `<select>`, `<textarea>` without associated `<label>` or `aria-label` (`A11Y-050`)
65
+ - Missing `id` attributes on form controls (needed for label association) (`A11Y-051`)
66
+ - Missing error messages or `aria-invalid` on validation states (`A11Y-052`)
67
+
68
+ 4. **Load anti-pattern catalogs.** Read additional detection rules from `agents/skills/shared/design-knowledge/` if available. These catalogs contain industry-specific accessibility patterns (e.g., healthcare forms require higher contrast, fintech requires screen reader-compatible data tables).
69
+
70
+ 5. **Record all findings.** Each finding includes:
71
+ - File path
72
+ - Line number (approximate, from Grep output)
73
+ - Violation code (e.g., `A11Y-001`)
74
+ - Element or pattern that triggered the finding
75
+ - Raw evidence (the matching line of code)
76
+
77
+ ### Phase 2: EVALUATE -- Assess Severity and Categorize
78
+
79
+ 1. **Assign severity based on `design.strictness`:**
80
+ - `strict` mode: all violations are `error` severity
81
+ - `standard` mode: missing alt, missing labels, contrast failures are `error`; heading order, tabIndex are `warn`; informational patterns are `info`
82
+ - `permissive` mode: contrast failures and missing labels are `warn`; everything else is `info`
83
+
84
+ 2. **Calculate contrast ratios.** For every color pair found in scanned code:
85
+ - Extract foreground and background colors (from inline styles, class mappings, or token references)
86
+ - Calculate relative luminance for each color using the WCAG 2.1 formula:
87
+ - `L = 0.2126 * R + 0.7152 * G + 0.0722 * B` (where R, G, B are linearized sRGB values)
88
+ - Calculate contrast ratio: `(L1 + 0.05) / (L2 + 0.05)` where L1 is the lighter color
89
+ - Compare against thresholds:
90
+ - Normal text (< 18px regular, < 14px bold): 4.5:1 minimum (WCAG AA)
91
+ - Large text (>= 18px regular, >= 14px bold): 3:1 minimum (WCAG AA)
92
+
93
+ 3. **Cross-reference with design tokens.** If `design-system/tokens.json` exists:
94
+ - Map hardcoded colors in code to their nearest token equivalents
95
+ - If a token-based color pair fails contrast, flag the **token definition** (not just the component usage) -- the fix belongs in harness-design-system, not here
96
+ - If a hardcoded color fails contrast, flag both the contrast issue and the non-token usage
97
+
98
+ 4. **Check graph constraints.** If a graph exists at `.harness/graph/`, use `DesignConstraintAdapter` from `packages/graph/src/constraints/DesignConstraintAdapter.ts` to:
99
+ - Query for existing `VIOLATES` edges (violations already recorded in the graph)
100
+ - Add new `VIOLATES` edges for findings from this scan
101
+ - The adapter reads `design.strictness` to control which violations produce edges
102
+
103
+ 5. **Categorize findings.** Group into categories:
104
+ - **Contrast** (A11Y-030, A11Y-031): color-related violations
105
+ - **ARIA** (A11Y-010 through A11Y-014): attribute and role violations
106
+ - **Semantics** (A11Y-020 through A11Y-022): heading and structure violations
107
+ - **Keyboard** (A11Y-040 through A11Y-043): navigation and focus violations
108
+ - **Forms** (A11Y-050 through A11Y-052): form control violations
109
+ - **Media** (A11Y-001 through A11Y-003): image, video, audio violations
110
+
111
+ ### Phase 3: REPORT -- Generate Accessibility Report
112
+
113
+ 1. **Generate summary header:**
114
+
115
+ ```
116
+ Accessibility Report
117
+ ====================
118
+ Scanned: 42 component files
119
+ Findings: 18 total (6 error, 8 warn, 4 info)
120
+ Strictness: standard
121
+ ```
122
+
123
+ 2. **List findings grouped by category.** Each finding follows this format:
124
+
125
+ ```
126
+ A11Y-001 [error] Missing alt attribute on <img>
127
+ File: src/components/UserAvatar.tsx
128
+ Line: 24
129
+ Element: <img src={user.avatarUrl} className="avatar" />
130
+ WCAG: 1.1.1 Non-text Content
131
+ Fix: Add alt={user.name} or alt="" if decorative
132
+ ```
133
+
134
+ ```
135
+ A11Y-031 [error] Contrast ratio 2.8:1 fails WCAG AA (requires 4.5:1)
136
+ File: src/components/Button.tsx
137
+ Line: 15
138
+ Element: color: #999 on background: #fff
139
+ WCAG: 1.4.3 Contrast (Minimum)
140
+ Fix: Use color token "neutral.600" (#475569, ratio 4.9:1) instead
141
+ ```
142
+
143
+ 3. **Provide category summaries** with counts and severity breakdown.
144
+
145
+ 4. **List actionable next steps:**
146
+ - Errors that can be auto-fixed (Phase 4)
147
+ - Errors that require human judgment
148
+ - Warnings to address in next iteration
149
+ - Token-level issues to escalate to harness-design-system
150
+
151
+ ### Phase 4: FIX -- Apply Automated Remediation (Optional)
152
+
153
+ This phase is optional. It applies fixes only for **mechanical issues** -- violations with a single, unambiguous correct fix. Subjective issues (color choices, layout decisions, content writing) are never auto-fixed.
154
+
155
+ 1. **Fixable violations:**
156
+ - `A11Y-001`: Add `alt=""` to `<img>` tags that are decorative (inside `<button>`, `<a>`, or with `role="presentation"`)
157
+ - `A11Y-011`: Add `aria-label` to icon-only `<button>` elements (using the icon name as label)
158
+ - `A11Y-012`: Add `role="button"` and `tabIndex={0}` to clickable `<div>` elements
159
+ - `A11Y-041`: Add `tabIndex={0}` to custom interactive elements missing it
160
+ - `A11Y-051`: Generate `id` attributes for form controls and link them to labels
161
+
162
+ 2. **Apply each fix as a minimal, targeted edit.** Use the Edit tool. Do not refactor surrounding code. Do not change formatting. The fix should be the smallest possible change that resolves the violation.
163
+
164
+ 3. **Show before/after diff for each fix.** Present the exact change to the user. This is a hard gate -- no fix is applied without showing the diff first.
165
+
166
+ 4. **Re-scan after fixes.** Run the scan phase again on fixed files to confirm violations are resolved. Report:
167
+ - Fixes applied: N
168
+ - Violations resolved: N
169
+ - Remaining violations (require human judgment): M
170
+
171
+ 5. **Do NOT fix:**
172
+ - Color choices (subjective -- escalate to harness-design-system)
173
+ - Content for alt text on meaningful images (requires human judgment about image meaning)
174
+ - Layout and heading structure changes (may affect design intent)
175
+ - Any fix that would change the visual appearance of the component
176
+
177
+ ## Harness Integration
178
+
179
+ - **`harness validate`** -- Accessibility findings surface as design constraint violations when `design.strictness` is `strict` or `standard`. Running validate after a scan reflects the current a11y state.
180
+ - **`harness scan`** -- Refresh the knowledge graph after fixes to update `VIOLATES` edges. Ensures impact analysis stays current.
181
+ - **`DesignConstraintAdapter`** (`packages/graph/src/constraints/DesignConstraintAdapter.ts`) -- Reads `design.strictness` from project config to control violation severity. Manages `VIOLATES` edges in the graph for design and accessibility constraints.
182
+ - **`DesignIngestor`** (`packages/graph/src/ingest/DesignIngestor.ts`) -- Provides token data used for contrast checking. The ingestor parses `tokens.json` so the accessibility scanner can compare code colors against declared tokens.
183
+ - **`harness-impact-analysis`** -- When tokens change (palette update, new colors), impact analysis traces affected components. The accessibility skill uses this to determine which components need re-scanning.
184
+ - **`harness-design-system`** -- Dependency. When contrast failures originate from token definitions (not component code), escalate to harness-design-system to fix at the source.
185
+ - **`harness-i18n` deduplication** -- When `i18n.enabled: true` in config, `lang` and `dir` attribute checks are deferred to the i18n skill. This prevents duplicate findings across the accessibility and i18n reports. When i18n is not enabled, these checks remain part of the accessibility scan.
186
+
187
+ ## Success Criteria
188
+
189
+ - All scanned component files have findings categorized by severity (`error`, `warn`, `info`)
190
+ - Contrast failures detected with correct ratios and WCAG criterion references
191
+ - Missing ARIA attributes flagged with specific file paths and line numbers
192
+ - Non-sequential heading hierarchy violations identified
193
+ - Keyboard navigation gaps (missing handlers, broken tab order) detected
194
+ - Form accessibility issues (missing labels, missing error states) found
195
+ - Report generated with violation codes, WCAG references, and actionable remediation
196
+ - Automated fixes applied without breaking existing functionality or tests
197
+ - `harness validate` reflects accessibility findings at the configured strictness level
198
+ - Token-level contrast issues escalated to harness-design-system (not fixed locally)
199
+
200
+ ## Examples
201
+
202
+ ### Example: Scanning a React Dashboard Component
203
+
204
+ **Context:** A React component `DashboardCard.tsx` with known accessibility issues.
205
+
206
+ **Source file:**
207
+
208
+ ```tsx
209
+ // src/components/DashboardCard.tsx
210
+ export function DashboardCard({ title, value, icon, onClick }) {
211
+ return (
212
+ <div className="card" onClick={onClick}>
213
+ <img src={icon} />
214
+ <h3>{title}</h3>
215
+ <span style={{ color: '#999', fontSize: '14px' }}>{value}</span>
216
+ </div>
217
+ );
218
+ }
219
+ ```
220
+
221
+ **SCAN findings:**
222
+
223
+ ```
224
+ A11Y-001 [error] Missing alt attribute on <img>
225
+ File: src/components/DashboardCard.tsx
226
+ Line: 5
227
+ Element: <img src={icon} />
228
+ WCAG: 1.1.1 Non-text Content
229
+
230
+ A11Y-012 [error] Clickable <div> without role="button" and keyboard handler
231
+ File: src/components/DashboardCard.tsx
232
+ Line: 4
233
+ Element: <div className="card" onClick={onClick}>
234
+ WCAG: 2.1.1 Keyboard
235
+
236
+ A11Y-031 [warn] Contrast ratio 2.8:1 for #999 on #fff fails WCAG AA
237
+ File: src/components/DashboardCard.tsx
238
+ Line: 7
239
+ Element: <span style={{ color: '#999' }}>
240
+ WCAG: 1.4.3 Contrast (Minimum)
241
+ Note: Hardcoded color -- not from token set
242
+
243
+ A11Y-030 [info] Hardcoded color value not from design token set
244
+ File: src/components/DashboardCard.tsx
245
+ Line: 7
246
+ Element: color: '#999'
247
+ ```
248
+
249
+ **FIX phase (auto-fixable only):**
250
+
251
+ ```diff
252
+ - <img src={icon} />
253
+ + <img src={icon} alt="" />
254
+
255
+ - <div className="card" onClick={onClick}>
256
+ + <div className="card" role="button" tabIndex={0} onClick={onClick} onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') onClick?.(); }}>
257
+ ```
258
+
259
+ **Remaining (requires human judgment):**
260
+
261
+ - `A11Y-031`: Contrast failure -- fix requires choosing a darker color. Escalate to design tokens or get human input on replacement color.
262
+ - `A11Y-001`: The `alt=""` fix assumes decorative. If the icon conveys meaning, human must write descriptive alt text.
263
+
264
+ ## Gates
265
+
266
+ These are hard stops. Violating any gate means the process has broken down.
267
+
268
+ - **No component marked "accessible" without passing WCAG AA contrast checks.** A passing scan means zero `error`-severity contrast violations, not zero findings overall.
269
+ - **No automated fix applied without showing the before/after diff.** Every fix must be presented to the user with the exact code change before being written to disk.
270
+ - **No severity downgrade below what `design.strictness` config specifies.** If the project is in `strict` mode, a missing alt attribute is an error. The scanner does not get to decide it is a warning.
271
+ - **The scan phase must complete before evaluate.** No partial evaluations on incomplete scan results. All files must be scanned before severity assignment begins.
272
+ - **No fixes that change visual appearance.** Automated fixes are structural (adding attributes, roles, handlers). If a fix would visibly change the rendered output, it requires human approval.
273
+
274
+ ## Escalation
275
+
276
+ - **When contrast ratio is borderline (4.5:1 to 5:1):** Flag for human review rather than auto-passing. Report: "Contrast ratio 4.6:1 technically passes WCAG AA but is borderline. Consider using a higher-contrast alternative for better readability."
277
+ - **When a component has more than 10 findings:** Suggest architectural refactoring rather than piecemeal fixes. The component likely has systemic accessibility issues that individual fixes will not adequately address. Recommend: "This component has 14 accessibility findings. Consider refactoring to use accessible base components rather than fixing each issue individually."
278
+ - **When design tokens themselves have contrast failures:** Do not fix at the usage site. Escalate to harness-design-system: "Token pair primary-500 on neutral-50 has contrast ratio 3.2:1. This must be fixed in design-system/tokens.json, not in individual components. Run harness-design-system to update the palette."
279
+ - **When automated fix would change visual appearance:** Require explicit human approval. Present the fix with a note: "This fix changes the rendered output. The current <div> will become keyboard-focusable with a visible focus ring. Approve this change?"
280
+ - **When `design.strictness` is not configured:** Default to `standard` mode. Report: "No design.strictness found in harness.config.json. Using 'standard' (warnings visible, errors block). Set design.strictness in config to customize."
281
+ - **After 3 failed attempts to resolve a contrast issue:** The color pair may be fundamentally incompatible. Suggest: "Consider using a different color combination. The current pair cannot achieve WCAG AA compliance without changing one of the colors significantly."
@@ -0,0 +1,52 @@
1
+ name: harness-accessibility
2
+ version: "1.0.0"
3
+ description: WCAG accessibility scanning, contrast checking, ARIA validation, and remediation
4
+ cognitive_mode: meticulous-verifier
5
+ triggers:
6
+ - manual
7
+ - on_new_feature
8
+ - on_project_init
9
+ platforms:
10
+ - claude-code
11
+ - gemini-cli
12
+ tools:
13
+ - Bash
14
+ - Read
15
+ - Write
16
+ - Edit
17
+ - Glob
18
+ - Grep
19
+ cli:
20
+ command: harness skill run harness-accessibility
21
+ args:
22
+ - name: path
23
+ description: Project root path
24
+ required: false
25
+ - name: scope
26
+ description: Scope of scan (full, component, page)
27
+ required: false
28
+ mcp:
29
+ tool: run_skill
30
+ input:
31
+ skill: harness-accessibility
32
+ path: string
33
+ type: rigid
34
+ tier: 3
35
+ phases:
36
+ - name: scan
37
+ description: Scan codebase for accessibility issues (WCAG AA baseline)
38
+ required: true
39
+ - name: evaluate
40
+ description: Evaluate severity and categorize findings
41
+ required: true
42
+ - name: report
43
+ description: Generate structured accessibility report
44
+ required: true
45
+ - name: fix
46
+ description: Apply automated fixes for mechanical issues
47
+ required: false
48
+ state:
49
+ persistent: false
50
+ files: []
51
+ depends_on:
52
+ - harness-design-system