ultra-builder-pro-cli 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/.ultra-template/docs/research/README.md +4 -4
  2. package/CHANGELOG.md +83 -0
  3. package/README.md +68 -35
  4. package/adapters/_shared/codex-assets.cjs +121 -60
  5. package/adapters/_shared/interaction-contract.cjs +20 -7
  6. package/adapters/_shared/provenance.cjs +7 -2
  7. package/adapters/_shared/runtime-assets.cjs +4 -3
  8. package/adapters/_shared/runtime-native.cjs +132 -0
  9. package/adapters/claude.js +61 -31
  10. package/adapters/codex.js +178 -81
  11. package/adapters/grok.js +372 -0
  12. package/adapters/kimi.js +8 -4
  13. package/adapters/opencode.js +211 -33
  14. package/agents/code-reviewer.md +4 -2
  15. package/agents/debugger.md +4 -1
  16. package/agents/review-code.md +7 -3
  17. package/agents/review-comments.md +7 -4
  18. package/agents/review-coordinator.md +11 -7
  19. package/agents/review-design.md +8 -4
  20. package/agents/review-errors.md +8 -4
  21. package/agents/review-spec.md +8 -5
  22. package/agents/review-tests.md +7 -4
  23. package/agents/tdd-runner.md +5 -2
  24. package/bin/install.js +9 -4
  25. package/bin/orchestrator.js +4 -13
  26. package/docs/AGENT-CONTEXT.md +141 -231
  27. package/docs/ARCHITECTURE.md +203 -498
  28. package/docs/ARTIFACT-AUTHORITY.md +38 -35
  29. package/docs/PLUGIN-ISOLATION-CONTRACT.md +12 -9
  30. package/docs/ROADMAP.md +85 -110
  31. package/docs/RUNTIME-COMPAT-MATRIX.md +139 -174
  32. package/docs/SKILL-AUTHORING.md +3 -3
  33. package/docs/STATE-DB-ACCESS-POLICY.md +25 -20
  34. package/docs/WORKFLOW-LIFECYCLE.md +174 -442
  35. package/hooks/README.md +11 -8
  36. package/hooks/active_task_context.py +16 -16
  37. package/hooks/adapters/grok.py +134 -0
  38. package/hooks/{context_spine.py → context_envelope.py} +26 -22
  39. package/hooks/health_check.py +19 -29
  40. package/hooks/pre_stop_check.py +22 -12
  41. package/hooks/subagent_tracker.py +1 -1
  42. package/hooks/workflow_checkpoint.py +14 -13
  43. package/hooks/workflow_context.py +11 -12
  44. package/hooks/workflow_resume.py +14 -13
  45. package/mcp-server/{breadcrumb.cjs → hook-context.cjs} +7 -9
  46. package/mcp-server/lib/artifact-registry.cjs +25 -1
  47. package/mcp-server/lib/baseline-workflow.cjs +36 -38
  48. package/mcp-server/lib/canonical-json.cjs +19 -0
  49. package/mcp-server/lib/change-workflow.cjs +637 -49
  50. package/mcp-server/lib/context-envelope.cjs +508 -0
  51. package/mcp-server/lib/decision-records.cjs +337 -0
  52. package/mcp-server/lib/doctor.cjs +91 -33
  53. package/mcp-server/lib/init-project.cjs +78 -39
  54. package/mcp-server/lib/managed-file-write.cjs +116 -0
  55. package/mcp-server/lib/plan-checkpoint.cjs +177 -0
  56. package/mcp-server/lib/project-context.cjs +178 -0
  57. package/mcp-server/lib/stage-checkpoints.cjs +309 -0
  58. package/mcp-server/lib/state-db.cjs +155 -24
  59. package/mcp-server/lib/task-ledger.cjs +522 -13
  60. package/mcp-server/lib/ultra-facade.cjs +834 -0
  61. package/mcp-server/lib/worker-packet.cjs +358 -0
  62. package/mcp-server/server.cjs +208 -1059
  63. package/orchestrator/daemon.cjs +27 -9
  64. package/orchestrator/parallel-orchestrator.cjs +111 -76
  65. package/orchestrator/session-runner.cjs +135 -34
  66. package/package.json +10 -3
  67. package/skills/ultra-change/SKILL.md +39 -98
  68. package/skills/ultra-deliver/SKILL.md +42 -65
  69. package/skills/ultra-dev/SKILL.md +52 -99
  70. package/skills/ultra-doctor/SKILL.md +35 -57
  71. package/skills/ultra-init/SKILL.md +48 -88
  72. package/skills/ultra-init/references/brownfield-adoption.md +11 -8
  73. package/skills/ultra-plan/SKILL.md +54 -132
  74. package/skills/ultra-research/SKILL.md +58 -112
  75. package/skills/ultra-review/SKILL.md +28 -46
  76. package/skills/ultra-review/references/unified-schema.md +2 -0
  77. package/skills/ultra-review/scripts/review_wait.py +8 -0
  78. package/skills/ultra-status/SKILL.md +22 -45
  79. package/skills/ultra-test/SKILL.md +27 -61
  80. package/skills/ultra-think/SKILL.md +29 -48
  81. package/skills/ultra-think/references/interaction-boundary.md +56 -0
  82. package/spec/cli-protocol.md +80 -187
  83. package/spec/mcp-tools.yaml +130 -2738
  84. package/spec/schemas/mcp-tools.schema.json +1 -1
  85. package/spec/schemas/state-db.sql +107 -4
  86. package/spec/schemas/{task-ledger.v1.schema.json → task-ledger.v2.schema.json} +70 -6
  87. package/ultra-tools/commands/status.cjs +369 -243
  88. package/mcp-server/lib/context-spine.cjs +0 -1208
  89. package/mcp-server/lib/decision-dialogue.cjs +0 -1128
  90. package/mcp-server/lib/project-breadcrumb.cjs +0 -173
  91. package/mcp-server/lib/spec-learning.cjs +0 -284
  92. package/mcp-server/lib/workflow-state.cjs +0 -2965
  93. package/skills/ultra-think/references/decision-dialogue.md +0 -153
