codex-orchestrator 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +274 -50
  2. package/dist/src/cli.js +71 -5
  3. package/dist/src/cli.js.map +1 -1
  4. package/dist/src/config/schema.d.ts +11 -0
  5. package/dist/src/config/schema.d.ts.map +1 -1
  6. package/dist/src/config/schema.js +45 -0
  7. package/dist/src/config/schema.js.map +1 -1
  8. package/dist/src/index.d.ts +2 -0
  9. package/dist/src/index.d.ts.map +1 -1
  10. package/dist/src/index.js +1 -0
  11. package/dist/src/index.js.map +1 -1
  12. package/dist/src/runner/daemon-command.d.ts +21 -0
  13. package/dist/src/runner/daemon-command.d.ts.map +1 -0
  14. package/dist/src/runner/daemon-command.js +73 -0
  15. package/dist/src/runner/daemon-command.js.map +1 -0
  16. package/dist/src/runner/plan-auto-command.d.ts.map +1 -1
  17. package/dist/src/runner/plan-auto-command.js +30 -0
  18. package/dist/src/runner/plan-auto-command.js.map +1 -1
  19. package/dist/src/runner/prompt.d.ts +6 -0
  20. package/dist/src/runner/prompt.d.ts.map +1 -1
  21. package/dist/src/runner/prompt.js +36 -2
  22. package/dist/src/runner/prompt.js.map +1 -1
  23. package/dist/src/runner/review-gates.d.ts +23 -0
  24. package/dist/src/runner/review-gates.d.ts.map +1 -0
  25. package/dist/src/runner/review-gates.js +71 -0
  26. package/dist/src/runner/review-gates.js.map +1 -0
  27. package/dist/src/runner/scoped-auto-command.d.ts.map +1 -1
  28. package/dist/src/runner/scoped-auto-command.js +38 -4
  29. package/dist/src/runner/scoped-auto-command.js.map +1 -1
  30. package/dist/src/setup/project-config.d.ts.map +1 -1
  31. package/dist/src/setup/project-config.js +46 -1
  32. package/dist/src/setup/project-config.js.map +1 -1
  33. package/dist/src/setup/setup-command.d.ts.map +1 -1
  34. package/dist/src/setup/setup-command.js +30 -3
  35. package/dist/src/setup/setup-command.js.map +1 -1
  36. package/package.json +2 -2
  37. package/prompts/setup-skill.md +8 -7
  38. package/prompts/workflows/scoped-implementation.md +2 -0
package/README.md CHANGED
@@ -1,85 +1,309 @@
1
1
  # codex-orchestrator
2
2
 
3
- `codex-orchestrator` is a reusable npm package and CLI for coordinating Codex work from GitHub Issues.
3
+ `codex-orchestrator` is a reusable runner for Codex work driven by GitHub
4
+ Issues.
4
5
 
5
- This repository is intentionally separate from IntelliOutreach. It is not an IntelliOutreach workspace package, and installed projects should keep their own policy under `.codex-orchestrator/`.
6
+ It lets a maintainer mark an issue as safe for autonomous work, run Codex in an
7
+ isolated workspace, and receive the result as a reviewable draft pull request.
8
+ For larger features, it can turn one parent issue into a planned issue tree,
9
+ execute safe child issues in dependency-aware waves, and open one integration
10
+ draft PR.
6
11
 
7
- ## Initial scope
12
+ The package is designed to be installed into any repository. The generic
13
+ orchestration lives in this npm package; each target repository keeps its own
14
+ policy in `.codex-orchestrator/`.
8
15
 
9
- The first package contract supports:
16
+ ## The Problem
10
17
 
11
- - GitHub Issues as the work source.
12
- - A local runner boundary.
13
- - A Codex adapter boundary, starting with `codex-cli`.
14
- - Project-local `.codex-orchestrator/` config.
15
- - Setup, status, scoped issue execution, parent issue-tree planning, and parent issue-tree execution.
18
+ Codex is useful for implementation work, but coordinating it manually does not
19
+ scale well:
16
20
 
