ultra-builder-pro-cli 0.24.0 → 0.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "kind": "ultra-team-task-ledger",
3
- "schema_version": "1.0",
3
+ "schema_version": "2.0",
4
4
  "generation": 0,
5
5
  "parent_digest": null,
6
6
  "ancestors": [],
7
- "state_digest": "5bf27fb3627b711c97abf72f0aad150ba693d35bcebdd57c2d80e325f495de6d",
7
+ "state_digest": "88098433d797125bb0f87068a01205cf378494169ca93ee2a9dcf15c1c83dd63",
8
8
  "published_at": null,
9
9
  "reason": "scaffold",
10
10
  "baseline": null,
11
11
  "changes": [],
12
+ "decisions": [],
13
+ "checkpoints": [],
12
14
  "tasks": []
13
15
  }
package/CHANGELOG.md CHANGED
@@ -7,6 +7,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.24.2] — 2026-07-31
11
+
12
+ ### Changed
13
+
14
+ - Made the production Change facade single-mode and Kernel-only. The pre-v0.24
15
+ Change implementation is explicitly isolated for compatibility, while retired
16
+ workflow and dialogue rows remain read-only history with no public artifact owner
17
+ or invalidation writer.
18
+ - Made review and debug agents evidence-only: delegated workers can write only their
19
+ assigned report, while the primary host owns source remediation and final judgment.
20
+
21
+ ### Fixed
22
+
23
+ - Preserved rejected semantic calls as bounded `ultra_kernel_attempt` audit history
24
+ visible through `ultra.context`, without creating the rejected semantic authority.
25
+ - Renamed misleading `_ultra.state_commit` response metadata to
26
+ `_ultra.projection_commit`; projection processing no longer resembles a semantic
27
+ acceptance receipt.
28
+ - Removed current Change-packet decisions and artifact invalidation from retired
29
+ workflow/dialogue tables while retaining safe migration and historical reads.
30
+
31
+ ## [0.24.1] — 2026-07-31
32
+
33
+ ### Changed
34
+
35
+ - Kept semantic completeness, route selection, baseline sufficiency, and delivery
36
+ acceptance in Skills and the host model. The MCP kernel now records those conclusions
37
+ as advisory diagnostics while retaining hard failures only for structural authority,
38
+ current bytes, digests, scope ownership, concurrency, permissions, and recovery.
39
+ - Made local delivery follow the evidence required by the actual Change route. Explicit
40
+ omissions and their rationale are preserved without imposing a fixed
41
+ Plan/Dev/Test/Review sequence on every archive.
42
+ - Made completed Tasks explicitly reopenable without erasing their prior completion
43
+ commit or accepted history.
44
+
45
+ ### Fixed
46
+
47
+ - Fixed nonexistent or mismatched Task/Change checkpoint scopes creating ghost
48
+ checkpoint authority; invalid scopes now fail before any Context or checkpoint write.
49
+ - Fixed shallow or contradictory evidence declarations being accepted without checking
50
+ current managed artifact authority and stable file bytes.
51
+ - Fixed baseline semantic gaps, missing optional research, and `not_run` verification
52
+ being misrepresented as mechanical authority failures.
53
+ - Fixed installed Change revision paths depending on source-only semantic supervisor
54
+ modules excluded from the npm package.
55
+ - Fixed Hooks, Skills, templates, and packaged documentation disagreeing about advisory
56
+ diagnostics, adaptive delivery, and the persistence/safety-kernel boundary.
57
+
10
58
  ## [0.24.0] — 2026-07-30
11
59
 
12
60
  ### Added
package/README.md CHANGED
@@ -48,8 +48,10 @@ Ultra Builder Pro addresses those gaps with four ideas:
48
48
  recovery state across host sessions. Tracked semantic artifacts plus the
49
49
  MCP-published `.ultra/tasks/tasks.json` checkpoint carry reviewed project intent
50
50
  across Git checkouts without committing SQLite, leases, or telemetry.
51
- 4. **Convergent delivery.** Research, plans, implementation, tests, review, and
52
- specification updates must agree before a change is archived.
51
+ 4. **Adaptive delivery.** The host model evaluates the evidence produced by the
52
+ actual Change route, explicitly records any omitted capability and its rationale,
53
+ and asks the owner to accept the local handoff. MCP validates current managed
54
+ authority and archive integrity rather than requiring a fixed stage sequence.
53
55
 
54
56
  For example, if the user asks an agent to add organization SSO to an existing
55
57
  application, Ultra helps the agent inspect the real authentication path, capture
@@ -103,14 +105,14 @@ The responsibility split is deliberate:
103
105
  |---|---|
104
106
  | **User** | Product intent, semantic route selection, material scope and trade-offs, risk acceptance, destructive actions, publishing and deployment authorization |
105
107
  | **Host model** | Fact-finding, synthesis, research-coverage and route recommendations, reversible implementation decisions |
