ultra-builder-pro-cli 3.0.2 → 5.0.0

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 (41) hide show
  1. package/.ultra-template/contexts/TEMPLATE.md +6 -0
  2. package/CHANGELOG.md +73 -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/bin/delegate-worker.cjs +2 -345
  9. package/bin/delegate.cjs +3 -530
  10. package/docs/ARCHITECTURE.md +59 -18
  11. package/docs/ARTIFACT-AUTHORITY.md +21 -5
  12. package/docs/DECISIONS.md +31 -10
  13. package/docs/PLUGIN-ISOLATION-CONTRACT.md +28 -12
  14. package/docs/RUNTIME-COMPAT-MATRIX.md +101 -22
  15. package/docs/SKILL-AUTHORING.md +15 -3
  16. package/docs/WORKFLOW-LIFECYCLE.md +83 -29
  17. package/docs/evals/ultra-5-0-journey-results.md +62 -0
  18. package/docs/evals/ultra-5-0-live-acp-conformance.md +93 -0
  19. package/docs/evals/ultra-5-0-route-journeys.md +145 -0
  20. package/package.json +2 -1
  21. package/skills/ultra-change/SKILL.md +30 -4
  22. package/skills/ultra-delegate/SKILL.md +80 -7
  23. package/skills/ultra-delegate/patches/zcode-acp-0.1.0-zcode-0.16.5.patch +184 -0
  24. package/skills/ultra-delegate/references/delegation-contract.md +60 -1
  25. package/skills/ultra-delegate/scripts/acp-conformance.cjs +287 -0
  26. package/skills/ultra-delegate/scripts/acp-driver.cjs +762 -0
  27. package/skills/ultra-delegate/scripts/agent-execution-driver.cjs +320 -0
  28. package/skills/ultra-delegate/scripts/cli-driver.cjs +61 -0
  29. package/skills/ultra-delegate/scripts/delegate-worker.cjs +328 -0
  30. package/skills/ultra-delegate/scripts/delegate.cjs +690 -0
  31. package/skills/ultra-delegate/scripts/host-profile.cjs +267 -0
  32. package/skills/ultra-deliver/SKILL.md +13 -0
  33. package/skills/ultra-dev/SKILL.md +18 -2
  34. package/skills/ultra-init/SKILL.md +12 -0
  35. package/skills/ultra-plan/SKILL.md +21 -3
  36. package/skills/ultra-research/SKILL.md +33 -5
  37. package/skills/ultra-status/SKILL.md +37 -7
  38. package/skills/ultra-status/references/route-contract.md +100 -0
  39. package/skills/ultra-test/SKILL.md +16 -1
  40. /package/{adapters/_shared → skills/ultra-delegate/scripts}/delegate-profiles/kimi-read-only.md +0 -0
  41. /package/{adapters/_shared → skills/ultra-delegate/scripts}/delegate-profiles/kimi-write.md +0 -0
