ultra-builder-pro-cli 0.26.1 → 3.0.2

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 (75) hide show
  1. package/.ultra-template/contexts/TEMPLATE.md +64 -29
  2. package/.ultra-template/north-star.md +36 -30
  3. package/.ultra-template/project-brief.md +28 -0
  4. package/.ultra-template/specs/product.md +4 -0
  5. package/.ultra-template/specs/research-distillate.md +8 -0
  6. package/.ultra-template/tasks.json +1 -0
  7. package/.ultra-template/test-report.json +18 -1
  8. package/CHANGELOG.md +227 -1
  9. package/README.md +161 -59
  10. package/adapters/_shared/host-profile.cjs +68 -12
  11. package/adapters/_shared/plugin-core.cjs +4 -5
  12. package/adapters/_shared/runtime-assets.cjs +11 -2
  13. package/adapters/zcode.js +375 -0
  14. package/bin/delegate-worker.cjs +20 -0
  15. package/bin/delegate.cjs +94 -25
  16. package/bin/install.js +11 -6
  17. package/docs/ARCHITECTURE.md +109 -25
  18. package/docs/ARTIFACT-AUTHORITY.md +204 -30
  19. package/docs/DECISIONS.md +141 -10
  20. package/docs/PHILOSOPHY.md +61 -8
  21. package/docs/PLUGIN-ISOLATION-CONTRACT.md +6 -0
  22. package/docs/RUNTIME-COMPAT-MATRIX.md +106 -13
  23. package/docs/SKILL-AUTHORING.md +14 -9
  24. package/docs/WORKFLOW-LIFECYCLE.md +211 -53
  25. package/docs/evals/adversarial-review-2026-08-14.md +84 -0
  26. package/docs/evals/zcode-automation-2026-08-14.md +103 -0
  27. package/hooks/README.md +31 -3
  28. package/hooks/_common.py +1699 -33
  29. package/hooks/adapters/zcode.py +227 -0
  30. package/hooks/compact_context.py +176 -17
  31. package/hooks/mid_workflow_recall.py +27 -5
  32. package/hooks/post_edit_guard.py +133 -23
  33. package/hooks/session_context.py +722 -11
  34. package/package.json +6 -3
  35. package/skills/ultra-change/SKILL.md +84 -64
  36. package/skills/ultra-change/references/change-contract.md +130 -32
  37. package/skills/ultra-change/references/execution-grant.md +109 -0
  38. package/skills/ultra-change/references/primary-transfer.md +273 -0
  39. package/skills/ultra-change/scripts/validate_primary_transfer.cjs +1928 -0
  40. package/skills/ultra-delegate/SKILL.md +38 -5
  41. package/skills/ultra-delegate/references/delegation-contract.md +21 -1
  42. package/skills/ultra-deliver/SKILL.md +123 -44
  43. package/skills/ultra-deliver/references/baseline-reconciliation.md +5 -3
  44. package/skills/ultra-dev/SKILL.md +173 -43
  45. package/skills/ultra-grilling/SKILL.md +19 -16
  46. package/skills/ultra-grilling/references/reframing.md +7 -3
  47. package/skills/ultra-init/SKILL.md +99 -87
  48. package/skills/ultra-init/references/brownfield-adoption.md +23 -40
  49. package/skills/ultra-init/scripts/init_project.cjs +968 -21
  50. package/skills/ultra-plan/SKILL.md +83 -46
  51. package/skills/ultra-plan/references/task-evidence-v2.md +300 -0
  52. package/skills/ultra-plan/scripts/validate_task_evidence.cjs +859 -0
  53. package/skills/ultra-research/SKILL.md +119 -68
  54. package/skills/ultra-research/references/{03-competitive-landscape.md → 03-alternatives.md} +6 -6
  55. package/skills/ultra-research/references/04-product-strategy.md +11 -2
  56. package/skills/ultra-research/references/21-features-scope.md +8 -0
  57. package/skills/ultra-research/references/22-success-metrics.md +9 -4
  58. package/skills/ultra-research/references/99-synthesis.md +25 -1
  59. package/skills/ultra-research/references/north-star-v2.md +168 -0
  60. package/skills/ultra-research/references/wayfinding.md +50 -0
  61. package/skills/ultra-research/scripts/validate_north_star.cjs +1174 -0
  62. package/skills/ultra-review/SKILL.md +201 -24
  63. package/skills/ultra-review/references/adversarial-evaluation.md +31 -0
  64. package/skills/ultra-review/references/spec.md +5 -0
  65. package/skills/ultra-review/references/unified-schema.md +146 -11
  66. package/skills/ultra-review/references/worker-packet.md +151 -8
  67. package/skills/ultra-review/scripts/review_wait.py +2653 -63
  68. package/skills/ultra-status/SKILL.md +146 -32
  69. package/skills/ultra-tdd/SKILL.md +14 -4
  70. package/skills/ultra-tdd/references/test-execution.md +6 -1
  71. package/skills/ultra-test/SKILL.md +157 -15
  72. package/skills/ultra-test/scripts/validate_review_transport.cjs +549 -0
  73. package/skills/ultra-test/scripts/worktree_digest.cjs +551 -29
  74. package/skills/ultra-think/SKILL.md +5 -10
  75. package/skills/ultra-think/references/interaction-boundary.md +2 -1
