@open-agent-toolkit/cli 0.1.55 → 0.1.60

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 (40) hide show
  1. package/assets/agents/oat-phase-implementer.md +195 -238
  2. package/assets/docs/cli-utilities/configuration.md +7 -6
  3. package/assets/docs/contributing/index.md +1 -0
  4. package/assets/docs/contributing/smoke-testing.md +284 -0
  5. package/assets/docs/provider-sync/providers.md +11 -11
  6. package/assets/docs/provider-sync/scope-and-surface.md +2 -2
  7. package/assets/docs/workflows/projects/dispatch-ceiling.md +29 -26
  8. package/assets/docs/workflows/projects/evidence-layers.md +123 -0
  9. package/assets/docs/workflows/projects/implementation-execution.md +160 -406
  10. package/assets/docs/workflows/projects/index.md +8 -0
  11. package/assets/docs/workflows/projects/orchestration-model.md +190 -0
  12. package/assets/docs/workflows/projects/programmatic-execution.md +137 -0
  13. package/assets/docs/workflows/projects/review-flavors.md +129 -0
  14. package/assets/public-package-versions.json +4 -4
  15. package/assets/skills/oat-agent-instructions-analyze/references/docs/provider-reference.md +5 -4
  16. package/assets/skills/oat-agent-instructions-apply/references/docs/provider-reference.md +5 -4
  17. package/assets/skills/oat-dispatch-subagents/SKILL.md +6 -1
  18. package/assets/skills/oat-dispatch-subagents/references/record-schema.md +5 -0
  19. package/assets/skills/oat-project-dispatch-subagents/SKILL.md +37 -15
  20. package/assets/skills/oat-project-implement/SKILL.md +63 -1904
  21. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +431 -0
  22. package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +562 -0
  23. package/assets/skills/oat-project-implement/references/phase-execution.md +270 -0
  24. package/assets/skills/oat-project-implement/references/plan-and-resume.md +279 -0
  25. package/assets/skills/oat-project-import-plan/SKILL.md +16 -8
  26. package/assets/skills/oat-project-plan/SKILL.md +15 -7
  27. package/assets/skills/oat-project-plan-writing/SKILL.md +74 -40
  28. package/assets/skills/oat-project-quick-start/SKILL.md +16 -8
  29. package/assets/skills/oat-project-review-provide/SKILL.md +8 -5
  30. package/assets/skills/oat-worktree-bootstrap/SKILL.md +22 -12
  31. package/assets/skills/oat-worktree-bootstrap/references/worktree-conventions.md +8 -8
  32. package/assets/skills/oat-worktree-bootstrap-auto/SKILL.md +233 -44
  33. package/dist/commands/doctor/index.d.ts.map +1 -1
  34. package/dist/commands/doctor/index.js +7 -4
  35. package/dist/commands/gate/index.d.ts +9 -1
  36. package/dist/commands/gate/index.d.ts.map +1 -1
  37. package/dist/commands/gate/index.js +62 -2
  38. package/dist/commands/project/dispatch-ceiling/index.js +2 -2
  39. package/package.json +4 -4
  40. package/assets/skills/oat-worktree-bootstrap-auto/scripts/bootstrap.sh +0 -236