17
- Always-on polling, auto-merge, hosted runner infrastructure, and npm publication are not implemented in this scope.
21
+ - a maintainer has to start a new chat for every small issue;
22
+ - large features need PRD, issue breakdown, triage, child issue execution, and
23
+ final integration;
24
+ - concurrent agent work can conflict if multiple tasks touch the same files;
25
+ - agents should not decide by themselves which linked issues are authorized;
26
+ - publication should be consistent: branch, commit, push, and pull request
27
+ creation should follow one project policy;
28
+ - humans still need review control before anything is merged.
18
29
 
19
- ## CLI
30
+ `codex-orchestrator` solves the coordination layer. GitHub Issues become the
31
+ work queue, GitHub labels become the state machine, and draft pull requests
32
+ become the handoff point back to humans.
33
+
34
+ ## What It Does
35
+
36
+ `codex-orchestrator` coordinates the full path from issue to draft PR:
37
+
38
+ - finds GitHub Issues that are explicitly authorized for autonomous work;
39
+ - blocks issues that are manual, already running, under review, or unsafe;
40
+ - creates isolated git worktrees and branches for Codex sessions;
41
+ - gives Codex project-local prompts and the current issue context;
42
+ - validates Codex's completion report and changed files;
43
+ - runs the configured project checks;
44
+ - owns commit, push, merge, labels, comments, and pull request creation;
45
+ - opens draft PRs instead of merging automatically;
46
+ - keeps local runner state so interrupted work can be inspected or recovered.
47
+
48
+ Codex edits files. The runner owns publication.
49
+
50
+ ## Authorization Modes
51
+
52
+ There are two main labels.
53
+
54
+ ### `agent:auto`
55
+
56
+ Use `agent:auto` for one scoped implementation issue.
57
+
58
+ Example:
59
+
60
+ ```sh
61
+ codex-orchestrator run --target . --issue 123
62
+ ```
63
+
64
+ The runner checks that issue `#123` is eligible, creates a worktree and branch,
65
+ runs Codex, validates the result, commits the changes, pushes the branch, and
66
+ opens one draft PR.
67
+
68
+ ### `agent:plan-auto`
69
+
70
+ Use `agent:plan-auto` for a larger parent issue.
71
+
72
+ This mode is for work that should be planned before implementation. The runner
73
+ asks Codex to produce or update the PRD, break the work into child issues,
74
+ review the breakdown, triage the children, and execute the autonomous children
75
+ in waves.
76
+
77
+ Only explicitly marked child issues belong to the autonomous tree. A child issue
78
+ must have the configured child label and the runner-owned parent marker. A link,
79
+ milestone, project, or casual reference is not enough.
80
+
81
+ Successful tree execution opens one integration draft PR.
82
+
83
+ ## How It Works
84
+
85
+ 1. Install the package.
86
+ 2. Run `setup` in the repository you want to automate.
87
+ 3. Commit the generated `.codex-orchestrator/` policy into that repository.
88
+ 4. Add `agent:auto` or `agent:plan-auto` to a GitHub Issue.
89
+ 5. Run `status` to see what is eligible or blocked.
90
+ 6. Run one selected issue with `run`.
91
+ 7. Review the draft PR created by the runner.
92
+
93
+ The runner does not auto-merge.
94
+
95
+ ## Installation
96
+
97
+ Requirements:
98
+
99
+ - Node.js 18 or newer;
100
+ - `git`;
101
+ - GitHub CLI `gh`, authenticated for the target repository;
102
+ - Codex CLI, installed and authenticated;
103
+ - write access to the target GitHub repository.
104
+
105
+ Install globally:
106
+
107
+ ```sh
108
+ npm install -g codex-orchestrator
109
+ ```
110
+
111
+ Check the CLI:
20
112
 