106
- | **Ultra MCP** | Structure validation, durable checkpoints, evidence references, digests, team sync, leases, archive transactions, and mechanical recovery; never semantic route selection |
108
+ | **Ultra MCP** | Structure/current-byte validation, caller-declared checkpoints, evidence references, digests, team sync, leases, archive transactions, and mechanical recovery; never semantic completeness or route selection |
107
109
  | **Host adapter** | Native Skill discovery, user questions, tool invocation, installation, and runtime wiring |
108
110
  | **Hooks** | Fast lifecycle observation, current breadcrumb injection, and protection of MCP-owned checkpoint and generated projection paths |
109
111
 
110
- The MCP does not replace the model's judgment or pre-authorize a semantic route. It
111
- reports draft diagnostics and commits accepted checkpoints. A hook does not decide
112
- product strategy. A prompt does not become durable authority merely because it
113
- appeared in a conversation.
112
+ The MCP does not replace the model's judgment, judge completion, or pre-authorize a
113
+ semantic route. It reports diagnostics and safely commits the model's explicit
114
+ checkpoint/archive handoff. A hook does not decide product strategy. A prompt does not
115
+ become durable authority merely because it appeared in a conversation.
114
116
 
115
117
  ### The seven-tool MCP kernel
116
118
 
@@ -120,16 +122,21 @@ The public model-facing surface is intentionally small:
120
122
  |---|---|
121
123
  | `ultra.context` | Read the complete current spine without side effects |
122
124
  | `ultra.record` | Batch typed draft facts and events with idempotency |
123
- | `ultra.checkpoint` | Attempt one semantic stage checkpoint; rejection leaves the draft editable |
125
+ | `ultra.checkpoint` | Commit one caller-declared stage checkpoint after structural, byte, digest, and publication validation |
124
126
  | `ultra.sync` | Inspect, import, or publish the Git team checkpoint |
125
127
  | `ultra.session` | Own the transactional execution lease |
126
- | `ultra.archive` | Converge and archive through the recoverable filesystem/DB boundary |
128
+ | `ultra.archive` | Persist one explicit local delivery handoff through the recoverable filesystem/DB boundary |
127
129
  | `ultra.doctor` | Inspect or repair mechanical health, backup first |
128
130
 
129
131
  Retired fine-grained operation names are neither discoverable nor callable. Workflow
130
132
  prose stays in Skills, model judgment stays with the host, and SQLite records what
131
133
  happened rather than deciding what the model is allowed to think next.
132
134
 
135
+ Rejected semantic attempts remain visible as bounded `ultra_kernel_attempt` audit
136
+ diagnostics in the next `ultra.context`; they do not create rejected authority.
137
+ `_ultra.projection_commit` describes only generated-view processing, never semantic
138
+ acceptance. The production Change API has no legacy/current mode switch.
139
+
133
140
  The enforcement gradient is:
134
141
 
135
142
  ```text
@@ -283,7 +290,7 @@ resolves observable facts itself and asks for material product decisions as
283
290
  needed. Once the evidence and specifications are accurate, the user approves
284
291
  the baseline.
285
292
 
286
- The common path after baseline approval is:
293
+ One common full-depth path after baseline approval is:
287
294
 
288
295
  ```text
289
296
  ultra-change
@@ -295,11 +302,14 @@ ultra-change
295
302
  -> ultra-deliver
