ultra-builder-pro-cli 0.20.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) 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 +10 -3
  4. package/.ultra-template/templates/task-context.md +19 -0
  5. package/CHANGELOG.md +106 -0
  6. package/README.md +215 -41
  7. package/adapters/_shared/codex-assets.cjs +69 -11
  8. package/adapters/_shared/interaction-contract.cjs +36 -3
  9. package/adapters/_shared/runtime-assets.cjs +41 -1
  10. package/adapters/claude.js +7 -5
  11. package/adapters/codex.js +1 -1
  12. package/adapters/kimi.js +2 -8
  13. package/adapters/opencode.js +43 -30
  14. package/bin/orchestrator.js +64 -24
  15. package/docs/AGENT-CONTEXT.md +89 -49
  16. package/docs/ARCHITECTURE.md +112 -45
  17. package/docs/ARTIFACT-AUTHORITY.md +274 -0
  18. package/docs/COMMIT-HASH-BACKFILL.md +33 -90
  19. package/docs/DECISIONS.md +14 -6
  20. package/docs/LEGACY-CLI-CROSSWALK.md +16 -6
  21. package/docs/PLUGIN-ISOLATION-CONTRACT.md +6 -4
  22. package/docs/ROADMAP.md +20 -6
  23. package/docs/RUNTIME-COMPAT-MATRIX.md +29 -16
  24. package/docs/STATE-DB-ACCESS-POLICY.md +43 -13
  25. package/docs/WORKFLOW-LIFECYCLE.md +105 -50
  26. package/hooks/README.md +10 -8
  27. package/hooks/active_task_context.py +105 -18
  28. package/hooks/context_spine.py +16 -4
  29. package/hooks/health_check.py +5 -4
  30. package/hooks/pre_stop_check.py +5 -2
  31. package/hooks/runtime_paths.py +396 -0
  32. package/hooks/subagent_tracker.py +5 -2
  33. package/hooks/workflow_checkpoint.py +16 -3
  34. package/hooks/workflow_context.py +11 -3
  35. package/hooks/workflow_resume.py +7 -4
  36. package/mcp-server/breadcrumb.cjs +20 -2
  37. package/mcp-server/lib/archive-journal.cjs +1026 -111
  38. package/mcp-server/lib/archive-mutation-worker.py +365 -0
  39. package/mcp-server/lib/artifact-registry.cjs +1127 -0
  40. package/mcp-server/lib/baseline-workflow.cjs +69 -28
  41. package/mcp-server/lib/change-packet.cjs +818 -0
  42. package/mcp-server/lib/change-workflow.cjs +932 -176
  43. package/mcp-server/lib/context-paths.cjs +142 -0
  44. package/mcp-server/lib/context-spine.cjs +511 -45
  45. package/mcp-server/lib/decision-dialogue.cjs +345 -3
  46. package/mcp-server/lib/delivery-transaction.cjs +471 -0
  47. package/mcp-server/lib/doctor-backup-worker.cjs +328 -0
  48. package/mcp-server/lib/doctor.cjs +401 -11
  49. package/mcp-server/lib/git-bootstrap.cjs +458 -47
  50. package/mcp-server/lib/init-project.cjs +240 -95
  51. package/mcp-server/lib/plan-publication-worker.cjs +830 -0
  52. package/mcp-server/lib/plan-store.cjs +700 -5
  53. package/mcp-server/lib/project-breadcrumb.cjs +23 -4
  54. package/mcp-server/lib/projector.cjs +211 -42
  55. package/mcp-server/lib/runtime-paths.cjs +1687 -0
  56. package/mcp-server/lib/safe-project-file.cjs +385 -0
  57. package/mcp-server/lib/spec-learning.cjs +28 -12
  58. package/mcp-server/lib/state-authority.cjs +19 -3
  59. package/mcp-server/lib/state-db.cjs +263 -9
  60. package/mcp-server/lib/state-ops.cjs +254 -50
  61. package/mcp-server/lib/task-ledger.cjs +1342 -0
  62. package/mcp-server/lib/telemetry.cjs +12 -3
  63. package/mcp-server/lib/workflow-state.cjs +610 -58
  64. package/mcp-server/server.cjs +423 -42
  65. package/orchestrator/daemon.cjs +2 -10
  66. package/orchestrator/parallel-orchestrator.cjs +314 -50
  67. package/orchestrator/planner/plan-builder.cjs +1 -1
  68. package/orchestrator/recovery.cjs +125 -7
  69. package/orchestrator/session-close-journal-worker.cjs +5 -0
  70. package/orchestrator/session-close-journal.cjs +1014 -0
  71. package/orchestrator/session-runner.cjs +679 -69
  72. package/orchestrator/worktree-manager.cjs +186 -35
  73. package/package.json +2 -3
  74. package/skills/cc-collab/SKILL.md +4 -1
  75. package/skills/codex-collab/SKILL.md +5 -2
  76. package/skills/ultra-change/SKILL.md +34 -8
  77. package/skills/ultra-deliver/SKILL.md +26 -11
  78. package/skills/ultra-dev/SKILL.md +52 -10
  79. package/skills/ultra-doctor/SKILL.md +16 -3
  80. package/skills/ultra-init/SKILL.md +22 -11
  81. package/skills/ultra-plan/SKILL.md +58 -18
  82. package/skills/ultra-research/SKILL.md +37 -35
  83. package/skills/ultra-review/SKILL.md +14 -8
  84. package/skills/ultra-status/SKILL.md +18 -9
  85. package/skills/ultra-test/SKILL.md +11 -5
  86. package/skills/ultra-think/SKILL.md +6 -2
  87. package/skills/ultra-think/references/decision-dialogue.md +17 -6
  88. package/skills/ultra-verify/SKILL.md +4 -1
  89. package/spec/cli-protocol.md +21 -7
  90. package/spec/mcp-tools.yaml +629 -44
  91. package/spec/schemas/change-delta.v1.schema.json +153 -0
  92. package/spec/schemas/context-file.v4.5.schema.json +1 -1
  93. package/spec/schemas/documentation-reconciliation.v1.schema.json +106 -0
  94. package/spec/schemas/mcp-tools.schema.json +1 -1
  95. package/spec/schemas/state-db.sql +51 -14
  96. package/spec/schemas/task-ledger.v1.schema.json +217 -0
  97. package/spec/schemas/tasks.v4.5.schema.json +1 -1
  98. package/ultra-tools/cli.cjs +3 -2
  99. package/ultra-tools/commands/db.cjs +76 -25
  100. package/ultra-tools/commands/migrate.cjs +1000 -82
  101. package/ultra-tools/commands/session.cjs +34 -8
  102. package/ultra-tools/commands/status.cjs +32 -6
  103. package/ultra-tools/commands/system.cjs +129 -22
  104. package/.ultra-template/tasks/contexts/TEMPLATE.md +0 -19
  105. package/commands/learn.md +0 -10
  106. package/orchestrator/skill-miner.cjs +0 -133
  107. package/output-styles/coding-vibes.md +0 -67
  108. package/output-styles/structural-thinking.md +0 -61
  109. package/skills/learn/SKILL.md +0 -58
