@harness-engineering/cli 1.13.0 → 1.14.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 (367) hide show
  1. package/dist/agents/skills/claude-code/add-harness-component/skill.yaml +1 -0
  2. package/dist/agents/skills/claude-code/align-documentation/skill.yaml +1 -0
  3. package/dist/agents/skills/claude-code/check-mechanical-constraints/skill.yaml +1 -0
  4. package/dist/agents/skills/claude-code/cleanup-dead-code/skill.yaml +1 -0
  5. package/dist/agents/skills/claude-code/detect-doc-drift/skill.yaml +1 -0
  6. package/dist/agents/skills/claude-code/enforce-architecture/skill.yaml +1 -0
  7. package/dist/agents/skills/claude-code/harness-accessibility/skill.yaml +1 -0
  8. package/dist/agents/skills/claude-code/harness-api-design/SKILL.md +304 -0
  9. package/dist/agents/skills/claude-code/harness-api-design/skill.yaml +74 -0
  10. package/dist/agents/skills/claude-code/harness-architecture-advisor/skill.yaml +1 -0
  11. package/dist/agents/skills/claude-code/harness-auth/SKILL.md +279 -0
  12. package/dist/agents/skills/claude-code/harness-auth/skill.yaml +81 -0
  13. package/dist/agents/skills/claude-code/harness-autopilot/skill.yaml +1 -0
  14. package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +39 -0
  15. package/dist/agents/skills/claude-code/harness-brainstorming/skill.yaml +1 -0
  16. package/dist/agents/skills/claude-code/harness-caching/SKILL.md +309 -0
  17. package/dist/agents/skills/claude-code/harness-caching/skill.yaml +73 -0
  18. package/dist/agents/skills/claude-code/harness-chaos/SKILL.md +295 -0
  19. package/dist/agents/skills/claude-code/harness-chaos/skill.yaml +72 -0
  20. package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +44 -0
  21. package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +1 -0
  22. package/dist/agents/skills/claude-code/harness-codebase-cleanup/skill.yaml +1 -0
  23. package/dist/agents/skills/claude-code/harness-compliance/SKILL.md +303 -0
  24. package/dist/agents/skills/claude-code/harness-compliance/skill.yaml +78 -0
  25. package/dist/agents/skills/claude-code/harness-containerization/SKILL.md +284 -0
  26. package/dist/agents/skills/claude-code/harness-containerization/skill.yaml +80 -0
  27. package/dist/agents/skills/claude-code/harness-data-pipeline/SKILL.md +274 -0
  28. package/dist/agents/skills/claude-code/harness-data-pipeline/skill.yaml +81 -0
  29. package/dist/agents/skills/claude-code/harness-data-validation/SKILL.md +343 -0
  30. package/dist/agents/skills/claude-code/harness-data-validation/skill.yaml +75 -0
  31. package/dist/agents/skills/claude-code/harness-database/SKILL.md +258 -0
  32. package/dist/agents/skills/claude-code/harness-database/skill.yaml +80 -0
  33. package/dist/agents/skills/claude-code/harness-debugging/skill.yaml +1 -0
  34. package/dist/agents/skills/claude-code/harness-dependency-health/skill.yaml +1 -0
  35. package/dist/agents/skills/claude-code/harness-deployment/SKILL.md +255 -0
  36. package/dist/agents/skills/claude-code/harness-deployment/skill.yaml +77 -0
  37. package/dist/agents/skills/claude-code/harness-design/skill.yaml +1 -0
  38. package/dist/agents/skills/claude-code/harness-design-mobile/skill.yaml +1 -0
  39. package/dist/agents/skills/claude-code/harness-design-system/skill.yaml +1 -0
  40. package/dist/agents/skills/claude-code/harness-design-web/skill.yaml +1 -0
  41. package/dist/agents/skills/claude-code/harness-diagnostics/skill.yaml +1 -0
  42. package/dist/agents/skills/claude-code/harness-docs-pipeline/skill.yaml +1 -0
  43. package/dist/agents/skills/claude-code/harness-dx/SKILL.md +276 -0
  44. package/dist/agents/skills/claude-code/harness-dx/skill.yaml +76 -0
  45. package/dist/agents/skills/claude-code/harness-e2e/SKILL.md +245 -0
  46. package/dist/agents/skills/claude-code/harness-e2e/skill.yaml +78 -0
  47. package/dist/agents/skills/claude-code/harness-event-driven/SKILL.md +280 -0
  48. package/dist/agents/skills/claude-code/harness-event-driven/skill.yaml +77 -0
  49. package/dist/agents/skills/claude-code/harness-execution/SKILL.md +44 -0
  50. package/dist/agents/skills/claude-code/harness-execution/skill.yaml +1 -0
  51. package/dist/agents/skills/claude-code/harness-feature-flags/SKILL.md +287 -0
  52. package/dist/agents/skills/claude-code/harness-feature-flags/skill.yaml +74 -0
  53. package/dist/agents/skills/claude-code/harness-git-workflow/skill.yaml +1 -0
  54. package/dist/agents/skills/claude-code/harness-hotspot-detector/skill.yaml +1 -0
  55. package/dist/agents/skills/claude-code/harness-i18n/skill.yaml +1 -0
  56. package/dist/agents/skills/claude-code/harness-i18n-process/skill.yaml +1 -0
  57. package/dist/agents/skills/claude-code/harness-i18n-workflow/skill.yaml +1 -0
  58. package/dist/agents/skills/claude-code/harness-impact-analysis/skill.yaml +1 -0
  59. package/dist/agents/skills/claude-code/harness-incident-response/SKILL.md +223 -0
  60. package/dist/agents/skills/claude-code/harness-incident-response/skill.yaml +78 -0
  61. package/dist/agents/skills/claude-code/harness-infrastructure-as-code/SKILL.md +279 -0
  62. package/dist/agents/skills/claude-code/harness-infrastructure-as-code/skill.yaml +80 -0
  63. package/dist/agents/skills/claude-code/harness-integration-test/SKILL.md +271 -0
  64. package/dist/agents/skills/claude-code/harness-integration-test/skill.yaml +73 -0
  65. package/dist/agents/skills/claude-code/harness-integrity/skill.yaml +1 -0
  66. package/dist/agents/skills/claude-code/harness-knowledge-mapper/skill.yaml +1 -0
  67. package/dist/agents/skills/claude-code/harness-load-testing/SKILL.md +274 -0
  68. package/dist/agents/skills/claude-code/harness-load-testing/skill.yaml +79 -0
  69. package/dist/agents/skills/claude-code/harness-ml-ops/SKILL.md +341 -0
  70. package/dist/agents/skills/claude-code/harness-ml-ops/skill.yaml +79 -0
  71. package/dist/agents/skills/claude-code/harness-mobile-patterns/SKILL.md +326 -0
  72. package/dist/agents/skills/claude-code/harness-mobile-patterns/skill.yaml +82 -0
  73. package/dist/agents/skills/claude-code/harness-mutation-test/SKILL.md +251 -0
  74. package/dist/agents/skills/claude-code/harness-mutation-test/skill.yaml +70 -0
  75. package/dist/agents/skills/claude-code/harness-observability/SKILL.md +283 -0
  76. package/dist/agents/skills/claude-code/harness-observability/skill.yaml +78 -0
  77. package/dist/agents/skills/claude-code/harness-onboarding/skill.yaml +1 -0
  78. package/dist/agents/skills/claude-code/harness-parallel-agents/skill.yaml +1 -0
  79. package/dist/agents/skills/claude-code/harness-perf/skill.yaml +1 -0
  80. package/dist/agents/skills/claude-code/harness-perf-tdd/skill.yaml +1 -0
  81. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +39 -0
  82. package/dist/agents/skills/claude-code/harness-planning/skill.yaml +1 -0
  83. package/dist/agents/skills/claude-code/harness-pre-commit-review/skill.yaml +1 -0
  84. package/dist/agents/skills/claude-code/harness-product-spec/SKILL.md +285 -0
  85. package/dist/agents/skills/claude-code/harness-product-spec/skill.yaml +72 -0
  86. package/dist/agents/skills/claude-code/harness-property-test/SKILL.md +281 -0
  87. package/dist/agents/skills/claude-code/harness-property-test/skill.yaml +71 -0
  88. package/dist/agents/skills/claude-code/harness-refactoring/skill.yaml +1 -0
  89. package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +3 -3
  90. package/dist/agents/skills/claude-code/harness-release-readiness/skill.yaml +1 -0
  91. package/dist/agents/skills/claude-code/harness-resilience/SKILL.md +255 -0
  92. package/dist/agents/skills/claude-code/harness-resilience/skill.yaml +76 -0
  93. package/dist/agents/skills/claude-code/harness-roadmap/skill.yaml +1 -0
  94. package/dist/agents/skills/claude-code/harness-secrets/SKILL.md +293 -0
  95. package/dist/agents/skills/claude-code/harness-secrets/skill.yaml +76 -0
  96. package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +1 -0
  97. package/dist/agents/skills/claude-code/harness-security-scan/skill.yaml +1 -0
  98. package/dist/agents/skills/claude-code/harness-skill-authoring/skill.yaml +1 -0
  99. package/dist/agents/skills/claude-code/harness-soundness-review/skill.yaml +1 -0
  100. package/dist/agents/skills/claude-code/harness-sql-review/SKILL.md +315 -0
  101. package/dist/agents/skills/claude-code/harness-sql-review/skill.yaml +74 -0
  102. package/dist/agents/skills/claude-code/harness-state-management/skill.yaml +1 -0
  103. package/dist/agents/skills/claude-code/harness-tdd/skill.yaml +1 -0
  104. package/dist/agents/skills/claude-code/harness-test-advisor/skill.yaml +1 -0
  105. package/dist/agents/skills/claude-code/harness-test-data/SKILL.md +268 -0
  106. package/dist/agents/skills/claude-code/harness-test-data/skill.yaml +74 -0
  107. package/dist/agents/skills/claude-code/harness-ux-copy/SKILL.md +271 -0
  108. package/dist/agents/skills/claude-code/harness-ux-copy/skill.yaml +77 -0
  109. package/dist/agents/skills/claude-code/harness-verification/SKILL.md +35 -0
  110. package/dist/agents/skills/claude-code/harness-verification/skill.yaml +1 -0
  111. package/dist/agents/skills/claude-code/harness-verify/skill.yaml +1 -0
  112. package/dist/agents/skills/claude-code/harness-visual-regression/SKILL.md +257 -0
  113. package/dist/agents/skills/claude-code/harness-visual-regression/skill.yaml +74 -0
  114. package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +11 -3
  115. package/dist/agents/skills/claude-code/initialize-harness-project/skill.yaml +1 -0
  116. package/dist/agents/skills/claude-code/validate-context-engineering/skill.yaml +1 -0
  117. package/dist/agents/skills/gemini-cli/add-harness-component/skill.yaml +1 -0
  118. package/dist/agents/skills/gemini-cli/align-documentation/skill.yaml +1 -0
  119. package/dist/agents/skills/gemini-cli/check-mechanical-constraints/skill.yaml +1 -0
  120. package/dist/agents/skills/gemini-cli/cleanup-dead-code/skill.yaml +1 -0
  121. package/dist/agents/skills/gemini-cli/detect-doc-drift/skill.yaml +1 -0
  122. package/dist/agents/skills/gemini-cli/enforce-architecture/skill.yaml +1 -0
  123. package/dist/agents/skills/gemini-cli/harness-accessibility/skill.yaml +1 -0
  124. package/dist/agents/skills/gemini-cli/harness-api-design/SKILL.md +304 -0
  125. package/dist/agents/skills/gemini-cli/harness-api-design/skill.yaml +74 -0
  126. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/skill.yaml +1 -0
  127. package/dist/agents/skills/gemini-cli/harness-auth/SKILL.md +279 -0
  128. package/dist/agents/skills/gemini-cli/harness-auth/skill.yaml +81 -0
  129. package/dist/agents/skills/gemini-cli/harness-autopilot/skill.yaml +1 -0
  130. package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +39 -0
  131. package/dist/agents/skills/gemini-cli/harness-brainstorming/skill.yaml +1 -0
  132. package/dist/agents/skills/gemini-cli/harness-caching/SKILL.md +309 -0
  133. package/dist/agents/skills/gemini-cli/harness-caching/skill.yaml +73 -0
  134. package/dist/agents/skills/gemini-cli/harness-chaos/SKILL.md +295 -0
  135. package/dist/agents/skills/gemini-cli/harness-chaos/skill.yaml +72 -0
  136. package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +44 -0
  137. package/dist/agents/skills/gemini-cli/harness-code-review/skill.yaml +1 -0
  138. package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/skill.yaml +1 -0
  139. package/dist/agents/skills/gemini-cli/harness-compliance/SKILL.md +303 -0
  140. package/dist/agents/skills/gemini-cli/harness-compliance/skill.yaml +78 -0
  141. package/dist/agents/skills/gemini-cli/harness-containerization/SKILL.md +284 -0
  142. package/dist/agents/skills/gemini-cli/harness-containerization/skill.yaml +80 -0
  143. package/dist/agents/skills/gemini-cli/harness-data-pipeline/SKILL.md +274 -0
  144. package/dist/agents/skills/gemini-cli/harness-data-pipeline/skill.yaml +81 -0
  145. package/dist/agents/skills/gemini-cli/harness-data-validation/SKILL.md +343 -0
  146. package/dist/agents/skills/gemini-cli/harness-data-validation/skill.yaml +75 -0
  147. package/dist/agents/skills/gemini-cli/harness-database/SKILL.md +258 -0
  148. package/dist/agents/skills/gemini-cli/harness-database/skill.yaml +80 -0
  149. package/dist/agents/skills/gemini-cli/harness-debugging/skill.yaml +1 -0
  150. package/dist/agents/skills/gemini-cli/harness-dependency-health/skill.yaml +1 -0
  151. package/dist/agents/skills/gemini-cli/harness-deployment/SKILL.md +255 -0
  152. package/dist/agents/skills/gemini-cli/harness-deployment/skill.yaml +77 -0
  153. package/dist/agents/skills/gemini-cli/harness-design/skill.yaml +1 -0
  154. package/dist/agents/skills/gemini-cli/harness-design-mobile/skill.yaml +1 -0
  155. package/dist/agents/skills/gemini-cli/harness-design-system/skill.yaml +1 -0
  156. package/dist/agents/skills/gemini-cli/harness-design-web/skill.yaml +1 -0
  157. package/dist/agents/skills/gemini-cli/harness-diagnostics/skill.yaml +1 -0
  158. package/dist/agents/skills/gemini-cli/harness-docs-pipeline/skill.yaml +1 -0
  159. package/dist/agents/skills/gemini-cli/harness-dx/SKILL.md +276 -0
  160. package/dist/agents/skills/gemini-cli/harness-dx/skill.yaml +76 -0
  161. package/dist/agents/skills/gemini-cli/harness-e2e/SKILL.md +245 -0
  162. package/dist/agents/skills/gemini-cli/harness-e2e/skill.yaml +78 -0
  163. package/dist/agents/skills/gemini-cli/harness-event-driven/SKILL.md +280 -0
  164. package/dist/agents/skills/gemini-cli/harness-event-driven/skill.yaml +77 -0
  165. package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +44 -0
  166. package/dist/agents/skills/gemini-cli/harness-execution/skill.yaml +1 -0
  167. package/dist/agents/skills/gemini-cli/harness-feature-flags/SKILL.md +287 -0
  168. package/dist/agents/skills/gemini-cli/harness-feature-flags/skill.yaml +74 -0
  169. package/dist/agents/skills/gemini-cli/harness-git-workflow/skill.yaml +1 -0
  170. package/dist/agents/skills/gemini-cli/harness-hotspot-detector/skill.yaml +1 -0
  171. package/dist/agents/skills/gemini-cli/harness-i18n/skill.yaml +1 -0
  172. package/dist/agents/skills/gemini-cli/harness-i18n-process/skill.yaml +1 -0
  173. package/dist/agents/skills/gemini-cli/harness-i18n-workflow/skill.yaml +1 -0
  174. package/dist/agents/skills/gemini-cli/harness-impact-analysis/skill.yaml +1 -0
  175. package/dist/agents/skills/gemini-cli/harness-incident-response/SKILL.md +223 -0
  176. package/dist/agents/skills/gemini-cli/harness-incident-response/skill.yaml +78 -0
  177. package/dist/agents/skills/gemini-cli/harness-infrastructure-as-code/SKILL.md +279 -0
  178. package/dist/agents/skills/gemini-cli/harness-infrastructure-as-code/skill.yaml +80 -0
  179. package/dist/agents/skills/gemini-cli/harness-integration-test/SKILL.md +271 -0
  180. package/dist/agents/skills/gemini-cli/harness-integration-test/skill.yaml +73 -0
  181. package/dist/agents/skills/gemini-cli/harness-integrity/skill.yaml +1 -0
  182. package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/skill.yaml +1 -0
  183. package/dist/agents/skills/gemini-cli/harness-load-testing/SKILL.md +274 -0
  184. package/dist/agents/skills/gemini-cli/harness-load-testing/skill.yaml +79 -0
  185. package/dist/agents/skills/gemini-cli/harness-ml-ops/SKILL.md +341 -0
  186. package/dist/agents/skills/gemini-cli/harness-ml-ops/skill.yaml +79 -0
  187. package/dist/agents/skills/gemini-cli/harness-mobile-patterns/SKILL.md +326 -0
  188. package/dist/agents/skills/gemini-cli/harness-mobile-patterns/skill.yaml +82 -0
  189. package/dist/agents/skills/gemini-cli/harness-mutation-test/SKILL.md +251 -0
  190. package/dist/agents/skills/gemini-cli/harness-mutation-test/skill.yaml +70 -0
  191. package/dist/agents/skills/gemini-cli/harness-observability/SKILL.md +283 -0
  192. package/dist/agents/skills/gemini-cli/harness-observability/skill.yaml +78 -0
  193. package/dist/agents/skills/gemini-cli/harness-onboarding/skill.yaml +1 -0
  194. package/dist/agents/skills/gemini-cli/harness-parallel-agents/skill.yaml +1 -0
  195. package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +1 -0
  196. package/dist/agents/skills/gemini-cli/harness-perf-tdd/skill.yaml +1 -0
  197. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +39 -0
  198. package/dist/agents/skills/gemini-cli/harness-planning/skill.yaml +1 -0
  199. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/skill.yaml +1 -0
  200. package/dist/agents/skills/gemini-cli/harness-product-spec/SKILL.md +285 -0
  201. package/dist/agents/skills/gemini-cli/harness-product-spec/skill.yaml +72 -0
  202. package/dist/agents/skills/gemini-cli/harness-property-test/SKILL.md +281 -0
  203. package/dist/agents/skills/gemini-cli/harness-property-test/skill.yaml +71 -0
  204. package/dist/agents/skills/gemini-cli/harness-refactoring/skill.yaml +1 -0
  205. package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +3 -3
  206. package/dist/agents/skills/gemini-cli/harness-release-readiness/skill.yaml +1 -0
  207. package/dist/agents/skills/gemini-cli/harness-resilience/SKILL.md +255 -0
  208. package/dist/agents/skills/gemini-cli/harness-resilience/skill.yaml +76 -0
  209. package/dist/agents/skills/gemini-cli/harness-roadmap/skill.yaml +1 -0
  210. package/dist/agents/skills/gemini-cli/harness-secrets/SKILL.md +293 -0
  211. package/dist/agents/skills/gemini-cli/harness-secrets/skill.yaml +76 -0
  212. package/dist/agents/skills/gemini-cli/harness-security-review/SKILL.md +240 -0
  213. package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +1 -0
  214. package/dist/agents/skills/gemini-cli/harness-security-scan/skill.yaml +1 -0
  215. package/dist/agents/skills/gemini-cli/harness-skill-authoring/skill.yaml +1 -0
  216. package/dist/agents/skills/gemini-cli/harness-soundness-review/skill.yaml +1 -0
  217. package/dist/agents/skills/gemini-cli/harness-sql-review/SKILL.md +315 -0
  218. package/dist/agents/skills/gemini-cli/harness-sql-review/skill.yaml +74 -0
  219. package/dist/agents/skills/gemini-cli/harness-state-management/skill.yaml +1 -0
  220. package/dist/agents/skills/gemini-cli/harness-tdd/skill.yaml +1 -0
  221. package/dist/agents/skills/gemini-cli/harness-test-advisor/skill.yaml +1 -0
  222. package/dist/agents/skills/gemini-cli/harness-test-data/SKILL.md +268 -0
  223. package/dist/agents/skills/gemini-cli/harness-test-data/skill.yaml +74 -0
  224. package/dist/agents/skills/gemini-cli/harness-ux-copy/SKILL.md +271 -0
  225. package/dist/agents/skills/gemini-cli/harness-ux-copy/skill.yaml +77 -0
  226. package/dist/agents/skills/gemini-cli/harness-verification/SKILL.md +35 -0
  227. package/dist/agents/skills/gemini-cli/harness-verification/skill.yaml +1 -0
  228. package/dist/agents/skills/gemini-cli/harness-verify/skill.yaml +1 -0
  229. package/dist/agents/skills/gemini-cli/harness-visual-regression/SKILL.md +257 -0
  230. package/dist/agents/skills/gemini-cli/harness-visual-regression/skill.yaml +74 -0
  231. package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +11 -3
  232. package/dist/agents/skills/gemini-cli/initialize-harness-project/skill.yaml +1 -0
  233. package/dist/agents/skills/gemini-cli/validate-context-engineering/skill.yaml +1 -0
  234. package/dist/agents-md-YTYQDA3P.js +8 -0
  235. package/dist/{architecture-ESOOE26S.js → architecture-JQZYM4US.js} +4 -4
  236. package/dist/bin/harness-mcp.js +16 -15
  237. package/dist/bin/harness.js +31 -30
  238. package/dist/{check-phase-gate-S2MZKLFQ.js → check-phase-gate-L3RADYWO.js} +4 -3
  239. package/dist/{chunk-WPPDRIJL.js → chunk-3C2MLBPJ.js} +4 -4
  240. package/dist/chunk-6KTUUFRN.js +217 -0
  241. package/dist/{chunk-MI5XJQDY.js → chunk-7IP4JIFL.js} +24 -10
  242. package/dist/{chunk-C2ERUR3L.js → chunk-7MJAPE3Z.js} +165 -49
  243. package/dist/{chunk-KELT6K6M.js → chunk-ABQHQ6I5.js} +1861 -1418
  244. package/dist/{chunk-L2KLU56K.js → chunk-AOZRDOIP.js} +2 -2
  245. package/dist/{chunk-QPEH2QPG.js → chunk-DBSOCI3G.js} +53 -54
  246. package/dist/{chunk-MHBMTPW7.js → chunk-ERS5EVUZ.js} +9 -0
  247. package/dist/{chunk-JSTQ3AWB.js → chunk-FIAPHX37.js} +1 -1
  248. package/dist/{chunk-2YPZKGAG.js → chunk-FTMXDOR6.js} +1 -1
  249. package/dist/{chunk-72GHBOL2.js → chunk-GZKSBLQL.js} +1 -1
  250. package/dist/{chunk-K6XAPGML.js → chunk-H7Y5CKTM.js} +1 -1
  251. package/dist/{chunk-HD4IBGLA.js → chunk-N5G5QMS3.js} +24 -1
  252. package/dist/{chunk-LD3DKUK5.js → chunk-NLVUVUGD.js} +1 -1
  253. package/dist/{chunk-3KOLLWWE.js → chunk-O5OJVPL6.js} +26 -211
  254. package/dist/{chunk-NKDM3FMH.js → chunk-OD3S2NHN.js} +1 -1
  255. package/dist/{chunk-5VY23YK3.js → chunk-OSXBPAMK.js} +2 -2
  256. package/dist/{chunk-MACVXDZK.js → chunk-OXLLOSSR.js} +45 -47
  257. package/dist/{chunk-GNGELAXY.js → chunk-RCWZBSK5.js} +2 -2
  258. package/dist/{chunk-PSNN4LWX.js → chunk-S2FXOWOR.js} +3 -3
  259. package/dist/{chunk-VUCPTQ6G.js → chunk-SD3SQOZ2.js} +1 -1
  260. package/dist/{chunk-7PZWR4LI.js → chunk-TPOTOBR7.js} +9 -9
  261. package/dist/{chunk-RZSUJBZZ.js → chunk-XKECDXJS.js} +452 -353
  262. package/dist/{chunk-VRFZWGMS.js → chunk-XYLGHKG6.js} +5 -1
  263. package/dist/{chunk-6N4R6FVX.js → chunk-YBJ262QL.js} +1 -1
  264. package/dist/{chunk-2VU4MFM3.js → chunk-YPYGXRDR.js} +7 -7
  265. package/dist/{chunk-Q6AB7W5Z.js → chunk-YQ6KC6TE.js} +1 -1
  266. package/dist/{chunk-7KQSUZVG.js → chunk-YZD2MRNQ.js} +1528 -1010
  267. package/dist/ci-workflow-EQZFVX3P.js +8 -0
  268. package/dist/{create-skill-WPXHSLX2.js → create-skill-XSWHMSM5.js} +2 -2
  269. package/dist/{dist-M6BQODWC.js → dist-B26DFXMP.js} +573 -480
  270. package/dist/{dist-L7LAAQAS.js → dist-DZ63LLUD.js} +1 -1
  271. package/dist/{dist-WF4C7A4A.js → dist-HWXF2C3R.js} +18 -2
  272. package/dist/{dist-D4RYGUZE.js → dist-USY2C5JL.js} +3 -1
  273. package/dist/{docs-BPYCN2DR.js → docs-7ECGYMAV.js} +5 -3
  274. package/dist/engine-EG4EH4IX.js +8 -0
  275. package/dist/{entropy-4VDVV5CR.js → entropy-5USWKLVS.js} +3 -3
  276. package/dist/{feedback-63QB5RCA.js → feedback-UTBXZZHF.js} +1 -1
  277. package/dist/{generate-agent-definitions-QABOJG56.js → generate-agent-definitions-3PM5EU7V.js} +5 -5
  278. package/dist/{glob-helper-5OHBUQAI.js → glob-helper-R5FXNUPS.js} +1 -1
  279. package/dist/{graph-loader-KO4GJ5N2.js → graph-loader-2M2HXDQI.js} +1 -1
  280. package/dist/index.d.ts +183 -17
  281. package/dist/index.js +32 -30
  282. package/dist/loader-ZPALXIVR.js +10 -0
  283. package/dist/mcp-362EZHF4.js +35 -0
  284. package/dist/{performance-26BH47O4.js → performance-OQAFMJUD.js} +3 -3
  285. package/dist/{review-pipeline-GHR3WFBI.js → review-pipeline-C4GCFVGP.js} +1 -1
  286. package/dist/runtime-7YLVK453.js +9 -0
  287. package/dist/{security-UQFUZXEN.js → security-PZOX7AQS.js} +1 -1
  288. package/dist/skill-executor-XZLYZYAK.js +8 -0
  289. package/dist/templates/axum/Cargo.toml.hbs +8 -0
  290. package/dist/templates/axum/src/main.rs +12 -0
  291. package/dist/templates/axum/template.json +16 -0
  292. package/dist/templates/django/manage.py.hbs +19 -0
  293. package/dist/templates/django/requirements.txt.hbs +1 -0
  294. package/dist/templates/django/src/settings.py.hbs +44 -0
  295. package/dist/templates/django/src/urls.py +6 -0
  296. package/dist/templates/django/src/wsgi.py.hbs +9 -0
  297. package/dist/templates/django/template.json +21 -0
  298. package/dist/templates/express/package.json.hbs +15 -0
  299. package/dist/templates/express/src/app.ts +12 -0
  300. package/dist/templates/express/src/lib/.gitkeep +0 -0
  301. package/dist/templates/express/template.json +16 -0
  302. package/dist/templates/fastapi/requirements.txt.hbs +2 -0
  303. package/dist/templates/fastapi/src/main.py +8 -0
  304. package/dist/templates/fastapi/template.json +20 -0
  305. package/dist/templates/gin/go.mod.hbs +5 -0
  306. package/dist/templates/gin/main.go +15 -0
  307. package/dist/templates/gin/template.json +19 -0
  308. package/dist/templates/go-base/.golangci.yml +16 -0
  309. package/dist/templates/go-base/AGENTS.md.hbs +35 -0
  310. package/dist/templates/go-base/go.mod.hbs +3 -0
  311. package/dist/templates/go-base/harness.config.json.hbs +17 -0
  312. package/dist/templates/go-base/main.go +7 -0
  313. package/dist/templates/go-base/template.json +14 -0
  314. package/dist/templates/java-base/AGENTS.md.hbs +35 -0
  315. package/dist/templates/java-base/checkstyle.xml +20 -0
  316. package/dist/templates/java-base/harness.config.json.hbs +16 -0
  317. package/dist/templates/java-base/pom.xml.hbs +39 -0
  318. package/dist/templates/java-base/src/main/java/App.java.hbs +5 -0
  319. package/dist/templates/java-base/template.json +13 -0
  320. package/dist/templates/nestjs/nest-cli.json +5 -0
  321. package/dist/templates/nestjs/package.json.hbs +18 -0
  322. package/dist/templates/nestjs/src/app.module.ts +8 -0
  323. package/dist/templates/nestjs/src/lib/.gitkeep +0 -0
  324. package/dist/templates/nestjs/src/main.ts +11 -0
  325. package/dist/templates/nestjs/template.json +16 -0
  326. package/dist/templates/nextjs/template.json +15 -1
  327. package/dist/templates/python-base/.python-version +1 -0
  328. package/dist/templates/python-base/AGENTS.md.hbs +32 -0
  329. package/dist/templates/python-base/harness.config.json.hbs +16 -0
  330. package/dist/templates/python-base/pyproject.toml.hbs +18 -0
  331. package/dist/templates/python-base/ruff.toml +5 -0
  332. package/dist/templates/python-base/src/__init__.py +0 -0
  333. package/dist/templates/python-base/template.json +13 -0
  334. package/dist/templates/react-vite/index.html +12 -0
  335. package/dist/templates/react-vite/package.json.hbs +18 -0
  336. package/dist/templates/react-vite/src/App.tsx +7 -0
  337. package/dist/templates/react-vite/src/lib/.gitkeep +0 -0
  338. package/dist/templates/react-vite/src/main.tsx +9 -0
  339. package/dist/templates/react-vite/template.json +19 -0
  340. package/dist/templates/react-vite/vite.config.ts +6 -0
  341. package/dist/templates/rust-base/AGENTS.md.hbs +35 -0
  342. package/dist/templates/rust-base/Cargo.toml.hbs +6 -0
  343. package/dist/templates/rust-base/clippy.toml +2 -0
  344. package/dist/templates/rust-base/harness.config.json.hbs +17 -0
  345. package/dist/templates/rust-base/src/main.rs +3 -0
  346. package/dist/templates/rust-base/template.json +14 -0
  347. package/dist/templates/spring-boot/pom.xml.hbs +50 -0
  348. package/dist/templates/spring-boot/src/main/java/Application.java.hbs +19 -0
  349. package/dist/templates/spring-boot/template.json +15 -0
  350. package/dist/templates/vue/index.html +12 -0
  351. package/dist/templates/vue/package.json.hbs +16 -0
  352. package/dist/templates/vue/src/App.vue +7 -0
  353. package/dist/templates/vue/src/lib/.gitkeep +0 -0
  354. package/dist/templates/vue/src/main.ts +4 -0
  355. package/dist/templates/vue/template.json +19 -0
  356. package/dist/templates/vue/vite.config.ts +6 -0
  357. package/dist/{validate-N7QJOKFZ.js → validate-FD3Z6VJD.js} +4 -4
  358. package/dist/validate-cross-check-WNJM6H2D.js +8 -0
  359. package/package.json +6 -6
  360. package/dist/agents-md-P2RHSUV7.js +0 -8
  361. package/dist/ci-workflow-4NYBUG6R.js +0 -8
  362. package/dist/engine-LXLIWQQ3.js +0 -8
  363. package/dist/loader-Z2IT7QX3.js +0 -10
  364. package/dist/mcp-KQHEL5IF.js +0 -34
  365. package/dist/runtime-PDWD7UIK.js +0 -9
  366. package/dist/skill-executor-RG45LUO5.js +0 -8
  367. package/dist/validate-cross-check-EDQ5QGTM.js +0 -8
