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,158 +1,143 @@
1
1
  # Runtime compatibility matrix
2
2
 
3
- Claude Code, OpenCode, Codex, Kimi Code, and Grok Build are supported plugin
4
- hosts. The canonical asset boundary lives in
5
- `adapters/_shared/runtime-assets.cjs`.
6
-
7
- Legend: **FULL** means a native equivalent exists; **FUNCTIONAL** means the same
8
- outcome uses a different native primitive; **DEGRADED** means the missing host
9
- surface is stated and the Skill-entry Context read remains authoritative; **N/A**
10
- means intentionally absent.
11
-
12
- ## Plugin and workflow surface
13
-
14
- | Capability | Claude Code | OpenCode | Codex | Kimi Code | Grok Build |
15
- |---|---|---|---|---|---|
16
- | Package form | `.claude-plugin` | config bundle + JS plugin | personal `.codex-plugin` | managed `kimi.plugin.json` | native Grok plugin |
17
- | Public entry | `/ultra-builder-pro:ultra-*` | `/ultra-*` | `$ultra-builder-pro:ultra-*` | `/ultra-builder-pro:ultra-*` | native Ultra commands/Skills |
18
- | Public workflow Skills | 11 explicit-only | 11 command-backed private assets | 11 implicit-disabled | 11 model-disabled | 11 explicit-only |
19
- | Internal rule Skills | 4 worker-only | 4 worker-only | 4 implicit-disabled | 4 worker templates | 4 worker templates |
20
- | MCP tools | exactly 7 | exactly 7 | exactly 7 | exactly 7 | exactly 7 |
21
- | Automatic semantic chaining | N/A | N/A | N/A | N/A | N/A |
22
-
23
- Commands are thin launchers. The Skill contains adaptable semantic workflow prose;
24
- the adapter contains only host metadata, translation, and wiring.
25
-
26
- ## Agents and collaboration
27
-
28
- | Capability | Claude Code | OpenCode | Codex | Kimi Code | Grok Build |
29
- |---|---|---|---|---|---|
30
- | Bundled review/debug workers | FULL, 10 native Markdown agents | FULL, 10 native agents | FULL, 10 managed TOML agents | FUNCTIONAL, 10 prompt templates | FUNCTIONAL, 10 prompt templates |
31
- | Immutable Worker Packet | FULL | FULL | FULL | FULL | FULL |
32
- | Native bounded delegation | native agent surface | native agent surface | native subagents | Agent/AgentSwarm | plugin agent surface |
33
- | Cross-host advisor | explicit read-only | explicit read-only | explicit read-only | explicit read-only | explicit read-only |
34
- | Final acceptance owner | primary host | primary host | primary host | primary host | primary host |
35
-
36
- Every Worker Packet binds Context, decisions, Git, Task, acceptance, evidence,
37
- output schema, and digest. A worker cannot write SQLite or accept its own result.
38
-
39
- ## Hooks and Context
40
-
41
- | Lifecycle | Claude Code | OpenCode | Codex | Kimi Code | Grok Build |
42
- |---|---|---|---|---|---|
43
- | Session Context | FULL, SessionStart compact | FULL, system transform | FULL, session/prompt compact | FULL where native event consumes output | DEGRADED, ignored stdout is not claimed as injection |
44
- | Skill-entry Context | FULL | FULL | FULL | FULL | FULL and authoritative |
45
- | Managed-file protection | PreToolUse | tool.before | PreToolUse | PreToolUse | camelCase PreToolUse |
46
- | Compact recovery | PreCompact + SessionStart | compacting transform | pre/post compact | native pre/post where available | records lifecycle; Skill rereads Context |
47
- | Stop | non-blocking advisory | session.idle annotation | non-blocking advisory | non-blocking advisory | advisory only for `reason=end_turn` |
48
- | Subagent event | minimal ids | DEGRADED when host lacks event | minimal ids | native start/stop | minimal ids where exposed |
49
-
50
- All Hook context comes from the canonical Context Envelope generator. Hooks never
51
- capture prompts, transcripts, general memory, observations, or code-graph payloads.
52
- They do not create semantic records or block ordinary work for incomplete evidence.
53
-
54
- ## MCP and native runtime
55
-
56
- | Capability | Claude Code | OpenCode | Codex | Kimi Code | Grok Build |
57
- |---|---|---|---|---|---|
58
- | stdio registration | `.mcp.json` | local MCP entry | `.mcp.json` | `mcpServers` | native plugin MCP entry |
59
- | Public discovered tools | 7 | 7 | 7 | 7 | 7 |
60
- | Public write/read smoke | FULL | FULL | FULL | FULL | FULL |
61
- | Doctor backup/reopen | FULL | FULL | FULL | FULL | FULL |
62
- | Bundled `better-sqlite3` native | FULL | FULL | FULL | FULL | FULL |
63
- | ABI/provenance validation | FULL | FULL | FULL | FULL | FULL |
64
- | Git team checkpoint | `.ultra/tasks/tasks.json` | same | same | same | same |
65
- | Local authority | `.ultra/.runtime/state.db` | same | same | same | same |
66
-
67
- The installed runtime includes the externalized `better-sqlite3` package and its
68
- native `.node`. Provenance records native digest, platform, architecture, Node ABI,
69
- and runtime command. A mismatched ABI fails before authority is opened; Doctor
70
- repairs through staging and atomic swap.
71
-
72
- Archive finalization uses a packaged Python 3 worker with identity-checked
73
- descriptor-relative filesystem operations on POSIX. If this prerequisite is absent,
74
- archive fails closed with `ARCHIVE_RUNTIME_UNAVAILABLE`; other MCP tools remain usable.
75
-
76
- ## Structured user interaction
77
-
78
- | Host | Native question surface | Fallback |
3
+ Ultra Builder Pro adapts one fourteen-Skill, five-hook contract to five native hosts.
4
+ This document records the differences that belong in adapters rather than shared
5
+ Skills.
6
+
7
+ ## Installed surface
8
+
9
+ | Host | Managed plugin or bundle | Skills | Hook bridge |
10
+ |---|---|---:|---|
11
+ | Claude Code | `<config>/skills/ultra-builder-pro` | nested `skills/<name>` | direct Python commands in `hooks/hooks.json` |
12
+ | Codex | `<home>/plugins/ultra-builder-pro` plus personal marketplace entry | nested `skills/<name>` with `agents/openai.yaml` | `hooks/adapters/codex.py` |
13
+ | OpenCode | `<config>/.ultra-builder-pro` plus `<config>/plugins/ultra-builder-pro.js` | managed `<config>/skills/<name>` | native JS events call shared Python scripts |
14
+ | Kimi Code | `<config>/plugins/managed/ultra-builder-pro` plus `installed.json` | nested `skills/<name>` | `hooks/adapters/kimi.py` |
15
+ | Grok Build | `<GROK_HOME>/.ubp/plugin-sources/ultra-builder-pro` | nested `skills/<name>` | `hooks/adapters/grok.py` |
16
+
17
+ Every host receives the same eight owner workflows, five model disciplines, and one
18
+ router. Codex alone needs generated `agents/openai.yaml` files to express display data
19
+ and implicit-invocation policy; those are host metadata, not custom agents.
20
+
21
+ ## Scope resolution
22
+
23
+ | Host | Global default | Local default | Environment override |
24
+ |---|---|---|---|
25
+ | Claude Code | `~/.claude` | `<cwd>/.claude` | `CLAUDE_CONFIG_DIR` |
26
+ | Codex | `~/.codex` for config; `~/plugins` and `~/.agents` for sidecars | `<cwd>/.codex` plus home-scoped plugin surface | `CODEX_HOME` |
27
+ | OpenCode | `${XDG_CONFIG_HOME:-~/.config}/opencode` | `<cwd>/.opencode` | `OPENCODE_CONFIG_DIR` or `OPENCODE_CONFIG` |
28
+ | Kimi Code | `~/.kimi-code` | no project plugin scope | `KIMI_CODE_HOME` |
29
+ | Grok Build | `~/.grok` | no project plugin scope | `GROK_HOME` |
30
+
31
+ An explicit `--config-dir` wins over all defaults and becomes the home for any
32
+ host-owned sidecar as well. This rule makes isolated installation tests trustworthy.
33
+ With multiple selected runtimes, the CLI passes `<config-dir>/<runtime>` to each adapter
34
+ instead of merging incompatible host layouts.
35
+ Kimi and Grok currently expose user-scoped plugin installation only. `--local` rejects
36
+ them before mutating another host; an explicit `--config-dir` remains available for an
37
+ isolated user-scope installation test.
38
+
39
+ ## Invocation policy
40
+
41
+ | Role | Owner can route directly | Model can select implicitly |
42
+ |---|---:|---:|
43
+ | eight user-invoked Skills | yes | no |
44
+ | five model-invoked Skills | no | yes |
45
+ | `ultra-status` router | yes | no |
46
+
47
+ Claude and Grok receive `user-invocable` / `disable-model-invocation` frontmatter.
48
+ Kimi receives its native equivalent. Codex receives
49
+ `policy.allow_implicit_invocation` in `agents/openai.yaml`. OpenCode uses portable
50
+ source frontmatter and native discovery, but its current Skill schema has no equivalent
51
+ owner/model routing bit: all fourteen Skills remain discoverable and their descriptions
52
+ guide model selection. Ultra does not add a semantic interception hook to imitate a
53
+ host feature OpenCode does not expose.
54
+
55
+ ## Hook compatibility
56
+
57
+ | Hook | Claude | Codex | OpenCode | Kimi | Grok |
58
+ |---|---:|---:|---:|---:|---:|
59
+ | session context | yes | normalized | native bridge | normalized to message | executed; host stdout limits apply |
60
+ | mid-workflow recall | yes | handles `apply_patch` | native bridge | normalized | executed |
61
+ | compact context | pre/start | pre/post | native compact event | pre/post | pre-compact |
62
+ | post-edit observation | Write/Edit | Write/Edit/`apply_patch` | write/edit/patch | Write/Edit | Write/Edit/patch |
63
+ | dangerous command guard | Bash advisory/deny | Bash advisory/deny | bash advisory/deny | Bash advisory/deny | Bash allow/deny mapping |
64
+
65
+ All hooks share the same `.ultra/` idle guard. Wire adapters normalize payload and
66
+ output fields only; they do not change semantic policy. Codex installation health and
67
+ hook activation are distinct: Codex skips newly installed non-managed plugin hooks
68
+ until the user reviews and trusts the current definition, so Doctor reports
69
+ `hook_activation: user_review_required` without pretending the hook already ran.
70
+
71
+ ## Delegation argv
72
+
73
+ `adapters/_shared/host-profile.cjs` records current non-interactive invocation for:
74
+
75
+ - Claude print mode with structured output and an explicit file-tool allowlist; read-only
76
+ uses `plan`, while bounded write uses `acceptEdits` without Bash or web tools;
77
+ - Codex ephemeral `exec` with user config ignored, project rules preserved, native
78
+ `read-only` or `workspace-write`, network disabled, and an output schema;
79
+ - OpenCode `run --auto` only after an inline config explicitly denies Bash, web,
80
+ subagents, external directories, Skills and undeclared edit roots;
81
+ - Kimi prompt mode with a launch-only read or write agent profile that exposes only
82
+ file tools and no Bash, web, MCP, Skills or subagents;
83
+ - Grok single-turn mode with `read-only` or `workspace` OS sandbox, structured output,
84
+ no memory, web search or subagents.
85
+
86
+ The launcher accepts no external-effect authority. It binds instruction, permission and
87
+ output-schema digests, a clean Git worktree, allowed write roots, actual changed paths,
88
+ strict result schema, timeout and cancellation. Empty roots select read-only mode. The
89
+ model returns structured output and never authors the receipt. Host-native permissions
90
+ are the execution boundary; the primary host still inspects and integrates the isolated
91
+ diff.
92
+
93
+ ## Lifecycle verification
94
+
95
+ Each adapter must pass isolated install, doctor, reinstall, and uninstall tests. Real
96
+ global doctor additionally asks the native host where supported, but never repairs or
97
+ installs. Codex still performs native registration under `--config-dir`; its host process
98
+ inherits the same isolated `HOME` and `CODEX_HOME`. Grok native registration is skipped
99
+ only in explicit isolated test mode. Lifecycle tests also require the isolated config
100
+ and fake HOME to contain zero children after uninstall, while separate ownership tests
101
+ prove that pre-existing empty Codex and Kimi registries survive.
102
+
103
+ ## Authenticated cross-host continuation evidence
104
+
105
+ On 2026-08-03, one deliberately narrow task was run in an isolated Git repository to
106
+ test the product's central recovery claim with real authenticated models. This was a
107
+ continuation drill, not a full project workflow or a delegation receipt test.
108
+
109
+ Both hosts used globally installed artifacts from the same clean source candidate:
110
+
111
+ - source commit: `c473a248bde2afce77591f2ba382246d420b5c72`;
112
+ - worktree digest: `e83bdcbe2905cf02cb06cb0219127f6ce0400484331a6e9fc95622bbe24b44bd`;
113
+ - Doctor: Claude healthy with 83 assets and zero issues; Codex healthy with 99 assets
114
+ and zero issues, with optional hooks still `user_review_required`.
115
+
116
+ The seed repository had one passing smoke test, one pending task, one mapped Change
117
+ acceptance ID, and seed HEAD `cf27d62aeeae353e0650413de6d9a118b89a0406`.
118
+
119
+ | Phase | Execution boundary | Observed result |
79
120
  |---|---|---|
