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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ultra-builder-pro-cli",
3
- "version": "0.26.2",
4
- "description": "File-first Ultra Builder Pro workflows for Claude Code, OpenCode, Codex CLI, Kimi Code, and Grok Build.",
3
+ "version": "5.0.0",
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",
7
7
  "ubp": "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",
@@ -38,6 +39,7 @@
38
39
  "docs/DECISIONS.md",
39
40
  "docs/PLUGIN-ISOLATION-CONTRACT.md",
40
41
  "docs/RUNTIME-COMPAT-MATRIX.md",
42
+ "docs/evals/*.md",
41
43
  "!**/*.pyc",
42
44
  "!**/*.pyo",
43
45
  "!**/*.test.cjs",
@@ -50,6 +52,7 @@
50
52
  "codex",
51
53
  "kimi-code",
52
54
  "grok-build",
55
+ "zcode",
53
56
  "agent",
54
57
  "cli",
55
58
  "multi-runtime",
@@ -81,9 +84,10 @@
81
84
  "install:claude": "node bin/install.js --claude --local",
82
85
  "install:kimi": "node bin/install.js --kimi --global",
83
86
  "install:grok": "node bin/install.js --grok --global",
87
+ "install:zcode": "node bin/install.js --zcode --global",
84
88
  "install:all": "node bin/install.js --all --global"
85
89
  },
86
90
  "dependencies": {
87
- "js-yaml": "^4.1.0"
91
+ "js-yaml": "^4.3.1"
88
92
  }
89
93
  }
@@ -8,14 +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. List `.ultra/changes/active/`; more than one `intent.md` is a conflict, not a choice.
14
- One directory name is the stable `change_id`. Read `.ultra/tasks.json`, then only its
15
- unfinished `context_file` values. Update the same `change_id`; never open a second active Change.
16
- 2. Read `.ultra/project-brief.md`, `CONTEXT.md`, relevant `.ultra/decisions/`, and
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
32
+ resolution** before reading any active `intent.md`, relying on a current `change_id`,
33
+ or creating or writing a Change. Continue only from its positively observed stable
34
+ zero-or-one result; return its typed repair for any other result. With one active
35
+ Change, read `.ultra/tasks.json`, then only its unfinished `context_file` values.
36
+ Update the same `change_id`; never open a second active Change.
37
+ 3. Read `.ultra/project-brief.md`, `CONTEXT.md`, relevant `.ultra/decisions/`, and
17
38
  `.ultra/north-star.md` for raw provenance, accepted language, and direction.
18
- 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
19
40
  `delivery.md`; otherwise read `archive-summary.md`, `verification.md`, `intent.md`,
20
41
  and remaining Markdown. Read abandoned Changes as history of rejected boundaries and
21
42
  reusable evidence, never current intent. A missing `delivery.md` does not mean no history;
@@ -37,7 +58,8 @@ Test/Deliver claim for that micro change.
37
58
 
38
59
  ## Definition of done
39
60
 
40
- - Active `intent.md` states outcome, executable acceptance, non-goals, public seams,
61
+ - Active `intent.md` states outcome, typed acceptance with named required evidence,
62
+ non-goals, public seams,
41
63
  and Research Disposition.
42
64
  - Every reconciliation bucket is empty or dispositioned with the owner's answer.
43
65
  - The draft remains editable until owner acceptance makes it authority.
@@ -78,14 +100,27 @@ whole path is unclear, recommend Research instead of manufacturing tasks.
78
100
  Record `## Research Disposition` exactly. `none` needs enough evidence to plan;
79
101
  `bounded` or `required` names one question, selected lenses, and exit evidence. After
80
102
  Research, reconcile outputs here; an unverified path or bare claim is not evidence.
81
-
82
- A quick active Change still goes through one-task `ultra-plan`; once durable intent
83
- exists, that minimal task is what binds development, evidence, audit, and delivery to
84
- the stable `change_id`.
103
+ Record one `## North Star Trace` with resolving `FP-<n>`/`NS-<n>`/`HC-<n>` ids, causal
104
+ evidence, the accepted revision, the current Git blob digest, and any contradiction
105
+ requiring owner disposition. Reference IDs only; do not mirror North Star prose.
106
+
107
+ When Research accepts a revision whose id or digest differs from an active Change trace,
108
+ that active Change has a stale observation, not a semantic failure. Preserve its intent,
109
+ tasks, review, Test, and delivery evidence; reconcile old IDs to the accepted revision,
110
+ surface contradictions for owner disposition, and invalidate any plan-bound execution
111
+ approval through its own contract. Never silently rewrite the North Star or infer that a
112
+ replacement grants execution.
113
+
114
+ Every active Change still goes through `ultra-plan`; once durable intent exists, the
115
+ smallest evidence-backed task graph for its real seams binds development, review,
116
+ audit, and delivery to the stable `change_id`. The profile never fixes task or context
117
+ count.
85
118
 
