oh-my-claude-sisyphus 3.8.15 → 3.9.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 (259) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.mcp.json +1 -1
  4. package/README.md +9 -11
  5. package/agents/analyst.md +41 -0
  6. package/agents/architect.md +45 -0
  7. package/agents/critic.md +42 -0
  8. package/agents/deep-executor.md +193 -0
  9. package/agents/planner.md +82 -0
  10. package/bridge/mcp-server.cjs +1 -1
  11. package/commands/autopilot.md +2 -6
  12. package/commands/hud.md +7 -2
  13. package/commands/ralph.md +3 -3
  14. package/commands/ultrapilot.md +2 -6
  15. package/dist/__tests__/agent-registry.test.js +1 -1
  16. package/dist/__tests__/delegation-enforcement-levels.test.js +0 -1
  17. package/dist/__tests__/delegation-enforcement-levels.test.js.map +1 -1
  18. package/dist/__tests__/hooks/learner/parser.test.d.ts +5 -0
  19. package/dist/__tests__/hooks/learner/parser.test.d.ts.map +1 -0
  20. package/dist/__tests__/hooks/learner/parser.test.js +201 -0
  21. package/dist/__tests__/hooks/learner/parser.test.js.map +1 -0
  22. package/dist/__tests__/hud/cwd.test.d.ts +2 -0
  23. package/dist/__tests__/hud/cwd.test.d.ts.map +1 -0
  24. package/dist/__tests__/hud/cwd.test.js +62 -0
  25. package/dist/__tests__/hud/cwd.test.js.map +1 -0
  26. package/dist/__tests__/hud/defaults.test.d.ts +2 -0
  27. package/dist/__tests__/hud/defaults.test.d.ts.map +1 -0
  28. package/dist/__tests__/hud/defaults.test.js +21 -0
  29. package/dist/__tests__/hud/defaults.test.js.map +1 -0
  30. package/dist/__tests__/hud/render.test.d.ts +2 -0
  31. package/dist/__tests__/hud/render.test.d.ts.map +1 -0
  32. package/dist/__tests__/hud/render.test.js +141 -0
  33. package/dist/__tests__/hud/render.test.js.map +1 -0
  34. package/dist/__tests__/hud/thinking.test.d.ts +2 -0
  35. package/dist/__tests__/hud/thinking.test.d.ts.map +1 -0
  36. package/dist/__tests__/hud/thinking.test.js +32 -0
  37. package/dist/__tests__/hud/thinking.test.js.map +1 -0
  38. package/dist/__tests__/installer.test.js +8 -8
  39. package/dist/__tests__/installer.test.js.map +1 -1
  40. package/dist/__tests__/mnemosyne/parser.test.js +1 -1
  41. package/dist/__tests__/mnemosyne/parser.test.js.map +1 -1
  42. package/dist/__tests__/omc-tools-server.test.js +2 -2
  43. package/dist/__tests__/omc-tools-server.test.js.map +1 -1
  44. package/dist/__tests__/skills.test.js +5 -4
  45. package/dist/__tests__/skills.test.js.map +1 -1
  46. package/dist/agents/deep-executor.d.ts +15 -0
  47. package/dist/agents/deep-executor.d.ts.map +1 -0
  48. package/dist/agents/deep-executor.js +47 -0
  49. package/dist/agents/deep-executor.js.map +1 -0
  50. package/dist/agents/definitions.d.ts +15 -0
  51. package/dist/agents/definitions.d.ts.map +1 -1
  52. package/dist/agents/definitions.js +25 -0
  53. package/dist/agents/definitions.js.map +1 -1
  54. package/dist/agents/index.d.ts +1 -0
  55. package/dist/agents/index.d.ts.map +1 -1
  56. package/dist/agents/index.js +1 -0
  57. package/dist/agents/index.js.map +1 -1
  58. package/dist/cli/commands/doctor-conflicts.d.ts +55 -0
  59. package/dist/cli/commands/doctor-conflicts.d.ts.map +1 -0
  60. package/dist/cli/commands/doctor-conflicts.js +261 -0
  61. package/dist/cli/commands/doctor-conflicts.js.map +1 -0
  62. package/dist/cli/index.js +16 -1
  63. package/dist/cli/index.js.map +1 -1
  64. package/dist/features/auto-update.d.ts +12 -0
  65. package/dist/features/auto-update.d.ts.map +1 -1
  66. package/dist/features/auto-update.js +4 -1
  67. package/dist/features/auto-update.js.map +1 -1
  68. package/dist/features/context-injector/types.d.ts +1 -1
  69. package/dist/features/context-injector/types.d.ts.map +1 -1
  70. package/dist/features/continuation-enforcement.js +1 -1
  71. package/dist/features/state-manager/index.d.ts.map +1 -1
  72. package/dist/features/state-manager/index.js +7 -4
  73. package/dist/features/state-manager/index.js.map +1 -1
  74. package/dist/features/verification/example.d.ts.map +1 -1
  75. package/dist/features/verification/example.js +4 -2
  76. package/dist/features/verification/example.js.map +1 -1
  77. package/dist/hooks/__tests__/bridge.test.d.ts +2 -0
  78. package/dist/hooks/__tests__/bridge.test.d.ts.map +1 -0
  79. package/dist/hooks/__tests__/bridge.test.js +199 -0
  80. package/dist/hooks/__tests__/bridge.test.js.map +1 -0
  81. package/dist/hooks/beads-context/__tests__/index.test.d.ts +2 -0
  82. package/dist/hooks/beads-context/__tests__/index.test.d.ts.map +1 -0
  83. package/dist/hooks/beads-context/__tests__/index.test.js +150 -0
  84. package/dist/hooks/beads-context/__tests__/index.test.js.map +1 -0
  85. package/dist/hooks/beads-context/constants.d.ts +3 -0
  86. package/dist/hooks/beads-context/constants.d.ts.map +1 -0
  87. package/dist/hooks/beads-context/constants.js +35 -0
  88. package/dist/hooks/beads-context/constants.js.map +1 -0
  89. package/dist/hooks/beads-context/index.d.ts +21 -0
  90. package/dist/hooks/beads-context/index.d.ts.map +1 -0
  91. package/dist/hooks/beads-context/index.js +62 -0
  92. package/dist/hooks/beads-context/index.js.map +1 -0
  93. package/dist/hooks/beads-context/types.d.ts +7 -0
  94. package/dist/hooks/beads-context/types.d.ts.map +1 -0
  95. package/dist/hooks/beads-context/types.js +2 -0
  96. package/dist/hooks/beads-context/types.js.map +1 -0
  97. package/dist/hooks/bridge.d.ts +4 -0
  98. package/dist/hooks/bridge.d.ts.map +1 -1
  99. package/dist/hooks/bridge.js +80 -47
  100. package/dist/hooks/bridge.js.map +1 -1
  101. package/dist/hooks/index.d.ts +2 -1
  102. package/dist/hooks/index.d.ts.map +1 -1
  103. package/dist/hooks/index.js +4 -1
  104. package/dist/hooks/index.js.map +1 -1
  105. package/dist/hooks/learner/parser.d.ts.map +1 -1
  106. package/dist/hooks/learner/parser.js +12 -5
  107. package/dist/hooks/learner/parser.js.map +1 -1
  108. package/dist/hooks/mode-registry/index.d.ts +2 -0
  109. package/dist/hooks/mode-registry/index.d.ts.map +1 -1
  110. package/dist/hooks/mode-registry/index.js +8 -19
  111. package/dist/hooks/mode-registry/index.js.map +1 -1
  112. package/dist/hooks/permission-handler/index.d.ts.map +1 -1
  113. package/dist/hooks/permission-handler/index.js +3 -1
  114. package/dist/hooks/permission-handler/index.js.map +1 -1
  115. package/dist/hooks/persistent-mode/index.d.ts +1 -1
  116. package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
  117. package/dist/hooks/persistent-mode/index.js +5 -33
  118. package/dist/hooks/persistent-mode/index.js.map +1 -1
  119. package/dist/hooks/ralph/index.d.ts +1 -1
  120. package/dist/hooks/ralph/index.d.ts.map +1 -1
  121. package/dist/hooks/ralph/index.js +1 -1
  122. package/dist/hooks/ralph/index.js.map +1 -1
  123. package/dist/hooks/ralph/loop.d.ts +1 -9
  124. package/dist/hooks/ralph/loop.d.ts.map +1 -1
  125. package/dist/hooks/ralph/loop.js +1 -37
  126. package/dist/hooks/ralph/loop.js.map +1 -1
  127. package/dist/hooks/ralph/prd.js +1 -1
  128. package/dist/hooks/ralph/verifier.d.ts +4 -5
  129. package/dist/hooks/ralph/verifier.d.ts.map +1 -1
  130. package/dist/hooks/ralph/verifier.js +7 -10
  131. package/dist/hooks/ralph/verifier.js.map +1 -1
  132. package/dist/hooks/session-end/index.d.ts +13 -0
  133. package/dist/hooks/session-end/index.d.ts.map +1 -1
  134. package/dist/hooks/session-end/index.js +69 -0
  135. package/dist/hooks/session-end/index.js.map +1 -1
  136. package/dist/hooks/setup/index.d.ts.map +1 -1
  137. package/dist/hooks/setup/index.js +12 -5
  138. package/dist/hooks/setup/index.js.map +1 -1
  139. package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
  140. package/dist/hooks/subagent-tracker/index.js +25 -9
  141. package/dist/hooks/subagent-tracker/index.js.map +1 -1
  142. package/dist/hooks/ultrawork/index.d.ts +2 -2
  143. package/dist/hooks/ultrawork/index.d.ts.map +1 -1
  144. package/dist/hooks/ultrawork/index.js +2 -46
  145. package/dist/hooks/ultrawork/index.js.map +1 -1
  146. package/dist/hud/elements/cwd.d.ts +15 -0
  147. package/dist/hud/elements/cwd.d.ts.map +1 -0
  148. package/dist/hud/elements/cwd.js +39 -0
  149. package/dist/hud/elements/cwd.js.map +1 -0
  150. package/dist/hud/elements/index.d.ts +1 -0
  151. package/dist/hud/elements/index.d.ts.map +1 -1
  152. package/dist/hud/elements/index.js +1 -0
  153. package/dist/hud/elements/index.js.map +1 -1
  154. package/dist/hud/elements/thinking.d.ts +7 -5
  155. package/dist/hud/elements/thinking.d.ts.map +1 -1
  156. package/dist/hud/elements/thinking.js +18 -6
  157. package/dist/hud/elements/thinking.js.map +1 -1
  158. package/dist/hud/index.js +5 -3
  159. package/dist/hud/index.js.map +1 -1
  160. package/dist/hud/omc-state.d.ts +1 -1
  161. package/dist/hud/omc-state.d.ts.map +1 -1
  162. package/dist/hud/omc-state.js +14 -31
  163. package/dist/hud/omc-state.js.map +1 -1
  164. package/dist/hud/render.d.ts +9 -0
  165. package/dist/hud/render.d.ts.map +1 -1
  166. package/dist/hud/render.js +27 -7
  167. package/dist/hud/render.js.map +1 -1
  168. package/dist/hud/state.d.ts +2 -2
  169. package/dist/hud/state.d.ts.map +1 -1
  170. package/dist/hud/state.js +4 -33
  171. package/dist/hud/state.js.map +1 -1
  172. package/dist/hud/transcript.d.ts +4 -1
  173. package/dist/hud/transcript.d.ts.map +1 -1
  174. package/dist/hud/transcript.js +4 -9
  175. package/dist/hud/transcript.js.map +1 -1
  176. package/dist/hud/types.d.ts +20 -1
  177. package/dist/hud/types.d.ts.map +1 -1
  178. package/dist/hud/types.js +38 -9
  179. package/dist/hud/types.js.map +1 -1
  180. package/dist/index.js +1 -1
  181. package/dist/index.js.map +1 -1
  182. package/dist/installer/__tests__/claude-md-merge.test.d.ts +6 -0
  183. package/dist/installer/__tests__/claude-md-merge.test.d.ts.map +1 -0
  184. package/dist/installer/__tests__/claude-md-merge.test.js +220 -0
  185. package/dist/installer/__tests__/claude-md-merge.test.js.map +1 -0
  186. package/dist/installer/__tests__/safe-installer.test.d.ts +6 -0
  187. package/dist/installer/__tests__/safe-installer.test.d.ts.map +1 -0
  188. package/dist/installer/__tests__/safe-installer.test.js +172 -0
  189. package/dist/installer/__tests__/safe-installer.test.js.map +1 -0
  190. package/dist/installer/hooks.d.ts +1 -1
  191. package/dist/installer/hooks.d.ts.map +1 -1
  192. package/dist/installer/hooks.js +4 -2
  193. package/dist/installer/hooks.js.map +1 -1
  194. package/dist/installer/index.d.ts +27 -1
  195. package/dist/installer/index.d.ts.map +1 -1
  196. package/dist/installer/index.js +209 -85
  197. package/dist/installer/index.js.map +1 -1
  198. package/dist/mcp/omc-tools-server.d.ts +1 -1
  199. package/dist/mcp/omc-tools-server.d.ts.map +1 -1
  200. package/dist/mcp/omc-tools-server.js +3 -3
  201. package/dist/mcp/omc-tools-server.js.map +1 -1
  202. package/dist/mcp/standalone-server.js +1 -1
  203. package/dist/mcp/standalone-server.js.map +1 -1
  204. package/dist/verification/tier-selector.d.ts +40 -0
  205. package/dist/verification/tier-selector.d.ts.map +1 -0
  206. package/dist/verification/tier-selector.js +95 -0
  207. package/dist/verification/tier-selector.js.map +1 -0
  208. package/dist/verification/tier-selector.test.d.ts +2 -0
  209. package/dist/verification/tier-selector.test.d.ts.map +1 -0
  210. package/dist/verification/tier-selector.test.js +282 -0
  211. package/dist/verification/tier-selector.test.js.map +1 -0
  212. package/docs/AGENTS.md +100 -0
  213. package/docs/ARCHITECTURE.md +11 -7
  214. package/docs/CLAUDE.md +89 -379
  215. package/docs/DELEGATION-ENFORCER.md +1 -2
  216. package/docs/MIGRATION.md +1 -1
  217. package/docs/REFERENCE.md +29 -9
  218. package/docs/SYNC-SYSTEM.md +0 -2
  219. package/docs/partials/agent-tiers.md +165 -0
  220. package/docs/partials/features.md +131 -0
  221. package/docs/partials/mode-hierarchy.md +120 -0
  222. package/docs/partials/mode-selection-guide.md +82 -0
  223. package/docs/partials/verification-tiers.md +107 -0
  224. package/docs/shared/agent-tiers.md +165 -0
  225. package/docs/shared/features.md +131 -0
  226. package/docs/shared/mode-hierarchy.md +120 -0
  227. package/docs/shared/mode-selection-guide.md +82 -0
  228. package/docs/shared/verification-tiers.md +107 -0
  229. package/package.json +4 -3
  230. package/scripts/compose-docs.mjs +44 -0
  231. package/scripts/keyword-detector.mjs +13 -3
  232. package/scripts/persistent-mode.mjs +78 -47
  233. package/scripts/test-mutual-exclusion.ts +3 -3
  234. package/skills/AGENTS.md +59 -44
  235. package/skills/autopilot/SKILL.md +0 -2
  236. package/skills/cancel/SKILL.md +13 -32
  237. package/skills/deep-executor/SKILL.md +50 -0
  238. package/skills/ecomode/SKILL.md +58 -104
  239. package/skills/hud/SKILL.md +3 -2
  240. package/skills/omc-setup/SKILL.md +197 -20
  241. package/skills/plan/SKILL.md +62 -0
  242. package/skills/project-session-manager/SKILL.md +87 -4
  243. package/skills/project-session-manager/lib/config.sh +54 -5
  244. package/skills/project-session-manager/lib/parse.sh +65 -11
  245. package/skills/project-session-manager/lib/providers/github.sh +52 -0
  246. package/skills/project-session-manager/lib/providers/interface.sh +76 -0
  247. package/skills/project-session-manager/lib/providers/jira.sh +79 -0
  248. package/skills/project-session-manager/lib/session.sh +49 -12
  249. package/skills/project-session-manager/lib/worktree.sh +37 -4
  250. package/skills/project-session-manager/psm.sh +116 -51
  251. package/skills/ralph/SKILL.md +48 -44
  252. package/skills/ultrawork/SKILL.md +56 -67
  253. package/templates/hooks/keyword-detector.mjs +21 -13
  254. package/templates/hooks/lib/stdin.mjs +62 -0
  255. package/templates/hooks/persistent-mode.mjs +75 -34
  256. package/templates/hooks/post-tool-use.mjs +8 -10
  257. package/templates/hooks/pre-tool-use.mjs +9 -6
  258. package/templates/hooks/session-start.mjs +7 -8
  259. package/agents/AGENTS.md +0 -144
