ultra-builder-pro-cli 0.19.1 → 0.20.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.20.0] — 2026-07-28
11
+
12
+ ### Added
13
+
14
+ - Added schema 19 and `decision.complete` so settled normalized intent reaches a
15
+ terminal lifecycle state without fabricating a second user approval or an
16
+ artifact checkpoint. Existing settled schema-18 threads migrate safely.
17
+
18
+ ### Changed
19
+
20
+ - Unified semantic selection across Claude Code, Codex, OpenCode, and Kimi Code
21
+ as `inspect -> suggest -> ask if unresolved -> normalize -> persist`, using
22
+ each host's native structured question surface with a direct-question
23
+ fallback.
24
+ - Made research coverage and planning posture owner-selected after model
25
+ recommendation while preserving autonomous fact finding, synthesis,
26
+ decomposition, and reversible implementation judgment.
27
+ - Stopped requiring a ceremonial decision checkpoint after every normalized
28
+ answer. Artifact checkpoints remain explicit digest-bound freshness gates.
29
+ - Made unanswered non-blocking follow-ups advisory instead of global workflow
30
+ gates; unanswered blocking choices and blocking deferrals still fail closed.
31
+
10
32
  ## [0.19.1] — 2026-07-26
11
33
 
12
34
  ### Fixed
@@ -817,7 +839,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
817
839
  skill manifest, CLI protocol + mapping table; 5 spec validators.
818
840
  - **Phase 0 — skeleton**: multi-runtime installer scaffolding.
819
841
 