@@ -16,16 +16,16 @@ Semantic and evidence artifacts under `.ultra/` are trackable so reviewed intent
16
16
  verification can travel with the repository. `.ultra/.runtime/` is always ignored:
17
17
  the SQLite authority, leases, worktrees, local telemetry, and recovery snapshots remain
18
18
  checkout-local. `.ultra/tasks/tasks.json` is the narrow MCP-owned Git handoff for
19
- portable baseline, Change, and durable task records; it is not a copy of live runtime
20
- state.
19
+ portable baseline, Change, Decision, accepted Stage Checkpoint, and durable Task
20
+ records; it is not a copy of live runtime state.
21
21
 
22
22
  ## Artifact classes
23
23
 
24
24
  | Class | Examples | Authority |
25
25
  |---|---|---|
26
- | Checkout-local lifecycle and index | `.ultra/.runtime/state.db` | Operational authority for identifiers, normalized accepted intent, status, legal transitions, references, digests, freshness, provenance, locks, leases, transactions, recovery, and coordination in one checkout |
27
- | Git team checkpoint | `.ultra/tasks/tasks.json` | MCP-published, digest-chained handoff of portable baseline, Change, task-contract, dependency, and durable status records; never live session or lease authority |
28
- | Digest-bound semantic artifacts | specifications, research reports, Change intent/delta/plan, context manifests | Authoritative semantic bodies only while registered by the owning DB row or workflow step and matching its recorded digest |
26
+ | Checkout-local persistence and safety | `.ultra/.runtime/state.db` | Operational authority for identifiers, normalized accepted intent, accepted Stage Checkpoints, references, digests, freshness, provenance, locks, leases, transactions, recovery, and coordination in one checkout; never semantic route selection |
27
+ | Git team checkpoint | `.ultra/tasks/tasks.json` | MCP-published, digest-chained handoff of portable baseline, Change, Decision summary/reference, accepted Stage Checkpoint, Task contract, dependency, and durable outcome records; never live Session or lease authority |
28
+ | Digest-bound semantic artifacts | specifications, research reports, Change intent/delta/plan, Context Envelopes, Decision Records | Authoritative semantic bodies only while registered by the owning record or Stage Checkpoint and matching its recorded digest |
29
29
  | Digest-bound evidence artifacts | test, review, delivery, and verification reports | Authoritative evidence bodies only while registered, immutable where required, and matching the recorded digest and scope |
30
30
  | Generated projections | `.ultra/.runtime/projections/tasks.json`, generated task contexts, activity exports | Checkout-local read-only views derived from DB authority; manual edits are overwritten and never become authority |
31
31
  | Advisory recovery | `.ultra/.runtime/checkpoint.json` | Compact recovery hint derived from DB authority; stale or missing content never overrides the DB |
