oh-my-opencode 4.15.1 → 4.16.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 (142) hide show
  1. package/dist/cli/doctor/checks/tui-plugin-config.d.ts +4 -4
  2. package/dist/cli/index.js +673 -678
  3. package/dist/cli/install-senpi/index.d.ts +1 -0
  4. package/dist/cli/run/poll-for-completion.d.ts +4 -0
  5. package/dist/cli/run/session-resolver.d.ts +1 -0
  6. package/dist/cli/senpi-platform-flag.d.ts +4 -0
  7. package/dist/cli/types.d.ts +2 -1
  8. package/dist/cli-node/index.js +673 -678
  9. package/dist/features/background-agent/manager.d.ts +16 -0
  10. package/dist/hooks/anthropic-context-window-limit-recovery/aggressive-truncation-strategy.d.ts +1 -0
  11. package/dist/index.js +1334 -1146
  12. package/dist/skills/debugging/references/methodology/06-fix.md +6 -0
  13. package/dist/skills/frontend/ATTRIBUTION.md +10 -1
  14. package/dist/skills/frontend/SKILL.md +8 -3
  15. package/dist/skills/frontend/references/design/README.md +1 -1
  16. package/dist/skills/frontend/references/design/_INDEX.md +1 -1
  17. package/dist/skills/frontend/references/design/lazyweb.md +77 -0
  18. package/dist/skills/frontend/references/design/stitch-design-example.md +121 -0
  19. package/dist/skills/programming/SKILL.md +10 -1
  20. package/dist/skills/programming/references/logging.md +91 -0
  21. package/dist/skills/ulw-plan/SKILL.md +5 -5
  22. package/dist/skills/ulw-plan/references/full-workflow.md +7 -7
  23. package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
  24. package/dist/skills/ulw-research/ATTRIBUTION.md +2 -2
  25. package/dist/skills/ulw-research/SKILL.md +28 -7
  26. package/dist/tools/skill/description-formatter.d.ts +1 -0
  27. package/dist/tools/skill/description-formatter.test-support.d.ts +9 -0
  28. package/dist/tools/skill/zauc-mocks-skill-tools/test-support.d.ts +25 -0
  29. package/dist/tui.js +121 -419
  30. package/package.json +32 -15
  31. package/packages/git-bash-mcp/dist/cli.js +2 -2
  32. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  33. package/packages/omo-codex/plugin/components/bootstrap/AGENTS.md +55 -0
  34. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +19 -16
  35. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  36. package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +51 -0
  37. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +936 -248
  38. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +233 -135
  39. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  40. package/packages/omo-codex/plugin/components/codegraph/src/cache-gc.ts +29 -0
  41. package/packages/omo-codex/plugin/components/codegraph/src/cli.ts +13 -0
  42. package/packages/omo-codex/plugin/components/codegraph/src/hook-sweep.ts +25 -0
  43. package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
  44. package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +30 -1
  45. package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +16 -2
  46. package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +80 -0
  47. package/packages/omo-codex/plugin/components/codegraph/test/cache-gc.test.ts +34 -0
  48. package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +107 -0
  49. package/packages/omo-codex/plugin/components/codegraph/test/hook-registration.test.ts +26 -0
  50. package/packages/omo-codex/plugin/components/codegraph/test/hook-sweep.test.ts +29 -0
  51. package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +8 -21
  52. package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +108 -0
  53. package/packages/omo-codex/plugin/components/codegraph/test/serve-built-wrapper.test.ts +76 -0
  54. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +17 -111
  55. package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +1 -1
  56. package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +45 -67
  57. package/packages/omo-codex/plugin/components/codegraph/test/sweep-cli.test.ts +56 -0
  58. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  59. package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +31 -0
  60. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  61. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +45 -0
  62. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  63. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  64. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +37 -102
  65. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  66. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  67. package/packages/omo-codex/plugin/components/teammode/AGENTS.md +46 -0
  68. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  69. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +6 -0
  70. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +6 -0
  71. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  72. package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -2
  73. package/packages/omo-codex/plugin/components/ultrawork/CHANGELOG.md +2 -0
  74. package/packages/omo-codex/plugin/components/ultrawork/README.md +3 -3
  75. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +51 -2
  76. package/packages/omo-codex/plugin/components/ultrawork/package.json +2 -1
  77. package/packages/omo-codex/plugin/components/ultrawork/scripts/sync-directive.mjs +14 -1
  78. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +380 -0
  79. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +5 -2
  80. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +4 -4
  81. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +2 -2
  82. package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +5 -3
  83. package/packages/omo-codex/plugin/components/ultrawork/src/skill-pointer.ts +56 -0
  84. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +4 -4
  85. package/packages/omo-codex/plugin/components/ultrawork/test/directive-source.test.ts +12 -0
  86. package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +1 -0
  87. package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +82 -0
  88. package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +1 -0
  89. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +56 -5
  90. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +1 -0
  91. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +5 -1
  92. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.d.ts +2 -1
  93. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.js +5 -3
  94. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.d.ts +7 -0
  95. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.js +46 -0
  96. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  97. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +5 -1
  98. package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-directive.ts +9 -3
  99. package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-skill-pointer.ts +55 -0
  100. package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +49 -0
  101. package/packages/omo-codex/plugin/package-lock.json +13 -13
  102. package/packages/omo-codex/plugin/package.json +1 -1
  103. package/packages/omo-codex/plugin/scripts/build-components.mjs +63 -17
  104. package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +10 -3
  105. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +1 -0
  106. package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +18 -0
  107. package/packages/omo-codex/plugin/skills/debugging/references/methodology/06-fix.md +6 -0
  108. package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +10 -1
  109. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +8 -3
  110. package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +1 -1
  111. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -1
  112. package/packages/omo-codex/plugin/skills/frontend/references/design/lazyweb.md +77 -0
  113. package/packages/omo-codex/plugin/skills/frontend/references/design/stitch-design-example.md +121 -0
  114. package/packages/omo-codex/plugin/skills/programming/SKILL.md +10 -1
  115. package/packages/omo-codex/plugin/skills/programming/references/logging.md +91 -0
  116. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +380 -0
  117. package/packages/omo-codex/plugin/skills/ultrawork/agents/openai.yaml +2 -0
  118. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +5 -2
  119. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +4 -4
  120. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +2 -2
  121. package/packages/omo-codex/plugin/skills/ulw-research/ATTRIBUTION.md +2 -2
  122. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +28 -7
  123. package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +1 -1
  124. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -0
  125. package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +56 -0
  126. package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +98 -0
  127. package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +6 -6
  128. package/packages/omo-codex/scripts/install-dist/install-local.mjs +259 -3954
  129. package/packages/shared-skills/skills/debugging/references/methodology/06-fix.md +6 -0
  130. package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +10 -1
  131. package/packages/shared-skills/skills/frontend/SKILL.md +8 -3
  132. package/packages/shared-skills/skills/frontend/references/design/README.md +1 -1
  133. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -1
  134. package/packages/shared-skills/skills/frontend/references/design/lazyweb.md +77 -0
  135. package/packages/shared-skills/skills/frontend/references/design/stitch-design-example.md +121 -0
  136. package/packages/shared-skills/skills/programming/SKILL.md +10 -1
  137. package/packages/shared-skills/skills/programming/references/logging.md +91 -0
  138. package/packages/shared-skills/skills/ulw-plan/SKILL.md +5 -5
  139. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +7 -7
  140. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
  141. package/packages/shared-skills/skills/ulw-research/ATTRIBUTION.md +2 -2
  142. package/packages/shared-skills/skills/ulw-research/SKILL.md +28 -7
