@open-agent-toolkit/cli 0.1.45 → 0.1.48
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/assets/agents/oat-phase-implementer.md +202 -191
- package/assets/agents/oat-reviewer.md +12 -2
- package/assets/config/dispatch-matrix-recommendation.json +120 -13
- package/assets/docs/cli-utilities/config-and-local-state.md +7 -0
- package/assets/docs/cli-utilities/configuration.md +183 -84
- package/assets/docs/cli-utilities/workflow-gates.md +161 -27
- package/assets/docs/contributing/skills.md +14 -8
- package/assets/docs/provider-sync/config.md +5 -1
- package/assets/docs/provider-sync/manifest-and-drift.md +6 -1
- package/assets/docs/provider-sync/providers.md +42 -5
- package/assets/docs/provider-sync/scope-and-surface.md +3 -2
- package/assets/docs/reference/cli-reference.md +3 -1
- package/assets/docs/reference/oat-directory-structure.md +27 -26
- package/assets/docs/workflows/projects/artifacts.md +31 -1
- package/assets/docs/workflows/projects/dispatch-ceiling.md +235 -174
- package/assets/docs/workflows/projects/implementation-execution.md +283 -253
- package/assets/docs/workflows/projects/lifecycle.md +26 -5
- package/assets/docs/workflows/projects/reviews.md +27 -2
- package/assets/migration/pjm-restructure.md +1 -1
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-project-implement/SKILL.md +347 -178
- package/assets/skills/oat-project-import-plan/SKILL.md +173 -16
- package/assets/skills/oat-project-next/SKILL.md +2 -2
- package/assets/skills/oat-project-plan/SKILL.md +122 -92
- package/assets/skills/oat-project-plan-writing/SKILL.md +246 -15
- package/assets/skills/oat-project-quick-start/SKILL.md +156 -94
- package/assets/skills/oat-project-review-provide/SKILL.md +94 -22
- package/dist/commands/config/index.d.ts +2 -2
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +129 -53
- package/dist/commands/doctor/index.d.ts +2 -2
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +102 -31
- package/dist/commands/gate/index.d.ts +7 -1
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +544 -67
- package/dist/commands/gate/review-verdict.d.ts +16 -0
- package/dist/commands/gate/review-verdict.d.ts.map +1 -1
- package/dist/commands/gate/review-verdict.js +72 -9
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +586 -23
- package/dist/commands/providers/codex/index.d.ts +4 -0
- package/dist/commands/providers/codex/index.d.ts.map +1 -0
- package/dist/commands/providers/codex/index.js +7 -0
- package/dist/commands/providers/codex/materialize.d.ts +5 -0
- package/dist/commands/providers/codex/materialize.d.ts.map +1 -0
- package/dist/commands/providers/codex/materialize.js +157 -0
- package/dist/commands/providers/index.d.ts +2 -2
- package/dist/commands/providers/index.d.ts.map +1 -1
- package/dist/commands/providers/index.js +4 -2
- package/dist/commands/providers/providers.types.d.ts +23 -0
- package/dist/commands/providers/providers.types.d.ts.map +1 -1
- package/dist/commands/shared/codex-strays.d.ts.map +1 -1
- package/dist/commands/shared/codex-strays.js +11 -1
- package/dist/commands/shared/frontmatter.d.ts +4 -0
- package/dist/commands/shared/frontmatter.d.ts.map +1 -1
- package/dist/commands/shared/frontmatter.js +23 -0
- package/dist/commands/status/index.d.ts +5 -1
- package/dist/commands/status/index.d.ts.map +1 -1
- package/dist/commands/status/index.js +10 -4
- package/dist/commands/sync/index.d.ts.map +1 -1
- package/dist/commands/sync/index.js +10 -3
- package/dist/commands/sync/sync.types.d.ts +5 -1
- package/dist/commands/sync/sync.types.d.ts.map +1 -1
- package/dist/config/dispatch-ceiling-preset.d.ts +4 -0
- package/dist/config/dispatch-ceiling-preset.d.ts.map +1 -1
- package/dist/config/dispatch-ceiling-preset.js +3 -0
- package/dist/config/dispatch-policy-options.d.ts +20 -0
- package/dist/config/dispatch-policy-options.d.ts.map +1 -0
- package/dist/config/dispatch-policy-options.js +96 -0
- package/dist/config/oat-config.d.ts +25 -2
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +154 -24
- package/dist/config/resolve.d.ts +8 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +66 -2
- package/dist/engine/index.d.ts +1 -1
- package/dist/engine/index.d.ts.map +1 -1
- package/dist/engine/index.js +1 -1
- package/dist/engine/scanner.d.ts +1 -0
- package/dist/engine/scanner.d.ts.map +1 -1
- package/dist/engine/scanner.js +17 -1
- package/dist/fs/paths.d.ts +4 -0
- package/dist/fs/paths.d.ts.map +1 -1
- package/dist/fs/paths.js +18 -1
- package/dist/providers/ceiling/registry.d.ts +8 -5
- package/dist/providers/ceiling/registry.d.ts.map +1 -1
- package/dist/providers/ceiling/registry.js +25 -7
- package/dist/providers/codex/codec/catalog.d.ts +14 -0
- package/dist/providers/codex/codec/catalog.d.ts.map +1 -0
- package/dist/providers/codex/codec/catalog.js +21 -0
- package/dist/providers/codex/codec/config-merge.d.ts +6 -0
- package/dist/providers/codex/codec/config-merge.d.ts.map +1 -1
- package/dist/providers/codex/codec/config-merge.js +7 -0
- package/dist/providers/codex/codec/materialize.d.ts +16 -0
- package/dist/providers/codex/codec/materialize.d.ts.map +1 -0
- package/dist/providers/codex/codec/materialize.js +58 -0
- package/dist/providers/codex/codec/shared.d.ts +20 -0
- package/dist/providers/codex/codec/shared.d.ts.map +1 -1
- package/dist/providers/codex/codec/shared.js +107 -6
- package/dist/providers/codex/codec/sync-extension.d.ts +7 -1
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +299 -52
- package/dist/providers/identity/availability.d.ts +24 -1
- package/dist/providers/identity/availability.d.ts.map +1 -1
- package/dist/providers/identity/availability.js +253 -19
- package/dist/providers/identity/stamp.d.ts.map +1 -1
- package/dist/providers/identity/stamp.js +4 -0
- package/dist/shared/types.d.ts +1 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/shared/types.js +4 -0
- package/package.json +2 -2
|
@@ -1,339 +1,369 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Implementation Execution
|
|
3
|
-
description: 'Phase
|
|
3
|
+
description: 'Phase coordination, exact task-worker dispatch, named maximum ceilings, reviews, bounded fixes, plan-declared parallel worktrees, and resumption in oat-project-implement.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Implementation Execution
|
|
7
7
|
|
|
8
|
-
This page
|
|
8
|
+
This page describes how `oat-project-implement` executes a plan after planning
|
|
9
|
+
has established a complete ordered candidate ladder and a project named
|
|
10
|
+
ceiling.
|
|
9
11
|
|
|
10
12
|
## Quick Look
|
|
11
13
|
|
|
12
|
-
- **
|
|
13
|
-
|
|
14
|
-
- **
|
|
15
|
-
|
|
16
|
-
- **
|
|
14
|
+
- **Phase boundary:** one phase coordinator owns dependency order, integration,
|
|
15
|
+
and the phase summary.
|
|
16
|
+
- **Task boundary:** the coordinator dispatches one exact task worker per task.
|
|
17
|
+
Each worker receives one bounded Task Scope and creates one verified commit.
|
|
18
|
+
- **Named maximum:** a project or narrower phase named ceiling is a maximum over
|
|
19
|
+
configured candidates, not an exact model-family preference.
|
|
20
|
+
- **Serial worktree rule:** task workers run serially in the same worktree.
|
|
21
|
+
Parallelism is limited to plan-declared phase worktrees.
|
|
22
|
+
- **Fail closed:** a missing, above-ceiling, or uninvokable managed candidate
|
|
23
|
+
blocks. OAT does not substitute the coordinator target, a base role, or a
|
|
24
|
+
provider default.
|
|
17
25
|
|
|
18
|
-
## Execution
|
|
26
|
+
## Execution Layers
|
|
19
27
|
|
|
20
|
-
###
|
|
28
|
+
### Orchestrator
|
|
21
29
|
|
|
22
|
-
|
|
30
|
+
The root `oat-project-implement` workflow resolves project state, chooses Tier
|
|
31
|
+
1 or Tier 2 mechanics, builds the phase schedule, dispatches coordinators and
|
|
32
|
+
reviewers, owns the review/fix loop, updates artifacts, and performs worktree
|
|
33
|
+
fan-in.
|
|
23
34
|
|
|
24
|
-
|
|
25
|
-
- **Codex multi-agent:** Tier 1 if `spawn_agent` is allowed without authorization, or after an explicit single prompt at skill start if authorization is required. Codex subagent dispatch should use self-contained scope packets with fresh context; do not assume pinned OAT roles can also inherit the full parent thread.
|
|
26
|
-
- **Authorization declined or agents do not resolve:** Tier 2 (inline). The orchestrator reads `.agents/agents/oat-phase-implementer.md` and `.agents/agents/oat-reviewer.md` as reference and executes that process itself.
|
|
35
|
+
### Phase coordinator
|
|
27
36
|
|
|
28
|
-
|
|
37
|
+
A Phase Scope selects coordinator mode in `oat-phase-implementer`. The
|
|
38
|
+
coordinator reads the phase artifacts once, retains task dependency order,
|
|
39
|
+
selects one exact configured target for each task, waits for and verifies every
|
|
40
|
+
worker result and commit, then performs phase-wide integration verification and
|
|
41
|
+
self-review.
|
|
29
42
|
|
|
30
|
-
The
|
|
43
|
+
The coordinator must not implement ordinary plan tasks itself. Its execution
|
|
44
|
+
target is not a task target and cannot be reused as a fallback.
|
|
31
45
|
|
|
32
|
-
|
|
33
|
-
[preflight] Checking subagent availability…
|
|
34
|
-
→ oat-phase-implementer + oat-reviewer: available
|
|
35
|
-
→ Selected: Tier 1 — Subagents
|
|
36
|
-
```
|
|
46
|
+
### Task worker
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
A Task Scope selects worker mode in the same canonical agent instructions. The
|
|
49
|
+
worker implements exactly one task, runs that task's verification, creates one
|
|
50
|
+
commit, returns a compact result, and stops. It does not dispatch another worker
|
|
51
|
+
or coordinate the phase.
|
|
39
52
|
|
|
40
|
-
|
|
53
|
+
This dual-mode contract lets every materialized Codex
|
|
54
|
+
`oat-phase-implementer-<model>-<effort>` role act as either the coordinator or
|
|
55
|
+
the exact bounded worker without recursive coordinator dispatch.
|
|
41
56
|
|
|
42
|
-
|
|
57
|
+
## Tier Selection
|
|
43
58
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
59
|
+
At skill start, OAT detects whether the host can run the coordinator,
|
|
60
|
+
task-worker, and reviewer routes:
|
|
61
|
+
|
|
62
|
+
- **Tier 1:** native provider subagent dispatch.
|
|
63
|
+
- **Tier 2:** guarded sequential coordinator mechanics when native role
|
|
64
|
+
selection is unavailable.
|
|
47
65
|
|
|
48
|
-
|
|
66
|
+
Tier 2 does not authorize inline task implementation by the coordinator. A
|
|
67
|
+
managed task still requires an exact registered role, an exact provider model
|
|
68
|
+
argument, or a fresh Codex child pinned to the resolver-returned model and
|
|
69
|
+
effort. If the current context cannot dispatch that worker, implementation
|
|
70
|
+
blocks.
|
|
49
71
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
4. Legacy `oat_dispatch_ceiling` in project `state.md` frontmatter
|
|
54
|
-
5. Interactive implementation preflight prompt
|
|
55
|
-
6. Non-interactive unresolved state blocks before work starts
|
|
72
|
+
Codex may require one explicit authorization prompt for multi-agent dispatch.
|
|
73
|
+
That approval covers coordinators, task workers, and reviewers for the run. Tier
|
|
74
|
+
mechanics remain locked after selection; they never change the target contract.
|
|
56
75
|
|
|
57
|
-
|
|
76
|
+
## Dispatch Readiness
|
|
58
77
|
|
|
59
|
-
|
|
78
|
+
Planning through spec-driven, quick-start, import-plan, or provider-plan-via-
|
|
79
|
+
import performs the same readiness setup:
|
|
60
80
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
| Inherit Host Defaults | inherit | none | none |
|
|
81
|
+
1. Inspect the effective ordered candidate ladders.
|
|
82
|
+
2. If incomplete, show the complete bundled recommendation and ask whether
|
|
83
|
+
`--shared`, `--local`, or `--user` should own adoption.
|
|
84
|
+
3. Recheck after non-destructive adoption. Remaining gaps block readiness.
|
|
85
|
+
4. Record the active project named maximum in project `state.md`, not user
|
|
86
|
+
config.
|
|
87
|
+
5. Optionally record a narrower phase named maximum in plan Dispatch Profile.
|
|
69
88
|
|
|
70
|
-
|
|
89
|
+
See [Dispatch Policy](dispatch-ceiling.md) for ladder shapes and ownership.
|
|
71
90
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
91
|
+
Before phase work, implementation runs provider preflight:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
oat project dispatch-ceiling resolve \
|
|
95
|
+
--provider <active-provider> \
|
|
96
|
+
--preflight \
|
|
97
|
+
--json
|
|
78
98
|
```
|
|
79
99
|
|
|
80
|
-
|
|
100
|
+
An unresolved non-interactive preflight blocks. Managed `Uncapped` and
|
|
101
|
+
`Inherit Host Defaults` are explicit modes; omitted policy state is not an
|
|
102
|
+
implicit fallback.
|
|
81
103
|
|
|
82
|
-
|
|
83
|
-
- `advisory` — the provider is supported but no value resolved, or an upgrade request was not honored by the provider.
|
|
84
|
-
- `unsupported` — the provider has no registered adapter; the policy is informational only. Dispatch follows provider behavior.
|
|
104
|
+
## Resolve the Effective Named Maximum
|
|
85
105
|
|
|
86
|
-
|
|
106
|
+
For each phase, the orchestrator determines the task maximum:
|
|
87
107
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
108
|
+
1. Read project `state.md:oat_dispatch_policy.policy`.
|
|
109
|
+
2. Read the phase's optional Dispatch Profile row.
|
|
110
|
+
3. An explicit `economy`, `balanced`, `high`, or `frontier` phase value narrows
|
|
111
|
+
the project maximum and records `task_ceiling_source: phase`.
|
|
112
|
+
4. Blank, absent, or `auto` uses the project maximum and records
|
|
113
|
+
`task_ceiling_source: project`.
|
|
114
|
+
5. Reject an unknown phase tier or one above the project maximum.
|
|
92
115
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
The
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
In Claude Code, implementation and fix dispatch classify a preferred model tier (`haiku`, `sonnet`, `opus`, or `fable`) and pass it to `oat project dispatch-ceiling resolve --provider claude --role implementer --preferred <model> --orchestrator-tier <current-orchestrator-tier>`. Capped policies select `min(preferred, resolved_cap)`, managed `Uncapped` selects the preferred model, and inherit/default omits `model`. Reviewer dispatch passes a `model` only when the resolver returns one. The separate effort axis is `not-applicable`.
|
|
118
|
-
|
|
119
|
-
Dispatch logs use a consistent structured block so provider behavior is comparable without flattening the model and effort axes:
|
|
120
|
-
|
|
121
|
-
```text
|
|
122
|
-
OAT Dispatch: Phase p01 implementation
|
|
123
|
-
Host: Claude Code
|
|
124
|
-
Model axis: selected:sonnet
|
|
125
|
-
Effort axis: not-applicable
|
|
126
|
-
Dispatch target: oat-phase-implementer
|
|
127
|
-
Rationale: multi-file integration with mock wiring; sonnet is the lowest sufficient Claude model.
|
|
128
|
-
|
|
129
|
-
OAT Dispatch: Phase p02 implementation
|
|
130
|
-
Host: Codex
|
|
131
|
-
Preferred effort: high
|
|
132
|
-
Dispatch policy: economy
|
|
133
|
-
Resolved cap: medium
|
|
134
|
-
Selected effort: medium
|
|
135
|
-
Policy source: repo config
|
|
136
|
-
Provider default effort: high
|
|
137
|
-
Selection mode: capped
|
|
138
|
-
Model axis: inherited
|
|
139
|
-
Effort axis: selected:medium
|
|
140
|
-
Dispatch target: oat-phase-implementer-medium
|
|
141
|
-
Rationale: shared TypeScript/config substrate; high preferred due to integration risk, capped by configured policy.
|
|
142
|
-
|
|
143
|
-
OAT Dispatch: Phase p03 review
|
|
144
|
-
Host: Codex
|
|
145
|
-
Dispatch policy: high
|
|
146
|
-
Resolved cap: xhigh
|
|
147
|
-
Selected effort: xhigh
|
|
148
|
-
Policy source: project state
|
|
149
|
-
Provider default effort: medium
|
|
150
|
-
Selection mode: review-target
|
|
151
|
-
Model axis: inherited
|
|
152
|
-
Effort axis: selected:xhigh
|
|
153
|
-
Dispatch target: oat-reviewer-xhigh
|
|
154
|
-
Rationale: reviewer runs at the configured policy cap for deterministic quality gate behavior.
|
|
155
|
-
|
|
156
|
-
OAT Dispatch: Phase p03 implementation
|
|
157
|
-
Host: Codex
|
|
158
|
-
Preferred effort: xhigh
|
|
159
|
-
Dispatch policy: uncapped
|
|
160
|
-
Resolved cap: none
|
|
161
|
-
Selected effort: xhigh
|
|
162
|
-
Policy source: project state
|
|
163
|
-
Provider default effort: medium
|
|
164
|
-
Selection mode: uncapped
|
|
165
|
-
Model axis: inherited
|
|
166
|
-
Effort axis: selected:xhigh
|
|
167
|
-
Dispatch target: oat-phase-implementer-xhigh
|
|
168
|
-
Rationale: high-risk phase; managed uncapped policy allows the preferred pinned variant.
|
|
169
|
-
|
|
170
|
-
OAT Dispatch: Phase p04 implementation
|
|
171
|
-
Host: Other
|
|
172
|
-
Model axis: host-auto
|
|
173
|
-
Effort axis: host-auto
|
|
174
|
-
Dispatch target: host default
|
|
175
|
-
Rationale: host does not expose readable or pinnable dispatch controls; rationale maps to standard effort.
|
|
176
|
-
|
|
177
|
-
OAT Dispatch: p02-t10 sidecar exploration
|
|
178
|
-
Host: Codex
|
|
179
|
-
Preferred effort: provider-default
|
|
180
|
-
Dispatch policy: high
|
|
181
|
-
Resolved cap: xhigh
|
|
182
|
-
Selected effort: provider-default
|
|
183
|
-
Policy source: project state
|
|
184
|
-
Provider default effort: xhigh
|
|
185
|
-
Model axis: inherited
|
|
186
|
-
Effort axis: provider-default
|
|
187
|
-
Dispatch target: explorer
|
|
188
|
-
Rationale: read-only sidecar exploration; generic explorer payload does not pin an OAT-managed effort variant.
|
|
116
|
+
Under a High maximum, configured Economy, Balanced, and High candidates remain
|
|
117
|
+
eligible. Different tasks in the same phase can therefore use different lower
|
|
118
|
+
candidates without changing project state.
|
|
119
|
+
|
|
120
|
+
## Phase Scope
|
|
121
|
+
|
|
122
|
+
The orchestrator sends one coordinator a Phase Scope:
|
|
123
|
+
|
|
124
|
+
```yaml
|
|
125
|
+
project: .oat/projects/shared/example
|
|
126
|
+
phase: p02
|
|
127
|
+
mode: implement
|
|
128
|
+
artifact_paths:
|
|
129
|
+
plan: .oat/projects/shared/example/plan.md
|
|
130
|
+
design: .oat/projects/shared/example/design.md
|
|
131
|
+
implementation: .oat/projects/shared/example/implementation.md
|
|
132
|
+
workflow_mode: quick
|
|
133
|
+
active_provider: codex
|
|
134
|
+
project_ceiling_tier: high
|
|
135
|
+
phase_ceiling_tier: balanced
|
|
136
|
+
task_ceiling_tier: balanced
|
|
137
|
+
task_ceiling_source: phase
|
|
138
|
+
commit_convention: 'feat({scope}): {description}'
|
|
139
|
+
coordinator_target: oat-phase-implementer-gpt-5-6-terra-high
|
|
189
140
|
```
|
|
190
141
|
|
|
191
|
-
|
|
142
|
+
The coordinator target starts the coordinator only. It is never inherited by a
|
|
143
|
+
task.
|
|
192
144
|
|
|
193
|
-
|
|
145
|
+
## Per-Task Selection
|
|
194
146
|
|
|
195
|
-
|
|
147
|
+
For every task in dependency order, the coordinator classifies only that
|
|
148
|
+
bounded task, chooses one exact candidate at or below the named maximum, and
|
|
149
|
+
calls the resolver with invocation-only `--ceiling-tier`.
|
|
196
150
|
|
|
197
|
-
|
|
151
|
+
```bash
|
|
152
|
+
# Codex
|
|
153
|
+
oat project dispatch-ceiling resolve \
|
|
154
|
+
--provider codex \
|
|
155
|
+
--role implementer \
|
|
156
|
+
--ceiling-tier balanced \
|
|
157
|
+
--candidate-model gpt-5.6-terra \
|
|
158
|
+
--candidate-effort medium \
|
|
159
|
+
--project-path .oat/projects/shared/example \
|
|
160
|
+
--json
|
|
161
|
+
|
|
162
|
+
# Claude
|
|
163
|
+
oat project dispatch-ceiling resolve \
|
|
164
|
+
--provider claude \
|
|
165
|
+
--role implementer \
|
|
166
|
+
--ceiling-tier balanced \
|
|
167
|
+
--candidate-model sonnet \
|
|
168
|
+
--json
|
|
169
|
+
|
|
170
|
+
# Cursor
|
|
171
|
+
oat project dispatch-ceiling resolve \
|
|
172
|
+
--provider cursor \
|
|
173
|
+
--role implementer \
|
|
174
|
+
--ceiling-tier balanced \
|
|
175
|
+
--candidate-model 'opaque:model/balanced [v2]' \
|
|
176
|
+
--json
|
|
177
|
+
```
|
|
198
178
|
|
|
199
|
-
|
|
179
|
+
The override accepts `economy`, `balanced`, `high`, or `frontier`. It applies
|
|
180
|
+
only to that resolver call and never writes config or project state. JSON
|
|
181
|
+
reports `source: invocation` while `providers.<provider>.cellSource` identifies
|
|
182
|
+
the config layer that owns the candidate.
|
|
200
183
|
|
|
201
|
-
|
|
184
|
+
The coordinator requires the requested candidate, `selection.candidateTier`,
|
|
185
|
+
`selection.ceilingTier`, exact target, and dispatch arguments to agree. A
|
|
186
|
+
candidate above the maximum or absent from the configured ladder blocks.
|
|
202
187
|
|
|
203
|
-
|
|
188
|
+
## Exact Provider Invocation
|
|
204
189
|
|
|
205
|
-
|
|
206
|
-
2. **Dispatch the selected implementer role** with a Phase Scope block (project path, phase id, artifact paths, commit convention, workflow mode, and dispatch context when known). In Codex, `effort_axis=selected:low|medium|high|xhigh` uses `oat-phase-implementer-low|medium|high|xhigh`. Base `oat-phase-implementer` means provider-default/unpinned fallback.
|
|
207
|
-
3. **Receive the summary:** `DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`.
|
|
208
|
-
- `BLOCKED` stops the run and surfaces the blocker to the user.
|
|
209
|
-
4. **Dispatch the selected reviewer role** with a Review Scope block (phase id, commit range, optional files-changed hint, and dispatch context). The commit range is authoritative; the file list is only orientation metadata. In Codex, pass this as a self-contained packet with `fork_context: false`; use an `oat-reviewer-<value>` variant only for capped managed policies, and use base `oat-reviewer` for managed `Uncapped` or inherit/default. In Claude Code, pass a review `model` only when the resolver returns one and always record `effort_axis=not-applicable`. If the reviewer does not conclude on the first wait, poll once more, then send a concise "return now with current findings" nudge before falling back inline for that phase.
|
|
210
|
-
5. **Parse the verdict:** zero Critical + zero Important findings → `pass`; otherwise `fail`.
|
|
211
|
-
6. **On fail, run the bounded fix loop** (see below).
|
|
212
|
-
7. **Update artifacts** (`implementation.md`, `plan.md` review row, `state.md`) and make the mandatory bookkeeping commit.
|
|
213
|
-
8. **Phase review gate** — when `oat_phase_review_gate` selects the phase, run the optional non-pausing external gate (`oat gate review`) after the step 7 bookkeeping commit and before the HiLL check. A passing gate continues automatically; a blocking gate is received and fixed, reusing the bounded fix loop's `oat_orchestration_retry_limit`. See [Reviews → Phase review gate](reviews.md#phase-review-gate).
|
|
214
|
-
9. **HiLL checkpoint** if the phase id is listed in `oat_plan_hill_phases`.
|
|
190
|
+
Build the complete host payload before writing dispatch logs:
|
|
215
191
|
|
|
216
|
-
|
|
192
|
+
- **Codex:** use `providers.codex.dispatchArgs.variant` as the actual
|
|
193
|
+
`agent_type`. If the registered role cannot be selected, launch a fresh Codex
|
|
194
|
+
child pinned to `selection.target.model` and `selection.target.effort` with
|
|
195
|
+
canonical `oat-phase-implementer` instructions and the Task Scope.
|
|
196
|
+
- **Claude:** pass `providers.claude.dispatchArgs.model` as the actual Task
|
|
197
|
+
`model`. Its separate effort axis is `not-applicable`.
|
|
198
|
+
- **Cursor:** pass `providers.cursor.dispatchArgs.model` byte-for-byte as the
|
|
199
|
+
actual invocation model. The string is opaque; do not normalize it or infer
|
|
200
|
+
family, effort, cost, or capability from its spelling. That opaque value is
|
|
201
|
+
the enforced model argument.
|
|
217
202
|
|
|
218
|
-
|
|
203
|
+
If exact controls cannot be applied, fail closed. A transient retry reuses the
|
|
204
|
+
same complete provider payload. Substantive escalation re-resolves another
|
|
205
|
+
configured candidate within the same named maximum and bounded retry budget.
|
|
219
206
|
|
|
220
|
-
|
|
221
|
-
- For each retry: re-dispatch the implementer in `fix` mode with the review artifact and findings, then re-dispatch the reviewer.
|
|
222
|
-
- On `pass` → exit the loop; the phase disposition becomes `merged` (sequential) or `merged` (parallel, after fan-in).
|
|
223
|
-
- On retries exhausted:
|
|
224
|
-
- **Sequential mode:** STOP the run with phase id, unresolved findings, and review artifact path.
|
|
225
|
-
- **Parallel group mode:** mark the phase `excluded`, do not merge its worktree, continue the remaining phases in the group, and report it in Outstanding Items.
|
|
207
|
+
## Task Scope and Commit Verification
|
|
226
208
|
|
|
227
|
-
|
|
209
|
+
Each worker receives only one task:
|
|
228
210
|
|
|
229
|
-
|
|
211
|
+
```yaml
|
|
212
|
+
mode: task-worker
|
|
213
|
+
task_id: p02-t03
|
|
214
|
+
task_name: Add correlation validation
|
|
215
|
+
task_plan: |
|
|
216
|
+
Implement only p02-t03 using its RED/GREEN steps.
|
|
217
|
+
file_boundary:
|
|
218
|
+
- packages/cli/src/commands/gate/index.ts
|
|
219
|
+
- packages/cli/src/commands/gate/index.test.ts
|
|
220
|
+
verification:
|
|
221
|
+
- pnpm --filter @open-agent-toolkit/cli exec vitest run src/commands/gate/index.test.ts
|
|
222
|
+
commit_convention: 'feat(gate): validate correlation'
|
|
223
|
+
ceiling_tier: balanced
|
|
224
|
+
ceiling_source: phase
|
|
225
|
+
dispatch_target: oat-phase-implementer-gpt-5-6-terra-medium
|
|
226
|
+
dispatch_args:
|
|
227
|
+
agent_type: oat-phase-implementer-gpt-5-6-terra-medium
|
|
228
|
+
```
|
|
230
229
|
|
|
231
|
-
|
|
230
|
+
The Task Scope never contains the whole phase task list. Before dispatch, the
|
|
231
|
+
coordinator records `PRE_TASK_HEAD`. After the worker returns, it verifies:
|
|
232
232
|
|
|
233
|
-
-
|
|
234
|
-
-
|
|
233
|
+
- returned task ID and terminal result
|
|
234
|
+
- verification status
|
|
235
|
+
- reported commit equals current `HEAD`
|
|
236
|
+
- exactly one new commit follows `PRE_TASK_HEAD`
|
|
237
|
+
- changed paths stay inside `file_boundary`
|
|
238
|
+
- the worktree is clean
|
|
235
239
|
|
|
236
|
-
|
|
240
|
+
Only then does it select the next candidate. Workers run one at a time,
|
|
241
|
+
serially in the same worktree.
|
|
237
242
|
|
|
238
|
-
##
|
|
243
|
+
## Phase Integration and Review
|
|
239
244
|
|
|
240
|
-
|
|
245
|
+
After all task commits are verified, the coordinator runs phase-wide
|
|
246
|
+
verification and integration self-review without editing ordinary task files.
|
|
247
|
+
Its summary records each task's exact target, result, commit, and verification.
|
|
241
248
|
|
|
242
|
-
|
|
243
|
-
oat_plan_parallel_groups: [['p02', 'p03'], ['p04', 'p05']]
|
|
244
|
-
```
|
|
249
|
+
The root orchestrator then dispatches the phase reviewer:
|
|
245
250
|
|
|
246
|
-
-
|
|
247
|
-
|
|
248
|
-
-
|
|
249
|
-
-
|
|
251
|
+
- A capped managed reviewer uses the final candidate at its configured review
|
|
252
|
+
ceiling.
|
|
253
|
+
- Codex uses the exact materialized reviewer role or a fresh pinned child.
|
|
254
|
+
- Claude and Cursor bind the exact resolver-returned model argument.
|
|
255
|
+
- Managed `Uncapped` and explicit inherit/default retain their documented base
|
|
256
|
+
reviewer behavior.
|
|
257
|
+
- Timeout retries preserve the exact role or complete model payload.
|
|
250
258
|
|
|
251
|
-
|
|
259
|
+
Inline review is allowed only with verified equivalent current-host model and
|
|
260
|
+
effort controls. That exception is limited to explicit inherit or
|
|
261
|
+
managed-uncapped base-role behavior; capped managed review never downgrades
|
|
262
|
+
inline. If a review timeout occurs, retry once with the same exact role or
|
|
263
|
+
pinned model payload. If exact dispatch still cannot conclude, fail closed and
|
|
264
|
+
block.
|
|
252
265
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
- If that sync leaves `.oat/sync/manifest.json` or provider directories dirty, bootstrap commits only existing or tracked sync-managed paths (`.oat/sync/manifest.json`, `.claude`, `.cursor`, `.codex`) as `chore: run sync` and reports `sync_commit: pass | fail | skip`.
|
|
256
|
-
- If any bootstrap fails, cancel successful worktrees and **degrade the entire group** to sequential inline execution.
|
|
257
|
-
2. **Concurrent dispatch** of `oat-phase-implementer` into each worktree (Tier 1 only — Tier 2 cannot run concurrently and also degrades to sequential).
|
|
258
|
-
3. **Wait for terminal verdicts** (`pass` or `failed`) across every phase in the group.
|
|
259
|
-
4. **Fan-in reconciliation in plan order:** for each passing phase, `git merge --no-ff {project-name}/{pNN}`. Integration verification (`pnpm test && pnpm lint && pnpm type-check`) runs after each merge.
|
|
260
|
-
5. **Failed phases are excluded** — their worktrees are preserved and logged in `implementation.md` Outstanding Items. Passing phases still merge (partial merge-back, not atomic).
|
|
261
|
-
6. **Worktree cleanup** runs for merged phases; preserved for excluded phases.
|
|
262
|
-
7. **Bookkeeping commit** + HiLL checkpoint check after the group finishes.
|
|
266
|
+
The review commit range is authoritative. Zero Critical and zero Important
|
|
267
|
+
findings pass; otherwise the bounded fix loop begins.
|
|
263
268
|
|
|
264
|
-
|
|
269
|
+
## Bounded Fix Loop
|
|
265
270
|
|
|
266
|
-
|
|
271
|
+
`oat_orchestration_retry_limit` defaults to `2` and accepts `0` through `5`.
|
|
272
|
+
For each retry:
|
|
267
273
|
|
|
268
|
-
1.
|
|
269
|
-
2.
|
|
270
|
-
3.
|
|
271
|
-
4.
|
|
272
|
-
|
|
273
|
-
- `UNRESOLVABLE` or `VERIFICATION_FAILED` → STOP the run with phase id, conflicting files, worktree path, and the subagent's reasoning summary.
|
|
274
|
+
1. Group findings into bounded one-task fix scopes.
|
|
275
|
+
2. Reuse the phase coordinator in fix mode.
|
|
276
|
+
3. Resolve one exact candidate per fix under the same named maximum.
|
|
277
|
+
4. Dispatch and verify one fix worker at a time.
|
|
278
|
+
5. Re-dispatch the reviewer over the updated range.
|
|
274
279
|
|
|
275
|
-
The
|
|
280
|
+
The coordinator does not apply fixes itself. Retry exhaustion stops sequential
|
|
281
|
+
execution; in a parallel phase group, the failed phase is excluded and its
|
|
282
|
+
worktree is preserved for diagnosis.
|
|
276
283
|
|
|
277
|
-
##
|
|
284
|
+
## Plan-Declared Parallelism
|
|
278
285
|
|
|
279
|
-
|
|
286
|
+
Parallelism applies across independent phases, not tasks in one worktree:
|
|
280
287
|
|
|
281
|
-
```
|
|
282
|
-
|
|
288
|
+
```yaml
|
|
289
|
+
oat_plan_parallel_groups: [['p02', 'p03'], ['p04', 'p05']]
|
|
283
290
|
```
|
|
284
291
|
|
|
285
|
-
|
|
292
|
+
- One worktree and one coordinator are created per phase.
|
|
293
|
+
- Coordinators in separate declared worktrees may run concurrently.
|
|
294
|
+
- Every coordinator still dispatches its task workers serially.
|
|
295
|
+
- Phases outside groups run sequentially in plan order.
|
|
296
|
+
- Groups themselves fan in before the next group starts.
|
|
297
|
+
|
|
298
|
+
### Parallel group flow
|
|
299
|
+
|
|
300
|
+
1. Bootstrap each worktree with `oat-worktree-bootstrap-auto` from the current
|
|
301
|
+
orchestration HEAD.
|
|
302
|
+
2. Verify every worktree HEAD before dispatch. Any bootstrap/base mismatch
|
|
303
|
+
degrades the whole group to sequential target-preserving execution.
|
|
304
|
+
3. Dispatch one phase coordinator per worktree.
|
|
305
|
+
4. Wait for terminal phase results.
|
|
306
|
+
5. Merge passing phases back in plan order with integration verification after
|
|
307
|
+
each merge.
|
|
308
|
+
6. Preserve excluded worktrees and record them in Outstanding Items.
|
|
309
|
+
7. Clean merged worktrees, commit bookkeeping, then evaluate HiLL checkpoints.
|
|
286
310
|
|
|
287
|
-
|
|
288
|
-
-
|
|
289
|
-
|
|
290
|
-
- No singleton groups (each group must contain at least 2 phases).
|
|
291
|
-
- Frontmatter YAML parses cleanly — malformed frontmatter fails with exit 1.
|
|
311
|
+
If merge and cherry-pick both conflict, the orchestrator dispatches a bounded
|
|
312
|
+
conflict-resolution subagent. It does not resolve the conflict in the root
|
|
313
|
+
context. An unresolved or verification-failing conflict stops fan-in.
|
|
292
314
|
|
|
293
|
-
|
|
315
|
+
## Phase Review Gate and HiLL
|
|
294
316
|
|
|
295
|
-
|
|
317
|
+
After standard review passes and bookkeeping is committed, an enabled
|
|
318
|
+
`oat_phase_review_gate` may run a target-neutral external review for the phase.
|
|
319
|
+
Passing artifacts are still received for durable disposition; blocking
|
|
320
|
+
findings return through the bounded fix loop. Reusable lifecycle gate commands
|
|
321
|
+
declare the project but do not pin a provider target.
|
|
296
322
|
|
|
297
|
-
|
|
323
|
+
HiLL pauses remain phase boundaries. They run only after the phase or parallel
|
|
324
|
+
group is integrated, reviewed, and tracked.
|
|
325
|
+
|
|
326
|
+
## Dry Run
|
|
298
327
|
|
|
299
328
|
```bash
|
|
300
329
|
oat-project-implement --dry-run
|
|
301
330
|
```
|
|
302
331
|
|
|
303
|
-
Dry-run
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
- Builds the execution schedule (singleton phases + parallel groups in plan order).
|
|
307
|
-
- Prints the planned dispatches and worktree layout.
|
|
308
|
-
- Exits 0 without dispatching subagents, creating worktrees, or modifying files.
|
|
309
|
-
|
|
310
|
-
Use dry-run as a sanity check after editing `oat_plan_parallel_groups` to confirm the schedule matches your intent.
|
|
332
|
+
Dry-run performs preflight and plan validation, resolves the phase schedule and
|
|
333
|
+
named maxima, and prints planned coordinator/worktree routing. It does not
|
|
334
|
+
dispatch coordinators or workers, create worktrees, or modify files.
|
|
311
335
|
|
|
312
336
|
## Resumption
|
|
313
337
|
|
|
314
|
-
On re-invocation
|
|
338
|
+
On re-invocation:
|
|
315
339
|
|
|
316
|
-
1. Read `implementation.md`
|
|
317
|
-
2.
|
|
318
|
-
3.
|
|
319
|
-
4.
|
|
320
|
-
5.
|
|
340
|
+
1. Read `implementation.md`, `plan.md`, and `state.md`.
|
|
341
|
+
2. Advance a stale pointer to the first incomplete task.
|
|
342
|
+
3. Cross-check the latest bookkeeping commit with Git.
|
|
343
|
+
4. Resume an incomplete coordinator at the next unverified task commit.
|
|
344
|
+
5. Re-dispatch a missing phase reviewer for the current committed phase range.
|
|
345
|
+
6. Report leftover parallel worktrees before resuming or cleaning them.
|
|
321
346
|
|
|
322
|
-
|
|
347
|
+
The one-task commit boundary lets resumption distinguish completed work from an
|
|
348
|
+
unverified worker return without rerunning the whole phase.
|
|
323
349
|
|
|
324
|
-
## State and
|
|
350
|
+
## State and Artifact Updates
|
|
325
351
|
|
|
326
|
-
After
|
|
352
|
+
After a phase or parallel group completes, `oat-project-implement` updates:
|
|
327
353
|
|
|
328
|
-
- `implementation.md
|
|
329
|
-
|
|
330
|
-
- `
|
|
354
|
+
- `implementation.md`: task outcomes, exact targets, commits, verification,
|
|
355
|
+
phase summary, review results, and deviations
|
|
356
|
+
- `plan.md`: task status and review lifecycle
|
|
357
|
+
- `state.md`: current task, last commit, phase status, and timestamp
|
|
331
358
|
|
|
332
|
-
|
|
359
|
+
It creates a separate bookkeeping commit after implementation commits. Legacy
|
|
360
|
+
`oat_execution_mode: subagent-driven` is ignored and removed on the next write.
|
|
333
361
|
|
|
334
362
|
## Related
|
|
335
363
|
|
|
336
|
-
- [
|
|
337
|
-
|
|
338
|
-
- [
|
|
339
|
-
- [
|
|
364
|
+
- [Dispatch Policy](dispatch-ceiling.md) - candidate ladders, named maxima, and
|
|
365
|
+
exact provider resolution.
|
|
366
|
+
- [Lifecycle](lifecycle.md) - implementation in the full project flow.
|
|
367
|
+
- [Artifacts](artifacts.md) - plan/state shapes and parallel groups.
|
|
368
|
+
- [Reviews](reviews.md) - standard and external phase reviews.
|
|
369
|
+
- [HiLL Checkpoints](hill-checkpoints.md) - phase pause semantics.
|