296
303
  ```
297
304
 
298
- Each public workflow is explicitly invoked rather than auto-chained. Thinking and
299
- research coverage are adaptive, and verification depth is risk-selected, but every
300
- Change reaches a current plan, DB-backed task contract, and role-scoped context before
301
- development. “Direct Build” skips Research only; it does not bypass Plan, Task, or
302
- Context authority.
305
+ Each public workflow is explicitly invoked rather than auto-chained. The example is a
306
+ recommended route for a normal implementation Change, not an archive state machine.
307
+ Thinking and research coverage are adaptive, verification depth is risk-selected, and
308
+ the host may omit or repeat a capability when the actual Change makes that appropriate,
309
+ provided the delivery handoff names the omission and its rationale. Any implementation
310
+ task still requires a current plan, DB-backed task contract, and role-scoped context.
311
+ “Direct Build” skips Research only; it does not bypass Plan, Task, or Context authority
312
+ when development is performed.
303
313
 
304
314
  ### 2. Adopt an existing project
305
315
 
@@ -365,9 +375,12 @@ must be reconciled against the current Change authority.
365
375
 
366
376
  ### 4. Deliver and continue
367
377
 
368
- `ultra-deliver` verifies that implementation, acceptance evidence, testing,
369
- review findings, specification learning, and baseline reconciliation agree. It
370
- then archives the local Ultra change authority.
378
+ `ultra-deliver` asks the host model to assess the current managed evidence for the
379
+ route the Change actually took. The handoff explicitly records any omitted capability
380
+ and its evidence-based rationale; the owner decides whether that semantic packet is
381
+ sufficient. MCP then validates paths, digests, reconciliation structure, idempotency,
382
+ and recoverability before archiving the local Ultra change authority. It does not
383
+ require every Change to pass through a fixed Research/Plan/Dev/Test/Review sequence.
371
384
 
372
385
  Delivery does **not** grant permission to commit, push, publish, tag, deploy, or
373
386
  perform another external effect. Those actions remain separate and require the
@@ -396,6 +409,11 @@ recommends the next capability from current context and owner intent; SQLite doe
396
409
  encode the semantic route. Another public capability starts only after an explicit
397
410
  user command or skill invocation.
398
411
 
412
+ Review and debug agents are evidence-only workers. They may inspect the assigned
413
+ checkout and write their declared report, but they never edit source or commit
414
+ authority. The primary host evaluates the evidence, applies any repair, and records
415
+ the verified outcome.
416
+
399
417
  ### Command interaction graph
400
418
 
401
419
  Every solid handoff below means: the current capability returns context and checkpoint
@@ -430,11 +448,16 @@ flowchart TD
430
448
  PLAN --> DEV["ultra-dev<br/>one dependency-ready vertical task"]
431
449
  DEV --> TASKS{"More executable tasks?"}
432
450
  TASKS -->|"Yes"| DEV
433
- TASKS -->|"No"| TEST["ultra-test<br/>risk-selected formal verification"]
451
+ TASKS -->|"No"| ASSESS{"What evidence does this Change still need?"}
452
+ ROUTE -->|"Accepted handoff already has sufficient evidence"| DELIVER["ultra-deliver"]
453
+ ASSESS -->|"Risk-selected verification"| TEST["ultra-test<br/>risk-selected formal verification"]
454
+ ASSESS -->|"Independent review"| REVIEW["ultra-review<br/>specification fidelity and engineering quality"]
455
+ ASSESS -->|"Caller accepts current evidence and explicit omissions"| DELIVER
434
456
  TEST -->|"Failed or incomplete"| DEV
435
- TEST -->|"Passing"| REVIEW["ultra-review<br/>specification fidelity and engineering quality"]
457
+ TEST -->|"Review is warranted"| REVIEW
458
+ TEST -->|"Caller accepts current evidence and explicit omissions"| DELIVER
436
459
  REVIEW -->|"Changes required"| DEV
437
- REVIEW -->|"Approved"| DELIVER["ultra-deliver"]
460
+ REVIEW -->|"Approved"| DELIVER
438
461
  DELIVER --> ARCHIVE["Reconcile specifications<br/>apply the Change overlay and archive evidence"]
439
462
  ARCHIVE --> NEXT{"Continue"}
440
463
  NEXT -->|"Next outcome"| CHANGE
@@ -586,10 +609,10 @@ host's existing model session.
586
609
  any real conflict. Never edit `.ultra/tasks/tasks.json` by hand.
587
610
  - **A generated view disagrees with MCP:** trust `.ultra/.runtime/state.db`; never edit
588
611
  `.ultra/.runtime/projections/` by hand.
589
- - **A draft checkpoint is rejected:** use `ultra-status` to read the exact warnings
590
- and blockers, fix the same mutable draft, and retry. If the attempt is no longer
591
- relevant, leave it as history and open a new draft revision; no hidden workflow
592
- state must be cancelled first.
612
+ - **A draft checkpoint reports warnings:** the model keeps them visible and decides
613
+ whether to investigate, revise, defer with rationale, or accept. If a checkpoint is
614
+ rejected for a structural, digest, path, publication, or concurrency conflict, fix
615
+ the same mutable draft and retry; no hidden workflow state must be cancelled first.
593
616
  - **Kimi reports a native-module ABI error:** ensure an external Node.js 22+
594
617
  executable is available on `PATH`; the generated Kimi MCP launcher uses
595
618
  `env node`.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: code-reviewer
3
3
  description: Review an explicit diff or file set for consequential correctness, security, integration, test, and maintainability defects. Use for a bounded read-only review before commit, merge, or release.
4
- tools: Read, Grep, Glob, Bash, Write, Edit
4
+ tools: Read, Grep, Glob, Bash, Write
5
5
  model: opus
6
6
  maxTurns: 30
7
7
  skills:
@@ -34,10 +34,9 @@ evidence. Default to read-only analysis.
34
34
 
35
35
  ## Mutation boundary
36
36
 
37
- Do not edit during an ordinary review. If the parent explicitly assigns review and
38
- fix, modify only findings within the accepted scope, preserve unrelated changes, and
39
- rerun the checks invalidated by each edit. Judgment-heavy or scope-expanding fixes
40
- return to the primary agent for a decision.
37
+ Do not edit source. Write only the assigned evidence artifact. If remediation is
38
+ authorized, return the smallest verified repair instructions to the primary host,
39
+ which owns implementation and final judgment.
41
40
 
42
41
  Use the current checkout and parent-supplied packet only. Do not call Ultra MCP write
43
42
  tools. Return a concise review, not raw tool output.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: debugger
3
- description: Find the earliest incorrect state behind an error, test failure, or unexpected behavior and return a minimal verified fix when implementation is authorized.
4
- tools: Read, Write, Edit, Bash, Grep, Glob
3
+ description: Find the earliest incorrect state behind an error, test failure, or unexpected behavior and return bounded evidence plus a minimal verified remediation.
4
+ tools: Read, Write, Bash, Grep, Glob
5
5
  model: opus
6
6
  maxTurns: 40
7
7
  ---
@@ -24,14 +24,14 @@ that violates the intended contract.
24
24
  distinguishes it from alternatives.
25
25
  5. Test the hypothesis without broad refactoring. Record evidence that accepts or
26
26
  rejects it.
27
- 6. If implementation is authorized, write a regression test that fails for the
28
- observed defect, apply the minimum root-cause fix, and rerun focused and adjacent
29
- checks.
30
- 7. Report the symptom, evidence trail, root cause, changed files when any, exact
27
+ 6. Describe the smallest regression test and root-cause repair that the primary host
28
+ should apply. Do not edit source.
29
+ 7. Report the symptom, evidence trail, root cause, proposed files, exact diagnostic
31
30
  verification, and residual uncertainty.
32
31
 
33
- Do not change code when the assignment is diagnosis-only. Do not use a passing test
34
- from another checkout as evidence.
32
+ Write only the assigned evidence artifact. Do not change source, even when remediation
33
+ is authorized; the primary host owns implementation and final judgment. Do not use a
34
+ passing test from another checkout as evidence.
35
35
 
36
36
  If three distinct fix attempts expose different underlying failures, stop patching and
37
37
  return the evidence as an architectural boundary problem. For an Ultra incident, also
@@ -11,7 +11,7 @@ Ultra owns:
11
11
  `ultra-change`, `ultra-plan`, `ultra-dev`, `ultra-test`, `ultra-review`,
12
12
  `ultra-deliver`, `ultra-status`, and `ultra-doctor`;
13
13
  - four internal worker-rule Skills;
14
- - bounded review/debug workers;
14
+ - bounded evidence-only review/debug workers;
15
15
  - deterministic workflow Hooks;
16
16
  - exactly seven public MCP tools;
17
17
  - `.ultra` project authority, team sync, recovery, and the portable installer.
@@ -52,6 +52,12 @@ diagnostics and leaves the draft editable. Hard errors are limited to corruption
52
52
  unsafe paths, digest/CAS/lease conflicts, missing runtime prerequisites, permissions,
53
53
  and irreversible external effects.
54
54
 
55
+ A rejected semantic attempt is appended as `ultra_kernel_attempt` audit history and
56
+ appears alongside the next `ultra.context` envelope without changing its semantic
57
+ digest. It never creates the rejected semantic row or claims that authority was
58
+ committed. `_ultra.projection_commit` reports only the post-call generated-view cycle;
59
+ it is not a semantic acceptance receipt.
60
+
55
61
  ## Context Envelope
56
62
 
57
63
  Every Skill begins by reading `ultra.context` for the relevant stage and scope. The
@@ -95,15 +101,17 @@ If the host mode forbids interaction, leave the decision unresolved.
95
101
 
96
102
  ## Stage Checkpoints
97
103
 
98
- Skills describe adaptive evidence expectations; SQLite does not authorize a fixed
99
- step sequence. A stage has a mutable draft and immutable accepted revisions:
104
+ Skills describe adaptive evidence expectations and decide semantic sufficiency;
105
+ SQLite does not authorize a fixed step sequence or reinterpret the supplied verdict.
106
+ A stage has a mutable draft and immutable accepted revisions:
100
107
 
101
108
  ```text