@@ -0,0 +1,62 @@
1
+ # Ultra Builder Pro 5.0 journey 验收结果 — 2026-08-26
2
+
3
+ ## 结论
4
+
5
+ 14 条已接受 journey 都有可观察结果并全部为 `PASS`。2026-08-25 的初始候选曾把
6
+ ZCode ACP promotion 记为诚实 `STOP`;2026-08-26 的 live activation 先复现并修复
7
+ ZCode 0.16.5 runtime-preferences handshake,再通过国内 BigModel provider 完成真实
8
+ receipt,因此该行已经由新证据取代。之后六 Host real user-HOME install/Doctor、
9
+ Windows descendant cleanup 和 same-commit 三平台 CI 也分别完成;公共 registry 与
10
+ GitHub Release 仍由最后的 release task 独立验证。
11
+
12
+ 这里的证据分为三类,不能互相冒充:
13
+
14
+ - `source-contract`:验证 Skill 得到一致、可到达、可停止的导航合同,不断言任一模型的
15
+ 实际表达质量;
16
+ - `isolated-runtime`:运行真实 installer/Doctor/runner 代码,但只使用临时 config、fake
17
+ Codex registration 或 fake ACP/CLI target;
18
+ - `live-provider`:六个 Host 分别完成 one bounded read-only ACP provider session;
19
+ receipt 只保留协议/result/进程/Git 事实和 digest,不保留 prompt 或 provider text。
20
+
21
+ ## Journey register
22
+
23
+ | ID | Journey | Result | Observable success or stop | Executed evidence | Deliberate gap |
24
+ |---|---|---|---|---|---|
25
+ | J1 | Greenfield | PASS | `init/create` 停在 raw brief,`research/baseline` 以 selected coverage 与 stop condition 产出 accepted baseline,再推荐首个 Change | `tests/route-contract.test.cjs`; `docs/evals/ultra-5-0-route-journeys.md#j1--greenfield-baseline` | source-contract;六 Host live output 未跑 |
26
+ | J2 | Existing project | PASS | 新请求先进入 Change;有界证据问题经 change-scoped Research 回到同一 `change_id`,accepted 后才进入 Plan | `tests/route-contract.test.cjs`; route journey J2 | source-contract;不把模型语义质量机械化 |
27
+ | J3 | Micro edit | PASS | 不使 specification 失真的 edit 明确退出 Change lifecycle,使用 ordinary repository TDD/verification | `skills/ultra-change/SKILL.md`; `docs/WORKFLOW-LIFECYCLE.md#change-reconciliation` | source inspection;实际 edit 由调用项目验证 |
28
+ | J4 | Owner revision | PASS | draft 原地修订;accepted consequential answer 以 `supersedes` record 保留旧 authority;拒绝现有选项不会默认进入 Plan | route journey J3;`skills/ultra-change/SKILL.md`; `skills/ultra-status/SKILL.md` | source-contract;owner judgment 不由 fixture 代替 |
29
+ | J5 | Fresh session | PASS | 从 root/HEAD、唯一 active Change、matching ledger/context/Resume、baseline 与 Git 重建 Route Card,不重跑已完成 Research | `tests/ultra-5-journeys.test.cjs`; README;`docs/WORKFLOW-LIFECYCLE.md#interruption-and-cross-host-continuation` | 本地 artifact route;本轮未做六 Host live output 对比 |
30
+ | J6 | Early value | PASS | Plan 的第一个 slice 必须穿过真实 consumer 与 data path,并命名 owner-visible observation | `tests/ultra-5-journeys.test.cjs`; `skills/ultra-plan/SKILL.md`; lifecycle | source-contract;真实产品 observation 由调用项目提供 |
31
+ | J7 | Degraded state | PASS | 两个 active Change 产生 `active_change_ambiguous`;不读任一 intent body,不写 progress,并给出显式保留/archive/abandon/retry 路径 | `tests/ultra-5-journeys.test.cjs` 真实 SessionStart Hook scenario;Status/Review source | Review 在 ambiguity 时停在 packet write 前;不会制造 current scope |
32
+ | J8 | Clean install delegation | PASS | isolated install 后从 loaded `ultra-delegate/scripts/delegate.cjs` 直接运行;不依赖 global `ubp`,Doctor 可见 runner;六个真实 Host home 的最终 Doctor 也都选择 ACP | `tests/install.test.cjs`; `tests/package-smoke.test.cjs`; migration fixture;`.ultra/evidence/v50-real-home-activation/` | published-registry consumer install 由 public-release task 验证 |
33
+ | J9 | ACP happy path | PASS | stable v1 initialize -> session/new -> bounded derived updates -> exact Ultra terminal result | `tests/acp-driver.test.cjs`; `tests/delegate.test.cjs`; fake ACP agent | synthetic executable protocol evidence,不是 Host/provider conformance |
34
+ | J10 | Permission denial | PASS | envelope 内写请求仅 `allow_once`;scope widening 立即拒绝,不能转成 successful Ultra result | `tests/acp-driver.test.cjs`; `tests/delegate.test.cjs` | fake agent;没有真实 provider permission UI |
35
+ | J11 | Cancellation | PASS | cancel/timeout 到 typed terminal result,释放 delegation lock,POSIX process group 无 descendant orphan;`windows-latest` 的 cancel 与 timeout 也都终止真实 grandchild,可用 fresh id 重试 | `tests/delegate.test.cjs`; `tests/acp-driver.test.cjs`; GitHub Actions run `32935138736` | 若 Windows `taskkill` 不可用,fallback 只能保证 direct child cleanup |
36
+ | J12 | CLI fallback | PASS | 六个 Host 都只在自己的 current receipt、stable ACP v1 和 executable 同时成立时选择 ACP;任一条件缺失仍选择 result-compatible CliDriver,并在 receipt/result/Doctor 显示 typed reason | `tests/acp-driver.test.cjs`; `tests/install.test.cjs`; six live receipts;migration Doctor scenario | provider retry 与 fallback 不自动改变 credential 或语义 authority |
37
+ | J13 | ZCode bridge | PASS | installed ZCode 0.16.5 通过 `zcode-acp` v0.1.0 + digest-bound compatibility patch 接入 ACP v1,并用国内 BigModel provider 返回 exact Ultra result、clean Git 与 terminal worker | `skills/ultra-delegate/patches/zcode-acp-0.1.0-zcode-0.16.5.patch`; bridge receipt;`host-zcode.json`; live conformance report | transport maturity 仍为 `experimental`,因为 `app-server` 没有公开稳定性合同;缺 bridge/executable 时仍 typed fallback |
38
+ | J14 | 3.x migration | PASS | 18 个 seeded project-owned files(覆盖 baseline、spec、active/archive Change、decision、task/context、Research、evidence、test report 与 binary bytes)在 install -> update -> Doctor -> uninstall 前后 mode、length 与 SHA-256 全相同;六 Host Doctor healthy 且显示 driver health | `tests/ultra-5-journeys.test.cjs` before/after digest 与 Doctor diagnostic | fixture 证明 updater 的真实文件边界,不声称覆盖未知第三方 artifact 语义 |
39
+
40
+ ## 可复现命令
41
+
42
+ ```bash
43
+ node --test tests/ultra-5-journeys.test.cjs \
44
+ tests/route-contract.test.cjs \
45
+ tests/acp-driver.test.cjs \
46
+ tests/delegate.test.cjs \
47
+ tests/install.test.cjs \
48
+ tests/package-smoke.test.cjs
49
+ ```
50
+
51
+ 其中 migration case 会在临时目录执行六 Host install、第二次 install(update)、JSON
52
+ Doctor 与 uninstall,并在 TAP diagnostic 中打印 canonical before/update/uninstall digest
53
+ 和每个 Host 的 selected driver/fallback reason。
54
+
55
+ ## 尚待 public-release task 完成的验证
56
+
57
+ - 六个真实 Host 对同一 route fixture 的 Route Card 输出质量对比;
58
+ - `v5.0.0` annotated tag、npm trusted publication、GitHub Release 与 published-package
59
+ consumer install 的同源性。
60
+
61
+ 六个 live ACP provider receipt、real-HOME activation、Windows cleanup 和三平台 CI
62
+ 已经完成;剩余 registry/release 缺口属于 public-release task,不会被本报告冒充完成。
@@ -0,0 +1,93 @@
1
+ # Ultra Builder Pro 5.0 live ACP conformance — 2026-08-26
2
+
3
+ ## 结论
4
+
5
+ 本报告把每个 Host 的 ACP 激活结论绑定到自己的真实 provider receipt;一个 Host 的
6
+ 结果不能提升另一个 Host。Claude Code、Codex、OpenCode、Kimi Code、Grok Build 与
7
+ ZCode 当前全部为 `PASS`,六个 profile 都可以在对应 executable 存在时选择 ACP。
8
+
9
+ `PASS` 的共同条件是:stable ACP v1、真实 provider、精确
10
+ `ultra-delegation-result-v1`、只读 isolated worktree、Git unchanged,以及 worker
11
+ 进入 terminal state。`end_turn` 本身不是完成证据;它必须和 exact result/diff
12
+ validator 一起成立。
13
+
14
+ ## 方法
15
+
16
+ 命令:
17
+
18
+ ```bash
19
+ node skills/ultra-delegate/scripts/acp-conformance.cjs \
20
+ --host <host> \
21
+ --output .ultra/evidence/v50-live-acp-activation/host-<host>.json \
22
+ --timeout 240
23
+ ```
24
+
25
+ Harness 经过真实 `delegate.cjs`、background worker、`AcpDriver`、exact result
26
+ validator 和 Git-diff validator。Receipt 只保存候选命令、协议/result 状态、事件数量、
27
+ 子进程终态及临时 artifact digest;不保存 prompt、provider text、hidden reasoning、
28
+ credential value 或 raw JSON-RPC。临时工作树和 raw artifacts 在计算 digest 后删除。
29
+
30
+ ## Host register
31
+
32
+ | Host | Candidate | Result | Receipt SHA-256 | Observation |
33
+ |---|---|---|---|---|
34
+ | Claude Code | `npx --yes @agentclientprotocol/claude-agent-acp@0.70.0` | PASS | `9b1d88cbd5e5b66a56e0cf19f34e7f2107f9e4b8fde9d80b9eadcdfc8f4a25e3` | ACP v1, `end_turn`, exact result, clean Git, worker exited |
35
+ | Codex | `npx --yes @agentclientprotocol/codex-acp@1.6.2` | PASS | `e82287609397807fb6968dff104d7f6569499b53c77be6a186aa33939a4c629e` | ACP v1, `end_turn`, exact result, clean Git; adapter was terminated after the logical turn |
36
+ | OpenCode | `opencode acp` | PASS | `3575b148f6feb8c9f1472add705390e6d47b87be080403ec7006b66a29f7873b` | ACP v1, `end_turn`, exact result, clean Git, worker exited |
37
+ | Grok Build | `grok agent stdio` | PASS | `370eeae12d63443188d519825ed8040fd8bba9b27fddb82e499d9cb590f4a33d` | ACP v1, exact result, clean Git; creation-time metadata was bounded and identity-checked before use |
38
+ | Kimi Code | `kimi acp` | PASS | `30d8adec2877f80fadf0b20c3cb7fa6b732dea3598d7484c143f9835770301fe` | ACP v1, `end_turn`, exact result, clean Git, worker exited |
39
+ | ZCode | `zcode-acp --zcode-path <installed-runtime> --no-browser` | PASS | `156080f88ed84a013fb26d93e5138230732d2ef0e2b5b10a7c3deb501d3548e9` | domestic BigModel provider, ACP v1, `end_turn`, exact result, clean Git, worker exited |
40
+
41
+ ## Claude Code
42
+
43
+ The pinned official adapter completed the real read-only drill. Its profile may select
44
+ ACP when `npx` is executable; `ULTRA_DELEGATE_FORCE_CLI=1` remains recovery.
45
+
46
+ ## Codex
47
+
48
+ The pinned official adapter completed the real read-only drill. A nonzero adapter exit
49
+ caused by client-owned stdin shutdown remains recorded separately and does not overturn
50
+ an already validated protocol terminal and exact result.
51
+
52
+ ## OpenCode
53
+
54
+ The native stdio server completed the real read-only drill through `opencode acp`.
55
+
56
+ ## Grok Build
57
+
58
+ Grok emits bounded creation-time metadata before returning `session/new`. Ultra accepts
59
+ only four metadata update kinds at that point, caps the transient buffer at 32 messages
60
+ and 256 KiB, and validates each buffered session ID after the response. Early content,
61
+ tool traffic, mismatched identity, or overflow remains a typed failure.
62
+
63
+ ## Kimi Code
64
+
65
+ Kimi 1.49.0 completed an owner-authenticated, read-only ACP provider session and returned
66
+ the exact Ultra result. Its profile may select native `kimi acp` when executable.
67
+
68
+ ## ZCode
69
+
70
+ Ultra resolves independently installed `zcode-acp` v0.1.0 source commit
71
+ `42fe149d4b501469343c01f23ba3801832306d53`, the digest-bound Ultra compatibility patch
72
+ `174dfd0feafe84320556a84b5ae08b10e44c5515fea4992fd1d58af54cee4e3d`, and installed
73
+ ZCode CLI 0.16.5. The patch answers the new `session/requestRuntimePreferences` request
74
+ that otherwise deadlocks upstream v0.1.0 during `session/create`. Locked Rust tests,
75
+ the 0.16.5 regression, patched fake app-server E2E, release build, installed binary
76
+ digest, exact bridge build marker, and the real provider session all pass.
77
+
78
+ Authentication uses the Owner's existing domestic BigModel Coding Plan provider at
79
+ `https://open.bigmodel.cn/api/anthropic` with model `GLM-5.2`; it does not use the
80
+ international Z.AI OAuth flow. Credential values are absent from this report and its
81
+ receipt. The transport remains `experimental` because the downstream ZCode app-server
82
+ is not a public stability contract.
83
+
84
+ ## Recovery
85
+
86
+ - Missing adapter, bridge, candidate identity, protocol version, or evidence returns a
87
+ typed CLI fallback reason before provider execution. If `session/new` reports
88
+ `acp_auth_required` before a prompt is sent, Ultra invokes the bounded CLI fallback
89
+ once; it never retries any other ACP failure.
90
+ - `ULTRA_DELEGATE_FORCE_CLI=1` selects the bounded CLI path explicitly.
91
+ - A failed or stale Host receipt is replaced only by a fresh bounded drill for that Host.
92
+ - Raw receipt bytes remain repository evidence under `.ultra/evidence/`; this packaged
93
+ report carries their SHA-256 bindings without packaging private provider output.
@@ -0,0 +1,145 @@
1
+ # Ultra 5.0 Route Contract journey 评测 — 2026-08-25
2
+
3
+ ## 结论
4
+
5
+ 本轮以当前 Skill source 和 adapter policy 做静态 journey inspection。九个 public/router
6
+ Skill 已共享一个 Route Contract;Greenfield、existing project、owner revision、early
7
+ value、fresh session、degraded diagnosis 和 grant continuation 都有可达入口、可观察
8
+ exit、material checkpoint 与 next/repair path。
9
+
10
+ 这不是 Host/provider 实跑。它验证的是模型拿到 Skill 后是否拥有一致的导航合同,不证明
11
+ 任何特定模型一定会生成高质量 Route Card,也不证明后续 ACP transport 已完成。live
12
+ cross-host journey 留在 `v50-migration-journeys`。
13
+
14
+ ## 判定方法
15
+
16
+ 每个场景检查五个问题:
17
+
18
+ 1. 入口文件能否唯一判断 Route 与 Mode;
19
+ 2. Owner 能否看到 Why、Outcome、Accepted boundary、Position、Exit condition、Reality、
20
+ Decision needed、Next 与 Not done;
21
+ 3. 停止是否由 material checkpoint 或可观察 evidence 触发,而非计数器;
22
+ 4. 没有授权时是否推荐下一 route,有有效 Execution Grant 时是否只继续 covered mode;
23
+ 5. authority 损坏时是否仍有 read-only diagnosis 和最便宜恢复路径。
24
+
25
+ `PASS` 表示当前 source 明确提供上述行为;它不是对业务语义或 live model output 的自动
26
+ 判定。
27
+
28
+ ## J1 — Greenfield baseline
29
+
30
+ - 起点:无 `.ultra/`,Owner 给出一个原始产品想法。
31
+ - 预期路线:`ultra-init/create` → 推荐 `ultra-research/baseline` → 推荐
32
+ `ultra-change/intake`。
33
+ - 可观察 exit:Init read-back skeleton 与 raw Project Brief;Research read-back selected
34
+ reports、accepted North Star、specifications、vocabulary 与 synthesis。
35
+ - material checkpoint:Owner 确认 raw outline;Research 的方向、scope、synthesis 和
36
+ North Star acceptance。
37
+ - 禁止行为:Init 写 North Star;Research 没有 selected coverage/stop condition;任一
38
+ Skill 自动打开 Change。
39
+ - source evidence:`skills/ultra-init/SKILL.md`、`skills/ultra-research/SKILL.md`。
40
+ - 结果:`PASS (source inspection)`。
41
+
42
+ ## J2 — Existing project bounded evidence
43
+
44
+ - 起点:已有 accepted baseline,无 active Change,Owner 提一个新 feature/fix。
45
+ - 预期路线:`ultra-change/intake` → `evidence-needed` →
46
+ `ultra-research/change-scoped` → 同一 `change_id` 的 `ultra-change/reconcile` →
47
+ `accepted` → `ultra-plan/decompose`。
48
+ - 可观察 exit:Change 先固定 bounded question 与 named exit evidence;Research 只完成该
49
+ question;Change 再决定 evidence 是否改变 intent;Plan 只消费 accepted Change。
50
+ - 禁止行为:原始需求先自动进入 Research;Research 打开第二个 Change;Plan 直接打开
51
+ Research 或自己改变 product contract。
52
+ - source evidence:`skills/ultra-change/SKILL.md`、`skills/ultra-research/SKILL.md`、
53
+ `skills/ultra-plan/SKILL.md`。
54
+ - 结果:`PASS (source inspection)`。
55
+
56
+ ## J3 — Owner revision、拒绝选项与 history
57
+
58
+ - 起点:Owner 修改尚未接受的 Change,或推翻一个已接受的 consequential decision。
59
+ - 预期路线:draft 在同一 `intent.md` 内修订;accepted decision 以新的
60
+ `.ultra/decisions/<id>.md` 和 `supersedes` 保留历史;`ultra-status/history` 可按需解释
61
+ 当前答案、被拒绝选项与旧边界。
62
+ - Decision needed:只保留一个会实质改变 outcome/boundary 的问题;Owner 拒绝当前选项
63
+ 时,Change 保持 draft/evidence-needed 并补证据或新选项,不假装 accepted,不进入 Plan。
64
+ - 禁止行为:覆盖旧 accepted decision、用 event log 代替 authority、因 Owner 没选现有
65
+ 选项就制造默认答案。
66
+ - source evidence:`skills/ultra-change/SKILL.md`、`skills/ultra-status/SKILL.md`、
67
+ `docs/ARTIFACT-AUTHORITY.md#decisions-and-reductions`。
68
+ - 结果:`PASS (source inspection)`。
69
+
70
+ ## J4 — Earliest observable value
71
+
72
+ - 起点:accepted/evidenced Change 已进入 Plan。
73
+ - 预期路线:`ultra-plan/decompose` 明确第一个 executable slice 的 real consumer、real
74
+ data path 与 owner-visible observation,再把 exact task 交给 `ultra-dev/execute`。
75
+ - 产品或 contract evidence gap:返回 `ultra-change/reconcile`,由 Change 决定是否记录
76
+ bounded Research Disposition。
77
+ - ordinary technical uncertainty:模型解决,或用 bounded spike/tracer task;不重新打开
78
+ product Research。
79
+ - 禁止行为:先完成整层基础设施、用 task count 代表价值、Plan 直接启动 Research。
80
+ - source evidence:`skills/ultra-plan/SKILL.md`。
81
+ - 结果:`PASS (source inspection)`。
82
+
83
+ ## J5 — Fresh-session recovery
84
+
85
+ - 起点:对话上下文丢失,但 repository 与 Git 仍在。
86
+ - 预期路线:先读 root/HEAD,再唯一解析 active `change_id`,读取 matching task ledger、
87
+ context 与 closing Resume Note,然后核对 Brief、North Star、decisions、specs、evidence
88
+ 和 worktree,重新推导 Route Card。
89
+ - 可观察 exit:Owner 能看到当前 boundary、真实 diff/evidence、下一 exact task 或 repair;
90
+ 已完成 Research 不被重跑。
91
+ - context pressure:在最近 safe write 更新 Resume Note,显示 stop card,并建议 fresh
92
+ session;token/file count 不成为 semantic gate。
93
+ - source evidence:`skills/ultra-status/references/route-contract.md`、
94
+ `skills/ultra-status/SKILL.md`、`skills/ultra-dev/SKILL.md`。
95
+ - 结果:`PASS (source inspection)`。
96
+
97
+ ## J6 — Degraded authority diagnosis
98
+
99
+ - 起点:两个 active Change、malformed intent、stale trace 或暂时不可读 authority。
100
+ - 预期路线:`ultra-status/recovery` 停止从 ambiguous Change 做 semantic routing/write,
101
+ 但仍用 typed diagnostic、安全的 Git/directory observations 和未冲突的 canonical files
102
+ 显示原因与 repair/retry/cancel/abandon 路径。
103
+ - 禁止行为:选第一个目录、把“不能写”表达为永久 in-progress、因为 authority 损坏而
104
+ 关闭 Status/Review 的只读诊断。
105
+ - source evidence:`skills/ultra-status/SKILL.md`、
106
+ `skills/ultra-status/references/route-contract.md`。
107
+ - 结果:`PASS (source inspection)`。
108
+
109
+ ## J7 — Grant-aware continuation
110
+
111
+ - 起点:同一 accepted Change 有当前有效 Execution Grant,覆盖 Plan、一个 exact Dev task、
112
+ Test 与 Deliver-reconcile 的 local reversible effects。
113
+ - 预期路线:每次 public transition 先显示 Route Card;Skill 重新核对 Mode、`change_id`、
114
+ effects、budget 与 stop conditions,再继续 covered mode。
115
+ - 必停点:Change acceptance/reduction、primary transfer、unresolved P0/P1、Deliver
116
+ finalization/archive,以及任何 commit/push/publish/deploy/provider spend。
117
+ - 无 grant:同一路径在当前 Skill exit 停止,并把 `Next` 表达为 recommendation。
118
+ - 禁止行为:Host implicit bit 授权 Change intake/acceptance 或 Deliver finalization;grant
119
+ 自动扩展 scope;Route Card 自己成为 permission。
120
+ - source evidence:`adapters/_shared/runtime-assets.cjs`、九个 public/router Skills、
121
+ `skills/ultra-status/references/route-contract.md`。
122
+ - 结果:`PASS (source inspection)`。
123
+
124
+ ## J8 — Delegation event versus semantic route
125
+
126
+ - 起点:Owner 显式授权一个 bounded task/research/aggregate worker slice。
127
+ - 预期路线:`ultra-delegate` launch 前显示 primary Route Card;运行时 permission、tool、
128
+ plan、usage、process 或 ACP update 只进入 Position/Delta/Reality;terminal result 经验证
129
+ 后回到原 primary Skill,由 primary writer 解释和集成。
130
+ - 禁止行为:worker event 写 canonical `.ultra`、terminal `finished` 自动完成 task、
131
+ delegation 升级为 primary transfer。
132
+ - source evidence:`skills/ultra-delegate/SKILL.md`、Route Contract。
133
+ - 结果:`PASS (source inspection; ACP driver not implemented in this task)`。
134
+
135
+ ## Route Contract 冻结时本轮未证明
136
+
137
+ - 尚未在六个真实 Host 上比较同一 fixture 的 Route Card 质量。
138
+ - 本次 Route Contract inspection 没有证明 ACP v1 driver、CLI fallback、Skill-local
139
+ runner 或 ZCode bridge;这些能力必须由各自后续任务提供独立 evidence。
140
+ - 尚未执行 3.x byte-preservation migration journey。
141
+ - 尚未完成 5.0 package/release verification。
142
+
143
+ 这些缺口分别路由到 `v50-acp-execution-drivers`、`v50-skill-local-delegation`、
144
+ `v50-migration-journeys` 与 `v50-release-candidate`,不会被本次 source inspection
145
+ 冒充为通过。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultra-builder-pro-cli",
3
- "version": "3.0.2",
3
+ "version": "5.0.0",
4
4
  "description": "File-first Ultra Builder Pro workflows for Claude Code, OpenCode, Codex CLI, Kimi Code, Grok Build, and ZCode.",
