ultra-builder-pro-cli 0.20.0 → 0.21.1

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 (102) hide show
  1. package/.ultra-template/docs/research/README.md +26 -5
  2. package/.ultra-template/specs/discovery.md +1 -1
  3. package/.ultra-template/tasks/tasks.json +1 -1
  4. package/CHANGELOG.md +66 -0
  5. package/README.md +54 -24
  6. package/adapters/_shared/codex-assets.cjs +69 -11
  7. package/adapters/_shared/interaction-contract.cjs +36 -3
  8. package/adapters/_shared/runtime-assets.cjs +41 -1
  9. package/adapters/claude.js +7 -5
  10. package/adapters/codex.js +1 -1
  11. package/adapters/kimi.js +2 -8
  12. package/adapters/opencode.js +30 -28
  13. package/bin/orchestrator.js +64 -24
  14. package/docs/AGENT-CONTEXT.md +74 -43
  15. package/docs/ARCHITECTURE.md +63 -31
  16. package/docs/ARTIFACT-AUTHORITY.md +234 -0
  17. package/docs/DECISIONS.md +10 -4
  18. package/docs/LEGACY-CLI-CROSSWALK.md +6 -4
  19. package/docs/PLUGIN-ISOLATION-CONTRACT.md +4 -3
  20. package/docs/ROADMAP.md +19 -5
  21. package/docs/RUNTIME-COMPAT-MATRIX.md +24 -13
  22. package/docs/STATE-DB-ACCESS-POLICY.md +11 -9
  23. package/docs/WORKFLOW-LIFECYCLE.md +70 -39
  24. package/hooks/README.md +6 -5
  25. package/hooks/active_task_context.py +97 -12
  26. package/hooks/context_spine.py +16 -4
  27. package/hooks/health_check.py +5 -4
  28. package/hooks/pre_stop_check.py +5 -2
  29. package/hooks/runtime_paths.py +396 -0
  30. package/hooks/subagent_tracker.py +5 -2
  31. package/hooks/workflow_checkpoint.py +16 -3
  32. package/hooks/workflow_context.py +11 -3
  33. package/hooks/workflow_resume.py +7 -4
  34. package/mcp-server/breadcrumb.cjs +20 -2
  35. package/mcp-server/lib/archive-journal.cjs +1026 -111
  36. package/mcp-server/lib/archive-mutation-worker.py +365 -0
  37. package/mcp-server/lib/artifact-registry.cjs +1126 -0
  38. package/mcp-server/lib/baseline-workflow.cjs +9 -4
  39. package/mcp-server/lib/change-packet.cjs +818 -0
  40. package/mcp-server/lib/change-workflow.cjs +932 -176
  41. package/mcp-server/lib/context-paths.cjs +111 -0
  42. package/mcp-server/lib/context-spine.cjs +511 -45
  43. package/mcp-server/lib/decision-dialogue.cjs +345 -3
  44. package/mcp-server/lib/delivery-transaction.cjs +471 -0
  45. package/mcp-server/lib/doctor-backup-worker.cjs +328 -0
  46. package/mcp-server/lib/doctor.cjs +373 -11
  47. package/mcp-server/lib/git-bootstrap.cjs +459 -47
  48. package/mcp-server/lib/init-project.cjs +190 -95
  49. package/mcp-server/lib/plan-publication-worker.cjs +830 -0
  50. package/mcp-server/lib/plan-store.cjs +700 -5
  51. package/mcp-server/lib/project-breadcrumb.cjs +23 -4
  52. package/mcp-server/lib/projector.cjs +174 -40
  53. package/mcp-server/lib/runtime-paths.cjs +1687 -0
  54. package/mcp-server/lib/safe-project-file.cjs +385 -0
  55. package/mcp-server/lib/spec-learning.cjs +28 -12
  56. package/mcp-server/lib/state-db.cjs +263 -9
  57. package/mcp-server/lib/state-ops.cjs +248 -49
  58. package/mcp-server/lib/telemetry.cjs +12 -3
  59. package/mcp-server/lib/workflow-state.cjs +610 -58
  60. package/mcp-server/server.cjs +278 -33
  61. package/orchestrator/daemon.cjs +2 -10
  62. package/orchestrator/parallel-orchestrator.cjs +314 -50
  63. package/orchestrator/planner/plan-builder.cjs +1 -1
  64. package/orchestrator/recovery.cjs +125 -7
  65. package/orchestrator/session-close-journal-worker.cjs +5 -0
  66. package/orchestrator/session-close-journal.cjs +1014 -0
  67. package/orchestrator/session-runner.cjs +679 -69
  68. package/orchestrator/worktree-manager.cjs +186 -35
  69. package/package.json +2 -3
  70. package/skills/cc-collab/SKILL.md +4 -1
  71. package/skills/codex-collab/SKILL.md +5 -2
  72. package/skills/ultra-change/SKILL.md +26 -8
  73. package/skills/ultra-deliver/SKILL.md +23 -11
  74. package/skills/ultra-dev/SKILL.md +33 -6
  75. package/skills/ultra-doctor/SKILL.md +6 -2
  76. package/skills/ultra-init/SKILL.md +4 -2
  77. package/skills/ultra-plan/SKILL.md +49 -16
  78. package/skills/ultra-research/SKILL.md +30 -27
  79. package/skills/ultra-review/SKILL.md +9 -5
  80. package/skills/ultra-status/SKILL.md +9 -4
  81. package/skills/ultra-test/SKILL.md +10 -5
  82. package/skills/ultra-think/SKILL.md +6 -2
  83. package/skills/ultra-think/references/decision-dialogue.md +17 -6
  84. package/skills/ultra-verify/SKILL.md +4 -1
  85. package/spec/cli-protocol.md +18 -7
  86. package/spec/mcp-tools.yaml +502 -44
  87. package/spec/schemas/change-delta.v1.schema.json +153 -0
  88. package/spec/schemas/documentation-reconciliation.v1.schema.json +106 -0
  89. package/spec/schemas/mcp-tools.schema.json +1 -1
  90. package/spec/schemas/state-db.sql +50 -13
  91. package/spec/schemas/tasks.v4.5.schema.json +1 -1
  92. package/ultra-tools/cli.cjs +3 -2
  93. package/ultra-tools/commands/db.cjs +76 -25
  94. package/ultra-tools/commands/migrate.cjs +995 -80
  95. package/ultra-tools/commands/session.cjs +34 -8
  96. package/ultra-tools/commands/status.cjs +32 -6
  97. package/ultra-tools/commands/system.cjs +129 -22
  98. package/commands/learn.md +0 -10
  99. package/orchestrator/skill-miner.cjs +0 -133
  100. package/output-styles/coding-vibes.md +0 -67
  101. package/output-styles/structural-thinking.md +0 -61
  102. package/skills/learn/SKILL.md +0 -58