@@ -43,8 +43,8 @@ these surfaces independently owns all three roles.
43
43
  | Actor | Responsible for | Must not do |
44
44
  |---|---|---|
45
45
  | Owner | Goals, acceptance, non-goals, material choices, risk acceptance, and authorization for irreversible or external effects | Supply facts the checkout or runtime can establish directly |
46
- | Host model | Inspect evidence, recommend a route, ask only for unresolved owner choices, normalize the answer, call the owning write, update semantic artifacts, read back the result, and present the next recommendation | Fabricate evidence, infer owner authorization, or bypass legal transitions |
47
- | Ultra MCP | Persist normalized inputs, validate structure and current digests, record lifecycle and provenance, enforce legal transitions, project local views, publish/import the Git checkpoint, and expose recovery | Choose product direction, prove a UI click, force a semantic route, or replace model judgment |
46
+ | Host model | Inspect evidence, recommend a route, ask only for unresolved owner choices, normalize the answer, call the owning write, update semantic artifacts, read back the result, and present the next recommendation | Fabricate evidence, infer owner authorization, or bypass mechanical safety |
47
+ | Ultra MCP | Persist normalized inputs, validate structure and current digests, record facts and provenance, commit Stage Checkpoints, project local views, publish/import the Git checkpoint, and expose recovery | Choose product direction, prove a UI click, pre-authorize reasoning steps, force a semantic route, or replace model judgment |
48
48
  | Host adapter | Render the shared interaction contract through the host-native question and tool surfaces | Become a second workflow authority |
49
49
  | Hook | Observe lifecycle, inject compact DB-derived recovery context, and protect MCP-owned checkpoint and generated projection paths | Select a semantic route or block ordinary development |
50
50
 
@@ -59,14 +59,12 @@ inspect -> suggest -> host-native ask -> normalize -> persist -> apply -> read b
59
59
  The host-native ask is conditional. An explicit owner instruction can already resolve
60
60
  a choice, so the model must not ask
61
61
  again merely to manufacture proof. When interaction is needed, the adapter uses the
62
- host-native question surface. Once the model writes the normalized result through
63
- `decision.resolve`, `decision.delegate`, or `decision.defer`, the DB treats that result
64
- as current cross-session intent authority. It does not store or verify a UI receipt,
65
- raw prompt, or transcript.
62
+ host-native question surface. Once the model batches the normalized result through
63
+ `ultra.record`, the DB treats that result as current cross-session intent authority. It
64
+ does not store or verify a UI receipt, raw prompt, or transcript.
66
65
 
67
66
  If the accepted decision changes another Ultra authority, the model applies that change
68
- through its owning MCP tool or digest-bound artifact, reads the result back, and passes
69
- typed `applied_refs` to `decision.complete`. A decision whose normalized record is
67
+ through `ultra.record` or a digest-bound artifact and reads the result back. A decision whose normalized record is
70
68
  itself the complete authority may have no applied reference. Breadcrumb and decision
71
69
  read paths recall accepted intent only after the dialogue thread is completed or
72
70
  confirmed. A row-backed applied reference names an exact field and canonical value,
@@ -77,16 +75,16 @@ the exact file digest. Row existence alone never proves that intent was applied.
77
75
 
78
76
  Working material becomes durable only when all applicable conditions hold:
79
77
 
80
- 1. the active workflow permits the write;
78
+ 1. the current Change and owner authority permit the write;
81
79
  2. consequential claims are verified against the checkout, runtime, test result, or
82
80
  primary source;
83
81
  3. the model writes through the owning MCP operation or immutable artifact path;
84
- 4. the DB records the owning baseline, change, workflow, task, or artifact reference;
82
+ 4. the DB records the owning baseline, Change, Stage Checkpoint, Task, Decision, or artifact reference;
85
83
  5. content-bearing files match the recorded SHA-256 digest and scope;
86
84
  6. the model reads back the resulting state before reporting completion.
87
85
 
88
86
  The durable evidence trail may include normalized decisions, delegation source,
89
- durable effects, typed applied references, workflow-step evidence, artifact hashes,
87
+ durable effects, typed applied references, Stage Checkpoint evidence, artifact hashes,
90
88
  verification commands and results, provenance, events, and recovery state. It must not
91
89
  include chain-of-thought, UI-click proof, raw prompts, or conversation transcripts.
92
90
 