5
5
  "bin": {
6
6
  "ultra-builder-pro-cli": "bin/install.js",
@@ -29,6 +29,7 @@
29
29
  "hooks/README.md",
30
30
  "LICENSE",
31
31
  "CHANGELOG.md",
32
+ "README.zh-CN.md",
32
33
  ".ultra-template",
33
34
  "docs/PHILOSOPHY.md",
34
35
  "docs/ARCHITECTURE.md",
@@ -8,17 +8,35 @@ description: Open or reconcile one bounded unit of work by comparing specificati
8
8
  A Change connects research, plan, implementation, verification, review, and delivery.
9
9
  Reconcile first so new intent does not bury an existing specification/code conflict.
10
10
 
11
+ ## Route modes
12
+
13
+ | Mode | Entry | Observable exit | Next |
14
+ |---|---|---|---|
15
+ | `intake` | Explicit owner request with no active Change | One stable draft `change_id` captures outcome, acceptance, non-goals, seams, trace, and Research Disposition | Stay in `ultra-change` for acceptance or move to `evidence-needed` |
16
+ | `evidence-needed` | The draft names one load-bearing question and required exit evidence | The bounded Research Disposition is owner-visible and records its return to this Change | Recommend `ultra-research/change-scoped` |
17
+ | `reconcile` | Explicit invocation or a valid Execution Grant for the same active Change | Research or implementation evidence is dispositioned in the same intent and any material delta is accepted | Recommend or continue to `ultra-plan/decompose` when the intent is accepted |
18
+ | `accepted` | Explicit owner acceptance of the Change outcome and boundary | Accepted intent, current trace, satisfied Research Disposition, and resolved material decisions are read back | Recommend `ultra-plan/decompose` |
19
+
20
+ Follow `../ultra-status/references/route-contract.md`. A draft may be revised in place;
21
+ an already accepted owner decision is revised by a superseding decision record so its
22
+ history remains recoverable. Show a Route Card before each public transition. Under a
23
+ valid grant only the non-material `reconcile` mode may continue implicitly.
24
+
11
25
  ## Before you start
12
26
 
13
- 1. Read `references/change-contract.md` and apply its **Active Change authority
27
+ 1. If model-selected, require `reconcile` mode for the same active Change and verify a
28
+ live grant under `references/execution-grant.md`. Any intake, evidence-needed boundary,
29
+ acceptance, abandonment, reduction, or primary transfer stops and recommends current
30
+ explicit owner invocation; a coarse Host invocation bit cannot authorize it.
31
+ 2. Read `references/change-contract.md` and apply its **Active Change authority
14
32
  resolution** before reading any active `intent.md`, relying on a current `change_id`,
15
33
  or creating or writing a Change. Continue only from its positively observed stable
16
34
  zero-or-one result; return its typed repair for any other result. With one active
17
35
  Change, read `.ultra/tasks.json`, then only its unfinished `context_file` values.
18
36
  Update the same `change_id`; never open a second active Change.
19
- 2. Read `.ultra/project-brief.md`, `CONTEXT.md`, relevant `.ultra/decisions/`, and
37
+ 3. Read `.ultra/project-brief.md`, `CONTEXT.md`, relevant `.ultra/decisions/`, and
20
38
  `.ultra/north-star.md` for raw provenance, accepted language, and direction.
21
- 3. Grep archive and abandoned Changes that touched this area. Prefer archived
39
+ 4. Grep archive and abandoned Changes that touched this area. Prefer archived
22
40
  `delivery.md`; otherwise read `archive-summary.md`, `verification.md`, `intent.md`,
23
41
  and remaining Markdown. Read abandoned Changes as history of rejected boundaries and
24
42
  reusable evidence, never current intent. A missing `delivery.md` does not mean no history;
@@ -100,7 +118,9 @@ count.
100
118
 
101
119
  Output active `intent.md` under a stable id, justified specification patches, qualifying
102
120
  decision or vocabulary updates. For an evidence gap recommend `ultra-research`; when
103
- evidenced recommend `ultra-plan`. Invoke neither.
121
+ evidenced recommend `ultra-plan`. Invoke neither without a covering grant; with a valid
122
+ grant covering same-Change reconciliation and Plan, show the transition Route Card and
123
+ allow Plan to re-verify its own entry contract.
104
124
 
105
125
  ## Abandoning a Change
106
126
 
@@ -128,6 +148,11 @@ Every non-empty bucket, the Change boundary, abandonment, and anything
128
148
  reconciliation turns up that shrinks a prior commitment. A change that makes no
129
149
  specification sentence false needs no permission at all.
130
150
 
151
+ If the owner rejects the presented options or says none is adequate, preserve that
152
+ answer as current intake and keep the intent draft or move it to `evidence-needed`.
153
+ Gather the missing discriminating evidence or present materially different options; do
154
+ not select the nearest rejected option, manufacture acceptance, or route to Plan.
155
+
131
156
  ## References
132
157
 
133
158
  - `../ultra-grilling/SKILL.md` — the loop for settling the boundary.
@@ -135,5 +160,6 @@ specification sentence false needs no permission at all.
135
160
  `intent.md` structure, and profile fields.
136
161
  - `references/execution-grant.md` — read when the owner requests bounded workflow continuation under a session-local or durable grant.
137
162
  - `references/primary-transfer.md` — read when the owner moves the work package's canonical writer to another Agent (OFFER → ACK → RESULT).
163
+ - `../ultra-status/references/route-contract.md` — owner-visible route, checkpoint, and recovery output.
138
164
  - `../ultra-think/references/autonomy-boundary.md` — read before removing a promise.
139
165
  - `../ultra-tdd/SKILL.md` — read for an evidenced one-slice correction.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ultra-delegate
3
- description: Delegate one bounded workflow segment to another installed CLI in an isolated worktree and return only its stable result artifact. Use when the owner asks for another model or host to execute, review, verify, or continue a specific slice of current work.
3
+ description: Delegate one bounded workflow segment to another installed Agent runtime through a conformance-gated ACP or CLI driver in an isolated worktree, then return only its stable result artifact. Use when the owner asks for another model or host to execute, review, verify, or continue a specific slice of current work.
4
4
  ---
5
5
 
6
6
  # Run a bounded worker without giving it project authority
@@ -14,6 +14,20 @@ another Agent requires the owner-directed OFFER → ACK → RESULT protocol in
14
14
  `../ultra-change/references/primary-transfer.md`, which stays mutually exclusive
15
15
  with this bounded-worker path.
16
16
 
17
+ ## Route modes
18
+
19
+ | Mode | Entry | Observable exit | Next |
20
+ |---|---|---|---|
21
+ | `task` | Explicit owner authorization for one task execution or continuation slice | One validated terminal worker result and isolated diff are returned to the primary writer | Return to the primary `ultra-dev` task for interpretation and integration |
22
+ | `research` | Explicit owner authorization for one active Change's bounded evidence question | One validated terminal result carries the named evidence or a bounded unavailable path | Return to `ultra-research/change-scoped` under the primary writer |
23
+ | `aggregate` | Explicit owner authorization for one Change-level review or verification question | One validated terminal finding result is available without canonical `.ultra` writes | Return to the primary `ultra-test`, `ultra-review`, or requesting route |
24
+
25
+ Follow `../ultra-status/references/route-contract.md`. Delegation always remains an
26
+ explicit-entry capability, even when the surrounding Change has an Execution Grant.
27
+ Show one Route Card before launch and one after the terminal result. Worker events and
28
+ transport progress may update `Position`, `Delta`, or `Reality`; they never prove the
29
+ delegated slice complete or select the primary route.
30
+
17
31
  ## Before you start
18
32
 
19
33
  1. Resolve exactly one active `change_id`, then select one scope and name it in
@@ -39,6 +53,8 @@ with this bounded-worker path.
39
53
  - No `writable_roots` entry is `.ultra/` or sits under it, and the actual diff touches
40
54
  nothing there.
41
55
  - Timeout and cancellation reach a terminal failed result and release `run.lock`.
56
+ - ACP updates stay in a derived redacted event journal; no `agent_thought_chunk`, raw tool
57
+ input/output, credential, session, or stop reason can establish Ultra completion.
42
58
  - The primary host verifies the result against the selected scope's task acceptance,
43
59
  Research exit evidence, or aggregate review/verification question.
44
60
 
@@ -66,15 +82,66 @@ policy.
66
82
  Create `.ultra/.runtime/worktrees/<id>` as a real Git worktree and run:
67
83
 
68
84
  ```text
69
- ubp delegate run --to <host> --instruction <file> --permission <file> --worktree <dir> --timeout <seconds>
85
+ node <loaded-ultra-delegate-skill-dir>/scripts/delegate.cjs run --to <host> --instruction <file> --permission <file> --worktree <dir> --timeout <seconds>
70
86
  ```
71
87
 
88
+ Resolve `<loaded-ultra-delegate-skill-dir>` from this Skill's actual loaded path. The
89
+ Skill-local launcher and worker are the canonical runtime. Do not search `PATH` for
90
+ `ubp`, install a global Ultra package, or invoke `npx` to locate Ultra during
91
+ delegation. The Claude and Codex ACP profiles may separately execute their exact pinned
92
+ adapter packages through `npx`; that transport dependency is declared in the profile.
93
+ `ubp delegate ...` is a one-release compatibility wrapper only.
94
+
72
95
  `<host>` is `claude`, `codex`, `opencode`, `kimi`, `grok`, or `zcode`. Kimi accepts an
73
96
  optional `--model <id>` when its account has no default headless model. A ZCode primary
74
97
  host uses this same command to delegate to any other installed CLI; a different primary
75
98
  host can select `--to zcode` through the ZCode headless profile.
76
99
 
77
- The ZCode headless transport is `experimental`: it is an App-internal or PATH CLI with
100
+ The launcher selects one `AgentExecutionDriver` per Host. A stable ACP v1 stdio
101
+ candidate is preferred only when that exact Host's versioned conformance row is
102
+ `passed`, names a non-empty evidence reference, and its executable and declared
103
+ candidate-identity probes succeed. The probes are bounded local version checks; they
104
+ inspect capability, executability, and pinned runtime identity without starting a
105
+ provider task. Every other case uses the
106
+ result-compatible `CliDriver` and records `execution_driver`, `acp_capability`, and the
107
+ exact `driver_fallback_reason` in the receipt and terminal result. Do not edit a
108
+ conformance row merely because a binary or help command exists.
109
+ `ULTRA_DELEGATE_FORCE_CLI=1` is the explicit operator recovery switch: it selects the
110
+ same bounded `CliDriver` with `acp_forced_cli` without deleting the ACP candidate or
111
+ changing its evidence row.
112
+
113
+ `AcpDriver` sends `initialize` with protocol v1 and no client filesystem, terminal, or
114
+ interactive-auth capability; creates one session at the absolute isolated-worktree
115
+ `cwd`; sends the digest-bound packet as one text prompt; and consumes `session/update`,
116
+ permission, cancellation, and terminal messages. It retains only bounded redacted
117
+ event metadata. An edit/delete/move request is granted with `allow_once` only when all
118
+ declared locations are already inside `writable_roots`; scope widening and execution,
119
+ fetch, mode-switch, or unknown operations are denied and force a typed terminal
120
+ failure. `allow_always` is never selected. If `session/new` reports
121
+ `acp_auth_required` before any prompt is sent, the launcher runs the already-bound
122
+ `CliDriver` once and records the failed ACP attempt as redacted fallback metadata. It
123
+ never retries any post-prompt or other ACP failure, so this recovery cannot duplicate a
124
+ provider task. The driver does not copy or solicit credentials.
125
+ Some agents emit creation-time session metadata before their `session/new` response.
126
+ The driver transiently buffers only a bounded set of metadata update kinds, then checks
127
+ every buffered `sessionId` against the returned identity before publishing an event.
128
+ Early message/tool content, an identity mismatch, or a count/byte overflow fails typed.
129
+
130
+ The ZCode headless transport is `experimental`: its thin profile invokes the
131
+ independently installed `zcode-acp` v0.1.0 bridge, pinned to source commit
132
+ `42fe149d4b501469343c01f23ba3801832306d53` plus the digest-bound ZCode 0.16.5
133
+ runtime-preferences patch under this Skill's `patches/` directory, and passes only the
134
+ installed ZCode Desktop runtime path (or the operator's explicit PATH/test override).
135
+ Selection verifies both the bridge build marker
136
+ `zcode-acp 0.1.0+ultra.zcode.0.16.5` and the installed runtime version `0.16.5` before
137
+ using the passing receipt.
138
+ Ultra ships the source patch but never redistributes the bridge binary or App bytes.
139
+ Host identity and provider identity are separate; the verified local runtime uses the
140
+ Owner's domestic BigModel provider rather than international Z.AI OAuth. The installed
141
+ `app-server` remains a
142
+ ZCode Protocol surface behind that bridge, not ACP evidence by itself; the ZCode row
143
+ can pass only from its own provider-backed conformance receipt. The runtime remains
144
+ an App-internal or PATH CLI with
78
145
  no public stability contract, and it is **not** the documented ZCode Desktop
79
146
  interactive surface. `delegate run --to zcode` refuses to launch until the invocation
80
147
  explicitly carries `--ack-experimental`; every launch then prints a stderr warning and
@@ -83,10 +150,14 @@ and `experimental_ack: true` in the receipt, the worker spec, and the terminal r
83
150
  (including failure and timeout recovery results), so no receipt can imply a documented
84
151
  Desktop session. Promotion requires official documentation plus a full recovery drill.
85
152
 
86
- The command returns a receipt. Immediately run `scripts/delegate_wait.py`; read no
87
- intermediate output. Use `ubp delegate status --delegation <dir>` for a read-only state
88
- and `ubp delegate cancel --delegation <dir>` to request termination. Never delete a lock
89
- to manufacture completion.
153
+ The command returns a receipt. `status --delegation <dir>` reports the active driver,
154
+ fallback reason, and latest safe derived ACP observation when present; that observation
155
+ is execution telemetry, not a route or completion verdict. Immediately run
156
+ `python3 <loaded-ultra-delegate-skill-dir>/scripts/delegate_wait.py <result.json>`; read
157
+ no intermediate output. Use the same Skill-local Node entrypoint with `status
158
+ --delegation <dir>` for a read-only state and `cancel --delegation <dir>` to request
159
+ termination. The receipt carries the exact canonical cancel command. Never delete a
160
+ lock to manufacture completion.
90
161
 
91
162
  The worker returns one schema-constrained JSON final response. The launcher extracts it
92
163
  from the host's native structured output, validates digests, process exit, exact schema,
@@ -117,6 +188,8 @@ interpretation, risk acceptance, integration and task state.
117
188
  ## References
118
189
 
119
190
  - `references/delegation-contract.md` — strict permission, receipt and result schemas.
191
+ - `scripts/delegate.cjs` — canonical installed launcher and status/cancel entrypoint.
120
192
  - `scripts/delegate_wait.py` — run immediately after the launch receipt.
193
+ - `../ultra-status/references/route-contract.md` — owner-visible route, checkpoint, and recovery output.
121
194
  - `../ultra-think/SKILL.md` — read when No Consensus exposes a consequential decision.
122
195
  - `../ultra-think/references/autonomy-boundary.md` — read before granting write effects.