@@ -76,7 +76,7 @@ Your workflow:
76
76
 
77
77
  ## ULTRAWORK MODE (AUTO-ACTIVATED)
78
78
 
79
- Ralph automatically activates Ultrawork for maximum parallel execution. You MUST follow these rules:
79
+ Ralph is a **persistence wrapper** that includes Ultrawork as a component for maximum parallel execution. You MUST follow these rules:
80
80
 
81
81
  ### Parallel Execution Rules
82
82
  - **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially
@@ -93,23 +93,11 @@ Ralph automatically activates Ultrawork for maximum parallel execution. You MUST
93
93
 
94
94
  ### Available Agents by Tier
95
95
 
96
- | Domain | LOW (Haiku) | MEDIUM (Sonnet) | HIGH (Opus) |
97
- |--------|-------------|-----------------|-------------|
98
- | **Analysis** | `architect-low` | `architect-medium` | `architect` |
99
- | **Execution** | `executor-low` | `executor` | `executor-high` |
100
- | **Search** | `explore` | `explore-medium` | - |
101
- | **Research** | `researcher-low` | `researcher` | - |
102
- | **Frontend** | `designer-low` | `designer` | `designer-high` |
103
- | **Docs** | `writer` | - | - |
104
- | **Visual** | - | `vision` | - |
105
- | **Planning** | - | - | `planner` |
106
- | **Critique** | - | - | `critic` |
107
- | **Pre-Planning** | - | - | `analyst` |
108
- | **Testing** | - | `qa-tester` | - |
109
- | **Security** | `security-reviewer-low` | - | `security-reviewer` |
110
- | **Build** | `build-fixer-low` | `build-fixer` | - |
111
- | **TDD** | `tdd-guide-low` | `tdd-guide` | - |
112
- | **Code Review** | `code-reviewer-low` | - | `code-reviewer` |
96
+ **FIRST ACTION:** Before delegating any work, read the agent reference file:
97
+ ```
98
+ Read file: docs/shared/agent-tiers.md
99
+ ```
100
+ This provides the complete agent tier matrix, MCP tool assignments, and selection guidance.
113
101
 