@@ -11,11 +11,19 @@ accepted Change Contract without adding ceremonial approval.
11
11
 
12
12
  ## Bind current authority
13
13
 
14
- 1. Read doctor, baseline, change, decisions, existing plan runs, tasks, and current
15
- checkout.
14
+ 1. Read doctor, baseline, change, breadcrumb `accepted_intent`, decisions, existing plan
15
+ runs, tasks, and current checkout.
16
16
  2. Require one mutable change with a healthy baseline or recorded incident bypass.
17
+ For the first delivery of a greenfield project, an accepted ready baseline may
18
+ already contain the complete delivery outcome. When no matching Change exists,
19
+ materialize one `change.create` contract from that accepted intent and read it back
20
+ without asking the owner to repeat the same choice. Do not invent scope, expand an
21
+ incomplete baseline, or use this shortcut for a later change.
17
22
  3. Complete the exact change-bound research disposition before planning.
18
- 4. Resume the matching plan run. Do not start a new run until planning posture is
23
+ 4. For a standard or major Change, read the current registered `change.delta` and
24
+ verify its baseline anchors and digest. A Direct Build route supplies the delta
25
+ directly from accepted intent; it skips Research, not this authority boundary.
26
+ 5. Resume the matching plan run. Do not start a new run until planning posture is
19
27
  accepted.
20
28
 
21
29
  Read `references/semantic-preflight.md` and inspect requirements, real consumers,
@@ -40,7 +48,8 @@ eventual technical design.
40
48
 
41
49
  ## Design with model autonomy
42
50
 
43
- Build a candidate plan privately. Ask the user only if the plan would change accepted
51
+ Build a candidate plan from the Change Contract, current typed delta, and any selected
52
+ research. Ask the user only if the plan would change accepted
44
53
  scope, public behavior, compatibility, security, material cost, external effects, or
45
54
  recovery. Use the same host-native interaction protocol.
46
55
 
@@ -51,26 +60,42 @@ interaction preference, not a runtime invariant.
51
60
  Record:
52
61
 
53
62
  1. `validate-baseline`