80
- | Claude Code | `AskUserQuestion` | one concise direct question |
81
- | OpenCode | `question` | one concise direct question |
82
- | Codex | `request_user_input` when exposed by current mode | one concise direct question |
83
- | Kimi Code | `AskUserQuestion` outside auto mode | one concise direct question |
84
- | Grok Build | native structured question when exposed | one concise direct question |
85
-
86
- An interaction-disabled mode leaves the choice unresolved. The adapter never infers
87
- consent or stores an interaction receipt.
88
-
89
- ## User instruction isolation
90
-
91
- | Host | Durable user instruction | Installer writes it? |
92
- |---|---|---|
93
- | Claude Code | `~/.claude/CLAUDE.md` | no |
94
- | OpenCode | `~/.config/opencode/AGENTS.md` | no |
95
- | Codex | `~/.codex/AGENTS.md` | no |
96
- | Kimi Code | `~/.kimi-code/AGENTS.md` | no |
97
- | Grok Build | host-owned instruction file | no |
98
-
99
- Install, update, Doctor, and uninstall preserve user instructions, repository
100
- instructions, project `.ultra`, unrelated plugins, and unrelated host configuration.
101
-
102
- ## Install lifecycle
103
-
104
- | Capability | Claude Code | OpenCode | Codex | Kimi Code | Grok Build |
105
- |---|---|---|---|---|---|
106
- | Global flag | `--claude` | `--opencode` | `--codex` | `--kimi` | `--grok` |
107
- | Staging + atomic swap | FULL | FULL | FULL | FULL | FULL |
108
- | Exact-host preflight | FULL | FULL | FULL | FULL | FULL |
109
- | Native registration truth | host manifest | host config | plugin manifest/cache | installed registry | `grok plugin list/details` |
110
- | Active MCP truth | host MCP config | host MCP config | plugin cache | managed plugin config | `grok inspect` + `grok mcp doctor` |
111
- | Managed uninstall guard | FULL | FULL | FULL | FULL | FULL |
112
- | Preserve unrelated config | FULL | FULL | FULL | FULL | FULL |
113
- | Read-only Doctor | FULL | FULL | FULL | FULL | FULL |
114
-
115
- Preflight uses the final manifest command and verifies initialize, `tools/list == 7`,
116
- public write/read, Doctor backup, close/reopen consistency, native provenance, and
117
- lazy project initialization.
118
-
119
- The Grok adapter probes the installed CLI's command and flag capabilities rather
120
- than branching on a Grok version number. Global installation uses Grok's native
121
- plugin registry, keeps a durable managed local source for native refresh, and
122
- resolves the MCP launcher through `${GROK_PLUGIN_ROOT}` after Grok copies the plugin
123
- under its dynamic `installed-plugins/<repo-key>` path. An older raw
124
- `$GROK_HOME/plugins/ultra-builder-pro` installation is backed up and migrated; a
125
- failed native install restores the prior source and registration.
126
-
127
- `grok mcp list` is not the plugin-MCP inventory surface in current Grok releases;
128
- it reports explicit user/project MCP configuration. Ultra therefore does not add a
129
- second `[mcp_servers]` entry merely to make that command display the plugin. The
130
- authoritative plugin consumer checks are the native plugin registry, merged
131
- `grok inspect` MCP source, and the live `grok mcp doctor` handshake.
132
-
133
- ## Durable compatibility
134
-
135
- | Capability | Contract |
136
- |---|---|
137
- | Current authority schema | `22.0` |
138
- | Runtime values | `claude`, `opencode`, `codex`, `kimi`, `grok` |
139
- | Legacy inputs | v4.4/v4.5 task projections, the legacy root-level state database, Task Contexts, v0.22/v0.23 DB and team ledger |
140
- | Preservation | exact-byte backup, row/ID/event/migration-history preservation, verified semantic promotion |
141
- | Failure | transactional rollback; no partial DB, ledger, native runtime, or host installation |
142
-
143
- Old workflow/dialogue rows are retained as non-authoritative history. Current
144
- Decisions, Stage Checkpoints, Context Envelopes, Worker Packets, and team checkpoint
145
- are reconstructed only from verified authority.
146
-
147
- ## Verification sources
148
-
149
- - `adapters/tests/*.test.cjs` validates every native builder and manifest.
150
- - `tests/conformance/<runtime>/*.test.cjs` validates all five hosts.
151
- - `adapters/_shared/tests/runtime-assets.test.cjs` keeps docs and asset allowlists
152
- synchronized.
153
- - `tests/install.test.cjs` verifies atomic install, rollback, Doctor, and instruction
154
- preservation.
155
- - `tests/package-smoke.test.cjs` installs the npm tarball and performs five real
156
- launcher write/read/backup/reopen round trips.
157
- - Grok acceptance runs capability probing, native install/list/details/enable,
158
- merged inspect, MCP Doctor, migration rollback, and camelCase Hook fixtures.
121
+ | Claude | One print-mode call, `acceptEdits`, no persistent session, empty MCP config, explicit file and local-test tools, USD 1.00 cap | Exit 0 at USD 0.741367 with zero web requests. It changed only the task ledger/context, added `test/slug.test.cjs`, and allowed the hook to write disposable progress. `src/slug.cjs` and completion evidence remained untouched. The task test exited 1 with actual `hello,-world!` versus expected `hello-world`; both task surfaces read `in_progress`, and the Resume Note named the exact next action. |
122
+ | Codex | One ephemeral `workspace-write` call with sandbox network disabled and no conversation from Claude | Exit 0. It found and read the installed `ultra-dev` Skill, recovered the single task from Git and `.ultra/`, reproduced the same red, changed only the intended implementation, then passed the task test 1/1 and `npm test` 2/2. It wrote the three-command canonical evidence record and logs, completed both task status surfaces, and filled Completion and the final Resume Note. |
123
+ | Independent check | Local commands after both model calls | `node --test test/slug.test.cjs` passed 1/1, `npm test` passed 2/2, `git diff --check` passed, and a structural check confirmed one completed task, six evidence dimensions, three existing command-log references, and matching ledger/context state. |
124
+
125
+ The Codex process emitted non-blocking diagnostics for an older local model-cache
126
+ schema and an unauthenticated user-config MCP startup. No MCP result was consumed and
127
+ no external effect occurred; all task actions used local file and shell tools. This
128
+ means the drill proves file-backed Claude-to-Codex continuation even while Codex hooks
129
+ remain untrusted, but it does not claim that arbitrary user configuration starts
130
+ without unrelated host diagnostics.
131
+
132
+ The result establishes one real end-to-end example of cross-host resume without a
133
+ shared conversation, database, MCP authority, daemon, or generated prompt projection.
134
+ It does not establish output quality for every model, host, repository, or task shape.
135
+ Task-level `ultra-review` and commits were intentionally excluded from the drill so the
136
+ two host calls tested only the handoff boundary.
137
+
138
+ Two older `.ultra` evidence snapshots originally named the completed WIP by its former
139
+ path. The current-path artifact contract requires every reference to resolve in the
140
+ checkout, so those two references now point here while their 2026-08-01 status and
141
+ limitations remain explicitly historical. The original WIP is still recoverable from
142
+ their pinned source commit `3f99189bc68697262cd90444685ac2d4857139c4` with
143
+ `git show`; the live `docs/wip/` directory contains no unfinished document.
@@ -1,75 +1,96 @@
1
1
  # Skill authoring contract