114
102
  **CRITICAL: Always pass `model` parameter explicitly!**
115
103
  ```
@@ -166,20 +154,46 @@ Before outputting the completion promise:
166
154
 
167
155
  **Skipping verification = Task NOT complete**
168
156
 
169
- ## ARCHITECT VERIFICATION (MANDATORY)
157
+ ## VERIFICATION PROTOCOL (TIERED)
170
158
 
171
- When you believe the task is complete:
172
- 1. **First**, spawn Architect to verify your work (ALWAYS pass model explicitly!):
173
- ```
174
- Task(subagent_type="oh-my-claudecode:architect", model="opus", prompt="Verify this implementation is complete: [describe what you did]")
159
+ Ralph uses tiered verification to save tokens while maintaining quality.
160
+
161
+ ### Verification Tier Selection
162
+
163
+ Before spawning architect for verification, determine the appropriate tier:
164
+
165
+ | Change Profile | Tier | Agent |
166
+ |----------------|------|-------|
167
+ | <5 files, <100 lines, full tests | LIGHT | architect-low (haiku) |
168
+ | Standard changes | STANDARD | architect-medium (sonnet) |
169
+ | >20 files, security/architectural | THOROUGH | architect (opus) |
170
+
171
+ ### Ralph Minimum Verification Tier
172
+
173
+ **Floor: STANDARD (architect-medium / sonnet)**
174
+
175
+ Even for small changes (<5 files), ralph requires at least STANDARD tier verification. The LIGHT tier (haiku) is insufficient for ralph's completion guarantee. When tier selection returns LIGHT, upgrade to STANDARD.
176
+
177
+ ### Verification Flow
178
+
179
+ 1. **Collect change metadata**: Count files, lines, detect security/architectural patterns
180
+ 2. **Select tier**: Apply rules from `/docs/shared/verification-tiers.md`
181
+ 3. **Spawn appropriate architect**:
175
182
  ```
183
+ // LIGHT - small, well-tested changes
184
+ Task(subagent_type="oh-my-claudecode:architect-low", model="haiku", prompt="Quick verification: [describe changes]")
176
185
 
177
- 2. **Wait for Architect's assessment**
186
+ // STANDARD - most changes
187
+ Task(subagent_type="oh-my-claudecode:architect-medium", model="sonnet", prompt="Verify implementation: [describe changes]")
178
188
 
179
- 3. **If Architect approves**: Output `<promise>{{PROMISE}}</promise>`
180
- 4. **If Architect finds issues**: Fix them, then repeat verification
189
+ // THOROUGH - large/security/architectural changes
190
+ Task(subagent_type="oh-my-claudecode:architect", model="opus", prompt="Full verification: [describe changes]")
191
+ ```
192
+ 4. **Wait for verdict**
193
+ 5. **If approved**: Run `/oh-my-claudecode:cancel` to cleanly exit
194
+ 6. **If rejected**: Fix issues and re-verify (same tier)
181
195
 