21
113
  ```sh
22
- codex-orchestrator --help
23
114
  codex-orchestrator --version
24
115
  codex-orchestrator health
25
- codex-orchestrator setup --target <path> --github-owner <owner> --github-repo <repo> --dry-run
26
- codex-orchestrator status --target <path> --dry-run
27
- codex-orchestrator run --target <path> --issue <number>
28
116
  ```
29
117
 
30
- The `health` command is a no-op local check for the initial CLI boot contract.
118
+ You can also run it with `npx`:
119
+
120
+ ```sh
121
+ npx codex-orchestrator --help
122
+ ```
123
+
124
+ ## Quick Start
125
+
126
+ Open the repository that should receive autonomous Codex work:
127
+
128
+ ```sh
129
+ cd /path/to/your/repo
130
+ ```
131
+
132
+ Run setup and create missing labels:
133
+
134
+ ```sh
135
+ codex-orchestrator setup --prepare-labels
136
+ ```
137
+
138
+ By default, setup reads the GitHub owner and repository name from `git remote
139
+ origin` and uses the current directory as the target repository. Use `--target`,
140
+ `--github-owner`, and `--github-repo` only when you need to override those
141
+ defaults.
142
+
143
+ Commit the generated `.codex-orchestrator/` directory to your repository. It is
144
+ the repository-owned policy for how autonomous work should run.
145
+
146
+ Check eligible work:
147
+
148
+ ```sh
149
+ codex-orchestrator status --target .
150
+ ```
151
+
152
+ Run one issue:
153
+
154
+ ```sh
155
+ codex-orchestrator run --target . --issue 123
156
+ ```
157
+
158
+ ## Agent-Assisted Setup
159
+
160
+ A user does not need a long prompt. They can ask an agent:
161
+
162
+ ```text
163
+ Set up codex-orchestrator for this repo.
164
+ ```
165
+
166
+ The agent should inspect the repository, confirm it has a GitHub `origin`
167
+ remote, and run:
31
168
 
32
- The `setup` command creates project-local configuration under `.codex-orchestrator/`.
33
- Use `--dry-run` to validate the config plan, label status, workflow sources, checks, branch naming, and pull request policy without writing files or launching Codex.
169
+ ```sh
170
+ codex-orchestrator setup --prepare-labels
171
+ ```
34
172
 
35
- Setup never commits changes and never opens a setup pull request.
173
+ If needed, the agent can discover the exact setup behavior from:
36
174
 
37
- Useful setup flags:
175
+ ```sh
176
+ codex-orchestrator --help
177
+ ```
38
178
 
39
- - `--prepare-labels` creates missing GitHub labels through the local `gh` CLI when not in dry-run mode.
40
- - `--skills-root <path>` changes where existing local Codex skills are detected.
41
- - `--replace-package-skills` allows package-owned prompt files under `.codex-orchestrator/prompts/` to be replaced.
179
+ The package also ships a setup prompt in `prompts/setup-skill.md`. Setup copies
180
+ that prompt into `.codex-orchestrator/prompts/setup-skill.md`, so future agents
181
+ working in the repository can find the repository-local setup guidance.
42
182
 
43
- By default, setup reports missing labels only and never overwrites existing prompt files.
183
+ Use `--dry-run` only when you want a preview without writing files or creating
184
+ labels.
44
185
 
45
- The `status` command reads configured GitHub issues and local runner metadata, then prints eligible work, skipped issues with reason codes, and restart recovery state.
46
- Use `--dry-run` to make the read-only intent explicit. Status and dry-run modes do not launch Codex or mutate GitHub labels/comments.
186
+ ## Project Policy
47
187
 
48
- The `run` command executes one authorized issue:
188
+ Every installed repository owns its own config:
49
189
 
