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
@@ -1,240 +1,149 @@
1
1
  # Ultra Builder Pro architecture
2
2
 
3
- Ultra Builder Pro is an adaptive delivery harness distributed as native plugins for
4
- Claude Code, Codex, OpenCode, Kimi Code, and Grok Build. The host model reasons and
5
- chooses semantic routes. Ultra preserves the accepted intent, current evidence, safe
6
- execution state, and recoverable delivery history across sessions and hosts.
7
-
8
- ## One authority graph
9
-
10
- ```mermaid
11
- flowchart LR
12
- U["User<br/>intent, trade-offs, authorization"]
13
- H["Host model<br/>inspect, recommend, implement"]
14
- S["11 explicit Skills<br/>adaptive semantic workflows"]
15
- C["Canonical Context Envelope"]
16
- M["7-tool MCP kernel"]
17
- D[("SQLite<br/>facts, indexes, CAS, leases, journals")]
18
- F[".ultra semantic files<br/>intent, specs, plans, decisions, evidence"]
19
- K["Hooks<br/>observe, inject, recover, protect"]
20
- A["Agents<br/>bounded Worker Packets"]
21
- G["Git team checkpoint"]
22
-
23
- U <--> H
24
- H --> S
25
- S --> C
26
- K --> C
27
- C --> M
28
- M <--> D
29
- H --> F
30
- M <--> F
31
- S --> A
32
- C --> A
33
- A --> F
34
- F --> G
35
- M <--> G
36
- ```
3
+ Ultra Builder Pro v0.26 is a file-first workflow asset package for five coding-agent
4
+ hosts. Its architecture is deliberately asymmetric: the host model owns meaning and
5
+ strategy; Ultra mechanizes only portable prompts, observable files, bounded effects,
6
+ and recovery.
37
7
 
38
- There is no second semantic authority:
39
-
40
- - Skills own recommendations, conditional procedure, and the meaning of completion.
41
- - The host model owns evidence synthesis and reversible implementation choices.
42
- - The user owns goals, material trade-offs, risk acceptance, and external effects.
43
- - MCP owns structure validation, idempotency, digests, CAS, leases, safe paths,
44
- filesystem journals, recovery, and accepted checkpoints.
45
- - Hooks own deterministic observation and bounded injection only.
46
- - Agents receive one immutable Worker Packet and write only the declared evidence
47
- output; the primary host owns every source change and final judgment.
48
-
49
- SQLite never chooses the next capability and never requires a fixed sequence of
50
- reasoning steps. Semantic gaps appear in `diagnostics`, `warnings`, or
51
- `needs_attention`; hard errors are reserved for corrupt authority, unsafe paths,
52
- real concurrency conflicts, missing runtime prerequisites, permissions, and
53
- irreversible external effects.
54
-
55
- ## Public MCP kernel
56
-
57
- Every host discovers exactly seven tools:
58
-
59
- | Tool | Contract |
60
- |---|---|
61
- | `ultra.context` | Side-effect-free, bounded Context Envelope read |
62
- | `ultra.record` | Typed, idempotent recording of facts, decisions, artifacts, tasks, outcomes, and observations |
63
- | `ultra.checkpoint` | Caller-declared Stage Checkpoint with structural, scope, byte, digest, and publication validation |
64
- | `ultra.sync` | Inspect, migrate, import, or publish the Git team checkpoint |
65
- | `ultra.session` | Lease/worktree acquisition plus immutable Worker Packet handoff |
66
- | `ultra.archive` | Crash-safe caller-declared local handoff and immutable archive |
67
- | `ultra.doctor` | Mechanical diagnosis and backup-first repair |
68
-
69
- Retired fine-grained tool names are not registered and return `UNKNOWN_TOOL`. The
70
- source repository retains migration readers, an explicitly named internal Change
71
- compatibility implementation, and regression fixtures for old authority. The
72
- production Change facade exposes one Kernel behavior with no mode flag; retired
73
- semantic supervisors are excluded from the npm distribution and no public call can
74
- write their workflow/dialogue authority.
75
-
76
- ## Canonical Context Envelope
77
-
78
- One generator supplies MCP reads, Hook breadcrumbs, compact recovery, Session handoff,
79
- and review/debug Workers:
8
+ ## System boundary
80
9
 
