@harness-engineering/cli 1.23.0 → 1.23.2

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 (423) hide show
  1. package/dist/agents/commands/codex/harness/add-harness-component/SKILL.md +21 -12
  2. package/dist/agents/commands/codex/harness/cleanup-dead-code/SKILL.md +9 -0
  3. package/dist/agents/commands/codex/harness/detect-doc-drift/SKILL.md +9 -0
  4. package/dist/agents/commands/codex/harness/enforce-architecture/SKILL.md +5 -15
  5. package/dist/agents/commands/codex/harness/harness-architecture-advisor/SKILL.md +5 -15
  6. package/dist/agents/commands/codex/harness/harness-autopilot/SKILL.md +10 -0
  7. package/dist/agents/commands/codex/harness/harness-brainstorming/SKILL.md +9 -0
  8. package/dist/agents/commands/codex/harness/harness-code-review/SKILL.md +5 -15
  9. package/dist/agents/commands/codex/harness/harness-codebase-cleanup/SKILL.md +9 -0
  10. package/dist/agents/commands/codex/harness/harness-debugging/SKILL.md +9 -0
  11. package/dist/agents/commands/codex/harness/harness-dependency-health/SKILL.md +8 -0
  12. package/dist/agents/commands/codex/harness/harness-docs-pipeline/SKILL.md +9 -0
  13. package/dist/agents/commands/codex/harness/harness-execution/SKILL.md +9 -0
  14. package/dist/agents/commands/codex/harness/harness-hotspot-detector/SKILL.md +8 -0
  15. package/dist/agents/commands/codex/harness/harness-impact-analysis/SKILL.md +8 -0
  16. package/dist/agents/commands/codex/harness/harness-integrity/SKILL.md +8 -0
  17. package/dist/agents/commands/codex/harness/harness-onboarding/SKILL.md +18 -10
  18. package/dist/agents/commands/codex/harness/harness-perf/SKILL.md +9 -0
  19. package/dist/agents/commands/codex/harness/harness-planning/SKILL.md +10 -0
  20. package/dist/agents/commands/codex/harness/harness-refactoring/SKILL.md +9 -0
  21. package/dist/agents/commands/codex/harness/harness-release-readiness/SKILL.md +9 -0
  22. package/dist/agents/commands/codex/harness/harness-roadmap/SKILL.md +10 -1
  23. package/dist/agents/commands/codex/harness/harness-security-scan/SKILL.md +5 -15
  24. package/dist/agents/commands/codex/harness/harness-skill-authoring/SKILL.md +20 -1
  25. package/dist/agents/commands/codex/harness/harness-soundness-review/SKILL.md +10 -0
  26. package/dist/agents/commands/codex/harness/harness-supply-chain-audit/SKILL.md +8 -0
  27. package/dist/agents/commands/codex/harness/harness-tdd/SKILL.md +9 -0
  28. package/dist/agents/commands/codex/harness/harness-test-advisor/SKILL.md +8 -0
  29. package/dist/agents/commands/codex/harness/harness-verification/SKILL.md +9 -0
  30. package/dist/agents/commands/codex/harness/harness-verify/SKILL.md +8 -0
  31. package/dist/agents/commands/codex/harness/initialize-harness-project/SKILL.md +22 -13
  32. package/dist/agents/commands/cursor/harness/add-harness-component.mdc +12 -12
  33. package/dist/agents/commands/cursor/harness/harness-onboarding.mdc +10 -10
  34. package/dist/agents/commands/cursor/harness/harness-roadmap.mdc +1 -1
  35. package/dist/agents/commands/cursor/harness/initialize-harness-project.mdc +13 -13
  36. package/dist/agents/skills/claude-code/add-harness-component/SKILL.md +21 -12
  37. package/dist/agents/skills/claude-code/align-documentation/SKILL.md +9 -0
  38. package/dist/agents/skills/claude-code/check-mechanical-constraints/SKILL.md +9 -0
  39. package/dist/agents/skills/claude-code/cleanup-dead-code/SKILL.md +11 -0
  40. package/dist/agents/skills/claude-code/detect-doc-drift/SKILL.md +9 -0
  41. package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +5 -15
  42. package/dist/agents/skills/claude-code/harness-accessibility/SKILL.md +10 -0
  43. package/dist/agents/skills/claude-code/harness-api-design/SKILL.md +5 -15
  44. package/dist/agents/skills/claude-code/harness-architecture-advisor/SKILL.md +5 -15
  45. package/dist/agents/skills/claude-code/harness-auth/SKILL.md +5 -15
  46. package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +10 -0
  47. package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +9 -0
  48. package/dist/agents/skills/claude-code/harness-caching/SKILL.md +10 -0
  49. package/dist/agents/skills/claude-code/harness-chaos/SKILL.md +10 -0
  50. package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +5 -15
  51. package/dist/agents/skills/claude-code/harness-codebase-cleanup/SKILL.md +11 -0
  52. package/dist/agents/skills/claude-code/harness-compliance/SKILL.md +10 -0
  53. package/dist/agents/skills/claude-code/harness-containerization/SKILL.md +10 -0
  54. package/dist/agents/skills/claude-code/harness-data-pipeline/SKILL.md +10 -0
  55. package/dist/agents/skills/claude-code/harness-data-validation/SKILL.md +10 -0
  56. package/dist/agents/skills/claude-code/harness-database/SKILL.md +5 -15
  57. package/dist/agents/skills/claude-code/harness-debugging/SKILL.md +9 -0
  58. package/dist/agents/skills/claude-code/harness-dependency-health/SKILL.md +10 -0
  59. package/dist/agents/skills/claude-code/harness-deployment/SKILL.md +5 -15
  60. package/dist/agents/skills/claude-code/harness-design/SKILL.md +10 -0
  61. package/dist/agents/skills/claude-code/harness-design-mobile/SKILL.md +10 -0
  62. package/dist/agents/skills/claude-code/harness-design-system/SKILL.md +10 -0
  63. package/dist/agents/skills/claude-code/harness-design-web/SKILL.md +10 -0
  64. package/dist/agents/skills/claude-code/harness-diagnostics/SKILL.md +9 -0
  65. package/dist/agents/skills/claude-code/harness-docs-pipeline/SKILL.md +11 -0
  66. package/dist/agents/skills/claude-code/harness-dx/SKILL.md +10 -0
  67. package/dist/agents/skills/claude-code/harness-e2e/SKILL.md +9 -0
  68. package/dist/agents/skills/claude-code/harness-event-driven/SKILL.md +10 -0
  69. package/dist/agents/skills/claude-code/harness-execution/SKILL.md +9 -0
  70. package/dist/agents/skills/claude-code/harness-feature-flags/SKILL.md +10 -0
  71. package/dist/agents/skills/claude-code/harness-git-workflow/SKILL.md +10 -0
  72. package/dist/agents/skills/claude-code/harness-hotspot-detector/SKILL.md +10 -0
  73. package/dist/agents/skills/claude-code/harness-i18n/SKILL.md +10 -0
  74. package/dist/agents/skills/claude-code/harness-i18n-process/SKILL.md +10 -0
  75. package/dist/agents/skills/claude-code/harness-i18n-workflow/SKILL.md +10 -0
  76. package/dist/agents/skills/claude-code/harness-impact-analysis/SKILL.md +10 -0
  77. package/dist/agents/skills/claude-code/harness-incident-response/SKILL.md +10 -0
  78. package/dist/agents/skills/claude-code/harness-infrastructure-as-code/SKILL.md +10 -0
  79. package/dist/agents/skills/claude-code/harness-integration-test/SKILL.md +9 -0
  80. package/dist/agents/skills/claude-code/harness-integrity/SKILL.md +10 -0
  81. package/dist/agents/skills/claude-code/harness-knowledge-mapper/SKILL.md +9 -0
  82. package/dist/agents/skills/claude-code/harness-load-testing/SKILL.md +10 -0
  83. package/dist/agents/skills/claude-code/harness-ml-ops/SKILL.md +10 -0
  84. package/dist/agents/skills/claude-code/harness-mobile-patterns/SKILL.md +10 -0
  85. package/dist/agents/skills/claude-code/harness-mutation-test/SKILL.md +9 -0
  86. package/dist/agents/skills/claude-code/harness-observability/SKILL.md +10 -0
  87. package/dist/agents/skills/claude-code/harness-onboarding/SKILL.md +18 -10
  88. package/dist/agents/skills/claude-code/harness-parallel-agents/SKILL.md +9 -0
  89. package/dist/agents/skills/claude-code/harness-perf/SKILL.md +11 -0
  90. package/dist/agents/skills/claude-code/harness-perf-tdd/SKILL.md +10 -0
  91. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +10 -0
  92. package/dist/agents/skills/claude-code/harness-pre-commit-review/SKILL.md +9 -0
  93. package/dist/agents/skills/claude-code/harness-product-spec/SKILL.md +10 -0
  94. package/dist/agents/skills/claude-code/harness-property-test/SKILL.md +10 -0
  95. package/dist/agents/skills/claude-code/harness-refactoring/SKILL.md +9 -0
  96. package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +11 -0
  97. package/dist/agents/skills/claude-code/harness-resilience/SKILL.md +10 -0
  98. package/dist/agents/skills/claude-code/harness-roadmap/SKILL.md +10 -1
  99. package/dist/agents/skills/claude-code/harness-roadmap-pilot/SKILL.md +8 -0
  100. package/dist/agents/skills/claude-code/harness-secrets/SKILL.md +10 -0
  101. package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +10 -0
  102. package/dist/agents/skills/claude-code/harness-security-scan/SKILL.md +5 -15
  103. package/dist/agents/skills/claude-code/harness-skill-authoring/SKILL.md +29 -1
  104. package/dist/agents/skills/claude-code/harness-soundness-review/SKILL.md +10 -0
  105. package/dist/agents/skills/claude-code/harness-sql-review/SKILL.md +10 -0
  106. package/dist/agents/skills/claude-code/harness-state-management/SKILL.md +10 -0
  107. package/dist/agents/skills/claude-code/harness-supply-chain-audit/SKILL.md +10 -0
  108. package/dist/agents/skills/claude-code/harness-tdd/SKILL.md +9 -0
  109. package/dist/agents/skills/claude-code/harness-test-advisor/SKILL.md +10 -0
  110. package/dist/agents/skills/claude-code/harness-test-data/SKILL.md +10 -0
  111. package/dist/agents/skills/claude-code/harness-ux-copy/SKILL.md +10 -0
  112. package/dist/agents/skills/claude-code/harness-verification/SKILL.md +9 -0
  113. package/dist/agents/skills/claude-code/harness-verify/SKILL.md +10 -0
  114. package/dist/agents/skills/claude-code/harness-visual-regression/SKILL.md +10 -0
  115. package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +22 -13
  116. package/dist/agents/skills/claude-code/validate-context-engineering/SKILL.md +9 -0
  117. package/dist/agents/skills/codex/add-harness-component/SKILL.md +21 -12
  118. package/dist/agents/skills/codex/align-documentation/SKILL.md +9 -0
  119. package/dist/agents/skills/codex/check-mechanical-constraints/SKILL.md +9 -0
  120. package/dist/agents/skills/codex/cleanup-dead-code/SKILL.md +11 -0
  121. package/dist/agents/skills/codex/detect-doc-drift/SKILL.md +9 -0
  122. package/dist/agents/skills/codex/enforce-architecture/SKILL.md +5 -15
  123. package/dist/agents/skills/codex/harness-accessibility/SKILL.md +10 -0
  124. package/dist/agents/skills/codex/harness-api-design/SKILL.md +5 -15
  125. package/dist/agents/skills/codex/harness-architecture-advisor/SKILL.md +5 -15
  126. package/dist/agents/skills/codex/harness-auth/SKILL.md +5 -15
  127. package/dist/agents/skills/codex/harness-autopilot/SKILL.md +10 -0
  128. package/dist/agents/skills/codex/harness-brainstorming/SKILL.md +9 -0
  129. package/dist/agents/skills/codex/harness-caching/SKILL.md +10 -0
  130. package/dist/agents/skills/codex/harness-chaos/SKILL.md +10 -0
  131. package/dist/agents/skills/codex/harness-code-review/SKILL.md +5 -15
  132. package/dist/agents/skills/codex/harness-codebase-cleanup/SKILL.md +11 -0
  133. package/dist/agents/skills/codex/harness-compliance/SKILL.md +10 -0
  134. package/dist/agents/skills/codex/harness-containerization/SKILL.md +10 -0
  135. package/dist/agents/skills/codex/harness-data-pipeline/SKILL.md +10 -0
  136. package/dist/agents/skills/codex/harness-data-validation/SKILL.md +10 -0
  137. package/dist/agents/skills/codex/harness-database/SKILL.md +5 -15
  138. package/dist/agents/skills/codex/harness-debugging/SKILL.md +9 -0
  139. package/dist/agents/skills/codex/harness-dependency-health/SKILL.md +10 -0
  140. package/dist/agents/skills/codex/harness-deployment/SKILL.md +5 -15
  141. package/dist/agents/skills/codex/harness-design/SKILL.md +10 -0
  142. package/dist/agents/skills/codex/harness-design-mobile/SKILL.md +10 -0
  143. package/dist/agents/skills/codex/harness-design-system/SKILL.md +10 -0
  144. package/dist/agents/skills/codex/harness-design-web/SKILL.md +10 -0
  145. package/dist/agents/skills/codex/harness-diagnostics/SKILL.md +9 -0
  146. package/dist/agents/skills/codex/harness-docs-pipeline/SKILL.md +11 -0
  147. package/dist/agents/skills/codex/harness-dx/SKILL.md +10 -0
  148. package/dist/agents/skills/codex/harness-e2e/SKILL.md +9 -0
  149. package/dist/agents/skills/codex/harness-event-driven/SKILL.md +10 -0
  150. package/dist/agents/skills/codex/harness-execution/SKILL.md +9 -0
  151. package/dist/agents/skills/codex/harness-feature-flags/SKILL.md +10 -0
  152. package/dist/agents/skills/codex/harness-git-workflow/SKILL.md +10 -0
  153. package/dist/agents/skills/codex/harness-hotspot-detector/SKILL.md +10 -0
  154. package/dist/agents/skills/codex/harness-i18n/SKILL.md +10 -0
  155. package/dist/agents/skills/codex/harness-i18n-process/SKILL.md +10 -0
  156. package/dist/agents/skills/codex/harness-i18n-workflow/SKILL.md +10 -0
  157. package/dist/agents/skills/codex/harness-impact-analysis/SKILL.md +10 -0
  158. package/dist/agents/skills/codex/harness-incident-response/SKILL.md +10 -0
  159. package/dist/agents/skills/codex/harness-infrastructure-as-code/SKILL.md +10 -0
  160. package/dist/agents/skills/codex/harness-integration-test/SKILL.md +9 -0
  161. package/dist/agents/skills/codex/harness-integrity/SKILL.md +10 -0
  162. package/dist/agents/skills/codex/harness-knowledge-mapper/SKILL.md +9 -0
  163. package/dist/agents/skills/codex/harness-load-testing/SKILL.md +10 -0
  164. package/dist/agents/skills/codex/harness-ml-ops/SKILL.md +10 -0
  165. package/dist/agents/skills/codex/harness-mobile-patterns/SKILL.md +10 -0
  166. package/dist/agents/skills/codex/harness-mutation-test/SKILL.md +9 -0
  167. package/dist/agents/skills/codex/harness-observability/SKILL.md +10 -0
  168. package/dist/agents/skills/codex/harness-onboarding/SKILL.md +18 -10
  169. package/dist/agents/skills/codex/harness-parallel-agents/SKILL.md +9 -0
  170. package/dist/agents/skills/codex/harness-perf/SKILL.md +11 -0
  171. package/dist/agents/skills/codex/harness-perf-tdd/SKILL.md +10 -0
  172. package/dist/agents/skills/codex/harness-planning/SKILL.md +10 -0
  173. package/dist/agents/skills/codex/harness-pre-commit-review/SKILL.md +9 -0
  174. package/dist/agents/skills/codex/harness-product-spec/SKILL.md +10 -0
  175. package/dist/agents/skills/codex/harness-property-test/SKILL.md +10 -0
  176. package/dist/agents/skills/codex/harness-refactoring/SKILL.md +9 -0
  177. package/dist/agents/skills/codex/harness-release-readiness/SKILL.md +11 -0
  178. package/dist/agents/skills/codex/harness-resilience/SKILL.md +10 -0
  179. package/dist/agents/skills/codex/harness-roadmap/SKILL.md +10 -1
  180. package/dist/agents/skills/codex/harness-roadmap-pilot/SKILL.md +8 -0
  181. package/dist/agents/skills/codex/harness-secrets/SKILL.md +10 -0
  182. package/dist/agents/skills/codex/harness-security-review/SKILL.md +10 -0
  183. package/dist/agents/skills/codex/harness-security-scan/SKILL.md +5 -15
  184. package/dist/agents/skills/codex/harness-skill-authoring/SKILL.md +29 -1
  185. package/dist/agents/skills/codex/harness-soundness-review/SKILL.md +10 -0
  186. package/dist/agents/skills/codex/harness-sql-review/SKILL.md +10 -0
  187. package/dist/agents/skills/codex/harness-state-management/SKILL.md +10 -0
  188. package/dist/agents/skills/codex/harness-supply-chain-audit/SKILL.md +10 -0
  189. package/dist/agents/skills/codex/harness-tdd/SKILL.md +9 -0
  190. package/dist/agents/skills/codex/harness-test-advisor/SKILL.md +10 -0
  191. package/dist/agents/skills/codex/harness-test-data/SKILL.md +10 -0
  192. package/dist/agents/skills/codex/harness-ux-copy/SKILL.md +10 -0
  193. package/dist/agents/skills/codex/harness-verification/SKILL.md +9 -0
  194. package/dist/agents/skills/codex/harness-verify/SKILL.md +10 -0
  195. package/dist/agents/skills/codex/harness-visual-regression/SKILL.md +10 -0
  196. package/dist/agents/skills/codex/initialize-harness-project/SKILL.md +22 -13
  197. package/dist/agents/skills/codex/validate-context-engineering/SKILL.md +9 -0
  198. package/dist/agents/skills/cursor/add-harness-component/SKILL.md +21 -12
  199. package/dist/agents/skills/cursor/align-documentation/SKILL.md +9 -0
  200. package/dist/agents/skills/cursor/check-mechanical-constraints/SKILL.md +9 -0
  201. package/dist/agents/skills/cursor/cleanup-dead-code/SKILL.md +11 -0
  202. package/dist/agents/skills/cursor/detect-doc-drift/SKILL.md +9 -0
  203. package/dist/agents/skills/cursor/enforce-architecture/SKILL.md +5 -15
  204. package/dist/agents/skills/cursor/harness-accessibility/SKILL.md +10 -0
  205. package/dist/agents/skills/cursor/harness-api-design/SKILL.md +5 -15
  206. package/dist/agents/skills/cursor/harness-architecture-advisor/SKILL.md +5 -15
  207. package/dist/agents/skills/cursor/harness-auth/SKILL.md +5 -15
  208. package/dist/agents/skills/cursor/harness-autopilot/SKILL.md +10 -0
  209. package/dist/agents/skills/cursor/harness-brainstorming/SKILL.md +9 -0
  210. package/dist/agents/skills/cursor/harness-caching/SKILL.md +10 -0
  211. package/dist/agents/skills/cursor/harness-chaos/SKILL.md +10 -0
  212. package/dist/agents/skills/cursor/harness-code-review/SKILL.md +5 -15
  213. package/dist/agents/skills/cursor/harness-codebase-cleanup/SKILL.md +11 -0
  214. package/dist/agents/skills/cursor/harness-compliance/SKILL.md +10 -0
  215. package/dist/agents/skills/cursor/harness-containerization/SKILL.md +10 -0
  216. package/dist/agents/skills/cursor/harness-data-pipeline/SKILL.md +10 -0
  217. package/dist/agents/skills/cursor/harness-data-validation/SKILL.md +10 -0
  218. package/dist/agents/skills/cursor/harness-database/SKILL.md +5 -15
  219. package/dist/agents/skills/cursor/harness-debugging/SKILL.md +9 -0
  220. package/dist/agents/skills/cursor/harness-dependency-health/SKILL.md +10 -0
  221. package/dist/agents/skills/cursor/harness-deployment/SKILL.md +5 -15
  222. package/dist/agents/skills/cursor/harness-design/SKILL.md +10 -0
  223. package/dist/agents/skills/cursor/harness-design-mobile/SKILL.md +10 -0
  224. package/dist/agents/skills/cursor/harness-design-system/SKILL.md +10 -0
  225. package/dist/agents/skills/cursor/harness-design-web/SKILL.md +10 -0
  226. package/dist/agents/skills/cursor/harness-diagnostics/SKILL.md +9 -0
  227. package/dist/agents/skills/cursor/harness-docs-pipeline/SKILL.md +11 -0
  228. package/dist/agents/skills/cursor/harness-dx/SKILL.md +10 -0
  229. package/dist/agents/skills/cursor/harness-e2e/SKILL.md +9 -0
  230. package/dist/agents/skills/cursor/harness-event-driven/SKILL.md +10 -0
  231. package/dist/agents/skills/cursor/harness-execution/SKILL.md +9 -0
  232. package/dist/agents/skills/cursor/harness-feature-flags/SKILL.md +10 -0
  233. package/dist/agents/skills/cursor/harness-git-workflow/SKILL.md +10 -0
  234. package/dist/agents/skills/cursor/harness-hotspot-detector/SKILL.md +10 -0
  235. package/dist/agents/skills/cursor/harness-i18n/SKILL.md +10 -0
  236. package/dist/agents/skills/cursor/harness-i18n-process/SKILL.md +10 -0
  237. package/dist/agents/skills/cursor/harness-i18n-workflow/SKILL.md +10 -0
  238. package/dist/agents/skills/cursor/harness-impact-analysis/SKILL.md +10 -0
  239. package/dist/agents/skills/cursor/harness-incident-response/SKILL.md +10 -0
  240. package/dist/agents/skills/cursor/harness-infrastructure-as-code/SKILL.md +10 -0
  241. package/dist/agents/skills/cursor/harness-integration-test/SKILL.md +9 -0
  242. package/dist/agents/skills/cursor/harness-integrity/SKILL.md +10 -0
  243. package/dist/agents/skills/cursor/harness-knowledge-mapper/SKILL.md +9 -0
  244. package/dist/agents/skills/cursor/harness-load-testing/SKILL.md +10 -0
  245. package/dist/agents/skills/cursor/harness-ml-ops/SKILL.md +10 -0
  246. package/dist/agents/skills/cursor/harness-mobile-patterns/SKILL.md +10 -0
  247. package/dist/agents/skills/cursor/harness-mutation-test/SKILL.md +9 -0
  248. package/dist/agents/skills/cursor/harness-observability/SKILL.md +10 -0
  249. package/dist/agents/skills/cursor/harness-onboarding/SKILL.md +18 -10
  250. package/dist/agents/skills/cursor/harness-parallel-agents/SKILL.md +9 -0
  251. package/dist/agents/skills/cursor/harness-perf/SKILL.md +11 -0
  252. package/dist/agents/skills/cursor/harness-perf-tdd/SKILL.md +10 -0
  253. package/dist/agents/skills/cursor/harness-planning/SKILL.md +10 -0
  254. package/dist/agents/skills/cursor/harness-pre-commit-review/SKILL.md +9 -0
  255. package/dist/agents/skills/cursor/harness-product-spec/SKILL.md +10 -0
  256. package/dist/agents/skills/cursor/harness-property-test/SKILL.md +10 -0
  257. package/dist/agents/skills/cursor/harness-refactoring/SKILL.md +9 -0
  258. package/dist/agents/skills/cursor/harness-release-readiness/SKILL.md +11 -0
  259. package/dist/agents/skills/cursor/harness-resilience/SKILL.md +10 -0
  260. package/dist/agents/skills/cursor/harness-roadmap/SKILL.md +10 -1
  261. package/dist/agents/skills/cursor/harness-roadmap-pilot/SKILL.md +8 -0
  262. package/dist/agents/skills/cursor/harness-secrets/SKILL.md +10 -0
  263. package/dist/agents/skills/cursor/harness-security-review/SKILL.md +10 -0
  264. package/dist/agents/skills/cursor/harness-security-scan/SKILL.md +5 -15
  265. package/dist/agents/skills/cursor/harness-skill-authoring/SKILL.md +29 -1
  266. package/dist/agents/skills/cursor/harness-soundness-review/SKILL.md +10 -0
  267. package/dist/agents/skills/cursor/harness-sql-review/SKILL.md +10 -0
  268. package/dist/agents/skills/cursor/harness-state-management/SKILL.md +10 -0
  269. package/dist/agents/skills/cursor/harness-supply-chain-audit/SKILL.md +10 -0
  270. package/dist/agents/skills/cursor/harness-tdd/SKILL.md +9 -0
  271. package/dist/agents/skills/cursor/harness-test-advisor/SKILL.md +10 -0
  272. package/dist/agents/skills/cursor/harness-test-data/SKILL.md +10 -0
  273. package/dist/agents/skills/cursor/harness-ux-copy/SKILL.md +10 -0
  274. package/dist/agents/skills/cursor/harness-verification/SKILL.md +9 -0
  275. package/dist/agents/skills/cursor/harness-verify/SKILL.md +10 -0
  276. package/dist/agents/skills/cursor/harness-visual-regression/SKILL.md +10 -0
  277. package/dist/agents/skills/cursor/initialize-harness-project/SKILL.md +22 -13
  278. package/dist/agents/skills/cursor/validate-context-engineering/SKILL.md +9 -0
  279. package/dist/agents/skills/gemini-cli/add-harness-component/SKILL.md +21 -12
  280. package/dist/agents/skills/gemini-cli/align-documentation/SKILL.md +9 -0
  281. package/dist/agents/skills/gemini-cli/check-mechanical-constraints/SKILL.md +9 -0
  282. package/dist/agents/skills/gemini-cli/cleanup-dead-code/SKILL.md +11 -0
  283. package/dist/agents/skills/gemini-cli/detect-doc-drift/SKILL.md +9 -0
  284. package/dist/agents/skills/gemini-cli/enforce-architecture/SKILL.md +5 -15
  285. package/dist/agents/skills/gemini-cli/harness-accessibility/SKILL.md +10 -0
  286. package/dist/agents/skills/gemini-cli/harness-api-design/SKILL.md +5 -15
  287. package/dist/agents/skills/gemini-cli/harness-architecture-advisor/SKILL.md +5 -15
  288. package/dist/agents/skills/gemini-cli/harness-auth/SKILL.md +5 -15
  289. package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +10 -0
  290. package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +9 -0
  291. package/dist/agents/skills/gemini-cli/harness-caching/SKILL.md +10 -0
  292. package/dist/agents/skills/gemini-cli/harness-chaos/SKILL.md +10 -0
  293. package/dist/agents/skills/gemini-cli/harness-code-review/SKILL.md +5 -15
  294. package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/SKILL.md +11 -0
  295. package/dist/agents/skills/gemini-cli/harness-compliance/SKILL.md +10 -0
  296. package/dist/agents/skills/gemini-cli/harness-containerization/SKILL.md +10 -0
  297. package/dist/agents/skills/gemini-cli/harness-data-pipeline/SKILL.md +10 -0
  298. package/dist/agents/skills/gemini-cli/harness-data-validation/SKILL.md +10 -0
  299. package/dist/agents/skills/gemini-cli/harness-database/SKILL.md +5 -15
  300. package/dist/agents/skills/gemini-cli/harness-debugging/SKILL.md +9 -0
  301. package/dist/agents/skills/gemini-cli/harness-dependency-health/SKILL.md +10 -0
  302. package/dist/agents/skills/gemini-cli/harness-deployment/SKILL.md +5 -15
  303. package/dist/agents/skills/gemini-cli/harness-design/SKILL.md +10 -0
  304. package/dist/agents/skills/gemini-cli/harness-design-mobile/SKILL.md +10 -0
  305. package/dist/agents/skills/gemini-cli/harness-design-system/SKILL.md +10 -0
  306. package/dist/agents/skills/gemini-cli/harness-design-web/SKILL.md +10 -0
  307. package/dist/agents/skills/gemini-cli/harness-diagnostics/SKILL.md +9 -0
  308. package/dist/agents/skills/gemini-cli/harness-docs-pipeline/SKILL.md +11 -0
  309. package/dist/agents/skills/gemini-cli/harness-dx/SKILL.md +10 -0
  310. package/dist/agents/skills/gemini-cli/harness-e2e/SKILL.md +9 -0
  311. package/dist/agents/skills/gemini-cli/harness-event-driven/SKILL.md +10 -0
  312. package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +9 -0
  313. package/dist/agents/skills/gemini-cli/harness-feature-flags/SKILL.md +10 -0
  314. package/dist/agents/skills/gemini-cli/harness-git-workflow/SKILL.md +10 -0
  315. package/dist/agents/skills/gemini-cli/harness-hotspot-detector/SKILL.md +10 -0
  316. package/dist/agents/skills/gemini-cli/harness-i18n/SKILL.md +10 -0
  317. package/dist/agents/skills/gemini-cli/harness-i18n-process/SKILL.md +10 -0
  318. package/dist/agents/skills/gemini-cli/harness-i18n-workflow/SKILL.md +10 -0
  319. package/dist/agents/skills/gemini-cli/harness-impact-analysis/SKILL.md +10 -0
  320. package/dist/agents/skills/gemini-cli/harness-incident-response/SKILL.md +10 -0
  321. package/dist/agents/skills/gemini-cli/harness-infrastructure-as-code/SKILL.md +10 -0
  322. package/dist/agents/skills/gemini-cli/harness-integration-test/SKILL.md +9 -0
  323. package/dist/agents/skills/gemini-cli/harness-integrity/SKILL.md +10 -0
  324. package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/SKILL.md +9 -0
  325. package/dist/agents/skills/gemini-cli/harness-load-testing/SKILL.md +10 -0
  326. package/dist/agents/skills/gemini-cli/harness-ml-ops/SKILL.md +10 -0
  327. package/dist/agents/skills/gemini-cli/harness-mobile-patterns/SKILL.md +10 -0
  328. package/dist/agents/skills/gemini-cli/harness-mutation-test/SKILL.md +9 -0
  329. package/dist/agents/skills/gemini-cli/harness-observability/SKILL.md +10 -0
  330. package/dist/agents/skills/gemini-cli/harness-onboarding/SKILL.md +18 -10
  331. package/dist/agents/skills/gemini-cli/harness-parallel-agents/SKILL.md +9 -0
  332. package/dist/agents/skills/gemini-cli/harness-perf/SKILL.md +11 -0
  333. package/dist/agents/skills/gemini-cli/harness-perf-tdd/SKILL.md +10 -0
  334. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +10 -0
  335. package/dist/agents/skills/gemini-cli/harness-pre-commit-review/SKILL.md +9 -0
  336. package/dist/agents/skills/gemini-cli/harness-product-spec/SKILL.md +10 -0
  337. package/dist/agents/skills/gemini-cli/harness-property-test/SKILL.md +10 -0
  338. package/dist/agents/skills/gemini-cli/harness-refactoring/SKILL.md +9 -0
  339. package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +11 -0
  340. package/dist/agents/skills/gemini-cli/harness-resilience/SKILL.md +10 -0
  341. package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +10 -1
  342. package/dist/agents/skills/gemini-cli/harness-roadmap-pilot/SKILL.md +8 -0
  343. package/dist/agents/skills/gemini-cli/harness-secrets/SKILL.md +10 -0
  344. package/dist/agents/skills/gemini-cli/harness-security-review/SKILL.md +10 -0
  345. package/dist/agents/skills/gemini-cli/harness-security-scan/SKILL.md +5 -15
  346. package/dist/agents/skills/gemini-cli/harness-skill-authoring/SKILL.md +29 -1
  347. package/dist/agents/skills/gemini-cli/harness-soundness-review/SKILL.md +10 -0
  348. package/dist/agents/skills/gemini-cli/harness-sql-review/SKILL.md +10 -0
  349. package/dist/agents/skills/gemini-cli/harness-state-management/SKILL.md +10 -0
  350. package/dist/agents/skills/gemini-cli/harness-supply-chain-audit/SKILL.md +10 -0
  351. package/dist/agents/skills/gemini-cli/harness-tdd/SKILL.md +9 -0
  352. package/dist/agents/skills/gemini-cli/harness-test-advisor/SKILL.md +10 -0
  353. package/dist/agents/skills/gemini-cli/harness-test-data/SKILL.md +10 -0
  354. package/dist/agents/skills/gemini-cli/harness-ux-copy/SKILL.md +10 -0
  355. package/dist/agents/skills/gemini-cli/harness-verification/SKILL.md +9 -0
  356. package/dist/agents/skills/gemini-cli/harness-verify/SKILL.md +10 -0
  357. package/dist/agents/skills/gemini-cli/harness-visual-regression/SKILL.md +10 -0
  358. package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +22 -13
  359. package/dist/agents/skills/gemini-cli/validate-context-engineering/SKILL.md +9 -0
  360. package/dist/agents-md-HCCCO5PK.js +9 -0
  361. package/dist/{architecture-EDSBAGR4.js → architecture-S2H624W7.js} +5 -5
  362. package/dist/{assess-project-CEDY4JU3.js → assess-project-XSGK44S5.js} +1 -1
  363. package/dist/bin/harness-mcp.js +18 -18
  364. package/dist/bin/harness.js +124 -35
  365. package/dist/{check-phase-gate-N3DTKFCZ.js → check-phase-gate-UGBJ237T.js} +5 -5
  366. package/dist/{chunk-AIBAYANF.js → chunk-2DHX6TAP.js} +4 -4
  367. package/dist/{chunk-ENA4O4WD.js → chunk-2GT3HO2T.js} +3 -3
  368. package/dist/{chunk-TJ6NLLAY.js → chunk-2YA4XRI3.js} +5 -5
  369. package/dist/{chunk-GZKSBLQL.js → chunk-35EQ5UEI.js} +1 -1
  370. package/dist/{chunk-T5QWCVGK.js → chunk-4FHBPA3E.js} +11 -3
  371. package/dist/{chunk-ERS5EVUZ.js → chunk-5LMZA5LZ.js} +10 -10
  372. package/dist/{chunk-SM22U22L.js → chunk-BK52Z6DR.js} +869 -419
  373. package/dist/{chunk-5SWE24IG.js → chunk-CLD4KL7O.js} +342 -72
  374. package/dist/{chunk-OD3S2NHN.js → chunk-E2GTL3YS.js} +1 -1
  375. package/dist/{chunk-YLN34N65.js → chunk-FP53DDB5.js} +1 -1
  376. package/dist/{chunk-TLDCCPUZ.js → chunk-I47JLISV.js} +1 -1
  377. package/dist/{chunk-AKVG4MMZ.js → chunk-KC5CTCEL.js} +9 -9
  378. package/dist/{chunk-26AUZBV4.js → chunk-KTL3PHNQ.js} +6445 -6222
  379. package/dist/{chunk-DBSOCI3G.js → chunk-KV4M6Y5J.js} +1 -1
  380. package/dist/{chunk-FIAPHX37.js → chunk-LM5Z2WCA.js} +1 -1
  381. package/dist/{chunk-SD3SQOZ2.js → chunk-LOUH2LIC.js} +1 -1
  382. package/dist/{chunk-QUKH6QCJ.js → chunk-MHOO7NLG.js} +11 -11
  383. package/dist/{chunk-HT4VPPB4.js → chunk-MZAHE4DK.js} +12 -12
  384. package/dist/{chunk-A4AI3H3R.js → chunk-NKL53UBL.js} +6 -6
  385. package/dist/{chunk-GJRUIXUK.js → chunk-PGF44T2D.js} +6 -6
  386. package/dist/{chunk-H7Y5CKTM.js → chunk-Q3XYV5UC.js} +1 -1
  387. package/dist/{chunk-TD6MQUV2.js → chunk-S5ZXT3TZ.js} +1 -1
  388. package/dist/{chunk-6KWBH4EO.js → chunk-UGD37ECK.js} +5 -5
  389. package/dist/{chunk-XDAIFVGC.js → chunk-V27WDRYV.js} +603 -525
  390. package/dist/{chunk-YQ6KC6TE.js → chunk-YDRB55Q4.js} +1 -1
  391. package/dist/{chunk-2LAEDVOC.js → chunk-ZRYDYDB2.js} +6 -6
  392. package/dist/{chunk-LIWGCYON.js → chunk-ZYJJUPNE.js} +1 -1
  393. package/dist/ci-workflow-I3V7FZNV.js +9 -0
  394. package/dist/{create-skill-U3XCFRZN.js → create-skill-AO25CJFM.js} +2 -2
  395. package/dist/{dist-USY2C5JL.js → dist-666AAZQ6.js} +1 -1
  396. package/dist/{dist-DZ63LLUD.js → dist-KQSTRP36.js} +1 -1
  397. package/dist/{dist-YIKUBJLQ.js → dist-MKWF5CXR.js} +7 -3
  398. package/dist/{dist-OEXTQQZC.js → dist-WU3TVNNG.js} +7 -1
  399. package/dist/{docs-F5G7NAFF.js → docs-R7UVQBMQ.js} +5 -5
  400. package/dist/engine-JGI3MWAC.js +9 -0
  401. package/dist/{entropy-A5Q2USYX.js → entropy-IDHIG7HS.js} +4 -4
  402. package/dist/{feedback-2EU25RIW.js → feedback-JZETY4UR.js} +1 -1
  403. package/dist/{generate-agent-definitions-HNJHO5YQ.js → generate-agent-definitions-D7B25YTM.js} +6 -6
  404. package/dist/{graph-loader-XULF5QF7.js → graph-loader-BJULJYGG.js} +1 -1
  405. package/dist/index.d.ts +20 -16
  406. package/dist/index.js +54 -54
  407. package/dist/loader-E4KNTOP2.js +11 -0
  408. package/dist/mcp-67I2DBNM.js +37 -0
  409. package/dist/{performance-YAY2A6A6.js → performance-744OSR6P.js} +5 -5
  410. package/dist/{review-pipeline-YD4WI3JM.js → review-pipeline-HIO7HBW4.js} +1 -1
  411. package/dist/runtime-JXQ26U4Z.js +10 -0
  412. package/dist/{security-IBSUKMVD.js → security-GDKHVFUC.js} +1 -1
  413. package/dist/{validate-NHXWKMCR.js → validate-2IUR3OWX.js} +5 -5
  414. package/dist/validate-cross-check-AM4T6P2K.js +9 -0
  415. package/package.json +5 -5
  416. package/dist/agents-md-GLKJSGKT.js +0 -9
  417. package/dist/ci-workflow-LE3QF4FP.js +0 -9
  418. package/dist/engine-LX5RVGXN.js +0 -9
  419. package/dist/loader-GWIEW4HM.js +0 -11
  420. package/dist/mcp-ID3LR6JB.js +0 -37
  421. package/dist/runtime-UJ4YO4CA.js +0 -10
  422. package/dist/validate-cross-check-R3GV2MLM.js +0 -9
  423. package/dist/{chunk-CJDVBBPB.js → chunk-3ISINLYT.js} +1 -1
