oh-my-claude-sisyphus 3.8.9 → 3.8.11

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 (456) 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__/load-agent-prompt.test.d.ts +2 -0
  15. package/dist/__tests__/load-agent-prompt.test.d.ts.map +1 -0
  16. package/dist/__tests__/load-agent-prompt.test.js +68 -0
  17. package/dist/__tests__/load-agent-prompt.test.js.map +1 -0
  18. package/dist/__tests__/model-routing.test.js +5 -34
  19. package/dist/__tests__/model-routing.test.js.map +1 -1
  20. package/dist/agents/analyst.d.ts.map +1 -1
  21. package/dist/agents/analyst.js +2 -77
  22. package/dist/agents/analyst.js.map +1 -1
  23. package/dist/agents/architect.d.ts.map +1 -1
  24. package/dist/agents/architect.js +3 -148
  25. package/dist/agents/architect.js.map +1 -1
  26. package/dist/agents/coordinator-deprecated.d.ts +18 -0
  27. package/dist/agents/coordinator-deprecated.d.ts.map +1 -0
  28. package/dist/agents/coordinator-deprecated.js +34 -0
  29. package/dist/agents/coordinator-deprecated.js.map +1 -0
  30. package/dist/agents/critic.d.ts.map +1 -1
  31. package/dist/agents/critic.js +2 -90
  32. package/dist/agents/critic.js.map +1 -1
  33. package/dist/agents/definitions.d.ts +2 -0
  34. package/dist/agents/definitions.d.ts.map +1 -1
  35. package/dist/agents/definitions.js +3 -32
  36. package/dist/agents/definitions.js.map +1 -1
  37. package/dist/agents/designer.d.ts.map +1 -1
  38. package/dist/agents/designer.js +2 -73
  39. package/dist/agents/designer.js.map +1 -1
  40. package/dist/agents/executor.d.ts +1 -0
  41. package/dist/agents/executor.d.ts.map +1 -1
  42. package/dist/agents/executor.js +3 -56
  43. package/dist/agents/executor.js.map +1 -1
  44. package/dist/agents/explore.d.ts.map +1 -1
  45. package/dist/agents/explore.js +2 -64
  46. package/dist/agents/explore.js.map +1 -1
  47. package/dist/agents/index.d.ts +4 -3
  48. package/dist/agents/index.d.ts.map +1 -1
  49. package/dist/agents/index.js +6 -3
  50. package/dist/agents/index.js.map +1 -1
  51. package/dist/agents/planner.d.ts.map +1 -1
  52. package/dist/agents/planner.js +2 -157
  53. package/dist/agents/planner.js.map +1 -1
  54. package/dist/agents/qa-tester.d.ts.map +1 -1
  55. package/dist/agents/qa-tester.js +2 -324
  56. package/dist/agents/qa-tester.js.map +1 -1
  57. package/dist/agents/researcher.d.ts.map +1 -1
  58. package/dist/agents/researcher.js +2 -65
  59. package/dist/agents/researcher.js.map +1 -1
  60. package/dist/agents/scientist.d.ts.map +1 -1
  61. package/dist/agents/scientist.js +2 -293
  62. package/dist/agents/scientist.js.map +1 -1
  63. package/dist/agents/utils.d.ts +7 -0
  64. package/dist/agents/utils.d.ts.map +1 -1
  65. package/dist/agents/utils.js +50 -0
  66. package/dist/agents/utils.js.map +1 -1
  67. package/dist/agents/vision.d.ts.map +1 -1
  68. package/dist/agents/vision.js +2 -32
  69. package/dist/agents/vision.js.map +1 -1
  70. package/dist/agents/writer.d.ts.map +1 -1
  71. package/dist/agents/writer.js +2 -171
  72. package/dist/agents/writer.js.map +1 -1
  73. package/dist/cli/analytics.js +0 -0
  74. package/dist/cli/index.js +0 -0
  75. package/dist/features/model-routing/index.d.ts +1 -1
  76. package/dist/features/model-routing/index.d.ts.map +1 -1
  77. package/dist/features/model-routing/index.js +1 -1
  78. package/dist/features/model-routing/index.js.map +1 -1
  79. package/dist/features/model-routing/router.d.ts +1 -15
  80. package/dist/features/model-routing/router.d.ts.map +1 -1
  81. package/dist/features/model-routing/router.js +2 -33
  82. package/dist/features/model-routing/router.js.map +1 -1
  83. package/dist/features/model-routing/rules.d.ts.map +1 -1
  84. package/dist/features/model-routing/rules.js +0 -8
  85. package/dist/features/model-routing/rules.js.map +1 -1
  86. package/dist/features/model-routing/types.d.ts +1 -2
  87. package/dist/features/model-routing/types.d.ts.map +1 -1
  88. package/dist/features/model-routing/types.js +2 -6
  89. package/dist/features/model-routing/types.js.map +1 -1
  90. package/dist/features/task-decomposer/index.d.ts +1 -1
  91. package/dist/features/task-decomposer/index.d.ts.map +1 -1
  92. package/dist/features/task-decomposer/index.js +5 -8
  93. package/dist/features/task-decomposer/index.js.map +1 -1
  94. package/dist/features/task-decomposer/types.d.ts +4 -4
  95. package/dist/features/task-decomposer/types.d.ts.map +1 -1
  96. package/dist/hooks/bridge.d.ts.map +1 -1
  97. package/dist/hooks/bridge.js +56 -49
  98. package/dist/hooks/bridge.js.map +1 -1
  99. package/dist/hooks/keyword-detector/__tests__/index.test.js +89 -1
  100. package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
  101. package/dist/hooks/keyword-detector/index.d.ts +5 -1
  102. package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
  103. package/dist/hooks/keyword-detector/index.js +32 -11
  104. package/dist/hooks/keyword-detector/index.js.map +1 -1
  105. package/dist/hooks/ultrapilot/decomposer.d.ts +1 -1
  106. package/dist/hooks/ultrapilot/decomposer.js +2 -2
  107. package/dist/index.d.ts +1 -1
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +4 -2
  110. package/dist/index.js.map +1 -1
  111. package/docs/CLAUDE.md +44 -4
  112. package/docs/FEATURES.md +1 -1
  113. package/docs/MIGRATION.md +5 -5
  114. package/docs/REFERENCE.md +6 -2
  115. package/package.json +1 -1
  116. package/scripts/keyword-detector.mjs +140 -59
  117. package/skills/help/SKILL.md +1 -1
  118. package/skills/omc-setup/SKILL.md +1 -1
  119. package/templates/hooks/keyword-detector.mjs +280 -118
  120. package/dist/__tests__/analytics/analytics-summary.test.d.ts +0 -2
  121. package/dist/__tests__/analytics/analytics-summary.test.d.ts.map +0 -1
  122. package/dist/__tests__/analytics/analytics-summary.test.js +0 -267
  123. package/dist/__tests__/analytics/analytics-summary.test.js.map +0 -1
  124. package/dist/__tests__/analytics/cost-estimator.test.d.ts +0 -2
  125. package/dist/__tests__/analytics/cost-estimator.test.d.ts.map +0 -1
  126. package/dist/__tests__/analytics/cost-estimator.test.js +0 -212
  127. package/dist/__tests__/analytics/cost-estimator.test.js.map +0 -1
  128. package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts +0 -7
  129. package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts.map +0 -1
  130. package/dist/__tests__/hooks/auto-slash-command/executor.test.js +0 -374
  131. package/dist/__tests__/hooks/auto-slash-command/executor.test.js.map +0 -1
  132. package/dist/__tests__/hud/auto-tracking.integration.test.d.ts +0 -2
  133. package/dist/__tests__/hud/auto-tracking.integration.test.d.ts.map +0 -1
  134. package/dist/__tests__/hud/auto-tracking.integration.test.js +0 -12
  135. package/dist/__tests__/hud/auto-tracking.integration.test.js.map +0 -1
  136. package/dist/__tests__/learned-skills/config.test.d.ts +0 -2
  137. package/dist/__tests__/learned-skills/config.test.d.ts.map +0 -1
  138. package/dist/__tests__/learned-skills/config.test.js +0 -37
  139. package/dist/__tests__/learned-skills/config.test.js.map +0 -1
  140. package/dist/__tests__/learned-skills/detector.test.d.ts +0 -2
  141. package/dist/__tests__/learned-skills/detector.test.d.ts.map +0 -1
  142. package/dist/__tests__/learned-skills/detector.test.js +0 -99
  143. package/dist/__tests__/learned-skills/detector.test.js.map +0 -1
  144. package/dist/__tests__/learned-skills/finder.test.d.ts +0 -2
  145. package/dist/__tests__/learned-skills/finder.test.d.ts.map +0 -1
  146. package/dist/__tests__/learned-skills/finder.test.js +0 -59
  147. package/dist/__tests__/learned-skills/finder.test.js.map +0 -1
  148. package/dist/__tests__/learned-skills/loader.test.d.ts +0 -2
  149. package/dist/__tests__/learned-skills/loader.test.d.ts.map +0 -1
  150. package/dist/__tests__/learned-skills/loader.test.js +0 -69
  151. package/dist/__tests__/learned-skills/loader.test.js.map +0 -1
  152. package/dist/__tests__/learned-skills/parser.test.d.ts +0 -2
  153. package/dist/__tests__/learned-skills/parser.test.d.ts.map +0 -1
  154. package/dist/__tests__/learned-skills/parser.test.js +0 -81
  155. package/dist/__tests__/learned-skills/parser.test.js.map +0 -1
  156. package/dist/__tests__/learned-skills/validator.test.d.ts +0 -2
  157. package/dist/__tests__/learned-skills/validator.test.d.ts.map +0 -1
  158. package/dist/__tests__/learned-skills/validator.test.js +0 -85
  159. package/dist/__tests__/learned-skills/validator.test.js.map +0 -1
  160. package/dist/agents/codex-agents.d.ts +0 -20
  161. package/dist/agents/codex-agents.d.ts.map +0 -1
  162. package/dist/agents/codex-agents.js +0 -36
  163. package/dist/agents/codex-agents.js.map +0 -1
  164. package/dist/agents/coordinator.d.ts +0 -11
  165. package/dist/agents/coordinator.d.ts.map +0 -1
  166. package/dist/agents/coordinator.js +0 -115
  167. package/dist/agents/coordinator.js.map +0 -1
  168. package/dist/agents/document-writer.d.ts +0 -11
  169. package/dist/agents/document-writer.d.ts.map +0 -1
  170. package/dist/agents/document-writer.js +0 -209
  171. package/dist/agents/document-writer.js.map +0 -1
  172. package/dist/agents/frontend-engineer.d.ts +0 -11
  173. package/dist/agents/frontend-engineer.d.ts.map +0 -1
  174. package/dist/agents/frontend-engineer.js +0 -115
  175. package/dist/agents/frontend-engineer.js.map +0 -1
  176. package/dist/agents/librarian.d.ts +0 -12
  177. package/dist/agents/librarian.d.ts.map +0 -1
  178. package/dist/agents/librarian.js +0 -103
  179. package/dist/agents/librarian.js.map +0 -1
  180. package/dist/agents/metis.d.ts +0 -12
  181. package/dist/agents/metis.d.ts.map +0 -1
  182. package/dist/agents/metis.js +0 -117
  183. package/dist/agents/metis.js.map +0 -1
  184. package/dist/agents/momus.d.ts +0 -12
  185. package/dist/agents/momus.d.ts.map +0 -1
  186. package/dist/agents/momus.js +0 -128
  187. package/dist/agents/momus.js.map +0 -1
  188. package/dist/agents/multimodal-looker.d.ts +0 -11
  189. package/dist/agents/multimodal-looker.d.ts.map +0 -1
  190. package/dist/agents/multimodal-looker.js +0 -70
  191. package/dist/agents/multimodal-looker.js.map +0 -1
  192. package/dist/agents/oracle.d.ts +0 -13
  193. package/dist/agents/oracle.d.ts.map +0 -1
  194. package/dist/agents/oracle.js +0 -191
  195. package/dist/agents/oracle.js.map +0 -1
  196. package/dist/agents/orchestrator-sisyphus.d.ts +0 -11
  197. package/dist/agents/orchestrator-sisyphus.d.ts.map +0 -1
  198. package/dist/agents/orchestrator-sisyphus.js +0 -115
  199. package/dist/agents/orchestrator-sisyphus.js.map +0 -1
  200. package/dist/agents/prometheus.d.ts +0 -12
  201. package/dist/agents/prometheus.d.ts.map +0 -1
  202. package/dist/agents/prometheus.js +0 -195
  203. package/dist/agents/prometheus.js.map +0 -1
  204. package/dist/agents/sisyphus-junior.d.ts +0 -12
  205. package/dist/agents/sisyphus-junior.d.ts.map +0 -1
  206. package/dist/agents/sisyphus-junior.js +0 -93
  207. package/dist/agents/sisyphus-junior.js.map +0 -1
  208. package/dist/cli/components/CostDashboard.d.ts +0 -15
  209. package/dist/cli/components/CostDashboard.d.ts.map +0 -1
  210. package/dist/cli/components/CostDashboard.js +0 -15
  211. package/dist/cli/components/CostDashboard.js.map +0 -1
  212. package/dist/cli/components/LiveStats.d.ts +0 -16
  213. package/dist/cli/components/LiveStats.d.ts.map +0 -1
  214. package/dist/cli/components/LiveStats.js +0 -16
  215. package/dist/cli/components/LiveStats.js.map +0 -1
  216. package/dist/cli/components/SessionBrowser.d.ts +0 -14
  217. package/dist/cli/components/SessionBrowser.d.ts.map +0 -1
  218. package/dist/cli/components/SessionBrowser.js +0 -14
  219. package/dist/cli/components/SessionBrowser.js.map +0 -1
  220. package/dist/cli/tui.d.ts +0 -21
  221. package/dist/cli/tui.d.ts.map +0 -1
  222. package/dist/cli/tui.js +0 -21
  223. package/dist/cli/tui.js.map +0 -1
  224. package/dist/hooks/autopilot/signals.d.ts +0 -20
  225. package/dist/hooks/autopilot/signals.d.ts.map +0 -1
  226. package/dist/hooks/autopilot/signals.js +0 -75
  227. package/dist/hooks/autopilot/signals.js.map +0 -1
  228. package/dist/hooks/autopilot/summary.d.ts +0 -27
  229. package/dist/hooks/autopilot/summary.d.ts.map +0 -1
  230. package/dist/hooks/autopilot/summary.js +0 -160
  231. package/dist/hooks/autopilot/summary.js.map +0 -1
  232. package/dist/hooks/autopilot/transition.d.ts +0 -39
  233. package/dist/hooks/autopilot/transition.d.ts.map +0 -1
  234. package/dist/hooks/autopilot/transition.js +0 -216
  235. package/dist/hooks/autopilot/transition.js.map +0 -1
  236. package/dist/hooks/context-window-limit-recovery/constants.d.ts +0 -28
  237. package/dist/hooks/context-window-limit-recovery/constants.d.ts.map +0 -1
  238. package/dist/hooks/context-window-limit-recovery/constants.js +0 -85
  239. package/dist/hooks/context-window-limit-recovery/constants.js.map +0 -1
  240. package/dist/hooks/context-window-limit-recovery/index.d.ts +0 -62
  241. package/dist/hooks/context-window-limit-recovery/index.d.ts.map +0 -1
  242. package/dist/hooks/context-window-limit-recovery/index.js +0 -201
  243. package/dist/hooks/context-window-limit-recovery/index.js.map +0 -1
  244. package/dist/hooks/context-window-limit-recovery/parser.d.ts +0 -31
  245. package/dist/hooks/context-window-limit-recovery/parser.d.ts.map +0 -1
  246. package/dist/hooks/context-window-limit-recovery/parser.js +0 -241
  247. package/dist/hooks/context-window-limit-recovery/parser.js.map +0 -1
  248. package/dist/hooks/context-window-limit-recovery/types.d.ts +0 -84
  249. package/dist/hooks/context-window-limit-recovery/types.d.ts.map +0 -1
  250. package/dist/hooks/context-window-limit-recovery/types.js +0 -34
  251. package/dist/hooks/context-window-limit-recovery/types.js.map +0 -1
  252. package/dist/hooks/edit-error-recovery/index.d.ts +0 -62
  253. package/dist/hooks/edit-error-recovery/index.d.ts.map +0 -1
  254. package/dist/hooks/edit-error-recovery/index.js +0 -89
  255. package/dist/hooks/edit-error-recovery/index.js.map +0 -1
  256. package/dist/hooks/github-auto-responder/classifier.d.ts +0 -43
  257. package/dist/hooks/github-auto-responder/classifier.d.ts.map +0 -1
  258. package/dist/hooks/github-auto-responder/classifier.js +0 -150
  259. package/dist/hooks/github-auto-responder/classifier.js.map +0 -1
  260. package/dist/hooks/github-auto-responder/config.d.ts +0 -109
  261. package/dist/hooks/github-auto-responder/config.d.ts.map +0 -1
  262. package/dist/hooks/github-auto-responder/config.js +0 -69
  263. package/dist/hooks/github-auto-responder/config.js.map +0 -1
  264. package/dist/hooks/github-auto-responder/constants.d.ts +0 -45
  265. package/dist/hooks/github-auto-responder/constants.d.ts.map +0 -1
  266. package/dist/hooks/github-auto-responder/constants.js +0 -60
  267. package/dist/hooks/github-auto-responder/constants.js.map +0 -1
  268. package/dist/hooks/github-auto-responder/filters.d.ts +0 -95
  269. package/dist/hooks/github-auto-responder/filters.d.ts.map +0 -1
  270. package/dist/hooks/github-auto-responder/filters.js +0 -174
  271. package/dist/hooks/github-auto-responder/filters.js.map +0 -1
  272. package/dist/hooks/github-auto-responder/github-client.d.ts +0 -65
  273. package/dist/hooks/github-auto-responder/github-client.d.ts.map +0 -1
  274. package/dist/hooks/github-auto-responder/github-client.js +0 -128
  275. package/dist/hooks/github-auto-responder/github-client.js.map +0 -1
  276. package/dist/hooks/github-auto-responder/idempotency.d.ts +0 -68
  277. package/dist/hooks/github-auto-responder/idempotency.d.ts.map +0 -1
  278. package/dist/hooks/github-auto-responder/idempotency.js +0 -147
  279. package/dist/hooks/github-auto-responder/idempotency.js.map +0 -1
  280. package/dist/hooks/github-auto-responder/index.d.ts +0 -140
  281. package/dist/hooks/github-auto-responder/index.d.ts.map +0 -1
  282. package/dist/hooks/github-auto-responder/index.js +0 -145
  283. package/dist/hooks/github-auto-responder/index.js.map +0 -1
  284. package/dist/hooks/github-auto-responder/persona.d.ts +0 -40
  285. package/dist/hooks/github-auto-responder/persona.d.ts.map +0 -1
  286. package/dist/hooks/github-auto-responder/persona.js +0 -99
  287. package/dist/hooks/github-auto-responder/persona.js.map +0 -1
  288. package/dist/hooks/github-auto-responder/responder.d.ts +0 -122
  289. package/dist/hooks/github-auto-responder/responder.d.ts.map +0 -1
  290. package/dist/hooks/github-auto-responder/responder.js +0 -264
  291. package/dist/hooks/github-auto-responder/responder.js.map +0 -1
  292. package/dist/hooks/github-auto-responder/server.d.ts +0 -140
  293. package/dist/hooks/github-auto-responder/server.d.ts.map +0 -1
  294. package/dist/hooks/github-auto-responder/server.js +0 -301
  295. package/dist/hooks/github-auto-responder/server.js.map +0 -1
  296. package/dist/hooks/github-auto-responder/signature.d.ts +0 -34
  297. package/dist/hooks/github-auto-responder/signature.d.ts.map +0 -1
  298. package/dist/hooks/github-auto-responder/signature.js +0 -79
  299. package/dist/hooks/github-auto-responder/signature.js.map +0 -1
  300. package/dist/hooks/github-auto-responder/templates.d.ts +0 -16
  301. package/dist/hooks/github-auto-responder/templates.d.ts.map +0 -1
  302. package/dist/hooks/github-auto-responder/templates.js +0 -93
  303. package/dist/hooks/github-auto-responder/templates.js.map +0 -1
  304. package/dist/hooks/github-auto-responder/types.d.ts +0 -246
  305. package/dist/hooks/github-auto-responder/types.d.ts.map +0 -1
  306. package/dist/hooks/github-auto-responder/types.js +0 -7
  307. package/dist/hooks/github-auto-responder/types.js.map +0 -1
  308. package/dist/hooks/learned-skills/config.d.ts +0 -53
  309. package/dist/hooks/learned-skills/config.d.ts.map +0 -1
  310. package/dist/hooks/learned-skills/config.js +0 -103
  311. package/dist/hooks/learned-skills/config.js.map +0 -1
  312. package/dist/hooks/learned-skills/constants.d.ts +0 -24
  313. package/dist/hooks/learned-skills/constants.d.ts.map +0 -1
  314. package/dist/hooks/learned-skills/constants.js +0 -26
  315. package/dist/hooks/learned-skills/constants.js.map +0 -1
  316. package/dist/hooks/learned-skills/detection-hook.d.ts +0 -39
  317. package/dist/hooks/learned-skills/detection-hook.d.ts.map +0 -1
  318. package/dist/hooks/learned-skills/detection-hook.js +0 -83
  319. package/dist/hooks/learned-skills/detection-hook.js.map +0 -1
  320. package/dist/hooks/learned-skills/detector.d.ts +0 -30
  321. package/dist/hooks/learned-skills/detector.d.ts.map +0 -1
  322. package/dist/hooks/learned-skills/detector.js +0 -150
  323. package/dist/hooks/learned-skills/detector.js.map +0 -1
  324. package/dist/hooks/learned-skills/finder.d.ts +0 -21
  325. package/dist/hooks/learned-skills/finder.d.ts.map +0 -1
  326. package/dist/hooks/learned-skills/finder.js +0 -117
  327. package/dist/hooks/learned-skills/finder.js.map +0 -1
  328. package/dist/hooks/learned-skills/index.d.ts +0 -62
  329. package/dist/hooks/learned-skills/index.d.ts.map +0 -1
  330. package/dist/hooks/learned-skills/index.js +0 -137
  331. package/dist/hooks/learned-skills/index.js.map +0 -1
  332. package/dist/hooks/learned-skills/loader.d.ts +0 -20
  333. package/dist/hooks/learned-skills/loader.d.ts.map +0 -1
  334. package/dist/hooks/learned-skills/loader.js +0 -107
  335. package/dist/hooks/learned-skills/loader.js.map +0 -1
  336. package/dist/hooks/learned-skills/parser.d.ts +0 -21
  337. package/dist/hooks/learned-skills/parser.d.ts.map +0 -1
  338. package/dist/hooks/learned-skills/parser.js +0 -190
  339. package/dist/hooks/learned-skills/parser.js.map +0 -1
  340. package/dist/hooks/learned-skills/promotion.d.ts +0 -29
  341. package/dist/hooks/learned-skills/promotion.d.ts.map +0 -1
  342. package/dist/hooks/learned-skills/promotion.js +0 -87
  343. package/dist/hooks/learned-skills/promotion.js.map +0 -1
  344. package/dist/hooks/learned-skills/types.d.ts +0 -109
  345. package/dist/hooks/learned-skills/types.d.ts.map +0 -1
  346. package/dist/hooks/learned-skills/types.js +0 -8
  347. package/dist/hooks/learned-skills/types.js.map +0 -1
  348. package/dist/hooks/learned-skills/validator.d.ts +0 -15
  349. package/dist/hooks/learned-skills/validator.d.ts.map +0 -1
  350. package/dist/hooks/learned-skills/validator.js +0 -87
  351. package/dist/hooks/learned-skills/validator.js.map +0 -1
  352. package/dist/hooks/learned-skills/writer.d.ts +0 -27
  353. package/dist/hooks/learned-skills/writer.d.ts.map +0 -1
  354. package/dist/hooks/learned-skills/writer.js +0 -126
  355. package/dist/hooks/learned-skills/writer.js.map +0 -1
  356. package/dist/hooks/mnemosyne/config.d.ts +0 -53
  357. package/dist/hooks/mnemosyne/config.d.ts.map +0 -1
  358. package/dist/hooks/mnemosyne/config.js +0 -103
  359. package/dist/hooks/mnemosyne/config.js.map +0 -1
  360. package/dist/hooks/mnemosyne/constants.d.ts +0 -24
  361. package/dist/hooks/mnemosyne/constants.d.ts.map +0 -1
  362. package/dist/hooks/mnemosyne/constants.js +0 -26
  363. package/dist/hooks/mnemosyne/constants.js.map +0 -1
  364. package/dist/hooks/mnemosyne/detection-hook.d.ts +0 -39
  365. package/dist/hooks/mnemosyne/detection-hook.d.ts.map +0 -1
  366. package/dist/hooks/mnemosyne/detection-hook.js +0 -83
  367. package/dist/hooks/mnemosyne/detection-hook.js.map +0 -1
  368. package/dist/hooks/mnemosyne/detector.d.ts +0 -30
  369. package/dist/hooks/mnemosyne/detector.d.ts.map +0 -1
  370. package/dist/hooks/mnemosyne/detector.js +0 -150
  371. package/dist/hooks/mnemosyne/detector.js.map +0 -1
  372. package/dist/hooks/mnemosyne/finder.d.ts +0 -21
  373. package/dist/hooks/mnemosyne/finder.d.ts.map +0 -1
  374. package/dist/hooks/mnemosyne/finder.js +0 -117
  375. package/dist/hooks/mnemosyne/finder.js.map +0 -1
  376. package/dist/hooks/mnemosyne/index.d.ts +0 -62
  377. package/dist/hooks/mnemosyne/index.d.ts.map +0 -1
  378. package/dist/hooks/mnemosyne/index.js +0 -137
  379. package/dist/hooks/mnemosyne/index.js.map +0 -1
  380. package/dist/hooks/mnemosyne/loader.d.ts +0 -20
  381. package/dist/hooks/mnemosyne/loader.d.ts.map +0 -1
  382. package/dist/hooks/mnemosyne/loader.js +0 -113
  383. package/dist/hooks/mnemosyne/loader.js.map +0 -1
  384. package/dist/hooks/mnemosyne/parser.d.ts +0 -21
  385. package/dist/hooks/mnemosyne/parser.d.ts.map +0 -1
  386. package/dist/hooks/mnemosyne/parser.js +0 -190
  387. package/dist/hooks/mnemosyne/parser.js.map +0 -1
  388. package/dist/hooks/mnemosyne/promotion.d.ts +0 -29
  389. package/dist/hooks/mnemosyne/promotion.d.ts.map +0 -1
  390. package/dist/hooks/mnemosyne/promotion.js +0 -87
  391. package/dist/hooks/mnemosyne/promotion.js.map +0 -1
  392. package/dist/hooks/mnemosyne/types.d.ts +0 -109
  393. package/dist/hooks/mnemosyne/types.d.ts.map +0 -1
  394. package/dist/hooks/mnemosyne/types.js +0 -8
  395. package/dist/hooks/mnemosyne/types.js.map +0 -1
  396. package/dist/hooks/mnemosyne/validator.d.ts +0 -15
  397. package/dist/hooks/mnemosyne/validator.d.ts.map +0 -1
  398. package/dist/hooks/mnemosyne/validator.js +0 -87
  399. package/dist/hooks/mnemosyne/validator.js.map +0 -1
  400. package/dist/hooks/mnemosyne/writer.d.ts +0 -27
  401. package/dist/hooks/mnemosyne/writer.d.ts.map +0 -1
  402. package/dist/hooks/mnemosyne/writer.js +0 -126
  403. package/dist/hooks/mnemosyne/writer.js.map +0 -1
  404. package/dist/hooks/ralph-loop/index.d.ts +0 -116
  405. package/dist/hooks/ralph-loop/index.d.ts.map +0 -1
  406. package/dist/hooks/ralph-loop/index.js +0 -322
  407. package/dist/hooks/ralph-loop/index.js.map +0 -1
  408. package/dist/hooks/ralph-prd/index.d.ts +0 -130
  409. package/dist/hooks/ralph-prd/index.d.ts.map +0 -1
  410. package/dist/hooks/ralph-prd/index.js +0 -310
  411. package/dist/hooks/ralph-prd/index.js.map +0 -1
  412. package/dist/hooks/ralph-progress/index.d.ts +0 -102
  413. package/dist/hooks/ralph-progress/index.d.ts.map +0 -1
  414. package/dist/hooks/ralph-progress/index.js +0 -408
  415. package/dist/hooks/ralph-progress/index.js.map +0 -1
  416. package/dist/hooks/ralph-verifier/index.d.ts +0 -72
  417. package/dist/hooks/ralph-verifier/index.d.ts.map +0 -1
  418. package/dist/hooks/ralph-verifier/index.js +0 -223
  419. package/dist/hooks/ralph-verifier/index.js.map +0 -1
  420. package/dist/hooks/session-recovery/constants.d.ts +0 -56
  421. package/dist/hooks/session-recovery/constants.d.ts.map +0 -1
  422. package/dist/hooks/session-recovery/constants.js +0 -78
  423. package/dist/hooks/session-recovery/constants.js.map +0 -1
  424. package/dist/hooks/session-recovery/index.d.ts +0 -53
  425. package/dist/hooks/session-recovery/index.d.ts.map +0 -1
  426. package/dist/hooks/session-recovery/index.js +0 -321
  427. package/dist/hooks/session-recovery/index.js.map +0 -1
  428. package/dist/hooks/session-recovery/storage.d.ts +0 -76
  429. package/dist/hooks/session-recovery/storage.d.ts.map +0 -1
  430. package/dist/hooks/session-recovery/storage.js +0 -383
  431. package/dist/hooks/session-recovery/storage.js.map +0 -1
  432. package/dist/hooks/session-recovery/types.d.ts +0 -145
  433. package/dist/hooks/session-recovery/types.d.ts.map +0 -1
  434. package/dist/hooks/session-recovery/types.js +0 -8
  435. package/dist/hooks/session-recovery/types.js.map +0 -1
  436. package/dist/hooks/sisyphus-orchestrator/constants.d.ts +0 -23
  437. package/dist/hooks/sisyphus-orchestrator/constants.d.ts.map +0 -1
  438. package/dist/hooks/sisyphus-orchestrator/constants.js +0 -142
  439. package/dist/hooks/sisyphus-orchestrator/constants.js.map +0 -1
  440. package/dist/hooks/sisyphus-orchestrator/index.d.ts +0 -113
  441. package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +0 -1
  442. package/dist/hooks/sisyphus-orchestrator/index.js +0 -309
  443. package/dist/hooks/sisyphus-orchestrator/index.js.map +0 -1
  444. package/dist/hooks/ultraqa-loop/index.d.ts +0 -94
  445. package/dist/hooks/ultraqa-loop/index.d.ts.map +0 -1
  446. package/dist/hooks/ultraqa-loop/index.js +0 -216
  447. package/dist/hooks/ultraqa-loop/index.js.map +0 -1
  448. package/dist/hooks/ultrawork-state/index.d.ts +0 -62
  449. package/dist/hooks/ultrawork-state/index.d.ts.map +0 -1
  450. package/dist/hooks/ultrawork-state/index.js +0 -208
  451. package/dist/hooks/ultrawork-state/index.js.map +0 -1
  452. package/dist/hud/sisyphus-state.d.ts +0 -31
  453. package/dist/hud/sisyphus-state.d.ts.map +0 -1
  454. package/dist/hud/sisyphus-state.js +0 -163
  455. package/dist/hud/sisyphus-state.js.map +0 -1
  456. package/dist/mcp/standalone-server.cjs +0 -19135