@@ -97,7 +95,7 @@ directory is not promotion.
97
95
  ## Change overlay authority
98
96
 
99
97
  An active Change is an isolated overlay below
100
- `.ultra/changes/active/<change-id>/`. Its intent, adaptive research, `findings.md`,
98
+ `.ultra/changes/active/<change-id>/`. Its intent, normalized decisions, adaptive research,
101
99
  typed delta payloads, plan, contexts, documentation payloads, progress projection,
102
100
  test reports, review artifacts, and delivery evidence remain below that root. Change
103
101
  research never edits baseline specifications.
@@ -122,11 +120,12 @@ as delivered.
122
120
 
123
121
  ## Context and plan authority
124
122
 
125
- `change.context` is a pure compiler. It reads accepted Change, task, baseline, checkout,
126
- and provider-reference authority and writes one immutable manifest plus its DB snapshot
127
- row. It never updates provider references or semantic Change fields. Each snapshot is
128
- identified exactly by `change_id`, nullable `task_id`, `role`, and `gate`; consumers
129
- must not substitute a newer snapshot from a different tuple.
123
+ The canonical Context Envelope generator reads accepted Change, Task, baseline,
124
+ Decision, checkout, evidence, execution, and provider-reference authority and writes
125
+ one immutable manifest plus its DB snapshot row when persistence is requested. It
126
+ never updates provider references or semantic Change fields. Each snapshot is
127
+ identified by its exact scope, stage, content digest, and selected execution seam;
128
+ consumers must not substitute a snapshot from another scope.
130
129
 
131
130
  Context refs preserve `expected_digest`, `anchor`, `scope`, and `freshness_policy`.
132
131
  Digest-bound refs are revalidated at the consuming gate, existence-bound implementation
@@ -141,8 +140,8 @@ A current plan is a Change-owned pair:
141
140
  - `<artifact_root>/plan.md` is the deterministic human projection of the same plan and
142
141
  task contracts.
143
142
 
144
- `plan.export` selects both paths from the owning Change and accepts no arbitrary output
145
- path. `verify-plan` binds the JSON digest and the preceding `plan/planning` snapshot;
143
+ The Plan checkpoint selects both paths from the owning Change and accepts no arbitrary
144
+ output path. It binds the JSON digest and the preceding `plan/planning` snapshot;
146
145
  the artifact registry records both plan files with that context provenance. Publication
147
146
  preflights both path authorities and prior digests, rejects symlinked ancestors or
148
147
  targets, and journals the two file replacements so a registry or event failure restores
@@ -152,8 +151,8 @@ never current write or dispatch authority.
152
151
 
153
152
  ## Registry contract
154
153
 
155
- `artifact.record` is the public writer for a semantic or evidence file that is not
156
- already registered by its owning workflow operation. Every managed registry row has:
154
+ `ultra.record` is the public writer for a semantic or evidence file that is not
155
+ already registered by its owning typed record or Stage Checkpoint. Every managed registry row has:
157
156
 
158
157
  - a typed `owner_type` and `owner_id`;
159
158
  - an artifact `kind`, project-relative `path`, lifecycle `status`, and SHA-256
@@ -166,7 +165,7 @@ already registered by its owning workflow operation. Every managed registry row
166
165
  The write replaces all edges for the artifact in one immediate SQLite transaction.
167
166
  It never accumulates stale edges with `INSERT OR IGNORE`. If an existing digest
168
167
  changes, the same transaction emits `spec_changed`, marks only reachable artifact
169
- and task consumers stale through typed artifact/task/workflow/change intermediates,
168
+ and Task consumers stale through typed artifact, Task, checkpoint, and Change intermediates,
170
169
  and records the exact invalidated endpoints. Self-edges and dependency cycles are
171
170
  rejected without changing prior authority. A caller can provide
172
171
  `expected_before_digest`; a mismatch fails without changing the row or its edges.
@@ -178,19 +177,19 @@ all owners and kinds. Runtime, scratch, the MCP-owned team checkpoint, and gener
178
177
  task contexts cannot be promoted through this API.
179
178
 
180
179
  Owning internal writers use the same transaction contract. Change intent, delta and
181
- documentation packets, contexts, adaptive research, findings, incident diagnosis,
180
+ documentation packets, Context Envelopes, adaptive research, incident diagnosis,
182
181
  plan, test, review, delivery, archive reconciliation, and specification learning
183
182
  cannot update a managed digest or provenance through a parallel SQL path.