50
- - `agent:auto` runs one scoped implementation issue. It mutates GitHub labels/comments, creates a worktree and branch, runs the configured Codex command with a durable prompt, commits/pushes runner-owned changes, and opens one draft pull request.
51
- - `agent:plan-auto` runs one parent issue tree. It claims the parent, sends the PRD, issue-breakdown, breakdown-review, and triage workflow prompts to Codex, requires a structured planning report, updates the parent PRD, creates or updates marked child issues, executes AFK-ready children in dependency-aware waves, merges child commits into one parent integration branch, pushes that branch, and opens one integration draft pull request.
190
+ ```sh
191
+ .codex-orchestrator/config.json
192
+ ```
52
193
 
53
- Autonomous child membership is explicit. A child belongs to a parent tree only when it has the configured `agent:child` label and its body contains:
194
+ That config controls:
195
+
196
+ - GitHub owner and repo;
197
+ - labels used for the runner state machine;
198
+ - base branch and branch name templates;
199
+ - validation checks such as `npm test`;
200
+ - review gates, including visual proof requirements for UI/frontend work;
201
+ - deny rules for secrets and unsafe actions;
202
+ - concurrency for child issue execution;
203
+ - pull request title templates;
204
+ - prompts used for PRD, issue breakdown, triage, scoped implementation, and
205
+ issue-tree orchestration.
206
+
207
+ The package ships fallback prompts so a user does not need to already have a
208
+ local Codex skill pack installed. During setup, compatible existing local skills
209
+ can be reused; missing workflows fall back to package-owned prompts.
210
+
211
+ For UI or frontend issues, the default visual proof gate blocks `agent:review`
212
+ unless the agent reports a passed BrowserUse/Playwright/screenshot validation
213
+ line and at least one screenshot artifact. Screenshot artifacts should be saved
214
+ under `.codex-orchestrator/proofs/issue-<number>/`; the runner includes them in
215
+ the PR and issue review report.
216
+
217
+ The default Codex command loads the user's Codex config so installed plugins,
218
+ including BrowserUse/browser, remain available to the child agent. It also
219
+ enables network access for the `workspace-write` sandbox so local dev servers can
220
+ bind to `localhost` during browser validation.
221
+
222
+ ## Labels
223
+
224
+ Default labels:
225
+
226
+ - `agent:auto` - a scoped issue is authorized for autonomous implementation;
227
+ - `agent:plan-auto` - a parent issue is authorized for planning and issue-tree
228
+ execution;
229
+ - `agent:child` - a child issue belongs to an autonomous parent tree;
230
+ - `agent:running` - the runner is currently working on the issue;
231
+ - `agent:blocked` - the runner needs maintainer input;
232
+ - `agent:manual` - the issue is reserved for human work;
233
+ - `agent:review` - the result is ready for human review.
234
+
235
+ `setup --prepare-labels` creates missing labels through `gh`.
236
+
237
+ ## Safety Model
238
+
239
+ The package is intentionally PR-first and human-reviewed.
240
+
241
+ Important guardrails:
242
+
243
+ - no automatic merge;
244
+ - draft PRs only;
245
+ - Codex changes files, but the runner owns git and GitHub publication;
246
+ - child issues are never inferred from ordinary links or references;
247
+ - manual, blocked, running, review, and closed issues are not started;
248
+ - child implementations run in isolated worktrees;
249
+ - parallel child work is limited and avoids overlapping ownership scopes;
250
+ - secret files are blocked by policy;
251
+ - destructive database/cache actions and production deploy/release actions are
252
+ blocked by default;
253
+ - underspecified work can be blocked for maintainer clarification instead of
254
+ letting Codex invent product decisions.
255
+
256
+ ## CLI Reference
54
257
 
