delegation-layer 0.1.17 → 0.1.18
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/README.md +15 -0
- package/package.json +1 -1
- package/plugins/delegation-layer/.claude-plugin/plugin.json +2 -2
- package/plugins/delegation-layer/.codex-plugin/plugin.json +4 -4
- package/plugins/delegation-layer/skills/agent-integration/SKILL.md +75 -125
- package/plugins/delegation-layer/skills/agent-integration/evals/routing.json +155 -0
- package/plugins/delegation-layer/skills/agent-integration/references/command-reference.md +31 -1
- package/plugins/delegation-layer/skills/agent-integration/references/continuation.md +4 -1
- package/plugins/delegation-layer/skills/agent-integration/references/result-handling.md +14 -7
- package/skills/agent-integration/SKILL.md +75 -125
- package/skills/agent-integration/evals/routing.json +155 -0
- package/skills/agent-integration/references/command-reference.md +31 -1
- package/skills/agent-integration/references/continuation.md +4 -1
- package/skills/agent-integration/references/result-handling.md +14 -7
package/README.md
CHANGED
|
@@ -36,6 +36,21 @@ already use instead of replacing them.
|
|
|
36
36
|
3. Delegation Layer admits one bounded provider turn through the supervisor.
|
|
37
37
|
4. The lead agent collects the sealed result and evidence.
|
|
38
38
|
|
|
39
|
+
## Ask naturally
|
|
40
|
+
|
|
41
|
+
Try “Ask Codex to review this change”, “Get Antigravity’s opinion”, or
|
|
42
|
+
“Have Claude investigate this failure”. The skill routes external collaboration
|
|
43
|
+
through `delegate`, preserves a named destination, and collects task evidence.
|
|
44
|
+
Ordinary native subagents remain available for work inside the current harness,
|
|
45
|
+
even when you name that harness. Ask for a separate session when you want
|
|
46
|
+
Delegate to launch another instance of the same CLI.
|
|
47
|
+
|
|
48
|
+
Skill installation makes this workflow discoverable; it does not force a model
|
|
49
|
+
to choose it over another plugin. Selection depends on the harness, model, and
|
|
50
|
+
loaded instructions. No user rules, settings, or competing plugins are rewritten.
|
|
51
|
+
If an agent bypasses Delegate, that is a selection failure, not proof the
|
|
52
|
+
integration worked.
|
|
53
|
+
|
|
39
54
|
## Install
|
|
40
55
|
|
|
41
56
|
### Recommended for Codex and Claude Code
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delegation-layer",
|
|
3
3
|
"displayName": "Delegation Layer",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "0.1.18",
|
|
5
|
+
"description": "Consult external AI harnesses for reviews, research, implementation, and debate through the bounded, resumable Delegate CLI.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Hesham Karam",
|
|
8
8
|
"url": "https://github.com/hishamkaram"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delegation-layer",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.18",
|
|
4
|
+
"description": "Consult external AI harnesses for reviews, research, implementation, and debate through the bounded, resumable Delegate CLI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Hesham Karam",
|
|
7
7
|
"url": "https://github.com/hishamkaram"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"skills": "./skills/",
|
|
20
20
|
"interface": {
|
|
21
21
|
"displayName": "Delegation Layer",
|
|
22
|
-
"shortDescription": "
|
|
22
|
+
"shortDescription": "Consult external AI harnesses",
|
|
23
23
|
"longDescription": "Routes external agent work through a bounded, resumable CLI with durable evidence and provider-neutral capability handling.",
|
|
24
24
|
"developerName": "Hesham Karam",
|
|
25
25
|
"category": "Productivity",
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
"Bounded execution",
|
|
29
29
|
"Resumable tasks"
|
|
30
30
|
],
|
|
31
|
-
"defaultPrompt": "Use $agent-integration
|
|
31
|
+
"defaultPrompt": "Use $agent-integration to consult another harness or model for review, research, implementation, testing, or debate."
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-integration
|
|
3
|
-
description:
|
|
3
|
+
description: Consult external AI agents and harnesses through Delegate for reviews, research, implementation, testing, second opinions, comparisons, and debates. Use when asked to ask Codex, consult Claude, get Antigravity’s opinion, or assign work to another harness or model, including external collaboration you choose during a task. Not for ordinary native subagents, provider setup, or questions merely about a tool.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Delegation Layer
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
## When to use
|
|
9
|
+
|
|
10
|
+
Use this skill before selecting a provider-specific plugin or launching an
|
|
11
|
+
external harness to do work. Requests such as “ask Codex to review this”,
|
|
12
|
+
“get Antigravity’s opinion”, and “have Claude investigate” are external
|
|
13
|
+
collaboration even when the user never mentions Delegate. The same applies
|
|
14
|
+
when you decide external expertise is useful to fulfill the user's task.
|
|
15
|
+
These names are examples; discover supported destinations through the CLI.
|
|
16
|
+
|
|
17
|
+
Ordinary subagents within the current harness remain available. Naming the
|
|
18
|
+
current harness (for example, “have Claude investigate” while using Claude)
|
|
19
|
+
also permits native delegation unless the user requests a separate session.
|
|
20
|
+
A separate CLI session uses Delegate even when its brand matches yours. A subagent
|
|
21
|
+
or plugin that calls an external harness is still external collaboration and
|
|
22
|
+
uses Delegate. Merely discussing a provider, editing documentation about it,
|
|
23
|
+
or troubleshooting its installation does not trigger delegation. Respect an
|
|
24
|
+
explicit user choice of another integration; this skill does not override it.
|
|
25
|
+
|
|
26
|
+
The local `delegate` CLI is the integration surface for external work. Do not
|
|
27
|
+
replace it with a provider command, a provider-specific plugin, or an API call.
|
|
28
|
+
Do not inspect, authenticate, install, or repair provider CLIs to bypass a
|
|
29
|
+
Delegate blocker.
|
|
14
30
|
|
|
15
31
|
## Rules
|
|
16
32
|
|
|
@@ -19,11 +35,13 @@ and do not replace delegation with a provider's native subagent or team feature.
|
|
|
19
35
|
never installs or repairs the CLI itself. If `delegate` is still missing or
|
|
20
36
|
unusable, report the bootstrap failure and stop; never fall back to a native
|
|
21
37
|
provider command.
|
|
22
|
-
2.
|
|
38
|
+
2. Preserve a named harness or provider, even when the user supplied a natural
|
|
39
|
+
name rather than a provider ID. Use `dispatch --auto` when none was chosen.
|
|
23
40
|
Provider selection, executable checks, compatibility checks, authentication
|
|
24
41
|
gates, and supervisor admission belong inside Delegation Layer.
|
|
25
42
|
3. Give every turn an absolute workspace, a separate state root, an explicit
|
|
26
|
-
permission mode, and a finite budget.
|
|
43
|
+
permission mode, and a finite budget. Preserve a caller-supplied
|
|
44
|
+
`DELEGATE_ROOT`; do not replace it with a temporary directory.
|
|
27
45
|
4. Use `--json` and save the returned `task_id`. Read `admission`, `liveness`,
|
|
28
46
|
`publication`, `status`, `outcome`, `continuation`, `task_record`, `failure`,
|
|
29
47
|
and `error` as separate fields.
|
|
@@ -66,15 +84,18 @@ Do not substitute a provider command.
|
|
|
66
84
|
|
|
67
85
|
### 2. Discover only when useful
|
|
68
86
|
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
If no destination was named, use automatic selection directly. If the user
|
|
88
|
+
named a harness (for example, “Codex”), resolve its exact provider ID from:
|
|
71
89
|
|
|
72
90
|
```sh
|
|
73
91
|
delegate providers --json
|
|
74
92
|
```
|
|
75
93
|
|
|
76
|
-
|
|
77
|
-
|
|
94
|
+
Use the matching catalog ID with `--provider`; do not silently substitute
|
|
95
|
+
`--auto` or another provider. If the name is ambiguous, clarify the intended
|
|
96
|
+
destination. If it is absent, report that this build does not support it.
|
|
97
|
+
The catalog is not proof that a provider is installed, authenticated, or ready.
|
|
98
|
+
If a side-effect-free readiness check is useful,
|
|
78
99
|
run:
|
|
79
100
|
|
|
80
101
|
```sh
|
|
@@ -95,39 +116,17 @@ behavior but is not an independent delegate-owned sandbox. Static discovery
|
|
|
95
116
|
does not prove authentication or live acceptance; use the dispatch or live
|
|
96
117
|
acceptance result for that evidence.
|
|
97
118
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
delegate models --provider PROVIDER_ID --cwd ABSOLUTE_WORKSPACE --json
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Omit `--cwd` to use the current directory. Run discovery only when the caller
|
|
106
|
-
needs a non-default choice; provider defaults are valid. The command uses the
|
|
107
|
-
state-rooted supervisor and a bounded `model-discovery-v1` five-minute native
|
|
108
|
-
inspection to allow first-run provider model/cache initialization. It creates
|
|
109
|
-
inspection evidence without admitting a provider task, and may contact the
|
|
110
|
-
provider CLI. It is advisory and never an admission allowlist. Do not reject a
|
|
111
|
-
requested value merely because discovery did not list it, and do not infer
|
|
112
|
-
per-model effort support from the harness-wide list. If a selected model has
|
|
113
|
-
`efforts: null` or `efforts: []`, omit `--effort` unless the caller explicitly
|
|
114
|
-
requested it; do not invent model aliases or combine options by guessing.
|
|
115
|
-
|
|
116
|
-
The response includes `schema_version`, `command: "models"`, `provider`,
|
|
117
|
-
`observed_at`, `status`, `reason_code`, `complete`, `source`, nullable
|
|
118
|
-
`efforts`, and model rows with exact `id` values plus optional `name`, nullable
|
|
119
|
-
`efforts`, and optional `default_effort`. `complete` describes model
|
|
120
|
-
enumeration, not effort metadata. `null` means effort metadata is unknown;
|
|
121
|
-
`[]` means the provider explicitly reported no choices. Discovery exits `0`
|
|
122
|
-
for `available` or `partial`, `2` for `blocked` or `unavailable`, and `1` for
|
|
123
|
-
`failed`. Preserve a blocked or unavailable discovery result as unresolved;
|
|
124
|
-
defaults remain allowed.
|
|
119
|
+
Keep provider defaults when no model or effort was requested. When an explicit
|
|
120
|
+
choice is needed, read [model and effort guidance](references/command-reference.md#choosing-models-and-effort).
|
|
121
|
+
Pass requested choices through Delegate's public `--model` and `--effort`
|
|
122
|
+
fields; discovery is advisory, never an allowlist.
|
|
125
123
|
|
|
126
124
|
### 3. Prepare separate paths and a finite brief
|
|
127
125
|
|
|
128
126
|
Use an existing task brief when one is supplied. Otherwise create a bounded
|
|
129
127
|
brief file that contains the requested work and its acceptance criteria. Keep
|
|
130
|
-
the state root outside the workspace
|
|
128
|
+
the state root outside the workspace and provider-writable trees (which can
|
|
129
|
+
include the system temporary directory). Use `DELEGATE_ROOT` when supplied:
|
|
131
130
|
|
|
132
131
|
```sh
|
|
133
132
|
STATE_ROOT="${DELEGATE_ROOT:-$HOME/delegation-state}"
|
|
@@ -148,8 +147,8 @@ observation and continuation.
|
|
|
148
147
|
|
|
149
148
|
### 4. Dispatch one bounded turn
|
|
150
149
|
|
|
151
|
-
Use automatic selection unless the user
|
|
152
|
-
For a named provider, replace `--auto` with `--provider PROVIDER_ID`; never
|
|
150
|
+
Use automatic selection unless the user named a destination.
|
|
151
|
+
For a named harness or provider resolved in step 2, replace `--auto` with `--provider PROVIDER_ID`; never
|
|
153
152
|
combine the two:
|
|
154
153
|
|
|
155
154
|
```sh
|
|
@@ -174,15 +173,6 @@ independent. Do not configure Pueue or wait for one task before dispatching the
|
|
|
174
173
|
next solely to serialize ordinary work. Inspect each returned task separately
|
|
175
174
|
with `status` and `collect`.
|
|
176
175
|
|
|
177
|
-
When an explicit selection is supplied, pass it through the public fields:
|
|
178
|
-
`--model MODEL` and `--effort VALUE`. Codex encodes effort as its native TOML
|
|
179
|
-
`model_reasoning_effort` setting; Claude and AGY use their native effort flags;
|
|
180
|
-
Pi maps effort to `--thinking`; and OpenCode maps effort to `--variant`. An
|
|
181
|
-
omitted or `default` effort is omitted from native argv. For AGY read-only,
|
|
182
|
-
`--permission read-only` selects the exact native `--sandbox --mode plan` path
|
|
183
|
-
without a bypass. Authorized AGY workspace-write retains its existing native
|
|
184
|
-
bypass. Do not add these native flags yourself.
|
|
185
|
-
|
|
186
176
|
Save the exact `task_id` from the JSON response. The recovery steps below apply
|
|
187
177
|
to parsed dispatch responses. If the CLI rejects the command syntax before
|
|
188
178
|
dispatch (nonzero exit with a usage error and no JSON response), correct the
|
|
@@ -220,79 +210,39 @@ copy unrestricted provider output into the control response.
|
|
|
220
210
|
|
|
221
211
|
### 6. Continue a timed out turn
|
|
222
212
|
|
|
223
|
-
When `status` or `collect`
|
|
224
|
-
continuation
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
If `continue` returns an error, use its `failure` and `task_record` fields just
|
|
258
|
-
as for dispatch: when the record is `created`, check the returned successor
|
|
259
|
-
`task_id` with `status`; when it is `not_created`, correct the request only if
|
|
260
|
-
`failure.next_action` is `correct_request`; and when it is `unknown`, stop and
|
|
261
|
-
report the failure. Do not repeat `continue` while successor creation is
|
|
262
|
-
unknown.
|
|
263
|
-
|
|
264
|
-
## JSON decisions
|
|
265
|
-
|
|
266
|
-
The capability projection uses the stable `runtime-capability-v1` contract.
|
|
267
|
-
Catalog responses have `verification: "catalog"` and `status: "unknown"`.
|
|
268
|
-
Preflight responses have `verification: "preflight"` and describe static
|
|
269
|
-
readiness. A dispatch response can report `verification: "runtime"` only after
|
|
270
|
-
the supervised runtime probe has observed the required behavior and executable
|
|
271
|
-
identity.
|
|
272
|
-
|
|
273
|
-
Versions and help text are observations. Accept any valid nonempty version
|
|
274
|
-
reported by the CLI; never apply a semantic-version allowlist or web lookup.
|
|
275
|
-
The adapter’s required flags and runtime behavior decide compatibility.
|
|
276
|
-
|
|
277
|
-
Authentication is a separate live gate. `live_acceptance.status` values are
|
|
278
|
-
`not_run`, `passed`, or `blocked`; a blocked authentication prerequisite is
|
|
279
|
-
neutral evidence and must not be relabeled. Report the missing authentication
|
|
280
|
-
prerequisite and stop that attempt; do not retry or authenticate the provider.
|
|
281
|
-
|
|
282
|
-
The task response separates:
|
|
283
|
-
|
|
284
|
-
- `admission`: whether the request was accepted by the durable boundary;
|
|
285
|
-
- `liveness`: the observed supervisor state;
|
|
286
|
-
- `publication`: whether validated evidence was committed or rejected;
|
|
287
|
-
- `outcome`: the terminal authority, when available;
|
|
288
|
-
- `continuation`: whether the exact session can make a linked successor; and
|
|
289
|
-
- `error`: bounded operational diagnostics.
|
|
290
|
-
|
|
291
|
-
See [references/command-reference.md](references/command-reference.md) for
|
|
292
|
-
the command matrix, [references/result-handling.md](references/result-handling.md)
|
|
293
|
-
for decision rules, and [references/continuation.md](references/continuation.md)
|
|
294
|
-
for timeout recovery. The examples and machine-readable checks in `examples/`
|
|
295
|
-
and `evals/` are part of this skill package.
|
|
213
|
+
When `status` or `collect` reports `timed_out`, read
|
|
214
|
+
[continuation and timeout recovery](references/continuation.md). If
|
|
215
|
+
`continuation.resumable` is true, use `continue --task TASK_ID` with the original
|
|
216
|
+
state root and a finite budget, then observe the returned successor ID. Do not
|
|
217
|
+
wait indefinitely for pending publication or restart the task as an unrelated
|
|
218
|
+
dispatch. If continuation is unavailable, report its reason. Apply the same
|
|
219
|
+
`failure` and `task_record` decisions as for dispatch; never repeat an uncertain
|
|
220
|
+
successor creation.
|
|
221
|
+
|
|
222
|
+
## Comparisons, debate, and follow-up
|
|
223
|
+
|
|
224
|
+
Choose a finite scope and number of rounds appropriate to the user's request.
|
|
225
|
+
For independent opinions, dispatch separate briefs to the chosen destinations
|
|
226
|
+
and collect each result. Summarize the relevant findings as task data in the
|
|
227
|
+
next brief; do not forward credentials or unrestricted output. Use a supported
|
|
228
|
+
`continue` for an exact-session follow-up, or a new bounded task for an
|
|
229
|
+
independent question. Preserve which agent supplied each finding, explain
|
|
230
|
+
agreements and disagreements, and stop at the agreed scope or a blocker.
|
|
231
|
+
An external worker should perform its assigned work; do not ask it to recursively
|
|
232
|
+
recruit more agents unless that is explicitly part of the task.
|
|
233
|
+
|
|
234
|
+
## Details when needed
|
|
235
|
+
|
|
236
|
+
- Read [command reference](references/command-reference.md) when choosing
|
|
237
|
+
model/effort options or another public command.
|
|
238
|
+
- Read [result handling](references/result-handling.md) when interpreting
|
|
239
|
+
admission, publication, authentication, errors, or exit codes.
|
|
240
|
+
- Read [continuation](references/continuation.md) for timeout recovery or an
|
|
241
|
+
exact-session follow-up.
|
|
242
|
+
- Use [read-only example](examples/read-only-task.md),
|
|
243
|
+
[write example](examples/workspace-write-task.md), and
|
|
244
|
+
[JSON examples](examples/json-results.md) when constructing a task or parsing
|
|
245
|
+
unfamiliar output. Do not load every reference for a routine dispatch.
|
|
296
246
|
|
|
297
247
|
## Completion report
|
|
298
248
|
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "codex-review",
|
|
6
|
+
"prompt": "Ask Codex to review pricing.py for correctness. Return the finding without editing files.",
|
|
7
|
+
"external": true,
|
|
8
|
+
"provider": "codex:exec",
|
|
9
|
+
"split": "development",
|
|
10
|
+
"native_alternative_for": "codex"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "agy-opinion",
|
|
14
|
+
"prompt": "Get Antigravity\u2019s opinion on the discount calculation in pricing.py. Do not edit files.",
|
|
15
|
+
"external": true,
|
|
16
|
+
"provider": "antigravity:print",
|
|
17
|
+
"split": "development"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "claude-investigate",
|
|
21
|
+
"prompt": "Have Claude investigate why discounted_price(200, 10) returns the wrong value. Do not change files.",
|
|
22
|
+
"external": true,
|
|
23
|
+
"provider": "claude:print",
|
|
24
|
+
"split": "development",
|
|
25
|
+
"native_alternative_for": "claude"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "external-write",
|
|
29
|
+
"prompt": "Ask Codex to fix pricing.py so discounts are percentages. Authorize edits only in this workspace and verify 200 with 10 percent gives 180.",
|
|
30
|
+
"external": true,
|
|
31
|
+
"provider": "codex:exec",
|
|
32
|
+
"split": "development",
|
|
33
|
+
"native_alternative_for": "codex"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "external-testing",
|
|
37
|
+
"prompt": "Have Claude independently test the pricing calculation against the requirement in README.md. Report evidence without editing.",
|
|
38
|
+
"external": true,
|
|
39
|
+
"provider": "claude:print",
|
|
40
|
+
"split": "development",
|
|
41
|
+
"native_alternative_for": "claude"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "external-research",
|
|
45
|
+
"prompt": "Consult another AI harness on how to represent percentage discounts without floating-point surprises. Give one concise recommendation.",
|
|
46
|
+
"external": true,
|
|
47
|
+
"provider": null,
|
|
48
|
+
"split": "development"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "comparison",
|
|
52
|
+
"prompt": "Ask Codex and Claude independently whether pricing.py meets README.md, then compare their findings. No edits.",
|
|
53
|
+
"external": true,
|
|
54
|
+
"provider": [
|
|
55
|
+
"codex:exec",
|
|
56
|
+
"claude:print"
|
|
57
|
+
],
|
|
58
|
+
"split": "validation"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "debate",
|
|
62
|
+
"prompt": "Ask Codex for a critique of pricing.py, then ask Claude to challenge that critique. One round each, no edits.",
|
|
63
|
+
"external": true,
|
|
64
|
+
"provider": [
|
|
65
|
+
"codex:exec",
|
|
66
|
+
"claude:print"
|
|
67
|
+
],
|
|
68
|
+
"split": "validation"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "unavailable-destination",
|
|
72
|
+
"prompt": "Ask the NebulaReview9000 harness to review pricing.py. If it is unavailable, report that; do not substitute another harness.",
|
|
73
|
+
"external": true,
|
|
74
|
+
"provider": "unavailable",
|
|
75
|
+
"split": "validation"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "follow-up",
|
|
79
|
+
"prompt": "Get a second opinion from a separate Codex CLI session on the calculation, then ask that same session one follow-up about the simplest correction. Do not edit.",
|
|
80
|
+
"external": true,
|
|
81
|
+
"provider": "codex:exec",
|
|
82
|
+
"split": "validation"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "local-review",
|
|
86
|
+
"prompt": "Review pricing.py yourself for correctness. Do not consult another harness or change files.",
|
|
87
|
+
"external": false,
|
|
88
|
+
"provider": null,
|
|
89
|
+
"split": "development"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "native-subagent",
|
|
93
|
+
"prompt": "Use an ordinary native subagent within this harness to examine pricing.py if available; otherwise examine it yourself. No external harness and no edits.",
|
|
94
|
+
"external": false,
|
|
95
|
+
"provider": null,
|
|
96
|
+
"split": "development"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "explain-codex",
|
|
100
|
+
"prompt": "Explain what Codex is. Do not run it or ask it to do any work.",
|
|
101
|
+
"external": false,
|
|
102
|
+
"provider": null,
|
|
103
|
+
"split": "development"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "claude-docs",
|
|
107
|
+
"prompt": "Add one sentence to README.md saying that Claude can review code. Do not ask it to review anything.",
|
|
108
|
+
"external": false,
|
|
109
|
+
"provider": null,
|
|
110
|
+
"split": "development"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "provider-install",
|
|
114
|
+
"prompt": "Explain how to diagnose a command-not-found error for Codex. Do not install or run it.",
|
|
115
|
+
"external": false,
|
|
116
|
+
"provider": null,
|
|
117
|
+
"split": "development"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "local-fix",
|
|
121
|
+
"prompt": "Fix pricing.py yourself so discounts are percentages. No external consultation.",
|
|
122
|
+
"external": false,
|
|
123
|
+
"provider": null,
|
|
124
|
+
"split": "development"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "agy-question",
|
|
128
|
+
"prompt": "What does a read-only mode mean in an AI coding tool such as Antigravity? Answer conceptually without invoking it.",
|
|
129
|
+
"external": false,
|
|
130
|
+
"provider": null,
|
|
131
|
+
"split": "validation"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "quote-request",
|
|
135
|
+
"prompt": "In README.md, quote the example sentence \"Ask Codex to review this\" as documentation. Do not execute the example.",
|
|
136
|
+
"external": false,
|
|
137
|
+
"provider": null,
|
|
138
|
+
"split": "validation"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "compare-tools",
|
|
142
|
+
"prompt": "Explain the difference between a CLI and a plugin. Mention Claude and Codex as examples, without consulting them.",
|
|
143
|
+
"external": false,
|
|
144
|
+
"provider": null,
|
|
145
|
+
"split": "validation"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "local-test",
|
|
149
|
+
"prompt": "Check the discount function yourself against README.md and report the result. No other agents.",
|
|
150
|
+
"external": false,
|
|
151
|
+
"provider": null,
|
|
152
|
+
"split": "validation"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
@@ -28,7 +28,7 @@ Dispatch flags:
|
|
|
28
28
|
- `--permission read-only|workspace-write`: read-only investigation or authorized unattended write execution, including commands (not independent containment);
|
|
29
29
|
- `--budget DURATION`: finite turn budget;
|
|
30
30
|
- `--auto`: let the CLI select a ready provider;
|
|
31
|
-
- `--provider ID`:
|
|
31
|
+
- `--provider ID`: preserve the caller’s named harness or provider, resolved through the catalog;
|
|
32
32
|
- `--model MODEL` and `--effort VALUE`: optional provider-advertised choices;
|
|
33
33
|
Codex maps effort to TOML `model_reasoning_effort`, while Claude and AGY
|
|
34
34
|
pass native effort flags; Pi maps effort to `--thinking`; OpenCode maps it to
|
|
@@ -48,3 +48,33 @@ Continuation flags:
|
|
|
48
48
|
- `--task TASK`: predecessor task ID;
|
|
49
49
|
- `--brief FILE`: optional new follow-up instruction;
|
|
50
50
|
- `--budget DURATION`, `--model MODEL`, and `--effort VALUE`: optional overrides.
|
|
51
|
+
|
|
52
|
+
## Choosing models and effort
|
|
53
|
+
|
|
54
|
+
If the caller needs an explicit model or effort, use the implemented native
|
|
55
|
+
discovery command for that provider:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
delegate models --provider PROVIDER_ID --cwd ABSOLUTE_WORKSPACE --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Omit `--cwd` to use the current directory. Run discovery only when the caller
|
|
62
|
+
needs a non-default choice; provider defaults are valid. The command uses the
|
|
63
|
+
state-rooted supervisor and a bounded `model-discovery-v1` five-minute native
|
|
64
|
+
inspection to allow first-run provider model/cache initialization. It creates
|
|
65
|
+
inspection evidence without admitting a provider task, and may contact the
|
|
66
|
+
provider CLI. It is advisory and never an admission allowlist. Do not reject a
|
|
67
|
+
requested value merely because discovery did not list it, and do not infer
|
|
68
|
+
per-model effort support from the harness-wide list. If a selected model has
|
|
69
|
+
`efforts: null` or `efforts: []`, omit `--effort` unless the caller explicitly
|
|
70
|
+
requested it; do not invent model aliases or combine options by guessing.
|
|
71
|
+
|
|
72
|
+
The response includes `schema_version`, `command: "models"`, `provider`,
|
|
73
|
+
`observed_at`, `status`, `reason_code`, `complete`, `source`, nullable
|
|
74
|
+
`efforts`, and model rows with exact `id` values plus optional `name`, nullable
|
|
75
|
+
`efforts`, and optional `default_effort`. `complete` describes model
|
|
76
|
+
enumeration, not effort metadata. `null` means effort metadata is unknown;
|
|
77
|
+
`[]` means the provider explicitly reported no choices. Discovery exits `0`
|
|
78
|
+
for `available` or `partial`, `2` for `blocked` or `unavailable`, and `1` for
|
|
79
|
+
`failed`. Preserve a blocked or unavailable discovery result as unresolved;
|
|
80
|
+
defaults remain allowed.
|
|
@@ -30,7 +30,10 @@ indefinitely for a publication that the interrupted turn cannot complete.
|
|
|
30
30
|
|
|
31
31
|
The follow-up brief is optional. If it is omitted, Delegation Layer reuses the
|
|
32
32
|
validated predecessor brief. A successful continuation returns a new task ID
|
|
33
|
-
and links it to the predecessor. Observe and collect the new ID separately.
|
|
33
|
+
and links it to the predecessor. Observe and collect the new ID separately. Always retain the original state
|
|
34
|
+
root, even if a returned command hint omits it. Permission is inherited; do not
|
|
35
|
+
add `--permission` to `continue`. Apply the dispatch `task_record` error rules
|
|
36
|
+
in [result handling](result-handling.md) before retrying or observing.
|
|
34
37
|
|
|
35
38
|
`mode` describes the provider contract:
|
|
36
39
|
|
|
@@ -4,10 +4,12 @@ Use the response fields independently. A successful control command is not
|
|
|
4
4
|
the same as a successful provider result.
|
|
5
5
|
|
|
6
6
|
1. Save `task_id` immediately after dispatch or continue.
|
|
7
|
-
2.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
report
|
|
7
|
+
2. For a dispatch or continue error, inspect `task_record` first. When it is
|
|
8
|
+
`created`, observe the returned ID with `status`. When it is `not_created`,
|
|
9
|
+
do not poll; correct the request only if `failure.next_action` is
|
|
10
|
+
`correct_request`, otherwise report and stop. When it is `unknown`, stop and
|
|
11
|
+
report without polling or retrying. Status and collect can report
|
|
12
|
+
`admission: "unknown"` alongside valid terminal evidence for an existing task.
|
|
11
13
|
3. If `status` is `timed_out`, follow the continuation procedure before treating
|
|
12
14
|
pending publication as a reason to wait. `continuation.resumable: true`
|
|
13
15
|
permits a linked successor even when no outcome has been published.
|
|
@@ -19,9 +21,8 @@ the same as a successful provider result.
|
|
|
19
21
|
observe the same task again with a finite watch interval.
|
|
20
22
|
7. If authentication is `blocked`, preserve that neutral state and tell the
|
|
21
23
|
caller what prerequisite is unavailable without inventing a login command.
|
|
22
|
-
8.
|
|
23
|
-
|
|
24
|
-
uncertain task by guessing.
|
|
24
|
+
8. Never relaunch an uncertain task by guessing. Observe only a task whose
|
|
25
|
+
record is known to exist; the `task_record` decision above takes precedence.
|
|
25
26
|
|
|
26
27
|
For `delegate models`, validate the complete JSON envelope before using any
|
|
27
28
|
fact. Treat `available` and `partial` with exit `0` as observations, preserve
|
|
@@ -35,3 +36,9 @@ model is not an execution guarantee.
|
|
|
35
36
|
Exit codes are bounded control signals: `0` is a completed command, `1` is an
|
|
36
37
|
operational error, `2` is an invalid or unsupported request, `3` is a pending
|
|
37
38
|
collection watch, and `4` is a validated rejected outcome.
|
|
39
|
+
|
|
40
|
+
Catalog facts (`verification: "catalog"`) are not runtime proof. Preflight
|
|
41
|
+
checks static readiness; runtime verification requires the supervised probe.
|
|
42
|
+
Versions and help are observations, not semantic-version allowlists.
|
|
43
|
+
Authentication is a separate live gate (`not_run`, `passed`, or `blocked`).
|
|
44
|
+
Report a blocked prerequisite without inventing a login command or retrying.
|
|
@@ -1,16 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-integration
|
|
3
|
-
description:
|
|
3
|
+
description: Consult external AI agents and harnesses through Delegate for reviews, research, implementation, testing, second opinions, comparisons, and debates. Use when asked to ask Codex, consult Claude, get Antigravity’s opinion, or assign work to another harness or model, including external collaboration you choose during a task. Not for ordinary native subagents, provider setup, or questions merely about a tool.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Delegation Layer
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
## When to use
|
|
9
|
+
|
|
10
|
+
Use this skill before selecting a provider-specific plugin or launching an
|
|
11
|
+
external harness to do work. Requests such as “ask Codex to review this”,
|
|
12
|
+
“get Antigravity’s opinion”, and “have Claude investigate” are external
|
|
13
|
+
collaboration even when the user never mentions Delegate. The same applies
|
|
14
|
+
when you decide external expertise is useful to fulfill the user's task.
|
|
15
|
+
These names are examples; discover supported destinations through the CLI.
|
|
16
|
+
|
|
17
|
+
Ordinary subagents within the current harness remain available. Naming the
|
|
18
|
+
current harness (for example, “have Claude investigate” while using Claude)
|
|
19
|
+
also permits native delegation unless the user requests a separate session.
|
|
20
|
+
A separate CLI session uses Delegate even when its brand matches yours. A subagent
|
|
21
|
+
or plugin that calls an external harness is still external collaboration and
|
|
22
|
+
uses Delegate. Merely discussing a provider, editing documentation about it,
|
|
23
|
+
or troubleshooting its installation does not trigger delegation. Respect an
|
|
24
|
+
explicit user choice of another integration; this skill does not override it.
|
|
25
|
+
|
|
26
|
+
The local `delegate` CLI is the integration surface for external work. Do not
|
|
27
|
+
replace it with a provider command, a provider-specific plugin, or an API call.
|
|
28
|
+
Do not inspect, authenticate, install, or repair provider CLIs to bypass a
|
|
29
|
+
Delegate blocker.
|
|
14
30
|
|
|
15
31
|
## Rules
|
|
16
32
|
|
|
@@ -19,11 +35,13 @@ and do not replace delegation with a provider's native subagent or team feature.
|
|
|
19
35
|
never installs or repairs the CLI itself. If `delegate` is still missing or
|
|
20
36
|
unusable, report the bootstrap failure and stop; never fall back to a native
|
|
21
37
|
provider command.
|
|
22
|
-
2.
|
|
38
|
+
2. Preserve a named harness or provider, even when the user supplied a natural
|
|
39
|
+
name rather than a provider ID. Use `dispatch --auto` when none was chosen.
|
|
23
40
|
Provider selection, executable checks, compatibility checks, authentication
|
|
24
41
|
gates, and supervisor admission belong inside Delegation Layer.
|
|
25
42
|
3. Give every turn an absolute workspace, a separate state root, an explicit
|
|
26
|
-
permission mode, and a finite budget.
|
|
43
|
+
permission mode, and a finite budget. Preserve a caller-supplied
|
|
44
|
+
`DELEGATE_ROOT`; do not replace it with a temporary directory.
|
|
27
45
|
4. Use `--json` and save the returned `task_id`. Read `admission`, `liveness`,
|
|
28
46
|
`publication`, `status`, `outcome`, `continuation`, `task_record`, `failure`,
|
|
29
47
|
and `error` as separate fields.
|
|
@@ -66,15 +84,18 @@ Do not substitute a provider command.
|
|
|
66
84
|
|
|
67
85
|
### 2. Discover only when useful
|
|
68
86
|
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
If no destination was named, use automatic selection directly. If the user
|
|
88
|
+
named a harness (for example, “Codex”), resolve its exact provider ID from:
|
|
71
89
|
|
|
72
90
|
```sh
|
|
73
91
|
delegate providers --json
|
|
74
92
|
```
|
|
75
93
|
|
|
76
|
-
|
|
77
|
-
|
|
94
|
+
Use the matching catalog ID with `--provider`; do not silently substitute
|
|
95
|
+
`--auto` or another provider. If the name is ambiguous, clarify the intended
|
|
96
|
+
destination. If it is absent, report that this build does not support it.
|
|
97
|
+
The catalog is not proof that a provider is installed, authenticated, or ready.
|
|
98
|
+
If a side-effect-free readiness check is useful,
|
|
78
99
|
run:
|
|
79
100
|
|
|
80
101
|
```sh
|
|
@@ -95,39 +116,17 @@ behavior but is not an independent delegate-owned sandbox. Static discovery
|
|
|
95
116
|
does not prove authentication or live acceptance; use the dispatch or live
|
|
96
117
|
acceptance result for that evidence.
|
|
97
118
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
delegate models --provider PROVIDER_ID --cwd ABSOLUTE_WORKSPACE --json
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Omit `--cwd` to use the current directory. Run discovery only when the caller
|
|
106
|
-
needs a non-default choice; provider defaults are valid. The command uses the
|
|
107
|
-
state-rooted supervisor and a bounded `model-discovery-v1` five-minute native
|
|
108
|
-
inspection to allow first-run provider model/cache initialization. It creates
|
|
109
|
-
inspection evidence without admitting a provider task, and may contact the
|
|
110
|
-
provider CLI. It is advisory and never an admission allowlist. Do not reject a
|
|
111
|
-
requested value merely because discovery did not list it, and do not infer
|
|
112
|
-
per-model effort support from the harness-wide list. If a selected model has
|
|
113
|
-
`efforts: null` or `efforts: []`, omit `--effort` unless the caller explicitly
|
|
114
|
-
requested it; do not invent model aliases or combine options by guessing.
|
|
115
|
-
|
|
116
|
-
The response includes `schema_version`, `command: "models"`, `provider`,
|
|
117
|
-
`observed_at`, `status`, `reason_code`, `complete`, `source`, nullable
|
|
118
|
-
`efforts`, and model rows with exact `id` values plus optional `name`, nullable
|
|
119
|
-
`efforts`, and optional `default_effort`. `complete` describes model
|
|
120
|
-
enumeration, not effort metadata. `null` means effort metadata is unknown;
|
|
121
|
-
`[]` means the provider explicitly reported no choices. Discovery exits `0`
|
|
122
|
-
for `available` or `partial`, `2` for `blocked` or `unavailable`, and `1` for
|
|
123
|
-
`failed`. Preserve a blocked or unavailable discovery result as unresolved;
|
|
124
|
-
defaults remain allowed.
|
|
119
|
+
Keep provider defaults when no model or effort was requested. When an explicit
|
|
120
|
+
choice is needed, read [model and effort guidance](references/command-reference.md#choosing-models-and-effort).
|
|
121
|
+
Pass requested choices through Delegate's public `--model` and `--effort`
|
|
122
|
+
fields; discovery is advisory, never an allowlist.
|
|
125
123
|
|
|
126
124
|
### 3. Prepare separate paths and a finite brief
|
|
127
125
|
|
|
128
126
|
Use an existing task brief when one is supplied. Otherwise create a bounded
|
|
129
127
|
brief file that contains the requested work and its acceptance criteria. Keep
|
|
130
|
-
the state root outside the workspace
|
|
128
|
+
the state root outside the workspace and provider-writable trees (which can
|
|
129
|
+
include the system temporary directory). Use `DELEGATE_ROOT` when supplied:
|
|
131
130
|
|
|
132
131
|
```sh
|
|
133
132
|
STATE_ROOT="${DELEGATE_ROOT:-$HOME/delegation-state}"
|
|
@@ -148,8 +147,8 @@ observation and continuation.
|
|
|
148
147
|
|
|
149
148
|
### 4. Dispatch one bounded turn
|
|
150
149
|
|
|
151
|
-
Use automatic selection unless the user
|
|
152
|
-
For a named provider, replace `--auto` with `--provider PROVIDER_ID`; never
|
|
150
|
+
Use automatic selection unless the user named a destination.
|
|
151
|
+
For a named harness or provider resolved in step 2, replace `--auto` with `--provider PROVIDER_ID`; never
|
|
153
152
|
combine the two:
|
|
154
153
|
|
|
155
154
|
```sh
|
|
@@ -174,15 +173,6 @@ independent. Do not configure Pueue or wait for one task before dispatching the
|
|
|
174
173
|
next solely to serialize ordinary work. Inspect each returned task separately
|
|
175
174
|
with `status` and `collect`.
|
|
176
175
|
|
|
177
|
-
When an explicit selection is supplied, pass it through the public fields:
|
|
178
|
-
`--model MODEL` and `--effort VALUE`. Codex encodes effort as its native TOML
|
|
179
|
-
`model_reasoning_effort` setting; Claude and AGY use their native effort flags;
|
|
180
|
-
Pi maps effort to `--thinking`; and OpenCode maps effort to `--variant`. An
|
|
181
|
-
omitted or `default` effort is omitted from native argv. For AGY read-only,
|
|
182
|
-
`--permission read-only` selects the exact native `--sandbox --mode plan` path
|
|
183
|
-
without a bypass. Authorized AGY workspace-write retains its existing native
|
|
184
|
-
bypass. Do not add these native flags yourself.
|
|
185
|
-
|
|
186
176
|
Save the exact `task_id` from the JSON response. The recovery steps below apply
|
|
187
177
|
to parsed dispatch responses. If the CLI rejects the command syntax before
|
|
188
178
|
dispatch (nonzero exit with a usage error and no JSON response), correct the
|
|
@@ -220,79 +210,39 @@ copy unrestricted provider output into the control response.
|
|
|
220
210
|
|
|
221
211
|
### 6. Continue a timed out turn
|
|
222
212
|
|
|
223
|
-
When `status` or `collect`
|
|
224
|
-
continuation
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
If `continue` returns an error, use its `failure` and `task_record` fields just
|
|
258
|
-
as for dispatch: when the record is `created`, check the returned successor
|
|
259
|
-
`task_id` with `status`; when it is `not_created`, correct the request only if
|
|
260
|
-
`failure.next_action` is `correct_request`; and when it is `unknown`, stop and
|
|
261
|
-
report the failure. Do not repeat `continue` while successor creation is
|
|
262
|
-
unknown.
|
|
263
|
-
|
|
264
|
-
## JSON decisions
|
|
265
|
-
|
|
266
|
-
The capability projection uses the stable `runtime-capability-v1` contract.
|
|
267
|
-
Catalog responses have `verification: "catalog"` and `status: "unknown"`.
|
|
268
|
-
Preflight responses have `verification: "preflight"` and describe static
|
|
269
|
-
readiness. A dispatch response can report `verification: "runtime"` only after
|
|
270
|
-
the supervised runtime probe has observed the required behavior and executable
|
|
271
|
-
identity.
|
|
272
|
-
|
|
273
|
-
Versions and help text are observations. Accept any valid nonempty version
|
|
274
|
-
reported by the CLI; never apply a semantic-version allowlist or web lookup.
|
|
275
|
-
The adapter’s required flags and runtime behavior decide compatibility.
|
|
276
|
-
|
|
277
|
-
Authentication is a separate live gate. `live_acceptance.status` values are
|
|
278
|
-
`not_run`, `passed`, or `blocked`; a blocked authentication prerequisite is
|
|
279
|
-
neutral evidence and must not be relabeled. Report the missing authentication
|
|
280
|
-
prerequisite and stop that attempt; do not retry or authenticate the provider.
|
|
281
|
-
|
|
282
|
-
The task response separates:
|
|
283
|
-
|
|
284
|
-
- `admission`: whether the request was accepted by the durable boundary;
|
|
285
|
-
- `liveness`: the observed supervisor state;
|
|
286
|
-
- `publication`: whether validated evidence was committed or rejected;
|
|
287
|
-
- `outcome`: the terminal authority, when available;
|
|
288
|
-
- `continuation`: whether the exact session can make a linked successor; and
|
|
289
|
-
- `error`: bounded operational diagnostics.
|
|
290
|
-
|
|
291
|
-
See [references/command-reference.md](references/command-reference.md) for
|
|
292
|
-
the command matrix, [references/result-handling.md](references/result-handling.md)
|
|
293
|
-
for decision rules, and [references/continuation.md](references/continuation.md)
|
|
294
|
-
for timeout recovery. The examples and machine-readable checks in `examples/`
|
|
295
|
-
and `evals/` are part of this skill package.
|
|
213
|
+
When `status` or `collect` reports `timed_out`, read
|
|
214
|
+
[continuation and timeout recovery](references/continuation.md). If
|
|
215
|
+
`continuation.resumable` is true, use `continue --task TASK_ID` with the original
|
|
216
|
+
state root and a finite budget, then observe the returned successor ID. Do not
|
|
217
|
+
wait indefinitely for pending publication or restart the task as an unrelated
|
|
218
|
+
dispatch. If continuation is unavailable, report its reason. Apply the same
|
|
219
|
+
`failure` and `task_record` decisions as for dispatch; never repeat an uncertain
|
|
220
|
+
successor creation.
|
|
221
|
+
|
|
222
|
+
## Comparisons, debate, and follow-up
|
|
223
|
+
|
|
224
|
+
Choose a finite scope and number of rounds appropriate to the user's request.
|
|
225
|
+
For independent opinions, dispatch separate briefs to the chosen destinations
|
|
226
|
+
and collect each result. Summarize the relevant findings as task data in the
|
|
227
|
+
next brief; do not forward credentials or unrestricted output. Use a supported
|
|
228
|
+
`continue` for an exact-session follow-up, or a new bounded task for an
|
|
229
|
+
independent question. Preserve which agent supplied each finding, explain
|
|
230
|
+
agreements and disagreements, and stop at the agreed scope or a blocker.
|
|
231
|
+
An external worker should perform its assigned work; do not ask it to recursively
|
|
232
|
+
recruit more agents unless that is explicitly part of the task.
|
|
233
|
+
|
|
234
|
+
## Details when needed
|
|
235
|
+
|
|
236
|
+
- Read [command reference](references/command-reference.md) when choosing
|
|
237
|
+
model/effort options or another public command.
|
|
238
|
+
- Read [result handling](references/result-handling.md) when interpreting
|
|
239
|
+
admission, publication, authentication, errors, or exit codes.
|
|
240
|
+
- Read [continuation](references/continuation.md) for timeout recovery or an
|
|
241
|
+
exact-session follow-up.
|
|
242
|
+
- Use [read-only example](examples/read-only-task.md),
|
|
243
|
+
[write example](examples/workspace-write-task.md), and
|
|
244
|
+
[JSON examples](examples/json-results.md) when constructing a task or parsing
|
|
245
|
+
unfamiliar output. Do not load every reference for a routine dispatch.
|
|
296
246
|
|
|
297
247
|
## Completion report
|
|
298
248
|
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"name": "codex-review",
|
|
6
|
+
"prompt": "Ask Codex to review pricing.py for correctness. Return the finding without editing files.",
|
|
7
|
+
"external": true,
|
|
8
|
+
"provider": "codex:exec",
|
|
9
|
+
"split": "development",
|
|
10
|
+
"native_alternative_for": "codex"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "agy-opinion",
|
|
14
|
+
"prompt": "Get Antigravity\u2019s opinion on the discount calculation in pricing.py. Do not edit files.",
|
|
15
|
+
"external": true,
|
|
16
|
+
"provider": "antigravity:print",
|
|
17
|
+
"split": "development"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "claude-investigate",
|
|
21
|
+
"prompt": "Have Claude investigate why discounted_price(200, 10) returns the wrong value. Do not change files.",
|
|
22
|
+
"external": true,
|
|
23
|
+
"provider": "claude:print",
|
|
24
|
+
"split": "development",
|
|
25
|
+
"native_alternative_for": "claude"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "external-write",
|
|
29
|
+
"prompt": "Ask Codex to fix pricing.py so discounts are percentages. Authorize edits only in this workspace and verify 200 with 10 percent gives 180.",
|
|
30
|
+
"external": true,
|
|
31
|
+
"provider": "codex:exec",
|
|
32
|
+
"split": "development",
|
|
33
|
+
"native_alternative_for": "codex"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "external-testing",
|
|
37
|
+
"prompt": "Have Claude independently test the pricing calculation against the requirement in README.md. Report evidence without editing.",
|
|
38
|
+
"external": true,
|
|
39
|
+
"provider": "claude:print",
|
|
40
|
+
"split": "development",
|
|
41
|
+
"native_alternative_for": "claude"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "external-research",
|
|
45
|
+
"prompt": "Consult another AI harness on how to represent percentage discounts without floating-point surprises. Give one concise recommendation.",
|
|
46
|
+
"external": true,
|
|
47
|
+
"provider": null,
|
|
48
|
+
"split": "development"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "comparison",
|
|
52
|
+
"prompt": "Ask Codex and Claude independently whether pricing.py meets README.md, then compare their findings. No edits.",
|
|
53
|
+
"external": true,
|
|
54
|
+
"provider": [
|
|
55
|
+
"codex:exec",
|
|
56
|
+
"claude:print"
|
|
57
|
+
],
|
|
58
|
+
"split": "validation"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "debate",
|
|
62
|
+
"prompt": "Ask Codex for a critique of pricing.py, then ask Claude to challenge that critique. One round each, no edits.",
|
|
63
|
+
"external": true,
|
|
64
|
+
"provider": [
|
|
65
|
+
"codex:exec",
|
|
66
|
+
"claude:print"
|
|
67
|
+
],
|
|
68
|
+
"split": "validation"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "unavailable-destination",
|
|
72
|
+
"prompt": "Ask the NebulaReview9000 harness to review pricing.py. If it is unavailable, report that; do not substitute another harness.",
|
|
73
|
+
"external": true,
|
|
74
|
+
"provider": "unavailable",
|
|
75
|
+
"split": "validation"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "follow-up",
|
|
79
|
+
"prompt": "Get a second opinion from a separate Codex CLI session on the calculation, then ask that same session one follow-up about the simplest correction. Do not edit.",
|
|
80
|
+
"external": true,
|
|
81
|
+
"provider": "codex:exec",
|
|
82
|
+
"split": "validation"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "local-review",
|
|
86
|
+
"prompt": "Review pricing.py yourself for correctness. Do not consult another harness or change files.",
|
|
87
|
+
"external": false,
|
|
88
|
+
"provider": null,
|
|
89
|
+
"split": "development"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "native-subagent",
|
|
93
|
+
"prompt": "Use an ordinary native subagent within this harness to examine pricing.py if available; otherwise examine it yourself. No external harness and no edits.",
|
|
94
|
+
"external": false,
|
|
95
|
+
"provider": null,
|
|
96
|
+
"split": "development"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "explain-codex",
|
|
100
|
+
"prompt": "Explain what Codex is. Do not run it or ask it to do any work.",
|
|
101
|
+
"external": false,
|
|
102
|
+
"provider": null,
|
|
103
|
+
"split": "development"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "claude-docs",
|
|
107
|
+
"prompt": "Add one sentence to README.md saying that Claude can review code. Do not ask it to review anything.",
|
|
108
|
+
"external": false,
|
|
109
|
+
"provider": null,
|
|
110
|
+
"split": "development"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "provider-install",
|
|
114
|
+
"prompt": "Explain how to diagnose a command-not-found error for Codex. Do not install or run it.",
|
|
115
|
+
"external": false,
|
|
116
|
+
"provider": null,
|
|
117
|
+
"split": "development"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "local-fix",
|
|
121
|
+
"prompt": "Fix pricing.py yourself so discounts are percentages. No external consultation.",
|
|
122
|
+
"external": false,
|
|
123
|
+
"provider": null,
|
|
124
|
+
"split": "development"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "agy-question",
|
|
128
|
+
"prompt": "What does a read-only mode mean in an AI coding tool such as Antigravity? Answer conceptually without invoking it.",
|
|
129
|
+
"external": false,
|
|
130
|
+
"provider": null,
|
|
131
|
+
"split": "validation"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "quote-request",
|
|
135
|
+
"prompt": "In README.md, quote the example sentence \"Ask Codex to review this\" as documentation. Do not execute the example.",
|
|
136
|
+
"external": false,
|
|
137
|
+
"provider": null,
|
|
138
|
+
"split": "validation"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "compare-tools",
|
|
142
|
+
"prompt": "Explain the difference between a CLI and a plugin. Mention Claude and Codex as examples, without consulting them.",
|
|
143
|
+
"external": false,
|
|
144
|
+
"provider": null,
|
|
145
|
+
"split": "validation"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "local-test",
|
|
149
|
+
"prompt": "Check the discount function yourself against README.md and report the result. No other agents.",
|
|
150
|
+
"external": false,
|
|
151
|
+
"provider": null,
|
|
152
|
+
"split": "validation"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
@@ -28,7 +28,7 @@ Dispatch flags:
|
|
|
28
28
|
- `--permission read-only|workspace-write`: read-only investigation or authorized unattended write execution, including commands (not independent containment);
|
|
29
29
|
- `--budget DURATION`: finite turn budget;
|
|
30
30
|
- `--auto`: let the CLI select a ready provider;
|
|
31
|
-
- `--provider ID`:
|
|
31
|
+
- `--provider ID`: preserve the caller’s named harness or provider, resolved through the catalog;
|
|
32
32
|
- `--model MODEL` and `--effort VALUE`: optional provider-advertised choices;
|
|
33
33
|
Codex maps effort to TOML `model_reasoning_effort`, while Claude and AGY
|
|
34
34
|
pass native effort flags; Pi maps effort to `--thinking`; OpenCode maps it to
|
|
@@ -48,3 +48,33 @@ Continuation flags:
|
|
|
48
48
|
- `--task TASK`: predecessor task ID;
|
|
49
49
|
- `--brief FILE`: optional new follow-up instruction;
|
|
50
50
|
- `--budget DURATION`, `--model MODEL`, and `--effort VALUE`: optional overrides.
|
|
51
|
+
|
|
52
|
+
## Choosing models and effort
|
|
53
|
+
|
|
54
|
+
If the caller needs an explicit model or effort, use the implemented native
|
|
55
|
+
discovery command for that provider:
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
delegate models --provider PROVIDER_ID --cwd ABSOLUTE_WORKSPACE --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Omit `--cwd` to use the current directory. Run discovery only when the caller
|
|
62
|
+
needs a non-default choice; provider defaults are valid. The command uses the
|
|
63
|
+
state-rooted supervisor and a bounded `model-discovery-v1` five-minute native
|
|
64
|
+
inspection to allow first-run provider model/cache initialization. It creates
|
|
65
|
+
inspection evidence without admitting a provider task, and may contact the
|
|
66
|
+
provider CLI. It is advisory and never an admission allowlist. Do not reject a
|
|
67
|
+
requested value merely because discovery did not list it, and do not infer
|
|
68
|
+
per-model effort support from the harness-wide list. If a selected model has
|
|
69
|
+
`efforts: null` or `efforts: []`, omit `--effort` unless the caller explicitly
|
|
70
|
+
requested it; do not invent model aliases or combine options by guessing.
|
|
71
|
+
|
|
72
|
+
The response includes `schema_version`, `command: "models"`, `provider`,
|
|
73
|
+
`observed_at`, `status`, `reason_code`, `complete`, `source`, nullable
|
|
74
|
+
`efforts`, and model rows with exact `id` values plus optional `name`, nullable
|
|
75
|
+
`efforts`, and optional `default_effort`. `complete` describes model
|
|
76
|
+
enumeration, not effort metadata. `null` means effort metadata is unknown;
|
|
77
|
+
`[]` means the provider explicitly reported no choices. Discovery exits `0`
|
|
78
|
+
for `available` or `partial`, `2` for `blocked` or `unavailable`, and `1` for
|
|
79
|
+
`failed`. Preserve a blocked or unavailable discovery result as unresolved;
|
|
80
|
+
defaults remain allowed.
|
|
@@ -30,7 +30,10 @@ indefinitely for a publication that the interrupted turn cannot complete.
|
|
|
30
30
|
|
|
31
31
|
The follow-up brief is optional. If it is omitted, Delegation Layer reuses the
|
|
32
32
|
validated predecessor brief. A successful continuation returns a new task ID
|
|
33
|
-
and links it to the predecessor. Observe and collect the new ID separately.
|
|
33
|
+
and links it to the predecessor. Observe and collect the new ID separately. Always retain the original state
|
|
34
|
+
root, even if a returned command hint omits it. Permission is inherited; do not
|
|
35
|
+
add `--permission` to `continue`. Apply the dispatch `task_record` error rules
|
|
36
|
+
in [result handling](result-handling.md) before retrying or observing.
|
|
34
37
|
|
|
35
38
|
`mode` describes the provider contract:
|
|
36
39
|
|
|
@@ -4,10 +4,12 @@ Use the response fields independently. A successful control command is not
|
|
|
4
4
|
the same as a successful provider result.
|
|
5
5
|
|
|
6
6
|
1. Save `task_id` immediately after dispatch or continue.
|
|
7
|
-
2.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
report
|
|
7
|
+
2. For a dispatch or continue error, inspect `task_record` first. When it is
|
|
8
|
+
`created`, observe the returned ID with `status`. When it is `not_created`,
|
|
9
|
+
do not poll; correct the request only if `failure.next_action` is
|
|
10
|
+
`correct_request`, otherwise report and stop. When it is `unknown`, stop and
|
|
11
|
+
report without polling or retrying. Status and collect can report
|
|
12
|
+
`admission: "unknown"` alongside valid terminal evidence for an existing task.
|
|
11
13
|
3. If `status` is `timed_out`, follow the continuation procedure before treating
|
|
12
14
|
pending publication as a reason to wait. `continuation.resumable: true`
|
|
13
15
|
permits a linked successor even when no outcome has been published.
|
|
@@ -19,9 +21,8 @@ the same as a successful provider result.
|
|
|
19
21
|
observe the same task again with a finite watch interval.
|
|
20
22
|
7. If authentication is `blocked`, preserve that neutral state and tell the
|
|
21
23
|
caller what prerequisite is unavailable without inventing a login command.
|
|
22
|
-
8.
|
|
23
|
-
|
|
24
|
-
uncertain task by guessing.
|
|
24
|
+
8. Never relaunch an uncertain task by guessing. Observe only a task whose
|
|
25
|
+
record is known to exist; the `task_record` decision above takes precedence.
|
|
25
26
|
|
|
26
27
|
For `delegate models`, validate the complete JSON envelope before using any
|
|
27
28
|
fact. Treat `available` and `partial` with exit `0` as observations, preserve
|
|
@@ -35,3 +36,9 @@ model is not an execution guarantee.
|
|
|
35
36
|
Exit codes are bounded control signals: `0` is a completed command, `1` is an
|
|
36
37
|
operational error, `2` is an invalid or unsupported request, `3` is a pending
|
|
37
38
|
collection watch, and `4` is a validated rejected outcome.
|
|
39
|
+
|
|
40
|
+
Catalog facts (`verification: "catalog"`) are not runtime proof. Preflight
|
|
41
|
+
checks static readiness; runtime verification requires the supervised probe.
|
|
42
|
+
Versions and help are observations, not semantic-version allowlists.
|
|
43
|
+
Authentication is a separate live gate (`not_run`, `passed`, or `blocked`).
|
|
44
|
+
Report a blocked prerequisite without inventing a login command or retrying.
|