184
183
 
185
184
  Rows migrated from pre-20 schemas remain readable and preserve their original IDs,
186
185
  paths, hashes, timestamps, and legacy change/task ownership. They are marked
187
- `managed = 0` until an owning workflow or `artifact.record` supplies complete
186
+ `managed = 0` until an owning current record or `artifact.record` supplies complete
188
187
  provenance and dependency edges. This compatibility state preserves data without
189
188
  pretending that an old row satisfies the current registry contract.
190
189
 
191
190
  ## Dependency and orphan diagnosis
192
191
 
193
- `system.doctor` compares the registry, dependency graph, filesystem, and owner
192
+ `ultra.doctor` compares the registry, dependency graph, filesystem, and owner
194
193
  tables. It reports:
195
194
 
196
195
  - unregistered semantic or evidence files;
@@ -221,8 +220,10 @@ or retired.
221
220
  contains:
222
221
 
223
222
  - one portable baseline record, when present;
224
- - every Change summary, including a Change that has not yet produced tasks;
225
- - durable task contracts, dependencies, acceptance mappings, and statuses;
223
+ - every Change summary, including a Change that has not yet produced Tasks;
224
+ - normalized Decision summaries, artifact references, digests, and supersession;
225
+ - accepted Stage Checkpoint summaries and evidence references;
226
+ - durable Task contracts, dependencies, acceptance mappings, and outcomes;
226
227
  - per-record revisions, parent digests, the checkpoint state digest, and bounded
227
228
  checkpoint ancestry.
228
229
 
@@ -235,7 +236,7 @@ Change creation or update, plan acceptance, durable task-contract or status chan
235
236
  task expansion or deletion, and Change convergence or archive. A direct edit is
236
237
  rejected by host hooks and fails digest validation even without hooks.
237
238
 
238
- `task.ledger_import` validates schema, full and per-record digests, bounded ancestry,
239
+ `ultra.sync { action: import }` validates schema, full and per-record digests, bounded ancestry,
239
240
  Change ownership, task parents, and local active sessions. A clean record fast-forwards.
240
241
  A record changed on both sides, a non-descendant checkpoint, or a remote update to a
241
242
  locally active task stops with a typed conflict. Re-importing the same checkpoint
@@ -245,7 +246,8 @@ HEAD, scope bytes, verification, or accepted dirty state. Publication remains bl
245
246
  until that local baseline converges, preventing one unvalidated checkout from
246
247
  downgrading team authority.
247
248
 
248
- Legacy v4.4/v4.5 projections are replaced only through `task.ledger_publish`. The
249
+ Legacy v4.4/v4.5 projections are replaced only through
250
+ `ultra.sync { action: publish }`. The
249
251
  publisher first compares every available durable field with SQLite, writes the exact
250
252
  legacy bytes to `.ultra/.runtime/backups/task-ledger/`, and refuses any mismatch.
251
253
  Doctor diagnoses this state but never performs the semantic replacement.
@@ -269,6 +271,7 @@ carrying the generated marker may be pruned, and the removal emits
269
271
  `projection_pruned`.
270
272
 
271
273
  Model findings, decisions, or evidence discovered during development must be written
272
- below the owning Change root and registered through the workflow or `artifact.record`.
274
+ below the owning Change root and registered through its typed record, checkpoint, or
275
+ `artifact.record`.
273
276
  The next context projection references that authority. Editing the task-context body
274
277
  or an accepted baseline specification directly is neither persistence nor promotion.
@@ -30,26 +30,29 @@ ownership or preserve unrelated edits. The owner may review and remove them sepa
30
30
 
31
31
  ## Activation
32
32
 
33
- Public Ultra workflows run only after an explicit user command or skill invocation.
34
- Completion of one workflow may return allowed transitions and a recommendation, but it
35
- must not start another public workflow.
33
+ Public Ultra workflows run only after an explicit user command or Skill invocation.
34
+ Completion of one workflow may return current Context diagnostics and a host-model
35
+ recommendation, but it must not start another public workflow. SQLite does not choose
36
+ or authorize that recommendation.
36
37
 
37
38
  Host adapters prevent implicit model activation with the strongest native mechanism:
38
39
 
39
- - Claude Code and Kimi Code mark public workflow skills as model-disabled;
40
+ - Claude Code and Kimi Code mark public workflow Skills as model-disabled;
40
41
  - Codex marks workflow metadata as implicit-invocation-disabled;