@@ -0,0 +1,304 @@
1
+ # Harness API Design
2
+
3
+ > Advisory guide for REST, GraphQL, and gRPC API design. Produces OpenAPI specs, GraphQL schemas, or proto definitions with versioning strategies and consistency validation.
4
+
5
+ ## When to Use
6
+
7
+ - When designing new API endpoints for a feature or service
8
+ - When adding routes to an existing Express, Fastify, NestJS, or Hono application
9
+ - When defining a GraphQL schema or extending an existing one
10
+ - When creating gRPC service definitions with Protocol Buffers
11
+ - When establishing or updating an API versioning strategy
12
+ - When reviewing an API surface for consistency before release
13
+ - NOT for API security review (use harness-security-review for authentication, authorization, and injection analysis)
14
+ - NOT for API performance testing (use harness-perf or harness-load-testing for benchmarks and load simulation)
15
+ - NOT for database schema design that backs the API (use harness-database for schema and migration work)
16
+ - NOT for event-driven async APIs (use harness-event-driven for message queues, webhooks, and pub/sub)
17
+
18
+ ## Process
19
+
20
+ ### Phase 1: DISCOVER -- Detect API Style and Existing Surface
21
+
22
+ 1. **Detect the API style.** Scan the project for stack signals. WHERE `openapi.*` or `swagger.*` files exist, THEN classify as REST. WHERE `*.graphql` or `schema.graphql` exists, THEN classify as GraphQL. WHERE `*.proto` files exist, THEN classify as gRPC. If the `--style` argument is provided, use that instead of auto-detection.
23
+
24
+ 2. **Map existing endpoints.** For REST projects, scan route files (`src/**/routes/**`, `src/**/controllers/**`) and extract HTTP method, path, request body, and response shape. For GraphQL, parse `schema.graphql` or code-first schema definitions. For gRPC, parse `.proto` files for service and rpc definitions.
25
+
26
+ 3. **Identify the framework.** Detect Express (`app.get`, `router.post`), Fastify (`fastify.route`), NestJS (`@Controller`, `@Get`), Hono (`app.get`), Apollo (`typeDefs`, `resolvers`), or gRPC libraries (`@grpc/grpc-js`, `grpc-node`). Framework detection drives phase 2 recommendations.
27
+
28
+ 4. **Catalog existing conventions.** Record naming patterns (camelCase vs kebab-case paths), response envelope structure (e.g., `{ data, error, meta }`), pagination style (cursor vs offset), and error format (RFC 7807, custom). These become the baseline that new endpoints must follow.
29
+
30
+ 5. **Check for an existing OpenAPI spec.** If `openapi.yaml` or `openapi.json` exists, parse it and compare against the actual route definitions. Flag any drift where the spec does not match the implementation.
31
+
32
+ ### Phase 2: DESIGN -- Produce Endpoint Definitions and Schemas
33
+
34
+ 1. **Define resource models.** For each new resource, produce a schema with required fields, types, nullable markers, and validation constraints. Use JSON Schema for REST, GraphQL type definitions for GraphQL, or message definitions for gRPC.
35
+
36
+ 2. **Design endpoint signatures.** For REST: define method, path, path parameters, query parameters, request body schema, and response schema. Follow the conventions cataloged in phase 1. For GraphQL: define queries, mutations, and input types. For gRPC: define service RPCs with request and response messages.
37
+
38
+ 3. **Apply versioning strategy.** WHERE a versioning strategy is already in use, THEN follow it. WHERE no strategy exists, THEN recommend URL-path versioning (`/v1/resources`) for REST, schema evolution with `@deprecated` for GraphQL, or package versioning for gRPC. Document the strategy for future endpoints.
39
+
40
+ 4. **Design error responses.** For REST: use RFC 7807 Problem Details unless the project already uses a different format. Include `type`, `title`, `status`, `detail`, and `instance`. For GraphQL: use the `errors` array with `extensions.code`. For gRPC: use standard status codes with detailed error metadata.
41
+
42
+ 5. **Define pagination.** WHERE the endpoint returns a collection, THEN include pagination. Recommend cursor-based pagination for real-time data and offset-based for static datasets. Define the pagination envelope: `{ data: [], pagination: { cursor, hasMore } }` or equivalent.
43
+
44
+ 6. **Specify rate limiting and caching headers.** For each endpoint, recommend `Cache-Control`, `ETag`, and `Vary` headers where applicable. Identify endpoints that should be rate-limited and suggest `X-RateLimit-*` headers.
45
+
46
+ ### Phase 3: VALIDATE -- Check Against Best Practices
47
+
48
+ 1. **Verify naming consistency.** All resource names must follow the same convention (plural nouns for REST collections, singular for GraphQL types). Path segments must use the same casing throughout. Flag any deviation from the conventions cataloged in phase 1.
49
+
50
+ 2. **Check HTTP method correctness.** WHERE a REST endpoint modifies state, THEN it must not use GET. WHERE an endpoint is idempotent, THEN it should use PUT over POST. WHERE an endpoint creates a resource, THEN it must return 201 with a Location header.
51
+
52
+ 3. **Validate schema completeness.** Every endpoint must have a defined request schema (if it accepts input) and response schema. No `any` types. No untyped response bodies. For GraphQL, every field must have an explicit type. For gRPC, no `google.protobuf.Any` unless justified.
53
+
54
+ 4. **Check backward compatibility.** WHERE this is an update to an existing API, THEN verify that no required fields were added to request schemas, no fields were removed from response schemas, no endpoint paths changed, and no response status codes changed. Flag breaking changes explicitly.
55
+
56
+ 5. **Verify OpenAPI spec validity.** Run the OpenAPI spec through structural validation. Check for missing descriptions, missing examples, and undefined `$ref` targets. For GraphQL, validate the schema parses without errors. For gRPC, verify proto files compile with `protoc`.
57
+
58
+ ### Phase 4: DOCUMENT -- Generate or Update Specifications
59
+
60
+ 1. **Generate the OpenAPI spec.** For REST APIs, produce or update an `openapi.yaml` file with all endpoints, schemas, examples, and security definitions. Use OpenAPI 3.1 unless the project already uses 3.0. Include `operationId` for every endpoint.
61
+
62
+ 2. **Generate GraphQL schema documentation.** For GraphQL APIs, ensure every type, field, query, and mutation has a description. Produce a schema file that can be used for introspection. Add deprecation notices to fields being phased out.
63
+
64
+ 3. **Generate proto documentation.** For gRPC APIs, ensure every service, rpc, message, and field has a comment. Verify the proto file includes package name, syntax version, and appropriate options.
65
+
66
+ 4. **Produce a changelog entry.** For updates to existing APIs, write a changelog entry listing new endpoints, modified endpoints, deprecated endpoints, and breaking changes (if any). Follow the project's changelog format.
67
+
68
+ 5. **Create request/response examples.** For every new endpoint, include at least one success example and one error example in the spec. Examples must use realistic data, not placeholders like `"string"` or `0`.
69
+
70
+ ## Harness Integration
71
+
72
+ - **`harness validate`** -- Run after generating specs to confirm project health
73
+ - **`harness scan`** -- Refresh the knowledge graph after adding new route files
74
+ - **`query_graph`** -- Trace dependencies between routes, controllers, and services
75
+ - **`get_impact`** -- Understand blast radius when modifying shared API schemas
76
+
77
+ ## Success Criteria
78
+
79
+ - API style was correctly detected or explicitly specified
80
+ - Existing conventions were cataloged and followed in new designs
81
+ - Every new endpoint has a complete schema (request and response)
82
+ - Versioning strategy is documented and applied
83
+ - Error responses follow a consistent format with machine-readable codes
84
+ - OpenAPI/GraphQL/proto spec is valid and matches the implementation
85
+ - No backward-incompatible changes were introduced without explicit flagging
86
+ - Pagination, caching, and rate limiting were addressed for applicable endpoints
87
+
88
+ ## Examples
89
+
90
+ ### Example: REST API Design with Express
91
+
92
+ **Input:** "Design CRUD endpoints for a blog posts resource in our Express app."
93
+
94
+ **Phase 1 -- DISCOVER:**
95
+
96
+ ```
97
+ Detected: REST API (Express 4.x)
98
+ Routes directory: src/routes/
99
+ Existing endpoints: GET /v1/users, POST /v1/users, GET /v1/users/:id
100
+ Conventions: kebab-case paths, plural nouns, /v1/ prefix
101
+ Response envelope: { data, meta, error }
102
+ Pagination: cursor-based ({ cursor, limit })
103
+ Error format: RFC 7807 Problem Details
104
+ OpenAPI spec: openapi.yaml (last updated 2 weeks ago, 1 drift: missing GET /v1/users/:id/settings)
105
+ ```
106
+
107
+ **Phase 2 -- DESIGN:**
108
+
109
+ ```yaml
110
+ paths:
111
+ /v1/posts:
112
+ get:
113
+ operationId: listPosts
114
+ parameters:
115
+ - name: cursor
116
+ in: query
117
+ schema: { type: string }
118
+ - name: limit
119
+ in: query
120
+ schema: { type: integer, default: 20, maximum: 100 }
121
+ - name: status
122
+ in: query
123
+ schema: { type: string, enum: [draft, published, archived] }
124
+ responses:
125
+ 200:
126
+ content:
127
+ application/json:
128
+ schema:
129
+ type: object
130
+ properties:
131
+ data: { type: array, items: { $ref: '#/components/schemas/Post' } }
132
+ meta:
133
+ type: object
134
+ properties:
135
+ cursor: { type: string, nullable: true }
136
+ hasMore: { type: boolean }
137
+ post:
138
+ operationId: createPost
139
+ requestBody:
140
+ content:
141
+ application/json:
142
+ schema: { $ref: '#/components/schemas/CreatePostInput' }
143
+ responses:
144
+ 201:
145
+ headers:
146
+ Location: { schema: { type: string } }
147
+ content:
148
+ application/json:
149
+ schema:
150
+ type: object
151
+ properties:
152
+ data: { $ref: '#/components/schemas/Post' }
153
+ ```
154
+
155
+ **Phase 3 -- VALIDATE:**
156
+
157
+ ```
158
+ Naming: PASS -- /v1/posts follows plural noun convention
159
+ Methods: PASS -- GET for reads, POST for creation
160
+ Schemas: PASS -- all endpoints have request/response schemas
161
+ Compatibility: N/A -- new resource, no existing contract
162
+ OpenAPI: WARN -- existing spec drift detected (1 endpoint missing)
163
+ ```
164
+
165
+ **Phase 4 -- DOCUMENT:**
166
+ Updated `openapi.yaml` with 5 new endpoints, 3 new schemas, and examples. Fixed existing drift for `GET /v1/users/:id/settings`.
167
+
168
+ ### Example: GraphQL Schema Extension with Apollo
169
+
170
+ **Input:** "Add a comments system to our GraphQL API."
171
+
172
+ **Phase 1 -- DISCOVER:**
173
+
174
+ ```
175
+ Detected: GraphQL (Apollo Server 4, code-first with typeDefs)
176
+ Schema: src/schema/typeDefs.ts
177
+ Existing types: User, Post, Category
178
+ Resolvers: src/resolvers/
179
+ Conventions: PascalCase types, camelCase fields, relay-style connections for pagination
180
+ ```
181
+
182
+ **Phase 2 -- DESIGN:**
183
+
184
+ ```graphql
185
+ type Comment {
186
+ id: ID!
187
+ body: String!
188
+ author: User!
189
+ post: Post!
190
+ createdAt: DateTime!
191
+ updatedAt: DateTime!
192
+ parentComment: Comment
193
+ replies(first: Int, after: String): CommentConnection!
194
+ }
195
+
196
+ type CommentConnection {
197
+ edges: [CommentEdge!]!
198
+ pageInfo: PageInfo!
199
+ }
200
+
201
+ type CommentEdge {
202
+ node: Comment!
203
+ cursor: String!
204
+ }
205
+
206
+ input CreateCommentInput {
207
+ postId: ID!
208
+ body: String!
209
+ parentCommentId: ID
210
+ }
211
+
212
+ extend type Query {
213
+ comments(postId: ID!, first: Int, after: String): CommentConnection!
214
+ }
215
+
216
+ extend type Mutation {
217
+ createComment(input: CreateCommentInput!): Comment!
218
+ updateComment(id: ID!, body: String!): Comment!
219
+ deleteComment(id: ID!): Boolean!
220
+ }
221
+
222
+ extend type Post {
223
+ comments(first: Int, after: String): CommentConnection!
224
+ commentCount: Int!
225
+ }
226
+ ```
227
+
228
+ **Phase 3 -- VALIDATE:**
229
+
230
+ ```
231
+ Naming: PASS -- PascalCase types, camelCase fields
232
+ Pagination: PASS -- relay-style connections with PageInfo
233
+ Types: PASS -- all fields explicitly typed, no Any
234
+ Compatibility: PASS -- uses extend, no modifications to existing types
235
+ ```
236
+
237
+ ### Example: gRPC Service Definition
238
+
239
+ **Input:** "Define a notification service for our microservices platform."
240
+
241
+ **Phase 1 -- DISCOVER:**
242
+
243
+ ```
244
+ Detected: gRPC (proto3, @grpc/grpc-js)
245
+ Proto directory: proto/
246
+ Existing services: UserService, OrderService
247
+ Package: platform.v1
248
+ Conventions: PascalCase services and messages, snake_case fields
249
+ ```
250
+
251
+ **Phase 2 -- DESIGN:**
252
+
253
+ ```protobuf
254
+ syntax = "proto3";
255
+
256
+ package platform.v1;
257
+
258
+ import "google/protobuf/timestamp.proto";
259
+
260
+ service NotificationService {
261
+ // Send a notification to a specific user.
262
+ rpc SendNotification(SendNotificationRequest) returns (SendNotificationResponse);
263
+
264
+ // List notifications for a user with cursor pagination.
265
+ rpc ListNotifications(ListNotificationsRequest) returns (ListNotificationsResponse);
266
+
267
+ // Mark a notification as read.
268
+ rpc MarkAsRead(MarkAsReadRequest) returns (MarkAsReadResponse);
269
+
270
+ // Stream real-time notifications for a user.
271
+ rpc StreamNotifications(StreamNotificationsRequest) returns (stream Notification);
272
+ }
273
+
274
+ message Notification {
275
+ string id = 1;
276
+ string user_id = 2;
277
+ string title = 3;
278
+ string body = 4;
279
+ NotificationType type = 5;
280
+ bool is_read = 6;
281
+ google.protobuf.Timestamp created_at = 7;
282
+ }
283
+
284
+ enum NotificationType {
285
+ NOTIFICATION_TYPE_UNSPECIFIED = 0;
286
+ NOTIFICATION_TYPE_ORDER_UPDATE = 1;
287
+ NOTIFICATION_TYPE_SYSTEM_ALERT = 2;
288
+ NOTIFICATION_TYPE_PROMOTION = 3;
289
+ }
290
+ ```
291
+
292
+ ## Gates
293
+
294
+ - **Every endpoint must have a complete schema.** No endpoint may be added without defined request parameters, request body (if applicable), response body, and error responses. An endpoint without a schema is not designed -- it is a stub.
295
+ - **Breaking changes must be explicitly flagged.** WHERE a change removes a field, renames an endpoint, or adds a required request parameter, THEN the skill must flag it as a breaking change and halt until the human acknowledges the break. Silent breaking changes are not permitted.
296
+ - **Generated specs must be valid.** The OpenAPI spec must pass structural validation. The GraphQL schema must parse without errors. Proto files must compile with `protoc`. An invalid spec is worse than no spec.
297
+ - **Naming conventions must be consistent.** WHERE the project uses a naming convention (detected in phase 1), THEN all new endpoints must follow it. A single inconsistent name pollutes the entire API surface.
298
+
299
+ ## Escalation
300
+
301
+ - **No existing conventions detected:** When the project has no existing API endpoints and no spec file, the skill cannot infer conventions. Report: "No existing API conventions found. Provide a style guide or approve the defaults (plural nouns, kebab-case paths, RFC 7807 errors, cursor pagination) before proceeding."
302
+ - **Breaking change required by the feature:** When the requested feature inherently requires a breaking change (e.g., restructuring a response), present the break explicitly with migration guidance: "This feature requires removing the `legacyField` from the response. Recommend a deprecation period: add `newField` in v1, remove `legacyField` in v2."
303
+ - **Conflicting API styles in the same project:** When both REST routes and GraphQL resolvers exist, ask: "This project has both REST and GraphQL endpoints. Which style should the new feature use? Mixing styles for the same resource creates maintenance burden."
304
+ - **OpenAPI spec severely out of date:** When more than 30% of implemented endpoints are missing from the spec, flag: "The OpenAPI spec is significantly drifted from implementation (N endpoints missing). Recommend a full spec regeneration before adding new endpoints to avoid compounding the drift."
@@ -0,0 +1,74 @@
1
+ name: harness-api-design
2
+ version: "1.0.0"
3
+ description: REST, GraphQL, gRPC API design with OpenAPI specs and versioning strategies
4
+ cognitive_mode: advisory-guide
5
+ triggers:
6
+ - manual
7
+ - on_new_feature
8
+ platforms:
9
+ - claude-code
10
+ - gemini-cli
11
+ tools:
12
+ - Bash
13
+ - Read
14
+ - Write
15
+ - Edit
16
+ - Glob
17
+ - Grep
18
+ cli:
19
+ command: harness skill run harness-api-design
20
+ args:
21
+ - name: path
22
+ description: Project root path
23
+ required: false
24
+ - name: style
25
+ description: "API style: rest, graphql, or grpc. Auto-detected when omitted."
26
+ required: false
27
+ - name: versioning
28
+ description: "Versioning strategy: url-path, header, or query-param. Defaults to url-path."
29
+ required: false
30
+ mcp:
31
+ tool: run_skill
32
+ input:
33
+ skill: harness-api-design
34
+ path: string
35
+ type: rigid
36
+ tier: 3
37
+ internal: false
38
+ keywords:
39
+ - API
40
+ - REST
41
+ - GraphQL
42
+ - gRPC
43
+ - OpenAPI
44
+ - swagger
45
+ - endpoint
46
+ - versioning
47
+ - schema
48
+ - protobuf
49
+ stack_signals:
50
+ - "openapi.*"
51
+ - "swagger.*"
52
+ - "*.proto"
53
+ - "schema.graphql"
54
+ - "*.graphql"
55
+ - "src/**/routes/**"
56
+ - "src/**/controllers/**"
57
+ - "src/**/resolvers/**"
58
+ phases:
59
+ - name: discover
60
+ description: Detect API style, existing endpoints, and technology stack
61
+ required: true
62
+ - name: design
63
+ description: Produce endpoint definitions, schemas, and versioning plan
64
+ required: true
65
+ - name: validate
66
+ description: Verify design against REST/GraphQL/gRPC best practices and consistency rules
67
+ required: true
68
+ - name: document
69
+ description: Generate or update OpenAPI spec, GraphQL schema, or proto definitions
70
+ required: true
71
+ state:
72
+ persistent: false
73
+ files: []
74
+ depends_on: []
@@ -28,6 +28,7 @@ mcp:
28
28
  skill: harness-architecture-advisor
