1---2name: ultrawork-23description: Parallel execution engine for high-throughput task completion4---56<Purpose>7Ultrawork is a parallel execution engine that runs multiple agents simultaneously for independent tasks. It is a component, not a standalone persistence mode -- it provides parallelism and smart model routing but not persistence, verification loops, or state management.8</Purpose>910<Use_When>11- Multiple independent tasks can run simultaneously12- User says "ulw", "ultrawork", or wants parallel execution13- You need to delegate work to multiple agents at once14- Task benefits from concurrent execution but the user will manage completion themselves15</Use_When>1617<Do_Not_Use_When>18- Task requires guaranteed completion with verification -- use `ralph` instead (ralph includes ultrawork)19- Task requires a full autonomous pipeline -- use `autopilot` instead (autopilot includes ralph which includes ultrawork)20- There is only one sequential task with no parallelism opportunity -- delegate directly to an executor agent21- User needs session persistence for resume -- use `ralph` which adds persistence on top of ultrawork22</Do_Not_Use_When>2324<Why_This_Exists>25Sequential task execution wastes time when tasks are independent. Ultrawork enables firing multiple agents simultaneously and routing each to the right model tier, reducing total execution time while controlling token costs. It is designed as a composable component that ralph and autopilot layer on top of.26</Why_This_Exists>2728<Execution_Policy>29- Fire all independent agent calls simultaneously -- never serialize independent work30- Always pass the `model` parameter explicitly when delegating31- Read `docs/shared/agent-tiers.md` before first delegation for agent selection guidance32- Use `run_in_background: true` for operations over ~30 seconds (installs, builds, tests)33- Run quick commands (git status, file reads, simple checks) in the foreground34</Execution_Policy>3536<Steps>371. **Read agent reference**: Load `docs/shared/agent-tiers.md` for tier selection382. **Classify tasks by independence**: Identify which tasks can run in parallel vs which have dependencies393. **Route to correct tiers**:40 - Simple lookups/definitions: LOW tier (Haiku)41 - Standard implementation: MEDIUM tier (Sonnet)42 - Complex analysis/refactoring: HIGH tier (Opus)434. **Fire independent tasks simultaneously**: Launch all parallel-safe tasks at once445. **Run dependent tasks sequentially**: Wait for prerequisites before launching dependent work456. **Background long operations**: Builds, installs, and test suites use `run_in_background: true`467. **Verify when all tasks complete** (lightweight):47 - Build/typecheck passes48 - Affected tests pass49 - No new errors introduced50</Steps>5152<Tool_Usage>53- Use `spawn_sub_agent(subagent_type="oh-my-codex:executor-low", model="haiku", ...)` for simple changes54- Use `spawn_sub_agent(subagent_type="oh-my-codex:executor", model="sonnet", ...)` for standard work55- Use `spawn_sub_agent(subagent_type="oh-my-codex:executor-high", model="opus", ...)` for complex work56- Use `run_in_background: true` for package installs, builds, and test suites57- Use foreground execution for quick status checks and file operations58</Tool_Usage>5960## State Management6162Use `omx_state` MCP tools for ultrawork lifecycle state.6364- **On start**:65 `state_write({mode: "ultrawork", active: true, reinforcement_count: 1, started_at: "<now>"})`66- **On each reinforcement/loop step**:67 `state_write({mode: "ultrawork", reinforcement_count: <current>})`68- **On completion**:69 `state_write({mode: "ultrawork", active: false})`70- **On cancellation/cleanup**:71 run `$cancel` (which should call `state_clear(mode="ultrawork")`)7273<Examples>74<Good>75Three independent tasks fired simultaneously:76```77spawn_sub_agent(subagent_type="oh-my-codex:executor-low", model="haiku", prompt="Add missing type export for Config interface")78spawn_sub_agent(subagent_type="oh-my-codex:executor", model="sonnet", prompt="Implement the /api/users endpoint with validation")79spawn_sub_agent(subagent_type="oh-my-codex:executor", model="sonnet", prompt="Add integration tests for the auth middleware")80```81Why good: Independent tasks at appropriate tiers, all fired at once.82</Good>8384<Good>85Correct use of background execution:86```87spawn_sub_agent(subagent_type="oh-my-codex:executor", model="sonnet", prompt="npm install && npm run build", run_in_background=true)88spawn_sub_agent(subagent_type="oh-my-codex:executor-low", model="haiku", prompt="Update the README with new API endpoints")89```90Why good: Long build runs in background while short task runs in foreground.91</Good>9293<Bad>94Sequential execution of independent work:95```96result1 = spawn_sub_agent(executor-low, "Add type export") # wait...97result2 = spawn_sub_agent(executor, "Implement endpoint") # wait...98result3 = spawn_sub_agent(executor, "Add tests") # wait...99```100Why bad: These tasks are independent. Running them sequentially wastes time.101</Bad>102103<Bad>104Wrong tier selection:105```106spawn_sub_agent(subagent_type="oh-my-codex:executor-high", model="opus", prompt="Add a missing semicolon")107```108Why bad: Opus is expensive overkill for a trivial fix. Use executor-low with Haiku instead.109</Bad>110</Examples>111112<Escalation_And_Stop_Conditions>113- When ultrawork is invoked directly (not via ralph), apply lightweight verification only -- build passes, tests pass, no new errors114- For full persistence and comprehensive architect verification, recommend switching to `ralph` mode115- If a task fails repeatedly across retries, report the issue rather than retrying indefinitely116- Escalate to the user when tasks have unclear dependencies or conflicting requirements117</Escalation_And_Stop_Conditions>118119<Final_Checklist>120- [ ] All parallel tasks completed121- [ ] Build/typecheck passes122- [ ] Affected tests pass123- [ ] No new errors introduced124</Final_Checklist>125126<Advanced>127## Relationship to Other Modes128129```130ralph (persistence wrapper)131 \-- includes: ultrawork (this skill)132 \-- provides: parallel execution only133134autopilot (autonomous execution)135 \-- includes: ralph136 \-- includes: ultrawork (this skill)137138ecomode (token efficiency)139 \-- modifies: ultrawork's model selection140```141142Ultrawork is the parallelism layer. Ralph adds persistence and verification. Autopilot adds the full lifecycle pipeline. Ecomode adjusts ultrawork's model routing to favor cheaper models.143</Advanced>