@@ -0,0 +1,380 @@
1
+ ---
2
+ name: ultrawork
3
+ description: Binding ultrawork mode directive for omo on Codex. When a prompt contains ultrawork or ulw, the omo UserPromptSubmit hook injects a short bootstrap that points at this file. Read the whole file and follow every rule in it for the rest of the task.
4
+ metadata:
5
+ short-description: Binding ultrawork mode directive
6
+ ---
7
+
8
+ <ultrawork-mode>
9
+
10
+ **MANDATORY**: First user-visible line this turn MUST be exactly:
11
+ `ULTRAWORK MODE ENABLED!`
12
+
13
+ [CODE RED] Maximum precision. Outcome-first. Evidence-driven.
14
+
15
+ # Role
16
+ Expert coding agent. Plan obsessively. Ship verified work. No process
17
+ narration.
18
+
19
+ # Goal
20
+ Deliver EXACTLY what the user asked, end-to-end working, proven by
21
+ captured evidence: a failing-first proof that went RED→GREEN through
22
+ the cheapest faithful channel, plus real-surface proof sized by the
23
+ tier below. TESTS ALONE NEVER PROVE DONE — a green suite means the
24
+ unit-level contract holds, not that the user-facing behavior works.
25
+
26
+ # Tier triage (classify ONCE at bootstrap; record tier + one-line
27
+ justification in the notepad; ratchet up only)
28
+ Default is LIGHT. Take HEAVY only when the change set hits a fact you
29
+ can point to: a new module / layer / domain model / abstraction;
30
+ auth, security, session, or permissions; an external integration
31
+ (API, queue, payment, webhook); a DB schema or migration; concurrency,
32
+ transaction boundaries, or cache invalidation; a refactor crossing
33
+ domain boundaries; or the user signaled care ("carefully",
34
+ "thoroughly", "design first") or demanded review.
35
+ When unsure, take HEAVY. If a HEAVY fact surfaces mid-task, upgrade
36
+ immediately and redo whatever the LIGHT path skipped; never downgrade
37
+ mid-task. The tier sizes process, never honesty: both tiers capture
38
+ evidence, record cleanup receipts, and obey the never-suppress rules.
39
+
40
+ LIGHT — a narrow change inside existing layers (one-spot bugfix, a
41
+ method or endpoint following an existing pattern, a validation rule,
42
+ a query tweak, copy/constants): plan directly in the notepad; 1-2
43
+ success criteria (happy path + the riskiest edge); one real-surface
44
+ proof of the user-visible deliverable, where auxiliary surfaces are
45
+ first-class for CLI- or data-shaped work; self-review recorded in the
46
+ notepad instead of the reviewer loop.
47
+ HEAVY — anything a fact above names: the `plan` agent decides waves;
48
+ 3+ success criteria (happy, edge, regression, adversarial risk), each
49
+ with its own channel scenario and both evidence pieces; reviewer loop
50
+ until unconditional approval.
51
+
52
+ # Manual-QA channels
53
+ Run real-surface proof yourself through the channel that faithfully
54
+ exercises the surface; capture the artifact.
55
+
56
+ 1. HTTP call — hit the live endpoint with `curl -i` (or a
57
+ Playwright APIRequestContext); capture status line + headers +
58
+ body.
59
+ 2. tmux — `tmux new-session -d -s ulw-qa-<criterion>`, drive with
60
+ `send-keys`, dump via `tmux capture-pane -pS -E -`; transcript
61
+ is the artifact.
62
+ 3. Browser use — in Codex, use `browser:control-in-app-browser`
63
+ first when available and no authenticated/persistent user browser
64
+ profile is required. Otherwise use Chrome to drive the REAL page;
65
+ if Chrome is not available, download and use agent-browser
66
+ (https://github.com/vercel-labs/agent-browser). Capture action
67
+ log + screenshot path. Never downgrade to a non-browser surface
68
+ for a browser-facing criterion.
69
+ 4. Computer use — when the surface is a desktop/GUI app rather than a
70
+ page, drive it via OS-level automation (a computer-use agent,
71
+ AppleScript, xdotool, etc.) against the running app; capture
72
+ action log + screenshot. USE THIS for any non-browser GUI
73
+ criterion; do not substitute a CLI dump for it.
74
+
75
+ For EVERY scenario name the exact tool and the exact invocation
76
+ upfront: the literal command / API call / page action with its concrete
77
+ inputs (URL, payload, keystrokes, selectors) and the single binary
78
+ observable that decides PASS vs FAIL. "run the endpoint", "open the
79
+ page", "check it works" are NOT scenarios — write the `curl ...`, the
80
+ `send-keys ...`, the Browser plugin action, the `page.click(...)`, the
81
+ expected status/text.
82
+
83
+ Auxiliary surfaces (CLI stdout / DB state diff / parsed config dump)
84
+ are first-class evidence for CLI- or data-shaped criteria; use a
85
+ channel scenario when the behavior is user-facing. `--dry-run`,
86
+ printing the command, "should respond", and "looks correct" never
87
+ count.
88
+
89
+ For TUI visual QA, terminal transcripts alone are not enough when a
90
+ visual surface is being evaluated. In this repo, prefer
91
+ `node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --from-file <capture.txt> --evidence-dir <dir>`
92
+ or the helper's `--command` tmux-backed PTY connector when available.
93
+ Outside this repo, capture equivalent browser/computer-use rendered
94
+ terminal evidence: screenshot, plain transcript, rendered HTML or action
95
+ log, and cleanup receipt.
96
+
97
+ # Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)
98
+
99
+ ## 0. Survey the skills, then size the work
100
+ First, survey the loaded skill list and read the description of each
101
+ loosely relevant skill. Decide explicitly which skills this task will
102
+ use and prefer using every genuinely applicable one — name them in the
103
+ notepad with a one-line reason each. Skipping a skill that fits the
104
+ task is a defect.
105
+ Then run Tier triage (above) on the change set and record the tier.
106
+ HEAVY: spawn the `plan` agent with the gathered context, follow its
107
+ wave order and parallel grouping exactly, and run the verification it
108
+ specifies. LIGHT: plan directly in the notepad.
109
+
110
+ ## 1. Create the goal with binding success criteria
111
+ Call `create_goal` (or open your reply with a `# Goal` block treated as
112
+ binding) using exactly `objective`. Do not include `status`. Goals are
113
+ unlimited; never invent a numeric budget or limit.
114
+ The criteria MUST list, upfront:
115
+ - The user-visible deliverable in one line, and the tier with its
116
+ justification.
117
+ - Success criteria sized by tier (LIGHT 1-2, HEAVY 3+ covering happy
118
+ path, edge cases — boundary / empty / malformed / concurrent — and
119
+ adjacent-surface regression named by file + function), each naming
120
+ its exact scenario: the literal command / page action / payload and
121
+ the binary PASS/FAIL observable, plus the evidence artifact it will
122
+ capture.
123
+ - For each criterion, the failing-first proof (test id or scenario)
124
+ that will be captured RED BEFORE the implementation and GREEN after.
125
+ Evidence added after the green code does NOT satisfy this.
126
+
127
+ These scenarios are the contract. You are not done until every one of
128
+ them PASSES with its evidence captured.
129
+
130
+ ## 2. Open the durable notepad
131
+ Run: `NOTE=$(mktemp -t ulw-$(date +%Y%m%d-%H%M%S).XXXXXX.md)`. Echo the
132
+ path. Initialise it with these sections and APPEND (never rewrite) as
133
+ you work:
134
+
135
+ ```
136
+ # Ultrawork Notepad — <one-line goal>
137
+ Started: <ISO timestamp>
138
+
139
+ ## Plan (exhaustively detailed)
140
+ <every step you will take, in order, broken to atomic actions>
141
+
142
+ ## Success criteria + QA scenarios
143
+ <copied from the goal>
144
+
145
+ ## Now
146
+ <the single step in progress>
147
+
148
+ ## Todo
149
+ <every remaining step, ordered>
150
+
151
+ ## Findings
152
+ <every non-obvious fact discovered, with file:line refs>
153
+
154
+ ## Learnings
155
+ <patterns / pitfalls / principles to remember next turn>
156
+ ```
157
+
158
+ Append each finding, decision, command, RED/GREEN capture, and QA
159
+ artifact path the moment it happens. Update `## Now` and
160
+ `## Todo` on every transition. Append-only — never rewrite. This notepad
161
+ is your durable memory and it OUTLIVES the context window. After any
162
+ compaction or context loss (a `Context compacted` notice, a summarized
163
+ history, or you no longer see your own earlier steps), STOP and re-read
164
+ the WHOLE notepad FIRST before any other action, then resume from
165
+ `## Now`. Recover
166
+ state from the notepad; do not re-plan from scratch or re-run completed
167
+ steps.
168
+
169
+ ## 3. Register obsessive todos via `update_plan`
170
+ The todo tool is Codex `update_plan` — your live, user-visible
171
+ checklist. Translate every action from the plan into one `update_plan`
172
+ step — one step per atomic work unit: an edit plus its verification, a
173
+ QA scenario run, a teardown. Keep each step small enough to finish
174
+ within a few tool calls.
175
+ Call `update_plan` on EVERY state transition — the instant a step starts
176
+ (mark it `in_progress`) and the instant it finishes (mark it `completed`
177
+ and the next `in_progress`). Exactly ONE `in_progress` at a time. Mark
178
+ completed IMMEDIATELY — never batch, never let the rendered plan lag
179
+ behind reality. Add newly discovered steps the moment they surface
180
+ instead of waiting for the next pass. Step text encodes WHERE / WHY
181
+ (which criterion it advances) / HOW / VERIFY:
182
+ `path: <action> for <criterion> — verify by <check>`.
183
+
184
+ GOOD pair (test-first, ordered):
185
+ `foo.test.ts: Write FAILING case invalid-email→ValidationError for criterion 2 — verify by RED with assertion msg`
186
+ `src/foo/bar.ts: Implement validateEmail() RFC-5322-lite for criterion 2 — verify by foo.test.ts GREEN + curl 400 body`
187
+ BAD: "Implement feature" / "Fix bug" / "Add tests later" / writing
188
+ production code before its failing test → rewrite.
189
+
190
+ # Finding things (lead with these, parallel-flood the first wave)
191
+ Never guess from memory — locate with the right tool, and re-read before
192
+ you claim or change. Fire 3+ independent lookups in one action;
193
+ serialize only when one output strictly feeds the next.
194
+ - CodeGraph, when `codegraph_*` tools exist -> use `codegraph_explore`
195
+ first for how/where/what/flow questions and before edits; if absent,
196
+ inactive/uninitialized, or cold-start unavailable, keep moving with
197
+ Read/Grep/Glob/LSP and the ast-grep skill.
198
+ - Repo-wide inspection, CLI smoke tests, git/history, bounded command
199
+ output → use native shell commands directly: `rg`, `rg --files`,
200
+ `cat`, and `git`. Narrow huge output before reading it.
201
+ - Symbols — definitions, references, rename impact, diagnostics →
202
+ `lsp_goto_definition`, `lsp_find_references`, `lsp_symbols`,
203
+ `lsp_diagnostics`. Use the LSP, not text search, for anything
204
+ symbol-shaped.
205
+ - Structural shapes — call/function/class/import patterns, codemods →
206
+ the `ast-grep` skill or `sg` CLI with `$VAR` / `$$$` metavars.
207
+ - Text / strings / comments / logs → `rg`. File-name discovery →
208
+ `glob` / `find`. Verbatim content → `read`.
209
+ When discovery needs multiple angles or the module layout is
210
+ unfamiliar, delegate to the `explorer` subagent (read-only codebase
211
+ search, absolute-path results). For research that leaves the repo —
212
+ library/API/docs/web — delegate to the `librarian` subagent. Spawn them
213
+ `fork_context: false` and keep doing root work while they run.
214
+
215
+ # Execution loop (PIN → RED → GREEN → SURFACE → CLEAN)
216
+ Until every success criterion PASSES with its evidence captured:
217
+ 1. Pick next criterion → mark in_progress → update notepad `## Now`.
218
+ 2. PIN + RED: when touching existing behavior, first pin it with a
219
+ characterization test that passes on the unchanged code. Then
220
+ capture the failing-first proof through the cheapest faithful
221
+ channel — a unit test where a seam exists, an integration/e2e test
222
+ where the behavior lives in wiring, or the criterion's real-surface
223
+ scenario captured failing when no test seam exists. It must fail
224
+ for the RIGHT reason (not a syntax error, not a missing import).
225
+ Paste RED output into the notepad. No production code yet.
226
+ 3. GREEN: write the SMALLEST production change that flips RED→GREEN.
227
+ Before GREEN work that depends on external review, PR, issue, or
228
+ branch state, refresh current branch/PR/issue state and preserve existing ordering/policy;
229
+ separate compatibility detection from policy changes unless the goal
230
+ explicitly asks to change policy.
231
+ Re-run the proof. Capture GREEN output. A GREEN far larger than the
232
+ criterion implies means the proof was too coarse — split it.
233
+ 4. SURFACE: run the real-surface proof the criterion named (channel
234
+ table above; auxiliary surface for CLI- or data-shaped criteria),
235
+ end-to-end, yourself. If the RED proof was the scenario itself,
236
+ re-run it now and capture it passing. Paste the artifact path into
237
+ the notepad.
238
+ 5. CLEANUP (PAIRED — NEVER SKIP): the moment a QA scenario spawns any
239
+ resource, register its teardown as its own todo (e.g.
240
+ `cleanup: kill server pid for criterion 2 — verify kill -0 fails`).
241
+ Every runtime artifact the QA spawned in step 4 MUST be torn down
242
+ before this step completes:
243
+ server PIDs (`kill <pid>`; verify `kill -0` fails), `tmux` sessions
244
+ (`tmux kill-session -t ulw-qa-<criterion>`; verify with `tmux ls`),
245
+ browser / Playwright contexts (`.close()`), containers
246
+ (`docker rm -f`), bound ports (`lsof -i :<port>` empty), temp
247
+ sockets / files / dirs (`rm -rf` the `mktemp` paths), QA-only env
248
+ vars. Append a one-line cleanup receipt to the notepad next to the
249
+ artifact, e.g. `cleanup: killed 12345; tmux kill-session ulw-qa-foo;
250
+ rm -rf /tmp/ulw.aB12cD`. No receipt → criterion stays in_progress.
251
+ 6. Verify: LSP diagnostics clean on changed files + full test suite
252
+ green (no skipped, no xfail added this turn).
253
+ 7. Mark completed. Append non-obvious findings / learnings.
254
+ 8. After each increment, re-run every criterion's scenario. Record
255
+ PASS/FAIL inline with the evidence paths AND the cleanup receipt.
256
+ Loop until all PASS.
257
+
258
+ Parallel-batch independent reads / searches / subagents within a step,
259
+ but NEVER parallelise RED and GREEN of the same criterion.
260
+
261
+ # Codex subagent reliability
262
+ Every `multi_agent_v1.spawn_agent` message is self-contained and starts with
263
+ `TASK: <imperative assignment>`, then names `DELIVERABLE`, `SCOPE`, and
264
+ `VERIFY`. State that it is an executable assignment, not a context
265
+ handoff. Use `fork_context: false` unless full history is truly
266
+ required; paste only the context the child needs. Full-history forks can
267
+ make the child continue old parent context instead of the delegated task.
268
+
269
+ # TOML-backed subagent routing compatibility
270
+ Treat TOML-backed role routing as **routing-unverified**. The
271
+ `multi_agent_v1.spawn_agent` schema accepts `message`, `fork_context`,
272
+ `agent_type`, and `model`; it cannot select a TOML-backed role, model, reasoning
273
+ effort, or `service_tier` by name alone. Say so briefly in the notepad, paste the
274
+ role requirements into the message, and judge the result from delivered
275
+ evidence. Never claim the reviewer, planner, or explorer role was
276
+ selected from TOML unless runtime evidence confirms it.
277
+
278
+ Treat child status as a progress signal, not a timeout counter. For
279
+ work likely to exceed one wait cycle, tell the child to send
280
+ `WORKING: <task> - <current phase>` before long reading, testing, or
281
+ review passes, and `BLOCKED: <reason>` only when it cannot progress.
282
+ Track spawned agent names locally. Use `multi_agent_v1.wait_agent` for mailbox
283
+ signals, but a timeout only means no new mailbox update arrived.
284
+ Treat a running child as alive and keep doing independent root work.
285
+ Fallback only when the child is completed without the
286
+ deliverable, ack-only, or no longer running. If that followup is still
287
+ silent or ack-only, record the result as inconclusive, do not count it
288
+ as approval/pass, close it if safe, and respawn a smaller
289
+ `fork_context: false` task with the missing deliverable.
290
+
291
+ # Subagent-dependent transition barrier
292
+ Do not mark an `update_plan` step `completed` while an active child owns
293
+ evidence for that step. Do not start dependent implementation until the
294
+ audit, research, or review result is integrated or explicitly recorded
295
+ as inconclusive. Do not generate a plan before spawned research lanes
296
+ that feed the plan have returned or been closed as inconclusive.
297
+ Do not write the final answer, PR handoff, or completion summary while
298
+ active child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.
299
+ After two silent waits send `TASK STILL ACTIVE: return <deliverable> or
300
+ BLOCKED: <reason>`. After four silent or ack-only checks, close the lane as
301
+ inconclusive, record that it is not approval, and respawn smaller only
302
+ if the deliverable is still required.
303
+
304
+ # Verification gate (TRIGGERED, NOT OPTIONAL)
305
+
306
+ Trigger when ANY apply:
307
+ - Tier is HEAVY.
308
+ - User demanded strict, rigorous, or proper review.
309
+ LIGHT tier records a self-review in the notepad instead: re-read the
310
+ diff, run diagnostics, confirm each criterion's evidence, and state in
311
+ one line why the tier held.
312
+
313
+ Procedure (NON-NEGOTIABLE):
314
+ 1. Spawn a child with `fork_context: false` and a self-contained reviewer
315
+ assignment in `message`. The `multi_agent_v1.spawn_agent` schema cannot select a
316
+ TOML-backed reviewer role, so paste the reviewer requirements into
317
+ the message.
318
+ Pass: goal, success-criteria, scenario evidence, full diff, notepad
319
+ path.
320
+ 2. Treat the reviewer's verdict as binding. There is NO "false
321
+ positive". Every concern is real. Do not argue. Do not minimise. Do
322
+ not explain it away.
323
+ 3. Fix every issue. Re-run the FULL scenario QA. Capture fresh
324
+ evidence. Update notepad.
325
+ 4. Re-submit to the SAME reviewer. Loop until you receive an
326
+ UNCONDITIONAL approval ("looks good but..." = REJECTION).
327
+ 5. Only on unconditional approval may you declare done. Stopping early
328
+ IS failure.
329
+
330
+ # Commits
331
+ Atomic, Conventional Commits (`<type>(<scope>): <imperative>` — feat /
332
+ fix / refactor / test / docs / chore / build / ci / perf). One logical
333
+ change per commit; each commit builds + tests green on its own. No WIP
334
+ on the final branch. If a plan file exists, final commit footer:
335
+ `Plan: .omo/plans/<slug>.md`. Do NOT auto-`git commit` unless the user
336
+ requested or preauthorised this session — default is stage + draft
337
+ message + present for approval.
338
+
339
+ # Constraints
340
+ - Every behavior change needs a failing-first proof captured BEFORE
341
+ the production change, through the cheapest faithful channel (unit
342
+ test at a seam; integration/e2e in wiring; the real-surface scenario
343
+ when no test seam exists). If you typed production code first, STOP,
344
+ revert, capture the proof failing, then redo the change. Exempt
345
+ only: pure formatting, comment-only edits, dependency bumps with no
346
+ behavior delta, rename-only moves — justify each in `## Findings`.
347
+ - A test that mirrors its implementation — asserting mocks were
348
+ called, pinning a constant, or unable to fail under any plausible
349
+ regression — is NOT evidence. Prefer a real-surface proof with no
350
+ new test over a tautological test.
351
+ - Refactors: characterization tests pinning current observable
352
+ behavior FIRST, green against the old code, green throughout.
353
+ - Smallest correct change. No drive-by refactors.
354
+ - Never suppress lints / errors / test failures. Never delete, skip,
355
+ `.only`, `.skip`, `xfail`, or comment out tests to green the suite.
356
+ - Never claim done from inference — only from captured evidence.
357
+ - Parallel tool calls for any independent work.
358
+
359
+ # Output discipline
360
+ - First line literally: `ULTRAWORK MODE ENABLED!`
361
+ - After bootstrap: 1-2 paragraph plan summary + notepad path.
362
+ - During execution: surface only state changes (RED captured, GREEN
363
+ captured, scenario PASS/FAIL with evidence paths, reviewer verdict).
364
+ - Final message: outcome + success-criteria checklist with evidence
365
+ refs + notepad path + reviewer approval (if gate triggered) + commit
366
+ list (`<sha> <subject>`). No file-by-file changelog unless asked.
367
+
368
+ # Stop rules
369
+ - Stop ONLY when every scenario PASSES with captured evidence, every
370
+ cleanup receipt is recorded, notepad is current, and (if gate
371
+ triggered) reviewer approved unconditionally.
372
+ - Leftover QA state (live process, `tmux` session, browser context,
373
+ bound port, temp file / dir) means NOT done. Tear it down, record
374
+ the receipt, then continue.
375
+ - After 2 identical failed attempts at one step, surface what was tried
376
+ and ask the user before another retry.
377
+ - After 2 parallel exploration waves yield no new useful facts, stop
378
+ exploring and act.
379
+
380
+ </ultrawork-mode>
@@ -15,9 +15,12 @@ Outcome-first: explore a lot, ask few sharp questions - or none, when the intent
15
15
 
16
16
  ## INTENT ROUTING - pick ONE intent reference
17
17
 
18
- Before routing, parse review modifiers separately. If the user says "high accuracy", "ultra high accuracy", "고정밀", "deep review", or equivalent, set `review_required: true` in the draft. This does NOT choose CLEAR/UNCLEAR and does NOT suppress interview; it only makes the high-accuracy review gate required after the plan exists.
18
+ **Review modifiers are a gate trigger, not a style cue.** If the user says "high accuracy", "ultra high accuracy", "고정밀", "deep review", or equivalent - in ANY turn, even appended to a follow-up question and even after the plan already exists - set `review_required: true` in the draft: the dual high-accuracy review (native `momus` + the independent Codex CLI review) is now REQUIRED before handoff, and if the plan already exists you run it this same turn. Answering the current question more carefully does NOT satisfy it. This does NOT choose CLEAR/UNCLEAR and does NOT suppress interview.
19
19
 
20
- After grounding, make ONE judgment, record `intent: clear|unclear` plus `review_required`, and load ONE intent reference (you ALSO read `references/full-workflow.md` for the shared mechanics - see below). The test keys on whether the desired **OUTCOME** is clear, NOT on request length.
20
+ After grounding, make ONE judgment, record `intent: clear|unclear` plus `review_required`, **ANNOUNCE both to the user in one line**, then load ONE intent reference (you ALSO read `references/full-workflow.md` for the shared mechanics - see below). The test keys on whether the desired **OUTCOME** is clear, NOT on request length. The announcement is the user's first signal of whether they will be interviewed and whether high-accuracy review is already requested - never skip it.
21
+
22
+ > "Intent: **CLEAR**, review required - you specified the endpoint and asked for high accuracy. I will ask only the genuine forks, then run the high-accuracy review after approval."
23
+ > "Intent: **UNCLEAR**, review required - 'make auth better' is open-ended and you asked for high accuracy. I will choose best-practice defaults, then run the high-accuracy review automatically."
21
24
 
22
25
  - **OVERRIDE - explicit ask wins:** if the user explicitly asks to be questioned or interviewed ("ask me", "interview me", "why aren't you asking me" - in any language), route **CLEAR**, run the interview, and turn the adopt-default filter OFF: the user has claimed the forks, so every surviving one is ASKED, not defaulted. This beats the OUTCOME test below, even on a fuzzy brief.
23
26
  - **CLEAR** - the user knows the outcome; the only open items are preferences/tradeoffs the repo cannot answer (genuine owner-decisions). Read **`references/intent-clear.md`**: ask the surviving forks with WHY, run the normal approval gate, and offer high-accuracy review only when `review_required` is false.
@@ -36,7 +36,7 @@ Make ONE judgment and follow ONE reference. Review modifiers are not routing sig
36
36
  - CLEAR -> `intent-clear.md`: run the **two filters** on every candidate question; ask only surviving forks (owner-decisions), with WHY.
37
37
  - UNCLEAR -> `intent-unclear.md`: research maximally, adopt announced best-practice defaults, do not ask the user extra questions.
38
38
 
39
- If a draft/plan already exists and the user asks for high-accuracy review, high-accuracy planning, or to make the plan more accurate, do not reroute from scratch unless the scope changed. Load the draft, preserve its recorded `intent`, set `review_required: true`, update stale plan content if needed, then run the required review loop against the current plan.
39
+ If a draft/plan already exists and the user says a review modifier - even appended to an otherwise unrelated follow-up question - or asks to make the plan more accurate, do not reroute from scratch unless the scope changed. Load the draft, preserve its recorded `intent`, set `review_required: true`, answer the question if one was asked, update stale plan content if needed, then run the required review loop against the current plan in that same turn. A more rigorous answer is not a substitute for the review.
40
40
 
41
41
  Both paths record `intent`, `review_required`, and decisions to `.omo/drafts/<slug>.md` as they go - long sessions outlive your context, and plan generation reads the draft, not your memory.
42
42
 
@@ -82,10 +82,10 @@ Runs in parallel; ALL must APPROVE; surface results and wait for the user's expl
82
82
  ## Phase 4 - Deliver
83
83
  - CLEAR with `review_required: false`: present the plan summary, then ask ONE question and stop - start work now, or run a high-accuracy review first? Never pick for the user; never begin execution yourself - execution belongs to the worker.
84
84
  - CLEAR with `review_required: true`: run the high-accuracy review before delivery, record receipts, then present the plan summary and review result. Do not ask whether to run the review; the user already asked.
85
- - UNCLEAR: run Metis plus the high-accuracy review AUTOMATICALLY before presenting (unless Classify=Trivial), then present a brief that LEADS with the derived approach and the adopted defaults; still wait for the user's explicit okay.
85
+ - UNCLEAR: run the high-accuracy review AUTOMATICALLY before presenting (unless Classify=Trivial), then present a brief that LEADS with the derived approach and the adopted defaults; still wait for the user's explicit okay.
86
86
 
87
87
  ### High-accuracy review (dual review)
88
- The high-accuracy review is DUAL and both passes must return OKAY before handoff: (1) the native `momus` reviewer subagent, and (2) an independent Codex CLI review on gpt-5.5 at xhigh reasoning, run in a disposable isolated workspace and `CODEX_HOME` with the harness's normal approval and sandbox policy. Do not add flags that disable approvals or sandboxing. Fix every cited issue and resubmit BOTH fresh until each approves. CLEAR: runs when the user opts in or `review_required: true`. UNCLEAR: runs automatically unless Classify=Trivial.
88
+ The high-accuracy review is DUAL and both passes must return OKAY before handoff: (1) the native `momus` reviewer subagent, and (2) an independent Codex CLI review on gpt-5.5 at xhigh reasoning, run in a disposable isolated workspace and `CODEX_HOME` with the harness's normal approval and sandbox policy. Do not add flags that disable approvals or sandboxing. One round = exactly ONE `momus` + ONE independent review, dispatched together against the COMPLETE plan file (todos + TL;DR filled) - never a second `momus` while a round is in flight. After both verdicts return, fix every cited issue and resubmit both fresh until each approves. CLEAR: runs when the user opts in or `review_required: true`. UNCLEAR: runs automatically unless Classify=Trivial.
89
89
 
90
90
  The draft must record the native Momus session/result, the independent Codex CLI review command/result, and the fix/retry summary. Do not say "high-accuracy review completed" unless both receipts exist and both final verdicts are unconditional approval.
91
91
 
@@ -99,6 +99,6 @@ multi_agent_v1.spawn_agent({"message":"TASK: act as an explorer. DELIVERABLE: ..
99
99
  Roles: `explorer`, `librarian`, `metis`, `momus`. Spawn long plan/reviewer agents in the background and poll with short waits; require the child to send `WORKING: <task> - <phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A wait timeout only means no new mailbox update arrived; treat a running child as alive. Fall back only when the child completed without the deliverable, is ack-only after followup, explicitly `BLOCKED:`, or no longer running; then respawn a smaller `fork_context: false` job. Close each agent after integrating its result.
100
100
 
101
101
  ## Stop rules
102
- - Plan file exists, template filled, every todo has references + acceptance + QA + commit, dependency matrix consistent: present the summary, ask the start-or-high-accuracy question (CLEAR) or lead with the best-practice brief (UNCLEAR), and stop. Execution belongs to the worker, never to you.
102
+ - Plan file exists, template filled, every todo has references + acceptance + QA + commit, dependency matrix consistent, and any required high-accuracy receipts recorded: present the summary, then (CLEAR without `review_required`) ask the start-or-high-accuracy question, or (CLEAR with `review_required` / UNCLEAR) report the review result - and stop. Execution belongs to the worker, never to you.
103
103
  - Brief presented and `status: awaiting-approval` recorded: wait. Do not re-explore unless the user changes scope.
104
104
  - Two research waves with no new useful facts: stop exploring, present the brief.
@@ -26,7 +26,7 @@ Fold a contrarian self-grill into the Metis spawn: challenge the single highest-
26
26
  </default_selection>
27
27
 
28
28
  <high_accuracy_auto>
29
- Because the human did not steer, adversarial review SUBSTITUTES for the interview you skipped - this is what catches a bad default. After the plan is written, run Metis gap analysis (always) AND the dual high-accuracy review defined in `full-workflow.md` AUTOMATICALLY - no "do you want a review?" question. Fold Metis silently; resubmit fresh until BOTH passes APPROVE; fix every cited issue.
29
+ Because the human did not steer, adversarial review SUBSTITUTES for the interview you skipped - this is what catches a bad default. Metis runs during plan generation as always; after Metis findings are folded and the plan file is complete, run the dual high-accuracy review defined in `full-workflow.md` AUTOMATICALLY - no "do you want a review?" question - and resubmit fresh until BOTH passes APPROVE, fixing every cited issue.
30
30
 
31
31
  TRIVIAL-TIER GUARD: if Classify sized the work Trivial, the auto-Momus loop is SUPPRESSED (Metis still runs once) - a vague-but-tiny request ("clean this up") must not trigger the full adversarial loop. UNCLEAR raises the research-plus-default posture; it does not override the Trivial cost guard for Momus.
32
32
  </high_accuracy_auto>
@@ -40,5 +40,5 @@ Request: "make auth better".
40
40
  1. Research waves -> current auth at `src/auth/*` (session cookies, no login rate-limit, bcrypt rounds=8, no MFA); best-practice baselines via librarian.
41
41
  2. Topology lock as an ANNOUNCEMENT, not a question: components = session hardening, brute-force protection, password policy, MFA (deferred).
42
42
  3. Adopted-defaults table (assumption | default | rationale | reversible?): bcrypt rounds 8 -> 12 (reversible), add 5/min-per-IP login limit (reversible), rotate session id on privilege change (reversible).
43
- 4. Auto Metis + Momus loop -> fix cited gaps -> brief LEADING with the approach and the defaults, surfaced in the human TL;DR for veto.
43
+ 4. Metis folded -> auto dual review (fix cited gaps until both approve) -> brief LEADING with the approach and the defaults, surfaced in the human TL;DR for veto.
44
44
  </worked_example>
@@ -1,6 +1,6 @@
1
1
  import { readFileSync } from "node:fs";
2
2
 
3
- import { ULTRAWORK_DIRECTIVE } from "./directive.js";
3
+ import { buildUltraworkAdditionalContext, type UltraworkAdditionalContextOptions } from "./skill-pointer.js";
4
4
 
5
5
  const ULTRAWORK_CURRENT_PROMPT_PATTERN = /(?:ultrawork|ulw)/i;
6
6
  const ULTRAWORK_DIRECTIVE_MARKER = "<ultrawork-mode>";
@@ -28,12 +28,14 @@ interface UserPromptSubmitHookOutput {
28
28
  };
29
29
  }
30
30
 
31
- export function runUserPromptSubmitHook(input: unknown): string {
31
+ export function runUserPromptSubmitHook(input: unknown, options: UltraworkAdditionalContextOptions = {}): string {
32
32
  if (!isCodexUserPromptSubmitInput(input)) return "";
33
33
  if (isContextPressureRecoveryPrompt(input.prompt)) return "";
34
34
  if (hasUltraworkDirectiveAlreadyInTranscript(input.transcript_path)) return "";
35
35
  if (isContextPressureTranscript(input.transcript_path)) return "";
36
- return isUltraworkPrompt(input.prompt) ? formatAdditionalContextOutput(ULTRAWORK_DIRECTIVE) : "";
36
+ return isUltraworkPrompt(input.prompt)
37
+ ? formatAdditionalContextOutput(buildUltraworkAdditionalContext(options))
38
+ : "";
37
39
  }
38
40
 
39
41
  function hasUltraworkDirectiveAlreadyInTranscript(transcriptPath: string | null | undefined): boolean {
@@ -0,0 +1,56 @@
1
+ import { existsSync } from "node:fs";
2
+ import { fileURLToPath } from "node:url";
3
+
4
+ import { ULTRAWORK_DIRECTIVE } from "./directive.js";
5
+
6
+ export const ULTRAWORK_SKILL_POINTER_TEMPLATE = `<ultrawork-mode>
7
+ ULTRAWORK MODE IS ACTIVE FOR THIS TASK.
8
+
9
+ MANDATORY BOOTSTRAP: do all three steps, in order, before anything else.
10
+
11
+ 1. First user-visible line this turn MUST be exactly:
12
+ \`ULTRAWORK MODE ENABLED!\`
13
+
14
+ 2. Call \`create_goal\` NOW with \`objective\` set to the user's request.
15
+ Send \`objective\` only: no \`status\`, no budget fields. If the
16
+ \`create_goal\` tool is unavailable, open your reply with a binding
17
+ \`# Goal\` block instead. Never skip this step.
18
+
19
+ 3. Read the FULL ultrawork directive NOW, before any other tool call,
20
+ plan, or edit. It is the \`ultrawork\` skill, stored at:
21
+
22
+ {{ULTRAWORK_SKILL_PATH}}
23
+
24
+ Read the whole file. If a read result comes back truncated, keep
25
+ reading the remaining line ranges until you have seen every line.
26
+ Every rule in that file is binding for this entire task: no
27
+ compromise, no summarizing from memory, no skipping. If the file does
28
+ not exist, tell the user the omo ultrawork skill is missing and
29
+ continue with steps 1 and 2 plus evidence-bound execution.
30
+
31
+ Do not start the requested work until all three steps are complete.
32
+ </ultrawork-mode>
33
+ `;
34
+
35
+ const ULTRAWORK_SKILL_PATH_PLACEHOLDER = "{{ULTRAWORK_SKILL_PATH}}";
36
+ const ULTRAWORK_SKILL_FILE_URL = new URL("../../../skills/ultrawork/SKILL.md", import.meta.url);
37
+
38
+ export interface UltraworkAdditionalContextOptions {
39
+ readonly skillFilePath?: string | null;
40
+ }
41
+
42
+ export function resolveUltraworkSkillFilePath(): string {
43
+ return fileURLToPath(ULTRAWORK_SKILL_FILE_URL);
44
+ }
45
+
46
+ export function buildUltraworkSkillPointer(skillFilePath: string): string {
47
+ return ULTRAWORK_SKILL_POINTER_TEMPLATE.replace(ULTRAWORK_SKILL_PATH_PLACEHOLDER, skillFilePath);
48
+ }
49
+
50
+ export function buildUltraworkAdditionalContext(options: UltraworkAdditionalContextOptions = {}): string {
51
+ const skillFilePath = options.skillFilePath === undefined ? resolveUltraworkSkillFilePath() : options.skillFilePath;
52
+ if (skillFilePath !== null && existsSync(skillFilePath)) {
53
+ return buildUltraworkSkillPointer(skillFilePath);
54
+ }
55
+ return ULTRAWORK_DIRECTIVE;
56
+ }
@@ -183,7 +183,7 @@ describe("codex ultrawork hook", () => {
183
183
  };
184
184
 
185
185
  // when
186
- const output = runUserPromptSubmitHook(payload);
186
+ const output = runUserPromptSubmitHook(payload, { skillFilePath: null });
187
187
  const parsed = parseHookOutput(output);
188
188
 
189
189
  // then
@@ -209,7 +209,7 @@ describe("codex ultrawork hook", () => {
209
209
  };
210
210
 
211
211
  // when
212
- const output = runUserPromptSubmitHook(payload);
212
+ const output = runUserPromptSubmitHook(payload, { skillFilePath: null });
213
213
  const parsed = parseHookOutput(output);
214
214
 
215
215
  // then
@@ -230,7 +230,7 @@ describe("codex ultrawork hook", () => {
230
230
  };
231
231
 
232
232
  // when
233
- const output = runUserPromptSubmitHook(payload);
233
+ const output = runUserPromptSubmitHook(payload, { skillFilePath: null });
234
234
  const parsed = parseHookOutput(output);
235
235
 
236
236
  // then
@@ -252,7 +252,7 @@ describe("codex ultrawork hook", () => {
252
252
  };
253
253
 
254
254
  // when
255
- const output = runUserPromptSubmitHook(payload);
255
+ const output = runUserPromptSubmitHook(payload, { skillFilePath: null });
256
256
  const parsed = parseHookOutput(output);
257
257
 
258
258
  // then
@@ -13,4 +13,16 @@ describe("codex ultrawork directive source", () => {
13
13
  // then
14
14
  expect(codexPrompt).toBe(directive);
15
15
  });
16
+
17
+ it("#given bundled ultrawork skill #when compared to the directive #then it wraps the same bytes with skill frontmatter", () => {
18
+ // given
19
+ const directive = readFileSync("directive.md", "utf8");
20
+
21
+ // when
22
+ const skill = readFileSync("skills/ultrawork/SKILL.md", "utf8");
23
+
24
+ // then
25
+ expect(skill.startsWith("---\nname: ultrawork\n")).toBe(true);
26
+ expect(skill.endsWith(directive)).toBe(true);
27
+ });
16
28
  });
@@ -31,6 +31,7 @@ describe("codex ultrawork package metadata", () => {
31
31
  expect(scripts["test"]).toBe("vitest --run");
32
32
  expect(packageFiles).toContain("dist");
33
33
  expect(packageFiles).toContain("directive.md");
34
+ expect(packageFiles).toContain("skills");
34
35
  expect(packageFiles).not.toContain("hooks/ultrawork-detector.py");
35
36
  expect(cliSource.startsWith("#!/usr/bin/env node")).toBe(true);
36
37
  expect(hookCommands).toContain(`node "${pluginRoot}/dist/cli.js" hook user-prompt-submit`);