@@ -0,0 +1,190 @@
1
+ ---
2
+ title: Orchestration Model
3
+ description: Root-owned phase execution, optional nested work, independent reviews, and provider-neutral dispatch in OAT projects.
4
+ ---
5
+
6
+ # Orchestration Model
7
+
8
+ OAT separates lifecycle ownership from implementation ownership:
9
+
10
+ - the project root owns sequencing, reviews, fix routing, checkpoints, fan-in,
11
+ and bookkeeping;
12
+ - one phase implementer owns all planned tasks for one phase; and
13
+ - optional nested agents provide bounded help only when useful.
14
+
15
+ This topology keeps model control at the meaningful phase boundary without
16
+ making every task pay another dispatch and context-loading round.
17
+
18
+ ## Default Topology
19
+
20
+ ```mermaid
21
+ flowchart TD
22
+ Root["Project root\nlifecycle owner"]
23
+ Adapter["Project dispatch adapter"]
24
+ Engine["Provider-neutral dispatch engine"]
25
+
26
+ Root --> Adapter --> Engine
27
+ Engine --> P["Phase implementer\none per phase"]
28
+ P --> T1["Planned task commit"]
29
+ P --> T2["Planned task commit"]
30
+ P -. optional .-> Recon["Recon / specialist / isolated fanout"]
31
+
32
+ Root -. independent review lane .-> Adapter
33
+ Engine -. exact reviewer route .-> R["Phase reviewer"]
34
+ R -->|blocking findings| Root
35
+ Root -->|resume bounded fix| P
36
+
37
+ Root -. external gate lane .-> G["Configured cross-runtime gate"]
38
+ ```
39
+
40
+ The solid implementation lane is mandatory. The dotted nested lane is
41
+ benefit-driven. A run does not fail merely because the phase agent cannot or
42
+ does not launch a third tier.
43
+
44
+ ## Role Boundaries
45
+
46
+ | Role | Generic class | Owns | Must not |
47
+ | --------------------- | ------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
48
+ | Project root | lifecycle caller | Phase schedule, dispatch policy, phase review, fixes, worktrees, checkpoints, bookkeeping | Take over an accepted child scope or silently replace an accepted launch |
49
+ | Phase implementer | `worker` | One whole phase, ordered task execution, per-task commits, phase verification | Dispatch the phase reviewer, alter plan sequencing, own project checkpoints |
50
+ | Optional nested child | `worker` or `recon` | Explicit bounded objective, files/read scope, output, verification | Become mandatory for ordinary tasks, widen phase authority, commit in place of the phase agent |
51
+ | Phase reviewer | `reviewer` | Independent review of one phase commit range | Inherit a below-ceiling producer silently or mutate implementation |
52
+ | External gate | `reviewer` | Configured producer-independent lifecycle decision | Substitute same-context self-review when independence is required |
53
+
54
+ ## Dispatch Layers
55
+
56
+ Every lifecycle launch flows through two contracts:
57
+
58
+ 1. `oat-project-dispatch-subagents` resolves project state, role policy,
59
+ ceilings, scope, files, commits, worktrees, and checkpoints.
60
+ 2. `oat-dispatch-subagents` resolves capabilities, catalogs, exact routes,
61
+ launch acceptance, continuation, and generic evidence.
62
+
63
+ The lifecycle workflow remains authoritative for synthesis and state mutation.
64
+ The dispatch engine does not edit `plan.md`, `implementation.md`, or project
65
+ state.
66
+
67
+ ```mermaid
68
+ sequenceDiagram
69
+ participant Root as Project root
70
+ participant Adapter as Project adapter
71
+ participant Engine as Dispatch engine
72
+ participant Phase as Phase implementer
73
+
74
+ Root->>Adapter: Phase + lifecycle authority
75
+ Adapter->>Engine: Provider-neutral dispatch request
76
+ Engine-->>Root: Exact route + request ID
77
+ Root->>Phase: Phase Scope
78
+ Phase-->>Root: Phase report + commits
79
+ ```
80
+
81
+ ## Phase Execution
82
+
83
+ The phase implementer reads its artifact set once and executes tasks serially in
84
+ plan order. Each task retains its file boundary, verification, and one-commit
85
+ contract. The phase agent self-checks before committing and runs phase-wide
86
+ verification before returning.
87
+
88
+ The root verifies the report against Git rather than trusting child prose:
89
+
90
+ - phase base and final HEAD;
91
+ - one commit per planned task;
92
+ - declared file boundaries;
93
+ - task and phase verification;
94
+ - clean worktree; and
95
+ - optional child records, if any.
96
+
97
+ See [Implementation Execution](implementation-execution.md) for the executable
98
+ contract.
99
+
100
+ ## Independent Phase Review
101
+
102
+ After a phase report is accepted, the root resolves and launches the reviewer
103
+ at the configured review ceiling. Review ownership does not sit inside a
104
+ possibly below-ceiling phase agent.
105
+
106
+ Blocking findings return to the original phase handle in fix mode. If that
107
+ completed handle cannot resume, one fresh same-target phase agent may receive
108
+ the bounded fix scope, with `continuation_events` linking the new request to the
109
+ original `request_id`.
110
+
111
+ This preserves continuity without allowing replacement after an accepted failed
112
+ launch.
113
+
114
+ ## Optional Third Tier
115
+
116
+ Nested work is appropriate when the work itself benefits:
117
+
118
+ - read-only reconnaissance that can run independently;
119
+ - analysis fanout across separate concerns;
120
+ - safely isolated implementation lanes; or
121
+ - a specialist capability the phase agent does not provide efficiently.
122
+
123
+ Before launch, the phase agent defines objective, authority, exact target,
124
+ output, verification, deadline, retry policy, and fallback. The parent retains
125
+ phase ownership and task commit authority.
126
+
127
+ Do not use nested dispatch merely to mirror task granularity. The smoke fixture
128
+ intentionally proves successful execution with no task workers.
129
+
130
+ ## Catalogs and Exact Selection
131
+
132
+ Native model catalogs are per-dispatch-context snapshots. A root catalog does
133
+ not prove what a nested agent can launch, and a provider CLI catalog does not
134
+ prove native eligibility.
135
+
136
+ The full-information selection order is:
137
+
138
+ 1. inspect the current dispatch context's native catalog;
139
+ 2. intersect it with configured candidates under the named ceiling;
140
+ 3. prefer a satisfying exact native route;
141
+ 4. otherwise select a policy-authorized CLI/programmatic route before launch;
142
+ 5. record the reason and ordered candidates; and
143
+ 6. fail closed if no exact authorized route exists.
144
+
145
+ Configured values remain opaque where the provider defines them that way.
146
+ Never infer capabilities from Cursor selector spelling.
147
+
148
+ ## Accepted-Launch Terminality
149
+
150
+ Pre-start rejection and accepted child failure are different states:
151
+
152
+ - **Pre-start rejection:** no child owns the scope; another configured route may
153
+ be selected.
154
+ - **Accepted launch:** the child owns the scope; its completed, failed,
155
+ interrupted, timed-out, or `BLOCKED` result is authoritative.
156
+
157
+ `invalid-run-abort` is cancellation of a proven-invalid run, not a child outcome
158
+ and not permission to launch a replacement.
159
+
160
+ ## Parallel Phases
161
+
162
+ Plan-declared phase groups run in separate worktrees. The root creates and
163
+ registers worktrees, verifies the common base, dispatches one phase implementer
164
+ per worktree, owns each review/fix loop, then merges passing phases in plan
165
+ order.
166
+
167
+ Task-level concurrency inside one worktree remains disallowed unless an
168
+ optional child has explicitly isolated write authority.
169
+
170
+ ## Provider Shapes
171
+
172
+ - **Codex:** root uses the exact materialized phase implementer and reviewer
173
+ roles. Depth one supports the default topology; depth two enables optional
174
+ nested work.
175
+ - **Claude:** root uses native Agent dispatch for phase implementation and
176
+ review. Nested Agent work is optional and evidenced per run.
177
+ - **Cursor IDE:** operator starts the root session. Native and CLI routes use
178
+ full-information selection, with deliberate pre-start CLI choice when the
179
+ native catalog is unsatisfying.
180
+ - **Cursor CLI:** treated as a separate harness with its own catalog and event
181
+ evidence.
182
+
183
+ ## Related
184
+
185
+ - [Implementation Execution](implementation-execution.md)
186
+ - [Dispatch Policy](dispatch-ceiling.md)
187
+ - [Review Flavors](review-flavors.md)
188
+ - [Programmatic Execution](programmatic-execution.md)
189
+ - [Evidence Layers](evidence-layers.md)
190
+ - [Workflow Smoke Testing](../../contributing/smoke-testing.md)
@@ -0,0 +1,137 @@
1
+ ---
2
+ title: Programmatic Execution
3
+ description: 'How OAT launches agents through provider CLI/headless surfaces — per-harness execution shapes, cross-runtime gate exec targets, credential isolation, and the launcher-owned evidence they share.'
4
+ ---
5
+
6
+ # Programmatic Execution
7
+
8
+ **Programmatic execution** is launching an agent through a provider's CLI or
9
+ headless surface — a fresh child process — rather than a native same-runtime
10
+ dispatch through the harness's own subagent tool. OAT reaches for it in exactly
11
+ three places:
12
+
13
+ 1. **Cross-runtime gate reviews** — a workflow gate dispatches an independent
14
+ reviewer to a different runtime/family than the one that produced the work.
15
+ 2. **Policy-resolved CLI dispatch** — a phase implementer, optional nested
16
+ worker, or reviewer route that the native same-runtime catalog cannot
17
+ satisfy, resolved to a provider CLI before launch.
18
+ 3. **Operator smoke sessions** — the smoke runner drives each harness through
19
+ its headless flavor to capture per-harness evidence.
20
+
21
+ Programmatic execution is **never an improvised fallback**. Route authorization
22
+ comes from configured dispatch policy or a configured cross-family gate
23
+ (standing, scope-bound), or from explicit user approval for the current run.
24
+ Availability of a provider CLI is capability evidence, not authorization. See
25
+ the route tiers in
26
+ [Orchestration Model](orchestration-model.md#route-tiers-and-terminality) for
27
+ how native, policy-resolved, and improvised routes are ranked, and why an
28
+ accepted launch is terminal for automatic replacement.
29
+
30
+ ## Per-harness execution surfaces
31
+
32
+ Each harness exposes different controllable axes. Verify the current CLI help
33
+ before constructing any route; the shapes below are the verified skeletons, not
34
+ a fixed flag inventory. Model strings are placeholders — provider catalogs are
35
+ volatile, so never hard-code a model name as a durable fact.
36
+
37
+ | Harness | Verified headless shape | Controllable axes | Caveats |
38
+ | ---------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
39
+ | Codex | `codex exec --ephemeral --sandbox read-only --model '<model>' -c 'model_reasoning_effort="<effort>"' '<prompt>'` | agent type, model + reasoning effort, service tier, forked context, max nesting depth, sandbox + scoped writable roots | Model and effort are separate configured axes; native nesting grants no filesystem authority |
40
+ | Claude | `claude -p --model '<model-alias-or-id>' '<prompt>'` | agent type, model (alias or full ID), CLI effort when exposed | No effort axis on the native Agent surface — record it as `not-exposed`, not `not-applicable` |
41
+ | Cursor CLI | `cursor-agent --trust --print --model '<exact-opaque-model>' '<prompt>'` | opaque model selector from the account catalog | Opaque strings pass byte-for-byte; distinct flavor from Cursor IDE — do not infer one from the other |
42
+ | Cursor IDE | (native session; no headless CLI shape) | native Task/Subagent schema, UI role configuration | Any CLI task dispatch from an IDE root is a recorded pre-start selection |
43
+
44
+ Notes per harness:
45
+
46
+ - **Codex** treats registered agent type, model, reasoning effort, service
47
+ tier, fork behavior, sandbox, and scoped writable roots as independent
48
+ configured axes. Use the CLI route only when native dispatch cannot express
49
+ the complete target and the route is selected before launch. Record model,
50
+ effort, sandbox, and route as configured-invocation evidence; a successful
51
+ process alone does not prove runtime identity.
52
+ - **Claude** has three native control surfaces — the native Agent tool (agent
53
+ type plus optional model), agent-definition frontmatter (default model), and
54
+ `claude -p` (alias or full model ID plus CLI effort). Model resolution follows
55
+ explicit-call model > agent-definition model > parent/session inheritance.
56
+ Never omit a worker model unless inheritance is the recorded policy.
57
+ - **Cursor** keeps three control surfaces that must not be conflated: the native
58
+ Task/Subagent schema, the account CLI catalog (`cursor-agent --list-models`),
59
+ and Cursor UI role configuration. IDE and CLI are separate harness contexts;
60
+ an observed catalog is a volatile snapshot, and equality in one run does not
61
+ establish equality in another run or nesting boundary. Opaque model selectors
62
+ are passed byte-for-byte.
63
+
64
+ ## Cross-runtime gate execution
65
+
66
+ Workflow gates use programmatic execution to run a producer-independent
67
+ reviewer. `oat gate cross-provider-exec` (and the review-specific
68
+ `oat gate review`) choose from `workflow.gates.execTargets` — targets keyed by
69
+ opaque id with a declared runtime, argv `baseCommand`, priority, and optional
70
+ `models` list. OAT does not infer provider semantics from the target id.
71
+
72
+ Gate dispatch defaults to `--avoid same-family`: it detects the current runtime
73
+ via host-detection commands and picks the highest-priority available non-host,
74
+ different-family target. This **host-avoidance** is why gate targets are
75
+ independent of the harness's native subagent catalog — the point of a gate is a
76
+ route the producing context could not have selected for itself. The
77
+ lifecycle/final gate is the one flavor that may spawn a **nested managed
78
+ reviewer child inside the gate exec target**; see
79
+ [Review Flavors](review-flavors.md) for which flavor fires when and how
80
+ independent each must be.
81
+
82
+ Gates **fail closed**. If no different-family target is available, OAT records
83
+ the degraded achieved level rather than pretending diversity was achieved, and
84
+ an unavailable required-independent target blocks the gate instead of quietly
85
+ downgrading to a same-context self-review. Only summarize the execution-surface
86
+ angle here — see [Workflow Gates](../../cli-utilities/workflow-gates.md) for the
87
+ gate envelope, exec-target configuration, receive-eligibility, and completion
88
+ contract. The cross-runtime `gates.execTargets` design (host-avoidance and
89
+ independence from native catalogs) is the smoke fixture's cross-runtime gate
90
+ leg.
91
+
92
+ ## Credential isolation
93
+
94
+ Some gate and smoke routes must launch a Cursor child while the driving process
95
+ is a sandboxed Codex process whose tool shells redact provider credentials. OAT
96
+ resolves this with a **runner-owned mailbox broker** rather than by threading
97
+ the secret through the child.
98
+
99
+ The disposable local gate target invokes only a committed worktree-mailbox
100
+ client; the parent broker — outside the sandbox — is what launches
101
+ `cursor-agent` with the retained key. Operator handoffs wrap Codex in the same
102
+ broker launcher. The rule is absolute: the `CURSOR_API_KEY` value must never
103
+ enter config, manifests, the mailbox, logs, prompts, or evidence. This keeps
104
+ the secret out of every sandboxed child process and every durable artifact while
105
+ still allowing a cross-runtime launch. (Conceptual only; the broker mechanics
106
+ live with the smoke runner contract.)
107
+
108
+ ## Evidence
109
+
110
+ Every programmatic launch produces the **same launcher-owned dispatch record**
111
+ as a native dispatch: the selected route, exact target/model/effort axes,
112
+ selection reason, ordered candidates considered, and launch acceptance. Because
113
+ the launcher constructs the payload itself, this evidence does not depend on any
114
+ child cooperation. Runtime-observed identity is optional corroboration —
115
+ recorded as `reported` or `not-reported`, and its absence never invalidates the
116
+ configured-invocation record. See [Evidence Layers](evidence-layers.md) for the
117
+ three-layer model and how assertions bind to the launcher-owned layer.
118
+
119
+ Where relevant to a run: optional Claude phase-agent nesting and Cursor CLI
120
+ subagent-event observability are **validated per run by live smoke evidence**,
121
+ not asserted here as settled facts. Successful default execution does not
122
+ require either capability.
123
+
124
+ ## Related
125
+
126
+ - [Orchestration Model](orchestration-model.md) — route tiers, native-first
127
+ selection, and per-harness topology.
128
+ - [Review Flavors](review-flavors.md) — the four review flavors and which one
129
+ may spawn a nested managed reviewer inside a gate.
130
+ - [Evidence Layers](evidence-layers.md) — the three-layer dispatch evidence
131
+ model these launches feed.
132
+ - [Dispatch Policy](dispatch-ceiling.md) — candidate ladders, named ceilings,
133
+ and the dispatch report.
134
+ - [Workflow Gates](../../cli-utilities/workflow-gates.md) — gate envelope,
135
+ exec-target configuration, and completion contract.
136
+ - [Smoke Testing](../../contributing/smoke-testing.md) — per-harness drive
137
+ protocols and live evidence.
@@ -0,0 +1,129 @@
1
+ ---
2
+ title: Review Flavors
3
+ description: 'The four OAT project review flavors, when each fires in the lifecycle, and who resolves its reviewer target.'
4
+ ---
5
+
6
+ # Review Flavors
7
+
8
+ OAT projects run reviews at several different lifecycle points, and those points
9
+ have different independence requirements. A self-review that checks a freshly
10
+ written plan does not need the same producer isolation as a lifecycle gate that
11
+ signs off on the final artifact. Rather than force one reviewer-selection rule
12
+ onto every point, OAT recognizes **four review flavors**, each with its own
13
+ target-resolution policy layered on the shared reviewer role class.
14
+
15
+ The distinguishing question is always _"who resolves this review's target, and
16
+ how independent must that target be from whatever produced the work?"_ The four
17
+ flavors answer it differently while preserving one invariant: the reviewer runs
18
+ **at or above the ceiling** (see [Dispatch Policy](dispatch-ceiling.md)). Gate
19
+ independence is project policy layered on the generic reviewer role class
20
+ described in the `oat-project-dispatch-subagents` lifecycle-role table; this page
21
+ covers _which_ flavor fires _when_ and _who_ resolves its target, and links out
22
+ for the deep review request/receive mechanics.
23
+
24
+ ## Quick Look
25
+
26
+ - What it does: names the four review flavors and states who resolves each
27
+ one's reviewer target.
28
+ - When to use it: when you need to know which review fires at a lifecycle point
29
+ and whether it inherits, pins the ceiling, or requires an independent gate.
30
+ - Primary sources: `oat-project-implement` phase-execution mechanics, the
31
+ `oat-project-dispatch-subagents` lifecycle-role table, and project design
32
+ Decision #11.
33
+
34
+ ## Flow map
35
+
36
+ ```mermaid
37
+ flowchart TD
38
+ subgraph Planning
39
+ PL["Planning-phase\nartifact self-review"] --> PLR["Inherit planning parent"]
40
+ PLR --> PLT["Parent model\n(root already at/above ceiling)"]
41
+ end
42
+
43
+ subgraph Implementation
44
+ IM["Root-owned phase\nself-review"] --> IMR["Resolve dispatch ceiling"]
45
+ IMR --> IMPIN["At-ceiling pin\n(ceiling final candidate)"]
46
+ IMR --> IMINH["Inherit\n(only if dispatcher known at/above ceiling)"]
47
+ IMR --> IMCLI["Exact CLI reviewer\n(selected pre-launch)"]
48
+ end
49
+
50
+ subgraph Gates
51
+ PG["Phase review gate\n(external)"] --> PGR["Configured cross-family\nexec target (gates.execTargets)"]
52
+ PGR --> PGT["Independent CLI/exec target\n(host-avoidance; fail closed)"]
53
+
54
+ LG["Lifecycle / final gate"] --> LGR["Cross-runtime CLI\nexec target"]
55
+ LGR --> LGT["Producer-independent target\n(fail closed, no self-review substitute)"]
56
+ LGT -. may spawn .-> LGN["Nested managed\nreviewer child inside gate"]
57
+ end
58
+ ```
59
+
60
+ The dotted branch marks the only flavor that may **spawn a nested managed
61
+ reviewer child** inside the gate exec target: the lifecycle/final gate.
62
+
63
+ ## The four flavors
64
+
65
+ | Flavor | Lifecycle point | Target resolution |
66
+ | ----------------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
67
+ | Planning-phase artifact self-review | Auto artifact-review loop for plan/spec/design | Inherit the planning parent by default (root is already at/above ceiling) |
68
+ | Implementation-phase self-review | Phase and final code reviews dispatched by `oat-project-implement` | Resolve the dispatch ceiling; pin the ceiling's final candidate (at-ceiling pin); inherit only when the review-owning dispatcher is known to be at/above ceiling; else select an exact CLI reviewer pre-launch |
69
+ | Phase review gate (external) | Optional non-pausing gate after a phase passes its self-review | Independent configured cross-family CLI/exec target (`gates.execTargets`), host-avoidance, unconstrained by native catalog; fail closed if unavailable |
70
+ | Lifecycle / final gate | End-of-lifecycle sign-off | Cross-runtime CLI exec target, independent of producer context; fails closed rather than substituting same-context self-review; may spawn a nested managed reviewer child inside the gate exec target |
71
+
72
+ The first two flavors are **self-reviews**. Planning review inherits its
73
+ producing parent by default; implementation phase review is dispatched by the
74
+ project root after the phase producer returns. The last two are **gates** — an
75
+ external, configured, producer-independent target. Phase implementation may run
76
+ _below_ the review ceiling for cost reasons, but review must never silently
77
+ inherit the below-ceiling phase agent.
78
+
79
+ ## Independence and fail-closed semantics
80
+
81
+ The invariant across all four flavors is that the reviewer runs **at or above
82
+ the ceiling**. What changes between flavors is the required _independence from
83
+ the producer_, and that independence is enforced by failing closed rather than
84
+ silently downgrading:
85
+
86
+ - **Planning self-review** needs the least independence. The planning root
87
+ already runs at or above the review ceiling, so inheriting the parent model
88
+ satisfies the invariant without managed re-pinning. Pinning is _possible_
89
+ once the ceiling is resolved during planning, but it is not the default.
90
+ - **Implementation self-review** needs ceiling-level capability but not
91
+ cross-family isolation. The root resolves the dispatch ceiling and pins the
92
+ tier's final candidate after the phase report. Inheritance is allowed only
93
+ when the root dispatcher is _known_ to be at or above the ceiling; otherwise
94
+ an exact provider CLI reviewer is selected before launch. Reviewer selection
95
+ is never delegated to the phase implementer.
96
+ - **Phase review gate** adds cross-family independence. It uses a configured
97
+ independent exec target from `gates.execTargets` with host-avoidance,
98
+ unconstrained by the harness's native subagent catalog. If the required
99
+ independent target cannot be enforced, the gate **fails closed** — it does
100
+ not downgrade to producer-context review.
101
+ - **Lifecycle / final gate** requires the strongest independence: a
102
+ cross-runtime CLI exec target chosen independently of the producer context.
103
+ It fails closed rather than substituting a same-context self-review, and it is
104
+ the one flavor permitted to spawn a nested managed reviewer child _inside_ the
105
+ gate exec target when the gate's own contract calls for it.
106
+
107
+ Gate independence is not a property of the generic reviewer class; it is project
108
+ policy layered on top of it. The dispatch adapter resolves the configured gate
109
+ target before launch and passes it as exact selection input. Fail-closed
110
+ behavior for both gate flavors is deliberate: an unavailable independent target
111
+ blocks the gate instead of quietly reusing whatever produced the work. For the
112
+ gate configuration keys and non-pausing behavior, see
113
+ [Workflow gates](../../cli-utilities/workflow-gates.md) and the
114
+ [phase review gate](reviews.md#phase-review-gate) section of the review doc.
115
+
116
+ ## Related
117
+
118
+ - [Reviews](reviews.md) — the review request/receive flows and the deep review
119
+ contract these flavors plug into.
120
+ - [Dispatch Policy](dispatch-ceiling.md) — named ceilings, at-ceiling reviewer
121
+ selection, and the Dispatch Report V1 / producer-provenance record.
122
+ - [HiLL Checkpoints](hill-checkpoints.md) — how the non-pausing phase review gate
123
+ relates to pauseable lifecycle checkpoints.
124
+ - [Orchestration Model](orchestration-model.md) — the native-first dispatch
125
+ topology these reviewer roles run inside.
126
+ - [Workflow gates](../../cli-utilities/workflow-gates.md) — gate configuration
127
+ and exec-target selection.
128
+ - [Smoke testing](../../contributing/smoke-testing.md) — how the fixture makes
129
+ these flavors observable and assertable.
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.1.55",
3
- "docs-config": "0.1.55",
4
- "docs-theme": "0.1.55",
5
- "docs-transforms": "0.1.55"
2
+ "cli": "0.1.60",
3
+ "docs-config": "0.1.60",
4
+ "docs-theme": "0.1.60",
5
+ "docs-transforms": "0.1.60"
6
6
  }
@@ -220,8 +220,8 @@ The package manager for the agent skills ecosystem. Installs skills across 27+ a
220
220
  - Enable feature flag in config:
221
221
  - `[features]`
222
222
  - `multi_agent = true`
223
- - For OAT's nested root → coordinator worker topology, configure
224
- `[agents] max_depth = 2` or higher.
223
+ - OAT's default topology is root → phase implementer and needs depth `1`.
224
+ Configure `[agents] max_depth = 2` or higher for optional nested work.
225
225
  - Define role(s) in config:
226
226
  - `[agents.oat-reviewer]` (or role names your workflow dispatches)
227
227
  - Dispatch by role name using `agent_type` (not `subagent_type`).
@@ -234,8 +234,9 @@ The package manager for the agent skills ecosystem. Installs skills across 27+ a
234
234
  configs and registers them in `.codex/config.toml`.
235
235
  - Project-scoped output is repository-owned and version controlled. Explicit
236
236
  user-scope materialization writes under `~/.codex` instead.
237
- - Sync and direct materialization merge an `agents.max_depth` floor of `2`
238
- without lowering a higher project or inherited user value.
237
+ - Sync and direct materialization merge an `agents.max_depth` floor of `2` as
238
+ optional nested-work capacity without lowering a higher project or inherited
239
+ user value. Default managed preflight accepts missing depth or depth `1`.
239
240
 
240
241
  ### Other Codex Resources
241
242
 
@@ -220,8 +220,8 @@ The package manager for the agent skills ecosystem. Installs skills across 27+ a
220
220
  - Enable feature flag in config:
221
221
  - `[features]`
222
222
  - `multi_agent = true`
223
- - For OAT's nested root → coordinator worker topology, configure
224
- `[agents] max_depth = 2` or higher.
223
+ - OAT's default topology is root → phase implementer and needs depth `1`.
224
+ Configure `[agents] max_depth = 2` or higher for optional nested work.
225
225
  - Define role(s) in config:
226
226
  - `[agents.oat-reviewer]` (or role names your workflow dispatches)
227
227
  - Dispatch by role name using `agent_type` (not `subagent_type`).
@@ -234,8 +234,9 @@ The package manager for the agent skills ecosystem. Installs skills across 27+ a
234
234
  configs and registers them in `.codex/config.toml`.
235
235
  - Project-scoped output is repository-owned and version controlled. Explicit
236
236
  user-scope materialization writes under `~/.codex` instead.
237
- - Sync and direct materialization merge an `agents.max_depth` floor of `2`
238
- without lowering a higher project or inherited user value.
237
+ - Sync and direct materialization merge an `agents.max_depth` floor of `2` as
238
+ optional nested-work capacity without lowering a higher project or inherited
239
+ user value. Default managed preflight accepts missing depth or depth `1`.
239
240
 
240
241
  ### Other Codex Resources
241
242
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-dispatch-subagents
3
- version: 1.1.0
3
+ version: 1.1.2
4
4
  description: Use when an OAT skill or workflow needs provider-neutral selection, launch, recovery, or evidence for bounded subagent work without project lifecycle policy.
5
5
  disable-model-invocation: true
6
6
  user-invocable: false
@@ -238,6 +238,11 @@ aggregate wave boundary; each lane may narrow that boundary.
238
238
  policy.
239
239
  - Continuing the same accepted child through its valid handle is allowed.
240
240
  Record continuation separately and preserve selectors and route.
241
+ - A caller may cancel accepted handles only after it proves that the enclosing
242
+ run itself is invalid under caller-owned containment or integrity policy.
243
+ Record `invalid-run-abort` and the invalidating evidence. Cancellation never
244
+ makes another route eligible and never authorizes replacement, fallback, or
245
+ a successful child outcome.
241
246
  - Operator-authorized recovery is a new explicit action, never automatic
242
247
  fallback.
243
248
  - Runtime identity is optional corroboration. Missing runtime identity does not
@@ -79,6 +79,11 @@ continuation_events: []
79
79
  `role_selector` is the exact provider or harness agent-type selector, when that
80
80
  surface exists. Preserve opaque selectors byte-for-byte.
81
81
 
82
+ Use the stable selection reasons `native-catalog`,
83
+ `native-catalog-unsatisfying`, `pre-start-rejection`, `inherit`, and
84
+ `gate-target`. Calling adapters may add a more specific diagnostic, but must
85
+ not replace or rename these shared values.
86
+
82
87
  Use `selection_source: native-default` for the preferred same-runtime native
83
88
  route, `policy-resolved` for a CLI/programmatic or cross-runtime route selected
84
89
  by configured project/workflow/gate policy, and `explicit-user` for an
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: oat-project-dispatch-subagents
3
- version: 1.1.0
3
+ version: 1.1.2
4
4
  description: Use when an OAT project lifecycle skill needs to translate project state, phase or task scope, gates, and write authority into a provider-neutral subagent dispatch.
5
5
  disable-model-invocation: true
6
6
  user-invocable: false
@@ -108,19 +108,25 @@ conversational approval are never project policy.
108
108
 
109
109
  Map each lifecycle role to a generic baseline class and add project policy:
110
110
 
111
- | Lifecycle role | Generic class | Project-specific contract |
112
- | -------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
113
- | Phase coordinator | `coordinator` | Own one phase dossier. Prefer an explicit suitable native target; inherit only when the root/session target is deliberately suitable. |
114
- | Task worker | `worker` | Own one task and bounded files. Use an explicit native or pre-selected alternate target; never silently inherit an expensive root model. |
115
- | Fix worker | `worker` | Own listed findings and bounded files. Preserve retry/fix-loop limits and original task context. |
116
- | Planning self-review | `reviewer` | Inherit the planning parent by default unless the plan-writing contract requires an exact independent reviewer. |
117
- | Implementation self-review | `reviewer` | Target the resolved reviewer ceiling; inherit only when the review-owning dispatcher is known to satisfy it. |
118
- | Phase gate | `reviewer` | Use the configured independent target and fail closed when unavailable. |
119
- | Lifecycle gate | `reviewer` | Stay independent of producer context and fail closed rather than substituting same-context self-review. |
111
+ | Lifecycle role | Generic class | Project-specific contract |
112
+ | -------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------- |
113
+ | Phase implementer | `worker` | Own one complete phase, execute tasks directly in order, preserve per-task commits, and return phase verification. |
114
+ | Optional task/recon/specialist child | `worker` or `recon` | Launch only when benefit justifies nesting; keep objective, files, authority, target, output, and verification bounded. |
115
+ | Phase fix continuation | `worker` | Resume the original phase handle when possible; preserve retry limits, phase context, and original request linkage. |
116
+ | Planning self-review | `reviewer` | Inherit the planning parent by default unless the plan-writing contract requires an exact independent reviewer. |
117
+ | Root-owned implementation phase review | `reviewer` | Target the resolved reviewer ceiling independently of the phase producer. |
118
+ | Phase gate | `reviewer` | Use the configured independent target and fail closed when unavailable. |
119
+ | Lifecycle gate | `reviewer` | Stay independent of producer context and fail closed rather than substituting same-context self-review. |
120
120
 
121
121
  The calling lifecycle skill remains authoritative when its reviewed contract
122
122
  is stricter than this table.
123
123
 
124
+ The root owns implementation phase-review selection. A native catalog that
125
+ cannot satisfy the resolved review ceiling must use a policy-resolved
126
+ pre-start CLI reviewer route when available. Record the native mismatch, exact
127
+ target, selection reason, and ordered candidates; never delegate reviewer
128
+ selection to a below-ceiling phase implementer or silently downgrade.
129
+
124
130
  ## Adapt the Request
125
131
 
126
132
  For every lifecycle dispatch:
@@ -171,12 +177,22 @@ project:
171
177
  worktree: root
172
178
  ```
173
179
 
174
- ## Coordinator and Worker Topology
180
+ ## Phase-Agent Topology
181
+
182
+ The default implementation topology is root → phase implementer plus
183
+ root → phase reviewer. The phase implementer directly owns the planned phase
184
+ tasks. Per-task dispatch is not required.
185
+
186
+ Optional nested workers or recon agents are benefit-driven and remain subject
187
+ to exact bounded scopes and launcher-owned evidence. They must not widen task
188
+ boundaries, alter plan sequencing, take over phase commits, dispatch the phase
189
+ reviewer, or own user checkpoints.
175
190
 
176
- Use a phase coordinator only when the lifecycle workflow declares that
177
- topology. A coordinator may dispatch task workers when nesting and authority
178
- permit it, but it must not widen task boundaries, alter plan sequencing, or
179
- take over user checkpoints.
191
+ When review findings require fixes, resume the original phase request when the
192
+ host supports continuation. If a completed phase handle is unavailable, allow
193
+ at most one fresh same-target phase implementer for the bounded fix scope and
194
+ link its generic record to the original `request_id` through existing
195
+ `continuation_events`.
180
196
 
181
197
  For parallel groups, preserve plan-declared isolation. Each worktree receives
182
198
  only its assigned phase/task boundaries and must not mutate sibling worktrees.
@@ -229,6 +245,12 @@ fields inside the lifecycle extension.
229
245
  engine.
230
246
  - Accepted child failure: return the terminal outcome to the lifecycle caller;
231
247
  do not select a replacement automatically.
248
+ - A tracked smoke marker makes containment, ownership registration, expected
249
+ base, and fixture readiness run-validity conditions. Failure of any condition
250
+ triggers `invalid-run-abort`: terminate accepted child and gate handles owned
251
+ by that run, preserve the invalidating evidence, clean only journal-owned
252
+ resources, and stop before any later launch. Never replace an aborted handle
253
+ or degrade the invalid smoke run to sequential execution.
232
254
  - Required gate target unavailable: fail closed.
233
255
  - Verification or commit failure after worker completion: lifecycle caller owns
234
256
  repair and bookkeeping; do not falsify the child outcome.