@open-agent-toolkit/cli 0.1.52 → 0.1.54

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 (25) hide show
  1. package/assets/docs/cli-utilities/tool-packs.md +23 -2
  2. package/assets/docs/contributing/skills.md +16 -0
  3. package/assets/docs/workflows/projects/implementation-execution.md +20 -0
  4. package/assets/docs/workflows/skills/index.md +3 -0
  5. package/assets/docs/workflows/skills/repo-improve.md +45 -0
  6. package/assets/public-package-versions.json +4 -4
  7. package/assets/skills/oat-dispatch-subagents/SKILL.md +254 -0
  8. package/assets/skills/oat-dispatch-subagents/references/provider-claude.md +44 -0
  9. package/assets/skills/oat-dispatch-subagents/references/provider-codex.md +69 -0
  10. package/assets/skills/oat-dispatch-subagents/references/provider-cursor.md +61 -0
  11. package/assets/skills/oat-dispatch-subagents/references/record-schema.md +109 -0
  12. package/assets/skills/oat-pjm-add-backlog-item/SKILL.md +6 -3
  13. package/assets/skills/oat-pjm-review-backlog/SKILL.md +22 -10
  14. package/assets/skills/oat-project-dispatch-subagents/SKILL.md +234 -0
  15. package/assets/skills/oat-repo-improve/SKILL.md +280 -0
  16. package/assets/skills/oat-repo-improve/references/audit-playbook.md +130 -0
  17. package/assets/skills/oat-repo-improve/references/plan-template.md +200 -0
  18. package/assets/skills/oat-repo-maintainability-review/SKILL.md +22 -7
  19. package/assets/templates/backlog-item.md +1 -0
  20. package/assets/templates/pjm-agents.md +8 -0
  21. package/assets/templates/reference-agents.md +3 -1
  22. package/dist/commands/init/tools/shared/skill-manifest.d.ts +2 -2
  23. package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
  24. package/dist/commands/init/tools/shared/skill-manifest.js +3 -0
  25. package/package.json +2 -2
@@ -17,13 +17,34 @@ This page covers CLI commands that manage bundled OAT tool packs and installed O
17
17
 
18
18
  - `core` - foundational diagnostics and docs access (`oat-doctor`, `oat-docs`)
19
19
  - `docs` - docs and agent-instructions governance workflows
20
- - `workflows` - project lifecycle skills, wrap-up reporting, reviewer agents, and core project templates
20
+ - `workflows` - project lifecycle skills, the project subagent-dispatch adapter, wrap-up reporting, reviewer agents, and core project templates
21
21
  - `ideas` - lightweight ideation and promotion flows
22
- - `utility` - review and repo-maintenance helpers
22
+ - `utility` - review and repo-maintenance helpers plus the provider-neutral subagent-dispatch engine
23
23
  - `project-management` - file-backed backlog/reference skills plus backlog, roadmap, current-state, file-per-record decision, and AGENTS-guide templates
24
24
  - `research` - research, analysis, comparison, and synthesis skills
25
25
  - `brainstorm` - always-on brainstorming entry point with visual companion
26
26
 
27
+ ### Cross-pack dispatch dependency
28
+
29
+ The reusable dispatch contracts intentionally span two packs:
30
+
31
+ - `utility` owns `oat-dispatch-subagents`, the provider-neutral engine for
32
+ capability checks, catalog-aware selection, launch evidence, and recovery.
33
+ - `workflows` owns `oat-project-dispatch-subagents`, the adapter that adds OAT
34
+ project lifecycle context without duplicating provider mechanics.
35
+
36
+ Install both packs when project lifecycle skills need the adapter:
37
+
38
+ ```bash
39
+ oat tools install utility
40
+ oat tools install workflows
41
+ ```
42
+
43
+ The packs remain independently installable. If the workflows adapter is
44
+ present without the utility engine, it fails closed and reports the missing
45
+ dependency instead of inventing a fallback route. Non-project analytical
46
+ skills can use the utility engine directly.
47
+
27
48
  ## `oat tools` command group
28
49
 
29
50
  The `oat tools` command group provides a unified interface for managing installed tools (skills and agents) across scopes.