182
- DO NOT output the completion promise without Architect verification.
196
+ For complete tier selection rules, read: `docs/shared/verification-tiers.md`
183
197
 
184
198
  ## ZERO TOLERANCE
185
199
 
@@ -190,31 +204,21 @@ DO NOT output the completion promise without Architect verification.
190
204
 
191
205
  ## STATE CLEANUP ON COMPLETION
192
206
 
193
- **IMPORTANT: Delete state files on successful completion - do NOT just set `active: false`**
207
+ **IMPORTANT: Use the cancel skill for proper state cleanup**
194
208
 
195
- When outputting the completion promise after Architect verification:
196
-
197
- ```bash
198
- # Delete ralph state file (and linked ultrawork if applicable)
199
- rm -f .omc/state/ralph-state.json
200
- rm -f .omc/state/ralph-verification.json
201
- rm -f ~/.claude/ralph-state.json
202
-
203
- # If ultrawork was linked, delete it too
204
- rm -f .omc/state/ultrawork-state.json
205
- rm -f ~/.claude/ultrawork-state.json
206
- ```
209
+ When work is complete and Architect verification passes, run `/oh-my-claudecode:cancel` to cleanly exit ralph mode. This handles:
210
+ - Deletion of ralph state files (both local and global)
211
+ - Cleanup of linked ultrawork or ecomode state
212
+ - Proper termination of the ralph loop
207
213
 