102
109
  draft N -> accepted N -> superseded by accepted N+1
103
110
  ```
104
111
 
105
- Warnings and semantic gaps do not lock a draft. An accepted revision can be replaced
106
- by a later accepted revision without rewriting history.
112
+ Warnings and semantic gaps do not reject explicit acceptance. Structural, digest,
113
+ path, publication, and concurrency conflicts leave the draft mutable. An accepted
114
+ revision can be replaced by a later accepted revision without rewriting history.
107
115
 
108
116
  ## Worker handoff
109
117
 
@@ -119,9 +127,10 @@ The packet binds:
119
127
  - exact output path;
120
128
  - `packet_digest`.
121
129
 
122
- Workers may inspect and write only the declared output. They do not write SQLite,
123
- accept checkpoints, modify another worker's result, or decide final delivery. Output
124
- must echo `packet_digest`; the primary host verifies and records it.
130
+ Workers may inspect the assigned checkout and write only the declared evidence output.
131
+ They do not edit source, write SQLite, accept checkpoints, modify another worker's
132
+ result, or decide final delivery. Output must echo `packet_digest`; the primary host
133
+ verifies it, performs any source repair, and records the resulting evidence.
125
134
 
126
135
  ## Hook boundary
127
136
 
@@ -161,3 +170,8 @@ state.
161
170
 
162
171
  Every semantic file must have one writer, owner, consumer, digest, promotion gate, and
163
172
  archive rule as defined in `ARTIFACT-AUTHORITY.md`.
173
+
174
+ The production Change API has one Kernel behavior and exposes no legacy/current mode
175
+ switch. Pre-v0.24 workflow and dialogue rows remain read-only migration/audit history:
176
+ the public kernel cannot create workflow-owned artifacts or mutate those rows during
177
+ current invalidation.
@@ -43,7 +43,8 @@ There is no second semantic authority:
43
43
  - MCP owns structure validation, idempotency, digests, CAS, leases, safe paths,
44
44
  filesystem journals, recovery, and accepted checkpoints.
45
45
  - Hooks own deterministic observation and bounded injection only.
46
- - Agents receive one immutable Worker Packet and write only the declared output.
46
+ - Agents receive one immutable Worker Packet and write only the declared evidence
47
+ output; the primary host owns every source change and final judgment.
47
48
 
48
49
  SQLite never chooses the next capability and never requires a fixed sequence of
49
50
  reasoning steps. Semantic gaps appear in `diagnostics`, `warnings`, or
@@ -59,16 +60,18 @@ Every host discovers exactly seven tools:
59
60
  |---|---|
60
61
  | `ultra.context` | Side-effect-free, bounded Context Envelope read |
61
62
  | `ultra.record` | Typed, idempotent recording of facts, decisions, artifacts, tasks, outcomes, and observations |
62
- | `ultra.checkpoint` | Reversible draft validation and immutable accepted Stage Checkpoint |
63
+ | `ultra.checkpoint` | Caller-declared Stage Checkpoint with structural, scope, byte, digest, and publication validation |
63
64
  | `ultra.sync` | Inspect, migrate, import, or publish the Git team checkpoint |
64
65
  | `ultra.session` | Lease/worktree acquisition plus immutable Worker Packet handoff |
65
- | `ultra.archive` | Crash-safe delivery convergence and immutable archive |
66
+ | `ultra.archive` | Crash-safe caller-declared local handoff and immutable archive |
66
67
  | `ultra.doctor` | Mechanical diagnosis and backup-first repair |
67
68
 
68
69
  Retired fine-grained tool names are not registered and return `UNKNOWN_TOOL`. The
69
- source repository retains migration readers and regression fixtures for old authority,
70
- but those modules are excluded from the npm distribution and have no live public
71
- consumer.
70
+ source repository retains migration readers, an explicitly named internal Change
71
+ compatibility implementation, and regression fixtures for old authority. The
72
+ production Change facade exposes one Kernel behavior with no mode flag; retired
73
+ semantic supervisors are excluded from the npm distribution and no public call can
74
+ write their workflow/dialogue authority.
72
75
 
73
76
  ## Canonical Context Envelope
74
77
 
@@ -119,8 +122,10 @@ draft N -> accepted N -> superseded by accepted N+1
119
122
  ```
