ultra-builder-pro-cli 0.17.1 → 0.19.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.
- package/CHANGELOG.md +77 -6
- package/README.md +380 -261
- package/adapters/_shared/codex-assets.cjs +24 -16
- package/adapters/_shared/file-ops.cjs +40 -3
- package/adapters/_shared/provenance.cjs +90 -6
- package/adapters/_shared/runtime-assets.cjs +0 -11
- package/adapters/claude.js +3 -1
- package/adapters/kimi.js +4 -30
- package/adapters/opencode.js +50 -14
- package/docs/AGENT-CONTEXT.md +11 -14
- package/docs/ARCHITECTURE.md +23 -15
- package/docs/DECISIONS.md +75 -0
- package/docs/LEGACY-CLI-CROSSWALK.md +3 -3
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +54 -0
- package/docs/ROADMAP.md +13 -13
- package/docs/RUNTIME-COMPAT-MATRIX.md +24 -21
- package/docs/STATE-DB-ACCESS-POLICY.md +2 -2
- package/docs/WORKFLOW-LIFECYCLE.md +12 -10
- package/hooks/active_task_context.py +1 -1
- package/hooks/context_spine.py +1 -1
- package/hooks/health_check.py +19 -0
- package/hooks/pre_stop_check.py +1 -1
- package/hooks/workflow_checkpoint.py +1 -1
- package/hooks/workflow_context.py +1 -1
- package/hooks/workflow_resume.py +1 -1
- package/mcp-server/lib/workflow-state.cjs +67 -54
- package/mcp-server/server.cjs +19 -7
- package/orchestrator/dispatch-rules.cjs +1 -1
- package/package.json +4 -5
- package/skills/ultra-change/SKILL.md +4 -3
- package/skills/ultra-init/SKILL.md +2 -1
- package/skills/ultra-research/SKILL.md +7 -4
- package/spec/cli-protocol.md +4 -4
- package/spec/mcp-tools.yaml +6 -6
- package/spec/schemas/context-file.v4.5.schema.json +1 -1
- package/spec/schemas/mcp-tools.schema.json +3 -3
- package/spec/schemas/state-db.sql +3 -3
- package/spec/schemas/tasks.v4.5.schema.json +1 -1
- package/adapters/_shared/handbook.cjs +0 -156
- package/bin/handbook.js +0 -54
- package/docs/PLAN.zh-CN.md +0 -1696
- package/docs/USER-HANDBOOK-CONTRACT.md +0 -81
package/README.md
CHANGED
|
@@ -1,303 +1,422 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Ultra Builder Pro
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
**An adaptive delivery harness for AI coding agents.**
|
|
4
|
+
|
|
5
|
+
Ultra Builder Pro helps Claude Code, Codex, OpenCode, and Kimi Code carry a
|
|
6
|
+
software project from an unclear request to a verified, recoverable delivery.
|
|
7
|
+
It keeps the user and the agent aligned, preserves project authority across
|
|
8
|
+
sessions, and prevents specifications from quietly drifting away from the code.
|
|
9
|
+
|
|
10
|
+
It is not another model and it is not a rigid step-by-step autopilot. The active
|
|
11
|
+
host agent still investigates, reasons, recommends, and implements. Ultra adds
|
|
12
|
+
the durable workflow state, evidence gates, recovery paths, and host-native
|
|
13
|
+
tools needed to make that work dependable over time.
|
|
8
14
|
|
|
9
15
|
<div align="center">
|
|
10
16
|
|
|
11
|
-
[](#verification)
|
|
17
|
+
[](https://www.npmjs.com/package/ultra-builder-pro-cli)
|
|
18
|
+
[](#development-and-verification)
|
|
13
19
|
[](./LICENSE)
|
|
14
20
|
[](./package.json)
|
|
15
21
|
|
|
16
22
|
</div>
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
24
|
+
## Why it exists
|
|
25
|
+
|
|
26
|
+
AI coding works well inside one conversation. Real projects last much longer.
|
|
27
|
+
After several sessions, teams commonly find that:
|
|
28
|
+
|
|
29
|
+
- the agent no longer knows which decisions are authoritative;
|
|
30
|
+
- implementation changed but product and architecture documents did not;
|
|
31
|
+
- a new session repeats research or asks the same questions again;
|
|
32
|
+
- an existing codebase is treated like a blank new product;
|
|
33
|
+
- a rigid workflow blocks reasonable work, while an unstructured workflow loses
|
|
34
|
+
traceability;
|
|
35
|
+
- “tests passed” or “work completed” cannot be tied back to the exact change,
|
|
36
|
+
task, commit, and acceptance criteria.
|
|
37
|
+
|
|
38
|
+
Ultra Builder Pro addresses those gaps with four ideas:
|
|
39
|
+
|
|
40
|
+
1. **Adaptive workflow, not a fixed pipeline.** MCP exposes valid capabilities
|
|
41
|
+
and hard recovery requirements. The host model recommends the next semantic
|
|
42
|
+
action from the user's goal and current evidence.
|
|
43
|
+
2. **Low-load user alignment.** The agent investigates observable facts itself
|
|
44
|
+
and asks the user only for material intent, scope, risk, or authorization
|
|
45
|
+
decisions—normally one dependent decision at a time.
|
|
46
|
+
3. **Durable project authority.** `.ultra/state.db` records baselines, changes,
|
|
47
|
+
decisions, workflows, tasks, evidence digests, sessions, incidents, and
|
|
48
|
+
recovery state across hosts and sessions.
|
|
49
|
+
4. **Convergent delivery.** Research, plans, implementation, tests, review, and
|
|
50
|
+
specification updates must agree before a change is archived.
|
|
51
|
+
|
|
52
|
+
For example, if the user asks an agent to add organization SSO to an existing
|
|
53
|
+
application, Ultra helps the agent inspect the real authentication path, capture
|
|
54
|
+
the intended compatibility and recovery contract, ask only the unresolved
|
|
55
|
+
product decision, plan and implement against current evidence, update affected
|
|
56
|
+
specifications, and preserve the exact verification and review result. A later
|
|
57
|
+
session resumes from that authority instead of reconstructing it from chat.
|
|
58
|
+
|
|
59
|
+
## The mental model
|
|
60
|
+
|
|
61
|
+
```mermaid
|
|
62
|
+
flowchart LR
|
|
63
|
+
U["User<br/>intent and material decisions"] <--> H["Host agent<br/>reasoning and implementation"]
|
|
64
|
+
H <--> S["Ultra skills<br/>task-specific workflows"]
|
|
65
|
+
S <--> M["Ultra MCP<br/>state, evidence, freshness, recovery"]
|
|
66
|
+
M <--> D[(".ultra/state.db")]
|
|
67
|
+
H --> A["Code, specifications,<br/>tests and review artifacts"]
|
|
68
|
+
A --> M
|
|
69
|
+
K["Lifecycle hooks<br/>breadcrumb and projection protection"] --> M
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The responsibility split is deliberate:
|
|
73
|
+
|
|
74
|
+
| Owner | Responsibility |
|
|
75
|
+
|---|---|
|
|
76
|
+
| **User** | Product intent, material scope and trade-offs, destructive actions, publishing and deployment authorization |
|
|
77
|
+
| **Host model** | Fact-finding, synthesis, research coverage, route recommendation, reversible implementation decisions |
|
|
78
|
+
| **Ultra MCP** | Durable state, evidence references, digests, freshness, locks, valid transitions and hard recovery |
|
|
79
|
+
| **Host adapter** | Native Skill discovery, user questions, tool invocation, installation, and runtime wiring |
|
|
80
|
+
| **Hooks** | Fast lifecycle observation, current breadcrumb injection, and protection of generated projections |
|
|
81
|
+
|
|
82
|
+
The MCP does not replace the model's judgment. A hook does not decide product
|
|
83
|
+
strategy. A prompt does not become durable authority merely because it appeared
|
|
84
|
+
in a conversation.
|
|
85
|
+
|
|
86
|
+
## What you get
|
|
87
|
+
|
|
88
|
+
- Native plugins for **Claude Code**, **OpenCode**, **Codex**, and **Kimi Code**.
|
|
89
|
+
- One workflow vocabulary across all four hosts.
|
|
90
|
+
- Deterministic initialization for new, existing, monorepo, and older Ultra
|
|
91
|
+
projects.
|
|
92
|
+
- Evidence-backed greenfield research and brownfield adoption.
|
|
93
|
+
- A durable Change Contract for every ongoing feature, fix, refactor, or
|
|
94
|
+
incident.
|
|
95
|
+
- Context compilation that detects stale plans, tasks, references, and
|
|
96
|
+
specifications.
|
|
97
|
+
- Risk-selected testing and independent specification/engineering review.
|
|
98
|
+
- Crash-safe sessions, worktree recovery, circuit breakers, and backup-first
|
|
99
|
+
state migration.
|
|
100
|
+
- Read-only installation and project diagnostics.
|
|
101
|
+
- Optional dependency-wave worker orchestration for already-approved plans.
|
|
102
|
+
|
|
103
|
+
## When to use it
|
|
104
|
+
|
|
105
|
+
Ultra Builder Pro is useful when:
|
|
106
|
+
|
|
107
|
+
- a project will span multiple agent sessions;
|
|
108
|
+
- more than one supported host may work on the same repository;
|
|
109
|
+
- product or architecture specifications must stay synchronized with delivery;
|
|
110
|
+
- an existing codebase needs a trustworthy baseline before new changes;
|
|
111
|
+
- failures must be diagnosable and recoverable;
|
|
112
|
+
- user decisions, agent reasoning, and mechanical enforcement need clear
|
|
113
|
+
boundaries.
|
|
114
|
+
|
|
115
|
+
It is probably unnecessary for a disposable one-file experiment or a change
|
|
116
|
+
that does not need durable project context.
|
|
117
|
+
|
|
118
|
+
## Install
|
|
119
|
+
|
|
120
|
+
Requirements:
|
|
121
|
+
|
|
122
|
+
- Node.js 22 or newer;
|
|
123
|
+
- Git for the normal project workflow;
|
|
124
|
+
- one or more supported coding-agent hosts.
|
|
125
|
+
|
|
126
|
+
Install globally into all detected host configuration directories:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npx --yes ultra-builder-pro-cli@latest --all --global
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Or install only one host:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
npx --yes ultra-builder-pro-cli@latest --claude --global
|
|
136
|
+
npx --yes ultra-builder-pro-cli@latest --opencode --global
|
|
137
|
+
npx --yes ultra-builder-pro-cli@latest --codex --global
|
|
138
|
+
npx --yes ultra-builder-pro-cli@latest --kimi --global
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Use `--local` instead of `--global` to install into the current project's host
|
|
142
|
+
configuration:
|
|
69
143
|
|
|
70
144
|
```bash
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
145
|
+
npx --yes ultra-builder-pro-cli@latest --all --local
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Verify the installation without changing it:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npx --yes ultra-builder-pro-cli@latest --all --global --doctor
|
|
152
|
+
npx --yes ultra-builder-pro-cli@latest --all --global --doctor --json
|
|
153
|
+
```
|
|
76
154
|
|
|
77
|
-
|
|
78
|
-
|
|
155
|
+
After installing or upgrading, start a new Claude Code, OpenCode, or Codex
|
|
156
|
+
session. In Kimi Code, run `/reload` or start a new session.
|
|
79
157
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
158
|
+
Plugin installation, update, doctor, and uninstall never mutate durable user
|
|
159
|
+
instructions such as `CLAUDE.md` or `AGENTS.md`. Ultra policy stays in the plugin
|
|
160
|
+
and becomes active only after an explicit workflow invocation. Existing legacy
|
|
161
|
+
Ultra marker blocks in a user handbook are left untouched for the owner to review;
|
|
162
|
+
the plugin neither claims nor silently deletes user-authored content.
|
|
83
163
|
|
|
84
|
-
|
|
85
|
-
npx ultra-builder-pro-cli --all --local --uninstall
|
|
164
|
+
### Host invocation
|
|
86
165
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
166
|
+
| Host | Example |
|
|
167
|
+
|---|---|
|
|
168
|
+
| Claude Code | `/ultra-builder-pro:ultra-init` |
|
|
169
|
+
| OpenCode | `/ultra-init` |
|
|
170
|
+
| Codex | `$ultra-builder-pro:ultra-init` |
|
|
171
|
+
| Kimi Code | `/ultra-builder-pro:ultra-init` |
|
|
172
|
+
|
|
173
|
+
The same naming applies to `ultra-research`, `ultra-change`, `ultra-plan`,
|
|
174
|
+
`ultra-dev`, `ultra-test`, `ultra-review`, `ultra-deliver`, `ultra-status`,
|
|
175
|
+
`ultra-think`, and `ultra-doctor`.
|
|
176
|
+
|
|
177
|
+
See the
|
|
178
|
+
[Runtime Compatibility Matrix](./docs/RUNTIME-COMPAT-MATRIX.md) for exact
|
|
179
|
+
host-specific presentation and lifecycle differences.
|
|
180
|
+
|
|
181
|
+
## How to use it
|
|
182
|
+
|
|
183
|
+
### 1. Start a new project
|
|
184
|
+
|
|
185
|
+
From the project root, invoke `ultra-init`.
|
|
186
|
+
|
|
187
|
+
Initialization:
|
|
188
|
+
|
|
189
|
+
- identifies the repository root and scope;
|
|
190
|
+
- classifies the repository as greenfield, brownfield, or migrated;
|
|
191
|
+
- initializes Git when needed;
|
|
192
|
+
- creates `.ultra/` and schema 18 project authority;
|
|
193
|
+
- verifies that the scaffold and database can be read back;
|
|
194
|
+
- completes without silently starting research, creating a commit, adding a
|
|
195
|
+
remote, or pushing anything.
|
|
196
|
+
|
|
197
|
+
Then explicitly invoke `ultra-research`. For a new product, the agent evaluates
|
|
198
|
+
the complete research catalog but executes only the areas that matter. It
|
|
199
|
+
resolves observable facts itself and asks for material product decisions as
|
|
200
|
+
needed. Once the evidence and specifications are accurate, the user approves
|
|
201
|
+
the baseline.
|
|
202
|
+
|
|
203
|
+
The common path after baseline approval is:
|
|
204
|
+
|
|
205
|
+
```text
|
|
206
|
+
ultra-change
|
|
207
|
+
-> optional ultra-think or bounded ultra-research
|
|
208
|
+
-> ultra-plan when planning is needed
|
|
209
|
+
-> ultra-dev
|
|
210
|
+
-> risk-selected ultra-test
|
|
211
|
+
-> ultra-review
|
|
212
|
+
-> ultra-deliver
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
That diagram is a common path, not a mandatory pipeline. A small current task
|
|
216
|
+
can take a shorter valid route; a high-risk or unclear change can require more
|
|
217
|
+
research, planning, checking, or user alignment.
|
|
218
|
+
|
|
219
|
+
### 2. Adopt an existing project
|
|
220
|
+
|
|
221
|
+
Run the same `ultra-init` entry point. Ultra detects delivered-system evidence
|
|
222
|
+
such as application source, APIs, persistence, tests, or deployment
|
|
223
|
+
configuration and classifies the repository as brownfield.
|
|
224
|
+
|
|
225
|
+
Brownfield adoption does not ask the agent to invent a new MVP or rewrite the
|
|
226
|
+
product story. It builds a current-system baseline from:
|
|
227
|
+
|
|
228
|
+
- observable code and runtime behavior;
|
|
229
|
+
- existing product and architecture documents;
|
|
230
|
+
- build, lint, type-check, and test results;
|
|
231
|
+
- APIs, data, permissions, integrations, deployment, and recovery seams;
|
|
232
|
+
- known failures, documentation drift, technical debt, and unresolved unknowns.
|
|
233
|
+
|
|
234
|
+
During `ultra-research`, the host model selects the smallest evidence-backed set
|
|
235
|
+
of applicable catalog areas. Every included area receives one explicit
|
|
236
|
+
disposition:
|
|
237
|
+
|
|
238
|
+
- `execute` — produce fresh evidence;
|
|
239
|
+
- `verify_existing` — validate an existing artifact;
|
|
240
|
+
- `reuse` — reuse evidence that is still current;
|
|
241
|
+
- `not_applicable` — exclude it with evidence and rationale;
|
|
242
|
+
- `deferred` — record the consequence and accepted owner.
|
|
243
|
+
|
|
244
|
+
The catalog is not a mandatory document set or questionnaire. Omitted areas
|
|
245
|
+
create no workflow rows; an explicit exclusion is recorded only when retaining
|
|
246
|
+
that rationale is useful.
|
|
247
|
+
|
|
248
|
+
Older projection-only Ultra projects are preserved and routed through a
|
|
249
|
+
backup-first migration or rebaseline. Use `ultra-doctor` when initialization
|
|
250
|
+
reports migration or authority damage; do not overwrite old state manually.
|
|
251
|
+
|
|
252
|
+
### 3. Make daily changes
|
|
253
|
+
|
|
254
|
+
After the baseline is ready, start features, fixes, refactors, and incidents
|
|
255
|
+
with `ultra-change`.
|
|
256
|
+
|
|
257
|
+
`ultra-change` records the accepted outcome, scope, acceptance criteria,
|
|
258
|
+
compatibility boundary, recovery strategy, documentation impact, risk profile,
|
|
259
|
+
and research disposition. Capturing intent does not automatically start every
|
|
260
|
+
downstream workflow.
|
|
261
|
+
|
|
262
|
+
The host then recommends one valid capability:
|
|
263
|
+
|
|
264
|
+
- `ultra-think` for a material unresolved decision or diagnosis;
|
|
265
|
+
- bounded `ultra-research` for a real evidence gap;
|
|
266
|
+
- `ultra-plan` for task decomposition and dependency planning;
|
|
267
|
+
- `ultra-dev` when a current task contract is already executable;
|
|
268
|
+
- `ultra-status` when the user needs the current authority and available routes;
|
|
269
|
+
- `ultra-doctor` when state or installation health is degraded.
|
|
270
|
+
|
|
271
|
+
Semantic changes invalidate dependent tasks and compiled context. A stale task
|
|
272
|
+
cannot be revived by flipping a status flag; its complete execution contract
|
|
273
|
+
must be reconciled against the current Change authority.
|
|
274
|
+
|
|
275
|
+
### 4. Deliver and continue
|
|
276
|
+
|
|
277
|
+
`ultra-deliver` verifies that implementation, acceptance evidence, testing,
|
|
278
|
+
review findings, specification learning, and baseline reconciliation agree. It
|
|
279
|
+
then archives the local Ultra change authority.
|
|
280
|
+
|
|
281
|
+
Delivery does **not** grant permission to commit, push, publish, tag, deploy, or
|
|
282
|
+
perform another external effect. Those actions remain separate and require the
|
|
283
|
+
user's explicit request.
|
|
284
|
+
|
|
285
|
+
The next piece of daily work starts with a new `ultra-change`.
|
|
286
|
+
|
|
287
|
+
## Core workflows
|
|
288
|
+
|
|
289
|
+
| Workflow | Purpose |
|
|
290
|
+
|---|---|
|
|
291
|
+
| `ultra-init` | Classify the repository and create or recover project authority |
|
|
292
|
+
| `ultra-research` | Build or refresh an evidence-backed baseline with adaptive coverage |
|
|
293
|
+
| `ultra-think` | Resolve one material decision or perform bounded diagnosis |
|
|
294
|
+
| `ultra-change` | Capture the durable contract for one feature, fix, refactor, or incident |
|
|
295
|
+
| `ultra-plan` | Create current task contracts, dependencies, acceptance coverage, and execution context |
|
|
296
|
+
| `ultra-dev` | Implement one owned vertical slice and record exact evidence |
|
|
297
|
+
| `ultra-test` | Run the risk-selected verification profile and persist the gate result |
|
|
298
|
+
| `ultra-review` | Coordinate independent specification-fidelity and engineering review |
|
|
299
|
+
| `ultra-deliver` | Reconcile specifications, close local authority, and archive the change |
|
|
300
|
+
| `ultra-status` | Read the current breadcrumb, blockers, evidence, and allowed transitions |
|
|
301
|
+
| `ultra-doctor` | Diagnose installation or project-state faults and expose safe recovery |
|
|
302
|
+
| `learn` | Turn one approved, verified reusable procedure into a portable user skill |
|
|
303
|
+
|
|
304
|
+
## What lives in `.ultra/`
|
|
305
|
+
|
|
306
|
+
```text
|
|
307
|
+
.ultra/
|
|
308
|
+
state.db # sole durable Ultra authority
|
|
309
|
+
specs/ # current product and architecture baseline
|
|
310
|
+
changes/
|
|
311
|
+
active/ # current Change artifacts
|
|
312
|
+
archive/ # immutable delivered Change artifacts
|
|
313
|
+
docs/research/ # evidence reports for selected research areas
|
|
314
|
+
reports/ # test, review, and delivery evidence
|
|
315
|
+
tasks/
|
|
316
|
+
tasks.json # generated projection, never the authority
|
|
317
|
+
contexts/ # bounded role/task context artifacts
|
|
90
318
|
```
|
|
91
319
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
manifest, README, or starter documentation alone remains greenfield. An empty project
|
|
107
|
-
opens a `draft` greenfield baseline and an existing system opens an `adopting`
|
|
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
|
|
118
|
-
continue only when its durable change workflow was bound to a healthy ready baseline;
|
|
119
|
-
the expected HEAD, worktree, spec, and source-evidence drift created by that change is
|
|
120
|
-
advisory until delivery reconciliation. Loss of approved-ready status or structural
|
|
121
|
-
baseline evidence blocks ordinary work. An incident requires an explicit break-glass
|
|
122
|
-
approver and leaves a blocking reconciliation gap at archive; new ordinary work always
|
|
123
|
-
requires a healthy ready baseline. See
|
|
124
|
-
[`docs/WORKFLOW-LIFECYCLE.md`](./docs/WORKFLOW-LIFECYCLE.md) for exact write,
|
|
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).
|
|
128
|
-
|
|
129
|
-
## Three-layer architecture
|
|
130
|
-
|
|
131
|
-
| Layer | Purpose | When it's used |
|
|
132
|
-
|-------|---------|----------------|
|
|
133
|
-
| **skill** (`skills/ultra-*/`) | Knowledge — prompts, workflows, prose | Runtime's native skill/prompt loader picks them up after install |
|
|
134
|
-
| **MCP** (`mcp-server/`) | Authoritative state — reads/writes `.ultra/state.db` via stdio JSON-RPC | Primary path for task / session / event / plan operations |
|
|
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` |
|
|
136
|
-
|
|
137
|
-
The layers share one `.ultra/state.db`, but the CLI is not a mirror of every MCP
|
|
138
|
-
tool: continuous change mutations are MCP-only and fail closed. See
|
|
139
|
-
[`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md) for the full contract and
|
|
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.
|
|
145
|
-
|
|
146
|
-
The package boundary is deliberate: twelve public Ultra workflow skills, four
|
|
147
|
-
internal review-rule skills, host-specific collaboration companions, and the
|
|
148
|
-
minimal host bootstrap required by Kimi. Browser, deployment, skill-discovery,
|
|
149
|
-
and framework guidance belong to their original plugins.
|
|
150
|
-
|
|
151
|
-
## Runtime capability matrix
|
|
152
|
-
|
|
153
|
-
| Feature | Claude Code | OpenCode | Codex CLI | Kimi Code 0.26+ |
|
|
154
|
-
|------------------------------|:-----------:|:--------:|:---------:|:---------------:|
|
|
155
|
-
| Custom commands | ✅ | ✅ | ✅ | ✅ (namespaced) |
|
|
156
|
-
| Skill loader | ✅ | ✅ | ✅ (personal plugin) | ✅ (native plugin) |
|
|
157
|
-
| MCP server (stdio) | ✅ | ✅ | ✅ (plugin `.mcp.json`) | ✅ (`mcpServers`) |
|
|
158
|
-
| Workflow hooks | ✅ (native plugin) | ✅ (native JS plugin) | ✅ (native plugin) | ✅ with documented compact limitation |
|
|
159
|
-
| Sub-agents | ✅ | ✅ | ✅ (9 native TOML agents) | ✅ via `Agent` / `AgentSwarm` prompt templates |
|
|
160
|
-
| Session worktree isolation | ✅ (driven by `orchestrator/session-runner.cjs`) | ✅ | ✅ | ✅ |
|
|
161
|
-
| Dependency-wave dispatch + optional verified auto-merge | ✅ (`ubp-orchestrator execute-plan`) | ✅ | ✅ | ✅ |
|
|
162
|
-
|
|
163
|
-
Full details in [`docs/RUNTIME-COMPAT-MATRIX.md`](./docs/RUNTIME-COMPAT-MATRIX.md)
|
|
164
|
-
(10 sections, with per-runtime deviations called out).
|
|
165
|
-
|
|
166
|
-
## Typical workflow
|
|
320
|
+
The host agent writes semantic specifications and evidence artifacts. MCP
|
|
321
|
+
validates their references and digests, records workflow state, and rejects
|
|
322
|
+
stale or illegal transitions. Generated Markdown and JSON help humans and tools
|
|
323
|
+
inspect the project, but `.ultra/state.db` remains authoritative.
|
|
324
|
+
|
|
325
|
+
Ultra does not store chain-of-thought, raw prompts, transcripts, cross-session
|
|
326
|
+
memory, or code-graph content. Memory and graph systems remain separate
|
|
327
|
+
providers; Ultra may store only bounded metadata references to them.
|
|
328
|
+
|
|
329
|
+
## Optional orchestration
|
|
330
|
+
|
|
331
|
+
The normal workflow can be driven interactively by the host agent. For an
|
|
332
|
+
already-approved plan, `ubp-orchestrator` can dispatch dependency-ready tasks
|
|
333
|
+
into isolated Git worktrees:
|
|
167
334
|
|
|
168
335
|
```bash
|
|
169
|
-
# 1. Bootstrap deterministic authority. This completes init but not research/baseline.
|
|
170
|
-
ultra-tools task init-project --project-name myapp --mode auto
|
|
171
|
-
|
|
172
|
-
# Projection-only projects from prior releases use one backup-first import:
|
|
173
|
-
ultra-tools migrate --from=4.4 --to=4.5 --source-dir .
|
|
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
336
|
ubp-orchestrator execute-plan
|
|
190
|
-
|
|
191
|
-
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
The orchestrator is intentionally not a replacement for Ultra gates. A worker
|
|
340
|
+
process exiting successfully does not complete a task. Task evidence, current
|
|
341
|
+
dev state, testing, review, integration, and baseline reconciliation still have
|
|
342
|
+
to converge. Worktrees with uncommitted or unintegrated work are preserved for
|
|
343
|
+
recovery.
|
|
344
|
+
|
|
345
|
+
See [Architecture](./docs/ARCHITECTURE.md) and
|
|
346
|
+
[Workflow Lifecycle](./docs/WORKFLOW-LIFECYCLE.md) before enabling automated
|
|
347
|
+
worker execution or verified auto-merge.
|
|
348
|
+
|
|
349
|
+
## CLI utilities
|
|
350
|
+
|
|
351
|
+
| Binary | Purpose |
|
|
352
|
+
|---|---|
|
|
353
|
+
| `ultra-builder-pro-cli` / `ubp` | Install, update, uninstall, and diagnose host plugins |
|
|
354
|
+
| `ultra-tools` | Inspect and maintain project tasks, sessions, state, migration, and recovery |
|
|
355
|
+
| `ubp-orchestrator` | Execute current dependency waves or supervise configured workers |
|
|
356
|
+
|
|
357
|
+
Useful read-only checks:
|
|
192
358
|
|
|
193
|
-
|
|
359
|
+
```bash
|
|
194
360
|
ultra-tools status
|
|
195
361
|
ultra-tools status --cost --since 24h
|
|
196
362
|
ultra-tools session list --json
|
|
197
363
|
ultra-tools system doctor
|
|
198
364
|
```
|
|
199
365
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
`$ultra-builder-pro:ultra-dev` → `$ultra-builder-pro:ultra-test` →
|
|
204
|
-
`$ultra-builder-pro:ultra-review` → `$ultra-builder-pro:ultra-deliver`; after the
|
|
205
|
-
baseline is delivered, daily work starts with `$ultra-builder-pro:ultra-change`, while
|
|
206
|
-
`$ultra-builder-pro:ultra-status` reads the compact authoritative breadcrumb.
|
|
207
|
-
Kimi uses the corresponding
|
|
208
|
-
`/ultra-builder-pro:ultra-*` namespace. Other runtimes retain their native
|
|
209
|
-
command form.
|
|
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
|
-
|
|
217
|
-
## CLI surface
|
|
366
|
+
Ultra MCP does not require `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or another
|
|
367
|
+
model-provider key. It validates and persists structures derived by the active
|
|
368
|
+
host's existing model session.
|
|
218
369
|
|
|
219
|
-
|
|
220
|
-
|--------|---------|
|
|
221
|
-
| `ultra-builder-pro-cli` / `ubp` | Installer — `--claude / --opencode / --codex / --kimi / --all`, `--local / --global`, `--uninstall`; read-only install checks via `--doctor [--json]` |
|
|
222
|
-
| `ubp-orchestrator` | Current completed-plan runner (`execute-plan`) and optional explicit-worker daemon (`run`, `start`, `stop`, `status`) |
|
|
223
|
-
| `ultra-tools` | State-layer CLI — `task`, `session`, `status`, `db`, `migrate`; explicit `legacy-memory` archive/prune migration |
|
|
224
|
-
| `ubp-handbook` | Preview/apply the managed Ultra contract in `CLAUDE.md` / `AGENTS.md`, with backup |
|
|
370
|
+
## Troubleshooting
|
|
225
371
|
|
|
226
|
-
|
|
372
|
+
- **Installed workflows are missing:** start a new host session. Kimi users can
|
|
373
|
+
run `/reload`.
|
|
374
|
+
- **An installed Hook or MCP path is stale:** run
|
|
375
|
+
`npx --yes ultra-builder-pro-cli@latest --all --global --doctor --json`, then
|
|
376
|
+
reinstall only the degraded host.
|
|
377
|
+
- **Project state is unhealthy:** invoke `ultra-doctor` or run
|
|
378
|
+
`ultra-tools system doctor`. Repairs and schema migrations are backup-first.
|
|
379
|
+
- **A projection disagrees with MCP:** trust `.ultra/state.db`; do not repair
|
|
380
|
+
`tasks.json` or generated context Markdown by hand.
|
|
381
|
+
- **A workflow appears blocked:** use `ultra-status` to read the exact current
|
|
382
|
+
workflow, blocker, owner decision, and mechanically valid transitions.
|
|
383
|
+
- **Kimi reports a native-module ABI error:** ensure an external Node.js 22+
|
|
384
|
+
executable is available on `PATH`; the generated Kimi MCP launcher uses
|
|
385
|
+
`env node`.
|
|
386
|
+
|
|
387
|
+
For exact recovery commands and invariants, see
|
|
388
|
+
[Workflow Lifecycle](./docs/WORKFLOW-LIFECYCLE.md) and
|
|
389
|
+
[State DB Access Policy](./docs/STATE-DB-ACCESS-POLICY.md).
|
|
390
|
+
|
|
391
|
+
## Development and verification
|
|
227
392
|
|
|
228
393
|
```bash
|
|
229
394
|
npm install
|
|
230
395
|
npm run test:all
|
|
231
|
-
|
|
232
|
-
npm audit
|
|
233
|
-
|
|
396
|
+
npm run test:hooks
|
|
397
|
+
npm audit --omit=dev --audit-level=high
|
|
398
|
+
|
|
399
|
+
# Complete release gate
|
|
234
400
|
npm run verify:release
|
|
235
401
|
```
|
|
236
402
|
|
|
237
|
-
Individual suites
|
|
238
|
-
|
|
239
|
-
## Troubleshooting
|
|
240
|
-
|
|
241
|
-
- **`state.db` locked**: close any `ubp-orchestrator` daemon, then
|
|
242
|
-
`ultra-tools db integrity`. SQLite WAL tolerates readers + one writer;
|
|
243
|
-
two writers require orchestrated access (see
|
|
244
|
-
[`docs/STATE-DB-ACCESS-POLICY.md`](./docs/STATE-DB-ACCESS-POLICY.md)).
|
|
245
|
-
- **`git/config.lock` contention during parallel run**: Node's single-thread
|
|
246
|
-
`execFileSync` serializes worktree creation, so this shouldn't happen —
|
|
247
|
-
but if you see it, `ubp-orchestrator status` will list stale worktrees
|
|
248
|
-
and `node -e "require('./orchestrator/worktree-manager.cjs').releaseAll(process.cwd())"`
|
|
249
|
-
cleans them up.
|
|
250
|
-
- **Installed commands don't show up**: check the runtime's actual config
|
|
251
|
-
dir (`ultra-builder-pro-cli --<runtime> --local` writes to the host-specific
|
|
252
|
-
project dir such as `./.claude`, `./.opencode`, or `./.kimi-code`;
|
|
253
|
-
`--global` writes to the user-level dir). The
|
|
254
|
-
install log prints the exact target path. Restart Claude Code/OpenCode or
|
|
255
|
-
start a new Codex task after changing an installed plugin. In Kimi Code,
|
|
256
|
-
run `/reload` or start a new session.
|
|
257
|
-
- **Kimi MCP reports a native-module ABI error**: Kimi 0.26/0.27 embeds a different
|
|
258
|
-
Node ABI from the package installer. The generated plugin intentionally runs
|
|
259
|
-
the MCP with `env node`; keep a Node.js `>=22` executable on `PATH` when
|
|
260
|
-
starting Kimi.
|
|
261
|
-
- **Installed hook/MCP path is missing or stale**: run
|
|
262
|
-
`npx ultra-builder-pro-cli --<runtime> --local --doctor` first. It compares
|
|
263
|
-
the recorded install provenance with current asset hashes and validates the
|
|
264
|
-
host-specific hook, MCP, plugin, and runtime-manifest entry points. Reinstall
|
|
265
|
-
only after preserving the degraded report as evidence.
|
|
266
|
-
- **Projection tasks exist but state.db has no tasks**: run the exact v4.4 or v4.5
|
|
267
|
-
`ultra-tools migrate` command returned by MCP, verify the backup and imported counts,
|
|
268
|
-
then run `ultra-init` to replace the compatibility row with a reviewed brownfield
|
|
269
|
-
baseline.
|
|
270
|
-
- **Old or corrupt state.db**: `ultra-tools system doctor` is read-only;
|
|
271
|
-
`ultra-tools system doctor --repair` upgrades supported schemas with two backup
|
|
272
|
-
checkpoints. A corrupt database is never overwritten automatically. After explicit
|
|
273
|
-
owner approval, restore a verified managed copy with
|
|
274
|
-
`ultra-tools system restore --backup <path> --confirm REPLACE_CORRUPT_ULTRA_STATE`,
|
|
275
|
-
or preserve the corrupt DB and legacy projection before rebuilding authority with
|
|
276
|
-
`ultra-tools system rebaseline --project-name <name> --confirm REBASELINE_CORRUPT_ULTRA_STATE`.
|
|
277
|
-
- **Legacy Ultra memory data remains on disk**: inspect first with
|
|
278
|
-
`ultra-tools legacy-memory inspect`, archive with
|
|
279
|
-
`ultra-tools legacy-memory archive`, then prune only with the explicit
|
|
280
|
-
confirmation token printed by the command. Nothing is deleted implicitly.
|
|
281
|
-
- **MCP model credentials**: Ultra MCP does not require `ANTHROPIC_API_KEY`,
|
|
282
|
-
`OPENAI_API_KEY`, or another provider key. The active host uses its existing
|
|
283
|
-
model session to derive PRD tasks or child tasks; `task.parse_prd` and
|
|
284
|
-
`task.expand` only validate ownership, graph shape, and atomic persistence.
|
|
403
|
+
Individual Node suites are available as `test:state`, `test:orch`, `test:spec`,
|
|
404
|
+
and `test:rest`.
|
|
285
405
|
|
|
286
406
|
## Documentation
|
|
287
407
|
|
|
288
|
-
|
|
|
289
|
-
|
|
290
|
-
| [
|
|
291
|
-
| [
|
|
292
|
-
| [
|
|
293
|
-
| [
|
|
294
|
-
| [
|
|
295
|
-
| [
|
|
296
|
-
| [
|
|
297
|
-
| [
|
|
298
|
-
| [
|
|
299
|
-
| [`CHANGELOG.md`](./CHANGELOG.md) | v0.1 → current release notes |
|
|
408
|
+
| Document | Purpose |
|
|
409
|
+
|---|---|
|
|
410
|
+
| [Architecture](./docs/ARCHITECTURE.md) | Components, authority boundaries, and live integration paths |
|
|
411
|
+
| [Workflow Lifecycle](./docs/WORKFLOW-LIFECYCLE.md) | Command ownership, transitions, invalidation, recovery, and convergence |
|
|
412
|
+
| [Runtime Compatibility Matrix](./docs/RUNTIME-COMPAT-MATRIX.md) | Claude Code, OpenCode, Codex, and Kimi presentation details |
|
|
413
|
+
| [Legacy CLI Crosswalk](./docs/LEGACY-CLI-CROSSWALK.md) | What was preserved, strengthened, or replaced from the original Ultra Builder Pro |
|
|
414
|
+
| [Agent Context](./docs/AGENT-CONTEXT.md) | Context Manifest and host-agent execution contract |
|
|
415
|
+
| [Plugin Isolation Contract](./docs/PLUGIN-ISOLATION-CONTRACT.md) | Plugin ownership, explicit activation, idle behavior, and user-instruction isolation |
|
|
416
|
+
| [State DB Access Policy](./docs/STATE-DB-ACCESS-POLICY.md) | Multi-process authority and write rules |
|
|
417
|
+
| [Roadmap](./docs/ROADMAP.md) | Current and historical delivery scope |
|
|
418
|
+
| [Changelog](./CHANGELOG.md) | Release history |
|
|
300
419
|
|
|
301
420
|
## License
|
|
302
421
|
|
|
303
|
-
MIT — see [
|
|
422
|
+
MIT — see [LICENSE](./LICENSE).
|