@@ -13,11 +13,13 @@ the next semantic workflow.
13
13
 
14
14
  1. Identify the repository root, existing `.ultra` state, Git state, meaningful source,
15
15
  monorepo boundaries, and current owner request.
16
- 2. If `.ultra/state.db` exists, run `system.doctor` read-only and resume with
16
+ 2. If `.ultra/.runtime/state.db` exists, run `system.doctor` read-only and resume with
17
17
  `task.init_project` only when its report permits it.
18
- 3. Otherwise call `task.init_project` with `mode: "auto"`, the project name, and an
18
+ 3. Read the Git-facing team checkpoint when present. Never parse a legacy
19
+ `.ultra/tasks/tasks.json` as current authority or edit it directly.
20
+ 4. Otherwise call `task.init_project` with `mode: "auto"`, the project name, and an
19
21
  explicit scope only when the repository contains multiple plausible roots.
20
- 4. Leave `git_mode` as `auto` unless the user explicitly requires a non-Git workspace.
22
+ 5. Leave `git_mode` as `auto` unless the user explicitly requires a non-Git workspace.
21
23
 
22
24
  Use repository evidence to classify:
23
25
 
@@ -48,21 +50,27 @@ unresolved. Normalize clear intent already present in the request without asking
48
50
 
49
51
  The operation must:
50
52
 
51
- - create or migrate `.ultra/state.db` with a backup before schema migration;
53
+ - create or migrate `.ultra/.runtime/state.db` with a backup before schema migration;
52
54
  - install only missing scaffold assets on resume;