86
119
  Output active `intent.md` under a stable id, justified specification patches, qualifying
87
120
  decision or vocabulary updates. For an evidence gap recommend `ultra-research`; when
88
- 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.
89
124
 
90
125
  ## Abandoning a Change
91
126
 
@@ -94,15 +129,37 @@ Append the exact `## Abandonment` closure from `references/change-contract.md`,
94
129
  evidence. Future Change and Status consume this history; it is neither current intent
95
130
  nor an orphan. Abandonment is the owner's call.
96
131
 
132
+ ## When the primary writer changes Agent
133
+
134
+ When the owner moves the canonical implementation authority of an active
135
+ work package to another Agent, follow `references/primary-transfer.md` exactly:
136
+ the sender writes current reality into the task context and its Resume Note,
137
+ derives the OFFER from canonical files and Git, and stops writing after the
138
+ receiver's ready ACK; the receiver stable-reads, verifies every digest, and
139
+ becomes the sole canonical writer. A delegated worker slice is never a
140
+ substitute — `ultra-delegate` owns the mutually exclusive bounded-worker path.
141
+ Validate receipts with
142
+ `scripts/validate_primary_transfer.cjs`; the report is structural observation,
143
+ never an acceptance.
144
+
97
145
  ## When the owner decides
98
146
 
99
147
  Every non-empty bucket, the Change boundary, abandonment, and anything
100
148
  reconciliation turns up that shrinks a prior commitment. A change that makes no
101
149
  specification sentence false needs no permission at all.
102
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
+
103
156
  ## References
104
157
 
105
158
  - `../ultra-grilling/SKILL.md` — the loop for settling the boundary.
106
- - `references/change-contract.md` — exact `intent.md` structure and profile fields.
159
+ - `references/change-contract.md` — canonical Active Change authority resolution, exact
160
+ `intent.md` structure, and profile fields.
161
+ - `references/execution-grant.md` — read when the owner requests bounded workflow continuation under a session-local or durable grant.
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.
107
164
  - `../ultra-think/references/autonomy-boundary.md` — read before removing a promise.
108
165
  - `../ultra-tdd/SKILL.md` — read for an evidenced one-slice correction.
@@ -7,6 +7,36 @@ The directory id is globally unique across active, archive, and abandoned Change
7
7
  matches `[A-Za-z0-9][A-Za-z0-9._-]*`. It is the stable `change_id`; moving the directory
8
8
  never changes it.
9
9
 
10
+ ## Active Change authority resolution
11
+
12
+ Every Skill that selects a current `change_id`, reads active intent, or creates a new
13
+ Change must first use native host filesystem checks to apply this instruction contract.
14
+ It is not a parser, registry, or persisted state.
15
+ A positively observed absent `.ultra` is the existing uninitialized condition:
16
+ `ultra-status` may recommend `ultra-init`, while writers write nothing. This known
17
+ absence is distinct from an unavailable observation. Otherwise:
18
+
19
+ 1. Require `.ultra`, `.ultra/changes`, and `.ultra/changes/active` to be a stable chain
20
+ of ordinary non-symlink directories with the same no-follow identities before and
21
+ after selection.
22
+ 2. Stable-list every active-root entry without following symlinks. Only `.gitkeep`,
23
+ when it is an ordinary regular non-symlink file, may be ignored. A `.gitkeep` of any
24
+ other type is malformed, is never a Change directory, and returns a typed diagnostic
25
+ with repair before any candidate intent is read. Every other non-directory or symlink
26
+ entry returns a typed diagnostic with a reachable repair before any intent read.
27
+ 3. A positively observed stable empty root, with or without that sole marker, means no
28
+ active Change. Active authority exists only when exactly one ordinary non-symlink
29
+ Change directory remains. More than one returns a typed conflict and repair; select
30
+ none of them.
31
+ 4. Require the selected directory's own `intent.md` to be a stable regular non-symlink
32
+ file opened with no-follow behavior. Capture one bounded snapshot, then recheck the
33
+ directory chain, active-root entries, selected directory, and intent identity before
34
+ consuming its contents.
35
+ 5. On any unavailable observation or changed identity, stop with a typed diagnostic and
36
+ reachable retry or repair. Do not read any intent, route from it, write any workflow
37
+ artifact, or create a new Change. Only a positively observed stable zero-directory
38
+ result permits `ultra-change` to create one.
39
+
10
40
  ## Exact `intent.md` structure