@@ -1,17 +1,3 @@
1
- import {
2
- detectEntropyDefinition,
3
- handleDetectEntropy
4
- } from "./chunk-TJ6NLLAY.js";
5
- import {
6
- checkPerformanceDefinition,
7
- getCriticalPathsDefinition,
8
- getPerfBaselinesDefinition,
9
- handleCheckPerformance,
10
- handleGetCriticalPaths,
11
- handleGetPerfBaselines,
12
- handleUpdatePerfBaselines,
13
- updatePerfBaselinesDefinition
14
- } from "./chunk-QUKH6QCJ.js";
15
1
  import {
16
2
  analyzeDiffDefinition,
17
3
  createSelfReviewDefinition,
@@ -19,56 +5,67 @@ import {
19
5
  handleCreateSelfReview,
20
6
  handleRequestPeerReview,
21
7
  requestPeerReviewDefinition
22
- } from "./chunk-AKVG4MMZ.js";
8
+ } from "./chunk-KC5CTCEL.js";
23
9
  import {
24
10
  handleRunSecurityScan,
25
11
  runSecurityScanDefinition
26
- } from "./chunk-TD6MQUV2.js";
12
+ } from "./chunk-S5ZXT3TZ.js";
27
13
  import {
28
14
  handleRunCodeReview,
29
15
  runCodeReviewDefinition
30
- } from "./chunk-LIWGCYON.js";
16
+ } from "./chunk-ZYJJUPNE.js";
31
17
  import {
32
18
  assessProjectDefinition,
33
19
  handleAssessProject
34
- } from "./chunk-2LAEDVOC.js";
35
- import {
36
- GENERATED_HEADER_CLAUDE,
37
- GENERATED_HEADER_CODEX,
38
- GENERATED_HEADER_CURSOR,
39
- GENERATED_HEADER_GEMINI,
40
- VALID_PLATFORMS,
41
- applySyncPlan,
42
- computeSyncPlan
43
- } from "./chunk-CJDVBBPB.js";
20
+ } from "./chunk-ZRYDYDB2.js";
44
21
  import {
45
22
  handleValidateProject,
46
23
  validateToolDefinition
47
- } from "./chunk-ENA4O4WD.js";
48
- import {
49
- loadGraphStore
50
- } from "./chunk-TLDCCPUZ.js";
24
+ } from "./chunk-2GT3HO2T.js";
51
25
  import {
52
26
  checkDependenciesDefinition,
53
27
  handleCheckDependencies
54
- } from "./chunk-AIBAYANF.js";
28
+ } from "./chunk-2DHX6TAP.js";
55
29
  import {
56
30
  resolveProjectConfig
57
- } from "./chunk-H7Y5CKTM.js";
31
+ } from "./chunk-Q3XYV5UC.js";
58
32
  import {
59
33
  checkDocsDefinition,
60
34
  handleCheckDocs
61
- } from "./chunk-HT4VPPB4.js";
35
+ } from "./chunk-MZAHE4DK.js";
62
36
  import {
63
- TrackerConfigSchema,
64
- resolveConfig
65
- } from "./chunk-GJRUIXUK.js";
37
+ detectEntropyDefinition,
38
+ handleDetectEntropy
39
+ } from "./chunk-2YA4XRI3.js";
40
+ import {
41
+ checkPerformanceDefinition,
42
+ getCriticalPathsDefinition,
43
+ getPerfBaselinesDefinition,
44
+ handleCheckPerformance,
45
+ handleGetCriticalPaths,
46
+ handleGetPerfBaselines,
47
+ handleUpdatePerfBaselines,
48
+ updatePerfBaselinesDefinition
49
+ } from "./chunk-MHOO7NLG.js";
66
50
  import {
67
51
  resultToMcpResponse
68
52
  } from "./chunk-IDZNPTYD.js";