package/README.md CHANGED
@@ -1,12 +1,42 @@
1
1
  # Ultra Builder Pro
2
2
 
3
3
  Ultra Builder Pro is a file-first engineering workflow for Claude Code, Codex,
4
- OpenCode, Kimi Code, and Grok Build. It keeps product intent, specifications, task
5
- contracts, evidence, decisions, and recovery notes in the repository, so a different
6
- session or host can continue by reading files and Git.
4
+ OpenCode, Kimi Code, Grok Build, and ZCode. It implements the provider-neutral
5
+ **Ultra Core Protocol**: owner–agent cognitive alignment, per-fact canonical
6
+ authority, explicit session-local or durable work-package grants, exclusive
7
+ verified handover between Agents, typed evidence with recovery, and review that
8
+ terminates within an owner-visible budget. It keeps product
9
+ intent, specifications, task contracts, evidence, decisions, and recovery notes
10
+ in the repository, so a different session or host can continue by reading files
11
+ and Git.
7
12
 
8
13
  The host model remains the engineer. Ultra supplies reusable methods and checkable
9
- artifacts; it does not replace reasoning with a workflow engine.
14
+ artifacts; it does not replace reasoning with a workflow engine. Agent topology —
15
+ one Agent or several, which providers — is the owner's choice at every stage; the
16
+ default is the current Agent continuing alone, and handing the work package's
17
+ writing authority to a different Agent requires an explicit verified transfer
18
+ (OFFER → ACK → RESULT over the repository files and Git).
19
+
20
+ ## Ultra Builder Pro 3.0
21
+
22
+ Version `3.0.2` is the first published release of Ultra as a cognitive-alignment harness for
23
+ real software engineering. It is not a decentralized multi-agent platform and it
24
+ does not prescribe one Agent topology. Instead, it keeps five promises:
25
+
26
+ - establish the owner-accepted North Star before Research becomes a plan or code;
27
+ - let the owner choose one Agent or several, and the provider, at every stage;
28
+ - carry canonical intent, decisions, tasks, evidence, and recovery through files
29
+ under `.ultra/` plus Git so another session or host can resume from the same facts;
30
+ - automate mechanically verifiable authority, permissions, external effects,
31
+ evidence, physical limits, and recovery while leaving meaning and strategy to the
32
+ model and owner; and
33
+ - bound Review and repair so delivery converges instead of turning every observation
34
+ into another automatic implementation loop.
35
+
36
+ The portable protocol and native installation cover Claude Code, Codex, OpenCode,
37
+ Kimi Code, Grok Build, and ZCode. ZCode plugin installation is supported; its
38
+ App-bundled headless delegation transport remains explicitly `experimental` until an
39
+ official stable interface and recovery drill satisfy the support bar.
10
40
 
11
41
  ## Why it exists
12
42
 
@@ -29,14 +59,14 @@ The package installs exactly fourteen Skills in three roles.
29
59
 
30
60
  | Skill | Outcome |
31
61
  |---|---|
32
- | `ultra-init` | Establish the project skeleton and one-line north star |
33
- | `ultra-research` | Verify external claims and refresh specifications |
34
- | `ultra-change` | Reconcile a requested change against current product truth |
62
+ | `ultra-init` | Establish the project skeleton and raw Project Brief |
63
+ | `ultra-research` | Establish an accepted North Star and evidence-backed baseline |
64
+ | `ultra-change` | Reconcile one requested delta against the accepted baseline |
35
65
  | `ultra-plan` | Write tracer-bullet tasks, contexts, dependencies, and seams |
36
66
  | `ultra-dev` | Implement one task through red/green development and six evidence dimensions |
37
67
  | `ultra-test` | Audit whole-system wiring, E2E behavior, performance, and security |
38
68
  | `ultra-deliver` | Reconcile, review, document, and archive a completed Change |
39
- | `ultra-delegate` | Run a bounded instruction through another supported CLI |
69
+ | `ultra-delegate` | Run bounded task work, Research evidence, or aggregate review through another supported CLI |
40
70
 
41
71
  ### Model-invoked disciplines
42
72
 
@@ -51,33 +81,47 @@ The package installs exactly fourteen Skills in three roles.
51
81
  `ultra-status` is the single router. It infers the current route from project files,
52
82
  Git, and installation health without mutating the workflow.
53
83
 