11
41
 
12
42
  ```markdown
@@ -21,7 +51,7 @@ never changes it.
21
51
  <one externally observable result>
22
52
 
23
53
  ## Acceptance
24
- | ID | Criterion | Verification | Trace |
54
+ | ID | Criterion | Verification type | Required evidence |
25
55
  |---|---|---|---|
26
56
 
27
57
  ## Non-goals
@@ -43,6 +73,28 @@ never changes it.
43
73
  - Required exit evidence: <what must exist or be resolved before planning>
44
74
  - Rationale: <why this is sufficient for this Change boundary>
45
75
 
76
+ ## North Star Trace
77
+ - First principles: <FP-<n> ids and the causal premise>
78
+ - Serves: <NS-<n> ids and the causal contribution>
79
+ - Touches: <HC-<n> ids, or none>
80
+ - Evidence: <repository-relative paths and claims>
81
+ - North Star revision: <accepted Revision field from `.ultra/north-star.md`>
82
+ - North Star digest: <output of `git hash-object .ultra/north-star.md`>
83
+ - Contradictions or refinements: <none, or the owner disposition still required>
84
+
85
+ ## Execution Grant
86
+
87
+ - Grant: `session-local` (default) | `durable work-package` <grant-id>
88
+ - Allowed workflows: <subset of research, plan, dev, test, deliver-reconcile>
89
+ - Agent topology: <single-Agent default, or the owner-selected providers, counts, and write scopes>
90
+ - Allowed local effects: <exact authorized local writes, tests, and bounded verification>
91
+ - Budgets and expiry: <time, cost, tool, provider, delegation, review-round ceilings and expiry>
92
+ - Mandatory reviews: <plan, task, and aggregate Change requirements>
93
+ - Stop conditions: <named semantic, evidence, recovery, and budget stops>
94
+ - Invalidation: <conditions that end the grant and return control to the owner>
95
+ - Never granted: <new Change, baseline checkpoint, finalization/archive, external effects, cross-family provider calls>
96
+ - Activation: <session-local: a current-session owner utterance approving this grant and the current task ledger; durable: stable verification of the recorded grant — stored text alone is inactive>
97
+
46
98
  ## Planning Posture
47
99
  <EXPAND | SELECTIVE | HOLD | REDUCE, rationale, and owner confirmation>
48
100
  <!-- Scope for this Change only. Not the commitment classification: REDUCE here
@@ -63,10 +115,11 @@ heading, and do not add another file that restates the same contract.
63
115
  ## Contract fields
64
116
 
65
117
  - `outcome`: one externally observable result.
66
- - `acceptance`: stable ids, one criterion each, and a `Verification` that is an
67
- **executable command** — something with an exit code, not a description of an
68
- intention. `curl -sf localhost:3000/health` qualifies; "check that the endpoint
69
- responds" does not.
118
+ - `acceptance`: stable ids, one criterion each, one verification type, and exact
119
+ required evidence. The supported types are `command`, `inspection`,
120
+ `owner-judgment`, and `external-observation`. When one outcome needs more than one
121
+ authority, split it into independent criteria with unique IDs and keep one
122
+ verification type per criterion. A row must not carry multiple verification types.
70
123
  - `non_goals`: explicit boundaries that prevent accidental scope growth.
71
124
  - `public_seams`: entry points or outputs through which acceptance is observed.
72
125
  - `recovery`: a bounded reversal or recovery strategy and its verification.
@@ -75,37 +128,50 @@ heading, and do not add another file that restates the same contract.
75
128
  Resolve every blocking decision before planning. Keep non-blocking uncertainty visible
76
129
  in the task and verification contracts.
77
130
 
78
- ## Why verification has to be executable
79
-
80
- A criterion whose verification cannot be run is not acceptance, it is a wish. Three
81
- consumers downstream depend on it being runnable:
82
-
83
- - task development can treat passing acceptance as an exit condition only when
84
- something can actually decide "passing";
85
- - the review tests lens maps each acceptance claim to executable evidence, and can
86
- only report an honest gap when there is something to map onto;
87
- - delivery cannot otherwise separate "shipped" from "believed shipped".
88
-
89
- Writing the command is also the cheapest way to find out that a criterion is vague.
90
- "The feature is wired up" resists a command until it becomes "this export has a
91
- non-test importer", which is a `grep`.
92
-
93
- Where a criterion is genuinely a judgement call — visual polish, wording, feel — it
94
- does not belong in Acceptance at all. Record it as a taste decision for the owner and
95
- keep Acceptance to what a machine can settle. Mixing the two is what makes an
96
- acceptance set undecidable.
131
+ `North Star Trace` is the Change-level semantic trace. `First principles`, `Serves`, and
132
+ `Touches` ids must resolve in `.ultra/north-star.md`; `Evidence` explains the causal
133
+ claim rather than merely naming the file. Revision and digest are freshness observations.
134
+ A mismatch returns the intent to reconciliation and never mechanically declares
135
+ alignment or contradiction. Preserve historical evidence while reconciliation maps old
136
+ IDs, records contradictions, and obtains any material owner disposition.
137
+
138
+ Every Change records an `Execution Grant`; `session-local` is the default and a
139
+ durable grant requires an exact owner record. The exact mode behavior,
140
+ activation, and durable-verification rules live in `execution-grant.md`. The
141
+ grant bounds native model continuation; it is not persisted route authority.
142
+
143
+ ## Why verification has to name its authority
144
+
145
+ Acceptance is only auditable when the observation and its authority are explicit:
146
+
147
+ - `command` records the exact command, working directory, exit status, and retained raw
148
+ output reference;
149
+ - `inspection` cites the exact file, revision or digest, and the observed fact;
150
+ - `owner-judgment` cites the durable owner disposition without replacing it with a
151
+ machine proxy; only the owner can supply its semantic result;
152
+ - `external-observation` records the provider or environment, run identity, observation
153
+ time, and retained raw result.
154
+
155
+ Development, Review, Test, and Deliver may verify that the required evidence exists,
156
+ is fresh, and is bound to the criterion. They must not turn a command exit code, regex,
157
+ digest, or schema result into a semantic verdict for an inspection, owner judgment, or
158
+ external observation. Missing or stale evidence returns a typed gap to the responsible
159
+ model or owner; it never silently deletes the criterion or manufactures acceptance.
160
+ A validator owns exact structure, identity, and provenance only; validator success is
161
+ never a semantic pass.
97
162
 
98
163
  ## Profile
99
164
 
100
- - `quick`: one low-risk task, no material risk flags, and no research dependency.
101
- - `standard`: a bounded change with multiple tasks or ordinary integration risk.
165
+ - `quick`: a bounded low-risk change with no material risk flags and no research dependency.
166
+ - `standard`: a bounded change with ordinary integration risk.
102
167
  - `major`: a broad or consequential change with material contract, migration,
103
168
  authorization, security, multi-module, external-integration, or release impact.
104
169
  - `incident`: urgent diagnosis and recovery with a reproducible symptom. Baseline
105
170
  break-glass still requires a recorded approver and recovery contract.
106
171
 
107
172
  Record a profile rationale and every applicable risk flag. Select the smallest profile
108
- whose guarantees cover the real blast radius; never use profile labels as estimates.
173
+ whose guarantees cover the real blast radius; never use profile labels to prescribe a
174
+ task count, file count, review effort, or estimate.
109
175
 
110
176
  ## Research Disposition
111
177
 
@@ -0,0 +1,109 @@
1
+ # Change-scoped execution grants (session-local or durable)
2
+
3
+ Use this reference only after the owner has accepted one active Change and wants
4
+ an Agent to continue through a bounded local execution segment. The host's
5
+ native model-tool loop is the executor; repository authority and ordinary
6
+ workflow contracts remain unchanged.
7
+
8
+ Ultra Builder Pro 3.0 has exactly two grant modes. Choosing a duration is not
9
+ choosing a second product:
10
+
11
+ - **Mode A — `session-local`** (the default): the owner's authorization lives
12
+ only in the current conversation. A fresh Agent may read the files for
13
+ context, but must obtain a new activation from the owner before continuing.
14
+ When the conversation activation is lost — a fresh session, another host, or
15
+ compaction — the work stops.
16
+ - **Mode B — `durable work-package`**: the owner explicitly issues an exact
17
+ grant so one named work package can continue across sessions, hosts, and
18
+ compaction. A fresh Agent or host may continue that package only after
19
+ stably verifying the recorded grant.
20
+
21
+ Neither mode grants finalization or archive: writing `delivery.md`, deciding
22
+ version or package posture, and moving a Change to archive always require a
23
+ current explicit owner invocation, in every mode.
24
+
25
+ ## What a grant is not
26
+
27
+ - A grant is not inferred from task status, progress records, prose, Hook
28
+ output, Resume notes, or a stored quote. Stored grant text is inactive data
29
+ until a consuming Agent verifies it.
30
+ - A grant never includes external or irreversible effects by default: commit,
31
+ push, tag, publication, deployment, real installation, credentials, and
32
+ incremental provider spend each require their own current owner
33
+ authorization, even under a durable grant.
34
+ - A grant is not a daemon, scheduler, or auto-wake: it answers "may this
35
+ continued work proceed", not "who runs next".
36
+ - An Agent cannot create, widen, or extend its own grant. A topology or scope
37
+ change returns to the owner.
38
+
39
+ ## Session-local activation
40
+
41
+ All of these must be true:
42
+
43
+ - the active `intent.md` is accepted and its North Star Trace is current;
44
+ - the same session contains an explicit owner utterance naming the grant and
45
+ approving the current task ledger;
46
+ - the next workflow is listed under `Allowed workflows` and remains inside every
47
+ budget;
48
+ - the model can still point to that utterance in current conversation context.
49
+
50
+ After a fresh session, a different host, or compaction that no longer contains
51
+ the activation, stop and ask the owner to re-activate after `ultra-status`
52
+ reconstructs the files.
53
+
54
+ ## Durable grant verification
55
+
56
+ Before relying on a recorded `durable work-package` grant, a fresh Agent must
57
+ stably verify, from the repository alone:
58
+
59
+ 1. the grant record's exact bytes and its cited accepted-design digest (for
60
+ example the SHA-256 recorded in the owner decision);
61
+ 2. the repository identity and base HEAD the grant names;
62
+ 3. the current work-package status (the implementation WIP or Change intent);
63
+ 4. the grant's subject, scope, Agent topology, allowed local effects,
64
+ budgets/expiry, review budget, invalidation, and revocation clauses;
65
+ 5. that no invalidation condition has fired.
66
+
67
+ Any mismatch, ambiguity, or unknown stops the work and returns to the owner.
68
+ Handoff passes the grant identity (path and digest); it never copies a new
69
+ authorization prose into a second file.
70
+
71
+ ## Continuing the native loop
72
+
73
+ After one workflow reaches its own observable completion, reread the intent,
74
+ ledger, current evidence, review results, and budgets. If no stop condition
75
+ applies, select the next covered workflow through the host's native Skill
76
+ surface. Run one ready task at a time; never parallelize canonical writes. When
77
+ the owner has not selected a multi-Agent topology, the current Agent continues
78
+ alone: no automatic spawning, delegation, or control-plane enablement.
79
+
80
+ A grant-covered Deliver run may reconcile, review, and report, and then stops
81
+ before finalization: its inputs, writes, and effects end at the report. Only a
82
+ current explicit owner invocation of `ultra-deliver` may write `delivery.md`,
83
+ decide version or package posture, or archive the Change.
84
+
85
+ Do not add a route ledger or progress authority. Task status, existing
86
+ evidence, review artifacts, the Test report, and Git remain the observations
87
+ the model interprets.
88
+
89
+ ## Budgets, stops, and termination
90
+
91
+ Each budget is a hard ceiling and a resource observation, never evidence of
92
+ semantic completion. Stop immediately for a REDUCTION, a North Star
93
+ contradiction or stale trace, an unmet owner checkpoint, `Stalled` or
94
+ `Unreachable` development, a disputed or unresolved P0/P1 finding,
95
+ residual-risk acceptance, task-graph drift, lost activation (session-local) or
96
+ failed grant verification (durable), or budget exhaustion. Report completed
97
+ evidence and the cheapest safe next action.
98
+
99
+ A grant never authorizes a new Change, a baseline acceptance, scope or risk
100
+ acceptance, finalization or archival, external or irreversible effects, or
101
+ cross-family provider calls beyond its recorded topology. Review terminates
102
+ under the accepted convergence contract, and its precedence is one rule: an
103
+ exact current owner grant overrides the versioned product default of
104
+ one initial review plus at most two
105
+ P0/P1 delta reviews per coherent work package.
106
+ P2/P3 findings are reported and never auto-repaired, no budget extends itself,
107
+ and the same root cause surviving three failed fixes stops point-patching and
108
+ reports an architecture problem. Existing host permission and destructive-effect
109
+ guards remain in force.