@@ -75,6 +75,22 @@ At minimum, the skill contract should:
75
75
  - Stop before side effects if delegation is required for correctness and authorization remains unresolved.
76
76
  - Document the fallback path and any quality or independence tradeoff.
77
77
 
78
+ OAT-specific skills should compose with the internal
79
+ `oat-dispatch-subagents` contract instead of copying provider selection and
80
+ recovery rules. The caller still owns decomposition, user interaction,
81
+ verification of load-bearing claims, cross-lane synthesis, and artifact
82
+ writes. The dispatch contract owns capability and authorization checks, live
83
+ catalog evidence, route/model/effort selection, launch acceptance, recovery,
84
+ and the neutral dispatch record.
85
+
86
+ Keep project lifecycle policy out of that general layer. A lifecycle caller
87
+ loads `oat-project-dispatch-subagents` to resolve project, phase/task, gate,
88
+ write-boundary, commit, and worktree context, then passes a generic request to
89
+ `oat-dispatch-subagents`. Analytical callers such as repository audits can use
90
+ the general contract directly without requiring an active project. In either
91
+ case, resolve the provider first and load exactly one provider-specific
92
+ reference rather than merging provider mechanics into a universal catalog.
93
+
78
94
  Use `create-agnostic-skill` or `create-oat-skill` as the starting point; both include the current delegation guidance and optional capability-detection template.
79
95
 
80
96
  ## Gate-aware skills
@@ -25,6 +25,26 @@ ceiling.
25
25
 
26
26
  ## Execution Layers
27
27
 
28
+ ### Reusable dispatch boundary
29
+
30
+ OAT ships two internal contracts for lifecycle skills that need subagents:
31
+
32
+ - `oat-project-dispatch-subagents` translates resolved project, phase/task,
33
+ gate, write-boundary, commit, and worktree policy into a generic dispatch
34
+ request.
35
+ - `oat-dispatch-subagents` performs provider-neutral capability and
36
+ authorization checks, catalog-aware selection, launch evidence, and
37
+ recovery.
38
+
39
+ The project adapter composes with the general engine; the engine never reads
40
+ project state. Lifecycle callers remain responsible for phase scheduling,
41
+ task boundaries, review and fix-loop policy, project artifacts, commits, and
42
+ worktree fan-in. This is the extension contract for lifecycle dispatch—not a
43
+ license for the general engine to mutate project bookkeeping or reinterpret
44
+ worker results. Individual lifecycle skills may adopt the contract
45
+ incrementally; their own reviewed process contracts remain authoritative until
46
+ that wiring is explicit.
47
+
28
48
  ### Orchestrator
29
49
 
30
50
  The root `oat-project-implement` workflow resolves project state, chooses Tier
@@ -11,6 +11,7 @@ Use this section when you want to choose the right OAT skill for a task. If you
11
11
 
12
12
  - [Writing Skills](../../contributing/skills.md) - Contributor guide to skill authoring, contracts, and governance.
13
13
  - [Docs Workflows](../../docs-tooling/workflows.md) - How docs CLI helpers and docs skills work together.
14
+ - [Repo Improve](repo-improve.md) - Source modes, external-plan boundaries, optional tracking, and OAT import handoff.
14
15
 
15
16
  ## Key Skills by Use Case
16
17
 
@@ -23,6 +24,7 @@ Use this section when you want to choose the right OAT skill for a task. If you
23
24
  - Run or receive reviews: `oat-project-review-provide`, `oat-project-review-receive`, or the non-project review variants
24
25
  - Capture a scoped, shippable backlog item: `oat-pjm-add-backlog-item` directly when the work is already scoped, or `oat-brainstorm` when the thought hasn't converged yet — the brainstorm dispatcher's "scoped backlog item" destination pre-fills the title / description / acceptance criteria / scope estimate / priority from the conversation and then runs `oat-pjm-add-backlog-item` with confirmed inputs
25
26
  - Manage the repo backlog and reference docs: `oat-pjm-update-repo-reference`, `oat-pjm-review-backlog`