54
- Public workflows are explicitly selected by the owner. One public workflow can
55
- recommend the next one, but does not launch it. Model-invoked disciplines remain
56
- available to the host model and are not separate user routes. The model selects one
57
- when the active task presents its trigger: incomplete intent uses grilling, competing
58
- terms use domain modeling, an accepted seam uses TDD, review-ready evidence uses
59
- review, and a consequential unresolved decision uses think. A host with native bounded
60
- subagents may parallelize review lenses; another host runs the same lens assets
61
- sequentially.
84
+ Public workflows are explicitly selected by the owner by default. Outside a live,
85
+ owner-activated execution grant (session-local, or a durable work-package grant), one public workflow can recommend the
86
+ next one but does not launch it. Inside that grant, the host model may select only
87
+ the covered Research, Plan, Dev, Test, and reconcile-only Deliver routes; Init, Change,
88
+ Delegate, Status, final archive, and every external effect remain owner-selected.
89
+ Model-invoked disciplines remain available to the host model and are not separate user
90
+ routes. The model selects one when the active task presents its trigger: incomplete
91
+ intent uses grilling, competing terms use domain modeling, an accepted seam uses TDD,
92
+ review-ready evidence uses review, and a consequential unresolved decision uses think.
93
+ A host with native bounded subagents may parallelize review lenses; another host runs
94
+ the same lens assets sequentially.
95
+
96
+ Inside `ultra-research`, the first six references are six semantic lenses, not six
97
+ extra Skills: problem validation, opportunity discovery, market assessment,
98
+ alternatives, product strategy, and assumptions validation. `wayfinding.md` chooses
99
+ the smallest dependency-correct path through those and the later evidence lenses.
100
+ Grilling still owns how to ask one missing question, Think owns one consequential
101
+ trade-off, and Domain Modeling owns vocabulary; Research owns the overall question
102
+ map, evidence convergence, owner checkpoints, and baseline promotion.
62
103
 
63
104
  ### What happened to the original Agents
64
105
 
65
- v0.26 does not install a custom `agents/` projection. The old review workers became the
106
+ Version 3.0.2 does not install a custom `agents/` projection. The old review workers became the
66
107
  six focused files under `ultra-review/references/`; review coordination and synthesis
67
108
  belong to the parent `ultra-review` Skill. The old debugger procedure lives under
68
109
  `ultra-dev/references/debugging.md`, and test execution lives under
69
110
  `ultra-tdd/references/test-execution.md`. These are assets of their Skills and therefore
70
- travel to all five hosts. They preserve a bounded role without pretending that every
111
+ travel to all six hosts. They preserve a bounded role without pretending that every
71
112
  host exposes the same custom-agent API.
72
113
 
73
114
  ## Project authority
74
115
 
75
- A new project uses this shape:
116
+ A project after its first accepted Research baseline uses this shape. Immediately after
117
+ Init, `CONTEXT.md` does not exist yet and the North Star/specification files are empty
118
+ skeletons.
76
119
 
77
120
  ```text
78
121
  CONTEXT.md
79
122
  .ultra/
80
123
  ├── .gitignore # ignores only derived Ultra paths
124
+ ├── project-brief.md
81
125
  ├── north-star.md
82
126
  ├── tasks.json
83
127
  ├── test-report.json
@@ -88,15 +132,18 @@ CONTEXT.md
88
132
  │ └── research-distillate.md
89
133
  ├── changes/
90
134
  │ ├── active/<change-id>/{intent.md,delivery.md}
91
- │ └── archive/<change-id>/intent.md
92
- ├── contexts/<task-id>.md
135
+ │ ├── archive/<change-id>/{intent.md,delivery.md}
136
+ │ └── abandoned/<change-id>/intent.md # includes exact Abandonment closure
137
+ ├── contexts/task-<task-id>.md
93
138
  ├── decisions/<decision-id>.md
94
139
  ├── evidence/<task-id>/...
95
- └── research/<run-id>/...
140
+ └── research/<run-id>/{brief.md,<step-id>.md}
96
141
  ```
97
142
 
98
- Canonical semantic facts live in those files. Git provides history, comparison,
99
- rollback, and archive moves. The following are derived and can be deleted or rebuilt:
143
+ The optional `brief.md` is derived navigation; the selected step reports are cited
144
+ evidence, and promoted semantic facts live in the other canonical files. Git provides
145
+ history, comparison, rollback, and archive moves. The following additional paths are
146
+ derived:
100
147
 
101
148
  ```text
102
149
  .ultra/.runtime/
@@ -104,6 +151,12 @@ rollback, and archive moves. The following are derived and can be deleted or reb
104
151
  .ultra/reviews/
105
152
  ```
106
153
 
154
+ `.ultra/.runtime/` and `.ultra/progress/` can be deleted or rebuilt from current
155
+ authority. Retain the exact current strict review session until both Test and Deliver
156
+ have successfully consumed it; only then may that session be garbage-collected. If it
157
+ is lost before both consumers finish, run a fresh Review and Test and never reconstruct
158
+ the old receipt.
159
+
107
160
  See [Artifact Authority](docs/ARTIFACT-AUTHORITY.md) for writer, reader, promotion,
