@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,187 @@
1
+ ---
2
+ description: Analyze structural health of the codebase using graph metrics
3
+ alwaysApply: false
4
+ ---
5
+
6
+ <!-- Generated by harness generate-slash-commands. Do not edit. -->
7
+
8
+ # Harness Dependency Health
9
+
10
+ > Analyze structural health of the codebase and surface problems before they become incidents.
11
+
12
+ ## When to Use
13
+
14
+ - Weekly scheduled health check on the codebase
15
+ - Before major refactoring — understand current structural health
16
+ - When onboarding to a new project — assess codebase quality
17
+ - NOT for checking layer violations (use enforce-architecture)
18
+ - NOT for finding dead code (use cleanup-dead-code)
19
+
20
+ ## Prerequisites
21
+
22
+ A knowledge graph at `.harness/graph/` enables full analysis. If no graph exists,
23
+ the skill uses static analysis fallbacks (see Graph Availability section).
24
+ Run `harness scan` to enable graph-enhanced analysis.
25
+
26
+ ### Graph Availability
27
+
28
+ Before starting, check if `.harness/graph/graph.json` exists.
29
+
30
+ **If graph exists:** Check staleness — compare `.harness/graph/metadata.json`
31
+ scanTimestamp against `git log -1 --format=%ct` (latest commit timestamp).
32
+ If graph is more than 2 commits behind (`git log --oneline <scanTimestamp>..HEAD | wc -l`),
33
+ run `harness scan` to refresh before proceeding. (Staleness sensitivity: **High**)
34
+
35
+ **If graph exists and is fresh (or refreshed):** Use graph tools as primary strategy.
36
+
37
+ **If no graph exists:** Output "Running without graph (run `harness scan` to
38
+ enable full analysis)" and use fallback strategies for all subsequent steps.
39
+
40
+ ## Process
41
+
42
+ ### Phase 1: METRICS — Compute Graph Structural Metrics
43
+
44
+ Query the graph for five key structural indicators:
45
+
46
+ 1. **Hub detection**: Find nodes with high fan-in (>10 inbound `imports` edges).
47
+
48
+ ```
49
+ query_graph(rootNodeIds=[all file nodes], includeEdges=["imports"])
50
+ ```
51
+
52
+ Hubs are single points of failure — changes to them have outsized blast radius.
53
+
54
+ 2. **Orphan detection**: Find file nodes with zero inbound `imports` edges that are not entry points.
55
+
56
+ ```
57
+ get_relationships(nodeId=<file>, direction="inbound")
58
+ ```
59
+
60
+ Orphans may be dead code or missing from the module system.
61
+
62
+ 3. **Cycle detection**: Use `check_dependencies` to find circular import chains.
63
+ Cycles create fragile coupling — any change in the cycle affects all members.
64
+
65
+ 4. **Deep chain detection**: Find import chains longer than N hops (default: 7).
66
+
67
+ ```
68
+ query_graph(rootNodeIds=[entry points], maxDepth=10, includeEdges=["imports"])
69
+ ```
70
+
71
+ Deep chains are fragile — a change at the bottom propagates unpredictably.
72
+
73
+ 5. **Module cohesion**: For each module (directory), count internal vs external edges. Low internal cohesion (many external edges, few internal) suggests misplaced code.
74
+
75
+ #### Fallback (without graph)
76
+
77
+ When no graph is available, use static analysis to approximate structural metrics:
78
+
79
+ 1. **Build adjacency list**: Grep all source files for `import`/`require` statements. Parse each to extract the imported path. Build an adjacency list mapping each file to its imports.
80
+ 2. **Hub detection**: From the adjacency list, count inbound edges per file. Files with >10 importers are hubs.
81
+ 3. **Orphan detection**: Files with zero inbound edges that are not entry points (not `index.*`, not in `package.json` main/exports). Use glob to find all source files, then subtract those that appear as import targets.
82
+ 4. **Cycle detection**: Run DFS on the adjacency list. When a back-edge is found, report the cycle path.
83
+ 5. **Deep chain detection**: From entry points, DFS to find the longest import chain. Report chains exceeding 7 hops.
84
+ 6. **Module cohesion (approximate)**: For each directory, count imports that stay within the directory (internal) vs imports that leave it (external). Cohesion = internal / (internal + external).
85
+ 7. **Run `check_dependencies` CLI** — this works without a graph and can detect layer violations.
86
+
87
+ > Fallback completeness: ~60% — cannot compute transitive depth beyond what import parsing reveals; coupling metrics are approximate.
88
+
89
+ ### Phase 2: SCORE — Calculate Health Score
90
+
91
+ Compute a weighted health score (0-100):
92
+
93
+ | Metric | Weight | Scoring |
94
+ | ----------------- | ------ | ----------------------------------------- |
95
+ | Hubs (>10 fan-in) | 25% | 0 hubs = 100, 1-3 = 70, 4-6 = 40, >6 = 10 |
96
+ | Orphans | 20% | 0 = 100, 1-5 = 80, 6-15 = 50, >15 = 20 |
97
+ | Cycles | 25% | 0 = 100, 1 = 60, 2-3 = 30, >3 = 0 |
98
+ | Deep chains (>7) | 15% | 0 = 100, 1-3 = 70, >3 = 30 |
99
+ | Cohesion (avg) | 15% | >0.7 = 100, 0.5-0.7 = 70, <0.5 = 30 |
100
+
101
+ **Grades**: A (90-100), B (75-89), C (60-74), D (40-59), F (<40)
102
+
103
+ ### Phase 3: RECOMMEND — Generate Recommendations
104
+
105
+ For each problem found, generate a specific, actionable recommendation:
106
+
107
+ - **Hubs**: "Split `src/utils/helpers.ts` (14 importers) into domain-specific utilities"
108
+ - **Orphans**: "Remove `src/legacy/old-parser.ts` (0 importers, not an entry point)"
109
+ - **Cycles**: "Break cycle A→B→C→A by extracting shared types to `src/types/shared.ts`"
110
+ - **Deep chains**: "Consider flattening chain: entry→A→B→C→D→E→F→G (8 hops)"
111
+ - **Low cohesion**: "Module `src/services/` has 80% external edges — consider splitting"
112
+
113
+ ### Output
114
+
115
+ ```
116
+ ## Dependency Health Report
117
+
118
+ ### Score: B (78/100)
119
+
120
+ ### Metrics
121
+ | Metric | Count | Score |
122
+ |--------|-------|-------|
123
+ | Hubs (>10 fan-in) | 2 | 70/100 |
124
+ | Orphans | 3 | 80/100 |
125
+ | Cycles | 0 | 100/100 |
126
+ | Deep chains (>7) | 1 | 70/100 |
127
+ | Module cohesion | 0.62 avg | 70/100 |
128
+
129
+ ### Top Issues
130
+ 1. **Hub**: src/utils/helpers.ts — 14 importers (split recommended)
131
+ 2. **Hub**: src/types/index.ts — 12 importers (acceptable for type barrel)
132
+ 3. **Orphan**: src/legacy/old-parser.ts — 0 importers
133
+ 4. **Deep chain**: entry→auth→user→db→pool→config→env→loader (8 hops)
134
+
135
+ ### Recommendations
136
+ 1. Split src/utils/helpers.ts into domain-specific modules
137
+ 2. Investigate src/legacy/old-parser.ts for removal
138
+ 3. Flatten auth chain by having auth import db directly
139
+ ```
140
+
141
+ ## Harness Integration
142
+
143
+ - **`harness scan`** — Recommended before this skill for full graph-enhanced analysis. If graph is missing, skill uses static analysis fallbacks.
144
+ - **`harness validate`** — Run after acting on findings to verify project health.
145
+ - **Graph tools** — This skill uses `query_graph`, `get_relationships`, and `check_dependencies` MCP tools.
146
+
147
+ ## Success Criteria
148
+
149
+ - Health score computed on 0-100 scale with letter grade (A-F)
150
+ - All five structural metrics gathered (hubs, orphans, cycles, deep chains, cohesion)
151
+ - Recommendations are specific and actionable (name files, suggest concrete fixes)
152
+ - Report follows the structured output format
153
+ - All findings are backed by graph query evidence (with graph) or systematic static analysis (without graph)
154
+
155
+ ## Examples
156
+
157
+ ### Example: Weekly Health Check on Monorepo
158
+
159
+ ```
160
+ Input: Scheduled weekly run on project root
161
+
162
+ 1. METRICS — query_graph for hubs: 2 found (helpers.ts, index.ts)
163
+ get_relationships for orphans: 3 found
164
+ check_dependencies for cycles: 0 found
165
+ query_graph for deep chains: 1 found (8 hops)
166
+ Module cohesion average: 0.62
167
+ 2. SCORE — Weighted score: 78/100 (Grade: B)
168
+ 3. RECOMMEND — "Split helpers.ts (14 importers) into domain modules"
169
+ "Investigate old-parser.ts for removal (0 importers)"
170
+ "Flatten auth chain — 8 hops exceeds threshold"
171
+
172
+ Output:
173
+ Score: B (78/100)
174
+ Top issues: 2 hubs, 3 orphans, 1 deep chain
175
+ 3 actionable recommendations generated
176
+ ```
177
+
178
+ ## Gates
179
+
180
+ - **Graph preferred, fallback available.** If no graph exists, use fallback strategies (import parsing, DFS cycle detection, hub/orphan identification). Do not stop — produce the best analysis possible.
181
+ - **Systematic analysis required.** All metrics must come from graph queries (with graph) or systematic import parsing (without graph). Do not guess — parse actual import statements.
182
+
183
+ ## Escalation
184
+
185
+ - **When score is F (<40)**: Flag as critical and recommend immediate architectural review.
186
+ - **When graph is stale**: Warn and suggest re-scanning before trusting results.
187
+
@@ -0,0 +1,468 @@
1
+ ---
2
+ description: Orchestrator composing 4 documentation skills into a sequential pipeline with convergence-based remediation and qualitative health reporting
3
+ alwaysApply: false
4
+ ---
5
+
6
+ <!-- Generated by harness generate-slash-commands. Do not edit. -->
7
+
8
+ # Harness Docs Pipeline
9
+
10
+ > Orchestrator composing 4 documentation skills into a sequential pipeline with convergence-based remediation, producing a qualitative documentation health report.
11
+
12
+ ## When to Use
13
+
14
+ - When you want a single-command documentation health check across drift, coverage, links, and freshness
15
+ - After major refactoring that may have caused widespread documentation drift
16
+ - As a periodic hygiene check (weekly or per-sprint)
17
+ - When onboarding a new project that has no AGENTS.md (bootstrap mode)
18
+ - When `on_doc_check` triggers fire
19
+ - NOT for fixing a single known drift issue (use align-documentation directly)
20
+ - NOT for generating AGENTS.md from scratch when you know you have a graph (use harness-knowledge-mapper directly)
21
+ - NOT for validating a single file's context (use validate-context-engineering directly)
22
+
23
+ ## Relationship to Sub-Skills
24
+
25
+ | Skill | Pipeline Phase | Role |
26
+ | ---------------------------- | -------------- | ------------------------------------------- |
27
+ | detect-doc-drift | DETECT | Find drift between code and docs |
28
+ | align-documentation | FIX | Apply fixes for drift findings |
29
+ | validate-context-engineering | AUDIT | Find gaps in documentation coverage |
30
+ | harness-knowledge-mapper | FILL | Generate/regenerate AGENTS.md and fill gaps |
31
+
32
+ This orchestrator delegates to sub-skills — it never reimplements their logic. Each sub-skill retains full standalone functionality.
33
+
34
+ ## Iron Law
35
+
36
+ **The pipeline delegates, never reimplements.** If you find yourself writing drift detection logic, fix application logic, or gap analysis logic inside the pipeline, STOP. Delegate to the dedicated sub-skill.
37
+
38
+ **Safe fixes are silent, unsafe fixes surface.** Never apply a fix classified as `unsafe` without explicit user approval. Never prompt the user for a fix classified as `safe`.
39
+
40
+ ## Flags
41
+
42
+ | Flag | Effect |
43
+ | -------------- | ----------------------------------------------------------------- |
44
+ | `--fix` | Enable convergence-based auto-fix (default: detect + report only) |
45
+ | `--no-freshen` | Skip graph staleness check |
46
+ | `--bootstrap` | Force AGENTS.md regeneration even if one exists |
47
+ | `--ci` | Non-interactive: apply safe fixes only, report everything else |
48
+
49
+ ## Shared Context Object
50
+
51
+ All phases read from and write to a shared `DocPipelineContext`:
52
+
53
+ ```typescript
54
+ interface DocPipelineContext {
55
+ // Pipeline state
56
+ graphAvailable: boolean;
57
+ agentsMdExists: boolean;
58
+ bootstrapped: boolean; // true if AGENTS.md was created this run
59
+
60
+ // Phase outputs
61
+ driftFindings: DriftFinding[];
62
+ fixesApplied: DocFix[];
63
+ gapFindings: GapFinding[];
64
+ fillsApplied: DocFix[];
65
+ exclusions: Set<string>; // finding IDs already addressed
66
+
67
+ // Health verdict
68
+ verdict: 'pass' | 'warn' | 'fail';
69
+ summary: string;
70
+ }
71
+
72
+ interface DriftFinding {
73
+ id: string;
74
+ file: string;
75
+ line?: number;
76
+ driftType: 'renamed' | 'new-code' | 'deleted-code' | 'changed-behavior' | 'moved-code';
77
+ priority: 'critical' | 'high' | 'medium' | 'low';
78
+ staleText: string;
79
+ codeChange: string;
80
+ suggestedFix: string;
81
+ fixSafety: 'safe' | 'probably-safe' | 'unsafe';
82
+ }
83
+
84
+ interface GapFinding {
85
+ id: string;
86
+ file?: string;
87
+ gapType: 'undocumented' | 'broken-link' | 'stale-section' | 'missing-context';
88
+ priority: 'critical' | 'high' | 'medium' | 'low';
89
+ description: string;
90
+ suggestedFix: string;
91
+ fixSafety: 'safe' | 'probably-safe' | 'unsafe';
92
+ }
93
+
94
+ interface DocFix {
95
+ findingId: string;
96
+ file: string;
97
+ oldText: string;
98
+ newText: string;
99
+ safety: 'safe' | 'probably-safe';
100
+ verified: boolean; // harness check-docs passed after applying
101
+ }
102
+ ```
103
+
104
+ The context is passed to sub-skills via `handoff.json` with a `pipeline` field. Sub-skills check for this field; if absent, they run in standalone mode.
105
+
106
+ ## Process
107
+
108
+ ### Phase 1: FRESHEN — Graph Freshness and AGENTS.md Bootstrap
109
+
110
+ **Skip this phase if `--no-freshen` flag is set.**
111
+
112
+ 1. **Check graph existence.** Look for `.harness/graph/` directory.
113
+ - If exists: set `context.graphAvailable = true`
114
+ - If not: set `context.graphAvailable = false`, log notice: "No knowledge graph available. Pipeline will use static analysis fallbacks. Run `harness scan` for richer results."
115
+
116
+ 2. **Check graph staleness** (only if graph exists).
117
+ - Count commits since last graph update: `git rev-list --count HEAD ^$(cat .harness/graph/.last-scan-commit 2>/dev/null || echo HEAD)`
118
+ - If >10 commits behind: run `harness scan` to refresh
119
+ - If <=10 commits: proceed with current graph
120
+
121
+ 3. **Check AGENTS.md existence.**
122
+ - If exists and `--bootstrap` not set: set `context.agentsMdExists = true`, proceed to DETECT
123
+ - If exists and `--bootstrap` set: proceed to step 4 (regenerate)
124
+ - If not exists: proceed to step 4
125
+
126
+ 4. **Bootstrap AGENTS.md.**
127
+
128
+ **If graph available:**
129
+ - Invoke `harness-knowledge-mapper` to generate AGENTS.md
130
+ - Set `context.bootstrapped = true`
131
+ - Set `context.agentsMdExists = true`
132
+
133
+ **If no graph (directory structure fallback):**
134
+ - Glob source directories: `src/*/`, `packages/*/`, `lib/*/`
135
+ - Read `package.json` for project name and description
136
+ - Identify entry points: files matching `src/index.*`, `main` field in package.json
137
+ - List top-level modules: each immediate subdirectory of `src/` (or `packages/`) with its directory name as the module name
138
+ - Generate minimal AGENTS.md:
139
+
140
+ ```markdown
141
+ # AGENTS.md
142
+
143
+ > Generated from directory structure. Run `harness scan` for richer output.
144
+
145
+ ## Project
146
+
147
+ <name from package.json> — <description from package.json>
148
+
149
+ ## Entry Points
150
+
151
+ - <each identified entry point>
152
+
153
+ ## Modules
154
+
155
+ - **<dir-name>/** — <inferred from directory name>
156
+ ```
157
+
158
+ - Set `context.bootstrapped = true`
159
+ - Set `context.agentsMdExists = true`
160
+
161
+ 5. Proceed to DETECT phase.
162
+
163
+ ### Phase 2: DETECT — Find Documentation Drift
164
+
165
+ 1. **Write pipeline context to handoff.json.** Set the `pipeline` field in `.harness/handoff.json` with the current `DocPipelineContext` so detect-doc-drift can read it.
166
+
167
+ 2. **Invoke detect-doc-drift.** Run the skill's full process:
168
+ - Phase 1 (Scan): `harness check-docs` and `harness cleanup --type drift`
169
+ - Phase 2 (Identify): Classify each finding into drift types
170
+ - Phase 3 (Prioritize): Rank by impact (Critical > High > Medium > Low)
171
+ - Phase 4 (Report): Structured output
172
+
173
+ 3. **Populate context with DriftFinding objects.** For each finding from detect-doc-drift, create a `DriftFinding` with:
174
+ - `id`: deterministic hash of `file + line + driftType` (for dedup tracking)
175
+ - `driftType`: map to one of `renamed`, `new-code`, `deleted-code`, `changed-behavior`, `moved-code`
176
+ - `priority`: map to `critical`, `high`, `medium`, `low`
177
+ - `fixSafety`: classify using the safety table below
178
+
179
+ 4. **Store findings.** Set `context.driftFindings = <all DriftFinding objects>`.
180
+
181
+ 5. **If `--fix` flag is not set:** Skip to AUDIT phase (Phase 4).
182
+
183
+ ### Fix Safety Classification
184
+
185
+ | Category | Safe (apply silently) | Probably safe (present diff) | Unsafe (surface to user) |
186
+ | --------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
187
+ | **Drift fixes** | Update file path where rename is unambiguous; fix import reference | Rewrite description for simple rename/parameter change; update code examples | Rewrite behavioral explanations; remove sections for deleted code |
188
+ | **Gap fills** | Add entry for new file with obvious single-purpose name | Add entry for new file requiring description; update AGENTS.md section ordering | Write documentation for complex modules; create new doc pages |
189
+ | **Link fixes** | Redirect broken link where target is unambiguous | Redirect when multiple candidates exist (present options) | Remove link when target no longer exists |
190
+
191
+ ### Phase 3: FIX — Convergence-Based Drift Remediation
192
+
193
+ **This phase runs only when `--fix` flag is set.**
194
+
195
+ #### Convergence Loop
196
+
197
+ ```
198
+ previousCount = context.driftFindings.length
199
+ maxIterations = 5
200
+
201
+ while iteration < maxIterations:
202
+ 1. Partition findings by safety
203
+ 2. Apply safe fixes → verify → record
204
+ 3. Present probably-safe fixes → apply approved → verify → record
205
+ 4. Surface unsafe fixes to user (no auto-apply)
206
+ 5. Re-run detect-doc-drift
207
+ 6. newCount = remaining findings
208
+ 7. if newCount >= previousCount: STOP (converged)
209
+ 8. previousCount = newCount
210
+ 9. iteration++
211
+ ```
212
+
213
+ #### Step-by-step
214
+
215
+ 1. **Partition findings by fixSafety.**
216
+ - `safeFixes`: findings where `fixSafety === 'safe'`
217
+ - `probablySafeFixes`: findings where `fixSafety === 'probably-safe'`
218
+ - `unsafeFixes`: findings where `fixSafety === 'unsafe'`
219
+
220
+ 2. **Apply safe fixes silently.**
221
+ - Write pipeline context to handoff.json with `pipeline.fixBatch = safeFixes`
222
+ - Invoke align-documentation to apply the fixes
223
+ - Run `harness check-docs` after the batch
224
+ - If check passes: record each fix as a `DocFix` with `verified: true` in `context.fixesApplied`
225
+ - If check fails: revert the batch (`git checkout -- <files>`), record fixes as `verified: false`
226
+ - Add fixed finding IDs to `context.exclusions`
227
+
228
+ 3. **Present probably-safe fixes** (skip in `--ci` mode).
229
+ - For each fix, show the diff (oldText vs newText) to the user
230
+ - Apply user-approved fixes
231
+ - Run `harness check-docs` after the batch
232
+ - Same verify/revert logic as safe fixes
233
+ - Add fixed finding IDs to `context.exclusions`
234
+
235
+ 4. **Surface unsafe fixes.**
236
+ - List each unsafe finding with its `suggestedFix` text
237
+ - Do not apply — user must handle manually
238
+ - In `--ci` mode: log to report, do not prompt
239
+
240
+ 5. **Re-run detect-doc-drift** to check for cascading issues revealed by fixes.
241
+ - If new finding count < previous count: loop back to step 1
242
+ - If new finding count >= previous count: stop (converged or no progress)
243
+ - If max iterations reached: stop
244
+
245
+ 6. **Record remaining unfixed findings** for the REPORT phase.
246
+
247
+ ### Phase 4: AUDIT — Find Documentation Gaps
248
+
249
+ 1. **Write pipeline context to handoff.json.** Update the `pipeline` field with the current `DocPipelineContext` (including `exclusions` from FIX phase).
250
+
251
+ 2. **Invoke validate-context-engineering.** Run the skill's full process:
252
+ - Phase 1 (Audit): `harness validate` and `harness check-docs`
253
+ - Phase 2 (Detect Gaps): Classify into undocumented, broken-link, stale-section, missing-context
254
+ - Phase 3 (Suggest Updates): Generate specific suggestions
255
+ - Phase 4 (Apply): Deferred to FILL phase
256
+
257
+ 3. **Populate context with GapFinding objects.** For each finding, create a `GapFinding` with:
258
+ - `id`: deterministic hash of `file + gapType + description`
259
+ - `gapType`: map to `undocumented`, `broken-link`, `stale-section`, `missing-context`
260
+ - `priority`: map to `critical`, `high`, `medium`, `low`
261
+ - `fixSafety`: classify using the safety table from DETECT phase
262
+
263
+ 4. **Dedup against FIX phase.** Remove any `GapFinding` whose `id` appears in `context.exclusions`. This prevents double-counting items already fixed in the FIX phase.
264
+
265
+ 5. **Store findings.** Set `context.gapFindings = <deduplicated GapFinding objects>`.
266
+
267
+ 6. **If `--fix` flag is not set:** Skip to REPORT phase (Phase 6).
268
+
269
+ ### Phase 5: FILL — Convergence-Based Gap Remediation
270
+
271
+ **This phase runs only when `--fix` flag is set.**
272
+
273
+ 1. **Check if AGENTS.md needs regeneration.** If `context.bootstrapped === true` and gap findings include AGENTS.md coverage issues, invoke harness-knowledge-mapper (if graph available) or the directory-structure fallback to improve AGENTS.md quality.
274
+
275
+ 2. **Run convergence loop** (same pattern as FIX phase):
276
+
277
+ ```
278
+ previousCount = context.gapFindings.length
279
+ maxIterations = 5
280
+
281
+ while iteration < maxIterations:
282
+ 1. Partition findings by safety
283
+ 2. Apply safe fills → verify → record
284
+ 3. Present probably-safe fills → apply approved → verify → record
285
+ 4. Surface unsafe fills to user
286
+ 5. Re-run validate-context-engineering
287
+ 6. newCount = remaining gaps (after dedup against exclusions)
288
+ 7. if newCount >= previousCount: STOP (converged)
289
+ 8. previousCount = newCount
290
+ 9. iteration++
291
+ ```
292
+
293
+ 3. **Apply safe fills silently.**
294
+ - For `broken-link` with unambiguous target: redirect the link
295
+ - For `undocumented` with obvious single-purpose name: add minimal entry
296
+ - Run `harness check-docs` after each batch
297
+ - Record in `context.fillsApplied`
298
+ - Add filled finding IDs to `context.exclusions`
299
+
300
+ 4. **Present probably-safe fills** (skip in `--ci` mode).
301
+ - Show diff for: new file entries requiring description, AGENTS.md section reordering
302
+ - Apply approved fills, verify, record
303
+
304
+ 5. **Surface unsafe fills.**
305
+ - Documentation for complex modules, new doc pages
306
+ - Log for report, do not apply
307
+
308
+ 6. **Record remaining unfilled gaps** for the REPORT phase.
309
+
310
+ ### Phase 6: REPORT — Synthesize Health Verdict
311
+
312
+ 1. **Run final `harness check-docs`** to establish the post-pipeline state.
313
+
314
+ 2. **Compute verdict.**
315
+
316
+ **FAIL if any of:**
317
+ - Any critical drift findings remain unfixed
318
+ - `harness check-docs` fails after all fix attempts
319
+ - AGENTS.md does not exist and bootstrap failed
320
+
321
+ **WARN if any of:**
322
+ - High-priority drift or gap findings remain (user-deferred)
323
+ - > 30% of source modules are undocumented
324
+ - Graph not available (reduced accuracy notice)
325
+
326
+ **PASS if:**
327
+ - No critical or high findings remaining
328
+ - `harness check-docs` passes
329
+ - AGENTS.md exists and covers >70% of modules
330
+
331
+ 3. **Generate per-category breakdown:**
332
+
333
+ | Category | Metric |
334
+ | --------- | -------------------------------------- |
335
+ | Accuracy | Drift findings remaining (by priority) |
336
+ | Coverage | Undocumented modules remaining |
337
+ | Links | Broken references remaining |
338
+ | Freshness | Graph staleness status |
339
+
340
+ 4. **List actions taken:**
341
+ - Auto-fixes applied (safe): count and file list
342
+ - User-approved fixes (probably-safe): count and file list
343
+ - Findings deferred to user (unsafe): count and details
344
+ - AGENTS.md bootstrapped: yes/no and method (graph or directory structure)
345
+
346
+ 5. **Set context verdict and summary.** Write `context.verdict` and `context.summary`.
347
+
348
+ 6. **Output report** to console. Format:
349
+
350
+ ```
351
+ === Documentation Health Report ===
352
+
353
+ Verdict: PASS | WARN | FAIL
354
+
355
+ Accuracy: N drift findings remaining (0 critical, 0 high, N medium, N low)
356
+ Coverage: N/M modules documented (N%)
357
+ Links: N broken references remaining
358
+ Freshness: Graph current | Graph stale (N commits behind) | No graph
359
+
360
+ Actions:
361
+ - N safe fixes applied silently
362
+ - N probably-safe fixes applied (user-approved)
363
+ - N unsafe findings deferred to user
364
+ - AGENTS.md bootstrapped from <graph|directory structure>
365
+
366
+ Remaining findings:
367
+ [list of unfixed findings with priority and suggested action]
368
+ ```
369
+
370
+ ## Harness Integration
371
+
372
+ - **`harness check-docs`** — Run in DETECT, after each fix batch in FIX/FILL, and in REPORT for final state
373
+ - **`harness cleanup --type drift`** — Used by detect-doc-drift during DETECT phase
374
+ - **`harness scan`** — Used in FRESHEN to refresh stale graph
375
+ - **`harness validate`** — Run as final step in each task to verify project health
376
+
377
+ ## Success Criteria
378
+
379
+ - `harness-docs-pipeline` runs all 4 sub-skills in the right order with shared context
380
+ - FIX and FILL phases iterate until converged; cascading fixes are caught
381
+ - Safe fixes are applied silently; unsafe changes surface to user
382
+ - `harness check-docs` runs after every fix batch; failed fixes are reverted
383
+ - Bootstrap handles cold start (no AGENTS.md) with graph path and directory structure fallback
384
+ - Standalone skills work independently exactly as today when invoked without pipeline context
385
+ - Entire pipeline runs without graph using static analysis fallbacks
386
+ - PASS/WARN/FAIL report includes per-category breakdown and specific remaining findings
387
+ - Drift fixes in FIX phase are excluded from AUDIT findings (no double-counting)
388
+
389
+ ## Examples
390
+
391
+ ### Example: Full pipeline run with fixes
392
+
393
+ ```
394
+ Input: --fix flag set, graph available, AGENTS.md exists
395
+
396
+ 1. FRESHEN — Graph exists, 3 commits behind (< 10, skip refresh)
397
+ AGENTS.md exists, no bootstrap needed
398
+ 2. DETECT — detect-doc-drift found 8 findings:
399
+ 2 critical (deleted file still referenced)
400
+ 3 high (renamed functions)
401
+ 2 medium (stale descriptions)
402
+ 1 low (formatting)
403
+ 3. FIX — Iteration 1:
404
+ 3 safe fixes applied (renamed file paths)
405
+ 2 probably-safe presented, 2 approved
406
+ 2 unsafe surfaced to user
407
+ harness check-docs: pass
408
+ Re-detect: 1 new finding (cascading rename)
409
+ Iteration 2:
410
+ 1 safe fix applied
411
+ Re-detect: 0 new findings — converged
412
+ 4. AUDIT — validate-context-engineering found 5 gaps
413
+ 2 already in exclusions (fixed in FIX) → 3 remaining
414
+ 5. FILL — 1 safe fill (broken link redirect)
415
+ 1 probably-safe (new module entry) → approved
416
+ 1 unsafe (complex module docs) → deferred
417
+ Re-audit: converged
418
+ 6. REPORT — Verdict: WARN
419
+ Accuracy: 2 drift findings remaining (0 critical, 0 high, 1 medium, 1 low)
420
+ Coverage: 12/14 modules documented (86%)
421
+ Links: 0 broken references
422
+ Freshness: Graph current
423
+ ```
424
+
425
+ ### Example: CI mode (non-interactive)
426
+
427
+ ```
428
+ Input: --fix --ci flags set, no graph
429
+
430
+ 1. FRESHEN — No graph (notice logged), AGENTS.md exists
431
+ 2. DETECT — 4 findings (1 critical, 2 high, 1 medium)
432
+ 3. FIX — 2 safe fixes applied silently
433
+ probably-safe and unsafe: logged to report (no prompts)
434
+ 4. AUDIT — 2 gaps (1 deduped) → 1 remaining
435
+ 5. FILL — 0 safe fills, 1 probably-safe logged to report
436
+ 6. REPORT — Verdict: FAIL (1 critical finding remains)
437
+ ```
438
+
439
+ ### Example: Bootstrap from directory structure
440
+
441
+ ```
442
+ Input: --bootstrap flag set, no graph, no AGENTS.md
443
+
444
+ 1. FRESHEN — No graph, no AGENTS.md
445
+ Fallback bootstrap: glob src/*, read package.json
446
+ Generated minimal AGENTS.md (32 lines)
447
+ context.bootstrapped = true
448
+ 2. DETECT — 0 drift findings (fresh AGENTS.md, no stale refs)
449
+ 3. AUDIT — 6 gaps (4 undocumented modules, 2 missing context)
450
+ 4. REPORT — Verdict: WARN (>30% modules undocumented, no graph)
451
+ ```
452
+
453
+ ## Gates
454
+
455
+ - **No fix without verification.** Every fix batch must be followed by `harness check-docs`. If check fails, revert the batch.
456
+ - **No unsafe auto-apply.** Fixes classified as `unsafe` are never applied without explicit user approval. In `--ci` mode, they are logged but never applied.
457
+ - **No reimplementation of sub-skill logic.** The pipeline delegates to sub-skills. If the DETECT phase is writing drift detection code, the plan is wrong.
458
+ - **No convergence without progress.** If a convergence loop iteration does not reduce the finding count, stop immediately. Do not retry.
459
+ - **Max 5 iterations per convergence loop.** Hard cap to prevent runaway loops.
460
+
461
+ ## Escalation
462
+
463
+ - **When findings exceed 50:** Focus on critical and high priority only. Defer medium and low to a follow-up run.
464
+ - **When bootstrap produces low-quality AGENTS.md:** This is expected without a graph. Log a notice recommending `harness scan` and accept the reduced quality for the current run.
465
+ - **When convergence loop does not converge within 5 iterations:** Stop the loop, log remaining findings, and proceed to the next phase. The report will reflect the unconverged state.
466
+ - **When a sub-skill fails:** Log the failure, skip the phase, and continue the pipeline. The report will note the skipped phase with a WARN or FAIL verdict.
467
+ - **When `harness check-docs` is unavailable:** Fall back to file existence checks and link validation via grep. Log a notice about reduced verification accuracy.
468
+