oh-my-claude-sisyphus 2.6.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (548) hide show
  1. package/README.md +59 -785
  2. package/agents/analyst.md +85 -0
  3. package/agents/architect-low.md +88 -0
  4. package/agents/architect-medium.md +108 -0
  5. package/agents/architect.md +77 -0
  6. package/agents/critic.md +97 -0
  7. package/agents/designer-high.md +113 -0
  8. package/agents/designer-low.md +89 -0
  9. package/agents/designer.md +80 -0
  10. package/agents/executor-high.md +116 -0
  11. package/agents/executor-low.md +94 -0
  12. package/agents/executor.md +62 -0
  13. package/agents/explore-medium.md +113 -0
  14. package/agents/explore.md +86 -0
  15. package/agents/planner.md +164 -0
  16. package/agents/qa-tester.md +109 -0
  17. package/agents/researcher-low.md +84 -0
  18. package/agents/researcher.md +70 -0
  19. package/agents/vision.md +39 -0
  20. package/agents/writer.md +152 -0
  21. package/commands/.gitkeep +0 -0
  22. package/dist/__tests__/hooks.test.js +22 -22
  23. package/dist/__tests__/hooks.test.js.map +1 -1
  24. package/dist/__tests__/hud-agents.test.d.ts +7 -0
  25. package/dist/__tests__/hud-agents.test.d.ts.map +1 -0
  26. package/dist/__tests__/hud-agents.test.js +363 -0
  27. package/dist/__tests__/hud-agents.test.js.map +1 -0
  28. package/dist/__tests__/installer.test.js +184 -116
  29. package/dist/__tests__/installer.test.js.map +1 -1
  30. package/dist/__tests__/learned-skills/config.test.d.ts +2 -0
  31. package/dist/__tests__/learned-skills/config.test.d.ts.map +1 -0
  32. package/dist/__tests__/learned-skills/config.test.js +37 -0
  33. package/dist/__tests__/learned-skills/config.test.js.map +1 -0
  34. package/dist/__tests__/learned-skills/detector.test.d.ts +2 -0
  35. package/dist/__tests__/learned-skills/detector.test.d.ts.map +1 -0
  36. package/dist/__tests__/learned-skills/detector.test.js +99 -0
  37. package/dist/__tests__/learned-skills/detector.test.js.map +1 -0
  38. package/dist/__tests__/learned-skills/finder.test.d.ts +2 -0
  39. package/dist/__tests__/learned-skills/finder.test.d.ts.map +1 -0
  40. package/dist/__tests__/learned-skills/finder.test.js +59 -0
  41. package/dist/__tests__/learned-skills/finder.test.js.map +1 -0
  42. package/dist/__tests__/learned-skills/loader.test.d.ts +2 -0
  43. package/dist/__tests__/learned-skills/loader.test.d.ts.map +1 -0
  44. package/dist/__tests__/learned-skills/loader.test.js +69 -0
  45. package/dist/__tests__/learned-skills/loader.test.js.map +1 -0
  46. package/dist/__tests__/learned-skills/parser.test.d.ts +2 -0
  47. package/dist/__tests__/learned-skills/parser.test.d.ts.map +1 -0
  48. package/dist/__tests__/learned-skills/parser.test.js +81 -0
  49. package/dist/__tests__/learned-skills/parser.test.js.map +1 -0
  50. package/dist/__tests__/learned-skills/validator.test.d.ts +2 -0
  51. package/dist/__tests__/learned-skills/validator.test.d.ts.map +1 -0
  52. package/dist/__tests__/learned-skills/validator.test.js +85 -0
  53. package/dist/__tests__/learned-skills/validator.test.js.map +1 -0
  54. package/dist/__tests__/mnemosyne/config.test.d.ts +2 -0
  55. package/dist/__tests__/mnemosyne/config.test.d.ts.map +1 -0
  56. package/dist/__tests__/mnemosyne/config.test.js +37 -0
  57. package/dist/__tests__/mnemosyne/config.test.js.map +1 -0
  58. package/dist/__tests__/mnemosyne/detector.test.d.ts +2 -0
  59. package/dist/__tests__/mnemosyne/detector.test.d.ts.map +1 -0
  60. package/dist/__tests__/mnemosyne/detector.test.js +99 -0
  61. package/dist/__tests__/mnemosyne/detector.test.js.map +1 -0
  62. package/dist/__tests__/mnemosyne/finder.test.d.ts +2 -0
  63. package/dist/__tests__/mnemosyne/finder.test.d.ts.map +1 -0
  64. package/dist/__tests__/mnemosyne/finder.test.js +61 -0
  65. package/dist/__tests__/mnemosyne/finder.test.js.map +1 -0
  66. package/dist/__tests__/mnemosyne/loader.test.d.ts +2 -0
  67. package/dist/__tests__/mnemosyne/loader.test.d.ts.map +1 -0
  68. package/dist/__tests__/mnemosyne/loader.test.js +73 -0
  69. package/dist/__tests__/mnemosyne/loader.test.js.map +1 -0
  70. package/dist/__tests__/mnemosyne/parser.test.d.ts +2 -0
  71. package/dist/__tests__/mnemosyne/parser.test.d.ts.map +1 -0
  72. package/dist/__tests__/mnemosyne/parser.test.js +81 -0
  73. package/dist/__tests__/mnemosyne/parser.test.js.map +1 -0
  74. package/dist/__tests__/mnemosyne/validator.test.d.ts +2 -0
  75. package/dist/__tests__/mnemosyne/validator.test.d.ts.map +1 -0
  76. package/dist/__tests__/mnemosyne/validator.test.js +85 -0
  77. package/dist/__tests__/mnemosyne/validator.test.js.map +1 -0
  78. package/dist/__tests__/model-routing.test.js +34 -34
  79. package/dist/__tests__/model-routing.test.js.map +1 -1
  80. package/dist/__tests__/notepad.test.js +7 -7
  81. package/dist/__tests__/notepad.test.js.map +1 -1
  82. package/dist/__tests__/ralph-prd.test.js +12 -12
  83. package/dist/__tests__/ralph-prd.test.js.map +1 -1
  84. package/dist/__tests__/ralph-progress.test.js +12 -12
  85. package/dist/__tests__/ralph-progress.test.js.map +1 -1
  86. package/dist/__tests__/skills.test.js +50 -17
  87. package/dist/__tests__/skills.test.js.map +1 -1
  88. package/dist/__tests__/types.test.js +5 -5
  89. package/dist/__tests__/types.test.js.map +1 -1
  90. package/dist/agents/analyst.d.ts +11 -0
  91. package/dist/agents/analyst.d.ts.map +1 -0
  92. package/dist/agents/analyst.js +115 -0
  93. package/dist/agents/analyst.js.map +1 -0
  94. package/dist/agents/architect.d.ts +12 -0
  95. package/dist/agents/architect.d.ts.map +1 -0
  96. package/dist/agents/architect.js +189 -0
  97. package/dist/agents/architect.js.map +1 -0
  98. package/dist/agents/coordinator.d.ts +11 -0
  99. package/dist/agents/coordinator.d.ts.map +1 -0
  100. package/dist/agents/coordinator.js +115 -0
  101. package/dist/agents/coordinator.js.map +1 -0
  102. package/dist/agents/critic.d.ts +11 -0
  103. package/dist/agents/critic.d.ts.map +1 -0
  104. package/dist/agents/critic.js +127 -0
  105. package/dist/agents/critic.js.map +1 -0
  106. package/dist/agents/definitions.d.ts +33 -70
  107. package/dist/agents/definitions.d.ts.map +1 -1
  108. package/dist/agents/definitions.js +140 -1268
  109. package/dist/agents/definitions.js.map +1 -1
  110. package/dist/agents/designer.d.ts +11 -0
  111. package/dist/agents/designer.d.ts.map +1 -0
  112. package/dist/agents/designer.js +115 -0
  113. package/dist/agents/designer.js.map +1 -0
  114. package/dist/agents/executor.d.ts +12 -0
  115. package/dist/agents/executor.d.ts.map +1 -0
  116. package/dist/agents/executor.js +93 -0
  117. package/dist/agents/executor.js.map +1 -0
  118. package/dist/agents/explore.js +4 -4
  119. package/dist/agents/explore.js.map +1 -1
  120. package/dist/agents/index.d.ts +12 -11
  121. package/dist/agents/index.d.ts.map +1 -1
  122. package/dist/agents/index.js +15 -16
  123. package/dist/agents/index.js.map +1 -1
  124. package/dist/agents/planner.d.ts +11 -0
  125. package/dist/agents/planner.d.ts.map +1 -0
  126. package/dist/agents/planner.js +194 -0
  127. package/dist/agents/planner.js.map +1 -0
  128. package/dist/agents/qa-tester.js +16 -16
  129. package/dist/agents/qa-tester.js.map +1 -1
  130. package/dist/agents/researcher.d.ts +12 -0
  131. package/dist/agents/researcher.d.ts.map +1 -0
  132. package/dist/agents/researcher.js +103 -0
  133. package/dist/agents/researcher.js.map +1 -0
  134. package/dist/agents/vision.d.ts +11 -0
  135. package/dist/agents/vision.d.ts.map +1 -0
  136. package/dist/agents/vision.js +70 -0
  137. package/dist/agents/vision.js.map +1 -0
  138. package/dist/agents/writer.d.ts +11 -0
  139. package/dist/agents/writer.d.ts.map +1 -0
  140. package/dist/agents/writer.js +209 -0
  141. package/dist/agents/writer.js.map +1 -0
  142. package/dist/cli/index.js +32 -32
  143. package/dist/cli/index.js.map +1 -1
  144. package/dist/commands/index.d.ts +4 -4
  145. package/dist/commands/index.js +4 -4
  146. package/dist/config/loader.js +25 -25
  147. package/dist/config/loader.js.map +1 -1
  148. package/dist/features/auto-update.d.ts +5 -5
  149. package/dist/features/auto-update.d.ts.map +1 -1
  150. package/dist/features/auto-update.js +17 -17
  151. package/dist/features/auto-update.js.map +1 -1
  152. package/dist/features/background-agent/manager.js +1 -1
  153. package/dist/features/background-agent/manager.js.map +1 -1
  154. package/dist/features/boulder-state/constants.d.ts +5 -5
  155. package/dist/features/boulder-state/constants.d.ts.map +1 -1
  156. package/dist/features/boulder-state/constants.js +3 -3
  157. package/dist/features/boulder-state/constants.js.map +1 -1
  158. package/dist/features/boulder-state/index.d.ts +2 -2
  159. package/dist/features/boulder-state/index.d.ts.map +1 -1
  160. package/dist/features/boulder-state/index.js +2 -2
  161. package/dist/features/boulder-state/index.js.map +1 -1
  162. package/dist/features/boulder-state/storage.d.ts +3 -3
  163. package/dist/features/boulder-state/storage.d.ts.map +1 -1
  164. package/dist/features/boulder-state/storage.js +6 -6
  165. package/dist/features/boulder-state/storage.js.map +1 -1
  166. package/dist/features/builtin-skills/skills.d.ts +15 -1
  167. package/dist/features/builtin-skills/skills.d.ts.map +1 -1
  168. package/dist/features/builtin-skills/skills.js +100 -1110
  169. package/dist/features/builtin-skills/skills.js.map +1 -1
  170. package/dist/features/context-injector/types.d.ts +1 -1
  171. package/dist/features/context-injector/types.d.ts.map +1 -1
  172. package/dist/features/index.d.ts +1 -1
  173. package/dist/features/index.d.ts.map +1 -1
  174. package/dist/features/index.js +2 -2
  175. package/dist/features/index.js.map +1 -1
  176. package/dist/features/magic-keywords.js +14 -14
  177. package/dist/features/magic-keywords.js.map +1 -1
  178. package/dist/features/model-routing/prompts/opus.d.ts +1 -1
  179. package/dist/features/model-routing/prompts/opus.d.ts.map +1 -1
  180. package/dist/features/model-routing/prompts/opus.js +1 -1
  181. package/dist/features/model-routing/router.d.ts +1 -1
  182. package/dist/features/model-routing/router.js +14 -14
  183. package/dist/features/model-routing/router.js.map +1 -1
  184. package/dist/features/model-routing/rules.js +31 -31
  185. package/dist/features/model-routing/rules.js.map +1 -1
  186. package/dist/features/model-routing/types.js +1 -1
  187. package/dist/features/model-routing/types.js.map +1 -1
  188. package/dist/hooks/agent-usage-reminder/constants.d.ts +2 -2
  189. package/dist/hooks/agent-usage-reminder/constants.d.ts.map +1 -1
  190. package/dist/hooks/agent-usage-reminder/constants.js +5 -5
  191. package/dist/hooks/agent-usage-reminder/constants.js.map +1 -1
  192. package/dist/hooks/auto-slash-command/constants.d.ts +1 -1
  193. package/dist/hooks/auto-slash-command/constants.d.ts.map +1 -1
  194. package/dist/hooks/auto-slash-command/constants.js +9 -2
  195. package/dist/hooks/auto-slash-command/constants.js.map +1 -1
  196. package/dist/hooks/bridge.d.ts +2 -2
  197. package/dist/hooks/bridge.d.ts.map +1 -1
  198. package/dist/hooks/bridge.js +50 -18
  199. package/dist/hooks/bridge.js.map +1 -1
  200. package/dist/hooks/directory-readme-injector/constants.d.ts +1 -1
  201. package/dist/hooks/directory-readme-injector/constants.d.ts.map +1 -1
  202. package/dist/hooks/directory-readme-injector/constants.js +2 -2
  203. package/dist/hooks/directory-readme-injector/constants.js.map +1 -1
  204. package/dist/hooks/index.d.ts +3 -2
  205. package/dist/hooks/index.d.ts.map +1 -1
  206. package/dist/hooks/index.js +9 -4
  207. package/dist/hooks/index.js.map +1 -1
  208. package/dist/hooks/learned-skills/config.d.ts +53 -0
  209. package/dist/hooks/learned-skills/config.d.ts.map +1 -0
  210. package/dist/hooks/learned-skills/config.js +103 -0
  211. package/dist/hooks/learned-skills/config.js.map +1 -0
  212. package/dist/hooks/learned-skills/constants.d.ts +24 -0
  213. package/dist/hooks/learned-skills/constants.d.ts.map +1 -0
  214. package/dist/hooks/learned-skills/constants.js +26 -0
  215. package/dist/hooks/learned-skills/constants.js.map +1 -0
  216. package/dist/hooks/learned-skills/detection-hook.d.ts +39 -0
  217. package/dist/hooks/learned-skills/detection-hook.d.ts.map +1 -0
  218. package/dist/hooks/learned-skills/detection-hook.js +83 -0
  219. package/dist/hooks/learned-skills/detection-hook.js.map +1 -0
  220. package/dist/hooks/learned-skills/detector.d.ts +30 -0
  221. package/dist/hooks/learned-skills/detector.d.ts.map +1 -0
  222. package/dist/hooks/learned-skills/detector.js +150 -0
  223. package/dist/hooks/learned-skills/detector.js.map +1 -0
  224. package/dist/hooks/learned-skills/finder.d.ts +21 -0
  225. package/dist/hooks/learned-skills/finder.d.ts.map +1 -0
  226. package/dist/hooks/learned-skills/finder.js +117 -0
  227. package/dist/hooks/learned-skills/finder.js.map +1 -0
  228. package/dist/hooks/learned-skills/index.d.ts +62 -0
  229. package/dist/hooks/learned-skills/index.d.ts.map +1 -0
  230. package/dist/hooks/learned-skills/index.js +137 -0
  231. package/dist/hooks/learned-skills/index.js.map +1 -0
  232. package/dist/hooks/learned-skills/loader.d.ts +20 -0
  233. package/dist/hooks/learned-skills/loader.d.ts.map +1 -0
  234. package/dist/hooks/learned-skills/loader.js +107 -0
  235. package/dist/hooks/learned-skills/loader.js.map +1 -0
  236. package/dist/hooks/learned-skills/parser.d.ts +21 -0
  237. package/dist/hooks/learned-skills/parser.d.ts.map +1 -0
  238. package/dist/hooks/learned-skills/parser.js +190 -0
  239. package/dist/hooks/learned-skills/parser.js.map +1 -0
  240. package/dist/hooks/learned-skills/promotion.d.ts +29 -0
  241. package/dist/hooks/learned-skills/promotion.d.ts.map +1 -0
  242. package/dist/hooks/learned-skills/promotion.js +87 -0
  243. package/dist/hooks/learned-skills/promotion.js.map +1 -0
  244. package/dist/hooks/learned-skills/types.d.ts +109 -0
  245. package/dist/hooks/learned-skills/types.d.ts.map +1 -0
  246. package/dist/hooks/learned-skills/types.js +8 -0
  247. package/dist/hooks/learned-skills/types.js.map +1 -0
  248. package/dist/hooks/learned-skills/validator.d.ts +15 -0
  249. package/dist/hooks/learned-skills/validator.d.ts.map +1 -0
  250. package/dist/hooks/learned-skills/validator.js +87 -0
  251. package/dist/hooks/learned-skills/validator.js.map +1 -0
  252. package/dist/hooks/learned-skills/writer.d.ts +27 -0
  253. package/dist/hooks/learned-skills/writer.d.ts.map +1 -0
  254. package/dist/hooks/learned-skills/writer.js +126 -0
  255. package/dist/hooks/learned-skills/writer.js.map +1 -0
  256. package/dist/hooks/learner/config.d.ts +53 -0
  257. package/dist/hooks/learner/config.d.ts.map +1 -0
  258. package/dist/hooks/learner/config.js +103 -0
  259. package/dist/hooks/learner/config.js.map +1 -0
  260. package/dist/hooks/learner/constants.d.ts +24 -0
  261. package/dist/hooks/learner/constants.d.ts.map +1 -0
  262. package/dist/hooks/learner/constants.js +26 -0
  263. package/dist/hooks/learner/constants.js.map +1 -0
  264. package/dist/hooks/learner/detection-hook.d.ts +39 -0
  265. package/dist/hooks/learner/detection-hook.d.ts.map +1 -0
  266. package/dist/hooks/learner/detection-hook.js +83 -0
  267. package/dist/hooks/learner/detection-hook.js.map +1 -0
  268. package/dist/hooks/learner/detector.d.ts +30 -0
  269. package/dist/hooks/learner/detector.d.ts.map +1 -0
  270. package/dist/hooks/learner/detector.js +150 -0
  271. package/dist/hooks/learner/detector.js.map +1 -0
  272. package/dist/hooks/learner/finder.d.ts +21 -0
  273. package/dist/hooks/learner/finder.d.ts.map +1 -0
  274. package/dist/hooks/learner/finder.js +117 -0
  275. package/dist/hooks/learner/finder.js.map +1 -0
  276. package/dist/hooks/learner/index.d.ts +62 -0
  277. package/dist/hooks/learner/index.d.ts.map +1 -0
  278. package/dist/hooks/learner/index.js +137 -0
  279. package/dist/hooks/learner/index.js.map +1 -0
  280. package/dist/hooks/learner/loader.d.ts +20 -0
  281. package/dist/hooks/learner/loader.d.ts.map +1 -0
  282. package/dist/hooks/learner/loader.js +113 -0
  283. package/dist/hooks/learner/loader.js.map +1 -0
  284. package/dist/hooks/learner/parser.d.ts +21 -0
  285. package/dist/hooks/learner/parser.d.ts.map +1 -0
  286. package/dist/hooks/learner/parser.js +190 -0
  287. package/dist/hooks/learner/parser.js.map +1 -0
  288. package/dist/hooks/learner/promotion.d.ts +29 -0
  289. package/dist/hooks/learner/promotion.d.ts.map +1 -0
  290. package/dist/hooks/learner/promotion.js +87 -0
  291. package/dist/hooks/learner/promotion.js.map +1 -0
  292. package/dist/hooks/learner/types.d.ts +109 -0
  293. package/dist/hooks/learner/types.d.ts.map +1 -0
  294. package/dist/hooks/learner/types.js +8 -0
  295. package/dist/hooks/learner/types.js.map +1 -0
  296. package/dist/hooks/learner/validator.d.ts +15 -0
  297. package/dist/hooks/learner/validator.d.ts.map +1 -0
  298. package/dist/hooks/learner/validator.js +87 -0
  299. package/dist/hooks/learner/validator.js.map +1 -0
  300. package/dist/hooks/learner/writer.d.ts +27 -0
  301. package/dist/hooks/learner/writer.d.ts.map +1 -0
  302. package/dist/hooks/learner/writer.js +126 -0
  303. package/dist/hooks/learner/writer.js.map +1 -0
  304. package/dist/hooks/mnemosyne/config.d.ts +53 -0
  305. package/dist/hooks/mnemosyne/config.d.ts.map +1 -0
  306. package/dist/hooks/mnemosyne/config.js +103 -0
  307. package/dist/hooks/mnemosyne/config.js.map +1 -0
  308. package/dist/hooks/mnemosyne/constants.d.ts +24 -0
  309. package/dist/hooks/mnemosyne/constants.d.ts.map +1 -0
  310. package/dist/hooks/mnemosyne/constants.js +26 -0
  311. package/dist/hooks/mnemosyne/constants.js.map +1 -0
  312. package/dist/hooks/mnemosyne/detection-hook.d.ts +39 -0
  313. package/dist/hooks/mnemosyne/detection-hook.d.ts.map +1 -0
  314. package/dist/hooks/mnemosyne/detection-hook.js +83 -0
  315. package/dist/hooks/mnemosyne/detection-hook.js.map +1 -0
  316. package/dist/hooks/mnemosyne/detector.d.ts +30 -0
  317. package/dist/hooks/mnemosyne/detector.d.ts.map +1 -0
  318. package/dist/hooks/mnemosyne/detector.js +150 -0
  319. package/dist/hooks/mnemosyne/detector.js.map +1 -0
  320. package/dist/hooks/mnemosyne/finder.d.ts +21 -0
  321. package/dist/hooks/mnemosyne/finder.d.ts.map +1 -0
  322. package/dist/hooks/mnemosyne/finder.js +117 -0
  323. package/dist/hooks/mnemosyne/finder.js.map +1 -0
  324. package/dist/hooks/mnemosyne/index.d.ts +62 -0
  325. package/dist/hooks/mnemosyne/index.d.ts.map +1 -0
  326. package/dist/hooks/mnemosyne/index.js +137 -0
  327. package/dist/hooks/mnemosyne/index.js.map +1 -0
  328. package/dist/hooks/mnemosyne/loader.d.ts +20 -0
  329. package/dist/hooks/mnemosyne/loader.d.ts.map +1 -0
  330. package/dist/hooks/mnemosyne/loader.js +113 -0
  331. package/dist/hooks/mnemosyne/loader.js.map +1 -0
  332. package/dist/hooks/mnemosyne/parser.d.ts +21 -0
  333. package/dist/hooks/mnemosyne/parser.d.ts.map +1 -0
  334. package/dist/hooks/mnemosyne/parser.js +190 -0
  335. package/dist/hooks/mnemosyne/parser.js.map +1 -0
  336. package/dist/hooks/mnemosyne/promotion.d.ts +29 -0
  337. package/dist/hooks/mnemosyne/promotion.d.ts.map +1 -0
  338. package/dist/hooks/mnemosyne/promotion.js +87 -0
  339. package/dist/hooks/mnemosyne/promotion.js.map +1 -0
  340. package/dist/hooks/mnemosyne/types.d.ts +109 -0
  341. package/dist/hooks/mnemosyne/types.d.ts.map +1 -0
  342. package/dist/hooks/mnemosyne/types.js +8 -0
  343. package/dist/hooks/mnemosyne/types.js.map +1 -0
  344. package/dist/hooks/mnemosyne/validator.d.ts +15 -0
  345. package/dist/hooks/mnemosyne/validator.d.ts.map +1 -0
  346. package/dist/hooks/mnemosyne/validator.js +87 -0
  347. package/dist/hooks/mnemosyne/validator.js.map +1 -0
  348. package/dist/hooks/mnemosyne/writer.d.ts +27 -0
  349. package/dist/hooks/mnemosyne/writer.d.ts.map +1 -0
  350. package/dist/hooks/mnemosyne/writer.js +126 -0
  351. package/dist/hooks/mnemosyne/writer.js.map +1 -0
  352. package/dist/hooks/notepad/index.d.ts +2 -2
  353. package/dist/hooks/notepad/index.js +7 -7
  354. package/dist/hooks/notepad/index.js.map +1 -1
  355. package/dist/hooks/omc-orchestrator/constants.d.ts +23 -0
  356. package/dist/hooks/omc-orchestrator/constants.d.ts.map +1 -0
  357. package/dist/hooks/omc-orchestrator/constants.js +142 -0
  358. package/dist/hooks/omc-orchestrator/constants.js.map +1 -0
  359. package/dist/hooks/omc-orchestrator/index.d.ts +113 -0
  360. package/dist/hooks/omc-orchestrator/index.d.ts.map +1 -0
  361. package/dist/hooks/omc-orchestrator/index.js +309 -0
  362. package/dist/hooks/omc-orchestrator/index.js.map +1 -0
  363. package/dist/hooks/persistent-mode/index.d.ts +4 -4
  364. package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
  365. package/dist/hooks/persistent-mode/index.js +37 -37
  366. package/dist/hooks/persistent-mode/index.js.map +1 -1
  367. package/dist/hooks/ralph-loop/index.d.ts +33 -5
  368. package/dist/hooks/ralph-loop/index.d.ts.map +1 -1
  369. package/dist/hooks/ralph-loop/index.js +91 -17
  370. package/dist/hooks/ralph-loop/index.js.map +1 -1
  371. package/dist/hooks/ralph-prd/index.d.ts +4 -4
  372. package/dist/hooks/ralph-prd/index.d.ts.map +1 -1
  373. package/dist/hooks/ralph-prd/index.js +13 -13
  374. package/dist/hooks/ralph-prd/index.js.map +1 -1
  375. package/dist/hooks/ralph-progress/index.d.ts +5 -5
  376. package/dist/hooks/ralph-progress/index.d.ts.map +1 -1
  377. package/dist/hooks/ralph-progress/index.js +14 -14
  378. package/dist/hooks/ralph-progress/index.js.map +1 -1
  379. package/dist/hooks/ralph-verifier/index.d.ts +23 -23
  380. package/dist/hooks/ralph-verifier/index.d.ts.map +1 -1
  381. package/dist/hooks/ralph-verifier/index.js +41 -41
  382. package/dist/hooks/ralph-verifier/index.js.map +1 -1
  383. package/dist/hooks/rules-injector/constants.d.ts +1 -1
  384. package/dist/hooks/rules-injector/constants.d.ts.map +1 -1
  385. package/dist/hooks/rules-injector/constants.js +2 -2
  386. package/dist/hooks/rules-injector/constants.js.map +1 -1
  387. package/dist/hooks/todo-continuation/index.js +1 -1
  388. package/dist/hooks/todo-continuation/index.js.map +1 -1
  389. package/dist/hooks/ultraqa-loop/index.d.ts +1 -1
  390. package/dist/hooks/ultraqa-loop/index.js +8 -8
  391. package/dist/hooks/ultraqa-loop/index.js.map +1 -1
  392. package/dist/hooks/ultrawork-state/index.js +7 -7
  393. package/dist/hooks/ultrawork-state/index.js.map +1 -1
  394. package/dist/hud/background-tasks.d.ts +26 -0
  395. package/dist/hud/background-tasks.d.ts.map +1 -0
  396. package/dist/hud/background-tasks.js +116 -0
  397. package/dist/hud/background-tasks.js.map +1 -0
  398. package/dist/hud/colors.d.ts +54 -0
  399. package/dist/hud/colors.d.ts.map +1 -0
  400. package/dist/hud/colors.js +156 -0
  401. package/dist/hud/colors.js.map +1 -0
  402. package/dist/hud/elements/agents.d.ts +73 -0
  403. package/dist/hud/elements/agents.d.ts.map +1 -0
  404. package/dist/hud/elements/agents.js +405 -0
  405. package/dist/hud/elements/agents.js.map +1 -0
  406. package/dist/hud/elements/background.d.ts +20 -0
  407. package/dist/hud/elements/background.d.ts.map +1 -0
  408. package/dist/hud/elements/background.js +70 -0
  409. package/dist/hud/elements/background.js.map +1 -0
  410. package/dist/hud/elements/context.d.ts +19 -0
  411. package/dist/hud/elements/context.d.ts.map +1 -0
  412. package/dist/hud/elements/context.js +58 -0
  413. package/dist/hud/elements/context.js.map +1 -0
  414. package/dist/hud/elements/index.d.ts +17 -0
  415. package/dist/hud/elements/index.d.ts.map +1 -0
  416. package/dist/hud/elements/index.js +17 -0
  417. package/dist/hud/elements/index.js.map +1 -0
  418. package/dist/hud/elements/limits.d.ts +19 -0
  419. package/dist/hud/elements/limits.d.ts.map +1 -0
  420. package/dist/hud/elements/limits.js +54 -0
  421. package/dist/hud/elements/limits.js.map +1 -0
  422. package/dist/hud/elements/permission.d.ts +13 -0
  423. package/dist/hud/elements/permission.d.ts.map +1 -0
  424. package/dist/hud/elements/permission.js +20 -0
  425. package/dist/hud/elements/permission.js.map +1 -0
  426. package/dist/hud/elements/prd.d.ts +20 -0
  427. package/dist/hud/elements/prd.d.ts.map +1 -0
  428. package/dist/hud/elements/prd.js +52 -0
  429. package/dist/hud/elements/prd.js.map +1 -0
  430. package/dist/hud/elements/ralph.d.ts +14 -0
  431. package/dist/hud/elements/ralph.d.ts.map +1 -0
  432. package/dist/hud/elements/ralph.js +36 -0
  433. package/dist/hud/elements/ralph.js.map +1 -0
  434. package/dist/hud/elements/session.d.ts +13 -0
  435. package/dist/hud/elements/session.d.ts.map +1 -0
  436. package/dist/hud/elements/session.js +24 -0
  437. package/dist/hud/elements/session.js.map +1 -0
  438. package/dist/hud/elements/skills.d.ts +24 -0
  439. package/dist/hud/elements/skills.d.ts.map +1 -0
  440. package/dist/hud/elements/skills.js +81 -0
  441. package/dist/hud/elements/skills.js.map +1 -0
  442. package/dist/hud/elements/thinking.d.ts +13 -0
  443. package/dist/hud/elements/thinking.d.ts.map +1 -0
  444. package/dist/hud/elements/thinking.js +19 -0
  445. package/dist/hud/elements/thinking.js.map +1 -0
  446. package/dist/hud/elements/todos.d.ts +20 -0
  447. package/dist/hud/elements/todos.d.ts.map +1 -0
  448. package/dist/hud/elements/todos.js +70 -0
  449. package/dist/hud/elements/todos.js.map +1 -0
  450. package/dist/hud/index.d.ts +9 -0
  451. package/dist/hud/index.d.ts.map +1 -0
  452. package/dist/hud/index.js +89 -0
  453. package/dist/hud/index.js.map +1 -0
  454. package/dist/hud/omc-state.d.ts +31 -0
  455. package/dist/hud/omc-state.d.ts.map +1 -0
  456. package/dist/hud/omc-state.js +163 -0
  457. package/dist/hud/omc-state.js.map +1 -0
  458. package/dist/hud/render.d.ts +11 -0
  459. package/dist/hud/render.d.ts.map +1 -0
  460. package/dist/hud/render.js +121 -0
  461. package/dist/hud/render.js.map +1 -0
  462. package/dist/hud/sisyphus-state.d.ts +31 -0
  463. package/dist/hud/sisyphus-state.d.ts.map +1 -0
  464. package/dist/hud/sisyphus-state.js +163 -0
  465. package/dist/hud/sisyphus-state.js.map +1 -0
  466. package/dist/hud/state.d.ts +43 -0
  467. package/dist/hud/state.d.ts.map +1 -0
  468. package/dist/hud/state.js +201 -0
  469. package/dist/hud/state.js.map +1 -0
  470. package/dist/hud/stdin.d.ts +22 -0
  471. package/dist/hud/stdin.d.ts.map +1 -0
  472. package/dist/hud/stdin.js +65 -0
  473. package/dist/hud/stdin.js.map +1 -0
  474. package/dist/hud/transcript.d.ts +32 -0
  475. package/dist/hud/transcript.d.ts.map +1 -0
  476. package/dist/hud/transcript.js +364 -0
  477. package/dist/hud/transcript.js.map +1 -0
  478. package/dist/hud/types.d.ts +178 -0
  479. package/dist/hud/types.d.ts.map +1 -0
  480. package/dist/hud/types.js +119 -0
  481. package/dist/hud/types.js.map +1 -0
  482. package/dist/hud/usage-api.d.ts +24 -0
  483. package/dist/hud/usage-api.d.ts.map +1 -0
  484. package/dist/hud/usage-api.js +234 -0
  485. package/dist/hud/usage-api.js.map +1 -0
  486. package/dist/index.d.ts +7 -7
  487. package/dist/index.d.ts.map +1 -1
  488. package/dist/index.js +10 -12
  489. package/dist/index.js.map +1 -1
  490. package/dist/installer/hooks.d.ts +36 -64
  491. package/dist/installer/hooks.d.ts.map +1 -1
  492. package/dist/installer/hooks.js +91 -1298
  493. package/dist/installer/hooks.js.map +1 -1
  494. package/dist/installer/index.d.ts +23 -22
  495. package/dist/installer/index.d.ts.map +1 -1
  496. package/dist/installer/index.js +307 -2575
  497. package/dist/installer/index.js.map +1 -1
  498. package/dist/shared/types.d.ts +6 -6
  499. package/dist/shared/types.d.ts.map +1 -1
  500. package/docs/ARCHITECTURE.md +386 -0
  501. package/docs/CLAUDE.md +281 -0
  502. package/docs/FULL-README.md +822 -0
  503. package/docs/LOCAL_PLUGIN_INSTALL.md +94 -0
  504. package/docs/MIGRATION-v3.md +186 -0
  505. package/docs/MIGRATION.md +460 -0
  506. package/docs/TIERED_AGENTS_V2.md +322 -0
  507. package/hooks/hooks.json +70 -0
  508. package/hooks/keyword-detector.sh +102 -0
  509. package/hooks/persistent-mode.sh +172 -0
  510. package/hooks/session-start.sh +62 -0
  511. package/hooks/stop-continuation.sh +40 -0
  512. package/package.json +14 -8
  513. package/scripts/install.sh +90 -72
  514. package/scripts/keyword-detector.mjs +1 -1
  515. package/scripts/persistent-mode.mjs +9 -9
  516. package/scripts/persistent-mode.sh +21 -10
  517. package/scripts/plugin-setup.mjs +109 -0
  518. package/scripts/pre-tool-enforcer.mjs +1 -1
  519. package/scripts/pre-tool-enforcer.sh +1 -1
  520. package/scripts/session-start.mjs +38 -3
  521. package/scripts/skill-injector.mjs +231 -0
  522. package/scripts/uninstall.sh +8 -8
  523. package/skills/analyze/SKILL.md +47 -0
  524. package/skills/cancel-ralph/SKILL.md +43 -0
  525. package/skills/cancel-ultraqa/SKILL.md +29 -0
  526. package/skills/cancel-ultrawork/SKILL.md +42 -0
  527. package/skills/deepinit/SKILL.md +321 -0
  528. package/skills/deepsearch/SKILL.md +39 -0
  529. package/skills/doctor/SKILL.md +192 -0
  530. package/skills/frontend-ui-ux/SKILL.md +53 -0
  531. package/skills/git-master/SKILL.md +58 -0
  532. package/skills/help/SKILL.md +66 -0
  533. package/skills/hud/SKILL.md +142 -0
  534. package/skills/learner/SKILL.md +136 -0
  535. package/skills/note/SKILL.md +63 -0
  536. package/skills/omc-default/SKILL.md +78 -0
  537. package/skills/omc-default-global/SKILL.md +75 -0
  538. package/skills/omc-setup/SKILL.md +144 -0
  539. package/skills/orchestrate/SKILL.md +409 -0
  540. package/skills/plan/SKILL.md +37 -0
  541. package/skills/planner/SKILL.md +43 -0
  542. package/skills/ralph/SKILL.md +101 -0
  543. package/skills/ralph-init/SKILL.md +61 -0
  544. package/skills/ralplan/SKILL.md +219 -0
  545. package/skills/release/SKILL.md +84 -0
  546. package/skills/review/SKILL.md +37 -0
  547. package/skills/ultraqa/SKILL.md +123 -0
  548. package/skills/ultrawork/SKILL.md +89 -0
