ultracode-for-codex 0.2.6 → 0.3.1
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 +74 -26
- package/ULTRACODE_INSTALL.md +72 -18
- package/dist/cli.d.ts +15 -0
- package/dist/cli.js +771 -4
- package/docs/provenance-audit.md +3 -2
- package/package.json +4 -2
- package/skills/ultracode-for-codex/SKILL.md +95 -111
- package/skills/ultracode-for-codex/agents/openai.yaml +2 -2
- package/skills/ultracode-for-codex/references/progress-visuals.md +125 -0
- package/skills/ultracode-for-codex-cli/SKILL.md +136 -0
- package/skills/ultracode-for-codex-cli/agents/openai.yaml +4 -0
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Ultracode for Codex
|
|
2
2
|
|
|
3
|
-
Ultracode for Codex
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
Ultracode for Codex ships two Codex skill commands plus a local npm CLI runtime.
|
|
4
|
+
`$ultracode-for-codex` is the default high-visibility mode: the Codex main
|
|
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.
|
|
9
10
|
|
|
10
11
|
## Quick Start
|
|
11
12
|
|
|
@@ -16,6 +17,16 @@ npm install --save-dev ultracode-for-codex
|
|
|
16
17
|
npm exec -- ultracode-for-codex --llm-guide
|
|
17
18
|
```
|
|
18
19
|
|
|
20
|
+
Install the Codex skill commands from the package:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
|
|
24
|
+
cp -R ./node_modules/ultracode-for-codex/skills/ultracode-for-codex \
|
|
25
|
+
"${CODEX_HOME:-$HOME/.codex}/skills/"
|
|
26
|
+
cp -R ./node_modules/ultracode-for-codex/skills/ultracode-for-codex-cli \
|
|
27
|
+
"${CODEX_HOME:-$HOME/.codex}/skills/"
|
|
28
|
+
```
|
|
29
|
+
|
|
19
30
|
Build and verify a local installable tarball from a source checkout:
|
|
20
31
|
|
|
21
32
|
```bash
|
|
@@ -26,10 +37,10 @@ npm run pack:ultracode-for-codex
|
|
|
26
37
|
Install the tarball from a target project:
|
|
27
38
|
|
|
28
39
|
```bash
|
|
29
|
-
npm install --save-dev /path/to/ultracode-for-codex
|
|
40
|
+
npm install --save-dev /path/to/ultracode-for-codex-<version>.tgz
|
|
30
41
|
```
|
|
31
42
|
|
|
32
|
-
Run
|
|
43
|
+
Run through the CLI runtime when that path is explicitly wanted:
|
|
33
44
|
|
|
34
45
|
```bash
|
|
35
46
|
npm exec -- ultracode-for-codex run \
|
|
@@ -41,6 +52,17 @@ npm exec -- ultracode-for-codex run \
|
|
|
41
52
|
|
|
42
53
|
By default this prints a background launch record to stdout. The record contains
|
|
43
54
|
`jobId`, `pid`, `resultPath`, `progressPath`, `metadataPath`, and `pidPath`.
|
|
55
|
+
Use the job id to inspect or control the background run:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm exec -- ultracode-for-codex status <jobId> --cwd /path/to/target-repo
|
|
59
|
+
npm exec -- ultracode-for-codex wait <jobId> --cwd /path/to/target-repo
|
|
60
|
+
npm exec -- ultracode-for-codex logs <jobId> --cwd /path/to/target-repo --tail 40
|
|
61
|
+
npm exec -- ultracode-for-codex result <jobId> --cwd /path/to/target-repo
|
|
62
|
+
npm exec -- ultracode-for-codex cancel <jobId> --cwd /path/to/target-repo
|
|
63
|
+
npm exec -- ultracode-for-codex jobs --cwd /path/to/target-repo
|
|
64
|
+
npm exec -- ultracode-for-codex archive <jobId> --cwd /path/to/target-repo
|
|
65
|
+
```
|
|
44
66
|
|
|
45
67
|
Run attached to the current terminal:
|
|
46
68
|
|
|
@@ -64,14 +86,14 @@ npm exec -- ultracode-for-codex run \
|
|
|
64
86
|
--args '{"prompt":"review correctness risks and propose fixes"}'
|
|
65
87
|
```
|
|
66
88
|
|
|
67
|
-
The built-in `task` and `code-review` workflows use an LLM planner first,
|
|
68
|
-
run work phase by phase. Within each phase, multiple focused Codex
|
|
69
|
-
in parallel by default, followed by phase and final synthesis. The
|
|
70
|
-
choose a single-agent path only when parallel execution would add
|
|
71
|
-
Planner guidance includes dynamic workflow patterns such as
|
|
72
|
-
fan-out-and-synthesize, adversarial verification,
|
|
73
|
-
tournament, and loop-until-done, so different work types
|
|
74
|
-
phase shapes.
|
|
89
|
+
The CLI built-in `task` and `code-review` workflows use an LLM planner first,
|
|
90
|
+
then run work phase by phase. Within each phase, multiple focused Codex
|
|
91
|
+
subagents run in parallel by default, followed by phase and final synthesis. The
|
|
92
|
+
planner may choose a single-agent path only when parallel execution would add
|
|
93
|
+
risk or waste. Planner guidance includes dynamic workflow patterns such as
|
|
94
|
+
classify-and-act, fan-out-and-synthesize, adversarial verification,
|
|
95
|
+
generate-and-filter, tournament, and loop-until-done, so different work types
|
|
96
|
+
can use different phase shapes.
|
|
75
97
|
|
|
76
98
|
## Settings
|
|
77
99
|
|
|
@@ -102,12 +124,21 @@ The package default workflow timeout is `0`, meaning the workflow waits until it
|
|
|
102
124
|
completes, is cancelled, or the Codex app-server exits. Set `--timeout-ms` to a
|
|
103
125
|
positive value to opt into a deadline for one run.
|
|
104
126
|
Use the default background execution for long Codex-launched work so Codex can
|
|
105
|
-
continue other tasks and inspect
|
|
127
|
+
continue other tasks and inspect the job later with `status`, `logs`, or
|
|
128
|
+
`result`. Use
|
|
106
129
|
`--execution attached` only when the caller must block until the final result.
|
|
107
130
|
|
|
108
131
|
## CLI Controls
|
|
109
132
|
|
|
110
133
|
- Use `--version` or `-v` to print the installed package version.
|
|
134
|
+
- Use `status`, `wait`, `logs`, `result`, and `cancel` with a background
|
|
135
|
+
`jobId` or `metadata.json` path to inspect, wait for, read, or cancel OS
|
|
136
|
+
background runs.
|
|
137
|
+
- Use `jobs` or `list` to enumerate local background runs.
|
|
138
|
+
- Use `archive` or `export` to write a sensitive local JSON bundle for one run
|
|
139
|
+
without deleting runtime state.
|
|
140
|
+
- Use `wait --result`, `cancel --wait`, `logs --event <event>`, and `--plain`
|
|
141
|
+
for shorter foreground checks.
|
|
111
142
|
- Progress is printed to stderr as JSONL by default.
|
|
112
143
|
- The final workflow result is printed as JSON to stdout.
|
|
113
144
|
- JSONL records include `kind`, `version`, `event`, `status`, and `summary`;
|
|
@@ -120,6 +151,10 @@ continue other tasks and inspect `progressPath` or `resultPath` later. Use
|
|
|
120
151
|
begins.
|
|
121
152
|
- Each `workflow.agent.completed` record includes phase progress, total known
|
|
122
153
|
agent progress, and elapsed time.
|
|
154
|
+
- After a completed run, `workflow.summary.ready` reports each phase with its
|
|
155
|
+
planned agent count and angle/focus list, then `workflow.review.recommended`
|
|
156
|
+
asks the current session LLM to critically re-check the final result before
|
|
157
|
+
acting on it.
|
|
123
158
|
- Press `Ctrl-C` once to cancel the active workflow.
|
|
124
159
|
- Use `--retry-limit <n>` to retry failed workflows inside the same process.
|
|
125
160
|
- `--timeout-ms 0` waits for completion, cancellation, or app-server exit.
|
|
@@ -131,14 +166,18 @@ continue other tasks and inspect `progressPath` or `resultPath` later. Use
|
|
|
131
166
|
- Use `--execution background` for OS background runs and `--execution attached`
|
|
132
167
|
only when the caller should stay connected until completion.
|
|
133
168
|
|
|
134
|
-
## Codex
|
|
169
|
+
## Codex Skill Commands
|
|
135
170
|
|
|
136
|
-
The npm package
|
|
137
|
-
`skills/ultracode-for-codex` is a lightweight operating guide for agents using
|
|
138
|
-
the package; it contains no runtime code.
|
|
171
|
+
The npm package includes two Codex skill command folders:
|
|
139
172
|
|
|
140
|
-
|
|
141
|
-
|
|
173
|
+
- `skills/ultracode-for-codex`: default Codex-native orchestration. The main
|
|
174
|
+
context plans adaptive phases, spawns parallel subagents, synthesizes each
|
|
175
|
+
phase, reports completion progress, and recommends a final critical re-check.
|
|
176
|
+
Live progress uses test-runner-style visual snapshots; completion reporting
|
|
177
|
+
uses a diffstat-style impact summary plus a plan-style result summary.
|
|
178
|
+
- `skills/ultracode-for-codex-cli`: explicit CLI runtime operations, including
|
|
179
|
+
background jobs, attached runs, packaging, release checks, runtime-boundary
|
|
180
|
+
validation, and installed E2E tests.
|
|
142
181
|
|
|
143
182
|
## Runtime Boundaries
|
|
144
183
|
|
|
@@ -147,7 +186,7 @@ want Codex to auto-load the package boundaries and verification routine.
|
|
|
147
186
|
environment.
|
|
148
187
|
- Codex subagents run against the requested workflow cwd and receive bounded
|
|
149
188
|
read-only workspace tools for text file reads and directory listings.
|
|
150
|
-
-
|
|
189
|
+
- CLI built-in `task` and `code-review` inject deterministic workspace context into
|
|
151
190
|
planner-selected phase-wise parallel subagents, then synthesize each phase and
|
|
152
191
|
the final result.
|
|
153
192
|
- Workflow execution is local and command-owned; settings default to OS
|
|
@@ -196,6 +235,12 @@ For supported CI/CD environments, provenance is available as an explicit opt-in:
|
|
|
196
235
|
npm run publish:npm:provenance
|
|
197
236
|
```
|
|
198
237
|
|
|
238
|
+
Optional live smoke against the local Codex CLI:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
ULTRACODE_LIVE_SMOKE=1 npm run smoke:live
|
|
242
|
+
```
|
|
243
|
+
|
|
199
244
|
Useful local run:
|
|
200
245
|
|
|
201
246
|
```bash
|
|
@@ -205,8 +250,11 @@ node dist/cli.js run --accept-llm-guide=v1 --script-file ./workflow.js
|
|
|
205
250
|
|
|
206
251
|
## Docs
|
|
207
252
|
|
|
208
|
-
- `skills/ultracode-for-codex/SKILL.md`: Codex
|
|
209
|
-
|
|
253
|
+
- `skills/ultracode-for-codex/SKILL.md`: default Codex-native orchestrator
|
|
254
|
+
skill command.
|
|
255
|
+
- `skills/ultracode-for-codex/references/progress-visuals.md`: golden visual
|
|
256
|
+
progress and completion summary examples for native orchestration.
|
|
257
|
+
- `skills/ultracode-for-codex-cli/SKILL.md`: explicit CLI runtime skill command.
|
|
210
258
|
- `ULTRACODE_INSTALL.md`: install and operating guide for LLM agents.
|
|
211
259
|
- `docs/ultracode-p3a-journal-design.md`: journal contract.
|
|
212
260
|
- `docs/ultracode-p3b-resume-cache.md`: runtime-internal resume/cache contract.
|
package/ULTRACODE_INSTALL.md
CHANGED
|
@@ -1,18 +1,41 @@
|
|
|
1
1
|
# Ultracode install and usage guide
|
|
2
2
|
|
|
3
3
|
This file is for LLM agents installing or operating `ultracode-for-codex`.
|
|
4
|
-
Read it before running workflows
|
|
4
|
+
Read it before running CLI workflows, installing the Codex skill commands, or
|
|
5
|
+
generating integration code.
|
|
5
6
|
|
|
6
7
|
## What This Package Does
|
|
7
8
|
|
|
8
|
-
`ultracode-for-codex` provides
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
`ultracode-for-codex` provides two Codex skill command surfaces and a local
|
|
10
|
+
command-owned workflow runtime backed by an already-authenticated Codex CLI
|
|
11
|
+
session.
|
|
12
|
+
|
|
13
|
+
Skill commands:
|
|
14
|
+
|
|
15
|
+
- `$ultracode-for-codex`: default Codex-native orchestration. The main Codex
|
|
16
|
+
context plans phases, spawns focused parallel subagents, synthesizes results,
|
|
17
|
+
and shows progress directly in the chat with test-runner-style live snapshots
|
|
18
|
+
and diffstat-plus-plan completion summaries.
|
|
19
|
+
- `$ultracode-for-codex-cli`: explicit CLI runtime operation for background
|
|
20
|
+
jobs, attached runs, package validation, release checks, and reproducible
|
|
21
|
+
local runtime artifacts.
|
|
22
|
+
|
|
23
|
+
The packaged `settings.json` defaults CLI workflow runs to OS background
|
|
24
|
+
execution with result and progress files under
|
|
11
25
|
`.ultracode-for-codex/background/{jobId}`.
|
|
12
26
|
|
|
13
27
|
Production surface:
|
|
14
28
|
|
|
15
29
|
- `ultracode-for-codex run`
|
|
30
|
+
- `ultracode-for-codex status`
|
|
31
|
+
- `ultracode-for-codex wait`
|
|
32
|
+
- `ultracode-for-codex logs`
|
|
33
|
+
- `ultracode-for-codex result`
|
|
34
|
+
- `ultracode-for-codex cancel`
|
|
35
|
+
- `ultracode-for-codex jobs`
|
|
36
|
+
- `ultracode-for-codex list`
|
|
37
|
+
- `ultracode-for-codex archive`
|
|
38
|
+
- `ultracode-for-codex export`
|
|
16
39
|
|
|
17
40
|
Progress, cancellation, permission review, retry, and final result projection
|
|
18
41
|
are handled inside the CLI process. Progress is JSONL on stderr by
|
|
@@ -31,21 +54,24 @@ npm exec -- ultracode-for-codex --llm-guide
|
|
|
31
54
|
For source-checkout validation, install the generated tarball instead:
|
|
32
55
|
|
|
33
56
|
```bash
|
|
34
|
-
npm install --save-dev ./ultracode-for-codex
|
|
57
|
+
npm install --save-dev ./ultracode-for-codex-<version>.tgz
|
|
35
58
|
```
|
|
36
59
|
|
|
37
|
-
Optional Codex
|
|
60
|
+
Optional Codex skill commands:
|
|
38
61
|
|
|
39
62
|
```bash
|
|
40
63
|
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
|
|
41
64
|
cp -R ./node_modules/ultracode-for-codex/skills/ultracode-for-codex \
|
|
42
65
|
"${CODEX_HOME:-$HOME/.codex}/skills/"
|
|
66
|
+
cp -R ./node_modules/ultracode-for-codex/skills/ultracode-for-codex-cli \
|
|
67
|
+
"${CODEX_HOME:-$HOME/.codex}/skills/"
|
|
43
68
|
```
|
|
44
69
|
|
|
45
|
-
|
|
46
|
-
|
|
70
|
+
`$ultracode-for-codex` keeps orchestration in the main Codex context.
|
|
71
|
+
`$ultracode-for-codex-cli` uses the npm CLI runtime. The npm package remains the
|
|
72
|
+
runtime artifact for CLI execution.
|
|
47
73
|
|
|
48
|
-
## Run
|
|
74
|
+
## Run The CLI Runtime
|
|
49
75
|
|
|
50
76
|
```bash
|
|
51
77
|
npm exec -- ultracode-for-codex run \
|
|
@@ -57,14 +83,26 @@ npm exec -- ultracode-for-codex run \
|
|
|
57
83
|
|
|
58
84
|
The default run prints a background launch record to stdout. Prefer that
|
|
59
85
|
background path for long Codex-launched work so Codex can continue other tasks
|
|
60
|
-
and inspect `
|
|
61
|
-
only when the caller must block until completion.
|
|
62
|
-
|
|
63
|
-
Use
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
and inspect the job later with `status`, `logs`, or `result`. Use
|
|
87
|
+
`--execution attached` only when the caller must block until completion.
|
|
88
|
+
|
|
89
|
+
Use the background `jobId` from the launch record to inspect or control the run:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npm exec -- ultracode-for-codex status <jobId> --cwd /path/to/project
|
|
93
|
+
npm exec -- ultracode-for-codex wait <jobId> --cwd /path/to/project
|
|
94
|
+
npm exec -- ultracode-for-codex logs <jobId> --cwd /path/to/project --tail 40
|
|
95
|
+
npm exec -- ultracode-for-codex result <jobId> --cwd /path/to/project
|
|
96
|
+
npm exec -- ultracode-for-codex cancel <jobId> --cwd /path/to/project
|
|
97
|
+
npm exec -- ultracode-for-codex jobs --cwd /path/to/project
|
|
98
|
+
npm exec -- ultracode-for-codex archive <jobId> --cwd /path/to/project
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use CLI built-in `task` for general work and `code-review` for review-specific
|
|
102
|
+
work. Both start with an LLM planner, execute phase by phase, run multiple
|
|
103
|
+
focused Codex subagents in parallel within each phase by default, and synthesize
|
|
104
|
+
phase and final results. The planner chooses a single-agent path only when
|
|
105
|
+
parallel execution would add risk or waste.
|
|
68
106
|
Planner guidance includes classify-and-act, fan-out-and-synthesize,
|
|
69
107
|
adversarial verification, generate-and-filter, tournament, and loop-until-done
|
|
70
108
|
patterns so different work types can use different phase shapes.
|
|
@@ -93,6 +131,13 @@ Settings defaults:
|
|
|
93
131
|
Useful controls:
|
|
94
132
|
|
|
95
133
|
- `--version` or `-v` prints the installed package version.
|
|
134
|
+
- `status`, `wait`, `logs`, `result`, and `cancel` accept a background `jobId`
|
|
135
|
+
or `metadata.json` path.
|
|
136
|
+
- `jobs` and `list` enumerate local background runs.
|
|
137
|
+
- `archive` and `export` write a sensitive local JSON bundle for one run without
|
|
138
|
+
deleting runtime state.
|
|
139
|
+
- `wait --result`, `cancel --wait`, `logs --event <event>`, and `--plain` are
|
|
140
|
+
available for shorter foreground checks.
|
|
96
141
|
- Progress events are printed to stderr as JSONL by default.
|
|
97
142
|
- The final workflow result is printed as JSON to stdout.
|
|
98
143
|
- The package default workflow timeout is `0`, meaning the workflow waits until
|
|
@@ -107,6 +152,10 @@ Useful controls:
|
|
|
107
152
|
begins.
|
|
108
153
|
- Each `workflow.agent.completed` record includes phase progress, total known
|
|
109
154
|
agent progress, and elapsed time.
|
|
155
|
+
- After a completed run, `workflow.summary.ready` reports each phase with its
|
|
156
|
+
planned agent count and angle/focus list, then `workflow.review.recommended`
|
|
157
|
+
asks the current session LLM to critically re-check the final result before
|
|
158
|
+
acting on it.
|
|
110
159
|
- Press `Ctrl-C` once to cancel the running workflow.
|
|
111
160
|
- Use `--retry-limit <n>` to retry failed runs in the same process.
|
|
112
161
|
- `--timeout-ms 0` waits for completion, cancellation, or app-server exit.
|
|
@@ -121,7 +170,7 @@ Useful controls:
|
|
|
121
170
|
## Runtime Contract
|
|
122
171
|
|
|
123
172
|
- Use Codex app-server over stdio as the production backend.
|
|
124
|
-
- Keep workflow execution local and command-owned; settings default to OS
|
|
173
|
+
- Keep CLI workflow execution local and command-owned; settings default to OS
|
|
125
174
|
background execution so long runs can keep waiting while Codex does other
|
|
126
175
|
work.
|
|
127
176
|
- Route progress, cancellation, permission review, retry, and result projection
|
|
@@ -160,6 +209,11 @@ workflow.
|
|
|
160
209
|
## Documentation Map
|
|
161
210
|
|
|
162
211
|
- `README.md`: human quickstart and common examples.
|
|
212
|
+
- `skills/ultracode-for-codex/SKILL.md`: default Codex-native orchestrator
|
|
213
|
+
command.
|
|
214
|
+
- `skills/ultracode-for-codex/references/progress-visuals.md`: golden visual
|
|
215
|
+
progress and completion summary examples for native orchestration.
|
|
216
|
+
- `skills/ultracode-for-codex-cli/SKILL.md`: explicit CLI runtime command.
|
|
163
217
|
- `docs/ultracode-p3a-journal-design.md`: implemented journal contract.
|
|
164
218
|
- `docs/ultracode-p3b-resume-cache.md`: runtime-internal resume/cache contract.
|
|
165
219
|
- `docs/ultracode-p3c-worktree-isolation.md`: worktree isolation contract.
|
package/dist/cli.d.ts
CHANGED
|
@@ -20,5 +20,20 @@ interface ParsedOptions {
|
|
|
20
20
|
readonly resumeFromRunId?: string;
|
|
21
21
|
readonly permission?: string;
|
|
22
22
|
readonly retryLimit?: string;
|
|
23
|
+
readonly jobId?: string;
|
|
24
|
+
readonly metadataPath?: string;
|
|
25
|
+
readonly resultPath?: string;
|
|
26
|
+
readonly progressPath?: string;
|
|
27
|
+
readonly pidPath?: string;
|
|
28
|
+
readonly intervalMs?: string;
|
|
29
|
+
readonly tail?: string;
|
|
30
|
+
readonly signal?: string;
|
|
31
|
+
readonly plain?: string;
|
|
32
|
+
readonly format?: string;
|
|
33
|
+
readonly event?: string;
|
|
34
|
+
readonly result?: string;
|
|
35
|
+
readonly wait?: string;
|
|
36
|
+
readonly outDir?: string;
|
|
37
|
+
readonly outputPath?: string;
|
|
23
38
|
}
|
|
24
39
|
export declare function parseOptions(args: readonly string[]): ParsedOptions;
|