55
- ```md
56
- <!-- codex-orchestrator:autonomous-child parent=#<parentIssueNumber> -->
258
+ ```sh
259
+ codex-orchestrator --help
260
+ codex-orchestrator --version
261
+ codex-orchestrator health
262
+ codex-orchestrator setup [--target <path>] [--github-owner <owner>] [--github-repo <repo>] [--dry-run] [--prepare-labels]
263
+ codex-orchestrator status --target <path> [--dry-run]
264
+ codex-orchestrator run --target <path> --issue <number>
57
265
  ```
58
266
 
59
- Arbitrary issue links, milestones, projects, comments, and generic parent references do not authorize child membership. `agent:auto` is added to generated child issues only when the planning report marks that child as AFK-ready and the runner has persisted and verified the explicit child marker for the parent.
267
+ ### `setup`
268
+
269
+ Creates project-local config and prompt files under `.codex-orchestrator/`.
270
+
271
+ Useful flags:
60
272
 
61
- Child execution is deliberately constrained:
273
+ - `--dry-run` - show the setup plan without writing files or creating labels;
274
+ - `--prepare-labels` - create missing GitHub labels;
275
+ - `--target <path>` - override the target directory, which defaults to the current directory;
276
+ - `--github-owner <owner>` - override the GitHub owner inferred from `origin`;
277
+ - `--github-repo <repo>` - override the GitHub repo inferred from `origin`;
278
+ - `--skills-root <path>` - choose where setup looks for existing Codex skills;
279
+ - `--replace-package-skills` - refresh package-owned prompt files.
62
280
 
63
- - Only children with both `agent:child` and the exact parent marker are considered.
64
- - Children marked HITL, manual, blocked, running, review, closed, malformed, or missing `agent:auto` block the parent tree before execution.
65
- - At most three child implementations run in parallel, and children with overlapping ownership scopes are serialized into later batches.
66
- - Every parallel child runs in its own temporary worktree and branch. Codex changes files only; the runner owns commits, merges, pushes, labels, comments, and pull requests.
67
- - Completed child commits merge sequentially into the parent integration branch. Merge conflicts block the parent tree, preserve relevant worktrees/branches for inspection, and do not push or open a PR.
68
- - Successful issue trees open one integration draft PR. The runner does not create separate child PRs in this POC.
281
+ Setup does not launch Codex, commit changes, or open pull requests.
69
282
 
70
- The runner never auto-merges and rejects configured secret file changes, reported secret reads/changes, reported destructive database/cache actions, reported production deploy/release actions, Codex-owned git commits, incoherent planning graphs, planning sessions that modify repository files, and child safety violations.
283
+ ### `status`
71
284
 
72
- ## Project config
285
+ Shows eligible issues, skipped issues with reasons, and local recovery state.
73
286
 
74
- Generated config is written to `.codex-orchestrator/config.json`. It records labels, workflow prompt paths, validation checks, deny rules, concurrency, branch naming, pull request templates, and issue classification settings.
287
+ `status` is read-only. It does not launch Codex and does not mutate GitHub.
75
288
 
76
- Runtime process state is excluded from committed config. State directories may be configured as policy paths, but active sessions, locks, retries, worktrees, and cache snapshots are not valid config.
289
+ ### `run`
77
290
 
78
- ## Workflow prompts
291
+ Executes one selected issue if its labels and state authorize autonomous work.
79
292
 
80
- The package ships original setup and workflow fallback prompts under `prompts/`. Setup copies them into `.codex-orchestrator/prompts/` when a target repository does not already provide prompt files.
293
+ For `agent:auto`, it runs one scoped implementation and opens one draft PR.
81
294
 
82
- If compatible local skills exist, setup records them as `existing-skill`. Missing workflow capabilities use package-owned prompt fallbacks.
295
+ For `agent:plan-auto`, it runs parent planning, child issue management,
296
+ dependency-aware child waves, final validation, and one integration draft PR.
297
+
298
+ ## Current Scope
299
+
300
+ The package currently focuses on explicit CLI-driven runs and project-local
301
+ configuration. The state machine and runner boundaries are designed for
302
+ always-on local runner workflows, but hosted infrastructure and automatic
303
+ polling are not part of this package today.
304
+
305
+ Non-GitHub trackers and non-Codex agents are also out of scope for the current
306
+ version, although the code keeps adapter boundaries for future expansion.
83
307
 
84
308
  ## Development
85
309
 
@@ -89,6 +313,6 @@ npm run build
89
313
  npm run typecheck
90
314
  ```