@@ -0,0 +1,322 @@
1
+ # Tiered Agents v2 Architecture Design
2
+
3
+ ## Overview
4
+
5
+ This document describes an improved tiered agent architecture that addresses current gaps and implements sophisticated patterns for model routing, capability inheritance, and dynamic escalation.
6
+
7
+ ## Current Issues Identified
8
+
9
+ 1. **Incomplete Inheritance**: Tiered agents don't inherit core behavioral patterns from base agents
10
+ 2. **Inconsistent Tool Restrictions**: Tool restrictions vary without clear rationale
11
+ 3. **Missing Escalation Signals**: No mechanism for agents to request escalation when overloaded
12
+ 4. **Minimal Behavioral Instructions**: Tiered variants have too few instructions
13
+ 5. **No Dynamic Routing in Markdown**: TypeScript router exists but markdown agents don't leverage it
14
+
15
+ ## Design Principles
16
+
17
+ ### 1. Template-Based Inheritance
18
+
19
+ Each tiered agent should inherit from a base template that provides:
20
+ - Core identity and role
21
+ - Fundamental constraints (read-only, no delegation, etc.)
22
+ - Output format requirements
23
+ - Quality standards
24
+
25
+ Tier-specific overrides then customize:
26
+ - Task complexity boundaries
27
+ - Tool restrictions
28
+ - Response depth/breadth
29
+ - Escalation thresholds
30
+
31
+ ### 2. Explicit Capability Boundaries
32
+
33
+ Each tier has clear boundaries:
34
+
35
+ | Tier | Complexity | Response Depth | Self-Assessment |
36
+ |------|------------|----------------|-----------------|
37
+ | LOW (Haiku) | Simple, single-focus | Concise, direct | "Is this within my scope?" |
38
+ | MEDIUM (Sonnet) | Moderate, multi-step | Thorough, structured | "Can I handle this fully?" |
39
+ | HIGH (Opus) | Complex, system-wide | Comprehensive, nuanced | "What are the trade-offs?" |
40
+
41
+ ### 3. Escalation Signals
42
+
43
+ Agents should recognize when to recommend escalation:
44
+
45
+ ```markdown
46
+ <Escalation_Signals>
47
+ ## When to Recommend Higher Tier
48
+
49
+ Escalate when you detect:
50
+ - Task exceeds your complexity boundary
51
+ - Multiple failed attempts (>2)
52
+ - Cross-system dependencies you can't trace
53
+ - Security-sensitive changes
54
+ - Irreversible operations
55
+
56
+ Output escalation recommendation:
57
+ **ESCALATION RECOMMENDED**: [reason] → Use [higher-tier-agent]
58
+ </Escalation_Signals>
59
+ ```
60
+
61
+ ### 4. Tool Capability Tiers
62
+
63
+ | Tool | LOW | MEDIUM | HIGH |
64
+ |------|-----|--------|------|
65
+ | Read | ✅ | ✅ | ✅ |
66
+ | Glob | ✅ | ✅ | ✅ |
67
+ | Grep | ✅ | ✅ | ✅ |
68
+ | Edit | ✅ (simple) | ✅ | ✅ |
69
+ | Write | ✅ (simple) | ✅ | ✅ |
70
+ | Bash | Limited | ✅ | ✅ |
71
+ | WebSearch | ❌ | ✅ | ✅ |
72
+ | WebFetch | ❌ | ✅ | ✅ |
73
+ | Task | ❌ | ❌ | Varies |
74
+ | TodoWrite | ✅ | ✅ | ✅ |
75
+
76
+ ## Agent Family Templates
77
+
78
+ ### Oracle Family (Analysis)
79
+
80
+ **Base Identity**: Strategic advisor, READ-ONLY consultant, diagnoses not implements
81
+
82
+ | Variant | Model | Tools | Focus |
83
+ |---------|-------|-------|-------|
84
+ | oracle-low | Haiku | Read, Glob, Grep | Quick lookups, single-file analysis |
85
+ | oracle-medium | Sonnet | + WebSearch, WebFetch | Standard analysis, dependency tracing |
86
+ | oracle | Opus | Full read access | Deep architecture analysis, system-wide patterns |
87
+
88
+ **Shared Constraints**:
89
+ - NO Write/Edit tools
90
+ - NO implementation
91
+ - MUST cite file:line references
92
+ - MUST provide actionable recommendations
93
+
94
+ **Tier-Specific Behaviors**:
95
+
96
+ ```markdown
97
+ ## oracle-low
98
+ - Answer direct questions quickly
99
+ - Single-file focus
100
+ - Output: Answer + Location + Context (3 lines max)
101
+ - Escalate if: cross-file dependencies, architecture questions
102
+
103
+ ## oracle-medium
104
+ - Standard analysis workflow
105
+ - Multi-file tracing allowed
106
+ - Output: Summary + Findings + Diagnosis + Recommendations
107
+ - Escalate if: system-wide impact, security concerns, irreversible changes
108
+
109
+ ## oracle (high)
110
+ - Deep architectural analysis
111
+ - System-wide pattern recognition
112
+ - Output: Full structured analysis with trade-offs
113
+ - No escalation needed (highest tier)
114
+ ```
115
+
116
+ ### Sisyphus-Junior Family (Execution)
117
+
118
+ **Base Identity**: Focused executor, works ALONE, no delegation, TODO obsessed
119
+
120
+ | Variant | Model | Tools | Focus |
121
+ |---------|-------|-------|-------|
122
+ | sisyphus-junior-low | Haiku | Read, Glob, Grep, Edit, Write, Bash, TodoWrite | Single-file, trivial changes |
123
+ | sisyphus-junior | Sonnet | Same | Multi-step, moderate complexity |
124
+ | sisyphus-junior-high | Opus | Same | Multi-file, complex refactoring |
125
+
126
+ **Shared Constraints**:
127
+ - Task tool BLOCKED (no delegation)
128
+ - MUST use TodoWrite for 2+ step tasks
129
+ - MUST verify after changes
130
+ - Works ALONE
131
+
132
+ **Tier-Specific Behaviors**:
133
+
134
+ ```markdown
135
+ ## sisyphus-junior-low
136
+ - Single-file edits only
137
+ - Trivial changes (typos, simple additions)
138
+ - Skip TodoWrite for <2 step tasks
139
+ - Escalate if: multi-file changes, complex logic, architectural decisions
140
+
141
+ ## sisyphus-junior (medium)
142
+ - Multi-step tasks within a module
143
+ - Standard complexity
144
+ - Always use TodoWrite
145
+ - Escalate if: system-wide changes, cross-module dependencies
146
+
147
+ ## sisyphus-junior-high
148
+ - Multi-file refactoring
149
+ - Complex architectural changes
150
+ - Deep analysis before changes
151
+ - No escalation needed (use oracle for consultation)
152
+ ```
153
+
154
+ ### Frontend-Engineer Family (UI/UX)
155
+
156
+ **Base Identity**: Designer-developer hybrid, sees what pure devs miss, creates memorable interfaces
157
+
158
+ | Variant | Model | Tools | Focus |
159
+ |---------|-------|-------|-------|
160
+ | frontend-engineer-low | Haiku | Read, Glob, Grep, Edit, Write, Bash | Simple styling, minor tweaks |
161
+ | frontend-engineer | Sonnet | Same | Standard UI work, components |
162
+ | frontend-engineer-high | Opus | Same | Design systems, complex architecture |
163
+
164
+ **Shared Constraints**:
165
+ - NEVER use generic fonts (Inter, Roboto, Arial)
166
+ - NEVER use cliched patterns (purple gradients)
167
+ - Match existing code patterns
168
+ - Production-quality output
169
+
170
+ **Tier-Specific Behaviors**:
171
+
172
+ ```markdown
173
+ ## frontend-engineer-low
174
+ - Simple CSS changes (colors, spacing, fonts)
175
+ - Minor component tweaks
176
+ - Match existing patterns exactly
177
+ - Escalate if: new component design, design system changes
178
+
179
+ ## frontend-engineer (medium)
180
+ - Standard component work
181
+ - Apply design philosophy
182
+ - Make intentional aesthetic choices
183
+ - Escalate if: design system creation, complex state management
184
+
185
+ ## frontend-engineer-high
186
+ - Design system architecture
187
+ - Complex component hierarchies
188
+ - Deep aesthetic reasoning
189
+ - Full creative latitude
190
+ ```
191
+
192
+ ### Librarian Family (Research)
193
+
194
+ **Base Identity**: External documentation researcher, searches EXTERNAL resources
195
+
196
+ | Variant | Model | Tools | Focus |
197
+ |---------|-------|-------|-------|
198
+ | librarian-low | Haiku | Read, Glob, Grep, WebSearch, WebFetch | Quick lookups |
199
+ | librarian | Sonnet | Same | Comprehensive research |
200
+
201
+ **Shared Constraints**:
202
+ - ALWAYS cite sources with URLs
203
+ - Prefer official docs
204
+ - Note version compatibility
205
+ - Flag outdated information
206
+
207
+ **Tier-Specific Behaviors**:
208
+
209
+ ```markdown
210
+ ## librarian-low
211
+ - Quick API lookups
212
+ - Find specific references
213
+ - Output: Answer + Source + Example (if applicable)
214
+ - Escalate if: comprehensive research needed, multiple sources required
215
+
216
+ ## librarian (medium)
217
+ - Comprehensive research
218
+ - Multiple source synthesis
219
+ - Full structured output format
220
+ - No escalation needed for research tasks
221
+ ```
222
+
223
+ ### Explore Family (Search)
224
+
225
+ **Base Identity**: Codebase search specialist, finds files and code patterns
226
+
227
+ | Variant | Model | Tools | Focus |
228
+ |---------|-------|-------|-------|
229
+ | explore | Haiku | Read, Glob, Grep | Quick searches |
230
+ | explore-medium | Sonnet | Same | Thorough analysis |
231
+
232
+ **Shared Constraints**:
233
+ - READ-ONLY
234
+ - Always use absolute paths
235
+ - Return structured results
236
+ - Address underlying need, not just literal request
237
+
238
+ **Tier-Specific Behaviors**:
239
+
240
+ ```markdown
241
+ ## explore (low)
242
+ - Quick pattern matching
243
+ - File location
244
+ - Parallel tool calls (3+)
245
+ - Escalate if: architecture understanding needed, cross-module analysis
246
+
247
+ ## explore-medium
248
+ - Thorough analysis
249
+ - Cross-reference findings
250
+ - Explain relationships
251
+ - No escalation needed
252
+ ```
253
+
254
+ ## Implementation Changes Required
255
+
256
+ ### 1. Update Markdown Agent Files
257
+
258
+ Each tiered agent file should include:
259
+
260
+ ```markdown
261
+ ---
262
+ name: [agent]-[tier]
263
+ description: [tier-specific description]
264
+ tools: [restricted tool list]
265
+ model: [haiku|sonnet|opus]
266
+ ---
267
+
268
+ <Inherits_From>
269
+ Base: [base-agent].md
270
+ </Inherits_From>
271
+
272
+ <Tier_Identity>
273
+ [Tier-specific role and focus]
274
+ </Tier_Identity>
275
+
276
+ <Complexity_Boundary>
277
+ You handle: [specific types of tasks]
278
+ Escalate when: [specific conditions]
279
+ </Complexity_Boundary>
280
+
281
+ [Tier-specific instructions...]
282
+
283
+ <Escalation_Protocol>
284
+ When you detect tasks beyond your scope, output:
285
+ **ESCALATION RECOMMENDED**: [reason] → Use oh-my-claude-sisyphus:[higher-tier]
286
+ </Escalation_Protocol>
287
+ ```
288
+
289
+ ### 2. Update TypeScript Router
290
+
291
+ The router should:
292
+ - Parse agent capabilities from markdown
293
+ - Match task signals to tier boundaries
294
+ - Provide escalation recommendations in output
295
+
296
+ ### 3. Add Escalation Detection
297
+
298
+ The orchestrator should:
299
+ - Detect "ESCALATION RECOMMENDED" in agent output
300
+ - Automatically retry with recommended higher tier
301
+ - Log escalation patterns for optimization
302
+
303
+ ## Cost Impact Analysis
304
+
305
+ Based on current pricing (Haiku $1/$5, Sonnet $3/$15, Opus $5/$25 per million tokens):
306
+
307
+ | Scenario | Before (all Sonnet) | After (Tiered) | Savings |
308
+ |----------|---------------------|----------------|---------|
309
+ | Simple lookups (70%) | $3/$15 | $1/$5 (Haiku) | ~67% |
310
+ | Standard work (25%) | $3/$15 | $3/$15 (Sonnet) | 0% |
311
+ | Complex work (5%) | $3/$15 | $5/$25 (Opus) | -67% |
312
+ | **Weighted Average** | $3/$15 | ~$1.60/$8 | **~47%** |
313
+
314
+ Intelligent routing can reduce costs by ~47% while improving quality for complex tasks.
315
+
316
+ ## Next Steps
317
+
318
+ 1. Create updated markdown files for all tiered agents
319
+ 2. Add escalation detection to hooks
320
+ 3. Update router to use agent capability parsing
321
+ 4. Add telemetry for tier usage optimization
322
+ 5. Create tests for escalation scenarios
@@ -0,0 +1,70 @@
1
+ {
2
+ "description": "Sisyphus orchestration hooks for keyword detection, tool enforcement, session restoration, and continuation persistence",
3
+ "hooks": {
4
+ "UserPromptSubmit": [
5
+ {
6
+ "matcher": "*",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/keyword-detector.mjs\"",
11
+ "timeout": 5
12
+ },
13
+ {
14
+ "type": "command",
15
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/skill-injector.mjs\"",
16
+ "timeout": 3
17
+ }
18
+ ]
19
+ }
20
+ ],
21
+ "SessionStart": [
22
+ {
23
+ "matcher": "*",
24
+ "hooks": [
25
+ {
26
+ "type": "command",
27
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/session-start.mjs\"",
28
+ "timeout": 5
29
+ }
30
+ ]
31
+ }
32
+ ],
33
+ "PreToolUse": [
34
+ {
35
+ "matcher": "*",
36
+ "hooks": [
37
+ {
38
+ "type": "command",
39
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/pre-tool-enforcer.mjs\"",
40
+ "timeout": 3
41
+ }
42
+ ]
43
+ }
44
+ ],
45
+ "PostToolUse": [
46
+ {
47
+ "matcher": "*",
48
+ "hooks": [
49
+ {
50
+ "type": "command",
51
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/post-tool-verifier.mjs\"",
52
+ "timeout": 3
53
+ }
54
+ ]
55
+ }
56
+ ],
57
+ "Stop": [
58
+ {
59
+ "matcher": "*",
60
+ "hooks": [
61
+ {
62
+ "type": "command",
63
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/persistent-mode.mjs\"",
64
+ "timeout": 5
65
+ }
66
+ ]
67
+ }
68
+ ]
69
+ }
70
+ }
@@ -0,0 +1,102 @@
1
+ #!/bin/bash
2
+ # Sisyphus Keyword Detector Hook
3
+ # Detects ultrawork/ultrathink/search/analyze keywords and injects enhanced mode messages
4
+ # Also activates persistent ultrawork state when ultrawork keyword is detected
5
+
6
+ # Read stdin (JSON input from Claude Code)
7
+ INPUT=$(cat)
8
+
9
+ # Extract directory from input
10
+ DIRECTORY=""
11
+ if command -v jq &> /dev/null; then
12
+ DIRECTORY=$(echo "$INPUT" | jq -r '.directory // ""' 2>/dev/null)
13
+ fi
14
+ if [ -z "$DIRECTORY" ] || [ "$DIRECTORY" = "null" ]; then
15
+ DIRECTORY=$(pwd)
16
+ fi
17
+
18
+ # Extract the prompt text - try multiple JSON paths
19
+ PROMPT=""
20
+ if command -v jq &> /dev/null; then
21
+ # Try to extract from various possible JSON structures
22
+ PROMPT=$(echo "$INPUT" | jq -r '
23
+ if .prompt then .prompt
24
+ elif .message.content then .message.content
25
+ elif .parts then ([.parts[] | select(.type == "text") | .text] | join(" "))
26
+ else ""
27
+ end
28
+ ' 2>/dev/null)
29
+ fi
30
+
31
+ # Fallback: simple grep extraction if jq fails
32
+ if [ -z "$PROMPT" ] || [ "$PROMPT" = "null" ]; then
33
+ PROMPT=$(echo "$INPUT" | grep -oP '"(prompt|content|text)"\s*:\s*"\K[^"]+' | head -1)
34
+ fi
35
+
36
+ # Exit if no prompt found
37
+ if [ -z "$PROMPT" ]; then
38
+ echo '{"continue": true}'
39
+ exit 0
40
+ fi
41
+
42
+ # Remove code blocks before checking keywords (prevents false positives)
43
+ PROMPT_NO_CODE=$(echo "$PROMPT" | sed 's/```[^`]*```//g' | sed 's/`[^`]*`//g')
44
+
45
+ # Convert to lowercase for case-insensitive matching
46
+ PROMPT_LOWER=$(echo "$PROMPT_NO_CODE" | tr '[:upper:]' '[:lower:]')
47
+
48
+ # Check for ultrawork keywords (highest priority)
49
+ if echo "$PROMPT_LOWER" | grep -qE '\b(ultrawork|ulw|uw)\b'; then
50
+ # Create persistent ultrawork state
51
+ mkdir -p "$DIRECTORY/.sisyphus" 2>/dev/null
52
+ mkdir -p "$HOME/.claude" 2>/dev/null
53
+
54
+ # Escape prompt for JSON
55
+ PROMPT_ESCAPED=$(echo "$PROMPT" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | tr '\n' ' ')
56
+
57
+ STATE_JSON="{
58
+ \"active\": true,
59
+ \"started_at\": \"$(date -Iseconds)\",
60
+ \"original_prompt\": \"$PROMPT_ESCAPED\",
61
+ \"reinforcement_count\": 0,
62
+ \"last_checked_at\": \"$(date -Iseconds)\"
63
+ }"
64
+
65
+ # Write state to both local and global locations
66
+ echo "$STATE_JSON" > "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null
67
+ echo "$STATE_JSON" > "$HOME/.claude/ultrawork-state.json" 2>/dev/null
68
+
69
+ # Return ultrawork mode injection
70
+ cat << 'EOF'
71
+ {"continue": true, "message": "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Ultrathink before acting.\n\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS TO THEIR FULLEST POTENTIAL.\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\n\n## AGENT UTILIZATION PRINCIPLES\n- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS\n- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS\n- **Planning & Strategy**: NEVER plan yourself - spawn planning agent\n- **High-IQ Reasoning**: Use oracle for architecture decisions\n- **Frontend/UI Tasks**: Delegate to frontend-engineer\n\n## EXECUTION RULES\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY.\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially.\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent).\n- **VERIFY**: Check ALL requirements met before done.\n- **DELEGATE**: Orchestrate specialized agents.\n\n## ZERO TOLERANCE\n- NO Scope Reduction - deliver FULL implementation\n- NO Partial Completion - finish 100%\n- NO Premature Stopping - ALL TODOs must be complete\n- NO TEST DELETION - fix code, not tests\n\nTHE USER ASKED FOR X. DELIVER EXACTLY X.\n\n</ultrawork-mode>\n\n---\n"}
72
+ EOF
73
+ exit 0
74
+ fi
75
+
76
+ # Check for ultrathink/think keywords
77
+ if echo "$PROMPT_LOWER" | grep -qE '\b(ultrathink|think)\b'; then
78
+ cat << 'EOF'
79
+ {"continue": true, "message": "<think-mode>\n\n**ULTRATHINK MODE ENABLED** - Extended reasoning activated.\n\nYou are now in deep thinking mode. Take your time to:\n1. Thoroughly analyze the problem from multiple angles\n2. Consider edge cases and potential issues\n3. Think through the implications of each approach\n4. Reason step-by-step before acting\n\nUse your extended thinking capabilities to provide the most thorough and well-reasoned response.\n\n</think-mode>\n\n---\n"}
80
+ EOF
81
+ exit 0
82
+ fi
83
+
84
+ # Check for search keywords (EN + multilingual)
85
+ if echo "$PROMPT_LOWER" | grep -qE '\b(search|find|locate|lookup|explore|discover|scan|grep|query|browse|detect|trace|seek|track|pinpoint|hunt)\b|where\s+is|show\s+me|list\s+all'; then
86
+ cat << 'EOF'
87
+ {"continue": true, "message": "<search-mode>\nMAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:\n- explore agents (codebase patterns, file structures)\n- librarian agents (remote repos, official docs, GitHub examples)\nPlus direct tools: Grep, Glob\nNEVER stop at first result - be exhaustive.\n</search-mode>\n\n---\n"}
88
+ EOF
89
+ exit 0
90
+ fi
91
+
92
+ # Check for analyze keywords
93
+ if echo "$PROMPT_LOWER" | grep -qE '\b(analyze|analyse|investigate|examine|research|study|deep.?dive|inspect|audit|evaluate|assess|review|diagnose|scrutinize|dissect|debug|comprehend|interpret|breakdown|understand)\b|why\s+is|how\s+does|how\s+to'; then
94
+ cat << 'EOF'
95
+ {"continue": true, "message": "<analyze-mode>\nANALYSIS MODE. Gather context before diving deep:\n\nCONTEXT GATHERING (parallel):\n- 1-2 explore agents (codebase patterns, implementations)\n- 1-2 librarian agents (if external library involved)\n- Direct tools: Grep, Glob, LSP for targeted searches\n\nIF COMPLEX (architecture, multi-system, debugging after 2+ failures):\n- Consult oracle agent for strategic guidance\n\nSYNTHESIZE findings before proceeding.\n</analyze-mode>\n\n---\n"}
96
+ EOF
97
+ exit 0
98
+ fi
99
+
100
+ # No keywords detected - continue without modification
101
+ echo '{"continue": true}'
102
+ exit 0
@@ -0,0 +1,172 @@
1
+ #!/bin/bash
2
+ # Sisyphus Persistent Mode Hook
3
+ # Unified handler for ultrawork, ralph-loop, and todo continuation
4
+ # Prevents stopping when work remains incomplete
5
+
6
+ # Read stdin
7
+ INPUT=$(cat)
8
+
9
+ # Get session ID and directory
10
+ SESSION_ID=""
11
+ DIRECTORY=""
12
+ if command -v jq &> /dev/null; then
13
+ SESSION_ID=$(echo "$INPUT" | jq -r '.sessionId // .session_id // ""' 2>/dev/null)
14
+ DIRECTORY=$(echo "$INPUT" | jq -r '.directory // ""' 2>/dev/null)
15
+ fi
16
+
17
+ # Default to current directory
18
+ if [ -z "$DIRECTORY" ]; then
19
+ DIRECTORY=$(pwd)
20
+ fi
21
+
22
+ # Check for active ultrawork state
23
+ ULTRAWORK_STATE=""
24
+ if [ -f "$DIRECTORY/.omc/ultrawork-state.json" ]; then
25
+ ULTRAWORK_STATE=$(cat "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null)
26
+ elif [ -f "$HOME/.claude/ultrawork-state.json" ]; then
27
+ ULTRAWORK_STATE=$(cat "$HOME/.claude/ultrawork-state.json" 2>/dev/null)
28
+ fi
29
+
30
+ # Check for active ralph loop
31
+ RALPH_STATE=""
32
+ if [ -f "$DIRECTORY/.omc/ralph-state.json" ]; then
33
+ RALPH_STATE=$(cat "$DIRECTORY/.omc/ralph-state.json" 2>/dev/null)
34
+ fi
35
+
36
+ # Check for verification state (oracle verification)
37
+ VERIFICATION_STATE=""
38
+ if [ -f "$DIRECTORY/.omc/ralph-verification.json" ]; then
39
+ VERIFICATION_STATE=$(cat "$DIRECTORY/.omc/ralph-verification.json" 2>/dev/null)
40
+ fi
41
+
42
+ # Check for incomplete todos
43
+ INCOMPLETE_COUNT=0
44
+ TODOS_DIR="$HOME/.claude/todos"
45
+ if [ -d "$TODOS_DIR" ]; then
46
+ for todo_file in "$TODOS_DIR"/*.json; do
47
+ if [ -f "$todo_file" ]; then
48
+ if command -v jq &> /dev/null; then
49
+ COUNT=$(jq '[.[] | select(.status != "completed" and .status != "cancelled")] | length' "$todo_file" 2>/dev/null || echo "0")
50
+ INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))
51
+ else
52
+ # Fallback: count "pending" or "in_progress" occurrences
53
+ COUNT=$(grep -c '"status"[[:space:]]*:[[:space:]]*"pending\|in_progress"' "$todo_file" 2>/dev/null) || COUNT=0
54
+ INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))
55
+ fi
56
+ fi
57
+ done
58
+ fi
59
+
60
+ # Check project todos as well
61
+ for todo_path in "$DIRECTORY/.omc/todos.json" "$DIRECTORY/.claude/todos.json"; do
62
+ if [ -f "$todo_path" ]; then
63
+ if command -v jq &> /dev/null; then
64
+ COUNT=$(jq 'if type == "array" then [.[] | select(.status != "completed" and .status != "cancelled")] | length else 0 end' "$todo_path" 2>/dev/null || echo "0")
65
+ INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))
66
+ else
67
+ # Fallback: count "pending" or "in_progress" occurrences
68
+ COUNT=$(grep -c '"status"[[:space:]]*:[[:space:]]*"pending\|in_progress"' "$todo_path" 2>/dev/null) || COUNT=0
69
+ INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))
70
+ fi
71
+ fi
72
+ done
73
+
74
+ # Priority 1: Ralph Loop with Oracle Verification
75
+ if [ -n "$RALPH_STATE" ]; then
76
+ IS_ACTIVE=$(echo "$RALPH_STATE" | jq -r '.active // false' 2>/dev/null)
77
+ if [ "$IS_ACTIVE" = "true" ]; then
78
+ ITERATION=$(echo "$RALPH_STATE" | jq -r '.iteration // 1' 2>/dev/null)
79
+ MAX_ITER=$(echo "$RALPH_STATE" | jq -r '.max_iterations // 10' 2>/dev/null)
80
+ PROMISE=$(echo "$RALPH_STATE" | jq -r '.completion_promise // "TASK_COMPLETE"' 2>/dev/null)
81
+ PROMPT=$(echo "$RALPH_STATE" | jq -r '.prompt // ""' 2>/dev/null)
82
+
83
+ # Check if oracle verification is pending
84
+ if [ -n "$VERIFICATION_STATE" ]; then
85
+ IS_PENDING=$(echo "$VERIFICATION_STATE" | jq -r '.pending // false' 2>/dev/null)
86
+ if [ "$IS_PENDING" = "true" ]; then
87
+ ATTEMPT=$(echo "$VERIFICATION_STATE" | jq -r '.verification_attempts // 0' 2>/dev/null)
88
+ MAX_ATTEMPTS=$(echo "$VERIFICATION_STATE" | jq -r '.max_verification_attempts // 3' 2>/dev/null)
89
+ ORIGINAL_TASK=$(echo "$VERIFICATION_STATE" | jq -r '.original_task // ""' 2>/dev/null)
90
+ COMPLETION_CLAIM=$(echo "$VERIFICATION_STATE" | jq -r '.completion_claim // ""' 2>/dev/null)
91
+ ORACLE_FEEDBACK=$(echo "$VERIFICATION_STATE" | jq -r '.oracle_feedback // ""' 2>/dev/null)
92
+ NEXT_ATTEMPT=$((ATTEMPT + 1))
93
+
94
+ FEEDBACK_SECTION=""
95
+ if [ -n "$ORACLE_FEEDBACK" ] && [ "$ORACLE_FEEDBACK" != "null" ]; then
96
+ FEEDBACK_SECTION="\n**Previous Oracle Feedback (rejected):**\n$ORACLE_FEEDBACK\n"
97
+ fi
98
+
99
+ cat << EOF
100
+ {"continue": false, "reason": "<ralph-verification>\n\n[ORACLE VERIFICATION REQUIRED - Attempt $NEXT_ATTEMPT/$MAX_ATTEMPTS]\n\nThe agent claims the task is complete. Before accepting, YOU MUST verify with Oracle.\n\n**Original Task:**\n$ORIGINAL_TASK\n\n**Completion Claim:**\n$COMPLETION_CLAIM\n$FEEDBACK_SECTION\n## MANDATORY VERIFICATION STEPS\n\n1. **Spawn Oracle Agent** for verification:\n \`\`\`\n Task(subagent_type=\"oracle\", prompt=\"Verify this task completion claim...\")\n \`\`\`\n\n2. **Oracle must check:**\n - Are ALL requirements from the original task met?\n - Is the implementation complete, not partial?\n - Are there any obvious bugs or issues?\n - Does the code compile/run without errors?\n - Are tests passing (if applicable)?\n\n3. **Based on Oracle's response:**\n - If APPROVED: Output \`<oracle-approved>VERIFIED_COMPLETE</oracle-approved>\`\n - If REJECTED: Continue working on the identified issues\n\nDO NOT output the completion promise again until Oracle approves.\n\n</ralph-verification>\n\n---\n"}
101
+ EOF
102
+ exit 0
103
+ fi
104
+ fi
105
+
106
+ if [ "$ITERATION" -lt "$MAX_ITER" ]; then
107
+ # Increment iteration
108
+ NEW_ITER=$((ITERATION + 1))
109
+ echo "$RALPH_STATE" | jq ".iteration = $NEW_ITER" > "$DIRECTORY/.omc/ralph-state.json" 2>/dev/null
110
+
111
+ cat << EOF
112
+ {"continue": false, "reason": "<ralph-loop-continuation>\n\n[RALPH LOOP - ITERATION $NEW_ITER/$MAX_ITER]\n\nYour previous attempt did not output the completion promise. The work is NOT done yet.\n\nCRITICAL INSTRUCTIONS:\n1. Review your progress and the original task\n2. Check your todo list - are ALL items marked complete?\n3. Continue from where you left off\n4. When FULLY complete, output: <promise>$PROMISE</promise>\n5. Do NOT stop until the task is truly done\n\nOriginal task: $PROMPT\n\n</ralph-loop-continuation>\n\n---\n"}
113
+ EOF
114
+ exit 0
115
+ fi
116
+ fi
117
+ fi
118
+
119
+ # Priority 2: Ultrawork Mode with incomplete todos
120
+ if [ -n "$ULTRAWORK_STATE" ] && [ "$INCOMPLETE_COUNT" -gt 0 ]; then
121
+ # Check if active (with jq fallback)
122
+ IS_ACTIVE=""
123
+ if command -v jq &> /dev/null; then
124
+ IS_ACTIVE=$(echo "$ULTRAWORK_STATE" | jq -r '.active // false' 2>/dev/null)
125
+ else
126
+ # Fallback: grep for "active": true
127
+ if echo "$ULTRAWORK_STATE" | grep -q '"active"[[:space:]]*:[[:space:]]*true'; then
128
+ IS_ACTIVE="true"
129
+ fi
130
+ fi
131
+
132
+ if [ "$IS_ACTIVE" = "true" ]; then
133
+ # Get reinforcement count (with fallback)
134
+ REINFORCE_COUNT=0
135
+ if command -v jq &> /dev/null; then
136
+ REINFORCE_COUNT=$(echo "$ULTRAWORK_STATE" | jq -r '.reinforcement_count // 0' 2>/dev/null)
137
+ else
138
+ REINFORCE_COUNT=$(echo "$ULTRAWORK_STATE" | grep -oP '"reinforcement_count"[[:space:]]*:[[:space:]]*\K[0-9]+' 2>/dev/null) || REINFORCE_COUNT=0
139
+ fi
140
+ NEW_COUNT=$((REINFORCE_COUNT + 1))
141
+
142
+ # Get original prompt (with fallback)
143
+ ORIGINAL_PROMPT=""
144
+ if command -v jq &> /dev/null; then
145
+ ORIGINAL_PROMPT=$(echo "$ULTRAWORK_STATE" | jq -r '.original_prompt // ""' 2>/dev/null)
146
+ else
147
+ ORIGINAL_PROMPT=$(echo "$ULTRAWORK_STATE" | grep -oP '"original_prompt"[[:space:]]*:[[:space:]]*"\K[^"]+' 2>/dev/null) || ORIGINAL_PROMPT=""
148
+ fi
149
+
150
+ # Update state file (best effort)
151
+ if command -v jq &> /dev/null; then
152
+ echo "$ULTRAWORK_STATE" | jq ".reinforcement_count = $NEW_COUNT | .last_checked_at = \"$(date -Iseconds)\"" > "$DIRECTORY/.omc/ultrawork-state.json" 2>/dev/null
153
+ fi
154
+
155
+ cat << EOF
156
+ {"continue": false, "reason": "<ultrawork-persistence>\n\n[ULTRAWORK MODE STILL ACTIVE - Reinforcement #$NEW_COUNT]\n\nYour ultrawork session is NOT complete. $INCOMPLETE_COUNT incomplete todos remain.\n\nREMEMBER THE ULTRAWORK RULES:\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent)\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each\n- **VERIFY**: Check ALL requirements met before done\n- **NO Premature Stopping**: ALL TODOs must be complete\n\nContinue working on the next pending task. DO NOT STOP until all tasks are marked complete.\n\nOriginal task: $ORIGINAL_PROMPT\n\n</ultrawork-persistence>\n\n---\n"}
157
+ EOF
158
+ exit 0
159
+ fi
160
+ fi
161
+
162
+ # Priority 3: Todo Continuation (baseline)
163
+ if [ "$INCOMPLETE_COUNT" -gt 0 ]; then
164
+ cat << EOF
165
+ {"continue": false, "reason": "<todo-continuation>\n\n[SYSTEM REMINDER - TODO CONTINUATION]\n\nIncomplete tasks remain in your todo list ($INCOMPLETE_COUNT remaining). Continue working on the next pending task.\n\n- Proceed without asking for permission\n- Mark each task complete when finished\n- Do not stop until all tasks are done\n\n</todo-continuation>\n\n---\n"}
166
+ EOF
167
+ exit 0
168
+ fi
169
+
170
+ # No blocking needed
171
+ echo '{"continue": true}'
172
+ exit 0