oh-my-claude-sisyphus 3.8.8 → 3.8.10

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 (460) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +1 -1
  4. package/agents/architect.md +78 -0
  5. package/agents/explore.md +15 -0
  6. package/agents/qa-tester.md +159 -1
  7. package/agents/writer.md +20 -0
  8. package/commands/help.md +1 -1
  9. package/commands/omc-setup.md +1 -1
  10. package/dist/__tests__/agent-registry.test.d.ts +2 -0
  11. package/dist/__tests__/agent-registry.test.d.ts.map +1 -0
  12. package/dist/__tests__/agent-registry.test.js +39 -0
  13. package/dist/__tests__/agent-registry.test.js.map +1 -0
  14. package/dist/__tests__/hooks.test.js +6 -6
  15. package/dist/__tests__/hooks.test.js.map +1 -1
  16. package/dist/__tests__/load-agent-prompt.test.d.ts +2 -0
  17. package/dist/__tests__/load-agent-prompt.test.d.ts.map +1 -0
  18. package/dist/__tests__/load-agent-prompt.test.js +68 -0
  19. package/dist/__tests__/load-agent-prompt.test.js.map +1 -0
  20. package/dist/__tests__/model-routing.test.js +5 -34
  21. package/dist/__tests__/model-routing.test.js.map +1 -1
  22. package/dist/agents/analyst.d.ts.map +1 -1
  23. package/dist/agents/analyst.js +2 -77
  24. package/dist/agents/analyst.js.map +1 -1
  25. package/dist/agents/architect.d.ts.map +1 -1
  26. package/dist/agents/architect.js +3 -148
  27. package/dist/agents/architect.js.map +1 -1
  28. package/dist/agents/coordinator-deprecated.d.ts +18 -0
  29. package/dist/agents/coordinator-deprecated.d.ts.map +1 -0
  30. package/dist/agents/coordinator-deprecated.js +34 -0
  31. package/dist/agents/coordinator-deprecated.js.map +1 -0
  32. package/dist/agents/critic.d.ts.map +1 -1
  33. package/dist/agents/critic.js +2 -90
  34. package/dist/agents/critic.js.map +1 -1
  35. package/dist/agents/definitions.d.ts +2 -0
  36. package/dist/agents/definitions.d.ts.map +1 -1
  37. package/dist/agents/definitions.js +3 -32
  38. package/dist/agents/definitions.js.map +1 -1
  39. package/dist/agents/designer.d.ts.map +1 -1
  40. package/dist/agents/designer.js +2 -73
  41. package/dist/agents/designer.js.map +1 -1
  42. package/dist/agents/executor.d.ts +1 -0
  43. package/dist/agents/executor.d.ts.map +1 -1
  44. package/dist/agents/executor.js +3 -56
  45. package/dist/agents/executor.js.map +1 -1
  46. package/dist/agents/explore.d.ts.map +1 -1
  47. package/dist/agents/explore.js +2 -64
  48. package/dist/agents/explore.js.map +1 -1
  49. package/dist/agents/index.d.ts +4 -3
  50. package/dist/agents/index.d.ts.map +1 -1
  51. package/dist/agents/index.js +6 -3
  52. package/dist/agents/index.js.map +1 -1
  53. package/dist/agents/planner.d.ts.map +1 -1
  54. package/dist/agents/planner.js +2 -157
  55. package/dist/agents/planner.js.map +1 -1
  56. package/dist/agents/qa-tester.d.ts.map +1 -1
  57. package/dist/agents/qa-tester.js +2 -324
  58. package/dist/agents/qa-tester.js.map +1 -1
  59. package/dist/agents/researcher.d.ts.map +1 -1
  60. package/dist/agents/researcher.js +2 -65
  61. package/dist/agents/researcher.js.map +1 -1
  62. package/dist/agents/scientist.d.ts.map +1 -1
  63. package/dist/agents/scientist.js +2 -293
  64. package/dist/agents/scientist.js.map +1 -1
  65. package/dist/agents/utils.d.ts +7 -0
  66. package/dist/agents/utils.d.ts.map +1 -1
  67. package/dist/agents/utils.js +50 -0
  68. package/dist/agents/utils.js.map +1 -1
  69. package/dist/agents/vision.d.ts.map +1 -1
  70. package/dist/agents/vision.js +2 -32
  71. package/dist/agents/vision.js.map +1 -1
  72. package/dist/agents/writer.d.ts.map +1 -1
  73. package/dist/agents/writer.js +2 -171
  74. package/dist/agents/writer.js.map +1 -1
  75. package/dist/cli/analytics.js +0 -0
  76. package/dist/cli/index.js +0 -0
  77. package/dist/features/model-routing/index.d.ts +1 -1
  78. package/dist/features/model-routing/index.d.ts.map +1 -1
  79. package/dist/features/model-routing/index.js +1 -1
  80. package/dist/features/model-routing/index.js.map +1 -1
  81. package/dist/features/model-routing/router.d.ts +1 -15
  82. package/dist/features/model-routing/router.d.ts.map +1 -1
  83. package/dist/features/model-routing/router.js +2 -33
  84. package/dist/features/model-routing/router.js.map +1 -1
  85. package/dist/features/model-routing/rules.d.ts.map +1 -1
  86. package/dist/features/model-routing/rules.js +0 -8
  87. package/dist/features/model-routing/rules.js.map +1 -1
  88. package/dist/features/model-routing/types.d.ts +1 -2
  89. package/dist/features/model-routing/types.d.ts.map +1 -1
  90. package/dist/features/model-routing/types.js +2 -6
  91. package/dist/features/model-routing/types.js.map +1 -1
  92. package/dist/features/task-decomposer/index.d.ts +1 -1
  93. package/dist/features/task-decomposer/index.d.ts.map +1 -1
  94. package/dist/features/task-decomposer/index.js +5 -8
  95. package/dist/features/task-decomposer/index.js.map +1 -1
  96. package/dist/features/task-decomposer/types.d.ts +4 -4
  97. package/dist/features/task-decomposer/types.d.ts.map +1 -1
  98. package/dist/hooks/bridge.d.ts.map +1 -1
  99. package/dist/hooks/bridge.js +10 -2
  100. package/dist/hooks/bridge.js.map +1 -1
  101. package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
  102. package/dist/hooks/persistent-mode/index.js +14 -12
  103. package/dist/hooks/persistent-mode/index.js.map +1 -1
  104. package/dist/hooks/todo-continuation/index.d.ts +9 -0
  105. package/dist/hooks/todo-continuation/index.d.ts.map +1 -1
  106. package/dist/hooks/todo-continuation/index.js +19 -0
  107. package/dist/hooks/todo-continuation/index.js.map +1 -1
  108. package/dist/hooks/ultrapilot/decomposer.d.ts +1 -1
  109. package/dist/hooks/ultrapilot/decomposer.js +2 -2
  110. package/dist/index.d.ts +1 -1
  111. package/dist/index.d.ts.map +1 -1
  112. package/dist/index.js +4 -2
  113. package/dist/index.js.map +1 -1
  114. package/docs/CLAUDE.md +44 -4
  115. package/docs/FEATURES.md +1 -1
  116. package/docs/MIGRATION.md +5 -5
  117. package/docs/REFERENCE.md +6 -2
  118. package/package.json +1 -1
  119. package/scripts/persistent-mode.mjs +27 -12
  120. package/skills/help/SKILL.md +1 -1
  121. package/skills/omc-setup/SKILL.md +1 -1
  122. package/templates/hooks/persistent-mode.mjs +26 -12
  123. package/templates/hooks/stop-continuation.mjs +30 -0
  124. package/dist/__tests__/analytics/analytics-summary.test.d.ts +0 -2
  125. package/dist/__tests__/analytics/analytics-summary.test.d.ts.map +0 -1
  126. package/dist/__tests__/analytics/analytics-summary.test.js +0 -267
  127. package/dist/__tests__/analytics/analytics-summary.test.js.map +0 -1
  128. package/dist/__tests__/analytics/cost-estimator.test.d.ts +0 -2
  129. package/dist/__tests__/analytics/cost-estimator.test.d.ts.map +0 -1
  130. package/dist/__tests__/analytics/cost-estimator.test.js +0 -212
  131. package/dist/__tests__/analytics/cost-estimator.test.js.map +0 -1
  132. package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts +0 -7
  133. package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts.map +0 -1
  134. package/dist/__tests__/hooks/auto-slash-command/executor.test.js +0 -374
  135. package/dist/__tests__/hooks/auto-slash-command/executor.test.js.map +0 -1
  136. package/dist/__tests__/hud/auto-tracking.integration.test.d.ts +0 -2
  137. package/dist/__tests__/hud/auto-tracking.integration.test.d.ts.map +0 -1
  138. package/dist/__tests__/hud/auto-tracking.integration.test.js +0 -12
  139. package/dist/__tests__/hud/auto-tracking.integration.test.js.map +0 -1
  140. package/dist/__tests__/learned-skills/config.test.d.ts +0 -2
  141. package/dist/__tests__/learned-skills/config.test.d.ts.map +0 -1
  142. package/dist/__tests__/learned-skills/config.test.js +0 -37
  143. package/dist/__tests__/learned-skills/config.test.js.map +0 -1
  144. package/dist/__tests__/learned-skills/detector.test.d.ts +0 -2
  145. package/dist/__tests__/learned-skills/detector.test.d.ts.map +0 -1
  146. package/dist/__tests__/learned-skills/detector.test.js +0 -99
  147. package/dist/__tests__/learned-skills/detector.test.js.map +0 -1
  148. package/dist/__tests__/learned-skills/finder.test.d.ts +0 -2
  149. package/dist/__tests__/learned-skills/finder.test.d.ts.map +0 -1
  150. package/dist/__tests__/learned-skills/finder.test.js +0 -59
  151. package/dist/__tests__/learned-skills/finder.test.js.map +0 -1
  152. package/dist/__tests__/learned-skills/loader.test.d.ts +0 -2
  153. package/dist/__tests__/learned-skills/loader.test.d.ts.map +0 -1
  154. package/dist/__tests__/learned-skills/loader.test.js +0 -69
  155. package/dist/__tests__/learned-skills/loader.test.js.map +0 -1
  156. package/dist/__tests__/learned-skills/parser.test.d.ts +0 -2
  157. package/dist/__tests__/learned-skills/parser.test.d.ts.map +0 -1
  158. package/dist/__tests__/learned-skills/parser.test.js +0 -81
  159. package/dist/__tests__/learned-skills/parser.test.js.map +0 -1
  160. package/dist/__tests__/learned-skills/validator.test.d.ts +0 -2
  161. package/dist/__tests__/learned-skills/validator.test.d.ts.map +0 -1
  162. package/dist/__tests__/learned-skills/validator.test.js +0 -85
  163. package/dist/__tests__/learned-skills/validator.test.js.map +0 -1
  164. package/dist/agents/codex-agents.d.ts +0 -20
  165. package/dist/agents/codex-agents.d.ts.map +0 -1
  166. package/dist/agents/codex-agents.js +0 -36
  167. package/dist/agents/codex-agents.js.map +0 -1
  168. package/dist/agents/coordinator.d.ts +0 -11
  169. package/dist/agents/coordinator.d.ts.map +0 -1
  170. package/dist/agents/coordinator.js +0 -115
  171. package/dist/agents/coordinator.js.map +0 -1
  172. package/dist/agents/document-writer.d.ts +0 -11
  173. package/dist/agents/document-writer.d.ts.map +0 -1
  174. package/dist/agents/document-writer.js +0 -209
  175. package/dist/agents/document-writer.js.map +0 -1
  176. package/dist/agents/frontend-engineer.d.ts +0 -11
  177. package/dist/agents/frontend-engineer.d.ts.map +0 -1
  178. package/dist/agents/frontend-engineer.js +0 -115
  179. package/dist/agents/frontend-engineer.js.map +0 -1
  180. package/dist/agents/librarian.d.ts +0 -12
  181. package/dist/agents/librarian.d.ts.map +0 -1
  182. package/dist/agents/librarian.js +0 -103
  183. package/dist/agents/librarian.js.map +0 -1
  184. package/dist/agents/metis.d.ts +0 -12
  185. package/dist/agents/metis.d.ts.map +0 -1
  186. package/dist/agents/metis.js +0 -117
  187. package/dist/agents/metis.js.map +0 -1
  188. package/dist/agents/momus.d.ts +0 -12
  189. package/dist/agents/momus.d.ts.map +0 -1
  190. package/dist/agents/momus.js +0 -128
  191. package/dist/agents/momus.js.map +0 -1
  192. package/dist/agents/multimodal-looker.d.ts +0 -11
  193. package/dist/agents/multimodal-looker.d.ts.map +0 -1
  194. package/dist/agents/multimodal-looker.js +0 -70
  195. package/dist/agents/multimodal-looker.js.map +0 -1
  196. package/dist/agents/oracle.d.ts +0 -13
  197. package/dist/agents/oracle.d.ts.map +0 -1
  198. package/dist/agents/oracle.js +0 -191
  199. package/dist/agents/oracle.js.map +0 -1
  200. package/dist/agents/orchestrator-sisyphus.d.ts +0 -11
  201. package/dist/agents/orchestrator-sisyphus.d.ts.map +0 -1
  202. package/dist/agents/orchestrator-sisyphus.js +0 -115
  203. package/dist/agents/orchestrator-sisyphus.js.map +0 -1
  204. package/dist/agents/prometheus.d.ts +0 -12
  205. package/dist/agents/prometheus.d.ts.map +0 -1
  206. package/dist/agents/prometheus.js +0 -195
  207. package/dist/agents/prometheus.js.map +0 -1
  208. package/dist/agents/sisyphus-junior.d.ts +0 -12
  209. package/dist/agents/sisyphus-junior.d.ts.map +0 -1
  210. package/dist/agents/sisyphus-junior.js +0 -93
  211. package/dist/agents/sisyphus-junior.js.map +0 -1
  212. package/dist/cli/components/CostDashboard.d.ts +0 -15
  213. package/dist/cli/components/CostDashboard.d.ts.map +0 -1
  214. package/dist/cli/components/CostDashboard.js +0 -15
  215. package/dist/cli/components/CostDashboard.js.map +0 -1
  216. package/dist/cli/components/LiveStats.d.ts +0 -16
  217. package/dist/cli/components/LiveStats.d.ts.map +0 -1
  218. package/dist/cli/components/LiveStats.js +0 -16
  219. package/dist/cli/components/LiveStats.js.map +0 -1
  220. package/dist/cli/components/SessionBrowser.d.ts +0 -14
  221. package/dist/cli/components/SessionBrowser.d.ts.map +0 -1
  222. package/dist/cli/components/SessionBrowser.js +0 -14
  223. package/dist/cli/components/SessionBrowser.js.map +0 -1
  224. package/dist/cli/tui.d.ts +0 -21
  225. package/dist/cli/tui.d.ts.map +0 -1
  226. package/dist/cli/tui.js +0 -21
  227. package/dist/cli/tui.js.map +0 -1
  228. package/dist/hooks/autopilot/signals.d.ts +0 -20
  229. package/dist/hooks/autopilot/signals.d.ts.map +0 -1
  230. package/dist/hooks/autopilot/signals.js +0 -75
  231. package/dist/hooks/autopilot/signals.js.map +0 -1
  232. package/dist/hooks/autopilot/summary.d.ts +0 -27
  233. package/dist/hooks/autopilot/summary.d.ts.map +0 -1
  234. package/dist/hooks/autopilot/summary.js +0 -160
  235. package/dist/hooks/autopilot/summary.js.map +0 -1
  236. package/dist/hooks/autopilot/transition.d.ts +0 -39
  237. package/dist/hooks/autopilot/transition.d.ts.map +0 -1
  238. package/dist/hooks/autopilot/transition.js +0 -216
  239. package/dist/hooks/autopilot/transition.js.map +0 -1
  240. package/dist/hooks/context-window-limit-recovery/constants.d.ts +0 -28
  241. package/dist/hooks/context-window-limit-recovery/constants.d.ts.map +0 -1
  242. package/dist/hooks/context-window-limit-recovery/constants.js +0 -85
  243. package/dist/hooks/context-window-limit-recovery/constants.js.map +0 -1
  244. package/dist/hooks/context-window-limit-recovery/index.d.ts +0 -62
  245. package/dist/hooks/context-window-limit-recovery/index.d.ts.map +0 -1
  246. package/dist/hooks/context-window-limit-recovery/index.js +0 -201
  247. package/dist/hooks/context-window-limit-recovery/index.js.map +0 -1
  248. package/dist/hooks/context-window-limit-recovery/parser.d.ts +0 -31
  249. package/dist/hooks/context-window-limit-recovery/parser.d.ts.map +0 -1
  250. package/dist/hooks/context-window-limit-recovery/parser.js +0 -241
  251. package/dist/hooks/context-window-limit-recovery/parser.js.map +0 -1
  252. package/dist/hooks/context-window-limit-recovery/types.d.ts +0 -84
  253. package/dist/hooks/context-window-limit-recovery/types.d.ts.map +0 -1
  254. package/dist/hooks/context-window-limit-recovery/types.js +0 -34
  255. package/dist/hooks/context-window-limit-recovery/types.js.map +0 -1
  256. package/dist/hooks/edit-error-recovery/index.d.ts +0 -62
  257. package/dist/hooks/edit-error-recovery/index.d.ts.map +0 -1
  258. package/dist/hooks/edit-error-recovery/index.js +0 -89
  259. package/dist/hooks/edit-error-recovery/index.js.map +0 -1
  260. package/dist/hooks/github-auto-responder/classifier.d.ts +0 -43
  261. package/dist/hooks/github-auto-responder/classifier.d.ts.map +0 -1
  262. package/dist/hooks/github-auto-responder/classifier.js +0 -150
  263. package/dist/hooks/github-auto-responder/classifier.js.map +0 -1
  264. package/dist/hooks/github-auto-responder/config.d.ts +0 -109
  265. package/dist/hooks/github-auto-responder/config.d.ts.map +0 -1
  266. package/dist/hooks/github-auto-responder/config.js +0 -69
  267. package/dist/hooks/github-auto-responder/config.js.map +0 -1
  268. package/dist/hooks/github-auto-responder/constants.d.ts +0 -45
  269. package/dist/hooks/github-auto-responder/constants.d.ts.map +0 -1
  270. package/dist/hooks/github-auto-responder/constants.js +0 -60
  271. package/dist/hooks/github-auto-responder/constants.js.map +0 -1
  272. package/dist/hooks/github-auto-responder/filters.d.ts +0 -95
  273. package/dist/hooks/github-auto-responder/filters.d.ts.map +0 -1
  274. package/dist/hooks/github-auto-responder/filters.js +0 -174
  275. package/dist/hooks/github-auto-responder/filters.js.map +0 -1
  276. package/dist/hooks/github-auto-responder/github-client.d.ts +0 -65
  277. package/dist/hooks/github-auto-responder/github-client.d.ts.map +0 -1
  278. package/dist/hooks/github-auto-responder/github-client.js +0 -128
  279. package/dist/hooks/github-auto-responder/github-client.js.map +0 -1
  280. package/dist/hooks/github-auto-responder/idempotency.d.ts +0 -68
  281. package/dist/hooks/github-auto-responder/idempotency.d.ts.map +0 -1
  282. package/dist/hooks/github-auto-responder/idempotency.js +0 -147
  283. package/dist/hooks/github-auto-responder/idempotency.js.map +0 -1
  284. package/dist/hooks/github-auto-responder/index.d.ts +0 -140
  285. package/dist/hooks/github-auto-responder/index.d.ts.map +0 -1
  286. package/dist/hooks/github-auto-responder/index.js +0 -145
  287. package/dist/hooks/github-auto-responder/index.js.map +0 -1
  288. package/dist/hooks/github-auto-responder/persona.d.ts +0 -40
  289. package/dist/hooks/github-auto-responder/persona.d.ts.map +0 -1
  290. package/dist/hooks/github-auto-responder/persona.js +0 -99
  291. package/dist/hooks/github-auto-responder/persona.js.map +0 -1
  292. package/dist/hooks/github-auto-responder/responder.d.ts +0 -122
  293. package/dist/hooks/github-auto-responder/responder.d.ts.map +0 -1
  294. package/dist/hooks/github-auto-responder/responder.js +0 -264
  295. package/dist/hooks/github-auto-responder/responder.js.map +0 -1
  296. package/dist/hooks/github-auto-responder/server.d.ts +0 -140
  297. package/dist/hooks/github-auto-responder/server.d.ts.map +0 -1
  298. package/dist/hooks/github-auto-responder/server.js +0 -301
  299. package/dist/hooks/github-auto-responder/server.js.map +0 -1
  300. package/dist/hooks/github-auto-responder/signature.d.ts +0 -34
  301. package/dist/hooks/github-auto-responder/signature.d.ts.map +0 -1
  302. package/dist/hooks/github-auto-responder/signature.js +0 -79
  303. package/dist/hooks/github-auto-responder/signature.js.map +0 -1
  304. package/dist/hooks/github-auto-responder/templates.d.ts +0 -16
  305. package/dist/hooks/github-auto-responder/templates.d.ts.map +0 -1
  306. package/dist/hooks/github-auto-responder/templates.js +0 -93
  307. package/dist/hooks/github-auto-responder/templates.js.map +0 -1
  308. package/dist/hooks/github-auto-responder/types.d.ts +0 -246
  309. package/dist/hooks/github-auto-responder/types.d.ts.map +0 -1
  310. package/dist/hooks/github-auto-responder/types.js +0 -7
  311. package/dist/hooks/github-auto-responder/types.js.map +0 -1
  312. package/dist/hooks/learned-skills/config.d.ts +0 -53
  313. package/dist/hooks/learned-skills/config.d.ts.map +0 -1
  314. package/dist/hooks/learned-skills/config.js +0 -103
  315. package/dist/hooks/learned-skills/config.js.map +0 -1
  316. package/dist/hooks/learned-skills/constants.d.ts +0 -24
  317. package/dist/hooks/learned-skills/constants.d.ts.map +0 -1
  318. package/dist/hooks/learned-skills/constants.js +0 -26
  319. package/dist/hooks/learned-skills/constants.js.map +0 -1
  320. package/dist/hooks/learned-skills/detection-hook.d.ts +0 -39
  321. package/dist/hooks/learned-skills/detection-hook.d.ts.map +0 -1
  322. package/dist/hooks/learned-skills/detection-hook.js +0 -83
  323. package/dist/hooks/learned-skills/detection-hook.js.map +0 -1
  324. package/dist/hooks/learned-skills/detector.d.ts +0 -30
  325. package/dist/hooks/learned-skills/detector.d.ts.map +0 -1
  326. package/dist/hooks/learned-skills/detector.js +0 -150
  327. package/dist/hooks/learned-skills/detector.js.map +0 -1
  328. package/dist/hooks/learned-skills/finder.d.ts +0 -21
  329. package/dist/hooks/learned-skills/finder.d.ts.map +0 -1
  330. package/dist/hooks/learned-skills/finder.js +0 -117
  331. package/dist/hooks/learned-skills/finder.js.map +0 -1
  332. package/dist/hooks/learned-skills/index.d.ts +0 -62
  333. package/dist/hooks/learned-skills/index.d.ts.map +0 -1
  334. package/dist/hooks/learned-skills/index.js +0 -137
  335. package/dist/hooks/learned-skills/index.js.map +0 -1
  336. package/dist/hooks/learned-skills/loader.d.ts +0 -20
  337. package/dist/hooks/learned-skills/loader.d.ts.map +0 -1
  338. package/dist/hooks/learned-skills/loader.js +0 -107
  339. package/dist/hooks/learned-skills/loader.js.map +0 -1
  340. package/dist/hooks/learned-skills/parser.d.ts +0 -21
  341. package/dist/hooks/learned-skills/parser.d.ts.map +0 -1
  342. package/dist/hooks/learned-skills/parser.js +0 -190
  343. package/dist/hooks/learned-skills/parser.js.map +0 -1
  344. package/dist/hooks/learned-skills/promotion.d.ts +0 -29
  345. package/dist/hooks/learned-skills/promotion.d.ts.map +0 -1
  346. package/dist/hooks/learned-skills/promotion.js +0 -87
  347. package/dist/hooks/learned-skills/promotion.js.map +0 -1
  348. package/dist/hooks/learned-skills/types.d.ts +0 -109
  349. package/dist/hooks/learned-skills/types.d.ts.map +0 -1
  350. package/dist/hooks/learned-skills/types.js +0 -8
  351. package/dist/hooks/learned-skills/types.js.map +0 -1
  352. package/dist/hooks/learned-skills/validator.d.ts +0 -15
  353. package/dist/hooks/learned-skills/validator.d.ts.map +0 -1
  354. package/dist/hooks/learned-skills/validator.js +0 -87
  355. package/dist/hooks/learned-skills/validator.js.map +0 -1
  356. package/dist/hooks/learned-skills/writer.d.ts +0 -27
  357. package/dist/hooks/learned-skills/writer.d.ts.map +0 -1
  358. package/dist/hooks/learned-skills/writer.js +0 -126
  359. package/dist/hooks/learned-skills/writer.js.map +0 -1
  360. package/dist/hooks/mnemosyne/config.d.ts +0 -53
  361. package/dist/hooks/mnemosyne/config.d.ts.map +0 -1
  362. package/dist/hooks/mnemosyne/config.js +0 -103
  363. package/dist/hooks/mnemosyne/config.js.map +0 -1
  364. package/dist/hooks/mnemosyne/constants.d.ts +0 -24
  365. package/dist/hooks/mnemosyne/constants.d.ts.map +0 -1
  366. package/dist/hooks/mnemosyne/constants.js +0 -26
  367. package/dist/hooks/mnemosyne/constants.js.map +0 -1
  368. package/dist/hooks/mnemosyne/detection-hook.d.ts +0 -39
  369. package/dist/hooks/mnemosyne/detection-hook.d.ts.map +0 -1
  370. package/dist/hooks/mnemosyne/detection-hook.js +0 -83
  371. package/dist/hooks/mnemosyne/detection-hook.js.map +0 -1
  372. package/dist/hooks/mnemosyne/detector.d.ts +0 -30
  373. package/dist/hooks/mnemosyne/detector.d.ts.map +0 -1
  374. package/dist/hooks/mnemosyne/detector.js +0 -150
  375. package/dist/hooks/mnemosyne/detector.js.map +0 -1
  376. package/dist/hooks/mnemosyne/finder.d.ts +0 -21
  377. package/dist/hooks/mnemosyne/finder.d.ts.map +0 -1
  378. package/dist/hooks/mnemosyne/finder.js +0 -117
  379. package/dist/hooks/mnemosyne/finder.js.map +0 -1
  380. package/dist/hooks/mnemosyne/index.d.ts +0 -62
  381. package/dist/hooks/mnemosyne/index.d.ts.map +0 -1
  382. package/dist/hooks/mnemosyne/index.js +0 -137
  383. package/dist/hooks/mnemosyne/index.js.map +0 -1
  384. package/dist/hooks/mnemosyne/loader.d.ts +0 -20
  385. package/dist/hooks/mnemosyne/loader.d.ts.map +0 -1
  386. package/dist/hooks/mnemosyne/loader.js +0 -113
  387. package/dist/hooks/mnemosyne/loader.js.map +0 -1
  388. package/dist/hooks/mnemosyne/parser.d.ts +0 -21
  389. package/dist/hooks/mnemosyne/parser.d.ts.map +0 -1
  390. package/dist/hooks/mnemosyne/parser.js +0 -190
  391. package/dist/hooks/mnemosyne/parser.js.map +0 -1
  392. package/dist/hooks/mnemosyne/promotion.d.ts +0 -29
  393. package/dist/hooks/mnemosyne/promotion.d.ts.map +0 -1
  394. package/dist/hooks/mnemosyne/promotion.js +0 -87
  395. package/dist/hooks/mnemosyne/promotion.js.map +0 -1
  396. package/dist/hooks/mnemosyne/types.d.ts +0 -109
  397. package/dist/hooks/mnemosyne/types.d.ts.map +0 -1
  398. package/dist/hooks/mnemosyne/types.js +0 -8
  399. package/dist/hooks/mnemosyne/types.js.map +0 -1
  400. package/dist/hooks/mnemosyne/validator.d.ts +0 -15
  401. package/dist/hooks/mnemosyne/validator.d.ts.map +0 -1
  402. package/dist/hooks/mnemosyne/validator.js +0 -87
  403. package/dist/hooks/mnemosyne/validator.js.map +0 -1
  404. package/dist/hooks/mnemosyne/writer.d.ts +0 -27
  405. package/dist/hooks/mnemosyne/writer.d.ts.map +0 -1
  406. package/dist/hooks/mnemosyne/writer.js +0 -126
  407. package/dist/hooks/mnemosyne/writer.js.map +0 -1
  408. package/dist/hooks/ralph-loop/index.d.ts +0 -116
  409. package/dist/hooks/ralph-loop/index.d.ts.map +0 -1
  410. package/dist/hooks/ralph-loop/index.js +0 -322
  411. package/dist/hooks/ralph-loop/index.js.map +0 -1
  412. package/dist/hooks/ralph-prd/index.d.ts +0 -130
  413. package/dist/hooks/ralph-prd/index.d.ts.map +0 -1
  414. package/dist/hooks/ralph-prd/index.js +0 -310
  415. package/dist/hooks/ralph-prd/index.js.map +0 -1
  416. package/dist/hooks/ralph-progress/index.d.ts +0 -102
  417. package/dist/hooks/ralph-progress/index.d.ts.map +0 -1
  418. package/dist/hooks/ralph-progress/index.js +0 -408
  419. package/dist/hooks/ralph-progress/index.js.map +0 -1
  420. package/dist/hooks/ralph-verifier/index.d.ts +0 -72
  421. package/dist/hooks/ralph-verifier/index.d.ts.map +0 -1
  422. package/dist/hooks/ralph-verifier/index.js +0 -223
  423. package/dist/hooks/ralph-verifier/index.js.map +0 -1
  424. package/dist/hooks/session-recovery/constants.d.ts +0 -56
  425. package/dist/hooks/session-recovery/constants.d.ts.map +0 -1
  426. package/dist/hooks/session-recovery/constants.js +0 -78
  427. package/dist/hooks/session-recovery/constants.js.map +0 -1
  428. package/dist/hooks/session-recovery/index.d.ts +0 -53
  429. package/dist/hooks/session-recovery/index.d.ts.map +0 -1
  430. package/dist/hooks/session-recovery/index.js +0 -321
  431. package/dist/hooks/session-recovery/index.js.map +0 -1
  432. package/dist/hooks/session-recovery/storage.d.ts +0 -76
  433. package/dist/hooks/session-recovery/storage.d.ts.map +0 -1
  434. package/dist/hooks/session-recovery/storage.js +0 -383
  435. package/dist/hooks/session-recovery/storage.js.map +0 -1
  436. package/dist/hooks/session-recovery/types.d.ts +0 -145
  437. package/dist/hooks/session-recovery/types.d.ts.map +0 -1
  438. package/dist/hooks/session-recovery/types.js +0 -8
  439. package/dist/hooks/session-recovery/types.js.map +0 -1
  440. package/dist/hooks/sisyphus-orchestrator/constants.d.ts +0 -23
  441. package/dist/hooks/sisyphus-orchestrator/constants.d.ts.map +0 -1
  442. package/dist/hooks/sisyphus-orchestrator/constants.js +0 -142
  443. package/dist/hooks/sisyphus-orchestrator/constants.js.map +0 -1
  444. package/dist/hooks/sisyphus-orchestrator/index.d.ts +0 -113
  445. package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +0 -1
  446. package/dist/hooks/sisyphus-orchestrator/index.js +0 -309
  447. package/dist/hooks/sisyphus-orchestrator/index.js.map +0 -1
  448. package/dist/hooks/ultraqa-loop/index.d.ts +0 -94
  449. package/dist/hooks/ultraqa-loop/index.d.ts.map +0 -1
  450. package/dist/hooks/ultraqa-loop/index.js +0 -216
  451. package/dist/hooks/ultraqa-loop/index.js.map +0 -1
  452. package/dist/hooks/ultrawork-state/index.d.ts +0 -62
  453. package/dist/hooks/ultrawork-state/index.d.ts.map +0 -1
  454. package/dist/hooks/ultrawork-state/index.js +0 -208
  455. package/dist/hooks/ultrawork-state/index.js.map +0 -1
  456. package/dist/hud/sisyphus-state.d.ts +0 -31
  457. package/dist/hud/sisyphus-state.d.ts.map +0 -1
  458. package/dist/hud/sisyphus-state.js +0 -163
  459. package/dist/hud/sisyphus-state.js.map +0 -1
  460. package/dist/mcp/standalone-server.cjs +0 -19135