55
+ - create an empty `.ultra/tasks/tasks.json` team checkpoint for a new project;
56
+ - import a validated team checkpoint on clone or resume, while requiring
57
+ checkout-local revalidation before an imported ready baseline can authorize work;
53
58
  - preserve existing artifacts and unrelated work;
54
59
  - preserve an existing Git repository and HEAD;
55
60
  - initialize Git and a safe `.gitignore` entry when Git is absent;
56
61
  - report an unborn repository as `initial_commit_required` without manufacturing a
57
62
  commit, remote, tag, or push;
58
- - read back the created DB, classification, projection, and Git result before
59
- completing the init workflow.
63
+ - read back the created DB, classification, local runtime projection, team checkpoint,
64
+ and Git result before completing the init workflow.
60
65
 
61
66
  Projection-only projects must use the exact backup-first migration command returned by
62
- the runtime. A migrated compatibility baseline requires a new brownfield adoption with
67
+ the runtime. On the first supported team-checkpoint publication, a matching legacy
68
+ task projection is copied byte-for-byte into `.ultra/.runtime/backups/task-ledger/`
69
+ before replacement; any task-id or durable-field mismatch stops with a typed conflict.
70
+ A migrated compatibility baseline requires a new brownfield adoption with
63
71
  `replace_migrated: true`. Replacing a healthy baseline requires explicit replacement
64
- authority. Corrupt DB, WAL, SHM, and backups must be preserved until the user chooses a
65
- documented recovery operation.
72
+ authority. Corrupt DB, WAL, SHM, and backups must be preserved until the user chooses
73
+ a documented recovery operation.
66
74
 
67
75
  ## Completion and handoff
68
76
 
@@ -79,5 +87,8 @@ Read the returned `allowed_transitions` and `required_transition`:
79
87
  capability and wait for an explicit user invocation.
80
88
 
81
89
  Report classification, scope, schema and backup result, Git state, init workflow id,
82
- baseline state, and allowed transitions. Do not claim that a baseline is ready until a
83
- separate research/adoption workflow has recorded and converged it.
90
+ team-checkpoint import or revalidation state, baseline state, and allowed transitions.
91
+ Do not claim that a baseline is ready until a separate research/adoption workflow has
92
+ recorded and converged it in the current checkout.
93
+
94
+ Never invoke the recommended capability here; wait for an explicit user invocation.
@@ -11,11 +11,22 @@ 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, `task.ledger_get`, baseline, change, breadcrumb `accepted_intent`,
15
+ decisions, existing plan runs, tasks, and current checkout. If a new Git checkpoint
16
+ arrived after this MCP process started, call `task.ledger_import` before planning.
17
+ Stop on a typed baseline, Change, task, ancestry, or active-session conflict; never
18
+ choose one side by editing the ledger.
16
19
  2. Require one mutable change with a healthy baseline or recorded incident bypass.
20
+ For the first delivery of a greenfield project, an accepted ready baseline may
21
+ already contain the complete delivery outcome. When no matching Change exists,
22
+ materialize one `change.create` contract from that accepted intent and read it back
23
+ without asking the owner to repeat the same choice. Do not invent scope, expand an
24
+ incomplete baseline, or use this shortcut for a later change.
17
25
  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
26
+ 4. For a standard or major Change, read the current registered `change.delta` and
27
+ verify its baseline anchors and digest. A Direct Build route supplies the delta
28
+ directly from accepted intent; it skips Research, not this authority boundary.
29
+ 5. Resume the matching plan run. Do not start a new run until planning posture is
19
30
  accepted.
20
31
 
21
32
  Read `references/semantic-preflight.md` and inspect requirements, real consumers,
@@ -40,7 +51,8 @@ eventual technical design.
40
51
 
41
52
  ## Design with model autonomy
42
53
 
43
- Build a candidate plan privately. Ask the user only if the plan would change accepted
54
+ Build a candidate plan from the Change Contract, current typed delta, and any selected
55
+ research. Ask the user only if the plan would change accepted
44
56
  scope, public behavior, compatibility, security, material cost, external effects, or
45
57
  recovery. Use the same host-native interaction protocol.
46
58
 
@@ -51,30 +63,47 @@ interaction preference, not a runtime invariant.
51
63
  Record:
52
64
 