69
53
  import {
70
54
  sanitizePath
71
55
  } from "./chunk-W6Y7ZW3Y.js";
56
+ import {
57
+ TrackerConfigSchema,
58
+ resolveConfig
59
+ } from "./chunk-PGF44T2D.js";
60
+ import {
61
+ GENERATED_HEADER_CLAUDE,
62
+ GENERATED_HEADER_CODEX,
63
+ GENERATED_HEADER_CURSOR,
64
+ GENERATED_HEADER_GEMINI,
65
+ VALID_PLATFORMS,
66
+ applySyncPlan,
67
+ computeSyncPlan
68
+ } from "./chunk-3ISINLYT.js";
72
69
  import {
73
70
  resolveAllSkillsDirs,
74
71
  resolveCommunitySkillsDir,
@@ -79,23 +76,27 @@ import {
79
76
  resolveTemplatesDir
80
77
  } from "./chunk-N5G5QMS3.js";
81
78
  import {
82
- CLIError,
83
- ExitCode,
84
- handleError
85
- } from "./chunk-3WGJMBKH.js";
86
- import {
87
- SkillMetadataSchema
88
- } from "./chunk-SE4YPMLH.js";
79
+ loadGraphStore
80
+ } from "./chunk-I47JLISV.js";
89
81
  import {
90
82
  DESTRUCTIVE_BASH,
91
83
  checkTaint,
84
+ detectChangeType,
92
85
  scanForInjection,
93
86
  writeTaint
94
- } from "./chunk-XDAIFVGC.js";
87
+ } from "./chunk-V27WDRYV.js";
95
88
  import {
96
89
  Err,
97
90
  Ok
98
- } from "./chunk-ERS5EVUZ.js";
91
+ } from "./chunk-5LMZA5LZ.js";
92
+ import {
93
+ SkillMetadataSchema
94
+ } from "./chunk-SE4YPMLH.js";
95
+ import {
96
+ CLIError,
97
+ ExitCode,
98
+ handleError
99
+ } from "./chunk-3WGJMBKH.js";
99
100
 
100
101
  // src/mcp/server.ts
101
102
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
@@ -242,7 +243,7 @@ var generateLinterDefinition = {
242
243
  };