91
315
 
92
- ## npm publication
93
-
94
- Publishing to npm is out of scope until separately approved. This scaffold establishes the package contract, tests, and repository boundary only.
316
+ Publishing is configured through GitHub Actions. A push to `main` runs tests and
317
+ publishes the package to npm only when the current package version is not already
318
+ published. The repository must provide the GitHub secret `NPM_KEY`.
package/dist/src/cli.js CHANGED
@@ -4,6 +4,7 @@ import { GhCliIssueAdapter } from './github/gh-issue-adapter.js';
4
4
  import { readPackageInfo } from './package-info.js';
5
5
  import { readRunnerConfig } from './runner/command-utils.js';
6
6
  import { discoverIssueWork } from './runner/issue-state-machine.js';
7
+ import { runDaemonCommand } from './runner/daemon-command.js';
7
8
  import { runPlanAutoCommand } from './runner/plan-auto-command.js';
8
9
  import { runScopedAutoCommand } from './runner/scoped-auto-command.js';
9
10
  import { runStatusCommand } from './runner/status-command.js';
@@ -14,15 +15,17 @@ Usage:
14
15
  codex-orchestrator --help
15
16
  codex-orchestrator --version
16
17
  codex-orchestrator health
17
- codex-orchestrator setup --target <path> --github-owner <owner> --github-repo <repo> [--dry-run] [--prepare-labels]
18
+ codex-orchestrator setup [--target <path>] [--github-owner <owner>] [--github-repo <repo>] [--dry-run] [--prepare-labels]
18
19
  codex-orchestrator status --target <path> [--dry-run]
19
20
  codex-orchestrator run --target <path> --issue <number>
21
+ codex-orchestrator daemon --target <path> [--interval-seconds <number>] [--once] [--max-runs <number>]
20
22
 
21
23
  Commands:
22
24
  health Run a no-op local health check.
23
25
  setup Create or dry-run project-local orchestrator config. Use --prepare-labels to create missing agent labels.
24
26
  status Show eligible/skipped issue work and local recovery state.
25
27
  run Execute one authorized issue: scoped agent:auto or full agent:plan-auto issue tree.
28
+ daemon Poll GitHub Issues and execute eligible autonomous work until stopped.
26
29
 
27
30
  Options:
28
31
  --help, -h Show this help.
@@ -105,6 +108,30 @@ async function main(args) {
105
108
  return 1;
106
109
  }
107
110
  }
111
+ if (command === 'daemon') {
112
+ const parsed = parseDaemonArgs(args.slice(1));
113
+ if (!parsed.ok) {
114
+ process.stderr.write(`${parsed.error}\nRun codex-orchestrator --help for usage.\n`);
115
+ return 2;
116
+ }
117
+ try {
118
+ await runDaemonCommand({
119
+ targetRoot: parsed.value.target,
120
+ intervalMs: parsed.value.intervalSeconds * 1000,
121
+ once: parsed.value.once,
122
+ maxRuns: parsed.value.maxRuns,
123
+ onEvent: (line) => {
124
+ process.stdout.write(`${line}\n`);
125
+ },
126
+ });
127
+ return 0;
128
+ }
129
+ catch (error) {
130
+ const message = error instanceof Error ? error.message : 'daemon failed';
131
+ process.stderr.write(`${message}\n`);
132
+ return 1;
133
+ }
134
+ }
108
135
  process.stderr.write(`Unknown command: ${command}\nRun codex-orchestrator --help for usage.\n`);
109
136
  return 1;
110
137
  }