108
161
  staleness, and recovery rules.
109
162
 
@@ -111,13 +164,13 @@ staleness, and recovery rules.
111
164
 
112
165
  | Route | Canonical write | Who consumes it next |
113
166
  |---|---|---|
114
- | `ultra-init` | north star and four specification skeletons; empty task and test ledgers | every later workflow and context Hook |
115
- | `ultra-research` | selected cited reports plus reconciled specifications and distillate | change, plan, and delivery |
116
- | `ultra-change` | one active `intent.md` with exact acceptance, seams, reconciliation, and recovery | plan, dev, test, review, status, delivery |
117
- | `ultra-plan` | `tasks.json`, one context per task, and Planning Posture in the active intent | dev and every resume path |
118
- | `ultra-dev` | source/tests, task evidence, synchronized task/context status, Completion and Resume Note | review, test, status, delivery |
119
- | `ultra-test` | the one current `test-report.json` bound to HEAD and worktree digest | status and delivery |
120
- | `ultra-deliver` | one `delivery.md`, reconciled specs/docs, then the archived Change directory | owner and future Change history |
167
+ | `ultra-init` | raw `project-brief.md`, empty North Star and specification skeletons, and empty task/test ledgers | research, status, and the pre-baseline session Hook fallback |
168
+ | `ultra-research` | accepted North Star, first domain baseline, selected cited reports, reconciled specifications, and distillate | change, plan, and delivery |
169
+ | `ultra-change` | one active `intent.md` with stable `change_id`, Research Disposition, and only the accepted baseline sections touched by that delta; or an exact Abandonment closure before an owner-authorized move | active: research through delivery; abandoned: future Change history and status |
170
+ | `ultra-plan` | append-only `tasks.json` rows for the active `change_id`, one context per task, and Planning Posture in the active intent | dev and every resume path |
171
+ | `ultra-dev` | source/tests, typed task evidence, ledger-only task status, Completion, Task Review, and Resume Note | review, test, status, delivery |
172
+ | `ultra-test` | the one current `test-report.json` bound to Change id, current task ids, intent digest, HEAD, and product-worktree digest | status and delivery |
173
+ | `ultra-deliver` | first reconciled specs/docs, then after a fresh Test snapshot one `delivery.md` and the archived Change directory | owner and future Change history |
121
174
  | `ultra-status` | none | recommends the smallest explicit route from current files |
122
175
  | `ultra-delegate` | derived runtime receipt plus an isolated worktree diff | primary host inspection and optional integration |
123
176
 
@@ -131,16 +184,17 @@ Node.js 22 or newer is required.
131
184
 
132
185
  ```bash
133
186
  # Current project, one host
134
- npx ultra-builder-pro-cli --claude --local
135
- npx ultra-builder-pro-cli --codex --local
187
+ npx ultra-builder-pro-cli@3.0.2 --claude --local
188
+ npx ultra-builder-pro-cli@3.0.2 --codex --local
136
189
 
137
190
  # Global installation
138
- npx ultra-builder-pro-cli --opencode --global
139
- npx ultra-builder-pro-cli --kimi --global
140
- npx ultra-builder-pro-cli --grok --global
191
+ npx ultra-builder-pro-cli@3.0.2 --opencode --global
192
+ npx ultra-builder-pro-cli@3.0.2 --kimi --global
193
+ npx ultra-builder-pro-cli@3.0.2 --grok --global
194
+ npx ultra-builder-pro-cli@3.0.2 --zcode --global
141
195
 
142
196
  # All supported hosts
143
- npx ultra-builder-pro-cli --all --global
197
+ npx ultra-builder-pro-cli@3.0.2 --all --global
144
198
  ```
145
199
 
146
200
  Use the host's native Skill picker or invocation syntax to select an owner workflow.
@@ -153,13 +207,13 @@ Installation is managed, atomic, and provenance-checked.
153
207
 
154
208
  ```bash
155
209
  # Re-running install updates the managed artifact
156
- npx ultra-builder-pro-cli --codex --global
210
+ npx ultra-builder-pro-cli@3.0.2 --codex --global
157
211
 
158
212
  # Read-only diagnosis
159
- npx ultra-builder-pro-cli --all --global --doctor --json
213
+ npx ultra-builder-pro-cli@3.0.2 --all --global --doctor --json
160
214
 
161
215
  # Remove only managed Ultra assets
162
- npx ultra-builder-pro-cli --all --global --uninstall
216
+ npx ultra-builder-pro-cli@3.0.2 --all --global --uninstall
163
217
  ```
164
218
 
165
219
  `--config-dir <path>` isolates both the primary config and host-owned sidecars. It is
@@ -171,30 +225,61 @@ Uninstall removes the managed plugin and prunes only empty config shells that we
171
225
  absent before the first install. Pre-existing registries, directories, symlinks, and
172
226
  any path containing owner data are preserved.
173
227
 