120
123
 
121
124
  There is no fixed step authorization table. Skills decide which evidence is relevant
122
- to the actual work. Checkpoint validation verifies declared facts, files, digests, and
123
- scope; an incomplete draft remains mutable.
125
+ and whether the actual work is semantically sufficient. Checkpoint validation verifies
126
+ declared facts, files, digests, scope, idempotency, and safe publication. Semantic
127
+ warnings remain recorded but do not prevent an explicit caller acceptance; a hard
128
+ authority conflict leaves the draft mutable.
124
129
 
125
130
  ### Worker Packets
126
131
 
@@ -128,6 +133,20 @@ Every delegated worker receives a digest-bound packet containing the exact Conte
128
133
  Envelope, accepted decisions, Git boundary, Task contract, acceptance, evidence
129
134
  references, output path, and output schema. The worker must echo `packet_digest`.
130
135
  Workers do not write SQLite or accept their own result.
136
+ Review and debug workers do not edit source; their only mutation is the assigned
137
+ evidence artifact, and the primary host applies any accepted remediation.
138
+
139
+ ### Rejected attempts and projection metadata
140
+
141
+ Semantic diagnostics do not disappear when a caller corrects and retries. A rejected
142
+ public call appends an `ultra_kernel_attempt` event containing the typed operation,
143
+ scope, idempotency key, blockers, and diagnostics without storing raw prompts or
144
+ creating the rejected semantic row. `ultra.context` exposes a bounded recent view of
145
+ that audit history alongside, but outside the digest-bound semantic envelope.
146
+
147
+ Server metadata uses `_ultra.projection_commit` only for the deterministic
148
+ post-mutation projection job. It must never be interpreted as proof that a semantic
149
+ record, checkpoint, or archive was accepted.
131
150
 
132
151
  ## `.ultra` storage planes
133
152
 
@@ -208,7 +227,9 @@ Contexts, and v0.22/v0.23 database and ledger authority.
208
227
  Migration is inspectable, exact-byte backup-first, transactional, and fail-closed on
209
228
  conflict. Old workflow and dialogue rows are retained as non-authoritative history;
210
229
  current Context, Decisions, Checkpoints, and the team ledger are rebuilt from verified