41
42
  - OpenCode exposes public workflows through commands backed by private plugin assets,
42
43
  not through the model-discoverable skill catalog.
44
+ - Grok Build uses explicit plugin Skills/commands and makes Skill-entry
45
+ `ultra.context` authoritative when a Hook output channel is not consumed.
43
46
 
44
47
  Internal review-rule skills remain available only to their bounded workers.
45
48
 
46
49
  ## Idle behavior
47
50
 
48
- Outside a repository containing `.ultra/.runtime/state.db`, all Ultra hooks are silent. Inside
49
- an initialized repository they remain silent unless a DB-authoritative workflow is
50
- active, blocked, or ready. The sole idle-time enforcement is protection against direct
51
- writes to the MCP-owned team checkpoint or generated Ultra projections; the DB remains
52
- checkout-local operational authority.
51
+ Outside a repository containing `.ultra/.runtime/state.db`, all Ultra Hooks are silent.
52
+ Inside an initialized repository, a Hook may inject one bounded Context Envelope when
53
+ the host consumes that channel. The sole idle-time enforcement is protection against
54
+ direct writes to the MCP-owned team checkpoint or generated Ultra projections; the DB
55
+ remains checkout-local operational authority. Semantic incompleteness is advisory.
53
56
 
54
57
  Installation tests preserve byte-for-byte snapshots of all supported user handbook
55
58
  paths. Runtime tests cover explicit activation, idle silence, active recovery, and
