codex-orchestrator 0.1.24 → 0.1.26
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/CHANGELOG.md +24 -0
- package/README.md +173 -298
- package/dist/src/cli.js +56 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/codex/command-adapter.d.ts +12 -2
- package/dist/src/codex/command-adapter.d.ts.map +1 -1
- package/dist/src/codex/command-adapter.js +27 -7
- package/dist/src/codex/command-adapter.js.map +1 -1
- package/dist/src/config/schema.d.ts +37 -0
- package/dist/src/config/schema.d.ts.map +1 -1
- package/dist/src/config/schema.js +112 -0
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/index.d.ts +8 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/runner/context-snapshot.d.ts +28 -0
- package/dist/src/runner/context-snapshot.d.ts.map +1 -0
- package/dist/src/runner/context-snapshot.js +82 -0
- package/dist/src/runner/context-snapshot.js.map +1 -0
- package/dist/src/runner/daemon-command.d.ts.map +1 -1
- package/dist/src/runner/daemon-command.js +25 -1
- package/dist/src/runner/daemon-command.js.map +1 -1
- package/dist/src/runner/doctor-command.d.ts +39 -0
- package/dist/src/runner/doctor-command.d.ts.map +1 -0
- package/dist/src/runner/doctor-command.js +123 -0
- package/dist/src/runner/doctor-command.js.map +1 -0
- package/dist/src/runner/durable-run-summary.d.ts +41 -0
- package/dist/src/runner/durable-run-summary.d.ts.map +1 -0
- package/dist/src/runner/durable-run-summary.js +66 -0
- package/dist/src/runner/durable-run-summary.js.map +1 -0
- package/dist/src/runner/fresh-context-review.d.ts +22 -0
- package/dist/src/runner/fresh-context-review.d.ts.map +1 -0
- package/dist/src/runner/fresh-context-review.js +176 -0
- package/dist/src/runner/fresh-context-review.js.map +1 -0
- package/dist/src/runner/handoff-evidence.d.ts +17 -0
- package/dist/src/runner/handoff-evidence.d.ts.map +1 -1
- package/dist/src/runner/handoff-evidence.js +65 -0
- package/dist/src/runner/handoff-evidence.js.map +1 -1
- package/dist/src/runner/lifecycle-events.d.ts +44 -0
- package/dist/src/runner/lifecycle-events.d.ts.map +1 -0
- package/dist/src/runner/lifecycle-events.js +108 -0
- package/dist/src/runner/lifecycle-events.js.map +1 -0
- package/dist/src/runner/plan-auto-command.d.ts.map +1 -1
- package/dist/src/runner/plan-auto-command.js +252 -40
- package/dist/src/runner/plan-auto-command.js.map +1 -1
- package/dist/src/runner/rework-policy.d.ts +3 -0
- package/dist/src/runner/rework-policy.d.ts.map +1 -0
- package/dist/src/runner/rework-policy.js +20 -0
- package/dist/src/runner/rework-policy.js.map +1 -0
- package/dist/src/runner/scoped-auto-command.d.ts.map +1 -1
- package/dist/src/runner/scoped-auto-command.js +226 -24
- package/dist/src/runner/scoped-auto-command.js.map +1 -1
- package/dist/src/runner/status-command.d.ts +21 -0
- package/dist/src/runner/status-command.d.ts.map +1 -1
- package/dist/src/runner/status-command.js +26 -2
- package/dist/src/runner/status-command.js.map +1 -1
- package/dist/src/setup/project-config.d.ts.map +1 -1
- package/dist/src/setup/project-config.js +61 -0
- package/dist/src/setup/project-config.js.map +1 -1
- package/docs/deep-dive.md +364 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,30 @@ The format is based on Keep a Changelog, and this project follows SemVer.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.26] - 2026-05-16
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- Runner diagnostics wave: read-only `doctor`, `status --json`, phase-specific
|
|
13
|
+
Codex profiles, lifecycle events, and bounded context snapshots before Codex
|
|
14
|
+
sessions.
|
|
15
|
+
- Live smoke coverage for diagnostics/profile evidence through the packaged CLI.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Status and handoff evidence now point to bounded runner artifacts instead of
|
|
19
|
+
requiring operators to inspect raw Codex transcripts.
|
|
20
|
+
|
|
21
|
+
## [0.1.25] - 2026-05-15
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- Runner-owned Loop Policy controls for daemon priority selection, bounded
|
|
25
|
+
rework, optional Fresh-Context Review, Durable Run Summaries, and
|
|
26
|
+
non-mutating Policy Suggestions.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- Scoped and issue-tree handoff reports now include stronger runner-owned
|
|
30
|
+
evidence before draft PR publication, while keeping GitHub publication,
|
|
31
|
+
labels, comments, merges, releases, and deploys outside Agent authority.
|
|
32
|
+
|
|
9
33
|
## [0.1.24] - 2026-05-14
|
|
10
34
|
|
|
11
35
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,162 +1,94 @@
|
|
|
1
1
|
# codex-orchestrator
|
|
2
2
|
|
|
3
|
-
`codex-orchestrator`
|
|
3
|
+
`codex-orchestrator` turns GitHub Issues into controlled Codex work.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
Instead of starting a new Codex chat for every issue, you label the work you
|
|
6
|
+
want automated. The runner creates an isolated workspace, gives Codex the issue
|
|
7
|
+
and your repo rules, checks the result, and hands it back as a draft pull
|
|
8
|
+
request.
|
|
9
9
|
|
|
10
|
-
For
|
|
11
|
-
work, create or update child issues, run the safe
|
|
12
|
-
|
|
10
|
+
For bigger features, it can start from one parent issue, ask Codex to plan the
|
|
11
|
+
work, create or update child issues, run the safe children in order, and open
|
|
12
|
+
one integration draft PR.
|
|
13
13
|
|
|
14
|
-
The package is
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
The package is installed into any repository. The reusable runner lives in this
|
|
15
|
+
npm package; each target repository keeps its own rules in
|
|
16
|
+
`.codex-orchestrator/`.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
For a technical walkthrough of the runner lifecycle, policy model, review
|
|
19
|
+
gates, and recovery behavior, see [docs/deep-dive.md](docs/deep-dive.md).
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
scale well:
|
|
21
|
+
## Why This Exists
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
- large features need PRD, issue breakdown, triage, child issue execution, and
|
|
25
|
-
final integration;
|
|
26
|
-
- concurrent agent work can conflict if multiple tasks touch the same files;
|
|
27
|
-
- agents should not decide by themselves which linked issues are authorized;
|
|
28
|
-
- publication should be consistent: branch, commit, push, and pull request
|
|
29
|
-
creation should follow one project policy;
|
|
30
|
-
- humans still need review control before anything is merged.
|
|
23
|
+
Codex can write useful code, but running it manually gets messy fast:
|
|
31
24
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
- every small issue needs a new chat and repeated context;
|
|
26
|
+
- large features need planning, child issues, triage, execution, and final
|
|
27
|
+
integration;
|
|
28
|
+
- parallel agent work can conflict when tasks touch the same files;
|
|
29
|
+
- someone still needs to decide what is allowed, what is blocked, and what needs
|
|
30
|
+
review;
|
|
31
|
+
- branches, commits, checks, PRs, and labels should follow one project policy.
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
`codex-orchestrator` is the coordination layer.
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
GitHub Issues become the work queue. Labels decide what Codex may run. Isolated
|
|
36
|
+
worktrees keep runs separate. Review gates check the result. Draft PRs return
|
|
37
|
+
control to humans before anything is merged.
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
## What You Get
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
- A repeatable way to send selected GitHub Issues to Codex.
|
|
42
|
+
- One-off autonomous runs for scoped implementation tasks.
|
|
43
|
+
- Parent planning for larger features, with child issues executed in safe waves.
|
|
44
|
+
- Project-owned rules for labels, branches, prompts, checks, review gates, and
|
|
45
|
+
blocked actions.
|
|
46
|
+
- Full change-set checks, including local commits, staged files, unstaged files,
|
|
47
|
+
and untracked files.
|
|
48
|
+
- Durable logs and summaries when a run is interrupted, blocked, or ready for
|
|
49
|
+
review.
|
|
50
|
+
- Draft PR handoff by default. No auto-merge.
|
|
48
51
|
|
|
49
|
-
|
|
52
|
+
## How It Works
|
|
50
53
|
|
|
51
|
-
|
|
52
|
-
worktree, runs Codex with the issue context, validates the work, then opens a
|
|
53
|
-
draft PR for human review.
|
|
54
|
-
|
|
55
|
-
Codex may change files and, when project policy allows it, make local commits in
|
|
56
|
-
the issue branch. The runner still owns external publication: push, draft PR
|
|
57
|
-
creation, labels, comments, merges, publishing, and deploys.
|
|
58
|
-
|
|
59
|
-
### Parent Planning and Child Waves
|
|
60
|
-
|
|
61
|
-
Use `agent:plan-auto` for larger work. The runner asks Codex to plan the parent
|
|
62
|
-
issue, produce a child issue tree, mark safe child issues, and execute those
|
|
63
|
-
children in dependency-aware waves.
|
|
64
|
-
|
|
65
|
-
Only runner-marked child issues belong to the autonomous tree. A link, milestone,
|
|
66
|
-
project field, or casual reference is not enough. Successful tree execution
|
|
67
|
-
opens one integration draft PR.
|
|
68
|
-
|
|
69
|
-
### Review Gates Before Handoff
|
|
70
|
-
|
|
71
|
-
The runner checks the work before it opens a draft PR. By default, runtime
|
|
72
|
-
changes need test evidence, code review evidence, and for larger changes cleanup
|
|
73
|
-
review evidence. UI work can require visual proof such as screenshots or a
|
|
74
|
-
runner-owned browser validation command.
|
|
75
|
-
|
|
76
|
-
### Full Change-Set Awareness
|
|
77
|
-
|
|
78
|
-
The runner treats the agent result as a full local change set. That includes
|
|
79
|
-
local commits, staged files, unstaged files, and untracked files. Safety checks
|
|
80
|
-
and review gates are applied to the whole result, not just to whatever happens
|
|
81
|
-
to be left uncommitted.
|
|
82
|
-
|
|
83
|
-
### Durable Logs and Recovery
|
|
84
|
-
|
|
85
|
-
Runs keep local state and durable evidence so interrupted or blocked work can be
|
|
86
|
-
inspected. Agent output, validation results, skipped checks, residual risks,
|
|
87
|
-
visual artifacts, and preserved worktrees are surfaced in review or blocked
|
|
88
|
-
reports where relevant.
|
|
89
|
-
|
|
90
|
-
### Project-Owned Policy
|
|
91
|
-
|
|
92
|
-
Each target repository owns its policy in `.codex-orchestrator/`: labels,
|
|
93
|
-
branches, checks, prompts, review gates, deny rules, visual proof settings, and
|
|
94
|
-
runner behavior. The npm package provides the reusable runner; the repository
|
|
95
|
-
decides how strict the automation should be.
|
|
96
|
-
|
|
97
|
-
### PR-First by Design
|
|
98
|
-
|
|
99
|
-
The package does not auto-merge. It opens draft PRs and moves issues to a review
|
|
100
|
-
state so humans can inspect the result before anything lands on the base branch.
|
|
101
|
-
|
|
102
|
-
## What Happens During a Run
|
|
103
|
-
|
|
104
|
-
For a normal `agent:auto` issue, the runner:
|
|
105
|
-
|
|
106
|
-
1. Reads the issue and checks that its labels allow autonomous work.
|
|
107
|
-
2. Claims the issue so another runner does not start it at the same time.
|
|
108
|
-
3. Creates an isolated git worktree and branch.
|
|
109
|
-
4. Builds a project-aware Codex prompt from the issue and local policy.
|
|
110
|
-
5. Runs Codex and captures the result.
|
|
111
|
-
6. Collects the full local change set, including local commits when allowed.
|
|
112
|
-
7. Blocks unsafe paths, missing reports, failed checks, missing review evidence,
|
|
113
|
-
or skipped required proof.
|
|
114
|
-
8. Pushes the branch and opens a draft PR only after validation passes.
|
|
115
|
-
9. Posts a review report and moves the issue to `agent:review`.
|
|
116
|
-
|
|
117
|
-
## Authorization Modes
|
|
118
|
-
|
|
119
|
-
There are two main labels.
|
|
54
|
+
There are two main modes.
|
|
120
55
|
|
|
121
56
|
### `agent:auto`
|
|
122
57
|
|
|
123
|
-
Use `agent:auto` for one
|
|
124
|
-
|
|
125
|
-
Example:
|
|
58
|
+
Use `agent:auto` for one clear implementation issue.
|
|
126
59
|
|
|
127
|
-
|
|
128
|
-
codex-orchestrator run --target . --issue 123
|
|
129
|
-
```
|
|
60
|
+
The runner:
|
|
130
61
|
|
|
131
|
-
|
|
132
|
-
|
|
62
|
+
1. Checks that the issue is allowed to run.
|
|
63
|
+
2. Claims the issue so another runner does not start it too.
|
|
64
|
+
3. Creates a branch and isolated git worktree.
|
|
65
|
+
4. Runs Codex with the issue context and repo policy.
|
|
66
|
+
5. Validates the full local change set.
|
|
67
|
+
6. Pushes the branch and opens a draft PR only after the gates pass.
|
|
68
|
+
7. Moves the issue to review and posts the run report.
|
|
133
69
|
|
|
134
70
|
### `agent:plan-auto`
|
|
135
71
|
|
|
136
|
-
Use `agent:plan-auto` for
|
|
72
|
+
Use `agent:plan-auto` for work that needs planning first.
|
|
137
73
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
in waves.
|
|
74
|
+
The runner asks Codex to plan the parent issue, break it into child issues,
|
|
75
|
+
triage them, run safe children in dependency order, and then open one
|
|
76
|
+
integration draft PR.
|
|
142
77
|
|
|
143
|
-
Only explicitly marked
|
|
144
|
-
|
|
145
|
-
milestone, project, or casual reference is not enough.
|
|
146
|
-
|
|
147
|
-
Successful tree execution opens one integration draft PR.
|
|
78
|
+
Only child issues explicitly marked by the runner belong to the autonomous tree.
|
|
79
|
+
Ordinary links, milestones, project fields, or casual references are not enough.
|
|
148
80
|
|
|
149
81
|
## Basic Workflow
|
|
150
82
|
|
|
151
83
|
1. Install the package.
|
|
152
84
|
2. Run `setup` in the repository you want to automate.
|
|
153
|
-
3. Commit the generated `.codex-orchestrator/` policy
|
|
85
|
+
3. Commit the generated `.codex-orchestrator/` policy.
|
|
154
86
|
4. Add `agent:auto` or `agent:plan-auto` to a GitHub Issue.
|
|
155
87
|
5. Run `status` to see what is eligible or blocked.
|
|
156
88
|
6. Run one selected issue with `run`, or let `daemon` poll for eligible work.
|
|
157
89
|
7. Review the draft PR created by the runner.
|
|
158
90
|
|
|
159
|
-
The runner
|
|
91
|
+
The runner never auto-merges.
|
|
160
92
|
|
|
161
93
|
## Installation
|
|
162
94
|
|
|
@@ -213,6 +145,8 @@ Check eligible work:
|
|
|
213
145
|
|
|
214
146
|
```sh
|
|
215
147
|
codex-orchestrator status --target .
|
|
148
|
+
codex-orchestrator status --target . --json
|
|
149
|
+
codex-orchestrator doctor --target .
|
|
216
150
|
```
|
|
217
151
|
|
|
218
152
|
Run one issue:
|
|
@@ -221,9 +155,15 @@ Run one issue:
|
|
|
221
155
|
codex-orchestrator run --target . --issue 123
|
|
222
156
|
```
|
|
223
157
|
|
|
158
|
+
Run the daemon:
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
codex-orchestrator daemon --target .
|
|
162
|
+
```
|
|
163
|
+
|
|
224
164
|
## Agent-Assisted Setup
|
|
225
165
|
|
|
226
|
-
|
|
166
|
+
You do not need a long prompt. You can ask an agent:
|
|
227
167
|
|
|
228
168
|
```text
|
|
229
169
|
Set up codex-orchestrator for this repo.
|
|
@@ -244,81 +184,73 @@ codex-orchestrator --help
|
|
|
244
184
|
|
|
245
185
|
The package also ships a setup prompt in `prompts/setup-skill.md`. Setup copies
|
|
246
186
|
that prompt into `.codex-orchestrator/prompts/setup-skill.md`, so future agents
|
|
247
|
-
working in the repository can find
|
|
187
|
+
working in the repository can find repository-local setup guidance.
|
|
248
188
|
|
|
249
189
|
Use `--dry-run` only when you want a preview without writing files or creating
|
|
250
190
|
labels.
|
|
251
191
|
|
|
252
192
|
## Project Policy
|
|
253
193
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
Every installed repository owns its own config:
|
|
194
|
+
Every installed repository owns its config:
|
|
257
195
|
|
|
258
196
|
```sh
|
|
259
197
|
.codex-orchestrator/config.json
|
|
260
198
|
```
|
|
261
199
|
|
|
262
|
-
That config
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
- pull request title templates;
|
|
275
|
-
- prompts used for PRD, issue breakdown, triage, scoped implementation, and
|
|
276
|
-
issue-tree orchestration.
|
|
277
|
-
|
|
278
|
-
The package ships fallback prompts so a user does not need to already have a
|
|
279
|
-
local Codex skill pack installed. During setup, compatible existing local skills
|
|
280
|
-
can be reused; missing workflows fall back to package-owned prompts.
|
|
281
|
-
|
|
282
|
-
Configured checks run before publication. By default, missing `npm run <script>`
|
|
283
|
-
checks are treated as skipped warnings (not failures). You can override this
|
|
284
|
-
behavior with `checksPolicy.missingNpmScript`.
|
|
200
|
+
That config is where the repo decides how strict automation should be. It
|
|
201
|
+
controls the GitHub repo, labels, base branch, branch names, validation checks,
|
|
202
|
+
review gates, blocked paths, child issue concurrency, durable logs, PR titles,
|
|
203
|
+
and the prompts used for planning and implementation.
|
|
204
|
+
|
|
205
|
+
The package ships fallback prompts, so a repository does not need a local Codex
|
|
206
|
+
skill pack before setup. If compatible local skills already exist, setup can
|
|
207
|
+
reuse them.
|
|
208
|
+
|
|
209
|
+
Configured checks run before publication. By default, missing
|
|
210
|
+
`npm run <script>` checks are reported as skipped warnings, not failures. You can
|
|
211
|
+
change that with `checksPolicy.missingNpmScript`.
|
|
285
212
|
|
|
286
213
|
For repos with existing lint debt, `checksPolicy.lintBaseline.mode` can be set
|
|
287
|
-
to `touched-only
|
|
288
|
-
separate
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
214
|
+
to `touched-only`. That lets a repo-wide lint failure be downgraded when a
|
|
215
|
+
separate touched-files lint command passes.
|
|
216
|
+
|
|
217
|
+
The default quality gate is conservative for runtime code changes. It can
|
|
218
|
+
require TDD evidence, changed tests, code review, cleanup review for larger
|
|
219
|
+
changes, and visual proof for UI work.
|
|
220
|
+
|
|
221
|
+
## Diagnostics
|
|
222
|
+
|
|
223
|
+
`doctor` is a read-only readiness check for operators. It validates the target
|
|
224
|
+
config, GitHub label visibility, git/base branch access, runner state paths,
|
|
225
|
+
configured checks, the Codex command, phase profiles, and visual proof settings.
|
|
226
|
+
It never launches Codex, creates worktrees, edits labels, or changes issues.
|
|
227
|
+
|
|
228
|
+
```sh
|
|
229
|
+
codex-orchestrator doctor --target .
|
|
230
|
+
codex-orchestrator doctor --target . --json
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
`status --json` returns the same queue view as text status plus active local
|
|
234
|
+
runs and recent lifecycle events. The JSON is designed for wrappers and
|
|
235
|
+
dashboards; it includes bounded artifact paths such as context snapshots, but
|
|
236
|
+
not raw Codex transcripts, secrets, prompt text, or full issue comments.
|
|
237
|
+
|
|
238
|
+
Codex command profiles can be set per runner phase under `codex.profiles`.
|
|
239
|
+
Supported phases are `plan-parent`, `scoped-issue`, `tree-child`,
|
|
240
|
+
`fresh-context-review`, `visual-proof`, and `quality-review`. Missing profile
|
|
241
|
+
fields fall back to the global `codex.command`, `codex.args`, `timeoutMs`, and
|
|
242
|
+
`idleTimeoutMs`, so existing configs keep working.
|
|
243
|
+
|
|
244
|
+
Each Codex session writes a bounded context snapshot before invocation and links
|
|
245
|
+
it from lifecycle events under the runner state directory. Snapshots record the
|
|
246
|
+
issue identity, runner decision, selected profile, workspace paths, and
|
|
247
|
+
publication boundaries so a maintainer can reproduce why a session started
|
|
248
|
+
without reading raw logs.
|
|
249
|
+
|
|
250
|
+
## Visual Proof
|
|
251
|
+
|
|
252
|
+
For browser UI work, configure a runner-owned proof command, usually a
|
|
253
|
+
Playwright script:
|
|
322
254
|
|
|
323
255
|
```json
|
|
324
256
|
{
|
|
@@ -335,107 +267,69 @@ Configure a runner-owned command:
|
|
|
335
267
|
}
|
|
336
268
|
```
|
|
337
269
|
|
|
338
|
-
The runner executes this command from the issue worktree after Codex finishes
|
|
339
|
-
before review-gate evaluation. It
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
`CODEX_ORCHESTRATOR_PLAYWRIGHT_PROFILE_DIR`,
|
|
343
|
-
`CODEX_ORCHESTRATOR_WORKTREE_PATH`, and `CODEX_ORCHESTRATOR_CHANGED_FILES`.
|
|
344
|
-
Use `CODEX_ORCHESTRATOR_PLAYWRIGHT_PROFILE_DIR` as the Playwright user data
|
|
345
|
-
directory when proof scripts need a stable browser profile; this runtime
|
|
346
|
-
directory and `PLAYWRIGHT_BROWSERS_PATH` are kept outside the worktree so browser
|
|
347
|
-
cache and session files are not committed. Screenshot files
|
|
348
|
-
created or updated under
|
|
349
|
-
`CODEX_ORCHESTRATOR_PROOF_DIR` are attached to the PR and issue review report as
|
|
350
|
-
runner-owned proof artifacts. A zero-exit proof command that does not create or
|
|
351
|
-
update the configured minimum number of screenshots is reported as a warning.
|
|
352
|
-
|
|
353
|
-
If the target UI requires login, keep credentials outside the config and expose
|
|
354
|
-
only their variable names through `envPassthrough`. The visual proof script can
|
|
355
|
-
read those values, sign in with the browser automation tool it uses, and fail
|
|
356
|
-
with a clear message when a required login variable is missing.
|
|
357
|
-
|
|
358
|
-
The default Codex command loads the user's Codex config so installed plugins
|
|
359
|
-
remain available to the child agent. It also enables network access for the
|
|
360
|
-
`workspace-write` sandbox so local dev servers can bind to `localhost` during
|
|
361
|
-
browser validation.
|
|
362
|
-
|
|
363
|
-
## Local Commits vs Publication
|
|
364
|
-
|
|
365
|
-
`codex-orchestrator` separates local implementation work from external
|
|
366
|
-
publication.
|
|
367
|
-
|
|
368
|
-
Implementation agents may be allowed to create local commits in their issue
|
|
369
|
-
worktree. This can make larger sessions easier to inspect because the branch
|
|
370
|
-
contains meaningful checkpoints. Local commits are still treated as untrusted
|
|
371
|
-
agent output until the runner validates them.
|
|
372
|
-
|
|
373
|
-
The runner remains the only owner of external publication:
|
|
374
|
-
|
|
375
|
-
- pushing branches;
|
|
376
|
-
- opening draft pull requests;
|
|
377
|
-
- moving GitHub labels;
|
|
378
|
-
- posting issue comments;
|
|
379
|
-
- merging child branches into an integration branch;
|
|
380
|
-
- publishing packages or deploying.
|
|
381
|
-
|
|
382
|
-
If an agent tries to bypass those boundaries, the run is blocked instead of
|
|
383
|
-
published.
|
|
270
|
+
The runner executes this command from the issue worktree after Codex finishes
|
|
271
|
+
and before review-gate evaluation. It sets environment variables for the issue
|
|
272
|
+
number, artifact directory, proof directory, Playwright profile directory,
|
|
273
|
+
worktree path, and changed files.
|
|
384
274
|
|
|
385
|
-
|
|
275
|
+
Screenshots created under `CODEX_ORCHESTRATOR_PROOF_DIR` are attached to the PR
|
|
276
|
+
and issue review report. Keep login credentials outside config and expose only
|
|
277
|
+
their variable names through `envPassthrough`.
|
|
386
278
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
execution;
|
|
392
|
-
- `agent:child` - a child issue belongs to an autonomous parent tree;
|
|
393
|
-
- `agent:running` - the runner is currently working on the issue;
|
|
394
|
-
- `agent:blocked` - the runner needs maintainer input;
|
|
395
|
-
- `agent:manual` - the issue is reserved for human work;
|
|
396
|
-
- `agent:review` - the result is ready for human review.
|
|
397
|
-
|
|
398
|
-
`setup --prepare-labels` creates missing labels through `gh`.
|
|
279
|
+
For Android UI work, the implementation prompt asks Codex to use `adb` or an
|
|
280
|
+
emulator-backed proof path instead of browser proof. Missing Android tooling or
|
|
281
|
+
no usable device is reported as a warning with the concrete reason, not as an
|
|
282
|
+
automatic release blocker.
|
|
399
283
|
|
|
400
284
|
## Safety Model
|
|
401
285
|
|
|
402
|
-
The package is
|
|
286
|
+
The package is PR-first and human-reviewed. The important guardrails are:
|
|
403
287
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
-
|
|
408
|
-
- Codex may change files and local commits, but the runner owns remote
|
|
409
|
-
publication and GitHub state;
|
|
288
|
+
- no automatic merge, and only draft PRs are opened;
|
|
289
|
+
- Codex may change files, but the runner owns remote publication and GitHub
|
|
290
|
+
state;
|
|
291
|
+
- only explicitly authorized issues run;
|
|
410
292
|
- child issues are never inferred from ordinary links or references;
|
|
411
|
-
- manual, blocked, running, review, and closed issues are not started;
|
|
412
|
-
- child implementations run in isolated worktrees;
|
|
413
|
-
- parallel child work is limited and avoids overlapping ownership scopes;
|
|
414
293
|
- committed and uncommitted changes are checked before publication;
|
|
415
|
-
- secret files
|
|
416
|
-
|
|
417
|
-
blocked by default;
|
|
294
|
+
- secret files, destructive data/cache actions, and production deploy/release
|
|
295
|
+
actions are blocked by default;
|
|
418
296
|
- malformed or missing completion reports block publication;
|
|
297
|
+
- bounded rework stops at the configured limit;
|
|
298
|
+
- Policy Suggestions are recommendations only;
|
|
419
299
|
- underspecified work can be blocked for maintainer clarification instead of
|
|
420
300
|
letting Codex invent product decisions.
|
|
421
301
|
|
|
302
|
+
## Labels
|
|
303
|
+
|
|
304
|
+
Default labels:
|
|
305
|
+
|
|
306
|
+
- `agent:auto` - run one scoped issue;
|
|
307
|
+
- `agent:plan-auto` - plan and run a parent issue tree;
|
|
308
|
+
- `agent:child` - child issue in an autonomous tree;
|
|
309
|
+
- `agent:running` - runner is working;
|
|
310
|
+
- `agent:blocked` - maintainer input needed;
|
|
311
|
+
- `agent:manual` - reserved for human work;
|
|
312
|
+
- `agent:review` - ready for human review.
|
|
313
|
+
|
|
314
|
+
`setup --prepare-labels` creates missing labels through `gh`.
|
|
315
|
+
|
|
422
316
|
## CLI Reference
|
|
423
317
|
|
|
424
318
|
```sh
|
|
425
319
|
codex-orchestrator --help
|
|
426
320
|
codex-orchestrator --version
|
|
427
321
|
codex-orchestrator health
|
|
428
|
-
codex-orchestrator
|
|
429
|
-
codex-orchestrator
|
|
322
|
+
codex-orchestrator doctor --target <path> [--json]
|
|
323
|
+
codex-orchestrator setup [--target <path>] [--github-owner <owner>] \
|
|
324
|
+
[--github-repo <repo>] [--dry-run] [--prepare-labels]
|
|
325
|
+
codex-orchestrator status --target <path> [--dry-run] [--json]
|
|
430
326
|
codex-orchestrator run --target <path> --issue <number>
|
|
431
|
-
codex-orchestrator daemon --target <path> [--once]
|
|
327
|
+
codex-orchestrator daemon --target <path> [--once] \
|
|
328
|
+
[--interval-seconds <seconds>] [--max-runs <count>]
|
|
432
329
|
```
|
|
433
330
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
Creates project-local config and prompt files under `.codex-orchestrator/`.
|
|
437
|
-
|
|
438
|
-
Useful flags:
|
|
331
|
+
`setup` creates project-local config and prompt files under
|
|
332
|
+
`.codex-orchestrator/`. Useful flags:
|
|
439
333
|
|
|
440
334
|
- `--dry-run` - show the setup plan without writing files or creating labels;
|
|
441
335
|
- `--prepare-labels` - create missing GitHub labels;
|
|
@@ -447,42 +341,21 @@ Useful flags:
|
|
|
447
341
|
|
|
448
342
|
Setup does not launch Codex, commit changes, or open pull requests.
|
|
449
343
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
Shows eligible issues, skipped issues with reasons, and local recovery state.
|
|
453
|
-
|
|
454
|
-
`status` is read-only. It does not launch Codex and does not mutate GitHub.
|
|
455
|
-
|
|
456
|
-
### `run`
|
|
344
|
+
`status` is read-only. It shows eligible issues, skipped issues with reasons,
|
|
345
|
+
and local recovery state.
|
|
457
346
|
|
|
458
|
-
|
|
347
|
+
`run` executes one selected issue when labels and state allow it. `agent:auto`
|
|
348
|
+
opens one scoped draft PR. `agent:plan-auto` runs parent planning, child waves,
|
|
349
|
+
final validation, and one integration draft PR.
|
|
459
350
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
dependency-aware child waves, final validation, and one integration draft PR.
|
|
464
|
-
|
|
465
|
-
### `daemon`
|
|
466
|
-
|
|
467
|
-
Polls GitHub Issues for eligible `agent:auto` or `agent:plan-auto` work and runs
|
|
468
|
-
one issue at a time.
|
|
469
|
-
|
|
470
|
-
After each polling cycle, the daemon also cleans up runner-owned worktrees when
|
|
471
|
-
all of these are true:
|
|
472
|
-
|
|
473
|
-
- the worktree is under `runner.workspaceRoot`;
|
|
474
|
-
- the worktree is not listed in local runner state as active;
|
|
475
|
-
- the worktree branch has a merged GitHub pull request;
|
|
476
|
-
- the worktree has no uncommitted or untracked changes.
|
|
477
|
-
|
|
478
|
-
Dirty, blocked, active, or unpublished worktrees are preserved for maintainer
|
|
479
|
-
inspection. Cleanup is built into the daemon; there is intentionally no separate
|
|
480
|
-
cleanup CLI command.
|
|
351
|
+
`daemon` polls for eligible work and runs one issue at a time. It also cleans up
|
|
352
|
+
runner-owned worktrees after their PRs are merged, while preserving dirty,
|
|
353
|
+
blocked, active, or unpublished worktrees for inspection.
|
|
481
354
|
|
|
482
355
|
## Current Scope
|
|
483
356
|
|
|
484
|
-
The package focuses on local runner workflows:
|
|
485
|
-
|
|
357
|
+
The package focuses on local runner workflows: one-off runs, daemon polling,
|
|
358
|
+
project-local configuration, and runner-owned worktree cleanup. Hosted
|
|
486
359
|
infrastructure is not part of this package today.
|
|
487
360
|
|
|
488
361
|
Non-GitHub trackers and non-Codex agents are also out of scope for the current
|
|
@@ -499,3 +372,5 @@ npm run typecheck
|
|
|
499
372
|
Publishing is configured through GitHub Actions. A push to `main` runs tests and
|
|
500
373
|
publishes the package to npm only when the current package version is not already
|
|
501
374
|
published. The repository must provide the GitHub secret `NPM_KEY`.
|
|
375
|
+
|
|
376
|
+
See `CHANGELOG.md` for release-by-release notes.
|