ultra-builder-pro-cli 0.25.1 → 0.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/.ultra-template/changes/abandoned/.gitkeep +0 -0
  2. package/.ultra-template/contexts/TEMPLATE.md +94 -0
  3. package/.ultra-template/decisions/.gitkeep +1 -0
  4. package/.ultra-template/evidence/.gitkeep +1 -0
  5. package/.ultra-template/north-star.md +46 -0
  6. package/.ultra-template/research/.gitkeep +1 -0
  7. package/.ultra-template/specs/discovery.md +2 -2
  8. package/.ultra-template/tasks.json +3 -0
  9. package/.ultra-template/test-report.json +27 -0
  10. package/CHANGELOG.md +107 -1
  11. package/README.md +217 -579
  12. package/adapters/_shared/delegate-profiles/kimi-read-only.md +15 -0
  13. package/adapters/_shared/delegate-profiles/kimi-write.md +17 -0
  14. package/adapters/_shared/file-ops.cjs +76 -2
  15. package/adapters/_shared/host-profile.cjs +97 -0
  16. package/adapters/_shared/plugin-core.cjs +204 -0
  17. package/adapters/_shared/runtime-assets.cjs +31 -96
  18. package/adapters/claude.js +92 -291
  19. package/adapters/codex.js +309 -842
  20. package/adapters/grok.js +143 -1469
  21. package/adapters/kimi.js +124 -1053
  22. package/adapters/opencode.js +230 -742
  23. package/bin/delegate-worker.cjs +328 -0
  24. package/bin/delegate.cjs +463 -0
  25. package/bin/install.js +38 -11
  26. package/docs/ARCHITECTURE.md +125 -216
  27. package/docs/ARTIFACT-AUTHORITY.md +90 -268
  28. package/docs/DECISIONS.md +77 -87
  29. package/docs/PHILOSOPHY.md +208 -0
  30. package/docs/PLUGIN-ISOLATION-CONTRACT.md +65 -39
  31. package/docs/RUNTIME-COMPAT-MATRIX.md +140 -155
  32. package/docs/SKILL-AUTHORING.md +94 -73
  33. package/docs/WORKFLOW-LIFECYCLE.md +97 -189
  34. package/hooks/README.md +19 -37
  35. package/hooks/_common.py +113 -0
  36. package/hooks/adapters/codex.py +9 -16
  37. package/hooks/adapters/grok.py +5 -5
  38. package/hooks/adapters/kimi.py +8 -14
  39. package/hooks/block_dangerous_commands.py +201 -0
  40. package/hooks/compact_context.py +65 -0
  41. package/hooks/mid_workflow_recall.py +25 -0
  42. package/hooks/post_edit_guard.py +105 -0
  43. package/hooks/session_context.py +30 -0
  44. package/package.json +17 -52
  45. package/skills/ultra-change/SKILL.md +115 -50
  46. package/skills/ultra-change/references/change-contract.md +68 -3
  47. package/skills/ultra-delegate/SKILL.md +89 -0
  48. package/skills/ultra-delegate/references/delegation-contract.md +59 -0
  49. package/skills/ultra-delegate/scripts/delegate_wait.py +86 -0
  50. package/skills/ultra-deliver/SKILL.md +98 -42
  51. package/skills/ultra-deliver/references/baseline-reconciliation.md +39 -20
  52. package/skills/ultra-dev/SKILL.md +115 -62
  53. package/skills/ultra-dev/references/debugging.md +22 -0
  54. package/skills/ultra-domain-modeling/SKILL.md +79 -0
  55. package/skills/ultra-grilling/SKILL.md +118 -0
  56. package/skills/ultra-grilling/references/reframing.md +72 -0
  57. package/skills/ultra-init/SKILL.md +102 -37
  58. package/skills/ultra-init/references/brownfield-adoption.md +33 -83
  59. package/skills/ultra-init/scripts/init_project.cjs +84 -0
  60. package/skills/ultra-plan/SKILL.md +101 -68
  61. package/skills/ultra-research/SKILL.md +68 -48
  62. package/skills/ultra-research/references/00-problem-validation.md +5 -5
  63. package/skills/ultra-research/references/01-opportunity-discovery.md +3 -3
  64. package/skills/ultra-research/references/02-market-assessment.md +5 -4
  65. package/skills/ultra-research/references/03-competitive-landscape.md +3 -3
  66. package/skills/ultra-research/references/04-product-strategy.md +3 -3
  67. package/skills/ultra-research/references/05-assumptions-validation.md +5 -5
  68. package/skills/ultra-research/references/10-user-personas.md +3 -2
  69. package/skills/ultra-research/references/11-user-scenarios.md +3 -3
  70. package/skills/ultra-research/references/20-user-stories.md +4 -3
  71. package/skills/ultra-research/references/21-features-scope.md +3 -2
  72. package/skills/ultra-research/references/22-success-metrics.md +3 -3
  73. package/skills/ultra-research/references/30-architecture-context.md +3 -3
  74. package/skills/ultra-research/references/31-solution-strategy.md +3 -3
  75. package/skills/ultra-research/references/32-building-blocks.md +3 -3
  76. package/skills/ultra-research/references/40-deployment.md +3 -3
  77. package/skills/ultra-research/references/41-quality-risks.md +3 -3
  78. package/skills/ultra-research/references/99-synthesis.md +7 -7
  79. package/skills/ultra-review/SKILL.md +84 -32
  80. package/skills/ultra-review/references/code.md +17 -0
  81. package/skills/ultra-review/references/comments.md +12 -0
  82. package/skills/ultra-review/references/design.md +12 -0
  83. package/skills/ultra-review/references/errors.md +13 -0
  84. package/skills/ultra-review/references/spec.md +13 -0
  85. package/skills/ultra-review/references/tests.md +12 -0
  86. package/skills/ultra-review/references/worker-packet.md +40 -0
  87. package/skills/ultra-review/scripts/review_wait.py +26 -15
  88. package/skills/ultra-status/SKILL.md +61 -36
  89. package/skills/ultra-tdd/SKILL.md +81 -0
  90. package/skills/ultra-tdd/references/templates/README.md +20 -0
  91. package/skills/ultra-tdd/references/templates/feature-flag-default-audit.sh +79 -0
  92. package/skills/ultra-tdd/references/templates/persistence-real.ts +78 -0
  93. package/skills/ultra-tdd/references/templates/testcontainer-postgres.py +78 -0
  94. package/skills/ultra-tdd/references/templates/testcontainer-postgres.ts +73 -0
  95. package/skills/ultra-tdd/references/templates/vertical-slice.ts +66 -0
  96. package/skills/ultra-tdd/references/test-execution.md +18 -0
  97. package/skills/ultra-test/SKILL.md +75 -30
  98. package/skills/ultra-test/references/export-syntax.md +18 -0
  99. package/skills/ultra-test/scripts/worktree_digest.cjs +54 -0
  100. package/skills/ultra-think/SKILL.md +49 -27
  101. package/skills/ultra-think/references/autonomy-boundary.md +48 -0
  102. package/skills/ultra-think/references/interaction-boundary.md +18 -33
  103. package/.ultra-template/docs/research/README.md +0 -55
  104. package/.ultra-template/reports/templates/delivery-report.json +0 -17
  105. package/.ultra-template/reports/templates/test-report.json +0 -18
  106. package/.ultra-template/tasks/tasks.json +0 -15
  107. package/.ultra-template/templates/task-context.md +0 -19
  108. package/adapters/_shared/codex-assets.cjs +0 -725
  109. package/adapters/_shared/codex-ultra-tools-entry.cjs +0 -11
  110. package/adapters/_shared/interaction-contract.cjs +0 -129
  111. package/adapters/_shared/path-rewrite.cjs +0 -79
  112. package/adapters/_shared/runtime-native.cjs +0 -132
  113. package/adapters/_shared/settings-merge.cjs +0 -76
  114. package/agents/code-reviewer.md +0 -42
  115. package/agents/debugger.md +0 -40
  116. package/agents/review-code.md +0 -49
  117. package/agents/review-comments.md +0 -38
  118. package/agents/review-coordinator.md +0 -56
  119. package/agents/review-design.md +0 -40
  120. package/agents/review-errors.md +0 -43
  121. package/agents/review-spec.md +0 -39
  122. package/agents/review-tests.md +0 -40
  123. package/agents/tdd-runner.md +0 -38
  124. package/bin/orchestrator.js +0 -383
  125. package/commands/ultra-change.md +0 -10
  126. package/commands/ultra-deliver.md +0 -10
  127. package/commands/ultra-dev.md +0 -10
  128. package/commands/ultra-doctor.md +0 -10
  129. package/commands/ultra-init.md +0 -10
  130. package/commands/ultra-plan.md +0 -10
  131. package/commands/ultra-research.md +0 -10
  132. package/commands/ultra-review.md +0 -10
  133. package/commands/ultra-status.md +0 -10
  134. package/commands/ultra-test.md +0 -10
  135. package/commands/ultra-think.md +0 -10
  136. package/docs/AGENT-CONTEXT.md +0 -191
  137. package/docs/COMMIT-HASH-BACKFILL.md +0 -51
  138. package/docs/LEGACY-CLI-CROSSWALK.md +0 -175
  139. package/docs/ROADMAP.md +0 -101
  140. package/docs/STATE-DB-ACCESS-POLICY.md +0 -161
  141. package/hooks/active_task_context.py +0 -152
  142. package/hooks/context_envelope.py +0 -100
  143. package/hooks/health_check.py +0 -196
  144. package/hooks/pre_stop_check.py +0 -66
  145. package/hooks/runtime_paths.py +0 -396
  146. package/hooks/subagent_tracker.py +0 -88
  147. package/hooks/workflow_checkpoint.py +0 -76
  148. package/hooks/workflow_context.py +0 -48
  149. package/hooks/workflow_resume.py +0 -84
  150. package/mcp-server/hook-context.cjs +0 -38
  151. package/mcp-server/hook-event.cjs +0 -34
  152. package/mcp-server/lib/archive-journal.cjs +0 -1119
  153. package/mcp-server/lib/archive-mutation-worker.py +0 -365
  154. package/mcp-server/lib/artifact-registry.cjs +0 -1232
  155. package/mcp-server/lib/baseline-workflow.cjs +0 -1193
  156. package/mcp-server/lib/canonical-json.cjs +0 -19
  157. package/mcp-server/lib/change-authority.cjs +0 -26
  158. package/mcp-server/lib/change-packet.cjs +0 -790
  159. package/mcp-server/lib/change-workflow.cjs +0 -65
  160. package/mcp-server/lib/context-envelope.cjs +0 -581
  161. package/mcp-server/lib/context-paths.cjs +0 -142
  162. package/mcp-server/lib/decision-records.cjs +0 -423
  163. package/mcp-server/lib/delivery-transaction.cjs +0 -471
  164. package/mcp-server/lib/doctor-backup-worker.cjs +0 -328
  165. package/mcp-server/lib/doctor.cjs +0 -627
  166. package/mcp-server/lib/git-bootstrap.cjs +0 -651
  167. package/mcp-server/lib/init-project.cjs +0 -1021
  168. package/mcp-server/lib/kernel-change-workflow.cjs +0 -2029
  169. package/mcp-server/lib/legacy-change-workflow.cjs +0 -3032
  170. package/mcp-server/lib/managed-file-write.cjs +0 -172
  171. package/mcp-server/lib/plan-checkpoint.cjs +0 -177
  172. package/mcp-server/lib/plan-publication-worker.cjs +0 -830
  173. package/mcp-server/lib/plan-store.cjs +0 -794
  174. package/mcp-server/lib/prd-parser.cjs +0 -83
  175. package/mcp-server/lib/pricing.cjs +0 -44
  176. package/mcp-server/lib/project-context.cjs +0 -178
  177. package/mcp-server/lib/projector.cjs +0 -386
  178. package/mcp-server/lib/provider-refs.cjs +0 -42
  179. package/mcp-server/lib/runtime-paths.cjs +0 -1714
  180. package/mcp-server/lib/runtime-state.cjs +0 -222
  181. package/mcp-server/lib/safe-project-file.cjs +0 -385
  182. package/mcp-server/lib/stage-checkpoints.cjs +0 -463
  183. package/mcp-server/lib/state-authority.cjs +0 -95
  184. package/mcp-server/lib/state-db.cjs +0 -1580
  185. package/mcp-server/lib/state-ops.cjs +0 -1428
  186. package/mcp-server/lib/task-contract.cjs +0 -404
  187. package/mcp-server/lib/task-expander.cjs +0 -105
  188. package/mcp-server/lib/task-ledger.cjs +0 -1964
  189. package/mcp-server/lib/telemetry.cjs +0 -85
  190. package/mcp-server/lib/topo.cjs +0 -131
  191. package/mcp-server/lib/ultra-facade.cjs +0 -2684
  192. package/mcp-server/lib/worker-packet.cjs +0 -358
  193. package/mcp-server/server.cjs +0 -437
  194. package/orchestrator/auto-merge.cjs +0 -128
  195. package/orchestrator/daemon.cjs +0 -264
  196. package/orchestrator/dispatch-rules.cjs +0 -78
  197. package/orchestrator/parallel-orchestrator.cjs +0 -903
  198. package/orchestrator/planner/plan-builder.cjs +0 -125
  199. package/orchestrator/recovery.cjs +0 -188
  200. package/orchestrator/session-close-journal-worker.cjs +0 -5
  201. package/orchestrator/session-close-journal.cjs +0 -1014
  202. package/orchestrator/session-runner.cjs +0 -1153
  203. package/orchestrator/worktree-manager.cjs +0 -282
  204. package/settings.json +0 -7
  205. package/skills/cc-collab/SKILL.md +0 -42
  206. package/skills/code-review-expert/SKILL.md +0 -43
  207. package/skills/code-review-expert/references/correctness-reliability.md +0 -30
  208. package/skills/code-review-expert/references/design-boundaries.md +0 -26
  209. package/skills/code-review-expert/references/removal-plan.md +0 -24
  210. package/skills/codex-collab/SKILL.md +0 -49
  211. package/skills/codex-collab/evals/evals.json +0 -35
  212. package/skills/integration-rules/SKILL.md +0 -32
  213. package/skills/security-rules/SKILL.md +0 -38
  214. package/skills/testing-rules/SKILL.md +0 -32
  215. package/skills/ultra-doctor/SKILL.md +0 -41
  216. package/skills/ultra-plan/references/semantic-preflight.md +0 -20
  217. package/skills/ultra-verify/SKILL.md +0 -46
  218. package/skills/ultra-verify/evals/evals.json +0 -46
  219. package/skills/ultra-verify/references/cross-verify-modes.md +0 -28
  220. package/skills/ultra-verify/references/evidence-status.md +0 -21
  221. package/skills/ultra-verify/scripts/verify_wait.py +0 -94
  222. package/spec/cli-protocol.md +0 -102
  223. package/spec/mcp-tools.yaml +0 -312
  224. package/spec/schemas/baseline-reconciliation.v1.schema.json +0 -73
  225. package/spec/schemas/change-delta.v1.schema.json +0 -153
  226. package/spec/schemas/command-manifest.schema.json +0 -29
  227. package/spec/schemas/context-file.v4.5.schema.json +0 -54
  228. package/spec/schemas/delivery-report.v1.schema.json +0 -66
  229. package/spec/schemas/documentation-reconciliation.v1.schema.json +0 -106
  230. package/spec/schemas/mcp-tools.schema.json +0 -136
  231. package/spec/schemas/skill-manifest.schema.json +0 -24
  232. package/spec/schemas/state-db.sql +0 -641
  233. package/spec/schemas/task-ledger.v2.schema.json +0 -296
  234. package/spec/schemas/tasks.v4.5.schema.json +0 -96
  235. package/spec/schemas/test-report.v1.schema.json +0 -225
  236. package/ultra-tools/cli.cjs +0 -129
  237. package/ultra-tools/commands/db.cjs +0 -226
  238. package/ultra-tools/commands/legacy-memory.cjs +0 -159
  239. package/ultra-tools/commands/migrate.cjs +0 -1386
  240. package/ultra-tools/commands/session.cjs +0 -213
  241. package/ultra-tools/commands/status.cjs +0 -559
  242. package/ultra-tools/commands/system.cjs +0 -498
  243. package/ultra-tools/commands/task.cjs +0 -105
