opencode-matrixx-v2 0.0.0-stage → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1102) hide show
  1. package/LICENSE.md +82 -0
  2. package/README.md +205 -2
  3. package/dist/agents/agent-builder.d.ts +28 -0
  4. package/dist/agents/agent-config.d.ts +46 -0
  5. package/dist/agents/agents.transform.d.ts +67 -0
  6. package/dist/agents/builtin-agents/agent-overrides.d.ts +12 -0
  7. package/dist/agents/builtin-agents/available-skills.d.ts +4 -0
  8. package/dist/agents/builtin-agents/general-agents.d.ts +21 -0
  9. package/dist/agents/builtin-agents/keymaker-agent.d.ts +20 -0
  10. package/dist/agents/builtin-agents/model-resolution.d.ts +25 -0
  11. package/dist/agents/builtin-agents/morpheus-agent.d.ts +22 -0
  12. package/dist/agents/builtin-agents/niobe-agent.d.ts +19 -0
  13. package/dist/agents/builtin-agents/resolve-file-uri.d.ts +1 -0
  14. package/dist/agents/builtin-agents.d.ts +5 -0
  15. package/dist/agents/cipher.d.ts +7 -0
  16. package/dist/agents/construct.d.ts +7 -0
  17. package/dist/agents/custom-agent-summaries.d.ts +8 -0
  18. package/dist/agents/dynamic-agent-prompt-builder.d.ts +54 -0
  19. package/dist/agents/env-context.d.ts +7 -0
  20. package/dist/agents/index.d.ts +14 -0
  21. package/dist/agents/keymaker.d.ts +6 -0
  22. package/dist/agents/merovingian.d.ts +8 -0
  23. package/dist/agents/model-directives.d.ts +7 -0
  24. package/dist/agents/morpheus.d.ts +6 -0
  25. package/dist/agents/mouse/agent.d.ts +32 -0
  26. package/dist/agents/mouse/deepseek.d.ts +16 -0
  27. package/dist/agents/mouse/default.d.ts +9 -0
  28. package/dist/agents/mouse/gpt.d.ts +18 -0
  29. package/dist/agents/mouse/index.d.ts +7 -0
  30. package/dist/agents/mouse/mimo.d.ts +15 -0
  31. package/dist/agents/mouse/qwen.d.ts +16 -0
  32. package/dist/agents/mouse/shared.d.ts +7 -0
  33. package/dist/agents/niobe/agent.d.ts +34 -0
  34. package/dist/agents/niobe/default.d.ts +11 -0
  35. package/dist/agents/niobe/gpt.d.ts +19 -0
  36. package/dist/agents/niobe/index.d.ts +6 -0
  37. package/dist/agents/niobe/prompt-section-builder.d.ts +13 -0
  38. package/dist/agents/operator.d.ts +7 -0
  39. package/dist/agents/oracle/behavioral-summary.d.ts +6 -0
  40. package/dist/agents/oracle/high-accuracy-mode.d.ts +25 -0
  41. package/dist/agents/oracle/identity-constraints.d.ts +7 -0
  42. package/dist/agents/oracle/index.d.ts +7 -0
  43. package/dist/agents/oracle/interview-mode.d.ts +7 -0
  44. package/dist/agents/oracle/plan-generation.d.ts +7 -0
  45. package/dist/agents/oracle/plan-template.d.ts +1 -0
  46. package/dist/agents/oracle/system-prompt.d.ts +20 -0
  47. package/dist/agents/sati.d.ts +7 -0
  48. package/dist/agents/sentinel.d.ts +7 -0
  49. package/dist/agents/seraph.d.ts +21 -0
  50. package/dist/agents/smith.d.ts +17 -0
  51. package/dist/agents/trinity.d.ts +7 -0
  52. package/dist/agents/types.d.ts +76 -0
  53. package/dist/cli/doctor/checks/auth.d.ts +2 -0
  54. package/dist/cli/doctor/checks/config.d.ts +2 -0
  55. package/dist/cli/doctor/checks/context-mode.d.ts +30 -0
  56. package/dist/cli/doctor/checks/dcp.d.ts +8 -0
  57. package/dist/cli/doctor/checks/docker.d.ts +2 -0
  58. package/dist/cli/doctor/checks/headroom.d.ts +2 -0
  59. package/dist/cli/doctor/checks/helpers.d.ts +2 -0
  60. package/dist/cli/doctor/checks/index.d.ts +16 -0
  61. package/dist/cli/doctor/checks/mcp.d.ts +2 -0
  62. package/dist/cli/doctor/checks/optional.d.ts +2 -0
  63. package/dist/cli/doctor/checks/plugin.d.ts +2 -0
  64. package/dist/cli/doctor/checks/rtk.d.ts +2 -0
  65. package/dist/cli/doctor/checks/runtime.d.ts +2 -0
  66. package/dist/cli/doctor/checks/tmux.d.ts +2 -0
  67. package/dist/cli/doctor/format.d.ts +3 -0
  68. package/dist/cli/doctor/index.d.ts +9 -0
  69. package/dist/cli/doctor/types.d.ts +24 -0
  70. package/dist/cli/index.d.ts +14 -0
  71. package/dist/cli/install/index.d.ts +12 -0
  72. package/dist/cli/setup/config-writer.d.ts +12 -0
  73. package/dist/cli/setup/constants.d.ts +8 -0
  74. package/dist/cli/setup/deps.d.ts +8 -0
  75. package/dist/cli/setup/index.d.ts +9 -0
  76. package/dist/cli/setup/opencode-sync.d.ts +9 -0
  77. package/dist/cli/setup/preset-wizard.d.ts +36 -0
  78. package/dist/cli/setup/prompts.d.ts +4 -0
  79. package/dist/cli/setup/types.d.ts +31 -0
  80. package/dist/cli.js +10226 -0
  81. package/dist/config/index.d.ts +2 -0
  82. package/dist/config/migrations/index.d.ts +1 -0
  83. package/dist/config/migrations/model-migration.d.ts +17 -0
  84. package/dist/config/preset-applier.d.ts +17 -0
  85. package/dist/config/schema/agent-definitions.d.ts +3 -0
  86. package/dist/config/schema/agent-names.d.ts +71 -0
  87. package/dist/config/schema/agent-overrides.d.ts +653 -0
  88. package/dist/config/schema/assembly.d.ts +13 -0
  89. package/dist/config/schema/babysitting.d.ts +5 -0
  90. package/dist/config/schema/background-task.d.ts +44 -0
  91. package/dist/config/schema/browser-automation.d.ts +17 -0
  92. package/dist/config/schema/categories.d.ts +65 -0
  93. package/dist/config/schema/commands.d.ts +21 -0
  94. package/dist/config/schema/comment-checker.d.ts +5 -0
  95. package/dist/config/schema/context-mode.d.ts +14 -0
  96. package/dist/config/schema/dcp.d.ts +367 -0
  97. package/dist/config/schema/evolution.d.ts +89 -0
  98. package/dist/config/schema/experimental.d.ts +14 -0
  99. package/dist/config/schema/headroom.d.ts +23 -0
  100. package/dist/config/schema/hooks.d.ts +70 -0
  101. package/dist/config/schema/internal/permission.d.ts +11 -0
  102. package/dist/config/schema/internal/request.d.ts +7 -0
  103. package/dist/config/schema/knowledge.d.ts +34 -0
  104. package/dist/config/schema/matrix-loop.d.ts +7 -0
  105. package/dist/config/schema/matrixx-config.d.ts +1290 -0
  106. package/dist/config/schema/matrixx-self-config.d.ts +6 -0
  107. package/dist/config/schema/memory.d.ts +191 -0
  108. package/dist/config/schema/model-config.d.ts +59 -0
  109. package/dist/config/schema/model-presets.d.ts +40 -0
  110. package/dist/config/schema/morpheus-agent.d.ts +8 -0
  111. package/dist/config/schema/morpheus.d.ts +26 -0
  112. package/dist/config/schema/notification.d.ts +12 -0
  113. package/dist/config/schema/plans.d.ts +6 -0
  114. package/dist/config/schema/rtk.d.ts +7 -0
  115. package/dist/config/schema/runtime-fallback.d.ts +10 -0
  116. package/dist/config/schema/security.d.ts +86 -0
  117. package/dist/config/schema/skills.d.ts +40 -0
  118. package/dist/config/schema/software-dev-enforcement.d.ts +30 -0
  119. package/dist/config/schema/subagent-block.d.ts +13 -0
  120. package/dist/config/schema/task.d.ts +6 -0
  121. package/dist/config/schema/tasks.d.ts +29 -0
  122. package/dist/config/schema/tdd-enforcer.d.ts +5 -0
  123. package/dist/config/schema/tmux.d.ts +23 -0
  124. package/dist/config/schema/tool-policy.d.ts +10 -0
  125. package/dist/config/schema.d.ts +39 -0
  126. package/dist/features/assembly-state/index.d.ts +1 -0
  127. package/dist/features/assembly-state/manager.d.ts +6 -0
  128. package/dist/features/background-agent/constants.d.ts +51 -0
  129. package/dist/features/background-agent/error-helpers.d.ts +4 -0
  130. package/dist/features/background-agent/handle-index.d.ts +79 -0
  131. package/dist/features/background-agent/index.d.ts +5 -0
  132. package/dist/features/background-agent/loop-detector.d.ts +16 -0
  133. package/dist/features/background-agent/manager.bench.d.ts +1 -0
  134. package/dist/features/background-agent/manager.d.ts +199 -0
  135. package/dist/features/background-agent/message-dir.d.ts +5 -0
  136. package/dist/features/background-agent/notification-builder.d.ts +11 -0
  137. package/dist/features/background-agent/revive.d.ts +39 -0
  138. package/dist/features/background-agent/session-output.d.ts +26 -0
  139. package/dist/features/background-agent/state.d.ts +35 -0
  140. package/dist/features/background-agent/task-history.d.ts +38 -0
  141. package/dist/features/background-agent/types.d.ts +113 -0
  142. package/dist/features/background-agent/wallclock.d.ts +37 -0
  143. package/dist/features/bdd/schema.d.ts +434 -0
  144. package/dist/features/bdd/types.d.ts +2 -0
  145. package/dist/features/builtin-commands/commands.d.ts +3 -0
  146. package/dist/features/builtin-commands/commands.transform.d.ts +57 -0
  147. package/dist/features/builtin-commands/templates/assembly.d.ts +1 -0
  148. package/dist/features/builtin-commands/templates/bdd-pipeline.d.ts +1 -0
  149. package/dist/features/builtin-commands/templates/cleanup-tasks.d.ts +1 -0
  150. package/dist/features/builtin-commands/templates/end-ultrawork.d.ts +1 -0
  151. package/dist/features/builtin-commands/templates/evolution.d.ts +1 -0
  152. package/dist/features/builtin-commands/templates/handoff.d.ts +1 -0
  153. package/dist/features/builtin-commands/templates/humanize.d.ts +1 -0
  154. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -0
  155. package/dist/features/builtin-commands/templates/matrix-loop.d.ts +2 -0
  156. package/dist/features/builtin-commands/templates/pickup.d.ts +1 -0
  157. package/dist/features/builtin-commands/templates/plan-review.d.ts +1 -0
  158. package/dist/features/builtin-commands/templates/preset.d.ts +1 -0
  159. package/dist/features/builtin-commands/templates/quality-assurance.d.ts +1 -0
  160. package/dist/features/builtin-commands/templates/quality-audit.d.ts +1 -0
  161. package/dist/features/builtin-commands/templates/refactor.d.ts +1 -0
  162. package/dist/features/builtin-commands/templates/remove-deadcode.d.ts +1 -0
  163. package/dist/features/builtin-commands/templates/research.d.ts +1 -0
  164. package/dist/features/builtin-commands/templates/security-audit.d.ts +1 -0
  165. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -0
  166. package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -0
  167. package/dist/features/builtin-commands/templates/task-list.d.ts +1 -0
  168. package/dist/features/builtin-commands/templates/ultrawork.d.ts +1 -0
  169. package/dist/features/builtin-commands/types.d.ts +3 -0
  170. package/dist/features/command-loader/index.d.ts +1 -0
  171. package/dist/features/command-loader/types.d.ts +43 -0
  172. package/dist/features/completion-review/admission-gate.d.ts +84 -0
  173. package/dist/features/completion-review/calibration-baseline-check.d.ts +10 -0
  174. package/dist/features/completion-review/calibration-baseline.d.ts +9 -0
  175. package/dist/features/completion-review/calibration-corpus-aggregate.d.ts +18 -0
  176. package/dist/features/completion-review/calibration-corpus-scan.d.ts +20 -0
  177. package/dist/features/completion-review/calibration-corpus-types.d.ts +95 -0
  178. package/dist/features/completion-review/calibration-corpus.d.ts +5 -0
  179. package/dist/features/completion-review/calibration-observed.d.ts +16 -0
  180. package/dist/features/completion-review/calibration-render.d.ts +15 -0
  181. package/dist/features/completion-review/calibration-types.d.ts +51 -0
  182. package/dist/features/completion-review/calibration.d.ts +49 -0
  183. package/dist/features/completion-review/degradation-evaluate.d.ts +17 -0
  184. package/dist/features/completion-review/degradation-gate.d.ts +44 -0
  185. package/dist/features/completion-review/degradation-items.d.ts +38 -0
  186. package/dist/features/completion-review/degradation-model.d.ts +31 -0
  187. package/dist/features/completion-review/degradation-types.d.ts +99 -0
  188. package/dist/features/completion-review/degradation-vacuity.d.ts +32 -0
  189. package/dist/features/completion-review/degradation.d.ts +19 -0
  190. package/dist/features/completion-review/evidence-capture.d.ts +39 -0
  191. package/dist/features/completion-review/evidence-notepad.d.ts +15 -0
  192. package/dist/features/completion-review/evidence-resolve.d.ts +18 -0
  193. package/dist/features/completion-review/evidence-types.d.ts +34 -0
  194. package/dist/features/completion-review/gather-attribution.d.ts +36 -0
  195. package/dist/features/completion-review/gather-drift.d.ts +16 -0
  196. package/dist/features/completion-review/gather-notepads.d.ts +13 -0
  197. package/dist/features/completion-review/gather-types.d.ts +109 -0
  198. package/dist/features/completion-review/gather.d.ts +18 -0
  199. package/dist/features/completion-review/index.d.ts +35 -0
  200. package/dist/features/completion-review/report-gate.d.ts +29 -0
  201. package/dist/features/completion-review/report-sidecar.d.ts +2 -0
  202. package/dist/features/completion-review/report-summary.d.ts +10 -0
  203. package/dist/features/completion-review/report-taxonomy.d.ts +21 -0
  204. package/dist/features/completion-review/report-types.d.ts +142 -0
  205. package/dist/features/completion-review/report-write.d.ts +22 -0
  206. package/dist/features/completion-review/report.d.ts +9 -0
  207. package/dist/features/completion-review/rubric-dimensions.d.ts +11 -0
  208. package/dist/features/completion-review/rubric-dod.d.ts +10 -0
  209. package/dist/features/completion-review/rubric-drift.d.ts +6 -0
  210. package/dist/features/completion-review/rubric-gate.d.ts +1 -0
  211. package/dist/features/completion-review/rubric-score.d.ts +16 -0
  212. package/dist/features/completion-review/rubric-test-decision.d.ts +9 -0
  213. package/dist/features/completion-review/rubric-types.d.ts +87 -0
  214. package/dist/features/completion-review/rubric.d.ts +42 -0
  215. package/dist/features/context-injector/collector.d.ts +13 -0
  216. package/dist/features/context-injector/index.d.ts +3 -0
  217. package/dist/features/context-injector/injector.d.ts +28 -0
  218. package/dist/features/context-injector/types.d.ts +83 -0
  219. package/dist/features/context-mode-routing/routing-block.d.ts +24 -0
  220. package/dist/features/context-mode-routing/system-transform.d.ts +30 -0
  221. package/dist/features/evolution/compressor/index.d.ts +5 -0
  222. package/dist/features/evolution/compressor/interface.d.ts +10 -0
  223. package/dist/features/evolution/compressor/llm.d.ts +22 -0
  224. package/dist/features/evolution/evaluator.d.ts +11 -0
  225. package/dist/features/evolution/index.d.ts +11 -0
  226. package/dist/features/evolution/pipeline.d.ts +9 -0
  227. package/dist/features/evolution/schema.d.ts +46 -0
  228. package/dist/features/evolution/store/budget-ledger.d.ts +46 -0
  229. package/dist/features/evolution/store/lifecycle.d.ts +52 -0
  230. package/dist/features/evolution/store/project-identity.d.ts +27 -0
  231. package/dist/features/evolution/store/query.d.ts +23 -0
  232. package/dist/features/evolution/store/trace-store.d.ts +22 -0
  233. package/dist/features/evolution/types.d.ts +84 -0
  234. package/dist/features/evolution/writer-emit.d.ts +17 -0
  235. package/dist/features/evolution/writer-frontmatter.d.ts +23 -0
  236. package/dist/features/evolution/writer-supersede.d.ts +20 -0
  237. package/dist/features/evolution/writer.d.ts +24 -0
  238. package/dist/features/handoff/constants.d.ts +8 -0
  239. package/dist/features/handoff/index.d.ts +4 -0
  240. package/dist/features/handoff/schema.d.ts +90 -0
  241. package/dist/features/handoff/storage.d.ts +7 -0
  242. package/dist/features/handoff/validate.d.ts +22 -0
  243. package/dist/features/hook-message-injector/constants.d.ts +1 -0
  244. package/dist/features/hook-message-injector/index.d.ts +5 -0
  245. package/dist/features/hook-message-injector/injector.d.ts +62 -0
  246. package/dist/features/hook-message-injector/sdk-message-cache.d.ts +34 -0
  247. package/dist/features/hook-message-injector/types.d.ts +46 -0
  248. package/dist/features/knowledge-hub/index.d.ts +3 -0
  249. package/dist/features/knowledge-hub/loader.d.ts +11 -0
  250. package/dist/features/knowledge-hub/resolver.d.ts +2 -0
  251. package/dist/features/mission-state/atomic-write.d.ts +8 -0
  252. package/dist/features/mission-state/completion.d.ts +58 -0
  253. package/dist/features/mission-state/constants.d.ts +56 -0
  254. package/dist/features/mission-state/index.d.ts +7 -0
  255. package/dist/features/mission-state/plan-file-read.d.ts +15 -0
  256. package/dist/features/mission-state/plan-storage.d.ts +67 -0
  257. package/dist/features/mission-state/reconcile.d.ts +96 -0
  258. package/dist/features/mission-state/rehydrate.d.ts +30 -0
  259. package/dist/features/mission-state/storage.d.ts +53 -0
  260. package/dist/features/mission-state/types.d.ts +78 -0
  261. package/dist/features/plan-contract/appendix.d.ts +11 -0
  262. package/dist/features/plan-contract/constants.d.ts +18 -0
  263. package/dist/features/plan-contract/front-matter.d.ts +59 -0
  264. package/dist/features/plan-contract/index.d.ts +17 -0
  265. package/dist/features/plan-contract/lifecycle.d.ts +44 -0
  266. package/dist/features/plan-contract/migration-report.d.ts +50 -0
  267. package/dist/features/plan-contract/migration.d.ts +62 -0
  268. package/dist/features/plan-contract/parse.d.ts +38 -0
  269. package/dist/features/plan-contract/region.d.ts +67 -0
  270. package/dist/features/plan-contract/schema.d.ts +106 -0
  271. package/dist/features/plan-contract/section-registry-h3.d.ts +14 -0
  272. package/dist/features/plan-contract/section-registry.d.ts +87 -0
  273. package/dist/features/plan-contract/skeleton.d.ts +5 -0
  274. package/dist/features/plan-contract/types.d.ts +56 -0
  275. package/dist/features/plan-contract/validate.d.ts +12 -0
  276. package/dist/features/preset-state/manager.d.ts +5 -0
  277. package/dist/features/rtk-routing/routing-block.d.ts +19 -0
  278. package/dist/features/rtk-routing/system-transform.d.ts +43 -0
  279. package/dist/features/session-memory/compacting.d.ts +9 -0
  280. package/dist/features/session-memory/constants.d.ts +18 -0
  281. package/dist/features/session-memory/index.d.ts +13 -0
  282. package/dist/features/session-memory/recall.d.ts +64 -0
  283. package/dist/features/session-memory/retention.d.ts +29 -0
  284. package/dist/features/session-memory/storage.d.ts +21 -0
  285. package/dist/features/session-memory/summary.d.ts +26 -0
  286. package/dist/features/session-memory/types.d.ts +43 -0
  287. package/dist/features/session-state/state.d.ts +34 -0
  288. package/dist/features/task-session-scope/ancestry.d.ts +23 -0
  289. package/dist/features/task-session-scope/index.d.ts +2 -0
  290. package/dist/features/task-session-scope/session-task-pending.d.ts +83 -0
  291. package/dist/features/task-storage/storage.d.ts +23 -0
  292. package/dist/features/task-storage/types.d.ts +29 -0
  293. package/dist/features/task-toast-manager/index.d.ts +2 -0
  294. package/dist/features/task-toast-manager/manager.d.ts +51 -0
  295. package/dist/features/task-toast-manager/types.d.ts +24 -0
  296. package/dist/features/tool-metadata-store/call-id.d.ts +6 -0
  297. package/dist/features/tool-metadata-store/index.d.ts +4 -0
  298. package/dist/features/tool-metadata-store/store.d.ts +39 -0
  299. package/dist/features/ultrawork-state/index.d.ts +1 -0
  300. package/dist/features/ultrawork-state/manager.d.ts +6 -0
  301. package/dist/hooks/agent-usage-reminder/constants.d.ts +5 -0
  302. package/dist/hooks/agent-usage-reminder/hook.d.ts +16 -0
  303. package/dist/hooks/agent-usage-reminder/storage.d.ts +4 -0
  304. package/dist/hooks/agent-usage-reminder/types.d.ts +6 -0
  305. package/dist/hooks/anthropic-effort/hook.d.ts +26 -0
  306. package/dist/hooks/auto-slash-command/constants.d.ts +5 -0
  307. package/dist/hooks/auto-slash-command/detector.d.ts +13 -0
  308. package/dist/hooks/auto-slash-command/executor.d.ts +23 -0
  309. package/dist/hooks/auto-slash-command/hook.d.ts +9 -0
  310. package/dist/hooks/auto-slash-command/index.d.ts +6 -0
  311. package/dist/hooks/auto-slash-command/types.d.ts +34 -0
  312. package/dist/hooks/auto-update-checker/cache.d.ts +1 -0
  313. package/dist/hooks/auto-update-checker/checker/cached-version.d.ts +1 -0
  314. package/dist/hooks/auto-update-checker/checker/check-for-update.d.ts +2 -0
  315. package/dist/hooks/auto-update-checker/checker/config-paths.d.ts +1 -0
  316. package/dist/hooks/auto-update-checker/checker/jsonc-strip.d.ts +1 -0
  317. package/dist/hooks/auto-update-checker/checker/latest-version.d.ts +1 -0
  318. package/dist/hooks/auto-update-checker/checker/local-dev-path.d.ts +2 -0
  319. package/dist/hooks/auto-update-checker/checker/local-dev-version.d.ts +1 -0
  320. package/dist/hooks/auto-update-checker/checker/package-json-locator.d.ts +1 -0
  321. package/dist/hooks/auto-update-checker/checker/pinned-version-updater.d.ts +2 -0
  322. package/dist/hooks/auto-update-checker/checker/plugin-entry.d.ts +7 -0
  323. package/dist/hooks/auto-update-checker/checker.d.ts +8 -0
  324. package/dist/hooks/auto-update-checker/constants.d.ts +9 -0
  325. package/dist/hooks/auto-update-checker/hook/background-update-check.d.ts +2 -0
  326. package/dist/hooks/auto-update-checker/hook/config-errors-toast.d.ts +2 -0
  327. package/dist/hooks/auto-update-checker/hook/connected-providers-status.d.ts +2 -0
  328. package/dist/hooks/auto-update-checker/hook/model-cache-warning.d.ts +2 -0
  329. package/dist/hooks/auto-update-checker/hook/spinner-toast.d.ts +2 -0
  330. package/dist/hooks/auto-update-checker/hook/startup-toasts.d.ts +3 -0
  331. package/dist/hooks/auto-update-checker/hook/update-toasts.d.ts +3 -0
  332. package/dist/hooks/auto-update-checker/hook.d.ts +5 -0
  333. package/dist/hooks/auto-update-checker/index.d.ts +5 -0
  334. package/dist/hooks/auto-update-checker/types.d.ts +25 -0
  335. package/dist/hooks/auto-update-checker/version-channel.d.ts +4 -0
  336. package/dist/hooks/background-notification/hook.d.ts +12 -0
  337. package/dist/hooks/background-notification/types.d.ts +4 -0
  338. package/dist/hooks/background-task-blocker/hook.d.ts +10 -0
  339. package/dist/hooks/bash-file-read-guard.d.ts +2 -0
  340. package/dist/hooks/category-skill-reminder/formatter.d.ts +2 -0
  341. package/dist/hooks/category-skill-reminder/hook.d.ts +19 -0
  342. package/dist/hooks/comment-checker/cli-runner.d.ts +20 -0
  343. package/dist/hooks/comment-checker/cli.d.ts +52 -0
  344. package/dist/hooks/comment-checker/downloader.d.ts +20 -0
  345. package/dist/hooks/comment-checker/hook.d.ts +19 -0
  346. package/dist/hooks/comment-checker/pending-calls.d.ts +4 -0
  347. package/dist/hooks/comment-checker/types.d.ts +13 -0
  348. package/dist/hooks/compaction-context-injector/hook.d.ts +8 -0
  349. package/dist/hooks/context-mode-enforcer/constants.d.ts +9 -0
  350. package/dist/hooks/context-mode-enforcer/guidance-throttle.d.ts +7 -0
  351. package/dist/hooks/context-mode-enforcer/hook.d.ts +3 -0
  352. package/dist/hooks/context-window-limit-recovery/client.d.ts +2 -0
  353. package/dist/hooks/context-window-limit-recovery/empty-content-recovery.d.ts +8 -0
  354. package/dist/hooks/context-window-limit-recovery/executor.d.ts +5 -0
  355. package/dist/hooks/context-window-limit-recovery/index.d.ts +8 -0
  356. package/dist/hooks/context-window-limit-recovery/message-builder.d.ts +4 -0
  357. package/dist/hooks/context-window-limit-recovery/parser-patterns.d.ts +11 -0
  358. package/dist/hooks/context-window-limit-recovery/parser.d.ts +15 -0
  359. package/dist/hooks/context-window-limit-recovery/recovery-hook.d.ts +11 -0
  360. package/dist/hooks/context-window-limit-recovery/state.d.ts +6 -0
  361. package/dist/hooks/context-window-limit-recovery/summarize-retry-strategy.d.ts +11 -0
  362. package/dist/hooks/context-window-limit-recovery/types.d.ts +31 -0
  363. package/dist/hooks/context-window-monitor.d.ts +18 -0
  364. package/dist/hooks/dcp-nudge-sanitizer/constants.d.ts +5 -0
  365. package/dist/hooks/dcp-nudge-sanitizer/hook.d.ts +34 -0
  366. package/dist/hooks/delegate-task-retry/guidance.d.ts +2 -0
  367. package/dist/hooks/delegate-task-retry/hook.d.ts +12 -0
  368. package/dist/hooks/delegate-task-retry/patterns.d.ts +11 -0
  369. package/dist/hooks/design-intent-preserver/constants.d.ts +6 -0
  370. package/dist/hooks/design-intent-preserver/hook.d.ts +19 -0
  371. package/dist/hooks/design-intent-preserver/phase-detector.d.ts +8 -0
  372. package/dist/hooks/directory-agents-injector/constants.d.ts +2 -0
  373. package/dist/hooks/directory-agents-injector/finder.d.ts +5 -0
  374. package/dist/hooks/directory-agents-injector/hook.d.ts +20 -0
  375. package/dist/hooks/directory-agents-injector/injector.d.ts +16 -0
  376. package/dist/hooks/directory-agents-injector/storage.d.ts +1 -0
  377. package/dist/hooks/directory-injector/factory.d.ts +34 -0
  378. package/dist/hooks/directory-injector/index.d.ts +1 -0
  379. package/dist/hooks/docs-lookup-guard/constants.d.ts +6 -0
  380. package/dist/hooks/docs-lookup-guard/hook.d.ts +3 -0
  381. package/dist/hooks/document-reader-guard/constants.d.ts +5 -0
  382. package/dist/hooks/document-reader-guard/hook.d.ts +3 -0
  383. package/dist/hooks/domain-keyword-detector/constants.d.ts +18 -0
  384. package/dist/hooks/domain-keyword-detector/detector.d.ts +16 -0
  385. package/dist/hooks/domain-keyword-detector/hook.d.ts +26 -0
  386. package/dist/hooks/domain-keyword-detector/index.d.ts +3 -0
  387. package/dist/hooks/edit-error-recovery/hook.d.ts +31 -0
  388. package/dist/hooks/empty-task-response-detector.d.ts +12 -0
  389. package/dist/hooks/env-context-injector/flat.d.ts +22 -0
  390. package/dist/hooks/env-context-injector/index.d.ts +39 -0
  391. package/dist/hooks/env-file-write-guard/hook.d.ts +15 -0
  392. package/dist/hooks/env-file-write-guard/sensitive-file-matcher.d.ts +1 -0
  393. package/dist/hooks/evolution-compressor/host-llm-call.d.ts +15 -0
  394. package/dist/hooks/evolution-hitl/flat.d.ts +29 -0
  395. package/dist/hooks/evolution-hitl/index.d.ts +27 -0
  396. package/dist/hooks/evolution-quality-gate/index.d.ts +6 -0
  397. package/dist/hooks/evolution-watcher/index.d.ts +21 -0
  398. package/dist/hooks/evolution-watcher/utils.d.ts +5 -0
  399. package/dist/hooks/hashline-read-enhancer/hook.d.ts +18 -0
  400. package/dist/hooks/index.d.ts +68 -0
  401. package/dist/hooks/input-secret-guard/detection-rules.d.ts +10 -0
  402. package/dist/hooks/input-secret-guard/detector.d.ts +21 -0
  403. package/dist/hooks/input-secret-guard/hook.d.ts +19 -0
  404. package/dist/hooks/input-secret-guard/redactor.d.ts +2 -0
  405. package/dist/hooks/input-secret-guard/session-allow-cache.d.ts +6 -0
  406. package/dist/hooks/interactive-bash-session/constants.d.ts +3 -0
  407. package/dist/hooks/interactive-bash-session/hook.d.ts +18 -0
  408. package/dist/hooks/interactive-bash-session/parser.d.ts +20 -0
  409. package/dist/hooks/interactive-bash-session/state-manager.d.ts +4 -0
  410. package/dist/hooks/interactive-bash-session/storage.d.ts +4 -0
  411. package/dist/hooks/interactive-bash-session/types.d.ts +10 -0
  412. package/dist/hooks/json-error-recovery/hook.d.ts +15 -0
  413. package/dist/hooks/json-error-recovery/index.d.ts +1 -0
  414. package/dist/hooks/keyword-detector/analyze/default.d.ts +12 -0
  415. package/dist/hooks/keyword-detector/constants.d.ts +10 -0
  416. package/dist/hooks/keyword-detector/detector.d.ts +11 -0
  417. package/dist/hooks/keyword-detector/docs/default.d.ts +14 -0
  418. package/dist/hooks/keyword-detector/hook.d.ts +20 -0
  419. package/dist/hooks/keyword-detector/search/default.d.ts +12 -0
  420. package/dist/hooks/keyword-detector/ultrawork/deepseek.d.ts +16 -0
  421. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +6 -0
  422. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +12 -0
  423. package/dist/hooks/keyword-detector/ultrawork/glm.d.ts +11 -0
  424. package/dist/hooks/keyword-detector/ultrawork/gpt5.2.d.ts +12 -0
  425. package/dist/hooks/keyword-detector/ultrawork/index.d.ts +25 -0
  426. package/dist/hooks/keyword-detector/ultrawork/mimo.d.ts +16 -0
  427. package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +6 -0
  428. package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +33 -0
  429. package/dist/hooks/knowledge-hub-guard/approvals.d.ts +5 -0
  430. package/dist/hooks/knowledge-hub-guard/hook.d.ts +15 -0
  431. package/dist/hooks/knowledge-hub-injector/hook.d.ts +37 -0
  432. package/dist/hooks/knowledge-hub-search-nudge/hook.d.ts +16 -0
  433. package/dist/hooks/matrix-loop/completion-promise-detector.d.ts +11 -0
  434. package/dist/hooks/matrix-loop/completion-verifier.d.ts +18 -0
  435. package/dist/hooks/matrix-loop/constants.d.ts +7 -0
  436. package/dist/hooks/matrix-loop/continuation-prompt-builder.d.ts +2 -0
  437. package/dist/hooks/matrix-loop/continuation-prompt-injector.d.ts +7 -0
  438. package/dist/hooks/matrix-loop/loop-session-recovery.d.ts +7 -0
  439. package/dist/hooks/matrix-loop/loop-state-controller.d.ts +16 -0
  440. package/dist/hooks/matrix-loop/matrix-loop-event-handler.d.ts +24 -0
  441. package/dist/hooks/matrix-loop/matrix-loop-hook.d.ts +14 -0
  442. package/dist/hooks/matrix-loop/storage.d.ts +5 -0
  443. package/dist/hooks/matrix-loop/types.d.ts +25 -0
  444. package/dist/hooks/mouse-notepad/constants.d.ts +2 -0
  445. package/dist/hooks/mouse-notepad/hook.d.ts +11 -0
  446. package/dist/hooks/niobe/bash-command-policy.d.ts +4 -0
  447. package/dist/hooks/niobe/event-handler.d.ts +9 -0
  448. package/dist/hooks/niobe/hook-name.d.ts +1 -0
  449. package/dist/hooks/niobe/matrix-path.d.ts +1 -0
  450. package/dist/hooks/niobe/mission-continuation-injector.d.ts +13 -0
  451. package/dist/hooks/niobe/niobe-hook.d.ts +14 -0
  452. package/dist/hooks/niobe/recent-model-resolver.d.ts +3 -0
  453. package/dist/hooks/niobe/session-last-agent.d.ts +2 -0
  454. package/dist/hooks/niobe/subagent-session-id.d.ts +1 -0
  455. package/dist/hooks/niobe/system-reminder-templates.d.ts +5 -0
  456. package/dist/hooks/niobe/tool-execute-after.d.ts +6 -0
  457. package/dist/hooks/niobe/tool-execute-before.d.ts +12 -0
  458. package/dist/hooks/niobe/types.d.ts +27 -0
  459. package/dist/hooks/niobe/verification-reminders.d.ts +5 -0
  460. package/dist/hooks/niobe/write-edit-tool-policy.d.ts +1 -0
  461. package/dist/hooks/non-interactive-env/constants.d.ts +34 -0
  462. package/dist/hooks/non-interactive-env/detector.d.ts +1 -0
  463. package/dist/hooks/non-interactive-env/non-interactive-env-hook.d.ts +13 -0
  464. package/dist/hooks/nudge-loop-breaker/constants.d.ts +9 -0
  465. package/dist/hooks/nudge-loop-breaker/hook.d.ts +12 -0
  466. package/dist/hooks/nudge-loop-breaker/session-state.d.ts +11 -0
  467. package/dist/hooks/oracle-md-only/agent-matcher.d.ts +1 -0
  468. package/dist/hooks/oracle-md-only/agent-resolution.d.ts +14 -0
  469. package/dist/hooks/oracle-md-only/constants.d.ts +6 -0
  470. package/dist/hooks/oracle-md-only/hook.d.ts +11 -0
  471. package/dist/hooks/oracle-md-only/path-policy.d.ts +10 -0
  472. package/dist/hooks/plan-persister/hook.d.ts +16 -0
  473. package/dist/hooks/plan-persister/index.d.ts +6 -0
  474. package/dist/hooks/plan-persister/task-link.d.ts +31 -0
  475. package/dist/hooks/plan-persister/task-sync.d.ts +39 -0
  476. package/dist/hooks/post-read-injector/block.d.ts +1 -0
  477. package/dist/hooks/post-read-injector/constants.d.ts +4 -0
  478. package/dist/hooks/post-read-injector/hook.d.ts +24 -0
  479. package/dist/hooks/post-read-injector/index.d.ts +8 -0
  480. package/dist/hooks/post-read-injector/injector.d.ts +21 -0
  481. package/dist/hooks/post-read-injector/sections.d.ts +7 -0
  482. package/dist/hooks/post-read-injector/unified-walk.d.ts +6 -0
  483. package/dist/hooks/quality-gate/hook.d.ts +31 -0
  484. package/dist/hooks/read-image-resizer/hook.d.ts +12 -0
  485. package/dist/hooks/read-image-resizer/image-dimensions.d.ts +2 -0
  486. package/dist/hooks/read-image-resizer/image-resizer.d.ts +5 -0
  487. package/dist/hooks/read-image-resizer/png-fallback-resizer.d.ts +2 -0
  488. package/dist/hooks/read-image-resizer/types.d.ts +14 -0
  489. package/dist/hooks/rtk-bash-rewriter/constants.d.ts +3 -0
  490. package/dist/hooks/rtk-bash-rewriter/hook.d.ts +12 -0
  491. package/dist/hooks/rtk-bash-rewriter/types.d.ts +11 -0
  492. package/dist/hooks/rules-injector/cache.d.ts +8 -0
  493. package/dist/hooks/rules-injector/constants.d.ts +6 -0
  494. package/dist/hooks/rules-injector/finder.d.ts +3 -0
  495. package/dist/hooks/rules-injector/hook.d.ts +20 -0
  496. package/dist/hooks/rules-injector/injector.d.ts +21 -0
  497. package/dist/hooks/rules-injector/matcher.d.ts +22 -0
  498. package/dist/hooks/rules-injector/output-path.d.ts +6 -0
  499. package/dist/hooks/rules-injector/parser.d.ts +18 -0
  500. package/dist/hooks/rules-injector/project-root-finder.d.ts +8 -0
  501. package/dist/hooks/rules-injector/rule-distance.d.ts +10 -0
  502. package/dist/hooks/rules-injector/rule-file-finder.d.ts +13 -0
  503. package/dist/hooks/rules-injector/rule-file-scanner.d.ts +14 -0
  504. package/dist/hooks/rules-injector/storage.d.ts +9 -0
  505. package/dist/hooks/rules-injector/types.d.ts +32 -0
  506. package/dist/hooks/runtime-fallback/agent-resolver.d.ts +4 -0
  507. package/dist/hooks/runtime-fallback/auto-retry-signal.d.ts +5 -0
  508. package/dist/hooks/runtime-fallback/auto-retry.d.ts +10 -0
  509. package/dist/hooks/runtime-fallback/chat-message-handler.d.ts +20 -0
  510. package/dist/hooks/runtime-fallback/constants.d.ts +4 -0
  511. package/dist/hooks/runtime-fallback/error-classifier.d.ts +13 -0
  512. package/dist/hooks/runtime-fallback/event-handler.d.ts +4 -0
  513. package/dist/hooks/runtime-fallback/fallback-bootstrap-model.d.ts +10 -0
  514. package/dist/hooks/runtime-fallback/fallback-models.d.ts +2 -0
  515. package/dist/hooks/runtime-fallback/fallback-retry-dispatcher.d.ts +11 -0
  516. package/dist/hooks/runtime-fallback/fallback-state.d.ts +4 -0
  517. package/dist/hooks/runtime-fallback/hook.d.ts +2 -0
  518. package/dist/hooks/runtime-fallback/index.d.ts +3 -0
  519. package/dist/hooks/runtime-fallback/last-user-retry-parts.d.ts +4 -0
  520. package/dist/hooks/runtime-fallback/message-update-handler.d.ts +4 -0
  521. package/dist/hooks/runtime-fallback/model-utils.d.ts +7 -0
  522. package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +11 -0
  523. package/dist/hooks/runtime-fallback/retry-status-utils.d.ts +2 -0
  524. package/dist/hooks/runtime-fallback/session-category-registry.d.ts +6 -0
  525. package/dist/hooks/runtime-fallback/session-messages.d.ts +4 -0
  526. package/dist/hooks/runtime-fallback/session-status-handler.d.ts +3 -0
  527. package/dist/hooks/runtime-fallback/types.d.ts +65 -0
  528. package/dist/hooks/runtime-fallback/visible-assistant-response.d.ts +3 -0
  529. package/dist/hooks/secret-leak-guard/git-command-detector.d.ts +2 -0
  530. package/dist/hooks/secret-leak-guard/gitleaks-runner.d.ts +16 -0
  531. package/dist/hooks/secret-leak-guard/hook.d.ts +17 -0
  532. package/dist/hooks/secret-leak-guard/result-formatter.d.ts +3 -0
  533. package/dist/hooks/session-memory/hook.d.ts +23 -0
  534. package/dist/hooks/session-memory/index.d.ts +1 -0
  535. package/dist/hooks/session-notification-formatting.d.ts +3 -0
  536. package/dist/hooks/session-notification-scheduler.d.ts +24 -0
  537. package/dist/hooks/session-notification-sender.d.ts +6 -0
  538. package/dist/hooks/session-notification-utils.d.ts +9 -0
  539. package/dist/hooks/session-notification.d.ts +23 -0
  540. package/dist/hooks/session-recovery/constants.d.ts +3 -0
  541. package/dist/hooks/session-recovery/detect-error-type.d.ts +3 -0
  542. package/dist/hooks/session-recovery/hook.d.ts +20 -0
  543. package/dist/hooks/session-recovery/index.d.ts +5 -0
  544. package/dist/hooks/session-recovery/recover-thinking-block-order.d.ts +7 -0
  545. package/dist/hooks/session-recovery/recover-thinking-disabled-violation.d.ts +7 -0
  546. package/dist/hooks/session-recovery/recover-tool-result-missing.d.ts +7 -0
  547. package/dist/hooks/session-recovery/resume.d.ts +9 -0
  548. package/dist/hooks/session-recovery/storage/empty-messages.d.ts +3 -0
  549. package/dist/hooks/session-recovery/storage/empty-text.d.ts +5 -0
  550. package/dist/hooks/session-recovery/storage/messages-reader.d.ts +4 -0
  551. package/dist/hooks/session-recovery/storage/orphan-thinking-search.d.ts +2 -0
  552. package/dist/hooks/session-recovery/storage/part-content.d.ts +3 -0
  553. package/dist/hooks/session-recovery/storage/part-id.d.ts +1 -0
  554. package/dist/hooks/session-recovery/storage/parts-reader.d.ts +4 -0
  555. package/dist/hooks/session-recovery/storage/text-part-injector.d.ts +3 -0
  556. package/dist/hooks/session-recovery/storage/thinking-block-search.d.ts +2 -0
  557. package/dist/hooks/session-recovery/storage/thinking-prepend.d.ts +3 -0
  558. package/dist/hooks/session-recovery/storage/thinking-strip.d.ts +3 -0
  559. package/dist/hooks/session-recovery/storage.d.ts +12 -0
  560. package/dist/hooks/session-recovery/types.d.ts +66 -0
  561. package/dist/hooks/shared/compaction-model-resolver.d.ts +5 -0
  562. package/dist/hooks/silent-failure-guard/constants.d.ts +14 -0
  563. package/dist/hooks/silent-failure-guard/hook.d.ts +24 -0
  564. package/dist/hooks/silent-failure-guard/index.d.ts +2 -0
  565. package/dist/hooks/software-dev-enforcement/constants.d.ts +5 -0
  566. package/dist/hooks/software-dev-enforcement/hook.d.ts +11 -0
  567. package/dist/hooks/start-work/plan-filter.d.ts +61 -0
  568. package/dist/hooks/start-work/start-work-hook.d.ts +16 -0
  569. package/dist/hooks/stop-continuation-guard/hook.d.ts +19 -0
  570. package/dist/hooks/subagent-block/constants.d.ts +3 -0
  571. package/dist/hooks/subagent-block/hook.d.ts +16 -0
  572. package/dist/hooks/task-continuation-enforcer/abort-detection.d.ts +2 -0
  573. package/dist/hooks/task-continuation-enforcer/constants.d.ts +9 -0
  574. package/dist/hooks/task-continuation-enforcer/continuation-injection.d.ts +14 -0
  575. package/dist/hooks/task-continuation-enforcer/countdown.d.ts +16 -0
  576. package/dist/hooks/task-continuation-enforcer/handler.d.ts +13 -0
  577. package/dist/hooks/task-continuation-enforcer/idle-event.d.ts +13 -0
  578. package/dist/hooks/task-continuation-enforcer/index.d.ts +5 -0
  579. package/dist/hooks/task-continuation-enforcer/non-idle-events.d.ts +6 -0
  580. package/dist/hooks/task-continuation-enforcer/session-state.d.ts +10 -0
  581. package/dist/hooks/task-continuation-enforcer/staleness.d.ts +32 -0
  582. package/dist/hooks/task-continuation-enforcer/todo.d.ts +29 -0
  583. package/dist/hooks/task-continuation-enforcer/types.d.ts +54 -0
  584. package/dist/hooks/task-edit-guard/constants.d.ts +4 -0
  585. package/dist/hooks/task-edit-guard/hook.d.ts +3 -0
  586. package/dist/hooks/task-notepad-writer/constants.d.ts +42 -0
  587. package/dist/hooks/task-notepad-writer/hook.d.ts +14 -0
  588. package/dist/hooks/task-notepad-writer/notepad-path.d.ts +36 -0
  589. package/dist/hooks/task-resume-info/hook.d.ts +11 -0
  590. package/dist/hooks/think-mode/detector.d.ts +5 -0
  591. package/dist/hooks/think-mode/hook.d.ts +11 -0
  592. package/dist/hooks/think-mode/index.d.ts +4 -0
  593. package/dist/hooks/think-mode/switcher.d.ts +76 -0
  594. package/dist/hooks/think-mode/types.d.ts +25 -0
  595. package/dist/hooks/thinking-block-validator/flat.d.ts +24 -0
  596. package/dist/hooks/thinking-block-validator/hook.d.ts +45 -0
  597. package/dist/hooks/tool-output-truncator.d.ts +17 -0
  598. package/dist/hooks/tool-pair-validator/hook.d.ts +43 -0
  599. package/dist/hooks/unstable-agent-babysitter/index.d.ts +2 -0
  600. package/dist/hooks/unstable-agent-babysitter/task-message-analyzer.d.ts +23 -0
  601. package/dist/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.d.ts +17 -0
  602. package/dist/hooks/webfetch-redirect-guard/constants.d.ts +6 -0
  603. package/dist/hooks/webfetch-redirect-guard/hook.d.ts +19 -0
  604. package/dist/hooks/webfetch-redirect-guard/redirect-resolution.d.ts +16 -0
  605. package/dist/hooks/write-existing-file-guard/hook.d.ts +3 -0
  606. package/dist/index.d.ts +21 -0
  607. package/dist/index.js +92767 -0
  608. package/dist/matrixx.schema.json +4697 -0
  609. package/dist/mcps/context7.d.ts +9 -0
  610. package/dist/mcps/document-reader.d.ts +5 -0
  611. package/dist/mcps/index.d.ts +22 -0
  612. package/dist/mcps/mcp-startup-state.d.ts +4 -0
  613. package/dist/mcps/mcp-validator.d.ts +11 -0
  614. package/dist/mcps/mcp.transform.d.ts +61 -0
  615. package/dist/mcps/types.d.ts +8 -0
  616. package/dist/plugin/available-categories.d.ts +3 -0
  617. package/dist/plugin/chat-message.d.ts +30 -0
  618. package/dist/plugin/chat-params.d.ts +28 -0
  619. package/dist/plugin/context.d.ts +298 -0
  620. package/dist/plugin/event-dispatch.d.ts +29 -0
  621. package/dist/plugin/event.d.ts +20 -0
  622. package/dist/plugin/hooks/create-continuation-hooks.d.ts +29 -0
  623. package/dist/plugin/hooks/create-session-hooks.d.ts +32 -0
  624. package/dist/plugin/hooks/create-skill-hooks.d.ts +16 -0
  625. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +38 -0
  626. package/dist/plugin/hooks/create-transform-hooks.d.ts +29 -0
  627. package/dist/plugin/legacy-hooks.d.ts +143 -0
  628. package/dist/plugin/message-hooks/context-injector.d.ts +12 -0
  629. package/dist/plugin/message-hooks/dcp-nudge-sanitizer.d.ts +43 -0
  630. package/dist/plugin/message-hooks/domain-keyword-detector.d.ts +30 -0
  631. package/dist/plugin/message-hooks/env-context-injector.d.ts +14 -0
  632. package/dist/plugin/message-hooks/evolution-hitl.d.ts +17 -0
  633. package/dist/plugin/message-hooks/index.d.ts +54 -0
  634. package/dist/plugin/message-hooks/knowledge-hub-injector.d.ts +18 -0
  635. package/dist/plugin/message-hooks/thinking-block-validator.d.ts +15 -0
  636. package/dist/plugin/message-hooks/tool-pair-validator.d.ts +47 -0
  637. package/dist/plugin/native-context.d.ts +12 -0
  638. package/dist/plugin/recent-synthetic-idles.d.ts +6 -0
  639. package/dist/plugin/session-agent-resolver.d.ts +2 -0
  640. package/dist/plugin/session-status-normalizer.d.ts +2 -0
  641. package/dist/plugin/setup-domains.d.ts +112 -0
  642. package/dist/plugin/skill-context.d.ts +14 -0
  643. package/dist/plugin/tool-catalog.d.ts +18 -0
  644. package/dist/plugin/tool-definition.d.ts +11 -0
  645. package/dist/plugin/tool-execute-after.d.ts +12 -0
  646. package/dist/plugin/tool-execute-before.bench.d.ts +1 -0
  647. package/dist/plugin/tool-execute-before.d.ts +14 -0
  648. package/dist/plugin/tool-policy.d.ts +67 -0
  649. package/dist/plugin/unstable-agent-babysitter.d.ts +10 -0
  650. package/dist/plugin-config.d.ts +30 -0
  651. package/dist/plugin-handlers/agent-config-handler.d.ts +15 -0
  652. package/dist/plugin-handlers/agent-priority-order.d.ts +1 -0
  653. package/dist/plugin-handlers/agent-tool-allowlist.d.ts +11 -0
  654. package/dist/plugin-handlers/category-config-resolver.d.ts +2 -0
  655. package/dist/plugin-handlers/command-config-handler.d.ts +10 -0
  656. package/dist/plugin-handlers/config-handler.d.ts +12 -0
  657. package/dist/plugin-handlers/formatter-config-handler.d.ts +17 -0
  658. package/dist/plugin-handlers/index.d.ts +11 -0
  659. package/dist/plugin-handlers/mcp-config-handler.d.ts +7 -0
  660. package/dist/plugin-handlers/oracle-agent-config-builder.d.ts +19 -0
  661. package/dist/plugin-handlers/plan-model-inheritance.d.ts +1 -0
  662. package/dist/plugin-handlers/plugin-components-loader.d.ts +22 -0
  663. package/dist/plugin-handlers/provider-config-handler.d.ts +5 -0
  664. package/dist/plugin-handlers/task-permissions.d.ts +41 -0
  665. package/dist/plugin-handlers/tool-config-handler.d.ts +6 -0
  666. package/dist/plugin-state.d.ts +5 -0
  667. package/dist/shared/agent-display-names.d.ts +17 -0
  668. package/dist/shared/agent-label.d.ts +21 -0
  669. package/dist/shared/agent-tool-restrictions.d.ts +6 -0
  670. package/dist/shared/agent-variant.d.ts +9 -0
  671. package/dist/shared/awaiting-user.d.ts +12 -0
  672. package/dist/shared/binary-downloader.d.ts +10 -0
  673. package/dist/shared/code-patterns.d.ts +2 -0
  674. package/dist/shared/command-executor/embedded-commands.d.ts +8 -0
  675. package/dist/shared/command-executor/execute-command.d.ts +1 -0
  676. package/dist/shared/command-executor/resolve-commands-in-text.d.ts +1 -0
  677. package/dist/shared/command-executor.d.ts +2 -0
  678. package/dist/shared/compaction-log.d.ts +11 -0
  679. package/dist/shared/config-errors.d.ts +10 -0
  680. package/dist/shared/connected-providers-cache.d.ts +55 -0
  681. package/dist/shared/context-limit-resolver.d.ts +6 -0
  682. package/dist/shared/context-limits.d.ts +36 -0
  683. package/dist/shared/context-mode-enforcement.d.ts +59 -0
  684. package/dist/shared/data-path.d.ts +30 -0
  685. package/dist/shared/dcp-guidance.d.ts +16 -0
  686. package/dist/shared/dcp-switch-profile.d.ts +19 -0
  687. package/dist/shared/deep-merge.d.ts +13 -0
  688. package/dist/shared/delay.d.ts +1 -0
  689. package/dist/shared/disabled-tools.d.ts +2 -0
  690. package/dist/shared/dynamic-truncator.d.ts +23 -0
  691. package/dist/shared/error-formatting.d.ts +28 -0
  692. package/dist/shared/escape-regexp.d.ts +1 -0
  693. package/dist/shared/external-plugin-detector.d.ts +19 -0
  694. package/dist/shared/file-reference-resolver.d.ts +1 -0
  695. package/dist/shared/file-utils.d.ts +7 -0
  696. package/dist/shared/first-message-variant.d.ts +11 -0
  697. package/dist/shared/format-bytes.d.ts +1 -0
  698. package/dist/shared/format-duration.d.ts +4 -0
  699. package/dist/shared/frontmatter.d.ts +8 -0
  700. package/dist/shared/git-worktree/collect-git-diff-stats.d.ts +2 -0
  701. package/dist/shared/git-worktree/format-file-changes.d.ts +2 -0
  702. package/dist/shared/git-worktree/parse-diff-numstat.d.ts +2 -0
  703. package/dist/shared/git-worktree/parse-status-porcelain.d.ts +2 -0
  704. package/dist/shared/git-worktree/types.d.ts +7 -0
  705. package/dist/shared/index.d.ts +70 -0
  706. package/dist/shared/injection-notifier.d.ts +14 -0
  707. package/dist/shared/is-abort-error.d.ts +1 -0
  708. package/dist/shared/json-safe-metadata.d.ts +1 -0
  709. package/dist/shared/jsonc-parser.d.ts +16 -0
  710. package/dist/shared/logger.d.ts +2 -0
  711. package/dist/shared/memory-backend-detect.d.ts +16 -0
  712. package/dist/shared/merge-categories.d.ts +6 -0
  713. package/dist/shared/migration/hook-names.d.ts +7 -0
  714. package/dist/shared/model-availability.d.ts +34 -0
  715. package/dist/shared/model-requirements.d.ts +23 -0
  716. package/dist/shared/model-resolution-pipeline.d.ts +27 -0
  717. package/dist/shared/model-sanitizer.d.ts +3 -0
  718. package/dist/shared/model-suggestion-retry.d.ts +43 -0
  719. package/dist/shared/normalize-sdk-response.d.ts +1 -0
  720. package/dist/shared/notify.d.ts +5 -0
  721. package/dist/shared/opencode-config-dir.d.ts +18 -0
  722. package/dist/shared/opencode-http-api.d.ts +3 -0
  723. package/dist/shared/opencode-message-dir.d.ts +1 -0
  724. package/dist/shared/opencode-server-auth.d.ts +6 -0
  725. package/dist/shared/opencode-storage-detection.d.ts +2 -0
  726. package/dist/shared/opencode-storage-paths.d.ts +4 -0
  727. package/dist/shared/opencode-version.d.ts +24 -0
  728. package/dist/shared/permission-compat.d.ts +19 -0
  729. package/dist/shared/poll-timeout-outcome.d.ts +21 -0
  730. package/dist/shared/port-utils.d.ts +9 -0
  731. package/dist/shared/record-type-guard.d.ts +1 -0
  732. package/dist/shared/revive-outcome.d.ts +15 -0
  733. package/dist/shared/rtk-enforcement.d.ts +18 -0
  734. package/dist/shared/safe-create-hook.d.ts +6 -0
  735. package/dist/shared/saturated-outcome.d.ts +18 -0
  736. package/dist/shared/sentinels.d.ts +2 -0
  737. package/dist/shared/session-context-source.d.ts +36 -0
  738. package/dist/shared/session-cursor.d.ts +9 -0
  739. package/dist/shared/session-directory-resolver.d.ts +1 -0
  740. package/dist/shared/session-facade.d.ts +55 -0
  741. package/dist/shared/session-id.d.ts +8 -0
  742. package/dist/shared/session-injected-paths.d.ts +5 -0
  743. package/dist/shared/session-message.d.ts +30 -0
  744. package/dist/shared/session-state.d.ts +15 -0
  745. package/dist/shared/session-utils.d.ts +2 -0
  746. package/dist/shared/shell-env.d.ts +25 -0
  747. package/dist/shared/shell-tool-name.d.ts +15 -0
  748. package/dist/shared/skill-path-resolver.d.ts +9 -0
  749. package/dist/shared/software-dev-enforcement/index.d.ts +2 -0
  750. package/dist/shared/software-dev-enforcement/payload.d.ts +29 -0
  751. package/dist/shared/software-dev-enforcement/targets.d.ts +13 -0
  752. package/dist/shared/state-root.d.ts +26 -0
  753. package/dist/shared/status-types.d.ts +1 -0
  754. package/dist/shared/system-directive.d.ts +77 -0
  755. package/dist/shared/task-system-gating.d.ts +33 -0
  756. package/dist/shared/tmux/constants.d.ts +5 -0
  757. package/dist/shared/tmux/tmux-utils/environment.d.ts +3 -0
  758. package/dist/shared/tmux/tmux-utils/pane-dimensions.d.ts +5 -0
  759. package/dist/shared/tmux/tmux-utils/server-health.d.ts +2 -0
  760. package/dist/shared/tmux/tmux-utils.d.ts +4 -0
  761. package/dist/shared/tmux/types.d.ts +4 -0
  762. package/dist/shared/token-cache.d.ts +23 -0
  763. package/dist/shared/tool-guards.d.ts +16 -0
  764. package/dist/shared/transcript-path.d.ts +1 -0
  765. package/dist/shared/truncate-description.d.ts +1 -0
  766. package/dist/shared/unwrap-list.d.ts +1 -0
  767. package/dist/shared/wallclock-outcome.d.ts +18 -0
  768. package/dist/shared/with-ephemeral-session.d.ts +16 -0
  769. package/dist/shared/with-timeout.d.ts +1 -0
  770. package/dist/shared/zip-extractor.d.ts +1 -0
  771. package/dist/skills/index.d.ts +4 -0
  772. package/dist/skills/lazy-skill-helper.d.ts +17 -0
  773. package/dist/skills/schemas/audits-store.d.ts +90 -0
  774. package/dist/skills/schemas/security-audit.d.ts +144 -0
  775. package/dist/skills/skills/bdd-backend.d.ts +3 -0
  776. package/dist/skills/skills/bdd-contract.d.ts +3 -0
  777. package/dist/skills/skills/bdd-frontend.d.ts +3 -0
  778. package/dist/skills/skills/bdd-tests.d.ts +3 -0
  779. package/dist/skills/skills/ccxt-pro-websockets.d.ts +3 -0
  780. package/dist/skills/skills/ccxt-rest.d.ts +3 -0
  781. package/dist/skills/skills/crypto-market-structure.d.ts +3 -0
  782. package/dist/skills/skills/data-quality-observability.d.ts +3 -0
  783. package/dist/skills/skills/dev-browser.d.ts +2 -0
  784. package/dist/skills/skills/docker-master.d.ts +2 -0
  785. package/dist/skills/skills/document-reader.d.ts +2 -0
  786. package/dist/skills/skills/dsl-codegen.d.ts +3 -0
  787. package/dist/skills/skills/dsl-composition.d.ts +3 -0
  788. package/dist/skills/skills/dsl-core.d.ts +3 -0
  789. package/dist/skills/skills/dsl-grammar.d.ts +3 -0
  790. package/dist/skills/skills/dsl-metamodel.d.ts +3 -0
  791. package/dist/skills/skills/dsl-model-transformation.d.ts +3 -0
  792. package/dist/skills/skills/dsl-pyecore-advanced.d.ts +3 -0
  793. package/dist/skills/skills/dsl-testing.d.ts +3 -0
  794. package/dist/skills/skills/dsl-textx-ecosystem.d.ts +3 -0
  795. package/dist/skills/skills/dsl-tooling.d.ts +3 -0
  796. package/dist/skills/skills/dsl-validation.d.ts +3 -0
  797. package/dist/skills/skills/frontend-a11y.d.ts +3 -0
  798. package/dist/skills/skills/frontend-build-tooling.d.ts +3 -0
  799. package/dist/skills/skills/frontend-perf.d.ts +3 -0
  800. package/dist/skills/skills/frontend-react-nextjs.d.ts +3 -0
  801. package/dist/skills/skills/frontend-state-data.d.ts +3 -0
  802. package/dist/skills/skills/frontend-svelte-sveltekit.d.ts +3 -0
  803. package/dist/skills/skills/frontend-testing.d.ts +3 -0
  804. package/dist/skills/skills/frontend-ui-ux.d.ts +2 -0
  805. package/dist/skills/skills/git-master.d.ts +2 -0
  806. package/dist/skills/skills/grafana-dashboards.d.ts +3 -0
  807. package/dist/skills/skills/index.d.ts +69 -0
  808. package/dist/skills/skills/influxdb-timeseries.d.ts +3 -0
  809. package/dist/skills/skills/market-data-architecture.d.ts +3 -0
  810. package/dist/skills/skills/market-data-bus.d.ts +3 -0
  811. package/dist/skills/skills/market-data-robustness-review.d.ts +3 -0
  812. package/dist/skills/skills/matrixx-self-config.d.ts +3 -0
  813. package/dist/skills/skills/playwright-cli.d.ts +10 -0
  814. package/dist/skills/skills/playwright.d.ts +3 -0
  815. package/dist/skills/skills/python-asyncio.d.ts +3 -0
  816. package/dist/skills/skills/quality-gate.d.ts +2 -0
  817. package/dist/skills/skills/remove-ai-slops.d.ts +2 -0
  818. package/dist/skills/skills/resilience-error-taxonomy.d.ts +3 -0
  819. package/dist/skills/skills/resilience-failure-hunting.d.ts +3 -0
  820. package/dist/skills/skills/review-work.d.ts +2 -0
  821. package/dist/skills/skills/security-api.d.ts +3 -0
  822. package/dist/skills/skills/security-audit.d.ts +3 -0
  823. package/dist/skills/skills/security-core.d.ts +3 -0
  824. package/dist/skills/skills/security-crypto.d.ts +3 -0
  825. package/dist/skills/skills/security-dast.d.ts +3 -0
  826. package/dist/skills/skills/security-dependencies.d.ts +3 -0
  827. package/dist/skills/skills/security-infra.d.ts +3 -0
  828. package/dist/skills/skills/security-review.d.ts +3 -0
  829. package/dist/skills/skills/security-sast.d.ts +3 -0
  830. package/dist/skills/skills/security-secrets.d.ts +3 -0
  831. package/dist/skills/skills/silent-failure-detection.d.ts +3 -0
  832. package/dist/skills/skills/software-dev.d.ts +2 -0
  833. package/dist/skills/skills/systematic-debugging.d.ts +2 -0
  834. package/dist/skills/skills/tdd-enforcer.d.ts +2 -0
  835. package/dist/skills/skills/telegram-bot.d.ts +3 -0
  836. package/dist/skills/skills/time-series-fundamentals.d.ts +3 -0
  837. package/dist/skills/skills/ulw-research.d.ts +2 -0
  838. package/dist/skills/skills/zeromq-advanced-reqrep.d.ts +3 -0
  839. package/dist/skills/skills/zeromq-architecture.d.ts +3 -0
  840. package/dist/skills/skills/zeromq-core.d.ts +3 -0
  841. package/dist/skills/skills/zeromq-frameworks.d.ts +3 -0
  842. package/dist/skills/skills/zeromq-pubsub.d.ts +3 -0
  843. package/dist/skills/skills/zeromq-reliability.d.ts +3 -0
  844. package/dist/skills/skills/zeromq-sockets-patterns.d.ts +3 -0
  845. package/dist/skills/skills.d.ts +7 -0
  846. package/dist/skills/skills.transform.d.ts +27 -0
  847. package/dist/skills/types.d.ts +24 -0
  848. package/dist/tool-entry.d.ts +6 -0
  849. package/dist/tools/assembly/assembly-executor.d.ts +17 -0
  850. package/dist/tools/assembly/constants.d.ts +6 -0
  851. package/dist/tools/assembly/provider-selector.d.ts +3 -0
  852. package/dist/tools/assembly/synthesizer.d.ts +3 -0
  853. package/dist/tools/assembly/tool-description.d.ts +2 -0
  854. package/dist/tools/assembly/tools.d.ts +10 -0
  855. package/dist/tools/assembly/types.d.ts +25 -0
  856. package/dist/tools/assembly/voter-spawner.d.ts +3 -0
  857. package/dist/tools/ast-grep/cli-binary-path-resolution.d.ts +4 -0
  858. package/dist/tools/ast-grep/cli.d.ts +12 -0
  859. package/dist/tools/ast-grep/constants.d.ts +4 -0
  860. package/dist/tools/ast-grep/downloader.d.ts +4 -0
  861. package/dist/tools/ast-grep/environment-check.d.ts +16 -0
  862. package/dist/tools/ast-grep/language-support.d.ts +5 -0
  863. package/dist/tools/ast-grep/pattern-hints.d.ts +4 -0
  864. package/dist/tools/ast-grep/process-output-timeout.d.ts +12 -0
  865. package/dist/tools/ast-grep/result-formatter.d.ts +3 -0
  866. package/dist/tools/ast-grep/sg-cli-path.d.ts +3 -0
  867. package/dist/tools/ast-grep/sg-compact-json-output.d.ts +2 -0
  868. package/dist/tools/ast-grep/tool-descriptions.d.ts +3 -0
  869. package/dist/tools/ast-grep/tools.d.ts +3 -0
  870. package/dist/tools/ast-grep/types.d.ts +35 -0
  871. package/dist/tools/background-task/clients.d.ts +26 -0
  872. package/dist/tools/background-task/constants.d.ts +4 -0
  873. package/dist/tools/background-task/create-background-cancel.d.ts +4 -0
  874. package/dist/tools/background-task/create-background-output.d.ts +4 -0
  875. package/dist/tools/background-task/create-background-revive.d.ts +3 -0
  876. package/dist/tools/background-task/create-background-wait-all.d.ts +3 -0
  877. package/dist/tools/background-task/full-session-format.d.ts +9 -0
  878. package/dist/tools/background-task/index.d.ts +3 -0
  879. package/dist/tools/background-task/message-dir.d.ts +1 -0
  880. package/dist/tools/background-task/session-messages.d.ts +3 -0
  881. package/dist/tools/background-task/task-result-format.d.ts +3 -0
  882. package/dist/tools/background-task/task-status-format.d.ts +2 -0
  883. package/dist/tools/background-task/time-format.d.ts +1 -0
  884. package/dist/tools/background-task/tools.d.ts +5 -0
  885. package/dist/tools/background-task/truncate-text.d.ts +1 -0
  886. package/dist/tools/background-task/types.d.ts +79 -0
  887. package/dist/tools/bdd-create-contract/constants.d.ts +1 -0
  888. package/dist/tools/bdd-create-contract/tools.d.ts +3 -0
  889. package/dist/tools/bdd-create-contract/types.d.ts +12 -0
  890. package/dist/tools/bdd-parse-gherkin/constants.d.ts +1 -0
  891. package/dist/tools/bdd-parse-gherkin/tools.d.ts +5 -0
  892. package/dist/tools/bdd-parse-gherkin/types.d.ts +9 -0
  893. package/dist/tools/bdd-pipeline/analysis-report-sections.d.ts +10 -0
  894. package/dist/tools/bdd-pipeline/analysis-report.d.ts +9 -0
  895. package/dist/tools/bdd-pipeline/constants.d.ts +4 -0
  896. package/dist/tools/bdd-pipeline/feature-resolver.d.ts +5 -0
  897. package/dist/tools/bdd-pipeline/pipeline-runner.d.ts +6 -0
  898. package/dist/tools/bdd-pipeline/subagent-runner.d.ts +14 -0
  899. package/dist/tools/bdd-pipeline/tools.d.ts +5 -0
  900. package/dist/tools/bdd-pipeline/types.d.ts +74 -0
  901. package/dist/tools/bdd-validate-contract/tools.d.ts +21 -0
  902. package/dist/tools/dashboard-flux-validator/constants.d.ts +8 -0
  903. package/dist/tools/dashboard-flux-validator/tools.d.ts +3 -0
  904. package/dist/tools/dashboard-flux-validator/types.d.ts +20 -0
  905. package/dist/tools/dashboard-flux-validator/validator.d.ts +5 -0
  906. package/dist/tools/delegate-task/available-models.d.ts +2 -0
  907. package/dist/tools/delegate-task/background-continuation.d.ts +3 -0
  908. package/dist/tools/delegate-task/background-task.d.ts +8 -0
  909. package/dist/tools/delegate-task/categories.d.ts +22 -0
  910. package/dist/tools/delegate-task/category-resolver.d.ts +24 -0
  911. package/dist/tools/delegate-task/complexity-constants.d.ts +23 -0
  912. package/dist/tools/delegate-task/complexity-scorer.d.ts +31 -0
  913. package/dist/tools/delegate-task/complexity-types.d.ts +10 -0
  914. package/dist/tools/delegate-task/constants.d.ts +37 -0
  915. package/dist/tools/delegate-task/default-model.d.ts +27 -0
  916. package/dist/tools/delegate-task/diagnostic-shape.d.ts +4 -0
  917. package/dist/tools/delegate-task/error-formatting.d.ts +6 -0
  918. package/dist/tools/delegate-task/executor-types.d.ts +37 -0
  919. package/dist/tools/delegate-task/executor.d.ts +11 -0
  920. package/dist/tools/delegate-task/index.d.ts +10 -0
  921. package/dist/tools/delegate-task/model-selection.d.ts +11 -0
  922. package/dist/tools/delegate-task/model-string-parser.d.ts +7 -0
  923. package/dist/tools/delegate-task/mouse-agent.d.ts +1 -0
  924. package/dist/tools/delegate-task/parent-context-resolver.d.ts +3 -0
  925. package/dist/tools/delegate-task/prompt-builder.d.ts +7 -0
  926. package/dist/tools/delegate-task/skill-resolver.d.ts +8 -0
  927. package/dist/tools/delegate-task/software-dev-enforcement.d.ts +1 -0
  928. package/dist/tools/delegate-task/software-dev-payload.d.ts +1 -0
  929. package/dist/tools/delegate-task/subagent-resolver.d.ts +11 -0
  930. package/dist/tools/delegate-task/sync-continuation-deps.d.ts +7 -0
  931. package/dist/tools/delegate-task/sync-continuation.d.ts +4 -0
  932. package/dist/tools/delegate-task/sync-empty-retry.d.ts +8 -0
  933. package/dist/tools/delegate-task/sync-prompt-sender.d.ts +27 -0
  934. package/dist/tools/delegate-task/sync-result-fetcher.d.ts +13 -0
  935. package/dist/tools/delegate-task/sync-session-creator.d.ts +21 -0
  936. package/dist/tools/delegate-task/sync-session-poller.d.ts +18 -0
  937. package/dist/tools/delegate-task/sync-task-deps.d.ts +11 -0
  938. package/dist/tools/delegate-task/sync-task.d.ts +10 -0
  939. package/dist/tools/delegate-task/task-title.d.ts +11 -0
  940. package/dist/tools/delegate-task/timing.d.ts +16 -0
  941. package/dist/tools/delegate-task/tool-options.d.ts +12 -0
  942. package/dist/tools/delegate-task/tools.d.ts +16 -0
  943. package/dist/tools/delegate-task/types.d.ts +90 -0
  944. package/dist/tools/delegate-task/unstable-agent-task.d.ts +8 -0
  945. package/dist/tools/evolution/constants.d.ts +24 -0
  946. package/dist/tools/evolution/index.d.ts +3 -0
  947. package/dist/tools/evolution/query-actions.d.ts +3 -0
  948. package/dist/tools/evolution/tools.d.ts +16 -0
  949. package/dist/tools/evolution/types.d.ts +20 -0
  950. package/dist/tools/github-search/cli.d.ts +7 -0
  951. package/dist/tools/github-search/constants.d.ts +6 -0
  952. package/dist/tools/github-search/result-formatter.d.ts +2 -0
  953. package/dist/tools/github-search/tools.d.ts +3 -0
  954. package/dist/tools/github-search/types.d.ts +20 -0
  955. package/dist/tools/glob/cli.d.ts +11 -0
  956. package/dist/tools/glob/constants.d.ts +6 -0
  957. package/dist/tools/glob/result-formatter.d.ts +2 -0
  958. package/dist/tools/glob/tools.d.ts +3 -0
  959. package/dist/tools/glob/types.d.ts +20 -0
  960. package/dist/tools/grep/cli.d.ts +2 -0
  961. package/dist/tools/grep/constants.d.ts +16 -0
  962. package/dist/tools/grep/downloader.d.ts +3 -0
  963. package/dist/tools/grep/result-formatter.d.ts +2 -0
  964. package/dist/tools/grep/tools.d.ts +3 -0
  965. package/dist/tools/grep/types.d.ts +32 -0
  966. package/dist/tools/handoff/archive-handler.d.ts +9 -0
  967. package/dist/tools/handoff/body-formatter.d.ts +9 -0
  968. package/dist/tools/handoff/constants.d.ts +14 -0
  969. package/dist/tools/handoff/create-handler.d.ts +35 -0
  970. package/dist/tools/handoff/git.d.ts +12 -0
  971. package/dist/tools/handoff/list-handler.d.ts +8 -0
  972. package/dist/tools/handoff/read-handler.d.ts +8 -0
  973. package/dist/tools/handoff/tools.d.ts +11 -0
  974. package/dist/tools/hashline-edit/autocorrect-replacement-lines.d.ts +1 -0
  975. package/dist/tools/hashline-edit/constants.d.ts +34 -0
  976. package/dist/tools/hashline-edit/diff-utils.d.ts +6 -0
  977. package/dist/tools/hashline-edit/edit-deduplication.d.ts +5 -0
  978. package/dist/tools/hashline-edit/edit-operation-primitives.d.ts +10 -0
  979. package/dist/tools/hashline-edit/edit-operations.d.ts +9 -0
  980. package/dist/tools/hashline-edit/edit-ordering.d.ts +4 -0
  981. package/dist/tools/hashline-edit/edit-text-normalization.d.ts +5 -0
  982. package/dist/tools/hashline-edit/file-text-canonicalization.d.ts +8 -0
  983. package/dist/tools/hashline-edit/hash-computation.d.ts +17 -0
  984. package/dist/tools/hashline-edit/hashline-chunk-formatter.d.ts +10 -0
  985. package/dist/tools/hashline-edit/hashline-edit-executor.d.ts +10 -0
  986. package/dist/tools/hashline-edit/index.d.ts +6 -0
  987. package/dist/tools/hashline-edit/normalize-edits.d.ts +10 -0
  988. package/dist/tools/hashline-edit/tool-description.d.ts +1 -0
  989. package/dist/tools/hashline-edit/tools.d.ts +2 -0
  990. package/dist/tools/hashline-edit/types.d.ts +17 -0
  991. package/dist/tools/hashline-edit/validation.d.ts +18 -0
  992. package/dist/tools/index.d.ts +42 -0
  993. package/dist/tools/interactive-bash/constants.d.ts +3 -0
  994. package/dist/tools/interactive-bash/index.d.ts +3 -0
  995. package/dist/tools/interactive-bash/tmux-path-resolver.d.ts +3 -0
  996. package/dist/tools/interactive-bash/tools.d.ts +7 -0
  997. package/dist/tools/knowledge-hub-confirm/tools.d.ts +12 -0
  998. package/dist/tools/look-at/assistant-message-extractor.d.ts +1 -0
  999. package/dist/tools/look-at/constants.d.ts +2 -0
  1000. package/dist/tools/look-at/look-at-arguments.d.ts +6 -0
  1001. package/dist/tools/look-at/mime-type-inference.d.ts +3 -0
  1002. package/dist/tools/look-at/multimodal-agent-metadata.d.ts +11 -0
  1003. package/dist/tools/look-at/tools.d.ts +4 -0
  1004. package/dist/tools/look-at/types.d.ts +5 -0
  1005. package/dist/tools/lsp/client.d.ts +3 -0
  1006. package/dist/tools/lsp/config.d.ts +3 -0
  1007. package/dist/tools/lsp/constants.d.ts +5 -0
  1008. package/dist/tools/lsp/diagnostics-tool.d.ts +2 -0
  1009. package/dist/tools/lsp/find-references-tool.d.ts +2 -0
  1010. package/dist/tools/lsp/goto-definition-tool.d.ts +2 -0
  1011. package/dist/tools/lsp/index.d.ts +8 -0
  1012. package/dist/tools/lsp/language-config.d.ts +1 -0
  1013. package/dist/tools/lsp/language-mappings.d.ts +3 -0
  1014. package/dist/tools/lsp/lsp-client-connection.d.ts +4 -0
  1015. package/dist/tools/lsp/lsp-client-transport.d.ts +20 -0
  1016. package/dist/tools/lsp/lsp-client-wrapper.d.ts +4 -0
  1017. package/dist/tools/lsp/lsp-client.d.ts +17 -0
  1018. package/dist/tools/lsp/lsp-formatters.d.ts +9 -0
  1019. package/dist/tools/lsp/lsp-manager-process-cleanup.d.ts +12 -0
  1020. package/dist/tools/lsp/lsp-manager-temp-directory-cleanup.d.ts +8 -0
  1021. package/dist/tools/lsp/lsp-process.d.ts +29 -0
  1022. package/dist/tools/lsp/lsp-server.d.ts +23 -0
  1023. package/dist/tools/lsp/rename-tools.d.ts +3 -0
  1024. package/dist/tools/lsp/server-config-loader.d.ts +25 -0
  1025. package/dist/tools/lsp/server-definitions.d.ts +3 -0
  1026. package/dist/tools/lsp/server-installation.d.ts +1 -0
  1027. package/dist/tools/lsp/server-resolution.d.ts +15 -0
  1028. package/dist/tools/lsp/symbols-tool.d.ts +2 -0
  1029. package/dist/tools/lsp/tools.d.ts +5 -0
  1030. package/dist/tools/lsp/types.d.ts +124 -0
  1031. package/dist/tools/lsp/workspace-edit.d.ts +8 -0
  1032. package/dist/tools/market-symbol-validator/constants.d.ts +14 -0
  1033. package/dist/tools/market-symbol-validator/tools.d.ts +3 -0
  1034. package/dist/tools/market-symbol-validator/types.d.ts +21 -0
  1035. package/dist/tools/market-symbol-validator/validator.d.ts +9 -0
  1036. package/dist/tools/notepad/constants.d.ts +24 -0
  1037. package/dist/tools/notepad/index.d.ts +20 -0
  1038. package/dist/tools/notepad/notepad-append.d.ts +4 -0
  1039. package/dist/tools/notepad/notepad-create.d.ts +3 -0
  1040. package/dist/tools/notepad/notepad-list.d.ts +3 -0
  1041. package/dist/tools/notepad/notepad-read.d.ts +3 -0
  1042. package/dist/tools/notepad/types.d.ts +14 -0
  1043. package/dist/tools/notepad/validation.d.ts +33 -0
  1044. package/dist/tools/pdf-extract-figures/tools.d.ts +11 -0
  1045. package/dist/tools/plan/constants.d.ts +13 -0
  1046. package/dist/tools/plan/error-codes.d.ts +99 -0
  1047. package/dist/tools/plan/index.d.ts +7 -0
  1048. package/dist/tools/plan/plan-create.d.ts +3 -0
  1049. package/dist/tools/plan/plan-delete.d.ts +3 -0
  1050. package/dist/tools/plan/plan-list.d.ts +3 -0
  1051. package/dist/tools/plan/plan-read-pagination.d.ts +42 -0
  1052. package/dist/tools/plan/plan-read.d.ts +3 -0
  1053. package/dist/tools/plan/plan-tasks-clamp.d.ts +32 -0
  1054. package/dist/tools/plan/plan-tasks.d.ts +3 -0
  1055. package/dist/tools/plan/plan-update.d.ts +4 -0
  1056. package/dist/tools/plan/plan-write-guard.d.ts +38 -0
  1057. package/dist/tools/plan/section-edit.d.ts +24 -0
  1058. package/dist/tools/plan/section-index.d.ts +22 -0
  1059. package/dist/tools/plan/section-locate.d.ts +9 -0
  1060. package/dist/tools/plan/section-read.d.ts +24 -0
  1061. package/dist/tools/plan/status-transition.d.ts +47 -0
  1062. package/dist/tools/plan/types.d.ts +56 -0
  1063. package/dist/tools/preset/tools.d.ts +7 -0
  1064. package/dist/tools/session-cleanup/index.d.ts +13 -0
  1065. package/dist/tools/session-manager/constants.d.ts +9 -0
  1066. package/dist/tools/session-manager/path-normalize.d.ts +7 -0
  1067. package/dist/tools/session-manager/session-formatter.d.ts +11 -0
  1068. package/dist/tools/session-manager/storage.d.ts +61 -0
  1069. package/dist/tools/session-manager/tools.d.ts +4 -0
  1070. package/dist/tools/session-manager/types.d.ts +86 -0
  1071. package/dist/tools/shared/define-tool.d.ts +78 -0
  1072. package/dist/tools/silent-failure-scanner/constants.d.ts +10 -0
  1073. package/dist/tools/silent-failure-scanner/index.d.ts +4 -0
  1074. package/dist/tools/silent-failure-scanner/scanner.d.ts +8 -0
  1075. package/dist/tools/silent-failure-scanner/tools.d.ts +3 -0
  1076. package/dist/tools/silent-failure-scanner/types.d.ts +43 -0
  1077. package/dist/tools/skill/constants.d.ts +2 -0
  1078. package/dist/tools/skill/tools.d.ts +4 -0
  1079. package/dist/tools/skill/types.d.ts +22 -0
  1080. package/dist/tools/slashcommand/command-discovery.d.ts +2 -0
  1081. package/dist/tools/slashcommand/command-output-formatter.d.ts +3 -0
  1082. package/dist/tools/slashcommand/skill-command-converter.d.ts +3 -0
  1083. package/dist/tools/slashcommand/slashcommand-description.d.ts +3 -0
  1084. package/dist/tools/slashcommand/slashcommand-tool.d.ts +4 -0
  1085. package/dist/tools/slashcommand/tools.d.ts +2 -0
  1086. package/dist/tools/slashcommand/types.d.ts +46 -0
  1087. package/dist/tools/staleness-gap-checker/checker.d.ts +15 -0
  1088. package/dist/tools/staleness-gap-checker/constants.d.ts +3 -0
  1089. package/dist/tools/staleness-gap-checker/index.d.ts +4 -0
  1090. package/dist/tools/staleness-gap-checker/tools.d.ts +3 -0
  1091. package/dist/tools/staleness-gap-checker/types.d.ts +42 -0
  1092. package/dist/tools/task/constants.d.ts +7 -0
  1093. package/dist/tools/task/create-one.d.ts +21 -0
  1094. package/dist/tools/task/index.d.ts +6 -0
  1095. package/dist/tools/task/task-cleanup.d.ts +4 -0
  1096. package/dist/tools/task/task-create.d.ts +4 -0
  1097. package/dist/tools/task/task-get.d.ts +4 -0
  1098. package/dist/tools/task/task-list.d.ts +4 -0
  1099. package/dist/tools/task/task-update.d.ts +4 -0
  1100. package/dist/tools/task/types.d.ts +156 -0
  1101. package/dist/tools.js +10856 -0
  1102. package/package.json +115 -4
