ultracode-for-codex 0.3.2 → 0.3.4
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/README.md +154 -189
- package/ULTRACODE_INSTALL.md +35 -17
- package/dist/cli.js +74 -25
- package/dist/runtime/state-root.d.ts +3 -0
- package/dist/runtime/state-root.js +29 -0
- package/dist/runtime/workflow-journal.d.ts +1 -0
- package/dist/runtime/workflow-journal.js +5 -2
- package/dist/runtime/workflow-runtime.d.ts +3 -0
- package/dist/runtime/workflow-runtime.js +1529 -46
- package/docs/provenance-audit.md +4 -4
- package/docs/ultracode-p3b-resume-cache.md +27 -8
- package/package.json +1 -1
- package/settings.json +1 -1
- package/skills/ultracode-for-codex-cli/SKILL.md +18 -5
package/README.md
CHANGED
|
@@ -1,31 +1,58 @@
|
|
|
1
1
|
# Ultracode for Codex
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
context plans adaptive phases, spawns focused parallel subagents, synthesizes
|
|
6
|
-
their results, and reports progress directly in the chat.
|
|
7
|
-
`$ultracode-for-codex-cli` is the explicit runtime path for package validation,
|
|
8
|
-
background jobs, attached CLI runs, release checks, and reproducible local
|
|
9
|
-
workflow artifacts.
|
|
3
|
+
Dynamic workflows redesigned for Codex, with parallel subagents, visible
|
|
4
|
+
progress, and an optional local CLI runtime.
|
|
10
5
|
|
|
11
|
-
|
|
6
|
+
The default experience is Codex-native: you ask for `$ultracode-for-codex`, and
|
|
7
|
+
the main Codex chat becomes the orchestrator. It plans the next useful phase,
|
|
8
|
+
runs independent subagents in parallel when that helps, summarizes their
|
|
9
|
+
findings, and shows compact progress snapshots directly in the conversation.
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
A local CLI runtime is included for users who want background jobs, reproducible
|
|
12
|
+
workflow runs, package checks, or attached terminal execution.
|
|
13
|
+
|
|
14
|
+
## Why Use It
|
|
15
|
+
|
|
16
|
+
- Get multi-angle reviews instead of a single linear pass.
|
|
17
|
+
- Run implementation and verification work phase by phase.
|
|
18
|
+
- See what agents are doing, what finished, and what still needs attention.
|
|
19
|
+
- Keep long CLI workflows running in the OS background when desired.
|
|
20
|
+
- Package the same workflow behavior for repeatable local use.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
For one project:
|
|
14
25
|
|
|
15
26
|
```bash
|
|
16
27
|
npm install --save-dev ultracode-for-codex
|
|
17
|
-
npm exec -- ultracode-for-codex --llm-guide
|
|
18
28
|
```
|
|
19
29
|
|
|
20
|
-
|
|
30
|
+
For global use:
|
|
21
31
|
|
|
22
32
|
```bash
|
|
23
33
|
npm install -g ultracode-for-codex
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If you installed it globally, check the CLI directly:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
24
39
|
ultracode-for-codex --version
|
|
25
40
|
ultracode-for-codex --llm-guide
|
|
26
41
|
```
|
|
27
42
|
|
|
28
|
-
|
|
43
|
+
If you installed it as a project dependency, check it with `npm exec --`:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm exec -- ultracode-for-codex --version
|
|
47
|
+
npm exec -- ultracode-for-codex --llm-guide
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Install The Codex Skills
|
|
51
|
+
|
|
52
|
+
After installing the npm package, copy the included skill commands into your
|
|
53
|
+
Codex skills folder.
|
|
54
|
+
|
|
55
|
+
From a project install:
|
|
29
56
|
|
|
30
57
|
```bash
|
|
31
58
|
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
|
|
@@ -35,7 +62,7 @@ cp -R ./node_modules/ultracode-for-codex/skills/ultracode-for-codex-cli \
|
|
|
35
62
|
"${CODEX_HOME:-$HOME/.codex}/skills/"
|
|
36
63
|
```
|
|
37
64
|
|
|
38
|
-
|
|
65
|
+
From a global install:
|
|
39
66
|
|
|
40
67
|
```bash
|
|
41
68
|
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
|
|
@@ -46,235 +73,173 @@ cp -R "$GLOBAL_NODE_MODULES/ultracode-for-codex/skills/ultracode-for-codex-cli"
|
|
|
46
73
|
"${CODEX_HOME:-$HOME/.codex}/skills/"
|
|
47
74
|
```
|
|
48
75
|
|
|
49
|
-
|
|
76
|
+
Restart Codex or start a new Codex session if the skills do not appear
|
|
77
|
+
immediately.
|
|
50
78
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
79
|
+
## Use In Codex
|
|
80
|
+
|
|
81
|
+
Use the default skill for normal work:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
$ultracode-for-codex Review this change for correctness and security risks.
|
|
54
85
|
```
|
|
55
86
|
|
|
56
|
-
|
|
87
|
+
Good tasks for the default skill:
|
|
88
|
+
|
|
89
|
+
- code review;
|
|
90
|
+
- implementation planning;
|
|
91
|
+
- multi-step verification;
|
|
92
|
+
- architecture or design critique;
|
|
93
|
+
- release readiness checks;
|
|
94
|
+
- work that benefits from parallel perspectives.
|
|
95
|
+
|
|
96
|
+
The default skill shows a phase plan before work starts and keeps a cumulative
|
|
97
|
+
progress snapshot as agents finish.
|
|
98
|
+
|
|
99
|
+
Example:
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
Phase Review
|
|
103
|
+
|
|
104
|
+
+ Runtime correctness done no material issue
|
|
105
|
+
> Security boundary running checking local state handling
|
|
106
|
+
- Package contract queued verify installed files
|
|
107
|
+
|
|
108
|
+
Agents 1 completed | 1 running | 1 queued
|
|
109
|
+
Next: synthesize material findings
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Use The CLI Runtime
|
|
113
|
+
|
|
114
|
+
Use `$ultracode-for-codex-cli` or the `ultracode-for-codex` binary when you
|
|
115
|
+
explicitly want a local command-owned workflow run.
|
|
116
|
+
|
|
117
|
+
Run a built-in task workflow:
|
|
57
118
|
|
|
58
119
|
```bash
|
|
59
|
-
npm
|
|
120
|
+
npm exec -- ultracode-for-codex run \
|
|
121
|
+
--accept-llm-guide=v1 \
|
|
122
|
+
--cwd /path/to/project \
|
|
123
|
+
--name task \
|
|
124
|
+
--args '{"prompt":"review correctness risks and propose fixes"}'
|
|
60
125
|
```
|
|
61
126
|
|
|
62
|
-
Run
|
|
127
|
+
Run a code review:
|
|
63
128
|
|
|
64
129
|
```bash
|
|
65
130
|
npm exec -- ultracode-for-codex run \
|
|
66
131
|
--accept-llm-guide=v1 \
|
|
67
|
-
--cwd /path/to/
|
|
68
|
-
--
|
|
132
|
+
--cwd /path/to/project \
|
|
133
|
+
--name code-review \
|
|
69
134
|
--args '{"prompt":"review the current change"}'
|
|
70
135
|
```
|
|
71
136
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
137
|
+
The built-in `code-review` workflow collects bounded repository evidence,
|
|
138
|
+
chooses review lenses, runs finder agents in parallel, verifies each candidate,
|
|
139
|
+
and returns JSON with `findings`, `provenance`, `synthesis`, and `stats`.
|
|
140
|
+
Use `{"level":"high"}` to skip the final sweep, or omit it for the default
|
|
141
|
+
`xhigh` review.
|
|
142
|
+
|
|
143
|
+
CLI runs use OS background execution by default. The command prints a launch
|
|
144
|
+
record with a `jobId`, then you can inspect or control the job:
|
|
75
145
|
|
|
76
146
|
```bash
|
|
77
|
-
npm exec -- ultracode-for-codex status <jobId> --cwd /path/to/
|
|
78
|
-
npm exec -- ultracode-for-codex
|
|
79
|
-
npm exec -- ultracode-for-codex
|
|
80
|
-
npm exec -- ultracode-for-codex
|
|
81
|
-
npm exec -- ultracode-for-codex cancel <jobId> --cwd /path/to/target-repo
|
|
82
|
-
npm exec -- ultracode-for-codex jobs --cwd /path/to/target-repo
|
|
83
|
-
npm exec -- ultracode-for-codex archive <jobId> --cwd /path/to/target-repo
|
|
147
|
+
npm exec -- ultracode-for-codex status <jobId> --cwd /path/to/project
|
|
148
|
+
npm exec -- ultracode-for-codex logs <jobId> --cwd /path/to/project --tail 40
|
|
149
|
+
npm exec -- ultracode-for-codex result <jobId> --cwd /path/to/project
|
|
150
|
+
npm exec -- ultracode-for-codex cancel <jobId> --cwd /path/to/project
|
|
84
151
|
```
|
|
85
152
|
|
|
86
|
-
|
|
153
|
+
Use attached execution only when the terminal should stay connected until the
|
|
154
|
+
workflow finishes:
|
|
87
155
|
|
|
88
156
|
```bash
|
|
89
157
|
npm exec -- ultracode-for-codex run \
|
|
90
158
|
--accept-llm-guide=v1 \
|
|
91
159
|
--execution attached \
|
|
92
|
-
--cwd /path/to/
|
|
93
|
-
--
|
|
94
|
-
--args '{"prompt":"
|
|
160
|
+
--cwd /path/to/project \
|
|
161
|
+
--name task \
|
|
162
|
+
--args '{"prompt":"check the release plan"}'
|
|
95
163
|
```
|
|
96
164
|
|
|
97
|
-
|
|
98
|
-
plugin workflow folders, and built-ins:
|
|
165
|
+
Resume a completed local workflow from preserved runtime state:
|
|
99
166
|
|
|
100
167
|
```bash
|
|
101
168
|
npm exec -- ultracode-for-codex run \
|
|
102
169
|
--accept-llm-guide=v1 \
|
|
103
|
-
--
|
|
104
|
-
--
|
|
105
|
-
--
|
|
170
|
+
--execution attached \
|
|
171
|
+
--cwd /path/to/project \
|
|
172
|
+
--resume-from-run-id run_...
|
|
106
173
|
```
|
|
107
174
|
|
|
108
|
-
|
|
109
|
-
then run work phase by phase. Within each phase, multiple focused Codex
|
|
110
|
-
subagents run in parallel by default, followed by phase and final synthesis. The
|
|
111
|
-
planner may choose a single-agent path only when parallel execution would add
|
|
112
|
-
risk or waste. Planner guidance includes dynamic workflow patterns such as
|
|
113
|
-
classify-and-act, fan-out-and-synthesize, adversarial verification,
|
|
114
|
-
generate-and-filter, tournament, and loop-until-done, so different work types
|
|
115
|
-
can use different phase shapes.
|
|
116
|
-
|
|
117
|
-
## Settings
|
|
118
|
-
|
|
119
|
-
Package defaults live in `settings.json`:
|
|
120
|
-
|
|
121
|
-
```json
|
|
122
|
-
{
|
|
123
|
-
"workflow": {
|
|
124
|
-
"executionMode": "background",
|
|
125
|
-
"progress": "jsonl",
|
|
126
|
-
"permission": "ask",
|
|
127
|
-
"retryLimit": 0,
|
|
128
|
-
"timeoutMs": 0,
|
|
129
|
-
"background": {
|
|
130
|
-
"runDir": ".ultracode-for-codex/background/{jobId}",
|
|
131
|
-
"resultFile": "result.json",
|
|
132
|
-
"progressFile": "progress.jsonl",
|
|
133
|
-
"metadataFile": "metadata.json",
|
|
134
|
-
"pidFile": "pid"
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
```
|
|
175
|
+
## What Gets Installed
|
|
139
176
|
|
|
140
|
-
|
|
141
|
-
`--timeout-ms` to override settings for one run.
|
|
142
|
-
The package default workflow timeout is `0`, meaning the workflow waits until it
|
|
143
|
-
completes, is cancelled, or the Codex app-server exits. Set `--timeout-ms` to a
|
|
144
|
-
positive value to opt into a deadline for one run.
|
|
145
|
-
Use the default background execution for long Codex-launched work so Codex can
|
|
146
|
-
continue other tasks and inspect the job later with `status`, `logs`, or
|
|
147
|
-
`result`. Use
|
|
148
|
-
`--execution attached` only when the caller must block until the final result.
|
|
149
|
-
|
|
150
|
-
## CLI Controls
|
|
151
|
-
|
|
152
|
-
- Use `--version` or `-v` to print the installed package version.
|
|
153
|
-
- Use `status`, `wait`, `logs`, `result`, and `cancel` with a background
|
|
154
|
-
`jobId` or `metadata.json` path to inspect, wait for, read, or cancel OS
|
|
155
|
-
background runs.
|
|
156
|
-
- Use `jobs` or `list` to enumerate local background runs.
|
|
157
|
-
- Use `archive` or `export` to write a sensitive local JSON bundle for one run
|
|
158
|
-
without deleting runtime state.
|
|
159
|
-
- Use `wait --result`, `cancel --wait`, `logs --event <event>`, and `--plain`
|
|
160
|
-
for shorter foreground checks.
|
|
161
|
-
- Progress is printed to stderr as JSONL by default.
|
|
162
|
-
- The final workflow result is printed as JSON to stdout.
|
|
163
|
-
- JSONL records include `kind`, `version`, `event`, `status`, and `summary`;
|
|
164
|
-
agent records also include stable agent identity and label fields.
|
|
165
|
-
- Built-in `task` and `code-review` emit `workflow.plan.ready` as a planning
|
|
166
|
-
snapshot, not a promise that every later phase is already known.
|
|
167
|
-
- `workflow.phase.planned` is emitted immediately before each phase starts and
|
|
168
|
-
carries that phase's current planned agent role labels. Each
|
|
169
|
-
`workflow.phase.started` record repeats the same role labels when the phase
|
|
170
|
-
begins.
|
|
171
|
-
- Each `workflow.agent.completed` record includes phase progress, total known
|
|
172
|
-
agent progress, and elapsed time.
|
|
173
|
-
- After a completed run, `workflow.summary.ready` reports each phase with its
|
|
174
|
-
planned agent count and angle/focus list, then `workflow.review.recommended`
|
|
175
|
-
asks the current session LLM to critically re-check the final result before
|
|
176
|
-
acting on it.
|
|
177
|
-
- Press `Ctrl-C` once to cancel the active workflow.
|
|
178
|
-
- Use `--retry-limit <n>` to retry failed workflows inside the same process.
|
|
179
|
-
- `--timeout-ms 0` waits for completion, cancellation, or app-server exit.
|
|
180
|
-
Positive values opt into a workflow deadline and per-agent silence budget;
|
|
181
|
-
that budget is not divided by the retry budget.
|
|
182
|
-
- Use `--permission ask|allow|deny` for project/user/plugin/scriptPath workflow
|
|
183
|
-
permission reviews.
|
|
184
|
-
- Use `--progress plain` for human-readable log lines.
|
|
185
|
-
- Use `--execution background` for OS background runs and `--execution attached`
|
|
186
|
-
only when the caller should stay connected until completion.
|
|
187
|
-
|
|
188
|
-
## Codex Skill Commands
|
|
189
|
-
|
|
190
|
-
The npm package includes two Codex skill command folders:
|
|
191
|
-
|
|
192
|
-
- `skills/ultracode-for-codex`: default Codex-native orchestration. The main
|
|
193
|
-
context plans adaptive phases, spawns parallel subagents, synthesizes each
|
|
194
|
-
phase, reports completion progress, and recommends a final critical re-check.
|
|
195
|
-
Live progress uses test-runner-style visual snapshots; completion reporting
|
|
196
|
-
uses a diffstat-style impact summary plus a plan-style result summary.
|
|
197
|
-
- `skills/ultracode-for-codex-cli`: explicit CLI runtime operations, including
|
|
198
|
-
background jobs, attached runs, packaging, release checks, runtime-boundary
|
|
199
|
-
validation, and installed E2E tests.
|
|
200
|
-
|
|
201
|
-
## Runtime Boundaries
|
|
202
|
-
|
|
203
|
-
- The only production backend is Codex app-server over stdio.
|
|
204
|
-
- Direct provider credentials are stripped from the Codex child process
|
|
205
|
-
environment.
|
|
206
|
-
- Codex subagents run against the requested workflow cwd and receive bounded
|
|
207
|
-
read-only workspace tools for text file reads and directory listings.
|
|
208
|
-
- CLI built-in `task` and `code-review` inject deterministic workspace context into
|
|
209
|
-
planner-selected phase-wise parallel subagents, then synthesize each phase and
|
|
210
|
-
the final result.
|
|
211
|
-
- Workflow execution is local and command-owned; settings default to OS
|
|
212
|
-
background execution so long runs can keep waiting while Codex does other
|
|
213
|
-
work.
|
|
214
|
-
- `.ultracode-for-codex` workflow state is sensitive local data.
|
|
215
|
-
- `journalPath`, `journal.jsonl`, and journal contents stay out of CLI output.
|
|
216
|
-
Local runtime state may still contain runtime-owned
|
|
217
|
-
`transcriptDir`, `scriptPath`, and result files.
|
|
218
|
-
- `resumeFromRunId` remains runtime-internal and same-session; users retry the
|
|
219
|
-
active run or rerun the workflow command.
|
|
220
|
-
- `agent(..., { isolation: "worktree" })` runs the agent in a detached git
|
|
221
|
-
worktree and preserves the worktree for review, including clean worktrees.
|
|
222
|
-
|
|
223
|
-
## Development
|
|
177
|
+
The package includes:
|
|
224
178
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
179
|
+
- `ultracode-for-codex`: the local CLI binary;
|
|
180
|
+
- `skills/ultracode-for-codex`: the recommended Codex-native skill;
|
|
181
|
+
- `skills/ultracode-for-codex-cli`: the explicit CLI/runtime skill;
|
|
182
|
+
- `settings.json`: default CLI runtime settings;
|
|
183
|
+
- `ULTRACODE_INSTALL.md`: detailed install and operating guide for agents.
|
|
184
|
+
|
|
185
|
+
## Local State
|
|
186
|
+
|
|
187
|
+
CLI runs write workflow state under `${ULTRACODE_FOR_CODEX_HOME:-~/.ultracode-for-codex}`.
|
|
188
|
+
The runtime keeps background metadata, journals, transcripts, generated scripts,
|
|
189
|
+
and results outside the target project so review evidence stays focused on the
|
|
190
|
+
workspace itself.
|
|
232
191
|
|
|
233
|
-
|
|
192
|
+
Project workflow sources may still live in `.codex/workflows/`. If an older
|
|
193
|
+
workspace already has `.ultracode-for-codex/`, keep it ignored and treat it as
|
|
194
|
+
legacy sensitive local data:
|
|
234
195
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
196
|
+
```gitignore
|
|
197
|
+
.ultracode-for-codex/
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Troubleshooting
|
|
238
201
|
|
|
239
|
-
|
|
202
|
+
If Codex does not recognize `$ultracode-for-codex`, confirm that the skill
|
|
203
|
+
folder exists:
|
|
240
204
|
|
|
241
205
|
```bash
|
|
242
|
-
|
|
206
|
+
ls "${CODEX_HOME:-$HOME/.codex}/skills/ultracode-for-codex"
|
|
243
207
|
```
|
|
244
208
|
|
|
245
|
-
|
|
209
|
+
If `npm exec -- ultracode-for-codex` fails, confirm the package is installed:
|
|
246
210
|
|
|
247
211
|
```bash
|
|
248
|
-
npm
|
|
212
|
+
npm ls ultracode-for-codex
|
|
249
213
|
```
|
|
250
214
|
|
|
251
|
-
|
|
215
|
+
If a CLI workflow is still running, list local jobs:
|
|
252
216
|
|
|
253
217
|
```bash
|
|
254
|
-
npm
|
|
218
|
+
npm exec -- ultracode-for-codex jobs --cwd /path/to/project
|
|
255
219
|
```
|
|
256
220
|
|
|
257
|
-
|
|
221
|
+
## For Maintainers
|
|
222
|
+
|
|
223
|
+
Common source checkout commands:
|
|
258
224
|
|
|
259
225
|
```bash
|
|
260
|
-
|
|
226
|
+
npm install
|
|
227
|
+
npm test
|
|
228
|
+
npm run test:e2e:ultracode-for-codex
|
|
229
|
+
npm run test:all
|
|
230
|
+
npm run pack:ultracode-for-codex
|
|
261
231
|
```
|
|
262
232
|
|
|
263
|
-
|
|
233
|
+
Check the publish payload:
|
|
264
234
|
|
|
265
235
|
```bash
|
|
266
|
-
npm run
|
|
267
|
-
node dist/cli.js run --accept-llm-guide=v1 --script-file ./workflow.js
|
|
236
|
+
npm run publish:dry-run
|
|
268
237
|
```
|
|
269
238
|
|
|
270
|
-
##
|
|
271
|
-
|
|
272
|
-
- `
|
|
273
|
-
|
|
274
|
-
- `skills/ultracode-for-codex/references/progress-visuals.md`:
|
|
275
|
-
|
|
276
|
-
- `skills/ultracode-for-codex-cli/SKILL.md`:
|
|
277
|
-
- `ULTRACODE_INSTALL.md`: install and operating guide for LLM agents.
|
|
278
|
-
- `docs/ultracode-p3a-journal-design.md`: journal contract.
|
|
279
|
-
- `docs/ultracode-p3b-resume-cache.md`: runtime-internal resume/cache contract.
|
|
280
|
-
- `docs/ultracode-p3c-worktree-isolation.md`: worktree isolation contract.
|
|
239
|
+
## More Documentation
|
|
240
|
+
|
|
241
|
+
- `ULTRACODE_INSTALL.md`: detailed install and operating guide.
|
|
242
|
+
- `skills/ultracode-for-codex/SKILL.md`: Codex-native orchestration behavior.
|
|
243
|
+
- `skills/ultracode-for-codex/references/progress-visuals.md`: progress display
|
|
244
|
+
examples.
|
|
245
|
+
- `skills/ultracode-for-codex-cli/SKILL.md`: CLI runtime behavior.
|
package/ULTRACODE_INSTALL.md
CHANGED
|
@@ -22,7 +22,7 @@ Skill commands:
|
|
|
22
22
|
|
|
23
23
|
The packaged `settings.json` defaults CLI workflow runs to OS background
|
|
24
24
|
execution with result and progress files under
|
|
25
|
-
|
|
25
|
+
`${ULTRACODE_FOR_CODEX_HOME:-~/.ultracode-for-codex}/background/{jobId}`.
|
|
26
26
|
|
|
27
27
|
Production surface:
|
|
28
28
|
|
|
@@ -99,13 +99,19 @@ npm exec -- ultracode-for-codex archive <jobId> --cwd /path/to/project
|
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
Use CLI built-in `task` for general work and `code-review` for review-specific
|
|
102
|
-
work.
|
|
103
|
-
focused Codex subagents in parallel within each phase by default, and
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
work. `task` starts with an LLM planner, executes phase by phase, runs multiple
|
|
103
|
+
focused Codex subagents in parallel within each phase by default, and chooses a
|
|
104
|
+
single-agent path only when parallel execution would add risk or waste. Planner
|
|
105
|
+
guidance includes classify-and-act, fan-out-and-synthesize, adversarial
|
|
106
|
+
verification, generate-and-filter, tournament, and loop-until-done patterns so
|
|
107
|
+
different work types can use different phase shapes.
|
|
108
|
+
|
|
109
|
+
`code-review` uses a specialized review harness. It collects bounded repository
|
|
110
|
+
evidence, selects active review lenses, runs one finder per lens in parallel,
|
|
111
|
+
verifies every emitted candidate with a candidate-scoped subagent, optionally
|
|
112
|
+
runs an `xhigh` sweep, then synthesizes final findings by verified candidate
|
|
113
|
+
index. The final JSON includes `findings`, `provenance`, `synthesis`, and
|
|
114
|
+
`stats`.
|
|
109
115
|
|
|
110
116
|
Settings defaults:
|
|
111
117
|
|
|
@@ -118,7 +124,7 @@ Settings defaults:
|
|
|
118
124
|
"retryLimit": 0,
|
|
119
125
|
"timeoutMs": 0,
|
|
120
126
|
"background": {
|
|
121
|
-
"runDir": "
|
|
127
|
+
"runDir": "{stateRoot}/background/{jobId}",
|
|
122
128
|
"resultFile": "result.json",
|
|
123
129
|
"progressFile": "progress.jsonl",
|
|
124
130
|
"metadataFile": "metadata.json",
|
|
@@ -145,7 +151,9 @@ Useful controls:
|
|
|
145
151
|
- JSONL records include `kind`, `version`, `event`, `status`, and `summary`;
|
|
146
152
|
agent records also include stable agent identity and label fields.
|
|
147
153
|
- Built-in `task` and `code-review` emit `workflow.plan.ready` as a planning
|
|
148
|
-
snapshot, not a promise that every later phase is already known.
|
|
154
|
+
snapshot, not a promise that every later phase is already known. In
|
|
155
|
+
`code-review`, later verifier agents are discovered after finder agents emit
|
|
156
|
+
candidates.
|
|
149
157
|
- `workflow.phase.planned` is emitted immediately before each phase starts and
|
|
150
158
|
carries that phase's current planned agent role labels. Each
|
|
151
159
|
`workflow.phase.started` record repeats the same role labels when the phase
|
|
@@ -158,6 +166,9 @@ Useful controls:
|
|
|
158
166
|
acting on it.
|
|
159
167
|
- Press `Ctrl-C` once to cancel the running workflow.
|
|
160
168
|
- Use `--retry-limit <n>` to retry failed runs in the same process.
|
|
169
|
+
- Use `--resume-from-run-id <runId>` to resume a completed local workflow from
|
|
170
|
+
preserved runtime state. Resume always uses the original persisted workflow
|
|
171
|
+
source; without `--args`, it also reuses the original args.
|
|
161
172
|
- `--timeout-ms 0` waits for completion, cancellation, or app-server exit.
|
|
162
173
|
Positive values opt into a workflow deadline and per-agent silence budget;
|
|
163
174
|
that budget is not divided by the retry budget.
|
|
@@ -180,19 +191,26 @@ Useful controls:
|
|
|
180
191
|
- Strip direct provider credentials from child CLI environments.
|
|
181
192
|
- Run Codex subagents against the requested workflow cwd and provide bounded
|
|
182
193
|
read-only workspace tools for text file reads and directory listings.
|
|
183
|
-
- Built-in `task`
|
|
184
|
-
|
|
185
|
-
|
|
194
|
+
- Built-in `task` adds deterministic workspace context to planner-selected
|
|
195
|
+
phase-wise parallel subagents. Built-in `code-review` uses deterministic
|
|
196
|
+
review evidence, allowed evidence refs, dynamic lenses, candidate verification,
|
|
197
|
+
and bounded final synthesis.
|
|
186
198
|
- Install consumers from a packaged artifact.
|
|
187
199
|
- Keep `journalPath`, `journal.jsonl`, and journal contents out of CLI output.
|
|
188
200
|
Local runtime state may still contain runtime-owned
|
|
189
201
|
`transcriptDir`, `scriptPath`, and result files.
|
|
190
|
-
- `
|
|
191
|
-
|
|
202
|
+
- `--resume-from-run-id` reads the preserved runtime script, result record, and
|
|
203
|
+
completed journal from the workflow state directory under
|
|
204
|
+
`${ULTRACODE_FOR_CODEX_HOME:-~/.ultracode-for-codex}`; completed agent
|
|
205
|
+
results are reused only when their runtime-owned call keys still match. The
|
|
206
|
+
script path, script source identity, and inherited args must match the
|
|
207
|
+
completed journal.
|
|
192
208
|
- Use `isolation: "worktree"` only in git repositories with at least one commit.
|
|
193
209
|
Isolated worktrees are intentionally preserved for review, including clean
|
|
194
210
|
worktrees.
|
|
195
|
-
- Treat
|
|
211
|
+
- Treat workflow state under `${ULTRACODE_FOR_CODEX_HOME:-~/.ultracode-for-codex}`
|
|
212
|
+
as sensitive local data. Project-local `.ultracode-for-codex/` directories are
|
|
213
|
+
legacy state and should stay ignored.
|
|
196
214
|
|
|
197
215
|
## First Checks After Install
|
|
198
216
|
|
|
@@ -215,5 +233,5 @@ workflow.
|
|
|
215
233
|
progress and completion summary examples for native orchestration.
|
|
216
234
|
- `skills/ultracode-for-codex-cli/SKILL.md`: explicit CLI runtime command.
|
|
217
235
|
- `docs/ultracode-p3a-journal-design.md`: implemented journal contract.
|
|
218
|
-
- `docs/ultracode-p3b-resume-cache.md`:
|
|
236
|
+
- `docs/ultracode-p3b-resume-cache.md`: local resume/cache contract.
|
|
219
237
|
- `docs/ultracode-p3c-worktree-isolation.md`: worktree isolation contract.
|