oh-my-codex 0.4.3 → 0.5.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 (159) hide show
  1. package/README.md +17 -10
  2. package/dist/agents/definitions.d.ts.map +1 -1
  3. package/dist/agents/definitions.js +7 -13
  4. package/dist/agents/definitions.js.map +1 -1
  5. package/dist/agents/native-config.d.ts +20 -0
  6. package/dist/agents/native-config.d.ts.map +1 -0
  7. package/dist/agents/native-config.js +84 -0
  8. package/dist/agents/native-config.js.map +1 -0
  9. package/dist/catalog/__tests__/generator.test.d.ts +2 -0
  10. package/dist/catalog/__tests__/generator.test.d.ts.map +1 -0
  11. package/dist/catalog/__tests__/generator.test.js +42 -0
  12. package/dist/catalog/__tests__/generator.test.js.map +1 -0
  13. package/dist/catalog/__tests__/schema.test.d.ts +2 -0
  14. package/dist/catalog/__tests__/schema.test.d.ts.map +1 -0
  15. package/dist/catalog/__tests__/schema.test.js +33 -0
  16. package/dist/catalog/__tests__/schema.test.js.map +1 -0
  17. package/dist/catalog/reader.d.ts +19 -0
  18. package/dist/catalog/reader.d.ts.map +1 -0
  19. package/dist/catalog/reader.js +63 -0
  20. package/dist/catalog/reader.js.map +1 -0
  21. package/dist/catalog/schema.d.ts +32 -0
  22. package/dist/catalog/schema.d.ts.map +1 -0
  23. package/dist/catalog/schema.js +101 -0
  24. package/dist/catalog/schema.js.map +1 -0
  25. package/dist/cli/__tests__/index.test.js +109 -1
  26. package/dist/cli/__tests__/index.test.js.map +1 -1
  27. package/dist/cli/__tests__/setup-scope.test.d.ts +2 -0
  28. package/dist/cli/__tests__/setup-scope.test.d.ts.map +1 -0
  29. package/dist/cli/__tests__/setup-scope.test.js +164 -0
  30. package/dist/cli/__tests__/setup-scope.test.js.map +1 -0
  31. package/dist/cli/catalog-contract.d.ts +10 -0
  32. package/dist/cli/catalog-contract.d.ts.map +1 -0
  33. package/dist/cli/catalog-contract.js +24 -0
  34. package/dist/cli/catalog-contract.js.map +1 -0
  35. package/dist/cli/doctor.d.ts.map +1 -1
  36. package/dist/cli/doctor.js +7 -4
  37. package/dist/cli/doctor.js.map +1 -1
  38. package/dist/cli/index.d.ts +10 -0
  39. package/dist/cli/index.d.ts.map +1 -1
  40. package/dist/cli/index.js +124 -99
  41. package/dist/cli/index.js.map +1 -1
  42. package/dist/cli/setup.d.ts +3 -0
  43. package/dist/cli/setup.d.ts.map +1 -1
  44. package/dist/cli/setup.js +208 -47
  45. package/dist/cli/setup.js.map +1 -1
  46. package/dist/config/__tests__/generator-notify.test.js +28 -0
  47. package/dist/config/__tests__/generator-notify.test.js.map +1 -1
  48. package/dist/config/generator.d.ts +1 -0
  49. package/dist/config/generator.d.ts.map +1 -1
  50. package/dist/config/generator.js +34 -2
  51. package/dist/config/generator.js.map +1 -1
  52. package/dist/hooks/code-simplifier/__tests__/index.test.d.ts +2 -0
  53. package/dist/hooks/code-simplifier/__tests__/index.test.d.ts.map +1 -0
  54. package/dist/hooks/code-simplifier/__tests__/index.test.js +135 -0
  55. package/dist/hooks/code-simplifier/__tests__/index.test.js.map +1 -0
  56. package/dist/hooks/code-simplifier/index.d.ts +74 -0
  57. package/dist/hooks/code-simplifier/index.d.ts.map +1 -0
  58. package/dist/hooks/code-simplifier/index.js +145 -0
  59. package/dist/hooks/code-simplifier/index.js.map +1 -0
  60. package/dist/hooks/emulator.d.ts.map +1 -1
  61. package/dist/hooks/emulator.js +0 -1
  62. package/dist/hooks/emulator.js.map +1 -1
  63. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  64. package/dist/hooks/keyword-detector.js +0 -3
  65. package/dist/hooks/keyword-detector.js.map +1 -1
  66. package/dist/index.d.ts +1 -0
  67. package/dist/index.d.ts.map +1 -1
  68. package/dist/index.js +1 -0
  69. package/dist/index.js.map +1 -1
  70. package/dist/notifications/__tests__/tmux.test.js +61 -1
  71. package/dist/notifications/__tests__/tmux.test.js.map +1 -1
  72. package/dist/notifications/__tests__/verbosity.test.d.ts +2 -0
  73. package/dist/notifications/__tests__/verbosity.test.d.ts.map +1 -0
  74. package/dist/notifications/__tests__/verbosity.test.js +202 -0
  75. package/dist/notifications/__tests__/verbosity.test.js.map +1 -0
  76. package/dist/notifications/config.d.ts +14 -1
  77. package/dist/notifications/config.d.ts.map +1 -1
  78. package/dist/notifications/config.js +52 -0
  79. package/dist/notifications/config.js.map +1 -1
  80. package/dist/notifications/formatter.d.ts.map +1 -1
  81. package/dist/notifications/formatter.js +14 -0
  82. package/dist/notifications/formatter.js.map +1 -1
  83. package/dist/notifications/index.d.ts +3 -3
  84. package/dist/notifications/index.d.ts.map +1 -1
  85. package/dist/notifications/index.js +14 -4
  86. package/dist/notifications/index.js.map +1 -1
  87. package/dist/notifications/tmux.d.ts +6 -0
  88. package/dist/notifications/tmux.d.ts.map +1 -1
  89. package/dist/notifications/tmux.js +31 -1
  90. package/dist/notifications/tmux.js.map +1 -1
  91. package/dist/notifications/types.d.ts +13 -0
  92. package/dist/notifications/types.d.ts.map +1 -1
  93. package/dist/team/__tests__/model-contract.test.d.ts +2 -0
  94. package/dist/team/__tests__/model-contract.test.d.ts.map +1 -0
  95. package/dist/team/__tests__/model-contract.test.js +47 -0
  96. package/dist/team/__tests__/model-contract.test.js.map +1 -0
  97. package/dist/team/__tests__/phase-controller.test.d.ts +2 -0
  98. package/dist/team/__tests__/phase-controller.test.d.ts.map +1 -0
  99. package/dist/team/__tests__/phase-controller.test.js +36 -0
  100. package/dist/team/__tests__/phase-controller.test.js.map +1 -0
  101. package/dist/team/__tests__/runtime.test.js +112 -8
  102. package/dist/team/__tests__/runtime.test.js.map +1 -1
  103. package/dist/team/__tests__/tmux-session.test.js +71 -1
  104. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  105. package/dist/team/model-contract.d.ts +19 -0
  106. package/dist/team/model-contract.d.ts.map +1 -0
  107. package/dist/team/model-contract.js +123 -0
  108. package/dist/team/model-contract.js.map +1 -0
  109. package/dist/team/orchestrator.d.ts.map +1 -1
  110. package/dist/team/orchestrator.js +0 -1
  111. package/dist/team/orchestrator.js.map +1 -1
  112. package/dist/team/phase-controller.d.ts +10 -0
  113. package/dist/team/phase-controller.d.ts.map +1 -0
  114. package/dist/team/phase-controller.js +128 -0
  115. package/dist/team/phase-controller.js.map +1 -0
  116. package/dist/team/runtime.d.ts +3 -3
  117. package/dist/team/runtime.d.ts.map +1 -1
  118. package/dist/team/runtime.js +40 -74
  119. package/dist/team/runtime.js.map +1 -1
  120. package/dist/team/state.d.ts +15 -0
  121. package/dist/team/state.d.ts.map +1 -1
  122. package/dist/team/state.js +35 -0
  123. package/dist/team/state.js.map +1 -1
  124. package/dist/team/team-ops.d.ts +3 -1
  125. package/dist/team/team-ops.d.ts.map +1 -1
  126. package/dist/team/team-ops.js +2 -0
  127. package/dist/team/team-ops.js.map +1 -1
  128. package/dist/team/tmux-session.d.ts +12 -0
  129. package/dist/team/tmux-session.d.ts.map +1 -1
  130. package/dist/team/tmux-session.js +33 -1
  131. package/dist/team/tmux-session.js.map +1 -1
  132. package/dist/utils/paths.d.ts +2 -0
  133. package/dist/utils/paths.d.ts.map +1 -1
  134. package/dist/utils/paths.js +4 -0
  135. package/dist/utils/paths.js.map +1 -1
  136. package/package.json +2 -2
  137. package/prompts/code-simplifier.md +91 -0
  138. package/prompts/product-analyst.md +7 -7
  139. package/scripts/generate-catalog-docs.js +111 -0
  140. package/scripts/notify-hook.js +36 -1
  141. package/skills/build-fix/SKILL.md +3 -3
  142. package/skills/code-review/SKILL.md +3 -3
  143. package/skills/help/SKILL.md +4 -4
  144. package/skills/omx-setup/SKILL.md +24 -15
  145. package/skills/research/SKILL.md +28 -28
  146. package/skills/security-review/SKILL.md +3 -3
  147. package/templates/AGENTS.md +1 -8
  148. package/templates/catalog-manifest.json +397 -0
  149. package/prompts/deep-executor.md +0 -19
  150. package/prompts/scientist.md +0 -89
  151. package/skills/deepinit/SKILL.md +0 -320
  152. package/skills/learn-about-omx/SKILL.md +0 -37
  153. package/skills/learner/SKILL.md +0 -135
  154. package/skills/pipeline/SKILL.md +0 -407
  155. package/skills/project-session-manager/SKILL.md +0 -560
  156. package/skills/psm/SKILL.md +0 -20
  157. package/skills/release/SKILL.md +0 -83
  158. package/skills/ultrapilot/SKILL.md +0 -627
  159. package/skills/writer-memory/SKILL.md +0 -443