54
- 2. `analyze-requirements`
55
- 3. `analyze-codebase`
56
- 4. `design-slices`
57
- 5. `validate-dependencies`
58
- 6. `persist-task-contracts`
59
- 7. `verify-plan`
63
+ 2. `compile-context`
64
+ 3. `analyze-requirements`
65
+ 4. `analyze-codebase`
66
+ 5. `design-slices`
67
+ 6. `validate-dependencies`
68
+ 7. `persist-task-contracts`
69
+ 8. `verify-plan`
60
70
 
61
71
  Design a walking skeleton and subsequent vertical slices. Every slice reaches a real
62
72
  consumer and owns its validation, side effects, errors, documentation, migration,
63
73
  observability, and recovery obligations. Avoid unconsumed horizontal scaffolding.
64
74
 
75
+ After starting or resuming the workflow, compile `change.context` with `role: plan`
76
+ and `gate: planning`. Record its immutable manifest as the `compile-context` output.
77
+ The packet is the accepted planning input, not a mutable plan draft. `change.context`
78
+ must not update Change provider references; persist new provider metadata with
79
+ `change.update` before recompiling.
80
+
65
81
  ## Persist task contracts
66
82
 
67
83
  Create each task with:
68
84
 
69
- - observable outcome and stable trace;
85
+ - observable outcome (`purpose`) and stable trace (`why`);
70
86
  - `slice_kind`, public seam, and exact verification command;
71
87
  - structured acceptance mapped to Change acceptance ids;
72
- - bounded context refs and reasons;
73
- - documentation impact, ownership, dependencies, and affected files when known.
88
+ - target seams and affected files when known;
89
+ - bounded pattern/context refs with a reason, optional anchor and scope, and an
90
+ explicit freshness policy;
91
+ - documentation impact, ownership, and dependencies.
92
+
93
+ Use `digest` freshness with `expected_digest` for accepted inputs that must remain
94
+ byte-current. Use `existence` for source targets expected to change during
95
+ implementation. Use `advisory` only when drift should be visible but non-blocking.
96
+ The compiled task context restores constraints and non-goals from the Change Contract,
97
+ plus acceptance, recovery, documentation impact, and the definition of drift. Keep
98
+ large referenced files lazy; do not paste their bodies into the plan packet.
74
99
 
75
100
  Use estimates only when evidence supports them. A quick change has exactly one task.
76
101
  Read every task back from DB. Never read or write `.ultra/tasks/tasks.json` directly;
@@ -83,8 +108,13 @@ evidence. Rebind the complete execution contract while clearing `stale` through
83
108
  the current Change authority digest. Never clear staleness merely to pass a gate.
84
109
 
85
110
  Validate the change-scoped graph with `task.dependency_topo`. Export
86
- `.ultra/execution-plan.json` with `plan.export`, read it through `plan.get`, and record
87
- it as the `verify-plan` output.
111
+ the deterministic `<artifact_root>/plan.json` and `<artifact_root>/plan.md` pair with
112
+ `plan.export { change_id }`. The JSON binds the exact planning context snapshot and
113
+ manifest digest; the Markdown is a deterministic human view of the same task graph.
114
+ Read the JSON through `plan.get` and record it as the `verify-plan` output. Do not
115
+ choose an arbitrary output path or overwrite another Change's plan. A legacy global
116
+ `.ultra/execution-plan.json` may be read for migration diagnosis only and is never a
117
+ current write target.
88
118
 
89
119
  Call `workflow.complete`. `approval` is optional: include it only when a material plan
90
120
  decision actually required and received user approval. MCP derives task coverage and
@@ -92,8 +122,11 @@ topology from DB and must reject incomplete contracts, uncovered acceptance, cyc
92
122
  cross-change tasks, stale research, or a mismatched export.
93
123
 
94
124
  Do not advance or complete the Change workflow; change capture is already complete.
95
- Compile task context later for the consumer that needs it.
125
+ Compile a separate task context later for each consumer that needs it. Planning,
126
+ implementation, testing, review, and convergence snapshots are not interchangeable.
96
127
 
97
128
  Return topology, first executable slices, public seams, verification commands, plan
98
129
  workflow id, and allowed transitions. The host may recommend parallel or sequential
99
130
  execution based on dependency and conflict evidence.
131
+
132
+ Never invoke the recommended capability here; wait for an explicit user invocation.
@@ -5,24 +5,20 @@ description: Build or refresh an evidence-backed product and architecture baseli
5
5
 
6
6
  # Research with adaptive coverage
7
7
 
8
- The model owns investigation, synthesis, and coverage recommendations. The user owns
9
- the accepted semantic route and material deferrals. Ultra MCP owns the run, evidence
10
- references, semantic records, artifact digests, freshness, and convergence. The
11
- reference areas are an optional catalog, not a mandatory questionnaire or fixed
12
- sequence of user conversations.
8
+ The model owns investigation, synthesis, and coverage recommendations; the user owns
9
+ the accepted semantic route and material deferrals. MCP owns run state, evidence,
10
+ semantic records, digests, freshness, and convergence, not a questionnaire.
13
11
 
