ultra-builder-pro-cli 0.26.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 (82) hide show
  1. package/.ultra-template/contexts/TEMPLATE.md +70 -29
  2. package/.ultra-template/north-star.md +35 -18
  3. package/.ultra-template/tasks.json +1 -0
  4. package/.ultra-template/test-report.json +17 -1
  5. package/CHANGELOG.md +235 -1
  6. package/README.md +210 -50
  7. package/README.zh-CN.md +440 -0
  8. package/adapters/_shared/host-profile.cjs +3 -95
  9. package/adapters/_shared/plugin-core.cjs +61 -5
  10. package/adapters/_shared/runtime-assets.cjs +66 -5
  11. package/adapters/zcode.js +375 -0
  12. package/bin/delegate-worker.cjs +2 -325
  13. package/bin/delegate.cjs +3 -461
  14. package/bin/install.js +11 -6
  15. package/docs/ARCHITECTURE.md +133 -31
  16. package/docs/ARTIFACT-AUTHORITY.md +185 -24
  17. package/docs/DECISIONS.md +153 -18
  18. package/docs/PHILOSOPHY.md +58 -7
  19. package/docs/PLUGIN-ISOLATION-CONTRACT.md +34 -12
  20. package/docs/RUNTIME-COMPAT-MATRIX.md +195 -23
  21. package/docs/SKILL-AUTHORING.md +19 -6
  22. package/docs/WORKFLOW-LIFECYCLE.md +196 -44
  23. package/docs/evals/adversarial-review-2026-08-14.md +84 -0
  24. package/docs/evals/ultra-5-0-journey-results.md +62 -0
  25. package/docs/evals/ultra-5-0-live-acp-conformance.md +93 -0
  26. package/docs/evals/ultra-5-0-route-journeys.md +145 -0
  27. package/docs/evals/zcode-automation-2026-08-14.md +103 -0
  28. package/hooks/README.md +27 -4
  29. package/hooks/_common.py +1678 -61
  30. package/hooks/adapters/zcode.py +227 -0
  31. package/hooks/compact_context.py +176 -17
  32. package/hooks/mid_workflow_recall.py +27 -5
  33. package/hooks/post_edit_guard.py +133 -23
  34. package/hooks/session_context.py +707 -22
  35. package/package.json +7 -3
  36. package/skills/ultra-change/SKILL.md +69 -12
  37. package/skills/ultra-change/references/change-contract.md +93 -27
  38. package/skills/ultra-change/references/execution-grant.md +109 -0
  39. package/skills/ultra-change/references/primary-transfer.md +273 -0
  40. package/skills/ultra-change/scripts/validate_primary_transfer.cjs +1928 -0
  41. package/skills/ultra-delegate/SKILL.md +103 -8
  42. package/skills/ultra-delegate/patches/zcode-acp-0.1.0-zcode-0.16.5.patch +184 -0
  43. package/skills/ultra-delegate/references/delegation-contract.md +80 -1
  44. package/skills/ultra-delegate/scripts/acp-conformance.cjs +287 -0
  45. package/skills/ultra-delegate/scripts/acp-driver.cjs +762 -0
  46. package/skills/ultra-delegate/scripts/agent-execution-driver.cjs +320 -0
  47. package/skills/ultra-delegate/scripts/cli-driver.cjs +61 -0
  48. package/skills/ultra-delegate/scripts/delegate-worker.cjs +328 -0
  49. package/skills/ultra-delegate/scripts/delegate.cjs +690 -0
  50. package/skills/ultra-delegate/scripts/host-profile.cjs +267 -0
  51. package/skills/ultra-deliver/SKILL.md +98 -11
  52. package/skills/ultra-dev/SKILL.md +188 -42
  53. package/skills/ultra-grilling/SKILL.md +10 -7
  54. package/skills/ultra-grilling/references/reframing.md +7 -3
  55. package/skills/ultra-init/SKILL.md +56 -7
  56. package/skills/ultra-init/scripts/init_project.cjs +968 -21
  57. package/skills/ultra-plan/SKILL.md +91 -47
  58. package/skills/ultra-plan/references/task-evidence-v2.md +300 -0
  59. package/skills/ultra-plan/scripts/validate_task_evidence.cjs +859 -0
  60. package/skills/ultra-research/SKILL.md +70 -14
  61. package/skills/ultra-research/references/04-product-strategy.md +11 -2
  62. package/skills/ultra-research/references/21-features-scope.md +8 -0
  63. package/skills/ultra-research/references/22-success-metrics.md +4 -3
  64. package/skills/ultra-research/references/99-synthesis.md +19 -2
  65. package/skills/ultra-research/references/north-star-v2.md +168 -0
  66. package/skills/ultra-research/references/wayfinding.md +8 -0
  67. package/skills/ultra-research/scripts/validate_north_star.cjs +1174 -0
  68. package/skills/ultra-review/SKILL.md +201 -27
  69. package/skills/ultra-review/references/adversarial-evaluation.md +31 -0
  70. package/skills/ultra-review/references/spec.md +5 -0
  71. package/skills/ultra-review/references/unified-schema.md +146 -11
  72. package/skills/ultra-review/references/worker-packet.md +151 -8
  73. package/skills/ultra-review/scripts/review_wait.py +2653 -63
  74. package/skills/ultra-status/SKILL.md +129 -15
  75. package/skills/ultra-status/references/route-contract.md +100 -0
  76. package/skills/ultra-tdd/SKILL.md +11 -4
  77. package/skills/ultra-tdd/references/test-execution.md +6 -1
  78. package/skills/ultra-test/SKILL.md +161 -18
  79. package/skills/ultra-test/scripts/validate_review_transport.cjs +549 -0
  80. package/skills/ultra-test/scripts/worktree_digest.cjs +518 -30
  81. /package/{adapters/_shared → skills/ultra-delegate/scripts}/delegate-profiles/kimi-read-only.md +0 -0
  82. /package/{adapters/_shared → skills/ultra-delegate/scripts}/delegate-profiles/kimi-write.md +0 -0