174
- Kimi Code and Grok Build currently expose user-scoped plugins only, so `--local`
228
+ Kimi Code, Grok Build, and ZCode currently expose user-scoped plugins only, so `--local`
175
229
  rejects them before mutation. Claude Code, Codex, and OpenCode support project-local
176
- installation; all five support managed global installation and isolated
230
+ installation; all six support managed global installation and isolated
177
231
  `--config-dir` verification.
178
232
 
179
233
  ## Typical workflow
180
234
 
181
- 1. Select `ultra-init` once. It writes the skeleton, records the owner's one-line goal,
182
- initializes Git when needed, and recommends the next route.
183
- 2. Select `ultra-research` when a product or architecture claim needs evidence.
184
- 3. Select `ultra-change` for the requested outcome and reconcile it against current
185
- specifications before planning.
186
- 4. Select `ultra-plan` to confirm public seams and produce resumable tracer-bullet tasks.
187
- 5. Select `ultra-dev` for one task at a time. Each task leaves a Completion entry,
188
- evidence, and a closing Resume Note.
189
- 6. Select `ultra-test` once the ledger is complete. Local green tests do not substitute
235
+ 1. Select `ultra-init` once. It writes the skeleton, preserves the owner's raw one-line
236
+ request and broad outline in the Project Brief, initializes Git when needed, and
237
+ stops before product research.
238
+ 2. Select `ultra-research` to turn that brief into the first accepted North Star,
239
+ shared vocabulary, and evidence-backed product and architecture baseline. For an
240
+ unclear multi-lens question it first writes a derived Wayfinding brief; for one
241
+ bounded evidence gap it skips that extra file.
242
+ 3. Select `ultra-change` for a requested delta. It reconciles only the baseline sections
243
+ the delta touches before planning; it does not rebuild the project baseline. Its
244
+ Research Disposition either cites sufficient evidence or names the bounded question
245
+ and exit evidence that must return through Research. A micro edit that makes no
246
+ specification sentence false stays outside Ultra; every accepted Change receives the
247
+ smallest Plan graph justified by its real seams, evidence, review, and recovery needs.
248
+ A profile never fixes task count. While that Change remains active, reconcile its
249
+ same stable id; never open a second active Change for a separate request.
250
+ 4. Select `ultra-plan` to record public seams and produce resumable tracer-bullet tasks.
251
+ The model owns ordinary technical seams; the owner decides only a seam that changes
252
+ the public contract or another material trade-off.
253
+ 5. Select `ultra-dev` for one task at a time. `.ultra/tasks.json` is the sole task-status
254
+ authority. Dev records typed v2 evidence and completes task review while the row is
255
+ still `in_progress`; only after blocking findings and affected evidence are resolved
256
+ does it write `completed`, add Completion, and rewrite the Resume Note.
257
+ 6. Select `ultra-test` once tasks for the active Change are completed with current v2
258
+ evidence and retained task-review provenance. Historical ledger rows and legacy
259
+ context Status fields do not enter this audit. Local green tests do not substitute
190
260
  for wiring and E2E proof.
191
- 7. Select `ultra-deliver` to run aggregate review, reconcile documentation, and archive
192
- the Change. Commit, push, tag, publication, and deployment remain separately
193
- authorized effects.
261
+ 7. Select `ultra-deliver` to run aggregate review and reconcile documentation. If that
262
+ changes product or semantic files, rerun Test; re-enter Deliver on the fresh snapshot
263
+ to write delivery metadata and archive the stable Change id. Commit, push, tag,
264
+ publication, and deployment remain separately authorized effects.
265
+
266
+ For one accepted Change, the owner may activate its exact `Execution Grant` in either
267
+ mode. A `session-local` grant lives only in the current conversation: when that
268
+ activation is lost — a fresh session, another host, or compaction — the work stops and
269
+ waits for a new owner activation. A `durable work-package` grant lets a fresh Agent or
270
+ host continue one exact work package, but only after the Agent stably verifies the
271
+ recorded grant itself. In both modes the model may select the covered Research, Plan,
272
+ Dev, Test, and reconcile-only Deliver routes until the next semantic stop or declared
273
+ budget, and neither mode grants finalization or archive: writing `delivery.md`, version
274
+ or package posture, and archiving always require a current explicit owner invocation,
275
+ as do commit, push, publication, deployment, installation, and every other external
276
+ effect.
194
277
 
195
278
  At any point, `ultra-status` can reconstruct the current position. A fresh session or
196
279
  different host resumes by reading `.ultra/tasks.json`, the selected `context_file`, its
197
- `## Resume Note`, `CONTEXT.md`, relevant decisions, the active Change, and Git.
280
+ `## Resume Note`, `CONTEXT.md`, relevant decisions, the active Change, and Git. It first
281
+ filters the append-only ledger to tasks whose `change_id` matches the unique active
282
+ Change; archived and abandoned unfinished rows are history, not the frontier.
198
283
 
199
284
  ## Three independent integration defences
200
285
 