package/docs/ROADMAP.md CHANGED
@@ -1,96 +1,56 @@
1
- # ultra-builder-pro-cli — Roadmap
2
-
3
- > **Current roadmap**. [`DECISIONS.md`](./DECISIONS.md) defines the current
4
- > authority and package boundaries. Executable contracts live in `spec/`,
5
- > `AGENT-CONTEXT.md`, and `RUNTIME-COMPAT-MATRIX.md`; source and contract tests
6
- > win when roadmap text drifts.
7
-
8
- **Goal**: distribute the Ultra Builder Pro engineering loop as native Claude
9
- Code, OpenCode, Codex, and Kimi Code plugins, and run it with isolated sessions
10
- sharing one authoritative workflow store.
11
-
12
- **First-class runtimes**: Claude Code · OpenCode · Codex · Kimi Code.
13
-
14
- **Distribution channels (v1.0)**: npm · Homebrew · pip.
15
-
16
- **Release line**: the `package.json` version; every release is gated by
17
- `npm run verify:release`.
18
-
19
- ---
20
-
21
- ## Milestones
22
-
23
- | Release | Week | Contents |
24
- |---------|-----:|---------------------------------------------------------------------------|
25
- | **v0.1**| 8 | Rule layer + execution-lite (session isolation + admission + event subscribe + active-session visibility) — solves the core "independent conversations don't pollute each other" pain |
26
- | **v0.2**| 11 | Auto-recovery + monitoring + full conformance |
27
- | **v0.3**| 16 | PRD → execution-plan artifact → parallel dispatch / merge — coding factory |
28
- | **v1.0**| 17–18| Three-channel publish (npm + Homebrew + pip) |
29
-
30
- ## Phase status
31
-
32
- | Phase | Title | Status |
33
- |-------|------------------------------------------------|---------------|
34
- | 0 | Skeleton | ✅ done (`da69a7a`) |
35
- | 1 | Three-layer interface contracts (`spec/`) | ✅ done (D38) |
36
- | 2 | Authoritative state — SQLite + WAL | ✅ done (D39, `e286e41`) |
37
- | 3 | Command thin-shells (skill + MCP + CLI) | ✅ done (D40, `b3d1797`) |
38
- | 4 | Cross-runtime distribution + 4.6a smoke flow | ✅ done (D41, `5aa1fd0`) |
39
- | 4.5 | Execution-lite (session + admission + events) | ✅ done (D42, `0d3e5ed`) — **v0.1 ready** |
40
- | 5 | Recovery + staleness + auto-routing | ✅ done (D43) → v0.2 |
41
- | 6 | Monitoring + telemetry | ✅ done (D44) → v0.2 |
42
- | 4.6b | Full conformance suite | ✅ done (D45) — 20 conformance + 21 resolveTarget tests |
43
- | 7 | tagged tasks; non-core generation and retention surfaces removed from the plugin | ✅ superseded by the package-boundary cleanup |
44
- | 8A | Plan automation (parse / topo / expand + artifact + human gate) | ✅ done (D47, `a932cb8`) → v0.3 |
45
- | 8B | Execution automation (dispatch / parallel worktree / merge) | ✅ done (D48, `8224159`) — **v0.3 ready** |
46
- | 8C | Continuous change packets + context compiler + convergence + doctor | ✅ done (D52) |
47
- | 10 | Context Manifest v3 + breadcrumb + fresh-context budget + spec learning + two-axis review | ✅ done |
48
- | 11 | Greenfield/brownfield baseline adoption + advisory context budgets + convergence gate | ✅ done |
49
- | 12 | Repository evidence snapshots + gap ledger + migration re-adoption + incident governance | ✅ done |
50
- | 13 | Durable init-to-delivery workflows + task execution contracts + immutable stage evidence | ✅ done |
51
- | 16 | Resumable one-question owner-agent decisions + artifact checkpoints + workflow gates | ✅ done |
52
- | 19 | Non-ceremonial decision completion + four-host semantic-selection contract | ✅ done |
53
- | 20 | Typed artifact registry + normalized dependency graph + orphan diagnostics | ✅ done |
54
- | 9 | Release pipeline | npm tag publishing live; Homebrew / pip not implemented |
55
-
56
- ## What is in the repo today
57
-
58
- ```
59
- spec/ ← Phase 1 single source of truth
60
- ├── mcp-tools.yaml (60 live tools across 9 families)
61
- ├── cli-protocol.md (CLI ↔ MCP mapping table)
62
- ├── schemas/ (state-db.sql + 4 JSON schemas)
63
- ├── fixtures/{valid,invalid}/ (+ v4.4-project for migration)
64
- └── scripts/test-all.cjs (npm run test:spec — 7 validation stages)
65
-
66
- mcp-server/ ← Phase 2 authoritative state layer
67
- ├── server.cjs (stdio MCP server, 60 task/session/baseline/change/decision/workflow/artifact/system/plan tools)
68
- ├── lib/
69
- │ ├── state-db.cjs (SQLite + WAL + pragmas)
70
- │ ├── state-ops.cjs (full write API, status state machine)
71
- │ ├── baseline-workflow.cjs (project adoption + approval + reconciliation)
72
- │ ├── decision-dialogue.cjs (one-question authority + completion/checkpoint gates)
73
- │ ├── workflow-state.cjs (ordered stage runs, evidence, output digests, and gates)
74
- │ └── projector.cjs (state.db → tasks.json + context md)
75
- └── tests/ (npm run test:state)
76
-
77
- ultra-tools/ ← CLI fallback, migration, and diagnostics
78
- ├── cli.cjs
79
- └── commands/
80
- ├── db.cjs (init/checkpoint/vacuum/integrity/backup)
81
- ├── migrate.cjs (v4.4 projection → v4.5 authority; v4.5 projection → current schema; dry/rollback)
82
- └── legacy-memory.cjs (explicit inspect/archive/confirmed prune)
83
-
84
- bin/install.js ← multi-runtime installer
85
- adapters/ ← native host plugin builders
1
+ # Ultra Builder Pro roadmap
2
+
3
+ The current product is a five-host adaptive delivery harness with a seven-tool
4
+ persistence and safety kernel. `docs/DECISIONS.md` defines durable decisions;
5
+ schemas, source, and contract tests define executable behavior.
6
+
7
+ ## Current release boundary
8
+
9
+ - First-class hosts: Claude Code, OpenCode, Codex, Kimi Code, and Grok Build.
10
+ - Distribution: npm package plus host-native generated plugins.
11
+ - Public semantic workflows: 11 explicit Skills.
12
+ - Public MCP surface: exactly 7 tools.
13
+ - Local authority: `.ultra/.runtime/state.db`.
14
+ - Team handoff: `.ultra/tasks/tasks.json` and tracked semantic/evidence artifacts.
15
+ - General memory, code graph, browser, deployment, and framework guidance: external.
16
+
17
+ ## Current repository
18
+
19
+ ```text
20
+ spec/
21
+ ├── mcp-tools.yaml
22
+ ├── cli-protocol.md
23
+ ├── schemas/
24
+ └── fixtures/
25
+
26
+ mcp-server/
27
+ ├── server.cjs
28
+ ├── hook-context.cjs
29
+ └── lib/
30
+ ├── ultra-facade.cjs
31
+ ├── context-envelope.cjs
32
+ ├── decision-records.cjs
33
+ ├── stage-checkpoints.cjs
34
+ ├── worker-packet.cjs
35
+ ├── task-ledger.cjs
36
+ ├── state-db.cjs
37
+ ├── state-ops.cjs
38
+ ├── artifact-registry.cjs
39
+ ├── baseline-workflow.cjs
40
+ ├── change-workflow.cjs
41
+ ├── doctor.cjs
42
+ └── projector.cjs
43
+
44
+ adapters/
86
45
  ├── claude.js
