@open-agent-toolkit/cli 0.1.51 → 0.1.53
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/docs/cli-utilities/configuration.md +1 -1
- package/assets/docs/cli-utilities/tool-packs.md +23 -2
- package/assets/docs/contributing/skills.md +16 -0
- package/assets/docs/reference/cli-reference.md +2 -2
- package/assets/docs/workflows/projects/hill-checkpoints.md +1 -1
- package/assets/docs/workflows/projects/implementation-execution.md +25 -0
- package/assets/docs/workflows/projects/lifecycle.md +9 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-dispatch-subagents/SKILL.md +222 -0
- package/assets/skills/oat-dispatch-subagents/references/provider-claude.md +44 -0
- package/assets/skills/oat-dispatch-subagents/references/provider-codex.md +69 -0
- package/assets/skills/oat-dispatch-subagents/references/provider-cursor.md +61 -0
- package/assets/skills/oat-dispatch-subagents/references/record-schema.md +100 -0
- package/assets/skills/oat-project-dispatch-subagents/SKILL.md +218 -0
- package/assets/skills/oat-project-implement/SKILL.md +104 -30
- package/assets/skills/oat-project-import-plan/SKILL.md +6 -6
- package/assets/skills/oat-project-next/SKILL.md +8 -1
- package/assets/skills/oat-project-plan/SKILL.md +6 -6
- package/assets/skills/oat-project-plan-writing/SKILL.md +13 -10
- package/assets/skills/oat-project-pr-final/SKILL.md +8 -1
- package/assets/skills/oat-project-quick-start/SKILL.md +5 -5
- package/assets/skills/oat-repo-improve/SKILL.md +137 -0
- package/assets/skills/oat-repo-improve/references/audit-playbook.md +130 -0
- package/assets/skills/oat-repo-improve/references/closing-the-loop.md +96 -0
- package/assets/skills/oat-repo-improve/references/plan-template.md +199 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +34 -9
- package/dist/commands/init/tools/shared/skill-manifest.d.ts +2 -2
- package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.js +3 -0
- package/dist/config/oat-config.d.ts +9 -1
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +55 -4
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +7 -3
- package/package.json +2 -2
|
@@ -453,7 +453,7 @@ Workflow preference keys live under the `workflow.*` namespace:
|
|
|
453
453
|
- `workflow.hillCheckpointDefault` — `every` or `final`. Default HiLL checkpoint behavior in `oat-project-implement`: pause after every phase or only after the last phase. When unset, the skill prompts.
|
|
454
454
|
- `workflow.archiveOnComplete` — boolean. Skip the "Archive after completion?" prompt in `oat-project-complete`. When unset, the skill prompts.
|
|
455
455
|
- `workflow.createPrOnComplete` — boolean. Skip the "Open a PR?" prompt in `oat-project-complete`; when true, completion auto-triggers PR creation. When unset, the skill prompts.
|
|
456
|
-
- `workflow.postImplementSequence` — `wait`, `summary`, `pr`, or `docs-pr
|
|
456
|
+
- `workflow.postImplementSequence` — legacy `wait`, `summary`, `pr`, or `docs-pr`, or `{ "preApproval": [...], "postApproval": [...] }`. Legacy values remain strings; structured arrays contain ordered, globally unique `summary`, `document`, and `pr` steps. Pre-approval steps run after final review and before final HiLL approval; post-approval steps run only after that approval. Plain retrieval keeps legacy strings and prints structured values as compact JSON; `--json` returns the raw value.
|
|
457
457
|
- `workflow.reviewExecutionModel` — `subagent`, `inline`, or `fresh-session`. Default final-review execution model in `oat-project-implement`. `subagent` and `inline` run automatically. `fresh-session` is a soft preference: the skill prints guidance to run the review in another session but still offers escape hatches to `subagent` or `inline` if you change your mind. When unset, the skill prompts.
|
|
458
458
|
- `workflow.autoReviewAtHillCheckpoints` — boolean. Automatically run the extra lifecycle review when a HiLL checkpoint is reached. This does not control Tier 1 per-phase `oat-reviewer` gates, which run after each phase in Tier 1 regardless of this setting. When unset, the skill prompts.
|
|
459
459
|
- `workflow.autoNarrowReReviewScope` — boolean. Auto-narrow re-review scope to fix-task commits only in `oat-project-review-provide`. When unset, the skill prompts.
|
|
@@ -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
|
|
@@ -66,7 +66,7 @@ Notable commands introduced in the current CLI surface:
|
|
|
66
66
|
- `oat project complete-state <project-path>` - apply the canonical completed-state mutation to a project's `state.md`; used by `oat-project-complete` during lifecycle closeout
|
|
67
67
|
- `oat project archive [project-path]` - archive a tracked project through the same local move, summary export, and optional S3 upload path used by completion. When omitted, the project path falls back to the active project.
|
|
68
68
|
- `oat repo archive sync [project-name]` - hydrate archived project snapshots from the configured repo-scoped S3 archive into `.oat/projects/archived/`. The old `oat project archive sync` path remains as a deprecated shim.
|
|
69
|
-
- `oat project validate-plan --project-path <path>` - validates `oat_plan_parallel_groups` metadata in `plan.md`; exits non-zero on invalid. See [Implementation Execution](../workflows/projects/implementation-execution.md#
|
|
69
|
+
- `oat project validate-plan --project-path <path>` - validates `oat_plan_parallel_groups` metadata in `plan.md`; exits non-zero on invalid. See [Implementation Execution](../workflows/projects/implementation-execution.md#plan-declared-parallelism).
|
|
70
70
|
- `oat project set-mode` — deprecated no-op. Execution mode is no longer user-selectable; emits a deprecation warning and preserves the `--json` contract.
|
|
71
71
|
- `oat gate review <prompt...>` - run a stateful OAT review through the target registry, parse the produced review artifact, and exit nonzero for configured blocking findings. With `--json`, the result envelope on exit is the canonical completion signal: `status` is `ok` | `blocked` | `review_failed` | `artifact_validation_failed` | `targeting_correlation_failed`, alongside `runId`, `generatedAt`, and `artifactPath` when available. Invoke `oat-project-review-receive` only when all three conditions hold: `status` is `ok` or `blocked`, `receiveEligible` is `true`, and `handoff` is non-null. For `artifact_validation_failed`, correct the artifact and rerun the gate for successful revalidation before receive. `targeting_correlation_failed` sets `receiveEligible: false`; do not run review-receive even if it reports an artifact path. Orchestrators should read the structured result rather than poll the filesystem. The command runs standalone (for example, `--review-scope final`), not only inside `oat-project-implement`. See [Workflow Gates → Gate completion signal](../cli-utilities/workflow-gates.md#gate-completion-signal).
|
|
72
72
|
- `oat gate target set <id> --invocation-model <model|provider-default> --invocation-reasoning-effort <effort|provider-default>` - persist optional configured invocation metadata alongside an exec target without inferring it from the target command.
|
|
@@ -92,7 +92,7 @@ The `workflow.*` namespace holds user-facing workflow preferences that let you a
|
|
|
92
92
|
- `workflow.hillCheckpointDefault` (`every` | `final`) — default HiLL checkpoint behavior in `oat-project-implement`
|
|
93
93
|
- `workflow.archiveOnComplete` (`boolean`) — skip the archive prompt in `oat-project-complete`
|
|
94
94
|
- `workflow.createPrOnComplete` (`boolean`) — skip the "Open a PR?" prompt in `oat-project-complete`
|
|
95
|
-
- `workflow.postImplementSequence` (`wait` | `summary` | `pr` | `docs-pr`) — post-implementation chaining
|
|
95
|
+
- `workflow.postImplementSequence` (legacy `wait` | `summary` | `pr` | `docs-pr`, or structured `{preApproval, postApproval}` arrays) — approval-aware post-implementation chaining
|
|
96
96
|
- `workflow.reviewExecutionModel` (`subagent` | `inline` | `fresh-session`) — default final-review execution model
|
|
97
97
|
- `workflow.autoReviewAtHillCheckpoints` (`boolean`) — auto-run the extra lifecycle review at HiLL checkpoints
|
|
98
98
|
- `workflow.autoNarrowReReviewScope` (`boolean`) — auto-narrow re-review scope to fix-task commits
|
|
@@ -10,7 +10,7 @@ OAT supports two checkpoint classes:
|
|
|
10
10
|
- Workflow phase checkpoints
|
|
11
11
|
- Plan phase checkpoints
|
|
12
12
|
|
|
13
|
-
The [
|
|
13
|
+
The [Phase gate review](reviews.md#phase-review-gate) (`oat_phase_review_gate`) is a separate, non-pausing mechanism — it does not pause on a passing gate and never modifies the HiLL keys below (`oat_hill_completed`, `oat_plan_hill_phases`).
|
|
14
14
|
|
|
15
15
|
## Workflow checkpoints (`state.md`)
|
|
16
16
|
|
|
@@ -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
|
|
@@ -374,6 +394,11 @@ context. An unresolved or verification-failing conflict stops fan-in.
|
|
|
374
394
|
|
|
375
395
|
## Phase Review Gate and HiLL
|
|
376
396
|
|
|
397
|
+
Phase gate review is independent from HiLL: a configured passing gate continues
|
|
398
|
+
automatically, while a HiLL checkpoint pauses for human approval. For the final
|
|
399
|
+
phase, approval-aware post-implementation sequences run pre-approval work only
|
|
400
|
+
after final review and post-approval work only after the recorded approval.
|
|
401
|
+
|
|
377
402
|
After standard review passes and bookkeeping is committed, an enabled
|
|
378
403
|
`oat_phase_review_gate` may run a target-neutral external review for the phase.
|
|
379
404
|
Passing artifacts are still received for durable disposition; blocking
|
|
@@ -84,6 +84,15 @@ This distinction matters during completion: `oat-project-complete` can skip the
|
|
|
84
84
|
|
|
85
85
|
### Auto-review at HiLL checkpoints
|
|
86
86
|
|
|
87
|
+
### Approval-aware post-implementation sequencing
|
|
88
|
+
|
|
89
|
+
`workflow.postImplementSequence` can use the legacy string values or a structured
|
|
90
|
+
`{ preApproval, postApproval }` value. After the final review passes, OAT
|
|
91
|
+
snapshots the effective sequence, runs ordered pre-approval steps, records final
|
|
92
|
+
HiLL approval, and only then runs post-approval steps. The snapshot is
|
|
93
|
+
restart-safe: an incomplete sequence routes back to implementation and resumes
|
|
94
|
+
from its first incomplete step.
|
|
95
|
+
|
|
87
96
|
When `workflow.autoReviewAtHillCheckpoints` is enabled or `plan.md` frontmatter sets `oat_auto_review_at_hill_checkpoints`, completing a HiLL checkpoint automatically runs the extra lifecycle review scoped to every implementation phase not already covered by a passed whole-phase code review, through the just-completed checkpoint. Mid-implementation multi-phase reviews use inclusive phase-range scopes such as `p02-p03`; the final implementation checkpoint uses `code final`. The review uses auto-disposition mode (minors auto-converted to fix tasks, no user prompts). Disabled by default. Legacy `autoReviewAtCheckpoints` and `oat_auto_review_at_checkpoints` are still read as fallbacks. This does not control Tier 1 per-phase `oat-reviewer` gates.
|
|
88
97
|
|
|
89
98
|
### Phase-review setup during planning
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oat-dispatch-subagents
|
|
3
|
+
version: 1.0.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
|
+
- optional resolved dispatch policy or named ceiling.
|
|
77
|
+
|
|
78
|
+
Reject an over-broad request before selection. Every nontrivial request must
|
|
79
|
+
state the exact objective, scope, expected output, verification evidence, and
|
|
80
|
+
conditions that require escalation. Model routing never repairs poor
|
|
81
|
+
decomposition.
|
|
82
|
+
|
|
83
|
+
The optional policy and ceiling are already-resolved inputs. Do not infer where
|
|
84
|
+
they came from or resolve project state to obtain them.
|
|
85
|
+
|
|
86
|
+
## Capability and Authorization
|
|
87
|
+
|
|
88
|
+
Classify delegation before launch:
|
|
89
|
+
|
|
90
|
+
| State | Meaning | Action |
|
|
91
|
+
| --------------------------- | --------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
92
|
+
| `available` | The host exposes a usable launch surface now. | Continue to catalog observation and selection. |
|
|
93
|
+
| `authorization-required` | A usable surface exists but needs user approval or scope grant. | Ask once, preserve the approved scope, then re-probe. |
|
|
94
|
+
| `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. |
|
|
95
|
+
|
|
96
|
+
Authorization-required is not unavailability. Do not silently reduce coverage
|
|
97
|
+
or run expensive work inline merely because one approval question is needed.
|
|
98
|
+
The caller owns the user interaction; this skill returns the question and
|
|
99
|
+
required scope.
|
|
100
|
+
|
|
101
|
+
## Dispatch Axes
|
|
102
|
+
|
|
103
|
+
Keep these controls independent in selection and evidence:
|
|
104
|
+
|
|
105
|
+
- dispatch context: root native, nested native, provider CLI, workflow, gate,
|
|
106
|
+
or blocked;
|
|
107
|
+
- role or agent definition;
|
|
108
|
+
- model selector and selector granularity;
|
|
109
|
+
- effort or reasoning selector, when exposed;
|
|
110
|
+
- inheritance source and context-fork controls;
|
|
111
|
+
- authority, writable roots, deadline, and retry limit;
|
|
112
|
+
- route and fallback policy.
|
|
113
|
+
|
|
114
|
+
A materialized role may package defaults, but its record must preserve each
|
|
115
|
+
configured axis separately.
|
|
116
|
+
|
|
117
|
+
## Baseline Role Classes
|
|
118
|
+
|
|
119
|
+
Specific role names are extensible, but map every dispatch to one class:
|
|
120
|
+
|
|
121
|
+
| Class | Default contract |
|
|
122
|
+
| -------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
123
|
+
| `recon` | Read-only, bounded evidence collection. Select an explicit economical target; never silently inherit an expensive root model. |
|
|
124
|
+
| `dossier-lead` | Reconcile dispersed evidence within one declared scope. May coordinate bounded recon only when nesting is supported and approved. |
|
|
125
|
+
| `generator` | Produce a self-contained artifact within caller-declared authority. |
|
|
126
|
+
| `worker` | Execute bounded work with explicit authority, outputs, and verification. |
|
|
127
|
+
| `reviewer` | Perform independent or inherited review exactly as caller policy specifies. |
|
|
128
|
+
| `coordinator` | Coordinate a caller-defined topology without taking over caller synthesis or user dialogue. |
|
|
129
|
+
|
|
130
|
+
Use stronger workers when context, ambiguity, or consequence requires them,
|
|
131
|
+
not merely because many files exist. Keep coherence-critical synthesis and
|
|
132
|
+
cross-scope judgment in the root caller.
|
|
133
|
+
|
|
134
|
+
## Catalog Evidence
|
|
135
|
+
|
|
136
|
+
A catalog snapshot belongs to one dispatch context. A root native catalog does
|
|
137
|
+
not establish a nested coordinator's catalog, and a provider CLI account
|
|
138
|
+
catalog does not establish native eligibility.
|
|
139
|
+
|
|
140
|
+
Before explicit selection:
|
|
141
|
+
|
|
142
|
+
1. Observe selectors exposed to the dispatcher that will launch the child.
|
|
143
|
+
2. Observe role or agent-type selectors when exposed before selection.
|
|
144
|
+
3. Record catalog source, context, and observation time.
|
|
145
|
+
4. Intersect configured candidates allowed by policy and ceiling with that
|
|
146
|
+
catalog, preserving exact provider strings.
|
|
147
|
+
5. Keep volatile observations out of durable configuration unless the user
|
|
148
|
+
explicitly changes the owning configuration.
|
|
149
|
+
|
|
150
|
+
Do not launch a diagnostic child solely to obtain a catalog the provider
|
|
151
|
+
cannot expose before selection. Record the visibility timing instead.
|
|
152
|
+
|
|
153
|
+
## Full-Information Selection
|
|
154
|
+
|
|
155
|
+
For every dispatch:
|
|
156
|
+
|
|
157
|
+
1. Validate the caller request and capability state.
|
|
158
|
+
2. Resolve provider, context, role class, policy, ceiling, and candidates.
|
|
159
|
+
3. Observe the launching dispatcher's relevant catalogs.
|
|
160
|
+
4. Compute the exact native intersection.
|
|
161
|
+
5. Select one native, inherited, provider-CLI, workflow, gate, or blocked route
|
|
162
|
+
before launch.
|
|
163
|
+
6. Build the complete redacted payload.
|
|
164
|
+
7. Record route, selection reason, candidates, catalog source, authority, and
|
|
165
|
+
deadline.
|
|
166
|
+
8. Launch once.
|
|
167
|
+
9. Record launch acceptance separately from child outcome and runtime identity.
|
|
168
|
+
|
|
169
|
+
```mermaid
|
|
170
|
+
flowchart TD
|
|
171
|
+
A[Validate bounded request] --> B[Observe dispatcher catalogs]
|
|
172
|
+
B --> C[Intersect policy candidates with live selectors]
|
|
173
|
+
C --> D{Satisfactory native target?}
|
|
174
|
+
D -->|Yes| E[Build exact native payload]
|
|
175
|
+
D -->|No| F{Deliberate inheritance allowed?}
|
|
176
|
+
F -->|Yes| G[Build inherited payload]
|
|
177
|
+
F -->|No| H{Exact alternate route selected pre-start?}
|
|
178
|
+
H -->|Yes| I[Build external payload]
|
|
179
|
+
H -->|No| J[Block]
|
|
180
|
+
E --> K[Record then launch once]
|
|
181
|
+
G --> K
|
|
182
|
+
I --> K
|
|
183
|
+
K --> L{Accepted?}
|
|
184
|
+
L -->|No| M[Record pre-start rejection]
|
|
185
|
+
L -->|Yes| N[Record outcome; no replacement]
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Homogeneous Recon Waves
|
|
189
|
+
|
|
190
|
+
Multiple read-only recon lanes may share one selection record only when all of
|
|
191
|
+
these axes are identical: provider, dispatch context, catalog snapshot,
|
|
192
|
+
selected route, role class, role selector, model, effort, authority, deadline,
|
|
193
|
+
retry limit, and fallback. Include a lane manifest with lane-specific scope,
|
|
194
|
+
acceptance, and outcome.
|
|
195
|
+
|
|
196
|
+
If any axis differs, create separate records. The record-level scope is the
|
|
197
|
+
aggregate wave boundary; each lane may narrow that boundary.
|
|
198
|
+
|
|
199
|
+
## Acceptance and Recovery
|
|
200
|
+
|
|
201
|
+
- An accepted launch is terminal for automatic replacement eligibility.
|
|
202
|
+
- Completion, failure, timeout, interruption, `BLOCKED`, and contract refusal
|
|
203
|
+
are post-acceptance outcomes; none makes another route eligible.
|
|
204
|
+
- A wrapper failure or payload rejection before child start is a pre-start
|
|
205
|
+
rejection. A new recorded selection is allowed only within caller retry
|
|
206
|
+
policy.
|
|
207
|
+
- Continuing the same accepted child through its valid handle is allowed.
|
|
208
|
+
Record continuation separately and preserve selectors and route.
|
|
209
|
+
- Operator-authorized recovery is a new explicit action, never automatic
|
|
210
|
+
fallback.
|
|
211
|
+
- Runtime identity is optional corroboration. Missing runtime identity does not
|
|
212
|
+
invalidate launcher-owned configured invocation evidence.
|
|
213
|
+
|
|
214
|
+
## Return Contract
|
|
215
|
+
|
|
216
|
+
Return the structured record plus the child output or blocking diagnostic to
|
|
217
|
+
the caller. Do not write caller artifacts, reinterpret results, or make user
|
|
218
|
+
decisions. The caller verifies claims before depending on them.
|
|
219
|
+
|
|
220
|
+
Use the schema in `references/record-schema.md`. Existing parseable dispatch
|
|
221
|
+
stamps may remain for compatibility, but they do not replace the structured
|
|
222
|
+
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.
|