29
29
  path: string
30
30
  type: flexible
31
+ tier: 2
31
32
  phases:
32
33
  - name: discover
33
34
  description: Ask questions about the problem space and constraints
@@ -0,0 +1,279 @@
1
+ # Harness Auth
2
+
3
+ > OAuth2, JWT, RBAC/ABAC, session management, and MFA pattern analysis. Detects authentication and authorization mechanisms, evaluates security posture against OWASP guidelines, and recommends improvements for token lifecycle, permission models, and multi-factor authentication.
4
+
5
+ ## When to Use
6
+
7
+ - When implementing or modifying authentication flows (login, registration, password reset, OAuth2)
8
+ - On PRs that change authorization logic, middleware guards, or permission models
9
+ - To audit existing auth implementation for security vulnerabilities and best practice compliance
10
+ - NOT for network-level security or infrastructure hardening (use harness-security-review)
11
+ - NOT for compliance framework audits (use harness-compliance for SOC2/HIPAA/GDPR)
12
+ - NOT for secrets management or credential rotation (use harness-secrets)
13
+
14
+ ## Process
15
+
16
+ ### Phase 1: DETECT -- Identify Auth Mechanisms and Providers
17
+
18
+ 1. **Discover authentication providers.** Scan the codebase for auth framework usage:
19
+ - Passport.js: `passport.use()`, strategy configurations, `passport.authenticate()` calls
20
+ - NextAuth.js / Auth.js: `next-auth` config, provider definitions, callback handlers
21
+ - Auth0: `@auth0/nextjs-auth0`, `auth0-js`, management API client initialization
22
+ - Firebase Auth: `firebase/auth`, `signInWithPopup`, `onAuthStateChanged` usage
23
+ - Custom: JWT signing/verification, bcrypt hashing, session store initialization
24
+ - Spring Security: `@EnableWebSecurity`, `SecurityFilterChain`, `UserDetailsService`
25
+ - ASP.NET Identity: `AddAuthentication()`, `[Authorize]` attributes, `ClaimsPrincipal`
26
+
27
+ 2. **Map token flows.** Trace the authentication lifecycle:
28
+ - Token issuance: Where and how are JWTs or session tokens created?
29
+ - Token storage: Cookie (httpOnly, secure, sameSite?), localStorage, sessionStorage, or in-memory?
30
+ - Token refresh: Is there a refresh token flow? What is the access token lifetime?
31
+ - Token revocation: Can tokens be invalidated before expiry? Is there a blocklist?
32
+ - Token propagation: How are tokens passed between services (Authorization header, cookie, custom header)?
33
+
34
+ 3. **Identify authorization models.** Determine how permissions are enforced:
35
+ - RBAC: Role definitions, role-to-permission mappings, role assignment to users
36
+ - ABAC: Attribute-based policies, policy evaluation engine, context attributes
37
+ - ACL: Per-resource access control lists, ownership checks
38
+ - Middleware guards: Express middleware, NestJS guards, Spring interceptors, ASP.NET policies
39
+ - Route-level: Declarative route protection, public vs protected route definitions
40
+
41
+ 4. **Check for MFA implementation.** Look for multi-factor authentication:
42
+ - TOTP: `otplib`, `speakeasy`, Google Authenticator integration
43
+ - SMS/Email OTP: Twilio, SendGrid verification flows
44
+ - WebAuthn/FIDO2: `@simplewebauthn/server`, hardware key registration
45
+ - Recovery codes: Generation, storage, and redemption logic
46
+
47
+ 5. **Inventory session management.** If sessions are used:
48
+ - Session store: Redis, database, in-memory, or cookie-based
49
+ - Session lifecycle: creation, renewal, expiry, and destruction
50
+ - Concurrent session handling: single-session enforcement, session listing
51
+
52
+ ---
53
+
54
+ ### Phase 2: ANALYZE -- Evaluate Security Posture
55
+
56
+ 1. **Check JWT implementation against OWASP guidelines.** Verify:
57
+ - Algorithm is explicitly set (no `alg: none` vulnerability)
58
+ - Secret/key is sufficiently strong (RS256/ES256 preferred over HS256 for distributed systems)
59
+ - Token lifetime is appropriate (access: 15-60 min, refresh: 7-30 days)
60
+ - Claims include `iss`, `aud`, `exp`, `iat`, and `sub` at minimum
61
+ - Tokens are validated on every request, not just on login
62
+ - JWTs are not stored in localStorage (XSS vulnerability)
63
+
64
+ 2. **Evaluate OAuth2/OIDC flows.** If OAuth2 is used:
65
+ - Is PKCE used for public clients (SPAs, mobile apps)?
66
+ - Are redirect URIs strictly validated (no open redirect)?
67
+ - Is the state parameter used to prevent CSRF?
68
+ - Are scopes minimized to the principle of least privilege?
69
+ - Is token exchange happening server-side (not exposing client secret)?
70
+
71
+ 3. **Assess password handling.** If password authentication exists:
72
+ - Hashing algorithm: bcrypt, scrypt, or argon2 (not MD5, SHA-1, or SHA-256 without salt)
73
+ - Salt: unique per user, generated with cryptographic RNG
74
+ - Password policy: minimum length, complexity requirements, breach database check
75
+ - Rate limiting on login attempts (brute force protection)
76
+ - Account lockout or CAPTCHA after failed attempts
77
+
78
+ 4. **Review authorization enforcement.** For each protected resource:
79
+ - Is authorization checked at the API layer (not just the UI)?
80
+ - Are there IDOR (Insecure Direct Object Reference) vulnerabilities?
81
+ - Is the permission check granular enough (not just "is authenticated")?
82
+ - Are admin routes protected by role checks, not just authentication?
83
+ - Is horizontal privilege escalation prevented (user A cannot access user B's data)?
84
+
85
+ 5. **Check session security.** If sessions are used:
86
+ - Session ID entropy: cryptographically random, sufficient length
87
+ - Cookie flags: `httpOnly`, `secure`, `sameSite=Strict` or `sameSite=Lax`
88
+ - Session fixation prevention: regenerate ID on login
89
+ - Session timeout: absolute and idle timeout configured
90
+ - CSRF protection: token-based or SameSite cookie
91
+
92
+ ---
93
+
94
+ ### Phase 3: DESIGN -- Recommend Improvements
95
+
96
+ 1. **Token lifecycle improvements.** Based on analysis findings:
97
+ - Recommend specific token lifetimes with rationale
98
+ - Design refresh token rotation (one-time-use refresh tokens with family tracking)
99
+ - Propose token revocation strategy (blocklist in Redis with TTL matching token expiry)
100
+ - If using JWTs in cookies: recommend cookie configuration (httpOnly, secure, sameSite, path, domain)
101
+
102
+ 2. **Permission model design.** Based on the application's needs:
103
+ - For simple apps: RBAC with predefined roles (admin, editor, viewer)
104
+ - For multi-tenant apps: RBAC with tenant-scoped roles
105
+ - For complex resource access: ABAC with policy engine (CASL, Casbin, Open Policy Agent)
106
+ - Generate permission matrix: roles/attributes x resources x actions
107
+
108
+ 3. **MFA implementation plan.** If MFA is missing or incomplete:
109
+ - Recommend TOTP as baseline (widely supported, no SMS dependency)
110
+ - Design enrollment flow: QR code generation, backup codes, verification step
111
+ - Design authentication flow: primary factor -> MFA challenge -> session creation
112
+ - Recommend WebAuthn as optional upgrade path for phishing resistance
113
+
114
+ 4. **Security hardening recommendations.** Prioritized by risk:
115
+ - P0: Fix any authentication bypass, broken access control, or token vulnerability
116
+ - P1: Add missing CSRF protection, fix insecure token storage, add rate limiting
117
+ - P2: Implement MFA, add session management improvements, enhance logging
118
+ - P3: Add breach notification flow, implement progressive security (step-up auth)
119
+
120
+ 5. **Generate implementation guidance.** Produce:
121
+ - Middleware/guard code templates for the project's framework
122
+ - Migration plan for moving from insecure to secure token storage
123
+ - Database schema for RBAC tables (users, roles, permissions, user_roles)
124
+ - Configuration templates for OAuth2 providers
125
+
126
+ ---
127
+
128
+ ### Phase 4: VALIDATE -- Verify Against OWASP and Common Vulnerabilities
129
+
130
+ 1. **OWASP Authentication Verification.** Check against OWASP ASVS (Application Security Verification Standard) Level 2:
131
+ - V2.1: Password security (hashing, policy, breach check)
132
+ - V2.2: General authenticator security (MFA, recovery codes)
133
+ - V2.5: Credential recovery (secure reset flow, no secret questions)
134
+ - V2.7: Out-of-band verification (email/SMS verification security)
135
+ - V2.8: Single or multi-factor authentication (session binding)
136
+
137
+ 2. **OWASP Authorization Verification.** Check against OWASP ASVS:
138
+ - V4.1: Access control design (deny by default, least privilege)
139
+ - V4.2: Operation-level access control (every API endpoint protected)
140
+ - V4.3: Data-level access control (row-level security, tenant isolation)
141
+
142
+ 3. **Test coverage verification.** Check that auth logic is tested:
143
+ - Authentication tests: valid login, invalid credentials, expired tokens, refresh flow
144
+ - Authorization tests: permitted access, denied access, privilege escalation attempt
145
+ - Edge cases: expired session, concurrent sessions, token replay, CSRF
146
+ - Integration tests: full OAuth2 flow with mocked provider
147
+
148
+ 4. **Verify logging and monitoring.** Confirm security events are logged:
149
+ - Successful and failed login attempts with timestamps and IP addresses
150
+ - Password changes and account recovery events
151
+ - Permission changes and role assignments
152
+ - Token refresh and revocation events
153
+ - Log format must not include passwords, tokens, or session IDs
154
+
155
+ 5. **Produce the auth audit report.** Output a structured summary:
156
+ - Authentication mechanism inventory
157
+ - OWASP ASVS compliance status by section
158
+ - Prioritized findings with severity and remediation
159
+ - Permission model diagram or matrix
160
+ - Recommended implementation timeline
161
+
162
+ ---
163
+
164
+ ## Harness Integration
165
+
166
+ - **`harness skill run harness-auth`** -- Primary CLI entry point. Runs all four phases.
167
+ - **`harness validate`** -- Run after implementing auth changes to verify project integrity.
168
+ - **`harness check-deps`** -- Verify auth library dependencies are properly declared and up to date.
169
+ - **`emit_interaction`** -- Used at permission model design (checkpoint:decision) when choosing between RBAC and ABAC, and before recommending OAuth2 provider changes.
170
+ - **`Glob`** -- Discover auth middleware, guard files, policy definitions, and session configurations.
171
+ - **`Grep`** -- Search for JWT signing, password hashing, token validation, and authorization checks.
172
+ - **`Write`** -- Generate permission matrices, migration plans, and middleware templates.
173
+ - **`Edit`** -- Update existing auth middleware, guards, and token configurations.
174
+
175
+ ## Success Criteria
176
+
177
+ - All authentication providers and token flows are mapped with specific file locations
178
+ - JWT implementation is checked against all OWASP ASVS V2 requirements
179
+ - Authorization model is documented with a permission matrix covering all roles and resources
180
+ - Every finding includes a severity level, specific file location, and concrete remediation step
181
+ - Token storage recommendations specify exact cookie flags or storage mechanism
182
+ - Security event logging is verified to capture auth events without leaking sensitive data
183
+
184
+ ## Examples
185
+
186
+ ### Example: Next.js Application with NextAuth.js and Prisma
187
+
188
+ ```
189
+ Phase 1: DETECT
190
+ Provider: NextAuth.js v4 in src/app/api/auth/[...nextauth]/route.ts
191
+ Strategies: Google OAuth2, GitHub OAuth2, email/password (credentials provider)
192
+ Token flow: JWT mode, access token in httpOnly cookie, 30-day expiry
193
+ Authorization: Custom middleware in src/middleware.ts checking session.user.role
194
+ Roles: admin, member (stored in User table via Prisma)
195
+ MFA: Not implemented
196
+ Session store: JWT-based (no server-side session)
197
+
198
+ Phase 2: ANALYZE
199
+ Findings:
200
+ [HIGH] JWT expiry 30 days is excessive — recommend 1 hour with refresh token
201
+ [HIGH] Credentials provider uses bcrypt cost factor 8 — recommend 12
202
+ [MEDIUM] No PKCE on OAuth2 flows (NextAuth handles this but verify config)
203
+ [MEDIUM] No rate limiting on /api/auth/callback/credentials
204
+ [LOW] Role check only in middleware — no API-level authorization guards
205
+ [LOW] No audit logging for login events
206
+
207
+ Phase 3: DESIGN
208
+ Recommendations:
209
+ 1. Switch to database sessions with 1-hour access, 7-day refresh
210
+ 2. Increase bcrypt rounds to 12 in credentials provider
211
+ 3. Add rate-limiter-flexible middleware on auth endpoints (5 attempts/15min)
212
+ 4. Create src/lib/guards/requireRole.ts middleware for API routes
213
+ 5. Add TOTP MFA via otplib with QR enrollment flow
214
+ 6. Add auth event logging to audit table via Prisma middleware
215
+
216
+ Phase 4: VALIDATE
217
+ OWASP ASVS V2 status:
218
+ V2.1 Password Security: PARTIAL (hashing OK, cost factor low, no breach check)
219
+ V2.2 Authenticator Security: FAIL (no MFA)
220
+ V2.5 Credential Recovery: PASS (email-based reset via NextAuth)
221
+ V4.1 Access Control Design: PARTIAL (roles exist, enforcement incomplete)
222
+ Test coverage: 60% — missing tests for role escalation and token expiry
223
+ ```
224
+
225
+ ### Example: NestJS API with Passport.js, JWT, and CASL
226
+
227
+ ```
228
+ Phase 1: DETECT
229
+ Provider: Passport.js with passport-jwt and passport-local strategies
230
+ Token flow:
231
+ - Access token: RS256 JWT, 15-min expiry, in Authorization header
232
+ - Refresh token: opaque, 30-day expiry, in httpOnly cookie
233
+ - Token refresh endpoint: POST /auth/refresh
234
+ Authorization: CASL abilities defined in src/casl/ability.factory.ts
235
+ Roles: super-admin, org-admin, member, viewer (stored in PostgreSQL)
236
+ MFA: TOTP via speakeasy, WebAuthn via @simplewebauthn/server
237
+ Session: Stateless JWT (no server-side session)
238
+
239
+ Phase 2: ANALYZE
240
+ Findings:
241
+ [HIGH] Refresh token not rotated on use — token replay possible
242
+ [MEDIUM] CASL abilities not checked on 3 admin endpoints (src/admin/admin.controller.ts)
243
+ [MEDIUM] No token blocklist — revoked tokens valid until expiry
244
+ [LOW] WebAuthn registration does not verify attestation
245
+ [LOW] Login failure logging does not include client IP
246
+
247
+ Phase 3: DESIGN
248
+ Recommendations:
249
+ 1. Implement refresh token rotation with family tracking in Redis
250
+ - On refresh: invalidate old token, issue new pair
251
+ - On reuse of old token: revoke entire token family (detect theft)
252
+ 2. Add @CheckPolicies() decorator to admin.controller.ts endpoints
253
+ 3. Add Redis-backed token blocklist with TTL = access token lifetime
254
+ 4. Add attestation verification for WebAuthn with expected origin check
255
+ 5. Enhance auth logging with IP, user-agent, and geolocation
256
+
257
+ Phase 4: VALIDATE
258
+ OWASP ASVS V2 status:
259
+ V2.1 Password Security: PASS
260
+ V2.2 Authenticator Security: PASS (TOTP + WebAuthn)
261
+ V2.8 Multi-Factor: PASS
262
+ V4.1 Access Control: PARTIAL (CASL defined, 3 endpoints uncovered)
263
+ V4.3 Data-Level: PASS (CASL policies include tenant isolation)
264
+ Test coverage: 85% — missing tests for token family revocation
265
+ ```
266
+
267
+ ## Gates
268
+
269
+ - **No authentication bypass findings left unresolved.** Any finding that allows unauthenticated access to a protected resource is a P0 blocker. The auth audit cannot be marked complete while bypass vulnerabilities exist.
270
+ - **No tokens stored in localStorage.** JWTs or session tokens in localStorage are accessible via XSS. This is a blocking finding. Tokens must be stored in httpOnly cookies or secure server-side sessions.
271
+ - **No plaintext or weakly hashed passwords.** MD5, SHA-1, or unsalted SHA-256 for password storage is a blocking finding. Passwords must use bcrypt (cost 12+), scrypt, or argon2id.
272
+ - **No authorization checks skipped at the API layer.** UI-only authorization is not authorization. Every API endpoint that serves user-specific or role-restricted data must enforce permissions server-side.
273
+
274
+ ## Escalation
275
+
276
+ - **When the auth architecture requires a fundamental redesign:** Report: "The current auth implementation has [N] high-severity findings that require architectural changes (e.g., switching from localStorage tokens to httpOnly cookies). This is not a patch — recommend a dedicated auth migration sprint with a rollback plan."
277
+ - **When third-party auth provider documentation is insufficient:** Report: "The [provider] SDK does not document [specific behavior]. Recommend testing the behavior empirically in a sandbox environment and documenting the findings in the project's auth architecture doc."
278
+ - **When MFA adoption requires UX changes beyond the auth layer:** Report: "Implementing MFA requires changes to [login flow, account settings, recovery flow]. Coordinate with the frontend team to design the enrollment and challenge UX before implementing the backend."
279
+ - **When the permission model is too simple for current requirements:** Report: "The current RBAC model with [N] roles cannot express [specific access pattern]. Recommend evaluating ABAC with [CASL/Casbin/OPA] to support attribute-based policies. This is a significant migration — plan for 2-3 sprints."