53
65
  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`
66
+ 2. `compile-context`
67
+ 3. `analyze-requirements`
68
+ 4. `analyze-codebase`
69
+ 5. `design-slices`
70
+ 6. `validate-dependencies`
71
+ 7. `persist-task-contracts`
72
+ 8. `verify-plan`
60
73
 
61
74
  Design a walking skeleton and subsequent vertical slices. Every slice reaches a real
62
75
  consumer and owns its validation, side effects, errors, documentation, migration,
63
76
  observability, and recovery obligations. Avoid unconsumed horizontal scaffolding.
64
77
 
78
+ After starting or resuming the workflow, compile `change.context` with `role: plan`
79
+ and `gate: planning`. Record its immutable manifest as the `compile-context` output.
80
+ The packet is the accepted planning input, not a mutable plan draft. `change.context`
81
+ must not update Change provider references; persist new provider metadata with
82
+ `change.update` before recompiling.
83
+
65
84
  ## Persist task contracts
66
85
 
67
86
  Create each task with:
68
87
 
69
- - observable outcome and stable trace;
88
+ - observable outcome (`purpose`) and stable trace (`why`);
70
89
  - `slice_kind`, public seam, and exact verification command;
71
90
  - structured acceptance mapped to Change acceptance ids;
72
- - bounded context refs and reasons;
73
- - documentation impact, ownership, dependencies, and affected files when known.
91
+ - target seams and affected files when known;
92
+ - bounded pattern/context refs with a reason, optional anchor and scope, and an
93
+ explicit freshness policy;
94
+ - documentation impact, ownership, and dependencies.
95
+
96
+ Use `digest` freshness with `expected_digest` for accepted inputs that must remain
97
+ byte-current. Use `existence` for source targets expected to change during
98
+ implementation. Use `advisory` only when drift should be visible but non-blocking.
99
+ The compiled task context restores constraints and non-goals from the Change Contract,
100
+ plus acceptance, recovery, documentation impact, and the definition of drift. Keep
101
+ large referenced files lazy; do not paste their bodies into the plan packet.
74
102
 
75
103
  Use estimates only when evidence supports them. A quick change has exactly one task.
76
- Read every task back from DB. Never read or write `.ultra/tasks/tasks.json` directly;
77
- it is a generated projection, not authority.
104
+ Read every task back from DB. Never read or write `.ultra/tasks/tasks.json` directly.
105
+ It is the MCP-published Git team checkpoint, while
106
+ `.ultra/.runtime/projections/tasks.json` is the generated checkout-local view.
78
107
 
79
108
  If a semantic `change.update` invalidated existing tasks, reconcile every affected
80
109
  task contract against the current intent, acceptance, decisions, and research
@@ -83,8 +112,16 @@ evidence. Rebind the complete execution contract while clearing `stale` through
83
112
  the current Change authority digest. Never clear staleness merely to pass a gate.
84
113
 
85
114
  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.
115
+ the deterministic `<artifact_root>/plan.json` and `<artifact_root>/plan.md` pair with
116
+ `plan.export { change_id }`. The JSON binds the exact planning context snapshot and
117
+ manifest digest; the Markdown is a deterministic human view of the same task graph.
118
+ An accepted export also publishes the portable baseline, Change, task contracts,
119
+ dependencies, and durable statuses to the team checkpoint. Local sessions, leases,
120
+ `in_progress` ownership, telemetry, and completion hashes remain in `.ultra/.runtime`.
121
+ Read the JSON through `plan.get` and record it as the `verify-plan` output. Do not
122
+ choose an arbitrary output path or overwrite another Change's plan. A legacy global
123
+ `.ultra/execution-plan.json` may be read for migration diagnosis only and is never a
124
+ current write target.
88
125
 
89
126
  Call `workflow.complete`. `approval` is optional: include it only when a material plan
90
127
  decision actually required and received user approval. MCP derives task coverage and
@@ -92,8 +129,11 @@ topology from DB and must reject incomplete contracts, uncovered acceptance, cyc
92
129
  cross-change tasks, stale research, or a mismatched export.
93
130
 
94
131
  Do not advance or complete the Change workflow; change capture is already complete.
95
- Compile task context later for the consumer that needs it.
132
+ Compile a separate task context later for each consumer that needs it. Planning,
133
+ implementation, testing, review, and convergence snapshots are not interchangeable.
96
134
 
97
135
  Return topology, first executable slices, public seams, verification commands, plan
98
136
  workflow id, and allowed transitions. The host may recommend parallel or sequential
99
137
  execution based on dependency and conflict evidence.
138
+
139
+ 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 the accepted semantic route and material deferrals.
9
+ MCP owns run state, evidence, semantic records, digests, freshness, and convergence, not a questionnaire.
13
10
 
14
11
  Read `../ultra-think/references/decision-dialogue.md` before asking a material question.
15
12
 
16
13
  ## Bind authority
17
14
 
18
- 1. Read `system.doctor`, `baseline.get`, active decisions, and existing research runs.
15
+ 1. Read `system.doctor`, `task.ledger_get`, `baseline.get`, breadcrumb
16
+ `accepted_intent`, active decisions, and existing research runs. Import a newer
17
+ descendant team checkpoint before binding coverage; stop on a typed merge conflict.
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,18 +26,16 @@ 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
- `99-synthesis` must execute, verify, or reuse. A missing disposition is a coverage
44
- error only for an included area; a recorded exclusion with evidence is not incomplete.
38
+ `99-synthesis` must execute, verify, or reuse. A missing disposition is a coverage error only for an included area; a recorded exclusion with evidence is not incomplete.
45
39
 
46
40
  ## Coverage catalog
47
41
 
@@ -77,15 +71,20 @@ For each active area:
77
71
  artifact. Do not copy prompts, transcripts, provider payloads, or internal chain of
78
72
  thought.
79
73
 
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.
74
+ Every required step writes `Evidence`, `Specification updates`, and `Decisions and
75
+ unknowns` to `.ultra/docs/research/<workflow-id>/<step-id>.md` for a baseline, or
76
+ `<change-root>/research/<workflow-id>/<step-id>.md` for an active Change.
77
+
78
+ Call `workflow.step` with bounded evidence, the report output, and typed semantic
79
+ records. Reused or verified evidence must still produce a current report and digest.
80
+ Block the same step when required evidence or owner authority is missing. For Change
81
+ research, keep `findings.md` and every semantic output inside the same Change root and
82
+ register them through workflow outputs; do not write baseline specifications.
86
83
 
87
84
  At synthesis, bind the current `discovery.md`, `product.md`, `architecture.md`, and
88
- `research-distillate.md` for initial/adoption research.
85
+ `research-distillate.md` only for initial/adoption research. Change-bound synthesis
86
+ updates the Change findings and specification overlay, then records or refreshes
87
+ `change.delta`. It never mutates the accepted baseline.
89
88
 
90
89
  ## Baseline convergence
91
90
 
@@ -102,15 +101,18 @@ run as blocked with `BASELINE_GIT_HEAD_REQUIRED`.
102
101
  Call `baseline.converge` only when the user has accepted the exact baseline snapshot,
103
102
  known failures, blocking gaps, and scope. Reuse an unambiguous current approval; do not
104
103
  ask twice. MCP must reject stale research, drift, missing evidence, and unaccepted
105
- failures.
104
+ failures. Successful convergence publishes the portable baseline, Changes, and tasks
105
+ to the Git team checkpoint; the receiving checkout must still revalidate a ready
106
+ baseline against its own HEAD and files.
106
107
 
107
108
  Reuse the final research acceptance or current artifact checkpoint during baseline
108
109
  convergence; do not ask for an equivalent approval again. After initial or adoption
109
110
  convergence, `ultra-change` becomes an available transition. Bounded change research
110
- returns to its owning Change authority.
111
+ returns to its owning Change authority; the next route is still `ultra-plan`, never
112
+ direct implementation.
113
+
114
+ Return a compact coverage summary by disposition, current evidence or decision blocker, baseline state, gaps, and allowed transitions.
115
+ Recommend a semantic next action from those transitions. If current intent does not already select it, present the recommendation
116
+ and credible alternatives through the interaction protocol, then wait. MCP supplies only valid and required transitions.
111
117
 
112
- Return a compact coverage summary by disposition, current evidence or decision
113
- blocker, baseline state, gaps, and allowed transitions. Recommend a semantic next
114
- action from those transitions. If current intent does not already select it, present
115
- the recommendation and credible alternatives through the interaction protocol, then
116
- wait. MCP supplies only valid and required transitions.
118
+ Never invoke the recommended capability here; wait for an explicit user invocation.
@@ -17,10 +17,12 @@ Neither axis can compensate for the other.
17
17
 
18
18
  1. Read `references/review-modes.md` and select `plan`, `task`, or `change` from the
19
19
  actual review request.
20
- 2. Bind one explicit diff or plan artifact, full HEAD, worktree digest, task set,
21
- acceptance, and current decision state.
22
- 3. Resume or start the review workflow and record `bind-diff`.
23
- 4. Compile `change.context` for `review` and record the immutable manifest under
20
+ 2. Read doctor and `task.ledger_get`. Import a newer descendant checkpoint before
21
+ binding the review scope; stop on a typed merge conflict.
22
+ 3. Bind one explicit diff or plan artifact, full HEAD, worktree digest, task set,
23
+ acceptance, breadcrumb `accepted_intent`, and current decision state.
24
+ 4. Resume or start the review workflow and record `bind-diff`.
25
+ 5. Compile `change.context` for `review` and record the immutable manifest under
24
26
  `compile-context`.
25
27
 
26
28
  An empty, ambiguous, or stale scope cannot pass.
@@ -37,8 +39,9 @@ not decide owner choices or edit source.
37
39
 
38
40
  Resolve `references/unified-schema.md` from this Skill directory and pass its absolute
39
41
  path as `SCHEMA_PATH`. Validate specialist artifacts with
40
- `scripts/review_wait.py`. Record outputs under `review-specification`,
41
- `review-engineering`, and `coordinate-findings`.
42
+ `scripts/review_wait.py`. Store all specialist artifacts and `SUMMARY.json` below
43
+ `.ultra/changes/active/<change-id>/review/<workflow-id>/`. Record outputs under
44
+ `review-specification`, `review-engineering`, and `coordinate-findings`.
42
45
 
43
46
  The coordinator preserves every finding unchanged in `SUMMARY.json`; it may group
44
47
  duplicate root causes only in the human summary. A new material owner choice remains a
@@ -52,5 +55,8 @@ the durable verdict and rejects missing specialists, lossy coordination, stale
52
55
  artifacts, or prompt-supplied conclusions.
53
56
 
54
57
  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.
58
+ review evidence through registered provenance edges; unrelated evidence remains
59
+ current. Return both verdict axes, blocking findings, reviewed scope, worker selection
60
+ rationale, artifact digests, and allowed transitions.
61
+
62
+ Never invoke the recommended capability here; wait for an explicit user invocation.
@@ -5,18 +5,23 @@ description: Read authoritative Ultra health, workflows, decisions, changes, tas
5
5
 
6
6
  # Report authoritative state
7
7
 
8
- This Skill is read-only. Never fall back to generated task JSON, prose, or context
9
- frontmatter when DB authority is missing or degraded.
8
+ This Skill is read-only. Never fall back to the Git team checkpoint, generated task
9
+ JSON, prose, or context frontmatter when checkout-local DB authority is missing or
10
+ degraded.
10
11
 
11
12
  ## Read
12
13
 
13
14
  1. Run `system.doctor` without repair.
14
- 2. Read baseline classification, revision, worktree, research provenance, gaps, and
15
+ 2. Run `task.ledger_get`. Report `current`, `drifted`, `revalidation_required`,
16
+ `missing`, or a typed invalid/conflict state; do not import or publish from status.
17
+ 3. Read baseline classification, revision, worktree, research provenance, gaps, and
15
18
  health.
16
- 3. Read current decision state without exposing hidden future questions.
17
- 4. Read active, blocked, and ready workflows and their current steps.
18
- 5. Read breadcrumb, changes, tasks, sessions, and current Git state.
19
- 6. Read test, review, and delivery artifacts only through DB references and verify
19
+ 4. Read current decision state and breadcrumb `accepted_intent` without exposing hidden
20
+ future questions.
21
+ 5. Read active, blocked, and ready workflows and their current steps.
22
+ 6. Read the active Change root, typed delta, plan, deterministic progress projection,
23
+ documentation reconciliation, findings, tasks, sessions, and current Git state.
24
+ 7. Read test, review, and delivery artifacts only through DB references and verify
20
25
  their digests and revisions.
21
26
 
22
27
  If authority is unreadable, report the unavailable panel and the required doctor or
@@ -42,8 +47,10 @@ Ultra: <healthy|degraded> · <branch>@<head|unborn|non-git> · worktree <state>
42
47
  Baseline: <mode>/<status> · research=<run/status> · gaps=<open>/<blocking>
43
48
  Workflow: <kind/id/status> · step=<current|complete> · outputs=<fresh|stale>
44
49
  Decision: <current|checkpoint|none>
45
- Change: <id/status|none> · Task: <id/status|none> · Sessions: <active>
46
- Evidence: test=<state> · review=<axes> · delivery=<state>
50
+ Change: <id/status|none> · delta=<fresh|stale|missing> · docs=<fresh|stale|missing>
51
+ Task: <id/status|none> · Sessions: <active>
52
+ Evidence: plan=<state> · test=<state> · review=<axes> · delivery=<state>
53
+ Team checkpoint: <current|drifted|revalidation_required|missing|invalid> · generation=<n>
47
54
  Blockers: <codes or none>
48
55
  Warnings: <codes or none>
49
56
  Allowed transitions: <capabilities>
@@ -52,3 +59,5 @@ Host recommendation: <capability and concise rationale>
52
59
  ```