@@ -0,0 +1 @@
1
+ export declare const HANDOFF_TEMPLATE = "# Handoff Command\n\n## Purpose\n\nUse /handoff when:\n- The current session context is getting too long and quality is degrading\n- You want to start fresh while preserving essential context from this session\n- The context window is approaching capacity\n\nThis creates a detailed context summary written to .matrixx/handoff.md. The next session loads it via /pickup.\n\n---\n\n# PHASE 0: VALIDATE REQUEST\n\nBefore proceeding, confirm:\n- [ ] There is meaningful work or context in this session to preserve\n- [ ] The user wants to create a handoff summary (not just asking about it)\n\nIf the session is nearly empty or has no meaningful context, inform the user there is nothing substantial to hand off.\n\n---\n\n# PHASE 1: GATHER PROGRAMMATIC CONTEXT\n\nExecute these tools to gather concrete data:\n\n1. session_read({ session_id: \"$SESSION_ID\" }) \u2014 full session history\n2. task_list() \u2014 current task progress\n3. Bash({ command: \"git diff --stat HEAD~10..HEAD\" }) \u2014 recent file changes\n4. Bash({ command: \"git status --porcelain\" }) \u2014 uncommitted changes\n\nAnalyze the gathered outputs to understand:\n- What the user asked for (exact wording)\n- What work was completed\n- What tasks remain incomplete\n- What decisions were made\n- What files were modified or discussed\n- What patterns, constraints, or preferences were established\n\n---\n\n# PHASE 2: CALL HANDOFF TOOL\n\nCall the `handoff` tool with `action=\"create\"` and the data you gathered. The tool validates the input and writes the handoff file automatically \u2014 no manual file writing needed.\n\nUse these field mappings for the tool arguments:\n\n```\nhandoff({\n action: \"create\",\n topics: [\"tag1\", \"tag2\"], // Min 1 topic tag, from session context\n user_requests: \"verbatim user msg\", // REQUIRED \u2014 exact wording from session_read\n goal: \"single sentence\", // REQUIRED \u2014 what should be done next\n work_completed: [\"did X\", \"did Y\"], // REQUIRED \u2014 first-person bullet points\n current_state: \"state description\", // REQUIRED \u2014 current codebase/task state\n pending_tasks: [\"task1\", \"task2\"], // Optional \u2014 tasks not yet completed\n key_files: [{path, purpose}], // Optional \u2014 max 10, workspace-relative paths\n important_decisions: [{decision, rationale}], // Optional \u2014 key decisions made\n explicit_constraints: [\"verbatim\"], // Optional \u2014 verbatim constraints only\n context_for_continuation: \"...\" // Optional \u2014 additional context\n})\n```\n\n---\n\n# PHASE 3: INFORM USER\n\nAfter the tool call completes, inform the user:\n\n```\nHandoff saved to .matrixx/handoff.md. Use /pickup in a new opencode session to load this context.\n```\n\n---\n\n# IMPORTANT CONSTRAINTS\n\n- DO gather programmatic context before calling the tool (Phase 1 is mandatory)\n- DO extract user_requests verbatim from session_read output (do not paraphrase)\n- DO keep goal to a single sentence\n- DO use workspace-relative paths for key_files\n- DO NOT attempt to create new sessions programmatically\n- DO NOT exceed 10 files in key_files (max 10)\n- DO NOT include sensitive information (API keys, credentials, secrets)\n- DO use first person perspective for work_completed items\n- DO use plain text with bullets for descriptions (no markdown headers)\n";
@@ -0,0 +1 @@
1
+ export declare const HUMANIZE_TEMPLATE = "# Humanize Command\n\n## Usage\n```\n/humanize [target] [--mode=text|comments|code|all] [--dry-run]\n\nArguments:\n target: What to humanize. Can be:\n - File path: src/auth/handler.ts / docs/guide.md\n - Directory: src/features/\n - Glob: src/**/*.ts\n - Inline prose: quoted string \"...\" (text mode)\n - Omitted: defaults to git-changed files (git diff --name-only HEAD~1), else src/\n\nOptions:\n --mode: Pipeline mode (default: all when target is code file/dir; text when target is prose/md or quoted string)\n - text: prose quality only (clarity, concision, natural voice)\n - comments: comment quality only (slop categories 1, 4)\n - code: code quality only (slop categories 2, 3, 5, 6, 7)\n - all: route each finding to its mode and run the full pipeline\n\n --dry-run: Report findings WITHOUT modifying anything (default: false)\n```\n\n## What This Command Does\n\nRaises prose, comment, and code quality to a natural human standard through a\nguided, approval-gated pipeline. Three modes route findings to the right rules:\n\n1. **text** - Prose quality: clarity, concision, natural voice, structure.\n2. **comments** - Comment quality: slop Categories 1 and 4. Rewrite or delete;\n preserve intent-bearing comments (why, not what).\n3. **code** - Code quality: slop Categories 2, 3, 5, 6, 7. Simplify without\n behavior change.\n4. **all** - Route each finding to its mode and run the full pipeline.\n\n**Quality-focused only. NO-detector-evasion: this command does NOT include,\nsuggest, or facilitate any detector-bypass techniques or guidance. No\nobfuscation tricks, no \"beat the detector\" heuristics, no paraphrase-to-evade\npatterns. Quality improvements only.**\n\n---\n\n# PHASE 0: VALIDATE REQUEST (MANDATORY FIRST STEP)\n\n## Step 0.1: Parse Target and Mode\n\n| Input | Interpretation |\n|-------|---------------|\n| File path (src/auth/handler.ts, docs/guide.md) | Scan that file only |\n| Directory path (src/features/) | Scan all source files in directory |\n| Glob pattern (src/**/*.ts) | Scan matching files |\n| Quoted string (\"...\") | Inline prose, text mode |\n| No argument | git-changed files (git diff --name-only HEAD~1), else src/ |\n\nMode routing:\n- Target is code file/dir/glob -> default mode: all\n- Target is prose/md file or quoted string -> default mode: text\n- Explicit --mode always wins over the default\n\n## Step 0.2: Detect --dry-run Flag\n\nIf --dry-run is present or user says \"just show me\" / \"report only\":\n- Set dry-run mode: report findings WITHOUT modifying anything\n- Skip PHASE 3 (guided fix) entirely; stop after the Phase 2 report\n\n## Step 0.3: Create Initial Todos\n\n```\ntask_create({ items: [\n {\"subject\": \"PHASE 1: Scan/Detect - run applicable detectors per mode\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 2: Report - structured findings with severity and status\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 3: Guided Fix - per-finding approval, never auto-apply\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 4: Verify - diagnostics, typecheck, lint, tests\", \"priority\": \"high\"}\n]})\n```\n\n---\n\n# PHASE 1: SCAN/DETECT\n\n**Mark PHASE 1 as in_progress.**\n\n## 1.1: Text Mode \u2014 Prose-Quality Rules\n\nFor prose files (.md, .txt) and quoted strings, flag:\n\n- **clarity** - one idea per sentence, active voice preference, concrete over abstract\n- **concision** - cut filler, no redundant hedges\n- **natural voice** - varied sentence length, no formulaic openers/closers; avoid\n formulaic phrasing as a quality matter (never as evasion)\n- **structure** - logical flow, scannable headings\n\n## 1.2: Comments Mode \u2014 Categories 1 and 4\n\n### Category 1: Verbose Comments (LOW)\n\nComments restating the obvious; empty JSDoc. Detection: ast_grep_search\n(`// $COMMENT` where $COMMENT matches obvious patterns), grep for known AI\ncomment phrases. Flag: `// Loop through each item`, `// Initialize variable`,\n`// Return result`, block comments repeating the function signature.\n\n### Category 4: Generic AI Phrasing (LOW)\n\nCode comments and documentation with AI-typical phrasing. Detection: grep -i\ncase-insensitive for the 17 flagged phrases: \"It's worth noting that\",\n\"It is important to note\", \"It is important to mention\",\n\"Let's step through this\", \"In conclusion\", \"As previously mentioned\",\n\"It should be noted that\", \"It's crucial to understand\",\n\"Let's break this down\", \"The beauty of this approach\",\n\"This is a classic example of\", \"Essentially, what this does is\",\n\"In the world of\", \"When it comes to\", \"One might argue that\",\n\"It goes without saying\".\n\n## 1.3: Code Mode \u2014 Categories 2, 3, 5, 6, 7\n\n### Category 2: Redundant Error Handling (MEDIUM)\n\nEmpty catch blocks (`catch (e) {}`), catch-log-rethrow\n(`catch(e) { console.error(e); throw e; }`), over-wrapped try/catch,\n`catch (error: any)` (unknown preferred). Detection: ast_grep_search for\n`catch($$$) { $$$ }`, lsp_find_references for redundant null checks.\n\n### Category 3: Over-Engineered Patterns (HIGH)\n\nSingle-implementation interfaces, builder-for-3-props, single strategy,\nAbstract*Factory*Manager naming, deep generics. Detection:\nlsp_find_references to check single implementations, ast_grep_search for class\nnames containing \"Abstract\", \"Factory\", \"Builder\", \"Manager\", grep for\n*Abstract*, *Factory*, *Proxy*, *Singleton* patterns.\n\n### Category 5: Cargo-Cult Boilerplate (MEDIUM)\n\nCopy-pasted error blocks, redundant guards, console.log in prod, TODO stubs.\nDetection: grep for repeated identical blocks, ast_grep_search for try/catch\nin every function, grep for TODO/FIXME/HACK in non-test files.\n\n### Category 6: Padding/Verbosity (LOW)\n\nEmpty @returns tags, obvious @param descriptions, redundant annotations\n(`const x: string = \"hello\"`), unnecessary intermediates\n(`const result = doSomething(); return result;`), unused destructured vars.\nDetection: ast_grep_search for redundant casts and arrow wrappers, grep for\nempty @returns, lsp_diagnostics for unused variables.\n\n### Category 7: Weird Codegen Artifacts (MEDIUM-HIGH)\n\nMixed import styles, mixed async styles, unused imports, `import *` for one\nsymbol, inline types belonging in shared files, magic numbers,\nlanguage-mismatched conventions. Detection: grep for mixed module systems,\nlsp_diagnostics for unused imports, ast_grep_search for inline type\ndefinitions that should be shared.\n\nBatching: for --all or large scopes, process files in groups of 5.\nDedupe findings; group by file with line ranges.\n\n**Mark PHASE 1 as completed.**\n\n---\n\n# PHASE 2: REPORT\n\n**Mark PHASE 2 as in_progress.**\n\nPresent a structured report:\n\n```\n## Humanize Report\n\n### Scan Target: [path]\n### Mode: [text|comments|code|all]\n### Findings: [N] ([X] text, [Y] comments, [Z] code)\n\n| Category | Count | Severity |\n|----------|-------|----------|\n| Prose quality | N | LOW |\n| 1. Verbose Comments | N | LOW |\n| 2. Redundant Error Handling | N | MEDIUM |\n| 3. Over-Engineered Patterns | N | HIGH |\n| 4. Generic AI Phrasing | N | LOW |\n| 5. Cargo-Cult Boilerplate | N | MEDIUM |\n| 6. Padding/Verbosity | N | LOW |\n| 7. Codegen Artifacts | N | MEDIUM-HIGH |\n\n### Findings by File\n\n#### [SEVERITY] Category N: Title \u2014 Location\n- **Location**: line X-Y\n- **Current**: [original text/code]\n- **Suggestion**: [proposed rewrite/simplification]\n- **Severity**: [LOW|MEDIUM|HIGH|MEDIUM-HIGH]\n- **Status**: PENDING\n```\n\nIf --dry-run mode: present the report and STOP. Do not proceed to Phase 3.\n\n```\nThis was a dry-run analysis. No code was modified.\nTo apply fixes, run: /humanize [same-target] [--mode=...]\n```\n\n**Mark PHASE 2 as completed.**\n\n---\n\n# PHASE 3: GUIDED FIX\n\n**Mark PHASE 3 as in_progress.**\n\nFor each finding, present the diff and ask the user:\n\n1. **Apply** - apply this fix\n2. **Skip** - mark as reviewed and acceptable\n3. **Snooze** - skip for now, flag for later review\n4. **Adjust** - user provides an alternative fix\n\nBatch support: user can say \"apply all LOW\" or \"apply all for file X\" to\nbatch-approve.\n\n**NEVER auto-apply fixes without user approval.** ALWAYS show the proposed\nchange before applying. ALWAYS run lsp_diagnostics after each edit. Mark each\nfinding as FIXED / SKIPPED.\n\n**Mark PHASE 3 as completed.**\n\n---\n\n# PHASE 4: VERIFY\n\n**Mark PHASE 4 as in_progress.**\n\nAfter all fixes applied:\n\n1. lsp_diagnostics on all changed files - no new errors\n2. `bun run typecheck` - no new type errors\n3. `bun run lint` - no new lint errors\n4. Run affected tests - no new failures\n\nGenerate a summary report (fixed count, skipped count, files modified,\nverification results).\n\n**Mark PHASE 4 as completed.**\n\n---\n\n# CRITICAL RULES\n\n## NEVER DO\n- Include, suggest, or facilitate any detector-evasion or detector-bypass\n techniques, heuristics, or guidance of any kind\n- NEVER auto-apply fixes without explicit user approval per finding or batch\n- Skip lsp_diagnostics after an edit\n- Proceed with new type errors, new lint errors, or new test failures\n- Modify behavior when simplifying code (quality refactors only)\n- Use `as any`, `@ts-ignore`, `@ts-expect-error` to suppress fix side effects\n\n## ALWAYS DO\n- Parse target, mode, and --dry-run before scanning\n- Route each finding to its mode (text/comments/code)\n- Show the proposed diff and wait for approval before editing\n- Run lsp_diagnostics after each edit\n- Verify with typecheck, lint, and affected tests in Phase 4\n- Keep todos updated in real-time\n\n## ABORT CONDITIONS\nIf any of these occur, STOP and consult user:\n- Type errors appear after a fix (new, not pre-existing)\n- Lint errors appear after a fix (new, not pre-existing)\n- Tests fail after a fix (new failures, not pre-existing)\n- More than 20 findings in a single file (likely misconfiguration)\n\n<user-request>\n$ARGUMENTS\n</user-request>\n";
@@ -0,0 +1 @@
1
+ export declare const INIT_DEEP_TEMPLATE = "# /init-deep\n\nGenerate hierarchical AGENTS.md files. Root + complexity-scored subdirectories.\n\n## Usage\n\n```\n/init-deep # Update mode: modify existing + create new where warranted\n/init-deep --create-new # Read existing \u2192 remove all \u2192 regenerate from scratch\n/init-deep --max-depth=2 # Limit directory depth (default: 3)\n```\n\n---\n\n## Workflow (High-Level)\n\n1. **Discovery + Analysis** (concurrent)\n - Fire background explore agents immediately\n - Main session: bash structure + LSP codemap + read existing AGENTS.md\n2. **Score & Decide** - Determine AGENTS.md locations from merged findings\n3. **Generate** - Root first, then subdirs in parallel\n4. **Review** - Deduplicate, trim, validate\n\n<critical>\n**task_create ALL phases. Mark in_progress \u2192 completed in real-time.**\n```\ntask_create({ items: [\n { subject: \"discovery\", priority: \"high\", description: \"Fire explore agents + LSP codemap + read existing\" },\n { subject: \"scoring\", priority: \"high\", description: \"Score directories, determine locations\" },\n { subject: \"generate\", priority: \"high\", description: \"Generate AGENTS.md files (root + subdirs)\" },\n { subject: \"review\", priority: \"medium\", description: \"Deduplicate, validate, trim\" }\n]})\n```\n</critical>\n\n---\n\n## Phase 1: Discovery + Analysis (Concurrent)\n\n**Mark \"discovery\" as in_progress.**\n\n### Fire Background Explore Agents IMMEDIATELY\n\nDon't wait\u2014these run async while main session works.\n\n```\n// Fire all at once, collect results later\ntask(subagent_type=\"trinity\", load_skills=[], description=\"Explore project structure\", run_in_background=true, prompt=\"Project structure: PREDICT standard patterns for detected language \u2192 REPORT deviations only\")\ntask(subagent_type=\"trinity\", load_skills=[], description=\"Find entry points\", run_in_background=true, prompt=\"Entry points: FIND main files \u2192 REPORT non-standard organization\")\ntask(subagent_type=\"trinity\", load_skills=[], description=\"Find conventions\", run_in_background=true, prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) \u2192 REPORT project-specific rules\")\ntask(subagent_type=\"trinity\", load_skills=[], description=\"Find anti-patterns\", run_in_background=true, prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments \u2192 LIST forbidden patterns\")\ntask(subagent_type=\"trinity\", load_skills=[], description=\"Explore build/CI\", run_in_background=true, prompt=\"Build/CI: FIND .github/workflows, Makefile \u2192 REPORT non-standard patterns\")\ntask(subagent_type=\"trinity\", load_skills=[], description=\"Find test patterns\", run_in_background=true, prompt=\"Test patterns: FIND test configs, test structure \u2192 REPORT unique conventions\")\n```\n\n<dynamic-agents>\n**DYNAMIC AGENT SPAWNING**: After bash analysis, spawn ADDITIONAL explore agents based on project scale:\n\n| Factor | Threshold | Additional Agents |\n|--------|-----------|-------------------|\n| **Total files** | >100 | +1 per 100 files |\n| **Total lines** | >10k | +1 per 10k lines |\n| **Directory depth** | \u22654 | +2 for deep exploration |\n| **Large files (>500 lines)** | >10 files | +1 for complexity hotspots |\n| **Monorepo** | detected | +1 per package/workspace |\n| **Multiple languages** | >1 | +1 per language |\n\n```bash\n# Measure project scale first\ntotal_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)\n```\n\nExample spawning:\n```\n// 500 files, 50k lines, depth 6, 15 large files \u2192 spawn 5+5+2+1 = 13 additional agents\ntask(subagent_type=\"trinity\", load_skills=[], description=\"Analyze large files\", run_in_background=true, prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots\")\ntask(subagent_type=\"trinity\", load_skills=[], description=\"Explore deep modules\", run_in_background=true, prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions\")\ntask(subagent_type=\"trinity\", load_skills=[], description=\"Find shared utilities\", run_in_background=true, prompt=\"Cross-cutting concerns: FIND shared utilities across directories\")\n// ... more based on calculation\n```\n</dynamic-agents>\n\n### Main Session: Concurrent Analysis\n\n**While background agents run**, main session does:\n\n#### 1. Bash Structural Analysis\n```bash\n# Directory depth + file counts\nfind . -type d -not -path '*/\\.*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c\n\n# Files per directory (top 30)\nfind . -type f -not -path '*/\\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30\n\n# Code concentration by extension\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20\n\n# Existing AGENTS.md / CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*/node_modules/*' 2>/dev/null\n```\n\n#### 2. Read Existing AGENTS.md\n```\nFor each existing file found:\n Read(filePath=file)\n Extract: key insights, conventions, anti-patterns\n Store in EXISTING_AGENTS map\n```\n\nIf `--create-new`: Read all existing first (preserve context) \u2192 then delete all \u2192 regenerate.\n\n#### 3. LSP Codemap (if available)\n```\nLspServers() # Check availability\n\n# Entry points (parallel)\nLspDocumentSymbols(filePath=\"src/index.ts\")\nLspDocumentSymbols(filePath=\"main.py\")\n\n# Key symbols (parallel)\nLspWorkspaceSymbols(filePath=\".\", query=\"class\")\nLspWorkspaceSymbols(filePath=\".\", query=\"interface\")\nLspWorkspaceSymbols(filePath=\".\", query=\"function\")\n\n# Centrality for top exports\nLspFindReferences(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP Fallback**: If unavailable, rely on explore agents + AST-grep.\n\n### Collect Background Results\n\n```\n// After main session analysis done, collect all task results\nfor each task_id: background_output(task_id=\"...\")\n```\n\n**Merge: bash + LSP + existing + explore findings. Mark \"discovery\" as completed.**\n\n---\n\n## Phase 2: Scoring & Location Decision\n\n**Mark \"scoring\" as in_progress.**\n\n### Scoring Matrix\n\n| Factor | Weight | High Threshold | Source |\n|--------|--------|----------------|--------|\n| File count | 3x | >20 | bash |\n| Subdir count | 2x | >5 | bash |\n| Code ratio | 2x | >70% | bash |\n| Unique patterns | 1x | Has own config | explore |\n| Module boundary | 2x | Has index.ts/__init__.py | bash |\n| Symbol density | 2x | >30 symbols | LSP |\n| Export count | 2x | >10 exports | LSP |\n| Reference centrality | 3x | >20 refs | LSP |\n\n### Decision Rules\n\n| Score | Action |\n|-------|--------|\n| **Root (.)** | ALWAYS create |\n| **>15** | Create AGENTS.md |\n| **8-15** | Create if distinct domain |\n| **<8** | Skip (parent covers) |\n\n### Output\n```\nAGENTS_LOCATIONS = [\n { path: \".\", type: \"root\" },\n { path: \"src/hooks\", score: 18, reason: \"high complexity\" },\n { path: \"src/api\", score: 12, reason: \"distinct domain\" }\n]\n```\n\n**Mark \"scoring\" as completed.**\n\n---\n\n## Phase 3: Generate AGENTS.md\n\n**Mark \"generate\" as in_progress.**\n\n<critical>\n**File Writing Rule**: If AGENTS.md already exists at the target path \u2192 use `Edit` tool. If it does NOT exist \u2192 use `Write` tool.\nNEVER use Write to overwrite an existing file. ALWAYS check existence first via `Read` or discovery results.\n</critical>\n\n### Root AGENTS.md (Full Treatment)\n\n```markdown\n# PROJECT KNOWLEDGE BASE\n\n**Generated:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW\n{1-2 sentences: what + core stack}\n\n## STRUCTURE\n\\`\\`\\`\n{root}/\n\u251C\u2500\u2500 {dir}/ # {non-obvious purpose only}\n\u2514\u2500\u2500 {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK\n| Task | Location | Notes |\n|------|----------|-------|\n\n## CODE MAP\n{From LSP - skip if unavailable or project <10 files}\n\n| Symbol | Type | Location | Refs | Role |\n|--------|------|----------|------|------|\n\n## CONVENTIONS\n{ONLY deviations from standard}\n\n## ANTI-PATTERNS (THIS PROJECT)\n{Explicitly forbidden here}\n\n## UNIQUE STYLES\n{Project-specific}\n\n## COMMANDS\n\\`\\`\\`bash\n{dev/test/build}\n\\`\\`\\`\n\n## NOTES\n{Gotchas}\n```\n\n**Quality gates**: 50-150 lines, no generic advice, no obvious info.\n\n### Subdirectory AGENTS.md (Parallel)\n\nLaunch writing tasks for each location:\n\n```\nfor loc in AGENTS_LOCATIONS (except root):\n task(category=\"broadcast\", load_skills=[], run_in_background=false, description=\"Generate AGENTS.md\", prompt=\\`\n Generate AGENTS.md for: ${loc.path}\n - Reason: ${loc.reason}\n - 30-80 lines max\n - NEVER repeat parent content\n - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n \\`)\n```\n\n**Wait for all. Mark \"generate\" as completed.**\n\n---\n\n## Phase 4: Review & Deduplicate\n\n**Mark \"review\" as in_progress.**\n\nFor each generated file:\n- Remove generic advice\n- Remove parent duplicates\n- Trim to size limits\n- Verify telegraphic style\n\n**Mark \"review\" as completed.**\n\n---\n\n## Final Report\n\n```\n=== init-deep Complete ===\n\nMode: {update | create-new}\n\nFiles:\n [OK] ./AGENTS.md (root, {N} lines)\n [OK] ./src/hooks/AGENTS.md ({N} lines)\n\nDirs Analyzed: {N}\nAGENTS.md Created: {N}\nAGENTS.md Updated: {N}\n\nHierarchy:\n ./AGENTS.md\n \u2514\u2500\u2500 src/hooks/AGENTS.md\n```\n\n---\n\n## Anti-Patterns\n\n- **Static agent count**: MUST vary agents based on project size/depth\n- **Sequential execution**: MUST parallel (explore + LSP concurrent)\n- **Ignoring existing**: ALWAYS read existing first, even with --create-new\n- **Over-documenting**: Not every dir needs AGENTS.md\n- **Redundancy**: Child never repeats parent\n- **Generic content**: Remove anything that applies to ALL projects\n- **Verbose style**: Telegraphic or die";
@@ -0,0 +1,2 @@
1
+ export declare const MATRIX_LOOP_TEMPLATE = "You are starting a Matrix Loop - a self-referential development loop that runs until task completion.\n\n## How Matrix Loop Works\n\n1. You will work on the task continuously\n2. When you believe the task is FULLY complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. If you don't output the promise, the loop will automatically inject another prompt to continue\n4. Maximum iterations: Configurable (default 100)\n\n## Rules\n\n- Focus on completing the task fully, not partially\n- Don't output the completion promise until the task is truly done\n- Each iteration should make meaningful progress toward the goal\n- If stuck, try different approaches\n- Use todos to track your progress\n\n## Exit Conditions\n\n1. **Completion**: Output your completion promise tag when fully complete\n2. **Max Iterations**: Loop stops automatically at limit\n3. **Cancel**: User runs `/cancel-loop` command\n\n## Your Task\n\nParse the arguments below and begin working on the task. The format is:\n`\"task description\" [--completion-promise=TEXT] [--max-iterations=N]`\n\nDefault completion promise is \"DONE\" and default max iterations is 100.";
2
+ export declare const CANCEL_LOOP_TEMPLATE = "Cancel the currently active Matrix Loop.\n\nThis will:\n1. Stop the loop from continuing\n2. Clear the loop state file\n3. Allow the session to end normally\n\nCheck if a loop is active and cancel it. Inform the user of the result.";
@@ -0,0 +1 @@
1
+ export declare const PICKUP_TEMPLATE = "# Pickup Command\n\n## Purpose\n\nUse /pickup to load handoff context from a previous session.\n\n---\n\n# PHASE 1: READ HANDOFF\n\nCall handoff({ action: \"read\" }) to load the handoff context.\n\nIf the response starts with Error:, inform the user:\n\"No handoff context found. Run /handoff in a previous session first to create one.\"\nThen STOP \u2014 do not proceed.\n\n---\n\n# PHASE 2: ACKNOWLEDGE\n\nSummarize the loaded context to the user:\n- What the previous session was working on (Goal)\n- What was completed (Work Completed)\n- What remains (Pending Tasks)\n\nThen state: \"Handoff context loaded. Ready to continue.\"\n\n---\n\n# PHASE 3: ARCHIVE\n\nCall handoff({ action: \"archive\" }) to mark the handoff as consumed.\nThis prevents it from being picked up again.\n\n---\n\n# CONSTRAINTS\n\n- DO call the handoff tool \u2014 do not read files directly\n- DO NOT modify the handoff content \u2014 use it as-is\n- DO begin working immediately if the user included a task with /pickup\n";
@@ -0,0 +1 @@
1
+ export declare const PLAN_REVIEW_TEMPLATE = "You are running a post-execution completion review of a finished plan.\n\n## Triggering \u2014 LOCKED\n\nThis command is the ONLY trigger for a completion review. There is no other one:\nno hook invokes it, no `session.idle` path invokes it, no `progress.isComplete`\npath invokes it, and no Niobe step invokes it. A hook cannot run an agent,\nso with explicit-only triggering there is deliberately NO automatic attach point.\nThat is the design, not a gap. Never install one, and never offer to.\n\n## WHAT TO DO, IN THIS ORDER\n\n1. **Resolve the plan, or stop.** Take the plan name from `<user-request>`. Call\n `plan_list`, then `plan_tasks` for the named plan. `plan_list` SILENTLY SKIPS\n non-kebab filenames, so a non-kebab plan name yields an EMPTY resolution\n rather than an error. If the requested plan is absent from the result, ERROR\n CLEARLY AND STOP: name the plan, state that `plan_list` returned no match, and\n create no report file. Never proceed on an empty or partial resolution, and\n never substitute a different plan.\n\n2. **Gather the deterministic inputs.** Read the plan with `plan_read` and call\n `gatherCompletionReviewInputs({ directory, planPath })`. This is pure: no\n model, no network, no mutation. DoD is NEVER merged into `isComplete`, and\n task\u2192plan linkage is a convention, not a foreign key \u2014 both are labelled\n `heuristic` for that reason.\n\n3. **Evaluate the admission gate BEFORE anything else.** Read\n `evaluateAdmission({ progress, admission })` from the gathered facts. It reads\n T2's output and re-reads nothing.\n\n4. **Delegate the MODEL dimensions to the `merovingian` agent.** Pass it the\n gathered context and the report skeleton. It supplies dimensions 2, 3, 4, 6\n and 8. It must never write the report into the plan file.\n\n5. **Compute the DETERMINISTIC dimensions.** Call `evaluateReview` with\n `missingModelSections` supplied as INPUT:\n `detectMissingModelSections(buildSectionIndex(planContent))`. Do not let the\n evaluator re-parse. Dimensions 1, 5 and 7 are code-computed. Pass each\n dimension's `reason` through as `rationale`; do not invent your own wording.\n\n6. **Render and write the report.** Run `buildReviewDirCommand()` in bash first\n (`mkdir -p \".matrixx/reviews\"`), then call `writeReviewReport(input)`. It\n writes `.matrixx/reviews/<plan>.md` and the `.json` sidecar together, and\n never opens the plan file. `generatedAt` is a caller-supplied input.\n\n7. **Report the path back to the user.** Give the absolute report path and the\n sidecar path. Do not modify the plan.\n\n## THE ADMISSION GATE \u2014 never on `isComplete` alone\n\n`isComplete` derives solely from the plan's own checkboxes, and those checkboxes\nare flipped by the very fuzzy text-similarity heuristic the gatherer refuses to\ntrust. Admitting on `isComplete` alone would decide admission on the exact\nartifact the report then labels untrustworthy. Admission therefore requires BOTH:\n\n- **a.** `isComplete === true` AND `needsTriage === false`\n (`needsTriage` is checked FIRST, because a zero-checkbox plan arrives with\n `isComplete: true` by vacuity), **and**\n- **b.** at least one INDEPENDENT corroborating terminal signal \u2014 a linked task\n in terminal status or a notepad `## Completion` stamp \u2014 whose records account\n for the plan's declared work.\n\nThis admission gate is a HEURISTIC and may be wrong in BOTH directions: it can refuse a genuinely finished plan whose checkboxes were never flipped, and it can admit a genuinely unfinished one. The recorded state below is a finding about the plan, not ground truth.\n\n### Three states\n\n- **`agree`** \u2014 `isComplete === true && !needsTriage && corroboration present &&\n corroboration accounts for the plan`. The report records which signal admitted\n the plan.\n- **`disagree`** \u2014 the signals conflict. **PROCEED and record `gateDisagreement`**\n as `{ checkboxesSaysComplete, corroborationSaysComplete, resolved: \"proceed\",\n reason }`, naming BOTH signals. Never silently pick a winner. Hard refusal is\n reserved for exactly two cases: vacuous completeness (`needsTriage: true`) or\n both signals saying incomplete.\n- **`unavailable`** \u2014 corroboration is structurally absent (0 linked tasks AND\n 0 stamps). Admit on `isComplete` + `needsTriage === false`, record\n `gateEvidence: \"unavailable\"` and the one-line reason below. You\n MUST NOT emit a `gateDisagreement` here \u2014 every legacy plan would then look\n like a disagreement and the field would be noise.\n Reason to record: corroboration is structurally absent: `metadata.planName` appears in 0 of 48 task files, and a `## Completion` stamp in 1 of 19 notepad buckets.\n `gateDisagreement` is real but diagnostic-only: no code reads it; the renderer\n shows it to the human reader.\n\n## THE FOUR REQUIRED PARTS\n\nThe report must carry all four, each under its own heading, and none is skipped\nwhen its data is absent:\n\n- **Summary**\n- **Score**\n- **Complexity**\n- **Required Effort**\n\n## CRITICAL\n\n- Never write the report into the plan file. The plan records intent and progress;\n prose corrupts both, and a report appended there makes the progress counters\n absorb paragraphs they were never meant to count.\n- A low score is ADVISORY. Nothing in this pipeline halts, retries or rejects a\n plan because of the number, and `unscorable` is never rendered as 0 \u2014 a\n not-scored plan emits no number at all.\n- On an unfinished plan, create NO report file and invoke NO agent. Say the plan\n is not scorable yet.\n";
@@ -0,0 +1 @@
1
+ export declare const PRESET_TEMPLATE = "You are managing the active model preset.\n\nThis command is provided by the Matrixx plugin. It uses the built-in `preset` tool to list, show, or switch model presets \u2014 no external scripts or direct config edits needed.\n\n## Usage\n\n```\n/preset \u2192 List available presets and mark the active one\n/preset list \u2192 List available presets\n/preset show [<name>] \u2192 Show a preset's agent/category model assignments (defaults to active)\n/preset set <name> \u2192 Switch the active preset for the current session (live)\n/preset set <name> --save [--global|--project] \u2192 Also persist active_preset to config\n```\n\n## Step 1: Determine the action\n\nParse the arguments passed to this command:\n\n- No arguments or `list` \u2192 call `preset` with `action: \"list\"`.\n- `show` \u2192 call `preset` with `action: \"show\"` (optionally `name`).\n- `set <name>` \u2192 call `preset` with `action: \"set\"`, `name: \"<name>\"`.\n- `set <name> --save` \u2192 also pass `save: true`; `--global` \u2192 `scope: \"global\"`, `--project` (default) \u2192 `scope: \"project\"`.\n\n## Step 2: Call the built-in `preset` tool\n\nUse the `preset` tool with the resolved arguments. The tool validates the preset name, applies the session overlay (delegate-task categories switch immediately), and \u2014 with `--save` \u2014 persists `active_preset` to the project (`.opencode/matrixx.jsonc`) or global (`~/.config/opencode/matrixx.jsonc`) config.\n\nThe tool handles all validation and file operations \u2014 do NOT edit config files directly.\n\n## Step 3: Confirm and instruct\n\nAfter a successful switch:\n\n1. Report the tool's output to the user.\n2. Note that delegate-task categories use the new preset immediately (session-scoped live switch).\n3. If `--save` was used, tell the user the persisted `active_preset` takes effect for builtin agents on the next session.\n\n## Important constraints\n\n- Use the built-in `preset` tool. Do NOT bypass it by editing config files directly.\n- Do not invent preset names \u2014 if the requested name is unknown, report the available presets and stop.\n- `--save` without a scope defaults to project scope.";
@@ -0,0 +1 @@
1
+ export declare const QUALITY_ASSURANCE_TEMPLATE = "# Quality Assurance Command\n\n## Usage\n\n```\n/quality-assurance [--scope=file|module|project] [--target-grade=B] [--max-iterations=3] [--target=<path>]\n```\n\nDefaults: --scope=project, --target-grade=B, --max-iterations=3.\n\nArguments:\n --scope: Assurance scope (default: project)\n - file: Single file only (requires --target=<path>)\n - module: Module/directory scope (requires --target)\n - project: Entire codebase\n --target-grade: Grade to reach before stopping (default: B). Grades A-F.\n --max-iterations: Bounded loop cap (default: 3). Values >3 require an explicit user flag.\n --target: Path restricting edits when --scope=file (or a module path when --scope=module). Required for file and module scope.\n\nThis loop is BOUNDED with a fixed cap. It never loops without a bound and never chases perfection without a cap.\n\n## Protocol Loop (fixed order, bounded)\n\nRun these steps in this exact order per iteration:\n\n1. **Baseline.** Run /quality-audit for the current --scope/--target. Keep the\n baseline report path. The baseline grade, perDimension (each: status +\n exitCode + evidence), exitCodes map, scope, timestamp/generatedAt\n (caller-supplied, never self-generated), targetGrade, and iterations fields\n form the only input the rest of the iteration may use.\n2. **Oracle delta-plan.** Consult the oracle agent for a minimal fix list derived\n from the baseline report ONLY. No new scope, no new dimensions, no fresh\n exploration beyond the baseline evidence. Read-only step.\n3. **Smith gate.** Pass the oracle delta-plan through the smith gate per the\n plan-review doctrine BEFORE any edits: admission check first, then approval.\n Blocked plans stop the iteration with no edits. Read-only step.\n4. **TDD implement.** TDD RED-GREEN-REFACTOR semantics ALWAYS, per tdd-enforcer:\n RED (write a failing test first), GREEN (minimum code to pass), REFACTOR\n (clean up, tests stay green). The main session writes the tests itself; never\n delegate test authorship. This is the ONLY step that MAY Edit/Write source\n files, strictly within --scope/--target only. Verify after each change\n (lsp_diagnostics clean, tests pass) before proceeding.\n5. **Verify.** Re-run /quality-audit on the same --scope/--target and compare\n grades (new grade vs old grade). Write the iteration report (see below) with\n iterations incremented.\n\n## Stop Conditions (any one stops the loop)\n\n- Grade >= target: the verify grade meets or exceeds --target-grade.\n- Zero-delta: new grade == old grade with no new fixes remaining.\n- Iteration cap reached: iterations == --max-iterations (default 3).\n\nWhen any stop condition fires, stop immediately. No post-review step follows:\nthe merovingian agent is invoked ONLY by the explicit `/plan-review` command,\nnever automatically and never as part of this loop.\n\n## Report Contract (same as audit)\n\nEach iteration writes `.matrixx/quality/<scope>-<timestamp>.md` + the `.json`\nsidecar together (timestamp caller-supplied, unique per run, last-write-wins).\nThe JSON carries grade (A-F), perDimension (each: status + exitCode +\nevidence; the silent-failures entry MUST also record `waiverFile` (or null) plus\n`waived` and `stale` counts), exitCodes map, scope, timestamp/generatedAt (caller-supplied),\ntargetGrade, and iterations (incremented each iteration). Exits: 0=pass /\n1=warnings / 2=errors. v1 is advisory-only: a low grade never halts, retries,\nor rejects. Never write to `.matrixx/plans/`; never open or mutate a plan file.\n\n## Forbid-List\n\nIdentical to the audit forbid-list EXCEPT the TDD-implement step MAY Edit/Write\nsource files strictly within --scope/--target only:\n\n- All other steps (baseline, oracle delta-plan, smith gate, verify) are\n read-only: NO Edit/Write to source, NO lsp_rename, NO\n non-dryRun ast_grep_replace, NO task_create/task_update, NO plan_update.\n- Report writes are report + sidecar only.\n- Per-iteration wall-clock timeout 300 (5 min). Exceeding the timeout stops the\n iteration and records the timeout in the report.\n- No scope expansion mid-loop: --scope/--target are fixed when the loop starts.\n- No --max-iterations value >3 without an explicit user flag.\n- No auto-PR, no merge, no master push, no new agents/tools/skills.\n\n## Critical\n\n- The loop is bounded with default 3. There is no unbounded mode.\n- Low grades are ADVISORY. Nothing here auto-merges or publishes.\n\n<user-request>\n$ARGUMENTS\n</user-request>\n";
@@ -0,0 +1 @@
1
+ export declare const QUALITY_AUDIT_TEMPLATE = "You are running a read-only deterministic quality audit (v1 advisory-only).\n\n## Usage\n\n```\n/quality-audit [--scope=file|module|project] [--target=<path>]\n```\n\n- --scope: file | module | project (default: project).\n - file: single --target path only.\n - module: the directory containing --target.\n - project: full tree.\n- --target: path scoping the audit. Optional for project scope; required for file and module scope.\n- Diff-scoped fast path: when the working tree has uncommitted changes, restrict\n gathering to changed files first (UNVERIFIED CLAIM: exact git-diff refspec\n origin/dev...HEAD vs staged is unverified \u2014 use whatever diff the session\n provides and record which refspec was used as evidence).\n- Invalid --scope value is a hard error: `error: invalid --scope '<v>'\n (expected file|module|project)`, exit 2, no report written.\n- Typo rule: /qualiti-assurance is a typo, no alias. Any unknown /quality-*\n variant is an error, never an alias or auto-correction.\n- v1 advisory-only: this command never fails the build, never gates CI, only\n reports. Exit-code mapping 0/1/2 reserved: 0 = pass, 1 = warnings, 2 = errors.\n\n## WHAT TO DO, IN THIS ORDER\n\n1. **Resolve the scope, or stop.** Parse --scope and --target from\n <user-request>. Resolve --target against the working tree. If the target is\n unresolvable (missing path, invalid --scope value, file or module scope\n without a target), ERROR AND STOP: state the scope, the target, and why resolution\n failed, and create no report file. Never proceed on an empty or partial\n resolution, and never substitute a different target.\n\n2. **Gather the deterministic read-only inputs.** All gathering is read-only;\n run nothing that mutates source. Collect, in this order:\n - `tsc --noEmit` (typecheck) on the scope.\n - `biome check src/` (lint, src-only).\n - `bun test` with mock-heavy isolation per script/run-ci.sh\n (isolated runs for mock-heavy entries listed in script/mock-heavy-list.txt,\n then the catch-all exclusion).\n - silent-failure-scanner on the scope (tool: silent_failure_scan).\n If the scope provides a committed waiver file, pass it as `waivers` (never invent a waiver path; never accept one under gitignored `.matrixx/`).\n - Conditional validators, ONLY when the scope touches those domains:\n dashboard-flux-validator for Grafana/Flux dashboards,\n market-symbol-validator for market-symbol code,\n staleness-gap-checker for market-data feed samples.\n Skip inapplicable validators as N/A (see threshold table).\n - lsp_diagnostics (read-only) for files in scope as corroborating evidence.\n Record each tool's raw exit code and output as evidence.\n\n3. **Compute the DETERMINISTIC grade from exit codes only.** The grade is a pure\n function of per-dimension exit codes and warning/error counts. No model\n judgment enters the grade. The silent-failures dimension uses the filtered\n exit code (after waivers).\n\n Per-dimension mapping (threshold rule per dimension):\n - exit 0 \u2192 pass\n - exit 1 \u2192 warn\n - exit 2 \u2192 fail\n - N/A \u2192 status N/A + exitCode null, excluded from grade computation\n (does not count toward warning/error tallies).\n\n Grade threshold table (fixed numbers, no approximations):\n\n | Condition | Grade |\n |-----------|-------|\n | all dimensions exit 0 with 0 errors + 0 warnings | A |\n | any dimension exit 1 with 0 exit-2, and warning-dimensions <= 1 | B |\n | any dimension exit 1 with 0 exit-2, and warning-dimensions >= 2 | C |\n | any dimension exit 2 with exactly 1 error-dimension | D |\n | any dimension exit 2 with >= 2 error-dimensions | F |\n\n Rules:\n - N/A dimensions carry status N/A and exitCode null and are excluded from\n grade computation entirely.\n - Dimensions evaluated: typecheck, lint, tests, silent-failures,\n flux (conditional), market-symbols (conditional), staleness (conditional),\n diagnostics (corroborating).\n - Sentinel, tank, and neo prose goes to an advisory appendix and MUST NOT\n change the grade. The grade derives from tool exit codes only.\n\n4. **Delegate the ADVISORY dimensions to sentinel, tank, and neo.** These agents\n supply prose only (architecture notes from sentinel, adversarial notes from\n tank, exploratory notes from neo) for the advisory appendix. Their output is\n never a grade input and MUST NOT change the grade. They must never write the\n report and never touch source.\n\n5. **Render and write the report.** Run `mkdir -p .matrixx/quality` in bash\n first, then write `.matrixx/quality/<scope>-<timestamp>.md` and the\n same-basename `.json` sidecar together. `generatedAt`/timestamp is a\n caller-supplied input \u2014 never self-generate it. Report JSON keys: grade\n (A-F), perDimension (one entry per rubric dimension with status + exitCode +\n evidence), exitCodes map, scope, timestamp/generatedAt (caller-supplied),\n targetGrade (assurance only), iterations (assurance only). The silent-failures\n entry MUST also record `waiverFile` (or null) plus `waived` and `stale` counts.\n Never touch\n\n6. **Report the paths back to the user.** Give the absolute report path and the\n sidecar path plus the grade and per-dimension exit codes. Do not modify any\n plan.\n\n## FORBID LIST \u2014 hard denials inside this audit\n\n- NO Edit/Write to source files.\n- NO lsp_rename.\n- NO non-dryRun ast_grep_replace (dryRun preview reads are allowed; applying is denied).\n- NO task_create / NO task_update.\n- NO plan_update and never touch .matrixx/plans.\n- Writes = report+sidecar only: the ONLY writable paths are\n .matrixx/quality/<scope>-<timestamp>.md plus its same-basename .json sidecar\n (after mkdir -p .matrixx/quality). No staging, no network, no other writes.\n\n<user-request>\n$ARGUMENTS\n</user-request>";
@@ -0,0 +1 @@
1
+ export declare const REFACTOR_TEMPLATE = "# Intelligent Refactor Command\n\n## Usage\n```\n/refactor <refactoring-target> [--scope=<file|module|project>] [--strategy=<safe|aggressive>]\n\nArguments:\n refactoring-target: What to refactor. Can be:\n - File path: src/auth/handler.ts\n - Symbol name: \"AuthService class\"\n - Pattern: \"all functions using deprecated API\"\n - Description: \"extract validation logic into separate module\"\n\nOptions:\n --scope: Refactoring scope (default: module)\n - file: Single file only\n - module: Module/directory scope\n - project: Entire codebase\n\n --strategy: Risk tolerance (default: safe)\n - safe: Conservative, maximum test coverage required\n - aggressive: Allow broader changes with adequate coverage\n```\n\n## What This Command Does\n\nPerforms intelligent, deterministic refactoring with full codebase awareness. Unlike blind search-and-replace, this command:\n\n1. **Understands your intent** - Analyzes what you actually want to achieve\n2. **Maps the codebase** - Builds a definitive codemap before touching anything\n3. **Assesses risk** - Evaluates test coverage and determines verification strategy\n4. **Plans meticulously** - Creates a detailed plan with Plan agent\n5. **Executes precisely** - Step-by-step refactoring with LSP and AST-grep\n6. **Verifies constantly** - Runs tests after each change to ensure zero regression\n\n---\n\n# PHASE 0: INTENT GATE (MANDATORY FIRST STEP)\n\n**BEFORE ANY ACTION, classify and validate the request.**\n\n## Step 0.1: Parse Request Type\n\n| Signal | Classification | Action |\n|--------|----------------|--------|\n| Specific file/symbol | Explicit | Proceed to codebase analysis |\n| \"Refactor X to Y\" | Clear transformation | Proceed to codebase analysis |\n| \"Improve\", \"Clean up\" | Open-ended | **MUST ask**: \"What specific improvement?\" |\n| Ambiguous scope | Uncertain | **MUST ask**: \"Which modules/files?\" |\n| Missing context | Incomplete | **MUST ask**: \"What's the desired outcome?\" |\n\n## Step 0.2: Validate Understanding\n\nBefore proceeding, confirm:\n- [ ] Target is clearly identified\n- [ ] Desired outcome is understood\n- [ ] Scope is defined (file/module/project)\n- [ ] Success criteria can be articulated\n\n**If ANY of above is unclear, ASK CLARIFYING QUESTION:**\n\n```\nI want to make sure I understand the refactoring goal correctly.\n\n**What I understood**: [interpretation]\n**What I'm unsure about**: [specific ambiguity]\n\nOptions I see:\n1. [Option A] - [implications]\n2. [Option B] - [implications]\n\n**My recommendation**: [suggestion with reasoning]\n\nShould I proceed with [recommendation], or would you prefer differently?\n```\n\n## Step 0.3: Create Initial Todos\n\n**IMMEDIATELY after understanding the request, create todos:**\n\n```\ntask_create({ items: [\n {\"subject\": \"PHASE 1: Codebase Analysis - launch parallel explore agents\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 2: Build Codemap - map dependencies and impact zones\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 3: Test Assessment - analyze test coverage and verification strategy\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 4: Plan Generation - invoke Plan agent for detailed refactoring plan\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 5: Execute Refactoring - step-by-step with continuous verification\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 6: Final Verification - full test suite and regression check\", \"priority\": \"high\"}\n]})\n```\n\n---\n\n# PHASE 1: CODEBASE ANALYSIS (PARALLEL EXPLORATION)\n\n**Mark phase-1 as in_progress.**\n\n## 1.1: Launch Parallel Explore Agents (BACKGROUND)\n\nFire ALL of these simultaneously using `task`:\n\n```\n// Agent 1: Find the refactoring target\ntask(\n subagent_type=\"trinity\",\n run_in_background=true,\n prompt=\"Find all occurrences and definitions of [TARGET]. \n Report: file paths, line numbers, usage patterns.\"\n)\n\n// Agent 2: Find related code\ntask(\n subagent_type=\"trinity\", \n run_in_background=true,\n prompt=\"Find all code that imports, uses, or depends on [TARGET].\n Report: dependency chains, import graphs.\"\n)\n\n// Agent 3: Find similar patterns\ntask(\n subagent_type=\"trinity\",\n run_in_background=true,\n prompt=\"Find similar code patterns to [TARGET] in the codebase.\n Report: analogous implementations, established conventions.\"\n)\n\n// Agent 4: Find tests\ntask(\n subagent_type=\"trinity\",\n run_in_background=true,\n prompt=\"Find all test files related to [TARGET].\n Report: test file paths, test case names, coverage indicators.\"\n)\n\n// Agent 5: Architecture context\ntask(\n subagent_type=\"trinity\",\n run_in_background=true,\n prompt=\"Find architectural patterns and module organization around [TARGET].\n Report: module boundaries, layer structure, design patterns in use.\"\n)\n```\n\n## 1.2: Direct Tool Exploration (WHILE AGENTS RUN)\n\nWhile background agents are running, use direct tools:\n\n### LSP Tools for Precise Analysis:\n\n```typescript\n// Find definition(s)\nLspGotoDefinition(filePath, line, character) // Where is it defined?\n\n// Find ALL usages across workspace\nLspFindReferences(filePath, line, character, includeDeclaration=true)\n\n// Get file structure\nLspDocumentSymbols(filePath) // Hierarchical outline\nLspWorkspaceSymbols(filePath, query=\"[target_symbol]\") // Search by name\n\n// Get current diagnostics\nlsp_diagnostics(filePath) // Errors, warnings before we start\n```\n\n### AST-Grep for Pattern Analysis:\n\n```typescript\n// Find structural patterns\nast_grep_search(\n pattern=\"function $NAME($$$) { $$$ }\", // or relevant pattern\n lang=\"typescript\", // or relevant language\n paths=[\"src/\"]\n)\n\n// Preview refactoring (DRY RUN)\nast_grep_replace(\n pattern=\"[old_pattern]\",\n rewrite=\"[new_pattern]\",\n lang=\"[language]\",\n dryRun=true // ALWAYS preview first\n)\n```\n\n### Grep for Text Patterns:\n\n```\ngrep(pattern=\"[search_term]\", path=\"src/\", include=\"*.ts\")\n```\n\n## 1.3: Collect Background Results\n\n```\nbackground_output(task_id=\"[agent_1_id]\")\nbackground_output(task_id=\"[agent_2_id]\")\n...\n```\n\n**Mark phase-1 as completed after all results collected.**\n\n---\n\n# PHASE 2: BUILD CODEMAP (DEPENDENCY MAPPING)\n\n**Mark phase-2 as in_progress.**\n\n## 2.1: Construct Definitive Codemap\n\nBased on Phase 1 results, build:\n\n```\n## CODEMAP: [TARGET]\n\n### Core Files (Direct Impact)\n- `path/to/file.ts:L10-L50` - Primary definition\n- `path/to/file2.ts:L25` - Key usage\n\n### Dependency Graph\n```\n[TARGET] \n\u251C\u2500\u2500 imports from: \n\u2502 \u251C\u2500\u2500 module-a (types)\n\u2502 \u2514\u2500\u2500 module-b (utils)\n\u251C\u2500\u2500 imported by:\n\u2502 \u251C\u2500\u2500 consumer-1.ts\n\u2502 \u251C\u2500\u2500 consumer-2.ts\n\u2502 \u2514\u2500\u2500 consumer-3.ts\n\u2514\u2500\u2500 used by:\n \u251C\u2500\u2500 handler.ts (direct call)\n \u2514\u2500\u2500 service.ts (dependency injection)\n```\n\n### Impact Zones\n| Zone | Risk Level | Files Affected | Test Coverage |\n|------|------------|----------------|---------------|\n| Core | HIGH | 3 files | 85% covered |\n| Consumers | MEDIUM | 8 files | 70% covered |\n| Edge | LOW | 2 files | 50% covered |\n\n### Established Patterns\n- Pattern A: [description] - used in N places\n- Pattern B: [description] - established convention\n```\n\n## 2.2: Identify Refactoring Constraints\n\nBased on codemap:\n- **MUST follow**: [existing patterns identified]\n- **MUST NOT break**: [critical dependencies]\n- **Safe to change**: [isolated code zones]\n- **Requires migration**: [breaking changes impact]\n\n**Mark phase-2 as completed.**\n\n---\n\n# PHASE 3: TEST ASSESSMENT (VERIFICATION STRATEGY)\n\n**Mark phase-3 as in_progress.**\n\n## 3.1: Detect Test Infrastructure\n\n```bash\n# Check for test commands\ncat package.json | jq '.scripts | keys[] | select(test(\"test\"))'\n\n# Or for Python\nls -la pytest.ini pyproject.toml setup.cfg\n\n# Or for Go\nls -la *_test.go\n```\n\n## 3.2: Analyze Test Coverage\n\n```\n// Find all tests related to target\ntask(\n subagent_type=\"trinity\",\n run_in_background=false, // Need this synchronously\n prompt=\"Analyze test coverage for [TARGET]:\n 1. Which test files cover this code?\n 2. What test cases exist?\n 3. Are there integration tests?\n 4. What edge cases are tested?\n 5. Estimated coverage percentage?\"\n)\n```\n\n## 3.3: Determine Verification Strategy\n\nBased on test analysis:\n\n| Coverage Level | Strategy |\n|----------------|----------|\n| HIGH (>80%) | Run existing tests after each step |\n| MEDIUM (50-80%) | Run tests + add safety assertions |\n| LOW (<50%) | **PAUSE**: Propose adding tests first |\n| NONE | **BLOCK**: Refuse aggressive refactoring |\n\n**If coverage is LOW or NONE, ask user:**\n\n```\nTest coverage for [TARGET] is [LEVEL].\n\n**Risk Assessment**: Refactoring without adequate tests is dangerous.\n\nOptions:\n1. Add tests first, then refactor (RECOMMENDED)\n2. Proceed with extra caution, manual verification required\n3. Abort refactoring\n\nWhich approach do you prefer?\n```\n\n## 3.4: Document Verification Plan\n\n```\n## VERIFICATION PLAN\n\n### Test Commands\n- Unit: `bun test` / `npm test` / `pytest` / etc.\n- Integration: [command if exists]\n- Type check: `tsc --noEmit` / `pyright` / etc.\n\n### Verification Checkpoints\nAfter each refactoring step:\n1. lsp_diagnostics \u2192 zero new errors\n2. Run test command \u2192 all pass\n3. Type check \u2192 clean\n\n### Regression Indicators\n- [Specific test that must pass]\n- [Behavior that must be preserved]\n- [API contract that must not change]\n```\n\n**Mark phase-3 as completed.**\n\n---\n\n# PHASE 4: PLAN GENERATION (PLAN AGENT)\n\n**Mark phase-4 as in_progress.**\n\n## 4.1: Invoke Plan Agent\n\n```\nTask(\n subagent_type=\"plan\",\n prompt=\"Create a detailed refactoring plan:\n\n ## Refactoring Goal\n [User's original request]\n\n ## Codemap (from Phase 2)\n [Insert codemap here]\n\n ## Test Coverage (from Phase 3)\n [Insert verification plan here]\n\n ## Constraints\n - MUST follow existing patterns: [list]\n - MUST NOT break: [critical paths]\n - MUST run tests after each step\n\n ## Requirements\n 1. Break down into atomic refactoring steps\n 2. Each step must be independently verifiable\n 3. Order steps by dependency (what must happen first)\n 4. Specify exact files and line ranges for each step\n 5. Include rollback strategy for each step\n 6. Define commit checkpoints\"\n)\n```\n\n## 4.2: Review and Validate Plan\n\nAfter receiving plan from Plan agent:\n\n1. **Verify completeness**: All identified files addressed?\n2. **Verify safety**: Each step reversible?\n3. **Verify order**: Dependencies respected?\n4. **Verify verification**: Test commands specified?\n\n## 4.3: Register Detailed Todos\n\nConvert Plan agent output into granular todos:\n\n```\ntask_create({ items: [\n // Each step from the plan becomes a task\n {\"subject\": \"Step 1: [description]\", \"priority\": \"high\"},\n {\"subject\": \"Verify Step 1: run tests\", \"priority\": \"high\"},\n {\"subject\": \"Step 2: [description]\", \"priority\": \"medium\"},\n {\"subject\": \"Verify Step 2: run tests\", \"priority\": \"medium\"},\n // ... continue for all steps\n]})\n```\n\n**Mark phase-4 as completed.**\n\n---\n\n# PHASE 5: EXECUTE REFACTORING (DETERMINISTIC EXECUTION)\n\n**Mark phase-5 as in_progress.**\n\n## 5.1: Execution Protocol\n\nFor EACH refactoring step:\n\n### Pre-Step\n1. Mark step todo as `in_progress`\n2. Read current file state\n3. Verify lsp_diagnostics is baseline\n\n### Execute Step\nUse appropriate tool:\n\n**For Symbol Renames:**\n```typescript\nlsp_prepare_rename(filePath, line, character) // Validate rename is possible\nlsp_rename(filePath, line, character, newName) // Execute rename\n```\n\n**For Pattern Transformations:**\n```typescript\n// Preview first\nast_grep_replace(pattern, rewrite, lang, dryRun=true)\n\n// If preview looks good, execute\nast_grep_replace(pattern, rewrite, lang, dryRun=false)\n```\n\n**For Structural Changes:**\n```typescript\n// Use Edit tool for precise changes\nedit(filePath, oldString, newString)\n```\n\n### Post-Step Verification (MANDATORY)\n\n```typescript\n// 1. Check diagnostics\nlsp_diagnostics(filePath) // Must be clean or same as baseline\n\n// 2. Run tests\nbash(\"bun test\") // Or appropriate test command\n\n// 3. Type check\nbash(\"tsc --noEmit\") // Or appropriate type check\n```\n\n### Step Completion\n1. If verification passes \u2192 Mark step todo as `completed`\n2. If verification fails \u2192 **STOP AND FIX**\n\n## 5.2: Failure Recovery Protocol\n\nIf ANY verification fails:\n\n1. **STOP** immediately\n2. **REVERT** the failed change\n3. **DIAGNOSE** what went wrong\n4. **OPTIONS**:\n - Fix the issue and retry\n - Skip this step (if optional)\n - Consult oracle agent for help\n - Ask user for guidance\n\n**NEVER proceed to next step with broken tests.**\n\n## 5.3: Commit Checkpoints\n\nAfter each logical group of changes:\n\n```bash\ngit add [changed-files]\ngit commit -m \"refactor(scope): description\n\n[details of what was changed and why]\"\n```\n\n**Mark phase-5 as completed when all refactoring steps done.**\n\n---\n\n# PHASE 6: FINAL VERIFICATION (REGRESSION CHECK)\n\n**Mark phase-6 as in_progress.**\n\n## 6.1: Full Test Suite\n\n```bash\n# Run complete test suite\nbun test # or npm test, pytest, go test, etc.\n```\n\n## 6.2: Type Check\n\n```bash\n# Full type check\ntsc --noEmit # or equivalent\n```\n\n## 6.3: Lint Check\n\n```bash\n# Run linter\neslint . # or equivalent\n```\n\n## 6.4: Build Verification (if applicable)\n\n```bash\n# Ensure build still works\nbun run build # or npm run build, etc.\n```\n\n## 6.5: Final Diagnostics\n\n```typescript\n// Check all changed files\nfor (file of changedFiles) {\n lsp_diagnostics(file) // Must all be clean\n}\n```\n\n## 6.6: Generate Summary\n\n```markdown\n## Refactoring Complete\n\n### What Changed\n- [List of changes made]\n\n### Files Modified\n- `path/to/file.ts` - [what changed]\n- `path/to/file2.ts` - [what changed]\n\n### Verification Results\n- Tests: PASSED (X/Y passing)\n- Type Check: CLEAN\n- Lint: CLEAN\n- Build: SUCCESS\n\n### No Regressions Detected\nAll existing tests pass. No new errors introduced.\n```\n\n**Mark phase-6 as completed.**\n\n---\n\n# CRITICAL RULES\n\n## NEVER DO\n- Skip lsp_diagnostics check after changes\n- Proceed with failing tests\n- Make changes without understanding impact\n- Use `as any`, `@ts-ignore`, `@ts-expect-error`\n- Delete tests to make them pass\n- Commit broken code\n- Refactor without understanding existing patterns\n\n## ALWAYS DO\n- Understand before changing\n- Preview before applying (ast_grep dryRun=true)\n- Verify after every change\n- Follow existing codebase patterns\n- Keep todos updated in real-time\n- Commit at logical checkpoints\n- Report issues immediately\n\n## ABORT CONDITIONS\nIf any of these occur, **STOP and consult user**:\n- Test coverage is zero for target code\n- Changes would break public API\n- Refactoring scope is unclear\n- 3 consecutive verification failures\n- User-defined constraints violated\n\n---\n\n# Tool Usage Philosophy\n\nYou already know these tools. Use them intelligently:\n\n## LSP Tools\nLeverage LSP tools for precision analysis. Key patterns:\n- **Understand before changing**: `LspGotoDefinition` to grasp context\n- **Impact analysis**: `LspFindReferences` to map all usages before modification\n- **Safe refactoring**: `lsp_prepare_rename` \u2192 `lsp_rename` for symbol renames\n- **Continuous verification**: `lsp_diagnostics` after every change\n\n## AST-Grep\nUse `ast_grep_search` and `ast_grep_replace` for structural transformations.\n**Critical**: Always `dryRun=true` first, review, then execute.\n\n## Agents\n- `explore`: Parallel codebase pattern discovery\n- `plan`: Detailed refactoring plan generation\n- `oracle`: Read-only consultation for complex architectural decisions and debugging\n- `librarian`: **Use proactively** when encountering deprecated methods or library migration tasks. Query official docs and OSS examples for modern replacements.\n\n## Deprecated Code & Library Migration\nWhen you encounter deprecated methods/APIs during refactoring:\n1. Fire `librarian` to find the recommended modern alternative\n2. **DO NOT auto-upgrade to latest version** unless user explicitly requests migration\n3. If user requests library migration, use `librarian` to fetch latest API docs before making changes\n\n---\n\n**Remember: Refactoring without tests is reckless. Refactoring without understanding is destructive. This command ensures you do neither.**\n\n<user-request>\n$ARGUMENTS\n</user-request>\n";
@@ -0,0 +1 @@
1
+ export declare const REMOVE_DEADCODE_TEMPLATE = "# Remove Dead Code Command\n\n## Usage\n```\n/remove-deadcode [target-path] [--scope=<file|module|project>] [--dry-run]\n\nArguments:\n target-path: Where to scan for dead code. Can be:\n - File path: src/auth/handler.ts\n - Directory: src/features/\n - Glob: src/**/*.ts\n - Omitted: defaults to current project src/\n\nOptions:\n --scope: Scanning scope (default: module)\n - file: Single file only\n - module: Module/directory and its dependents\n - project: Entire codebase\n\n --dry-run: Report dead code without removing it (default: false)\n```\n\n## What This Command Does\n\nFinds and removes dead code (zero-reference symbols) using LSP analysis. Unlike grep-based approaches, this uses semantic understanding:\n\n1. **Discovers symbols** - Uses LSP to enumerate all exported and internal symbols\n2. **Counts references** - Uses LspFindReferences to find actual usage sites\n3. **Classifies confidence** - Categorizes findings by removal safety\n4. **Reports findings** - Presents dead code organized by confidence level\n5. **Removes safely** - Deletes confirmed dead code with continuous verification\n6. **Verifies integrity** - Runs build and tests after each removal batch\n\n---\n\n# PHASE 0: VALIDATE REQUEST (MANDATORY FIRST STEP)\n\n## Step 0.1: Parse Target\n\n| Input | Interpretation |\n|-------|---------------|\n| File path | Scan that file only |\n| Directory path | Scan all source files in directory |\n| Glob pattern | Scan matching files |\n| No argument | Scan project src/ directory |\n\n## Step 0.2: Detect --dry-run Flag\n\nIf --dry-run is present or user says \"just show me\" / \"report only\":\n- Set dry-run mode: report findings WITHOUT removing anything\n- Skip PHASE 4 (removal) entirely\n\n## Step 0.3: Create Initial Todos\n\n```\ntask_create({ items: [\n {\"subject\": \"PHASE 1: Symbol Discovery - enumerate all symbols via LSP\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 2: Reference Analysis - find references for each symbol\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 3: Dead Code Report - classify and present findings\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 4: Safe Removal - remove confirmed dead code with verification\", \"priority\": \"high\"},\n {\"subject\": \"PHASE 5: Final Verification - build and test suite\", \"priority\": \"high\"}\n]})\n```\n\n---\n\n# PHASE 1: SYMBOL DISCOVERY\n\n**Mark PHASE 1 as in_progress.**\n\n## 1.1: Enumerate Source Files\n\nDetermine the set of files to scan based on target:\n\n```typescript\n// For a single file\nLspDocumentSymbols(filePath)\n\n// For a directory, use Glob to find all source files first\nGlob(pattern=\"**/*.ts\", path=\"[target-directory]\")\n// Then LspDocumentSymbols for each file\n```\n\n## 1.2: Collect All Symbols\n\nFor each source file, gather:\n- Function declarations (named functions, arrow functions assigned to const)\n- Class declarations\n- Interface and type alias declarations\n- Enum declarations\n- Variable declarations (const/let at module scope)\n- Method declarations (within classes)\n\nUse `LspDocumentSymbols(filePath)` to get the hierarchical symbol outline.\n\n## 1.3: Filter Symbol Candidates\n\n**SKIP these symbols (never flag as dead):**\n- Symbols in index.ts / barrel files (re-exports)\n- Symbols with `export default`\n- Entry point files (main, index, plugin entry)\n- Test files (`*.test.ts`, `*.spec.ts`)\n- Symbols starting with `_` (conventionally private/internal)\n- Type-only exports used in declaration files\n\n**INCLUDE these symbols:**\n- Non-exported functions/classes/types within a module\n- Exported symbols that may have zero consumers\n- Private class methods and properties\n\n**Mark PHASE 1 as completed.**\n\n---\n\n# PHASE 2: REFERENCE ANALYSIS\n\n**Mark PHASE 2 as in_progress.**\n\n## 2.1: Count References Per Symbol\n\nFor each symbol candidate from Phase 1:\n\n```typescript\n// Get all references across the workspace\nLspFindReferences(filePath, line, character, includeDeclaration=false)\n```\n\n**IMPORTANT**: Set `includeDeclaration=false` so the declaration site itself is NOT counted as a reference.\n\n## 2.2: Classify Reference Counts\n\n| References | Classification | Confidence |\n|------------|---------------|------------|\n| 0 external references | Dead code | HIGH - safe to remove |\n| 0 refs, but exported from package index | Possibly dead | MEDIUM - may be used externally |\n| 0 refs, but in a public API file | Possibly dead | LOW - may be part of public contract |\n| 1+ references | Live code | SKIP - do not flag |\n\n## 2.3: Cross-Check with AST-Grep\n\nFor HIGH confidence candidates, verify with AST-Grep to catch dynamic references:\n\n```typescript\n// Check for string-based references (dynamic imports, reflection)\nast_grep_search(\n pattern='\"[symbol-name]\"',\n lang=\"typescript\",\n paths=[\"src/\"]\n)\n\n// Check for computed property access\ngrep(pattern=\"[symbol-name]\", path=\"src/\", include=\"*.ts\")\n```\n\nIf AST-Grep or grep finds string-based references, downgrade confidence from HIGH to MEDIUM.\n\n**Mark PHASE 2 as completed.**\n\n---\n\n# PHASE 3: DEAD CODE REPORT\n\n**Mark PHASE 3 as in_progress.**\n\n## 3.1: Generate Report\n\nPresent findings organized by confidence:\n\n```\n## Dead Code Analysis Report\n\n### Scan Target: [path]\n### Files Scanned: [N]\n### Symbols Analyzed: [N]\n### Dead Code Found: [N] symbols\n\n---\n\n### HIGH Confidence (Safe to Remove)\nThese symbols have zero references anywhere in the codebase.\n\n| # | Symbol | File | Line | Type |\n|---|--------|------|------|------|\n| 1 | unusedHelper | src/utils/helpers.ts | 42 | function |\n| 2 | OldConfig | src/config/legacy.ts | 15 | interface |\n\n### MEDIUM Confidence (Review Required)\nThese symbols appear unused but may have external consumers or dynamic references.\n\n| # | Symbol | File | Line | Type | Reason |\n|---|--------|------|------|------|--------|\n| 1 | exportedUtil | src/shared/utils.ts | 88 | function | exported, no internal refs |\n\n### LOW Confidence (Manual Review)\nThese symbols may be part of a public API or have indirect usage patterns.\n\n| # | Symbol | File | Line | Type | Reason |\n|---|--------|------|------|------|--------|\n| 1 | ApiResponse | src/types/api.ts | 12 | type | public API type |\n```\n\n## 3.2: If --dry-run Mode\n\nPresent the report and STOP. Do not proceed to Phase 4.\n\n```\nThis was a dry-run analysis. No code was modified.\nTo remove dead code, run: /remove-deadcode [same-target]\n```\n\n**Mark PHASE 3 as completed.**\n\n---\n\n# PHASE 4: SAFE REMOVAL\n\n**Mark PHASE 4 as in_progress.**\n\n## 4.1: Removal Strategy\n\n**Remove in order of confidence (HIGH first):**\n\n1. Start with HIGH confidence symbols\n2. After each batch, run verification\n3. Only proceed to MEDIUM confidence if user approves\n4. NEVER auto-remove LOW confidence symbols\n\n## 4.2: Batch Removal Protocol\n\nFor each removal batch:\n\n### Pre-Removal\n1. Read the file to get current state\n2. Run `lsp_diagnostics(filePath)` to establish baseline\n\n### Execute Removal\n```typescript\n// Use Edit tool to remove the dead symbol\n// Remove the entire declaration including JSDoc/comments above it\nedit(filePath, oldString=\"[full-symbol-declaration]\", newString=\"\")\n```\n\n### Post-Removal Verification (MANDATORY)\n```typescript\n// 1. Check diagnostics - no new errors\nlsp_diagnostics(filePath)\n\n// 2. Check imports - remove now-unused imports\n// If removing a symbol makes an import unused, remove the import too\nLspDocumentSymbols(filePath)\n\n// 3. Run type check\nbash(\"tsc --noEmit\")\n\n// 4. Run tests\nbash(\"bun test\")\n```\n\n## 4.3: Cascading Cleanup\n\nAfter removing a symbol, check if its removal creates new dead code:\n- Imports that are now unused\n- Helper functions only called by the removed symbol\n- Types only used by the removed symbol\n\nRemove cascading dead code in the same batch.\n\n## 4.4: MEDIUM Confidence Handling\n\nBefore removing MEDIUM confidence symbols, ask the user:\n\n```\nThe following MEDIUM confidence symbols appear unused but may have external consumers:\n\n1. [symbol] in [file] - [reason for medium confidence]\n\nShould I:\n1. Remove them (I confirm they are unused)\n2. Skip them (keep for now)\n3. Review each one individually\n```\n\n**Mark PHASE 4 as completed.**\n\n---\n\n# PHASE 5: FINAL VERIFICATION\n\n**Mark PHASE 5 as in_progress.**\n\n## 5.1: Full Build Check\n\n```bash\ntsc --noEmit\nbun run build\n```\n\n## 5.2: Full Test Suite\n\n```bash\nbun test\n```\n\n## 5.3: Diagnostics on Changed Files\n\n```typescript\n// Check all files that were modified\nfor (file of modifiedFiles) {\n lsp_diagnostics(file)\n}\n```\n\n## 5.4: Generate Summary\n\n```\n## Dead Code Removal Complete\n\n### Removed\n- [N] HIGH confidence symbols removed\n- [N] MEDIUM confidence symbols removed (user-approved)\n- [N] cascading cleanups (unused imports, helper functions)\n\n### Preserved\n- [N] LOW confidence symbols (manual review needed)\n- [N] MEDIUM confidence symbols (user chose to keep)\n\n### Files Modified\n- \\`path/to/file.ts\\` - removed [symbol1], [symbol2]\n- \\`path/to/file2.ts\\` - removed [symbol3]\n\n### Verification\n- Type Check: PASSED\n- Build: PASSED\n- Tests: PASSED ([X] passing, [Y] pre-existing failures)\n- Diagnostics: CLEAN (no new errors)\n\n### Lines of Code Removed: [N]\n```\n\n**Mark PHASE 5 as completed.**\n\n---\n\n# CRITICAL RULES\n\n## NEVER DO\n- Remove symbols from barrel/index files without checking all consumers\n- Remove exported symbols without checking external package consumers\n- Remove symbols referenced in configuration files, scripts, or non-TS files\n- Skip lsp_diagnostics after removal\n- Proceed with failing tests after removal\n- Remove event handlers, lifecycle hooks, or decorator-referenced symbols\n- Remove symbols used in dependency injection containers\n- Use `as any`, `@ts-ignore`, `@ts-expect-error` to suppress removal side effects\n\n## ALWAYS DO\n- Use LspFindReferences (not grep) as the primary reference detection method\n- Cross-check with grep/AST-Grep for dynamic references\n- Verify build and tests after each removal batch\n- Ask for user confirmation before removing MEDIUM confidence symbols\n- Report LOW confidence findings without auto-removing\n- Clean up cascading dead code (unused imports, orphaned helpers)\n- Keep todos updated in real-time\n\n## ABORT CONDITIONS\nIf any of these occur, STOP and consult user:\n- Build fails after removal\n- Tests fail after removal (new failures, not pre-existing)\n- More than 20 symbols flagged as dead in a single file (likely misconfiguration)\n- Removed symbol is referenced in non-TypeScript files (configs, scripts)\n\n<user-request>\n$ARGUMENTS\n</user-request>\n";
@@ -0,0 +1 @@
1
+ export declare const RESEARCH_TEMPLATE = "# /research \u2014 Saturation Research Command\n\nExecute a systematic multi-round research process on the given topic.\n\n## Usage\n\n```\n/research <topic> \u2192 Full research (all directions)\n/research <topic> --scope=code \u2192 Local codebase only\n/research <topic> --scope=docs \u2192 Documentation only\n/research <topic> --scope=web \u2192 Web search only\n/research <topic> --scope=oss \u2192 OSS repos only\n/research <topic> --max-rounds=3 \u2192 Limit to 3 rounds\n```\n\n## What Happens\n\n1. Creates artifact directory: `.matrixx/research-<topic>-<timestamp>/`\n2. Spawns 4 parallel research agents (explore + operator swarms)\n3. Collects findings, identifies new leads\n4. Recursively follows leads until convergence (novelty-based stop, max 5 rounds)\n5. Verifies contested claims by running code\n6. Produces cited synthesis in `final-synthesis.md`\n\n## Output\n\nAll artifacts written to `.matrixx/research-<topic>-<timestamp>/`:\n- `round-N-findings.md` \u2014 per-round findings\n- `leads.md` \u2014 tracked leads\n- `contested-claims.md` \u2014 claims needing verification\n- `final-synthesis.md` \u2014 the final cited synthesis\n\n## Examples\n\n```\n/research how does context window management work in this codebase\n/research React 19 server component patterns --scope=web --max-rounds=3\n/research authentication middleware best practices --scope=all\n```\n\n---\n\nExecute the full research protocol using the ulw-research skill.";
@@ -0,0 +1 @@
1
+ export declare const SECURITY_AUDIT_TEMPLATE = "You are running a read-only deterministic security audit (v1 advisory-only).\n\n## Usage\n\n```\n/security-audit [--scope=file|module|project] [--target=<path>] [--full] [--budget=N]\n```\n\n- --scope: file | module | project (default: file \u2014 scoped by default).\n - file: single --target path only.\n - module: the directory containing --target.\n - project: full tree.\n- --target: path scoping the audit. Required for file and module scope; optional\n for project scope.\n- Scoped-default disclaimer: a bare invocation without --scope audits a single\n file only when --target names a file; without --target it audits nothing and\n asks for a target. Broad project coverage is opt-in via --scope=project or\n --full \u2014 never assume full-tree scope from a bare invocation.\n- --full: opt-in full-tree deep audit. COST WARNING: a full audit consumes\n roughly an order of magnitude more tokens than a scoped audit. Ask the user\n for confirmation before running --full on a large tree, and record the\n confirmation (or its absence) as evidence.\n- --budget=N: finding budget gate. N is the maximum number of findings the run\n will fully evidence. When candidate findings exceed what the budget funds,\n the unfundable remainder is recorded as status deferred and the coverage\n ledger run status becomes incomplete (run_status incomplete).\n- Invalid --scope value is a hard error: `error: invalid --scope '<v>'\n (expected file|module|project)`, exit 2, no report written. Example:\n --scope=bogus \u2192 error, exit 2.\n- Finding lifecycle statuses (per FindingStatusSchema in\n src/skills/schemas/security-audit.ts): confirmed | needs_validation |\n rejected | deferred. needs_validation findings MUST NOT carry a severity.\n- Coverage ledger unit statuses (per LedgerUnitStatusSchema): planned |\n not_applicable | out_of_scope | in_progress | covered | candidate | blocked |\n deferred. Ledger run status: complete | incomplete (budget gate).\n- v1 advisory-only: this command never fails the build, never gates CI, only\n reports. Exit-code mapping 0/1/2 reserved: 0 = clean (no confirmed findings),\n 1 = findings (one or more confirmed findings), 2 = invalid usage.\n\n## WHAT TO DO, IN THIS ORDER\n\n1. **Resolve the scope, or stop.** Parse --scope, --target, --full, and --budget\n from <user-request>. Resolve --target against the working tree. If the target\n is unresolvable (missing path, invalid --scope value, file or module scope\n without a target), ERROR AND STOP: state the scope, the target, and why\n resolution failed, and create no report files. Never proceed on an empty or\n partial resolution, and never substitute a different target.\n\n2. **Gather read-only evidence.** All gathering is read-only: run nothing that\n mutates source, sends network probes, or executes untrusted code paths.\n Collect static evidence only (file reads, grep/ast-grep matches, LSP\n diagnostics as corroborating evidence). Record each input's raw output as\n evidence.\n\n3. **Apply the budget gate.** When --budget=N is set and candidate findings\n exceed N, fully evidence at most N findings and mark the remainder deferred;\n set the coverage ledger run status to incomplete. Without --budget, the\n ledger run status is complete when every seeded unit reaches a terminal\n state (covered, not_applicable, out_of_scope, blocked, or deferred).\n\n4. **Render and write the report.** Run `mkdir -p .matrixx/audits/<run-N>` in\n bash first, then write run-metadata.json, coverage-ledger.json\n (LedgerSchema: units plus status complete|incomplete), and findings.json\n (array of FindingSchema entries) together. `generatedAt` is a\n caller-supplied input \u2014 never self-generate it. Never touch source.\n\n5. **Report the paths back to the user.** Give the absolute .matrixx/audits/<run-N>/\n directory path plus the exit code (0 clean, 1 findings, 2 invalid usage).\n Do not modify any plan.\n\n## FORBID LIST \u2014 hard denials inside this audit\n\n- NO Edit/Write to source files.\n- NO lsp_rename.\n- NO non-dryRun ast_grep_replace (dryRun preview reads are allowed; applying is denied).\n- NO task_create / NO task_update.\n- NO plan_update and never touch .matrixx/plans.\n- NO network probes, NO live-target requests, NO execution of untrusted code.\n- Writes = audit report files only: the ONLY writable paths are\n .matrixx/audits/<run-N>/run-metadata.json,\n .matrixx/audits/<run-N>/coverage-ledger.json, and\n .matrixx/audits/<run-N>/findings.json\n (after mkdir -p .matrixx/audits/<run-N>). No staging, no other writes.\n\n<user-request>\n$ARGUMENTS\n</user-request>";
@@ -0,0 +1 @@
1
+ export declare const START_WORK_TEMPLATE = "You are starting a Morpheus work session.\n\n## WHAT TO DO\n\n1. **Find available plans**: List Oracle-generated plan files via plan_list at `.matrixx/plans/`; each entry carries a progress field (total, completed, remaining, isComplete). A plan reported as `degraded` by plan_tasks is over the read cap \u2014 it is still fully workable through the section reads in step 5\n\n2. **Check for active mission state**: Read `.matrixx/mission.json` if it exists\n\n3. **Decision logic**:\n - If `.matrixx/mission.json` exists AND plan is NOT complete (has unchecked boxes):\n - **APPEND** current session to session_ids\n - Continue work on existing plan\n - If no active plan OR plan is complete:\n - List available plan files via plan_list\n - If ONE plan: auto-select it\n - If MULTIPLE plans: show list with timestamps, ask user to select\n\n4. **Create/Update mission.json**:\n ```json\n {\n \"active_plan\": \"/absolute/path/to/plan.md\",\n \"started_at\": \"ISO_TIMESTAMP\",\n \"session_ids\": [\"session_id_1\", \"session_id_2\"],\n \"plan_name\": \"plan-name\"\n }\n ```\n\n5. **Read the plan**:\n - Call plan_tasks for the task manifest and progress. On an over-cap plan it degrades \u2014 it returns the manifest with a `degraded` marker instead of failing\n - Read the body with plan_read, **section selector FIRST**:\n - `section`: a section id (e.g. `tl-dr`, `context`, `work-objectives`, `verification-strategy-mandatory`, `execution-strategy`, `todos`, `commit-strategy`, `success-criteria`) or the kebab id derived from any custom heading. Returns ONLY that section's span plus its metadata (id, level, startLine, endLine, bytes, contentHash). Add `sectionIndex` (0-based) when the heading occurs more than once \u2014 a missing or out-of-range index is a validation_error, not a silent first match\n - `section` WINS over `offset`/`limit`; when both are supplied the response reports `precedence:\"section\"` with the effective absolute startLine/endLine\n - Fall back to reading via paginated plan_read (offset/limit) for spans a section does not cover\n - The size cap is a ceiling, not a wall: it refuses only an unbounded WHOLE-FILE read (`file_too_large`). Supplying `offset`/`limit` or a `section` reads past it, at any file size\n - If a window comes back `clamped`, the `hint` names the effective window \u2014 re-read that window instead of retrying the same one. A `read_failed` error is a permissions problem; pagination cannot recover from it\n\n## OUTPUT FORMAT\n\nWhen listing plans for selection:\n```\nAvailable Work Plans\n\nCurrent Time: {ISO timestamp}\nSession ID: {current session id}\n\n1. [plan-name-1.md] - Modified: {date} - Progress: {completed}/{total} tasks\n2. [plan-name-2.md] - Modified: {date} - Progress: {completed}/{total} tasks\n\nWhich plan would you like to work on? (Enter number or plan name)\n```\n\nWhen resuming existing work:\n```\nResuming Work Session\n\nActive Plan: {plan-name}\nProgress: {completed}/{total} tasks\nSessions: {count} (appending current session)\n\nReading plan and continuing from last incomplete task...\n```\n\nWhen auto-selecting single plan:\n```\nStarting Work Session\n\nPlan: {plan-name}\nSession ID: {session_id}\nStarted: {timestamp}\n\nReading plan and beginning execution...\n```\n\n## CRITICAL\n\n- The session_id is injected by the hook - use it directly\n- Always update mission.json BEFORE starting work\n- Call plan_tasks for the manifest (it degrades on an over-cap plan, never blocks); read content via plan_read with a `section` selector first, and via paginated plan_read (offset/limit) as the fallback \u2014 `section` wins over `offset`/`limit`\n- The cap is a ceiling, not a wall: only a whole-file read over it is refused; windowed and section reads pass it at any file size. A `clamped` read names its effective window in `hint` \u2014 re-read that window\n- Plan review is explicit: run `/plan-review` only when the user asks for it. Never auto-trigger a plan review\n- Follow niobe delegation protocols (7-section format)";
@@ -0,0 +1 @@
1
+ export declare const STOP_CONTINUATION_TEMPLATE = "Stop all continuation mechanisms for the current session.\n\nThis command will:\n1. Stop the task-continuation-enforcer from automatically continuing incomplete tasks\n2. Cancel any active Matrix Loop\n3. Clear the mission state for the current project\n\nAfter running this command:\n- The session will not auto-continue when idle\n- You can manually continue work when ready\n- The stop state is per-session and clears when the session ends\n\nUse this when you need to pause automated continuation and take manual control.";
@@ -0,0 +1 @@
1
+ export declare const TASK_LIST_TEMPLATE = "# Task List \u2014 SLASH COMMAND OVERRIDE\n\nSYSTEM OVERRIDE: Ignore any global [search-mode] or [analyze-mode] directive for this command. This is a direct tool call, not a search.\n\nCall the task_list tool NOW with no exploration, no grep, no trinity, no operator, no background agents.\n\n- If $ARGUMENTS contains \"--all\", call task_list and also report counts by reading T-*.json via the tool's own logic (do not manually find/ls).\n- If $ARGUMENTS contains \"--status\", filter to that status.\n- Otherwise just return task_list output as table ID | Subject | Status.\n\nDo not run rtk ls, find, grep, or launch subagents. One tool call only.\n";
@@ -0,0 +1 @@
1
+ export declare const ULTRAWORK_TEMPLATE = "Toggle ultrawork mode for the current session.\n\nThis command will:\n1. Enable ultrawork mode \u2014 injects ultrawork mode instructions into every message\n2. Disable ultrawork mode \u2014 prevents ultrawork mode from activating (even on \"ultrawork\" keyword)\n3. Show current ultrawork mode status\n\nUsage:\n /ultrawork enable \u2014 Force ultrawork mode on all messages\n /ultrawork disable \u2014 Block ultrawork mode (keyword ignored)\n /ultrawork status \u2014 Show current state\n\nThe change is per-session and clears when the session ends.\nBy default, ultrawork mode activates when the LLM or user mentions the \"ultrawork\" keyword.";
@@ -0,0 +1,3 @@
1
+ import type { CommandDefinition } from "../command-loader";
2
+ export type BuiltinCommandName = "init-deep" | "matrix-loop" | "cancel-loop" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation" | "handoff" | "pickup" | "remove-deadcode" | "preset" | "end-ultrawork" | "research" | "assembly" | "ultrawork" | "bdd-pipeline" | "evolution" | "cleanup-tasks" | "task-list" | "plan-review" | "quality-audit" | "quality-assurance" | "humanize" | "security-audit";
3
+ export type BuiltinCommands = Record<string, CommandDefinition>;
@@ -0,0 +1 @@
1
+ export * from "./types";
@@ -0,0 +1,43 @@
1
+ export type CommandScope = "user" | "project" | "opencode" | "opencode-project";
2
+ /**
3
+ * Handoff definition for command workflows.
4
+ * Based on speckit's handoff pattern for multi-agent orchestration.
5
+ * @see https://github.com/github/spec-kit
6
+ */
7
+ interface HandoffDefinition {
8
+ /** Human-readable label for the handoff action */
9
+ label: string;
10
+ /** Target agent/command identifier (e.g., "speckit.tasks") */
11
+ agent: string;
12
+ /** Pre-filled prompt text for the handoff */
13
+ prompt: string;
14
+ /** If true, automatically executes after command completion; if false, shows as suggestion */
15
+ send?: boolean;
16
+ }
17
+ export interface CommandDefinition {
18
+ name: string;
19
+ description?: string;
20
+ template: string;
21
+ agent?: string;
22
+ model?: string;
23
+ subtask?: boolean;
24
+ argumentHint?: string;
25
+ /** Handoff definitions for workflow transitions */
26
+ handoffs?: HandoffDefinition[];
27
+ }
28
+ export interface CommandFrontmatter {
29
+ description?: string;
30
+ "argument-hint"?: string;
31
+ agent?: string;
32
+ model?: string;
33
+ subtask?: boolean;
34
+ /** Handoff definitions for workflow transitions */
35
+ handoffs?: HandoffDefinition[];
36
+ }
37
+ export interface LoadedCommand {
38
+ name: string;
39
+ path: string;
40
+ definition: CommandDefinition;
41
+ scope: CommandScope;
42
+ }
43
+ export {};
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Task 10 — the `/plan-review` ADMISSION GATE, as a pure function over T2's
3
+ * gathered facts.
4
+ *
5
+ * WHY THE GATE IS A CONJUNCTION AND NOT `isComplete`: `isComplete` derives
6
+ * SOLELY from the plan's own checkboxes (`countPlanProgressFromContent`,
7
+ * `mission-state/storage.ts:163-189` → `isComplete: total === 0 || completed
8
+ * === total`), and those checkboxes are flipped by the fuzzy text-similarity
9
+ * heuristic T2 explicitly refuses to trust (`checkboxOverlap`,
10
+ * `mission-state/plan-storage.ts:98`). Admitting on `isComplete` alone would
11
+ * decide admission on the exact artifact the report then labels untrustworthy.
12
+ * So admission requires BOTH:
13
+ *
14
+ * a. `isComplete === true` AND `needsTriage === false` — the second clause is
15
+ * what rejects vacuous completeness, because a zero-checkbox plan arrives
16
+ * with `isComplete: true`; and
17
+ * b. at least one INDEPENDENT corroborating terminal signal — a linked task in
18
+ * terminal status (6-rule resolver, `plan-persister/task-link.ts:5-15`) or
19
+ * a notepad `## Completion` stamp — whose records together ACCOUNT FOR the
20
+ * plan's declared work.
21
+ *
22
+ * Both are read from T2's `AdmissionFacts`. This module re-reads nothing: a
23
+ * second, divergent gatherer is how two gates drift apart.
24
+ *
25
+ * ORDER IS THE SEMANTICS. `needsTriage` is consulted BEFORE `isComplete`,
26
+ * because a vacuous plan reads as complete and the vacuous truth must not pass
27
+ * as a genuine completion.
28
+ *
29
+ * THREE STATES, NOT TWO. `disagree` and `unavailable` are different statements:
30
+ * the first is "the two signals conflict", the second is "the signals were
31
+ * never there". Every plan executed before capture is structurally in the
32
+ * second case (measured: `metadata.planName` appears in 0 of 48 task files,
33
+ * completion stamps in 1 of 19 notepad buckets), so folding them together would
34
+ * make `disagree` fire on every legacy plan and render the field as noise.
35
+ * `gateDisagreement` is therefore real but DIAGNOSTIC-ONLY: no code reads it;
36
+ * T4 renders it for the human reader and nothing branches on it.
37
+ *
38
+ * DISAGREEMENT NEVER PICKS A WINNER. When the signals conflict the gate
39
+ * PROCEEDS and records the conflict by name. Hard refusal is reserved for
40
+ * exactly two cases: vacuous completeness, or both signals saying incomplete.
41
+ *
42
+ * LOCKED decision #2: this module throws nothing, blocks nothing and returns no
43
+ * exit code. A low score, and a gate that guesses wrong, are both advisory.
44
+ */
45
+ import type { NotScorableCause } from "./degradation-types";
46
+ import type { AdmissionFacts, ProgressFacts } from "./gather-types";
47
+ import type { GateEvidence, GateState } from "./report-types";
48
+ /** Which signal carried the admission. Never left implicit in the record. */
49
+ export type AdmissionSignal = "checkboxes" | "corroboration";
50
+ /**
51
+ * The gate's own honesty notice. It may be wrong in BOTH directions, and saying
52
+ * so is part of the output rather than a caveat buried in a comment.
53
+ */
54
+ export declare const GATE_HEURISTIC_WARNING = "This admission gate is a HEURISTIC and may be wrong in BOTH directions: it can refuse a genuinely finished plan whose checkboxes were never flipped, and it can admit a genuinely unfinished one. The recorded state below is a finding about the plan, not ground truth.";
55
+ /** The measured gap behind `gateEvidence: "unavailable"`, quoted not paraphrased. */
56
+ export declare const UNAVAILABLE_EVIDENCE_GAP = "corroboration is structurally absent: `metadata.planName` appears in 0 of 48 task files, and a `## Completion` stamp in 1 of 19 notepad buckets";
57
+ /** A conflict between the two signals. Rendered for the reader; never branched on. */
58
+ export interface GateDisagreement {
59
+ checkboxesSaysComplete: boolean;
60
+ corroborationSaysComplete: boolean;
61
+ resolved: "proceed";
62
+ reason: string;
63
+ }
64
+ export interface AdmissionDecision {
65
+ outcome: "admitted" | "refused";
66
+ /** `null` on refusal — nothing admitted the plan. */
67
+ admittedBy: AdmissionSignal | null;
68
+ gateState: GateState;
69
+ gateEvidence: GateEvidence;
70
+ gateDisagreement: GateDisagreement | null;
71
+ reason: string;
72
+ /** `null` unless refused; the one of two causes that refused it. */
73
+ refuseCause: NotScorableCause | null;
74
+ corroborationCount: number;
75
+ signalsPresent: {
76
+ linkedTerminalTasks: number;
77
+ notepadCompletionStamps: number;
78
+ };
79
+ }
80
+ export interface AdmissionInput {
81
+ progress: ProgressFacts;
82
+ admission: AdmissionFacts;
83
+ }
84
+ export declare function evaluateAdmission(input: AdmissionInput): AdmissionDecision;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Task 7 — the code-computable half of dimension 8.
3
+ *
4
+ * "Did the plan store a baseline at all?" is arithmetic-free and needs no
5
+ * judgement, so it is code. "Was that estimate right?" is an ordinal-vs-ordinal
6
+ * read of the comparison and is the MODEL's call — which is why this function
7
+ * returns presence and never a `score`.
8
+ */
9
+ import type { CalibrationBaselineCheck, PlanTimeBaseline } from "./calibration-types";
10
+ export declare function checkCalibrationBaseline(baseline: PlanTimeBaseline): CalibrationBaselineCheck;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Task 7 — reading the STORED plan-time baseline.
3
+ *
4
+ * The baseline is read, never re-derived. There is deliberately no complexity
5
+ * heuristic here: the routing-only C-level scorer is deliberately absent from
6
+ * this feature, and nothing in this module re-runs a keyword count.
7
+ */
8
+ import type { PlanTimeBaseline } from "./calibration-types";
9
+ export declare function parsePlanTimeBaseline(content: string): PlanTimeBaseline;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Task 9 — aggregating samples into a corpus of estimate accuracy.
3
+ *
4
+ * AGGREGATE, NEVER GROUP BY LEVEL. There is no complexity-level bucket here and
5
+ * there will not be one until the cutover's T12 capture task starts emitting the
6
+ * line; a per-level statistic today could only be built by synthesising a level
7
+ * per plan, which is the fabrication the reader exists to prevent. The observed
8
+ * facts and the verbatim baseline therefore sit SIDE BY SIDE as text, and the
9
+ * direction is left for a human to read.
10
+ *
11
+ * PAIRS, NOT BARE CODES. `E6` is the catch-all for MODEL dimensions and fires
12
+ * once per such dimension, so a bare-code tally is dominated by E6 and carries
13
+ * no information about which dimension actually failed. Counting
14
+ * `code`+`dimensionId` pairs is what turns a repeated row into a finding.
15
+ */
16
+ import type { CorpusReport, CorpusSample } from "./calibration-corpus-types";
17
+ export declare const SIGNIFICANCE_NOTE_PREFIX = "sample is NOT statistically significant";
18
+ export declare function aggregateCorpus(samples: readonly CorpusSample[], skipped: CorpusReport["skipped"], markdownFallbackCount: number): CorpusReport;
@@ -0,0 +1,20 @@
1
+ import type { CorpusSample, CorpusSkippedFile } from "./calibration-corpus-types";
2
+ import type { ReviewSidecar } from "./report-types";
3
+ export interface CorpusScanResult {
4
+ samples: CorpusSample[];
5
+ skipped: CorpusSkippedFile[];
6
+ markdownFallbackCount: number;
7
+ }
8
+ /**
9
+ * Structural guard on the sidecar. The version is checked FIRST and separately:
10
+ * an unknown version is a refusal, not a partial read, because a reader that
11
+ * guesses at a shape it does not understand is how a corpus quietly fills with
12
+ * numbers nobody produced.
13
+ */
14
+ export declare function isReviewSidecar(value: unknown): value is ReviewSidecar;
15
+ /**
16
+ * Read every review in `directory`. Non-existent directory yields an EMPTY
17
+ * result rather than an error — "no reviews yet" is a legitimate corpus state,
18
+ * and a reader that throws on it cannot be called before the first review.
19
+ */
20
+ export declare function scanReviewDirectory(directory: string): CorpusScanResult;
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Task 9 — shapes for the calibration corpus.
3
+ *
4
+ * THE CORPUS IS ADVISORY. A report on observed bias may be produced here; acting
5
+ * on it is a human decision. Nothing in this feature — this file included —
6
+ * feeds the corpus back into routing, scoring or any gate, and in particular NOT
7
+ * into the routing-only complexity heuristic or the Seraph gate that heuristic
8
+ * feeds. The sidecar already carries `advisory: true`; these types refuse to
9
+ * describe a corpus as anything else.
10
+ *
11
+ * NO PER-LEVEL GROUPING EXISTS, and the absence is deliberate rather than an
12
+ * unfinished feature. No plan in the corpus stores a `**Complexity**` level
13
+ * (0/35, excluding the completion-review plan files' own prose about the missing
14
+ * line), so a "bias per complexity level" statistic could only be built by
15
+ * SYNTHESISING a level per plan — inventing the very baseline the reader exists
16
+ * to report honestly. Grouping by level waits on the cutover's T12 capture task
17
+ * starting to emit that line. Until then the corpus is a FLAT aggregate.
18
+ *
19
+ * NOTHING HERE COMPUTES A DELTA. A plan-time baseline is an ordinal tier string
20
+ * with no numeric scale, so "under-estimated by 30%" would be a number no plan
21
+ * asserted. Observed facts and verbatim baseline text are placed SIDE BY SIDE and
22
+ * the direction is left to the human reader.
23
+ */
24
+ import type { FindingCode } from "./report-types";
25
+ /** Below this many samples the corpus is noise, and the report says so. */
26
+ export declare const MIN_SIGNIFICANT_SAMPLE = 10;
27
+ /**
28
+ * Where a row's data came from. `sidecar` is the normal path; `markdown` exists
29
+ * only so a review written before the sidecar shipped is still COUNTED rather
30
+ * than silently dropped, and a markdown row carries no structured data.
31
+ */
32
+ export type CorpusRowSource = "sidecar" | "markdown";
33
+ /** One plan's contribution to the corpus, read from its `.json` sidecar. */
34
+ export interface CorpusSample {
35
+ plan: string;
36
+ source: CorpusRowSource;
37
+ /** Verbatim `**Estimated Effort**` text, or `null` when the plan recorded none. */
38
+ effortVerbatim: string | null;
39
+ /** Verbatim `**Complexity**` text. `null` for every plan written so far. */
40
+ complexityVerbatim: string | null;
41
+ /**
42
+ * The observed text the review recorded, verbatim. It is a STRING because
43
+ * T7's `DIRECTION` forbids reducing an ordinal tier to a number; the corpus
44
+ * therefore groups observed text as text and never sums or subtracts it.
45
+ */
46
+ observedVerbatim: string | null;
47
+ /** Finding `code` + `dimensionId` pairs, counted as PAIRS (see the scan module). */
48
+ findingPairs: {
49
+ code: FindingCode;
50
+ dimensionId: string;
51
+ }[];
52
+ }
53
+ /** A file the reader could not use, with the reason. Never dropped in silence. */
54
+ export interface CorpusSkippedFile {
55
+ file: string;
56
+ reason: string;
57
+ }
58
+ /** A verbatim string and how many plans said it. No level, no order, no rank. */
59
+ export interface CorpusVerbatimGroup {
60
+ verbatim: string;
61
+ count: number;
62
+ }
63
+ /**
64
+ * One `code`+`dimensionId` pair and its frequency. PAIRS, never bare codes: `E6`
65
+ * is the catch-all for MODEL dimensions and fires once per such dimension, so a
66
+ * bare-code count is dominated by E6 and says nothing.
67
+ */
68
+ export interface CorpusFindingPairCount {
69
+ code: FindingCode;
70
+ dimensionId: string;
71
+ /** Plans in which this pair appeared at least once. */
72
+ count: number;
73
+ }
74
+ export interface CorpusReport {
75
+ /** Plans contributing structured data. Reported beside EVERY statistic below. */
76
+ sampleCount: number;
77
+ /** `sampleCount >= MIN_SIGNIFICANT_SAMPLE`. Never inferred from anything else. */
78
+ significant: boolean;
79
+ /** Always populated: with `sampleCount` and the threshold, in words. */
80
+ significanceNote: string;
81
+ /** Reviews present only as markdown. Counted, but contributing no data. */
82
+ markdownFallbackCount: number;
83
+ /** Files the reader could not use, and why. `skipped.length` is the count. */
84
+ skipped: CorpusSkippedFile[];
85
+ /** Verbatim plan-time effort tiers, each with how many plans recorded it. */
86
+ effortTiers: CorpusVerbatimGroup[];
87
+ /**
88
+ * Verbatim complexity tiers. EMPTY today — no plan stores the line. It is
89
+ * reported rather than omitted so the absence is visible, not inferred.
90
+ */
91
+ complexityTiers: CorpusVerbatimGroup[];
92
+ /** The observed text each sidecar recorded, grouped verbatim. */
93
+ observedPhrases: CorpusVerbatimGroup[];
94
+ findingPairs: CorpusFindingPairCount[];
95
+ }
@@ -0,0 +1,5 @@
1
+ import type { CorpusReport } from "./calibration-corpus-types";
2
+ export type { CorpusFindingPairCount, CorpusReport, CorpusRowSource, CorpusSample, CorpusSkippedFile, CorpusVerbatimGroup, } from "./calibration-corpus-types";
3
+ export { MIN_SIGNIFICANT_SAMPLE } from "./calibration-corpus-types";
4
+ /** Read a reviews directory and aggregate it. A missing directory yields an empty corpus. */
5
+ export declare function readCalibrationCorpus(reviewsDir?: string): CorpusReport;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Task 7 — the observed side of the comparison.
3
+ *
4
+ * Observed complexity is what execution demonstrably did: tasks executed, files
5
+ * touched, notepad blockers. It is never modelled, and never a re-run keyword
6
+ * heuristic over the plan text.
7
+ */
8
+ import type { ObservedExecutionFacts } from "./calibration-types";
9
+ import type { DriftFacts, ProgressFacts } from "./gather-types";
10
+ export interface ObservedFactSources {
11
+ progress: ProgressFacts;
12
+ drift: DriftFacts;
13
+ /** `## Blockers` entries counted in the plan's notepads by the caller. */
14
+ notepadBlockerEntries: number;
15
+ }
16
+ export declare function collectObservedExecutionFacts(sources: ObservedFactSources): ObservedExecutionFacts;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Task 7 — rendering sections (c) Complexity and (d) Required Effort.
3
+ *
4
+ * The shape is a COMPARISON, never a score: the plan's own words, reproduced
5
+ * verbatim, sitting BESIDE the facts execution demonstrably produced. No
6
+ * subtraction, no percentage, no "under-estimated by N" — an ordinal tier has no
7
+ * numeric scale, so any delta would be a number the plan never asserted.
8
+ *
9
+ * The absent-baseline path is handled FIRST because it is the common one: no
10
+ * plan in the corpus records a **Complexity** line, so the honest default is a
11
+ * section that renders and says why it is empty, not a section that invents a
12
+ * level to fill itself.
13
+ */
14
+ import type { CalibrationComparison, CalibrationRenderInput } from "./calibration-types";
15
+ export declare function renderCalibrationComparison(input: CalibrationRenderInput): CalibrationComparison;