@@ -215,13 +300,13 @@ Five optional hooks accelerate file reading and protect a narrow effect boundary
215
300
 
216
301
  | Hook | Behavior |
217
302
  |---|---|
218
- | `session_context.py` | Inject north star and current acceptance at session start |
303
+ | `session_context.py` | Inject the accepted North Star, or the Project Brief fallback before Research, plus current acceptance |
219
304
  | `mid_workflow_recall.py` | Restate acceptance before relevant source operations |
220
305
  | `compact_context.py` | Save and restore a disposable Git/file snapshot |
221
306
  | `post_edit_guard.py` | Record mechanical evidence observations after edits |
222
307
  | `block_dangerous_commands.py` | Advise on additive protected-branch publication; deny history rewrites and named destructive shell effects until the exact command is authorized |
223
308
 
224
- All five exit silently when `.ultra/` is absent. Details are in
309
+ All five hooks exit silently when `.ultra/` is absent. Details are in
225
310
  [Plugin Isolation](docs/PLUGIN-ISOLATION-CONTRACT.md).
226
311
 
227
312
  ## Delegation
@@ -231,7 +316,8 @@ selected CLI in the background. Empty writable roots select native read-only mod
231
316
  declared roots select bounded write mode. The model returns one schema-constrained final
232
317
  response; the launcher extracts it from native structured output, validates the actual
233
318
  Git diff, and atomically publishes a terminal `finished`, `blocked`, or `failed` result
234
- beside the instruction.
319
+ beside the instruction. The digest-bound packet is embedded in the worker prompt, so a
320
+ strict host need not read instruction files outside its isolated worktree.
235
321
 