53
60
 
54
61
  Separate verified facts, host inference, and unavailable evidence.
62
+
63
+ Never invoke the recommended capability here; wait for an explicit user invocation.
@@ -10,8 +10,9 @@ 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, `task.ledger_get`, change, breadcrumb `accepted_intent`, decisions,
14
+ task and dev evidence, current checkout, and prior report freshness. Import a newer
15
+ descendant checkpoint before binding the task set; stop on a typed merge conflict.
15
16
  2. Resume or start a test workflow bound to the exact change and optional task.
16
17
  3. Record `bind-scope`, then compile `change.context` for `check` and record its
17
18
  immutable manifest under `compile-context`.
@@ -47,10 +48,12 @@ question UI and decision protocol; testing must not choose the desired outcome.
47
48
 
48
49
  ## Report
49
50
 
50
- Write `.ultra/reports/tests/<workflow-id>.json` with
51
+ Write
52
+ `.ultra/changes/active/<change-id>/test/<workflow-id>/report.json` with
51
53
  `ultra-test-report-v1`, binding:
52
54
 
53
- - change, exact task ids, HEAD, worktree digest, and checking-context digest;
55
+ - change, exact task ids, current Change acceptance ids, HEAD, worktree digest, and
56
+ checking-context digest;
54
57
  - acceptance mapping, commands, public seams, failures, and recovery evidence;