@@ -0,0 +1,267 @@
1
+ 'use strict';
2
+
3
+ const fs = require('node:fs');
4
+ const path = require('node:path');
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
+ const CLAUDE_ACP_PACKAGE = '@agentclientprotocol/claude-agent-acp@0.70.0';
9
+ const CODEX_ACP_PACKAGE = '@agentclientprotocol/codex-acp@1.6.2';
10
+ const ZCODE_ACP_SOURCE = Object.freeze({
11
+ repository: 'https://github.com/jpalmae/zcode-acp',
12
+ version: '0.1.0',
13
+ commit: '42fe149d4b501469343c01f23ba3801832306d53',
14
+ buildMarker: 'zcode-acp 0.1.0+ultra.zcode.0.16.5',
15
+ runtimeVersion: '0.16.5',
16
+ patch: Object.freeze({
17
+ path: 'skills/ultra-delegate/patches/zcode-acp-0.1.0-zcode-0.16.5.patch',
18
+ sha256: '174dfd0feafe84320556a84b5ae08b10e44c5515fea4992fd1d58af54cee4e3d',
19
+ compatibility: 'ZCode CLI 0.16.5 runtime-preferences handshake',
20
+ }),
21
+ });
22
+
23
+ // The ZCode app-bundled CLI is a verified-local surface, not a provider
24
+ // stability promise: official documentation plus a full recovery drill must
25
+ // both hold before any transport may claim 'supported'.
26
+ const TRANSPORT_MATURITY = Object.freeze({
27
+ claude: 'documented+verified',
28
+ codex: 'documented+verified',
29
+ opencode: 'documented+verified',
30
+ kimi: 'documented+verified',
31
+ grok: 'documented+verified',
32
+ zcode: 'experimental',
33
+ });
34
+
35
+ const ACP_CONFORMANCE = Object.freeze({
36
+ claude: Object.freeze({
37
+ status: 'passed',
38
+ evidence: 'docs/evals/ultra-5-0-live-acp-conformance.md#claude-code',
39
+ receiptSha256: '9b1d88cbd5e5b66a56e0cf19f34e7f2107f9e4b8fde9d80b9eadcdfc8f4a25e3',
40
+ }),
41
+ codex: Object.freeze({
42
+ status: 'passed',
43
+ evidence: 'docs/evals/ultra-5-0-live-acp-conformance.md#codex',
44
+ receiptSha256: 'e82287609397807fb6968dff104d7f6569499b53c77be6a186aa33939a4c629e',
45
+ }),
46
+ opencode: Object.freeze({
47
+ status: 'passed',
48
+ evidence: 'docs/evals/ultra-5-0-live-acp-conformance.md#opencode',
49
+ receiptSha256: '3575b148f6feb8c9f1472add705390e6d47b87be080403ec7006b66a29f7873b',
50
+ }),
51
+ kimi: Object.freeze({
52
+ status: 'passed',
53
+ evidence: 'docs/evals/ultra-5-0-live-acp-conformance.md#kimi-code',
54
+ receiptSha256: '30d8adec2877f80fadf0b20c3cb7fa6b732dea3598d7484c143f9835770301fe',
55
+ }),
56
+ grok: Object.freeze({
57
+ status: 'passed',
58
+ evidence: 'docs/evals/ultra-5-0-live-acp-conformance.md#grok-build',
59
+ receiptSha256: '370eeae12d63443188d519825ed8040fd8bba9b27fddb82e499d9cb590f4a33d',
60
+ }),
61
+ zcode: Object.freeze({
62
+ status: 'passed',
63
+ evidence: 'docs/evals/ultra-5-0-live-acp-conformance.md#zcode',
64
+ receiptSha256: '156080f88ed84a013fb26d93e5138230732d2ef0e2b5b10a7c3deb501d3548e9',
65
+ }),
66
+ });
67
+
68
+ function zcodeBinary({ platform = process.platform, exists = fs.existsSync } = {}) {
69
+ return platform === 'darwin' && exists(ZCODE_BUNDLED_CLI)
70
+ ? ZCODE_BUNDLED_CLI
71
+ : 'zcode';
72
+ }
73
+
74
+ function opencodePermission(writableRoots) {
75
+ const edit = { '*': 'deny' };
76
+ for (const root of writableRoots) {
77
+ if (root === '.') edit['*'] = 'allow';
78
+ else edit[`${root}/**`] = 'allow';
79
+ }
80
+ return JSON.stringify({
81
+ share: 'disabled',
82
+ permission: {
83
+ '*': 'deny',
84
+ read: 'allow',
85
+ glob: 'allow',
86
+ grep: 'allow',
87
+ list: 'allow',
88
+ lsp: 'allow',
89
+ edit,
90
+ external_directory: 'deny',
91
+ bash: 'deny',
92
+ task: 'deny',
93
+ webfetch: 'deny',
94
+ websearch: 'deny',
95
+ question: 'deny',
96
+ skill: 'deny',
97
+ },
98
+ });
99
+ }
100
+
101
+ const PROFILES = Object.freeze({
102
+ claude: Object.freeze({
103
+ binary: 'claude',
104
+ acp: Object.freeze({
105
+ surface: `official ${CLAUDE_ACP_PACKAGE} stdio adapter`,
106
+ transport: 'stdio',
107
+ protocolVersions: [1],
108
+ conformance: ACP_CONFORMANCE.claude,
109
+ command: () => 'npx',
110
+ argv: () => ['--yes', CLAUDE_ACP_PACKAGE],
111
+ }),
112
+ delegateArgv: (prompt, _cwd, options) => [
113
+ '-p', prompt,
114
+ '--permission-mode', options.readOnly ? 'plan' : 'acceptEdits',
115
+ '--no-session-persistence',
116
+ '--output-format', 'json',
117
+ '--tools', options.readOnly ? 'Read,Grep,Glob' : 'Read,Write,Edit,Grep,Glob',
118
+ ],
119
+ }),
120
+ codex: Object.freeze({
121
+ binary: 'codex',
122
+ acp: Object.freeze({
123
+ surface: `official ${CODEX_ACP_PACKAGE} stdio adapter`,
124
+ transport: 'stdio',
125
+ protocolVersions: [1],
126
+ conformance: ACP_CONFORMANCE.codex,
127
+ command: () => 'npx',
128
+ argv: () => ['--yes', CODEX_ACP_PACKAGE],
129
+ }),
130
+ delegateArgv: (prompt, cwd, options) => [
131
+ 'exec', '--ephemeral', '--ignore-user-config',
132
+ '--sandbox', options.readOnly ? 'read-only' : 'workspace-write',
133
+ '--cd', cwd,
134
+ '--config', 'sandbox_workspace_write.network_access=false',
135
+ '--output-schema', options.schemaFile,
136
+ '--output-last-message', options.hostOutput,
137
+ '--json', prompt,
138
+ ],
139
+ }),
140
+ opencode: Object.freeze({
141
+ binary: 'opencode',
142
+ acp: Object.freeze({
143
+ surface: 'native OpenCode ACP stdio server',
144
+ transport: 'stdio',
145
+ protocolVersions: [1],
146
+ conformance: ACP_CONFORMANCE.opencode,
147
+ command: ({ cliCommand }) => cliCommand,
148
+ argv: () => ['acp'],
149
+ }),
150
+ delegateArgv: (prompt, cwd) => [
151
+ 'run', '--dir', cwd, '--format', 'json', '--auto', prompt,
152
+ ],
153
+ delegateEnv: (options) => ({
154
+ OPENCODE_CONFIG_CONTENT: opencodePermission(options.writableRoots),
155
+ }),
156
+ }),
157
+ kimi: Object.freeze({
158
+ binary: 'kimi',
159
+ supportsModelSelection: true,
160
+ acp: Object.freeze({
161
+ surface: 'Kimi Code ACP stdio server',
162
+ transport: 'stdio',
163
+ protocolVersions: [1],
164
+ conformance: ACP_CONFORMANCE.kimi,
165
+ command: ({ cliCommand }) => cliCommand,
166
+ argv: () => ['acp'],
167
+ }),
168
+ delegateArgv: (prompt, _cwd, options) => {
169
+ const args = ['-p', prompt, '--output-format', 'stream-json'];
170
+ if (options.model) args.push('--model', options.model);
171
+ args.push(
172
+ '--agent-file',
173
+ path.join(
174
+ KIMI_PROFILE_ROOT,
175
+ options.readOnly ? 'kimi-read-only.md' : 'kimi-write.md',
176
+ ),
177
+ );
178
+ return args;
179
+ },
180
+ }),
181
+ grok: Object.freeze({
182
+ binary: 'grok',
183
+ acp: Object.freeze({
184
+ surface: 'Grok agent stdio candidate',
185
+ transport: 'stdio',
186
+ protocolVersions: [1],
187
+ conformance: ACP_CONFORMANCE.grok,
188
+ command: ({ cliCommand }) => cliCommand,
189
+ argv: () => ['agent', 'stdio'],
190
+ }),
191
+ delegateArgv: (prompt, cwd, options) => [
192
+ '--cwd', cwd, '--single', prompt,
193
+ '--permission-mode', options.readOnly ? 'plan' : 'acceptEdits',
194
+ '--sandbox', options.readOnly ? 'read-only' : 'workspace',
195
+ '--no-memory', '--no-subagents', '--disable-web-search',
196
+ '--verbatim',
197
+ '--max-turns', '12',
198
+ '--output-format', 'json',
199
+ ],
200
+ }),
201
+ zcode: Object.freeze({
202
+ binary: zcodeBinary(),
203
+ installedRuntimeOnly: true,
204
+ acp: Object.freeze({
205
+ surface: `installed ZCode Desktop runtime through zcode-acp ${ZCODE_ACP_SOURCE.version}`,
206
+ transport: 'stdio',
207
+ protocolVersions: [1],
208
+ conformance: ACP_CONFORMANCE.zcode,
209
+ command: ({ env }) => env.ULTRA_ZCODE_ACP_COMMAND || 'zcode-acp',
210
+ argv: ({ cliCommand }) => ['--zcode-path', cliCommand, '--no-browser'],
211
+ identityProbes: ({ command, cliCommand }) => [
212
+ {
213
+ label: 'zcode_bridge',
214
+ command,
215
+ args: ['--version'],
216
+ expectedStdout: ZCODE_ACP_SOURCE.buildMarker,
217
+ },
218
+ {
219
+ label: 'zcode_runtime',
220
+ command: cliCommand.endsWith('.cjs') ? process.execPath : cliCommand,
221
+ args: cliCommand.endsWith('.cjs') ? [cliCommand, '--version'] : ['--version'],
222
+ expectedStdout: ZCODE_ACP_SOURCE.runtimeVersion,
223
+ },
224
+ ],
225
+ }),
226
+ delegateArgv: (prompt, cwd, options) => [
227
+ '--cwd', cwd,
228
+ '--mode', options.readOnly ? 'plan' : 'edit',
229
+ '--json', '--no-color',
230
+ '--disallowedTools', options.readOnly
231
+ ? 'Bash Write Edit ApplyPatch Agent WebFetch WebSearch'
232
+ : 'Bash Agent WebFetch WebSearch',
233
+ '--prompt', prompt,
234
+ ],
235
+ }),
236
+ });
237
+
238
+ function hostProfile(runtime) {
239
+ const profile = PROFILES[runtime];
240
+ if (!profile) throw new Error(`unsupported delegate host: ${runtime}`);
241
+ return { ...profile, transportMaturity: TRANSPORT_MATURITY[runtime] };
242
+ }
243
+
244
+ // The live delegate surface names honestly what a run actually used. The ZCode
245
+ // headless transports are app-internal surfaces, never the documented ZCode
246
+ // Desktop interactive primary path, so every receipt that records one says so.
247
+ function transportSurface(runtime, binary = PROFILES[runtime] ? PROFILES[runtime].binary : undefined) {
248
+ if (runtime === 'zcode') {
249
+ const source = binary === ZCODE_BUNDLED_CLI ? 'the App-bundled headless CLI' : 'the zcode headless CLI on PATH';
250
+ return `${source} (experimental; not the documented ZCode Desktop interactive surface)`;
251
+ }
252
+ return 'documented non-interactive CLI';
253
+ }
254
+
255
+ module.exports = {
256
+ ACP_CONFORMANCE,
257
+ CLAUDE_ACP_PACKAGE,
258
+ CODEX_ACP_PACKAGE,
259
+ PROFILES,
260
+ TRANSPORT_MATURITY,
261
+ ZCODE_BUNDLED_CLI,
262
+ ZCODE_ACP_SOURCE,
263
+ hostProfile,
264
+ opencodePermission,
265
+ transportSurface,
266
+ zcodeBinary,
267
+ };
@@ -1,26 +1,81 @@
1
1
  ---