27
+ - Turn a repo audit, maintainability review, backlog review, backlog directory, or backlog item into standalone external implementation plans: `oat-repo-improve`. Plans land under `.oat/repo/reference/external-plans/`; execute them directly or optionally pass one to `oat-project-import-plan` for tracked OAT execution.
26
28
  - Work on docs surfaces: `authoring-docs` (general documentation baseline), `oat-docs-authoring` (targeted OAT/Fumadocs authoring), `oat-docs-bootstrap` (guided bootstrap of a new docs app), `oat-docs-analyze`, `oat-docs-apply`, and `oat-project-document`
27
29
  - Generate a shipping digest or scheduled recap: `oat-wrap-up`
28
30
  - Research a topic in depth: `deep-research`
@@ -99,6 +101,7 @@ Use this section when you want to choose the right OAT skill for a task. If you
99
101
  - `oat-review-receive-remote`
100
102
  - `oat-repo-knowledge-index`
101
103
  - `oat-repo-maintainability-review`
104
+ - `oat-repo-improve`
102
105
  - `oat-pjm-add-backlog-item`
103
106
  - `oat-pjm-update-repo-reference`
104
107
  - `oat-pjm-review-backlog`
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: Repo Improve
3
+ description: 'Turn repository audits, maintainability reviews, and backlog sources into standalone external implementation plans.'
4
+ ---
5
+
6
+ # Repo Improve
7
+
8
+ Use `oat-repo-improve` when the desired output is an executable implementation plan rather than another analysis report. Every successful run writes one or more standalone plans under `.oat/repo/reference/external-plans/`.
9
+
10
+ ## Choose a source
11
+
12
+ | Source | Use it when |
13
+ | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
14
+ | Repo audit | You need fresh repository reconnaissance and vetted improvement findings. |
15
+ | Maintainability review | A file-backed `oat-repo-maintainability-review` already identifies candidates. Improve verifies selected evidence without repeating the broad audit. |
16
+ | Backlog review | A living backlog review and optional priority alignment already establish value, dependencies, and sequencing. |
17
+ | Backlog directory | You want to start from active items. Substantive backlogs should pass through backlog review and alignment before plan generation. |
18
+ | Backlog item | One existing item needs enough repository investigation to become executable. |
19
+
20
+ With no source argument, the skill probes for available review and backlog artifacts, annotates all five options, and asks which source to use.
21
+
22
+ ## Output boundary
23
+
24
+ External plans are not canonical OAT project `plan.md` files. They contain self-contained context, scope, steps, verification, done criteria, and STOP conditions, but no OAT phase/task IDs or lifecycle bookkeeping.
25
+
26
+ After generation, choose either execution path:
27
+
28
+ - Execute a plan directly as a standalone handoff.
29
+ - Run `oat-project-import-plan <external-plan-path>` to preserve and normalize one plan for tracked OAT execution.
30
+
31
+ Project-sized candidates are split when possible. If inseparable work needs multiple design decisions or lacks one coherent verification boundary, improve recommends an OAT project workflow instead of emitting a mega-plan.
32
+
33
+ ## Optional tracking
34
+
35
+ Plans are always the primary output. Tracking is optional and source-aware:
36
+
37
+ - `--backlog-items` creates missing PJM items for repo-audit or maintainability-review plans. Backlog-backed sources reuse their existing items and add `external_plans` reverse links.
38
+ - `--issues` previews one GitHub issue per plan, checks repository visibility and sensitive content, and requires explicit confirmation before publication. It is useful as a fallback when PJM is not installed.
39
+ - Request both modifiers explicitly to create both forms. Neither implies the other.
40
+
41
+ Failure to publish a backlog item or issue does not invalidate a successfully written plan; the skill reports partial tracking results precisely.
42
+
43
+ ## Orchestration
44
+
45
+ Full repository audits use `oat-dispatch-subagents` for bounded read-only reconnaissance while the root agent retains vetting, prioritization, and plan writing. Dispatch is native-first. Configured project/workflow policy may authorize required CLI or cross-runtime routes; an agent-improvised alternate route requires explicit current-run approval.
@@ -1,6 +1,6 @@
1
1
  {
2
- "cli": "0.1.52",
3
- "docs-config": "0.1.52",
4
- "docs-theme": "0.1.52",
5
- "docs-transforms": "0.1.52"
2
+ "cli": "0.1.54",
3
+ "docs-config": "0.1.54",
4
+ "docs-theme": "0.1.54",
5
+ "docs-transforms": "0.1.54"
6
6
  }
