ultra-builder-pro-cli 0.21.1 → 0.23.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/tasks/tasks.json +10 -3
- package/.ultra-template/templates/task-context.md +19 -0
- package/CHANGELOG.md +78 -0
- package/README.md +210 -36
- package/adapters/_shared/codex-assets.cjs +8 -3
- package/adapters/_shared/interaction-contract.cjs +13 -6
- package/adapters/_shared/runtime-assets.cjs +1 -1
- package/adapters/claude.js +1 -1
- package/adapters/kimi.js +1 -1
- package/adapters/opencode.js +24 -13
- package/docs/AGENT-CONTEXT.md +58 -51
- package/docs/ARCHITECTURE.md +82 -51
- package/docs/ARTIFACT-AUTHORITY.md +83 -44
- package/docs/COMMIT-HASH-BACKFILL.md +33 -90
- package/docs/DECISIONS.md +9 -7
- package/docs/LEGACY-CLI-CROSSWALK.md +10 -2
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +3 -2
- package/docs/ROADMAP.md +3 -3
- package/docs/RUNTIME-COMPAT-MATRIX.md +13 -10
- package/docs/STATE-DB-ACCESS-POLICY.md +47 -19
- package/docs/WORKFLOW-LIFECYCLE.md +79 -49
- package/hooks/README.md +5 -4
- package/hooks/active_task_context.py +41 -39
- package/mcp-server/lib/artifact-registry.cjs +32 -7
- package/mcp-server/lib/baseline-workflow.cjs +60 -24
- package/mcp-server/lib/change-workflow.cjs +42 -6
- package/mcp-server/lib/context-paths.cjs +34 -3
- package/mcp-server/lib/doctor.cjs +28 -0
- package/mcp-server/lib/git-bootstrap.cjs +0 -1
- package/mcp-server/lib/init-project.cjs +52 -2
- package/mcp-server/lib/projector.cjs +43 -8
- package/mcp-server/lib/state-authority.cjs +19 -3
- package/mcp-server/lib/state-ops.cjs +6 -1
- package/mcp-server/lib/task-ledger.cjs +1342 -0
- package/mcp-server/lib/ultra-facade.cjs +646 -0
- package/mcp-server/lib/workflow-state.cjs +166 -2
- package/mcp-server/server.cjs +214 -26
- package/package.json +1 -1
- package/skills/ultra-change/SKILL.md +38 -90
- package/skills/ultra-deliver/SKILL.md +42 -62
- package/skills/ultra-dev/SKILL.md +34 -73
- package/skills/ultra-doctor/SKILL.md +26 -39
- package/skills/ultra-init/SKILL.md +37 -69
- package/skills/ultra-plan/SKILL.md +52 -125
- package/skills/ultra-research/SKILL.md +41 -101
- package/skills/ultra-review/SKILL.md +25 -44
- package/skills/ultra-status/SKILL.md +21 -40
- package/skills/ultra-test/SKILL.md +25 -60
- package/skills/ultra-think/SKILL.md +29 -48
- package/skills/ultra-think/references/decision-dialogue.md +6 -4
- package/spec/cli-protocol.md +15 -0
- package/spec/mcp-tools.yaml +286 -0
- package/spec/schemas/context-file.v4.5.schema.json +1 -1
- package/spec/schemas/mcp-tools.schema.json +1 -1
- package/spec/schemas/state-db.sql +1 -1
- package/spec/schemas/task-ledger.v1.schema.json +217 -0
- package/ultra-tools/commands/migrate.cjs +5 -2
- package/.ultra-template/tasks/contexts/TEMPLATE.md +0 -19
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
2
|
+
"kind": "ultra-team-task-ledger",
|
|
3
|
+
"schema_version": "1.0",
|
|
4
|
+
"generation": 0,
|
|
5
|
+
"parent_digest": null,
|
|
6
|
+
"ancestors": [],
|
|
7
|
+
"state_digest": "5bf27fb3627b711c97abf72f0aad150ba693d35bcebdd57c2d80e325f495de6d",
|
|
8
|
+
"published_at": null,
|
|
9
|
+
"reason": "scaffold",
|
|
10
|
+
"baseline": null,
|
|
11
|
+
"changes": [],
|
|
5
12
|
"tasks": []
|
|
6
13
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!-- Runtime task views are generated under .ultra/.runtime/projections/contexts/. -->
|
|
2
|
+
|
|
3
|
+
# Task Context Reference
|
|
4
|
+
|
|
5
|
+
Use this file only as a structure reference. Runtime task context views are generated
|
|
6
|
+
from SQLite authority and must not be edited by hand. Stable specification learning
|
|
7
|
+
must follow the Change workflow.
|
|
8
|
+
|
|
9
|
+
## Implementation Notes
|
|
10
|
+
|
|
11
|
+
- [Evidence-backed note with a source reference]
|
|
12
|
+
|
|
13
|
+
## Open Questions
|
|
14
|
+
|
|
15
|
+
- [Question, consequence, owner, and next evidence]
|
|
16
|
+
|
|
17
|
+
## Recovery Notes
|
|
18
|
+
|
|
19
|
+
- [Current safe resume point and any external prerequisite]
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,84 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.23.0] — 2026-07-30
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added a seven-tool public MCP kernel: `ultra.context`, `ultra.record`,
|
|
15
|
+
`ultra.checkpoint`, `ultra.sync`, `ultra.session`, `ultra.archive`, and
|
|
16
|
+
`ultra.doctor`.
|
|
17
|
+
- Added idempotent batched recording, content-addressed Context snapshots, and
|
|
18
|
+
semantic checkpoints that commit accepted workflow authority in one model
|
|
19
|
+
round trip.
|
|
20
|
+
- Added mutable diagnostic envelopes for rejected draft checkpoints and
|
|
21
|
+
archive preflights so the host model can correct or abandon the same draft.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Moved workflow sequencing and semantic judgment back into the eleven public
|
|
26
|
+
Skills. MCP now owns persistence, schema, transaction, concurrency, path,
|
|
27
|
+
recovery, and irreversible-effect boundaries instead of directing the model.
|
|
28
|
+
- Reduced the unconditional `tools/list` surface from 60 fine-grained tools to
|
|
29
|
+
seven high-level tools. The 0.22 fine-grained contracts remain callable but
|
|
30
|
+
hidden for one compatibility release.
|
|
31
|
+
- Made draft Changes and nonterminal workflows reversible while keeping
|
|
32
|
+
accepted revisions immutable and replaceable through a new draft.
|
|
33
|
+
- Updated Claude Code, Codex, OpenCode, and Kimi assets to use the same narrow
|
|
34
|
+
capability graph while preserving each host's native question and bounded
|
|
35
|
+
worker surfaces.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- Fixed Plan drafts becoming permanently self-locked when a task or exported
|
|
40
|
+
artifact changed after validation.
|
|
41
|
+
- Fixed semantic validation failures surfacing as MCP transport errors and
|
|
42
|
+
forcing models into repeated repair calls.
|
|
43
|
+
- Fixed duplicate Context compilation creating competing snapshots for the
|
|
44
|
+
same semantic inputs.
|
|
45
|
+
- Fixed `ultra.context` creating `.ultra` state merely by inspecting an
|
|
46
|
+
uninitialized project.
|
|
47
|
+
|
|
48
|
+
## [0.22.0] — 2026-07-30
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- Added a versioned, digest-chained Git team checkpoint at
|
|
53
|
+
`.ultra/tasks/tasks.json` for portable baseline, Change, task-contract,
|
|
54
|
+
dependency, and durable task-status handoff.
|
|
55
|
+
- Added `task.ledger_get`, `task.ledger_publish`, and `task.ledger_import` with
|
|
56
|
+
per-record revisions, bounded ancestry, transactional fast-forward imports,
|
|
57
|
+
and typed baseline, Change, task, deletion, and active-session conflicts.
|
|
58
|
+
- Added exact-byte backup and deterministic upgrade of matching legacy v4.4
|
|
59
|
+
and v4.5 task projections during project resume.
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- Moved generated task and context views under
|
|
64
|
+
`.ultra/.runtime/projections/`; SQLite remains checkout-local operational
|
|
65
|
+
authority while the Git checkpoint is the narrow team handoff.
|
|
66
|
+
- Updated all public workflow Skills, project templates, hooks, adapters, and
|
|
67
|
+
documentation to inspect and synchronize the team checkpoint without
|
|
68
|
+
turning hooks or host adapters into semantic authorities.
|
|
69
|
+
- Made imported ready baselines require checkout-local revalidation before
|
|
70
|
+
they may publish a descendant checkpoint.
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- Fixed tracked task projections creating a self-referential
|
|
75
|
+
`BASELINE_HEAD_STALE` treadmill after every Ultra operation or metadata-only
|
|
76
|
+
commit. Baseline freshness now uses scoped source content plus Git ancestry
|
|
77
|
+
while continuing to detect specification and source drift.
|
|
78
|
+
- Fixed task completion requiring a second bookkeeping commit. The completion
|
|
79
|
+
SHA is now backfilled only into local SQLite and generated views after the
|
|
80
|
+
single real completion commit.
|
|
81
|
+
- Fixed resume, doctor, status, and four-host install paths disagreeing about
|
|
82
|
+
legacy task projections, team checkpoints, generated views, and protected
|
|
83
|
+
files.
|
|
84
|
+
- Replaced the daemon's machine-speed-dependent 500ms release assertion with a
|
|
85
|
+
bounded observable-session wait while preserving the immediate-poll
|
|
86
|
+
behavior requirement.
|
|
87
|
+
|
|
10
88
|
## [0.21.1] — 2026-07-29
|
|
11
89
|
|
|
12
90
|
### Fixed
|
package/README.md
CHANGED
|
@@ -43,9 +43,11 @@ Ultra Builder Pro addresses those gaps with four ideas:
|
|
|
43
43
|
2. **Low-load user alignment.** The agent investigates observable facts itself
|
|
44
44
|
and asks the user only for material intent, scope, risk, or authorization
|
|
45
45
|
decisions—normally one dependent decision at a time.
|
|
46
|
-
3. **Durable project authority.** `.ultra/.runtime/state.db` records
|
|
47
|
-
decisions, workflows,
|
|
48
|
-
recovery state across
|
|
46
|
+
3. **Durable project authority.** `.ultra/.runtime/state.db` records checkout-local
|
|
47
|
+
lifecycle, decisions, workflows, evidence digests, sessions, incidents, and
|
|
48
|
+
recovery state across host sessions. Tracked semantic artifacts plus the
|
|
49
|
+
MCP-published `.ultra/tasks/tasks.json` checkpoint carry reviewed project intent
|
|
50
|
+
across Git checkouts without committing SQLite, leases, or telemetry.
|
|
49
51
|
4. **Convergent delivery.** Research, plans, implementation, tests, review, and
|
|
50
52
|
specification updates must agree before a change is archived.
|
|
51
53
|
|
|
@@ -59,14 +61,40 @@ session resumes from that authority instead of reconstructing it from chat.
|
|
|
59
61
|
## The mental model
|
|
60
62
|
|
|
61
63
|
```mermaid
|
|
62
|
-
flowchart
|
|
63
|
-
U["User<br/>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
flowchart TB
|
|
65
|
+
U["User<br/>goals, acceptance, trade-offs, risk, and external authorization"]
|
|
66
|
+
|
|
67
|
+
subgraph HOST["Supported coding host"]
|
|
68
|
+
UI["Host-native interaction<br/>Claude Code / Codex / OpenCode / Kimi Code"]
|
|
69
|
+
MODEL["Host agent<br/>inspect, recommend, implement, test, and review"]
|
|
70
|
+
ADAPTER["Host adapter<br/>native questions, commands, tools, and lifecycle wiring"]
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
SKILLS["Eleven explicit Ultra Skills<br/>init / research / think / change / plan / dev<br/>test / review / deliver / status / doctor"]
|
|
74
|
+
MCP["Ultra MCP safety kernel<br/>7 public tools; 60 hidden compatibility operations"]
|
|
75
|
+
DB[(".ultra/.runtime/state.db<br/>SQLite lifecycle and index authority")]
|
|
76
|
+
LEDGER[".ultra/tasks/tasks.json<br/>Git team checkpoint for portable baseline, Change, and task state"]
|
|
77
|
+
VIEWS[".ultra/.runtime/projections<br/>checkout-local generated views"]
|
|
78
|
+
FILES["Digest-bound .ultra artifacts<br/>specification / research / change / plan / context<br/>test / review / delivery"]
|
|
79
|
+
HOOKS["Lifecycle hooks<br/>health, breadcrumbs, recovery hints, and managed-file protection"]
|
|
80
|
+
OPS["Operational tools<br/>ubp / ultra-tools / optional orchestrator"]
|
|
81
|
+
EXTERNAL["External memory and graph providers"]
|
|
82
|
+
|
|
83
|
+
U <-->|"intent, recommendation, and owner choice"| UI
|
|
84
|
+
UI <--> MODEL
|
|
85
|
+
ADAPTER --> UI
|
|
86
|
+
ADAPTER -.->|"discovers and presents"| SKILLS
|
|
87
|
+
MODEL -->|"explicit invocation"| SKILLS
|
|
88
|
+
SKILLS -->|"typed operations"| MCP
|
|
89
|
+
MCP <--> DB
|
|
90
|
+
MCP -->|"publish / validate / import"| LEDGER
|
|
91
|
+
MCP -->|"regenerate"| VIEWS
|
|
92
|
+
MODEL -->|"writes semantic and evidence bodies"| FILES
|
|
93
|
+
MCP <-->|"registers owner, digest, provenance, and freshness"| FILES
|
|
94
|
+
HOOKS -->|"observes and records lifecycle events"| MCP
|
|
95
|
+
OPS -->|"installation"| ADAPTER
|
|
96
|
+
OPS -->|"diagnosis, recovery, and approved dispatch"| MCP
|
|
97
|
+
EXTERNAL -.->|"bounded provider references only"| DB
|
|
70
98
|
```
|
|
71
99
|
|
|
72
100
|
The responsibility split is deliberate:
|
|
@@ -75,13 +103,65 @@ The responsibility split is deliberate:
|
|
|
75
103
|
|---|---|
|
|
76
104
|
| **User** | Product intent, semantic route selection, material scope and trade-offs, risk acceptance, destructive actions, publishing and deployment authorization |
|
|
77
105
|
| **Host model** | Fact-finding, synthesis, research-coverage and route recommendations, reversible implementation decisions |
|
|
78
|
-
| **Ultra MCP** | Durable
|
|
106
|
+
| **Ultra MCP** | Durable checkpoints, evidence references, digests, team sync, leases, archive transactions, and mechanical recovery |
|
|
79
107
|
| **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
|
|
108
|
+
| **Hooks** | Fast lifecycle observation, current breadcrumb injection, and protection of MCP-owned checkpoint and generated projection paths |
|
|
81
109
|
|
|
82
|
-
The MCP does not replace the model's judgment
|
|
83
|
-
|
|
84
|
-
|
|
110
|
+
The MCP does not replace the model's judgment or pre-authorize a semantic route. It
|
|
111
|
+
reports draft diagnostics and commits accepted checkpoints. A hook does not decide
|
|
112
|
+
product strategy. A prompt does not become durable authority merely because it
|
|
113
|
+
appeared in a conversation.
|
|
114
|
+
|
|
115
|
+
### The seven-tool MCP kernel
|
|
116
|
+
|
|
117
|
+
The public model-facing surface is intentionally small:
|
|
118
|
+
|
|
119
|
+
| Tool | Responsibility |
|
|
120
|
+
|---|---|
|
|
121
|
+
| `ultra.context` | Read the complete current spine without side effects |
|
|
122
|
+
| `ultra.record` | Batch typed draft facts and events with idempotency |
|
|
123
|
+
| `ultra.checkpoint` | Attempt one semantic stage checkpoint; rejection leaves the draft editable |
|
|
124
|
+
| `ultra.sync` | Inspect, import, or publish the Git team checkpoint |
|
|
125
|
+
| `ultra.session` | Own the transactional execution lease |
|
|
126
|
+
| `ultra.archive` | Converge and archive through the recoverable filesystem/DB boundary |
|
|
127
|
+
| `ultra.doctor` | Inspect or repair mechanical health, backup first |
|
|
128
|
+
|
|
129
|
+
The 0.22 fine-grained tools remain callable but undiscoverable for one compatibility
|
|
130
|
+
release. Skills and new sessions use only the seven tools above. Workflow prose stays
|
|
131
|
+
in Skills, model judgment stays with the host, and SQLite records what happened rather
|
|
132
|
+
than deciding what the model is allowed to think next.
|
|
133
|
+
|
|
134
|
+
The enforcement gradient is:
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
exploration and iteration: advisory
|
|
138
|
+
durable semantic checkpoint: validated and recoverable
|
|
139
|
+
corruption / unsafe path / real concurrency / permission: fail closed
|
|
140
|
+
irreversible external effect: explicit owner authority plus fail closed
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### How owner intent becomes durable authority
|
|
144
|
+
|
|
145
|
+
```mermaid
|
|
146
|
+
flowchart TD
|
|
147
|
+
CURRENT["Current Ultra workflow"] --> INSPECT["Host model inspects code, documents, and current authority"]
|
|
148
|
+
INSPECT --> SUGGEST["Model recommends a route and explains its consequences"]
|
|
149
|
+
SUGGEST --> CLEAR{"Is current owner intent already explicit?"}
|
|
150
|
+
CLEAR -->|"Yes"| NORMALIZE["Normalize the accepted intent"]
|
|
151
|
+
CLEAR -->|"No: a material choice remains"| ASK["Ask one dependent question through the host-native question tool"]
|
|
152
|
+
ASK --> NORMALIZE
|
|
153
|
+
NORMALIZE --> RECORD["Batch the normalized result through ultra.record"]
|
|
154
|
+
RECORD --> CHECKPOINT["Attempt the owning ultra.checkpoint when authority is ready"]
|
|
155
|
+
CHECKPOINT --> AUTHORITY["Bind state, artifact digest, provenance, and downstream effects"]
|
|
156
|
+
AUTHORITY --> READBACK["Read back the authoritative result"]
|
|
157
|
+
READBACK --> RESUME["Resume the exact workflow step and recommend the next explicit capability"]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The interaction before the write establishes owner intent. Once the host model
|
|
161
|
+
normalizes and persists that intent, MCP treats the stored result as current
|
|
162
|
+
authority; it does not try to prove that the owner clicked a particular UI
|
|
163
|
+
control. Ultra stores the accepted result and its scope, evidence, provenance,
|
|
164
|
+
and effects—not chain-of-thought, raw prompts, transcripts, or UI receipts.
|
|
85
165
|
|
|
86
166
|
## What you get
|
|
87
167
|
|
|
@@ -248,13 +328,16 @@ already resolves the route. The normalized accepted coverage is then stored in
|
|
|
248
328
|
- `deferred` — record the consequence and accepted owner.
|
|
249
329
|
|
|
250
330
|
The catalog is not a mandatory document set or questionnaire. Omitted areas
|
|
251
|
-
create no workflow rows; an explicit exclusion is recorded only when retaining
|
|
252
|
-
that rationale is useful. MCP validates
|
|
253
|
-
does not store or prove the preceding UI interaction.
|
|
331
|
+
create no workflow rows; an explicit exclusion is recorded only when retaining
|
|
332
|
+
that rationale is useful. MCP validates accepted checkpoints and mechanical
|
|
333
|
+
integrity; it does not store or prove the preceding UI interaction.
|
|
254
334
|
|
|
255
335
|
Older projection-only Ultra projects are preserved and routed through a
|
|
256
|
-
backup-first migration or rebaseline.
|
|
257
|
-
|
|
336
|
+
backup-first migration or rebaseline. The first supported checkpoint publication
|
|
337
|
+
replaces a v4.4/v4.5 task projection only when its ids and durable fields match
|
|
338
|
+
SQLite, after copying its exact bytes to `.ultra/.runtime/backups/task-ledger/`.
|
|
339
|
+
Use `ultra-doctor` when initialization reports migration, mismatch, or authority
|
|
340
|
+
damage; do not overwrite old state manually.
|
|
258
341
|
|
|
259
342
|
### 3. Make daily changes
|
|
260
343
|
|
|
@@ -304,12 +387,67 @@ The next piece of daily work starts with a new `ultra-change`.
|
|
|
304
387
|
| `ultra-test` | Run the risk-selected verification profile and persist the gate result |
|
|
305
388
|
| `ultra-review` | Coordinate independent specification-fidelity and engineering review |
|
|
306
389
|
| `ultra-deliver` | Reconcile specifications, close local authority, and archive the change |
|
|
307
|
-
| `ultra-status` | Read the current
|
|
390
|
+
| `ultra-status` | Read the current context, warnings, blockers, and evidence |
|
|
308
391
|
| `ultra-doctor` | Diagnose installation or project-state faults and expose safe recovery |
|
|
309
392
|
|
|
310
|
-
These eleven capabilities are the complete public Ultra command graph.
|
|
311
|
-
|
|
312
|
-
capability starts only after an explicit
|
|
393
|
+
These eleven capabilities are the complete public Ultra command graph. The host model
|
|
394
|
+
recommends the next capability from current context and owner intent; SQLite does not
|
|
395
|
+
encode the semantic route. Another public capability starts only after an explicit
|
|
396
|
+
user command or skill invocation.
|
|
397
|
+
|
|
398
|
+
### Command interaction graph
|
|
399
|
+
|
|
400
|
+
Every solid handoff below means: the current capability returns context and checkpoint
|
|
401
|
+
diagnostics, the model recommends a route, and the owner explicitly invokes the next
|
|
402
|
+
public capability. It does not mean that one public command silently launches another.
|
|
403
|
+
|
|
404
|
+
```mermaid
|
|
405
|
+
flowchart TD
|
|
406
|
+
START["Project entry"] --> INIT["ultra-init"]
|
|
407
|
+
INIT --> CLASSIFY{"Repository classification"}
|
|
408
|
+
|
|
409
|
+
CLASSIFY -->|"Greenfield"| GREEN["Create scaffold<br/>verify Git and project authority"]
|
|
410
|
+
CLASSIFY -->|"Brownfield"| BROWN["Preserve the delivered system<br/>bootstrap adoption authority"]
|
|
411
|
+
CLASSIFY -->|"Legacy or damaged authority"| REPAIR["ultra-doctor<br/>migrate, recover, or rebaseline"]
|
|
412
|
+
REPAIR --> BROWN
|
|
413
|
+
|
|
414
|
+
GREEN --> RESEARCH["Explicit ultra-research"]
|
|
415
|
+
BROWN --> RESEARCH
|
|
416
|
+
RESEARCH --> BASELINE{"Has the baseline converged?"}
|
|
417
|
+
BASELINE -->|"Material decision gap"| THINK_BASE["ultra-think"]
|
|
418
|
+
THINK_BASE --> RESEARCH
|
|
419
|
+
BASELINE -->|"Evidence gap"| RESEARCH
|
|
420
|
+
BASELINE -->|"Approved and current"| CHANGE["Explicit ultra-change"]
|
|
421
|
+
|
|
422
|
+
CHANGE --> ROUTE{"Model recommends a route<br/>owner selects or modifies it"}
|
|
423
|
+
ROUTE -->|"Material intent remains unresolved"| THINK_CHANGE["ultra-think"]
|
|
424
|
+
THINK_CHANGE --> ROUTE
|
|
425
|
+
ROUTE -->|"Real evidence gap"| CHANGE_RESEARCH["Bounded ultra-research<br/>owned by the active Change"]
|
|
426
|
+
CHANGE_RESEARCH --> PLAN["ultra-plan"]
|
|
427
|
+
ROUTE -->|"Evidence is sufficient: Direct Build"| PLAN
|
|
428
|
+
|
|
429
|
+
PLAN --> DEV["ultra-dev<br/>one dependency-ready vertical task"]
|
|
430
|
+
DEV --> TASKS{"More executable tasks?"}
|
|
431
|
+
TASKS -->|"Yes"| DEV
|
|
432
|
+
TASKS -->|"No"| TEST["ultra-test<br/>risk-selected formal verification"]
|
|
433
|
+
TEST -->|"Failed or incomplete"| DEV
|
|
434
|
+
TEST -->|"Passing"| REVIEW["ultra-review<br/>specification fidelity and engineering quality"]
|
|
435
|
+
REVIEW -->|"Changes required"| DEV
|
|
436
|
+
REVIEW -->|"Approved"| DELIVER["ultra-deliver"]
|
|
437
|
+
DELIVER --> ARCHIVE["Reconcile specifications<br/>apply the Change overlay and archive evidence"]
|
|
438
|
+
ARCHIVE --> NEXT{"Continue"}
|
|
439
|
+
NEXT -->|"Next outcome"| CHANGE
|
|
440
|
+
NEXT -->|"Inspect current authority"| STATUS["ultra-status"]
|
|
441
|
+
|
|
442
|
+
ANY["Any active stage"] -.->|"read-only routing"| STATUS
|
|
443
|
+
ANY -.->|"mechanical health fault"| DOCTOR["ultra-doctor"]
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
“Direct Build” skips additional Research only. It still requires
|
|
447
|
+
`ultra-plan`, current DB-backed task contracts, dependency ownership, and an
|
|
448
|
+
immutable role-scoped Context Manifest before `ultra-dev`. `ultra-status` is a
|
|
449
|
+
read-only side route, while `ultra-doctor` diagnoses and repairs mechanical
|
|
450
|
+
health without selecting product intent.
|
|
313
451
|
|
|
314
452
|
## What lives in `.ultra/`
|
|
315
453
|
|
|
@@ -318,6 +456,7 @@ capability starts only after an explicit user command or skill invocation.
|
|
|
318
456
|
.runtime/ # local mutable state; ignored by Git
|
|
319
457
|
state.db # lifecycle, index, transition, and freshness authority
|
|
320
458
|
checkpoint.json # advisory recovery projection
|
|
459
|
+
projections/ # generated local task and task-context views
|
|
321
460
|
backups/ # verified migration and recovery snapshots
|
|
322
461
|
collab/ # local collaboration scratch
|
|
323
462
|
sessions/ # local leases and session runtime
|
|
@@ -326,9 +465,14 @@ capability starts only after an explicit user command or skill invocation.
|
|
|
326
465
|
specs/ # digest-bound product and architecture baseline
|
|
327
466
|
changes/
|
|
328
467
|
active/<id>/ # all current Change semantics and evidence
|
|
468
|
+
intent.md # accepted Change Contract
|
|
469
|
+
findings.md # durable Change findings
|
|
470
|
+
progress.md # generated human-readable projection
|
|
329
471
|
research/ # Change-only findings and research reports
|
|
330
472
|
delta/ # typed baseline overlay and semantic payloads
|
|
331
473
|
documentation/ # documentation overlay and reconciliation evidence
|
|
474
|
+
plan.json # machine-readable task topology
|
|
475
|
+
plan.md # deterministic human plan projection
|
|
332
476
|
contexts/ # immutable role/task context snapshots
|
|
333
477
|
test/ # Change-scoped test reports
|
|
334
478
|
review/ # Change-scoped review workers and summary
|
|
@@ -337,17 +481,20 @@ capability starts only after an explicit user command or skill invocation.
|
|
|
337
481
|
docs/research/ # baseline-only research evidence
|
|
338
482
|
reports/templates/ # blank report schemas; never delivery evidence
|
|
339
483
|
tasks/
|
|
340
|
-
tasks.json #
|
|
341
|
-
|
|
484
|
+
tasks.json # MCP-published Git team checkpoint; never hand-edited
|
|
485
|
+
templates/
|
|
486
|
+
task-context.md # authored template, not a generated task context
|
|
342
487
|
```
|
|
343
488
|
|
|
344
489
|
Together, `.ultra/` is Ultra's project-local cross-session workflow memory. The
|
|
345
490
|
host model writes semantic specifications and evidence through the active
|
|
346
|
-
|
|
347
|
-
accepted intent, then
|
|
348
|
-
lifecycle and index authority; registered digest-bound files carry
|
|
349
|
-
or evidence bodies that the DB references.
|
|
350
|
-
|
|
491
|
+
capability. MCP records lifecycle state, references, digests, provenance, and
|
|
492
|
+
accepted intent, then validates durable checkpoints and mechanical integrity. The DB is the
|
|
493
|
+
lifecycle and index authority for one checkout; registered digest-bound files carry
|
|
494
|
+
the semantic or evidence bodies that the DB references. The Git checkpoint is a
|
|
495
|
+
portable, digest-chained handoff of baseline, Change, and durable task records. It is
|
|
496
|
+
not a second live session authority. Generated projections and working scratch are
|
|
497
|
+
not authority.
|
|
351
498
|
|
|
352
499
|
Ultra does not store chain-of-thought, raw prompts, transcripts, general
|
|
353
500
|
conversational or episodic memory, or code-graph payloads. External memory and
|
|
@@ -356,6 +503,29 @@ references to them as workflow context. Only `.ultra/.runtime/` is ignored by
|
|
|
356
503
|
Git: semantic and evidence artifacts can travel with the repository, while
|
|
357
504
|
SQLite, leases, telemetry, and recovery scratch remain checkout-local.
|
|
358
505
|
|
|
506
|
+
### Team checkpoint protocol
|
|
507
|
+
|
|
508
|
+
MCP publishes `.ultra/tasks/tasks.json` at durable boundaries: baseline convergence,
|
|
509
|
+
Change creation or revision, accepted plan export, durable task-contract or status
|
|
510
|
+
changes, task expansion or deletion, and Change convergence or archive. The file
|
|
511
|
+
contains per-record revisions and digests plus checkpoint ancestry. It excludes
|
|
512
|
+
`in_progress` ownership, session ids, leases, worktrees, telemetry, and
|
|
513
|
+
`completion_commit`.
|
|
514
|
+
|
|
515
|
+
After a pull or on a fresh checkout, MCP validates and imports the checkpoint. Clean
|
|
516
|
+
records fast-forward independently. A baseline imported as `ready` is downgraded to
|
|
517
|
+
checkout-local revalidation until its scope, files, verification, and HEAD are proven
|
|
518
|
+
again. Concurrent edits to the same baseline, Change, or task, a non-descendant
|
|
519
|
+
checkpoint, or remote modification of an active local task fail with a typed conflict;
|
|
520
|
+
Ultra never silently picks a side. Re-importing the same checkpoint is read-only, and
|
|
521
|
+
an imported ready baseline cannot publish another checkpoint until local revalidation
|
|
522
|
+
converges.
|
|
523
|
+
|
|
524
|
+
Baseline freshness does not use the checkpoint commit as a self-referential marker.
|
|
525
|
+
It combines Git ancestry with a scoped content digest that excludes `.ultra/`.
|
|
526
|
+
Consequently, a commit containing only Ultra metadata does not make the baseline stale,
|
|
527
|
+
while a descendant commit that changes scoped application content does.
|
|
528
|
+
|
|
359
529
|
See [Artifact authority](./docs/ARTIFACT-AUTHORITY.md) for the promotion and
|
|
360
530
|
evidence rules.
|
|
361
531
|
|
|
@@ -409,10 +579,14 @@ host's existing model session.
|
|
|
409
579
|
reinstall only the degraded host.
|
|
410
580
|
- **Project state is unhealthy:** invoke `ultra-doctor` or run
|
|
411
581
|
`ultra-tools system doctor`. Repairs and schema migrations are backup-first.
|
|
412
|
-
- **
|
|
413
|
-
`
|
|
414
|
-
|
|
415
|
-
|
|
582
|
+
- **The team checkpoint disagrees with local state:** run `ultra-status`, inspect the
|
|
583
|
+
typed ledger condition, then use `ultra.sync` to import or publish after reviewing
|
|
584
|
+
any real conflict. Never edit `.ultra/tasks/tasks.json` by hand.
|
|
585
|
+
- **A generated view disagrees with MCP:** trust `.ultra/.runtime/state.db`; never edit
|
|
586
|
+
`.ultra/.runtime/projections/` by hand.
|
|
587
|
+
- **A draft checkpoint is rejected:** use `ultra-status` to read the exact warnings
|
|
588
|
+
and blockers, fix the same mutable draft, and retry. Use `workflow.abandon` through
|
|
589
|
+
`ultra.record` only when intentionally cancelling the attempt.
|
|
416
590
|
- **Kimi reports a native-module ABI error:** ensure an external Node.js 22+
|
|
417
591
|
executable is available on `PATH`; the generated Kimi MCP launcher uses
|
|
418
592
|
`env node`.
|
|
@@ -96,7 +96,7 @@ function adaptCodexPrimaryText(input, skillName) {
|
|
|
96
96
|
let text = String(input);
|
|
97
97
|
if (skillName === 'ultra-review') {
|
|
98
98
|
text = text.replace(
|
|
99
|
-
/the current host's native bounded-worker\s+mechanism/g,
|
|
99
|
+
/(?:the current host's native|the host-native) bounded-worker\s+mechanism/g,
|
|
100
100
|
'native Codex custom agents installed for the selected review workers',
|
|
101
101
|
);
|
|
102
102
|
}
|
|
@@ -470,7 +470,11 @@ main().catch((error) => {
|
|
|
470
470
|
|
|
471
471
|
const sourceToolsFile = path.join(repoRoot, 'spec', 'mcp-tools.yaml');
|
|
472
472
|
const upstreamManifest = yaml.load(fs.readFileSync(sourceToolsFile, 'utf8'));
|
|
473
|
-
const {
|
|
473
|
+
const {
|
|
474
|
+
LEGACY_TOOLS,
|
|
475
|
+
PUBLIC_TOOLS,
|
|
476
|
+
REGISTERED_TOOLS,
|
|
477
|
+
} = require(path.join(repoRoot, 'mcp-server', 'server.cjs'));
|
|
474
478
|
const registered = new Set(REGISTERED_TOOLS);
|
|
475
479
|
const liveFamilies = new Set(
|
|
476
480
|
upstreamManifest.tools.filter((tool) => registered.has(tool.name)).map((tool) => tool.family),
|
|
@@ -495,7 +499,8 @@ main().catch((error) => {
|
|
|
495
499
|
fs.copyFileSync(sourceToolsFile, path.join(specRoot, 'upstream-mcp-tools.yaml'));
|
|
496
500
|
writeAtomic(path.join(specRoot, 'codex-capability-map.json'), JSON.stringify({
|
|
497
501
|
runtime: 'codex',
|
|
498
|
-
live_mcp_tools:
|
|
502
|
+
live_mcp_tools: PUBLIC_TOOLS,
|
|
503
|
+
compatibility_mcp_tools: LEGACY_TOOLS,
|
|
499
504
|
codex_native_replacements: CODEX_NATIVE_MCP_REPLACEMENTS,
|
|
500
505
|
}, null, 2) + '\n');
|
|
501
506
|
}
|
|
@@ -32,7 +32,7 @@ function interactionContract(runtime) {
|
|
|
32
32
|
const question = SURFACES[runtime];
|
|
33
33
|
if (!question) throw new Error(`unsupported interaction runtime: ${runtime}`);
|
|
34
34
|
return {
|
|
35
|
-
schema_version: '1.
|
|
35
|
+
schema_version: '1.3',
|
|
36
36
|
runtime,
|
|
37
37
|
public_capability_graph: PUBLIC_CAPABILITY_GRAPH,
|
|
38
38
|
authority: {
|
|
@@ -50,9 +50,9 @@ function interactionContract(runtime) {
|
|
|
50
50
|
'accepted_intent_normalization',
|
|
51
51
|
],
|
|
52
52
|
ultra_mcp: [
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
53
|
+
'durable_checkpoints_and_evidence_refs',
|
|
54
|
+
'digests_freshness_leases_archives_and_recovery',
|
|
55
|
+
'mutable_semantic_diagnostics',
|
|
56
56
|
],
|
|
57
57
|
},
|
|
58
58
|
interaction: {
|
|
@@ -85,8 +85,15 @@ function interactionContract(runtime) {
|
|
|
85
85
|
routing: {
|
|
86
86
|
semantic_recommendation_owner: 'host_model',
|
|
87
87
|
durable_recommendation_authority: false,
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
current_context_tool: 'ultra.context',
|
|
89
|
+
checkpoint_diagnostic_fields: ['warnings', 'blockers'],
|
|
90
|
+
hard_blocker_boundary: [
|
|
91
|
+
'corruption',
|
|
92
|
+
'unsafe_path',
|
|
93
|
+
'concurrency_conflict',
|
|
94
|
+
'permission',
|
|
95
|
+
'irreversible_external_effect',
|
|
96
|
+
],
|
|
90
97
|
},
|
|
91
98
|
};
|
|
92
99
|
}
|
|
@@ -41,7 +41,7 @@ const PUBLIC_CAPABILITY_GRAPH = Object.freeze(Object.fromEntries(
|
|
|
41
41
|
Object.freeze({
|
|
42
42
|
mode: PUBLIC_CAPABILITY_MODES[name],
|
|
43
43
|
activation: 'explicit_only',
|
|
44
|
-
next_capability_source: '
|
|
44
|
+
next_capability_source: 'host_model_from_ultra_context',
|
|
45
45
|
recommendation_owner: 'host_model',
|
|
46
46
|
selection_owner: 'user',
|
|
47
47
|
automatic_invocation: false,
|
package/adapters/claude.js
CHANGED
|
@@ -66,7 +66,7 @@ function copySkills(repoRoot, target, names) {
|
|
|
66
66
|
let adaptedBody = adaptInteractionGuidance(body, 'claude');
|
|
67
67
|
if (name === 'ultra-review') {
|
|
68
68
|
adaptedBody = adaptedBody.replace(
|
|
69
|
-
/the current host's native bounded-worker\s+mechanism/g,
|
|
69
|
+
/(?:the current host's native|the host-native) bounded-worker\s+mechanism/g,
|
|
70
70
|
'Claude Code Task workers using the installed review agent definitions',
|
|
71
71
|
);
|
|
72
72
|
}
|
package/adapters/kimi.js
CHANGED
|
@@ -96,7 +96,7 @@ function kimiTextTransform(input, assetName = '') {
|
|
|
96
96
|
}
|
|
97
97
|
if (assetName === 'ultra-review') {
|
|
98
98
|
text = text.replace(
|
|
99
|
-
/the current host's native bounded-worker\s+mechanism/g,
|
|
99
|
+
/(?:the current host's native|the host-native) bounded-worker\s+mechanism/g,
|
|
100
100
|
'Kimi `AgentSwarm` for parallel reviewers or one foreground Kimi `Agent` for a single reviewer, using the worker prompt files under `$KIMI_PLUGIN_ROOT/agents/`',
|
|
101
101
|
);
|
|
102
102
|
}
|
package/adapters/opencode.js
CHANGED
|
@@ -93,7 +93,7 @@ function openCodeTextTransform(input, assetName = '') {
|
|
|
93
93
|
}
|
|
94
94
|
if (assetName === 'ultra-review') {
|
|
95
95
|
text = text.replace(
|
|
96
|
-
/the current host's native bounded-worker\s+mechanism/g,
|
|
96
|
+
/(?:the current host's native|the host-native) bounded-worker\s+mechanism/g,
|
|
97
97
|
'the OpenCode `task` tool using the installed bounded review agents',
|
|
98
98
|
);
|
|
99
99
|
}
|
|
@@ -337,7 +337,8 @@ import path from "node:path";
|
|
|
337
337
|
import { execFileSync } from "node:child_process";
|
|
338
338
|
import { fileURLToPath } from "node:url";
|
|
339
339
|
|
|
340
|
-
const
|
|
340
|
+
const TEAM_TASK_LEDGER = ".ultra/tasks/tasks.json";
|
|
341
|
+
const LIVE_TASK_PROJECTION = ".ultra/.runtime/projections/tasks.json";
|
|
341
342
|
const NODE_BINARY = ${JSON.stringify(process.execPath)};
|
|
342
343
|
const PLUGIN_DIR = path.dirname(fileURLToPath(import.meta.url));
|
|
343
344
|
const BREADCRUMB_CLI = path.resolve(
|
|
@@ -382,20 +383,28 @@ function targetPaths(tool, args) {
|
|
|
382
383
|
return [...new Set(paths)];
|
|
383
384
|
}
|
|
384
385
|
|
|
385
|
-
function
|
|
386
|
+
function managedTaskRootForTarget(baseRoot, candidate) {
|
|
386
387
|
const target = path.isAbsolute(candidate)
|
|
387
388
|
? path.resolve(candidate)
|
|
388
389
|
: path.resolve(baseRoot, candidate);
|
|
389
|
-
if (path.
|
|
390
|
-
|| path.
|
|
391
|
-
|
|
392
|
-
|
|
390
|
+
if (target === path.resolve(baseRoot, TEAM_TASK_LEDGER)
|
|
391
|
+
|| target === path.resolve(baseRoot, LIVE_TASK_PROJECTION)) return baseRoot;
|
|
392
|
+
if (path.basename(target) !== "tasks.json") return null;
|
|
393
|
+
const parent = path.dirname(target);
|
|
394
|
+
if (path.basename(parent) === "tasks"
|
|
395
|
+
&& path.basename(path.dirname(parent)) === ".ultra") {
|
|
396
|
+
return path.dirname(path.dirname(parent));
|
|
397
|
+
}
|
|
398
|
+
if (path.basename(parent) === "projections"
|
|
399
|
+
&& path.basename(path.dirname(parent)) === ".runtime"
|
|
400
|
+
&& path.basename(path.dirname(path.dirname(parent))) === ".ultra") {
|
|
401
|
+
return path.dirname(path.dirname(path.dirname(parent)));
|
|
393
402
|
}
|
|
394
|
-
return
|
|
403
|
+
return null;
|
|
395
404
|
}
|
|
396
405
|
|
|
397
|
-
function
|
|
398
|
-
const targetRoot =
|
|
406
|
+
function protectsManagedTaskFile(baseRoot, candidate) {
|
|
407
|
+
const targetRoot = managedTaskRootForTarget(baseRoot, candidate);
|
|
399
408
|
if (!targetRoot) return false;
|
|
400
409
|
return Boolean(readUltraContext(targetRoot));
|
|
401
410
|
}
|
|
@@ -421,11 +430,13 @@ export const UltraBuilderProPlugin = async ({ directory, worktree }) => {
|
|
|
421
430
|
const tool = String(input?.tool ?? "").toLowerCase();
|
|
422
431
|
if (!["write", "edit", "apply_patch"].includes(tool)) return;
|
|
423
432
|
if (targetPaths(tool, output?.args).some(
|
|
424
|
-
(candidate) =>
|
|
433
|
+
(candidate) => protectsManagedTaskFile(root, candidate),
|
|
425
434
|
)) {
|
|
426
435
|
throw new Error(
|
|
427
|
-
"Ultra Builder Pro refused a direct write to .
|
|
428
|
-
".ultra
|
|
436
|
+
"Ultra Builder Pro refused a direct write to an MCP-managed task file. " +
|
|
437
|
+
".ultra/tasks/tasks.json is the MCP-published team checkpoint and " +
|
|
438
|
+
".ultra/.runtime/projections/tasks.json is the checkout-local DB view. " +
|
|
439
|
+
"Use the Ultra MCP task or task.ledger tools."
|
|
429
440
|
);
|
|
430
441
|
}
|
|
431
442
|
},
|