ultra-builder-pro-cli 3.0.2 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/.ultra-template/contexts/TEMPLATE.md +6 -0
  2. package/CHANGELOG.md +83 -1
  3. package/README.md +126 -36
  4. package/README.zh-CN.md +440 -0
  5. package/adapters/_shared/host-profile.cjs +3 -151
  6. package/adapters/_shared/plugin-core.cjs +57 -0
  7. package/adapters/_shared/runtime-assets.cjs +64 -12
  8. package/adapters/codex.js +3 -6
  9. package/bin/delegate-worker.cjs +2 -345
  10. package/bin/delegate.cjs +3 -530
  11. package/docs/ARCHITECTURE.md +59 -18
  12. package/docs/ARTIFACT-AUTHORITY.md +21 -5
  13. package/docs/DECISIONS.md +31 -10
  14. package/docs/PLUGIN-ISOLATION-CONTRACT.md +28 -12
  15. package/docs/RUNTIME-COMPAT-MATRIX.md +106 -26
  16. package/docs/SKILL-AUTHORING.md +15 -3
  17. package/docs/WORKFLOW-LIFECYCLE.md +83 -29
  18. package/docs/evals/ultra-5-0-journey-results.md +62 -0
  19. package/docs/evals/ultra-5-0-live-acp-conformance.md +93 -0
  20. package/docs/evals/ultra-5-0-route-journeys.md +145 -0
  21. package/package.json +2 -1
  22. package/skills/ultra-change/SKILL.md +30 -4
  23. package/skills/ultra-delegate/SKILL.md +80 -7
  24. package/skills/ultra-delegate/patches/zcode-acp-0.1.0-zcode-0.16.5.patch +184 -0
  25. package/skills/ultra-delegate/references/delegation-contract.md +60 -1
  26. package/skills/ultra-delegate/scripts/acp-conformance.cjs +287 -0
  27. package/skills/ultra-delegate/scripts/acp-driver.cjs +762 -0
  28. package/skills/ultra-delegate/scripts/agent-execution-driver.cjs +320 -0
  29. package/skills/ultra-delegate/scripts/cli-driver.cjs +61 -0
  30. package/skills/ultra-delegate/scripts/delegate-worker.cjs +328 -0
  31. package/skills/ultra-delegate/scripts/delegate.cjs +690 -0
  32. package/skills/ultra-delegate/scripts/host-profile.cjs +267 -0
  33. package/skills/ultra-deliver/SKILL.md +13 -0
  34. package/skills/ultra-dev/SKILL.md +18 -2
  35. package/skills/ultra-init/SKILL.md +12 -0
  36. package/skills/ultra-plan/SKILL.md +21 -3
  37. package/skills/ultra-research/SKILL.md +33 -5
  38. package/skills/ultra-status/SKILL.md +37 -7
  39. package/skills/ultra-status/references/route-contract.md +100 -0
  40. package/skills/ultra-test/SKILL.md +16 -1
  41. /package/{adapters/_shared → skills/ultra-delegate/scripts}/delegate-profiles/kimi-read-only.md +0 -0
  42. /package/{adapters/_shared → skills/ultra-delegate/scripts}/delegate-profiles/kimi-write.md +0 -0
@@ -24,7 +24,7 @@ When workflow-route signals conflict, consumers resolve them in this order:
24
24
  2. the current accepted North Star and the active Change intent;
25
25
  3. the current owner-issued Execution Grant — `session-local` while its conversation
26
26
  activation is live, or a `durable work-package` grant a fresh Agent has stably
27
- verified — its scope, budget, and allowed workflows;
27
+ verified — its exact Change, modes, effects, topology, budget, and stop conditions;
28
28
  4. the task ledger, task acceptance, planned paths, and dependencies;
29
29
  5. the current validated Review SUMMARY verdict;
30
30
  6. current evidence and Test observations;
@@ -42,6 +42,11 @@ scope, or budget, and it cannot promote P2/P3 findings into blockers or reopen a
42
42
  review that returned a current verdict. Historical reviews, progress records, and