package/README.md CHANGED
@@ -1,655 +1,293 @@
1
1
  # Ultra Builder Pro
2
2
 
3
- **An adaptive delivery harness for AI coding agents.**
3
+ Ultra Builder Pro is a file-first engineering workflow for Claude Code, Codex,
4
+ OpenCode, Kimi Code, and Grok Build. It keeps product intent, specifications, task
5
+ contracts, evidence, decisions, and recovery notes in the repository, so a different
6
+ session or host can continue by reading files and Git.
4
7
 
5
- Ultra Builder Pro helps Claude Code, Codex, OpenCode, Kimi Code, and Grok Build
6
- carry a software project from an unclear request to a verified, recoverable delivery.
7
- It keeps the user and the agent aligned, preserves project authority across
8
- sessions, and prevents specifications from quietly drifting away from the code.
9
-
10
- It is not another model and it is not a rigid step-by-step autopilot. The active
11
- host agent still investigates, reasons, recommends, and implements. Ultra adds
12
- the durable workflow state, evidence gates, recovery paths, and host-native
13
- tools needed to make that work dependable over time.
14
-
15
- <div align="center">
16
-
17
- [![npm](https://img.shields.io/npm/v/ultra-builder-pro-cli?label=npm)](https://www.npmjs.com/package/ultra-builder-pro-cli)
18
- [![Tests](https://img.shields.io/badge/tests-passing-brightgreen)](#development-and-verification)
19
- [![License: MIT](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
20
- [![Node](https://img.shields.io/badge/node-%E2%89%A522-informational)](./package.json)
21
-
22
- </div>
8
+ The host model remains the engineer. Ultra supplies reusable methods and checkable
9
+ artifacts; it does not replace reasoning with a workflow engine.
23
10
 
24
11
  ## Why it exists
25
12
 
26
- AI coding works well inside one conversation. Real projects last much longer.
27
- After several sessions, teams commonly find that:
28
-
29
- - the agent no longer knows which decisions are authoritative;
30
- - implementation changed but product and architecture documents did not;
31
- - a new session repeats research or asks the same questions again;
32
- - an existing codebase is treated like a blank new product;
33
- - a rigid workflow blocks reasonable work, while an unstructured workflow loses
34
- traceability;
35
- - “tests passed” or “work completed” cannot be tied back to the exact change,
36
- task, commit, and acceptance criteria.
37
-
38
- Ultra Builder Pro addresses those gaps with four ideas:
39
-
40
- 1. **Adaptive workflow, not a fixed pipeline.** MCP exposes valid capabilities
41
- and hard recovery requirements. The host model recommends the next semantic
42
- action from the user's goal and current evidence.
43
- 2. **Low-load user alignment.** The agent investigates observable facts itself
44
- and asks the user only for material intent, scope, risk, or authorization
45
- decisions—normally one dependent decision at a time.
46
- 3. **Durable project authority.** `.ultra/.runtime/state.db` records checkout-local
47
- lifecycle facts, decisions, checkpoints, 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.
51
- 4. **Adaptive delivery.** The host model evaluates the evidence produced by the
52
- actual Change route, explicitly records any omitted capability and its rationale,
53
- and asks the owner to accept the local handoff. MCP validates current managed
54
- authority and archive integrity rather than requiring a fixed stage sequence.
55
-
56
- For example, if the user asks an agent to add organization SSO to an existing
57
- application, Ultra helps the agent inspect the real authentication path, capture
58
- the intended compatibility and recovery contract, ask only the unresolved
59
- product decision, plan and implement against current evidence, update affected
60
- specifications, and preserve the exact verification and review result. A later
61
- session resumes from that authority instead of reconstructing it from chat.
62
-
63
- ## The mental model
64
-
65
- ```mermaid
66
- flowchart TB
67
- U["User<br/>goals, acceptance, trade-offs, risk, and external authorization"]
68
-
69
- subgraph HOST["Supported coding host"]
70
- UI["Host-native interaction<br/>Claude Code / Codex / OpenCode / Kimi Code / Grok Build"]
71
- MODEL["Host agent<br/>inspect, recommend, implement, test, and review"]
72
- ADAPTER["Host adapter<br/>native questions, commands, tools, and lifecycle wiring"]
73
- end
74
-
75
- SKILLS["Eleven explicit Ultra Skills<br/>init / research / think / change / plan / dev<br/>test / review / deliver / status / doctor"]
76
- MCP["Ultra MCP safety kernel<br/>exactly 7 public tools"]
77
- DB[(".ultra/.runtime/state.db<br/>SQLite lifecycle and index authority")]
78
- LEDGER[".ultra/tasks/tasks.json<br/>Git team checkpoint for portable baseline, Change, and task state"]
79
- VIEWS[".ultra/.runtime/projections<br/>checkout-local generated views"]
80
- FILES["Digest-bound .ultra artifacts<br/>specification / research / change / plan / context<br/>test / review / delivery"]
81
- HOOKS["Lifecycle hooks<br/>health, breadcrumbs, recovery hints, and managed-file protection"]
82
- OPS["Operational tools<br/>ubp / ultra-tools / optional orchestrator"]
83
- EXTERNAL["External memory and graph providers"]
84
-
85
- U <-->|"intent, recommendation, and owner choice"| UI
86
- UI <--> MODEL
87
- ADAPTER --> UI
88
- ADAPTER -.->|"discovers and presents"| SKILLS
89
- MODEL -->|"explicit invocation"| SKILLS
90
- SKILLS -->|"typed operations"| MCP
91
- MCP <--> DB
92
- MCP -->|"publish / validate / import"| LEDGER
93
- MCP -->|"regenerate"| VIEWS
94
- MODEL -->|"writes semantic and evidence bodies"| FILES
95
- MCP <-->|"registers owner, digest, provenance, and freshness"| FILES
96
- HOOKS -->|"observes and records lifecycle events"| MCP
97
- OPS -->|"installation"| ADAPTER
98
- OPS -->|"diagnosis, recovery, and approved dispatch"| MCP
99
- EXTERNAL -.->|"bounded provider references only"| DB
100
- ```
13
+ Long agentic changes tend to fail in four repeatable ways:
101
14
 
102
- The responsibility split is deliberate:
15
+ - intent is paraphrased until the delivered product no longer matches the owner;
16
+ - a locally green layer is mistaken for a working end-to-end path;
17
+ - context loss turns an interrupted task into archaeology;
18
+ - safety mechanisms start deciding product meaning and trap the primary workflow.
103
19
 
104
- | Owner | Responsibility |
105
- |---|---|
106
- | **User** | Product intent, semantic route selection, material scope and trade-offs, risk acceptance, destructive actions, publishing and deployment authorization |
107
- | **Host model** | Fact-finding, synthesis, research-coverage and route recommendations, reversible implementation decisions |
108
- | **Ultra MCP** | Structure/current-byte validation, caller-declared checkpoints, evidence references, digests, team sync, leases, archive transactions, and mechanical recovery; never semantic completeness or route selection |
109
- | **Host adapter** | Native Skill discovery, user questions, tool invocation, installation, and runtime wiring |
110
- | **Hooks** | Fast lifecycle observation, current breadcrumb injection, and protection of MCP-owned checkpoint and generated projection paths |
20
+ Ultra addresses those failures with short owner-readable files, progressive Skills,
21
+ real verification evidence, and Git recovery. There is no database, MCP server,
22
+ semantic state machine, generated prompt projection, or background daemon.
111
23
 
112
- The MCP does not replace the model's judgment, judge completion, or pre-authorize a
113
- semantic route. It reports diagnostics and safely commits the model's explicit
114
- checkpoint/archive handoff. A hook does not decide product strategy. A prompt does not
115
- become durable authority merely because it appeared in a conversation.
24
+ ## Product surface
116
25
 
117
- ### The seven-tool MCP kernel
26
+ The package installs exactly fourteen Skills in three roles.
118
27
 
119
- The public model-facing surface is intentionally small:
28
+ ### Owner-invoked workflows
120
29
 
121
- | Tool | Responsibility |
30
+ | Skill | Outcome |
122
31
  |---|---|
123
- | `ultra.context` | Read the complete current spine without side effects |
124
- | `ultra.record` | Batch typed draft facts and events with idempotency |
125
- | `ultra.checkpoint` | Commit one caller-declared stage checkpoint after structural, byte, digest, and publication validation |
126
- | `ultra.sync` | Inspect, import, or publish the Git team checkpoint |
127
- | `ultra.session` | Own the transactional execution lease |
128
- | `ultra.archive` | Persist one explicit local delivery handoff through the recoverable filesystem/DB boundary |
129
- | `ultra.doctor` | Inspect or repair mechanical health, backup first |
130
-
131
- Retired fine-grained operation names are neither discoverable nor callable. Workflow
132
- prose stays in Skills, model judgment stays with the host, and SQLite records what
133
- happened rather than deciding what the model is allowed to think next.
32
+ | `ultra-init` | Establish the project skeleton and one-line north star |
33
+ | `ultra-research` | Verify external claims and refresh specifications |
34
+ | `ultra-change` | Reconcile a requested change against current product truth |
35
+ | `ultra-plan` | Write tracer-bullet tasks, contexts, dependencies, and seams |
36
+ | `ultra-dev` | Implement one task through red/green development and six evidence dimensions |
37
+ | `ultra-test` | Audit whole-system wiring, E2E behavior, performance, and security |
38
+ | `ultra-deliver` | Reconcile, review, document, and archive a completed Change |
39
+ | `ultra-delegate` | Run a bounded instruction through another supported CLI |
40
+
41
+ ### Model-invoked disciplines
42
+
43
+ | Skill | Reused method |
44
+ |---|---|
45
+ | `ultra-grilling` | Draw out incomplete owner intent one material question at a time |
46
+ | `ultra-domain-modeling` | Maintain precise ubiquitous language in `CONTEXT.md` |
47
+ | `ultra-tdd` | Prove one confirmed seam red, then green |
48
+ | `ultra-review` | Run six independent review lenses and synthesize findings |
49
+ | `ultra-think` | Stress-test consequential decisions and record durable results |
50
+
51
+ `ultra-status` is the single router. It infers the current route from project files,
52
+ Git, and installation health without mutating the workflow.
53
+
54
+ Public workflows are explicitly selected by the owner. One public workflow can
55
+ recommend the next one, but does not launch it. Model-invoked disciplines remain
56
+ available to the host model and are not separate user routes. The model selects one
57
+ when the active task presents its trigger: incomplete intent uses grilling, competing
58
+ terms use domain modeling, an accepted seam uses TDD, review-ready evidence uses
59
+ review, and a consequential unresolved decision uses think. A host with native bounded
60
+ subagents may parallelize review lenses; another host runs the same lens assets
61
+ sequentially.
62
+
63
+ ### What happened to the original Agents
64
+
65
+ v0.26 does not install a custom `agents/` projection. The old review workers became the
66
+ six focused files under `ultra-review/references/`; review coordination and synthesis
67
+ belong to the parent `ultra-review` Skill. The old debugger procedure lives under
68
+ `ultra-dev/references/debugging.md`, and test execution lives under
69
+ `ultra-tdd/references/test-execution.md`. These are assets of their Skills and therefore
70
+ travel to all five hosts. They preserve a bounded role without pretending that every
71
+ host exposes the same custom-agent API.
72
+
73
+ ## Project authority
74
+
75
+ A new project uses this shape:
134
76
 
135
- Rejected semantic attempts remain visible as bounded `ultra_kernel_attempt` audit
136
- diagnostics in the next `ultra.context`; they do not create rejected authority.
137
- `_ultra.projection_commit` describes only generated-view processing, never semantic
138
- acceptance. The production Change API has no legacy/current mode switch.
77
+ ```text
78
+ CONTEXT.md
79
+ .ultra/
80
+ ├── .gitignore # ignores only derived Ultra paths
81
+ ├── north-star.md
82
+ ├── tasks.json
83
+ ├── test-report.json
84
+ ├── specs/
85
+ │ ├── product.md
86
+ │ ├── architecture.md
87
+ │ ├── discovery.md
88
+ │ └── research-distillate.md
89
+ ├── changes/
90
+ │ ├── active/<change-id>/{intent.md,delivery.md}
91
+ │ └── archive/<change-id>/intent.md
92
+ ├── contexts/<task-id>.md
93
+ ├── decisions/<decision-id>.md
94
+ ├── evidence/<task-id>/...
95
+ └── research/<run-id>/...
96
+ ```
139
97
 
140
- The enforcement gradient is:
98
+ Canonical semantic facts live in those files. Git provides history, comparison,
99
+ rollback, and archive moves. The following are derived and can be deleted or rebuilt:
141
100
 
142
101
  ```text
143
- exploration and iteration: advisory
144
- durable semantic checkpoint: validated and recoverable
145
- corruption / unsafe path / real concurrency / permission: fail closed
146
- irreversible external effect: explicit owner authority plus fail closed
102
+ .ultra/.runtime/
103
+ .ultra/progress/
104
+ .ultra/reviews/
147
105
  ```
148
106
 
149
- ### How owner intent becomes durable authority
150
-
151
- ```mermaid
152
- flowchart TD
153
- CURRENT["Current Ultra workflow"] --> INSPECT["Host model inspects code, documents, and current authority"]
154
- INSPECT --> SUGGEST["Model recommends a route and explains its consequences"]
155
- SUGGEST --> CLEAR{"Is current owner intent already explicit?"}
156
- CLEAR -->|"Yes"| NORMALIZE["Normalize the accepted intent"]
157
- CLEAR -->|"No: a material choice remains"| ASK["Ask one dependent question through the host-native question tool"]
158
- ASK --> NORMALIZE
159
- NORMALIZE --> RECORD["Batch the normalized result through ultra.record"]
160
- RECORD --> CHECKPOINT["Attempt the owning ultra.checkpoint when authority is ready"]
161
- CHECKPOINT --> AUTHORITY["Bind state, artifact digest, provenance, and downstream effects"]
162
- AUTHORITY --> READBACK["Read back the authoritative result"]
163
- READBACK --> RESUME["Resume the exact workflow step and recommend the next explicit capability"]
164
- ```
107
+ See [Artifact Authority](docs/ARTIFACT-AUTHORITY.md) for writer, reader, promotion,
108
+ staleness, and recovery rules.
165
109
 
166
- The interaction before the write establishes owner intent. Once the host model
167
- normalizes and persists that intent, MCP treats the stored result as current
168
- authority; it does not try to prove that the owner clicked a particular UI
169
- control. Ultra stores the accepted result and its scope, evidence, provenance,
170
- and effects—not chain-of-thought, raw prompts, transcripts, or UI receipts.
171
-
172
- ## What you get
173
-
174
- - Native plugins for **Claude Code**, **OpenCode**, **Codex**, **Kimi Code**, and
175
- **Grok Build**.
176
- - One workflow vocabulary across all five hosts.
177
- - Deterministic initialization for new, existing, monorepo, and older Ultra
178
- projects.
179
- - Evidence-backed greenfield research and brownfield adoption.
180
- - A durable Change Contract for every ongoing feature, fix, refactor, or
181
- incident.
182
- - Context compilation that detects stale plans, tasks, references, and
183
- specifications.
184
- - Risk-selected testing and independent specification/engineering review.
185
- - Crash-safe sessions, worktree recovery, circuit breakers, and backup-first
186
- state migration.
187
- - Read-only installation and project diagnostics.
188
- - Optional dependency-wave worker orchestration for already-approved plans.
189
-
190
- ## When to use it
191
-
192
- Ultra Builder Pro is useful when:
193
-
194
- - a project will span multiple agent sessions;
195
- - more than one supported host may work on the same repository;
196
- - product or architecture specifications must stay synchronized with delivery;
197
- - an existing codebase needs a trustworthy baseline before new changes;
198
- - failures must be diagnosable and recoverable;
199
- - user decisions, agent reasoning, and mechanical enforcement need clear
200
- boundaries.
201
-
202
- It is probably unnecessary for a disposable one-file experiment or a change
203
- that does not need durable project context.
110
+ ### Which route writes which document
204
111
 
205
- ## Install
112
+ | Route | Canonical write | Who consumes it next |
113
+ |---|---|---|
114
+ | `ultra-init` | north star and four specification skeletons; empty task and test ledgers | every later workflow and context Hook |
115
+ | `ultra-research` | selected cited reports plus reconciled specifications and distillate | change, plan, and delivery |
116
+ | `ultra-change` | one active `intent.md` with exact acceptance, seams, reconciliation, and recovery | plan, dev, test, review, status, delivery |
117
+ | `ultra-plan` | `tasks.json`, one context per task, and Planning Posture in the active intent | dev and every resume path |
118
+ | `ultra-dev` | source/tests, task evidence, synchronized task/context status, Completion and Resume Note | review, test, status, delivery |
119
+ | `ultra-test` | the one current `test-report.json` bound to HEAD and worktree digest | status and delivery |
120
+ | `ultra-deliver` | one `delivery.md`, reconciled specs/docs, then the archived Change directory | owner and future Change history |
121
+ | `ultra-status` | none | recommends the smallest explicit route from current files |
122
+ | `ultra-delegate` | derived runtime receipt plus an isolated worktree diff | primary host inspection and optional integration |
206
123
 
207
- Requirements:
124
+ `ultra-domain-modeling` is the sole focused writer of `CONTEXT.md`; `ultra-think` writes
125
+ a durable decision only after owner acceptance. Review packets, Hook progress, compact
126
+ snapshots, and delegation receipts are derived evidence, not extra semantic documents.
208
127
 
209
- - Node.js 22 or newer;
210
- - Git for the normal project workflow;
211
- - Python 3 on a POSIX platform with `dir_fd` filesystem operations for
212
- inode-pinned archive finalization and recovery;
213
- - one or more supported coding-agent hosts.
128
+ ## Install
214
129
 
215
- Install globally into all detected host configuration directories:
130
+ Node.js 22 or newer is required.
216
131
 
217
132
  ```bash
218
- npx --yes ultra-builder-pro-cli@latest --all --global
219
- ```
133
+ # Current project, one host
134
+ npx ultra-builder-pro-cli --claude --local
135
+ npx ultra-builder-pro-cli --codex --local
220
136
 
221
- Or install only one host:
137
+ # Global installation
138
+ npx ultra-builder-pro-cli --opencode --global
139
+ npx ultra-builder-pro-cli --kimi --global
140
+ npx ultra-builder-pro-cli --grok --global
222
141
 
223
- ```bash
224
- npx --yes ultra-builder-pro-cli@latest --claude --global
225
- npx --yes ultra-builder-pro-cli@latest --opencode --global
226
- npx --yes ultra-builder-pro-cli@latest --codex --global
227
- npx --yes ultra-builder-pro-cli@latest --kimi --global
228
- npx --yes ultra-builder-pro-cli@latest --grok --global
142
+ # All supported hosts
143
+ npx ultra-builder-pro-cli --all --global
229
144
  ```
230
145
 
231
- Use `--local` instead of `--global` to install into the current project's host
232
- configuration:
146
+ Use the host's native Skill picker or invocation syntax to select an owner workflow.
147
+ Codex exposes namespaced entries such as `$ultra-builder-pro:ultra-init`. The installed
148
+ frontmatter and metadata keep user routes explicit and model disciplines implicit.
233
149
 
234
- ```bash
235
- npx --yes ultra-builder-pro-cli@latest --all --local
236
- ```
150
+ ### Diagnose, update, and uninstall
237
151
 
238
- Verify the installation without changing it:
152
+ Installation is managed, atomic, and provenance-checked.
239
153
 
240
154
  ```bash
241
- npx --yes ultra-builder-pro-cli@latest --all --global --doctor
242
- npx --yes ultra-builder-pro-cli@latest --all --global --doctor --json
243
- ```
155
+ # Re-running install updates the managed artifact
156
+ npx ultra-builder-pro-cli --codex --global
244
157
 
245
- After installing or upgrading, start a new Claude Code, OpenCode, or Codex
246
- session. In Kimi Code, run `/reload` or start a new session.
158
+ # Read-only diagnosis
159
+ npx ultra-builder-pro-cli --all --global --doctor --json
247
160
 
248
- Plugin installation, update, doctor, and uninstall never mutate durable user
249
- instructions such as `CLAUDE.md` or `AGENTS.md`. Ultra policy stays in the plugin
250
- and becomes active only after an explicit workflow invocation. Existing legacy
251
- Ultra marker blocks in a user handbook are left untouched for the owner to review;
252
- the plugin neither claims nor silently deletes user-authored content.
161
+ # Remove only managed Ultra assets
162
+ npx ultra-builder-pro-cli --all --global --uninstall
163
+ ```
253
164
 
254
- ### Host invocation
165
+ `--config-dir <path>` isolates both the primary config and host-owned sidecars. It is
166
+ the safe choice for tests and does not fall through to the real home directory. When
167
+ more than one host is selected, each host receives `<path>/<runtime>` so their native
168
+ layouts cannot overwrite one another.
255
169
 
256
- | Host | Example |
257
- |---|---|
258
- | Claude Code | `/ultra-builder-pro:ultra-init` |
259
- | OpenCode | `/ultra-init` |
260
- | Codex | `$ultra-builder-pro:ultra-init` |
261
- | Kimi Code | `/ultra-builder-pro:ultra-init` |
170
+ Uninstall removes the managed plugin and prunes only empty config shells that were
171
+ absent before the first install. Pre-existing registries, directories, symlinks, and
172
+ any path containing owner data are preserved.
262
173
 
263
- The same naming applies to `ultra-research`, `ultra-change`, `ultra-plan`,
264
- `ultra-dev`, `ultra-test`, `ultra-review`, `ultra-deliver`, `ultra-status`,
265
- `ultra-think`, and `ultra-doctor`.
174
+ Kimi Code and Grok Build currently expose user-scoped plugins only, so `--local`
175
+ rejects them before mutation. Claude Code, Codex, and OpenCode support project-local
176
+ installation; all five support managed global installation and isolated
177
+ `--config-dir` verification.
266
178
 
267
- See the
268
- [Runtime Compatibility Matrix](./docs/RUNTIME-COMPAT-MATRIX.md) for exact
269
- host-specific presentation and lifecycle differences.
179
+ ## Typical workflow
270
180
 
271
- ## How to use it
181
+ 1. Select `ultra-init` once. It writes the skeleton, records the owner's one-line goal,
182
+ initializes Git when needed, and recommends the next route.
183
+ 2. Select `ultra-research` when a product or architecture claim needs evidence.
184
+ 3. Select `ultra-change` for the requested outcome and reconcile it against current
185
+ specifications before planning.
186
+ 4. Select `ultra-plan` to confirm public seams and produce resumable tracer-bullet tasks.
187
+ 5. Select `ultra-dev` for one task at a time. Each task leaves a Completion entry,
188
+ evidence, and a closing Resume Note.
189
+ 6. Select `ultra-test` once the ledger is complete. Local green tests do not substitute
190
+ for wiring and E2E proof.
191
+ 7. Select `ultra-deliver` to run aggregate review, reconcile documentation, and archive
192
+ the Change. Commit, push, tag, publication, and deployment remain separately
193
+ authorized effects.
272
194
 
273
- ### 1. Start a new project
195
+ At any point, `ultra-status` can reconstruct the current position. A fresh session or
196
+ different host resumes by reading `.ultra/tasks.json`, the selected `context_file`, its
197
+ `## Resume Note`, `CONTEXT.md`, relevant decisions, the active Change, and Git.
274
198
 
275
- From the project root, invoke `ultra-init`.
199
+ ## Three independent integration defences
276
200
 
277
- Initialization:
201
+ The workflow does not treat “tests pass” as an end-to-end verdict.
278
202
 
279
- - identifies the repository root and scope;
280
- - classifies the repository as greenfield, brownfield, or migrated;
281
- - initializes Git when needed;
282
- - creates `.ultra/` and schema 20 project authority;
283
- - verifies that the scaffold and database can be read back;
284
- - completes without silently starting research, creating a commit, adding a
285
- remote, or pushing anything.
203
+ - `ultra-plan` rejects horizontal feature slicing and confirms observable seams.
204
+ - `ultra-dev` records tests, persistence, feature flags, vertical execution, and spec
205
+ trace as six separate observations.
206
+ - `ultra-test` searches changed exports for real non-test consumers and runs the
207
+ smallest primary flow through its boundary.
286
208
 
287
- Then explicitly invoke `ultra-research`. For a new product, the agent evaluates
288
- the complete research catalog but executes only the areas that matter. It
289
- resolves observable facts itself and asks for material product decisions as
290
- needed. Once the evidence and specifications are accurate, the user approves
291
- the baseline.
209
+ Each defence can report a defect independently. The reports are sensors, not semantic
210
+ gates; the model and owner decide the response without erasing evidence.
292
211
 
293
- One common full-depth path after baseline approval is:
212
+ ## Hooks
294
213
 
295
- ```text
296
- ultra-change
297
- -> optional ultra-think or bounded ultra-research
298
- -> ultra-plan
299
- -> ultra-dev
300
- -> risk-selected ultra-test
301
- -> ultra-review
302
- -> ultra-deliver
303
- ```
214
+ Five optional hooks accelerate file reading and protect a narrow effect boundary:
304
215
 
305
- Each public workflow is explicitly invoked rather than auto-chained. The example is a
306
- recommended route for a normal implementation Change, not an archive state machine.
307
- Thinking and research coverage are adaptive, verification depth is risk-selected, and
308
- the host may omit or repeat a capability when the actual Change makes that appropriate,
309
- provided the delivery handoff names the omission and its rationale. Any implementation
310
- task still requires a current plan, DB-backed task contract, and role-scoped context.
311
- “Direct Build” skips Research only; it does not bypass Plan, Task, or Context authority
312
- when development is performed.
313
-
314
- ### 2. Adopt an existing project
315
-
316
- Run the same `ultra-init` entry point. Ultra detects delivered-system evidence
317
- such as application source, APIs, persistence, tests, or deployment
318
- configuration and classifies the repository as brownfield.
319
-
320
- Brownfield adoption does not ask the agent to invent a new MVP or rewrite the
321
- product story. It builds a current-system baseline from:
322
-
323
- - observable code and runtime behavior;
324
- - existing product and architecture documents;
325
- - build, lint, type-check, and test results;
326
- - APIs, data, permissions, integrations, deployment, and recovery seams;
327
- - known failures, documentation drift, technical debt, and unresolved unknowns.
328
-
329
- During `ultra-research`, the host model inspects current evidence and recommends
330
- the smallest sufficient route. The owner selects, modifies, delegates, or
331
- defers it through the host-native question surface unless the current request
332
- already resolves the route. The normalized accepted coverage is then stored in
333
- `.ultra/.runtime/state.db`. Every included area receives one explicit disposition:
334
-
335
- - `execute` — produce fresh evidence;
336
- - `verify_existing` — validate an existing artifact;
337
- - `reuse` — reuse evidence that is still current;
338
- - `not_applicable` — exclude it with evidence and rationale;
339
- - `deferred` — record the consequence and accepted owner.
340
-
341
- The catalog is not a mandatory document set or questionnaire. Omitted areas
342
- create no workflow rows; an explicit exclusion is recorded only when retaining
343
- that rationale is useful. MCP validates accepted checkpoints and mechanical
344
- integrity; it does not store or prove the preceding UI interaction.
345
-
346
- Older projection-only Ultra projects are preserved and routed through a
347
- backup-first migration or rebaseline. The first supported checkpoint publication
348
- replaces a v4.4/v4.5 task projection only when its ids and durable fields match
349
- SQLite, after copying its exact bytes to `.ultra/.runtime/backups/task-ledger/`.
350
- Use `ultra-doctor` when initialization reports migration, mismatch, or authority
351
- damage; do not overwrite old state manually.
352
-
353
- ### 3. Make daily changes
354
-
355
- After the baseline is ready, start features, fixes, refactors, and incidents
356
- with `ultra-change`.
357
-
358
- `ultra-change` records the accepted outcome, scope, acceptance criteria,
359
- compatibility boundary, recovery strategy, documentation impact, risk profile,
360
- and research disposition. Capturing intent does not automatically start every
361
- downstream workflow.
362
-
363
- The host then recommends one valid capability:
364
-
365
- - `ultra-think` for a material unresolved decision or diagnosis;
366
- - bounded `ultra-research` for a real evidence gap;
367
- - `ultra-plan` for the required task decomposition and dependency planning boundary;
368
- - `ultra-dev` after the current plan has produced an executable task contract;
369
- - `ultra-status` when the user needs the current authority and available routes;
370
- - `ultra-doctor` when state or installation health is degraded.
371
-
372
- Semantic changes invalidate dependent tasks and compiled context. A stale task
373
- cannot be revived by flipping a status flag; its complete execution contract
374
- must be reconciled against the current Change authority.
375
-
376
- ### 4. Deliver and continue
377
-
378
- `ultra-deliver` asks the host model to assess the current managed evidence for the
379
- route the Change actually took. The handoff explicitly records any omitted capability
380
- and its evidence-based rationale; the owner decides whether that semantic packet is
381
- sufficient. MCP then validates paths, digests, reconciliation structure, idempotency,
382
- and recoverability before archiving the local Ultra change authority. It does not
383
- require every Change to pass through a fixed Research/Plan/Dev/Test/Review sequence.
384
-
385
- Delivery does **not** grant permission to commit, push, publish, tag, deploy, or
386
- perform another external effect. Those actions remain separate and require the
387
- user's explicit request.
388
-
389
- The next piece of daily work starts with a new `ultra-change`.
390
-
391
- ## Core workflows
392
-
393
- | Workflow | Purpose |
216
+ | Hook | Behavior |
394
217
  |---|---|
395
- | `ultra-init` | Classify the repository and create or recover project authority |
396
- | `ultra-research` | Build or refresh an evidence-backed baseline with adaptive coverage |
397
- | `ultra-think` | Resolve one material decision or perform bounded diagnosis |
398
- | `ultra-change` | Capture the durable contract for one feature, fix, refactor, or incident |
399
- | `ultra-plan` | Create current task contracts, dependencies, acceptance coverage, and execution context |
400
- | `ultra-dev` | Implement one owned vertical slice and record exact evidence |
401
- | `ultra-test` | Run the risk-selected verification profile and persist the gate result |
402
- | `ultra-review` | Coordinate independent specification-fidelity and engineering review |
403
- | `ultra-deliver` | Reconcile specifications, close local authority, and archive the change |
404
- | `ultra-status` | Read the current context, warnings, blockers, and evidence |
405
- | `ultra-doctor` | Diagnose installation or project-state faults and expose safe recovery |
406
-
407
- These eleven capabilities are the complete public Ultra command graph. The host model
408
- recommends the next capability from current context and owner intent; SQLite does not
409
- encode the semantic route. Another public capability starts only after an explicit
410
- user command or skill invocation.
411
-
412
- Review and debug agents are evidence-only workers. They may inspect the assigned
413
- checkout and write their declared report, but they never edit source or commit
414
- authority. The primary host evaluates the evidence, applies any repair, and records
415
- the verified outcome.
416
-
417
- ### Command interaction graph
418
-
419
- Every solid handoff below means: the current capability returns context and checkpoint
420
- diagnostics, the model recommends a route, and the owner explicitly invokes the next
421
- public capability. It does not mean that one public command silently launches another.
422
-
423
- ```mermaid
424
- flowchart TD
425
- START["Project entry"] --> INIT["ultra-init"]
426
- INIT --> CLASSIFY{"Repository classification"}
427
-
428
- CLASSIFY -->|"Greenfield"| GREEN["Create scaffold<br/>verify Git and project authority"]
429
- CLASSIFY -->|"Brownfield"| BROWN["Preserve the delivered system<br/>bootstrap adoption authority"]
430
- CLASSIFY -->|"Legacy or damaged authority"| REPAIR["ultra-doctor<br/>migrate, recover, or rebaseline"]
431
- REPAIR --> BROWN
432
-
433
- GREEN --> RESEARCH["Explicit ultra-research"]
434
- BROWN --> RESEARCH
435
- RESEARCH --> BASELINE{"Has the baseline converged?"}
436
- BASELINE -->|"Material decision gap"| THINK_BASE["ultra-think"]
437
- THINK_BASE --> RESEARCH
438
- BASELINE -->|"Evidence gap"| RESEARCH
439
- BASELINE -->|"Approved and current"| CHANGE["Explicit ultra-change"]
440
-
441
- CHANGE --> ROUTE{"Model recommends a route<br/>owner selects or modifies it"}
442
- ROUTE -->|"Material intent remains unresolved"| THINK_CHANGE["ultra-think"]
443
- THINK_CHANGE --> ROUTE
444
- ROUTE -->|"Real evidence gap"| CHANGE_RESEARCH["Bounded ultra-research<br/>owned by the active Change"]
445
- CHANGE_RESEARCH --> PLAN["ultra-plan"]
446
- ROUTE -->|"Evidence is sufficient: Direct Build"| PLAN
447
-
448
- PLAN --> DEV["ultra-dev<br/>one dependency-ready vertical task"]
449
- DEV --> TASKS{"More executable tasks?"}
450
- TASKS -->|"Yes"| DEV
451
- TASKS -->|"No"| ASSESS{"What evidence does this Change still need?"}
452
- ROUTE -->|"Accepted handoff already has sufficient evidence"| DELIVER["ultra-deliver"]
453
- ASSESS -->|"Risk-selected verification"| TEST["ultra-test<br/>risk-selected formal verification"]
454
- ASSESS -->|"Independent review"| REVIEW["ultra-review<br/>specification fidelity and engineering quality"]
455
- ASSESS -->|"Caller accepts current evidence and explicit omissions"| DELIVER
456
- TEST -->|"Failed or incomplete"| DEV
457
- TEST -->|"Review is warranted"| REVIEW
458
- TEST -->|"Caller accepts current evidence and explicit omissions"| DELIVER
459
- REVIEW -->|"Changes required"| DEV
460
- REVIEW -->|"Approved"| DELIVER
461
- DELIVER --> ARCHIVE["Reconcile specifications<br/>apply the Change overlay and archive evidence"]
462
- ARCHIVE --> NEXT{"Continue"}
463
- NEXT -->|"Next outcome"| CHANGE
464
- NEXT -->|"Inspect current authority"| STATUS["ultra-status"]
465
-
466
- ANY["Any active stage"] -.->|"read-only routing"| STATUS
467
- ANY -.->|"mechanical health fault"| DOCTOR["ultra-doctor"]
468
- ```
218
+ | `session_context.py` | Inject north star and current acceptance at session start |
219
+ | `mid_workflow_recall.py` | Restate acceptance before relevant source operations |
220
+ | `compact_context.py` | Save and restore a disposable Git/file snapshot |
221
+ | `post_edit_guard.py` | Record mechanical evidence observations after edits |
222
+ | `block_dangerous_commands.py` | Advise on additive protected-branch publication; deny history rewrites and named destructive shell effects until the exact command is authorized |
469
223
 
470
- “Direct Build” skips additional Research only. It still requires
471
- `ultra-plan`, current DB-backed task contracts, dependency ownership, and an
472
- immutable role-scoped Context Manifest before `ultra-dev`. `ultra-status` is a
473
- read-only side route, while `ultra-doctor` diagnoses and repairs mechanical
474
- health without selecting product intent.
224
+ All five exit silently when `.ultra/` is absent. Details are in
225
+ [Plugin Isolation](docs/PLUGIN-ISOLATION-CONTRACT.md).
475
226
 
476
- ## What lives in `.ultra/`
227
+ ## Delegation
477
228
 
478
- ```text
479
- .ultra/
480
- .runtime/ # local mutable state; ignored by Git
481
- state.db # facts, indexes, checkpoints, leases, CAS, and recovery
482
- checkpoint.json # advisory recovery projection
483
- projections/ # generated local task and task-context views
484
- backups/ # verified migration and recovery snapshots
485
- collab/ # local collaboration scratch
486
- sessions/ # local leases and session runtime
487
- worktrees/ # registered local Git worktrees
488
- telemetry/ # local operational telemetry
489
- specs/ # digest-bound product and architecture baseline
490
- decisions/baseline/ # normalized accepted baseline decisions
491
- changes/
492
- active/<id>/ # all current Change semantics and evidence
493
- intent.md # accepted Change Contract
494
- decisions/ # normalized accepted Change decisions
495
- progress.md # generated human-readable projection
496
- research/ # Change-only findings and research reports
497
- delta/ # typed baseline overlay and semantic payloads
498
- documentation/ # documentation overlay and reconciliation evidence
499
- plan.json # machine-readable task topology
500
- plan.md # deterministic human plan projection
501
- contexts/ # immutable canonical Context Envelopes
502
- test/ # Change-scoped test reports
503
- review/ # Change-scoped review workers and summary
504
- delivery/ # Change-scoped delivery evidence
505
- archive/ # immutable delivered Change artifacts
506
- docs/research/ # baseline-only research evidence
507
- reports/templates/ # blank report schemas; never delivery evidence
508
- tasks/
509
- tasks.json # MCP-published Git team checkpoint; never hand-edited
510
- templates/
511
- task-context.md # authored template, not a generated task context
512
- ```
513
-
514
- Together, `.ultra/` is Ultra's project-local cross-session workflow memory. The
515
- host model writes semantic specifications and evidence through the active
516
- capability. MCP records lifecycle state, references, digests, provenance, and
517
- accepted intent, then validates durable checkpoints and mechanical integrity. The DB is the
518
- lifecycle and index authority for one checkout; registered digest-bound files carry
519
- the semantic or evidence bodies that the DB references. The Git checkpoint is a
520
- portable, digest-chained handoff of baseline, Change, and durable task records. It is
521
- not a second live session authority. Generated projections and working scratch are
522
- not authority.
523
-
524
- Ultra does not store chain-of-thought, raw prompts, transcripts, general
525
- conversational or episodic memory, or code-graph payloads. External memory and
526
- graph systems remain separate providers; Ultra may store bounded metadata
527
- references to them as workflow context. Only `.ultra/.runtime/` is ignored by
528
- Git: semantic and evidence artifacts can travel with the repository, while
529
- SQLite, leases, telemetry, and recovery scratch remain checkout-local.
530
-
531
- ### Team checkpoint protocol
532
-
533
- MCP publishes `.ultra/tasks/tasks.json` at durable boundaries: baseline convergence,
534
- Change creation or revision, accepted plan export, durable task-contract or status
535
- changes, task expansion or deletion, and Change convergence or archive. The file
536
- contains per-record revisions and digests plus checkpoint ancestry. It excludes
537
- `in_progress` ownership, session ids, leases, worktrees, telemetry, and
538
- `completion_commit`.
539
-
540
- After a pull or on a fresh checkout, MCP validates and imports the checkpoint. Clean
541
- records fast-forward independently. A baseline imported as `ready` is downgraded to
542
- checkout-local revalidation until its scope, files, verification, and HEAD are proven
543
- again. Concurrent edits to the same baseline, Change, or task, a non-descendant
544
- checkpoint, or remote modification of an active local task fail with a typed conflict;
545
- Ultra never silently picks a side. Re-importing the same checkpoint is read-only, and
546
- an imported ready baseline cannot publish another checkpoint until local revalidation
547
- converges.
548
-
549
- Baseline freshness does not use the checkpoint commit as a self-referential marker.
550
- It combines Git ancestry with a scoped content digest that excludes `.ultra/`.
551
- Consequently, a commit containing only Ultra metadata does not make the baseline stale,
552
- while a descendant commit that changes scoped application content does.
553
-
554
- See [Artifact authority](./docs/ARTIFACT-AUTHORITY.md) for the promotion and
555
- evidence rules.
556
-
557
- ## Optional orchestration
558
-
559
- The normal workflow can be driven interactively by the host agent. For an
560
- already-approved plan, `ubp-orchestrator` can dispatch dependency-ready tasks
561
- into isolated Git worktrees:
229
+ Delegation writes an immutable instruction and permission envelope, then starts the
230
+ selected CLI in the background. Empty writable roots select native read-only mode;
231
+ declared roots select bounded write mode. The model returns one schema-constrained final
232
+ response; the launcher extracts it from native structured output, validates the actual
233
+ Git diff, and atomically publishes a terminal `finished`, `blocked`, or `failed` result
234
+ beside the instruction.
562
235
 
563
236
  ```bash
564
- ubp-orchestrator execute-plan
237
+ ubp delegate run --to codex \
238
+ --instruction .ultra/.runtime/delegations/D-01/instruction.md \
239
+ --permission .ultra/.runtime/delegations/D-01/permission.json \
240
+ --worktree .ultra/.runtime/worktrees/D-01
565
241
  ```
566
242
 
567
- The orchestrator is intentionally not a replacement for Ultra gates. A worker
568
- process exiting successfully does not complete a task. Task evidence, current
569
- dev state, testing, review, integration, and baseline reconciliation still have
570
- to converge. Worktrees with uncommitted or unintegrated work are preserved for
571
- recovery.
243
+ Use `skills/ultra-delegate/scripts/delegate_wait.py` to wait for `result.json` without
244
+ loading intermediate worker output into the parent context. Delegation grants no new
245
+ authority; writable roots remain inside the worktree, and its permission file must
246
+ declare zero external effects without widening the host sandbox.
572
247
 
573
- See [Architecture](./docs/ARCHITECTURE.md) and
574
- [Workflow Lifecycle](./docs/WORKFLOW-LIFECYCLE.md) before enabling automated
575
- worker execution or verified auto-merge.
248
+ ## Host support
576
249
 
577
- ## CLI utilities
250
+ | Host | Skills | Hooks | Managed lifecycle |
251
+ |---|---:|---:|---|
252
+ | Claude Code | 14 | 5 direct | install / doctor / update / uninstall |
253
+ | Codex | 14 + native metadata | 5 through wire adapter | plugin + personal marketplace |
254
+ | OpenCode | 14 | 5 through native JS plugin | bundle + skill directories |
255
+ | Kimi Code | 14 | 5 through wire adapter | managed plugin registry |
256
+ | Grok Build | 14 | 5 through wire adapter | native plugin registration when available |
578
257
 
579
- | Binary | Purpose |
580
- |---|---|
581
- | `ultra-builder-pro-cli` / `ubp` | Install, update, uninstall, and diagnose host plugins |
582
- | `ultra-tools` | Inspect and maintain project tasks, sessions, state, migration, and recovery |
583
- | `ubp-orchestrator` | Execute current dependency waves or supervise configured workers |
258
+ See [Runtime Compatibility](docs/RUNTIME-COMPAT-MATRIX.md) for exact paths and host
259
+ limitations.
584
260
 
585
- Useful read-only checks:
261
+ ## Development
586
262
 
587
263
  ```bash
588
- ultra-tools status
589
- ultra-tools status --cost --since 24h
590
- ultra-tools session list --json
591
- ultra-tools system doctor
592
- ```
264
+ # Node contracts, package smoke, host adapters, delegation, and Skills
265
+ npm run test:node
593
266
 
594
- Ultra MCP does not require `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or another
595
- model-provider key. It validates and persists structures derived by the active
596
- host's existing model session.
597
-
598
- ## Troubleshooting
599
-
600
- - **Installed workflows are missing:** start a new host session. Kimi users can
601
- run `/reload`.
602
- - **An installed Hook or MCP path is stale:** run
603
- `npx --yes ultra-builder-pro-cli@latest --all --global --doctor --json`, then
604
- reinstall only the degraded host.
605
- - **Project state is unhealthy:** invoke `ultra-doctor` or run
606
- `ultra-tools system doctor`. Repairs and schema migrations are backup-first.
607
- - **The team checkpoint disagrees with local state:** run `ultra-status`, inspect the
608
- typed ledger condition, then use `ultra.sync` to import or publish after reviewing
609
- any real conflict. Never edit `.ultra/tasks/tasks.json` by hand.
610
- - **A generated view disagrees with MCP:** trust `.ultra/.runtime/state.db`; never edit
611
- `.ultra/.runtime/projections/` by hand.
612
- - **A draft checkpoint reports warnings:** the model keeps them visible and decides
613
- whether to investigate, revise, defer with rationale, or accept. If a checkpoint is
614
- rejected for a structural, digest, path, publication, or concurrency conflict, fix
615
- the same mutable draft and retry; no hidden workflow state must be cancelled first.
616
- - **Kimi reports a native-module ABI error:** ensure an external Node.js 22+
617
- executable is available on `PATH`; the generated Kimi MCP launcher uses
618
- `env node`.
619
-
620
- For exact recovery commands and invariants, see
621
- [Workflow Lifecycle](./docs/WORKFLOW-LIFECYCLE.md) and
622
- [State DB Access Policy](./docs/STATE-DB-ACCESS-POLICY.md).
623
-
624
- ## Development and verification
625
-
626
- ```bash
627
- npm install
628
- npm run test:all
267
+ # File-first hook behavior and wire wrappers
629
268
  npm run test:hooks
630
- npm audit --omit=dev --audit-level=high
631
269
 
632
270
  # Complete release gate
633
271
  npm run verify:release
272
+
273
+ # Inspect the exact publish artifact
274
+ npm pack --dry-run --json
634
275
  ```
635
276
 
636
- Individual Node suites are available as `test:state`, `test:orch`, `test:spec`,
637
- and `test:rest`.
277
+ Every changed Skill is also validated with the Codex Skill Creator validator. A changed
278
+ Codex manifest is validated against the Plugin Creator schema. No release effect is
279
+ implied by a green verification run.
638
280
 
639
281
  ## Documentation
640
282
 
641
- | Document | Purpose |
642
- |---|---|
643
- | [Architecture](./docs/ARCHITECTURE.md) | Components, authority boundaries, and live integration paths |
644
- | [Workflow Lifecycle](./docs/WORKFLOW-LIFECYCLE.md) | Command ownership, transitions, invalidation, recovery, and convergence |
645
- | [Runtime Compatibility Matrix](./docs/RUNTIME-COMPAT-MATRIX.md) | Claude Code, OpenCode, Codex, Kimi Code, and Grok Build presentation details |
646
- | [Legacy CLI Crosswalk](./docs/LEGACY-CLI-CROSSWALK.md) | What was preserved, strengthened, or replaced from the original Ultra Builder Pro |
647
- | [Agent Context](./docs/AGENT-CONTEXT.md) | Context Manifest and host-agent execution contract |
648
- | [Plugin Isolation Contract](./docs/PLUGIN-ISOLATION-CONTRACT.md) | Plugin ownership, explicit activation, idle behavior, and user-instruction isolation |
649
- | [State DB Access Policy](./docs/STATE-DB-ACCESS-POLICY.md) | Multi-process authority and write rules |
650
- | [Roadmap](./docs/ROADMAP.md) | Current and historical delivery scope |
651
- | [Changelog](./CHANGELOG.md) | Release history |
283
+ - [Philosophy](docs/PHILOSOPHY.md)
284
+ - [Architecture](docs/ARCHITECTURE.md)
285
+ - [Artifact Authority](docs/ARTIFACT-AUTHORITY.md)
286
+ - [Workflow Lifecycle](docs/WORKFLOW-LIFECYCLE.md)
287
+ - [Skill Authoring](docs/SKILL-AUTHORING.md)
288
+ - [Plugin Isolation](docs/PLUGIN-ISOLATION-CONTRACT.md)
289
+ - [Runtime Compatibility](docs/RUNTIME-COMPAT-MATRIX.md)
652
290
 
653
291
  ## License
654
292
 
655
- MIT — see [LICENSE](./LICENSE).
293
+ [MIT](LICENSE)