@@ -1,160 +0,0 @@
1
- /**
2
- * Autopilot Summary Generator
3
- *
4
- * Generates human-readable summaries when autopilot completes.
5
- */
6
- import { readAutopilotState } from './state.js';
7
- /**
8
- * Generate a summary of the autopilot run
9
- */
10
- export function generateSummary(directory) {
11
- const state = readAutopilotState(directory);
12
- if (!state) {
13
- return null;
14
- }
15
- const startTime = new Date(state.started_at).getTime();
16
- const endTime = state.completed_at
17
- ? new Date(state.completed_at).getTime()
18
- : Date.now();
19
- const duration = endTime - startTime;
20
- const phasesCompleted = [];
21
- if (state.expansion.spec_path)
22
- phasesCompleted.push('expansion');
23
- if (state.planning.approved)
24
- phasesCompleted.push('planning');
25
- if (state.execution.ralph_completed_at)
26
- phasesCompleted.push('execution');
27
- if (state.qa.qa_completed_at)
28
- phasesCompleted.push('qa');
29
- if (state.validation.all_approved)
30
- phasesCompleted.push('validation');
31
- if (state.phase === 'complete')
32
- phasesCompleted.push('complete');
33
- let testsStatus = 'Not run';
34
- if (state.qa.test_status === 'passing') {
35
- testsStatus = 'Passing';
36
- }
37
- else if (state.qa.test_status === 'failing') {
38
- testsStatus = 'Failing';
39
- }
40
- else if (state.qa.test_status === 'skipped') {
41
- testsStatus = 'Skipped';
42
- }
43
- return {
44
- originalIdea: state.originalIdea,
45
- filesCreated: state.execution.files_created,
46
- filesModified: state.execution.files_modified,
47
- testsStatus,
48
- duration,
49
- agentsSpawned: state.total_agents_spawned,
50
- phasesCompleted
51
- };
52
- }
53
- /**
54
- * Format duration in human-readable format
55
- */
56
- function formatDuration(ms) {
57
- const seconds = Math.floor(ms / 1000);
58
- const minutes = Math.floor(seconds / 60);
59
- const hours = Math.floor(minutes / 60);
60
- if (hours > 0) {
61
- const remainingMinutes = minutes % 60;
62
- return `${hours}h ${remainingMinutes}m`;
63
- }
64
- if (minutes > 0) {
65
- const remainingSeconds = seconds % 60;
66
- return `${minutes}m ${remainingSeconds}s`;
67
- }
68
- return `${seconds}s`;
69
- }
70
- /**
71
- * Generate formatted summary output
72
- */
73
- export function formatSummary(summary) {
74
- const lines = [
75
- '',
76
- '╭──────────────────────────────────────────────────────╮',
77
- '│ AUTOPILOT COMPLETE │',
78
- '├──────────────────────────────────────────────────────┤'
79
- ];
80
- // Original idea (truncate if too long)
81
- const ideaDisplay = summary.originalIdea.length > 50
82
- ? summary.originalIdea.substring(0, 47) + '...'
83
- : summary.originalIdea;
84
- lines.push(`│ Original Idea: ${ideaDisplay.padEnd(36)} │`);
85
- lines.push('│ │');
86
- // Delivered section
87
- lines.push('│ Delivered: │');
88
- lines.push(`│ • ${summary.filesCreated.length} files created${' '.repeat(36 - String(summary.filesCreated.length).length)}│`);
89
- lines.push(`│ • ${summary.filesModified.length} files modified${' '.repeat(35 - String(summary.filesModified.length).length)}│`);
90
- lines.push(`│ • Tests: ${summary.testsStatus}${' '.repeat(36 - summary.testsStatus.length)}│`);
91
- lines.push('│ │');
92
- // Metrics
93
- lines.push('│ Metrics: │');
94
- const durationStr = formatDuration(summary.duration);
95
- lines.push(`│ • Duration: ${durationStr}${' '.repeat(35 - durationStr.length)}│`);
96
- lines.push(`│ • Agents spawned: ${summary.agentsSpawned}${' '.repeat(30 - String(summary.agentsSpawned).length)}│`);
97
- lines.push(`│ • Phases completed: ${summary.phasesCompleted.length}/5${' '.repeat(27)}│`);
98
- lines.push('╰──────────────────────────────────────────────────────╯');
99
- lines.push('');
100
- return lines.join('\n');
101
- }
102
- /**
103
- * Generate a compact summary for HUD display
104
- */
105
- export function formatCompactSummary(state) {
106
- const phase = state.phase.toUpperCase();
107
- const files = state.execution.files_created.length + state.execution.files_modified.length;
108
- const agents = state.total_agents_spawned;
109
- if (state.phase === 'complete') {
110
- return `[AUTOPILOT ✓] Complete | ${files} files | ${agents} agents`;
111
- }
112
- if (state.phase === 'failed') {
113
- return `[AUTOPILOT ✗] Failed at ${state.phase}`;
114
- }
115
- const phaseIndex = ['expansion', 'planning', 'execution', 'qa', 'validation'].indexOf(state.phase);
116
- return `[AUTOPILOT] Phase ${phaseIndex + 1}/5: ${phase} | ${files} files`;
117
- }
118
- /**
119
- * Generate failure summary
120
- */
121
- export function formatFailureSummary(state, error) {
122
- const lines = [
123
- '',
124
- '╭──────────────────────────────────────────────────────╮',
125
- '│ AUTOPILOT FAILED │',
126
- '├──────────────────────────────────────────────────────┤',
127
- `│ Failed at phase: ${state.phase.toUpperCase().padEnd(33)} │`
128
- ];
129
- if (error) {
130
- const errorLines = error.match(/.{1,48}/g) || [error];
131
- lines.push('│ │');
132
- lines.push('│ Error: │');
133
- for (const line of errorLines.slice(0, 3)) {
134
- lines.push(`│ ${line.padEnd(50)} │`);
135
- }
136
- }
137
- lines.push('│ │');
138
- lines.push('│ Progress preserved. Run /autopilot to resume. │');
139
- lines.push('╰──────────────────────────────────────────────────────╯');
140
- lines.push('');
141
- return lines.join('\n');
142
- }
143
- /**
144
- * List files for detailed summary
145
- */
146
- export function formatFileList(files, title, maxFiles = 10) {
147
- if (files.length === 0) {
148
- return '';
149
- }
150
- const lines = [`\n### ${title} (${files.length})`];
151
- const displayFiles = files.slice(0, maxFiles);
152
- for (const file of displayFiles) {
153
- lines.push(`- ${file}`);
154
- }
155
- if (files.length > maxFiles) {
156
- lines.push(`- ... and ${files.length - maxFiles} more`);
157
- }
158
- return lines.join('\n');
159
- }
160
- //# sourceMappingURL=summary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"summary.js","sourceRoot":"","sources":["../../../src/hooks/autopilot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AK,GAAa,CAAC,SAAS,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAE7D,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC9C,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC1B,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,GAAG,QAAQ,EAAE,CAAC;QAC5B,KAAK,CAAC,IAAI,CAAC,aAAa,KAAK,CAAC,MAAM,GAAG,QAAQ,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -1,39 +0,0 @@
1
- /**
2
- * Autopilot Phase Transitions
3
- *
4
- * Handles transitions between phases, especially the critical Ralph → UltraQA
5
- * and UltraQA → Validation transitions that must respect mutual exclusion.
6
- */
7
- import type { AutopilotState } from './types.js';
8
- export interface TransitionResult {
9
- success: boolean;
10
- error?: string;
11
- state?: AutopilotState;
12
- }
13
- /**
14
- * Transition from Ralph (Phase 2: Execution) to UltraQA (Phase 3: QA)
15
- *
16
- * This handles the mutual exclusion by:
17
- * 1. Saving Ralph's progress to autopilot state
18
- * 2. Cleanly terminating Ralph mode (and linked Ultrawork)
19
- * 3. Starting UltraQA mode
20
- * 4. Preserving context for potential rollback
21
- */
22
- export declare function transitionRalphToUltraQA(directory: string, sessionId: string): TransitionResult;
23
- /**
24
- * Transition from UltraQA (Phase 3: QA) to Validation (Phase 4)
25
- */
26
- export declare function transitionUltraQAToValidation(directory: string): TransitionResult;
27
- /**
28
- * Transition from Validation (Phase 4) to Complete
29
- */
30
- export declare function transitionToComplete(directory: string): TransitionResult;
31
- /**
32
- * Transition to failed state
33
- */
34
- export declare function transitionToFailed(directory: string, error: string): TransitionResult;
35
- /**
36
- * Get a prompt for Claude to execute the transition
37
- */
38
- export declare function getTransitionPrompt(fromPhase: string, toPhase: string): string;
39
- //# sourceMappingURL=transition.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/hooks/autopilot/transition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,gBAAgB,CAkElB;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,MAAM,GAChB,gBAAgB,CAyClB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAWxE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,gBAAgB,CAWlB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,MAAM,CA6ER"}
@@ -1,216 +0,0 @@
1
- /**
2
- * Autopilot Phase Transitions
3
- *
4
- * Handles transitions between phases, especially the critical Ralph → UltraQA
5
- * and UltraQA → Validation transitions that must respect mutual exclusion.
6
- */
7
- import { readRalphState, clearRalphState, clearLinkedUltraworkState } from '../ralph-loop/index.js';
8
- import { startUltraQA, clearUltraQAState, readUltraQAState } from '../ultraqa-loop/index.js';
9
- import { readAutopilotState, transitionPhase, updateExecution, updateQA } from './state.js';
10
- /**
11
- * Transition from Ralph (Phase 2: Execution) to UltraQA (Phase 3: QA)
12
- *
13
- * This handles the mutual exclusion by:
14
- * 1. Saving Ralph's progress to autopilot state
15
- * 2. Cleanly terminating Ralph mode (and linked Ultrawork)
16
- * 3. Starting UltraQA mode
17
- * 4. Preserving context for potential rollback
18
- */
19
- export function transitionRalphToUltraQA(directory, sessionId) {
20
- const autopilotState = readAutopilotState(directory);
21
- if (!autopilotState || autopilotState.phase !== 'execution') {
22
- return {
23
- success: false,
24
- error: 'Not in execution phase - cannot transition to QA'
25
- };
26
- }
27
- const ralphState = readRalphState(directory);
28
- // Step 1: Preserve Ralph progress in autopilot state
29
- const executionUpdated = updateExecution(directory, {
30
- ralph_iterations: ralphState?.iteration ?? autopilotState.execution.ralph_iterations,
31
- ralph_completed_at: new Date().toISOString(),
32
- ultrawork_active: false
33
- });
34
- if (!executionUpdated) {
35
- return {
36
- success: false,
37
- error: 'Failed to update execution state'
38
- };
39
- }
40
- // Step 2: Cleanly terminate Ralph (and linked Ultrawork)
41
- if (ralphState?.linked_ultrawork) {
42
- clearLinkedUltraworkState(directory);
43
- }
44
- const ralphCleared = clearRalphState(directory);
45
- if (!ralphCleared) {
46
- return {
47
- success: false,
48
- error: 'Failed to clear Ralph state'
49
- };
50
- }
51
- // Step 3: Transition to QA phase
52
- const newState = transitionPhase(directory, 'qa');
53
- if (!newState) {
54
- return {
55
- success: false,
56
- error: 'Failed to transition to QA phase'
57
- };
58
- }
59
- // Step 4: Start UltraQA
60
- const qaResult = startUltraQA(directory, 'tests', sessionId, { maxCycles: 5 });
61
- if (!qaResult.success) {
62
- // Rollback on failure - restore execution phase
63
- transitionPhase(directory, 'execution');
64
- updateExecution(directory, { ralph_completed_at: undefined });
65
- return {
66
- success: false,
67
- error: qaResult.error || 'Failed to start UltraQA'
68
- };
69
- }
70
- return {
71
- success: true,
72
- state: newState
73
- };
74
- }
75
- /**
76
- * Transition from UltraQA (Phase 3: QA) to Validation (Phase 4)
77
- */
78
- export function transitionUltraQAToValidation(directory) {
79
- const autopilotState = readAutopilotState(directory);
80
- if (!autopilotState || autopilotState.phase !== 'qa') {
81
- return {
82
- success: false,
83
- error: 'Not in QA phase - cannot transition to validation'
84
- };
85
- }
86
- const qaState = readUltraQAState(directory);
87
- // Preserve QA progress
88
- const qaUpdated = updateQA(directory, {
89
- ultraqa_cycles: qaState?.cycle ?? autopilotState.qa.ultraqa_cycles,
90
- qa_completed_at: new Date().toISOString()
91
- });
92
- if (!qaUpdated) {
93
- return {
94
- success: false,
95
- error: 'Failed to update QA state'
96
- };
97
- }
98
- // Terminate UltraQA
99
- clearUltraQAState(directory);
100
- // Transition to validation
101
- const newState = transitionPhase(directory, 'validation');
102
- if (!newState) {
103
- return {
104
- success: false,
105
- error: 'Failed to transition to validation phase'
106
- };
107
- }
108
- return {
109
- success: true,
110
- state: newState
111
- };
112
- }
113
- /**
114
- * Transition from Validation (Phase 4) to Complete
115
- */
116
- export function transitionToComplete(directory) {
117
- const state = transitionPhase(directory, 'complete');
118
- if (!state) {
119
- return {
120
- success: false,
121
- error: 'Failed to transition to complete phase'
122
- };
123
- }
124
- return { success: true, state };
125
- }
126
- /**
127
- * Transition to failed state
128
- */
129
- export function transitionToFailed(directory, error) {
130
- const state = transitionPhase(directory, 'failed');
131
- if (!state) {
132
- return {
133
- success: false,
134
- error: 'Failed to transition to failed phase'
135
- };
136
- }
137
- return { success: true, state };
138
- }
139
- /**
140
- * Get a prompt for Claude to execute the transition
141
- */
142
- export function getTransitionPrompt(fromPhase, toPhase) {
143
- if (fromPhase === 'execution' && toPhase === 'qa') {
144
- return `## PHASE TRANSITION: Execution → QA
145
-
146
- The execution phase is complete. Transitioning to QA phase.
147
-
148
- **CRITICAL**: Ralph mode must be cleanly terminated before UltraQA can start.
149
-
150
- The transition handler has:
151
- 1. Preserved Ralph iteration count and progress
152
- 2. Cleared Ralph state (and linked Ultrawork)
153
- 3. Started UltraQA in 'tests' mode
154
-
155
- You are now in QA phase. Run the QA cycle:
156
- 1. Build: npm run build (or equivalent)
157
- 2. Lint: npm run lint (or equivalent)
158
- 3. Test: npm test (or equivalent)
159
-
160
- Fix any failures and repeat until all pass.
161
-
162
- Signal when QA passes: QA_COMPLETE
163
- `;
164
- }
165
- if (fromPhase === 'qa' && toPhase === 'validation') {
166
- return `## PHASE TRANSITION: QA → Validation
167
-
168
- All QA checks have passed. Transitioning to validation phase.
169
-
170
- The transition handler has:
171
- 1. Preserved UltraQA cycle count
172
- 2. Cleared UltraQA state
173
- 3. Updated phase to 'validation'
174
-
175
- You are now in validation phase. Spawn parallel validation architects:
176
-
177
- \`\`\`
178
- // Spawn all three in parallel
179
- Task(subagent_type="oh-my-claudecode:architect", model="opus",
180
- prompt="FUNCTIONAL COMPLETENESS REVIEW: Verify all requirements from spec are implemented")
181
-
182
- Task(subagent_type="oh-my-claudecode:security-reviewer", model="opus",
183
- prompt="SECURITY REVIEW: Check for vulnerabilities, injection risks, auth issues")
184
-
185
- Task(subagent_type="oh-my-claudecode:code-reviewer", model="opus",
186
- prompt="CODE QUALITY REVIEW: Check patterns, maintainability, test coverage")
187
- \`\`\`
188
-
189
- Aggregate verdicts:
190
- - All APPROVED → Signal: AUTOPILOT_COMPLETE
191
- - Any REJECTED → Fix issues and re-validate (max 3 rounds)
192
- `;
193
- }
194
- if (fromPhase === 'expansion' && toPhase === 'planning') {
195
- return `## PHASE TRANSITION: Expansion → Planning
196
-
197
- The idea has been expanded into a detailed specification.
198
-
199
- Read the spec and create an implementation plan using the Architect agent (direct planning mode).
200
-
201
- Signal when Critic approves the plan: PLANNING_COMPLETE
202
- `;
203
- }
204
- if (fromPhase === 'planning' && toPhase === 'execution') {
205
- return `## PHASE TRANSITION: Planning → Execution
206
-
207
- The plan has been approved. Starting execution phase with Ralph + Ultrawork.
208
-
209
- Execute tasks from the plan in parallel where possible.
210
-
211
- Signal when all tasks complete: EXECUTION_COMPLETE
212
- `;
213
- }
214
- return '';
215
- }
216
- //# sourceMappingURL=transition.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transition.js","sourceRoot":"","sources":["../../../src/hooks/autopilot/transition.ts"],"names":[],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IAAI,EAAE,CAAC;QAClD,OAAO;;;;;;;;;;;;;;;;;;;CAmBV,CAAC;IACA,CAAC;IAED,IAAI,SAAS,KAAK,IAAI,IAAI,OAAO,KAAK,YAAY,EAAE,CAAC;QACnD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BV,CAAC;IACA,CAAC;IAED,IAAI,SAAS,KAAK,WAAW,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;QACxD,OAAO;;;;;;;CAOV,CAAC;IACA,CAAC;IAED,IAAI,SAAS,KAAK,UAAU,IAAI,OAAO,KAAK,WAAW,EAAE,CAAC;QACxD,OAAO;;;;;;;CAOV,CAAC;IACA,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -1,28 +0,0 @@
1
- /**
2
- * Context Window Limit Recovery Constants
3
- *
4
- * Messages and prompts for recovery from context limit errors.
5
- *
6
- * Adapted from oh-my-opencode's anthropic-context-window-limit-recovery hook.
7
- */
8
- /**
9
- * Recovery message when context window limit is hit
10
- */
11
- export declare const CONTEXT_LIMIT_RECOVERY_MESSAGE = "CONTEXT WINDOW LIMIT REACHED - IMMEDIATE ACTION REQUIRED\n\nThe conversation has exceeded the model's context window limit. To continue working effectively, you must take one of these actions:\n\n1. SUMMARIZE THE CONVERSATION\n - Use the /compact command if available\n - Or provide a concise summary of what has been accomplished so far\n - Include key decisions, code changes, and remaining tasks\n\n2. START A FRESH CONTEXT\n - If summarization isn't sufficient, suggest starting a new session\n - Provide a handoff message with essential context\n\n3. REDUCE OUTPUT SIZE\n - When showing code, show only relevant portions\n - Use file paths and line numbers instead of full code blocks\n - Be more concise in explanations\n\nIMPORTANT: Do not attempt to continue without addressing this limit.\nThe API will reject further requests until the context is reduced.\n\nCurrent Status:\n- Context limit exceeded\n- Further API calls will fail until context is reduced\n- Action required before continuing\n";
12
- /**
13
- * Short notification for context limit
14
- */
15
- export declare const CONTEXT_LIMIT_SHORT_MESSAGE = "Context window limit reached. Please use /compact to summarize the conversation or start a new session.";
16
- /**
17
- * Recovery message for non-empty content errors
18
- */
19
- export declare const NON_EMPTY_CONTENT_RECOVERY_MESSAGE = "API ERROR: Non-empty content validation failed.\n\nThis error typically occurs when:\n- A message has empty text content\n- The conversation structure is invalid\n\nSuggested actions:\n1. Continue with a new message\n2. If the error persists, start a new session\n\nThe system will attempt automatic recovery.\n";
20
- /**
21
- * Recovery message when truncation was applied
22
- */
23
- export declare const TRUNCATION_APPLIED_MESSAGE = "CONTEXT OPTIMIZATION APPLIED\n\nSome tool outputs have been truncated to fit within the context window.\nThe conversation can now continue normally.\n\nIf you need to see the full output of a previous tool call, you can:\n- Re-run the specific command\n- Ask to see a particular file or section\n\nContinuing with the current task...\n";
24
- /**
25
- * Message when recovery fails
26
- */
27
- export declare const RECOVERY_FAILED_MESSAGE = "CONTEXT RECOVERY FAILED\n\nAll automatic recovery attempts have been exhausted.\nPlease start a new session to continue.\n\nBefore starting a new session:\n1. Note what has been accomplished\n2. Save any important code changes\n3. Document the current state of the task\n\nYou can copy this conversation summary to continue in a new session.\n";
28
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/hooks/context-window-limit-recovery/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAM,8BAA8B,kgCAyB1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,4GAA4G,CAAC;AAErJ;;GAEG;AACH,eAAO,MAAM,kCAAkC,4TAW9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,oVAUtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,4VAWnC,CAAC"}
@@ -1,85 +0,0 @@
1
- /**
2
- * Context Window Limit Recovery Constants
3
- *
4
- * Messages and prompts for recovery from context limit errors.
5
- *
6
- * Adapted from oh-my-opencode's anthropic-context-window-limit-recovery hook.
7
- */
8
- /**
9
- * Recovery message when context window limit is hit
10
- */
11
- export const CONTEXT_LIMIT_RECOVERY_MESSAGE = `CONTEXT WINDOW LIMIT REACHED - IMMEDIATE ACTION REQUIRED
12
-
13
- The conversation has exceeded the model's context window limit. To continue working effectively, you must take one of these actions:
14
-
15
- 1. SUMMARIZE THE CONVERSATION
16
- - Use the /compact command if available
17
- - Or provide a concise summary of what has been accomplished so far
18
- - Include key decisions, code changes, and remaining tasks
19
-
20
- 2. START A FRESH CONTEXT
21
- - If summarization isn't sufficient, suggest starting a new session
22
- - Provide a handoff message with essential context
23
-
24
- 3. REDUCE OUTPUT SIZE
25
- - When showing code, show only relevant portions
26
- - Use file paths and line numbers instead of full code blocks
27
- - Be more concise in explanations
28
-
29
- IMPORTANT: Do not attempt to continue without addressing this limit.
30
- The API will reject further requests until the context is reduced.
31
-
32
- Current Status:
33
- - Context limit exceeded
34
- - Further API calls will fail until context is reduced
35
- - Action required before continuing
36
- `;
37
- /**
38
- * Short notification for context limit
39
- */
40
- export const CONTEXT_LIMIT_SHORT_MESSAGE = `Context window limit reached. Please use /compact to summarize the conversation or start a new session.`;
41
- /**
42
- * Recovery message for non-empty content errors
43
- */
44
- export const NON_EMPTY_CONTENT_RECOVERY_MESSAGE = `API ERROR: Non-empty content validation failed.
45
-
46
- This error typically occurs when:
47
- - A message has empty text content
48
- - The conversation structure is invalid
49
-
50
- Suggested actions:
51
- 1. Continue with a new message
52
- 2. If the error persists, start a new session
53
-
54
- The system will attempt automatic recovery.
55
- `;
56
- /**
57
- * Recovery message when truncation was applied
58
- */
59
- export const TRUNCATION_APPLIED_MESSAGE = `CONTEXT OPTIMIZATION APPLIED
60
-
61
- Some tool outputs have been truncated to fit within the context window.
62
- The conversation can now continue normally.
63
-
64
- If you need to see the full output of a previous tool call, you can:
65
- - Re-run the specific command
66
- - Ask to see a particular file or section
67
-
68
- Continuing with the current task...
69
- `;
70
- /**
71
- * Message when recovery fails
72
- */
73
- export const RECOVERY_FAILED_MESSAGE = `CONTEXT RECOVERY FAILED
74
-
75
- All automatic recovery attempts have been exhausted.
76
- Please start a new session to continue.
77
-
78
- Before starting a new session:
79
- 1. Note what has been accomplished
80
- 2. Save any important code changes
81
- 3. Document the current state of the task
82
-
83
- You can copy this conversation summary to continue in a new session.
84
- `;
85
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/hooks/context-window-limit-recovery/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyB7C,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,yGAAyG,CAAC;AAErJ;;GAEG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG;;;;;;;;;;;CAWjD,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;CAUzC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;CAWtC,CAAC"}
@@ -1,62 +0,0 @@
1
- /**
2
- * Context Window Limit Recovery Hook
3
- *
4
- * Detects context window limit errors and injects recovery messages
5
- * to help Claude recover gracefully.
6
- *
7
- * Adapted from oh-my-opencode's anthropic-context-window-limit-recovery hook.
8
- *
9
- * Note: This is a simplified version for Claude Code's shell hook system.
10
- * The original uses OpenCode's plugin event system for more sophisticated
11
- * recovery like automatic summarization and truncation.
12
- */
13
- import type { ParsedTokenLimitError, RecoveryResult } from './types.js';
14
- /**
15
- * Configuration for context limit recovery hook
16
- */
17
- export interface ContextLimitRecoveryConfig {
18
- /** Whether to show detailed recovery messages */
19
- detailed?: boolean;
20
- /** Custom recovery message */
21
- customMessage?: string;
22
- /** Whether to enable the hook */
23
- enabled?: boolean;
24
- }
25
- /**
26
- * Create context window limit recovery hook
27
- *
28
- * This hook monitors for token/context limit errors and injects
29
- * helpful recovery messages when detected.
30
- */
31
- export declare function createContextLimitRecoveryHook(config?: ContextLimitRecoveryConfig): {
32
- /**
33
- * PostToolUse - Check for context limit errors in tool responses
34
- */
35
- postToolUse: (input: {
36
- tool_name: string;
37
- session_id: string;
38
- tool_input: Record<string, unknown>;
39
- tool_response?: string;
40
- }) => string | null;
41
- /**
42
- * Notification - Check for error notifications
43
- * (Called when errors are passed through notification system)
44
- */
45
- onError: (input: {
46
- session_id: string;
47
- error: unknown;
48
- }) => RecoveryResult;
49
- };
50
- /**
51
- * Check if text contains a context limit error
52
- */
53
- export declare function detectContextLimitError(text: string): boolean;
54
- /**
55
- * Parse error to get detailed token limit info
56
- */
57
- export declare function parseContextLimitError(error: unknown): ParsedTokenLimitError | null;
58
- export type { ParsedTokenLimitError, RetryState, TruncateState, RecoveryResult, } from './types.js';
59
- export { RETRY_CONFIG, TRUNCATE_CONFIG } from './types.js';
60
- export { CONTEXT_LIMIT_RECOVERY_MESSAGE, CONTEXT_LIMIT_SHORT_MESSAGE, NON_EMPTY_CONTENT_RECOVERY_MESSAGE, TRUNCATION_APPLIED_MESSAGE, RECOVERY_FAILED_MESSAGE, } from './constants.js';
61
- export { parseTokenLimitError, containsTokenLimitError, TOKEN_LIMIT_PATTERNS, TOKEN_LIMIT_KEYWORDS, } from './parser.js';
62
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/context-window-limit-recovery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAgBH,OAAO,KAAK,EACV,qBAAqB,EAGrB,cAAc,EACf,MAAM,YAAY,CAAC;AAsEpB;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;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