87
46
  ├── opencode.js
88
47
  ├── codex.js
89
- └── kimi.js
90
- skills/ ← allowlisted Ultra workflows, internal rules, and collab companions
91
- hooks/ ← allowlisted workflow hooks; OpenCode uses native JavaScript hooks
48
+ ├── kimi.js
49
+ └── grok.js
50
+
51
+ hooks/
92
52
  ├── active_task_context.py
93
- ├── context_spine.py
53
+ ├── context_envelope.py
94
54
  ├── health_check.py
95
55
  ├── pre_stop_check.py
96
56
  ├── runtime_paths.py
@@ -98,29 +58,44 @@ hooks/ ← allowlisted workflow hooks; OpenCode uses native
98
58
  ├── workflow_checkpoint.py
99
59
  ├── workflow_context.py
100
60
  └── workflow_resume.py
101
- docs/
102
- ├── DECISIONS.md current authority and package boundaries
103
- ├── ARCHITECTURE.md Phase 1 single-page entry point
104
- ├── WORKFLOW-LIFECYCLE.md baseline classification + DB transition contract
105
- ├── AGENT-CONTEXT.md Phase 3 canonical runtime context contract
106
- ├── PLUGIN-ISOLATION-CONTRACT.md install, activation, idle, and ownership contract
107
- ├── RUNTIME-COMPAT-MATRIX.md Phase 4 runtime capability matrix
108
- ├── STATE-DB-ACCESS-POLICY.md Phase 2 multi-process write contract
109
- ├── COMMIT-HASH-BACKFILL.md Checkout-local completion commit evidence
110
- └── ROADMAP.md this file
111
- ```
112
-
113
- ## How to verify
114
61
 
62
+ skills/ # 11 public, 4 internal, explicit collab companions
63
+ agents/ # bounded Worker Packet consumers
64
+ ultra-tools/ # CLI diagnostics, migration, and recovery
65
+ orchestrator/ # optional approved Worker Packet dispatch
115
66
  ```
116
- npm install
117
- npm run test:all
118
- python3 -m pytest hooks/tests -q
119
- npm audit
67
+
68
+ Retired semantic-supervisor modules remain only in source migration/regression history
69
+ and are excluded from the npm package. They do not authorize current Stage
70
+ Checkpoints, Sessions, Skills, or archive.
71
+
72
+ ## Completed product invariants
73
+
74
+ - MCP does not select semantic routes or pre-authorize reasoning steps.
75
+ - Draft Stage Checkpoints are mutable; accepted revisions are immutable and
76
+ supersedable.
77
+ - Context, accepted decisions, and evidence are visible across sessions and Git
78
+ checkout sync.
79
+ - Every delegated worker receives an immutable Worker Packet.
80
+ - All five host installers stage, preflight, and atomically swap complete native
81
+ runtimes.
82
+ - v4.4/v4.5 and v0.22/v0.23 authority migrates backup-first.
83
+ - Hooks are observation/injection/protection only.
84
+ - `.runtime` stays local while reviewed intent and evidence remain team-trackable.
85
+
86
+ ## Verification
87
+
88
+ ```bash
89
+ npm run verify:release
90
+ npm pack --dry-run --json
91
+ node bin/install.js --all --global --doctor --json
120
92
  ```
121
93
 
122
- ## Out of scope for v1.0 (deferred)
94
+ The release gate also installs the tarball into a clean consumer and exercises public
95
+ write/read/backup/reopen through every generated host launcher.
96
+
97
+ ## Deferred product directions
123
98
 
124
- Additional runtimes, a web dashboard or TUI, a team-collaboration server, and
125
- an independent plugin marketplace remain deferred until a current product
126
- decision brings them into scope.
99
+ A web dashboard or TUI, a collaboration server, Homebrew/pip distribution, and an
100
+ independent marketplace remain uncommitted product directions. They must enter through
101
+ a new explicit decision and Change rather than this roadmap silently promising them.