ultra-builder-pro-cli 0.25.1 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ultra-template/contexts/TEMPLATE.md +87 -0
- package/.ultra-template/decisions/.gitkeep +1 -0
- package/.ultra-template/evidence/.gitkeep +1 -0
- package/.ultra-template/north-star.md +46 -0
- package/.ultra-template/research/.gitkeep +1 -0
- package/.ultra-template/specs/discovery.md +2 -2
- package/.ultra-template/tasks.json +3 -0
- package/.ultra-template/test-report.json +27 -0
- package/CHANGELOG.md +40 -0
- package/README.md +217 -579
- package/adapters/_shared/delegate-profiles/kimi-read-only.md +15 -0
- package/adapters/_shared/delegate-profiles/kimi-write.md +17 -0
- package/adapters/_shared/file-ops.cjs +76 -2
- package/adapters/_shared/host-profile.cjs +97 -0
- package/adapters/_shared/plugin-core.cjs +204 -0
- package/adapters/_shared/runtime-assets.cjs +31 -96
- package/adapters/claude.js +92 -291
- package/adapters/codex.js +309 -842
- package/adapters/grok.js +143 -1469
- package/adapters/kimi.js +124 -1053
- package/adapters/opencode.js +230 -742
- package/bin/delegate-worker.cjs +323 -0
- package/bin/delegate.cjs +456 -0
- package/bin/install.js +38 -11
- package/docs/ARCHITECTURE.md +122 -216
- package/docs/ARTIFACT-AUTHORITY.md +90 -268
- package/docs/DECISIONS.md +75 -87
- package/docs/PHILOSOPHY.md +177 -0
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +62 -39
- package/docs/RUNTIME-COMPAT-MATRIX.md +99 -156
- package/docs/SKILL-AUTHORING.md +94 -73
- package/docs/WORKFLOW-LIFECYCLE.md +93 -189
- package/hooks/README.md +17 -37
- package/hooks/_common.py +113 -0
- package/hooks/adapters/codex.py +9 -16
- package/hooks/adapters/grok.py +5 -5
- package/hooks/adapters/kimi.py +8 -14
- package/hooks/block_dangerous_commands.py +95 -0
- package/hooks/compact_context.py +65 -0
- package/hooks/mid_workflow_recall.py +25 -0
- package/hooks/post_edit_guard.py +105 -0
- package/hooks/session_context.py +30 -0
- package/package.json +17 -52
- package/skills/ultra-change/SKILL.md +97 -50
- package/skills/ultra-change/references/change-contract.md +40 -1
- package/skills/ultra-delegate/SKILL.md +82 -0
- package/skills/ultra-delegate/references/delegation-contract.md +51 -0
- package/skills/ultra-delegate/scripts/delegate_wait.py +86 -0
- package/skills/ultra-deliver/SKILL.md +61 -42
- package/skills/ultra-deliver/references/baseline-reconciliation.md +39 -20
- package/skills/ultra-dev/SKILL.md +96 -62
- package/skills/ultra-dev/references/debugging.md +22 -0
- package/skills/ultra-domain-modeling/SKILL.md +79 -0
- package/skills/ultra-grilling/SKILL.md +79 -0
- package/skills/ultra-init/SKILL.md +94 -37
- package/skills/ultra-init/references/brownfield-adoption.md +33 -83
- package/skills/ultra-init/scripts/init_project.cjs +84 -0
- package/skills/ultra-plan/SKILL.md +88 -68
- package/skills/ultra-research/SKILL.md +62 -48
- package/skills/ultra-research/references/00-problem-validation.md +5 -5
- package/skills/ultra-research/references/01-opportunity-discovery.md +3 -3
- package/skills/ultra-research/references/02-market-assessment.md +5 -4
- package/skills/ultra-research/references/03-competitive-landscape.md +3 -3
- package/skills/ultra-research/references/04-product-strategy.md +3 -3
- package/skills/ultra-research/references/05-assumptions-validation.md +5 -5
- package/skills/ultra-research/references/10-user-personas.md +3 -2
- package/skills/ultra-research/references/11-user-scenarios.md +3 -3
- package/skills/ultra-research/references/20-user-stories.md +4 -3
- package/skills/ultra-research/references/21-features-scope.md +3 -2
- package/skills/ultra-research/references/22-success-metrics.md +3 -3
- package/skills/ultra-research/references/30-architecture-context.md +3 -3
- package/skills/ultra-research/references/31-solution-strategy.md +3 -3
- package/skills/ultra-research/references/32-building-blocks.md +3 -3
- package/skills/ultra-research/references/40-deployment.md +3 -3
- package/skills/ultra-research/references/41-quality-risks.md +3 -3
- package/skills/ultra-research/references/99-synthesis.md +7 -7
- package/skills/ultra-review/SKILL.md +59 -32
- package/skills/ultra-review/references/code.md +17 -0
- package/skills/ultra-review/references/comments.md +12 -0
- package/skills/ultra-review/references/design.md +12 -0
- package/skills/ultra-review/references/errors.md +13 -0
- package/skills/ultra-review/references/spec.md +13 -0
- package/skills/ultra-review/references/tests.md +12 -0
- package/skills/ultra-review/references/worker-packet.md +40 -0
- package/skills/ultra-review/scripts/review_wait.py +26 -15
- package/skills/ultra-status/SKILL.md +61 -36
- package/skills/ultra-tdd/SKILL.md +81 -0
- package/skills/ultra-tdd/references/templates/README.md +20 -0
- package/skills/ultra-tdd/references/templates/feature-flag-default-audit.sh +79 -0
- package/skills/ultra-tdd/references/templates/persistence-real.ts +78 -0
- package/skills/ultra-tdd/references/templates/testcontainer-postgres.py +78 -0
- package/skills/ultra-tdd/references/templates/testcontainer-postgres.ts +73 -0
- package/skills/ultra-tdd/references/templates/vertical-slice.ts +66 -0
- package/skills/ultra-tdd/references/test-execution.md +18 -0
- package/skills/ultra-test/SKILL.md +70 -30
- package/skills/ultra-test/references/export-syntax.md +18 -0
- package/skills/ultra-test/scripts/worktree_digest.cjs +54 -0
- package/skills/ultra-think/SKILL.md +49 -27
- package/skills/ultra-think/references/autonomy-boundary.md +48 -0
- package/skills/ultra-think/references/interaction-boundary.md +18 -33
- package/.ultra-template/docs/research/README.md +0 -55
- package/.ultra-template/reports/templates/delivery-report.json +0 -17
- package/.ultra-template/reports/templates/test-report.json +0 -18
- package/.ultra-template/tasks/tasks.json +0 -15
- package/.ultra-template/templates/task-context.md +0 -19
- package/adapters/_shared/codex-assets.cjs +0 -725
- package/adapters/_shared/codex-ultra-tools-entry.cjs +0 -11
- package/adapters/_shared/interaction-contract.cjs +0 -129
- package/adapters/_shared/path-rewrite.cjs +0 -79
- package/adapters/_shared/runtime-native.cjs +0 -132
- package/adapters/_shared/settings-merge.cjs +0 -76
- package/agents/code-reviewer.md +0 -42
- package/agents/debugger.md +0 -40
- package/agents/review-code.md +0 -49
- package/agents/review-comments.md +0 -38
- package/agents/review-coordinator.md +0 -56
- package/agents/review-design.md +0 -40
- package/agents/review-errors.md +0 -43
- package/agents/review-spec.md +0 -39
- package/agents/review-tests.md +0 -40
- package/agents/tdd-runner.md +0 -38
- package/bin/orchestrator.js +0 -383
- package/commands/ultra-change.md +0 -10
- package/commands/ultra-deliver.md +0 -10
- package/commands/ultra-dev.md +0 -10
- package/commands/ultra-doctor.md +0 -10
- package/commands/ultra-init.md +0 -10
- package/commands/ultra-plan.md +0 -10
- package/commands/ultra-research.md +0 -10
- package/commands/ultra-review.md +0 -10
- package/commands/ultra-status.md +0 -10
- package/commands/ultra-test.md +0 -10
- package/commands/ultra-think.md +0 -10
- package/docs/AGENT-CONTEXT.md +0 -191
- package/docs/COMMIT-HASH-BACKFILL.md +0 -51
- package/docs/LEGACY-CLI-CROSSWALK.md +0 -175
- package/docs/ROADMAP.md +0 -101
- package/docs/STATE-DB-ACCESS-POLICY.md +0 -161
- package/hooks/active_task_context.py +0 -152
- package/hooks/context_envelope.py +0 -100
- package/hooks/health_check.py +0 -196
- package/hooks/pre_stop_check.py +0 -66
- package/hooks/runtime_paths.py +0 -396
- package/hooks/subagent_tracker.py +0 -88
- package/hooks/workflow_checkpoint.py +0 -76
- package/hooks/workflow_context.py +0 -48
- package/hooks/workflow_resume.py +0 -84
- package/mcp-server/hook-context.cjs +0 -38
- package/mcp-server/hook-event.cjs +0 -34
- package/mcp-server/lib/archive-journal.cjs +0 -1119
- package/mcp-server/lib/archive-mutation-worker.py +0 -365
- package/mcp-server/lib/artifact-registry.cjs +0 -1232
- package/mcp-server/lib/baseline-workflow.cjs +0 -1193
- package/mcp-server/lib/canonical-json.cjs +0 -19
- package/mcp-server/lib/change-authority.cjs +0 -26
- package/mcp-server/lib/change-packet.cjs +0 -790
- package/mcp-server/lib/change-workflow.cjs +0 -65
- package/mcp-server/lib/context-envelope.cjs +0 -581
- package/mcp-server/lib/context-paths.cjs +0 -142
- package/mcp-server/lib/decision-records.cjs +0 -423
- package/mcp-server/lib/delivery-transaction.cjs +0 -471
- package/mcp-server/lib/doctor-backup-worker.cjs +0 -328
- package/mcp-server/lib/doctor.cjs +0 -627
- package/mcp-server/lib/git-bootstrap.cjs +0 -651
- package/mcp-server/lib/init-project.cjs +0 -1021
- package/mcp-server/lib/kernel-change-workflow.cjs +0 -2029
- package/mcp-server/lib/legacy-change-workflow.cjs +0 -3032
- package/mcp-server/lib/managed-file-write.cjs +0 -172
- package/mcp-server/lib/plan-checkpoint.cjs +0 -177
- package/mcp-server/lib/plan-publication-worker.cjs +0 -830
- package/mcp-server/lib/plan-store.cjs +0 -794
- package/mcp-server/lib/prd-parser.cjs +0 -83
- package/mcp-server/lib/pricing.cjs +0 -44
- package/mcp-server/lib/project-context.cjs +0 -178
- package/mcp-server/lib/projector.cjs +0 -386
- package/mcp-server/lib/provider-refs.cjs +0 -42
- package/mcp-server/lib/runtime-paths.cjs +0 -1714
- package/mcp-server/lib/runtime-state.cjs +0 -222
- package/mcp-server/lib/safe-project-file.cjs +0 -385
- package/mcp-server/lib/stage-checkpoints.cjs +0 -463
- package/mcp-server/lib/state-authority.cjs +0 -95
- package/mcp-server/lib/state-db.cjs +0 -1580
- package/mcp-server/lib/state-ops.cjs +0 -1428
- package/mcp-server/lib/task-contract.cjs +0 -404
- package/mcp-server/lib/task-expander.cjs +0 -105
- package/mcp-server/lib/task-ledger.cjs +0 -1964
- package/mcp-server/lib/telemetry.cjs +0 -85
- package/mcp-server/lib/topo.cjs +0 -131
- package/mcp-server/lib/ultra-facade.cjs +0 -2684
- package/mcp-server/lib/worker-packet.cjs +0 -358
- package/mcp-server/server.cjs +0 -437
- package/orchestrator/auto-merge.cjs +0 -128
- package/orchestrator/daemon.cjs +0 -264
- package/orchestrator/dispatch-rules.cjs +0 -78
- package/orchestrator/parallel-orchestrator.cjs +0 -903
- package/orchestrator/planner/plan-builder.cjs +0 -125
- package/orchestrator/recovery.cjs +0 -188
- package/orchestrator/session-close-journal-worker.cjs +0 -5
- package/orchestrator/session-close-journal.cjs +0 -1014
- package/orchestrator/session-runner.cjs +0 -1153
- package/orchestrator/worktree-manager.cjs +0 -282
- package/settings.json +0 -7
- package/skills/cc-collab/SKILL.md +0 -42
- package/skills/code-review-expert/SKILL.md +0 -43
- package/skills/code-review-expert/references/correctness-reliability.md +0 -30
- package/skills/code-review-expert/references/design-boundaries.md +0 -26
- package/skills/code-review-expert/references/removal-plan.md +0 -24
- package/skills/codex-collab/SKILL.md +0 -49
- package/skills/codex-collab/evals/evals.json +0 -35
- package/skills/integration-rules/SKILL.md +0 -32
- package/skills/security-rules/SKILL.md +0 -38
- package/skills/testing-rules/SKILL.md +0 -32
- package/skills/ultra-doctor/SKILL.md +0 -41
- package/skills/ultra-plan/references/semantic-preflight.md +0 -20
- package/skills/ultra-verify/SKILL.md +0 -46
- package/skills/ultra-verify/evals/evals.json +0 -46
- package/skills/ultra-verify/references/cross-verify-modes.md +0 -28
- package/skills/ultra-verify/references/evidence-status.md +0 -21
- package/skills/ultra-verify/scripts/verify_wait.py +0 -94
- package/spec/cli-protocol.md +0 -102
- package/spec/mcp-tools.yaml +0 -312
- package/spec/schemas/baseline-reconciliation.v1.schema.json +0 -73
- package/spec/schemas/change-delta.v1.schema.json +0 -153
- package/spec/schemas/command-manifest.schema.json +0 -29
- package/spec/schemas/context-file.v4.5.schema.json +0 -54
- package/spec/schemas/delivery-report.v1.schema.json +0 -66
- package/spec/schemas/documentation-reconciliation.v1.schema.json +0 -106
- package/spec/schemas/mcp-tools.schema.json +0 -136
- package/spec/schemas/skill-manifest.schema.json +0 -24
- package/spec/schemas/state-db.sql +0 -641
- package/spec/schemas/task-ledger.v2.schema.json +0 -296
- package/spec/schemas/tasks.v4.5.schema.json +0 -96
- package/spec/schemas/test-report.v1.schema.json +0 -225
- package/ultra-tools/cli.cjs +0 -129
- package/ultra-tools/commands/db.cjs +0 -226
- package/ultra-tools/commands/legacy-memory.cjs +0 -159
- package/ultra-tools/commands/migrate.cjs +0 -1386
- package/ultra-tools/commands/session.cjs +0 -213
- package/ultra-tools/commands/status.cjs +0 -559
- package/ultra-tools/commands/system.cjs +0 -498
- package/ultra-tools/commands/task.cjs +0 -105
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Ultra Builder PHILOSOPHY (v0.26)
|
|
2
|
+
|
|
3
|
+
**Authority**: This document defines the harness design philosophy. Every hook, Skill, template,
|
|
4
|
+
and CLI behavior must be justifiable by these principles. Conflicts → cite the principle, not the
|
|
5
|
+
rule.
|
|
6
|
+
|
|
7
|
+
**Provenance**: Goals 1–4 and Commandments C1–C5 are carried forward unchanged in substance from
|
|
8
|
+
Ultra Builder Pro v7.0, where they were derived from a 2026-04-30 system audit of real failures.
|
|
9
|
+
Do not weaken any of them without a reproduced failure case.
|
|
10
|
+
|
|
11
|
+
**Why exactly four goals and five commandments** — the counts are not sacred, the derivation
|
|
12
|
+
rules are:
|
|
13
|
+
|
|
14
|
+
- A **goal** is a class of systemic failure that has actually recurred, stated positively.
|
|
15
|
+
A fifth goal requires naming a fifth recurring failure class that none of these four covers.
|
|
16
|
+
- A **commandment** is a rule the model must cite to resolve a semantic conflict. If the model
|
|
17
|
+
will never face a moment where it needs to invoke the rule, the rule is not a commandment —
|
|
18
|
+
it is either a code invariant (enforce and test it) or dead weight (delete it).
|
|
19
|
+
|
|
20
|
+
By that second rule, "stay silent in repositories that never opted in" is **not** a commandment:
|
|
21
|
+
it is `if not exists('.ultra'): exit(0)`, a mechanical invariant the model never reasons about.
|
|
22
|
+
It lives in `docs/PLUGIN-ISOLATION-CONTRACT.md` and is verified by test, not by citation.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 4 Core Goals
|
|
27
|
+
|
|
28
|
+
The harness exists to serve these — every constraint derives its legitimacy from contributing to
|
|
29
|
+
one or more.
|
|
30
|
+
|
|
31
|
+
1. **Intent Fidelity** — what the user said they wanted is what gets built. No silent
|
|
32
|
+
reinterpretation, no scope creep, no convenient shortcuts that drift from the original ask.
|
|
33
|
+
2. **Long-term Evolvability** — iteration #5 is as easy as iteration #1. Cognitive debt cannot
|
|
34
|
+
accumulate; spec / task / code / doc must stay coherent.
|
|
35
|
+
3. **Production-Ready** — real persistence, real tests, real integration. No in-memory facades,
|
|
36
|
+
no `default off` to dodge integration, no `it.skip` to dodge failures.
|
|
37
|
+
4. **Cognitive Coherence** — agent and user share the same picture of "what is currently true."
|
|
38
|
+
Spec changes propagate. Doc rot is detected. Orphan code surfaces.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 5 Commandments
|
|
43
|
+
|
|
44
|
+
### C1 — Goal-Always-Present
|
|
45
|
+
|
|
46
|
+
The agent never stops seeing the north-star. Every hook trigger that costs context budget injects:
|
|
47
|
+
the project one-liner plus the current task's acceptance criteria. The cost of repetition is
|
|
48
|
+
always less than the cost of drift.
|
|
49
|
+
|
|
50
|
+
> **Test**: pick a random in-progress task, ask the agent "what's the acceptance criteria?" — if
|
|
51
|
+
> it cannot answer in one sentence, this commandment is broken.
|
|
52
|
+
|
|
53
|
+
### C2 — Enabling > Defensive
|
|
54
|
+
|
|
55
|
+
Every prohibition ships with a runnable alternative. Prohibitions without an enabling path force
|
|
56
|
+
agents to find loopholes (rename `mock` to `stub`, etc.). The cheaper path must be the right path.
|
|
57
|
+
|
|
58
|
+
> **Test**: scan every prohibition in every Skill; each must reference a template that exists
|
|
59
|
+
> under that Skill's `references/templates/` and can be copied as-is. The templates are rules,
|
|
60
|
+
> so they ship with the package rather than being copied into each project.
|
|
61
|
+
|
|
62
|
+
### C3 — Sensors not Blockers
|
|
63
|
+
|
|
64
|
+
Hooks emit signal; agents and users decide. Block only the **truly irreversible**:
|
|
65
|
+
|
|
66
|
+
- `git push` to protected branches
|
|
67
|
+
- Funds transfer / on-chain transactions
|
|
68
|
+
- DB migrations / `DROP` / `TRUNCATE`
|
|
69
|
+
- Hardcoded secret commit
|
|
70
|
+
- Arbitrary code execution driven by user input
|
|
71
|
+
|
|
72
|
+
Everything else is advisory on stderr — the work stands, the signal is delivered, the agent
|
|
73
|
+
proceeds.
|
|
74
|
+
|
|
75
|
+
> **Why this is absolute**: hard final gates and hard pre-commit gates each produced the same
|
|
76
|
+
> over-correction loop in v7 — the agent weakened tests to escape the gate and drifted from the
|
|
77
|
+
> spec. A gate that can be escaped by damaging the work is worse than no gate.
|
|
78
|
+
|
|
79
|
+
> **Test**: count blocking outputs across all hooks; they must map 1:1 to the irreversible list.
|
|
80
|
+
|
|
81
|
+
### C4 — Incremental Validation
|
|
82
|
+
|
|
83
|
+
The agent always knows "how far from done." Each edit updates `.ultra/progress/<task-id>.json`
|
|
84
|
+
with evidence completeness across six dimensions. Final-gate audits are forbidden — if a gap
|
|
85
|
+
matters at the end, it matters mid-flight.
|
|
86
|
+
|
|
87
|
+
> **Scoped exception**: whole-system wiring audit (`ultra-test`) is necessarily terminal, because
|
|
88
|
+
> "this export has no non-test importer" cannot be evaluated while later tasks are still pending.
|
|
89
|
+
> It is a terminal **sensor**, never a gate: it reports and hands the trade-off to the owner.
|
|
90
|
+
> This is the only permitted end-of-flow audit.
|
|
91
|
+
|
|
92
|
+
> **Test**: at any point in a task, reading `.ultra/progress/<task-id>.json` answers "what's left."
|
|
93
|
+
|
|
94
|
+
### C5 — Bounded Autonomy
|
|
95
|
+
|
|
96
|
+
Autonomy is defined by goals, not rules. Inside the boundary the agent picks freely; crossing the
|
|
97
|
+
boundary surfaces to the user.
|
|
98
|
+
|
|
99
|
+
- **Inside**: choosing libraries, naming, file layout, internal abstractions, decomposition
|
|
100
|
+
strategy, evidence interpretation, prioritization, final expression
|
|
101
|
+
- **Crossing**: weakening test assertions, modifying spec to match implementation, default-off
|
|
102
|
+
feature flags, in-memory replacing real persistence, scope reduction, external or irreversible
|
|
103
|
+
effects
|
|
104
|
+
|
|
105
|
+
**Operational test for spec changes.** When implementation and spec disagree, classify the change
|
|
106
|
+
before touching the spec. Do not classify by intent — classify by asking one question that can be
|
|
107
|
+
checked against the file:
|
|
108
|
+
|
|
109
|
+
> **Does every commitment the spec already made still hold after this change?**
|
|
110
|
+
|
|
111
|
+
| Answer | Classification | Action |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| Yes, and it now commits to more | EXPANSION | write it, log it |
|
|
114
|
+
| Yes, the commitment is unchanged but stated correctly | CORRECTION | write it, log it |
|
|
115
|
+
| **No — at least one prior commitment no longer holds** | **REDUCTION** | **stop and ask the owner** |
|
|
116
|
+
|
|
117
|
+
The classification follows from the outcome, never from the reason. A well-argued rationale does
|
|
118
|
+
not convert a REDUCTION into a CORRECTION; the rationale goes into the question put to the owner.
|
|
119
|
+
This is the mechanism by which specs shrink silently, so it is the one place the model must not
|
|
120
|
+
be allowed to self-certify.
|
|
121
|
+
|
|
122
|
+
> **Test**: any boundary-crossing action must trigger an owner question, an active task
|
|
123
|
+
> `## Change Log` entry, or an accepted `.ultra/decisions/<id>.md`.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## When commandments conflict
|
|
128
|
+
|
|
129
|
+
Goals override commandments. Commandments override rules. Cite the higher level:
|
|
130
|
+
|
|
131
|
+
- `C2 overrides rule "no mock" → use the testcontainer template`
|
|
132
|
+
- `goal Intent-Fidelity overrides C5 → ask the owner before reducing scope`
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Modifying this file
|
|
137
|
+
|
|
138
|
+
Changes to PHILOSOPHY require:
|
|
139
|
+
|
|
140
|
+
1. A concrete failure case the change addresses, linked in the active Change or evidence
|
|
141
|
+
2. An impact assessment on every dependent hook and Skill
|
|
142
|
+
3. Migration of any dependent constraint
|
|
143
|
+
|
|
144
|
+
PHILOSOPHY is the only file whose changes propagate to every prohibition, template reference, and
|
|
145
|
+
Skill instruction. Do not touch it casually.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Contract Table
|
|
150
|
+
|
|
151
|
+
> Each row is a hardcoded contract between two parts of the system. Changing one side **without**
|
|
152
|
+
> the other was the v7 audit's #1 cause of silently broken Goal-Always-Present injection. Update
|
|
153
|
+
> this table BEFORE editing either side.
|
|
154
|
+
|
|
155
|
+
| Consumer | Reads | Source of truth | Failure mode if drifted |
|
|
156
|
+
|---|---|---|---|
|
|
157
|
+
| `session_context` | headings `## One-line`, `## Hard Constraints` | `.ultra-template/north-star.md` | SessionStart shows no goal; C1 dies |
|
|
158
|
+
| `session_context` | active `in_progress` task → its context | `tasks.json[].context_file` | acceptance criteria never surfaced |
|
|
159
|
+
| `mid_workflow_recall` | heading `## Acceptance Criteria` | `.ultra-template/contexts/TEMPLATE.md` | hook injects nothing; C1 dies silently |
|
|
160
|
+
| `ultra-tdd` | path `references/templates/*` | `skills/ultra-tdd/references/templates/` | guidance points at a missing runnable alternative; C2 dies |
|
|
161
|
+
| `post_edit_guard` | writes `.ultra/progress/<task-id>.json` | `tasks.json[].id`, created on demand | mechanical observations disappear; C4 weakens |
|
|
162
|
+
| `ultra-dev` and `post_edit_guard` | 6 keys: `tests_written`, `tests_passed`, `persistence_real`, `feature_flags_audit`, `vertical_slice`, `spec_trace` | the six-dimension table in `skills/ultra-dev/SKILL.md` | sensor and workflow report different evidence |
|
|
163
|
+
| planning and status | marker `[NEEDS CLARIFICATION]` | `.ultra-template/specs/*.md` | unresolved product truth is hidden |
|
|
164
|
+
| `ultra-plan` / `ultra-dev` / hooks | `trace_to` form `.ultra/specs/file.md#anchor` | `tasks.json[].trace_to` + GFM heading slugify | traces appear resolved when their heading is absent |
|
|
165
|
+
| `ultra-deliver` / `ultra-status` | field `git_commit` | `.ultra/test-report.json` | stale test results pass as current |
|
|
166
|
+
| `compact_context` | `.ultra/.runtime/compact-snapshot.md` | derived from canonical files and Git | compact recovery loses acceleration, not authority |
|
|
167
|
+
| every hook | existence of `.ultra/` | the project directory | Ultra taxes projects that never opted in (see `docs/PLUGIN-ISOLATION-CONTRACT.md`) |
|
|
168
|
+
| `ultra-init` | the project data skeleton | `.ultra-template/` and the exact file list in its Skill | later Skills read missing authority paths; C1 dies |
|
|
169
|
+
|
|
170
|
+
### Maintenance protocol
|
|
171
|
+
|
|
172
|
+
Before editing any row's source of truth:
|
|
173
|
+
|
|
174
|
+
1. Find every consumer in this table
|
|
175
|
+
2. Update consumer and source together in one change
|
|
176
|
+
3. Re-run the end-to-end injection check
|
|
177
|
+
4. Update this table if the contract surface changed
|
|
@@ -1,59 +1,82 @@
|
|
|
1
|
-
# Plugin
|
|
1
|
+
# Plugin isolation contract
|
|
2
2
|
|
|
3
|
-
Ultra Builder Pro
|
|
4
|
-
|
|
3
|
+
Ultra Builder Pro owns a narrow install surface and becomes active only in a project
|
|
4
|
+
that contains `.ultra/` or when the owner explicitly invokes an Ultra Skill.
|
|
5
5
|
|
|
6
6
|
## Owned surfaces
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Per host, Ultra may install:
|
|
9
9
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
10
|
+
- exactly fourteen managed Skills;
|
|
11
|
+
- exactly five hook scripts plus `_common.py` and any required wire adapter;
|
|
12
|
+
- one native plugin manifest or entrypoint;
|
|
13
|
+
- provenance and managed-ownership markers;
|
|
14
|
+
- the host's native registry entry where required.
|
|
13
15
|
|
|
14
|
-
The
|
|
15
|
-
Ultra owns only the repository-local `.ultra/` workflow-memory envelope and its
|
|
16
|
-
MCP-published checkpoint plus generated local projections.
|
|
16
|
+
The package also owns `ubp delegate run`, its worker, and rule-side Skill references.
|
|
17
17
|
|
|
18
18
|
## Surfaces Ultra does not own
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Ultra must not create or rewrite:
|
|
21
21
|
|
|
22
|
-
- user
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
22
|
+
- global user instruction files such as `~/.codex/AGENTS.md` or
|
|
23
|
+
`~/.claude/CLAUDE.md`;
|
|
24
|
+
- general memory, code-graph, browser, deployment, framework, or productivity assets;
|
|
25
|
+
- user-defined commands, agents, plugins, hooks, or registry entries;
|
|
26
|
+
- repository files outside `.ultra/` and `CONTEXT.md` unless the selected engineering
|
|
27
|
+
task itself authorizes them;
|
|
28
|
+
- an Ultra database, server registration, semantic runtime, or daemon.
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
contract takes effect. They are not silently removed because the plugin cannot prove
|
|
29
|
-
ownership or preserve unrelated edits. The owner may review and remove them separately.
|
|
30
|
+
## Installation lifecycle
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
Install builds a complete staging tree, marks it managed, writes provenance, then
|
|
33
|
+
atomically publishes it. An existing unmanaged target is never overwritten. Reinstall
|
|
34
|
+
replaces only the managed tree. Doctor is read-only. Uninstall removes only assets
|
|
35
|
+
whose ownership can be proven.
|
|
36
|
+
|
|
37
|
+
Host-owned sidecars must resolve from the same isolation root as `--config-dir`. For
|
|
38
|
+
Codex this includes both `plugins/ultra-builder-pro` and
|
|
39
|
+
`.agents/plugins/marketplace.json`; sandbox installation must not touch the real home
|
|
40
|
+
directory. Codex native registration runs with both `HOME` and `CODEX_HOME` set to that
|
|
41
|
+
root. If registration fails, install restores the previous managed tree and marketplace,
|
|
42
|
+
or removes every fresh partial artifact.
|
|
32
43
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
or authorize that recommendation.
|
|
44
|
+
When one invocation selects multiple hosts, the supplied path is a parent isolation
|
|
45
|
+
root and each adapter receives `<path>/<runtime>`. Sharing one concrete config directory
|
|
46
|
+
would collide host-native `skills/` and `plugins/` layouts.
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
OpenCode installation may remove a specifically recognizable Ultra registration from
|
|
49
|
+
an older release. It must preserve unrelated configuration and files.
|
|
39
50
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
51
|
+
Before first install, each adapter records only the exact config files and directory
|
|
52
|
+
shells that do not yet exist. Uninstall may prune those recorded paths only when they
|
|
53
|
+
are still empty (or a zero-byte host-created file); it preserves every pre-existing,
|
|
54
|
+
non-empty, modified, symlinked, or unowned path. Codex marketplace and Kimi registry
|
|
55
|
+
files additionally remember whether Ultra created the registry itself, so an empty
|
|
56
|
+
registry that existed before installation is retained.
|
|
57
|
+
|
|
58
|
+
## Activation
|
|
46
59
|
|
|
47
|
-
|
|
60
|
+
Owner-invoked Skills activate only through the host's explicit Skill surface.
|
|
61
|
+
Model-invoked Skills may be selected by the host model only as methods inside the
|
|
62
|
+
current authorized task. Hooks activate only through host lifecycle registrations.
|
|
63
|
+
|
|
64
|
+
One public Skill may recommend another but never launches it. Installation does not
|
|
65
|
+
create project authority or start background work.
|
|
48
66
|
|
|
49
67
|
## Idle behavior
|
|
50
68
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
69
|
+
Every hook resolves the current project and checks for `.ultra/` before reading,
|
|
70
|
+
writing, injecting context, or denying an effect. Without `.ultra/`, it emits no stdout,
|
|
71
|
+
exits zero, and leaves the project untouched.
|
|
72
|
+
|
|
73
|
+
The only hook denial is a named dangerous shell effect in an active Ultra project. The
|
|
74
|
+
denial identifies the protected effect and supplies an exact-command SHA-256
|
|
75
|
+
authorization path. All other hook failures are fail-open diagnostics.
|
|
76
|
+
|
|
77
|
+
## Project data boundary
|
|
56
78
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
79
|
+
Canonical project data is owner-readable and Git-compatible. Derived hook, review, and
|
|
80
|
+
delegation artifacts live only under ignored `.ultra/.runtime/`, `.ultra/progress/`, or
|
|
81
|
+
`.ultra/reviews/`. Disabling or uninstalling Ultra leaves canonical project data intact
|
|
82
|
+
and resumable by ordinary file reading.
|
|
@@ -1,158 +1,101 @@
|
|
|
1
1
|
# Runtime compatibility matrix
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
##
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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.
|
|
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 | Bash | bash | Bash | Bash 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.
|