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
package/docs/AGENT-CONTEXT.md
CHANGED
|
@@ -25,50 +25,55 @@ not put it in a plugin until that allowlist classifies it.
|
|
|
25
25
|
## 2. Three-layer architecture
|
|
26
26
|
|
|
27
27
|
```text
|
|
28
|
-
native command or skill -> MCP
|
|
28
|
+
native command or skill -> 7-tool MCP safety kernel -> .ultra/.runtime/state.db
|
|
29
|
+
| \
|
|
30
|
+
| -> .ultra/tasks/tasks.json (Git checkpoint)
|
|
31
|
+
| -> .ultra/.runtime/projections/ (local views)
|
|
29
32
|
^
|
|
30
|
-
|
|
31
|
-
selected CLI init / doctor / diagnostics / orchestration
|
|
33
|
+
CLI diagnostics / orchestration
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
| Layer | Artifact | Contract |
|
|
35
37
|
|---|---|---|
|
|
36
38
|
| Skill/command | `skills/*/SKILL.md`, `commands/*.md` | Model-facing workflow and host-native entry point |
|
|
37
|
-
| MCP | `mcp-server/server.cjs` |
|
|
39
|
+
| MCP | `mcp-server/server.cjs` | Persistence, semantic checkpoints, team sync, leases, archive transactions, and mechanical recovery |
|
|
38
40
|
| CLI | `ultra-tools`, `ubp-orchestrator` | Selected initialization, backup-first recovery, automation, and diagnostics; not a change-state mirror |
|
|
39
41
|
|
|
40
42
|
`.ultra/` is project-local cross-session workflow memory for normalized intent,
|
|
41
43
|
progress, tasks, bounded context, specifications, evidence, provenance, and recovery.
|
|
42
|
-
`.ultra/.runtime/state.db` is
|
|
43
|
-
coordination authority for baselines, changes, decisions, tasks, workflow
|
|
44
|
-
sessions, events, incidents, projection jobs/cursors, telemetry, review
|
|
45
|
-
circuit-breaker state. Registered digest-bound specifications and
|
|
46
|
-
semantic or evidence bodies.
|
|
47
|
-
|
|
44
|
+
`.ultra/.runtime/state.db` is checkout-local lifecycle, index, transition, freshness,
|
|
45
|
+
and coordination authority for baselines, changes, decisions, tasks, workflow
|
|
46
|
+
runs/steps, sessions, events, incidents, projection jobs/cursors, telemetry, review
|
|
47
|
+
evidence, and circuit-breaker state. Registered digest-bound specifications and
|
|
48
|
+
reports carry semantic or evidence bodies. `.ultra/tasks/tasks.json` is the
|
|
49
|
+
MCP-published portable baseline/Change/task checkpoint; it is not live lease or session
|
|
50
|
+
authority. Generated task views, runtime checkpoints, and collaboration scratch are
|
|
51
|
+
not independent authority. See
|
|
48
52
|
[`ARTIFACT-AUTHORITY.md`](./ARTIFACT-AUTHORITY.md).
|
|
49
53
|
|
|
50
|
-
## 3.
|
|
54
|
+
## 3. Public MCP kernel and compatibility layer
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
nine families:
|
|
56
|
+
Every host discovers the same seven model-facing tools:
|
|
54
57
|
|
|
55
|
-
|
|
|
58
|
+
| Public tool | Contract |
|
|
56
59
|
|---|---|
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
60
|
+
| `ultra.context` | side-effect-free current authority and evidence spine |
|
|
61
|
+
| `ultra.record` | idempotent batch recording of typed draft facts and events |
|
|
62
|
+
| `ultra.checkpoint` | one semantic stage commit; rejection keeps the draft mutable |
|
|
63
|
+
| `ultra.sync` | Git team-checkpoint inspect/import/publish |
|
|
64
|
+
| `ultra.session` | transactional execution lease |
|
|
65
|
+
| `ultra.archive` | recoverable convergence and archive boundary |
|
|
66
|
+
| `ultra.doctor` | mechanical diagnosis and backup-first repair |
|
|
67
|
+
|
|
68
|
+
The public schemas stay below a 12KB discovery budget. The sixty 0.22 fine-grained
|
|
69
|
+
task/session/baseline/change/decision/workflow/artifact/system/plan tools remain
|
|
70
|
+
callable but undiscoverable for one compatibility release. They are implementation
|
|
71
|
+
operations, not a second public API, and Skills must not call them directly.
|
|
72
|
+
|
|
73
|
+
Semantic rejections return `accepted: false`, `mutable: true`, and diagnostics. Hard
|
|
74
|
+
MCP errors are reserved for corruption, unsafe paths, real concurrency conflicts,
|
|
75
|
+
permissions, or irreversible effects. Review, repository discovery, model reasoning,
|
|
76
|
+
and owner interaction remain host-native.
|
|
72
77
|
|
|
73
78
|
The complete write, transition, invalidation, and recovery contract lives in
|
|
74
79
|
[`WORKFLOW-LIFECYCLE.md`](./WORKFLOW-LIFECYCLE.md).
|
|
@@ -87,23 +92,20 @@ review, and deliver route back to the same thread instead of deciding for the ow
|
|
|
87
92
|
One partial unique index permits only one open item per thread. `decision.resolve`,
|
|
88
93
|
`decision.delegate`, and `decision.defer` preserve the source of authority;
|
|
89
94
|
`decision.supersede` preserves history when evidence or intent changes.
|
|
90
|
-
After normalization, the host
|
|
91
|
-
|
|
92
|
-
authority
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
material accepted cluster to current artifact digests when interruption recovery needs
|
|
97
|
-
that boundary. Status and breadcrumb return the current unresolved question, accepted
|
|
98
|
-
intent relevant to the active authority, and allowed or mechanically required
|
|
99
|
-
transitions, so recovery does not require replaying conversation history.
|
|
95
|
+
After normalization, the host records accepted intent in one `ultra.record` batch,
|
|
96
|
+
reads it back through `ultra.context`, and attempts an owning `ultra.checkpoint` only
|
|
97
|
+
when durable authority is ready. Active proposals are never recalled as accepted
|
|
98
|
+
intent. Status returns the current unresolved question, accepted intent, evidence,
|
|
99
|
+
warnings, and hard blockers so recovery does not require replaying conversation
|
|
100
|
+
history. The host model, not SQLite, recommends the next capability.
|
|
100
101
|
|
|
101
102
|
## 5. Context Spine contract
|
|
102
103
|
|
|
103
104
|
Context Manifest v3 is an immutable DB-backed role handoff, not a static codebase summary.
|
|
104
|
-
`
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
`ultra.checkpoint` compiles or reuses a content-addressed Context Manifest containing
|
|
106
|
+
required references, digests, readiness, context budget, public seam, exact verification
|
|
107
|
+
command, and Change/task authority digests for `plan`, `implement`, `check`, or
|
|
108
|
+
`review`. Compilation never updates
|
|
107
109
|
Change or provider authority; provider metadata changes through `change.update`.
|
|
108
110
|
Snapshots are selected exactly by `change_id`, nullable `task_id`, `role`, and `gate`,
|
|
109
111
|
so a review packet cannot satisfy implementation or planning evidence.
|
|
@@ -121,9 +123,9 @@ not block work or require raising a threshold. Prefer direct reads, bounded
|
|
|
121
123
|
excerpts, or a smaller slice when they preserve correctness, and retain all
|
|
122
124
|
necessary context when they do not.
|
|
123
125
|
|
|
124
|
-
|
|
125
|
-
role, gate, readiness, blockers, bounded normalized accepted intent
|
|
126
|
-
|
|
126
|
+
The compact breadcrumb is a hook-only compatibility reader. Hooks may inject its
|
|
127
|
+
change/task, role, gate, readiness, blockers, and bounded normalized accepted intent.
|
|
128
|
+
They must not inject raw prompts,
|
|
127
129
|
interaction transcripts, external-memory payloads, or graph payloads. Missing references,
|
|
128
130
|
required digest drift, HEAD drift, or a missing execution seam blocks readiness. Context
|
|
129
131
|
size and baseline drift are advisory for a change that is already active. New ordinary
|
|
@@ -172,15 +174,16 @@ the shared read-only `context_spine.py` breadcrumb helper:
|
|
|
172
174
|
and types, never transcript paths or messages.
|
|
173
175
|
|
|
174
176
|
`workflow_context.py`, `active_task_context.py`, `workflow_resume.py`, and the
|
|
175
|
-
OpenCode plugin invoke the same bundled JavaScript
|
|
177
|
+
OpenCode plugin invoke the same bundled JavaScript hook-only breadcrumb reader
|
|
176
178
|
through the thin `context_spine.py` bridge. No hook reimplements the state query.
|
|
177
179
|
`health_check.py` and
|
|
178
180
|
`workflow_context.py` may inspect any initialized project;
|
|
179
|
-
`active_task_context.py`
|
|
181
|
+
`active_task_context.py` protects both the MCP-owned Git checkpoint and local task
|
|
182
|
+
projection but limits ordinary
|
|
180
183
|
edit guidance to an active workflow. Compact/stop/subagent hooks remain
|
|
181
184
|
active-workflow scoped. OpenCode natively injects baseline/change context and
|
|
182
|
-
protects
|
|
183
|
-
`
|
|
185
|
+
protects both managed task paths; full health inspection is available through
|
|
186
|
+
`ultra.doctor` rather than a session-start health hook.
|
|
184
187
|
Advisory baseline or context-budget warnings are presentation only and never
|
|
185
188
|
reject an edit, stop, or tool call.
|
|
186
189
|
Generic command blocking, post-edit governance, and unrelated user hooks are not
|
|
@@ -213,14 +216,18 @@ sessions never call it, and it cannot collect, recall, or reflect memory.
|
|
|
213
216
|
.ultra/
|
|
214
217
|
├── .runtime/
|
|
215
218
|
│ ├── state.db # authoritative SQLite lifecycle/index store
|
|
216
|
-
│
|
|
219
|
+
│ ├── checkpoint.json # advisory breadcrumb recovery projection
|
|
220
|
+
│ └── projections/ # generated checkout-local task views
|
|
217
221
|
├── changes/
|
|
218
222
|
│ ├── active/<id>/ # all Change semantics and evidence
|
|
219
223
|
│ │ ├── intent.md, findings.md, progress.md
|
|
220
224
|
│ │ ├── research/, delta/, documentation/, plan.json, plan.md
|
|
221
225
|
│ │ └── contexts/, test/, review/, delivery/
|
|
222
226
|
│ └── archive/ # converged packets after baseline reconciliation
|
|
223
|
-
├── tasks/
|
|
227
|
+
├── tasks/
|
|
228
|
+
│ └── tasks.json # MCP-published Git team checkpoint
|
|
229
|
+
├── templates/
|
|
230
|
+
│ └── task-context.md # authored task-context template
|
|
224
231
|
├── specs/ # research/product/architecture artifacts
|
|
225
232
|
└── reports/templates/ # blank report schemas; never evidence
|
|
226
233
|
```
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
`ultra-builder-pro-cli` is a multi-runtime plugin suite that **distributes** the
|
|
10
10
|
Ultra Builder Pro engineering loop (skills + commands + workflow hooks) as
|
|
11
11
|
native Claude Code, OpenCode, Codex, and Kimi Code plugins, and
|
|
12
|
-
**runs** that loop with isolated sessions sharing
|
|
13
|
-
|
|
12
|
+
**runs** that loop with isolated sessions sharing checkout-local operational
|
|
13
|
+
authority (`.ultra/.runtime/state.db`) plus one MCP-published Git team checkpoint
|
|
14
|
+
(`.ultra/tasks/tasks.json`).
|
|
14
15
|
|
|
15
16
|
It is not an agent or a general conversational-memory provider. It is the workflow
|
|
16
17
|
substrate the supported hosts share, including project-local cross-session workflow
|
|
@@ -42,24 +43,26 @@ memory under `.ultra/`.
|
|
|
42
43
|
│ .ultra/.runtime/state.db │
|
|
43
44
|
│ (SQLite + WAL) │ ← lifecycle + index authority
|
|
44
45
|
└──────────┬──────────┘
|
|
45
|
-
│
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
│
|
|
47
|
+
┌─────────┴──────────┐
|
|
48
|
+
│ │
|
|
49
|
+
▼ ▼
|
|
50
|
+
.ultra/.runtime/projections/ .ultra/tasks/tasks.json
|
|
51
|
+
(local generated views) (Git team checkpoint:
|
|
52
|
+
baseline + Changes + tasks)
|
|
50
53
|
```
|
|
51
54
|
|
|
52
55
|
| Layer | Role | Form |
|
|
53
56
|
|--------------|----------------------------------------------|-------------------------------------------------------|
|
|
54
57
|
| **skill** | knowledge carrier; tells the runtime *what to do* | `skills/<name>/SKILL.md` discovered natively by all supported runtimes |
|
|
55
|
-
| **MCP** |
|
|
58
|
+
| **MCP** | persistence and safety kernel for checkpoints, evidence, sync, leases, archive, and recovery | stdio MCP server exposing seven public `ultra.*` tools; sixty 0.22 fine-grained operations remain hidden for one compatibility release |
|
|
56
59
|
| **CLI** | explicit initialization, recovery, diagnostics, and orchestration | `ultra-tools` / `ubp-orchestrator`; only commands listed by `--help` are executable (see [`spec/cli-protocol.md`](../spec/cli-protocol.md)) |
|
|
57
60
|
|
|
58
|
-
Why three: skills
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
Why three: skills preserve adaptable model behavior across runtimes; MCP gives durable
|
|
62
|
+
checkpoint and safety primitives without supervising every reasoning step; the CLI
|
|
63
|
+
supplies bounded maintenance and recovery when MCP cannot start. Semantic draft
|
|
64
|
+
diagnostics are report-first. Corruption, unsafe paths, real concurrency, permissions,
|
|
65
|
+
and irreversible effects remain fail-closed.
|
|
63
66
|
|
|
64
67
|
The skill layer is **read-only by design** (D29) and is discovered directly by
|
|
65
68
|
each host. Ultra exposes no `skill.*` MCP family: skills are documentation, not
|
|
@@ -69,11 +72,14 @@ RPC, and host-native loaders own resolution and invocation.
|
|
|
69
72
|
|
|
70
73
|
Together, `.ultra/` retains project-local cross-session workflow memory:
|
|
71
74
|
normalized intent, progress, tasks, bounded context, specifications, evidence,
|
|
72
|
-
provenance, and recovery. `.ultra/.runtime/state.db` is
|
|
73
|
-
indexing, transitions, freshness, and coordination
|
|
74
|
-
carry semantic and evidence bodies.
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
provenance, and recovery. `.ultra/.runtime/state.db` is operational authority for
|
|
76
|
+
lifecycle, indexing, transitions, freshness, and coordination in one checkout.
|
|
77
|
+
Registered digest-bound files carry semantic and evidence bodies.
|
|
78
|
+
`.ultra/tasks/tasks.json` is a portable, digest-chained Git handoff for baseline,
|
|
79
|
+
Change, and durable task records; it never owns sessions, leases, or live
|
|
80
|
+
`in_progress` state. Generated projections and working scratch do not become
|
|
81
|
+
authority merely because they live under `.ultra/`. The complete classification and
|
|
82
|
+
promotion contract is
|
|
77
83
|
[`ARTIFACT-AUTHORITY.md`](./ARTIFACT-AUTHORITY.md).
|
|
78
84
|
|
|
79
85
|
All durable Ultra lifecycle and index state lives in one SQLite file with WAL enabled.
|
|
@@ -109,9 +115,11 @@ Two rules make this work:
|
|
|
109
115
|
|
|
110
116
|
1. **No double source (D32).** lease/heartbeat live only in `sessions`,
|
|
111
117
|
not in a `lease.json` file. Activity log lives only in `events`, not
|
|
112
|
-
in JSON files.
|
|
113
|
-
`contexts/task-*.md` files are
|
|
114
|
-
manual edits are overwritten on the next state.db change.
|
|
118
|
+
in JSON files. `.ultra/.runtime/projections/tasks.json` and its complete
|
|
119
|
+
`contexts/task-*.md` files are local projections generated by the projector;
|
|
120
|
+
manual edits are overwritten on the next state.db change. The tracked
|
|
121
|
+
`.ultra/tasks/tasks.json` is a different surface: only MCP publishes or imports
|
|
122
|
+
this versioned team checkpoint, and digest validation rejects manual edits.
|
|
115
123
|
|
|
116
124
|
2. **Single writer for mutable tables, multi-writer for `events`.**
|
|
117
125
|
`.ultra/.runtime/state.db` opens in WAL with `busy_timeout=5000`. The MCP
|
|
@@ -214,15 +222,11 @@ current question per thread. The host ends that turn and waits.
|
|
|
214
222
|
|
|
215
223
|
The next response becomes a normalized owner decision, explicit reversible delegation,
|
|
216
224
|
or consequence-bearing deferral. Prompts and transcripts are never persisted. The host
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
boundary moves through prepare/confirm checkpointing. Matching workflow steps fail
|
|
223
|
-
closed while a blocking question, blocking deferral, prepared checkpoint, or stale
|
|
224
|
-
checkpoint artifact remains. Supersession preserves prior history and reopens alignment
|
|
225
|
-
instead of silently editing an old decision. The shared procedure lives in
|
|
225
|
+
batches the normalized result and owning mutation through `ultra.record`, reads it back
|
|
226
|
+
through `ultra.context`, and attempts a semantic checkpoint only when durable authority
|
|
227
|
+
is ready. Failed semantic checks leave the draft editable. Accepted revisions remain
|
|
228
|
+
immutable; a changed decision opens a replacement draft while preserving history. The
|
|
229
|
+
shared procedure lives in
|
|
226
230
|
`skills/ultra-think/references/decision-dialogue.md`; status, breadcrumb, and doctor expose
|
|
227
231
|
only the current recovery surface.
|
|
228
232
|
|
|
@@ -254,9 +258,10 @@ consumer trace. Standard and major convergence requires both current authorities
|
|
|
254
258
|
only after all writes and baseline reconciliation succeed does it rebind the complete
|
|
255
259
|
Change root into the archive.
|
|
256
260
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
261
|
+
Draft revisions remain editable and recoverable. A failed checkpoint can be repaired
|
|
262
|
+
and retried in place or intentionally abandoned. Accepted runs are immutable; a later
|
|
263
|
+
candidate supersedes them only after its own accepted checkpoint, and the artifact graph
|
|
264
|
+
invalidates only true transitive consumers.
|
|
260
265
|
|
|
261
266
|
### Context Spine
|
|
262
267
|
|
|
@@ -269,25 +274,24 @@ implementation, checking, review, convergence, and recovery. Each snapshot recor
|
|
|
269
274
|
execution contract;
|
|
270
275
|
- advisory attention budgets (12 files / about 12k tokens / 40% by default);
|
|
271
276
|
- a DB-derived execution contract (`slice_kind`, public seam, exact verification command);
|
|
272
|
-
-
|
|
273
|
-
hard invariant leaves one recovery route;
|
|
277
|
+
- warnings and hard mechanical blockers without a semantic next-action command;
|
|
274
278
|
- a digest of the accepted Change authority so semantic updates invalidate the
|
|
275
279
|
snapshot.
|
|
276
280
|
|
|
277
|
-
|
|
281
|
+
Checkpoint input may identify the intended role/gate, add bounded reference candidates,
|
|
278
282
|
and lower advisory budgets. It cannot supply or override the task seam, verification
|
|
279
283
|
command, task context references, evidence digest, gate verdict, workflow summary, or
|
|
280
284
|
machine transitions. A host may attach a clearly non-authoritative recommendation.
|
|
281
285
|
Critical dev/test/review/deliver workflow steps record the matching
|
|
282
286
|
snapshot as an output; test, review, and delivery reports carry its digest forward.
|
|
283
287
|
|
|
284
|
-
|
|
288
|
+
The hook-only breadcrumb derives the compact current position from state.db. Session,
|
|
285
289
|
edit, resume, and OpenCode lifecycle hooks invoke one bundled read-only reader
|
|
286
290
|
and inject it only while state.db proves an active, blocked, or ready workflow,
|
|
287
291
|
never the intent body,
|
|
288
292
|
provider content, or a conversation summary. A changed Git HEAD, task contract, or
|
|
289
|
-
Change semantic authority marks the snapshot stale and permits
|
|
290
|
-
`
|
|
293
|
+
Change semantic authority marks the snapshot stale and permits content-addressed
|
|
294
|
+
recompilation through the next `ultra.checkpoint`.
|
|
291
295
|
|
|
292
296
|
PRD decomposition and complex-task subdivision use the active host model. The
|
|
293
297
|
MCP accepts the resulting structured tasks, validates schema, topology,
|
|
@@ -297,9 +301,9 @@ model API credential.
|
|
|
297
301
|
|
|
298
302
|
Plugin installation does not activate a semantic workflow and never edits the
|
|
299
303
|
user's `CLAUDE.md`, `AGENTS.md`, or equivalent durable instructions. Public
|
|
300
|
-
workflows require explicit user invocation.
|
|
301
|
-
|
|
302
|
-
|
|
304
|
+
workflows require explicit user invocation. The host reads `ultra.context`, recommends
|
|
305
|
+
the next capability from evidence and owner intent, then stops; SQLite never launches
|
|
306
|
+
or semantically selects the next public workflow. OpenCode realizes this boundary
|
|
303
307
|
with explicit commands backed by private plugin workflow assets, while Claude,
|
|
304
308
|
Codex, and Kimi use their native implicit-invocation controls.
|
|
305
309
|
|
|
@@ -324,14 +328,40 @@ evidence, and final convergence decision.
|
|
|
324
328
|
|
|
325
329
|
Mutating MCP calls enqueue durable `projection_jobs`. Success is exposed in MCP
|
|
326
330
|
response metadata; failure becomes a retryable structured incident instead of a
|
|
327
|
-
swallowed warning.
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
331
|
+
swallowed warning. These jobs regenerate only checkout-local views below
|
|
332
|
+
`.ultra/.runtime/projections/`; they never rewrite the Git team checkpoint. Durable
|
|
333
|
+
semantic checkpoints publish team state at baseline, Change, plan, and task handoff
|
|
334
|
+
boundaries. `ultra.doctor` is read-only by default. Explicit repair
|
|
335
|
+
performs backup-first schema upgrade, archive-journal recovery, session and local
|
|
336
|
+
projection recovery, and regenerated local views. It cannot import or publish semantic
|
|
337
|
+
team state, approve a baseline, or replace a corrupt SQLite file silently. `system
|
|
338
|
+
restore` accepts only a verified SQLite backup inside `.ultra/.runtime/backups`,
|
|
339
|
+
quarantines the corrupt authority, and rolls back on failure.
|
|
332
340
|
When no valid backup exists, confirmed `system rebaseline` preserves both corrupt
|
|
333
341
|
authority and the legacy task projection before creating a new brownfield adoption.
|
|
334
342
|
|
|
343
|
+
### Git team checkpoint and checkout merge
|
|
344
|
+
|
|
345
|
+
`ultra.sync { action: publish }` serializes the current portable baseline, all Change
|
|
346
|
+
summaries, and durable task contracts to `.ultra/tasks/tasks.json`. Per-record digests and
|
|
347
|
+
revisions make independent fast-forward possible; the document state digest, parent
|
|
348
|
+
digest, and bounded ancestor list reject stale or unrelated histories. Local process
|
|
349
|
+
ownership fields are deliberately absent.
|
|
350
|
+
|
|
351
|
+
The MCP server imports the checkpoint once when it opens project authority. A
|
|
352
|
+
long-running host explicitly calls `ultra.sync { action: import }` after receiving a newer Git
|
|
353
|
+
version. Import is transactional: it validates every record first, preserves local-only
|
|
354
|
+
fields, fast-forwards clean records, and rejects same-record concurrency or an active
|
|
355
|
+
task collision. Re-reading an already imported checkpoint performs no write. A ready
|
|
356
|
+
baseline is never trusted from Git alone; import creates a local revalidation gap and
|
|
357
|
+
clears checkout-specific approval until current scope bytes, HEAD, and verification
|
|
358
|
+
converge.
|
|
359
|
+
|
|
360
|
+
Baseline freshness hashes scoped application content independently of Git staging and
|
|
361
|
+
excludes `.ultra/`, then checks commit ancestry. This removes the metadata treadmill:
|
|
362
|
+
committing a checkpoint or another Ultra artifact advances HEAD without staling the
|
|
363
|
+
baseline, while changing scoped application bytes still does.
|
|
364
|
+
|
|
335
365
|
## 5. Sessions — the execution unit
|
|
336
366
|
|
|
337
367
|
A **session** is the standard unit of execution across all four runtimes
|
|
@@ -417,7 +447,7 @@ repository commit.
|
|
|
417
447
|
`ubp --all --global --doctor [--json]` is read-only: it recomputes hashes and
|
|
418
448
|
validates those entry points, returning a non-zero degraded result for
|
|
419
449
|
missing/corrupt provenance, content drift, or broken host wiring. A single host
|
|
420
|
-
can be selected instead of `--all`. This is separate from `
|
|
450
|
+
can be selected instead of `--all`. This is separate from `ultra.doctor`, which
|
|
421
451
|
diagnoses project state, projection, incidents, sessions, and backup-first
|
|
422
452
|
workflow recovery.
|
|
423
453
|
|
|
@@ -456,7 +486,8 @@ shippable; downstream slip never blocks an earlier release.
|
|
|
456
486
|
| What does each MCP tool accept and return? | [`spec/mcp-tools.yaml`](../spec/mcp-tools.yaml) |
|
|
457
487
|
| How do CLI subcommands map to MCP tools? | [`spec/cli-protocol.md`](../spec/cli-protocol.md) |
|
|
458
488
|
| Exact SQLite schema? | [`spec/schemas/state-db.sql`](../spec/schemas/state-db.sql) |
|
|
459
|
-
| What does
|
|
489
|
+
| What does the Git team checkpoint look like? | [`spec/schemas/task-ledger.v1.schema.json`](../spec/schemas/task-ledger.v1.schema.json) |
|
|
490
|
+
| What does the local task projection look like? | [`spec/fixtures/valid/tasks.v4.5.json`](../spec/fixtures/valid/tasks.v4.5.json) |
|
|
460
491
|
| Current authority and package decisions | [`docs/DECISIONS.md`](./DECISIONS.md) |
|
|
461
492
|
| When does each workflow write, invalidate, and converge state? | [`docs/WORKFLOW-LIFECYCLE.md`](./WORKFLOW-LIFECYCLE.md) |
|
|
462
493
|
|
|
@@ -469,8 +500,8 @@ Every contract on this page is enforced by `npm run test:spec`:
|
|
|
469
500
|
- `validate-state-db.cjs` — schema applies cleanly to a fresh in-memory
|
|
470
501
|
SQLite, valid fixtures insert, invalid fixtures are rejected by
|
|
471
502
|
CHECK / NOT NULL / FK constraints.
|
|
472
|
-
- `validate-json-schemas.cjs` —
|
|
473
|
-
`contexts/task-*.md`.
|
|
503
|
+
- `validate-json-schemas.cjs` — the team-checkpoint schema plus local projection
|
|
504
|
+
schemas for `tasks.json` and `contexts/task-*.md`.
|
|
474
505
|
- `validate-skills.cjs` — every existing skill passes the manifest
|
|
475
506
|
contract; failures are recorded in `spec/migration-notes.md`.
|
|
476
507
|
- `check-cli-mapping.cjs` — every MCP tool has exactly one CLI
|