81
10
  ```text
82
- UltraContextEnvelope
83
- ├── project and host identity
84
- ├── Git head, branch, scope digest, and drift class
85
- ├── accepted baseline and evidence references
86
- ├── active Change contract and diagnostics
87
- ├── selected Task contract and dependencies
88
- ├── accepted normalized Decision Records
89
- ├── typed evidence references and freshness
90
- ├── execution lease, worktree, and Worker Packet
91
- └── warnings, needs_attention, and hard_conflicts
11
+ Owner request
12
+ │ explicit selection
13
+ ▼
14
+ User-invoked Skill ──────── recommends next public route and stops
15
+ │
16
+ ├── model-invoked disciplines (reasoning methods)
17
+ ├── source / tests / runtime / primary documentation
18
+ └── canonical project files + Git
19
+ │
20
+ ├── optional five hooks (derived context and effect guard)
21
+ └── optional delegate CLI (bounded external host process)
92
22
  ```
93
23
 
94
- Summary output is bounded to 16 KiB. A selected stage-scoped full envelope is bounded
95
- to 64 KiB. Large bodies remain lazy file references. Identical authority inputs reuse
96
- the same content-addressed snapshot and digest.
24
+ Ultra has no semantic runtime supervisor. Reading the files is the recovery protocol;
25
+ editing the files is the state transition; Git is the journal and rollback mechanism.
97
26
 
98
- ## Durable records
27
+ ## Four planes
99
28
 
100
- ### Decision Records
29
+ ### Method plane
101
30
 
102
- The host first inspects evidence, recommends a route, and asks one material question
103
- only when current user intent does not already answer it. `ultra.record` persists the
104
- normalized question, recommendation, selected result, effects, non-goals, provenance,
105
- applied references, digest, status, and supersession link. It never stores raw
106
- transcripts, prompts, chain-of-thought, or UI receipts.
31
+ Fourteen `skills/*/SKILL.md` files carry the workflow:
107
32
 
108
- Decision artifacts are team-visible:
33
+ - eight owner-invoked workflows;
34
+ - five model-invoked reusable disciplines;
35
+ - one read-only router.
109
36
 
110
- ```text
111
- .ultra/decisions/baseline/<decision-id>.json
112
- .ultra/changes/active/<change-id>/decisions/<decision-id>.json
113
- ```
37
+ The exact allowlists live in `adapters/_shared/runtime-assets.cjs`. Public workflows
38
+ never invoke another public workflow. They may use model-invoked disciplines and then
39
+ recommend the next owner route.
114
40
 
115
- ### Stage Checkpoints
41
+ ### Authority plane
116
42
 
117
- Each semantic stage has an editable draft. Acceptance creates an immutable revision.
118
- A later accepted revision supersedes the prior one without erasing history:
43
+ Canonical semantic authority consists of:
119
44
 
120
- ```text
121
- draft N -> accepted N -> superseded by accepted N+1
122
- ```
45
+ - `.ultra/north-star.md` for owner wording and hard constraints;
46
+ - `.ultra/specs/*.md` for product, architecture, discovery, and research distillate;
47
+ - `.ultra/changes/{active,archive}/<id>/intent.md` for bounded outcomes;
48
+ - `.ultra/tasks.json` plus each task's `context_file`;
49
+ - `.ultra/decisions/*.md`, `.ultra/evidence/`, `.ultra/test-report.json`, and research;
50
+ - repository-root `CONTEXT.md` for ubiquitous language;
51
+ - Git for revision identity, history, moves, diff, and rollback.
123
52
 
124
- There is no fixed step authorization table. Skills decide which evidence is relevant
125
- and whether the actual work is semantically sufficient. Checkpoint validation verifies
126
- declared facts, files, digests, scope, idempotency, and safe publication. Semantic
127
- warnings remain recorded but do not prevent an explicit caller acceptance; a hard
128
- authority conflict leaves the draft mutable.
53
+ Each semantic fact has one canonical representation. A summary can point to authority,
54
+ but cannot become a second authority merely because it is convenient to read.
129
55
 
130
- ### Worker Packets
56
+ ### Adaptation plane
131
57
 
132
- Every delegated worker receives a digest-bound packet containing the exact Context
133
- Envelope, accepted decisions, Git boundary, Task contract, acceptance, evidence
134
- references, output path, and output schema. The worker must echo `packet_digest`.
135
- Workers do not write SQLite or accept their own result.
136
- Review and debug workers do not edit source; their only mutation is the assigned
137
- evidence artifact, and the primary host applies any accepted remediation.
58
+ `adapters/*.js` translates the shared package into native host surfaces:
138
59
 
139
- ### Rejected attempts and projection metadata
60
+ - skill frontmatter and Codex `agents/openai.yaml` policy;
61
+ - plugin manifests and host registries;
62
+ - hook command paths and wire normalization;
63
+ - atomic managed installation, provenance, doctor, and uninstall behavior.
140
64
 