14
12
  Read `../ultra-think/references/decision-dialogue.md` before asking a material question.
15
13
 
16
14
  ## Bind authority
17
15
 
18
- 1. Read `system.doctor`, `baseline.get`, active decisions, and existing research runs.
16
+ 1. Read `system.doctor`, `baseline.get`, breadcrumb `accepted_intent`, active decisions,
17
+ and existing research runs.
19
18
  2. Resume the matching active, blocked, or ready run. Do not create parallel authority.
20
- 3. If none exists, determine the authority-bound mode:
21
- - `full` for a greenfield baseline;
22
- - `adoption` for a brownfield baseline;
23
- - a bounded mode only for a recorded active-change research disposition.
24
- Focused baseline coverage retains `full` or `adoption`; `custom` is only
25
- change-bound and narrows coverage inside an active Change.
19
+ 3. If none exists, use `full` for greenfield, `adoption` for brownfield, or a bounded
20
+ mode only for a recorded active-Change disposition. Focused baseline coverage
21
+ remains `full` or `adoption`; `custom` is Change-bound only.
26
22
  4. Before `workflow.start`, inspect current code, docs, tests, runtime, and prior
27
23
  artifacts. Recommend the smallest sufficient set of applicable catalog areas.
28
24
  Explain the net effect without dumping all 17 areas. Offer at most three credible
@@ -30,15 +26,14 @@ Read `../ultra-think/references/decision-dialogue.md` before asking a material q
30
26
  5. If current user intent does not already select a route, use the host's native
31
27
  structured question surface. The user selects, modifies, delegates, or defers.
32
28
  Treat a dismissal as unanswered, stop, and perform no route-dependent write.
33
- 6. Normalize the answer and persist the accepted coverage through `workflow.start`:
34
- - `execute`: produce fresh evidence;
35
- - `verify_existing`: verify a current artifact against its source;
36
- - `reuse`: reuse evidence that is still current;
37
- - `not_applicable`: exclude with an evidence reference and rationale;
38
- - `deferred`: record the consequence and owner acceptance when deferral changes the
39
- accepted scope or leaves material risk.
29
+ 6. Normalize the answer and persist the accepted coverage through `workflow.start`.
30
+ Use `execute` for fresh evidence, `verify_existing` for source validation, `reuse`
31
+ for current evidence, `not_applicable` with evidence and rationale, or `deferred`
32
+ with consequence and owner acceptance when scope or material risk changes.
40
33
  7. Pass the evidence-based coverage rationale as `metadata.selection_reason`. Omitted
41
34
  catalog areas create no DB step and need no ceremonial disposition.
35
+ 8. Read back the created workflow and accepted coverage. When a durable decision thread
36
+ recorded the route, complete it with the workflow reference in `applied_refs`.
42
37
 
43
38
  `99-synthesis` must execute, verify, or reuse. A missing disposition is a coverage
44
39
  error only for an included area; a recorded exclusion with evidence is not incomplete.
@@ -77,15 +72,20 @@ For each active area:
77
72
  artifact. Do not copy prompts, transcripts, provider payloads, or internal chain of
78
73
  thought.
79
74
 
80
- For every required workflow step, write
81
- `.ultra/docs/research/<workflow-id>/<step-id>.md` with `Evidence`,
82
- `Specification updates`, and `Decisions and unknowns`. Call `workflow.step` with
83
- bounded evidence, the report output, and typed semantic records. Reused or verified
84
- evidence must still produce a current report and digest. Block the same step when
85
- required evidence or owner authority is missing.
75
+ Every required step writes `Evidence`, `Specification updates`, and `Decisions and
76
+ unknowns` to `.ultra/docs/research/<workflow-id>/<step-id>.md` for a baseline, or
77
+ `<change-root>/research/<workflow-id>/<step-id>.md` for an active Change.
78
+
79
+ Call `workflow.step` with bounded evidence, the report output, and typed semantic
80
+ records. Reused or verified evidence must still produce a current report and digest.
81
+ Block the same step when required evidence or owner authority is missing. For Change
82
+ research, keep `findings.md` and every semantic output inside the same Change root and
83
+ register them through workflow outputs; do not write baseline specifications.
86
84
 
87
85
  At synthesis, bind the current `discovery.md`, `product.md`, `architecture.md`, and