@@ -0,0 +1,254 @@
1
+ ---
2
+ name: oat-dispatch-subagents
3
+ version: 1.1.0
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
+ disable-model-invocation: true
6
+ user-invocable: false
7
+ allowed-tools: Read
8
+ ---
9
+
10
+ # Dispatching OAT Subagents
11
+
12
+ Use this internal contract to delegate bounded work while keeping judgment in
13
+ the calling skill. It standardizes provider selection and launch evidence. It
14
+ does not decide what work should be delegated or synthesize worker results.
15
+
16
+ ## Progress Indicators (User-Facing)
17
+
18
+ This skill is an internal dependency; the calling skill owns the user-facing
19
+ mode and decides whether a sub-banner is useful. When surfacing a distinct
20
+ dispatch wave, use:
21
+
22
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
23
+ OAT ▸ SUBAGENT DISPATCH
24
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25
+
26
+ Do not repeat the banner for every lane. Return a compact selection or blocking
27
+ summary for the caller to incorporate.
28
+
29
+ ## Ownership Boundary
30
+
31
+ The calling skill owns:
32
+
33
+ - decomposition, lane boundaries, and output schemas;
34
+ - user-facing progress, authorization context, and decisions;
35
+ - verification of load-bearing worker claims;
36
+ - cross-lane synthesis, prioritization, and artifact writes.
37
+
38
+ This skill owns:
39
+
40
+ - capability and authorization probing;
41
+ - live catalog evidence and candidate intersection;
42
+ - model, effort, role, route, authority, and deadline selection;
43
+ - launch acceptance, continuation, recovery, and dispatch records.
44
+
45
+ Do not read OAT project state, interpret `pNN-tNN` identifiers, or add phase,
46
+ gate, commit, or worktree policy here. Project workflows must load
47
+ `oat-project-dispatch-subagents`, which adapts those concerns into this
48
+ contract.
49
+
50
+ ## Required Loading
51
+
52
+ Read this file before every OAT-managed subagent dispatch. Resolve the active
53
+ provider first, then read exactly one provider reference:
54
+
55
+ - Claude: `references/provider-claude.md`
56
+ - Codex: `references/provider-codex.md`
57
+ - Cursor: `references/provider-cursor.md`
58
+
59
+ Do not merge provider references into one policy. For an unsupported provider,
60
+ apply this provider-neutral contract and fail closed when exact launch controls
61
+ cannot be established.
62
+
63
+ Read `references/record-schema.md` only when constructing or validating a
64
+ dispatch request, dispatch record, or homogeneous recon-wave record.
65
+
66
+ ## Caller Request Contract
67
+
68
+ Require the caller to provide:
69
+
70
+ - a unique request ID and calling skill;
71
+ - bounded objective and scope;
72
+ - action and role name mapped to a baseline role class;
73
+ - expected output and verification evidence;
74
+ - authority, deadline, escalation conditions, and retry limit;
75
+ - fallback policy and authorization scope;
76
+ - route-selection source for any non-native route;
77
+ - optional resolved dispatch policy or named ceiling.
78
+
79
+ Reject an over-broad request before selection. Every nontrivial request must
80
+ state the exact objective, scope, expected output, verification evidence, and
81
+ conditions that require escalation. Model routing never repairs poor
82
+ decomposition.
83
+
84
+ The optional policy and ceiling are already-resolved inputs. Do not infer where
85
+ they came from or resolve project state to obtain them.
86
+
87
+ ## Capability and Authorization
88
+
89
+ Classify delegation before launch:
90
+
91
+ | State | Meaning | Action |
92
+ | --------------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------------- |
93
+ | `available` | The host exposes a usable launch surface now. | Continue to catalog observation and selection. |
94
+ | `authorization-required` | A usable surface exists but needs user approval or scope grant. | Ask once, preserve the approved scope, then re-probe. |
95
+ | `unresolved-or-unsupported` | No exact usable surface can be established in this environment. | Use only a pre-approved alternate route or block; do not invent syntax. |
96
+
97
+ Authorization-required is not unavailability. Do not silently reduce coverage
98
+ or run expensive work inline merely because one approval question is needed.
99
+ The caller owns the user interaction; this skill returns the question and
100
+ required scope.
101
+
102
+ ## Native-First Route Selection
103
+
104
+ Use these route tiers:
105
+
106
+ 1. **Native same-runtime:** Always the preferred default when it can satisfy
107
+ the resolved role, model, effort, authority, and isolation requirements. It
108
+ needs no additional authorization.
109
+ 2. **Policy-resolved CLI/programmatic or cross-runtime:** Permitted without a
110
+ per-run prompt when configured dispatch policy selected the route. Project
111
+ policy resolved by `oat-project-dispatch-subagents` and configured
112
+ cross-family gates are standing, scope-bound authorization. Some harnesses
113
+ require this tier—for example Cursor task subagents when native model
114
+ availability cannot satisfy the resolved project target.
115
+ 3. **Agent-improvised CLI/programmatic or cross-runtime:** Prohibited unless
116
+ the user explicitly approves the named target and scope for the current
117
+ run. Approval from a prior run, task, branch reset, or materially different
118
+ scope does not carry forward.
119
+
120
+ Availability of a provider CLI, SDK, API, or other programmatic surface is
121
+ capability evidence, not route authorization. The engine must distinguish a
122
+ policy-resolved alternate route from one proposed by the agent. If neither
123
+ configured policy nor current explicit approval authorizes the alternate
124
+ route, use an eligible native route or block.
125
+
126
+ Do not re-prompt for each task or gate when the caller provides a complete
127
+ policy-resolved route and scope. Record `selection_source: policy-resolved`
128
+ with the owning configuration evidence. Use
129
+ `selection_source: explicit-user` for a current-run operator grant and
130
+ `selection_source: native-default` for the preferred native route.
131
+
132
+ ## Dispatch Axes
133
+
134
+ Keep these controls independent in selection and evidence:
135
+
136
+ - dispatch context: root native, nested native, provider CLI/programmatic,
137
+ workflow, gate, or blocked;
138
+ - role or agent definition;
139
+ - model selector and selector granularity;
140
+ - effort or reasoning selector, when exposed;
141
+ - inheritance source and context-fork controls;
142
+ - authority, writable roots, deadline, and retry limit;
143
+ - route and fallback policy.
144
+
145
+ A materialized role may package defaults, but its record must preserve each
146
+ configured axis separately.
147
+
148
+ ## Baseline Role Classes
149
+
150
+ Specific role names are extensible, but map every dispatch to one class:
151
+
152
+ | Class | Default contract |
153
+ | -------------- | --------------------------------------------------------------------------------------------------------------------------------- |
154
+ | `recon` | Read-only, bounded evidence collection. Select an explicit economical target; never silently inherit an expensive root model. |
155
+ | `dossier-lead` | Reconcile dispersed evidence within one declared scope. May coordinate bounded recon only when nesting is supported and approved. |
156
+ | `generator` | Produce a self-contained artifact within caller-declared authority. |
157
+ | `worker` | Execute bounded work with explicit authority, outputs, and verification. |
158
+ | `reviewer` | Perform independent or inherited review exactly as caller policy specifies. |
159
+ | `coordinator` | Coordinate a caller-defined topology without taking over caller synthesis or user dialogue. |
160
+
161
+ Use stronger workers when context, ambiguity, or consequence requires them,
162
+ not merely because many files exist. Keep coherence-critical synthesis and
163
+ cross-scope judgment in the root caller.
164
+
165
+ ## Catalog Evidence
166
+
167
+ A catalog snapshot belongs to one dispatch context. A root native catalog does
168
+ not establish a nested coordinator's catalog, and a provider CLI account
169
+ catalog does not establish native eligibility.
170
+
171
+ Before explicit selection:
172
+
173
+ 1. Observe selectors exposed to the dispatcher that will launch the child.
174
+ 2. Observe role or agent-type selectors when exposed before selection.
175
+ 3. Record catalog source, context, and observation time.
176
+ 4. Intersect configured candidates allowed by policy and ceiling with that
177
+ catalog, preserving exact provider strings.
178
+ 5. Keep volatile observations out of durable configuration unless the user
179
+ explicitly changes the owning configuration.
180
+
181
+ Do not launch a diagnostic child solely to obtain a catalog the provider
182
+ cannot expose before selection. Record the visibility timing instead.
183
+
184
+ ## Full-Information Selection
185
+
186
+ For every dispatch:
187
+
188
+ 1. Validate the caller request and capability state.
189
+ 2. Resolve provider, context, role class, policy, ceiling, and candidates.
190
+ 3. Observe the launching dispatcher's relevant catalogs.
191
+ 4. Compute the exact native intersection.
192
+ 5. Prefer an eligible native route. Otherwise select one policy-resolved or
193
+ explicitly authorized inherited, provider-CLI/programmatic, workflow, gate,
194
+ or blocked route before launch.
195
+ 6. Build the complete redacted payload.
196
+ 7. Record route, selection source, selection reason, candidates, catalog
197
+ source, authority, and deadline.
198
+ 8. Launch once.
199
+ 9. Record launch acceptance separately from child outcome and runtime identity.
200
+
201
+ ```mermaid
202
+ flowchart TD
203
+ A[Validate bounded request] --> B[Observe dispatcher catalogs]
204
+ B --> C[Intersect policy candidates with live selectors]
205
+ C --> D{Satisfactory native target?}
206
+ D -->|Yes| E[Build exact native payload]
207
+ D -->|No| F{Deliberate inheritance allowed?}
208
+ F -->|Yes| G[Build inherited payload]
209
+ F -->|No| H{Exact alternate route selected pre-start?}
210
+ H -->|Yes| I[Build external payload]
211
+ H -->|No| J[Block]
212
+ E --> K[Record then launch once]
213
+ G --> K
214
+ I --> K
215
+ K --> L{Accepted?}
216
+ L -->|No| M[Record pre-start rejection]
217
+ L -->|Yes| N[Record outcome; no replacement]
218
+ ```
219
+
220
+ ## Homogeneous Recon Waves
221
+
222
+ Multiple read-only recon lanes may share one selection record only when all of
223
+ these axes are identical: provider, dispatch context, catalog snapshot,
224
+ selected route, role class, role selector, model, effort, authority, deadline,
225
+ retry limit, and fallback. Include a lane manifest with lane-specific scope,
226
+ acceptance, and outcome.
227
+
228
+ If any axis differs, create separate records. The record-level scope is the
229
+ aggregate wave boundary; each lane may narrow that boundary.
230
+
231
+ ## Acceptance and Recovery
232
+
233
+ - An accepted launch is terminal for automatic replacement eligibility.
234
+ - Completion, failure, timeout, interruption, `BLOCKED`, and contract refusal
235
+ are post-acceptance outcomes; none makes another route eligible.
236
+ - A wrapper failure or payload rejection before child start is a pre-start
237
+ rejection. A new recorded selection is allowed only within caller retry
238
+ policy.
239
+ - Continuing the same accepted child through its valid handle is allowed.
240
+ Record continuation separately and preserve selectors and route.
241
+ - Operator-authorized recovery is a new explicit action, never automatic
242
+ fallback.
243
+ - Runtime identity is optional corroboration. Missing runtime identity does not
244
+ invalidate launcher-owned configured invocation evidence.
245
+
246
+ ## Return Contract
247
+
248
+ Return the structured record plus the child output or blocking diagnostic to
249
+ the caller. Do not write caller artifacts, reinterpret results, or make user
250
+ decisions. The caller verifies claims before depending on them.
251
+
252
+ Use the schema in `references/record-schema.md`. Existing parseable dispatch
253
+ stamps may remain for compatibility, but they do not replace the structured
254
+ record.
@@ -0,0 +1,44 @@
1
+ # Claude Subagent Dispatch
2
+
3
+ Load this reference only when the active provider is Claude. Current
4
+ user-level or repository instructions override model examples in this file.
5
+
6
+ ## Control Surfaces
7
+
8
+ | Surface | Controls | Qualification |
9
+ | ----------------- | ------------------------------------------ | ------------------------------------------------------ |
10
+ | Native agent tool | Agent type plus optional model | Effort may not be exposed on this surface. |
11
+ | Agent definition | Default model in frontmatter | Between explicit call selection and inheritance. |
12
+ | Workflow agent | Agent type, model, and effort when exposed | Use only controls present in the live schema. |
13
+ | `claude -p` | Alias or full model ID plus CLI effort | Verify current CLI help before constructing a route. |
14
+ | Continuation | Existing child handle through message send | Preserves context; a new launch creates another child. |
15
+
16
+ Native model resolution commonly follows explicit call model, agent-definition
17
+ model, then parent/session inheritance. Treat omission as a deliberate
18
+ inheritance selection. Never omit a worker model when inheritance is not the
19
+ recorded policy.
20
+
21
+ ## Native Topology
22
+
23
+ Use economical workers for bounded reconnaissance and stronger workers for
24
+ context-heavy dossiers or subtle decisions. Keep cross-dossier synthesis and
25
+ user dialogue in the root caller. A dossier lead may coordinate bounded recon
26
+ only when the live host supports nesting and the caller declared it.
27
+
28
+ The current nested model enum may be visible before selection while nested
29
+ agent types become visible later. Read what the dispatcher exposes, use only a
30
+ known role from the active contract when a pre-call role list is unavailable,
31
+ and record visibility timing. Do not launch a diagnostic child solely to
32
+ satisfy a universal catalog rule.
33
+
34
+ ## Surface-Aware Selection
35
+
36
+ - Select an exact accepted alias from the native enum for native dispatch.
37
+ - Select a CLI route before launch when a full model ID or explicit effort is
38
+ required and native controls cannot express it.
39
+ - Record selector granularity such as `tier-alias` or `exact-model-id`.
40
+ - Record native effort as `not-exposed`, not globally `not-applicable`.
41
+ - Keep acceptance, outcome, runtime identity, and continuation separate.
42
+
43
+ Verify current `claude --help` before using a CLI route. Preserve the caller's
44
+ authority and construct a self-contained bounded prompt.
@@ -0,0 +1,69 @@
1
+ # Codex Subagent Dispatch
2
+
3
+ Load this reference only when the active provider is Codex. Current user-level
4
+ or repository instructions override model examples in this file.
5
+
6
+ ## Independent Controls
7
+
8
+ Codex may expose independent native controls for:
9
+
10
+ - registered agent type;
11
+ - model and reasoning effort;
12
+ - service tier and forked context;
13
+ - maximum nesting depth;
14
+ - sandbox and scoped writable roots.
15
+
16
+ A materialized role may package defaults, but preserve role, model, effort,
17
+ service tier, fork behavior, and authority as separate configured axes.
18
+
19
+ ## Native Topology
20
+
21
+ When subagents are available, keep judgment in the root caller and delegate
22
+ bounded volume. A dossier lead may dispatch its own recon workers only when the
23
+ effective nesting depth permits it and the caller declared that topology.
24
+
25
+ Before a write-capable launch, verify the minimum scoped writable roots needed
26
+ for the task, shared Git metadata, and managed output. Native nesting does not
27
+ grant filesystem authority.
28
+
29
+ ## Exact Native Selection
30
+
31
+ 1. Read live registered roles and model/effort selectors.
32
+ 2. Read effective depth and sandbox configuration.
33
+ 3. Resolve one configured candidate allowed by policy and ceiling.
34
+ 4. Use the exact registered role as `agent_type` only when guaranteed by the
35
+ live host.
36
+ 5. Use the fork mode allowed by the live schema for explicit overrides.
37
+ 6. Record materialized configuration and live schema as distinct sources.
38
+
39
+ Prefer economical high-effort workers for narrow, independently verifiable
40
+ recon. Move to a context-heavier worker when success depends on reconciling
41
+ dispersed evidence, and to a stronger reasoning route when ambiguity,
42
+ consequence, or adversarial analysis dominates. Do not escalate merely because
43
+ many files must be searched.
44
+
45
+ Native spawn acceptance is configured-invocation evidence. Missing runtime
46
+ model identity does not invalidate an accepted configured payload.
47
+
48
+ Only an actual role-selection rejection before child start permits another
49
+ recorded route. Timeout, interruption, `BLOCKED`, or task failure after
50
+ acceptance does not.
51
+
52
+ ## CLI Route
53
+
54
+ When native dispatch cannot express the complete target and the route is
55
+ selected before launch, use current `codex exec --help` to construct a
56
+ self-contained invocation. A typical read-only shape is:
57
+
58
+ ```sh
59
+ codex exec \
60
+ --ephemeral \
61
+ --sandbox read-only \
62
+ --model '<model>' \
63
+ -c 'model_reasoning_effort="<effort>"' \
64
+ '<self-contained bounded prompt>'
65
+ ```
66
+
67
+ Honor the caller's authorization boundary. Record model, effort, sandbox, and
68
+ route as configured invocation evidence; do not infer runtime identity from a
69
+ successful process alone.
@@ -0,0 +1,61 @@
1
+ # Cursor Subagent Dispatch
2
+
3
+ Load this reference only when the active provider is Cursor. Cursor IDE and
4
+ Cursor CLI are separate harness contexts. Treat every observed catalog as a
5
+ volatile snapshot, never a durable inventory.
6
+
7
+ ## Control Surfaces
8
+
9
+ | Source | Establishes | Does not establish |
10
+ | ---------------------------- | --------------------------------------------------------- | -------------------------------------------------------------- |
11
+ | Native Task/Subagent schema | Roles and opaque selectors for that dispatcher invocation | CLI account eligibility or another dispatcher's native catalog |
12
+ | `cursor-agent --list-models` | Opaque selectors accepted by the account CLI | Native Task eligibility |
13
+ | Cursor UI role configuration | User-selected defaults and role settings | Live root or nested schema without a new observation |
14
+
15
+ Root and nested catalogs are independent, volatile observations. Equality in
16
+ one run does not establish equality in another run or nesting boundary.
17
+
18
+ ## Native Selection
19
+
20
+ 1. Read the native model enum from the dispatcher that will launch the child.
21
+ 2. Intersect configured candidates with that exact snapshot.
22
+ 3. Pass the selected opaque string byte-for-byte.
23
+ 4. Treat an omitted model as deliberate parent inheritance, not generic
24
+ defaulting or evidence that a target was unavailable.
25
+ 5. Record requested selector, acceptance, outcome, and runtime identity
26
+ separately.
27
+
28
+ Do not infer Cursor IDE behavior from a headless CLI surface. Keep bounded
29
+ recon on economical explicit targets and reserve stronger targets for
30
+ context-heavy or consequential work.
31
+
32
+ ## Pre-Start CLI Routes
33
+
34
+ When the current native intersection is absent or unsatisfactory, a caller may
35
+ use a deliberate pre-start CLI route only when:
36
+
37
+ - the caller's fallback policy allows it;
38
+ - the exact CLI selector exists in the account catalog;
39
+ - native mismatch, route, reason, and candidates are recorded before launch;
40
+ - the prompt is self-contained and authority-bounded.
41
+
42
+ Verify current CLI help before use. A typical shape is:
43
+
44
+ ```sh
45
+ cursor-agent \
46
+ --trust \
47
+ --print \
48
+ --model '<exact-opaque-model>' \
49
+ '<self-contained bounded prompt>'
50
+ ```
51
+
52
+ CLI completion proves configured invocation completion. It does not prove an
53
+ inner native selection or runtime model identity.
54
+
55
+ ## Catalog-Mismatch Advisory
56
+
57
+ Report configured candidates missing from the current native catalog, nearby
58
+ native candidates as possible ladder additions, selected route, and the exact
59
+ observation boundary. Do not remove CLI-capable candidates solely because the
60
+ native surface cannot pin them, and do not write observed catalogs into durable
61
+ configuration without explicit user choice.