141
- Semantic diagnostics do not disappear when a caller corrects and retries. A rejected
142
- public call appends an `ultra_kernel_attempt` event containing the typed operation,
143
- scope, idempotency key, blockers, and diagnostics without storing raw prompts or
144
- creating the rejected semantic row. `ultra.context` exposes a bounded recent view of
145
- that audit history alongside, but outside the digest-bound semantic envelope.
65
+ `adapters/_shared/plugin-core.cjs` owns the common copy and managed-publication
66
+ mechanics. `host-profile.cjs` owns the five non-interactive delegation argv contracts.
67
+ Adapters never rewrite workflow meaning.
146
68
 
147
- Server metadata uses `_ultra.projection_commit` only for the deterministic
148
- post-mutation projection job. It must never be interpreted as proof that a semantic
149
- record, checkpoint, or archive was accepted.
69
+ ### Why the old Agents are Skill assets now
150
70
 
151
- ## `.ultra` storage planes
71
+ The retired custom-agent files did not own product authority. They contained reusable
72
+ review lenses, debugging, test execution, and review coordination. v0.26 keeps those
73
+ methods on the common surface all five hosts actually share:
152
74
 
153
- ```text
154
- .ultra/
155
- ├── specs/ # tracked baseline semantic authority
156
- ├── decisions/baseline/ # tracked normalized decisions
157
- ├── docs/research/ # tracked research evidence
158
- ├── changes/
159
- │ ├── active/<change-id>/
160
- │ │ ├── intent.md
161
- │ │ ├── diagnosis.md # incident only
162
- │ │ ├── decisions/
163
- │ │ ├── research/
164
- │ │ ├── delta/
165
- │ │ ├── plan.json
166
- │ │ ├── plan.md
167
- │ │ ├── contexts/
168
- │ │ ├── test/
169
- │ │ ├── review/
170
- │ │ ├── documentation/
171
- │ │ └── delivery/
172
- │ └── archive/ # immutable self-contained deliveries
173
- ├── tasks/tasks.json # tracked digest-chained team checkpoint
174
- ├── reports/templates/ # fixed schemas/templates
175
- └── .runtime/ # ignored checkout-local state
176
- ├── state.db[-wal|-shm]
177
- ├── projections/
178
- ├── sessions/
179
- ├── worktrees/
180
- ├── recovery/
181
- ├── backups/
182
- ├── telemetry/
183
- ├── debug/
184
- └── collab/
185
- ```
75
+ - six review workers map to `ultra-review/references/{code,design,errors,tests,spec,comments}.md`;
76
+ - review coordination and the former general code reviewer map to the parent
77
+ `ultra-review` workflow, immutable Worker Packet, and shared schemas;
78
+ - debugging maps to `ultra-dev/references/debugging.md`;
79
+ - test execution maps to `ultra-tdd/references/test-execution.md`.
80
+
81
+ The references are copied as assets of their parent Skill. Native bounded subagents are
82
+ an execution option, not an installed Ultra authority. When a host has no equivalent,
83
+ the parent model runs the same references sequentially.
84
+
85
+ ### Observation plane
86
+
87
+ Five hooks read canonical files and emit bounded context or observations. Their output
88
+ under `.ultra/.runtime/`, `.ultra/progress/`, or `.ultra/reviews/` is derived and
89
+ disposable. The dangerous-command hook is the only hard effect guard; it classifies a
90
+ small named destructive set and provides an exact-command authorization repair.
91
+ Additive protected-branch publication remains advisory when portable host wiring cannot
92
+ project a trusted owner-approval receipt; history rewrites and branch deletion remain
93
+ guarded.
94
+
95
+ ## Completion and recovery
96
+
97
+ An operation is complete only when its accepted user outcome works through the real
98
+ public seam. Route/schema/UI shells, local unit green, or an edited task status are not
99
+ end-to-end evidence by themselves.
100
+
101
+ Every user Skill starts by reading:
102
+
103
+ 1. `.ultra/tasks.json`;
104
+ 2. the unfinished task's `context_file` and closing `## Resume Note`;
105
+ 3. `CONTEXT.md` and relevant decisions;
106
+ 4. the active Change, specifications, evidence, and current Git state.
107
+
108
+ That same sequence works after compaction, a fresh process, disabled hooks, or a host
109
+ change. Compact snapshots can accelerate recovery but never outrank the source files.
110
+
111
+ ## Integration defence
112
+
113
+ Three independent Skills protect the vertical path:
114
+
115
+ 1. `ultra-plan` confirms seams and rejects horizontal feature tasks.
116
+ 2. `ultra-dev` records six separate evidence dimensions, including real persistence,
117
+ default-on behavior, vertical execution, and spec trace.
118
+ 3. `ultra-test` searches exports for real consumers and exercises the primary flow.
119
+
120
+ These are independent sensors. None rewrites a finding into product truth.
121
+
122
+ ## Delegation
123
+
124
+ `ubp delegate run` validates all paths inside the selected project, reads a bounded
125
+ instruction and permission JSON, builds argv from one host profile, and starts a
126
+ background worker. Declared writable roots must already exist inside the delegated
127
+ worktree; no readable-root or external-effect grant can widen the host's native
128
+ sandbox. Empty writable roots select native read-only mode. The model returns a
129
+ schema-constrained final response; the Node worker validates `finished`, `blocked`, or
130
+ `failed` and atomically publishes `result.json` beside the instruction. The model never
131
+ writes its own receipt; stdout, stderr, native final output, and the launch receipt
132
+ remain diagnostic files.
133
+
134
+ Delegation does not grant authority or copy semantic state into another store. The
135
+ worker reads and writes the same repository files in the specified worktree.
136
+
137
+ ## Deliberate absences
138
+
139
+ The architecture does not include:
140
+
141
+ - an Ultra database or SQLite dependency;
142
+ - an MCP server or tool protocol;
143
+ - a workflow state machine or semantic validator;
144
+ - a background orchestration daemon;
145
+ - command or custom-agent prompt projections;
146
+ - general memory, code graph, browser, deployment, or framework packages.
186
147
 