243
244
  async function handleGenerateLinter(input) {
244
245
  try {
245
- const { generate } = await import("./dist-DZ63LLUD.js");
246
+ const { generate } = await import("./dist-KQSTRP36.js");
246
247
  const result = await generate({
247
248
  configPath: sanitizePath(input.configPath),
248
249
  ...input.outputDir !== void 0 && { outputDir: sanitizePath(input.outputDir) }
@@ -276,7 +277,7 @@ var validateLinterConfigDefinition = {
276
277
  };
277
278
  async function handleValidateLinterConfig(input) {
278
279
  try {
279
- const { validate } = await import("./dist-DZ63LLUD.js");
280
+ const { validate } = await import("./dist-KQSTRP36.js");
280
281
  const result = await validate({ configPath: sanitizePath(input.configPath) });
281
282
  if ("success" in result && result.success) {
282
283
  return { content: [{ type: "text", text: JSON.stringify(result) }] };
@@ -561,7 +562,7 @@ ${skippedMsg}`
561
562
  async function handleInitProject(input) {
562
563
  const i = input;
563
564
  try {
564
- const { TemplateEngine } = await import("./engine-LX5RVGXN.js");
565
+ const { TemplateEngine } = await import("./engine-JGI3MWAC.js");
565
566
  const engine = new TemplateEngine(resolveTemplatesDir());
566
567
  const safePath = sanitizePath(i.path);
567
568
  const detected = tryDetectFramework(engine, safePath, i);
@@ -582,7 +583,7 @@ var listPersonasDefinition = {
582
583
  inputSchema: { type: "object", properties: {} }
583
584
  };
584
585
  async function handleListPersonas() {
585
- const { listPersonas } = await import("./loader-GWIEW4HM.js");
586
+ const { listPersonas } = await import("./loader-E4KNTOP2.js");
586
587
  const result = listPersonas(resolvePersonasDir());
587
588
  return resultToMcpResponse(result);
588
589
  }
@@ -606,10 +607,10 @@ async function handleGeneratePersonaArtifacts(input) {
606
607
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.name)) {
607
608
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.name}`)));
608
609
  }
609
- const { loadPersona } = await import("./loader-GWIEW4HM.js");
610
- const { generateRuntime } = await import("./runtime-UJ4YO4CA.js");
611
- const { generateAgentsMd } = await import("./agents-md-GLKJSGKT.js");
612
- const { generateCIWorkflow } = await import("./ci-workflow-LE3QF4FP.js");
610
+ const { loadPersona } = await import("./loader-E4KNTOP2.js");
611
+ const { generateRuntime } = await import("./runtime-JXQ26U4Z.js");
612
+ const { generateAgentsMd } = await import("./agents-md-HCCCO5PK.js");
613
+ const { generateCIWorkflow } = await import("./ci-workflow-I3V7FZNV.js");
613
614
  const personasDir = resolvePersonasDir();
614
615
  const filePath = path3.join(personasDir, `${input.name}.yaml`);
615
616
  if (!filePath.startsWith(personasDir)) {
@@ -664,7 +665,7 @@ async function handleRunPersona(input) {
664
665
  if (!/^[a-z0-9][a-z0-9._-]*$/i.test(input.persona)) {
665
666
  return resultToMcpResponse(Err(new Error(`Invalid persona name: ${input.persona}`)));
666
667
  }
667
- const { loadPersona } = await import("./loader-GWIEW4HM.js");
668
+ const { loadPersona } = await import("./loader-E4KNTOP2.js");
668
669
  const { runPersona } = await import("./runner-VMYLHWOC.js");
669
670
  const { executeSkill } = await import("./skill-executor-2BZQLHYN.js");
670
671
  const personasDir = resolvePersonasDir();
@@ -1075,6 +1076,17 @@ var SIGNAL_DOMAIN_MAP = {
1075
1076
  runbooks: ["incident-response"],
1076
1077
  "docs/runbooks": ["incident-response"]
1077
1078
  };
1079
+ function detectDomainsFromFiles(files) {
1080
+ const domainSet = /* @__PURE__ */ new Set();
1081
+ for (const file of files) {
1082
+ for (const [pattern, domains] of Object.entries(SIGNAL_DOMAIN_MAP)) {
1083
+ if (file === pattern || file.startsWith(pattern + "/")) {
1084
+ for (const domain of domains) domainSet.add(domain);
1085
+ }
1086
+ }
1087
+ }
1088
+ return [...domainSet].sort();
1089
+ }
1078
1090
  function generateStackProfile(projectRoot) {
1079
1091
  const signals = {};
1080
1092
  const domainSet = /* @__PURE__ */ new Set();
@@ -1204,7 +1216,7 @@ var createSkillDefinition = {
1204
1216
  };
1205
1217
  async function handleCreateSkill(input) {
1206
1218
  try {
1207
- const { generateSkillFiles } = await import("./create-skill-U3XCFRZN.js");
1219
+ const { generateSkillFiles } = await import("./create-skill-AO25CJFM.js");
1208
1220
  const result = generateSkillFiles({
1209
1221
  name: input.name,
1210
1222
  description: input.description,
@@ -1322,7 +1334,7 @@ async function autoSyncRoadmap(projectPath) {
1322
1334
  try {
1323
1335
  const roadmapFile = path11.join(projectPath, "docs", "roadmap.md");
1324
1336
  if (!fs10.existsSync(roadmapFile)) return;
1325
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-YIKUBJLQ.js");
1337
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges } = await import("./dist-MKWF5CXR.js");
1326
1338
  const raw = fs10.readFileSync(roadmapFile, "utf-8");
1327
1339
  const parseResult = parseRoadmap(raw);
1328
1340
  if (!parseResult.ok) return;
@@ -1349,7 +1361,7 @@ async function triggerExternalSync(projectPath, roadmapFile) {
1349
1361
  }
1350
1362
  const token = process.env.GITHUB_TOKEN;
1351
1363
  if (!token) return;
1352
- const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-YIKUBJLQ.js");
1364
+ const { fullSync, GitHubIssuesSyncAdapter } = await import("./dist-MKWF5CXR.js");
1353
1365
  const adapter = new GitHubIssuesSyncAdapter({
1354
1366
  token,
1355
1367
  config: trackerConfig
@@ -1461,12 +1473,12 @@ var manageStateDefinition = {
1461
1473
  }
1462
1474
  };
1463
1475
  async function handleShow(projectPath, input) {
1464
- const { loadState } = await import("./dist-YIKUBJLQ.js");
1476
+ const { loadState } = await import("./dist-MKWF5CXR.js");
1465
1477
  return resultToMcpResponse(await loadState(projectPath, input.stream, input.session));
1466
1478
  }
1467
1479
  async function handleLearn(projectPath, input) {
1468
1480
  if (!input.learning) return mcpError("Error: learning is required for learn action");
1469
- const { appendLearning } = await import("./dist-YIKUBJLQ.js");
1481
+ const { appendLearning } = await import("./dist-MKWF5CXR.js");
1470
1482
  const result = await appendLearning(
1471
1483
  projectPath,
1472
1484
  input.learning,
@@ -1481,7 +1493,7 @@ async function handleLearn(projectPath, input) {
1481
1493
  async function handleFailure(projectPath, input) {
1482
1494
  if (!input.description) return mcpError("Error: description is required for failure action");
1483
1495
  if (!input.failureType) return mcpError("Error: failureType is required for failure action");
1484
- const { appendFailure } = await import("./dist-YIKUBJLQ.js");
1496
+ const { appendFailure } = await import("./dist-MKWF5CXR.js");
1485
1497
  const result = await appendFailure(
1486
1498
  projectPath,
1487
1499
  input.description,
@@ -1494,24 +1506,24 @@ async function handleFailure(projectPath, input) {
1494
1506
  return resultToMcpResponse(Ok({ recorded: true }));
1495
1507
  }
1496
1508
  async function handleArchive(projectPath, input) {
1497
- const { archiveFailures } = await import("./dist-YIKUBJLQ.js");
1509
+ const { archiveFailures } = await import("./dist-MKWF5CXR.js");
1498
1510
  const result = await archiveFailures(projectPath, input.stream, input.session);
1499
1511
  if (!result.ok) return resultToMcpResponse(result);
1500
1512
  return resultToMcpResponse(Ok({ archived: true }));
1501
1513
  }
1502
1514
  async function handleReset(projectPath, input) {
1503
- const { saveState, DEFAULT_STATE } = await import("./dist-YIKUBJLQ.js");
1515
+ const { saveState, DEFAULT_STATE } = await import("./dist-MKWF5CXR.js");
1504
1516
  const result = await saveState(projectPath, { ...DEFAULT_STATE }, input.stream, input.session);
1505
1517
  if (!result.ok) return resultToMcpResponse(result);
1506
1518
  return resultToMcpResponse(Ok({ reset: true }));
1507
1519
  }
1508
1520
  async function handleGate(projectPath, _input) {
1509
- const { runMechanicalGate } = await import("./dist-YIKUBJLQ.js");
1521
+ const { runMechanicalGate } = await import("./dist-MKWF5CXR.js");
1510
1522
  return resultToMcpResponse(await runMechanicalGate(projectPath));
1511
1523
  }
1512
1524
  async function handleSaveHandoff(projectPath, input) {
1513
1525
  if (!input.handoff) return mcpError("Error: handoff is required for save-handoff action");
1514
- const { saveHandoff } = await import("./dist-YIKUBJLQ.js");
1526
+ const { saveHandoff } = await import("./dist-MKWF5CXR.js");
1515
1527
  const result = await saveHandoff(
1516
1528
  projectPath,
1517
1529
  input.handoff,
@@ -1523,7 +1535,7 @@ async function handleSaveHandoff(projectPath, input) {
1523
1535
  return resultToMcpResponse(Ok({ saved: true }));
1524
1536
  }
1525
1537
  async function handleLoadHandoff(projectPath, input) {
1526
- const { loadHandoff } = await import("./dist-YIKUBJLQ.js");
1538
+ const { loadHandoff } = await import("./dist-MKWF5CXR.js");
1527
1539
  return resultToMcpResponse(await loadHandoff(projectPath, input.stream, input.session));
1528
1540
  }
1529
1541
  async function handleAppendEntry(projectPath, input) {
@@ -1531,7 +1543,7 @@ async function handleAppendEntry(projectPath, input) {
1531
1543
  if (!input.section) return mcpError("Error: section is required for append_entry action");
1532
1544
  if (!input.authorSkill) return mcpError("Error: authorSkill is required for append_entry action");
1533
1545
  if (!input.content) return mcpError("Error: content is required for append_entry action");
1534
- const { appendSessionEntry } = await import("./dist-YIKUBJLQ.js");
1546
+ const { appendSessionEntry } = await import("./dist-MKWF5CXR.js");
1535
1547
  const result = await appendSessionEntry(
1536
1548
  projectPath,
1537
1549
  input.session,
@@ -1547,7 +1559,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1547
1559
  if (!input.entryId) return mcpError("Error: entryId is required for update_entry_status action");
1548
1560
  if (!input.newStatus)
1549
1561
  return mcpError("Error: newStatus is required for update_entry_status action");
1550
- const { updateSessionEntryStatus } = await import("./dist-YIKUBJLQ.js");
1562
+ const { updateSessionEntryStatus } = await import("./dist-MKWF5CXR.js");
1551
1563
  const result = await updateSessionEntryStatus(
1552
1564
  projectPath,
1553
1565
  input.session,
@@ -1560,7 +1572,7 @@ async function handleUpdateEntryStatus(projectPath, input) {
1560
1572
  async function handleReadSection(projectPath, input) {
1561
1573
  if (!input.session) return mcpError("Error: session is required for read_section action");
1562
1574
  if (!input.section) return mcpError("Error: section is required for read_section action");
1563
- const { readSessionSection } = await import("./dist-YIKUBJLQ.js");
1575
+ const { readSessionSection } = await import("./dist-MKWF5CXR.js");
1564
1576
  const result = await readSessionSection(
1565
1577
  projectPath,
1566
1578
  input.session,
@@ -1570,13 +1582,13 @@ async function handleReadSection(projectPath, input) {
1570
1582
  }
1571
1583
  async function handleReadSections(projectPath, input) {
1572
1584
  if (!input.session) return mcpError("Error: session is required for read_sections action");
1573
- const { readSessionSections } = await import("./dist-YIKUBJLQ.js");
1585
+ const { readSessionSections } = await import("./dist-MKWF5CXR.js");
1574
1586
  const result = await readSessionSections(projectPath, input.session);
1575
1587
  return resultToMcpResponse(result);
1576
1588
  }
1577
1589
  async function handleArchiveSession(projectPath, input) {
1578
1590
  if (!input.session) return mcpError("Error: session is required for archive_session action");
1579
- const { archiveSession } = await import("./dist-YIKUBJLQ.js");
1591
+ const { archiveSession } = await import("./dist-MKWF5CXR.js");
1580
1592
  const result = await archiveSession(projectPath, input.session);
1581
1593
  if (!result.ok) return resultToMcpResponse(result);
1582
1594
  await autoSyncRoadmap(projectPath);
@@ -1640,7 +1652,7 @@ var listStreamsDefinition = {
1640
1652
  };
1641
1653
  async function handleListStreams(input) {
1642
1654
  try {
1643
- const { listStreams, loadStreamIndex } = await import("./dist-YIKUBJLQ.js");
1655
+ const { listStreams, loadStreamIndex } = await import("./dist-MKWF5CXR.js");
1644
1656
  const projectPath = sanitizePath(input.path);
1645
1657
  const indexResult = await loadStreamIndex(projectPath);
1646
1658
  const streamsResult = await listStreams(projectPath);
@@ -1678,7 +1690,7 @@ var checkPhaseGateDefinition = {
1678
1690
  };
1679
1691
  async function handleCheckPhaseGate(input) {
1680
1692
  try {
1681
- const { runCheckPhaseGate } = await import("./check-phase-gate-N3DTKFCZ.js");
1693
+ const { runCheckPhaseGate } = await import("./check-phase-gate-UGBJ237T.js");
1682
1694
  const result = await runCheckPhaseGate({ cwd: sanitizePath(input.path) });
1683
1695
  if (result.ok) {
1684
1696
  return { content: [{ type: "text", text: JSON.stringify(result.value) }] };
@@ -1734,7 +1746,7 @@ async function handleValidateCrossCheck(input) {
1734
1746
  };
1735
1747
  }
1736
1748
  try {
1737
- const { runCrossCheck } = await import("./validate-cross-check-R3GV2MLM.js");
1749
+ const { runCrossCheck } = await import("./validate-cross-check-AM4T6P2K.js");
1738
1750
  const specsDir = path12.resolve(projectPath, input.specsDir ?? "docs/specs");
1739
1751
  if (!specsDir.startsWith(projectPath)) {
1740
1752
  return {
@@ -2379,7 +2391,7 @@ async function handleGenerateSlashCommands(input) {
2379
2391
  // src/mcp/resources/state.ts
2380
2392
  async function getStateResource(projectRoot) {
2381
2393
  try {
2382
- const { loadState, migrateToStreams } = await import("./dist-YIKUBJLQ.js");
2394
+ const { loadState, migrateToStreams } = await import("./dist-MKWF5CXR.js");
2383
2395
  await migrateToStreams(projectRoot);
2384
2396
  const result = await loadState(projectRoot);
2385
2397
  if (result.ok) {
@@ -2467,7 +2479,7 @@ async function handleQueryGraph(input) {
2467
2479
  const projectPath = sanitizePath(input.path);
2468
2480
  const store = await loadGraphStore(projectPath);
2469
2481
  if (!store) return graphNotFoundError();
2470
- const { ContextQL } = await import("./dist-OEXTQQZC.js");
2482
+ const { ContextQL } = await import("./dist-WU3TVNNG.js");
2471
2483
  const cql = new ContextQL(store);
2472
2484
  const result = cql.execute({
2473
2485
  rootNodeIds: input.rootNodeIds,
@@ -2558,7 +2570,7 @@ async function handleSearchSimilar(input) {
2558
2570
  const projectPath = sanitizePath(input.path);
2559
2571
  const store = await loadGraphStore(projectPath);
2560
2572
  if (!store) return graphNotFoundError();
2561
- const { FusionLayer } = await import("./dist-OEXTQQZC.js");
2573
+ const { FusionLayer } = await import("./dist-WU3TVNNG.js");
2562
2574
  const fusion = new FusionLayer(store);
2563
2575
  const results = fusion.search(input.query, input.topK ?? 10);
2564
2576
  if (input.mode === "summary") {
@@ -2613,7 +2625,7 @@ async function handleFindContextFor(input) {
2613
2625
  const projectPath = sanitizePath(input.path);
2614
2626
  const store = await loadGraphStore(projectPath);
2615
2627
  if (!store) return graphNotFoundError();
2616
- const { FusionLayer, ContextQL } = await import("./dist-OEXTQQZC.js");
2628
+ const { FusionLayer, ContextQL } = await import("./dist-WU3TVNNG.js");
2617
2629
  const fusion = new FusionLayer(store);
2618
2630
  const cql = new ContextQL(store);
2619
2631
  const tokenBudget = input.tokenBudget ?? 4e3;
@@ -2709,7 +2721,7 @@ async function handleGetRelationships(input) {
2709
2721
  const projectPath = sanitizePath(input.path);
2710
2722
  const store = await loadGraphStore(projectPath);
2711
2723
  if (!store) return graphNotFoundError();
2712
- const { ContextQL } = await import("./dist-OEXTQQZC.js");
2724
+ const { ContextQL } = await import("./dist-WU3TVNNG.js");
2713
2725
  const cql = new ContextQL(store);
2714
2726
  const direction = input.direction ?? "both";
2715
2727
  const bidirectional = direction === "both" || direction === "inbound";
@@ -2815,7 +2827,7 @@ async function handleGetImpact(input) {
2815
2827
  const projectPath = sanitizePath(input.path);
2816
2828
  const store = await loadGraphStore(projectPath);
2817
2829
  if (!store) return graphNotFoundError();
2818
- const { ContextQL } = await import("./dist-OEXTQQZC.js");
2830
+ const { ContextQL } = await import("./dist-WU3TVNNG.js");
2819
2831
  let targetNodeId = input.nodeId;
2820
2832
  if (!targetNodeId && input.filePath) {
2821
2833
  const fileNodes = store.findNodes({ type: "file" });
@@ -2947,7 +2959,7 @@ async function handleIngestSource(input) {
2947
2959
  try {
2948
2960
  const projectPath = sanitizePath(input.path);
2949
2961
  const graphDir = path16.join(projectPath, ".harness", "graph");
2950
- const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-OEXTQQZC.js");
2962
+ const { GraphStore, CodeIngestor, TopologicalLinker, KnowledgeIngestor, GitIngestor } = await import("./dist-WU3TVNNG.js");
2951
2963
  const fs17 = await import("fs/promises");
2952
2964
  await fs17.mkdir(graphDir, { recursive: true });
2953
2965
  const store = new GraphStore();
@@ -3022,7 +3034,7 @@ async function handleDetectAnomalies(input) {
3022
3034
  const projectPath = sanitizePath(input.path);
3023
3035
  const store = await loadGraphStore(projectPath);
3024
3036
  if (!store) return graphNotFoundError();
3025
- const { GraphAnomalyAdapter } = await import("./dist-OEXTQQZC.js");
3037
+ const { GraphAnomalyAdapter } = await import("./dist-WU3TVNNG.js");
3026
3038
  const adapter = new GraphAnomalyAdapter(store);
3027
3039
  const report = adapter.detect({
3028
3040
  ...input.threshold !== void 0 && { threshold: input.threshold },
@@ -3062,7 +3074,7 @@ async function handleAskGraph(input) {
3062
3074
  const projectPath = sanitizePath(input.path);
3063
3075
  const store = await loadGraphStore(projectPath);
3064
3076
  if (!store) return graphNotFoundError();
3065
- const { askGraph } = await import("./dist-OEXTQQZC.js");
3077
+ const { askGraph } = await import("./dist-WU3TVNNG.js");
3066
3078
  const result = await askGraph(store, input.question);
3067
3079
  return {
3068
3080
  content: [{ type: "text", text: JSON.stringify(result) }]
@@ -3080,6 +3092,138 @@ async function handleAskGraph(input) {
3080
3092
  }
3081
3093
  }
3082
3094
 
3095
+ // src/mcp/tools/graph/compute-blast-radius.ts
3096
+ var computeBlastRadiusDefinition = {
3097
+ name: "compute_blast_radius",
3098
+ description: "Simulate cascading failure propagation from a source node using probability-weighted BFS. Returns cumulative failure probability for each affected node.",
3099
+ inputSchema: {
3100
+ type: "object",
3101
+ properties: {
3102
+ path: { type: "string", description: "Path to project root" },
3103
+ file: {
3104
+ type: "string",
3105
+ description: "File path (relative to project root) to simulate failure for"
3106
+ },
3107
+ nodeId: { type: "string", description: "Node ID to simulate failure for" },
3108
+ probabilityFloor: {
3109
+ type: "number",
3110
+ description: "Minimum cumulative probability to continue traversal (default 0.05)"
3111
+ },
3112
+ maxDepth: {
3113
+ type: "number",
3114
+ description: "Maximum BFS depth (default 10)"
3115
+ },
3116
+ mode: {
3117
+ type: "string",
3118
+ enum: ["compact", "detailed"],
3119
+ description: "Response density: compact returns summary + top 10 highest-risk nodes, detailed returns full layered cascade chain. Default: compact"
3120
+ }
3121
+ },
3122
+ required: ["path"]
3123
+ }
3124
+ };
3125
+ async function handleComputeBlastRadius(input) {
3126
+ try {
3127
+ if (!input.nodeId && !input.file) {
3128
+ return {
3129
+ content: [
3130
+ {
3131
+ type: "text",
3132
+ text: "Error: either nodeId or file is required"
3133
+ }
3134
+ ],
3135
+ isError: true
3136
+ };
3137
+ }
3138
+ const projectPath = sanitizePath(input.path);
3139
+ const store = await loadGraphStore(projectPath);
3140
+ if (!store) return graphNotFoundError();
3141
+ const { CascadeSimulator } = await import("./dist-WU3TVNNG.js");
3142
+ let targetNodeId = input.nodeId;
3143
+ if (!targetNodeId && input.file) {
3144
+ const fileNodes = store.findNodes({ type: "file" });
3145
+ const match = fileNodes.find((n) => n.path === input.file || n.id === `file:${input.file}`);
3146
+ if (!match) {
3147
+ return {
3148
+ content: [
3149
+ {
3150
+ type: "text",
3151
+ text: `Error: no file node found matching path "${input.file}"`
3152
+ }
3153
+ ],
3154
+ isError: true
3155
+ };
3156
+ }
3157
+ targetNodeId = match.id;
3158
+ }
3159
+ if (input.probabilityFloor !== void 0 && (input.probabilityFloor <= 0 || input.probabilityFloor >= 1)) {
3160
+ return {
3161
+ content: [
3162
+ {
3163
+ type: "text",
3164
+ text: "Error: probabilityFloor must be between 0 and 1 (exclusive)"
3165
+ }
3166
+ ],
3167
+ isError: true
3168
+ };
3169
+ }
3170
+ if (input.maxDepth !== void 0 && (input.maxDepth < 1 || input.maxDepth > 100)) {
3171
+ return {
3172
+ content: [{ type: "text", text: "Error: maxDepth must be between 1 and 100" }],
3173
+ isError: true
3174
+ };
3175
+ }
3176
+ const simulator = new CascadeSimulator(store);
3177
+ const result = simulator.simulate(targetNodeId, {
3178
+ ...input.probabilityFloor !== void 0 && {
3179
+ probabilityFloor: input.probabilityFloor
3180
+ },
3181
+ ...input.maxDepth !== void 0 && { maxDepth: input.maxDepth }
3182
+ });
3183
+ if (input.mode === "detailed") {
3184
+ return {
3185
+ content: [
3186
+ {
3187
+ type: "text",
3188
+ text: JSON.stringify({
3189
+ mode: "detailed",
3190
+ sourceNodeId: result.sourceNodeId,
3191
+ sourceName: result.sourceName,
3192
+ layers: result.layers,
3193
+ flatSummary: result.flatSummary,
3194
+ summary: result.summary
3195
+ })
3196
+ }
3197
+ ]
3198
+ };
3199
+ }
3200
+ return {
3201
+ content: [
3202
+ {
3203
+ type: "text",
3204
+ text: JSON.stringify({
3205
+ mode: "compact",
3206
+ sourceNodeId: result.sourceNodeId,
3207
+ sourceName: result.sourceName,
3208
+ topRisks: result.flatSummary.slice(0, 10),
3209
+ summary: result.summary
3210
+ })
3211
+ }
3212
+ ]
3213
+ };
3214
+ } catch (error) {
3215
+ return {
3216
+ content: [
3217
+ {
3218
+ type: "text",
3219
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
3220
+ }
3221
+ ],
3222
+ isError: true
3223
+ };
3224
+ }
3225
+ }
3226
+
3083
3227
  // src/mcp/resources/graph.ts
3084
3228
  import * as fs14 from "fs/promises";
3085
3229
  import * as path17 from "path";
@@ -3198,7 +3342,7 @@ var generateAgentDefinitionsDefinition = {
3198
3342
  }
3199
3343
  };
3200
3344
  async function handleGenerateAgentDefinitions(input) {
3201
- const { generateAgentDefinitions } = await import("./generate-agent-definitions-HNJHO5YQ.js");
3345
+ const { generateAgentDefinitions } = await import("./generate-agent-definitions-D7B25YTM.js");
3202
3346
  const platforms = input.platform === "all" || !input.platform ? ["claude-code", "gemini-cli"] : [input.platform];
3203
3347
  const results = generateAgentDefinitions({
3204
3348
  platforms: [...platforms],
@@ -3526,8 +3670,8 @@ function shouldTriggerExternalSync(input, response) {
3526
3670
  }
3527
3671
  async function handleManageRoadmap(input) {
3528
3672
  try {
3529
- const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-YIKUBJLQ.js");
3530
- const { Ok: Ok2 } = await import("./dist-USY2C5JL.js");
3673
+ const { parseRoadmap, serializeRoadmap, syncRoadmap, applySyncChanges, assignFeature } = await import("./dist-MKWF5CXR.js");
3674
+ const { Ok: Ok2 } = await import("./dist-666AAZQ6.js");
3531
3675
  const projectPath = sanitizePath(input.path);
3532
3676
  const deps = {
3533
3677
  parseRoadmap,
@@ -3961,7 +4105,7 @@ async function handleTransition(validInput, projectPath, id) {
3961
4105
  const transition = transitionResult.data;
3962
4106
  const prompt = renderTransition(transition);
3963
4107
  try {
3964
- const { saveHandoff } = await import("./dist-YIKUBJLQ.js");
4108
+ const { saveHandoff } = await import("./dist-MKWF5CXR.js");
3965
4109
  await saveHandoff(
3966
4110
  projectPath,
3967
4111
  {
@@ -4029,7 +4173,7 @@ async function handleEmitInteraction(input) {
4029
4173
  }
4030
4174
  async function recordInteraction(projectPath, id, type, decision, stream) {
4031
4175
  try {
4032
- const { loadState, saveState } = await import("./dist-YIKUBJLQ.js");
4176
+ const { loadState, saveState } = await import("./dist-MKWF5CXR.js");
4033
4177
  const stateResult = await loadState(projectPath, stream);
4034
4178
  if (stateResult.ok) {
4035
4179
  const state = stateResult.value;
@@ -4118,10 +4262,10 @@ async function handleGatherContext(input) {
4118
4262
  input.include ?? ["state", "learnings", "handoff", "graph", "validation"]
4119
4263
  );
4120
4264
  const errors = [];
4121
- const statePromise = includeSet.has("state") ? import("./dist-YIKUBJLQ.js").then(
4265
+ const statePromise = includeSet.has("state") ? import("./dist-MKWF5CXR.js").then(
4122
4266
  (core) => core.loadState(projectPath, void 0, input.session)
4123
4267
  ) : Promise.resolve(null);
4124
- const learningsPromise = includeSet.has("learnings") ? import("./dist-YIKUBJLQ.js").then(
4268
+ const learningsPromise = includeSet.has("learnings") ? import("./dist-MKWF5CXR.js").then(
4125
4269
  (core) => core.loadBudgetedLearnings(projectPath, {
4126
4270
  intent: input.intent,
4127
4271
  tokenBudget: input.learningsBudget ?? 1e3,
@@ -4130,14 +4274,14 @@ async function handleGatherContext(input) {
4130
4274
  ...input.depth !== void 0 && { depth: input.depth }
4131
4275
  })
4132
4276
  ) : Promise.resolve(null);
4133
- const handoffPromise = includeSet.has("handoff") ? import("./dist-YIKUBJLQ.js").then(
4277
+ const handoffPromise = includeSet.has("handoff") ? import("./dist-MKWF5CXR.js").then(
4134
4278
  (core) => core.loadHandoff(projectPath, void 0, input.session)
4135
4279
  ) : Promise.resolve(null);
4136
4280
  const graphPromise = includeSet.has("graph") ? (async () => {
4137
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-XULF5QF7.js");
4281
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-BJULJYGG.js");
4138
4282
  const store = await loadGraphStore2(projectPath);
4139
4283
  if (!store) return null;
4140
- const { FusionLayer, ContextQL } = await import("./dist-OEXTQQZC.js");
4284
+ const { FusionLayer, ContextQL } = await import("./dist-WU3TVNNG.js");
4141
4285
  const fusion = new FusionLayer(store);
4142
4286
  const cql = new ContextQL(store);
4143
4287
  const tokenBudget = input.tokenBudget ?? 4e3;
@@ -4174,11 +4318,11 @@ async function handleGatherContext(input) {
4174
4318
  context: contextBlocks
4175
4319
  };
4176
4320
  })() : Promise.resolve(null);
4177
- const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-YIKUBJLQ.js").then(
4321
+ const sessionsPromise = includeSet.has("sessions") && input.session ? import("./dist-MKWF5CXR.js").then(
4178
4322
  (core) => core.readSessionSections(projectPath, input.session)
4179
4323
  ) : Promise.resolve(null);
4180
4324
  const shouldIncludeEvents = input.includeEvents !== void 0 ? input.includeEvents : includeSet.has("events") || !!input.session && !input.include;
4181
- const eventsPromise = shouldIncludeEvents ? import("./dist-YIKUBJLQ.js").then(async (core) => {
4325
+ const eventsPromise = shouldIncludeEvents ? import("./dist-MKWF5CXR.js").then(async (core) => {
4182
4326
  const result = await core.loadEvents(projectPath, {
4183
4327
  session: input.session
4184
4328
  });
@@ -4186,7 +4330,7 @@ async function handleGatherContext(input) {
4186
4330
  return core.formatEventTimeline(result.value);
4187
4331
  }) : Promise.resolve(null);
4188
4332
  const validationPromise = includeSet.has("validation") ? (async () => {
4189
- const { handleValidateProject: handleValidateProject2 } = await import("./validate-NHXWKMCR.js");
4333
+ const { handleValidateProject: handleValidateProject2 } = await import("./validate-2IUR3OWX.js");
4190
4334
  const result = await handleValidateProject2({ path: projectPath });
4191
4335
  const first = result.content[0];
4192
4336
  return first ? JSON.parse(first.text) : null;
@@ -4280,7 +4424,7 @@ async function handleGatherContext(input) {
4280
4424
  };
4281
4425
  if (input.session) {
4282
4426
  try {
4283
- const core = await import("./dist-YIKUBJLQ.js");
4427
+ const core = await import("./dist-MKWF5CXR.js");
4284
4428
  core.updateSessionIndex(
4285
4429
  projectPath,
4286
4430
  input.session,
@@ -4406,7 +4550,7 @@ async function handleReviewChanges(input) {
4406
4550
  }
4407
4551
  }
4408
4552
  async function runQuickReview(projectPath, diff, diffLines, downgraded) {
4409
- const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-2EU25RIW.js");
4553
+ const { handleAnalyzeDiff: handleAnalyzeDiff2 } = await import("./feedback-JZETY4UR.js");
4410
4554
  const result = await handleAnalyzeDiff2({ diff, path: projectPath });
4411
4555
  const firstContent = result.content[0];
4412
4556
  if (!firstContent) throw new Error("Empty analyze_diff response");
@@ -4437,7 +4581,7 @@ function extractFileCount(diffParsed) {
4437
4581
  return files?.length ?? 0;
4438
4582
  }
4439
4583
  async function runStandardReview(projectPath, diff, diffLines, downgraded) {
4440
- const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-2EU25RIW.js");
4584
+ const { handleAnalyzeDiff: handleAnalyzeDiff2, handleCreateSelfReview: handleCreateSelfReview2 } = await import("./feedback-JZETY4UR.js");
4441
4585
  const [diffResult, reviewResult] = await Promise.all([
4442
4586
  handleAnalyzeDiff2({ diff, path: projectPath }),
4443
4587
  handleCreateSelfReview2({ path: projectPath, diff })
@@ -4469,7 +4613,7 @@ async function runStandardReview(projectPath, diff, diffLines, downgraded) {
4469
4613
  };
4470
4614
  }
4471
4615
  async function runDeepReview(projectPath, diff, diffLines, _downgraded) {
4472
- const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-YD4WI3JM.js");
4616
+ const { handleRunCodeReview: handleRunCodeReview2 } = await import("./review-pipeline-HIO7HBW4.js");
4473
4617
  const result = await handleRunCodeReview2({ path: projectPath, diff });
4474
4618
  const deepContent = result.content[0];
4475
4619
  if (!deepContent) throw new Error("Empty code review response");
@@ -4540,7 +4684,7 @@ async function handleCheckTaskIndependence(input) {
4540
4684
  try {
4541
4685
  const projectPath = sanitizePath(input.path);
4542
4686
  const store = await loadGraphStore(projectPath);
4543
- const { TaskIndependenceAnalyzer } = await import("./dist-OEXTQQZC.js");
4687
+ const { TaskIndependenceAnalyzer } = await import("./dist-WU3TVNNG.js");
4544
4688
  const analyzer = new TaskIndependenceAnalyzer(store ?? void 0);
4545
4689
  const result = analyzer.analyze({
4546
4690
  tasks: input.tasks,
@@ -4628,7 +4772,7 @@ async function handlePredictConflicts(input) {
4628
4772
  try {
4629
4773
  const projectPath = sanitizePath(input.path);
4630
4774
  const store = await loadGraphStore(projectPath);
4631
- const { ConflictPredictor } = await import("./dist-OEXTQQZC.js");
4775
+ const { ConflictPredictor } = await import("./dist-WU3TVNNG.js");
4632
4776
  const predictor = new ConflictPredictor(store ?? void 0);
4633
4777
  const result = predictor.predict({
4634
4778
  tasks: input.tasks,
@@ -4734,7 +4878,7 @@ async function handleDetectStaleConstraints(input) {
4734
4878
  isError: true
4735
4879
  };
4736
4880
  }
4737
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-XULF5QF7.js");
4881
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-BJULJYGG.js");
4738
4882
  const store = await loadGraphStore2(projectPath);
4739
4883
  if (!store) {
4740
4884
  return {
@@ -4755,7 +4899,7 @@ async function handleDetectStaleConstraints(input) {
4755
4899
  ]
4756
4900
  };
4757
4901
  }
4758
- const { detectStaleConstraints } = await import("./dist-YIKUBJLQ.js");
4902
+ const { detectStaleConstraints } = await import("./dist-MKWF5CXR.js");
4759
4903
  const result = detectStaleConstraints(
4760
4904
  store,
4761
4905
  windowDays,
@@ -4872,10 +5016,10 @@ function countCriticalFindings(securityData) {
4872
5016
  return findings.filter((f) => f.severity === "error").length;
4873
5017
  }
4874
5018
  async function runHealthChecks(projectPath) {
4875
- const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-CEDY4JU3.js");
4876
- const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-EDSBAGR4.js");
4877
- const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-A5Q2USYX.js");
4878
- const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-IBSUKMVD.js");
5019
+ const { handleAssessProject: handleAssessProject2 } = await import("./assess-project-XSGK44S5.js");
5020
+ const { handleCheckDependencies: handleCheckDependencies2 } = await import("./architecture-S2H624W7.js");
5021
+ const { handleDetectEntropy: handleDetectEntropy2 } = await import("./entropy-IDHIG7HS.js");
5022
+ const { handleRunSecurityScan: handleRunSecurityScan2 } = await import("./security-GDKHVFUC.js");
4879
5023
  const [assessResult, depsResult, entropyResult, securityResult] = await Promise.all([
4880
5024
  handleAssessProject2({
4881
5025
  path: projectPath,
@@ -4921,10 +5065,10 @@ function avg(values) {
4921
5065
  }
4922
5066
  async function runGraphMetrics(projectPath) {
4923
5067
  try {
4924
- const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-XULF5QF7.js");
5068
+ const { loadGraphStore: loadGraphStore2 } = await import("./graph-loader-BJULJYGG.js");
4925
5069
  const store = await loadGraphStore2(projectPath);
4926
5070
  if (!store) return ZERO_METRICS;
4927
- const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-OEXTQQZC.js");
5071
+ const { GraphCouplingAdapter, GraphComplexityAdapter, GraphAnomalyAdapter } = await import("./dist-WU3TVNNG.js");
4928
5072
  const couplingAdapter = new GraphCouplingAdapter(store);
4929
5073
  const couplingData = couplingAdapter.computeCouplingData();
4930
5074
  const files = couplingData.files;
@@ -5041,60 +5185,605 @@ async function handleSearchSkills(input) {
5041
5185
  };
5042
5186
  }
5043
5187
 
5044
- // src/mcp/tools/decay-trends.ts
5045
- var getDecayTrendsDefinition = {
5046
- name: "get_decay_trends",
5047
- description: 'Get architecture decay trends over time. Returns stability score history and per-category trend analysis from timeline snapshots. Use to answer questions like "is the architecture decaying?" or "which metrics are getting worse?"',
5048
- inputSchema: {
5049
- type: "object",
5050
- properties: {
5051
- path: { type: "string", description: "Path to project root" },
5052
- last: {
5053
- type: "number",
5054
- description: "Number of recent snapshots to analyze (default: 10)"
5055
- },
5056
- since: {
5057
- type: "string",
5058
- description: "Show trends since this ISO date (e.g., 2026-01-01)"
5059
- },
5060
- category: {
5061
- type: "string",
5062
- description: "Filter to a single metric category",
5063
- enum: [
5064
- "circular-deps",
5065
- "layer-violations",
5066
- "complexity",
5067
- "coupling",
5068
- "forbidden-imports",
5069
- "module-size",
5070
- "dependency-depth"
5071
- ]
5072
- }
5073
- },
5074
- required: ["path"]
5075
- }
5188
+ // src/skill/dispatch-engine.ts
5189
+ import { execSync as execSync2 } from "child_process";
5190
+
5191
+ // src/skill/recommendation-rules.ts
5192
+ var FALLBACK_RULES = {
5193
+ "enforce-architecture": [
5194
+ { signal: "circular-deps", hard: true },
5195
+ { signal: "layer-violations", hard: true },
5196
+ { signal: "high-coupling", metric: "fanOut", threshold: 20, weight: 0.8 },
5197
+ { signal: "high-coupling", metric: "couplingRatio", threshold: 0.7, weight: 0.6 },
5198
+ { signal: "change-feature", weight: 0.6 },
5199
+ { signal: "domain-containerization", weight: 0.5 },
5200
+ { signal: "domain-infrastructure-as-code", weight: 0.5 }
5201
+ ],
5202
+ "dependency-health": [
5203
+ { signal: "high-coupling", metric: "fanOut", threshold: 15, weight: 0.7 },
5204
+ { signal: "anomaly-outlier", weight: 0.6 },
5205
+ { signal: "articulation-point", weight: 0.5 }
5206
+ ],
5207
+ tdd: [
5208
+ { signal: "low-coverage", weight: 0.9 },
5209
+ { signal: "change-bugfix", weight: 0.9 }
5210
+ ],
5211
+ "codebase-cleanup": [
5212
+ { signal: "dead-code", weight: 0.8 },
5213
+ { signal: "drift", weight: 0.6 }
5214
+ ],
5215
+ "security-scan": [
5216
+ { signal: "security-findings", hard: true },
5217
+ { signal: "domain-secrets", weight: 0.8 }
5218
+ ],
5219
+ refactoring: [
5220
+ { signal: "high-complexity", metric: "cyclomaticComplexity", threshold: 15, weight: 0.8 },
5221
+ { signal: "high-coupling", metric: "couplingRatio", threshold: 0.5, weight: 0.6 },
5222
+ { signal: "change-refactor", weight: 0.9 }
5223
+ ],
5224
+ "detect-doc-drift": [
5225
+ { signal: "doc-gaps", weight: 0.7 },
5226
+ { signal: "drift", weight: 0.5 },
5227
+ { signal: "change-docs", weight: 0.8 },
5228
+ { signal: "domain-api-design", weight: 0.6 }
5229
+ ],
5230
+ perf: [
5231
+ { signal: "perf-regression", weight: 0.8 },
5232
+ { signal: "domain-load-testing", weight: 0.7 }
5233
+ ],
5234
+ "supply-chain-audit": [
5235
+ { signal: "security-findings", weight: 0.6 },
5236
+ { signal: "domain-secrets", weight: 0.9 }
5237
+ ],
5238
+ "code-review": [
5239
+ { signal: "high-complexity", weight: 0.5 },
5240
+ { signal: "high-coupling", weight: 0.4 },
5241
+ { signal: "change-feature", weight: 0.7 },
5242
+ { signal: "change-bugfix", weight: 0.6 }
5243
+ ],
5244
+ integrity: [
5245
+ { signal: "drift", weight: 0.7 },
5246
+ { signal: "dead-code", weight: 0.5 },
5247
+ { signal: "change-refactor", weight: 0.6 }
5248
+ ],
5249
+ "soundness-review": [
5250
+ { signal: "layer-violations", weight: 0.6 },
5251
+ { signal: "circular-deps", weight: 0.5 },
5252
+ { signal: "change-feature", weight: 0.5 },
5253
+ { signal: "change-refactor", weight: 0.5 }
5254
+ ],
5255
+ debugging: [
5256
+ { signal: "perf-regression", weight: 0.5 },
5257
+ { signal: "anomaly-outlier", weight: 0.6 },
5258
+ { signal: "domain-incident-response", weight: 0.7 }
5259
+ ],
5260
+ "hotspot-detector": [
5261
+ { signal: "high-complexity", metric: "cyclomaticComplexity", threshold: 20, weight: 0.9 },
5262
+ { signal: "anomaly-outlier", weight: 0.7 },
5263
+ { signal: "articulation-point", weight: 0.8 }
5264
+ ],
5265
+ "cleanup-dead-code": [{ signal: "dead-code", hard: true }]
5076
5266
  };
5077
- async function handleGetDecayTrends(input) {
5078
- let projectPath;
5079
- try {
5080
- projectPath = sanitizePath(input.path);
5081
- } catch (error) {
5082
- return {
5083
- content: [
5084
- {
5085
- type: "text",
5086
- text: `Error: ${error instanceof Error ? error.message : String(error)}`
5087
- }
5088
- ],
5089
- isError: true
5090
- };
5091
- }
5092
- try {
5093
- const core = await import("./dist-YIKUBJLQ.js");
5094
- const { TimelineManager } = core;
5095
- const manager = new TimelineManager(projectPath);
5096
- const timeline = manager.load();
5097
- if (timeline.snapshots.length === 0) {
5267
+
5268
+ // src/skill/recommendation-engine.ts
5269
+ function resolveMetricValue(metrics, metricName) {
5270
+ switch (metricName) {
5271
+ case "fanOut":
5272
+ return metrics.maxFanOut;
5273
+ case "couplingRatio":
5274
+ return metrics.avgCouplingRatio;
5275
+ case "cyclomaticComplexity":
5276
+ return metrics.maxCyclomaticComplexity;
5277
+ case "coverage":
5278
+ return metrics.testCoverage !== null ? 100 - metrics.testCoverage : null;
5279
+ default:
5280
+ return null;
5281
+ }
5282
+ }
5283
+ function buildSkillAddressIndex(skills) {
5284
+ const index = /* @__PURE__ */ new Map();
5285
+ for (const [name, entry] of Object.entries(skills)) {
5286
+ const addresses = entry.addresses.length > 0 ? entry.addresses : FALLBACK_RULES[name] ?? [];
5287
+ index.set(name, { addresses, dependsOn: entry.dependsOn });
5288
+ }
5289
+ for (const [name, addresses] of Object.entries(FALLBACK_RULES)) {
5290
+ if (!index.has(name)) {
5291
+ index.set(name, { addresses, dependsOn: [] });
5292
+ }
5293
+ }
5294
+ return index;
5295
+ }
5296
+ function matchHardRules(snapshot, skillIndex) {
5297
+ const activeSignals = new Set(snapshot.signals);
5298
+ const results = [];
5299
+ for (const [skillName, entry] of skillIndex) {
5300
+ const hardAddresses = entry.addresses.filter((a) => a.hard === true);
5301
+ const matchedSignals = [];
5302
+ const reasons = [];
5303
+ for (const addr of hardAddresses) {
5304
+ if (activeSignals.has(addr.signal)) {
5305
+ matchedSignals.push(addr.signal);
5306
+ reasons.push(`[CRITICAL] Signal '${addr.signal}' is active`);
5307
+ }
5308
+ }
5309
+ if (matchedSignals.length > 0) {
5310
+ results.push({
5311
+ skillName,
5312
+ score: 1,
5313
+ urgency: "critical",
5314
+ reasons,
5315
+ sequence: 0,
5316
+ // assigned later by sequencer
5317
+ triggeredBy: matchedSignals
5318
+ });
5319
+ }
5320
+ }
5321
+ return results;
5322
+ }
5323
+ function clamp(value, min, max) {
5324
+ return Math.min(Math.max(value, min), max);
5325
+ }
5326
+ var DEFAULT_WEIGHT = 0.5;
5327
+ function scoreByHealth(snapshot, skillIndex) {
5328
+ const activeSignals = new Set(snapshot.signals);
5329
+ const results = [];
5330
+ for (const [skillName, entry] of skillIndex) {
5331
+ const softAddresses = entry.addresses.filter((a) => !a.hard);
5332
+ const contributions = [];
5333
+ const triggeredBy = [];
5334
+ const reasons = [];
5335
+ for (const addr of softAddresses) {
5336
+ if (!activeSignals.has(addr.signal)) continue;
5337
+ const weight = addr.weight ?? DEFAULT_WEIGHT;
5338
+ if (addr.metric && addr.threshold !== void 0) {
5339
+ const actual = resolveMetricValue(snapshot.metrics, addr.metric);
5340
+ if (actual === null) continue;
5341
+ const distance = clamp((actual - addr.threshold) / addr.threshold, 0, 1);
5342
+ const contribution = weight * distance;
5343
+ contributions.push(contribution);
5344
+ triggeredBy.push(addr.signal);
5345
+ reasons.push(
5346
+ `${addr.metric} = ${actual} (threshold ${addr.threshold}, distance ${distance.toFixed(2)})`
5347
+ );
5348
+ } else {
5349
+ contributions.push(weight);
5350
+ triggeredBy.push(addr.signal);
5351
+ reasons.push(`Signal '${addr.signal}' is active (weight ${weight})`);
5352
+ }
5353
+ }
5354
+ if (contributions.length === 0) continue;
5355
+ const score = clamp(contributions.reduce((sum, c) => sum + c, 0) / contributions.length, 0, 1);
5356
+ const urgency = score >= 0.7 ? "recommended" : "nice-to-have";
5357
+ results.push({
5358
+ skillName,
5359
+ score: Math.round(score * 1e3) / 1e3,
5360
+ // round to 3 decimal places
5361
+ urgency,
5362
+ reasons,
5363
+ sequence: 0,
5364
+ triggeredBy: [...new Set(triggeredBy)]
5365
+ });
5366
+ }
5367
+ return results;
5368
+ }
5369
+ var DIAGNOSTIC_KEYWORDS = ["health", "detect", "analyze", "audit", "hotspot", "debugging"];
5370
+ var FIX_KEYWORDS = ["enforce", "cleanup", "fix", "refactor", "codebase"];
5371
+ var VALIDATION_KEYWORDS = ["verify", "test", "tdd", "review", "soundness", "integrity"];
5372
+ function classifyPhase(skillName) {
5373
+ const lower = skillName.toLowerCase();
5374
+ if (DIAGNOSTIC_KEYWORDS.some((kw) => lower.includes(kw))) return 0;
5375
+ if (FIX_KEYWORDS.some((kw) => lower.includes(kw))) return 1;
5376
+ if (VALIDATION_KEYWORDS.some((kw) => lower.includes(kw))) return 2;
5377
+ return 3;
5378
+ }
5379
+ function heuristicComparator(recMap) {
5380
+ return (a, b) => {
5381
+ const phaseA = classifyPhase(a);
5382
+ const phaseB = classifyPhase(b);
5383
+ if (phaseA !== phaseB) return phaseA - phaseB;
5384
+ return (recMap.get(b)?.score ?? 0) - (recMap.get(a)?.score ?? 0);
5385
+ };
5386
+ }
5387
+ function buildDepGraph(nameSet, skillDeps) {
5388
+ const inDegree = /* @__PURE__ */ new Map();
5389
+ const adjacency = /* @__PURE__ */ new Map();
5390
+ for (const name of nameSet) {
5391
+ inDegree.set(name, 0);
5392
+ adjacency.set(name, []);
5393
+ }
5394
+ for (const name of nameSet) {
5395
+ for (const dep of skillDeps.get(name) ?? []) {
5396
+ if (!nameSet.has(dep)) continue;
5397
+ adjacency.get(dep).push(name);
5398
+ inDegree.set(name, (inDegree.get(name) ?? 0) + 1);
5399
+ }
5400
+ }
5401
+ return { inDegree, adjacency };
5402
+ }
5403
+ function sequenceRecommendations(recommendations, skillDeps) {
5404
+ if (recommendations.length === 0) return [];
5405
+ const nameSet = new Set(recommendations.map((r) => r.skillName));
5406
+ const recMap = new Map(recommendations.map((r) => [r.skillName, r]));
5407
+ const compare = heuristicComparator(recMap);
5408
+ const { inDegree, adjacency } = buildDepGraph(nameSet, skillDeps);
5409
+ const sorted = [];
5410
+ let sequence = 1;
5411
+ let queue = [...nameSet].filter((n) => (inDegree.get(n) ?? 0) === 0).sort(compare);
5412
+ while (queue.length > 0) {
5413
+ const nextQueue = [];
5414
+ for (const name of queue) {
5415
+ const rec = recMap.get(name);
5416
+ rec.sequence = sequence++;
5417
+ sorted.push(rec);
5418
+ for (const dependent of adjacency.get(name) ?? []) {
5419
+ const newDeg = (inDegree.get(dependent) ?? 1) - 1;
5420
+ inDegree.set(dependent, newDeg);
5421
+ if (newDeg === 0) nextQueue.push(dependent);
5422
+ }
5423
+ }
5424
+ queue = nextQueue.sort(compare);
5425
+ }
5426
+ return sorted;
5427
+ }
5428
+ function recommend(snapshot, skills, options = {}) {
5429
+ const top = options.top ?? 5;
5430
+ if (snapshot.signals.length === 0) {
5431
+ return {
5432
+ recommendations: [],
5433
+ snapshotAge: "none",
5434
+ sequenceReasoning: "No active signals detected in health snapshot."
5435
+ };
5436
+ }
5437
+ const addressIndex = buildSkillAddressIndex(skills);
5438
+ const hardRecs = matchHardRules(snapshot, addressIndex);
5439
+ const softRecs = scoreByHealth(snapshot, addressIndex);
5440
+ const hardSkills = new Set(hardRecs.map((r) => r.skillName));
5441
+ const merged = [...hardRecs, ...softRecs.filter((r) => !hardSkills.has(r.skillName))];
5442
+ merged.sort((a, b) => b.score - a.score);
5443
+ const limited = merged.slice(0, top);
5444
+ const depMap = /* @__PURE__ */ new Map();
5445
+ for (const [name, entry] of addressIndex) {
5446
+ depMap.set(name, entry.dependsOn);
5447
+ }
5448
+ const sequenced = sequenceRecommendations(limited, depMap);
5449
+ const criticalCount = sequenced.filter((r) => r.urgency === "critical").length;
5450
+ const phases = sequenced.map((r) => `${r.sequence}. ${r.skillName}`).join(" -> ");
5451
+ const reasoning = criticalCount > 0 ? `${criticalCount} critical issue(s) detected. Sequence: ${phases}. Critical items first, then diagnostic -> fix -> validate heuristic.` : `Sequence: ${phases}. Ordered by dependencies and diagnostic -> fix -> validate heuristic.`;
5452
+ return {
5453
+ recommendations: sequenced,
5454
+ snapshotAge: "fresh",
5455
+ sequenceReasoning: reasoning
5456
+ };
5457
+ }
5458
+
5459
+ // src/skill/dispatch-engine.ts
5460
+ var SIGNAL_CATEGORIES = {
5461
+ "circular-deps": "structure",
5462
+ "layer-violations": "structure",
5463
+ "high-coupling": "structure",
5464
+ "dead-code": "quality",
5465
+ drift: "quality",
5466
+ "doc-gaps": "quality",
5467
+ "security-findings": "security",
5468
+ "perf-regression": "performance",
5469
+ "low-coverage": "coverage"
5470
+ };
5471
+ function getSignalCategory(signal) {
5472
+ return SIGNAL_CATEGORIES[signal] ?? null;
5473
+ }
5474
+ function parseNumstatOutput(output) {
5475
+ const lines = output.trim().split("\n").filter(Boolean);
5476
+ let totalDiffLines = 0;
5477
+ const changedFiles = [];
5478
+ for (const line of lines) {
5479
+ const parts = line.split(" ");
5480
+ if (parts.length < 3) continue;
5481
+ const added = parts[0];
5482
+ const deleted = parts[1];
5483
+ const file = parts[2];
5484
+ changedFiles.push(file);
5485
+ if (added !== "-") totalDiffLines += parseInt(added, 10) || 0;
5486
+ if (deleted !== "-") totalDiffLines += parseInt(deleted, 10) || 0;
5487
+ }
5488
+ return { totalDiffLines, changedFiles };
5489
+ }
5490
+ function parseNewFilesOutput(output) {
5491
+ return output.trim().split("\n").filter(Boolean);
5492
+ }
5493
+ function getLatestCommitMessage(projectPath) {
5494
+ try {
5495
+ return execSync2("git log -1 --format=%s", {
5496
+ cwd: projectPath,
5497
+ encoding: "utf-8",
5498
+ stdio: ["pipe", "pipe", "pipe"]
5499
+ }).trim();
5500
+ } catch {
5501
+ return "";
5502
+ }
5503
+ }
5504
+ function gitExec(cmd, cwd) {
5505
+ try {
5506
+ return execSync2(cmd, { cwd, encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] });
5507
+ } catch {
5508
+ return null;
5509
+ }
5510
+ }
5511
+ function emptyDiffInfo() {
5512
+ return {
5513
+ changedFiles: [],
5514
+ newFiles: [],
5515
+ deletedFiles: [],
5516
+ totalDiffLines: 0,
5517
+ fileDiffs: /* @__PURE__ */ new Map()
5518
+ };
5519
+ }
5520
+ function buildDiffInfoFromGit(projectPath) {
5521
+ if (gitExec("git rev-parse --git-dir", projectPath) === null) return null;
5522
+ const numstatOutput = gitExec("git diff --numstat HEAD", projectPath);
5523
+ if (numstatOutput === null) return emptyDiffInfo();
5524
+ const { totalDiffLines, changedFiles } = parseNumstatOutput(numstatOutput);
5525
+ const newFiles = parseNewFilesOutput(
5526
+ gitExec("git diff --diff-filter=A --name-only HEAD", projectPath) ?? ""
5527
+ );
5528
+ const deletedFiles = parseNewFilesOutput(
5529
+ gitExec("git diff --diff-filter=D --name-only HEAD", projectPath) ?? ""
5530
+ );
5531
+ return { changedFiles, newFiles, deletedFiles, totalDiffLines, fileDiffs: /* @__PURE__ */ new Map() };
5532
+ }
5533
+ async function enrichSnapshotForDispatch(projectPath, options) {
5534
+ let snapshot = null;
5535
+ let snapshotFreshness = "fresh";
5536
+ if (!options.fresh) {
5537
+ snapshot = loadCachedSnapshot(projectPath);
5538
+ if (snapshot && isSnapshotFresh(snapshot, projectPath)) {
5539
+ snapshotFreshness = "cached";
5540
+ } else {
5541
+ snapshot = null;
5542
+ }
5543
+ }
5544
+ if (!snapshot) {
5545
+ snapshot = await captureHealthSnapshot(projectPath);
5546
+ snapshotFreshness = "fresh";
5547
+ }
5548
+ const commitMessage = options.commitMessage ?? "";
5549
+ const files = options.files ?? [];
5550
+ const diff = {
5551
+ changedFiles: files,
5552
+ newFiles: [],
5553
+ deletedFiles: [],
5554
+ totalDiffLines: 0,
5555
+ fileDiffs: /* @__PURE__ */ new Map()
5556
+ };
5557
+ const changeType = detectChangeType(commitMessage, diff);
5558
+ const domains = detectDomainsFromFiles(files);
5559
+ const changeSignal = `change-${changeType}`;
5560
+ const domainSignals = domains.map((d) => `domain-${d}`);
5561
+ const allSignals = [...snapshot.signals, changeSignal, ...domainSignals];
5562
+ return {
5563
+ snapshot,
5564
+ changeType,
5565
+ changedFiles: files,
5566
+ domains,
5567
+ allSignals,
5568
+ snapshotFreshness
5569
+ };
5570
+ }
5571
+ function computeEstimatedImpact(rec) {
5572
+ if (rec.urgency === "critical") return "high";
5573
+ if (rec.score >= 0.7) return "medium";
5574
+ return "low";
5575
+ }
5576
+ function computeParallelSafe(prevTriggeredBy, currTriggeredBy) {
5577
+ if (prevTriggeredBy.length === 0) return true;
5578
+ const prevCategories = /* @__PURE__ */ new Set();
5579
+ const currCategories = /* @__PURE__ */ new Set();
5580
+ let prevHasCategory = false;
5581
+ let currHasCategory = false;
5582
+ for (const sig of prevTriggeredBy) {
5583
+ const cat = getSignalCategory(sig);
5584
+ if (cat) {
5585
+ prevCategories.add(cat);
5586
+ prevHasCategory = true;
5587
+ }
5588
+ }
5589
+ for (const sig of currTriggeredBy) {
5590
+ const cat = getSignalCategory(sig);
5591
+ if (cat) {
5592
+ currCategories.add(cat);
5593
+ currHasCategory = true;
5594
+ }
5595
+ }
5596
+ if (!prevHasCategory || !currHasCategory) return false;
5597
+ for (const cat of currCategories) {
5598
+ if (prevCategories.has(cat)) return false;
5599
+ }
5600
+ return true;
5601
+ }
5602
+ function dispatchSkills(context, options = {}) {
5603
+ const { snapshot, changeType, domains, allSignals } = context;
5604
+ const limit = options.limit ?? 5;
5605
+ const enrichedSnapshot = { ...snapshot, signals: allSignals };
5606
+ const recResult = recommend(enrichedSnapshot, {}, { top: limit });
5607
+ const addressIndex = buildSkillAddressIndex({});
5608
+ const skills = recResult.recommendations.map((rec, i) => {
5609
+ const prevRec = i > 0 ? recResult.recommendations[i - 1] : null;
5610
+ const prevTriggeredBy = prevRec?.triggeredBy ?? [];
5611
+ const entry = addressIndex.get(rec.skillName);
5612
+ const dependsOn = entry?.dependsOn?.length ? entry.dependsOn : void 0;
5613
+ const dispatched = {
5614
+ name: rec.skillName,
5615
+ score: rec.score,
5616
+ urgency: rec.urgency,
5617
+ reason: rec.reasons.join("; "),
5618
+ parallelSafe: computeParallelSafe(prevTriggeredBy, rec.triggeredBy),
5619
+ estimatedImpact: computeEstimatedImpact(rec)
5620
+ };
5621
+ if (dependsOn) dispatched.dependsOn = dependsOn;
5622
+ return dispatched;
5623
+ });
5624
+ return {
5625
+ context: {
5626
+ changeType,
5627
+ domains,
5628
+ signalCount: allSignals.length,
5629
+ snapshotFreshness: context.snapshotFreshness
5630
+ },
5631
+ skills,
5632
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString()
5633
+ };
5634
+ }
5635
+ async function dispatchSkillsFromGit(projectPath, options = {}) {
5636
+ const diffInfo = buildDiffInfoFromGit(projectPath);
5637
+ if (diffInfo === null) {
5638
+ throw new Error("dispatch_skills requires a git repository");
5639
+ }
5640
+ if (diffInfo.changedFiles.length === 0) {
5641
+ const commitMessage2 = getLatestCommitMessage(projectPath);
5642
+ const changeType = commitMessage2 ? detectChangeType(commitMessage2, diffInfo) : "feature";
5643
+ return {
5644
+ context: { changeType, domains: [], signalCount: 0, snapshotFreshness: "cached" },
5645
+ skills: [],
5646
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString()
5647
+ };
5648
+ }
5649
+ const commitMessage = getLatestCommitMessage(projectPath);
5650
+ const files = diffInfo.changedFiles;
5651
+ const enrichOpts = { files };
5652
+ if (commitMessage) enrichOpts.commitMessage = commitMessage;
5653
+ if (options.fresh) enrichOpts.fresh = options.fresh;
5654
+ const ctx = await enrichSnapshotForDispatch(projectPath, enrichOpts);
5655
+ const dispatchOpts = {};
5656
+ if (options.limit !== void 0) dispatchOpts.limit = options.limit;
5657
+ return dispatchSkills(ctx, dispatchOpts);
5658
+ }
5659
+
5660
+ // src/mcp/tools/dispatch-skills.ts
5661
+ var dispatchSkillsDefinition = {
5662
+ name: "dispatch_skills",
5663
+ description: "Recommend an optimal skill sequence based on what changed in the codebase. Combines health signals with change-type and domain detection from git diffs. Returns an annotated sequence with parallel-safe flags, estimated impact, and dependency info.",
5664
+ inputSchema: {
5665
+ type: "object",
5666
+ properties: {
5667
+ path: {
5668
+ type: "string",
5669
+ description: "Project root path (defaults to cwd)"
5670
+ },
5671
+ files: {
5672
+ type: "array",
5673
+ items: { type: "string" },
5674
+ description: "Changed file paths (auto-detected from git diff if omitted)"
5675
+ },
5676
+ commitMessage: {
5677
+ type: "string",
5678
+ description: "Commit message for change-type detection (auto-detected from git log if omitted)"
5679
+ },
5680
+ fresh: {
5681
+ type: "boolean",
5682
+ description: "Force a fresh health snapshot capture (default: false, uses cached)"
5683
+ },
5684
+ limit: {
5685
+ type: "number",
5686
+ description: "Maximum number of skills to return (default: 5)"
5687
+ }
5688
+ },
5689
+ required: []
5690
+ }
5691
+ };
5692
+ function buildEnrichOpts(files, commitMessage, fresh) {
5693
+ const opts = {};
5694
+ if (files) opts.files = files;
5695
+ if (commitMessage) opts.commitMessage = commitMessage;
5696
+ if (fresh) opts.fresh = fresh;
5697
+ return opts;
5698
+ }
5699
+ async function dispatchWithExplicitInput(projectRoot, files, commitMessage, fresh, limit) {
5700
+ const ctx = await enrichSnapshotForDispatch(
5701
+ projectRoot,
5702
+ buildEnrichOpts(files, commitMessage, fresh)
5703
+ );
5704
+ const dispatchOpts = {};
5705
+ if (limit !== 5) dispatchOpts.limit = limit;
5706
+ return dispatchSkills(ctx, dispatchOpts);
5707
+ }
5708
+ async function dispatchFromGit(projectRoot, fresh, limit) {
5709
+ const opts = {};
5710
+ if (fresh) opts.fresh = fresh;
5711
+ if (limit !== 5) opts.limit = limit;
5712
+ return dispatchSkillsFromGit(projectRoot, opts);
5713
+ }
5714
+ async function handleDispatchSkills(input) {
5715
+ const projectRoot = input.path || process.cwd();
5716
+ const files = input.files;
5717
+ const commitMessage = input.commitMessage;
5718
+ const fresh = input.fresh ?? false;
5719
+ const limit = input.limit ?? 5;
5720
+ try {
5721
+ const hasExplicitInput = files !== void 0 || commitMessage !== void 0;
5722
+ const result = hasExplicitInput ? await dispatchWithExplicitInput(projectRoot, files, commitMessage, fresh, limit) : await dispatchFromGit(projectRoot, fresh, limit);
5723
+ if (result.skills.length > limit) {
5724
+ result.skills = result.skills.slice(0, limit);
5725
+ }
5726
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
5727
+ } catch (error) {
5728
+ const message = error instanceof Error ? error.message : "Unknown dispatch error";
5729
+ return { content: [{ type: "text", text: JSON.stringify({ error: message }, null, 2) }] };
5730
+ }
5731
+ }
5732
+
5733
+ // src/mcp/tools/decay-trends.ts
5734
+ var getDecayTrendsDefinition = {
5735
+ name: "get_decay_trends",
5736
+ description: 'Get architecture decay trends over time. Returns stability score history and per-category trend analysis from timeline snapshots. Use to answer questions like "is the architecture decaying?" or "which metrics are getting worse?"',
5737
+ inputSchema: {
5738
+ type: "object",
5739
+ properties: {
5740
+ path: { type: "string", description: "Path to project root" },
5741
+ last: {
5742
+ type: "number",
5743
+ description: "Number of recent snapshots to analyze (default: 10)"
5744
+ },
5745
+ since: {
5746
+ type: "string",
5747
+ description: "Show trends since this ISO date (e.g., 2026-01-01)"
5748
+ },
5749
+ category: {
5750
+ type: "string",
5751
+ description: "Filter to a single metric category",
5752
+ enum: [
5753
+ "circular-deps",
5754
+ "layer-violations",
5755
+ "complexity",
5756
+ "coupling",
5757
+ "forbidden-imports",
5758
+ "module-size",
5759
+ "dependency-depth"
5760
+ ]
5761
+ }
5762
+ },
5763
+ required: ["path"]
5764
+ }
5765
+ };
5766
+ async function handleGetDecayTrends(input) {
5767
+ let projectPath;
5768
+ try {
5769
+ projectPath = sanitizePath(input.path);
5770
+ } catch (error) {
5771
+ return {
5772
+ content: [
5773
+ {
5774
+ type: "text",
5775
+ text: `Error: ${error instanceof Error ? error.message : String(error)}`
5776
+ }
5777
+ ],
5778
+ isError: true
5779
+ };
5780
+ }
5781
+ try {
5782
+ const core = await import("./dist-MKWF5CXR.js");
5783
+ const { TimelineManager } = core;
5784
+ const manager = new TimelineManager(projectPath);
5785
+ const timeline = manager.load();
5786
+ if (timeline.snapshots.length === 0) {
5098
5787
  return {
5099
5788
  content: [
5100
5789
  {
@@ -5195,7 +5884,7 @@ async function handleCodeOutline(input) {
5195
5884
  };
5196
5885
  }
5197
5886
  try {
5198
- const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-YIKUBJLQ.js");
5887
+ const { getOutline, formatOutline, EXTENSION_MAP } = await import("./dist-MKWF5CXR.js");
5199
5888
  const { stat } = await import("fs/promises");
5200
5889
  const stats = await stat(targetPath).catch(() => null);
5201
5890
  if (stats?.isFile()) {
@@ -5275,7 +5964,7 @@ async function handleCodeSearch(input) {
5275
5964
  };
5276
5965
  }
5277
5966
  try {
5278
- const { searchSymbols } = await import("./dist-YIKUBJLQ.js");
5967
+ const { searchSymbols } = await import("./dist-MKWF5CXR.js");
5279
5968
  const result = await searchSymbols(input.query, directory, input.glob);
5280
5969
  const lines = [`Search: "${result.query}" \u2014 ${result.matches.length} matches`];
5281
5970
  for (const match of result.matches) {
@@ -5344,7 +6033,7 @@ async function handleCodeUnfold(input) {
5344
6033
  }
5345
6034
  try {
5346
6035
  if (input.symbol) {
5347
- const { unfoldSymbol } = await import("./dist-YIKUBJLQ.js");
6036
+ const { unfoldSymbol } = await import("./dist-MKWF5CXR.js");
5348
6037
  const result = await unfoldSymbol(filePath, input.symbol);
5349
6038
  const header = result.warning ? `${result.file}:${result.startLine}-${result.endLine} ${result.warning}
5350
6039
  ` : `${result.file}:${result.startLine}-${result.endLine}
@@ -5352,7 +6041,7 @@ async function handleCodeUnfold(input) {
5352
6041
  return { content: [{ type: "text", text: header + result.content }] };
5353
6042
  }
5354
6043
  if (input.startLine != null && input.endLine != null) {
5355
- const { unfoldRange } = await import("./dist-YIKUBJLQ.js");
6044
+ const { unfoldRange } = await import("./dist-MKWF5CXR.js");
5356
6045
  const result = await unfoldRange(filePath, input.startLine, input.endLine);
5357
6046
  const header = `${result.file}:${result.startLine}-${result.endLine}
5358
6047
  `;
@@ -5414,7 +6103,7 @@ async function handleCheckTraceability(input) {
5414
6103
  isError: true
5415
6104
  };
5416
6105
  }
5417
- const { queryTraceability } = await import("./dist-OEXTQQZC.js");
6106
+ const { queryTraceability } = await import("./dist-WU3TVNNG.js");
5418
6107
  const options = {};
5419
6108
  if (input.spec) options.specPath = input.spec;
5420
6109
  if (input.feature) options.featureName = input.feature;
@@ -5537,7 +6226,7 @@ async function handlePredictFailures(input) {
5537
6226
  };
5538
6227
  }
5539
6228
  try {
5540
- const core = await import("./dist-YIKUBJLQ.js");
6229
+ const core = await import("./dist-MKWF5CXR.js");
5541
6230
  const { TimelineManager, PredictionEngine, SpecImpactEstimator } = core;
5542
6231
  const manager = new TimelineManager(projectPath);
5543
6232
  const includeRoadmap = input.includeRoadmap !== false;
@@ -5570,250 +6259,6 @@ async function handlePredictFailures(input) {
5570
6259
  }
5571
6260
  }
5572
6261
 
5573
- // src/skill/recommendation-rules.ts
5574
- var FALLBACK_RULES = {
5575
- "enforce-architecture": [
5576
- { signal: "circular-deps", hard: true },
5577
- { signal: "layer-violations", hard: true },
5578
- { signal: "high-coupling", metric: "fanOut", threshold: 20, weight: 0.8 },
5579
- { signal: "high-coupling", metric: "couplingRatio", threshold: 0.7, weight: 0.6 }
5580
- ],
5581
- "dependency-health": [
5582
- { signal: "high-coupling", metric: "fanOut", threshold: 15, weight: 0.7 },
5583
- { signal: "anomaly-outlier", weight: 0.6 },
5584
- { signal: "articulation-point", weight: 0.5 }
5585
- ],
5586
- tdd: [{ signal: "low-coverage", weight: 0.9 }],
5587
- "codebase-cleanup": [
5588
- { signal: "dead-code", weight: 0.8 },
5589
- { signal: "drift", weight: 0.6 }
5590
- ],
5591
- "security-scan": [{ signal: "security-findings", hard: true }],
5592
- refactoring: [
5593
- { signal: "high-complexity", metric: "cyclomaticComplexity", threshold: 15, weight: 0.8 },
5594
- { signal: "high-coupling", metric: "couplingRatio", threshold: 0.5, weight: 0.6 }
5595
- ],
5596
- "detect-doc-drift": [
5597
- { signal: "doc-gaps", weight: 0.7 },
5598
- { signal: "drift", weight: 0.5 }
5599
- ],
5600
- perf: [{ signal: "perf-regression", weight: 0.8 }],
5601
- "supply-chain-audit": [{ signal: "security-findings", weight: 0.6 }],
5602
- "code-review": [
5603
- { signal: "high-complexity", weight: 0.5 },
5604
- { signal: "high-coupling", weight: 0.4 }
5605
- ],
5606
- integrity: [
5607
- { signal: "drift", weight: 0.7 },
5608
- { signal: "dead-code", weight: 0.5 }
5609
- ],
5610
- "soundness-review": [
5611
- { signal: "layer-violations", weight: 0.6 },
5612
- { signal: "circular-deps", weight: 0.5 }
5613
- ],
5614
- debugging: [
5615
- { signal: "perf-regression", weight: 0.5 },
5616
- { signal: "anomaly-outlier", weight: 0.6 }
5617
- ],
5618
- "hotspot-detector": [
5619
- { signal: "high-complexity", metric: "cyclomaticComplexity", threshold: 20, weight: 0.9 },
5620
- { signal: "anomaly-outlier", weight: 0.7 },
5621
- { signal: "articulation-point", weight: 0.8 }
5622
- ],
5623
- "cleanup-dead-code": [{ signal: "dead-code", hard: true }]
5624
- };
5625
-
5626
- // src/skill/recommendation-engine.ts
5627
- function resolveMetricValue(metrics, metricName) {
5628
- switch (metricName) {
5629
- case "fanOut":
5630
- return metrics.maxFanOut;
5631
- case "couplingRatio":
5632
- return metrics.avgCouplingRatio;
5633
- case "cyclomaticComplexity":
5634
- return metrics.maxCyclomaticComplexity;
5635
- case "coverage":
5636
- return metrics.testCoverage !== null ? 100 - metrics.testCoverage : null;
5637
- default:
5638
- return null;
5639
- }
5640
- }
5641
- function buildSkillAddressIndex(skills) {
5642
- const index = /* @__PURE__ */ new Map();
5643
- for (const [name, entry] of Object.entries(skills)) {
5644
- const addresses = entry.addresses.length > 0 ? entry.addresses : FALLBACK_RULES[name] ?? [];
5645
- index.set(name, { addresses, dependsOn: entry.dependsOn });
5646
- }
5647
- for (const [name, addresses] of Object.entries(FALLBACK_RULES)) {
5648
- if (!index.has(name)) {
5649
- index.set(name, { addresses, dependsOn: [] });
5650
- }
5651
- }
5652
- return index;
5653
- }
5654
- function matchHardRules(snapshot, skillIndex) {
5655
- const activeSignals = new Set(snapshot.signals);
5656
- const results = [];
5657
- for (const [skillName, entry] of skillIndex) {
5658
- const hardAddresses = entry.addresses.filter((a) => a.hard === true);
5659
- const matchedSignals = [];
5660
- const reasons = [];
5661
- for (const addr of hardAddresses) {
5662
- if (activeSignals.has(addr.signal)) {
5663
- matchedSignals.push(addr.signal);
5664
- reasons.push(`[CRITICAL] Signal '${addr.signal}' is active`);
5665
- }
5666
- }
5667
- if (matchedSignals.length > 0) {
5668
- results.push({
5669
- skillName,
5670
- score: 1,
5671
- urgency: "critical",
5672
- reasons,
5673
- sequence: 0,
5674
- // assigned later by sequencer
5675
- triggeredBy: matchedSignals
5676
- });
5677
- }
5678
- }
5679
- return results;
5680
- }
5681
- function clamp(value, min, max) {
5682
- return Math.min(Math.max(value, min), max);
5683
- }
5684
- var DEFAULT_WEIGHT = 0.5;
5685
- function scoreByHealth(snapshot, skillIndex) {
5686
- const activeSignals = new Set(snapshot.signals);
5687
- const results = [];
5688
- for (const [skillName, entry] of skillIndex) {
5689
- const softAddresses = entry.addresses.filter((a) => !a.hard);
5690
- const contributions = [];
5691
- const triggeredBy = [];
5692
- const reasons = [];
5693
- for (const addr of softAddresses) {
5694
- if (!activeSignals.has(addr.signal)) continue;
5695
- const weight = addr.weight ?? DEFAULT_WEIGHT;
5696
- if (addr.metric && addr.threshold !== void 0) {
5697
- const actual = resolveMetricValue(snapshot.metrics, addr.metric);
5698
- if (actual === null) continue;
5699
- const distance = clamp((actual - addr.threshold) / addr.threshold, 0, 1);
5700
- const contribution = weight * distance;
5701
- contributions.push(contribution);
5702
- triggeredBy.push(addr.signal);
5703
- reasons.push(
5704
- `${addr.metric} = ${actual} (threshold ${addr.threshold}, distance ${distance.toFixed(2)})`
5705
- );
5706
- } else {
5707
- contributions.push(weight);
5708
- triggeredBy.push(addr.signal);
5709
- reasons.push(`Signal '${addr.signal}' is active (weight ${weight})`);
5710
- }
5711
- }
5712
- if (contributions.length === 0) continue;
5713
- const score = clamp(contributions.reduce((sum, c) => sum + c, 0) / contributions.length, 0, 1);
5714
- const urgency = score >= 0.7 ? "recommended" : "nice-to-have";
5715
- results.push({
5716
- skillName,
5717
- score: Math.round(score * 1e3) / 1e3,
5718
- // round to 3 decimal places
5719
- urgency,
5720
- reasons,
5721
- sequence: 0,
5722
- triggeredBy: [...new Set(triggeredBy)]
5723
- });
5724
- }
5725
- return results;
5726
- }
5727
- var DIAGNOSTIC_KEYWORDS = ["health", "detect", "analyze", "audit", "hotspot", "debugging"];
5728
- var FIX_KEYWORDS = ["enforce", "cleanup", "fix", "refactor", "codebase"];
5729
- var VALIDATION_KEYWORDS = ["verify", "test", "tdd", "review", "soundness", "integrity"];
5730
- function classifyPhase(skillName) {
5731
- const lower = skillName.toLowerCase();
5732
- if (DIAGNOSTIC_KEYWORDS.some((kw) => lower.includes(kw))) return 0;
5733
- if (FIX_KEYWORDS.some((kw) => lower.includes(kw))) return 1;
5734
- if (VALIDATION_KEYWORDS.some((kw) => lower.includes(kw))) return 2;
5735
- return 3;
5736
- }
5737
- function heuristicComparator(recMap) {
5738
- return (a, b) => {
5739
- const phaseA = classifyPhase(a);
5740
- const phaseB = classifyPhase(b);
5741
- if (phaseA !== phaseB) return phaseA - phaseB;
5742
- return (recMap.get(b)?.score ?? 0) - (recMap.get(a)?.score ?? 0);
5743
- };
5744
- }
5745
- function buildDepGraph(nameSet, skillDeps) {
5746
- const inDegree = /* @__PURE__ */ new Map();
5747
- const adjacency = /* @__PURE__ */ new Map();
5748
- for (const name of nameSet) {
5749
- inDegree.set(name, 0);
5750
- adjacency.set(name, []);
5751
- }
5752
- for (const name of nameSet) {
5753
- for (const dep of skillDeps.get(name) ?? []) {
5754
- if (!nameSet.has(dep)) continue;
5755
- adjacency.get(dep).push(name);
5756
- inDegree.set(name, (inDegree.get(name) ?? 0) + 1);
5757
- }
5758
- }
5759
- return { inDegree, adjacency };
5760
- }
5761
- function sequenceRecommendations(recommendations, skillDeps) {
5762
- if (recommendations.length === 0) return [];
5763
- const nameSet = new Set(recommendations.map((r) => r.skillName));
5764
- const recMap = new Map(recommendations.map((r) => [r.skillName, r]));
5765
- const compare = heuristicComparator(recMap);
5766
- const { inDegree, adjacency } = buildDepGraph(nameSet, skillDeps);
5767
- const sorted = [];
5768
- let sequence = 1;
5769
- let queue = [...nameSet].filter((n) => (inDegree.get(n) ?? 0) === 0).sort(compare);
5770
- while (queue.length > 0) {
5771
- const nextQueue = [];
5772
- for (const name of queue) {
5773
- const rec = recMap.get(name);
5774
- rec.sequence = sequence++;
5775
- sorted.push(rec);
5776
- for (const dependent of adjacency.get(name) ?? []) {
5777
- const newDeg = (inDegree.get(dependent) ?? 1) - 1;
5778
- inDegree.set(dependent, newDeg);
5779
- if (newDeg === 0) nextQueue.push(dependent);
5780
- }
5781
- }
5782
- queue = nextQueue.sort(compare);
5783
- }
5784
- return sorted;
5785
- }
5786
- function recommend(snapshot, skills, options = {}) {
5787
- const top = options.top ?? 5;
5788
- if (snapshot.signals.length === 0) {
5789
- return {
5790
- recommendations: [],
5791
- snapshotAge: "none",
5792
- sequenceReasoning: "No active signals detected in health snapshot."
5793
- };
5794
- }
5795
- const addressIndex = buildSkillAddressIndex(skills);
5796
- const hardRecs = matchHardRules(snapshot, addressIndex);
5797
- const softRecs = scoreByHealth(snapshot, addressIndex);
5798
- const hardSkills = new Set(hardRecs.map((r) => r.skillName));
5799
- const merged = [...hardRecs, ...softRecs.filter((r) => !hardSkills.has(r.skillName))];
5800
- merged.sort((a, b) => b.score - a.score);
5801
- const limited = merged.slice(0, top);
5802
- const depMap = /* @__PURE__ */ new Map();
5803
- for (const [name, entry] of addressIndex) {
5804
- depMap.set(name, entry.dependsOn);
5805
- }
5806
- const sequenced = sequenceRecommendations(limited, depMap);
5807
- const criticalCount = sequenced.filter((r) => r.urgency === "critical").length;
5808
- const phases = sequenced.map((r) => `${r.sequence}. ${r.skillName}`).join(" -> ");
5809
- const reasoning = criticalCount > 0 ? `${criticalCount} critical issue(s) detected. Sequence: ${phases}. Critical items first, then diagnostic -> fix -> validate heuristic.` : `Sequence: ${phases}. Ordered by dependencies and diagnostic -> fix -> validate heuristic.`;
5810
- return {
5811
- recommendations: sequenced,
5812
- snapshotAge: "fresh",
5813
- sequenceReasoning: reasoning
5814
- };
5815
- }
5816
-
5817
6262
  // src/mcp/tools/recommend-skills.ts
5818
6263
  var recommendSkillsDefinition = {
5819
6264
  name: "recommend_skills",
@@ -5929,7 +6374,9 @@ var TOOL_DEFINITIONS = [
5929
6374
  getDecayTrendsDefinition,
5930
6375
  checkTraceabilityDefinition,
5931
6376
  predictFailuresDefinition,
5932
- recommendSkillsDefinition
6377
+ recommendSkillsDefinition,
6378
+ computeBlastRadiusDefinition,
6379
+ dispatchSkillsDefinition
5933
6380
  ].map((def) => ({ ...def, trustedOutput: true }));
5934
6381
  var TOOL_HANDLERS = {
5935
6382
  validate_project: handleValidateProject,
@@ -5984,7 +6431,9 @@ var TOOL_HANDLERS = {
5984
6431
  get_decay_trends: handleGetDecayTrends,
5985
6432
  check_traceability: handleCheckTraceability,
5986
6433
  predict_failures: handlePredictFailures,
5987
- recommend_skills: handleRecommendSkills
6434
+ recommend_skills: handleRecommendSkills,
6435
+ compute_blast_radius: handleComputeBlastRadius,
6436
+ dispatch_skills: handleDispatchSkills
5988
6437
  };
5989
6438
  var RESOURCE_DEFINITIONS = [
5990
6439
  {
@@ -6070,7 +6519,7 @@ async function appendUpdateNotification(result, resolvedRoot) {
6070
6519
  shouldRunCheck,
6071
6520
  readCheckState,
6072
6521
  spawnBackgroundCheck
6073
- } = await import("./dist-YIKUBJLQ.js");
6522
+ } = await import("./dist-MKWF5CXR.js");
6074
6523
  const { CLI_VERSION } = await import("./version-KFFPOQAX.js");
6075
6524
  const configInterval = readConfigInterval(resolvedRoot);
6076
6525
  const DEFAULT_INTERVAL = 864e5;
@@ -6147,17 +6596,18 @@ async function startServer(toolFilter) {
6147
6596
  }
6148
6597
 
6149
6598
  export {
6150
- persistToolingConfig,
6151
- appendFrameworkAgents,
6152
6599
  generateSlashCommands,
6153
6600
  handleOrphanDeletion,
6154
6601
  createGenerateSlashCommandsCommand,
6155
- loadOrRebuildIndex,
6156
6602
  handleGetImpact,
6603
+ persistToolingConfig,
6604
+ appendFrameworkAgents,
6605
+ loadOrRebuildIndex,
6157
6606
  isSnapshotFresh,
6158
6607
  loadCachedSnapshot,
6159
6608
  captureHealthSnapshot,
6160
6609
  recommend,
6610
+ dispatchSkillsFromGit,
6161
6611
  getToolDefinitions,
6162
6612
  createHarnessServer,
6163
6613
  startServer