@@ -185,6 +212,48 @@ function parseStatusArgs(args) {
185
212
  }
186
213
  return { ok: true, value: { ...parsed, target: parsed.target } };
187
214
  }
215
+ function parseDaemonArgs(args) {
216
+ const parsed = {
217
+ intervalSeconds: 300,
218
+ once: false,
219
+ };
220
+ for (let index = 0; index < args.length; index += 1) {
221
+ const arg = args[index];
222
+ const next = args[index + 1];
223
+ switch (arg) {
224
+ case '--target':
225
+ if (!next || next.startsWith('--')) {
226
+ return { ok: false, error: `${arg} requires a value` };
227
+ }
228
+ parsed.target = next;
229
+ index += 1;
230
+ break;
231
+ case '--interval-seconds':
232
+ if (!next || next.startsWith('--') || !Number.isInteger(Number(next)) || Number(next) < 1) {
233
+ return { ok: false, error: 'daemon requires --interval-seconds <positive integer>' };
234
+ }
235
+ parsed.intervalSeconds = Number(next);
236
+ index += 1;
237
+ break;
238
+ case '--once':
239
+ parsed.once = true;
240
+ break;
241
+ case '--max-runs':
242
+ if (!next || next.startsWith('--') || !Number.isInteger(Number(next)) || Number(next) < 1) {
243
+ return { ok: false, error: 'daemon requires --max-runs <positive integer>' };
244
+ }
245
+ parsed.maxRuns = Number(next);
246
+ index += 1;
247
+ break;
248
+ default:
249
+ return { ok: false, error: `Unknown daemon option: ${arg ?? ''}` };
250
+ }
251
+ }
252
+ if (!parsed.target) {
253
+ return { ok: false, error: 'daemon requires --target <path>' };
254
+ }
255
+ return { ok: true, value: { ...parsed, target: parsed.target, intervalSeconds: parsed.intervalSeconds ?? 300 } };
256
+ }
188
257
  function parseSetupArgs(args) {
189
258
  const parsed = {
190
259
  dryRun: false,
@@ -236,10 +305,7 @@ function parseSetupArgs(args) {
236
305
  return { ok: false, error: `Unknown setup option: ${arg ?? ''}` };
237
306
  }
238
307
  }
239
- if (!parsed.target) {
240
- return { ok: false, error: 'setup requires --target <path>' };
241
- }
242
- return { ok: true, value: { ...parsed, target: parsed.target } };
308
+ return { ok: true, value: { ...parsed, target: parsed.target ?? process.cwd() } };
243
309
  }
244
310
  main(process.argv.slice(2))
