@open-agent-toolkit/cli 0.1.46 → 0.1.50
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 +11 -1
- package/assets/config/dispatch-matrix-recommendation.json +120 -13
- package/assets/docs/cli-utilities/configuration.md +213 -113
- package/assets/docs/cli-utilities/workflow-gates.md +178 -27
- package/assets/docs/contributing/skills.md +14 -8
- package/assets/docs/provider-sync/providers.md +46 -8
- package/assets/docs/provider-sync/scope-and-surface.md +2 -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 +297 -197
- package/assets/docs/workflows/projects/implementation-execution.md +306 -249
- 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 +290 -149
- 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 +157 -107
- package/assets/skills/oat-project-review-provide/SKILL.md +110 -22
- package/assets/skills/oat-project-review-provide-remote/SKILL.md +28 -1
- package/dist/commands/config/index.d.ts +3 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +92 -125
- package/dist/commands/doctor/index.d.ts +3 -0
- package/dist/commands/doctor/index.d.ts.map +1 -1
- package/dist/commands/doctor/index.js +57 -95
- 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 +615 -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 +567 -99
- package/dist/commands/providers/codex/materialize.d.ts.map +1 -1
- package/dist/commands/providers/codex/materialize.js +6 -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 +1 -0
- 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 +1 -0
- package/dist/commands/sync/sync.types.d.ts.map +1 -1
- package/dist/config/dispatch-matrix.d.ts +59 -0
- package/dist/config/dispatch-matrix.d.ts.map +1 -0
- package/dist/config/dispatch-matrix.js +264 -0
- package/dist/config/oat-config.d.ts +9 -18
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +99 -120
- package/dist/config/resolve.d.ts +8 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +66 -1
- 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 +1 -0
- package/dist/providers/ceiling/registry.d.ts.map +1 -1
- package/dist/providers/ceiling/registry.js +12 -5
- 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/materialize.d.ts.map +1 -1
- package/dist/providers/codex/codec/materialize.js +6 -5
- package/dist/providers/codex/codec/shared.d.ts +19 -0
- package/dist/providers/codex/codec/shared.d.ts.map +1 -1
- package/dist/providers/codex/codec/shared.js +98 -5
- package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
- package/dist/providers/codex/codec/sync-extension.js +142 -32
- package/dist/providers/identity/availability.d.ts +12 -0
- package/dist/providers/identity/availability.d.ts.map +1 -1
- package/dist/providers/identity/availability.js +72 -29
- package/dist/providers/identity/dispatch-report.d.ts +124 -0
- package/dist/providers/identity/dispatch-report.d.ts.map +1 -0
- package/dist/providers/identity/dispatch-report.js +285 -0
- package/dist/providers/identity/dispatch-validation.d.ts +28 -0
- package/dist/providers/identity/dispatch-validation.d.ts.map +1 -0
- package/dist/providers/identity/dispatch-validation.js +149 -0
- package/dist/providers/identity/stamp.d.ts +2 -0
- package/dist/providers/identity/stamp.d.ts.map +1 -1
- package/dist/providers/identity/stamp.js +7 -1
- 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,346 +1,403 @@
|
|
|
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:
|
|
47
61
|
|
|
48
|
-
|
|
62
|
+
- **Tier 1:** native provider subagent dispatch.
|
|
63
|
+
- **Tier 2:** guarded sequential coordinator mechanics when native role
|
|
64
|
+
selection is unavailable.
|
|
49
65
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
6. Non-interactive unresolved state blocks before work starts
|
|
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.
|
|
56
71
|
|
|
57
|
-
|
|
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.
|
|
58
75
|
|
|
59
|
-
|
|
76
|
+
## Dispatch Readiness
|
|
60
77
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
| Economy | managed | `medium` | `sonnet` |
|
|
64
|
-
| Balanced | managed | `high` | `sonnet` |
|
|
65
|
-
| High | managed | `xhigh` | `opus` |
|
|
66
|
-
| Frontier | managed | `xhigh` | `fable` |
|
|
67
|
-
| Uncapped | managed | none | none |
|
|
68
|
-
| Inherit Host Defaults | inherit | none | none |
|
|
78
|
+
Planning through spec-driven, quick-start, import-plan, or provider-plan-via-
|
|
79
|
+
import performs the same readiness setup:
|
|
69
80
|
|
|
70
|
-
|
|
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.
|
|
71
88
|
|
|
72
|
-
|
|
73
|
-
Dispatch policy: balanced (codex, managed capped — materialized-role)
|
|
74
|
-
Resolved cap: high
|
|
75
|
-
Source: project state
|
|
76
|
-
Provider default effort: medium
|
|
77
|
-
Note: OAT will use resolver-returned materialized Codex role names up to high. Base/unpinned roles resolve through the provider default only on fallback paths.
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
**Enforcement modes** (from resolver):
|
|
89
|
+
See [Dispatch Policy](dispatch-ceiling.md) for ladder shapes and ownership.
|
|
81
90
|
|
|
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.
|
|
91
|
+
### Validating plan metadata
|
|
85
92
|
|
|
86
|
-
|
|
93
|
+
Before building the phase schedule, implementation validates plan parallelism:
|
|
87
94
|
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Set workflow.dispatchPolicy.mode/workflow.dispatchPolicy.policy, workflow.dispatchCeiling.providers.codex, oat_dispatch_policy, or legacy oat_dispatch_ceiling.
|
|
95
|
+
```bash
|
|
96
|
+
oat project validate-plan --project-path .oat/projects/shared/example
|
|
91
97
|
```
|
|
92
98
|
|
|
93
|
-
|
|
99
|
+
The command rejects malformed groups, unknown phase IDs, duplicate membership,
|
|
100
|
+
and singleton groups. Invalid metadata blocks execution rather than silently
|
|
101
|
+
falling back to a different schedule.
|
|
94
102
|
|
|
95
|
-
|
|
103
|
+
Before phase work, implementation runs provider preflight:
|
|
96
104
|
|
|
97
|
-
|
|
105
|
+
```bash
|
|
106
|
+
oat project dispatch-ceiling resolve \
|
|
107
|
+
--provider <active-provider> \
|
|
108
|
+
--preflight \
|
|
109
|
+
--json
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
An unresolved non-interactive preflight blocks. Managed `Uncapped` and
|
|
113
|
+
`Inherit Host Defaults` are explicit modes; omitted policy state is not an
|
|
114
|
+
implicit fallback.
|
|
115
|
+
|
|
116
|
+
## Resolve the Effective Named Maximum
|
|
98
117
|
|
|
99
|
-
|
|
118
|
+
For each phase, the orchestrator determines the task maximum:
|
|
100
119
|
|
|
101
|
-
|
|
120
|
+
1. Read project `state.md:oat_dispatch_policy.policy`.
|
|
121
|
+
2. Read the phase's optional Dispatch Profile row.
|
|
122
|
+
3. An explicit `economy`, `balanced`, `high`, or `frontier` phase value narrows
|
|
123
|
+
the project maximum and records `task_ceiling_source: phase`.
|
|
124
|
+
4. Blank, absent, or `auto` uses the project maximum and records
|
|
125
|
+
`task_ceiling_source: project`.
|
|
126
|
+
5. Reject an unknown phase tier or one above the project maximum.
|
|
102
127
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
128
|
+
Under a High maximum, configured Economy, Balanced, and High candidates remain
|
|
129
|
+
eligible. Different tasks in the same phase can therefore use different lower
|
|
130
|
+
candidates without changing project state.
|
|
106
131
|
|
|
107
|
-
|
|
132
|
+
## Phase Scope
|
|
108
133
|
|
|
109
|
-
|
|
110
|
-
- `provider-default` — Codex base/unpinned role follows configured/provider default effort for explicit inherit/default behavior or fallback paths.
|
|
111
|
-
- `inherited` — the host exposes the axis and the orchestrator deliberately defers to the parent session.
|
|
112
|
-
- `not-applicable` — this host/API has no meaningful per-dispatch concept for that axis.
|
|
113
|
-
- `host-auto` — exceptional; the host uses that axis internally but the orchestrator cannot read or pin it.
|
|
134
|
+
The orchestrator sends one coordinator a Phase Scope:
|
|
114
135
|
|
|
115
|
-
|
|
136
|
+
```yaml
|
|
137
|
+
project: .oat/projects/shared/example
|
|
138
|
+
phase: p02
|
|
139
|
+
mode: implement
|
|
140
|
+
artifact_paths:
|
|
141
|
+
plan: .oat/projects/shared/example/plan.md
|
|
142
|
+
design: .oat/projects/shared/example/design.md
|
|
143
|
+
implementation: .oat/projects/shared/example/implementation.md
|
|
144
|
+
workflow_mode: quick
|
|
145
|
+
active_provider: codex
|
|
146
|
+
project_ceiling_tier: high
|
|
147
|
+
phase_ceiling_tier: balanced
|
|
148
|
+
task_ceiling_tier: balanced
|
|
149
|
+
task_ceiling_source: phase
|
|
150
|
+
commit_convention: 'feat({scope}): {description}'
|
|
151
|
+
coordinator_target: oat-phase-implementer-gpt-5-6-terra-high
|
|
152
|
+
```
|
|
116
153
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
managed tier table before resolving matrix targets. For example, `xhigh` maps to
|
|
120
|
-
the highest matching tier, `frontier`, so `--preferred xhigh` can resolve a
|
|
121
|
-
`frontier` Codex matrix target such as
|
|
122
|
-
`oat-phase-implementer-gpt-5-6-sol-xhigh`.
|
|
154
|
+
The coordinator target starts the coordinator only. It is never inherited by a
|
|
155
|
+
task.
|
|
123
156
|
|
|
124
|
-
|
|
157
|
+
## Per-Task Selection
|
|
125
158
|
|
|
126
|
-
|
|
159
|
+
For every task in dependency order, the coordinator classifies only that
|
|
160
|
+
bounded task, chooses one exact candidate at or below the named maximum, and
|
|
161
|
+
calls the resolver with invocation-only `--ceiling-tier`.
|
|
127
162
|
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
Selected effort: xhigh
|
|
155
|
-
Policy source: project state
|
|
156
|
-
Provider default effort: medium
|
|
157
|
-
Selection mode: review-target
|
|
158
|
-
Model axis: selected:gpt-5.6-terra
|
|
159
|
-
Effort axis: selected:xhigh
|
|
160
|
-
Dispatch target: oat-reviewer-gpt-5-6-terra-xhigh
|
|
161
|
-
Rationale: reviewer runs at the configured policy cap for deterministic quality gate behavior.
|
|
162
|
-
|
|
163
|
-
OAT Dispatch: Phase p03 implementation
|
|
164
|
-
Host: Codex
|
|
165
|
-
Preferred effort: xhigh
|
|
166
|
-
Dispatch policy: uncapped
|
|
167
|
-
Resolved cap: none
|
|
168
|
-
Selected effort: xhigh
|
|
169
|
-
Policy source: project state
|
|
170
|
-
Provider default effort: medium
|
|
171
|
-
Selection mode: uncapped
|
|
172
|
-
Model axis: selected:gpt-5.6-sol
|
|
173
|
-
Effort axis: selected:xhigh
|
|
174
|
-
Dispatch target: oat-phase-implementer-gpt-5-6-sol-xhigh
|
|
175
|
-
Rationale: high-risk phase; managed uncapped policy allows the preferred materialized target.
|
|
176
|
-
|
|
177
|
-
OAT Dispatch: Phase p04 implementation
|
|
178
|
-
Host: Other
|
|
179
|
-
Model axis: host-auto
|
|
180
|
-
Effort axis: host-auto
|
|
181
|
-
Dispatch target: host default
|
|
182
|
-
Rationale: host does not expose readable or pinnable dispatch controls; rationale maps to standard effort.
|
|
183
|
-
|
|
184
|
-
OAT Dispatch: p02-t10 sidecar exploration
|
|
185
|
-
Host: Codex
|
|
186
|
-
Preferred effort: provider-default
|
|
187
|
-
Dispatch policy: high
|
|
188
|
-
Resolved cap: xhigh
|
|
189
|
-
Selected effort: provider-default
|
|
190
|
-
Policy source: project state
|
|
191
|
-
Provider default effort: xhigh
|
|
192
|
-
Model axis: inherited
|
|
193
|
-
Effort axis: provider-default
|
|
194
|
-
Dispatch target: explorer
|
|
195
|
-
Rationale: read-only sidecar exploration; generic explorer payload does not pin an OAT-managed effort variant.
|
|
163
|
+
```bash
|
|
164
|
+
# Codex
|
|
165
|
+
oat project dispatch-ceiling resolve \
|
|
166
|
+
--provider codex \
|
|
167
|
+
--role implementer \
|
|
168
|
+
--ceiling-tier balanced \
|
|
169
|
+
--candidate-model gpt-5.6-terra \
|
|
170
|
+
--candidate-effort medium \
|
|
171
|
+
--project-path .oat/projects/shared/example \
|
|
172
|
+
--json
|
|
173
|
+
|
|
174
|
+
# Claude
|
|
175
|
+
oat project dispatch-ceiling resolve \
|
|
176
|
+
--provider claude \
|
|
177
|
+
--role implementer \
|
|
178
|
+
--ceiling-tier balanced \
|
|
179
|
+
--candidate-model sonnet \
|
|
180
|
+
--json
|
|
181
|
+
|
|
182
|
+
# Cursor
|
|
183
|
+
oat project dispatch-ceiling resolve \
|
|
184
|
+
--provider cursor \
|
|
185
|
+
--role implementer \
|
|
186
|
+
--ceiling-tier balanced \
|
|
187
|
+
--candidate-model 'opaque:model/balanced [v2]' \
|
|
188
|
+
--json
|
|
196
189
|
```
|
|
197
190
|
|
|
198
|
-
|
|
191
|
+
The override accepts `economy`, `balanced`, `high`, or `frontier`. It applies
|
|
192
|
+
only to that resolver call and never writes config or project state. JSON
|
|
193
|
+
reports `source: invocation` while `providers.<provider>.cellSource` identifies
|
|
194
|
+
the config layer that owns the candidate.
|
|
199
195
|
|
|
200
|
-
|
|
196
|
+
The coordinator requires the requested candidate, `selection.candidateTier`,
|
|
197
|
+
`selection.ceilingTier`, exact target, and dispatch arguments to agree. A
|
|
198
|
+
candidate above the maximum or absent from the configured ladder blocks.
|
|
201
199
|
|
|
202
|
-
|
|
200
|
+
## Exact Provider Invocation
|
|
203
201
|
|
|
204
|
-
|
|
202
|
+
Build the complete host payload before writing dispatch logs:
|
|
205
203
|
|
|
206
|
-
|
|
204
|
+
- **Codex:** use `providers.codex.dispatchArgs.variant` as the actual
|
|
205
|
+
`agent_type`. If the registered role cannot be selected, launch a fresh Codex
|
|
206
|
+
child pinned to `selection.target.model` and `selection.target.effort` with
|
|
207
|
+
canonical `oat-phase-implementer` instructions and the Task Scope.
|
|
208
|
+
- **Claude:** pass `providers.claude.dispatchArgs.model` as the actual Task
|
|
209
|
+
`model`. Its separate effort axis is `not-applicable`.
|
|
210
|
+
- **Cursor:** pass `providers.cursor.dispatchArgs.model` byte-for-byte as the
|
|
211
|
+
actual invocation model. The string is opaque; do not normalize it or infer
|
|
212
|
+
family, effort, cost, or capability from its spelling. That opaque value is
|
|
213
|
+
the enforced model argument.
|
|
207
214
|
|
|
208
|
-
|
|
215
|
+
If exact controls cannot be applied, fail closed. A transient retry reuses the
|
|
216
|
+
same complete provider payload. Substantive escalation re-resolves another
|
|
217
|
+
configured candidate within the same named maximum and bounded retry budget.
|
|
209
218
|
|
|
210
|
-
|
|
219
|
+
## Dispatch Reports During Execution
|
|
211
220
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
3. **Receive the summary:** `DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED`.
|
|
215
|
-
- `BLOCKED` stops the run and surfaces the blocker to the user.
|
|
216
|
-
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 the resolver-returned materialized reviewer role 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.
|
|
217
|
-
5. **Parse the verdict:** zero Critical + zero Important findings → `pass`; otherwise `fail`.
|
|
218
|
-
6. **On fail, run the bounded fix loop** (see below).
|
|
219
|
-
7. **Update artifacts** (`implementation.md`, `plan.md` review row, `state.md`) and make the mandatory bookkeeping commit.
|
|
220
|
-
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).
|
|
221
|
-
9. **HiLL checkpoint** if the phase id is listed in `oat_plan_hill_phases`.
|
|
221
|
+
Every implementation, fix, and review resolver call supplies explicit report
|
|
222
|
+
context:
|
|
222
223
|
|
|
223
|
-
|
|
224
|
+
```text
|
|
225
|
+
--report-scope <phase-or-task> --report-action <implementation|fix|review>
|
|
226
|
+
```
|
|
224
227
|
|
|
225
|
-
|
|
228
|
+
The completed JSON must contain `dispatchReport.schemaVersion: 1` before the
|
|
229
|
+
provider invocation begins. The coordinator reads the requested candidate,
|
|
230
|
+
candidate tier, ceiling, exact selected target, requested controls, configured
|
|
231
|
+
defaults, and runtime identity from that report as distinct fields. It does not
|
|
232
|
+
infer any of them from a materialized role name or opaque Cursor string.
|
|
226
233
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
234
|
+
The human dispatch block is rendered from the report. The formal `Dispatch:`
|
|
235
|
+
line is a compatibility view derived from the same report through the dispatch
|
|
236
|
+
stamp adapter. It is not a second schema and must not be assembled by hand.
|
|
237
|
+
Configured defaults and configured gate invocation remain distinct from runtime
|
|
238
|
+
identity; when runtime identity is not observed, the report says so without
|
|
239
|
+
weakening exact requested model or effort controls.
|
|
233
240
|
|
|
234
|
-
|
|
241
|
+
## Task Scope and Commit Verification
|
|
235
242
|
|
|
236
|
-
|
|
243
|
+
Each worker receives only one task:
|
|
237
244
|
|
|
238
|
-
|
|
245
|
+
```yaml
|
|
246
|
+
mode: task-worker
|
|
247
|
+
task_id: p02-t03
|
|
248
|
+
task_name: Add correlation validation
|
|
249
|
+
task_plan: |
|
|
250
|
+
Implement only p02-t03 using its RED/GREEN steps.
|
|
251
|
+
file_boundary:
|
|
252
|
+
- packages/cli/src/commands/gate/index.ts
|
|
253
|
+
- packages/cli/src/commands/gate/index.test.ts
|
|
254
|
+
verification:
|
|
255
|
+
- pnpm --filter @open-agent-toolkit/cli exec vitest run src/commands/gate/index.test.ts
|
|
256
|
+
commit_convention: 'feat(gate): validate correlation'
|
|
257
|
+
ceiling_tier: balanced
|
|
258
|
+
ceiling_source: phase
|
|
259
|
+
dispatch_target: oat-phase-implementer-gpt-5-6-terra-medium
|
|
260
|
+
dispatch_args:
|
|
261
|
+
agent_type: oat-phase-implementer-gpt-5-6-terra-medium
|
|
262
|
+
```
|
|
239
263
|
|
|
240
|
-
|
|
241
|
-
|
|
264
|
+
The Task Scope never contains the whole phase task list. Before dispatch, the
|
|
265
|
+
coordinator records `PRE_TASK_HEAD`. After the worker returns, it verifies:
|
|
242
266
|
|
|
243
|
-
|
|
267
|
+
- returned task ID and terminal result
|
|
268
|
+
- verification status
|
|
269
|
+
- reported commit equals current `HEAD`
|
|
270
|
+
- exactly one new commit follows `PRE_TASK_HEAD`
|
|
271
|
+
- changed paths stay inside `file_boundary`
|
|
272
|
+
- the worktree is clean
|
|
244
273
|
|
|
245
|
-
|
|
274
|
+
Only then does it select the next candidate. Workers run one at a time,
|
|
275
|
+
serially in the same worktree.
|
|
246
276
|
|
|
247
|
-
|
|
277
|
+
## Phase Integration and Review
|
|
248
278
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
279
|
+
After all task commits are verified, the coordinator runs phase-wide
|
|
280
|
+
verification and integration self-review without editing ordinary task files.
|
|
281
|
+
Its summary records each task's exact target, result, commit, and verification.
|
|
252
282
|
|
|
253
|
-
|
|
254
|
-
- Phases not listed in any group run sequentially in plan order.
|
|
255
|
-
- Groups themselves run sequentially — group `[p02, p03]` merges before group `[p04, p05]` starts.
|
|
256
|
-
- Empty or missing field → fully sequential, no worktrees created, behavior identical to today's `oat-project-implement`.
|
|
283
|
+
The root orchestrator then dispatches the phase reviewer:
|
|
257
284
|
|
|
258
|
-
|
|
285
|
+
- A capped managed reviewer uses the final candidate at its configured review
|
|
286
|
+
ceiling.
|
|
287
|
+
- Codex uses the exact materialized reviewer role or a fresh pinned child.
|
|
288
|
+
- Claude and Cursor bind the exact resolver-returned model argument.
|
|
289
|
+
- Managed `Uncapped` and explicit inherit/default retain their documented base
|
|
290
|
+
reviewer behavior.
|
|
291
|
+
- Timeout retries preserve the exact role or complete model payload.
|
|
259
292
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
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.
|
|
267
|
-
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).
|
|
268
|
-
6. **Worktree cleanup** runs for merged phases; preserved for excluded phases.
|
|
269
|
-
7. **Bookkeeping commit** + HiLL checkpoint check after the group finishes.
|
|
293
|
+
Inline review is allowed only with verified equivalent current-host model and
|
|
294
|
+
effort controls. That exception is limited to explicit inherit or
|
|
295
|
+
managed-uncapped base-role behavior; capped managed review never downgrades
|
|
296
|
+
inline. If a review timeout occurs, retry once with the same exact role or
|
|
297
|
+
pinned model payload. If exact dispatch still cannot conclude, fail closed and
|
|
298
|
+
block.
|
|
270
299
|
|
|
271
|
-
|
|
300
|
+
The review commit range is authoritative. Zero Critical and zero Important
|
|
301
|
+
findings pass; otherwise the bounded fix loop begins.
|
|
272
302
|
|
|
273
|
-
|
|
303
|
+
## Bounded Fix Loop
|
|
274
304
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
3. If cherry-pick also conflicts, an **inline conflict-resolution subagent** is dispatched via the Task tool. The orchestrator **never reads conflicted files itself** — that context belongs in a fresh subagent.
|
|
278
|
-
4. The subagent reads conflicted files and project artifacts (`plan.md`, `design.md`, `spec.md`), applies a resolution, runs integration verification, and returns:
|
|
279
|
-
- `RESOLVED` → merge is committed; orchestrator proceeds.
|
|
280
|
-
- `UNRESOLVABLE` or `VERIFICATION_FAILED` → STOP the run with phase id, conflicting files, worktree path, and the subagent's reasoning summary.
|
|
305
|
+
`oat_orchestration_retry_limit` defaults to `2` and accepts `0` through `5`.
|
|
306
|
+
For each retry:
|
|
281
307
|
|
|
282
|
-
|
|
308
|
+
1. Group findings into bounded one-task fix scopes.
|
|
309
|
+
2. Reuse the phase coordinator in fix mode.
|
|
310
|
+
3. Resolve one exact candidate per fix under the same named maximum.
|
|
311
|
+
4. Dispatch and verify one fix worker at a time.
|
|
312
|
+
5. Re-dispatch the reviewer over the updated range.
|
|
283
313
|
|
|
284
|
-
|
|
314
|
+
The coordinator does not apply fixes itself. Retry exhaustion stops sequential
|
|
315
|
+
execution; in a parallel phase group, the failed phase is excluded and its
|
|
316
|
+
worktree is preserved for diagnosis.
|
|
285
317
|
|
|
286
|
-
|
|
318
|
+
## Plan-Declared Parallelism
|
|
287
319
|
|
|
288
|
-
|
|
289
|
-
|
|
320
|
+
Parallelism applies across independent phases, not tasks in one worktree:
|
|
321
|
+
|
|
322
|
+
```yaml
|
|
323
|
+
oat_plan_parallel_groups: [['p02', 'p03'], ['p04', 'p05']]
|
|
290
324
|
```
|
|
291
325
|
|
|
292
|
-
|
|
326
|
+
- One worktree and one coordinator are created per phase.
|
|
327
|
+
- Coordinators in separate declared worktrees may run concurrently.
|
|
328
|
+
- Every coordinator still dispatches its task workers serially.
|
|
329
|
+
- Phases outside groups run sequentially in plan order.
|
|
330
|
+
- Groups themselves fan in before the next group starts.
|
|
331
|
+
|
|
332
|
+
### Parallel group flow
|
|
293
333
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
334
|
+
1. Bootstrap each worktree with `oat-worktree-bootstrap-auto` from the current
|
|
335
|
+
orchestration HEAD.
|
|
336
|
+
2. Verify every worktree HEAD before dispatch. Any bootstrap/base mismatch
|
|
337
|
+
degrades the whole group to sequential target-preserving execution.
|
|
338
|
+
3. Dispatch one phase coordinator per worktree.
|
|
339
|
+
4. Wait for terminal phase results.
|
|
340
|
+
5. Merge passing phases back in plan order with integration verification after
|
|
341
|
+
each merge.
|
|
342
|
+
6. Preserve excluded worktrees and record them in Outstanding Items.
|
|
343
|
+
7. Clean merged worktrees, commit bookkeeping, then evaluate HiLL checkpoints.
|
|
299
344
|
|
|
300
|
-
|
|
345
|
+
If merge and cherry-pick both conflict, the orchestrator dispatches a bounded
|
|
346
|
+
conflict-resolution subagent. It does not resolve the conflict in the root
|
|
347
|
+
context. An unresolved or verification-failing conflict stops fan-in.
|
|
301
348
|
|
|
302
|
-
##
|
|
349
|
+
## Phase Review Gate and HiLL
|
|
303
350
|
|
|
304
|
-
|
|
351
|
+
After standard review passes and bookkeeping is committed, an enabled
|
|
352
|
+
`oat_phase_review_gate` may run a target-neutral external review for the phase.
|
|
353
|
+
Passing artifacts are still received for durable disposition; blocking
|
|
354
|
+
findings return through the bounded fix loop. Reusable lifecycle gate commands
|
|
355
|
+
declare the project but do not pin a provider target.
|
|
356
|
+
|
|
357
|
+
HiLL pauses remain phase boundaries. They run only after the phase or parallel
|
|
358
|
+
group is integrated, reviewed, and tracked.
|
|
359
|
+
|
|
360
|
+
## Dry Run
|
|
305
361
|
|
|
306
362
|
```bash
|
|
307
363
|
oat-project-implement --dry-run
|
|
308
364
|
```
|
|
309
365
|
|
|
310
|
-
Dry-run
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
- Builds the execution schedule (singleton phases + parallel groups in plan order).
|
|
314
|
-
- Prints the planned dispatches and worktree layout.
|
|
315
|
-
- Exits 0 without dispatching subagents, creating worktrees, or modifying files.
|
|
316
|
-
|
|
317
|
-
Use dry-run as a sanity check after editing `oat_plan_parallel_groups` to confirm the schedule matches your intent.
|
|
366
|
+
Dry-run performs preflight and plan validation, resolves the phase schedule and
|
|
367
|
+
named maxima, and prints planned coordinator/worktree routing. It does not
|
|
368
|
+
dispatch coordinators or workers, create worktrees, or modify files.
|
|
318
369
|
|
|
319
370
|
## Resumption
|
|
320
371
|
|
|
321
|
-
On re-invocation
|
|
372
|
+
On re-invocation:
|
|
322
373
|
|
|
323
|
-
1. Read `implementation.md`
|
|
324
|
-
2.
|
|
325
|
-
3.
|
|
326
|
-
4.
|
|
327
|
-
5.
|
|
374
|
+
1. Read `implementation.md`, `plan.md`, and `state.md`.
|
|
375
|
+
2. Advance a stale pointer to the first incomplete task.
|
|
376
|
+
3. Cross-check the latest bookkeeping commit with Git.
|
|
377
|
+
4. Resume an incomplete coordinator at the next unverified task commit.
|
|
378
|
+
5. Re-dispatch a missing phase reviewer for the current committed phase range.
|
|
379
|
+
6. Report leftover parallel worktrees before resuming or cleaning them.
|
|
328
380
|
|
|
329
|
-
|
|
381
|
+
The one-task commit boundary lets resumption distinguish completed work from an
|
|
382
|
+
unverified worker return without rerunning the whole phase.
|
|
330
383
|
|
|
331
|
-
## State and
|
|
384
|
+
## State and Artifact Updates
|
|
332
385
|
|
|
333
|
-
After
|
|
386
|
+
After a phase or parallel group completes, `oat-project-implement` updates:
|
|
334
387
|
|
|
335
|
-
- `implementation.md
|
|
336
|
-
|
|
337
|
-
- `
|
|
388
|
+
- `implementation.md`: task outcomes, exact targets, commits, verification,
|
|
389
|
+
phase summary, review results, and deviations
|
|
390
|
+
- `plan.md`: task status and review lifecycle
|
|
391
|
+
- `state.md`: current task, last commit, phase status, and timestamp
|
|
338
392
|
|
|
339
|
-
|
|
393
|
+
It creates a separate bookkeeping commit after implementation commits. Legacy
|
|
394
|
+
`oat_execution_mode: subagent-driven` is ignored and removed on the next write.
|
|
340
395
|
|
|
341
396
|
## Related
|
|
342
397
|
|
|
343
|
-
- [
|
|
344
|
-
|
|
345
|
-
- [
|
|
346
|
-
- [
|
|
398
|
+
- [Dispatch Policy](dispatch-ceiling.md) - candidate ladders, named maxima, and
|
|
399
|
+
exact provider resolution.
|
|
400
|
+
- [Lifecycle](lifecycle.md) - implementation in the full project flow.
|
|
401
|
+
- [Artifacts](artifacts.md) - plan/state shapes and parallel groups.
|
|
402
|
+
- [Reviews](reviews.md) - standard and external phase reviews.
|
|
403
|
+
- [HiLL Checkpoints](hill-checkpoints.md) - phase pause semantics.
|