88
- `research-distillate.md` for initial/adoption research.
86
+ `research-distillate.md` only for initial/adoption research. Change-bound synthesis
87
+ updates the Change findings and specification overlay, then records or refreshes
88
+ `change.delta`. It never mutates the accepted baseline.
89
89
 
90
90
  ## Baseline convergence
91
91
 
@@ -107,10 +107,13 @@ failures.
107
107
  Reuse the final research acceptance or current artifact checkpoint during baseline
108
108
  convergence; do not ask for an equivalent approval again. After initial or adoption
109
109
  convergence, `ultra-change` becomes an available transition. Bounded change research
110
- returns to its owning Change authority.
110
+ returns to its owning Change authority; the next route is still `ultra-plan`, never
111
+ direct implementation.
111
112
 
112
113
  Return a compact coverage summary by disposition, current evidence or decision
113
114
  blocker, baseline state, gaps, and allowed transitions. Recommend a semantic next
114
115
  action from those transitions. If current intent does not already select it, present
115
116
  the recommendation and credible alternatives through the interaction protocol, then
116
117
  wait. MCP supplies only valid and required transitions.
118
+
119
+ Never invoke the recommended capability here; wait for an explicit user invocation.
@@ -18,7 +18,7 @@ Neither axis can compensate for the other.
18
18
  1. Read `references/review-modes.md` and select `plan`, `task`, or `change` from the
19
19
  actual review request.
20
20
  2. Bind one explicit diff or plan artifact, full HEAD, worktree digest, task set,
21
- acceptance, and current decision state.
21
+ acceptance, breadcrumb `accepted_intent`, and current decision state.
22
22
  3. Resume or start the review workflow and record `bind-diff`.
23
23
  4. Compile `change.context` for `review` and record the immutable manifest under
24
24
  `compile-context`.
@@ -37,8 +37,9 @@ not decide owner choices or edit source.
37
37
 
38
38
  Resolve `references/unified-schema.md` from this Skill directory and pass its absolute
39
39
  path as `SCHEMA_PATH`. Validate specialist artifacts with
40
- `scripts/review_wait.py`. Record outputs under `review-specification`,
41
- `review-engineering`, and `coordinate-findings`.
40
+ `scripts/review_wait.py`. Store all specialist artifacts and `SUMMARY.json` below
41
+ `.ultra/changes/active/<change-id>/review/<workflow-id>/`. Record outputs under
42
+ `review-specification`, `review-engineering`, and `coordinate-findings`.
42
43
 
43
44
  The coordinator preserves every finding unchanged in `SUMMARY.json`; it may group
44
45
  duplicate root causes only in the human summary. A new material owner choice remains a
@@ -52,5 +53,8 @@ the durable verdict and rejects missing specialists, lossy coordination, stale
52
53
  artifacts, or prompt-supplied conclusions.
53
54
 
54
55
  Any relevant code, test, specification, or contract edit invalidates the affected
55
- review evidence. Return both verdict axes, blocking findings, reviewed scope, worker
56
- selection rationale, artifact digests, and allowed transitions.
56
+ review evidence through registered provenance edges; unrelated evidence remains
57
+ current. Return both verdict axes, blocking findings, reviewed scope, worker selection
58
+ rationale, artifact digests, and allowed transitions.
59
+
60
+ Never invoke the recommended capability here; wait for an explicit user invocation.
@@ -13,9 +13,11 @@ frontmatter when DB authority is missing or degraded.
13
13
  1. Run `system.doctor` without repair.
14
14
  2. Read baseline classification, revision, worktree, research provenance, gaps, and
15
15
  health.
16
- 3. Read current decision state without exposing hidden future questions.
16
+ 3. Read current decision state and breadcrumb `accepted_intent` without exposing hidden
17
+ future questions.
17
18
  4. Read active, blocked, and ready workflows and their current steps.
18
- 5. Read breadcrumb, changes, tasks, sessions, and current Git state.
19
+ 5. Read the active Change root, typed delta, plan, deterministic progress projection,
20
+ documentation reconciliation, findings, tasks, sessions, and current Git state.
19
21
  6. Read test, review, and delivery artifacts only through DB references and verify
20
22
  their digests and revisions.
21
23
 
@@ -42,8 +44,9 @@ Ultra: <healthy|degraded> · <branch>@<head|unborn|non-git> · worktree <state>
42
44
  Baseline: <mode>/<status> · research=<run/status> · gaps=<open>/<blocking>
43
45
  Workflow: <kind/id/status> · step=<current|complete> · outputs=<fresh|stale>
44
46
  Decision: <current|checkpoint|none>