211
- facts. No user should edit SQLite or move a legacy file manually to recover.
230
+ facts. Current artifact invalidation may traverse legacy graph edges to reach a live
231
+ Task, but it never rewrites the legacy workflow row. No user should edit SQLite or move
232
+ a legacy file manually to recover.
212
233
 
213
234
  ## External boundaries
214
235
 
@@ -44,7 +44,7 @@ these surfaces independently owns all three roles.
44
44
  |---|---|---|
45
45
  | Owner | Goals, acceptance, non-goals, material choices, risk acceptance, and authorization for irreversible or external effects | Supply facts the checkout or runtime can establish directly |
46
46
  | Host model | Inspect evidence, recommend a route, ask only for unresolved owner choices, normalize the answer, call the owning write, update semantic artifacts, read back the result, and present the next recommendation | Fabricate evidence, infer owner authorization, or bypass mechanical safety |
47
- | Ultra MCP | Persist normalized inputs, validate structure and current digests, record facts and provenance, commit Stage Checkpoints, project local views, publish/import the Git checkpoint, and expose recovery | Choose product direction, prove a UI click, pre-authorize reasoning steps, force a semantic route, or replace model judgment |
47
+ | Ultra MCP | Persist normalized inputs, validate structure/current bytes/digests, record facts and provenance, commit caller-declared Stage Checkpoints, project local views, publish/import the Git checkpoint, and expose recovery | Judge semantic completeness, choose product direction, prove a UI click, pre-authorize reasoning steps, force a semantic route, or replace model judgment |
48
48
  | Host adapter | Render the shared interaction contract through the host-native question and tool surfaces | Become a second workflow authority |
49
49
  | Hook | Observe lifecycle, inject compact DB-derived recovery context, and protect MCP-owned checkpoint and generated projection paths | Select a semantic route or block ordinary development |
50
50
 
@@ -112,11 +112,13 @@ document's before/after digest, delta and acceptance references, verification, a
112
112
  verified consumer or explicit no-consumer reason. Standard and major delivery require
113
113
  one current reconciliation even when its document set is empty.
114
114
 
115
- `change.archive` preflights the complete target set before writing, applies overlay
116
- bytes through a recoverable local transaction, refreshes baseline digests, moves the
117
- complete Change root to its archive location, and rebinds registry paths. A conflict,
118
- crash, or DB failure must roll back or resume the whole packet; no subset is reported
119
- as delivered.
115
+ The Deliver Skill owns the evidence-based semantic handoff and records any deliberate
116
+ stage omission. `change.archive` does not infer completeness or require a fixed
117
+ Plan/Dev/Test/Review/Deliver sequence. It preflights the caller-declared target set
118
+ before writing, validates reconciliation structure, applies overlay bytes through a
119
+ recoverable local transaction, refreshes baseline digests, moves the complete Change
120
+ root to its archive location, and rebinds registry paths. A conflict, crash, or DB
121
+ failure must roll back or resume the whole packet; no subset is reported as delivered.
120
122
 
121
123
  ## Context and plan authority
122
124
 
@@ -141,7 +143,8 @@ A current plan is a Change-owned pair:
141
143
  task contracts.
142
144
 
143
145
  The Plan checkpoint selects both paths from the owning Change and accepts no arbitrary
144
- output path. It binds the JSON digest and the preceding `plan/planning` snapshot;
146
+ output path. The model owns decomposition and semantic coverage. MCP binds the JSON
147
+ digest and the preceding `plan/planning` snapshot;
145
148
  the artifact registry records both plan files with that context provenance. Publication
146
149
  preflights both path authorities and prior digests, rejects symlinked ancestors or
147
150
  targets, and journals the two file replacements so a registry or event failure restores
@@ -29,7 +29,7 @@ contract and adds stronger authority, recovery, or portability.
29
29
  | Development uses isolated Git work, TDD, verification, review, commit, and integration | `ultra-dev`, `session.*`, and the session runner create real worktrees and retain task/review/commit evidence | Preserved and strengthened. Process exit cannot complete a task; uncommitted or unintegrated worktrees cannot be deleted. |
30
30
  | Test checks wiring, acceptance, regression, build, performance, security, and failures | `ultra-test` emits a change-bound immutable report covering each applicable dimension | Preserved and strengthened with HEAD, context, task-set, and report-digest validation. |
31
31
  | Review challenges specification fidelity and engineering quality | `ultra-review` is a first-class stage with independent specification and engineering axes | Strengthened. A coordinated summary cannot replace either complete axis. |
32
- | Delivery verifies clean readiness, documentation, build, and evidence | `ultra-deliver` requires current tasks, test, review, learning resolution, reconciliation, a local archive, and an immutable report | Preserved and strengthened. Publish, deploy, push, and other external effects remain separate explicitly authorized operations. |
32
+ | Delivery verifies clean readiness, documentation, build, and evidence | `ultra-deliver` assesses the explicitly accepted evidence packet for the actual Change route, records deliberate omissions, reconciles current managed authority, and creates a recoverable local archive and immutable report | Preserved without a fixed stage gate and strengthened by path, digest, reconciliation, idempotency, and recovery validation. Publish, deploy, push, and other external effects remain separate explicitly authorized operations. |
33
33
  | Status restores the current workflow position | `ultra-status` reads DB authority, Git, sessions, artifacts, decisions, allowed transitions, and any hard recovery requirement | Strengthened. The host recommends the semantic route; projections and Prompt prose cannot override state. |