2
2
  name: ultra-deliver
3
- description: Reconcile one Change whose matching tasks are complete, run aggregate review and refactoring, refresh release documentation, and archive the local workflow record. Use when the owner wants a delivery handoff or separately authorized release effects for the active Change.
3
+ description: Reconcile one Change whose matching tasks are complete, run aggregate review and refactoring, and report the delivery handoff. Use when the owner wants delivery reconciliation and reporting, or — by current explicit owner invocation only — the separately gated finalization that writes delivery.md, fixes version and package posture, and archives the local workflow record.
4
4
  ---
5
5
 
6
6
  # Turn current evidence into a recoverable delivery handoff
7
7
 
8
8
  Delivery closes the local Change; readiness grants no commit, push, tag, publish, or deploy authority.
9
9
 
10
+ ## Route modes
11
+
12
+ | Mode | Entry | Observable exit | Next |
13
+ |---|---|---|---|
14
+ | `reconcile` | Explicit invocation or a valid Execution Grant for a tested active Change | Intent, implementation, specifications, documentation, evidence, and report agree, or changed files make the exact stale evidence visible | Recommend `ultra-test/reaudit` after changes, otherwise recommend explicit `ultra-deliver/finalize` |
15
+ | `finalize` | Current explicit owner invocation only | Fresh transport/evidence checks pass, version and package posture are owner-set, `delivery.md` is written, and the Change is locally archived | Report `idle` plus every separately authorized or unfinished release effect |
16
+
17
+ Follow `../ultra-status/references/route-contract.md`. Show a Route Card at entry, after
18
+ reconciliation, before the finalization checkpoint, and after archive or any stop.
19
+ Grant-aware continuation ends with `reconcile`; no Host metadata bit, report, or grant
20
+ turns `finalize` into an implicit mode.
21
+
10
22
  ## Before you start