820
- [Unreleased]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.19.1...HEAD
842
+ [Unreleased]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.20.0...HEAD
843
+ [0.20.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.19.1...v0.20.0
821
844
  [0.19.1]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.19.0...v0.19.1
822
845
  [0.19.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.18.0...v0.19.0
823
846
  [0.18.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.17.1...v0.18.0
package/README.md CHANGED
@@ -73,8 +73,8 @@ The responsibility split is deliberate:
73
73
 
74
74
  | Owner | Responsibility |
75
75
  |---|---|
76
- | **User** | Product intent, material scope and trade-offs, destructive actions, publishing and deployment authorization |
77
- | **Host model** | Fact-finding, synthesis, research coverage, route recommendation, reversible implementation decisions |
76
+ | **User** | Product intent, semantic route selection, material scope and trade-offs, risk acceptance, destructive actions, publishing and deployment authorization |
77
+ | **Host model** | Fact-finding, synthesis, research-coverage and route recommendations, reversible implementation decisions |
78
78
  | **Ultra MCP** | Durable state, evidence references, digests, freshness, locks, valid transitions and hard recovery |
79
79
  | **Host adapter** | Native Skill discovery, user questions, tool invocation, installation, and runtime wiring |
80
80
  | **Hooks** | Fast lifecycle observation, current breadcrumb injection, and protection of generated projections |
@@ -189,7 +189,7 @@ Initialization:
189
189
  - identifies the repository root and scope;
190
190
  - classifies the repository as greenfield, brownfield, or migrated;
191
191
  - initializes Git when needed;
192
- - creates `.ultra/` and schema 18 project authority;
192
+ - creates `.ultra/` and schema 19 project authority;
193
193
  - verifies that the scaffold and database can be read back;
194
194
  - completes without silently starting research, creating a commit, adding a
195
195
  remote, or pushing anything.
@@ -231,9 +231,11 @@ product story. It builds a current-system baseline from:
231
231
  - APIs, data, permissions, integrations, deployment, and recovery seams;
232
232
  - known failures, documentation drift, technical debt, and unresolved unknowns.
233
233
 
234
- During `ultra-research`, the host model selects the smallest evidence-backed set
235
- of applicable catalog areas. Every included area receives one explicit
236
- disposition:
234
+ During `ultra-research`, the host model inspects current evidence and recommends
235
+ the smallest sufficient route. The owner selects, modifies, delegates, or
236
+ defers it through the host-native question surface unless the current request
237
+ already resolves the route. The normalized accepted coverage is then stored in
238
+ `.ultra/state.db`. Every included area receives one explicit disposition:
237
239
 
238
240
  - `execute` — produce fresh evidence;
239
241
  - `verify_existing` — validate an existing artifact;
@@ -243,7 +245,8 @@ disposition:
243
245
 
244
246
  The catalog is not a mandatory document set or questionnaire. Omitted areas
245
247
  create no workflow rows; an explicit exclusion is recorded only when retaining
246
- that rationale is useful.
248
+ that rationale is useful. MCP validates state, evidence, and transitions; it
249
+ does not store or prove the preceding UI interaction.
247
250
 
248
251
  Older projection-only Ultra projects are preserved and routed through a
249
252
  backup-first migration or rebaseline. Use `ultra-doctor` when initialization
@@ -4,18 +4,22 @@ const SURFACES = Object.freeze({
4
4
  claude: Object.freeze({
5
5
  primary: 'AskUserQuestion',
6
6
  fallback: 'direct_user_interaction',
7
+ availability: 'interactive_session',
7
8
  }),
8
9
  codex: Object.freeze({
9
10
  primary: 'request_user_input',
10
11
  fallback: 'direct_user_interaction',
12
+ availability: 'current_mode_exposes_tool',
11
13
  }),
12
14
  opencode: Object.freeze({
13
15
  primary: 'question',
14
16
  fallback: 'direct_user_interaction',
17
+ availability: 'question_permission_not_denied',
15
18
  }),
16
19
  kimi: Object.freeze({
17
- primary: 'native_question_surface',
20
+ primary: 'AskUserQuestion',
18
21
  fallback: 'direct_user_interaction',
22
+ availability: 'interactive_non_auto_mode',
19
23
  }),
20
24
  });
21
25
 
@@ -23,18 +27,21 @@ function interactionContract(runtime) {
23
27
  const question = SURFACES[runtime];
24
28
  if (!question) throw new Error(`unsupported interaction runtime: ${runtime}`);
25
29
  return {
26
- schema_version: '1.0',
30
+ schema_version: '1.1',
27
31
  runtime,
28
32
  authority: {
29
33
  user: [
30
34
  'product_intent',
31
35
  'material_scope_and_tradeoffs',
36
+ 'semantic_route_selection',
37
+ 'risk_acceptance',
32
38
  'destructive_or_external_effect_authorization',
33
39
  ],
34
40
  host_model: [
35
41
  'fact_finding_and_synthesis',
36
42
  'reversible_implementation_judgment',
37
- 'coverage_risk_and_route_recommendation',
43
+ 'semantic_route_recommendation',
44
+ 'accepted_intent_normalization',
38
45
  ],
39
46
  ultra_mcp: [
40
47
  'durable_state_and_evidence_refs',
@@ -44,10 +51,25 @@ function interactionContract(runtime) {
44
51
  },
45
52
  interaction: {
46
53
  question_surface: question,
54
+ semantic_selection_flow: [
55
+ 'inspect',
56
+ 'suggest',
57
+ 'ask_if_unresolved',
58
+ 'normalize',
59
+ 'persist',
60
+ ],
47
61
  dependent_decisions: 'one_at_a_time',
48
62
  independent_low_load_questions: { maximum: 3 },
49
63
  explicit_current_intent: 'normalize_without_reconfirmation',
50
- unavailable_native_surface: 'use_direct_interaction',
64
+ dismissed_question: 'remain_unanswered',
65
+ unavailable_native_surface: 'use_direct_interaction_if_permitted',
66
+ host_forbids_interaction: 'remain_unanswered',
67
+ },
68
+ persistence: {
69
+ accepted_intent: 'trust_as_current_authority',
70
+ user_interaction_proof: 'not_required',
71
+ raw_prompt_or_transcript: 'never_store',
72
+ pending_question: 'store_only_when_recovery_requires_it',
51
73
  },
52
74
  routing: {
53
75
  semantic_recommendation_owner: 'host_model',
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Build evidence with model-selected semantic coverage and adaptive user alignment
2
+ description: Build evidence with recommended, owner-selected semantic coverage and adaptive alignment
3
3
  argument-hint: "[scope-or-question]"
4
4
  workflow-ref: "@skills/ultra-research/SKILL.md"
5
5
  ---
@@ -44,7 +44,7 @@ reports are projections or workflow artifacts.
44
44
 
45
45
  ## 3. Live MCP and declared contracts
46
46
 
47
- `spec/mcp-tools.yaml` declares and the bundled server registers 50 tools across
47
+ `spec/mcp-tools.yaml` declares and the bundled server registers 51 tools across
48
48
  eight families:
49
49
 
50
50
  | Family | Live tools |
@@ -53,15 +53,16 @@ eight families:
53
53
  | `task.*` | create, update, list, get, switch_tag, delete, init_project, expand, parse_prd, dependency_topo, append_event, subscribe_events |
54
54
  | `session.*` | spawn, close, get, list, admission_check, heartbeat, subscribe_events |
55
55
  | `change.*` | create, update, get, list, context, breadcrumb, learning_propose, learning_resolve, converge, archive |
56
- | `decision.*` | thread_start, get, list, open, resolve, delegate, defer, supersede, checkpoint |
56
+ | `decision.*` | thread_start, get, list, open, resolve, delegate, defer, supersede, complete, checkpoint |
57
57
  | `workflow.*` | start, get, list, step, complete |
58
58
  | `system.*` | doctor |
59
59
  | `plan.*` | export, get |
60
60
 
61
61
  Review, repository impact discovery, skill loading, and decision presentation remain
62
62
  host-native capabilities rather than fake MCP contracts. MCP stores only normalized
63
- decision authority and checkpoints; it never generates questions or retains prompts
64
- and transcripts. The generated Codex capability map documents host replacements.
63
+ decision authority, pending-question recovery state, lifecycle completion, and optional
64
+ checkpoints; it never generates questions or retains prompts and transcripts. The
65
+ generated Codex capability map documents host replacements.
65
66
 
66
67
  The complete write, transition, invalidation, and recovery contract lives in
67
68
  [`WORKFLOW-LIFECYCLE.md`](./WORKFLOW-LIFECYCLE.md).
@@ -79,11 +80,13 @@ review, and deliver route back to the same thread instead of deciding for the ow
79
80
 
80
81
  One partial unique index permits only one open item per thread. `decision.resolve`,
81
82
  `decision.delegate`, and `decision.defer` preserve the source of authority;
82
- `decision.supersede` preserves history when evidence or intent changes. Prepare and
83
- confirm checkpointing bind a material accepted cluster to current artifact digests
84
- when interruption recovery needs that boundary. Status and breadcrumb return only the
85
- current question plus allowed and mechanically required transitions, so recovery does
86
- not require replaying conversation history.
83
+ `decision.supersede` preserves history when evidence or intent changes.
84
+ `decision.complete` closes settled normalized state without manufacturing an approval
85
+ receipt. Prepare and confirm checkpointing remain optional and bind only a material
86
+ accepted cluster to current artifact digests when interruption recovery needs that
87
+ boundary. Status and breadcrumb return only the current question plus allowed and
88
+ mechanically required transitions, so recovery does not require replaying conversation
89
+ history.
87
90
 
88
91
  ## 5. Context Spine contract
89
92
 
@@ -51,7 +51,7 @@ the supported hosts share.
51
51
  | Layer | Role | Form |
52
52
  |--------------|----------------------------------------------|-------------------------------------------------------|
53
53
  | **skill** | knowledge carrier; tells the runtime *what to do* | `skills/<name>/SKILL.md` discovered natively by all supported runtimes |
54
- | **MCP** | authoritative workflow-state, decision, and Context Spine API | stdio MCP server exposing 50 live tools across task/session/baseline/change/decision/workflow/system/plan families in [`spec/mcp-tools.yaml`](../spec/mcp-tools.yaml) |
54
+ | **MCP** | authoritative workflow-state, decision, and Context Spine API | stdio MCP server exposing 51 live tools across task/session/baseline/change/decision/workflow/system/plan families in [`spec/mcp-tools.yaml`](../spec/mcp-tools.yaml) |
55
55
  | **CLI** | explicit initialization, recovery, diagnostics, and orchestration | `ultra-tools` / `ubp-orchestrator`; only commands listed by `--help` are executable (see [`spec/cli-protocol.md`](../spec/cli-protocol.md)) |
56
56
 
57
57
  Why three: skills give us behavior portability across runtimes; MCP gives
@@ -91,7 +91,7 @@ covers twenty-one tables:
91
91
  | `event_consumers` | durable monotonic consumer cursors | 8C |
92
92
  | `workflow_runs` | init/research/plan/change/dev/test/review/deliver run authority, position, blockers, approval, and derived summary | 13 |
93
93
  | `workflow_steps` | ordered step state, evidence, decisions, immutable output paths, and recorded SHA-256 digests | 13 |
94
- | `decision_threads` | baseline/change/workflow-bound owner-agent alignment, interaction mode, normalized summary, and checkpoint authority | 16 |
94
+ | `decision_threads` | baseline/change/workflow-bound owner-agent alignment, interaction mode, normalized completion, and optional checkpoint authority | 16/19 |
95
95
  | `decision_items` | one-at-a-time owner choices, evidence, recommendations, durable effects, resolutions, delegation, deferral, and supersession history | 16 |
96
96
 
97
97
  Two rules make this work:
@@ -141,9 +141,13 @@ same authoritative state shape without rewriting application code.
141
141
 
142
142
  Initialization completes after local authority, classification, Git/scaffold setup,
143
143
  and read-back verification. It does not start or complete research. An explicit
144
- `ultra-research` invocation then records the model-selected semantic coverage and
145
- executes, verifies, or reuses only the evidence needed to converge the baseline.
146
- Omitted catalog areas create no workflow row.
144
+ `ultra-research` invocation lets the model inspect evidence and recommend a semantic
145
+ route. The owner selects, modifies, delegates, or defers through the host-native
146
+ question surface unless current intent already resolves the route. The normalized
147
+ accepted coverage is then recorded, and research executes, verifies, or reuses only
148
+ the evidence needed to converge the baseline. Omitted catalog areas create no
149
+ workflow row. MCP validates the stored state and evidence, not the preceding user
150
+ interaction.
147
151
 
148
152
  Auto initialization preserves an existing Git repository and HEAD. When Git is absent,
149
153
  it initializes `main`, adds the symlink-safe `.ultra` rule to `.gitignore`, and persists
@@ -193,12 +197,13 @@ alternatives, evidence refs, and durable effects; a partial unique index guarant
193
197
  current question per thread. The host ends that turn and waits.
194
198
 
195
199
  The next response becomes a normalized owner decision, explicit reversible delegation,
196
- or consequence-bearing deferral. Prompts and transcripts are never persisted. A coherent
197
- cluster moves through prepare/confirm checkpointing, which binds an owner-approved
198
- decision digest to the current specification, Change Contract, alignment, or plan artifact.
199
- Matching workflow steps and completion fail closed until the checkpoint is confirmed.
200
- Supersession preserves prior history and reopens alignment instead of silently editing an
201
- old decision. The shared procedure lives in
200
+ or consequence-bearing deferral. Prompts and transcripts are never persisted. Routine
201
+ settled state closes through `decision.complete`, which is lifecycle completion rather
202
+ than another approval. Only a coherent cluster that needs an artifact-bound recovery
203
+ boundary moves through prepare/confirm checkpointing. Matching workflow steps fail
204
+ closed while a blocking question, blocking deferral, prepared checkpoint, or stale
205
+ checkpoint artifact remains. Supersession preserves prior history and reopens alignment
206
+ instead of silently editing an old decision. The shared procedure lives in
202
207
  `skills/ultra-think/references/decision-dialogue.md`; status, breadcrumb, and doctor expose
203
208
  only the current recovery surface.
204
209
 
package/docs/DECISIONS.md CHANGED
@@ -9,8 +9,8 @@ release-version authority.
9
9
 
10
10
  | Layer | Owns | Must not own |
11
11
  |---|---|---|
12
- | User intent | Goals, acceptance, non-goals, material product trade-offs, risk acceptance, and authorization for irreversible or external effects | Facts that the current checkout or runtime can establish directly |
13
- | Host model | Classification, investigation, research coverage, solution design, task decomposition, context, test and review strategy, documentation impact, and next-action recommendations | Fabricated evidence, bypassed authorization, or durable lifecycle state |
12
+ | User intent | Goals, acceptance, non-goals, semantic route selection, material product trade-offs, risk acceptance, and authorization for irreversible or external effects | Facts that the current checkout or runtime can establish directly |
13
+ | Host model | Classification and route recommendations, investigation, solution design, task decomposition, context, test and review strategy, documentation impact, intent normalization, and next-action recommendations | Fabricated evidence, bypassed authorization, or durable lifecycle state |
14
14
  | Ultra MCP | IDs, state, digests, provenance, freshness, locks, leases, transactions, recovery, and legal state transitions | Product direction, a fixed research route, technology selection, or business decisions |
15
15
  | Host adapter | Native Skill discovery, user-question surfaces, tool invocation, installation, and runtime wiring | A second project-state authority |
16
16
  | Hook | Lifecycle observation, compact DB-derived context, recovery hints, and generated-projection protection | Ordinary development blocking or semantic route selection |
@@ -22,15 +22,19 @@ external memory, and code-graph payloads are not Ultra authority.
22
22
  ## Research coverage
23
23
 
24
24
  The research references form an optional semantic catalog. The host model
25
- selects only the areas justified by the current goal and evidence, records an
26
- evidence-based selection reason, and always includes synthesis. Omitted catalog
27
- areas create no workflow rows. An explicit `not_applicable` or accepted
28
- `deferred` entry is recorded only when preserving that exclusion is useful.
25
+ inspects current evidence and recommends the smallest sufficient route. The
26
+ owner selects, modifies, delegates, or defers that route through the current
27
+ host's native question surface unless current intent already resolves it. The
28
+ host then normalizes and records the accepted coverage with an evidence-based
29
+ rationale and synthesis. Omitted catalog areas create no workflow rows. An
30
+ explicit `not_applicable` or accepted `deferred` entry is recorded only when
31
+ preserving that exclusion is useful.
29
32
 
30
33
  MCP validates generic invariants: selected identifiers must exist, dispositions
31
34
  must be legal, reused or excluded evidence must be referenced, synthesis must be
32
35
  active, and at least one non-synthesis area must be applicable. MCP does not
33
- choose the coverage set.
36
+ choose the coverage set or prove how the owner answered. Once normalized intent
37
+ is written, `.ultra/state.db` treats it as current cross-session authority.
34
38
 
35
39
  ## Lifecycle boundaries
36
40
 
@@ -24,14 +24,14 @@ contract and adds stronger authority, recovery, or portability.
24
24
  | Original capability | Current implementation | Compatibility result |
25
25
  |---|---|---|
26
26
  | Init gathers project facts, creates Ultra files, and establishes Git | `task.init_project` performs deterministic classification, scaffold, schema, Git bootstrap, read-back verification, and then stops | Preserved and strengthened. Init has its own completion boundary and never starts research implicitly. |
27
- | Complete product and architecture research | `ultra-research` retains the semantic reference catalog while the model selects only applicable areas and records execute/verify/reuse/not-applicable/deferred dispositions as needed | Preserved without questionnaire overload. Necessary reports, typed semantic records, source digests, and material decision checkpoints add durable evidence. |
27
+ | Complete product and architecture research | `ultra-research` retains the semantic reference catalog while the model recommends evidence-relevant coverage and the owner selects, modifies, delegates, or defers the route | Preserved without questionnaire overload. Accepted dispositions, necessary reports, typed semantic records, source digests, and optional material decision checkpoints add durable evidence. |
28
28
  | Planning converts accepted research into executable work with dependencies | `ultra-plan` persists complete change-owned task contracts and an exact dependency graph | Preserved and strengthened with topology, acceptance coverage, public seams, verification commands, and plan digests. |
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
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. |
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
- | Thinking synchronizes owner and Agent intent | `ultra-think` plus `decision.*` persists one-question dialogue and artifact checkpoints | Strengthened. Observable facts are resolved first; only load-bearing owner choices block. |
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
 
36
36
  ## CLI-original capabilities
37
37
 
@@ -73,8 +73,9 @@ metadata references.
73
73
  ## Reference capability paths and gates
74
74
 
75
75
  These paths show common capability order and hard prerequisites. They are not a
76
- single mandatory pipeline: the host selects among MCP-reported allowed transitions,
77
- while MCP requires one route only for a unique mechanical recovery invariant.
76
+ single mandatory pipeline: the model recommends among MCP-reported allowed
77
+ transitions, while the owner selects or delegates the semantic route. MCP requires one
78
+ route only for a unique mechanical recovery invariant.
78
79
 
79
80
  ### New repository
80
81
 
@@ -83,7 +84,7 @@ task.init_project
83
84
  -> greenfield classification
84
85
  -> Git bootstrap when absent
85
86
  -> init read-back and completion
86
- -> explicit full research with model-selected coverage
87
+ -> explicit full research with a model-recommended, owner-selected route
87
88
  -> selected execute/verify/reuse work and synthesis
88
89
  -> owner-authorized local checkpoint commit when Git is unborn
89
90
  -> baseline.record
@@ -99,7 +100,7 @@ task.init_project
99
100
  -> brownfield classification and selected scope
100
101
  -> preserve current Git HEAD and dirty-state evidence
101
102
  -> init read-back and completion
102
- -> explicit adoption research with model-selected coverage
103
+ -> explicit adoption research with a model-recommended, owner-selected route
103
104
  -> characterization verification + known-red/gap ledger
104
105
  -> baseline.record + owner approval
105
106
  -> baseline.converge
@@ -122,7 +123,8 @@ doctor/migrate with backup
122
123
  status
123
124
  -> change intent capture
124
125
  -> material alignment only when unresolved
125
- -> host-selected bounded research, plan, current dev work, think, or status
126
+ -> model-recommended, owner-selected or delegated bounded research, plan,
127
+ current dev work, think, or status
126
128
  -> session.spawn creates the real task worktree
127
129
  -> red/green/verify/review
128
130
  -> local task commit and verified integration
package/docs/ROADMAP.md CHANGED
@@ -49,25 +49,26 @@ sharing one authoritative workflow store.
49
49
  | 12 | Repository evidence snapshots + gap ledger + migration re-adoption + incident governance | ✅ done |
50
50
  | 13 | Durable init-to-delivery workflows + task execution contracts + immutable stage evidence | ✅ done |
51
51
  | 16 | Resumable one-question owner-agent decisions + artifact checkpoints + workflow gates | ✅ done |
52
+ | 19 | Non-ceremonial decision completion + four-host semantic-selection contract | ✅ done |
52
53
  | 9 | Release pipeline | npm tag publishing live; Homebrew / pip not implemented |
53
54
 
54
55
  ## What is in the repo today
55
56
 
56
57
  ```
57
58
  spec/ ← Phase 1 single source of truth
58
- ├── mcp-tools.yaml (50 live tools across 8 families)
59
+ ├── mcp-tools.yaml (51 live tools across 8 families)
59
60
  ├── cli-protocol.md (CLI ↔ MCP mapping table)
60
61
  ├── schemas/ (state-db.sql + 4 JSON schemas)
61
62
  ├── fixtures/{valid,invalid}/ (+ v4.4-project for migration)
62
63
  └── scripts/test-all.cjs (npm run test:spec — 7 validation stages)
63
64
 
64
65
  mcp-server/ ← Phase 2 authoritative state layer
65
- ├── server.cjs (stdio MCP server, 50 task/session/baseline/change/decision/workflow/system/plan tools)
66
+ ├── server.cjs (stdio MCP server, 51 task/session/baseline/change/decision/workflow/system/plan tools)
66
67
  ├── lib/
67
68
  │ ├── state-db.cjs (SQLite + WAL + pragmas)
68
69
  │ ├── state-ops.cjs (full write API, status state machine)
69
70
  │ ├── baseline-workflow.cjs (project adoption + approval + reconciliation)
70
- │ ├── decision-dialogue.cjs (one-question authority + checkpoint gates)
71
+ │ ├── decision-dialogue.cjs (one-question authority + completion/checkpoint gates)
71
72
  │ ├── workflow-state.cjs (ordered stage runs, evidence, output digests, and gates)
72
73
  │ └── projector.cjs (state.db → tasks.json + context md)
73
74
  └── tests/ (npm run test:state)
@@ -67,7 +67,8 @@ they do not deny edits or stop active incident work.
67
67
  | Capability | Claude Code | OpenCode | Codex | Kimi Code 0.26+ |
68
68
  |---|---|---|---|---|
69
69
  | stdio MCP registration | plugin `.mcp.json` | `opencode.json` local MCP entry | plugin `.mcp.json` | plugin `mcpServers` entry |
70
- | Live/declared contracts | 50 | 50 | 50 | 50 |
70
+ | Live/declared contracts | 51 | 51 | 51 | 51 |
71
+ | Structured user alignment | `AskUserQuestion` in interactive sessions | `question` when permission is not denied | `request_user_input` when the current mode exposes it | `AskUserQuestion` outside auto mode |
71
72
  | Greenfield/brownfield baseline adoption | FULL | FULL | FULL | FULL |
72
73
  | Context Manifest v3 / breadcrumb | FULL | FULL, same bundled read-only DB reader as every hook | FULL | FULL |
73
74
  | Approval-gated spec learning | FULL | FULL | FULL | FULL |
@@ -75,10 +76,15 @@ they do not deny edits or stop active incident work.
75
76
  | Durable authority | project `.ultra/state.db` | project `.ultra/state.db` | project `.ultra/state.db` | project `.ultra/state.db` |
76
77
  | Ultra memory API | N/A | N/A | N/A | N/A |
77
78
 
78
- All 50 `task.*`, `session.*`, `baseline.*`, `change.*`, `decision.*`, `workflow.*`, `system.*`, and `plan.*` operations
79
+ All 51 `task.*`, `session.*`, `baseline.*`, `change.*`, `decision.*`, `workflow.*`, `system.*`, and `plan.*` operations
79
80
  registered by `mcp-server/server.cjs` are live. Review, impact discovery, skill
80
81
  loading, and user interaction remain host-native surfaces.
81
82
 
83
+ When a native structured question surface is unavailable, the shared interaction
84
+ contract permits one concise direct question only if ordinary conversation is still
85
+ available. A host mode that forbids interaction leaves the choice unanswered; Ultra
86
+ does not infer consent or silently delegate the semantic route.
87
+
82
88
  Kimi starts plugin MCP processes with the managed plugin root as `cwd`. The
83
89
  generated launcher recovers the project from the inherited `PWD`, sets
84
90
  `UBP_ROOT_DIR` and `UBP_DB_PATH`, and refuses to start if that project boundary
@@ -129,9 +135,9 @@ records. Uninstall refuses an unmanaged or conflicting root.
129
135
 
130
136
  | Capability | Contract |
131
137
  |---|---|
132
- | Current state schema | `18.0` |
138
+ | Current state schema | `19.0` |
133
139
  | Runtime values | `claude`, `opencode`, `codex`, `kimi` |
134
- | Upgrade from earlier schema | preserves runtime rows, adds Context Spine state through 10.0, authoritative baseline adoption in 11.0, repository evidence in 12.0, durable workflows in 13.0, continuous baseline revalidation in 14.0, typed research semantics and verified reconciliation in 15.0, resumable owner-agent decision threads and workflow alignment gates in 16.0, explicit unborn-Git authority in 17.0, then adaptive transitions and legacy workflow normalization in 18.0 |
140
+ | Upgrade from earlier schema | preserves runtime rows, adds Context Spine state through 10.0, authoritative baseline adoption in 11.0, repository evidence in 12.0, durable workflows in 13.0, continuous baseline revalidation in 14.0, typed research semantics and verified reconciliation in 15.0, resumable owner-agent decision threads and workflow alignment gates in 16.0, explicit unborn-Git authority in 17.0, adaptive transitions and legacy workflow normalization in 18.0, then non-ceremonial decision completion in 19.0 |
135
141
  | Preservation gate | rows, IDs, indexes, foreign keys, telemetry, incidents, and migration history remain intact |
136
142
  | Failure behavior | rollback; no partially upgraded authority database |
137
143
 
@@ -74,7 +74,7 @@ resolve the mount/runtime constraint before retrying.
74
74
  | `baselines` | MCP server (`baseline.start` / `baseline.record` / `baseline.converge`); initialization and legacy-projection migration may create only the first draft or compatibility row |
75
75
  | `tasks` | MCP server (`task.create` / `task.update` / `task.delete`) |
76
76
  | `changes` | MCP server (`change.create` / `change.update` / `change.converge` / `change.archive`) |
77
- | `decision_threads`, `decision_items` | MCP server (`decision.thread_start` / `decision.open` / `decision.resolve` / `decision.delegate` / `decision.defer` / `decision.supersede` / `decision.checkpoint`); only normalized choices and checkpoints are stored, never prompts or transcripts |
77
+ | `decision_threads`, `decision_items` | MCP server (`decision.thread_start` / `decision.open` / `decision.resolve` / `decision.delegate` / `decision.defer` / `decision.supersede` / `decision.complete` / `decision.checkpoint`); only pending questions needed for recovery, normalized choices, lifecycle completion, and optional artifact checkpoints are stored, never prompts or transcripts |
78
78
  | `workflow_runs`, `workflow_steps` | MCP server (`workflow.start` / `workflow.step` / `workflow.complete`); skills provide evidence inputs but never write rows directly |
79
79
  | `artifacts`, `context_snapshots`, `spec_learning_candidates`, `trace_links` | MCP server through change lifecycle tools |
80
80
  | `incidents`, `projection_jobs`, `event_consumers`, `circuit_breaker` | MCP server; backup-first doctor recovery may perform only documented mechanical transitions |
@@ -25,9 +25,10 @@ as MCP authority.
25
25
 
26
26
  Load-bearing owner choices are normalized through `decision.*`; Prompt prose is not
27
27
  durable authority. The host acquires observable facts autonomously, exposes one
28
- current question, and stops. A workflow cannot advance while a matching decision
29
- thread is active, waiting for checkpoint confirmation, or carrying a blocking
30
- deferral.
28
+ current question, and stops. A workflow cannot advance while a matching decision has
29
+ an unanswered blocking question, a blocking deferral, a prepared checkpoint awaiting
30
+ confirmation, or a stale confirmed artifact. A normalized answer alone does not require
31
+ a ceremonial checkpoint.
31
32
 
32
33
  Every change-bound research, plan, dev, test, review, and deliver run inherits
33
34
  the baseline id from the owning change workflow. A Prompt cannot switch that
@@ -37,11 +38,13 @@ it does not fabricate the missing provenance.
37
38
 
38
39
  Ultra does not select product scope or material delivery posture; those remain user
39
40
  decisions. Research references form an optional catalog, not a forced questionnaire.
40
- The host model selects only evidence-relevant areas and records one coverage rationale.
41
- MCP validates identifiers, dispositions, evidence requirements, synthesis, and at
42
- least one applicable semantic area. Omitted areas create no workflow step. An explicit
43
- `not_applicable` or accepted `deferred` row is retained only when its exclusion is
44
- material.
41
+ The host model inspects evidence and recommends only relevant areas. The owner selects,
42
+ modifies, delegates, or defers that route through the native question surface unless
43
+ current intent already resolves it. The host records the normalized accepted coverage
44
+ and rationale. MCP validates identifiers, dispositions, evidence requirements,
45
+ synthesis, and at least one applicable semantic area; it does not prove the preceding
46
+ interaction. Omitted areas create no workflow step. An explicit `not_applicable` or
47
+ accepted `deferred` row is retained only when its exclusion is material.
45
48
 
46
49
  ## 2. How `ultra-init` classifies a repository
47
50
 
@@ -195,29 +198,33 @@ making it `completed`.
195
198
  ### Decision thread and item
196
199
 
197
200
  ```text
198
- thread: active -> checkpoint_ready -> confirmed
199
- ^ |
200
- |--------------+ revision/supersession
201
+ thread: active -> completed
202
+ |
203
+ +----> checkpoint_ready -> confirmed
204
+ ^ | |
205
+ |--------------+--------------+ revision/supersession
201
206
 
202
207
  item: open -> answered | delegated | deferred | superseded
203
208
  ```
204
209
 
205
210
  A thread is bound to baseline, change, or workflow authority. A partial unique index
206
211
  allows only one `open` item per thread. Resolved items remain immutable history;
207
- changed evidence or intent uses `decision.supersede` and reopens the checkpoint.
208
- `decision.checkpoint` first freezes a normalized decision digest, then binds explicit
209
- owner approval to current artifact digests or a justified standalone no-artifact
210
- case. It never stores the conversation transcript.
212
+ changed evidence or intent uses `decision.supersede` and reopens alignment.
213
+ `decision.complete` closes settled normalized state without adding an approval claim.
214
+ When an artifact-bound recovery boundary is actually needed, `decision.checkpoint`
215
+ instead freezes a normalized decision digest and binds explicit owner approval to
216
+ current artifact digests or a justified standalone no-artifact case. Neither path
217
+ stores the conversation transcript.
211
218
 
212
219
  ## 4. Write and verification lifecycle
213
220
 
214
221
  | Stage | Authoritative writes | Completion verification | Available continuation |
215
222
  |---|---|---|---|
216
223
  | `init` | Baseline classification/scope, Git bootstrap state, completed init run, initialization event, projection job | DB/schema opens, scaffold/projection and read-back succeed; existing Git is preserved or missing local Git is initialized | Explicitly chosen `research`, `status`, or `doctor`; an already-ready project may also enter `change` |
217
- | `research` | Coverage dispositions, selected step evidence, material decision checkpoints, typed semantic records with source digests, immutable reports, output paths and SHA-256 digests | Every coverage area is dispositioned; only executed/verified/reused areas require work evidence; synthesis binds current specifications and distillate; all material decisions and digests are current | Baseline record/convergence for initial research; bounded change research returns to its owning change |
224
+ | `research` | Accepted coverage dispositions, selected step evidence, normalized material decisions, optional artifact checkpoints, typed semantic records with source digests, immutable reports, output paths and SHA-256 digests | Every included coverage area is dispositioned; only executed/verified/reused areas require work evidence; synthesis binds current specifications and distillate; all material decisions and digests are current | Baseline record/convergence for initial research; bounded change research returns to its owning change |
218
225
  | baseline convergence | Spec/source/runtime refs, verification results, known failures, unknowns, gaps, branch/HEAD/worktree, approval | Full/adoption research complete; required discovery/product/architecture refs current; revision/worktree exact; blocking gaps resolved or explicitly accepted where allowed | `change` for every initial or daily outcome |
219
- | `change` | Complete Change Contract, profile/risk rationale, research disposition, intent/delta artifacts, and a completed capture run; a decision thread only when material intent remains unresolved | Intent, acceptance, recovery, classification, and research disposition are complete and bound to the baseline | Host selects among bounded `research`, `plan`, current `dev`, `think`, or `status` using allowed transitions |
220
- | `plan` | Selected planning evidence, complete change-owned task rows, acceptance coverage matrix, and change-bound `.ultra/execution-plan.json`; approval only for a material owner decision | Every Change acceptance id is owned by a task; trace targets, ownership, dependencies, topology, task contracts, and exported digest match current authority | Any dependency-ready task may enter `dev` |
226
+ | `change` | Complete Change Contract, profile/risk rationale, research disposition, intent/delta artifacts, and a completed capture run; a decision thread only when material intent remains unresolved | Intent, acceptance, recovery, classification, and research disposition are complete and bound to the baseline | Model recommends; owner selects or delegates bounded `research`, `plan`, current `dev`, `think`, or `status` from allowed transitions |
227
+ | `plan` | Accepted planning posture, selected planning evidence, complete change-owned task rows, acceptance coverage matrix, and change-bound `.ultra/execution-plan.json`; approval only for a material owner decision | Every Change acceptance id is owned by a task; trace targets, ownership, dependencies, topology, task contracts, and exported digest match current authority | Any dependency-ready task may enter `dev` |
221
228
  | `dev` | Task/session transitions, real worktree, step evidence, immutable implementation context, completion/review references | Task completed; no live session; task contract unchanged; starting context and review artifacts valid; completion commits are integrated and remain ancestors of current HEAD | Next task, then aggregate `test` |
222
229
  | `test` | Immutable checking context, an explicit risk-selected verification profile, and `.ultra/reports/tests/<workflow-id>.json` | Selected dimensions and acceptance pass; every excluded dimension has a rationale; report change/task set, HEAD, worktree, context, commands, blockers, and digests agree | `review` when passing, otherwise resume `dev`/`test` |
223
230
  | `review` | Immutable review context, `task`/`change`/`plan` mode, risk-selected worker provenance, two mandatory specialist axes, and coordinated summary | Current diff/HEAD and context match; the complete worker roster is selected or skipped with rationale; completed workers match specialist artifacts; both axes complete; findings and axis verdicts derive the final verdict | `deliver` only from a passing `change` review, otherwise resume implementation or checking |
@@ -249,8 +256,19 @@ thread only for a new material decision cluster. Before asking, it must:
249
256
  6. normalize the owner response with `decision.resolve`, explicit reversible
250
257
  delegation with `decision.delegate`, or a consequence-bearing deferral with
251
258
  `decision.defer`;
252
- 7. prepare a compact checkpoint only when a material decision cluster changes a
253
- durable contract and interruption recovery needs an artifact-bound boundary.
259
+ 7. call `decision.complete` when normalized state is settled, or prepare a compact
260
+ checkpoint only when a material decision cluster changes a durable contract and
261
+ interruption recovery needs an artifact-bound boundary.
262
+
263
+ The shared semantic flow is `inspect -> suggest -> ask if unresolved -> normalize ->
264
+ persist`. Claude Code and Kimi Code use `AskUserQuestion`, Codex uses
265
+ `request_user_input` when its current mode exposes it, and OpenCode uses `question`
266
+ when permitted. Every host falls back to one concise direct question when normal
267
+ conversation is still allowed. If the current host mode forbids interaction entirely,
268
+ the choice remains unanswered and route-dependent writes stop. A dismissed question
269
+ also remains unanswered. The DB trusts a normalized persisted result as current
270
+ authority across sessions; it does not store or verify a UI receipt, raw prompt, or
271
+ transcript.
254
272
 
255
273
  `ultra-think` owns this interaction protocol. `ultra-research`, `ultra-change`, and
256
274
  `ultra-plan` invoke it at their decision boundaries. `ultra-dev`, `ultra-test`,
@@ -326,7 +344,8 @@ current gate evidence do block.
326
344
 
327
345
  ```text
328
346
  ultra-init -> Git/scaffold/authority verification -> init completed
329
- -> explicit ultra-research -> model-selected coverage -> selected evidence work
347
+ -> explicit ultra-research -> suggested route -> owner-selected accepted coverage
348
+ -> selected evidence work
330
349
  -> local checkpoint when Git is unborn -> baseline approval
331
350
  -> ultra-change -> optional bounded research/plan -> dev -> risk-selected test/review
332
351
  -> local deliver/archive
@@ -336,7 +355,7 @@ ultra-init -> Git/scaffold/authority verification -> init completed
336
355
 
337
356
  ```text
338
357
  ultra-init -> preserve Git/classify brownfield -> init completed
339
- -> explicit adoption research -> model-selected coverage
358
+ -> explicit adoption research -> suggested route -> owner-selected accepted coverage
340
359
  -> selected characterization/known-red evidence -> gap ledger -> owner approval
341
360
  -> first ultra-change -> optional bounded research/plan -> dev -> test/review -> deliver
342
361
  ```
@@ -358,7 +377,8 @@ Migration preserves prior files and rows but never carries old approval forward.
358
377
 
359
378
  ```text
360
379
  ultra-status -> ultra-change intent capture
361
- -> host chooses bounded research, plan, current task, think, or status
380
+ -> model recommends; owner selects or delegates bounded research, plan, current task,
381
+ think, or status
362
382
  -> dev -> risk-selected test -> review -> deliver -> reconciled baseline
363
383
  ```
364
384
 
@@ -374,13 +394,13 @@ evidence rather than bypassing them.
374
394
  | `ultra-init` | classification, scope, Git/scaffold bootstrap, and init verification | stops completed; exposes research/status/doctor and any already-valid change capability |
375
395
  | `ultra-research` | coverage disposition, selected evidence acquisition, synthesis, and material research decisions | baseline convergence or return to the owning change |
376
396
  | `ultra-think` | one material owner decision or read-only diagnosis | returns to the invoking capability after any needed checkpoint |
377
- | `ultra-change` | outcome capture, Change Contract, risk/research routing | host selects research, plan, current dev work, think, or status |
397
+ | `ultra-change` | outcome capture, Change Contract, risk/research routing | model recommends; owner selects or delegates research, plan, current dev work, think, or status |
378
398
  | `ultra-plan` | task contracts, dependencies, acceptance coverage, optional material approval | any dependency-ready task through `ultra-dev` |
379
399
  | `ultra-dev` | one task/session vertical slice and focused review | next `ultra-dev` task or aggregate `ultra-test` |
380
400
  | `ultra-test` | risk-selected change acceptance and verification profile | `ultra-review` on pass, `ultra-dev`/`ultra-test` on failure |
381
401
  | `ultra-review` | independent specification and engineering axes plus risk-selected workers | `ultra-deliver` on approval; otherwise implementation or checking |
382
402
  | `ultra-deliver` | convergence, reconciliation, local archive, and delivery evidence | `ultra-status` or the next `ultra-change`; external release is separate |
383
- | `ultra-status` | read-only authority and transition set | host recommendation among allowed transitions |
403
+ | `ultra-status` | read-only authority and transition set | model recommendation; owner selection or delegation among allowed transitions |
384
404
  | `ultra-doctor` | read-only diagnosis and authorized mechanical recovery | required recovery only when unique; otherwise safe alternatives |
385
405
 
386
406
  Every row permits `ultra-think` when material owner authority is missing and permits