208
- This ensures clean state for future sessions. Stale state files with `active: false` should not be left behind.
214
+ This ensures clean state for future sessions without leaving stale state files behind.
209
215
 
210
216
  ## INSTRUCTIONS
211
217
 
212
218
  - Review your progress so far
213
219
  - Continue from where you left off
214
220
  - Use parallel execution and background tasks
215
- - When FULLY complete AND Architect verified:
216
- 1. Clean up state files (delete ralph-state.json, ultrawork-state.json)
217
- 2. Output: <promise>{{PROMISE}}</promise>
221
+ - When FULLY complete AND Architect verified: Run `/oh-my-claudecode:cancel` to cleanly exit and clean up all state files
218
222
  - Do not stop until the task is truly done
219
223
 
220
224
  Original task:
@@ -1,71 +1,45 @@
1
1
  ---
2
2
  name: ultrawork
3
- description: Activate maximum performance mode with parallel agent orchestration for high-throughput task completion
3
+ description: Parallel execution engine for high-throughput task completion
4
4
  ---
5
5
 
6
6
  # Ultrawork Skill
7
7
 
8
- Activates maximum performance mode with parallel agent orchestration.
8
+ Parallel execution engine. This is a **COMPONENT**, not a standalone persistence mode.
9
9
 
10
- ## When Activated
11
-
12
- This skill enhances Claude's capabilities by:
10
+ ## What Ultrawork Provides
13
11
 