11
23
 
12
- 1. Resolve exactly one active `change_id`. Read `.ultra/tasks.json`; every matching task
13
- must be complete. Read each `context_file`'s Completion and closing Resume Note.
14
- 2. Read `CONTEXT.md`, relevant `.ultra/decisions/`, active Change intent and evidence.
15
- 3. Read `.ultra/test-report.json`, then run the Test Skill's `worktree_digest.cjs` with
24
+ 1. If model-selected, verify the live execution grant in `../ultra-change/references/execution-grant.md` — a current session-local activation or a stably verified durable work-package grant; without either, stop. A model-selected Deliver run under that grant may reconcile, review, and report, and then MUST stop before finalization: its inputs, writes, and effects end at the report. Only a current explicit owner invocation of `ultra-deliver` may finalize — writing `delivery.md`, deciding the version decision and package posture, and archiving the stable Change id with `git mv` are owner-invocation-only in every grant mode, and a grant never covers them.
25
+ 2. Read `../ultra-change/references/change-contract.md` and apply its **Active Change
26
+ authority resolution** before reading any active `intent.md` or resolving a current
27
+ `change_id`. This workflow requires its one valid active authority; any zero result
28
+ or typed diagnostic stops before finalization input is read until the stated repair
29
+ or retry succeeds. Read `.ultra/tasks.json`; every matching task must be `completed`
30
+ in that sole task-status authority. Read each `context_file`'s Completion, Task
31
+ Review, and closing Resume Note. For every current Change task,
32
+ require current `ultra-task-evidence-v2` and task-review provenance under
33
+ `../ultra-plan/references/task-evidence-v2.md`, already consumed by the current Test
34
+ report. A legacy context Status or Complexity header and v1 evidence are migration
35
+ diagnostics only and cannot support current delivery.
36
+ 3. Read `CONTEXT.md`, relevant `.ultra/decisions/`, active Change intent and evidence.
37
+ Validate `.ultra/north-star.md`; resolve every recorded `FP-*`, `NS-*`, and `HC-*`
38
+ for the delivered Change, tasks, findings, and dispositions against that accepted
39
+ authority. Compare the active Change's recorded **North Star revision** and
40
+ **North Star digest** with the accepted file's revision and current Git blob digest. Any
41
+ missing ID or mismatch stops finalization and recommends explicit owner invocation of
42
+ `ultra-change` for reconciliation; delivery never silently rewrites the trace.
43
+ 4. Read `.ultra/test-report.json`, then run the Test Skill's `worktree_digest.cjs` with
16
44
  project root and `--change-id`. Require report `task_ids` for the current Change plus