34
34
  | Thinking synchronizes owner and Agent intent | `ultra-think` plus `decision.*` persists one-question dialogue, non-ceremonial completion, and optional artifact checkpoints | Strengthened. Observable facts are resolved first; only load-bearing owner choices block. |
35
35
 
@@ -40,6 +40,8 @@ It does not grant lifecycle authority: external writers use the published observ
40
40
  allowlist, while lifecycle event
41
41
  names are emitted only inside the mutation that owns the corresponding state change.
42
42
  Consumers must verify mutable rows rather than infer success from an event name.
43
+ Rejected semantic calls are recorded as `ultra_kernel_attempt` observations and shown
44
+ by `ultra.context`; they do not create the rejected row or authorize a transition.
43
45
 
44
46
  ## 2. Connection discipline
45
47
 
@@ -80,7 +82,7 @@ resolve the mount/runtime constraint before retrying.
80
82
  | `decision_records` | MCP server through `ultra.record`; normalized accepted intent and applied references are stored, never UI receipts, prompts, or transcripts |
81
83
  | `stage_checkpoints` | MCP server through `ultra.checkpoint`; mutable drafts and immutable accepted/superseded revisions, never fixed reasoning steps |
82
84
  | `context_envelopes`, `worker_packets` | MCP server through `ultra.context`, `ultra.checkpoint`, and `ultra.session`; exact digest-bound handoff authority |
83
- | `decision_threads`, `decision_items`, `workflow_runs`, `workflow_steps` | legacy history retained for migration and audit; no current public writer or authorization role |
85
+ | `decision_threads`, `decision_items`, `workflow_runs`, `workflow_steps` | read-only legacy history retained for migration and audit; no current public writer, invalidation mutation, or authorization role |
84
86
  | `artifacts`, `artifact_edges` | MCP server through `ultra.record` and checkpoint-owned registration |
85
87
  | `context_snapshots`, `spec_learning_candidates`, `trace_links` | MCP server through `ultra.record` and `ultra.checkpoint` |
86
88
  | `incidents`, `projection_jobs`, `event_consumers`, `circuit_breaker` | MCP server; backup-first doctor recovery may perform only documented mechanical transitions |
@@ -124,6 +126,11 @@ performs semantic import, publication, or conflict selection.
124
126
  than the orchestrator's boot-time WAL detector.
125
127
  - **No raw SQL in command md files.** Commands call MCP tools or
126
128
  `ultra-tools …` subcommands; the SQL lives in `mcp-server/lib`.
129
+ - **No legacy authority mode switch.** Public Change callers use the single Kernel
130
+ facade. New workflow-owned artifacts and workflow/dialogue writes are rejected.
131
+ - **No semantic meaning in projection metadata.** `_ultra.projection_commit` means
132
+ only that the generated-view job was durably enqueued and processed; acceptance is
133
+ read from the typed tool result and current authority.
127
134
  - **No `vacuum` / `wal_checkpoint(TRUNCATE)` from inside a transaction.**
128
135
  Maintenance subcommands open their own connection.
129
136
 
@@ -15,19 +15,24 @@ flowchart TD
15
15
  RESEARCH --> THINK["ultra-think when a material decision remains"]
16
16
  THINK --> RESEARCH
17
17
  RESEARCH --> CHANGE["ultra-change"]
18
- CHANGE --> ROUTE{"Evidence sufficient?"}
19
- ROUTE -->|"No"| CR["bounded ultra-research"]
20
- CR --> PLAN["ultra-plan"]
21
- ROUTE -->|"Yes"| PLAN
18
+ CHANGE --> ROUTE{"What does this Change actually need?"}
19
+ ROUTE -->|"Evidence gap"| CR["bounded ultra-research"]
20
+ CR --> ROUTE
21
+ ROUTE -->|"Implementation"| PLAN["ultra-plan"]
22
22
  PLAN --> DEV["ultra-dev for one owned Task"]
23
23
  DEV --> MORE{"More executable Tasks?"}
24
24
  MORE -->|"Yes"| DEV
25
- MORE -->|"No"| TEST["ultra-test"]
25
+ MORE -->|"No"| ASSESS{"What evidence is still warranted?"}
26
+ ROUTE -->|"No implementation; current evidence is sufficient"| ASSESS
27
+ ASSESS -->|"Risk-selected verification"| TEST["ultra-test"]
28
+ ASSESS -->|"Independent review"| REVIEW["ultra-review"]
29
+ ASSESS -->|"Caller accepts current packet and explicit omissions"| DELIVER["ultra-deliver"]
26
30
  TEST -->|"implementation gap"| DEV