55
58
  - `verification_profile` and the selected `verification_dimensions`;
56
59
  - regression signal when required;
@@ -58,7 +61,8 @@ Write `.ultra/reports/tests/<workflow-id>.json` with
58
61
 
59
62
  Record `execute-checks`, `verify-public-seam`, and `write-report`, then re-read the
60
63
  report and current checkout before `verify-test-gate`. `workflow.complete` derives its
61
- summary from the report and rejects stale, malformed, or contradictory evidence.
64
+ summary from the report and rejects stale, malformed, contradictory, out-of-Change,
65
+ or acceptance-incomplete evidence.
62
66
 
63
67
  Return the profile, exact results, verified seams, blockers, report digest, workflow
64
68
  state, and allowed transitions. Recommend broader review, more implementation, or
@@ -66,3 +70,5 @@ delivery from those transitions. If current intent does not already select the
66
70
  semantic next action, use
67
71
  `../ultra-think/references/decision-dialogue.md` and wait for the user to select,
68
72
  modify, delegate, or defer it.
73
+
74
+ 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
@@ -91,6 +91,9 @@ as a fallback unless `ultra-tools <family> --help` lists it.
91
91
  | `task.expand` | `task expand` | 8a | mcp |
92
92
  | `task.parse_prd` | `task parse-prd` | 8a | mcp |