17
- matching `change_id`, `git_commit`, worktree digest, and intent digest; otherwise stop.
45
+ matching `change_id`, `git_commit`, worktree digest, intent digest, and review
46
+ `admission_digest`, `subject_digest`, and `summary_digest`; otherwise stop. Recheck
47
+ each projected task's declared review branch as recorded: strict-v4 items keep their
48
+ strict receipt and transport bindings, while `external-manual` items reverify their
49
+ receipt bytes and digest through the task-evidence sensor's
50
+ `--verify-external-receipt` mode and take the sensor's `--projection` output
51
+ verbatim — a strict SUMMARY never substitutes for an external receipt and neither
52
+ branch is rewritten into the other.
53
+ The product-worktree digest has one fixed boundary: it excludes `.ultra/evidence/**`,
54
+ whose command and external-observation entries bind raw bytes as
55
+ `raw_evidence_sha256` before stable exact record bytes are bound as `evidence_digest`
56
+ through the report's ordered `task_evidence` projection. For each projected record,
57
+ take every `raw_evidence_ref` to bounded stable repository-contained bytes from an
58
+ ordinary regular non-symlink file opened nonblocking and no-follow, with an 8 MiB
59
+ ceiling and path/descriptor identity checks around the read. Recompute
60
+ `raw_evidence_sha256` and require an exact match, then recompute the stable exact
61
+ `evidence.json` bytes as `evidence_digest` before comparing the projection. Recheck
62
+ the exact review receipts separately; never treat the product exclusion as permission
63
+ to ignore evidence drift or add another exclusion.
64
+ An intent digest changed by North Star reconciliation or any other intent edit always
65
+ requires a fresh `ultra-test` before Deliver can finalize, even if product bytes did
66
+ not change.
67
+ 5. Preserve every typed acceptance authority. The owner alone supplies the semantic
68
+ result for `owner-judgment`; Deliver may verify its cited source and freshness but no
69
+ model, command, digest, schema, or validator may replace it.
18
70
 