45
- Change: <id/status|none> · Task: <id/status|none> · Sessions: <active>
46
- Evidence: test=<state> · review=<axes> · delivery=<state>
47
+ Change: <id/status|none> · delta=<fresh|stale|missing> · docs=<fresh|stale|missing>
48
+ Task: <id/status|none> · Sessions: <active>
49
+ Evidence: plan=<state> · test=<state> · review=<axes> · delivery=<state>
47
50
  Blockers: <codes or none>
48
51
  Warnings: <codes or none>
49
52
  Allowed transitions: <capabilities>
@@ -52,3 +55,5 @@ Host recommendation: <capability and concise rationale>
52
55
  ```
53
56
 
54
57
  Separate verified facts, host inference, and unavailable evidence.
58
+
59
+ Never invoke the recommended capability here; wait for an explicit user invocation.
@@ -10,8 +10,8 @@ projections as proof.
10
10
 
11
11
  ## Bind scope
12
12
 
13
- 1. Read doctor, change, breadcrumb, decisions, task and dev evidence, current checkout,
14
- and prior report freshness.
13
+ 1. Read doctor, change, breadcrumb `accepted_intent`, decisions, task and dev evidence,
14
+ current checkout, and prior report freshness.
15
15
  2. Resume or start a test workflow bound to the exact change and optional task.
16
16
  3. Record `bind-scope`, then compile `change.context` for `check` and record its
17
17
  immutable manifest under `compile-context`.
@@ -47,10 +47,12 @@ question UI and decision protocol; testing must not choose the desired outcome.
47
47
 
48
48
  ## Report
49
49
 
50
- Write `.ultra/reports/tests/<workflow-id>.json` with
50
+ Write
51
+ `.ultra/changes/active/<change-id>/test/<workflow-id>/report.json` with
51
52
  `ultra-test-report-v1`, binding:
52
53
 
53
- - change, exact task ids, HEAD, worktree digest, and checking-context digest;
54
+ - change, exact task ids, current Change acceptance ids, HEAD, worktree digest, and
55
+ checking-context digest;
54
56
  - acceptance mapping, commands, public seams, failures, and recovery evidence;
55
57
  - `verification_profile` and the selected `verification_dimensions`;
56
58
  - regression signal when required;
@@ -58,7 +60,8 @@ Write `.ultra/reports/tests/<workflow-id>.json` with
58
60
 
59
61
  Record `execute-checks`, `verify-public-seam`, and `write-report`, then re-read the
60
62
  report and current checkout before `verify-test-gate`. `workflow.complete` derives its
61
- summary from the report and rejects stale, malformed, or contradictory evidence.
63
+ summary from the report and rejects stale, malformed, contradictory, out-of-Change,
64
+ or acceptance-incomplete evidence.
62
65
 
63
66
  Return the profile, exact results, verified seams, blockers, report digest, workflow
64
67
  state, and allowed transitions. Recommend broader review, more implementation, or
@@ -66,3 +69,5 @@ delivery from those transitions. If current intent does not already select the
66
69
  semantic next action, use
67
70
  `../ultra-think/references/decision-dialogue.md` and wait for the user to select,
68
71
  modify, delegate, or defer it.
72
+
73
+ Never invoke the recommended capability here; wait for an explicit user invocation.
@@ -37,8 +37,10 @@ Do not expose the hidden decision queue.
37
37
  For durable project decisions, use `decision.thread_start`, `decision.open`, and the
38
38
  appropriate resolve, delegate, defer, or supersede transition. Store normalized
39
39
  decisions and artifact references, never transcripts or internal reasoning.
40
- Call `decision.complete` when normalized state is settled and no artifact-bound
41
- checkpoint is needed; completion is not another owner approval.
40
+ Apply any resulting change through its owning baseline, change, workflow, task, or
41
+ semantic artifact operation, read it back, and pass typed `applied_refs` to
42
+ `decision.complete`. If the decision record itself is the complete durable authority,
43
+ the list may be empty. Completion is not another owner approval.
42
44
 
43
45
  Prepare and confirm a checkpoint only when the decision changes a durable contract or
44
46
  artifact and a checkpoint is needed for recovery. Do not add a ceremonial approval
@@ -51,3 +53,5 @@ contracts. Re-read the invoking workflow or breadcrumb and recommend one of its
51
53
  `allowed_transitions`; follow `required_transition` only when a hard invariant leaves
52
54
  no alternative. Thinking does not implement code, mutate unrelated state, or invent a
53
55
  canonical next action.
56
+
57
+ Never invoke the recommended capability here; wait for an explicit user invocation.
@@ -34,6 +34,10 @@ transitions, and hard invariants. It does not choose semantic intent.
34
34
  dismissed question as unanswered.
35
35
  5. **Persist** the normalized result through MCP, then trust the DB record as current
36
36
  authority across sessions.
37
+ 6. **Apply** the result to its owning baseline, change, workflow, task, specification,
38
+ or artifact when that authority has a corresponding field or content boundary.
39
+ 7. **Read back** the normalized decision and every changed owning authority before
40
+ continuing.
37
41
 
38
42
  The DB treats normalized intent as current authority. It does not prove that the user
39
43
  selected it, store a host interaction receipt, or judge whether the choice was wise.
@@ -97,12 +101,13 @@ questionnaire, hidden queue, or every research area.
97
101
  The question tool or direct question ends the current interaction naturally.
98
102
  A dismissed or unavailable response is not acceptance of the recommendation.
99
103
 
100
- ## Persist only when recovery needs it
104
+ ## Persist normalized authority
101
105
 
102
106
  For a project-bound material decision:
103
107
 
104
- 1. Call `decision.list` and resume a matching active decision thread, or use
105
- `decision.thread_start` for one new baseline-, change-, or workflow-bound thread.
108
+ 1. Read breadcrumb `accepted_intent`, call `decision.list`, and resume a matching active
109
+ decision thread, or use `decision.thread_start` for one new baseline-, change-, or
110
+ workflow-bound thread.
106
111
  2. Use `decision.open` before presenting only the current decision, with evidence refs,
107
112
  recommendation, credible alternatives, effects, and its real blocking consequence.
108
113
  A non-blocking follow-up must not become a global workflow gate.
@@ -111,9 +116,15 @@ For a project-bound material decision:
111
116
  - `decision.delegate` for explicit model delegation;
112
117
  - `decision.defer` with consequence and revisit condition;
113
118
  - `decision.supersede` when accepted intent actually changed.
114
- 4. Call `decision.complete` when normalized state is settled and no artifact checkpoint
115
- is needed. This closes lifecycle state; it is not another user approval.
116
- 5. Use `decision.checkpoint` instead only for the digest-bound recovery boundary
119
+ 4. Apply the normalized result through the owning MCP operation or update the smallest
120
+ relevant semantic artifact. Do not leave a material answer only in conversation.
121
+ 5. Read back the owning baseline, change, workflow, task, specification digest, or
122
+ artifact record. If another authority changed, pass its typed reference in
123
+ `decision.complete.applied_refs`.
124
+ 6. Call `decision.complete` only after that read-back. This closes lifecycle state; it
125
+ is not another user approval. If the decision record itself is the complete durable
126
+ authority, `applied_refs` may remain empty.
127
+ 7. Use `decision.checkpoint` instead only for the digest-bound recovery boundary
117
128
  described below.
118
129
 
119
130
  Keep fact acquisition autonomous and decision authority explicit.
@@ -20,8 +20,9 @@ never recurse into the current host or treat advisor output as authority.
20
20
 
21
21
  1. Define the workspace, question, evidence standard, and response shape. Confirm the
22
22
  selected advisor CLI and authentication. Exclude secrets and unrelated files.
23
- 2. Create `.ultra/collab/<session-id>/` and write the current host's independent,
23
+ 2. Create `.ultra/.runtime/collab/<session-id>/` and write the current host's independent,
24
24
  evidence-backed analysis to `host-analysis.md` before reading advisor output.
25
+ Treat the directory as working scratch, not Ultra authority.
25
26
  3. Follow the installed collaboration companion's read-only invocation contract. Give
26
27
  the advisor the same bounded question and evidence, without the primary conclusion
27
28
  when independence matters. Store its result as `advisor-output.md` and diagnostics
@@ -34,6 +35,8 @@ never recurse into the current host or treat advisor output as authority.
34
35
  primary documentation. Explain scope, version, evidence, and assumption differences
35
36
  before resolving disagreement.
36
37
  7. Write `metadata.json` and `synthesis.md`, then return one host-owned conclusion.
38
+ Promote only verified conclusions into the invoking DB-bound workflow artifact or
39
+ report; files under `.ultra/.runtime/collab/` remain non-authoritative.
37
40
 
38
41
  Read `references/cross-verify-modes.md` for mode-specific evidence and
39
42
  `references/evidence-status.md` when the synthesis needs an evidence status. Model agreement
@@ -106,6 +106,8 @@ as a fallback unless `ultra-tools <family> --help` lists it.
106
106
  | `baseline.converge` | `baseline converge` | 11 | mcp |
107
107
  | `change.create` | `change create` | 9 | mcp |
108
108
  | `change.update` | `change update` | 9 | mcp |
109
+ | `change.delta` | `change delta` | 21 | mcp |
110
+ | `change.documentation_reconcile` | `change documentation-reconcile` | 21 | mcp |
109
111
  | `change.get` | `change get` | 9 | any |
110
112
  | `change.list` | `change list` | 9 | any |
111
113
  | `change.context` | `change context` | 9 | mcp |
@@ -128,7 +130,11 @@ as a fallback unless `ultra-tools <family> --help` lists it.
128
130
  | `workflow.get` | `workflow get` | 13 | any |
129
131
  | `workflow.list` | `workflow list` | 13 | any |
130
132
  | `workflow.step` | `workflow step` | 13 | mcp |
133
+ | `workflow.revise` | `workflow revise` | 21 | mcp |
134
+ | `workflow.supersede` | `workflow supersede` | 21 | mcp |
131
135
  | `workflow.complete` | `workflow complete` | 13 | mcp |
136
+ | `artifact.record` | `artifact record` | 20 | mcp |
137
+ | `artifact.get` | `artifact get` | 20 | any |
132
138
  | `system.doctor` | `system doctor` | 9 | mcp |
133
139
  | `plan.export` | `plan export` | 8a | mcp |
134
140
  | `plan.get` | `plan get` | 8a | any |
@@ -136,7 +142,7 @@ as a fallback unless `ultra-tools <family> --help` lists it.
136
142
  Current executable maintenance surfaces are `task init-project`,
137
143
  `session close|get|list|admission|heartbeat|subscribe|reap`, `status`, `db`,
138
144
  `migrate`, `system doctor|restore|rebaseline`, and `legacy-memory`. In particular, `task create|update|list|get`
139
- and all `change` and `decision` lifecycle verbs are not CLI fallbacks. Change and decision state must use
145
+ and all `change`, `decision`, and `artifact` lifecycle verbs are not CLI fallbacks. Their state must use
140
146
  the live MCP server; `system doctor` may additionally be exposed by the
141
147
  maintenance CLI because it is the recovery path when MCP startup is degraded.
142
148
  `task init-project --resume` preserves existing `.ultra` files and installs only
@@ -148,7 +154,7 @@ the same Git ancestry and dirty-state verifier as MCP and fails with
148
154
  `system doctor --repair` applies supported schema upgrades with a pre-migration
149
155
  backup before mechanical recovery.
150
156
  `system restore` requires the exact `REPLACE_CORRUPT_ULTRA_STATE` confirmation and a
151
- verified database inside `.ultra/backups`; it quarantines the corrupt state before
157
+ verified database inside `.ultra/.runtime/backups`; it quarantines the corrupt state before
152
158
  atomic replacement. `system rebaseline` requires the exact
153
159
  `REBASELINE_CORRUPT_ULTRA_STATE` confirmation and preserves corrupt state plus the
154
160
  legacy task projection before starting a new brownfield adoption.
@@ -164,13 +170,18 @@ semantics, is a major bump. Major bumps require an entry in
164
170
 
165
171
  ## 7. `ubp-orchestrator`
166
172
 
167
- `ubp-orchestrator execute-plan` consumes the completed and current
168
- `.ultra/execution-plan.json` and resumes from the first unfinished dependency wave.
173
+ `ubp-orchestrator execute-plan` resolves the completed current plan from the active
174
+ Change's DB row and `<artifact_root>/plan.json`, then resumes from the first unfinished
175
+ dependency wave. Use `--change <id>` when more than one active Change has a completed
176
+ plan. The legacy global `.ultra/execution-plan.json` is never selected implicitly;
177
+ `--plan <path>` is explicit read-only migration compatibility for an unbound legacy
178
+ plan and cannot be combined with `--change`.
169
179
  Before creating a session it rejects an empty, malformed, cyclic, duplicate-task, or
170
180
  cross-change plan. For change-owned tasks, the plan must exactly match the current DB
171
- task graph and a healthy completed `plan` workflow; an exported but incomplete or
172
- stale artifact is not executable. A separate owner approval is present only when a
173
- material planning decision required it.
181
+ task graph, planning-context digest, canonical Change artifact paths, and a healthy
182
+ completed `plan` workflow; an exported but incomplete, displaced, or stale artifact is
183
+ not executable. A separate owner approval is present only when a material planning
184
+ decision required it.
174
185
  It returns `status: "paused"` when that wave still has non-terminal Ultra tasks and
175
186
  does not dispatch later waves. Worktrees are preserved unless `--auto-merge` is
176
187
  explicitly supplied and the corresponding change task has an exact completion commit,