2
2
 
3
- Ultra Builder Pro keeps one portable source workflow and adapts only runtime metadata
4
- or host invocation details. This contract follows OpenAI Skills guidance and the Agent
5
- Skills progressive-disclosure format:
6
-
7
- - <https://learn.chatgpt.com/docs/build-skills>
8
- - <https://learn.chatgpt.com/docs/customization/overview>
9
- - <https://agentskills.io/specification>
10
- - <https://agentskills.io/skill-creation/best-practices>
11
-
12
- ## Surface ownership
13
-
14
- | Content | Owner |
15
- |---|---|
16
- | Repeatable task procedure and conditional references | `skills/<name>/SKILL.md` |
17
- | Codex display, invocation policy, and dependencies | `skills/<name>/agents/openai.yaml` after adaptation |
18
- | Host launcher | `commands/<name>.md` |
19
- | Durable repository or user engineering policy | `AGENTS.md` or the host equivalent |
20
- | Deterministic lifecycle enforcement | one hook implementation |
21
- | Live external data or actions | MCP server or connector |
22
- | Bounded delegated role | `agents/<name>.md` |
23
-
24
- Do not duplicate a rule across these surfaces.
25
-
26
- ## Portable `SKILL.md`
27
-
28
- Source frontmatter contains only `name` and `description`. The description says what
29
- the Skill does and when it should activate. The body uses imperative, outcome-oriented
30
- steps and includes only information an agent cannot reliably infer from the task,
31
- repository, or host policy.
32
-
33
- Keep the main file compact. Move conditional domain detail to `references/`, reusable
34
- deterministic work to `scripts/`, and output material to `assets/`. Reference a file
35
- only from the main workflow or one directly relevant reference.
36
-
37
- ## Language
38
-
39
- The standards do not prohibit Chinese. Ultra source prompts use English as a project
40
- policy because one source is transformed for Claude Code, Codex, OpenCode, Kimi Code,
41
- and Grok Build. The host or user instruction controls the response language; a workflow must not
42
- hard-code the user's output language unless language is itself part of the task.
43
-
44
- Maintainer documentation may use the language appropriate for its audience. English
45
- source prompts are a portability rule, not a claim that multilingual Skills are invalid.
46
-
47
- ## Content that does not belong in a Skill prompt
48
-
49
- - release notes, migration history, old-version behavior, or implementation diary;
50
- - host tool inventories, model pins, package paths, and dependency metadata shared by
51
- only one runtime;
52
- - generic engineering doctrine already owned by user or repository instructions;
53
- - one-off project facts, volatile external facts, or copied datasets;
54
- - duplicated command bodies, hook policy, MCP schemas, or private memory behavior;
55
- - arbitrary coverage, confidence, complexity, option-count, or severity thresholds;
56
- - pattern matching that turns TODOs, mocks, catch blocks, or line counts directly into
57
- findings without a reachable impact;
58
- - tutorial-style old/new or good/bad comparisons that do not change the workflow;
59
- - menus of hypothetical alternatives when one repository default already satisfies the
60
- contract.
61
-
62
- Comparison is appropriate only when the task requires a real decision or verification:
63
- compare credible alternatives against shared constraints, accepted specification
64
- against delivered behavior, or independent analyses against authoritative evidence.
65
-
66
- ## Review checklist
67
-
68
- 1. Does the description state a precise use condition?
69
- 2. Is every instruction reusable for this Skill rather than copied global policy?
70
- 3. Is host-specific metadata outside the portable prompt?
71
- 4. Does each conditional reference earn its context cost?
72
- 5. Are judgments evidence-based rather than threshold-based?
73
- 6. Are commands thin and agents bounded?
74
- 7. Do positive and negative trigger evals cover accidental activation?
75
- 8. Do source, five generated runtimes, and package contents pass validation?
3
+ Ultra Skills are portable model-facing methods. They describe outcomes, evidence, and
4
+ owner boundaries; host-specific discovery and invocation policy belong in adapters.
5
+
6
+ ## Role selection
7
+
8
+ Choose exactly one role before writing:
9
+
10
+ - **user-invoked**: a complete owner-selected workflow with a durable outcome;
11
+ - **model-invoked**: a reusable discipline used by at least two canonical workflows;
12
+ - **router**: read-only diagnosis that recommends the smallest next public route.
13
+
14
+ A user workflow may recommend but must not invoke another user workflow. A discipline
15
+ with only one real caller should be inlined.
16
+
17
+ ## Portable frontmatter
18
+
19
+ Source `SKILL.md` frontmatter contains only:
20
+
21
+ ```yaml
22
+ ---
23
+ name: lower-case-hyphen-name
24
+ description: What this produces and the concrete situations that trigger it.
25
+ ---
26
+ ```
27
+
28
+ Adapters generate Claude/Grok/Kimi invocation flags and Codex `agents/openai.yaml`.
29
+ Do not put host paths, dependency declarations, plugin policy, or release history in
30
+ source frontmatter.
31
+
32
+ ## Required shape
33
+
34
+ Every Skill has one outcome-led title and these semantic sections:
35
+
36
+ ```text
37
+ ## Before you start
38
+ ## Definition of done
39
+ ## <workflow-specific process>
40
+ ## When the owner decides
41
+ ## References
42
+ ```
43
+
44
+ User workflows begin by reading `.ultra/tasks.json`, the unfinished task's
45
+ `context_file` and Resume Note, `CONTEXT.md`, and relevant decisions. They name the
46
+ files they write and read them back. Completion criteria must be observable without a
47
+ semantic validator.
48
+
49
+ Use positive leading words consistently: tracer bullet, seam, deep module, red,
50
+ frontier, and fog of war. Explain a branch by its checkable result, not the model's
51
+ reason for choosing it.
52
+
53
+ ## Progressive disclosure
54
+
55
+ Keep resident `SKILL.md` short enough to load on every invocation. Move focused detail
56
+ into `references/` and deterministic validation or waiting into `scripts/`.
57
+
58
+ - Load one research step or review lens at a time.
59
+ - Keep one canonical copy of grilling, TDD, review, domain language, and autonomy rules.
60
+ - Cross-reference another model-invoked Skill by relative path.
61
+ - Do not hide the primary workflow in a script.
62
+ - A script may check paths, schemas, counts, hashes, process status, or other mechanical
63
+ facts; it may not decide semantic completeness.
64
+
65
+ Rule-side executable examples live with the consuming Skill. They are never copied
66
+ wholesale into project authority.
67
+
68
+ ## Language and host neutrality
69
+
70
+ Model-facing Skills, references, scripts, comments, and identifiers are English.
71
+ Shared Skills never mention `.claude`, `.codex`, `.opencode`, `.kimi`, `.grok`, or a
72
+ host-only question surface. Use “host-native question surface” and put the translation
73
+ in the adapter.
74
+
75
+ ## Safety boundary
76
+
77
+ The owner decides intent, acceptance, reductions, material risk, irreversible actions,
78
+ and external effects. The model owns investigation, design, decomposition, evidence
79
+ interpretation, reversible implementation detail, and final expression.
80
+
81
+ Semantic gaps are diagnostics. A Skill must not invent a hard gate based on counters,
82
+ regexes, similarity, context estimates, or workflow position. Every real hard effect
83
+ guard names its invariant, authoritative input, blocked effect, and reachable repair.
84
+
85
+ ## Validation
86
+
87
+ For every changed Skill:
88
+
89
+ 1. run the Skill Creator validator;
90
+ 2. resolve every relative reference in the source and installed artifact;
91
+ 3. verify its role metadata on all five hosts;
92
+ 4. test the accepted workflow with representative valid and adversarial inputs;
93
+ 5. confirm no retired runtime vocabulary or host-specific path entered portable text.
94
+
95
+ The repository's `tests/skill-authoring.test.cjs` and
96
+ `tests/v026-contract.test.cjs` mechanize the portable parts of this contract.