14
12
  1. **Parallel Execution**: Running multiple agents simultaneously for independent tasks
15
- 2. **Aggressive Delegation**: Routing tasks to specialist agents immediately
16
- 3. **Background Operations**: Using `run_in_background: true` for long operations
17
- 4. **Persistence Enforcement**: Never stopping until all tasks are verified complete
18
- 5. **Smart Model Routing**: Using tiered agents to save tokens
19
-
20
- ## Smart Model Routing (CRITICAL - SAVE TOKENS)
21
-
22
- **Choose tier based on task complexity: LOW (haiku) → MEDIUM (sonnet) → HIGH (opus)**
23
-
24
- ### Available Agents by Tier
13
+ 2. **Background Operations**: Using `run_in_background: true` for long operations
14
+ 3. **Smart Model Routing**: Using tiered agents to save tokens
25
15
 
26
- | Domain | LOW (Haiku) | MEDIUM (Sonnet) | HIGH (Opus) |
27
- |--------|-------------|-----------------|-------------|
28
- | **Analysis** | `architect-low` | `architect-medium` | `architect` |
29
- | **Execution** | `executor-low` | `executor` | `executor-high` |
30
- | **Search** | `explore` | `explore-medium` | - |
31
- | **Research** | `researcher-low` | `researcher` | - |
32
- | **Frontend** | `designer-low` | `designer` | `designer-high` |
33
- | **Docs** | `writer` | - | - |
34
- | **Visual** | - | `vision` | - |
35
- | **Planning** | - | - | `planner`, `critic`, `analyst` |
36
- | **Testing** | - | `qa-tester` | - |
37
- | **Security** | `security-reviewer-low` | - | `security-reviewer` |
38
- | **Build** | `build-fixer-low` | `build-fixer` | - |
39
- | **TDD** | `tdd-guide-low` | `tdd-guide` | - |
40
- | **Code Review** | `code-reviewer-low` | - | `code-reviewer` |
16
+ ## What Ultrawork Does NOT Provide
41
17
 
42
- ### Tier Selection Guide
18
+ - **Persistence**: Use `ralph` for "don't stop until done" behavior
19
+ - **Verification Loop**: Use `ralph` for mandatory architect verification
20
+ - **State Management**: Use `ralph` or `autopilot` for session persistence
43
21
 
44
- | Task Complexity | Tier | Examples |
45
- |-----------------|------|----------|
46
- | Simple lookups | LOW | "What does this function return?", "Find where X is defined" |
47
- | Standard work | MEDIUM | "Add error handling", "Implement this feature" |
48
- | Complex analysis | HIGH | "Debug this race condition", "Refactor auth module across 5 files" |
22
+ ## Usage
49
23
 
50
- ### Routing Examples
24
+ Ultrawork is automatically activated by:
25
+ - `ralph` (for persistent parallel work)
26
+ - `autopilot` (for autonomous parallel work)
27
+ - Direct invocation when you want parallel-only execution with manual oversight
51
28
 
52
- **CRITICAL: Always pass `model` parameter explicitly - Claude Code does NOT auto-apply models from agent definitions!**
29
+ ## Smart Model Routing
53
30
 
31
+ **FIRST ACTION:** Before delegating any work, read the agent reference file:
54
32
  ```
55
- // Simple question → LOW tier (saves tokens!)
56
- Task(subagent_type="oh-my-claudecode:architect-low", model="haiku", prompt="What does this function return?")
57
-
58
- // Standard implementation → MEDIUM tier
59
- Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="Add error handling to login")
60
-
61
- // Complex refactoring → HIGH tier
62
- Task(subagent_type="oh-my-claudecode:executor-high", model="opus", prompt="Refactor auth module using JWT across 5 files")
33
+ Read file: docs/shared/agent-tiers.md
34
+ ```
35
+ This provides the complete agent tier matrix, MCP tool assignments, and selection guidance.
63
36
 
