oh-my-claude-sisyphus 3.6.0 → 3.6.1

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 (314) hide show
  1. package/commands/omc-setup.md +3 -3
  2. package/commands/release.md +1 -1
  3. package/dist/__tests__/analytics/transcript-scanner.test.js +69 -27
  4. package/dist/__tests__/analytics/transcript-scanner.test.js.map +1 -1
  5. package/dist/__tests__/installer.test.js +2 -1
  6. package/dist/__tests__/installer.test.js.map +1 -1
  7. package/dist/analytics/session-manager.d.ts +24 -0
  8. package/dist/analytics/session-manager.d.ts.map +1 -1
  9. package/dist/analytics/session-manager.js +98 -9
  10. package/dist/analytics/session-manager.js.map +1 -1
  11. package/dist/analytics/transcript-scanner.d.ts +9 -8
  12. package/dist/analytics/transcript-scanner.d.ts.map +1 -1
  13. package/dist/analytics/transcript-scanner.js +146 -16
  14. package/dist/analytics/transcript-scanner.js.map +1 -1
  15. package/dist/cli/analytics.js +0 -0
  16. package/dist/cli/index.js +0 -0
  17. package/dist/hooks/empty-message-sanitizer/__tests__/index.test.d.ts +2 -0
  18. package/dist/hooks/empty-message-sanitizer/__tests__/index.test.d.ts.map +1 -0
  19. package/dist/hooks/empty-message-sanitizer/__tests__/index.test.js +416 -0
  20. package/dist/hooks/empty-message-sanitizer/__tests__/index.test.js.map +1 -0
  21. package/dist/hooks/keyword-detector/__tests__/index.test.d.ts +2 -0
  22. package/dist/hooks/keyword-detector/__tests__/index.test.d.ts.map +1 -0
  23. package/dist/hooks/keyword-detector/__tests__/index.test.js +427 -0
  24. package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -0
  25. package/dist/hooks/think-mode/__tests__/index.test.d.ts +2 -0
  26. package/dist/hooks/think-mode/__tests__/index.test.d.ts.map +1 -0
  27. package/dist/hooks/think-mode/__tests__/index.test.js +556 -0
  28. package/dist/hooks/think-mode/__tests__/index.test.js.map +1 -0
  29. package/dist/installer/index.d.ts.map +1 -1
  30. package/dist/installer/index.js +8 -0
  31. package/dist/installer/index.js.map +1 -1
  32. package/package.json +1 -1
  33. package/skills/omc-setup/SKILL.md +27 -3
  34. package/skills/release/SKILL.md +1 -1
  35. package/dist/__tests__/analytics/analytics-summary.test.d.ts +0 -2
  36. package/dist/__tests__/analytics/analytics-summary.test.d.ts.map +0 -1
  37. package/dist/__tests__/analytics/analytics-summary.test.js +0 -267
  38. package/dist/__tests__/analytics/analytics-summary.test.js.map +0 -1
  39. package/dist/__tests__/analytics/cost-estimator.test.d.ts +0 -2
  40. package/dist/__tests__/analytics/cost-estimator.test.d.ts.map +0 -1
  41. package/dist/__tests__/analytics/cost-estimator.test.js +0 -212
  42. package/dist/__tests__/analytics/cost-estimator.test.js.map +0 -1
  43. package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts +0 -7
  44. package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts.map +0 -1
  45. package/dist/__tests__/hooks/auto-slash-command/executor.test.js +0 -374
  46. package/dist/__tests__/hooks/auto-slash-command/executor.test.js.map +0 -1
  47. package/dist/__tests__/hud/auto-tracking.integration.test.d.ts +0 -2
  48. package/dist/__tests__/hud/auto-tracking.integration.test.d.ts.map +0 -1
  49. package/dist/__tests__/hud/auto-tracking.integration.test.js +0 -12
  50. package/dist/__tests__/hud/auto-tracking.integration.test.js.map +0 -1
  51. package/dist/__tests__/learned-skills/config.test.d.ts +0 -2
  52. package/dist/__tests__/learned-skills/config.test.d.ts.map +0 -1
  53. package/dist/__tests__/learned-skills/config.test.js +0 -37
  54. package/dist/__tests__/learned-skills/config.test.js.map +0 -1
  55. package/dist/__tests__/learned-skills/detector.test.d.ts +0 -2
  56. package/dist/__tests__/learned-skills/detector.test.d.ts.map +0 -1
  57. package/dist/__tests__/learned-skills/detector.test.js +0 -99
  58. package/dist/__tests__/learned-skills/detector.test.js.map +0 -1
  59. package/dist/__tests__/learned-skills/finder.test.d.ts +0 -2
  60. package/dist/__tests__/learned-skills/finder.test.d.ts.map +0 -1
  61. package/dist/__tests__/learned-skills/finder.test.js +0 -59
  62. package/dist/__tests__/learned-skills/finder.test.js.map +0 -1
  63. package/dist/__tests__/learned-skills/loader.test.d.ts +0 -2
  64. package/dist/__tests__/learned-skills/loader.test.d.ts.map +0 -1
  65. package/dist/__tests__/learned-skills/loader.test.js +0 -69
  66. package/dist/__tests__/learned-skills/loader.test.js.map +0 -1
  67. package/dist/__tests__/learned-skills/parser.test.d.ts +0 -2
  68. package/dist/__tests__/learned-skills/parser.test.d.ts.map +0 -1
  69. package/dist/__tests__/learned-skills/parser.test.js +0 -81
  70. package/dist/__tests__/learned-skills/parser.test.js.map +0 -1
  71. package/dist/__tests__/learned-skills/validator.test.d.ts +0 -2
  72. package/dist/__tests__/learned-skills/validator.test.d.ts.map +0 -1
  73. package/dist/__tests__/learned-skills/validator.test.js +0 -85
  74. package/dist/__tests__/learned-skills/validator.test.js.map +0 -1
  75. package/dist/agents/codex-agents.d.ts +0 -20
  76. package/dist/agents/codex-agents.d.ts.map +0 -1
  77. package/dist/agents/codex-agents.js +0 -36
  78. package/dist/agents/codex-agents.js.map +0 -1
  79. package/dist/agents/document-writer.d.ts +0 -11
  80. package/dist/agents/document-writer.d.ts.map +0 -1
  81. package/dist/agents/document-writer.js +0 -209
  82. package/dist/agents/document-writer.js.map +0 -1
  83. package/dist/agents/frontend-engineer.d.ts +0 -11
  84. package/dist/agents/frontend-engineer.d.ts.map +0 -1
  85. package/dist/agents/frontend-engineer.js +0 -115
  86. package/dist/agents/frontend-engineer.js.map +0 -1
  87. package/dist/agents/librarian.d.ts +0 -12
  88. package/dist/agents/librarian.d.ts.map +0 -1
  89. package/dist/agents/librarian.js +0 -103
  90. package/dist/agents/librarian.js.map +0 -1
  91. package/dist/agents/metis.d.ts +0 -12
  92. package/dist/agents/metis.d.ts.map +0 -1
  93. package/dist/agents/metis.js +0 -117
  94. package/dist/agents/metis.js.map +0 -1
  95. package/dist/agents/momus.d.ts +0 -12
  96. package/dist/agents/momus.d.ts.map +0 -1
  97. package/dist/agents/momus.js +0 -128
  98. package/dist/agents/momus.js.map +0 -1
  99. package/dist/agents/multimodal-looker.d.ts +0 -11
  100. package/dist/agents/multimodal-looker.d.ts.map +0 -1
  101. package/dist/agents/multimodal-looker.js +0 -70
  102. package/dist/agents/multimodal-looker.js.map +0 -1
  103. package/dist/agents/oracle.d.ts +0 -13
  104. package/dist/agents/oracle.d.ts.map +0 -1
  105. package/dist/agents/oracle.js +0 -191
  106. package/dist/agents/oracle.js.map +0 -1
  107. package/dist/agents/orchestrator-sisyphus.d.ts +0 -11
  108. package/dist/agents/orchestrator-sisyphus.d.ts.map +0 -1
  109. package/dist/agents/orchestrator-sisyphus.js +0 -115
  110. package/dist/agents/orchestrator-sisyphus.js.map +0 -1
  111. package/dist/agents/prometheus.d.ts +0 -12
  112. package/dist/agents/prometheus.d.ts.map +0 -1
  113. package/dist/agents/prometheus.js +0 -195
  114. package/dist/agents/prometheus.js.map +0 -1
  115. package/dist/agents/sisyphus-junior.d.ts +0 -12
  116. package/dist/agents/sisyphus-junior.d.ts.map +0 -1
  117. package/dist/agents/sisyphus-junior.js +0 -93
  118. package/dist/agents/sisyphus-junior.js.map +0 -1
  119. package/dist/cli/components/CostDashboard.d.ts +0 -15
  120. package/dist/cli/components/CostDashboard.d.ts.map +0 -1
  121. package/dist/cli/components/CostDashboard.js +0 -15
  122. package/dist/cli/components/CostDashboard.js.map +0 -1
  123. package/dist/cli/components/LiveStats.d.ts +0 -16
  124. package/dist/cli/components/LiveStats.d.ts.map +0 -1
  125. package/dist/cli/components/LiveStats.js +0 -16
  126. package/dist/cli/components/LiveStats.js.map +0 -1
  127. package/dist/cli/components/SessionBrowser.d.ts +0 -14
  128. package/dist/cli/components/SessionBrowser.d.ts.map +0 -1
  129. package/dist/cli/components/SessionBrowser.js +0 -14
  130. package/dist/cli/components/SessionBrowser.js.map +0 -1
  131. package/dist/cli/tui.d.ts +0 -21
  132. package/dist/cli/tui.d.ts.map +0 -1
  133. package/dist/cli/tui.js +0 -21
  134. package/dist/cli/tui.js.map +0 -1
  135. package/dist/hooks/autopilot/signals.d.ts +0 -20
  136. package/dist/hooks/autopilot/signals.d.ts.map +0 -1
  137. package/dist/hooks/autopilot/signals.js +0 -75
  138. package/dist/hooks/autopilot/signals.js.map +0 -1
  139. package/dist/hooks/autopilot/summary.d.ts +0 -27
  140. package/dist/hooks/autopilot/summary.d.ts.map +0 -1
  141. package/dist/hooks/autopilot/summary.js +0 -160
  142. package/dist/hooks/autopilot/summary.js.map +0 -1
  143. package/dist/hooks/autopilot/transition.d.ts +0 -39
  144. package/dist/hooks/autopilot/transition.d.ts.map +0 -1
  145. package/dist/hooks/autopilot/transition.js +0 -216
  146. package/dist/hooks/autopilot/transition.js.map +0 -1
  147. package/dist/hooks/context-window-limit-recovery/constants.d.ts +0 -28
  148. package/dist/hooks/context-window-limit-recovery/constants.d.ts.map +0 -1
  149. package/dist/hooks/context-window-limit-recovery/constants.js +0 -85
  150. package/dist/hooks/context-window-limit-recovery/constants.js.map +0 -1
  151. package/dist/hooks/context-window-limit-recovery/index.d.ts +0 -62
  152. package/dist/hooks/context-window-limit-recovery/index.d.ts.map +0 -1
  153. package/dist/hooks/context-window-limit-recovery/index.js +0 -201
  154. package/dist/hooks/context-window-limit-recovery/index.js.map +0 -1
  155. package/dist/hooks/context-window-limit-recovery/parser.d.ts +0 -31
  156. package/dist/hooks/context-window-limit-recovery/parser.d.ts.map +0 -1
  157. package/dist/hooks/context-window-limit-recovery/parser.js +0 -241
  158. package/dist/hooks/context-window-limit-recovery/parser.js.map +0 -1
  159. package/dist/hooks/context-window-limit-recovery/types.d.ts +0 -84
  160. package/dist/hooks/context-window-limit-recovery/types.d.ts.map +0 -1
  161. package/dist/hooks/context-window-limit-recovery/types.js +0 -34
  162. package/dist/hooks/context-window-limit-recovery/types.js.map +0 -1
  163. package/dist/hooks/edit-error-recovery/index.d.ts +0 -62
  164. package/dist/hooks/edit-error-recovery/index.d.ts.map +0 -1
  165. package/dist/hooks/edit-error-recovery/index.js +0 -89
  166. package/dist/hooks/edit-error-recovery/index.js.map +0 -1
  167. package/dist/hooks/learned-skills/config.d.ts +0 -53
  168. package/dist/hooks/learned-skills/config.d.ts.map +0 -1
  169. package/dist/hooks/learned-skills/config.js +0 -103
  170. package/dist/hooks/learned-skills/config.js.map +0 -1
  171. package/dist/hooks/learned-skills/constants.d.ts +0 -24
  172. package/dist/hooks/learned-skills/constants.d.ts.map +0 -1
  173. package/dist/hooks/learned-skills/constants.js +0 -26
  174. package/dist/hooks/learned-skills/constants.js.map +0 -1
  175. package/dist/hooks/learned-skills/detection-hook.d.ts +0 -39
  176. package/dist/hooks/learned-skills/detection-hook.d.ts.map +0 -1
  177. package/dist/hooks/learned-skills/detection-hook.js +0 -83
  178. package/dist/hooks/learned-skills/detection-hook.js.map +0 -1
  179. package/dist/hooks/learned-skills/detector.d.ts +0 -30
  180. package/dist/hooks/learned-skills/detector.d.ts.map +0 -1
  181. package/dist/hooks/learned-skills/detector.js +0 -150
  182. package/dist/hooks/learned-skills/detector.js.map +0 -1
  183. package/dist/hooks/learned-skills/finder.d.ts +0 -21
  184. package/dist/hooks/learned-skills/finder.d.ts.map +0 -1
  185. package/dist/hooks/learned-skills/finder.js +0 -117
  186. package/dist/hooks/learned-skills/finder.js.map +0 -1
  187. package/dist/hooks/learned-skills/index.d.ts +0 -62
  188. package/dist/hooks/learned-skills/index.d.ts.map +0 -1
  189. package/dist/hooks/learned-skills/index.js +0 -137
  190. package/dist/hooks/learned-skills/index.js.map +0 -1
  191. package/dist/hooks/learned-skills/loader.d.ts +0 -20
  192. package/dist/hooks/learned-skills/loader.d.ts.map +0 -1
  193. package/dist/hooks/learned-skills/loader.js +0 -107
  194. package/dist/hooks/learned-skills/loader.js.map +0 -1
  195. package/dist/hooks/learned-skills/parser.d.ts +0 -21
  196. package/dist/hooks/learned-skills/parser.d.ts.map +0 -1
  197. package/dist/hooks/learned-skills/parser.js +0 -190
  198. package/dist/hooks/learned-skills/parser.js.map +0 -1
  199. package/dist/hooks/learned-skills/promotion.d.ts +0 -29
  200. package/dist/hooks/learned-skills/promotion.d.ts.map +0 -1
  201. package/dist/hooks/learned-skills/promotion.js +0 -87
  202. package/dist/hooks/learned-skills/promotion.js.map +0 -1
  203. package/dist/hooks/learned-skills/types.d.ts +0 -109
  204. package/dist/hooks/learned-skills/types.d.ts.map +0 -1
  205. package/dist/hooks/learned-skills/types.js +0 -8
  206. package/dist/hooks/learned-skills/types.js.map +0 -1
  207. package/dist/hooks/learned-skills/validator.d.ts +0 -15
  208. package/dist/hooks/learned-skills/validator.d.ts.map +0 -1
  209. package/dist/hooks/learned-skills/validator.js +0 -87
  210. package/dist/hooks/learned-skills/validator.js.map +0 -1
  211. package/dist/hooks/learned-skills/writer.d.ts +0 -27
  212. package/dist/hooks/learned-skills/writer.d.ts.map +0 -1
  213. package/dist/hooks/learned-skills/writer.js +0 -126
  214. package/dist/hooks/learned-skills/writer.js.map +0 -1
  215. package/dist/hooks/mnemosyne/config.d.ts +0 -53
  216. package/dist/hooks/mnemosyne/config.d.ts.map +0 -1
  217. package/dist/hooks/mnemosyne/config.js +0 -103
  218. package/dist/hooks/mnemosyne/config.js.map +0 -1
  219. package/dist/hooks/mnemosyne/constants.d.ts +0 -24
  220. package/dist/hooks/mnemosyne/constants.d.ts.map +0 -1
  221. package/dist/hooks/mnemosyne/constants.js +0 -26
  222. package/dist/hooks/mnemosyne/constants.js.map +0 -1
  223. package/dist/hooks/mnemosyne/detection-hook.d.ts +0 -39
  224. package/dist/hooks/mnemosyne/detection-hook.d.ts.map +0 -1
  225. package/dist/hooks/mnemosyne/detection-hook.js +0 -83
  226. package/dist/hooks/mnemosyne/detection-hook.js.map +0 -1
  227. package/dist/hooks/mnemosyne/detector.d.ts +0 -30
  228. package/dist/hooks/mnemosyne/detector.d.ts.map +0 -1
  229. package/dist/hooks/mnemosyne/detector.js +0 -150
  230. package/dist/hooks/mnemosyne/detector.js.map +0 -1
  231. package/dist/hooks/mnemosyne/finder.d.ts +0 -21
  232. package/dist/hooks/mnemosyne/finder.d.ts.map +0 -1
  233. package/dist/hooks/mnemosyne/finder.js +0 -117
  234. package/dist/hooks/mnemosyne/finder.js.map +0 -1
  235. package/dist/hooks/mnemosyne/index.d.ts +0 -62
  236. package/dist/hooks/mnemosyne/index.d.ts.map +0 -1
  237. package/dist/hooks/mnemosyne/index.js +0 -137
  238. package/dist/hooks/mnemosyne/index.js.map +0 -1
  239. package/dist/hooks/mnemosyne/loader.d.ts +0 -20
  240. package/dist/hooks/mnemosyne/loader.d.ts.map +0 -1
  241. package/dist/hooks/mnemosyne/loader.js +0 -113
  242. package/dist/hooks/mnemosyne/loader.js.map +0 -1
  243. package/dist/hooks/mnemosyne/parser.d.ts +0 -21
  244. package/dist/hooks/mnemosyne/parser.d.ts.map +0 -1
  245. package/dist/hooks/mnemosyne/parser.js +0 -190
  246. package/dist/hooks/mnemosyne/parser.js.map +0 -1
  247. package/dist/hooks/mnemosyne/promotion.d.ts +0 -29
  248. package/dist/hooks/mnemosyne/promotion.d.ts.map +0 -1
  249. package/dist/hooks/mnemosyne/promotion.js +0 -87
  250. package/dist/hooks/mnemosyne/promotion.js.map +0 -1
  251. package/dist/hooks/mnemosyne/types.d.ts +0 -109
  252. package/dist/hooks/mnemosyne/types.d.ts.map +0 -1
  253. package/dist/hooks/mnemosyne/types.js +0 -8
  254. package/dist/hooks/mnemosyne/types.js.map +0 -1
  255. package/dist/hooks/mnemosyne/validator.d.ts +0 -15
  256. package/dist/hooks/mnemosyne/validator.d.ts.map +0 -1
  257. package/dist/hooks/mnemosyne/validator.js +0 -87
  258. package/dist/hooks/mnemosyne/validator.js.map +0 -1
  259. package/dist/hooks/mnemosyne/writer.d.ts +0 -27
  260. package/dist/hooks/mnemosyne/writer.d.ts.map +0 -1
  261. package/dist/hooks/mnemosyne/writer.js +0 -126
  262. package/dist/hooks/mnemosyne/writer.js.map +0 -1
  263. package/dist/hooks/ralph-loop/index.d.ts +0 -116
  264. package/dist/hooks/ralph-loop/index.d.ts.map +0 -1
  265. package/dist/hooks/ralph-loop/index.js +0 -322
  266. package/dist/hooks/ralph-loop/index.js.map +0 -1
  267. package/dist/hooks/ralph-prd/index.d.ts +0 -130
  268. package/dist/hooks/ralph-prd/index.d.ts.map +0 -1
  269. package/dist/hooks/ralph-prd/index.js +0 -310
  270. package/dist/hooks/ralph-prd/index.js.map +0 -1
  271. package/dist/hooks/ralph-progress/index.d.ts +0 -102
  272. package/dist/hooks/ralph-progress/index.d.ts.map +0 -1
  273. package/dist/hooks/ralph-progress/index.js +0 -408
  274. package/dist/hooks/ralph-progress/index.js.map +0 -1
  275. package/dist/hooks/ralph-verifier/index.d.ts +0 -72
  276. package/dist/hooks/ralph-verifier/index.d.ts.map +0 -1
  277. package/dist/hooks/ralph-verifier/index.js +0 -223
  278. package/dist/hooks/ralph-verifier/index.js.map +0 -1
  279. package/dist/hooks/session-recovery/constants.d.ts +0 -56
  280. package/dist/hooks/session-recovery/constants.d.ts.map +0 -1
  281. package/dist/hooks/session-recovery/constants.js +0 -78
  282. package/dist/hooks/session-recovery/constants.js.map +0 -1
  283. package/dist/hooks/session-recovery/index.d.ts +0 -53
  284. package/dist/hooks/session-recovery/index.d.ts.map +0 -1
  285. package/dist/hooks/session-recovery/index.js +0 -321
  286. package/dist/hooks/session-recovery/index.js.map +0 -1
  287. package/dist/hooks/session-recovery/storage.d.ts +0 -76
  288. package/dist/hooks/session-recovery/storage.d.ts.map +0 -1
  289. package/dist/hooks/session-recovery/storage.js +0 -383
  290. package/dist/hooks/session-recovery/storage.js.map +0 -1
  291. package/dist/hooks/session-recovery/types.d.ts +0 -145
  292. package/dist/hooks/session-recovery/types.d.ts.map +0 -1
  293. package/dist/hooks/session-recovery/types.js +0 -8
  294. package/dist/hooks/session-recovery/types.js.map +0 -1
  295. package/dist/hooks/sisyphus-orchestrator/constants.d.ts +0 -23
  296. package/dist/hooks/sisyphus-orchestrator/constants.d.ts.map +0 -1
  297. package/dist/hooks/sisyphus-orchestrator/constants.js +0 -142
  298. package/dist/hooks/sisyphus-orchestrator/constants.js.map +0 -1
  299. package/dist/hooks/sisyphus-orchestrator/index.d.ts +0 -113
  300. package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +0 -1
  301. package/dist/hooks/sisyphus-orchestrator/index.js +0 -309
  302. package/dist/hooks/sisyphus-orchestrator/index.js.map +0 -1
  303. package/dist/hooks/ultraqa-loop/index.d.ts +0 -94
  304. package/dist/hooks/ultraqa-loop/index.d.ts.map +0 -1
  305. package/dist/hooks/ultraqa-loop/index.js +0 -216
  306. package/dist/hooks/ultraqa-loop/index.js.map +0 -1
  307. package/dist/hooks/ultrawork-state/index.d.ts +0 -62
  308. package/dist/hooks/ultrawork-state/index.d.ts.map +0 -1
  309. package/dist/hooks/ultrawork-state/index.js +0 -208
  310. package/dist/hooks/ultrawork-state/index.js.map +0 -1
  311. package/dist/hud/sisyphus-state.d.ts +0 -31
  312. package/dist/hud/sisyphus-state.d.ts.map +0 -1
  313. package/dist/hud/sisyphus-state.js +0 -163
  314. package/dist/hud/sisyphus-state.js.map +0 -1
