ultra-builder-pro-cli 0.15.0 → 0.17.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/.ultra-template/specs/research-distillate.md +4 -3
- package/CHANGELOG.md +120 -1
- package/README.md +67 -30
- package/adapters/_shared/codex-assets.cjs +10 -5
- package/adapters/_shared/handbook.cjs +3 -2
- package/adapters/_shared/interaction-contract.cjs +61 -0
- package/adapters/claude.js +1 -1
- package/adapters/opencode.js +1 -1
- package/bin/orchestrator.js +175 -19
- package/commands/ultra-change.md +1 -1
- package/commands/ultra-deliver.md +3 -3
- package/commands/ultra-init.md +1 -1
- package/commands/ultra-plan.md +1 -1
- package/commands/ultra-research.md +2 -2
- package/commands/ultra-review.md +10 -0
- package/commands/ultra-status.md +1 -1
- package/commands/ultra-test.md +1 -1
- package/commands/ultra-think.md +2 -2
- package/docs/AGENT-CONTEXT.md +38 -18
- package/docs/ARCHITECTURE.md +91 -13
- package/docs/LEGACY-CLI-CROSSWALK.md +163 -0
- package/docs/PLAN.zh-CN.md +19 -12
- package/docs/ROADMAP.md +5 -3
- package/docs/RUNTIME-COMPAT-MATRIX.md +4 -4
- package/docs/STATE-DB-ACCESS-POLICY.md +8 -6
- package/docs/USER-HANDBOOK-CONTRACT.md +8 -2
- package/docs/WORKFLOW-LIFECYCLE.md +179 -39
- package/hooks/pre_stop_check.py +3 -2
- package/mcp-server/lib/baseline-workflow.cjs +84 -16
- package/mcp-server/lib/change-workflow.cjs +107 -39
- package/mcp-server/lib/context-spine.cjs +215 -87
- package/mcp-server/lib/decision-dialogue.cjs +713 -0
- package/mcp-server/lib/doctor.cjs +9 -0
- package/mcp-server/lib/git-bootstrap.cjs +240 -0
- package/mcp-server/lib/init-project.cjs +178 -41
- package/mcp-server/lib/project-breadcrumb.cjs +23 -14
- package/mcp-server/lib/state-db.cjs +279 -9
- package/mcp-server/lib/state-ops.cjs +64 -1
- package/mcp-server/lib/workflow-state.cjs +313 -205
- package/mcp-server/server.cjs +112 -34
- package/orchestrator/auto-merge.cjs +19 -0
- package/orchestrator/daemon.cjs +104 -0
- package/orchestrator/parallel-orchestrator.cjs +371 -49
- package/orchestrator/session-runner.cjs +354 -25
- package/package.json +2 -1
- package/skills/ultra-change/SKILL.md +69 -65
- package/skills/ultra-deliver/SKILL.md +37 -58
- package/skills/ultra-dev/SKILL.md +55 -49
- package/skills/ultra-doctor/SKILL.md +44 -49
- package/skills/ultra-init/SKILL.md +78 -100
- package/skills/ultra-plan/SKILL.md +78 -79
- package/skills/ultra-research/SKILL.md +99 -98
- package/skills/ultra-review/SKILL.md +38 -47
- package/skills/ultra-review/references/review-modes.md +5 -3
- package/skills/ultra-review/references/unified-schema.md +26 -6
- package/skills/ultra-review/scripts/review_wait.py +12 -0
- package/skills/ultra-status/SKILL.md +34 -40
- package/skills/ultra-test/SKILL.md +61 -48
- package/skills/ultra-think/SKILL.md +47 -47
- package/skills/ultra-think/references/decision-dialogue.md +106 -0
- package/spec/cli-protocol.md +46 -2
- package/spec/mcp-tools.yaml +444 -29
- package/spec/schemas/delivery-report.v1.schema.json +1 -46
- package/spec/schemas/mcp-tools.schema.json +1 -1
- package/spec/schemas/state-db.sql +66 -2
- package/spec/schemas/test-report.v1.schema.json +45 -14
- package/ultra-tools/cli.cjs +1 -1
- package/ultra-tools/commands/session.cjs +10 -3
- package/ultra-tools/commands/status.cjs +34 -14
- package/ultra-tools/commands/system.cjs +2 -2
- package/ultra-tools/commands/task.cjs +3 -0
|
@@ -8,7 +8,7 @@ specifications' prose.
|
|
|
8
8
|
- Baseline or change id:
|
|
9
9
|
- Research workflow id and mode:
|
|
10
10
|
- Repository revision:
|
|
11
|
-
-
|
|
11
|
+
- Coverage dispositions and selected evidence work:
|
|
12
12
|
|
|
13
13
|
## Observed
|
|
14
14
|
|
|
@@ -24,7 +24,7 @@ specifications' prose.
|
|
|
24
24
|
|
|
25
25
|
## Unknowns
|
|
26
26
|
|
|
27
|
-
| Unknown or gap id | Blocking | Owner
|
|
27
|
+
| Unknown or gap id | Blocking | Owner and revisit condition |
|
|
28
28
|
|---|---|---|
|
|
29
29
|
| | | |
|
|
30
30
|
|
|
@@ -45,4 +45,5 @@ specifications' prose.
|
|
|
45
45
|
- Accepted scope and posture:
|
|
46
46
|
- Required references:
|
|
47
47
|
- Blocking gaps:
|
|
48
|
-
-
|
|
48
|
+
- Allowed transitions:
|
|
49
|
+
- Host recommendation and rationale:
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,124 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.17.0] — 2026-07-24
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added deterministic Git bootstrap for initialization and resume, including
|
|
15
|
+
explicit `auto`, `initialize`, and `skip` modes, persisted unborn-HEAD state,
|
|
16
|
+
and an owner-authorized first-checkpoint gate.
|
|
17
|
+
- Added a source-backed compatibility crosswalk against the original
|
|
18
|
+
`rocky2431/ultra-builder-pro` workflow and a shell-free `execute-plan`
|
|
19
|
+
consumer for current completed-plan dependency waves.
|
|
20
|
+
- Added schema 18 adaptive transition state, migration of active legacy
|
|
21
|
+
init/change/plan/deliver runs, Context Manifest v3 Change-authority digests,
|
|
22
|
+
and one host-specific interaction contract for every supported runtime.
|
|
23
|
+
- Added research coverage dispositions (`execute`, `verify_existing`, `reuse`,
|
|
24
|
+
`not_applicable`, and accepted `deferred`) and risk-selected verification
|
|
25
|
+
profiles with rationale for every excluded dimension.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- Changed plan execution into a resumable wave state machine. A wave pauses
|
|
30
|
+
until its DB tasks converge, later dependencies remain pending, and reruns
|
|
31
|
+
skip completed work.
|
|
32
|
+
- Changed MCP session spawning to create the single authoritative Git worktree
|
|
33
|
+
and session record. Session close now preserves work by default, and
|
|
34
|
+
change-owned auto-merge requires current dev and review evidence.
|
|
35
|
+
- Changed session worktrees to bind their ignored `.ultra` entry to the central
|
|
36
|
+
authority and pass non-overridable DB, checkout, and authority-root paths to
|
|
37
|
+
explicit workers.
|
|
38
|
+
- Changed initialization to complete after classification, local Git/scaffold
|
|
39
|
+
setup, and read-back verification. It never starts research implicitly;
|
|
40
|
+
baseline research begins only through an explicit invocation.
|
|
41
|
+
- Changed the workflow from a canonical next-action pipeline to an adaptive
|
|
42
|
+
capability graph. MCP exposes valid alternatives and unique hard-recovery
|
|
43
|
+
transitions; the active host owns semantic recommendations and native user
|
|
44
|
+
interaction.
|
|
45
|
+
- Changed change capture to end after the accepted intent contract, made plan
|
|
46
|
+
approval conditional on a material owner decision, selected test/review work
|
|
47
|
+
by risk, and limited Ultra delivery to local convergence and archive.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- Fixed process exit zero, worker spawn errors, and daemon failures bypassing
|
|
52
|
+
task gates or losing session-linked failure and circuit-breaker evidence.
|
|
53
|
+
- Fixed daemon dispatch of stale tasks, unresolved dependencies, or overlapping
|
|
54
|
+
declared files, and made explicit takeover terminate the prior worker before
|
|
55
|
+
replacing its lease.
|
|
56
|
+
- Fixed initialization resume leaving corrected metadata or projections behind
|
|
57
|
+
after a late failure; DB state, generated projections, and newly bootstrapped
|
|
58
|
+
Git now roll back together.
|
|
59
|
+
- Fixed cleanup paths that could remove uncommitted or unintegrated worktrees,
|
|
60
|
+
and fixed dependency waves that could start before prior task convergence.
|
|
61
|
+
- Fixed change-owned auto-merge trusting task status alone; integration now
|
|
62
|
+
requires the exact completion commit, ready dev evidence, and current task review.
|
|
63
|
+
- Fixed `execute-plan` accepting empty, cyclic, duplicate-task, stale, or
|
|
64
|
+
incomplete change plans. Change-owned execution now requires the exact healthy
|
|
65
|
+
completed plan workflow and current DB task graph.
|
|
66
|
+
- Fixed direct MCP and daemon session creation bypassing the plan workflow.
|
|
67
|
+
Admission and spawn now share the same current task-contract, dependency, and
|
|
68
|
+
staleness gate before takeover or worktree mutation.
|
|
69
|
+
- Fixed plan-authority drift between wave selection and spawn being counted as a
|
|
70
|
+
worker failure, and fixed isolated workers creating a second project DB.
|
|
71
|
+
- Fixed an isolated worker recursively spawning, taking over, or prematurely
|
|
72
|
+
closing its parent-owned session; the supervising process now remains the only
|
|
73
|
+
transport-settlement authority.
|
|
74
|
+
- Fixed late resume failure after a schema upgrade restoring the migrated
|
|
75
|
+
intermediate DB instead of the exact pre-migration backup.
|
|
76
|
+
- Fixed the directory-only `.ultra/` Git ignore form failing to protect an
|
|
77
|
+
authority symlink from `git add -A`; fresh initialization uses the symlink-safe
|
|
78
|
+
`.ultra` rule, while legacy repositories receive a repository-local
|
|
79
|
+
`info/exclude` rule without changing their tracked baseline.
|
|
80
|
+
- Fixed semantic `change.update` operations leaving derived tasks and compiled
|
|
81
|
+
contexts apparently current. A changed intent contract now marks tasks stale,
|
|
82
|
+
invalidates Context v3, and records the exact invalidation evidence.
|
|
83
|
+
- Fixed stale tasks remaining usable through plan completion, dev startup,
|
|
84
|
+
verification, delivery, or orchestrator admission after semantic invalidation.
|
|
85
|
+
- Fixed marker-only task reconciliation bypassing semantic invalidation. Clearing
|
|
86
|
+
`stale` now requires a complete execution-contract rebind and records the current
|
|
87
|
+
Change authority digest.
|
|
88
|
+
- Fixed review convergence accepting incomplete or fabricated worker provenance;
|
|
89
|
+
every specialist is now selected or skipped with rationale, and completed workers
|
|
90
|
+
must exactly match persisted specialist artifacts.
|
|
91
|
+
- Fixed MCP workflow contracts omitting public freshness, recovery, review, testing,
|
|
92
|
+
and delivery failure codes needed by host adapters.
|
|
93
|
+
- Fixed runtime specification templates and workflow prompts retaining rigid-route
|
|
94
|
+
wording or omitting durable step and decision-tool handoffs.
|
|
95
|
+
|
|
96
|
+
## [0.16.0] — 2026-07-23
|
|
97
|
+
|
|
98
|
+
### Added
|
|
99
|
+
|
|
100
|
+
- Added schema 16 durable decision threads and items with exactly one current
|
|
101
|
+
question, normalized owner answers, explicit reversible delegation, consequence-
|
|
102
|
+
bearing deferral, supersession history, and artifact-bound checkpoints.
|
|
103
|
+
- Added nine `decision.*` MCP contracts, CLI mappings, events, valid/invalid contract
|
|
104
|
+
fixtures, status/breadcrumb recovery, doctor health checks, and workflow gates.
|
|
105
|
+
- Added one canonical progressive-disclosure decision protocol shared by init,
|
|
106
|
+
research, thinking, change, and planning without copying questionnaires into each
|
|
107
|
+
Skill.
|
|
108
|
+
|
|
109
|
+
### Changed
|
|
110
|
+
|
|
111
|
+
- Changed research to preserve all seventeen semantic steps as an internal coverage
|
|
112
|
+
contract while exposing only the current owner decision or compact checkpoint.
|
|
113
|
+
- Changed change and plan formation to inspect facts autonomously, present one
|
|
114
|
+
evidence-backed choice at a time, stop for the owner, and reuse one approved
|
|
115
|
+
checkpoint instead of requesting equivalent confirmations.
|
|
116
|
+
- Changed dev, test, review, deliver, status, doctor, user handbooks, and lifecycle
|
|
117
|
+
documentation to recover through the same decision authority and exact next route.
|
|
118
|
+
|
|
119
|
+
### Fixed
|
|
120
|
+
|
|
121
|
+
- Prevented a decision thread for one change from blocking unrelated changes on the
|
|
122
|
+
same baseline while preserving baseline-only and matching workflow gates.
|
|
123
|
+
- Prevented workflow steps or completion from advancing on an open, blocking-deferred,
|
|
124
|
+
checkpoint-ready, stale, or superseded owner decision.
|
|
125
|
+
- Prevented prompt transcripts, static question queues, large research dumps, and
|
|
126
|
+
repeated owner approvals from becoming project authority.
|
|
127
|
+
|
|
10
128
|
## [0.15.0] — 2026-07-22
|
|
11
129
|
|
|
12
130
|
### Added
|
|
@@ -624,7 +742,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
624
742
|
skill manifest, CLI protocol + mapping table; 5 spec validators.
|
|
625
743
|
- **Phase 0 — skeleton**: multi-runtime installer scaffolding.
|
|
626
744
|
|
|
627
|
-
[Unreleased]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.
|
|
745
|
+
[Unreleased]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.16.0...HEAD
|
|
746
|
+
[0.16.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.15.0...v0.16.0
|
|
628
747
|
[0.15.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.14.0...v0.15.0
|
|
629
748
|
[0.14.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.13.0...v0.14.0
|
|
630
749
|
[0.13.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.12.1...v0.13.0
|
package/README.md
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Multi-runtime plugin suite + autonomous coding factory for the Ultra Builder Pro
|
|
4
4
|
agent engineering system. It ships native plugins for **Claude Code · OpenCode ·
|
|
5
5
|
Codex · Kimi Code** and orchestrates PRD →
|
|
6
|
-
dependency graph →
|
|
7
|
-
authoritative `.ultra/state.db`.
|
|
6
|
+
dependency graph → resumable dependency-wave execution → convergence-gated
|
|
7
|
+
integration with a single authoritative `.ultra/state.db`.
|
|
8
8
|
|
|
9
9
|
<div align="center">
|
|
10
10
|
|
|
11
|
-
[](./CHANGELOG.md)
|
|
12
12
|
[](#verification)
|
|
13
13
|
[](./LICENSE)
|
|
14
14
|
[](./package.json)
|
|
@@ -25,20 +25,31 @@ authoritative `.ultra/state.db`.
|
|
|
25
25
|
Install and uninstall are symmetric on every supported host; `ubp --doctor`
|
|
26
26
|
verifies the installed asset hashes and host entry points without mutation.
|
|
27
27
|
- **Shares state across runtimes.** `.ultra/state.db` (SQLite + WAL) is the
|
|
28
|
-
authoritative source for baselines, changes,
|
|
29
|
-
projection jobs, and telemetry. `tasks.json` and context markdown are
|
|
28
|
+
authoritative source for baselines, changes, decision threads, workflows, tasks,
|
|
29
|
+
sessions, events, incidents, projection jobs, and telemetry. `tasks.json` and context markdown are
|
|
30
30
|
generated projections, not handwritten.
|
|
31
|
+
- **Aligns the owner and agent without questionnaire overload.** The host resolves
|
|
32
|
+
observable facts first, then presents exactly one load-bearing decision with
|
|
33
|
+
evidence, a recommendation, credible alternatives, and the durable effect. The
|
|
34
|
+
normalized answer and owner-approved artifact checkpoint live in the DB; prompts
|
|
35
|
+
and transcripts do not. Matching workflows stop until that authority is current.
|
|
31
36
|
- **Keeps memory ownership explicit.** Ultra Builder Pro does not collect
|
|
32
37
|
prompts, transcripts, observations, summaries, or cross-session memory.
|
|
33
38
|
Install cloud-mem/claude-mem separately if persistent memory is wanted.
|
|
34
|
-
- **Runs
|
|
35
|
-
|
|
36
|
-
`.ultra/execution-plan.json` → parallel worktree sessions
|
|
39
|
+
- **Runs current plans without a second model credential.** The current host
|
|
40
|
+
derives task objects; `task.parse_prd` validates them → `lib/topo.cjs` waves →
|
|
41
|
+
`.ultra/execution-plan.json` → parallel worktree sessions. Execution pauses at
|
|
42
|
+
the first wave whose tasks have not converged through Ultra gates. An explicit
|
|
43
|
+
auto-merge is accepted only for a change task with a matching completion commit,
|
|
44
|
+
ready dev evidence, and a current task review; transport success alone preserves
|
|
45
|
+
the worktree.
|
|
37
46
|
- **Keeps daily work convergent.** `/ultra-change` creates a bounded delta and
|
|
38
47
|
complete Change Contract, classifies risk, records whether bounded research is
|
|
39
|
-
required, and
|
|
40
|
-
|
|
41
|
-
|
|
48
|
+
required, and leaves planning and context compilation to their actual consumers.
|
|
49
|
+
Context Manifest v3 assigns a role/gate, verifies required references, reports
|
|
50
|
+
fresh-context budget pressure as advisory warnings, and exposes mechanically valid
|
|
51
|
+
transitions without choosing the semantic route. Research stores typed,
|
|
52
|
+
source-digested semantic records;
|
|
42
53
|
planning proves Change acceptance coverage; `/ultra-deliver` requires applied specification
|
|
43
54
|
learning plus docs/test/mode-bound two-axis review evidence and a schema-validated
|
|
44
55
|
baseline reconciliation manifest before archive. `/ultra-doctor` reports incidents,
|
|
@@ -94,9 +105,16 @@ based on delivered-system evidence: application source, tests, deployment, or
|
|
|
94
105
|
persisted-state/schema signals make a repository brownfield; a Git repository,
|
|
95
106
|
manifest, README, or starter documentation alone remains greenfield. An empty project
|
|
96
107
|
opens a `draft` greenfield baseline and an existing system opens an `adopting`
|
|
97
|
-
brownfield baseline.
|
|
98
|
-
|
|
99
|
-
|
|
108
|
+
brownfield baseline. Initialization completes after classification, local Git setup,
|
|
109
|
+
scaffold creation, and read-back verification; it never starts research implicitly.
|
|
110
|
+
When `ultra-research` is explicitly invoked, the host dispositions each of seventeen
|
|
111
|
+
coverage areas as `execute`, `verify_existing`, `reuse`, `not_applicable`, or accepted
|
|
112
|
+
`deferred`. It performs only the necessary work before `baseline.record` and explicit
|
|
113
|
+
`baseline.converge`; initialization never treats blank templates as a trusted baseline
|
|
114
|
+
and never selects an MVP. Auto mode preserves existing
|
|
115
|
+
Git or initializes `main` and adds a symlink-safe `.ultra` ignore rule; an unborn
|
|
116
|
+
repository requires an owner-approved local checkpoint commit before the baseline can
|
|
117
|
+
be recorded. It never creates a remote, tag, or push. Existing active work may
|
|
100
118
|
continue only when its durable change workflow was bound to a healthy ready baseline;
|
|
101
119
|
the expected HEAD, worktree, spec, and source-evidence drift created by that change is
|
|
102
120
|
advisory until delivery reconciliation. Loss of approved-ready status or structural
|
|
@@ -105,6 +123,8 @@ approver and leaves a blocking reconciliation gap at archive; new ordinary work
|
|
|
105
123
|
requires a healthy ready baseline. See
|
|
106
124
|
[`docs/WORKFLOW-LIFECYCLE.md`](./docs/WORKFLOW-LIFECYCLE.md) for exact write,
|
|
107
125
|
transition, invalidation, and recovery semantics.
|
|
126
|
+
The semantic crosswalk to the original Claude Code harness is
|
|
127
|
+
[`docs/LEGACY-CLI-CROSSWALK.md`](./docs/LEGACY-CLI-CROSSWALK.md).
|
|
108
128
|
|
|
109
129
|
## Three-layer architecture
|
|
110
130
|
|
|
@@ -112,15 +132,16 @@ transition, invalidation, and recovery semantics.
|
|
|
112
132
|
|-------|---------|----------------|
|
|
113
133
|
| **skill** (`skills/ultra-*/`) | Knowledge — prompts, workflows, prose | Runtime's native skill/prompt loader picks them up after install |
|
|
114
134
|
| **MCP** (`mcp-server/`) | Authoritative state — reads/writes `.ultra/state.db` via stdio JSON-RPC | Primary path for task / session / event / plan operations |
|
|
115
|
-
| **CLI** (`ultra-tools`, `bin/*`) | Selected initialization, recovery, diagnostics, and orchestration surfaces | `ultra-tools task init-project`, `ultra-tools system doctor`, `ubp-orchestrator
|
|
135
|
+
| **CLI** (`ultra-tools`, `bin/*`) | Selected initialization, recovery, diagnostics, and orchestration surfaces | `ultra-tools task init-project`, `ultra-tools system doctor`, `ubp-orchestrator execute-plan` |
|
|
116
136
|
|
|
117
137
|
The layers share one `.ultra/state.db`, but the CLI is not a mirror of every MCP
|
|
118
138
|
tool: continuous change mutations are MCP-only and fail closed. See
|
|
119
139
|
[`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md) for the full contract and
|
|
120
|
-
[`spec/cli-protocol.md`](./spec/cli-protocol.md) for the
|
|
121
|
-
Review, impact discovery, skill resolution, and
|
|
122
|
-
|
|
123
|
-
|
|
140
|
+
[`spec/cli-protocol.md`](./spec/cli-protocol.md) for the 50 live contracts.
|
|
141
|
+
Review, impact discovery, skill resolution, and decision presentation stay on each
|
|
142
|
+
host's native surfaces; MCP stores normalized decision authority but never generates
|
|
143
|
+
questions. The generated Codex capability map documents those replacements without
|
|
144
|
+
advertising non-existent MCP tools.
|
|
124
145
|
|
|
125
146
|
The package boundary is deliberate: twelve public Ultra workflow skills, four
|
|
126
147
|
internal review-rule skills, host-specific collaboration companions, and the
|
|
@@ -137,7 +158,7 @@ and framework guidance belong to their original plugins.
|
|
|
137
158
|
| Workflow hooks | ✅ (native plugin) | ✅ (native JS plugin) | ✅ (native plugin) | ✅ with documented compact limitation |
|
|
138
159
|
| Sub-agents | ✅ | ✅ | ✅ (9 native TOML agents) | ✅ via `Agent` / `AgentSwarm` prompt templates |
|
|
139
160
|
| Session worktree isolation | ✅ (driven by `orchestrator/session-runner.cjs`) | ✅ | ✅ | ✅ |
|
|
140
|
-
|
|
|
161
|
+
| Dependency-wave dispatch + optional verified auto-merge | ✅ (`ubp-orchestrator execute-plan`) | ✅ | ✅ | ✅ |
|
|
141
162
|
|
|
142
163
|
Full details in [`docs/RUNTIME-COMPAT-MATRIX.md`](./docs/RUNTIME-COMPAT-MATRIX.md)
|
|
143
164
|
(10 sections, with per-runtime deviations called out).
|
|
@@ -145,19 +166,29 @@ Full details in [`docs/RUNTIME-COMPAT-MATRIX.md`](./docs/RUNTIME-COMPAT-MATRIX.m
|
|
|
145
166
|
## Typical workflow
|
|
146
167
|
|
|
147
168
|
```bash
|
|
148
|
-
# 1. Bootstrap
|
|
169
|
+
# 1. Bootstrap deterministic authority. This completes init but not research/baseline.
|
|
149
170
|
ultra-tools task init-project --project-name myapp --mode auto
|
|
150
171
|
|
|
151
172
|
# Projection-only projects from prior releases use one backup-first import:
|
|
152
173
|
ultra-tools migrate --from=4.4 --to=4.5 --source-dir .
|
|
153
|
-
ultra-tools migrate --from=4.5 --to=
|
|
154
|
-
|
|
155
|
-
# 2.
|
|
156
|
-
#
|
|
157
|
-
#
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
174
|
+
ultra-tools migrate --from=4.5 --to=18.0 --source-dir .
|
|
175
|
+
|
|
176
|
+
# 2. Invoke ultra-research explicitly. The host dispositions each coverage area,
|
|
177
|
+
# executes/verifies/reuses only what is necessary, and asks one material decision at
|
|
178
|
+
# a time through the host-native question surface. Record evidence and obtain
|
|
179
|
+
# baseline approval only after the selected coverage converges.
|
|
180
|
+
|
|
181
|
+
# 3. Optional worker automation. Configure a real shell-free worker first:
|
|
182
|
+
# {"orchestrator":{"command":"/absolute/path/to/ultra-worker","command_args":[]}}
|
|
183
|
+
# Then resume current dependency waves until the first non-converged wave.
|
|
184
|
+
# A paused result is expected while dev/test/review evidence is still open.
|
|
185
|
+
# Worktrees are preserved by default. Empty, cyclic, stale, duplicate-task,
|
|
186
|
+
# cross-change, and stale or unverified plans fail before a session is created.
|
|
187
|
+
# Each worker checkout resolves `.ultra` to the one central authority; reserved
|
|
188
|
+
# UBP_DB_PATH / UBP_ROOT_DIR / UBP_AUTHORITY_ROOT bindings cannot be overridden.
|
|
189
|
+
ubp-orchestrator execute-plan
|
|
190
|
+
# Add --auto-merge only when the worker records the exact completion commit,
|
|
191
|
+
# ready dev steps, and a current task review before it exits.
|
|
161
192
|
|
|
162
193
|
# 4. Monitor cost, progress, and runtime health
|
|
163
194
|
ultra-tools status
|
|
@@ -177,12 +208,18 @@ Kimi uses the corresponding
|
|
|
177
208
|
`/ultra-builder-pro:ultra-*` namespace. Other runtimes retain their native
|
|
178
209
|
command form.
|
|
179
210
|
|
|
211
|
+
The arrows above show a common capability path, not a mandatory pipeline. After
|
|
212
|
+
initialization the user or host explicitly selects research. During daily work,
|
|
213
|
+
`ultra-change` may hand off to bounded research, planning, an already-current task,
|
|
214
|
+
thinking, or status according to intent and evidence. MCP exposes allowed transitions
|
|
215
|
+
and hard recovery requirements; the active host recommends the semantic route.
|
|
216
|
+
|
|
180
217
|
## CLI surface
|
|
181
218
|
|
|
182
219
|
| Binary | Purpose |
|
|
183
220
|
|--------|---------|
|
|
184
221
|
| `ultra-builder-pro-cli` / `ubp` | Installer — `--claude / --opencode / --codex / --kimi / --all`, `--local / --global`, `--uninstall`; read-only install checks via `--doctor [--json]` |
|
|
185
|
-
| `ubp-orchestrator` |
|
|
222
|
+
| `ubp-orchestrator` | Current completed-plan runner (`execute-plan`) and optional explicit-worker daemon (`run`, `start`, `stop`, `status`) |
|
|
186
223
|
| `ultra-tools` | State-layer CLI — `task`, `session`, `status`, `db`, `migrate`; explicit `legacy-memory` archive/prune migration |
|
|
187
224
|
| `ubp-handbook` | Preview/apply the managed Ultra contract in `CLAUDE.md` / `AGENTS.md`, with backup |
|
|
188
225
|
|
|
@@ -21,6 +21,7 @@ const {
|
|
|
21
21
|
removeTree,
|
|
22
22
|
writeAtomic,
|
|
23
23
|
} = require('./file-ops.cjs');
|
|
24
|
+
const { interactionContract } = require('./interaction-contract.cjs');
|
|
24
25
|
|
|
25
26
|
const PLUGIN_NAME = 'ultra-builder-pro';
|
|
26
27
|
const MANAGED_MARKER = 'Managed by Ultra Builder Pro Codex adapter.';
|
|
@@ -54,12 +55,12 @@ const CODEX_NATIVE_MCP_REPLACEMENTS = Object.freeze({
|
|
|
54
55
|
replacement: 'the installed plugin skill SKILL.md and agents/openai.yaml contract',
|
|
55
56
|
},
|
|
56
57
|
'ask.question': {
|
|
57
|
-
surface: '
|
|
58
|
-
replacement: '
|
|
58
|
+
surface: 'request_user_input',
|
|
59
|
+
replacement: 'use request_user_input when available, otherwise ask one concise direct question',
|
|
59
60
|
},
|
|
60
61
|
'ask.menu': {
|
|
61
|
-
surface: '
|
|
62
|
-
replacement: '
|
|
62
|
+
surface: 'request_user_input',
|
|
63
|
+
replacement: 'use request_user_input when available, otherwise present one concise direct choice',
|
|
63
64
|
},
|
|
64
65
|
});
|
|
65
66
|
const COMMAND_NAMES = Object.freeze(CORE_PUBLIC_SKILLS.filter((name) => name !== 'ultra-review'));
|
|
@@ -420,6 +421,10 @@ main().catch((error) => {
|
|
|
420
421
|
const specRoot = path.join(pluginRoot, 'spec');
|
|
421
422
|
ensureDir(specRoot);
|
|
422
423
|
writeAtomic(path.join(specRoot, 'mcp-tools.yaml'), yaml.dump(liveManifest, { lineWidth: -1, noRefs: true }));
|
|
424
|
+
writeAtomic(
|
|
425
|
+
path.join(specRoot, 'interaction-contract.json'),
|
|
426
|
+
JSON.stringify(interactionContract(runtime), null, 2) + '\n',
|
|
427
|
+
);
|
|
423
428
|
if (runtime === 'codex') {
|
|
424
429
|
fs.copyFileSync(sourceToolsFile, path.join(specRoot, 'upstream-mcp-tools.yaml'));
|
|
425
430
|
writeAtomic(path.join(specRoot, 'codex-capability-map.json'), JSON.stringify({
|
|
@@ -519,7 +524,7 @@ function buildPlugin({ repoRoot, pluginRoot }) {
|
|
|
519
524
|
defaultPrompt: [
|
|
520
525
|
'Initialize this project with the Ultra Builder Pro workflow.',
|
|
521
526
|
'Run the Ultra review pipeline on my current changes.',
|
|
522
|
-
'Show the current Ultra project status and
|
|
527
|
+
'Show the current Ultra project status, valid transitions, and host recommendation.',
|
|
523
528
|
],
|
|
524
529
|
brandColor: '#111827',
|
|
525
530
|
},
|
|
@@ -59,9 +59,10 @@ function renderHandbook(runtime) {
|
|
|
59
59
|
`- Workflow entry points: ${value.invocation}.`,
|
|
60
60
|
`- Collaboration boundary: ${value.collaboration}. The current host remains primary and owns final verification.`,
|
|
61
61
|
`- Coordination boundary: ${value.coordination}.`,
|
|
62
|
-
'- Authority: `.ultra/state.db` is the only durable Ultra authority for baselines, changes, tasks, sessions, events, incidents, projection state, telemetry, and review evidence. Generated JSON and Markdown are projections or workflow artifacts.',
|
|
62
|
+
'- Authority: `.ultra/state.db` is the only durable Ultra authority for baselines, changes, decision threads, tasks, sessions, events, incidents, projection state, telemetry, and review evidence. Generated JSON and Markdown are projections or workflow artifacts.',
|
|
63
63
|
'- Baseline boundary: `task.init_project` classifies greenfield or brownfield work and records repository scope. Projection-only prior state uses the exact supported backup-first import returned by the authority check; migrated compatibility rows require explicit brownfield re-adoption. `baseline.record` owns evidence, verification, repository snapshot, and the gap ledger; `baseline.converge` requires explicit owner approval. New ordinary changes require a healthy ready baseline. Existing active work may continue with warnings, but baseline readiness blocks change convergence; normal drift reconciliation is health-checked atomically at archive. Only an explicitly approved incident break-glass may start without baseline readiness, and its archive creates a blocking reconciliation gap.',
|
|
64
|
-
'-
|
|
64
|
+
'- Decision boundary: project-bound owner choices use one resumable DB-backed decision thread. The host resolves observable facts autonomously, presents only the earliest unresolved decision with evidence and a recommendation, waits for the owner, and records the normalized decision rather than prompts or transcripts. A linked workflow cannot advance until blocking decisions are resolved and its owner-approved checkpoint is current.',
|
|
65
|
+
'- Context Spine boundary: `change.context` compiles role/gate readiness, required references, a fresh-context budget, public seam, verification command, Change/task authority digests, allowed transitions, and any unique hard-recovery transition. File, token, and context-share budgets are advisory attention signals, not refusal gates. The host owns semantic recommendations. Hooks inject only the DB-derived `change.breadcrumb`; missing required evidence or stale execution context must be recompiled.',
|
|
65
66
|
'- Specification learning boundary: stable implementation discoveries use approval-gated propose/approve-or-reject/apply transitions. Unresolved learning blocks convergence; review requires independent specification-fidelity and engineering-standards evidence.',
|
|
66
67
|
'- Memory and graph boundary: Ultra Builder Pro does not capture prompts, transcripts, observations, summaries, cross-session memory, or code-graph content. Separately installed providers own that data; Ultra may store only their metadata references in a change context manifest.',
|
|
67
68
|
'- Hook boundary: Ultra hooks observe workflow/change lifecycle only. Health/context may run when `.ultra/state.db` exists; advisory warnings never reject work, and an incomplete workflow never traps session stop. Direct projection protection remains authoritative; compact and subagent recovery stays active-workflow scoped. Generic command blocking and post-edit policy stay in user or repository governance.',
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const SURFACES = Object.freeze({
|
|
4
|
+
claude: Object.freeze({
|
|
5
|
+
primary: 'AskUserQuestion',
|
|
6
|
+
fallback: 'direct_user_interaction',
|
|
7
|
+
}),
|
|
8
|
+
codex: Object.freeze({
|
|
9
|
+
primary: 'request_user_input',
|
|
10
|
+
fallback: 'direct_user_interaction',
|
|
11
|
+
}),
|
|
12
|
+
opencode: Object.freeze({
|
|
13
|
+
primary: 'question',
|
|
14
|
+
fallback: 'direct_user_interaction',
|
|
15
|
+
}),
|
|
16
|
+
kimi: Object.freeze({
|
|
17
|
+
primary: 'native_question_surface',
|
|
18
|
+
fallback: 'direct_user_interaction',
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
function interactionContract(runtime) {
|
|
23
|
+
const question = SURFACES[runtime];
|
|
24
|
+
if (!question) throw new Error(`unsupported interaction runtime: ${runtime}`);
|
|
25
|
+
return {
|
|
26
|
+
schema_version: '1.0',
|
|
27
|
+
runtime,
|
|
28
|
+
authority: {
|
|
29
|
+
user: [
|
|
30
|
+
'product_intent',
|
|
31
|
+
'material_scope_and_tradeoffs',
|
|
32
|
+
'destructive_or_external_effect_authorization',
|
|
33
|
+
],
|
|
34
|
+
host_model: [
|
|
35
|
+
'fact_finding_and_synthesis',
|
|
36
|
+
'reversible_implementation_judgment',
|
|
37
|
+
'coverage_risk_and_route_recommendation',
|
|
38
|
+
],
|
|
39
|
+
ultra_mcp: [
|
|
40
|
+
'durable_state_and_evidence_refs',
|
|
41
|
+
'digests_freshness_locks_and_recovery',
|
|
42
|
+
'allowed_and_required_transitions',
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
interaction: {
|
|
46
|
+
question_surface: question,
|
|
47
|
+
dependent_decisions: 'one_at_a_time',
|
|
48
|
+
independent_low_load_questions: { maximum: 3 },
|
|
49
|
+
explicit_current_intent: 'normalize_without_reconfirmation',
|
|
50
|
+
unavailable_native_surface: 'use_direct_interaction',
|
|
51
|
+
},
|
|
52
|
+
routing: {
|
|
53
|
+
semantic_recommendation_owner: 'host_model',
|
|
54
|
+
durable_recommendation_authority: false,
|
|
55
|
+
hard_invariant_field: 'required_transition',
|
|
56
|
+
valid_capabilities_field: 'allowed_transitions',
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
module.exports = { SURFACES, interactionContract };
|
package/adapters/claude.js
CHANGED
|
@@ -28,7 +28,7 @@ const PLUGIN_NAME = 'ultra-builder-pro';
|
|
|
28
28
|
const MCP_SERVER_NAME = PLUGIN_NAME;
|
|
29
29
|
const SOURCE_TAG = 'ubp';
|
|
30
30
|
const SENTINEL_KEY = '_ubp_manifest';
|
|
31
|
-
const COMMAND_NAMES = CORE_PUBLIC_SKILLS
|
|
31
|
+
const COMMAND_NAMES = CORE_PUBLIC_SKILLS;
|
|
32
32
|
const PROVENANCE_FILE = 'provenance.json';
|
|
33
33
|
|
|
34
34
|
function resolveTarget(ctx = {}) {
|
package/adapters/opencode.js
CHANGED
|
@@ -36,7 +36,7 @@ const BUNDLE_DIR = '.ultra-builder-pro';
|
|
|
36
36
|
const MANAGED_TEXT_MARKER = '<!-- ultra-builder-pro:managed -->';
|
|
37
37
|
const PLUGIN_MARKER = '// Managed by Ultra Builder Pro.';
|
|
38
38
|
const PROVENANCE_FILE = 'provenance.json';
|
|
39
|
-
const COMMAND_NAMES = CORE_PUBLIC_SKILLS
|
|
39
|
+
const COMMAND_NAMES = CORE_PUBLIC_SKILLS;
|
|
40
40
|
|
|
41
41
|
function resolveTarget(ctx = {}) {
|
|
42
42
|
if (ctx.configDir) return ctx.configDir;
|