64
- // Quick file lookup LOW tier
65
- Task(subagent_type="oh-my-claudecode:explore", model="haiku", prompt="Find where UserService is defined")
37
+ **CRITICAL: Always pass `model` parameter explicitly!**
66
38
 
67
- // Thorough search → MEDIUM tier
68
- Task(subagent_type="oh-my-claudecode:explore-medium", model="sonnet", prompt="Find all authentication patterns in the codebase")
39
+ ```
40
+ Task(subagent_type="oh-my-claudecode:architect-low", model="haiku", prompt="...")
41
+ Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="...")
42
+ Task(subagent_type="oh-my-claudecode:architect", model="opus", prompt="...")
69
43
  ```
70
44
 
71
45
  ## Background Execution Rules
@@ -74,33 +48,48 @@ Task(subagent_type="oh-my-claudecode:explore-medium", model="sonnet", prompt="Fi
74
48
  - Package installation: npm install, pip install, cargo build
75
49
  - Build processes: npm run build, make, tsc
76
50
  - Test suites: npm test, pytest, cargo test
77
- - Docker operations: docker build, docker pull
78
51
 
79
52
  **Run Blocking** (foreground):
80
53
  - Quick status checks: git status, ls, pwd
81
54
  - File reads, edits
82
55
  - Simple commands
83
56
 
84
- ## Verification Checklist
57
+ ## Relationship to Other Modes
85
58
 
86
- Before stopping, verify:
87
- - [ ] TODO LIST: Zero pending/in_progress tasks
88
- - [ ] FUNCTIONALITY: All requested features work
89
- - [ ] TESTS: All tests pass (if applicable)
90
- - [ ] ERRORS: Zero unaddressed errors
59
+ ```
60
+ ralph (persistence wrapper)
61
+ └── includes: ultrawork (this skill)
62
+ └── provides: parallel execution only
63
+
64
+ autopilot (autonomous execution)
65
+ └── includes: ralph
66
+ └── includes: ultrawork (this skill)
91
67
 
92
- **If ANY checkbox is unchecked, CONTINUE WORKING.**
68
+ ecomode (token efficiency)
69
+ └── modifies: ultrawork's model selection
70
+ ```
93
71
 
94
- ## STATE CLEANUP ON COMPLETION
72
+ ## When to Use Ultrawork Directly
95
73
 
96
- **IMPORTANT: Delete state files on completion - do NOT just set `active: false`**
74
+ Use ultrawork directly when you want:
75
+ - Parallel execution without persistence guarantees
76
+ - Manual oversight over completion
77
+ - Quick parallel tasks where you'll verify yourself
97
78
 
98
- When all verification passes and work is complete:
79
+ Use `ralph` instead when you want:
80
+ - Verified completion (architect check)
81
+ - Automatic retry on failure
82
+ - Session persistence for resume
99
83
 
100
- ```bash
101
- # Delete ultrawork state files
102
- rm -f .omc/state/ultrawork-state.json
103
- rm -f ~/.claude/ultrawork-state.json
104
- ```
84
+ ## Completion Verification (Direct Invocations)
85
+
86
+ When ultrawork is invoked directly (not via ralph), apply lightweight verification before claiming completion:
87
+
88
+ ### Quick Verification Checklist
89
+ - [ ] **BUILD:** `tsc --noEmit` or equivalent passes
90
+ - [ ] **TESTS:** Run affected tests, all pass
91
+ - [ ] **ERRORS:** No new errors introduced
92
+
93
+ This is lighter than ralph's full verification but ensures basic quality for direct ultrawork usage.
105
94
 
106
- This ensures clean state for future sessions. Stale state files with `active: false` should not be left behind.
95
+ For full persistence and comprehensive verification, use `ralph` mode instead.
@@ -24,8 +24,15 @@
24
24
  */
25
25
 
26
26
  import { writeFileSync, mkdirSync, existsSync, unlinkSync } from 'fs';
27
- import { join } from 'path';
27
+ import { join, dirname } from 'path';
28
28
  import { homedir } from 'os';
29
+ import { fileURLToPath } from 'url';
30
+
31
+ const __filename = fileURLToPath(import.meta.url);
32
+ const __dirname = dirname(__filename);
33
+
34
+ // Dynamic import for the shared stdin module
35
+ const { readStdin } = await import(join(__dirname, 'lib', 'stdin.mjs'));
29
36
 
30
37
  const ULTRATHINK_MESSAGE = `<think-mode>
31
38
 
@@ -44,15 +51,6 @@ Use your extended thinking capabilities to provide the most thorough and well-re
44
51
  ---
45
52
  `;
46
53
 
47
- // Read all stdin
48
- async function readStdin() {
49
- const chunks = [];
50
- for await (const chunk of process.stdin) {
51
- chunks.push(chunk);
52
- }
53
- return Buffer.concat(chunks).toString('utf-8');
54
- }
55
-
56
54
  // Extract prompt from various JSON structures
57
55
  function extractPrompt(input) {
58
56
  try {
@@ -73,10 +71,20 @@ function extractPrompt(input) {
73
71
  }
74
72
  }
75
73
 
76
- // Remove code blocks to prevent false positives
77
- function removeCodeBlocks(text) {
74
+ // Sanitize text to prevent false positives from code blocks, XML tags, URLs, and file paths
75
+ function sanitizeForKeywordDetection(text) {
78
76
  return text
77
+ // 1. Strip XML-style tag blocks: <tag-name ...>...</tag-name> (multi-line, greedy on tag name)
78
+ .replace(/<(\w[\w-]*)[\s>][\s\S]*?<\/\1>/g, '')
79
+ // 2. Strip self-closing XML tags: <tag-name />, <tag-name attr="val" />
80
+ .replace(/<\w[\w-]*(?:\s[^>]*)?\s*\/>/g, '')
81
+ // 3. Strip URLs: http://... or https://... up to whitespace
82
+ .replace(/https?:\/\/[^\s)>\]]+/g, '')
83
+ // 4. Strip file paths: /foo/bar/baz or foo/bar/baz (using lookbehind to avoid consuming leading char)
84
+ .replace(/(?<=^|[\s"'`(])(?:\/)?(?:[\w.-]+\/)+[\w.-]+/gm, '')
85
+ // 5. Strip markdown code blocks (existing)
79
86
  .replace(/```[\s\S]*?```/g, '')
87
+ // 6. Strip inline code (existing)
80
88
  .replace(/`[^`]+`/g, '');
81
89
  }
82
90
 
@@ -225,7 +233,7 @@ async function main() {
225
233
  return;
226
234
  }
227
235
 
228
- const cleanPrompt = removeCodeBlocks(prompt).toLowerCase();
236
+ const cleanPrompt = sanitizeForKeywordDetection(prompt).toLowerCase();
229
237
 
230
238
  // Collect all matching keywords
231
239
  const matches = [];
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Shared stdin utilities for OMC hooks
3
+ * Provides timeout-protected stdin reading to prevent hangs on Linux
4
+ * See: https://github.com/Yeachan-Heo/oh-my-claudecode/issues/240
5
+ */
6
+
7
+ /**
8
+ * Read all stdin with timeout to prevent indefinite hang on Linux.
9
+ *
10
+ * The blocking `for await (const chunk of process.stdin)` pattern waits
11
+ * indefinitely for EOF. On Linux, if the parent process doesn't properly
12
+ * close stdin, this hangs forever. This function uses event-based reading
13
+ * with a timeout as a safety net.
14
+ *
15
+ * @param {number} timeoutMs - Maximum time to wait for stdin (default: 5000ms)
16
+ * @returns {Promise<string>} - The stdin content, or empty string on error/timeout
17
+ */
18
+ export async function readStdin(timeoutMs = 5000) {
19
+ return new Promise((resolve) => {
20
+ const chunks = [];
21
+ let settled = false;
22
+
23
+ const timeout = setTimeout(() => {
24
+ if (!settled) {
25
+ settled = true;
26
+ process.stdin.removeAllListeners();
27
+ process.stdin.destroy();
28
+ resolve(Buffer.concat(chunks).toString('utf-8'));
29
+ }
30
+ }, timeoutMs);
31
+
32
+ process.stdin.on('data', (chunk) => {
33
+ chunks.push(chunk);
34
+ });
35
+
36
+ process.stdin.on('end', () => {
37
+ if (!settled) {
38
+ settled = true;
39
+ clearTimeout(timeout);
40
+ resolve(Buffer.concat(chunks).toString('utf-8'));
41
+ }
42
+ });
43
+
44
+ process.stdin.on('error', () => {
45
+ if (!settled) {
46
+ settled = true;
47
+ clearTimeout(timeout);
48
+ resolve('');
49
+ }
50
+ });
51
+
52
+ // If stdin is already ended (e.g. empty pipe), 'end' fires immediately
53
+ // But if stdin is a TTY or never piped, we need the timeout as safety net
54
+ if (process.stdin.readableEnded) {
55
+ if (!settled) {
56
+ settled = true;
57
+ clearTimeout(timeout);
58
+ resolve(Buffer.concat(chunks).toString('utf-8'));
59
+ }
60
+ }
61
+ });
62
+ }