@@ -1,130 +0,0 @@
1
- /**
2
- * Ralph PRD (Product Requirements Document) Support
3
- *
4
- * Implements structured task tracking using prd.json format from the original Ralph.
5
- * Each user story has:
6
- * - id: Unique identifier (e.g., "US-001")
7
- * - title: Short description
8
- * - description: User story format
9
- * - acceptanceCriteria: List of criteria to pass
10
- * - priority: Execution order (1 = highest)
11
- * - passes: Boolean indicating completion
12
- * - notes: Optional notes from implementation
13
- */
14
- export interface UserStory {
15
- /** Unique identifier (e.g., "US-001") */
16
- id: string;
17
- /** Short title for the story */
18
- title: string;
19
- /** Full user story description */
20
- description: string;
21
- /** List of acceptance criteria that must be met */
22
- acceptanceCriteria: string[];
23
- /** Execution priority (1 = highest) */
24
- priority: number;
25
- /** Whether this story passes (complete and verified) */
26
- passes: boolean;
27
- /** Optional notes from implementation */
28
- notes?: string;
29
- }
30
- export interface PRD {
31
- /** Project name */
32
- project: string;
33
- /** Git branch name for this work */
34
- branchName: string;
35
- /** Overall description of the feature/task */
36
- description: string;
37
- /** List of user stories */
38
- userStories: UserStory[];
39
- }
40
- export interface PRDStatus {
41
- /** Total number of stories */
42
- total: number;
43
- /** Number of completed (passes: true) stories */
44
- completed: number;
45
- /** Number of pending (passes: false) stories */
46
- pending: number;
47
- /** Whether all stories are complete */
48
- allComplete: boolean;
49
- /** The highest priority incomplete story, if any */
50
- nextStory: UserStory | null;
51
- /** List of incomplete story IDs */
52
- incompleteIds: string[];
53
- }
54
- export declare const PRD_FILENAME = "prd.json";
55
- export declare const PRD_EXAMPLE_FILENAME = "prd.example.json";
56
- /**
57
- * Get the path to the prd.json file in a directory
58
- */
59
- export declare function getPrdPath(directory: string): string;
60
- /**
61
- * Get the path to the prd.json in .omc subdirectory
62
- */
63
- export declare function getOmcPrdPath(directory: string): string;
64
- /**
65
- * Find prd.json in a directory (checks both root and .omc)
66
- */
67
- export declare function findPrdPath(directory: string): string | null;
68
- /**
69
- * Read PRD from disk
70
- */
71
- export declare function readPrd(directory: string): PRD | null;
72
- /**
73
- * Write PRD to disk
74
- */
75
- export declare function writePrd(directory: string, prd: PRD): boolean;
76
- /**
77
- * Get the status of a PRD
78
- */
79
- export declare function getPrdStatus(prd: PRD): PRDStatus;
80
- /**
81
- * Mark a story as complete (passes: true)
82
- */
83
- export declare function markStoryComplete(directory: string, storyId: string, notes?: string): boolean;
84
- /**
85
- * Mark a story as incomplete (passes: false)
86
- */
87
- export declare function markStoryIncomplete(directory: string, storyId: string, notes?: string): boolean;
88
- /**
89
- * Get a specific story by ID
90
- */
91
- export declare function getStory(directory: string, storyId: string): UserStory | null;
92
- /**
93
- * Get the next incomplete story (highest priority)
94
- */
95
- export declare function getNextStory(directory: string): UserStory | null;
96
- /**
97
- * Input type for creating user stories (priority is optional)
98
- */
99
- export type UserStoryInput = Omit<UserStory, 'passes' | 'priority'> & {
100
- priority?: number;
101
- };
102
- /**
103
- * Create a new PRD with user stories from a task description
104
- */
105
- export declare function createPrd(project: string, branchName: string, description: string, stories: UserStoryInput[]): PRD;
106
- /**
107
- * Create a simple PRD from a task description (single story)
108
- */
109
- export declare function createSimplePrd(project: string, branchName: string, taskDescription: string): PRD;
110
- /**
111
- * Initialize a PRD in a directory
112
- */
113
- export declare function initPrd(directory: string, project: string, branchName: string, description: string, stories?: UserStoryInput[]): boolean;
114
- /**
115
- * Format PRD status as a string for display
116
- */
117
- export declare function formatPrdStatus(status: PRDStatus): string;
118
- /**
119
- * Format a story for display
120
- */
121
- export declare function formatStory(story: UserStory): string;
122
- /**
123
- * Format entire PRD for display
124
- */
125
- export declare function formatPrd(prd: PRD): string;
126
- /**
127
- * Format next story prompt for injection into ralph
128
- */
129
- export declare function formatNextStoryPrompt(story: UserStory): string;
130
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/ralph-prd/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,MAAM,WAAW,SAAS;IACxB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,MAAM,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,GAAG;IAClB,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,WAAW,EAAE,SAAS,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW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GAAG,IAAI,CAO7E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAQhE;AAMD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,GAAG,UAAU,CAAC,GAAG;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,cAAc,EAAE,GACxB,GAAG,CAWL;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,eAAe,EAAE,MAAM,GACtB,GAAG,CAeL;AAED;;GAEG;AACH,wBAAgB,OAAO,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,cAAc,EAAE,GACzB,OAAO,CAMT;AAMD;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAezD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAoBpD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAyB1C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAsB9D"}
@@ -1,310 +0,0 @@
1
- /**
2
- * Ralph PRD (Product Requirements Document) Support
3
- *
4
- * Implements structured task tracking using prd.json format from the original Ralph.
5
- * Each user story has:
6
- * - id: Unique identifier (e.g., "US-001")
7
- * - title: Short description
8
- * - description: User story format
9
- * - acceptanceCriteria: List of criteria to pass
10
- * - priority: Execution order (1 = highest)
11
- * - passes: Boolean indicating completion
12
- * - notes: Optional notes from implementation
13
- */
14
- import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
15
- import { join } from 'path';
16
- // ============================================================================
17
- // Constants
18
- // ============================================================================
19
- export const PRD_FILENAME = 'prd.json';
20
- export const PRD_EXAMPLE_FILENAME = 'prd.example.json';
21
- // ============================================================================
22
- // File Operations
23
- // ============================================================================
24
- /**
25
- * Get the path to the prd.json file in a directory
26
- */
27
- export function getPrdPath(directory) {
28
- return join(directory, PRD_FILENAME);
29
- }
30
- /**
31
- * Get the path to the prd.json in .omc subdirectory
32
- */
33
- export function getOmcPrdPath(directory) {
34
- return join(directory, '.omc', PRD_FILENAME);
35
- }
36
- /**
37
- * Find prd.json in a directory (checks both root and .omc)
38
- */
39
- export function findPrdPath(directory) {
40
- const rootPath = getPrdPath(directory);
41
- if (existsSync(rootPath)) {
42
- return rootPath;
43
- }
44
- const omcPath = getOmcPrdPath(directory);
45
- if (existsSync(omcPath)) {
46
- return omcPath;
47
- }
48
- return null;
49
- }
50
- /**
51
- * Read PRD from disk
52
- */
53
- export function readPrd(directory) {
54
- const prdPath = findPrdPath(directory);
55
- if (!prdPath) {
56
- return null;
57
- }
58
- try {
59
- const content = readFileSync(prdPath, 'utf-8');
60
- const prd = JSON.parse(content);
61
- // Validate structure
62
- if (!prd.userStories || !Array.isArray(prd.userStories)) {
63
- return null;
64
- }
65
- return prd;
66
- }
67
- catch {
68
- return null;
69
- }
70
- }
71
- /**
72
- * Write PRD to disk
73
- */
74
- export function writePrd(directory, prd) {
75
- // Prefer writing to existing location, or .omc by default
76
- let prdPath = findPrdPath(directory);
77
- if (!prdPath) {
78
- const omcDir = join(directory, '.omc');
79
- if (!existsSync(omcDir)) {
80
- try {
81
- mkdirSync(omcDir, { recursive: true });
82
- }
83
- catch {
84
- return false;
85
- }
86
- }
87
- prdPath = getOmcPrdPath(directory);
88
- }
89
- try {
90
- writeFileSync(prdPath, JSON.stringify(prd, null, 2));
91
- return true;
92
- }
93
- catch {
94
- return false;
95
- }
96
- }
97
- // ============================================================================
98
- // PRD Status & Operations
99
- // ============================================================================
100
- /**
101
- * Get the status of a PRD
102
- */
103
- export function getPrdStatus(prd) {
104
- const stories = prd.userStories;
105
- const completed = stories.filter(s => s.passes);
106
- const pending = stories.filter(s => !s.passes);
107
- // Sort pending by priority to find next story
108
- const sortedPending = [...pending].sort((a, b) => a.priority - b.priority);
109
- return {
110
- total: stories.length,
111
- completed: completed.length,
112
- pending: pending.length,
113
- allComplete: pending.length === 0,
114
- nextStory: sortedPending[0] || null,
115
- incompleteIds: pending.map(s => s.id)
116
- };
117
- }
118
- /**
119
- * Mark a story as complete (passes: true)
120
- */
121
- export function markStoryComplete(directory, storyId, notes) {
122
- const prd = readPrd(directory);
123
- if (!prd) {
124
- return false;
125
- }
126
- const story = prd.userStories.find(s => s.id === storyId);
127
- if (!story) {
128
- return false;
129
- }
130
- story.passes = true;
131
- if (notes) {
132
- story.notes = notes;
133
- }
134
- return writePrd(directory, prd);
135
- }
136
- /**
137
- * Mark a story as incomplete (passes: false)
138
- */
139
- export function markStoryIncomplete(directory, storyId, notes) {
140
- const prd = readPrd(directory);
141
- if (!prd) {
142
- return false;
143
- }
144
- const story = prd.userStories.find(s => s.id === storyId);
145
- if (!story) {
146
- return false;
147
- }
148
- story.passes = false;
149
- if (notes) {
150
- story.notes = notes;
151
- }
152
- return writePrd(directory, prd);
153
- }
154
- /**
155
- * Get a specific story by ID
156
- */
157
- export function getStory(directory, storyId) {
158
- const prd = readPrd(directory);
159
- if (!prd) {
160
- return null;
161
- }
162
- return prd.userStories.find(s => s.id === storyId) || null;
163
- }
164
- /**
165
- * Get the next incomplete story (highest priority)
166
- */
167
- export function getNextStory(directory) {
168
- const prd = readPrd(directory);
169
- if (!prd) {
170
- return null;
171
- }
172
- const status = getPrdStatus(prd);
173
- return status.nextStory;
174
- }
175
- /**
176
- * Create a new PRD with user stories from a task description
177
- */
178
- export function createPrd(project, branchName, description, stories) {
179
- return {
180
- project,
181
- branchName,
182
- description,
183
- userStories: stories.map((s, index) => ({
184
- ...s,
185
- priority: s.priority ?? index + 1,
186
- passes: false
187
- }))
188
- };
189
- }
190
- /**
191
- * Create a simple PRD from a task description (single story)
192
- */
193
- export function createSimplePrd(project, branchName, taskDescription) {
194
- return createPrd(project, branchName, taskDescription, [
195
- {
196
- id: 'US-001',
197
- title: taskDescription.slice(0, 50) + (taskDescription.length > 50 ? '...' : ''),
198
- description: taskDescription,
199
- acceptanceCriteria: [
200
- 'Implementation is complete',
201
- 'Code compiles/runs without errors',
202
- 'Tests pass (if applicable)',
203
- 'Changes are committed'
204
- ],
205
- priority: 1
206
- }
207
- ]);
208
- }
209
- /**
210
- * Initialize a PRD in a directory
211
- */
212
- export function initPrd(directory, project, branchName, description, stories) {
213
- const prd = stories
214
- ? createPrd(project, branchName, description, stories)
215
- : createSimplePrd(project, branchName, description);
216
- return writePrd(directory, prd);
217
- }
218
- // ============================================================================
219
- // PRD Formatting
220
- // ============================================================================
221
- /**
222
- * Format PRD status as a string for display
223
- */
224
- export function formatPrdStatus(status) {
225
- const lines = [];
226
- lines.push(`[PRD Status: ${status.completed}/${status.total} stories complete]`);
227
- if (status.allComplete) {
228
- lines.push('All stories are COMPLETE!');
229
- }
230
- else {
231
- lines.push(`Remaining: ${status.incompleteIds.join(', ')}`);
232
- if (status.nextStory) {
233
- lines.push(`Next story: ${status.nextStory.id} - ${status.nextStory.title}`);
234
- }
235
- }
236
- return lines.join('\n');
237
- }
238
- /**
239
- * Format a story for display
240
- */
241
- export function formatStory(story) {
242
- const lines = [];
243
- lines.push(`## ${story.id}: ${story.title}`);
244
- lines.push(`Status: ${story.passes ? 'COMPLETE' : 'PENDING'}`);
245
- lines.push(`Priority: ${story.priority}`);
246
- lines.push('');
247
- lines.push(story.description);
248
- lines.push('');
249
- lines.push('**Acceptance Criteria:**');
250
- story.acceptanceCriteria.forEach((c, i) => {
251
- lines.push(`${i + 1}. ${c}`);
252
- });
253
- if (story.notes) {
254
- lines.push('');
255
- lines.push(`**Notes:** ${story.notes}`);
256
- }
257
- return lines.join('\n');
258
- }
259
- /**
260
- * Format entire PRD for display
261
- */
262
- export function formatPrd(prd) {
263
- const lines = [];
264
- const status = getPrdStatus(prd);
265
- lines.push(`# ${prd.project}`);
266
- lines.push(`Branch: ${prd.branchName}`);
267
- lines.push('');
268
- lines.push(prd.description);
269
- lines.push('');
270
- lines.push(formatPrdStatus(status));
271
- lines.push('');
272
- lines.push('---');
273
- lines.push('');
274
- // Sort by priority for display
275
- const sortedStories = [...prd.userStories].sort((a, b) => a.priority - b.priority);
276
- for (const story of sortedStories) {
277
- lines.push(formatStory(story));
278
- lines.push('');
279
- lines.push('---');
280
- lines.push('');
281
- }
282
- return lines.join('\n');
283
- }
284
- /**
285
- * Format next story prompt for injection into ralph
286
- */
287
- export function formatNextStoryPrompt(story) {
288
- return `<current-story>
289
-
290
- ## Current Story: ${story.id} - ${story.title}
291
-
292
- ${story.description}
293
-
294
- **Acceptance Criteria:**
295
- ${story.acceptanceCriteria.map((c, i) => `${i + 1}. ${c}`).join('\n')}
296
-
297
- **Instructions:**
298
- 1. Implement this story completely
299
- 2. Verify ALL acceptance criteria are met
300
- 3. Run quality checks (tests, typecheck, lint)
301
- 4. When complete, mark story as passes: true in prd.json
302
- 5. If ALL stories are done, output: <promise>DONE</promise>
303
-
304
- </current-story>
305
-
306
- ---
307
-
308
- `;
309
- }
310
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/ralph-prd/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAiD5B,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,MAAM,CAAC,MAAM,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C,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAClB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAgB;IACpD,OAAO;;oBAEW,KAAK,CAAC,EAAE,MAAM,KAAK,CAAC,KAAK;;EAE3C,KAAK,CAAC,WAAW;;;EAGjB,KAAK,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;;;;CAapE,CAAC;AACF,CAAC"}
@@ -1,102 +0,0 @@
1
- /**
2
- * Ralph Progress Log Support
3
- *
4
- * Implements append-only progress tracking using progress.txt format from original Ralph.
5
- * This provides memory persistence between ralph iterations.
6
- *
7
- * Structure:
8
- * - Codebase Patterns section at top (consolidated learnings)
9
- * - Per-story progress entries appended
10
- * - Learnings captured for future iterations
11
- */
12
- export interface ProgressEntry {
13
- /** ISO timestamp */
14
- timestamp: string;
15
- /** Story ID (e.g., "US-001") */
16
- storyId: string;
17
- /** What was implemented */
18
- implementation: string[];
19
- /** Files changed */
20
- filesChanged: string[];
21
- /** Learnings for future iterations */
22
- learnings: string[];
23
- }
24
- export interface CodebasePattern {
25
- /** The pattern description */
26
- pattern: string;
27
- /** When it was discovered */
28
- discoveredAt?: string;
29
- }
30
- export interface ProgressLog {
31
- /** Consolidated codebase patterns at top */
32
- patterns: CodebasePattern[];
33
- /** Progress entries (append-only) */
34
- entries: ProgressEntry[];
35
- /** When the log was started */
36
- startedAt: string;
37
- }
38
- export declare const PROGRESS_FILENAME = "progress.txt";
39
- export declare const PATTERNS_HEADER = "## Codebase Patterns";
40
- export declare const ENTRY_SEPARATOR = "---";
41
- /**
42
- * Get the path to progress.txt in a directory
43
- */
44
- export declare function getProgressPath(directory: string): string;
45
- /**
46
- * Get the path to progress.txt in .omc subdirectory
47
- */
48
- export declare function getOmcProgressPath(directory: string): string;
49
- /**
50
- * Find progress.txt in a directory (checks both root and .omc)
51
- */
52
- export declare function findProgressPath(directory: string): string | null;
53
- /**
54
- * Read raw progress.txt content
55
- */
56
- export declare function readProgressRaw(directory: string): string | null;
57
- /**
58
- * Parse progress.txt content into structured format
59
- */
60
- export declare function parseProgress(content: string): ProgressLog;
61
- /**
62
- * Read and parse progress.txt
63
- */
64
- export declare function readProgress(directory: string): ProgressLog | null;
65
- /**
66
- * Initialize a new progress.txt file
67
- */
68
- export declare function initProgress(directory: string): boolean;
69
- /**
70
- * Append a progress entry
71
- */
72
- export declare function appendProgress(directory: string, entry: Omit<ProgressEntry, 'timestamp'>): boolean;
73
- /**
74
- * Add a codebase pattern to the patterns section
75
- * @param retryCount - Internal retry counter to prevent infinite recursion
76
- */
77
- export declare function addPattern(directory: string, pattern: string, retryCount?: number): boolean;
78
- /**
79
- * Get patterns from progress.txt for injection into context
80
- */
81
- export declare function getPatterns(directory: string): string[];
82
- /**
83
- * Get recent learnings for context injection
84
- */
85
- export declare function getRecentLearnings(directory: string, limit?: number): string[];
86
- /**
87
- * Format patterns for context injection
88
- */
89
- export declare function formatPatternsForContext(directory: string): string;
90
- /**
91
- * Format recent progress for context injection
92
- */
93
- export declare function formatProgressForContext(directory: string, limit?: number): string;
94
- /**
95
- * Format learnings for context injection
96
- */
97
- export declare function formatLearningsForContext(directory: string): string;
98
- /**
99
- * Get full context injection for ralph
100
- */
101
- export declare function getProgressContext(directory: string): string;
102
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/ralph-progress/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB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