43
43
  Hook observations are provenance only.
44
44
 
45
+ The Route Card is a projection of this precedence, not another layer in it. Its Route,
46
+ Mode, Position, Exit condition, Delta, and Next fields are recalculated from the same
47
+ authorities and current observations whenever a public Skill enters, pauses, exits, or
48
+ transitions.
49
+
45
50
  A formal terminal outcome — an accepted result, an owner decision, an external
46
51
  blocker, a review-budget stop, or an abandonment — outranks every Resume, Hook, or
47
52
  Status suggestion that appears to continue the same work. Review stays inside the
@@ -81,11 +86,18 @@ whatever length keeps the owner able to judge:
81
86
  4. **Delta** — what materially changed since the last checkpoint.
82
87
  5. **Reality** — how far the live path actually works; what is still fake, unknown,
83
88
  or unverified.
84
- 6. **Decision needed** — what the owner must decide now; omit the section when
85
- nothing is genuinely blocking.
89
+ 6. **Decision needed** — what the owner must decide now; a Route Card says `none` when
90
+ nothing is genuinely blocking, while a free-form handoff may omit the section.
86
91
  7. **Next bounded action** — the smallest authorized next step.
87
92
  8. **Not done** — what remains owed when stopping or pausing.
88
93
 
94
+ The canonical
95
+ [`UBP Route Card`](../skills/ultra-status/references/route-contract.md#route-card) adds
96
+ four navigation fields — Route, Mode, Position, and Exit condition — around these eight
97
+ semantics. It is emitted output only: it has no canonical project path, never becomes a
98
+ route ledger, and cannot grant continuation. Counts and transport events may explain
99
+ Position or Reality but cannot produce a semantic completion verdict.
100
+
89
101
  A checkpoint is a cognitive interface, not a mechanical stage marker: no line count,
90
102
  token budget, or coverage percentage gates it, and alignment failure ("I don't know
91
103
  what you are doing", or the same concept re-explained repeatedly) stops execution and
@@ -168,6 +180,7 @@ Pure file state uses three mechanisms:
168
180
 
169
181
  A state field records a mechanically checkable fact. Route selection remains a model
170
182
  judgment. Do not add a workflow-position field merely to decide which Skill should run.
183
+ The Route Card is derived each time and is disposable in exactly this sense.
171
184
 
172
185
  At most one Change is active in one worktree. Zero active Changes is valid before a new
173
186
  request and after delivery; completed current tasks may remain active while awaiting
@@ -275,7 +288,9 @@ decisions.
275
288
  After interruption or host change:
276
289
 
277
290
  1. identify the repository root and current `HEAD`;
278
- 2. resolve zero or one active `change_id`, then read `.ultra/tasks.json`;
291
+ 2. resolve zero or one active `change_id`, then read `.ultra/tasks.json`; if authority
292
+ resolution returns a typed conflict or unavailable observation, stop semantic writes
293
+ but keep Status recovery diagnosis reachable without selecting an ambiguous intent;
279
294
  3. select only matching tasks and read the frontier task's full context and closing Resume Note;
280
295
  4. read the Project Brief, accepted North Star, `CONTEXT.md`, relevant decisions, active
281
296
  Change, specifications, and evidence;
@@ -283,7 +298,8 @@ After interruption or host change:
283
298
  6. rely only on ledger task status; preserve any legacy context Status or Complexity as
284
299
  a migration diagnostic, and use the explicit recorded reopen before repairing an
285
300
  invalid completed task's current v2 evidence or task-review bindings;
286
- 7. continue through the next observable acceptance boundary.
301
+ 7. derive a fresh Route Card and continue only through the next observable acceptance
302
+ boundary covered by the current owner instruction or valid Execution Grant.
287
303
 
288
304
  Hooks and the `ubp` executable may be unavailable. Recovery must still work through
289
305
  these files and Git alone.
package/docs/DECISIONS.md CHANGED
@@ -24,6 +24,19 @@ exact grant (see `.ultra/decisions/2026-08-17-ultra-builder-pro-3.0-mode-b.md`);
24
24
  file, status, Hook, or Resume note ever implies activation. Optional Graph/Loop
25
25
  coordination layers own observations only and none is integrated.
26
26
 
27
+ ## Ultra 5.0 workflow projection (accepted 2026-08-25)
28
+
29
+ The owner accepted the 5.0 scope and interaction boundary in
30
+ `.ultra/decisions/2026-08-25-ultra-5-0-scope.md`; the versioned contract is
31
+ `docs/ULTRA-BUILDER-PRO-5.0.zh-CN.md`. One shared Route Contract projects the existing
32
+ owner-checkpoint semantics into every public Skill without adding route state. Research
33
+ has explicit baseline and grant-continuable Change-scoped modes; Change makes
34
+ intake/evidence/reconcile/accepted visible and permits only same-Change non-material
35
+ reconciliation under a valid grant; Plan returns product evidence gaps through Change.
36
+ Host invocation bits remain coarse discovery metadata and every Skill rechecks mode,
37
+ grant, effects, and material checkpoints. Team Pack, remote shared assets, a semantic
38
+ state machine, daemon, and resident ACP service remain outside 5.0.
39
+
27
40
  ## Primary transfer between Agents (r3, accepted 2026-08-17)
28
41
 
29
42
  A work package's canonical writer moves to another Agent only through an
@@ -58,13 +71,13 @@ ownership of route and meaning.
58
71
 
59
72
  ## Three Skill roles
60
73
 
61
- The product exposes eight user workflows, five model-invoked disciplines, and one
62
- router. Public workflows require explicit owner selection by default. Research, Plan,
63
- Dev, Test, and Deliver reconciliation have one narrow exception: an activated
64
- Change-scoped execution grant may let the model select the next covered workflow —
65
- session-local activation in the current conversation, or a stably verified durable
66
- work-package grant. A model discipline needs at least two canonical callers or it is
67
- inlined.
74
+ The product exposes eight owner-invocable public workflows, five model-invoked
75
+ disciplines, and one router. Public modes are `explicit-entry` or
76
+ `grant-continuable`. Scoped Research, same-Change reconciliation, Plan, Dev, Test, and
77
+ Deliver reconciliation may be selected under an activated Change-scoped execution
78
+ grant — session-local activation in the current conversation, or a stably verified
79
+ durable work-package grant. All other public modes stay explicit-entry; Status stays
80
+ owner-invoked and read-only. A model discipline needs at least two canonical callers or it is inlined.
68
81
 
69
82
  This keeps reusable reasoning in one place without turning it into another user-facing
70
83
  route or custom-agent registry.
@@ -136,6 +149,11 @@ Directory position and explicit fields record mechanically checkable facts. The
136
149
  model reads those facts and chooses the next route. There is no persisted “current
137
150
  workflow stage” whose value can override the actual files.
138
151
 
152
+ The `UBP Route Card` is the owner-visible projection of those facts: it adds Route,
153
+ Mode, Position, and Exit condition around the eight accepted checkpoint semantics. It
154
+ is derived at public boundaries, has no canonical path, and provides neither completion
155
+ nor continuation authority.
156
+
139
157
  Task status lives only in the `ultra-task-ledger-v2` row and is read back there. New task
140
158
  contexts do not duplicate it; legacy context Status and Complexity fields remain
141
159
  migration diagnostics and the ledger wins. Tasks retain a stable `change_id` in the
@@ -186,11 +204,14 @@ their repair is authorization scoped to the exact command digest.
186
204
 
187
205
  ## Delegation is a process boundary
188
206
 
189
- `ubp delegate run` starts a supported CLI with an immutable instruction, explicit
190
- permission JSON, and named worktree. Their exact digest-bound sources are embedded in
207
+ The installed `ultra-delegate/scripts/delegate.cjs` starts a supported CLI with an
208
+ immutable instruction, explicit permission JSON, and named worktree. Its exact
209
+ digest-bound sources are embedded in
191
210
  the worker prompt because some native sandboxes correctly deny reads outside the
192
211
  worktree. Files remain the cross-host state; the embedded copy is transport, not another
193
- authority. The parent reads a stable terminal result instead of worker chatter.
212
+ authority. The parent reads a stable terminal result instead of worker chatter. The
213
+ package `ubp delegate` surface is a one-release compatibility import of that same
214
+ launcher, not a second implementation or a runtime installation requirement.
194
215
  Delegation adds no semantic store and no authority. The instruction selects task
195
216
  execution, scoped Research evidence, or aggregate Change review/verification; only task
196
217
  execution requires a task row.
@@ -1,19 +1,25 @@
1
1
  # Plugin isolation contract
2
2
 
3
- Ultra Builder Pro owns a narrow install surface and becomes active only in a project
4
- that contains `.ultra/` or when the owner explicitly invokes an Ultra Skill.
3
+ Ultra Builder Pro owns a narrow install surface. Installation and discovery create no
4
+ project authority. A public workflow becomes active only through an explicit owner
5
+ entry or one mode covered by a currently valid Execution Grant; Hooks separately use
6
+ the presence of `.ultra/` as their idle guard.
5
7
 
6
8
  ## Owned surfaces
7
9
 
8
10
  Per host, Ultra may install:
9
11
 
10
12
  - exactly fourteen managed Skills;
13
+ - the launcher, worker, Host profile, and launch-only profile assets below the managed
14
+ `ultra-delegate/scripts/` Skill directory;
11
15
  - exactly five hook scripts plus `_common.py` and any required wire adapter;
12
16
  - one native plugin manifest or entrypoint;
13
17
  - provenance and managed-ownership markers;
14
18
  - the host's native registry entry where required.
15
19
 
16
- The package also owns `ubp delegate run`, its worker, and rule-side Skill references.
20
+ For one release cycle the package also owns thin `ubp delegate` launcher/worker
21
+ compatibility imports. They execute the Skill-local implementation and contain no
22
+ forked behavior.
17
23
 
18
24
  ## Surfaces Ultra does not own
19
25
 
@@ -29,9 +35,10 @@ Ultra must not create or rewrite:
29
35
 
30
36
  ## Installation lifecycle
31
37
 
32
- Install builds a complete staging tree, marks it managed, writes provenance, then
33
- atomically publishes it. An existing unmanaged target is never overwritten. Reinstall
34
- replaces only the managed tree. Doctor is read-only. Uninstall removes only assets
38
+ Install builds a complete staging tree, including the Skill-local delegation runtime,
39
+ marks it managed, writes provenance, then atomically publishes it. An existing unmanaged
40
+ target is never overwritten. Reinstall replaces only the managed tree. Doctor is
41
+ read-only and reports runner reachability separately. Uninstall removes only assets
35
42
  whose ownership can be proven.
36
43
 
37
44
  Host-owned sidecars must resolve from the same isolation root as `--config-dir`. For
@@ -63,12 +70,21 @@ the owner.
63
70
 
64
71
  ## Activation
65
72
 
66
- Owner-invoked Skills activate only through the host's explicit Skill surface.
67
- Model-invoked Skills may be selected by the host model only as methods inside the
68
- current authorized task. Hooks activate only through host lifecycle registrations.
69
-
70
- One public Skill may recommend another but never launches it. Installation does not
71
- create project authority or start background work.
73
+ Public Skill modes are `explicit-entry`, `grant-continuable`, or read-only `router`.
74
+ Explicit-entry modes activate only through the Host's owner-facing Skill surface.
75
+ Grant-continuable modes may be model-selected only after the loaded Skill verifies the
76
+ same active Change, valid grant, allowed effects, and material checkpoints. A router may
77
+ diagnose read-only state only on explicit owner invocation and creates no continuation
78
+ authority. Model-discipline Skills
79
+ may be selected only as methods inside the current covered workflow.
80
+
81
+ Host invocation metadata is a coarse discovery aid. It cannot express every per-mode
82
+ boundary, so the in-Skill check remains mandatory and Hosts without an equivalent bit
83
+ rely on discriminating descriptions plus that same check. A public Skill may transition
84
+ to another only when a valid grant covers the exact next mode and effects, after showing
85
+ the Route Card; otherwise it stops and recommends the explicit route. Installation does
86
+ not create a grant, launch a workflow, or start background work. Hooks activate only
87
+ through Host lifecycle registrations and retain their independent idle guard.
72
88
 
73
89
  ## Idle behavior
74
90
 
@@ -40,21 +40,34 @@ isolated user-scope installation test.
40
40
 
41
41
  ## Invocation policy
42
42
 
43
- | Role | Owner can route directly | Model can select implicitly |
43
+ | Invocation class | Owner can route directly | Model can select implicitly |
44
44
  |---|---:|---:|
45
- | eight user-invoked Skills | yes | no |
46
- | five model-invoked Skills | no | yes |
47
- | `ultra-status` router | yes | no |
45
+ | `explicit-entry` public mode | yes | no |
46
+ | `grant-continuable` public mode | yes | only under a valid Execution Grant covering that mode |
47
+ | five `model-discipline` Skills | no | as an internal method of a covered workflow |
48
+ | `ultra-status` `router` modes | yes | no; other Skills derive their cards directly from the shared contract |
49
+
50
+ The canonical per-mode map is `PUBLIC_SKILL_INVOCATION_MODES` in
51
+ `adapters/_shared/runtime-assets.cjs`. Init and Delegate are explicit-only. Research has
52
+ explicit `baseline` and grant-continuable `change-scoped`; Change has explicit
53
+ intake/evidence/acceptance and grant-continuable same-Change reconciliation; Deliver has
54
+ grant-continuable reconciliation and explicit finalization. Plan, Dev, and Test modes
55
+ are grant-continuable. Every public mode remains directly owner-invocable.
48
56
 
49
57
  Claude and Grok receive `user-invocable` / `disable-model-invocation` frontmatter.
50
58
  Kimi receives its native equivalent. Codex receives
51
- `policy.allow_implicit_invocation` in `agents/openai.yaml`. OpenCode uses portable
52
- source frontmatter and native discovery, but its current Skill schema has no equivalent
53
- owner/model routing bit: all fourteen Skills remain discoverable and their descriptions
54
- guide model selection. Ultra does not add a semantic interception hook to imitate a
55
- host feature OpenCode does not expose. ZCode likewise discovers all plugin Skills and
56
- relies on their portable descriptions plus the Change-scoped execution grant rather
57
- than a fabricated routing flag.
59
+ `policy.allow_implicit_invocation` in `agents/openai.yaml`. Those Hosts expose only a
60
+ coarse Skill-level bit, so a Skill with any grant-continuable mode is discoverable to the
61
+ model; the loaded Skill must still verify the selected mode, same active `change_id`,
62
+ grant, effects, and material checkpoints. In particular, the coarse bit does not permit
63
+ baseline Research, Change intake/acceptance, or Deliver finalization.
64
+
65
+ OpenCode uses portable source frontmatter and native discovery, but its current Skill
66
+ schema has no equivalent owner/model routing bit: all fourteen Skills remain
67
+ discoverable and their descriptions plus the same in-Skill guard guide selection. Ultra
68
+ does not add a semantic interception hook to imitate a Host feature OpenCode does not
69
+ expose. ZCode likewise discovers all plugin Skills and relies on their portable
70
+ descriptions and runtime guard rather than a fabricated routing flag.
58
71
 
59
72
  ## Hook compatibility
60
73
 
@@ -68,13 +81,52 @@ than a fabricated routing flag.
68
81
 
69
82
  All hooks share the same `.ultra/` idle guard. Wire adapters normalize payload and
70
83
  output fields only; they do not change semantic policy. Codex installation health and
71
- hook activation are distinct: Codex skips newly installed non-managed plugin hooks
72
- until the user reviews and trusts the current definition, so Doctor reports
73
- `hook_activation: user_review_required` without pretending the hook already ran.
74
-
75
- ## Delegation argv
76
-
77
- `adapters/_shared/host-profile.cjs` records current non-interactive invocation for:
84
+ Hook trust are distinct. Codex owns the persisted trust decision, while its plugin CLI
85
+ does not expose that live decision to Ultra. Doctor therefore reports
86
+ `hook_activation: host_managed` with `observable: false`; it claims neither trusted nor
87
+ untrusted and emits no remediation action without an authoritative Host observation.
88
+
89
+ ## Agent execution driver selection
90
+
91
+ | Host | ACP candidate observed locally | Versioned conformance | 5.0 active driver | Fallback reason |
92
+ |---|---|---|---|---|
93
+ | Claude Code | pinned `@agentclientprotocol/claude-agent-acp@0.70.0` stdio adapter | PASS, real provider receipt | ACP when `npx` exists | `acp_command_unavailable` when absent |
94
+ | Codex | pinned `@agentclientprotocol/codex-acp@1.6.2` stdio adapter | PASS, real provider receipt | ACP when `npx` exists | `acp_command_unavailable` when absent |
95
+ | OpenCode | native `opencode acp` stdio server | PASS, real provider receipt | ACP when executable exists | `acp_command_unavailable` when absent |
96
+ | Kimi Code | documented [`kimi acp`](https://moonshotai.github.io/kimi-code/en/reference/kimi-acp.html) stdio server | PASS, real provider receipt | ACP when executable exists | `acp_command_unavailable` when absent |
97
+ | Grok Build | documented [`grok agent stdio`](https://docs.x.ai/build/cli/headless-scripting) | PASS, real provider receipt | ACP when executable exists | `acp_command_unavailable` when absent |
98
+ | ZCode | source-pinned `zcode-acp` v0.1.0 plus digest-bound 0.16.5 patch translating to installed `app-server` | PASS, domestic BigModel provider receipt | ACP when bridge exists and `--ack-experimental` is supplied | `acp_command_unavailable` when absent |
99
+
100
+ Selection is ACP-first only after the exact Host row is `passed` and names a non-empty
101
+ evidence reference: stable protocol v1, stdio, executable availability, read-only,
102
+ bounded write, permission denial,
103
+ cancellation/no-orphan, cwd/diff parity, result parity, and credential/event redaction
104
+ must all hold. Static capability inspection never starts the provider. A candidate,
105
+ binary, help output, SDK version, or successful fake-agent suite alone cannot promote a
106
+ Host. The stable wire contract follows the official
107
+ [ACP v1 schema](https://github.com/agentclientprotocol/agent-client-protocol/blob/main/schema/v1/schema.json);
108
+ unstable v2 features are outside the 5.0 required path.
109
+
110
+ All Driver receipts and terminal results expose the selected driver, ACP capability,
111
+ and fallback reason. Doctor reports the same facts separately from installation health.
112
+ `AcpDriver` stores a bounded redacted `events.jsonl`, never raw protocol messages or
113
+ hidden reasoning. Status re-projects every displayed latest event through that fixed
114
+ safe shape and treats a corrupted journal as unavailable. `CliDriver` bounds
115
+ stdout/stderr while retaining the output tail so the existing exact Ultra result
116
+ extractor remains compatible.
117
+
118
+ During `session/new`, `AcpDriver` may temporarily buffer only the bounded creation-time
119
+ metadata updates emitted by some conforming agents. It rejects message/tool content,
120
+ wrong session identities, more than 32 updates, or more than 256 KiB before the response;
121
+ accepted metadata is exposed only after every buffered `sessionId` matches the created
122
+ session. `ULTRA_DELEGATE_FORCE_CLI=1` is an explicit per-run recovery seam: it selects
123
+ the same bounded CLI result path and records `acp_forced_cli` without changing the
124
+ Host's stored conformance status.
125
+
126
+ ## CLI fallback argv
127
+
128
+ `skills/ultra-delegate/scripts/host-profile.cjs` records current non-interactive
129
+ invocation for:
78
130
 
79
131
  - Claude print mode with structured output and an explicit file-tool allowlist; read-only
80
132
  uses `plan`, while bounded write uses `acceptEdits` without Bash or web tools;
@@ -90,20 +142,34 @@ until the user reviews and trusts the current definition, so Doctor reports
90
142
  camel-case `--disallowedTools` surface used to deny Bash, web, subagents, and (in
91
143
  read-only mode) write tools. The launcher's timeout remains the execution bound.
92
144
 
93
- ZCode 0.16.3 advertises `--max-turns`, `--allowed-tools`, and `--settings` in help but
94
- rejects them at the live root parser. Ultra therefore does not pass those flags. ZCode
95
- headless delegation also requires an explicit CLI model provider; desktop provider
96
- state is not silently copied into `~/.zcode/cli/config.json` because provider choice and
97
- credentials remain owner-controlled.
145
+ The installed ZCode 0.16.5 runtime advertises `--max-turns`, `--allowed-tools`, and
146
+ `--settings` in help but rejects them at the live root parser. Ultra therefore does not
147
+ pass those flags. ZCode headless delegation also requires an explicit CLI model
148
+ provider. Host/runtime identity and provider identity remain separate: the verified
149
+ local path uses ZCode Desktop with the Owner's domestic BigModel Coding Plan provider,
150
+ not international Z.AI OAuth. Ultra's package does not silently copy Desktop credentials;
151
+ the user controls the provider entry in `~/.zcode/cli/config.json`.
98
152
 
99
- On macOS, the shared host profile uses
153
+ On macOS, the Skill-local host profile uses
100
154
  `/Applications/ZCode.app/Contents/Resources/glm/zcode.cjs` when that App-bundled CLI
101
155
  exists, then falls back to `zcode` on `PATH`. `UBP_DELEGATE_ZCODE_BIN` remains an explicit
102
156
  test or operator override; the normal source-to-ZCode path does not require it.
103
157
 
158
+ The ACP bridge is independently installed from `jpalmae/zcode-acp` v0.1.0 at source
159
+ revision `42fe149d4b501469343c01f23ba3801832306d53`, then patched by the shipped
160
+ `zcode-acp-0.1.0-zcode-0.16.5.patch` with SHA-256
161
+ `174dfd0feafe84320556a84b5ae08b10e44c5515fea4992fd1d58af54cee4e3d`. The patch
162
+ answers the `session/requestRuntimePreferences` server request introduced by ZCode
163
+ 0.16.5 before and after session creation. The pinned source plus patch passes the locked
164
+ Rust tests, reproduced RED, patched fake App-server E2E, release build, and real provider
165
+ session before use. It stamps the bridge as
166
+ `zcode-acp 0.1.0+ultra.zcode.0.16.5`; selection requires that marker and an installed
167
+ runtime reporting `0.16.5`. Ultra records both source inputs and ships only the patch; it
168
+ redistributes neither the bridge binary nor any ZCode Desktop bytes.
169
+
104
170
  **ZCode transport maturity is `experimental`** (recorded in
105
- `adapters/_shared/host-profile.cjs`): the App-bundled CLI is a verified-local
106
- surface — it exists, launches, and passed the 2026-08-14 conformance drills — but
171
+ `skills/ultra-delegate/scripts/host-profile.cjs`): the App-bundled CLI is a verified-local
172
+ surface — it exists, launches, and passed the 2026-08-26 conformance drill — but
107
173
  the provider publishes no headless CLI, SDK, A2A, or ZCode Protocol stability
108
174
  contract. Promotion to `supported` requires both official documentation and a
109
175
  full recovery drill; a binary's existence, working help, or zero exit status is
@@ -118,6 +184,20 @@ can present an internal CLI run as the documented ZCode Desktop interactive
118
184
  surface. The documented interactive primary path for ZCode is the Desktop task
119
185
  surface itself, not this headless transport.
120
186
 
187
+ ## Installed delegation runner
188
+
189
+ Every managed plugin contains `ultra-delegate/scripts/delegate.cjs`, its worker, the
190
+ canonical Host profile, all three driver modules, and the Kimi launch-only profiles.
191
+ The loaded Skill resolves
192
+ that directory and invokes Node directly, so a clean plugin install does not require a
193
+ persisted Ultra package binary on `PATH` and never uses `npx` to rediscover Ultra.
194
+ The source-pinned Claude and Codex ACP adapters may themselves run through their exact
195
+ `npx --yes <package>@<version>` profiles. Doctor
196
+ reports `delegation_runner`, `acp_capability`, `agent_execution_driver`, its fallback
197
+ reason, and ZCode maturity separately from Skill discovery and Hooks. The package
198
+ `ubp delegate` surface remains a thin one-release compatibility wrapper around the same
199
+ functions; receipts and recovery commands point to the canonical Skill-local entrypoint.
200
+
121
201
  ### ZCode Desktop Workspace Memory (post-turn host effect)
122
202
 
123
203
  ZCode Desktop ships an optional Workspace Memory feature that extracts project
@@ -7,12 +7,17 @@ owner boundaries; host-specific discovery and invocation policy belong in adapte
7
7
 
8
8
  Choose exactly one role before writing:
9
9
 
10
- - **user-invoked**: a complete owner-selected workflow with a durable outcome;
10
+ - **public workflow**: an owner-invocable workflow with one or more declared modes and
11
+ a durable outcome;
11
12
  - **model-invoked**: a reusable discipline used by at least two canonical workflows;
12
13
  - **router**: read-only diagnosis that recommends the smallest next public route.
13
14
 
14
- A user workflow may recommend but must not invoke another user workflow. A discipline
15
- with only one real caller should be inlined.
15
+ Every public mode is `explicit-entry` or `grant-continuable`. A public workflow may
16
+ continue to another public mode only when a currently valid Execution Grant covers the
17
+ same Change, exact mode, effects, and stop conditions, and only after showing the Route
18
+ Card. Otherwise it stops and recommends the owner-invoked route. Host metadata never
19
+ substitutes for that in-Skill check. A discipline with only one real caller should be
20
+ inlined.
16
21
 
17
22
  ## Portable frontmatter
18
23
 
@@ -42,6 +47,12 @@ Every Skill has one outcome-led title and these semantic sections:
42
47
  ## References
43
48
  ```
44
49
 
50
+ Every public workflow and router also has `## Route modes` with a `Mode | Entry |
51
+ Observable exit | Next` table and references the canonical
52
+ `ultra-status/references/route-contract.md`. Shared card fields, material checkpoints,
53
+ continuation, and degraded recovery live only in that reference; each Skill owns only
54
+ its modes and workflow-specific facts.
55
+
45
56
  User workflows first resolve at most one active `change_id`, then read only matching
46
57
  rows from `.ultra/tasks.json`, the frontier task's `context_file` and Resume Note,
47
58
  `CONTEXT.md`, and relevant decisions. Historical or abandoned rows never become current
@@ -96,6 +107,7 @@ For every changed Skill:
96
107
  3. verify its role metadata on all six hosts;
97
108
  4. test the accepted workflow with representative valid and adversarial inputs;
98
109
  5. confirm no retired runtime vocabulary or host-specific path entered portable text.
110
+ 6. run the Route Contract structural test and inspect the applicable owner journey.
99
111
 
100
112
  The repository's `tests/skill-authoring.test.cjs` and
101
113
  `tests/v026-contract.test.cjs` mechanize the portable parts of this contract.