236
322
  ```bash
237
323
  ubp delegate run --to codex \
@@ -244,6 +330,10 @@ Use `skills/ultra-delegate/scripts/delegate_wait.py` to wait for `result.json` w
244
330
  loading intermediate worker output into the parent context. Delegation grants no new
245
331
  authority; writable roots remain inside the worktree, and its permission file must
246
332
  declare zero external effects without widening the host sandbox.
333
+ The immutable instruction names task execution/continuation, scoped Research evidence,
334
+ or aggregate Change review/verification. The latter two may be read-only and do not
335
+ require a task row, keeping pre-Plan Research and post-task cross-family review
336
+ reachable without inventing ledger work.
247
337
 
248
338
  ## Host support
249
339
 
@@ -254,6 +344,7 @@ declare zero external effects without widening the host sandbox.
254
344
  | OpenCode | 14 | 5 through native JS plugin | bundle + skill directories |
255
345
  | Kimi Code | 14 | 5 through wire adapter | managed plugin registry |
256
346
  | Grok Build | 14 | 5 through wire adapter | native plugin registration when available |
347
+ | ZCode | 14 | 5 through wire adapter | inline plugin + local marketplace + reversible config registration |
257
348
 
258
349
  See [Runtime Compatibility](docs/RUNTIME-COMPAT-MATRIX.md) for exact paths and host
259
350
  limitations.
@@ -276,10 +367,19 @@ npm pack --dry-run --json
276
367
 
277
368
  Every changed Skill is also validated with the Codex Skill Creator validator. A changed
278
369
  Codex manifest is validated against the Plugin Creator schema. No release effect is
279
- implied by a green verification run.
370
+ implied by a green verification run, and validator success establishes structural
371
+ conformance rather than semantic acceptance.
280
372
 
281
373
  ## Documentation
282
374
 
375
+ - [Current authority](.ultra/north-star.md) — this repository's accepted
376
+ North Star, revision `north-star-v2-r3`, is the canonical current authority;
377
+ `.ultra/tasks.json` and the stable Change under `.ultra/changes/active/` or
378
+ `.ultra/changes/archive/` record the current or delivered work frontier.
379
+ - Frozen design history (immutable accepted records, not live status):
380
+ [3.0 North Star R3](docs/ULTRA-BUILDER-PRO-3.0-NORTH-STAR-R3.zh-CN.md) —
381
+ the hash-bound accepted r3 design — and
382
+ [3.0 design](docs/ULTRA-BUILDER-PRO-3.0.zh-CN.md), superseded by r3.
283
383
  - [Philosophy](docs/PHILOSOPHY.md)
284
384
  - [Architecture](docs/ARCHITECTURE.md)
285
385
  - [Artifact Authority](docs/ARTIFACT-AUTHORITY.md)
@@ -287,6 +387,8 @@ implied by a green verification run.
287
387
  - [Skill Authoring](docs/SKILL-AUTHORING.md)
288
388
  - [Plugin Isolation](docs/PLUGIN-ISOLATION-CONTRACT.md)
289
389
  - [Runtime Compatibility](docs/RUNTIME-COMPAT-MATRIX.md)
390
+ - [Adversarial Review Evaluation](docs/evals/adversarial-review-2026-08-14.md)
391
+ - [ZCode Automation Evaluation](docs/evals/zcode-automation-2026-08-14.md)
290
392
 
291
393
  ## License
292
394
 
@@ -1,8 +1,28 @@
1
1
  'use strict';
2
2
 
3
+ const fs = require('node:fs');
3
4
  const path = require('node:path');
4
5
 
5
6
  const KIMI_PROFILE_ROOT = path.join(__dirname, 'delegate-profiles');
7
+ const ZCODE_BUNDLED_CLI = '/Applications/ZCode.app/Contents/Resources/glm/zcode.cjs';
8
+
9
+ // The ZCode app-bundled CLI is a verified-local surface, not a provider
10
+ // stability promise: official documentation plus a full recovery drill must
11
+ // both hold before any transport may claim 'supported'.
12
+ const TRANSPORT_MATURITY = Object.freeze({
13
+ claude: 'documented+verified',
14
+ codex: 'documented+verified',
15
+ opencode: 'documented+verified',
16
+ kimi: 'documented+verified',
17
+ grok: 'documented+verified',
18
+ zcode: 'experimental',
19
+ });
20
+
21
+ function zcodeBinary({ platform = process.platform, exists = fs.existsSync } = {}) {
22
+ return platform === 'darwin' && exists(ZCODE_BUNDLED_CLI)
23
+ ? ZCODE_BUNDLED_CLI
24
+ : 'zcode';
25
+ }
6
26
 
7
27
  function opencodePermission(writableRoots) {
8
28
  const edit = { '*': 'deny' };
@@ -39,7 +59,6 @@ const PROFILES = Object.freeze({
39
59
  '--permission-mode', options.readOnly ? 'plan' : 'acceptEdits',
40
60
  '--no-session-persistence',
41
61
  '--output-format', 'json',
42
- '--json-schema', options.schemaJson,
43
62
  '--tools', options.readOnly ? 'Read,Grep,Glob' : 'Read,Write,Edit,Grep,Glob',
44
63
  ],
45
64
  }),
@@ -66,14 +85,19 @@ const PROFILES = Object.freeze({
66
85
  }),
67
86
  kimi: Object.freeze({
68
87
  binary: 'kimi',
69
- delegateArgv: (prompt, _cwd, options) => [
70
- '-p', prompt,
71
- '--output-format', 'stream-json',
72
- '--agent-file', path.join(
73
- KIMI_PROFILE_ROOT,
74
- options.readOnly ? 'kimi-read-only.md' : 'kimi-write.md',
75
- ),
76
- ],
88
+ supportsModelSelection: true,
89
+ delegateArgv: (prompt, _cwd, options) => {
90
+ const args = ['-p', prompt, '--output-format', 'stream-json'];
91
+ if (options.model) args.push('--model', options.model);
92
+ args.push(
93
+ '--agent-file',
94
+ path.join(
95
+ KIMI_PROFILE_ROOT,
96
+ options.readOnly ? 'kimi-read-only.md' : 'kimi-write.md',
97
+ ),
98
+ );
99
+ return args;
100
+ },
77
101
  }),
78
102
  grok: Object.freeze({
79
103
  binary: 'grok',
@@ -82,16 +106,48 @@ const PROFILES = Object.freeze({
82
106
  '--permission-mode', options.readOnly ? 'plan' : 'acceptEdits',
83
107
  '--sandbox', options.readOnly ? 'read-only' : 'workspace',
84
108
  '--no-memory', '--no-subagents', '--disable-web-search',
85
- '--json-schema', options.schemaJson,
109
+ '--verbatim',
110
+ '--max-turns', '12',
86
111
  '--output-format', 'json',
87
112
  ],
88
113
  }),
114
+ zcode: Object.freeze({
115
+ binary: zcodeBinary(),
116
+ delegateArgv: (prompt, cwd, options) => [
117
+ '--cwd', cwd,
118
+ '--mode', options.readOnly ? 'plan' : 'edit',
119
+ '--json', '--no-color',
120
+ '--disallowedTools', options.readOnly
121
+ ? 'Bash Write Edit ApplyPatch Agent WebFetch WebSearch'
122
+ : 'Bash Agent WebFetch WebSearch',
123
+ '--prompt', prompt,
124
+ ],
125
+ }),
89
126
  });
90
127
 
91
128
  function hostProfile(runtime) {
92
129
  const profile = PROFILES[runtime];
93
130
  if (!profile) throw new Error(`unsupported delegate host: ${runtime}`);
94
- return profile;
131
+ return { ...profile, transportMaturity: TRANSPORT_MATURITY[runtime] };
132
+ }
133
+
134
+ // The live delegate surface names honestly what a run actually used. The ZCode
135
+ // headless transports are app-internal surfaces, never the documented ZCode
136
+ // Desktop interactive primary path, so every receipt that records one says so.
137
+ function transportSurface(runtime, binary = PROFILES[runtime] ? PROFILES[runtime].binary : undefined) {
138
+ if (runtime === 'zcode') {
139
+ const source = binary === ZCODE_BUNDLED_CLI ? 'the App-bundled headless CLI' : 'the zcode headless CLI on PATH';
140
+ return `${source} (experimental; not the documented ZCode Desktop interactive surface)`;
141
+ }
142
+ return 'documented non-interactive CLI';
95
143
  }
96
144
 
97
- module.exports = { PROFILES, hostProfile, opencodePermission };
145
+ module.exports = {
146
+ PROFILES,
147
+ TRANSPORT_MATURITY,
148
+ ZCODE_BUNDLED_CLI,
149
+ hostProfile,
150
+ opencodePermission,
151
+ transportSurface,
152
+ zcodeBinary,
153
+ };
@@ -15,7 +15,6 @@ const {
15
15
  const { parse, serialize } = require('./frontmatter.cjs');
16
16
  const provenance = require('./provenance.cjs');
17
17
  const {
18
- MODEL_INVOKED_SKILLS,
19
18
  WORKFLOW_HOOK_FILES,
20
19
  skillPolicy,
21
20
  skillsForRuntime,
@@ -34,13 +33,13 @@ function skillFrontmatter(runtime, name, fm) {
34
33
  return {
35
34
  ...base,
36
35
  'user-invocable': policy.userInvocable,
37
- ...(policy.userInvocable ? { 'disable-model-invocation': true } : {}),
36
+ ...(!policy.allowImplicitInvocation ? { 'disable-model-invocation': true } : {}),
38
37
  };
39
38
  }
40
39
  if (runtime === 'kimi') {
41
40
  return {
42
41
  ...base,
43
- ...(policy.userInvocable ? { disableModelInvocation: true } : {}),
42
+ ...(!policy.allowImplicitInvocation ? { disableModelInvocation: true } : {}),
44
43
  };
45
44
  }
46
45
  return base;
@@ -54,7 +53,7 @@ function codexMetadata(name, description) {
54
53
  ` short_description: ${JSON.stringify(short || titleCase(name))}`,
55
54
  ` default_prompt: ${JSON.stringify(`Use $ultra-builder-pro:${name} and follow its workflow.`)}`,
56
55
  'policy:',
57
- ` allow_implicit_invocation: ${MODEL_INVOKED_SKILLS.includes(name) ? 'true' : 'false'}`,
56
+ ` allow_implicit_invocation: ${skillPolicy(name).allowImplicitInvocation ? 'true' : 'false'}`,
58
57
  '',
59
58
  ].join('\n');
60
59
  }
@@ -99,7 +98,7 @@ function copyHooks({ runtime, repoRoot, hookRoot, hooksManifest }) {
99
98
  if (!fs.existsSync(source)) throw new Error(`missing allowlisted hook: ${name}`);
100
99
  fs.copyFileSync(source, path.join(hookRoot, name));
101
100
  }
102
- if (['codex', 'kimi', 'grok'].includes(runtime)) {
101
+ if (['codex', 'kimi', 'grok', 'zcode'].includes(runtime)) {
103
102
  ensureDir(path.join(hookRoot, 'adapters'));
104
103
  fs.copyFileSync(
105
104
  path.join(repoRoot, 'hooks', 'adapters', `${runtime}.py`),
@@ -27,7 +27,14 @@ const MODEL_INVOKED_SKILLS = Object.freeze([
27
27
  ]);
28
28
 
29
29
  const ROUTER_SKILLS = Object.freeze(['ultra-status']);
30
- const SUPPORTED_RUNTIMES = Object.freeze(['claude', 'opencode', 'codex', 'kimi', 'grok']);
30
+ const GRANT_CONTINUABLE_SKILLS = Object.freeze([
31
+ 'ultra-research',
32
+ 'ultra-plan',
33
+ 'ultra-dev',
34
+ 'ultra-test',
35
+ 'ultra-deliver',
36
+ ]);
37
+ const SUPPORTED_RUNTIMES = Object.freeze(['claude', 'opencode', 'codex', 'kimi', 'grok', 'zcode']);
31
38
 
32
39
  const WORKFLOW_HOOK_FILES = Object.freeze([
33
40
  'session_context.py',
@@ -53,13 +60,15 @@ function skillPolicy(name) {
53
60
  throw new Error(`unknown packaged Ultra skill: ${name}`);
54
61
  }
55
62
  const modelInvoked = MODEL_INVOKED_SKILLS.includes(name);
63
+ const grantContinuable = GRANT_CONTINUABLE_SKILLS.includes(name);
56
64
  return {
57
65
  userInvocable: !modelInvoked,
58
- allowImplicitInvocation: modelInvoked,
66
+ allowImplicitInvocation: modelInvoked || grantContinuable,
59
67
  };
60
68
  }
61
69
 
62
70
  module.exports = {
71
+ GRANT_CONTINUABLE_SKILLS,
63
72
  USER_INVOKED_SKILLS,
64
73
  MODEL_INVOKED_SKILLS,
65
74
  ROUTER_SKILLS,