187
- Tracked Markdown and JSON carry inspectable semantic bodies and evidence. SQLite
188
- stores their typed ownership, digest, references, freshness, and mechanical state.
189
- The team checkpoint carries portable baseline, Change, Decision summary/reference,
190
- Task contracts, dependencies, accepted Stage Checkpoints, and durable outcomes. It
191
- excludes leases, PIDs, worktrees, telemetry, local `in_progress` ownership, and
192
- completion commit backfill.
193
-
194
- ## Host boundary
195
-
196
- | Host | Native plugin surface | Context truth |
197
- |---|---|---|
198
- | Claude Code | plugin commands, Skills, agents, hooks, MCP | SessionStart breadcrumb plus Skill-entry full read |
199
- | Codex | namespaced Skills, TOML agents, native hooks, MCP | session/prompt breadcrumb plus Skill-entry full read |
200
- | OpenCode | command bundle, native agents, JavaScript events, MCP | system transform plus Skill-entry full read |
201
- | Kimi Code | managed plugin commands, Skills, native hooks, MCP | native event breadcrumb plus Skill-entry full read |
202
- | Grok Build | plugin Skills, commands, agents, camelCase hooks, MCP | Skill entry is authoritative; ignored hook stdout is never claimed as injection |
203
-
204
- Adapters translate host-native questions and lifecycle events. They never own semantic
205
- selection or durable state. Unsupported host lifecycle surfaces are described as
206
- degraded, not emulated dishonestly.
207
-
208
- ## Native runtime and installation
209
-
210
- The MCP runtime externalizes `better-sqlite3` and installs its JavaScript package plus
211
- the exact native `.node` binary. Provenance records platform, architecture, Node ABI,
212
- runtime command, asset digests, and native digest. Launchers resolve a stable Node
213
- executable and reject ABI drift before opening project authority.
214
-
215
- Each host installation uses staging, the final host command for preflight, and atomic
216
- swap. Preflight verifies initialization, exactly seven tools, a public write/read,
217
- Doctor backup, close/reopen consistency, and no project initialization from
218
- `tools/list`. A failed update preserves the previous installation.
219
-
220
- ## Recovery and migration
221
-
222
- `ultra.sync` owns semantic migration. `ultra.doctor` calls the same migration service
223
- for mechanical repair and does not make semantic conflict choices. Supported inputs
224
- include v4.4/v4.5 task projections, the legacy root-level state database, legacy Task
225
- Contexts, and v0.22/v0.23 database and ledger authority.
226
-
227
- Migration is inspectable, exact-byte backup-first, transactional, and fail-closed on
228
- conflict. Old workflow and dialogue rows are retained as non-authoritative history;
229
- current Context, Decisions, Checkpoints, and the team ledger are rebuilt from verified
230
- facts. Current artifact invalidation may traverse legacy graph edges to reach a live
231
- Task, but it never rewrites the legacy workflow row. No user should edit SQLite or move
232
- a legacy file manually to recover.
233
-
234
- ## External boundaries
235
-
236
- Ultra does not own general conversational memory, prompt capture, transcript capture,
237
- code-graph payloads, browser automation, deployment providers, framework guidance, or
238
- global engineering policy. Those belong to independent providers or host/user
239
- instruction files. Ultra may store only bounded provider references needed by an
240
- accepted project checkpoint.
148
+ Adding one of these requires a reproduced failure that the file-first path cannot
149
+ repair, a named authority boundary, and a primary-path regression test.