27
- TEST -->|"evidence accepted"| REVIEW["ultra-review"]
31
+ TEST -->|"review warranted"| REVIEW
32
+ TEST -->|"caller accepts evidence"| DELIVER
28
33
  REVIEW -->|"implementation issue"| DEV
29
34
  REVIEW -->|"contract issue"| PLAN
30
- REVIEW -->|"accepted"| DELIVER["ultra-deliver"]
35
+ REVIEW -->|"accepted"| DELIVER
31
36
  DELIVER --> CHANGE
32
37
  STATUS["ultra-status"] -.-> INIT
33
38
  STATUS -.-> CHANGE
@@ -35,10 +40,12 @@ flowchart TD
35
40
  DOCTOR -.-> CHANGE
36
41
  ```
37
42
 
38
- The graph is guidance, not database authorization. A quick, well-understood Change may
39
- skip extra research, but it still needs an explicit Plan, Task contract, Context,
40
- verification, review, and delivery evidence. `ultra-status` is read-only.
41
- `ultra-doctor` repairs mechanical authority only.
43
+ The graph is guidance, not database authorization. The host model selects the evidence
44
+ needed by the actual Change route and records every deliberate omission in the delivery
45
+ handoff. When implementation occurs, its Plan, Task contract, and Context remain
46
+ mandatory execution authority; Research, Test, and Review are used according to the
47
+ actual evidence and risk rather than as universal archive gates. `ultra-status` is
48
+ read-only. `ultra-doctor` repairs mechanical authority only.
42
49
 
43
50
  ## Shared command contract
44
51
 
@@ -99,10 +106,12 @@ draft revision N
99
106
  -> accepted revision N+1 supersedes N
100
107
  ```
101
108
 
102
- A failed acceptance returns diagnostics and keeps the same draft mutable. Plan export
103
- is part of Plan checkpoint publication, so changing a Task contract before acceptance
104
- cannot invalidate an already-recorded “export step.” There is no locked intermediate
105
- run to cancel or manually repair.
109
+ Semantic diagnostics remain recorded but do not reject the model's explicit
110
+ checkpoint conclusion. A structural, digest, path, publication, or concurrency
111
+ conflict keeps the same draft mutable. Plan export is part of Plan checkpoint
112
+ publication, so changing a Task contract before acceptance cannot invalidate an
113
+ already-recorded “export step.” There is no locked intermediate run to cancel or
114
+ manually repair.
106
115
 
107
116
  Accepted checkpoints are immutable evidence. New facts create a replacement draft.
108
117
  Only archive history is terminal; subsequent product work opens a new Change.
@@ -118,9 +127,11 @@ active -> archived
118
127
  ```
119
128
 
120
129
  `blocked`, `ready`, and `needs_attention` are derived diagnostics, not absorbing Change
121
- states. An active Change may be revised. Archive requires complete current Task,
122
- Context, test, review, documentation, and delivery checkpoints, then performs a
123
- recoverable filesystem/DB transaction. Archived bytes remain immutable.
130
+ states. An active Change may be revised. The Deliver Skill inspects the relevant Task,
131
+ Context, test, review, documentation, and delivery evidence, decides semantic
132
+ sufficiency, and records deliberate omissions. Archive validates the explicit handoff,
133
+ current authority, reconciliation structure, and safe recoverable filesystem/DB
134
+ transaction without enforcing a fixed stage sequence. Archived bytes remain immutable.
124
135
 
125
136
  Older `ready` or `blocked` rows are readable migration history. They do not authorize
126
137
  new work until migration/revalidation derives current checkpoint authority.
@@ -130,14 +141,18 @@ new work until migration/revalidation derives current checkpoint authority.
130
141
  Task durable outcomes remain portable:
131
142
 
132
143
  ```text
133
- pending -> completed
134
- |
144
+ pending -> in_progress -> completed
145
+ | | |
146
+ | -> blocked -> in_progress (explicit reopen)
135
147
  -> blocked
136
148
  -> cancelled
137
149
  ```
138
150
 
139
151
  `in_progress`, Worker ownership, leases, PIDs, heartbeats, worktrees, and completion
140
152
  commit backfill are checkout-local. They are not published to Git.
153
+ Reopening a completed Task clears the local completion/session fields, preserves the
154
+ prior completion commit in an append-only `task_reopened` event, and requires a new
155
+ durable outcome before it can be completed again.
141
156
 
142
157
  `ultra.session acquire` atomically:
143
158
 
@@ -210,6 +225,6 @@ Only these classes fail the tool call:
210
225
  - permission failure;
211
226
  - archive/publish/deploy or another irreversible external-effect failure.
212
227
 
213
- Evidence gaps, incomplete exploration, stale optional context, missing reports, or a
214
- checkpoint that is not yet ready are structured diagnostics. The model remains free to
215
- investigate, revise, and retry.
228
+ Evidence gaps, incomplete exploration, stale optional context, missing reports, or
229
+ other semantic insufficiency are structured diagnostics. The model remains responsible
230
+ for investigating, revising, accepting, or explicitly recording an omission.