19
71
  ## Definition of done
20
72
 
21
73
  - Outcome, specs, tests, aggregate review, and every document match the actual diff.
22
74
  - Every changed export has a non-test consumer or a recorded owner disposition.
23
75
  - Every omitted stage is explicitly recorded with its evidence-based rationale.
76
+ - Delivery explains whether evidence realizes the traced first principles and outcome,
77
+ and preserves contradictions or stale trace as findings instead of mirroring or
78
+ silently revising North Star prose.
24
79
  - Build and release checks have exact commands and real results.
25
80
  - The Change is archived with `git mv`, and rollback remains a normal Git operation.
26
81
 
@@ -28,6 +83,12 @@ Delivery closes the local Change; readiness grants no commit, push, tag, publish
28
83
 
29
84
  Follow `../ultra-review/SKILL.md` across the aggregate Change; refactor only observed
30
85
  duplication, coupling, or boundary defects. Rerun affected checks and refresh the report.
86
+ After the aggregate review and the current Test report are consumed, Deliver does not
87
+ refactor product source: it reconciles delivery artifacts and documentation only. A
88
+ post-approval implementation issue routes as at most one new owner-approved Dev task
89
+ for a P0/P1, or as recorded backlog and residual risk for P2/P3; an unbounded
90
+ Test ↔ Deliver bounce is not a valid recovery path, and any re-entry through Test
91
+ requires an explicit owner disposition.
31
92
 