93
93
  | `task.dependency_topo` | `task topo` | 8a | mcp |
94
+ | `task.ledger_get` | `task ledger-get` | 21 | any |
95
+ | `task.ledger_publish` | `task ledger-publish` | 21 | mcp |
96
+ | `task.ledger_import` | `task ledger-import` | 21 | mcp |
94
97
  | `task.append_event` | `task append-event` | 2 | any (allowlisted observations only) |
95
98
  | `task.subscribe_events` | `task subscribe` | 2 | any |
96
99
  | `session.spawn` | `session spawn` | 4.5 | mcp |
@@ -106,6 +109,8 @@ as a fallback unless `ultra-tools <family> --help` lists it.
106
109
  | `baseline.converge` | `baseline converge` | 11 | mcp |
107
110
  | `change.create` | `change create` | 9 | mcp |
108
111
  | `change.update` | `change update` | 9 | mcp |
112
+ | `change.delta` | `change delta` | 21 | mcp |
113
+ | `change.documentation_reconcile` | `change documentation-reconcile` | 21 | mcp |
109
114
  | `change.get` | `change get` | 9 | any |
110
115
  | `change.list` | `change list` | 9 | any |
111
116
  | `change.context` | `change context` | 9 | mcp |
@@ -128,7 +133,11 @@ as a fallback unless `ultra-tools <family> --help` lists it.
128
133
  | `workflow.get` | `workflow get` | 13 | any |