@@ -1,142 +0,0 @@
1
- /**
2
- * Sisyphus Orchestrator Constants
3
- *
4
- * Message templates and configuration for orchestrator behavior enforcement.
5
- *
6
- * Adapted from oh-my-opencode's sisyphus-orchestrator hook.
7
- */
8
- export const HOOK_NAME = 'sisyphus-orchestrator';
9
- /** Paths that orchestrator IS allowed to modify directly */
10
- export const ALLOWED_PATH_PREFIX = '.sisyphus/';
11
- /** Tools that perform file modifications */
12
- export const WRITE_EDIT_TOOLS = ['Write', 'Edit', 'write', 'edit'];
13
- /** Reminder when orchestrator performs direct file work */
14
- export const DIRECT_WORK_REMINDER = `
15
-
16
- ---
17
-
18
- [SYSTEM REMINDER - DELEGATION REQUIRED]
19
-
20
- You just performed direct file modifications outside \`.sisyphus/\`.
21
-
22
- **You are an ORCHESTRATOR, not an IMPLEMENTER.**
23
-
24
- As an orchestrator, you should:
25
- - **DELEGATE** implementation work to subagents via the Task tool
26
- - **VERIFY** the work done by subagents
27
- - **COORDINATE** multiple tasks and ensure completion
28
-
29
- You should NOT:
30
- - Write code directly (except for \`.sisyphus/\` files like plans and notepads)
31
- - Make direct file edits outside \`.sisyphus/\`
32
- - Implement features yourself
33
-
34
- **If you need to make changes:**
35
- 1. Use the Task tool to delegate to an appropriate subagent
36
- 2. Provide clear instructions in the prompt
37
- 3. Verify the subagent's work after completion
38
-
39
- ---
40
- `;
41
- /** Strong warning when orchestrator tries to modify source files */
42
- export const ORCHESTRATOR_DELEGATION_REQUIRED = `
43
-
44
- ---
45
-
46
- [CRITICAL SYSTEM DIRECTIVE - DELEGATION REQUIRED]
47
-
48
- **STOP. YOU ARE VIOLATING ORCHESTRATOR PROTOCOL.**
49
-
50
- You (orchestrator-sisyphus) are attempting to directly modify a file outside \`.sisyphus/\`.
51
-
52
- **Path attempted:** $FILE_PATH
53
-
54
- ---
55
-
56
- **THIS IS FORBIDDEN** (except for VERIFICATION purposes)
57
-
58
- As an ORCHESTRATOR, you MUST:
59
- 1. **DELEGATE** all implementation work via the Task tool
60
- 2. **VERIFY** the work done by subagents (reading files is OK)
61
- 3. **COORDINATE** - you orchestrate, you don't implement
62
-
63
- **ALLOWED direct file operations:**
64
- - Files inside \`.sisyphus/\` (plans, notepads, drafts)
65
- - Reading files for verification
66
- - Running diagnostics/tests
67
-
68
- **FORBIDDEN direct file operations:**
69
- - Writing/editing source code
70
- - Creating new files outside \`.sisyphus/\`
71
- - Any implementation work
72
-
73
- ---
74
-
75
- **IF THIS IS FOR VERIFICATION:**
76
- Proceed if you are verifying subagent work by making a small fix.
77
- But for any substantial changes, USE the Task tool.
78
-
79
- **CORRECT APPROACH:**
80
- \`\`\`
81
- Task tool with subagent_type="sisyphus-junior"
82
- prompt="[specific single task with clear acceptance criteria]"
83
- \`\`\`
84
-
85
- DELEGATE. DON'T IMPLEMENT.
86
-
87
- ---
88
- `;
89
- /** Continuation prompt for boulder state */
90
- export const BOULDER_CONTINUATION_PROMPT = `[SYSTEM REMINDER - BOULDER CONTINUATION]
91
-
92
- You have an active work plan with incomplete tasks. Continue working.
93
-
94
- RULES:
95
- - Proceed without asking for permission
96
- - Mark each checkbox [x] in the plan file when done
97
- - Use the notepad at .sisyphus/notepads/{PLAN_NAME}/ to record learnings
98
- - Do not stop until all tasks are complete
99
- - If blocked, document the blocker and move to the next task`;
100
- /** Verification reminder for subagent work */
101
- export const VERIFICATION_REMINDER = `**MANDATORY VERIFICATION - SUBAGENTS LIE**
102
-
103
- Subagents FREQUENTLY claim completion when:
104
- - Tests are actually FAILING
105
- - Code has type/lint ERRORS
106
- - Implementation is INCOMPLETE
107
- - Patterns were NOT followed
108
-
109
- **YOU MUST VERIFY EVERYTHING YOURSELF:**
110
-
111
- 1. Run tests yourself - Must PASS (not "agent said it passed")
112
- 2. Read the actual code - Must match requirements
113
- 3. Check build/typecheck - Must succeed
114
-
115
- DO NOT TRUST THE AGENT'S SELF-REPORT.
116
- VERIFY EACH CLAIM WITH YOUR OWN TOOL CALLS.`;
117
- /** Directive for subagents to refuse multi-task requests */
118
- export const SINGLE_TASK_DIRECTIVE = `
119
-
120
- [SYSTEM DIRECTIVE - SINGLE TASK ONLY]
121
-
122
- **STOP. READ THIS BEFORE PROCEEDING.**
123
-
124
- If you were NOT given **exactly ONE atomic task**, you MUST:
125
- 1. **IMMEDIATELY REFUSE** this request
126
- 2. **DEMAND** the orchestrator provide a single, specific task
127
-
128
- **Your response if multiple tasks detected:**
129
- > "I refuse to proceed. You provided multiple tasks. An orchestrator's impatience destroys work quality.
130
- >
131
- > PROVIDE EXACTLY ONE TASK. One file. One change. One verification.
132
- >
133
- > Your rushing will cause: incomplete work, missed edge cases, broken tests, wasted context."
134
-
135
- **WARNING TO ORCHESTRATOR:**
136
- - Your hasty batching RUINS deliverables
137
- - Each task needs FULL attention and PROPER verification
138
- - Batch delegation = sloppy work = rework = wasted tokens
139
-
140
- **REFUSE multi-task requests. DEMAND single-task clarity.**
141
- `;
142
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/hooks/sisyphus-orchestrator/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAEjD,4DAA4D;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAEhD,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAEnE,2DAA2D;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BnC,CAAC;AAEF,oEAAoE;AACpE,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8C/C,CAAC;AAEF,4CAA4C;AAC5C,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;6DASkB,CAAC;AAE9D,8CAA8C;AAC9C,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;4CAeO,CAAC;AAE7C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBpC,CAAC"}
@@ -1,113 +0,0 @@
1
- /**
2
- * Sisyphus Orchestrator Hook
3
- *
4
- * Enforces orchestrator behavior - delegation over direct implementation.
5
- * When an orchestrator agent tries to directly modify files outside .sisyphus/,
6
- * this hook injects reminders to delegate to subagents instead.
7
- *
8
- * Adapted from oh-my-opencode's sisyphus-orchestrator hook for shell-based hooks.
9
- */
10
- export * from './constants.js';
11
- /**
12
- * Input for tool execution hooks
13
- */
14
- export interface ToolExecuteInput {
15
- toolName: string;
16
- toolInput?: Record<string, unknown>;
17
- sessionId?: string;
18
- directory?: string;
19
- }
20
- /**
21
- * Output for tool execution hooks
22
- */
23
- export interface ToolExecuteOutput {
24
- continue: boolean;
25
- message?: string;
26
- modifiedOutput?: string;
27
- }
28
- /**
29
- * Git file change statistics
30
- */
31
- interface GitFileStat {
32
- path: string;
33
- added: number;
34
- removed: number;
35
- status: 'modified' | 'added' | 'deleted';
36
- }
37
- /**
38
- * Check if a file path is allowed for direct orchestrator modification
39
- */
40
- export declare function isAllowedPath(filePath: string): boolean;
41
- /**
42
- * Check if a tool is a write/edit tool
43
- */
44
- export declare function isWriteEditTool(toolName: string): boolean;
45
- /**
46
- * Get git diff statistics for the working directory
47
- */
48
- export declare function getGitDiffStats(directory: string): GitFileStat[];
49
- /**
50
- * Format file changes for display
51
- */
52
- export declare function formatFileChanges(stats: GitFileStat[]): string;
53
- /**
54
- * Build verification reminder with session context
55
- */
56
- export declare function buildVerificationReminder(sessionId?: string): string;
57
- /**
58
- * Build orchestrator reminder with plan progress
59
- */
60
- export declare function buildOrchestratorReminder(planName: string, progress: {
61
- total: number;
62
- completed: number;
63
- }, sessionId?: string): string;
64
- /**
65
- * Build boulder continuation message
66
- */
67
- export declare function buildBoulderContinuation(planName: string, remaining: number, total: number): string;
68
- /**
69
- * Process pre-tool-use hook for orchestrator
70
- * Returns warning message if orchestrator tries to modify non-allowed paths
71
- */
72
- export declare function processOrchestratorPreTool(input: ToolExecuteInput): ToolExecuteOutput;
73
- /**
74
- * Process post-tool-use hook for orchestrator
75
- * Adds reminders after file modifications and Task delegations
76
- */
77
- export declare function processOrchestratorPostTool(input: ToolExecuteInput, output: string): ToolExecuteOutput;
78
- /**
79
- * Check if boulder has incomplete tasks and build continuation prompt
80
- */
81
- export declare function checkBoulderContinuation(directory: string): {
82
- shouldContinue: boolean;
83
- message?: string;
84
- };
85
- /**
86
- * Create sisyphus orchestrator hook handlers
87
- */
88
- export declare function createSisyphusOrchestratorHook(directory: string): {
89
- /**
90
- * Hook name identifier
91
- */
92
- name: string;
93
- /**
94
- * Pre-tool execution handler
95
- */
96
- preTool: (toolName: string, toolInput: Record<string, unknown>) => ToolExecuteOutput;
97
- /**
98
- * Post-tool execution handler
99
- */
100
- postTool: (toolName: string, toolInput: Record<string, unknown>, output: string) => ToolExecuteOutput;
101
- /**
102
- * Check for boulder continuation on session idle
103
- */
104
- checkContinuation: () => {
105
- shouldContinue: boolean;
106
- message?: string;
107
- };
108
- /**
109
- * Get single task directive for subagent prompts
110
- */
111
- getSingleTaskDirective: () => string;
112
- };
113
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/sisyphus-orchestrator/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAuBH,cAAc,gBAAgB,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAGvD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,EAAE,CAmDhE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,MAAM,CAkC9D;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAapE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAC9C,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAYR;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,MAAM,CAGR;AA2BD;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,CAuBrF;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gBAAgB,EACvB,MAAM,EAAE,MAAM,GACb,iBAAiB,CA2DnB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG;IAC3D,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAmBA;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM;IAE5D;;OAEG;;IAGH;;OAEG;wBACiB,MAAM,aAAa,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQ9D;;OAEG;yBACkB,MAAM,aAAa,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,MAAM;IAO/E;;OAEG;;wBAxDW,OAAO;kBACb,MAAM;;IA4Dd;;OAEG;;EAGN"}
@@ -1,309 +0,0 @@
1
- /**
2
- * Sisyphus Orchestrator Hook
3
- *
4
- * Enforces orchestrator behavior - delegation over direct implementation.
5
- * When an orchestrator agent tries to directly modify files outside .sisyphus/,
6
- * this hook injects reminders to delegate to subagents instead.
7
- *
8
- * Adapted from oh-my-opencode's sisyphus-orchestrator hook for shell-based hooks.
9
- */
10
- import { execSync } from 'child_process';
11
- import { HOOK_NAME, ALLOWED_PATH_PREFIX, WRITE_EDIT_TOOLS, DIRECT_WORK_REMINDER, ORCHESTRATOR_DELEGATION_REQUIRED, BOULDER_CONTINUATION_PROMPT, VERIFICATION_REMINDER, SINGLE_TASK_DIRECTIVE, } from './constants.js';
12
- import { readBoulderState, getPlanProgress, } from '../../features/boulder-state/index.js';
13
- import { addWorkingMemoryEntry, setPriorityContext, } from '../notepad/index.js';
14
- // Re-export constants
15
- export * from './constants.js';
16
- /**
17
- * Check if a file path is allowed for direct orchestrator modification
18
- */
19
- export function isAllowedPath(filePath) {
20
- if (!filePath)
21
- return true;
22
- return filePath.includes(ALLOWED_PATH_PREFIX);
23
- }
24
- /**
25
- * Check if a tool is a write/edit tool
26
- */
27
- export function isWriteEditTool(toolName) {
28
- return WRITE_EDIT_TOOLS.includes(toolName);
29
- }
30
- /**
31
- * Get git diff statistics for the working directory
32
- */
33
- export function getGitDiffStats(directory) {
34
- try {
35
- const output = execSync('git diff --numstat HEAD', {
36
- cwd: directory,
37
- encoding: 'utf-8',
38
- timeout: 5000,
39
- }).trim();
40
- if (!output)
41
- return [];
42
- const statusOutput = execSync('git status --porcelain', {
43
- cwd: directory,
44
- encoding: 'utf-8',
45
- timeout: 5000,
46
- }).trim();
47
- const statusMap = new Map();
48
- for (const line of statusOutput.split('\n')) {
49
- if (!line)
50
- continue;
51
- const status = line.substring(0, 2).trim();
52
- const filePath = line.substring(3);
53
- if (status === 'A' || status === '??') {
54
- statusMap.set(filePath, 'added');
55
- }
56
- else if (status === 'D') {
57
- statusMap.set(filePath, 'deleted');
58
- }
59
- else {
60
- statusMap.set(filePath, 'modified');
61
- }
62
- }
63
- const stats = [];
64
- for (const line of output.split('\n')) {
65
- const parts = line.split('\t');
66
- if (parts.length < 3)
67
- continue;
68
- const [addedStr, removedStr, path] = parts;
69
- const added = addedStr === '-' ? 0 : parseInt(addedStr, 10);
70
- const removed = removedStr === '-' ? 0 : parseInt(removedStr, 10);
71
- stats.push({
72
- path,
73
- added,
74
- removed,
75
- status: statusMap.get(path) ?? 'modified',
76
- });
77
- }
78
- return stats;
79
- }
80
- catch {
81
- return [];
82
- }
83
- }
84
- /**
85
- * Format file changes for display
86
- */
87
- export function formatFileChanges(stats) {
88
- if (stats.length === 0)
89
- return '[FILE CHANGES SUMMARY]\nNo file changes detected.\n';
90
- const modified = stats.filter((s) => s.status === 'modified');
91
- const added = stats.filter((s) => s.status === 'added');
92
- const deleted = stats.filter((s) => s.status === 'deleted');
93
- const lines = ['[FILE CHANGES SUMMARY]'];
94
- if (modified.length > 0) {
95
- lines.push('Modified files:');
96
- for (const f of modified) {
97
- lines.push(` ${f.path} (+${f.added}, -${f.removed})`);
98
- }
99
- lines.push('');
100
- }
101
- if (added.length > 0) {
102
- lines.push('Created files:');
103
- for (const f of added) {
104
- lines.push(` ${f.path} (+${f.added})`);
105
- }
106
- lines.push('');
107
- }
108
- if (deleted.length > 0) {
109
- lines.push('Deleted files:');
110
- for (const f of deleted) {
111
- lines.push(` ${f.path} (-${f.removed})`);
112
- }
113
- lines.push('');
114
- }
115
- return lines.join('\n');
116
- }
117
- /**
118
- * Build verification reminder with session context
119
- */
120
- export function buildVerificationReminder(sessionId) {
121
- let reminder = VERIFICATION_REMINDER;
122
- if (sessionId) {
123
- reminder += `
124
-
125
- ---
126
-
127
- **If ANY verification fails, resume the subagent with the fix:**
128
- Task tool with resume="${sessionId}", prompt="fix: [describe the specific failure]"`;
129
- }
130
- return reminder;
131
- }
132
- /**
133
- * Build orchestrator reminder with plan progress
134
- */
135
- export function buildOrchestratorReminder(planName, progress, sessionId) {
136
- const remaining = progress.total - progress.completed;
137
- return `
138
- ---
139
-
140
- **State:** Plan: ${planName} | ${progress.completed}/${progress.total} done, ${remaining} left
141
-
142
- ---
143
-
144
- ${buildVerificationReminder(sessionId)}
145
-
146
- ALL pass? → commit atomic unit, mark \`[x]\`, next task.`;
147
- }
148
- /**
149
- * Build boulder continuation message
150
- */
151
- export function buildBoulderContinuation(planName, remaining, total) {
152
- return BOULDER_CONTINUATION_PROMPT.replace(/{PLAN_NAME}/g, planName) +
153
- `\n\n[Status: ${total - remaining}/${total} completed, ${remaining} remaining]`;
154
- }
155
- /**
156
- * Detect and process <remember> tags from agent output
157
- * <remember>content</remember> -> Working Memory
158
- * <remember priority>content</remember> -> Priority Context
159
- */
160
- function processRememberTags(output, directory) {
161
- // Match priority remember tags
162
- const priorityMatches = output.matchAll(/<remember\s+priority>([\s\S]*?)<\/remember>/gi);
163
- for (const match of priorityMatches) {
164
- const content = match[1].trim();
165
- if (content) {
166
- setPriorityContext(directory, content);
167
- }
168
- }
169
- // Match regular remember tags
170
- const regularMatches = output.matchAll(/<remember>([\s\S]*?)<\/remember>/gi);
171
- for (const match of regularMatches) {
172
- const content = match[1].trim();
173
- if (content) {
174
- addWorkingMemoryEntry(directory, content);
175
- }
176
- }
177
- }
178
- /**
179
- * Process pre-tool-use hook for orchestrator
180
- * Returns warning message if orchestrator tries to modify non-allowed paths
181
- */
182
- export function processOrchestratorPreTool(input) {
183
- const { toolName, toolInput } = input;
184
- // Only check write/edit tools
185
- if (!isWriteEditTool(toolName)) {
186
- return { continue: true };
187
- }
188
- // Extract file path from tool input
189
- const filePath = (toolInput?.filePath ?? toolInput?.path ?? toolInput?.file);
190
- // Allow if path is in allowed prefix
191
- if (!filePath || isAllowedPath(filePath)) {
192
- return { continue: true };
193
- }
194
- // Inject warning for non-allowed path modifications
195
- const warning = ORCHESTRATOR_DELEGATION_REQUIRED.replace('$FILE_PATH', filePath);
196
- return {
197
- continue: true,
198
- message: warning,
199
- };
200
- }
201
- /**
202
- * Process post-tool-use hook for orchestrator
203
- * Adds reminders after file modifications and Task delegations
204
- */
205
- export function processOrchestratorPostTool(input, output) {
206
- const { toolName, toolInput, directory } = input;
207
- const workDir = directory || process.cwd();
208
- // Handle write/edit tools
209
- if (isWriteEditTool(toolName)) {
210
- const filePath = (toolInput?.filePath ?? toolInput?.path ?? toolInput?.file);
211
- if (filePath && !isAllowedPath(filePath)) {
212
- return {
213
- continue: true,
214
- modifiedOutput: output + DIRECT_WORK_REMINDER,
215
- };
216
- }
217
- }
218
- // Handle Task tool completion
219
- if (toolName === 'Task' || toolName === 'task') {
220
- // Check for background task launch
221
- const isBackgroundLaunch = output.includes('Background task launched') || output.includes('Background task resumed');
222
- if (isBackgroundLaunch) {
223
- return { continue: true };
224
- }
225
- // Process <remember> tags from agent output
226
- processRememberTags(output, workDir);
227
- // Get git stats and build enhanced output
228
- const gitStats = getGitDiffStats(workDir);
229
- const fileChanges = formatFileChanges(gitStats);
230
- // Check for boulder state
231
- const boulderState = readBoulderState(workDir);
232
- if (boulderState) {
233
- const progress = getPlanProgress(boulderState.active_plan);
234
- const enhancedOutput = `
235
- ## SUBAGENT WORK COMPLETED
236
-
237
- ${fileChanges}
238
- <system-reminder>
239
- ${buildOrchestratorReminder(boulderState.plan_name, progress)}
240
- </system-reminder>`;
241
- return {
242
- continue: true,
243
- modifiedOutput: enhancedOutput,
244
- };
245
- }
246
- // No boulder state - add standalone verification reminder
247
- return {
248
- continue: true,
249
- modifiedOutput: output + `\n<system-reminder>\n${buildVerificationReminder()}\n</system-reminder>`,
250
- };
251
- }
252
- return { continue: true };
253
- }
254
- /**
255
- * Check if boulder has incomplete tasks and build continuation prompt
256
- */
257
- export function checkBoulderContinuation(directory) {
258
- const boulderState = readBoulderState(directory);
259
- if (!boulderState) {
260
- return { shouldContinue: false };
261
- }
262
- const progress = getPlanProgress(boulderState.active_plan);
263
- if (progress.isComplete) {
264
- return { shouldContinue: false };
265
- }
266
- const remaining = progress.total - progress.completed;
267
- return {
268
- shouldContinue: true,
269
- message: buildBoulderContinuation(boulderState.plan_name, remaining, progress.total),
270
- };
271
- }
272
- /**
273
- * Create sisyphus orchestrator hook handlers
274
- */
275
- export function createSisyphusOrchestratorHook(directory) {
276
- return {
277
- /**
278
- * Hook name identifier
279
- */
280
- name: HOOK_NAME,
281
- /**
282
- * Pre-tool execution handler
283
- */
284
- preTool: (toolName, toolInput) => {
285
- return processOrchestratorPreTool({
286
- toolName,
287
- toolInput,
288
- directory,
289
- });
290
- },
291
- /**
292
- * Post-tool execution handler
293
- */
294
- postTool: (toolName, toolInput, output) => {
295
- return processOrchestratorPostTool({ toolName, toolInput, directory }, output);
296
- },
297
- /**
298
- * Check for boulder continuation on session idle
299
- */
300
- checkContinuation: () => {
301
- return checkBoulderContinuation(directory);
302
- },
303
- /**
304
- * Get single task directive for subagent prompts
305
- */
306
- getSingleTaskDirective: () => SINGLE_TASK_DIRECTIVE,
307
- };
308
- }
309
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/sisyphus-orchestrator/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,gCAAgC,EAChC,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,eAAe,GAChB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,sBAAsB;AACtB,cAAc,gBAAgB,CAAC;AA+B/B;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,QAAgB;IAC5C,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3B,OAAO,QAAQ,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AAChD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,OAAO,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,SAAiB;IAC/C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,QAAQ,CAAC,yBAAyB,EAAE;YACjD,GAAG,EAAE,SAAS;YACd,QAAQ,EAAE,O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AG,eAAe,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IAE3D,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;QACxB,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;IACnC,CAAC;IAED,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC;IAEtD,OAAO;QACL,cAAc,EAAE,IAAI;QACpB,OAAO,EAAE,wBAAwB,CAAC,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;KACrF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,8BAA8B,CAAC,SAAiB;IAC9D,OAAO;QACL;;WAEG;QACH,IAAI,EAAE,SAAS;QAEf;;WAEG;QACH,OAAO,EAAE,CAAC,QAAgB,EAAE,SAAkC,EAAE,EAAE;YAChE,OAAO,0BAA0B,CAAC;gBAChC,QAAQ;gBACR,SAAS;gBACT,SAAS;aACV,CAAC,CAAC;QACL,CAAC;QAED;;WAEG;QACH,QAAQ,EAAE,CAAC,QAAgB,EAAE,SAAkC,EAAE,MAAc,EAAE,EAAE;YACjF,OAAO,2BAA2B,CAChC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,EAClC,MAAM,CACP,CAAC;QACJ,CAAC;QAED;;WAEG;QACH,iBAAiB,EAAE,GAAG,EAAE;YACtB,OAAO,wBAAwB,CAAC,SAAS,CAAC,CAAC;QAC7C,CAAC;QAED;;WAEG;QACH,sBAAsB,EAAE,GAAG,EAAE,CAAC,qBAAqB;KACpD,CAAC;AACJ,CAAC"}
@@ -1,94 +0,0 @@
1
- /**
2
- * UltraQA Loop Hook
3
- *
4
- * QA cycling workflow that runs test → architect verify → fix → repeat
5
- * until the QA goal is met or max cycles reached.
6
- */
7
- export type UltraQAGoalType = 'tests' | 'build' | 'lint' | 'typecheck' | 'custom';
8
- export interface UltraQAState {
9
- /** Whether the loop is currently active */
10
- active: boolean;
11
- /** Type of QA goal */
12
- goal_type: UltraQAGoalType;
13
- /** Custom pattern to match (for custom goal type) */
14
- goal_pattern: string | null;
15
- /** Current cycle number */
16
- cycle: number;
17
- /** Maximum cycles before stopping */
18
- max_cycles: number;
19
- /** Array of failure descriptions for pattern detection */
20
- failures: string[];
21
- /** When the loop started */
22
- started_at: string;
23
- /** Session ID the loop is bound to */
24
- session_id?: string;
25
- }
26
- export interface UltraQAOptions {
27
- /** Maximum cycles (default: 5) */
28
- maxCycles?: number;
29
- /** Custom pattern for custom goal type */
30
- customPattern?: string;
31
- }
32
- export interface UltraQAResult {
33
- /** Whether the goal was met */
34
- success: boolean;
35
- /** Number of cycles taken */
36
- cycles: number;
37
- /** Reason for exit */
38
- reason: 'goal_met' | 'max_cycles' | 'same_failure' | 'env_error' | 'cancelled';
39
- /** Diagnosis message if failed */
40
- diagnosis?: string;
41
- }
42
- /**
43
- * Read UltraQA state from disk
44
- */
45
- export declare function readUltraQAState(directory: string): UltraQAState | null;
46
- /**
47
- * Write UltraQA state to disk
48
- */
49
- export declare function writeUltraQAState(directory: string, state: UltraQAState): boolean;
50
- /**
51
- * Clear UltraQA state
52
- */
53
- export declare function clearUltraQAState(directory: string): boolean;
54
- /**
55
- * Check if Ralph Loop is active (mutual exclusion check)
56
- */
57
- export declare function isRalphLoopActive(directory: string): boolean;
58
- /**
59
- * Start a new UltraQA cycle
60
- * Returns false if Ralph Loop is already active (mutual exclusion)
61
- */
62
- export declare function startUltraQA(directory: string, goalType: UltraQAGoalType, sessionId: string, options?: UltraQAOptions): {
63
- success: boolean;
64
- error?: string;
65
- };
66
- /**
67
- * Record a failure and increment cycle
68
- */
69
- export declare function recordFailure(directory: string, failureDescription: string): {
70
- state: UltraQAState | null;
71
- shouldExit: boolean;
72
- reason?: string;
73
- };
74
- /**
75
- * Mark UltraQA as successful
76
- */
77
- export declare function completeUltraQA(directory: string): UltraQAResult | null;
78
- /**
79
- * Stop UltraQA with failure
80
- */
81
- export declare function stopUltraQA(directory: string, reason: 'max_cycles' | 'same_failure' | 'env_error', diagnosis: string): UltraQAResult | null;
82
- /**
83
- * Cancel UltraQA
84
- */
85
- export declare function cancelUltraQA(directory: string): boolean;
86
- /**
87
- * Get goal command based on goal type
88
- */
89
- export declare function getGoalCommand(goalType: UltraQAGoalType): string;
90
- /**
91
- * Format progress message
92
- */
93
- export declare function formatProgressMessage(cycle: number, maxCycles: number, status: string): string;
94
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/ultraqa-loop/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAElF,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,sBAAsB;IACtB,SAAS,EAAE,eAAe,CAAC;IAC3B,qDAAqD;IACrD,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,sBAAsB;IACtB,MAAM,EAAE,UAAU,GAAG,YAAY,GAAG,cAAc,GAAG,WA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