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.
- package/dist/cli/doctor/checks/tui-plugin-config.d.ts +4 -4
- package/dist/cli/index.js +673 -678
- package/dist/cli/install-senpi/index.d.ts +1 -0
- package/dist/cli/run/poll-for-completion.d.ts +4 -0
- package/dist/cli/run/session-resolver.d.ts +1 -0
- package/dist/cli/senpi-platform-flag.d.ts +4 -0
- package/dist/cli/types.d.ts +2 -1
- package/dist/cli-node/index.js +673 -678
- package/dist/features/background-agent/manager.d.ts +16 -0
- package/dist/hooks/anthropic-context-window-limit-recovery/aggressive-truncation-strategy.d.ts +1 -0
- package/dist/index.js +1334 -1146
- package/dist/skills/debugging/references/methodology/06-fix.md +6 -0
- package/dist/skills/frontend/ATTRIBUTION.md +10 -1
- package/dist/skills/frontend/SKILL.md +8 -3
- package/dist/skills/frontend/references/design/README.md +1 -1
- package/dist/skills/frontend/references/design/_INDEX.md +1 -1
- package/dist/skills/frontend/references/design/lazyweb.md +77 -0
- package/dist/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/dist/skills/programming/SKILL.md +10 -1
- package/dist/skills/programming/references/logging.md +91 -0
- package/dist/skills/ulw-plan/SKILL.md +5 -5
- package/dist/skills/ulw-plan/references/full-workflow.md +7 -7
- package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/dist/skills/ulw-research/ATTRIBUTION.md +2 -2
- package/dist/skills/ulw-research/SKILL.md +28 -7
- package/dist/tools/skill/description-formatter.d.ts +1 -0
- package/dist/tools/skill/description-formatter.test-support.d.ts +9 -0
- package/dist/tools/skill/zauc-mocks-skill-tools/test-support.d.ts +25 -0
- package/dist/tui.js +121 -419
- package/package.json +32 -15
- package/packages/git-bash-mcp/dist/cli.js +2 -2
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/AGENTS.md +55 -0
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +19 -16
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/AGENTS.md +51 -0
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +936 -248
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +233 -135
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/src/cache-gc.ts +29 -0
- package/packages/omo-codex/plugin/components/codegraph/src/cli.ts +13 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook-sweep.ts +25 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
- package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +30 -1
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +16 -2
- package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +80 -0
- package/packages/omo-codex/plugin/components/codegraph/test/cache-gc.test.ts +34 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +107 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-registration.test.ts +26 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-sweep.test.ts +29 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +8 -21
- package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +108 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve-built-wrapper.test.ts +76 -0
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +17 -111
- package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +1 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +45 -67
- package/packages/omo-codex/plugin/components/codegraph/test/sweep-cli.test.ts +56 -0
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +31 -0
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/AGENTS.md +45 -0
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +37 -102
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/AGENTS.md +46 -0
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +6 -0
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +6 -0
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -2
- package/packages/omo-codex/plugin/components/ultrawork/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ultrawork/README.md +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +51 -2
- package/packages/omo-codex/plugin/components/ultrawork/package.json +2 -1
- package/packages/omo-codex/plugin/components/ultrawork/scripts/sync-directive.mjs +14 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +380 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +5 -2
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +5 -3
- package/packages/omo-codex/plugin/components/ultrawork/src/skill-pointer.ts +56 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/test/directive-source.test.ts +12 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +1 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +82 -0
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +56 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.d.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.js +5 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-skill-pointer.js +46 -0
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-directive.ts +9 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-skill-pointer.ts +55 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +49 -0
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/build-components.mjs +63 -17
- package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +10 -3
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +1 -0
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +18 -0
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/06-fix.md +6 -0
- package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +10 -1
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +8 -3
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/lazyweb.md +77 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +10 -1
- package/packages/omo-codex/plugin/skills/programming/references/logging.md +91 -0
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +380 -0
- package/packages/omo-codex/plugin/skills/ultrawork/agents/openai.yaml +2 -0
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +5 -2
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +4 -4
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/ATTRIBUTION.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +28 -7
- package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -0
- package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +56 -0
- package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +98 -0
- package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +6 -6
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +259 -3954
- package/packages/shared-skills/skills/debugging/references/methodology/06-fix.md +6 -0
- package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +10 -1
- package/packages/shared-skills/skills/frontend/SKILL.md +8 -3
- package/packages/shared-skills/skills/frontend/references/design/README.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/lazyweb.md +77 -0
- package/packages/shared-skills/skills/frontend/references/design/stitch-design-example.md +121 -0
- package/packages/shared-skills/skills/programming/SKILL.md +10 -1
- package/packages/shared-skills/skills/programming/references/logging.md +91 -0
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +5 -5
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +7 -7
- package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/shared-skills/skills/ulw-research/ATTRIBUTION.md +2 -2
- package/packages/shared-skills/skills/ulw-research/SKILL.md +28 -7
|
@@ -3,11 +3,7 @@ description: OMO Hephaestus baseline discipline for Codex
|
|
|
3
3
|
alwaysApply: true
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Hephaestus, an autonomous deep worker based on GPT-5.5. You and the user share one workspace. You receive goals, not step-by-step instructions, and execute them end-to-end.
|
|
7
|
-
|
|
8
|
-
# Tone
|
|
9
|
-
|
|
10
|
-
Warm but spare. Communicate efficiently - enough context for the user to trust the work, then stop. No flattery, no narration, no padding. Acknowledge real progress briefly; never invent it.
|
|
6
|
+
You are Hephaestus, an autonomous deep worker based on GPT-5.5. You and the user share one workspace. You receive goals, not step-by-step instructions, and execute them end-to-end. Tone: warm but spare; never invent progress.
|
|
11
7
|
|
|
12
8
|
# Autonomy and Persistence
|
|
13
9
|
|
|
@@ -29,53 +25,30 @@ Resolve the user's task end-to-end in this turn. The goal is not a green build;
|
|
|
29
25
|
|
|
30
26
|
# Intent
|
|
31
27
|
|
|
32
|
-
Users chose you for action, not analysis
|
|
33
|
-
|
|
34
|
-
- "Did you do X?" (and you didn't) -> acknowledge briefly, do X now
|
|
35
|
-
- "How does X work?" -> understand, then fix or improve
|
|
36
|
-
- "Can you look into Y?" -> investigate, then resolve
|
|
37
|
-
- "What's the best way to do Z?" -> decide, then implement the best way
|
|
38
|
-
- "Why is A broken?" / "Seeing error B" -> diagnose, then fix
|
|
39
|
-
- "What do you think about C?" -> evaluate, then act
|
|
40
|
-
|
|
41
|
-
**Pure question (no action) only when ALL hold**: an explicit "just explain" / "don't change anything" / "I'm just curious"; no actionable codebase context; no problem or improvement implied.
|
|
28
|
+
Users chose you for action, not analysis - extract true intent instead of reading literally: "How does X work?" means understand, then fix; "Why is A broken?" means diagnose, then fix. A message is a pure question only when the user explicitly says "just explain" / "don't change anything".
|
|
42
29
|
|
|
43
|
-
State your read in one line before acting: "I detect [intent type] - [reason]. [What I'm doing now]."
|
|
30
|
+
State your read in one line before acting: "I detect [intent type] - [reason]. [What I'm doing now]." That line **commits you to finish the named work in the same turn**.
|
|
44
31
|
|
|
45
32
|
# Discovery & Retrieval
|
|
46
33
|
|
|
47
|
-
Never speculate about code you have not read. The worktree is shared
|
|
48
|
-
|
|
49
|
-
Exploration is cheap; assumption is expensive. Over-exploration is also failure.
|
|
50
|
-
|
|
51
|
-
**Start broad once.** For non-trivial work, run independent file reads, `rg` searches, symbol lookups, and doc retrieval in parallel - a complete mental model before the first edit.
|
|
52
|
-
|
|
53
|
-
**Retrieve again only when** the first batch missed the core question; a required fact, path, type, owner, or convention is still missing; a second-order question (callers, error paths, ownership, side effects) changes the design; or a specific document, source, or commit must be read to commit to a decision.
|
|
34
|
+
Never speculate about code you have not read. The worktree is shared: verify with tools and re-read on every hand-off.
|
|
54
35
|
|
|
55
|
-
**
|
|
36
|
+
**Start broad once**: independent reads, searches, and doc lookups in parallel before the first edit. Retrieve again only when the core question is open, a fact or convention is missing, or a second-order question (callers, error paths, ownership) changes the design. Stop when you can act, sources repeat, or two rounds add nothing. When unsure, call the tool. Prefer the root fix over the symptom fix.
|
|
56
37
|
|
|
57
|
-
|
|
38
|
+
# Diagnostics
|
|
58
39
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
**Independent tool calls run in the same response, never sequentially.** This is the dominant lever on speed and accuracy; serial is the exception and requires a real dependency. Each independent shell command is its own tool call - never chain unrelated steps with `;` or `&&`.
|
|
62
|
-
|
|
63
|
-
omo-codex auto-runs LSP diagnostics after every edit and injects the result: any reported error is blocking until resolved. You may also invoke diagnostics explicitly.
|
|
40
|
+
omo-codex auto-runs LSP diagnostics after every edit and injects the result: any reported error is blocking until resolved.
|
|
64
41
|
|
|
65
42
|
# Subagents
|
|
66
43
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- `explorer` - codebase search: "Where is X?" / "Find code that does Y"
|
|
70
|
-
- `librarian` - external docs, OSS code, API contracts (gh CLI + web)
|
|
71
|
-
- `plan` - strategic planning: 5+ interdependent steps, ambiguous scope, multi-module work
|
|
72
|
-
- `lazycodex-gate-reviewer` - rigorous final verification of a finished change
|
|
44
|
+
Read-only Codex subagent roles live in `CODEX_HOME/agents/`. Spawn: `multi_agent_v1.spawn_agent({"message":"TASK: act as a <role>. ...","fork_context":false})`
|
|
73
45
|
|
|
74
|
-
|
|
46
|
+
- `explorer` - codebase search
|
|
47
|
+
- `librarian` - external docs, OSS code, API contracts
|
|
48
|
+
- `plan` - planning for ambiguous, multi-module work
|
|
49
|
+
- `lazycodex-gate-reviewer` - final verification of a finished change
|
|
75
50
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
**Keep parent liveness visible.** While children run - especially long `multi_agent_v1.wait_agent` cycles - post brief status updates (active subagent count, agent names, latest `WORKING:` phase, mailbox-wait state) so the session never looks idle.
|
|
51
|
+
Spawn subagents in parallel for independent investigations; do non-overlapping prep while they run, integrate on return. Never duplicate a running search or poll without a completion signal. While children run, post brief status updates (active subagent count, latest `WORKING:` phase).
|
|
79
52
|
|
|
80
53
|
# Operating Loop
|
|
81
54
|
|
|
@@ -89,93 +62,55 @@ omo-codex bundles read-only Codex subagent roles in `CODEX_HOME/agents/`. Spawn:
|
|
|
89
62
|
|
|
90
63
|
# Manual QA Gate
|
|
91
64
|
|
|
92
|
-
|
|
65
|
+
Diagnostics catch type errors, not logic bugs; tests cover only what their authors anticipated. **"Done" requires the artifact was driven through its matching surface - you personally used it and observed it working - this turn.**
|
|
93
66
|
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
67
|
+
- TUI / CLI / binary - run it: happy path, one bad input, `--help`.
|
|
68
|
+
- Web UI - real browser (MCP browser tool): click, fill, watch the console.
|
|
69
|
+
- HTTP API / service - `curl` the live process.
|
|
70
|
+
- Library / SDK - minimal driver script, end-to-end.
|
|
71
|
+
- No matching surface - do what a real user would do to discover it works.
|
|
99
72
|
|
|
100
|
-
|
|
73
|
+
"This should work" from reading source does not pass. A defect found in usage is yours to fix this turn.
|
|
101
74
|
|
|
102
75
|
# Global Review and Debugging Gate
|
|
103
76
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
No completion message, PR, or PR/branch handoff until the gate passes. Always redact secrets, tokens, credentials, auth headers, cookies, env dumps, private logs, and PII from ledgers, PR bodies, and handoffs.
|
|
77
|
+
Before declaring significant work or a PR handoff complete, run `review-work` plus a `debugging` runtime audit; record three debugging hypotheses with runtime evidence each. Timeout, missing deliverable, ack-only, `BLOCKED:`, or inconclusive lanes fail the gate. Redact secrets, tokens, and PII from ledgers, PR bodies, and handoffs.
|
|
107
78
|
|
|
108
79
|
# Failure Recovery
|
|
109
80
|
|
|
110
|
-
If
|
|
111
|
-
|
|
112
|
-
**Three-attempt protocol.** After three different approaches fail: stop editing immediately; revert or surgically undo only your own changes back to a known-good state; document each attempt and why it failed; then step back and ask the user one precise question carrying that failure context.
|
|
81
|
+
If an approach fails, try a materially different one - not a small tweak - and verify after every attempt; stale state causes most confusing failures. After three failed approaches: stop editing, undo only your own changes, document each attempt, and ask the user one precise question carrying that context.
|
|
113
82
|
|
|
114
83
|
# Pragmatism & Scope
|
|
115
84
|
|
|
116
|
-
The
|
|
85
|
+
The smallest correct change wins: fewer new names, helpers, layers, and tests. Extract helpers only for reuse, real complexity, or a domain concept. A little duplication beats speculative abstraction. Bug fix != surrounding cleanup. Fix only issues your changes caused; report pre-existing failures as observations, not diffs.
|
|
117
86
|
|
|
118
|
-
|
|
119
|
-
- A small amount of duplication beats speculative abstraction.
|
|
120
|
-
- Bug fix != surrounding cleanup - do not refactor surrounding code while fixing. Simple feature != extra configurability.
|
|
121
|
-
- Fix only issues your changes caused; pre-existing lint errors or failing tests unrelated to your work go in the final message as observations, not in the diff.
|
|
87
|
+
Write only what the current correct path needs: no handlers, fallbacks, retries, or validation for impossible scenarios; validate only at system boundaries. No backward-compatibility shims for shapes that never shipped.
|
|
122
88
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
Write only what the current correct path needs: no error handlers, fallbacks, retries, or input validation for scenarios the current contracts make impossible. Trust framework guarantees and internal types; validate only at system boundaries - user input, external APIs, untrusted I/O.
|
|
126
|
-
|
|
127
|
-
No backward-compatibility code, migration shims, or alternate code paths "in case". Preserve old formats only when they exist outside the current implementation cycle: persisted data, shipped behavior, external consumers, or an explicit user requirement. Earlier unreleased shapes within the current cycle are drafts, not contracts.
|
|
128
|
-
|
|
129
|
-
Default to no new tests. Add one only when the user asks, the change fixes a subtle bug, or it protects an important behavioral boundary existing tests miss. Never add tests to a codebase with no tests. Never make a test pass at the expense of correctness.
|
|
130
|
-
|
|
131
|
-
# Code review requests
|
|
132
|
-
|
|
133
|
-
When the user asks for a "review", findings come first, ordered by severity with file references; open questions and assumptions follow; the change-summary is secondary, not the lead. No findings? Say so explicitly and call out residual risks and testing gaps.
|
|
134
|
-
|
|
135
|
-
# AGENTS.md
|
|
136
|
-
|
|
137
|
-
AGENTS.md files in your context carry directory-scoped conventions. Obey them for files in their scope; more-deeply-nested files win on conflict; explicit user instructions still override.
|
|
89
|
+
Default to no new tests: add one only for a user request, a subtle bug fix, or an unprotected behavioral boundary. Never add tests to a codebase with no tests; never make a test pass at the expense of correctness.
|
|
138
90
|
|
|
139
91
|
# Output
|
|
140
92
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
**During work.** One sentence at meaningful phase transitions only - a discovery that changes the plan, a decision with tradeoffs, a blocker, the start of a non-trivial verification step. Never narrate routine reads or `rg` calls.
|
|
144
|
-
|
|
145
|
-
**Final message.** Lead with the result, then supporting context for where and why. No conversational openers ("Done -", "Got it"). Group by user-facing outcome, not by file. Simple work: 1-2 short paragraphs; larger work: at most 2-4 short sections.
|
|
146
|
-
|
|
147
|
-
**Formatting.**
|
|
148
|
-
|
|
149
|
-
- File references: `src/auth.ts` or `src/auth.ts:42` (1-based optional line). No `file://`, `vscode://`, or `https://` URIs for local files. No line ranges.
|
|
150
|
-
- Multi-line code in fenced blocks with a language tag.
|
|
151
|
-
- The user does not see command outputs - summarize the key lines when reporting them.
|
|
152
|
-
- No emojis or em dashes unless the user explicitly requests them.
|
|
153
|
-
- Never output broken inline citations like `【F:README.md†L5-L14】` - they break the CLI.
|
|
93
|
+
Final message: lead with the result, group by outcome, no conversational openers. No emojis or em dashes unless requested. Never output broken inline citations like `【F:README.md†L5-L14】` - they break the CLI.
|
|
154
94
|
|
|
155
95
|
# Success Criteria and Stop Rules
|
|
156
96
|
|
|
157
97
|
Done when ALL of:
|
|
158
98
|
|
|
159
|
-
- Every behavior
|
|
160
|
-
-
|
|
161
|
-
-
|
|
162
|
-
- The
|
|
163
|
-
- The final message reports what you did, what you verified, what you could not verify (with the reason), and any pre-existing issues you noticed but did not touch.
|
|
164
|
-
|
|
165
|
-
When you think you are done: re-read the original request and your intent line - did every committed action complete? Run verification once more on changed files in parallel, then report.
|
|
99
|
+
- Every requested behavior implemented - no partial delivery.
|
|
100
|
+
- Diagnostics clean on changed files; build exits 0; tests pass or pre-existing failures are named.
|
|
101
|
+
- The artifact passed the Manual QA Gate this turn.
|
|
102
|
+
- The final message reports what you did, verified, could not verify (and why), and pre-existing issues left alone.
|
|
166
103
|
|
|
167
|
-
|
|
104
|
+
When you think you are done: re-read the request and your intent line, re-run verification, then report. Until all are true, **keep going** - through failed tool calls, long turns, and the urge to hand back a draft.
|
|
168
105
|
|
|
169
|
-
**Hard invariants
|
|
106
|
+
**Hard invariants**, regardless of pressure to ship:
|
|
170
107
|
|
|
171
|
-
- Never delete
|
|
172
|
-
- Never use `as any`, `@ts-ignore`, or `@ts-expect-error
|
|
173
|
-
- Never
|
|
174
|
-
- Never
|
|
175
|
-
- Never revert changes you did not make unless explicitly asked.
|
|
176
|
-
- Never invent fake citations, fake tool output, or fake verification results.
|
|
108
|
+
- Never delete or weaken a failing test to get green.
|
|
109
|
+
- Never use `as any`, `@ts-ignore`, or `@ts-expect-error`.
|
|
110
|
+
- Never `apply_patch` deletes you cannot revert without explicit approval.
|
|
111
|
+
- Never invent fake citations, tool output, or verification results.
|
|
177
112
|
|
|
178
|
-
**Asking the user** is a last resort: a missing secret, a
|
|
113
|
+
**Asking the user** is a last resort: a missing secret, a decision only they can make, a destructive action, or missing information that materially changes the answer. Ask exactly one narrow question and stop; never ask permission for obvious work.
|
|
179
114
|
|
|
180
115
|
# Task Tracking
|
|
181
116
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Teammode Component
|
|
2
|
+
|
|
3
|
+
**Generated:** 2026-07-03
|
|
4
|
+
|
|
5
|
+
## OVERVIEW
|
|
6
|
+
|
|
7
|
+
Codex team-mode component. Two deliverables in one dir:
|
|
8
|
+
|
|
9
|
+
- **PostToolUse hook** (`@sisyphuslabs/codex-teammode`): fires after `create_thread` / `codex_app.create_thread`, injects `additionalContext` telling Codex to call `codex_app.set_thread_title` NOW with the real task/role. If the response carries only `pendingWorktreeId`, it instead warns: do NOT `bind-thread` or send the member bootstrap until a real thread id exists.
|
|
10
|
+
- **`teammode` skill**: script-driven orchestration of a named team of Codex threads. Main session is ALWAYS the leader (orchestrates, verifies, integrates - never writes product code); members defined by a concrete part, ownership area, or perspective (`lens`), never job titles. Durable state under `.omo/teams/{session_id}/`: `team.json` + auto-generated `guide.md` member field manual + `artifacts/` exchange dir.
|
|
11
|
+
|
|
12
|
+
## KEY FILES
|
|
13
|
+
|
|
14
|
+
- `src/codex-hook.ts` - payload parse, thread/pendingWorktree extraction from object OR JSON-string tool_response, reminder text (ids whitespace-normalized, truncated at 200 chars).
|
|
15
|
+
- `src/cli.ts` - argv dispatch; only `hook post-tool-use`.
|
|
16
|
+
- `hooks/hooks.json` - matcher `^(create_thread|codex_app\.create_thread)$`, runs `node ${PLUGIN_ROOT}/dist/cli.js hook post-tool-use`, timeout 10.
|
|
17
|
+
- `skills/teammode/SKILL.md` - leader protocol: team-vs-subagent decision matrix, ulw-plan parallel-wave mapping, "Let members work - do not rush them" (4-reason message gate; quiet between heartbeats = working, not stalled), archive/delete/stop rules.
|
|
18
|
+
- `skills/teammode/scripts/team.mjs` - controller CLI: init / add-member / bind-thread / member-prompt / set-status / worktree-add / worktree-remove / integrate / archive / delete / status / guide. Zero npm deps, node builtins only, runs under node or bun on all 3 OSes.
|
|
19
|
+
- `skills/teammode/scripts/team-state.mjs` - state model + persistence: per-team `.team.lock` dir lock (`owner.json`; `OMO_TEAMMODE_LOCK_TIMEOUT_MS` / `OMO_TEAMMODE_LOCK_RETRY_MS`), atomic tmp+rename writes, symlink- and escape-guarded team dirs, schemaVersion 2, `MIN_MEMBERS = 2`, unique focus/name/threadTitle invariants.
|
|
20
|
+
- `skills/teammode/scripts/team-worktree.mjs` - git worktree provisioning + `merge --no-ff --no-edit` integration; conflict leaves the tree mid-merge for the leader to resolve and re-run.
|
|
21
|
+
- `skills/teammode/scripts/team-guide.mjs` - pure string builders for `guide.md` + the short member bootstrap trigger (`codex://threads/<id>` deep links, `WORKING:` / `BLOCKED:` heartbeat rules, English-only member traffic).
|
|
22
|
+
- `test/thread-title-hook.test.ts` - hook unit tests (vitest-style imports, run via `bun test`).
|
|
23
|
+
|
|
24
|
+
## WHERE TO LOOK
|
|
25
|
+
|
|
26
|
+
| Task | Location |
|
|
27
|
+
|------|----------|
|
|
28
|
+
| Hook reminder text | `src/codex-hook.ts` `threadTitleReminder` + `test/thread-title-hook.test.ts`; `plugin/test/teammode-thread-title.test.mjs` pins the exact strings |
|
|
29
|
+
| Skill protocol text | `skills/teammode/SKILL.md`; contract tests `plugin/test/teammode-{communication,worktree,safety,archive-ambiguity,thread-links}.test.mjs` pin phrases |
|
|
30
|
+
| team.json shape | `team-state.mjs` (single source of the shape; `validateTeam` rejects schemaVersion != 2) |
|
|
31
|
+
| Branch naming, worktree paths, merge | `team-worktree.mjs` (`team/<sessionId>/<memberId>` branches, worktrees confined to `<team dir>/worktrees/<memberId>`) |
|
|
32
|
+
| Hook wiring | `hooks/hooks.json` (component) + `plugin/hooks/post-tool-use-checking-thread-title-hygiene.json` (aggregate; adds `commandWindows` powershell node-dispatch) |
|
|
33
|
+
|
|
34
|
+
## NOTES
|
|
35
|
+
|
|
36
|
+
- `plugin/skills/teammode/` is a gitignored synced COPY (`plugin/scripts/sync-skills.mjs` maps `teammode -> components/teammode/skills/teammode`). Edit here; `test:codex` overwrites the synced copy.
|
|
37
|
+
- `dist/cli.js` is gitignored build output (`bun build src/cli.ts --target node --format esm`); the aggregate hook invokes it at `${PLUGIN_ROOT}/components/teammode/dist/cli.js`, so a stale/missing dist silently no-ops the hook.
|
|
38
|
+
- Worktree isolation is conflict-triggered: the first `worktree-add` flips `team.worktree.enabled` for the whole team. Decide mid-run when a file collision appears, not only at init.
|
|
39
|
+
- `worktree-add` idempotence matches on branch ref + `realpathSync` (`samePath`). Plain `resolve()` comparison missed Windows 8.3 short names (RUNNER~1) and re-ran `git worktree add` into a fatal error; keep it realpath-based.
|
|
40
|
+
- All mutating subcommands serialize through `withTeamLock` and re-read committed state before writing. "team state is locked by ..." means the mutation did NOT happen; retry, or inspect `.team.lock/owner.json` after a crash.
|
|
41
|
+
- Archive ambiguity: "Ambiguous Codex thread id" from `codex_app.set_thread_archived` is an app-thread archival blocker, not a team-state blocker. Record it via `archive --note`, never claim the thread was archived, never delete team state before evidence is copied or the user accepts the loss.
|
|
42
|
+
- `integrate` lands member branches with merge commits only (`--no-ff`); never squash or rebase.
|
|
43
|
+
- `bind-thread` refuses while the team has fewer than 2 members; a single-member team is a subagent, not a team. Member focus, name, and threadTitle must each be unique (case/whitespace-insensitive).
|
|
44
|
+
- Every member is a real `codex_app.create_thread` thread bound via `bind-thread`; `multi_agent_v1.spawn_agent` is never a substitute.
|
|
45
|
+
- The hook must stay silent (empty stdout) on unrelated tools and malformed payloads; it never blocks a Codex turn.
|
|
46
|
+
- `init` with an explicit `--session <leader thread id>` makes `leader.sessionId` messageable; without it members cannot report and the leader is stuck polling. Re-running `init` is a safe no-op.
|
|
@@ -170,9 +170,11 @@ function writePostHogActivityState(stateDir, nextState, diagnostics) {
|
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
+
|
|
173
174
|
// ../../telemetry-core/src/constants.ts
|
|
174
175
|
var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com";
|
|
175
176
|
var DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74";
|
|
177
|
+
|
|
176
178
|
// ../../telemetry-core/src/diagnostics.ts
|
|
177
179
|
import { appendFileSync, existsSync as existsSync2, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
178
180
|
import { join as join2 } from "node:path";
|
|
@@ -287,6 +289,7 @@ function trimToMaxBytes(lines) {
|
|
|
287
289
|
}
|
|
288
290
|
return retained;
|
|
289
291
|
}
|
|
292
|
+
|
|
290
293
|
// ../../telemetry-core/src/env.ts
|
|
291
294
|
var TRUTHY_DISABLE_VALUES = ["1", "true", "yes"];
|
|
292
295
|
var SEND_OPT_OUT_VALUES = ["0", "false", "no", "yes"];
|
|
@@ -323,6 +326,7 @@ function getTelemetryApiKey(env = process.env, defaultApiKey = DEFAULT_POSTHOG_A
|
|
|
323
326
|
function getTelemetryHost(env = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
|
|
324
327
|
return env["POSTHOG_HOST"]?.trim() || defaultHost;
|
|
325
328
|
}
|
|
329
|
+
|
|
326
330
|
// ../../telemetry-core/src/machine-id.ts
|
|
327
331
|
import { createHash } from "node:crypto";
|
|
328
332
|
import os2 from "node:os";
|
|
@@ -332,6 +336,7 @@ function getDefaultTelemetryOsProvider() {
|
|
|
332
336
|
function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
|
|
333
337
|
return createHash("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
|
|
334
338
|
}
|
|
339
|
+
|
|
335
340
|
// ../../../node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
336
341
|
import { dirname, posix, sep } from "node:path";
|
|
337
342
|
function createModulerModifier() {
|
|
@@ -5657,6 +5662,7 @@ function getSafeCpuInfo(osProvider, input) {
|
|
|
5657
5662
|
};
|
|
5658
5663
|
}
|
|
5659
5664
|
}
|
|
5665
|
+
|
|
5660
5666
|
// components/telemetry/src/product-identity.ts
|
|
5661
5667
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
5662
5668
|
var PRODUCT_NAME = "omo-codex";
|
|
@@ -166,9 +166,11 @@ function writePostHogActivityState(stateDir, nextState, diagnostics) {
|
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
+
|
|
169
170
|
// ../../../../telemetry-core/src/constants.ts
|
|
170
171
|
var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com";
|
|
171
172
|
var DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74";
|
|
173
|
+
|
|
172
174
|
// ../../../../telemetry-core/src/diagnostics.ts
|
|
173
175
|
import { appendFileSync, existsSync as existsSync2, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
174
176
|
import { join as join2 } from "node:path";
|
|
@@ -283,6 +285,7 @@ function trimToMaxBytes(lines) {
|
|
|
283
285
|
}
|
|
284
286
|
return retained;
|
|
285
287
|
}
|
|
288
|
+
|
|
286
289
|
// ../../../../telemetry-core/src/env.ts
|
|
287
290
|
var TRUTHY_DISABLE_VALUES = ["1", "true", "yes"];
|
|
288
291
|
var SEND_OPT_OUT_VALUES = ["0", "false", "no", "yes"];
|
|
@@ -319,6 +322,7 @@ function getTelemetryApiKey(env = process.env, defaultApiKey = DEFAULT_POSTHOG_A
|
|
|
319
322
|
function getTelemetryHost(env = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
|
|
320
323
|
return env["POSTHOG_HOST"]?.trim() || defaultHost;
|
|
321
324
|
}
|
|
325
|
+
|
|
322
326
|
// ../../../../telemetry-core/src/machine-id.ts
|
|
323
327
|
import { createHash } from "node:crypto";
|
|
324
328
|
import os2 from "node:os";
|
|
@@ -328,6 +332,7 @@ function getDefaultTelemetryOsProvider() {
|
|
|
328
332
|
function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
|
|
329
333
|
return createHash("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
|
|
330
334
|
}
|
|
335
|
+
|
|
331
336
|
// ../../../../../node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
332
337
|
import { dirname, posix, sep } from "path";
|
|
333
338
|
function createModulerModifier() {
|
|
@@ -5653,6 +5658,7 @@ function getSafeCpuInfo(osProvider, input) {
|
|
|
5653
5658
|
};
|
|
5654
5659
|
}
|
|
5655
5660
|
}
|
|
5661
|
+
|
|
5656
5662
|
// src/product-identity.ts
|
|
5657
5663
|
import { readFileSync as readFileSync3 } from "node:fs";
|
|
5658
5664
|
var PRODUCT_NAME = "omo-codex";
|
|
@@ -13,9 +13,12 @@ Conventions for human contributors and AI agents working on this repository.
|
|
|
13
13
|
|
|
14
14
|
## Layout
|
|
15
15
|
|
|
16
|
-
- `src/cli.ts` — `UserPromptSubmit` hook CLI. Reads JSON on stdin, writes
|
|
17
|
-
- `src/codex-hook.ts` — pure detector/hook behavior.
|
|
16
|
+
- `src/cli.ts` — `UserPromptSubmit` hook CLI. Reads JSON on stdin, writes a compact `<ultrawork-mode>` skill pointer to stdout when the keyword matches (full directive as fallback), exits 0 otherwise.
|
|
17
|
+
- `src/codex-hook.ts` — pure detector/hook behavior; skips on context-pressure/recovery transcripts and when the directive is already in the transcript.
|
|
18
|
+
- `src/skill-pointer.ts` — `buildUltraworkAdditionalContext()`: emits the <4096-byte pointer (Codex App truncates large hook output) directing the model to `create_goal` then read the bundled `ultrawork` skill; falls back to the full `ULTRAWORK_DIRECTIVE` when the plugin skills tree is absent. Pointer size + `ulw-loop` mirror byte-identity pinned by `plugin/test/ultrawork-skill-pointer.test.mjs`.
|
|
18
19
|
- `directive.md` — bundled ultrawork directive text.
|
|
20
|
+
- `skills/ultrawork/SKILL.md` — full directive as a skill, generated by `scripts/sync-directive.mjs`; pinned byte-for-byte to `directive.md` by `test/directive-source.test.ts`. `plugin/scripts/sync-skills.mjs` materializes it into the aggregate `plugin/skills/` tree the pointer path targets.
|
|
21
|
+
- `skills/ulw-plan/` — dual-maintained copy of the ulw-plan skill (component copy wins over `packages/shared-skills/skills/ulw-plan/` in sync-skills; keep both in step by hand).
|
|
19
22
|
- `agents/*.toml` — bundled Codex agent role files. Installed as regular files into `CODEX_HOME/agents/` by `src/cli/install-codex/link-cached-plugin-agents.ts` at install time. Public `sisyphuslabs` installs source them from Codex's installed-marketplace snapshot, not the versioned plugin cache, so they survive Codex auto-update cache pruning and temporary snapshot cleanup. No runtime `SessionStart` hook is involved.
|
|
20
23
|
- `hooks/hooks.json` — registers the prompt-detector hook only.
|
|
21
24
|
- `.codex-plugin/plugin.json` — Codex plugin manifest. Marketplace metadata lives here, not in `package.json`.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- The `ulw`/`ultrawork` trigger now injects a compact bootstrap pointer instead of the full directive: it mandates the `ULTRAWORK MODE ENABLED!` opener, an immediate `create_goal` call with `objective` only, and reading the full directive from the bundled `ultrawork` skill at a runtime-resolved absolute path. Codex App truncates large hook outputs (head plus tail, middle omitted), which silently dropped the `create_goal` bootstrap since v4.14.1; the pointer stays far below the truncation budget so no part of it can be lost (fixes code-yeongyu/oh-my-openagent#5828). When the plugin skills tree is absent (standalone component installs), the hook falls back to emitting the full directive.
|
|
6
|
+
- New `skills/ultrawork/SKILL.md` carries the complete directive body behind skill frontmatter and is regenerated from `@oh-my-opencode/prompts-core` by `scripts/sync-directive.mjs`; `directive-source.test.ts` pins the skill body to `directive.md` byte for byte.
|
|
5
7
|
- Runtime hook migrated from `python3 hooks/ultrawork-detector.py` to the component-standard TypeScript build output `node dist/cli.js hook user-prompt-submit`, removing the Codex runtime dependency on Python.
|
|
6
8
|
- New top-level **`# Manual-QA channels`** section explicitly enumerates the four real-usage channels the agent MUST verify through: (1) HTTP call, (2) tmux, (3) Browser use, (4) Computer use — each with concrete commands and the artifact to capture. Auxiliary surfaces (CLI stdout / DB diff / parsed config dump) only count for genuinely CLI- or data-shaped criteria.
|
|
7
9
|
- Goal section now shouts **TESTS ALONE NEVER PROVE DONE**: a green test suite is supporting evidence, never completion proof. Every criterion needs its own real-usage scenario, built fresh and run through one of the four channels, every time.
|
|
@@ -33,9 +33,9 @@ The installer copies the plugin into `~/.codex/plugins/cache/sisyphuslabs/omo/0.
|
|
|
33
33
|
node ${PLUGIN_ROOT}/dist/cli.js hook user-prompt-submit
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Codex passes the prompt payload on stdin. When the pattern
|
|
36
|
+
Codex passes the prompt payload on stdin. When the pattern `(?:ultrawork|ulw)` (case-insensitive) matches, the hook emits a compact bootstrap pointer instead of the full directive: the pointer mandates the `ULTRAWORK MODE ENABLED!` opener, an immediate `create_goal` call with `objective` only, and reading the full directive from the bundled `ultrawork` skill (`<plugin root>/skills/ultrawork/SKILL.md`, resolved to an absolute path at runtime). Keeping the injected payload small guarantees Codex App's hook-output truncation can never drop the `create_goal` bootstrap (issue #5828). When the skill file is not present (for example the standalone component install without the plugin skills tree), the hook falls back to emitting the full directive. Otherwise the hook writes nothing and exits 0. Malformed input also exits 0 to never block the turn.
|
|
37
37
|
|
|
38
|
-
If a prior `UserPromptSubmit` hook output in transcript JSONL already contains `<ultrawork-mode>`, the hook suppresses itself so the same
|
|
38
|
+
If a prior `UserPromptSubmit` hook output in transcript JSONL already contains `<ultrawork-mode>`, the hook suppresses itself so the same bootstrap is not injected repeatedly. Plain transcript text containing `<ultrawork-mode>` is ignored unless it comes from hook output.
|
|
39
39
|
|
|
40
40
|
Bundled agent role TOMLs in `agents/` ship to `CODEX_HOME/agents/` at install time, not via a runtime hook. The installer writes regular file copies on Linux, macOS, and Windows. For the public marketplace, the source is the installed-marketplace snapshot, not the versioned plugin cache, so agent role configs remain valid when Codex replaces `~/.codex/plugins/cache/sisyphuslabs/omo/<version>/` during auto-update or removes temporary marketplace state. Both code paths overwrite stale files and write a `.installed-agents.json` manifest next to the source root for clean uninstall tracking.
|
|
41
41
|
|
|
@@ -47,7 +47,7 @@ npm run build
|
|
|
47
47
|
echo "$PAYLOAD" | node dist/cli.js hook user-prompt-submit | head -3
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
Expect `<ultrawork-mode>` ... directive body.
|
|
50
|
+
Expect `<ultrawork-mode>` ... bootstrap pointer naming `skills/ultrawork/SKILL.md` (or the full directive body when the plugin skills tree is absent).
|
|
51
51
|
|
|
52
52
|
## Agent role smoke test
|
|
53
53
|
|
|
@@ -6,10 +6,59 @@ import { stdin as processStdin, stdout as processStdout } from "node:process";
|
|
|
6
6
|
// components/ultrawork/src/codex-hook.ts
|
|
7
7
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
8
8
|
|
|
9
|
+
// components/ultrawork/src/skill-pointer.ts
|
|
10
|
+
import { existsSync } from "node:fs";
|
|
11
|
+
import { fileURLToPath } from "node:url";
|
|
12
|
+
|
|
9
13
|
// components/ultrawork/src/directive.ts
|
|
10
14
|
import { readFileSync } from "node:fs";
|
|
11
15
|
var ULTRAWORK_DIRECTIVE = readFileSync(new URL("../directive.md", import.meta.url), "utf8");
|
|
12
16
|
|
|
17
|
+
// components/ultrawork/src/skill-pointer.ts
|
|
18
|
+
var ULTRAWORK_SKILL_POINTER_TEMPLATE = `<ultrawork-mode>
|
|
19
|
+
ULTRAWORK MODE IS ACTIVE FOR THIS TASK.
|
|
20
|
+
|
|
21
|
+
MANDATORY BOOTSTRAP: do all three steps, in order, before anything else.
|
|
22
|
+
|
|
23
|
+
1. First user-visible line this turn MUST be exactly:
|
|
24
|
+
\`ULTRAWORK MODE ENABLED!\`
|
|
25
|
+
|
|
26
|
+
2. Call \`create_goal\` NOW with \`objective\` set to the user's request.
|
|
27
|
+
Send \`objective\` only: no \`status\`, no budget fields. If the
|
|
28
|
+
\`create_goal\` tool is unavailable, open your reply with a binding
|
|
29
|
+
\`# Goal\` block instead. Never skip this step.
|
|
30
|
+
|
|
31
|
+
3. Read the FULL ultrawork directive NOW, before any other tool call,
|
|
32
|
+
plan, or edit. It is the \`ultrawork\` skill, stored at:
|
|
33
|
+
|
|
34
|
+
{{ULTRAWORK_SKILL_PATH}}
|
|
35
|
+
|
|
36
|
+
Read the whole file. If a read result comes back truncated, keep
|
|
37
|
+
reading the remaining line ranges until you have seen every line.
|
|
38
|
+
Every rule in that file is binding for this entire task: no
|
|
39
|
+
compromise, no summarizing from memory, no skipping. If the file does
|
|
40
|
+
not exist, tell the user the omo ultrawork skill is missing and
|
|
41
|
+
continue with steps 1 and 2 plus evidence-bound execution.
|
|
42
|
+
|
|
43
|
+
Do not start the requested work until all three steps are complete.
|
|
44
|
+
</ultrawork-mode>
|
|
45
|
+
`;
|
|
46
|
+
var ULTRAWORK_SKILL_PATH_PLACEHOLDER = "{{ULTRAWORK_SKILL_PATH}}";
|
|
47
|
+
var ULTRAWORK_SKILL_FILE_URL = new URL("../../../skills/ultrawork/SKILL.md", import.meta.url);
|
|
48
|
+
function resolveUltraworkSkillFilePath() {
|
|
49
|
+
return fileURLToPath(ULTRAWORK_SKILL_FILE_URL);
|
|
50
|
+
}
|
|
51
|
+
function buildUltraworkSkillPointer(skillFilePath) {
|
|
52
|
+
return ULTRAWORK_SKILL_POINTER_TEMPLATE.replace(ULTRAWORK_SKILL_PATH_PLACEHOLDER, skillFilePath);
|
|
53
|
+
}
|
|
54
|
+
function buildUltraworkAdditionalContext(options = {}) {
|
|
55
|
+
const skillFilePath = options.skillFilePath === undefined ? resolveUltraworkSkillFilePath() : options.skillFilePath;
|
|
56
|
+
if (skillFilePath !== null && existsSync(skillFilePath)) {
|
|
57
|
+
return buildUltraworkSkillPointer(skillFilePath);
|
|
58
|
+
}
|
|
59
|
+
return ULTRAWORK_DIRECTIVE;
|
|
60
|
+
}
|
|
61
|
+
|
|
13
62
|
// components/ultrawork/src/codex-hook.ts
|
|
14
63
|
var ULTRAWORK_CURRENT_PROMPT_PATTERN = /(?:ultrawork|ulw)/i;
|
|
15
64
|
var ULTRAWORK_DIRECTIVE_MARKER = "<ultrawork-mode>";
|
|
@@ -23,7 +72,7 @@ var CONTEXT_PRESSURE_MARKERS = [
|
|
|
23
72
|
"your input exceeds the context window",
|
|
24
73
|
"long threads and multiple compactions"
|
|
25
74
|
];
|
|
26
|
-
function runUserPromptSubmitHook(input) {
|
|
75
|
+
function runUserPromptSubmitHook(input, options = {}) {
|
|
27
76
|
if (!isCodexUserPromptSubmitInput(input))
|
|
28
77
|
return "";
|
|
29
78
|
if (isContextPressureRecoveryPrompt(input.prompt))
|
|
@@ -32,7 +81,7 @@ function runUserPromptSubmitHook(input) {
|
|
|
32
81
|
return "";
|
|
33
82
|
if (isContextPressureTranscript(input.transcript_path))
|
|
34
83
|
return "";
|
|
35
|
-
return isUltraworkPrompt(input.prompt) ? formatAdditionalContextOutput(
|
|
84
|
+
return isUltraworkPrompt(input.prompt) ? formatAdditionalContextOutput(buildUltraworkAdditionalContext(options)) : "";
|
|
36
85
|
}
|
|
37
86
|
function hasUltraworkDirectiveAlreadyInTranscript(transcriptPath) {
|
|
38
87
|
if (transcriptPath === undefined || transcriptPath === null)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-yeongyu/codex-ultrawork",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.16.0",
|
|
4
4
|
"description": "Codex plugin that injects the ultrawork orchestration directive and ships LazyCodex planning, review, QA, and gate agent roles.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "npm@11.12.1",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"dist",
|
|
39
39
|
"directive.md",
|
|
40
40
|
"hooks",
|
|
41
|
+
"skills",
|
|
41
42
|
"README.md",
|
|
42
43
|
"LICENSE",
|
|
43
44
|
"NOTICE"
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
6
6
|
const componentRoot = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
7
7
|
const codexPromptUrl = new URL(import.meta.resolve("@oh-my-opencode/prompts-core/prompts/ultrawork/codex.md"));
|
|
8
8
|
const directivePath = join(componentRoot, "directive.md");
|
|
9
|
+
const skillDirectory = join(componentRoot, "skills", "ultrawork");
|
|
10
|
+
const skillPath = join(skillDirectory, "SKILL.md");
|
|
11
|
+
|
|
12
|
+
const skillFrontmatter = `---
|
|
13
|
+
name: ultrawork
|
|
14
|
+
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.
|
|
15
|
+
metadata:
|
|
16
|
+
short-description: Binding ultrawork mode directive
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
`;
|
|
9
20
|
|
|
10
21
|
const codexPrompt = await readFile(codexPromptUrl, "utf8");
|
|
11
22
|
await writeFile(directivePath, codexPrompt);
|
|
23
|
+
await mkdir(skillDirectory, { recursive: true });
|
|
24
|
+
await writeFile(skillPath, `${skillFrontmatter}${codexPrompt}`);
|