245
311
  .then((exitCode) => {
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;CAmBhB,CAAC;AAsBF,KAAK,UAAU,IAAI,CAAC,IAAc;IAChC,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;IAEvB,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QAC5F,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC/B,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAI,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,WAAW,GAAG,MAAM,eAAe,EAAE,CAAC;QAC5C,OAAO,C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B,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAC;gBACnC,MAAM;YACR;gBACE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,yBAAyB,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC;QACtE,CAAC;IACH,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,OAAO,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC;AACpF,CAAC;AAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACxB,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;IACjB,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC9B,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACxB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC;IAC5E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;IACrC,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
@@ -56,6 +56,17 @@ export interface CodexOrchestratorConfig {
56
56
  issueTreeOrchestration: WorkflowConfig;
57
57
  };
58
58
  checks: Record<string, string>;
59
+ reviewGates: {
60
+ visualProof: {
61
+ enabled: boolean;
62
+ artifactDir: string;
63
+ issueTextPatterns: string[];
64
+ changedPathGlobs: string[];
65
+ requiredValidationPatterns: string[];
66
+ blockOnSkippedPatterns: string[];
67
+ minScreenshotArtifacts: number;
68
+ };
69
+ };
59
70
  deny: {
60
71
  secretFiles: string[];
61
72
  destructiveDbOrCache: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/config/schema.ts"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E,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,YAAY,EAAE;QACZ,gBAAgB,EAAE,MAAM,CAAC;QACzB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,mBAAmB,EAAE;QACnB,iBAAiB,EAAE,MAAM,EAAE,CAAC;QAC5B,iBAAiB,EAAE,iBAAiB,CAAC;KACtC,CAAC;CACH;AAED,MAAM,MAAM,sBAAsB,GAC9B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,uBAAuB,CAAA;CAAE,GAC5C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAIpC,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,CAqGrE"}
@@ -17,6 +17,7 @@ export function validateConfig(input) {
17
17
  const project = expectObject(root, 'project', errors);
18
18
  const workflows = expectObject(root, 'workflows', errors);
19
19
  const checks = expectObject(root, 'checks', errors);
20
+ const reviewGates = expectObject(root, 'reviewGates', errors);
20
21
  const deny = expectObject(root, 'deny', errors);
21
22
  const branches = expectObject(root, 'branches', errors);
22
23
  const pullRequests = expectObject(root, 'pullRequests', errors);
@@ -56,6 +57,9 @@ export function validateConfig(input) {
56
57
  if (checks) {
57
58
  validateChecks(checks, errors);
58
59
  }
60
+ if (reviewGates) {
61
+ validateReviewGates(reviewGates, errors);
62
+ }
59
63
  if (deny) {
60
64
  expectStringArray(deny, 'deny.secretFiles', errors);
61
65
  expectBoolean(deny, 'deny.destructiveDbOrCache', errors);
@@ -177,4 +181,45 @@ function validateChecks(checks, errors) {
177
181
  }
178
182
  }
179
183
  }
184
+ function validateReviewGates(parent, errors) {
185
+ const visualProof = expectObject(parent, 'reviewGates.visualProof', errors);
186
+ if (!visualProof) {
187
+ return;
188
+ }
189
+ expectBoolean(visualProof, 'reviewGates.visualProof.enabled', errors);
190
+ expectString(visualProof, 'reviewGates.visualProof.artifactDir', errors);
191
+ expectStringArray(visualProof, 'reviewGates.visualProof.issueTextPatterns', errors);
192
+ expectStringArray(visualProof, 'reviewGates.visualProof.changedPathGlobs', errors);
193
+ expectStringArray(visualProof, 'reviewGates.visualProof.requiredValidationPatterns', errors);
194
+ expectStringArray(visualProof, 'reviewGates.visualProof.blockOnSkippedPatterns', errors);
195
+ expectPositiveInteger(visualProof, 'reviewGates.visualProof.minScreenshotArtifacts', errors);
196
+ validateRegexArray(visualProof, 'reviewGates.visualProof.issueTextPatterns', errors);
197
+ validateRegexArray(visualProof, 'reviewGates.visualProof.requiredValidationPatterns', errors);
198
+ validateRegexArray(visualProof, 'reviewGates.visualProof.blockOnSkippedPatterns', errors);
199
+ }
200
+ function expectPositiveInteger(parent, path, errors) {
201
+ const value = readPath(parent, path);
202
+ if (!Number.isInteger(value) || typeof value !== 'number' || value < 1) {
203
+ errors.push(`${path} must be a positive integer`);
204
+ return undefined;
205
+ }
206
+ return value;
207
+ }
208
+ function validateRegexArray(parent, path, errors) {
209
+ const value = readPath(parent, path);
210
+ if (!Array.isArray(value)) {
211
+ return;
212
+ }
213
+ for (const pattern of value) {
214
+ if (typeof pattern !== 'string') {
215
+ continue;
216
+ }
217
+ try {
218
+ new RegExp(pattern, 'iu');
219
+ }
220
+ catch {
221
+ errors.push(`${path} contains invalid regular expression ${pattern}`);
222
+ }
223
+ }
224
+ }
180
225
  //# sourceMappingURL=schema.js.map