32
93
  ## Reconcile the handoff
33
94
 
@@ -51,11 +112,33 @@ Delivery has two observable passes, not a hidden state machine:
51
112
  specifications, maintained documentation, or `intent.md`, stop after writing the
52
113
  reconciled files. The existing report is stale; recommend `ultra-test` and make no
53
114
  delivery or release claim.
54
- 2. After an unchanged pass or fresh Test, recheck Change/task/HEAD/product/intent
55
- identities. Apply the gate, run build and non-publishing package inspection, determine
56
- version impact, and use `references/baseline-reconciliation.md` for canonical
57
- `delivery.md`. Archive the Change. Excluded delivery metadata and the directory move
58
- cannot self-invalidate the product digest; intent stays independently bound.
115
+ 2. After an unchanged pass or fresh Test, resolve the report's canonical
116
+ `review.summary_ref` as `<validated-summary-path>` and run the current strict transport
117
+ consumer against the current report:
118
+
119
+ `node <ultra-test-skill-dir>/scripts/validate_review_transport.cjs --summary <validated-summary-path> --report .ultra/test-report.json`
120
+
121
+ Require exit 0 and a JSON `"valid": true` field. This one existing consumer verifies
122
+ the exact
123
+ retained `ADMISSION.json` and `SUMMARY.json`, then binds the report's
124
+ `admission_digest`, `subject_digest`, and `summary_digest` to those bytes. A missing or
125
+ invalid receipt, summary, or binding makes the current Test claim `INCOMPLETE`: start
126
+ a fresh Review and Test. Do not write `delivery.md`, archive the Change, create a
127
+ release package, or make a delivery claim while that receipt evidence is missing or
128
+ invalid. Never use `--legacy-v4` for this current-session check; v3 and pre-admission
129
+ v4 are read-only historical evidence, not current Test or Deliver evidence.
130
+
131
+ After the transport succeeds, recheck Change/task/HEAD/product/intent identities.
132
+ Apply the gate, run build and non-publishing package inspection, determine version
133
+ impact, and use `references/baseline-reconciliation.md` for canonical `delivery.md`.
134
+ Archive the Change. Excluded delivery metadata and the directory move cannot
135
+ self-invalidate the product digest; intent stays independently bound. Retain the
136
+ review session through this successful Deliver consumption; only then may its derived
137
+ artifacts be garbage-collected.
138
+
139
+ Transport and task-evidence validators establish exact structural, identity,
140
+ provenance, and freshness facts only. Their success never means that the Change is
141
+ semantically accepted or that its outcome is ready to describe as delivered.
59
142
 
60
143
  Do not draft a success narrative around stale evidence. A current `passed: false`
61
144
  report may still reach finalization only after every finding has an explicit owner
@@ -100,8 +183,12 @@ Without release authority, stop after the recoverable local archive and report i
100
183
 
101
184
  ## References
102
185
 
186
+ - `../ultra-change/references/change-contract.md` — canonical Active Change authority resolution.
103
187
  - `../ultra-review/SKILL.md` — read before aggregate review and refactoring.
188
+ - `../ultra-plan/references/task-evidence-v2.md` — canonical current task evidence and task-review contract.
104
189
  - `../ultra-think/SKILL.md` — read when version or release posture is a consequential
105
190
  trade-off rather than an established repository rule.
106
191
  - `../ultra-think/references/autonomy-boundary.md` — read before scope or evidence shrinks.
192
+ - `../ultra-change/references/execution-grant.md` — read only for grant-activated continuation.
193
+ - `../ultra-status/references/route-contract.md` — owner-visible route, checkpoint, and recovery output.
107
194
  - `references/baseline-reconciliation.md` — exact `delivery.md` reconciliation contract.