129
134
  | `workflow.list` | `workflow list` | 13 | any |
130
135
  | `workflow.step` | `workflow step` | 13 | mcp |
136
+ | `workflow.revise` | `workflow revise` | 21 | mcp |
137
+ | `workflow.supersede` | `workflow supersede` | 21 | mcp |
131
138
  | `workflow.complete` | `workflow complete` | 13 | mcp |
139
+ | `artifact.record` | `artifact record` | 20 | mcp |
140
+ | `artifact.get` | `artifact get` | 20 | any |
132
141
  | `system.doctor` | `system doctor` | 9 | mcp |
133
142
  | `plan.export` | `plan export` | 8a | mcp |
134
143
  | `plan.get` | `plan get` | 8a | any |
@@ -136,7 +145,7 @@ as a fallback unless `ultra-tools <family> --help` lists it.
136
145
  Current executable maintenance surfaces are `task init-project`,
137
146
  `session close|get|list|admission|heartbeat|subscribe|reap`, `status`, `db`,
138
147
  `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
148
+ and all `change`, `decision`, and `artifact` lifecycle verbs are not CLI fallbacks. Their state must use
140
149
  the live MCP server; `system doctor` may additionally be exposed by the
141
150
  maintenance CLI because it is the recovery path when MCP startup is degraded.
142
151
  `task init-project --resume` preserves existing `.ultra` files and installs only
@@ -148,7 +157,7 @@ the same Git ancestry and dirty-state verifier as MCP and fails with
148
157
  `system doctor --repair` applies supported schema upgrades with a pre-migration
149
158
  backup before mechanical recovery.
150
159
  `system restore` requires the exact `REPLACE_CORRUPT_ULTRA_STATE` confirmation and a
151
- verified database inside `.ultra/backups`; it quarantines the corrupt state before
160
+ verified database inside `.ultra/.runtime/backups`; it quarantines the corrupt state before
152
161
  atomic replacement. `system rebaseline` requires the exact
153
162
  `REBASELINE_CORRUPT_ULTRA_STATE` confirmation and preserves corrupt state plus the
154
163
  legacy task projection before starting a new brownfield adoption.
@@ -164,13 +173,18 @@ semantics, is a major bump. Major bumps require an entry in
164
173
 
165
174
  ## 7. `ubp-orchestrator`
166
175
 
167
- `ubp-orchestrator execute-plan` consumes the completed and current
168
- `.ultra/execution-plan.json` and resumes from the first unfinished dependency wave.
176
+ `ubp-orchestrator execute-plan` resolves the completed current plan from the active
177
+ Change's DB row and `<artifact_root>/plan.json`, then resumes from the first unfinished
178
+ dependency wave. Use `--change <id>` when more than one active Change has a completed
179
+ plan. The legacy global `.ultra/execution-plan.json` is never selected implicitly;
180
+ `--plan <path>` is explicit read-only migration compatibility for an unbound legacy
181
+ plan and cannot be combined with `--change`.
169
182
  Before creating a session it rejects an empty, malformed, cyclic, duplicate-task, or
170
183
  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.
184
+ task graph, planning-context digest, canonical Change artifact paths, and a healthy
185
+ completed `plan` workflow; an exported but incomplete, displaced, or stale artifact is
186
+ not executable. A separate owner approval is present only when a material planning
187
+ decision required it.
174
188
  It returns `status: "paused"` when that wave still has non-terminal Ultra tasks and
175
189
  does not dispatch later waves. Worktrees are preserved unless `--auto-merge` is
176
190
  explicitly supplied and the corresponding change task has an exact completion commit,