@@ -1,627 +0,0 @@
1
- ---
2
- name: ultrapilot
3
- description: Parallel autopilot with file ownership partitioning
4
- ---
5
-
6
- # Ultrapilot Skill
7
-
8
- Parallel autopilot that spawns multiple workers with file ownership partitioning for maximum speed.
9
-
10
- ## Overview
11
-
12
- Ultrapilot is the parallel evolution of autopilot. It decomposes your task into independent parallelizable subtasks, assigns non-overlapping file sets to each worker, and runs them simultaneously.
13
-
14
- **Key Capabilities:**
15
- 1. **Decomposes** task into parallel-safe components
16
- 2. **Partitions** files with exclusive ownership (no conflicts)
17
- 3. **Spawns** up to 20 parallel workers
18
- 4. **Coordinates** progress via TaskOutput
19
- 5. **Integrates** changes with sequential handling of shared files
20
- 6. **Validates** full system integrity
21
-
22
- **Speed Multiplier:** Up to 5x faster than sequential autopilot for suitable tasks.
23
-
24
- ## Usage
25
-
26
- ```
27
- /ultrapilot <your task>
28
- /up "Build a full-stack todo app"
29
- /ultrapilot Refactor the entire backend
30
- ```
31
-
32
- ## Magic Keywords
33
-
34
- These phrases auto-activate ultrapilot:
35
- - "ultrapilot", "ultra pilot"
36
- - "parallel build", "parallel autopilot"
37
- - "swarm build", "swarm mode"
38
- - "fast parallel", "ultra fast"
39
-
40
- ## When to Use
41
-
42
- **Ultrapilot Excels At:**
43
- - Multi-component systems (frontend + backend + database)
44
- - Independent feature additions across different modules
45
- - Large refactorings with clear module boundaries
46
- - Parallel test file generation
47
- - Multi-service architectures
48
-
49
- **Autopilot Better For:**
50
- - Single-threaded sequential tasks
51
- - Heavy interdependencies between components
52
- - Tasks requiring constant integration checks
53
- - Small focused features in a single module
54
-
55
- ## Architecture
56
-
57
- ```
58
- User Input: "Build a full-stack todo app"
59
- |
60
- v
61
- [ULTRAPILOT COORDINATOR]
62
- |
63
- Decomposition + File Partitioning
64
- |
65
- +-------+-------+-------+-------+
66
- | | | | |
67
- v v v v v
68
- [W-1] [W-2] [W-3] [W-4] [W-5]
69
- backend frontend database api-docs tests
70
- (src/ (src/ (src/ (docs/) (tests/)
71
- api/) ui/) db/)
72
- | | | | |
73
- +---+---+---+---+---+---+---+---+
74
- |
75
- v
76
- [INTEGRATION PHASE]
77
- (shared files: package.json, tsconfig.json, etc.)
78
- |
79
- v
80
- [VALIDATION PHASE]
81
- (full system test)
82
- ```
83
-
84
- ## Phases
85
-
86
- ### Phase 0: Task Analysis
87
-
88
- **Goal:** Determine if task is parallelizable
89
-
90
- **Checks:**
91
- - Can task be split into 2+ independent subtasks?
92
- - Are file boundaries clear?
93
- - Are dependencies minimal?
94
-
95
- **Output:** Go/No-Go decision (falls back to autopilot if unsuitable)
96
-
97
- ### Phase 1: Decomposition
98
-
99
- **Goal:** Break task into parallel-safe subtasks
100
-
101
- **Agent:** Architect (Opus)
102
-
103
- **Method:** AI-Powered Task Decomposition
104
-
105
- Ultrapilot uses the `decomposer` module to generate intelligent task breakdowns:
106
-
107
- ```typescript
108
- import {
109
- generateDecompositionPrompt,
110
- parseDecompositionResult,
111
- validateFileOwnership,
112
- extractSharedFiles
113
- } from 'src/hooks/ultrapilot/decomposer';
114
-
115
- // 1. Generate prompt for Architect
116
- const prompt = generateDecompositionPrompt(task, codebaseContext, {
117
- maxSubtasks: 5,
118
- preferredModel: 'sonnet'
119
- });
120
-
121
- // 2. Call Architect agent
122
- const response = await spawn_sub_agent({
123
- subagent_type: 'oh-my-codex:architect',
124
- model: 'opus',
125
- prompt
126
- });
127
-
128
- // 3. Parse structured result
129
- const result = parseDecompositionResult(response);
130
-
131
- // 4. Validate no file conflicts
132
- const { isValid, conflicts } = validateFileOwnership(result.subtasks);
133
-
134
- // 5. Extract shared files from subtasks
135
- const finalResult = extractSharedFiles(result);
136
- ```
137
-
138
- **Process:**
139
- 1. Analyze task requirements via Architect agent
140
- 2. Identify independent components with file boundaries
141
- 3. Assign agent type (executor-low/executor/executor-high) per complexity
142
- 4. Map dependencies between subtasks (blockedBy)
143
- 5. Generate parallel execution groups
144
- 6. Identify shared files (handled by coordinator)
145
-
146
- **Output:** Structured `DecompositionResult`:
147
-
148
- ```json
149
- {
150
- "subtasks": [
151
- {
152
- "id": "1",
153
- "description": "Backend API routes",
154
- "files": ["src/api/routes.ts", "src/api/handlers.ts"],
155
- "blockedBy": [],
156
- "agentType": "executor",
157
- "model": "sonnet"
158
- },
159
- {
160
- "id": "2",
161
- "description": "Frontend components",
162
- "files": ["src/ui/App.tsx", "src/ui/TodoList.tsx"],
163
- "blockedBy": [],
164
- "agentType": "executor",
165
- "model": "sonnet"
166
- },
167
- {
168
- "id": "3",
169
- "description": "Wire frontend to backend",
170
- "files": ["src/client/api.ts"],
171
- "blockedBy": ["1", "2"],
172
- "agentType": "executor-low",
173
- "model": "haiku"
174
- }
175
- ],
176
- "sharedFiles": [
177
- "package.json",
178
- "tsconfig.json",
179
- "README.md"
180
- ],
181
- "parallelGroups": [["1", "2"], ["3"]]
182
- }
183
- ```
184
-
185
- **Decomposition Types:**
186
-
187
- | Type | Description | Use Case |
188
- |------|-------------|----------|
189
- | `DecomposedTask` | Full task with id, files, blockedBy, agentType, model | Intelligent worker spawning |
190
- | `DecompositionResult` | Complete result with subtasks, sharedFiles, parallelGroups | Full decomposition output |
191
- | `toSimpleSubtasks()` | Convert to string[] for legacy compatibility | Simple task lists |
192
-
193
- ### Phase 2: File Ownership Partitioning
194
-
195
- **Goal:** Assign exclusive file sets to workers
196
-
197
- **Rules:**
198
- 1. **Exclusive ownership** - No file in multiple worker sets
199
- 2. **Shared files deferred** - Handled sequentially in integration
200
- 3. **Boundary files tracked** - Files that import across boundaries
201
-
202
- **Data Structure:** `.omx/state/ultrapilot-ownership.json`
203
-
204
- ```json
205
- {
206
- "sessionId": "ultrapilot-20260123-1234",
207
- "workers": {
208
- "worker-1": {
209
- "ownedFiles": ["src/api/routes.ts", "src/api/handlers.ts"],
210
- "ownedGlobs": ["src/api/**"],
211
- "boundaryImports": ["src/types.ts"]
212
- },
213
- "worker-2": {
214
- "ownedFiles": ["src/ui/App.tsx", "src/ui/TodoList.tsx"],
215
- "ownedGlobs": ["src/ui/**"],
216
- "boundaryImports": ["src/types.ts"]
217
- }
218
- },
219
- "sharedFiles": ["package.json", "tsconfig.json", "src/types.ts"],
220
- "conflictPolicy": "coordinator-handles"
221
- }
222
- ```
223
-
224
- ### Phase 3: Parallel Execution
225
-
226
- **Goal:** Run all workers simultaneously
227
-
228
- **Spawn Workers:**
229
- ```javascript
230
- // Pseudocode
231
- workers = [];
232
- for (subtask in decomposition.subtasks) {
233
- workers.push(
234
- spawn_sub_agent(
235
- subagent_type: "oh-my-codex:executor",
236
- model: "sonnet",
237
- prompt: `ULTRAPILOT WORKER ${subtask.id}
238
-
239
- Your exclusive file ownership: ${subtask.files}
240
-
241
- Task: ${subtask.description}
242
-
243
- CRITICAL RULES:
244
- 1. ONLY modify files in your ownership set
245
- 2. If you need to modify a shared file, document the change in your output
246
- 3. Do NOT create new files outside your ownership
247
- 4. Track all imports from boundary files
248
-
249
- Deliver: Code changes + list of boundary dependencies`,
250
- run_in_background: true
251
- )
252
- );
253
- }
254
- ```
255
-
256
- **Monitoring:**
257
- - Poll TaskOutput for each worker
258
- - Track completion status
259
- - Detect conflicts early
260
- - Accumulate boundary dependencies
261
-
262
- **Max Workers:** 5 (Codex CLI limit)
263
-
264
- ### Phase 4: Integration
265
-
266
- **Goal:** Merge all worker changes and handle shared files
267
-
268
- **Process:**
269
- 1. **Collect outputs** - Gather all worker deliverables
270
- 2. **Detect conflicts** - Check for unexpected overlaps
271
- 3. **Handle shared files** - Sequential updates to package.json, etc.
272
- 4. **Integrate boundary files** - Merge type definitions, shared utilities
273
- 5. **Resolve imports** - Ensure cross-boundary imports are valid
274
-
275
- **Agent:** Executor (Sonnet) - sequential processing
276
-
277
- **Conflict Resolution:**
278
- - If workers unexpectedly touched same file → manual merge
279
- - If shared file needs multiple changes → sequential apply
280
- - If boundary file changed → validate all dependent workers
281
-
282
- ### Phase 5: Validation
283
-
284
- **Goal:** Verify integrated system works
285
-
286
- **Checks (parallel):**
287
- 1. **Build** - Run the project's build command
288
- 2. **Lint** - Run the project's lint command
289
- 3. **Type check** - Run the project's type check command
290
- 4. **Unit tests** - All tests pass
291
- 5. **Integration tests** - Cross-component tests
292
-
293
- **Agents (parallel):**
294
- - Build-fixer (Sonnet) - Fix build errors
295
- - Architect (Opus) - Functional completeness
296
- - Security-reviewer (Opus) - Cross-component vulnerabilities
297
-
298
- **Retry Policy:** Up to 3 validation rounds. If failures persist, detailed error report to user.
299
-
300
- ## State Management
301
-
302
- ### Session State
303
-
304
- **Location:** `.omx/ultrapilot-state.json`
305
-
306
- ```json
307
- {
308
- "sessionId": "ultrapilot-20260123-1234",
309
- "taskDescription": "Build a full-stack todo app",
310
- "phase": "execution",
311
- "startTime": "2026-01-23T10:30:00Z",
312
- "decomposition": { /* from Phase 1 */ },
313
- "workers": {
314
- "worker-1": {
315
- "status": "running",
316
- "taskId": "task-abc123",
317
- "startTime": "2026-01-23T10:31:00Z",
318
- "estimatedDuration": "5m"
319
- }
320
- },
321
- "conflicts": [],
322
- "validationAttempts": 0
323
- }
324
- ```
325
-
326
- ### File Ownership Map
327
-
328
- **Location:** `.omx/state/ultrapilot-ownership.json`
329
-
330
- Tracks which worker owns which files (see Phase 2 example above).
331
-
332
- ### Progress Tracking
333
-
334
- **Location:** `.omx/ultrapilot/progress.json`
335
-
336
- ```json
337
- {
338
- "totalWorkers": 5,
339
- "completedWorkers": 3,
340
- "activeWorkers": 2,
341
- "failedWorkers": 0,
342
- "estimatedTimeRemaining": "2m30s"
343
- }
344
- ```
345
-
346
- ## Configuration
347
-
348
- Optional settings in `~/.codex/config.toml`:
349
-
350
- ```toml
351
- [omc.ultrapilot]
352
- maxWorkers = 5
353
- maxValidationRounds = 3
354
- conflictPolicy = "coordinator-handles"
355
- fallbackToAutopilot = true
356
- parallelThreshold = 2
357
- pauseAfterDecomposition = false
358
- verboseProgress = true
359
- ```
360
-
361
- **Settings Explained:**
362
- - `maxWorkers` - Max parallel workers (5 is Codex CLI limit)
363
- - `maxValidationRounds` - Validation retry attempts
364
- - `conflictPolicy` - "coordinator-handles" or "abort-on-conflict"
365
- - `fallbackToAutopilot` - Auto-switch if task not parallelizable
366
- - `parallelThreshold` - Min subtasks to use ultrapilot (else fallback)
367
- - `pauseAfterDecomposition` - Confirm with user before execution
368
- - `verboseProgress` - Show detailed worker progress
369
-
370
- ## Cancellation
371
-
372
- ```
373
- /cancel
374
- ```
375
-
376
- Or say: "stop", "cancel ultrapilot", "abort"
377
-
378
- **Behavior:**
379
- - All active workers gracefully terminated
380
- - Partial progress saved to state file
381
- - Session can be resumed
382
-
383
- ## Resume
384
-
385
- If ultrapilot was cancelled or a worker failed:
386
-
387
- ```
388
- /ultrapilot resume
389
- ```
390
-
391
- **Resume Logic:**
392
- - Restart failed workers only
393
- - Re-use completed worker outputs
394
- - Continue from last phase
395
-
396
- ## Examples
397
-
398
- ### Example 1: Full-Stack App
399
-
400
- ```
401
- /ultrapilot Build a todo app with React frontend, Express backend, and PostgreSQL database
402
- ```
403
-
404
- **Workers:**
405
- 1. Frontend (src/client/)
406
- 2. Backend (src/server/)
407
- 3. Database (src/db/)
408
- 4. Tests (tests/)
409
- 5. Docs (docs/)
410
-
411
- **Shared Files:** package.json, docker-compose.yml, README.md
412
-
413
- **Duration:** ~15 minutes (vs ~75 minutes sequential)
414
-
415
- ### Example 2: Multi-Service Refactor
416
-
417
- ```
418
- /up Refactor all services to use dependency injection
419
- ```
420
-
421
- **Workers:**
422
- 1. Auth service
423
- 2. User service
424
- 3. Payment service
425
- 4. Notification service
426
-
427
- **Shared Files:** src/types/services.ts, tsconfig.json
428
-
429
- **Duration:** ~8 minutes (vs ~32 minutes sequential)
430
-
431
- ### Example 3: Test Coverage
432
-
433
- ```
434
- /ultrapilot Generate tests for all untested modules
435
- ```
436
-
437
- **Workers:**
438
- 1. API tests
439
- 2. UI component tests
440
- 3. Database tests
441
- 4. Utility tests
442
- 5. Integration tests
443
-
444
- **Shared Files:** jest.config.js, test-utils.ts
445
-
446
- **Duration:** ~10 minutes (vs ~50 minutes sequential)
447
-
448
- ## Best Practices
449
-
450
- 1. **Clear module boundaries** - Works best with well-separated code
451
- 2. **Minimal shared state** - Reduces integration complexity
452
- 3. **Trust the decomposition** - Architect knows what's parallel-safe
453
- 4. **Monitor progress** - Check `.omx/ultrapilot/progress.json`
454
- 5. **Review conflicts early** - Don't wait until integration
455
-
456
- ## File Ownership Strategy
457
-
458
- ### Ownership Types
459
-
460
- **Exclusive Ownership:**
461
- - Worker has sole write access
462
- - No other worker can touch these files
463
- - Worker can create new files in owned directories
464
-
465
- **Shared Files:**
466
- - No worker has exclusive access
467
- - Handled sequentially in integration phase
468
- - Includes: package.json, tsconfig.json, config files, root README
469
-
470
- **Boundary Files:**
471
- - Can be read by all workers
472
- - Write access determined by usage analysis
473
- - Typically: type definitions, shared utilities, interfaces
474
-
475
- ### Ownership Detection Algorithm
476
-
477
- ```
478
- For each file in codebase:
479
- If file in shared_patterns (package.json, *.config.js):
480
- → sharedFiles
481
-
482
- Else if file imported by 2+ subtask modules:
483
- → boundaryFiles
484
- → Assign to most relevant worker OR defer to shared
485
-
486
- Else if file in subtask directory:
487
- → Assign to subtask worker
488
-
489
- Else:
490
- → sharedFiles (safe default)
491
- ```
492
-
493
- ### Shared File Patterns
494
-
495
- Automatically classified as shared:
496
- - `package.json`, `package-lock.json`
497
- - `tsconfig.json`, `*.config.js`, `*.config.ts`
498
- - `.eslintrc.*`, `.prettierrc.*`
499
- - `README.md`, `CONTRIBUTING.md`, `LICENSE`
500
- - Docker files: `Dockerfile`, `docker-compose.yml`
501
- - CI files: `.github/**`, `.gitlab-ci.yml`
502
-
503
- ## Conflict Handling
504
-
505
- ### Conflict Types
506
-
507
- **Unexpected Overlap:**
508
- - Two workers modified the same file
509
- - **Resolution:** Coordinator merges with human confirmation
510
-
511
- **Shared File Contention:**
512
- - Multiple workers need to update package.json
513
- - **Resolution:** Sequential application in integration phase
514
-
515
- **Boundary File Conflict:**
516
- - Type definition needed by multiple workers
517
- - **Resolution:** First worker creates, others import
518
-
519
- ### Conflict Policy
520
-
521
- **coordinator-handles (default):**
522
- - Coordinator attempts automatic merge
523
- - Falls back to user if complex
524
-
525
- **abort-on-conflict:**
526
- - Any conflict immediately cancels ultrapilot
527
- - User reviews conflict report
528
- - Can resume after manual fix
529
-
530
- ## Troubleshooting
531
-
532
- **Decomposition fails?**
533
- - Task may be too coupled
534
- - Fallback to autopilot triggered automatically
535
- - Review `.omx/ultrapilot/decomposition.json` for details
536
-
537
- **Worker hangs?**
538
- - Check worker logs in `.omx/logs/ultrapilot-worker-N.log`
539
- - Cancel and restart that worker
540
- - May indicate file ownership issue
541
-
542
- **Integration conflicts?**
543
- - Review `.omx/ultrapilot-state.json` conflicts array
544
- - Check if shared files were unexpectedly modified
545
- - Adjust ownership rules if needed
546
-
547
- **Validation loops?**
548
- - Cross-component integration issue
549
- - Review boundary imports
550
- - May need sequential retry with full context
551
-
552
- **Too slow?**
553
- - Check if workers are truly independent
554
- - Review decomposition quality
555
- - Consider if autopilot would be faster (high interdependency)
556
-
557
- ## Differences from Autopilot
558
-
559
- | Feature | Autopilot | Ultrapilot |
560
- |---------|-----------|------------|
561
- | Execution | Sequential | Parallel (up to 5x) |
562
- | Best For | Single-threaded tasks | Multi-component systems |
563
- | Complexity | Lower | Higher |
564
- | Speed | Standard | 3-5x faster (suitable tasks) |
565
- | File Conflicts | N/A | Ownership partitioning |
566
- | Fallback | N/A | Can fallback to autopilot |
567
- | Setup | Instant | Decomposition phase (~1-2 min) |
568
-
569
- **Rule of Thumb:** If task has 3+ independent components, use ultrapilot. Otherwise, use autopilot.
570
-
571
- ## Advanced: Custom Decomposition
572
-
573
- You can provide a custom decomposition file to skip Phase 1:
574
-
575
- **Location:** `.omx/ultrapilot/custom-decomposition.json`
576
-
577
- ```json
578
- {
579
- "subtasks": [
580
- {
581
- "id": "worker-auth",
582
- "description": "Add OAuth2 authentication",
583
- "files": ["src/auth/**", "src/middleware/auth.ts"],
584
- "dependencies": ["src/types/user.ts"]
585
- },
586
- {
587
- "id": "worker-db",
588
- "description": "Add user table and migrations",
589
- "files": ["src/db/migrations/**", "src/db/models/user.ts"],
590
- "dependencies": []
591
- }
592
- ],
593
- "sharedFiles": ["package.json", "src/types/user.ts"]
594
- }
595
- ```
596
-
597
- Then run:
598
- ```
599
- /ultrapilot --custom-decomposition
600
- ```
601
-
602
- ## STATE CLEANUP ON COMPLETION
603
-
604
- **IMPORTANT: Delete state files on completion - do NOT just set `active: false`**
605
-
606
- When all workers complete successfully:
607
-
608
- ```bash
609
- # Delete ultrapilot state files
610
- rm -f .omx/state/ultrapilot-state.json
611
- rm -f .omx/state/ultrapilot-ownership.json
612
- ```
613
-
614
- ## Future Enhancements
615
-
616
- **Planned for v4.1:**
617
- - Dynamic worker scaling (start with 2, spawn more if needed)
618
- - Predictive conflict detection (pre-integration analysis)
619
- - Worker-to-worker communication (for rare dependencies)
620
- - Speculative execution (optimistic parallelism)
621
- - Resume from integration phase (if validation fails)
622
-
623
- **Planned for v4.2:**
624
- - Multi-machine distribution (if Codex CLI supports)
625
- - Real-time progress dashboard
626
- - Worker performance analytics
627
- - Auto-tuning of decomposition strategy