ultra-builder-pro-cli 0.22.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ultra-template/docs/research/README.md +4 -4
- package/CHANGELOG.md +83 -0
- package/README.md +68 -35
- package/adapters/_shared/codex-assets.cjs +121 -60
- package/adapters/_shared/interaction-contract.cjs +20 -7
- package/adapters/_shared/provenance.cjs +7 -2
- package/adapters/_shared/runtime-assets.cjs +4 -3
- package/adapters/_shared/runtime-native.cjs +132 -0
- package/adapters/claude.js +61 -31
- package/adapters/codex.js +178 -81
- package/adapters/grok.js +372 -0
- package/adapters/kimi.js +8 -4
- package/adapters/opencode.js +211 -33
- package/agents/code-reviewer.md +4 -2
- package/agents/debugger.md +4 -1
- package/agents/review-code.md +7 -3
- package/agents/review-comments.md +7 -4
- package/agents/review-coordinator.md +11 -7
- package/agents/review-design.md +8 -4
- package/agents/review-errors.md +8 -4
- package/agents/review-spec.md +8 -5
- package/agents/review-tests.md +7 -4
- package/agents/tdd-runner.md +5 -2
- package/bin/install.js +9 -4
- package/bin/orchestrator.js +4 -13
- package/docs/AGENT-CONTEXT.md +141 -231
- package/docs/ARCHITECTURE.md +203 -498
- package/docs/ARTIFACT-AUTHORITY.md +38 -35
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +12 -9
- package/docs/ROADMAP.md +85 -110
- package/docs/RUNTIME-COMPAT-MATRIX.md +139 -174
- package/docs/SKILL-AUTHORING.md +3 -3
- package/docs/STATE-DB-ACCESS-POLICY.md +25 -20
- package/docs/WORKFLOW-LIFECYCLE.md +174 -442
- package/hooks/README.md +11 -8
- package/hooks/active_task_context.py +16 -16
- package/hooks/adapters/grok.py +134 -0
- package/hooks/{context_spine.py → context_envelope.py} +26 -22
- package/hooks/health_check.py +19 -29
- package/hooks/pre_stop_check.py +22 -12
- package/hooks/subagent_tracker.py +1 -1
- package/hooks/workflow_checkpoint.py +14 -13
- package/hooks/workflow_context.py +11 -12
- package/hooks/workflow_resume.py +14 -13
- package/mcp-server/{breadcrumb.cjs → hook-context.cjs} +7 -9
- package/mcp-server/lib/artifact-registry.cjs +25 -1
- package/mcp-server/lib/baseline-workflow.cjs +36 -38
- package/mcp-server/lib/canonical-json.cjs +19 -0
- package/mcp-server/lib/change-workflow.cjs +637 -49
- package/mcp-server/lib/context-envelope.cjs +508 -0
- package/mcp-server/lib/decision-records.cjs +337 -0
- package/mcp-server/lib/doctor.cjs +91 -33
- package/mcp-server/lib/init-project.cjs +78 -39
- package/mcp-server/lib/managed-file-write.cjs +116 -0
- package/mcp-server/lib/plan-checkpoint.cjs +177 -0
- package/mcp-server/lib/project-context.cjs +178 -0
- package/mcp-server/lib/stage-checkpoints.cjs +309 -0
- package/mcp-server/lib/state-db.cjs +155 -24
- package/mcp-server/lib/task-ledger.cjs +522 -13
- package/mcp-server/lib/ultra-facade.cjs +834 -0
- package/mcp-server/lib/worker-packet.cjs +358 -0
- package/mcp-server/server.cjs +208 -1059
- package/orchestrator/daemon.cjs +27 -9
- package/orchestrator/parallel-orchestrator.cjs +111 -76
- package/orchestrator/session-runner.cjs +135 -34
- package/package.json +10 -3
- package/skills/ultra-change/SKILL.md +39 -98
- package/skills/ultra-deliver/SKILL.md +42 -65
- package/skills/ultra-dev/SKILL.md +52 -99
- package/skills/ultra-doctor/SKILL.md +35 -57
- package/skills/ultra-init/SKILL.md +48 -88
- package/skills/ultra-init/references/brownfield-adoption.md +11 -8
- package/skills/ultra-plan/SKILL.md +54 -132
- package/skills/ultra-research/SKILL.md +58 -112
- package/skills/ultra-review/SKILL.md +28 -46
- package/skills/ultra-review/references/unified-schema.md +2 -0
- package/skills/ultra-review/scripts/review_wait.py +8 -0
- package/skills/ultra-status/SKILL.md +22 -45
- package/skills/ultra-test/SKILL.md +27 -61
- package/skills/ultra-think/SKILL.md +29 -48
- package/skills/ultra-think/references/interaction-boundary.md +56 -0
- package/spec/cli-protocol.md +80 -187
- package/spec/mcp-tools.yaml +130 -2738
- package/spec/schemas/mcp-tools.schema.json +1 -1
- package/spec/schemas/state-db.sql +107 -4
- package/spec/schemas/{task-ledger.v1.schema.json → task-ledger.v2.schema.json} +70 -6
- package/ultra-tools/commands/status.cjs +369 -243
- package/mcp-server/lib/context-spine.cjs +0 -1208
- package/mcp-server/lib/decision-dialogue.cjs +0 -1128
- package/mcp-server/lib/project-breadcrumb.cjs +0 -173
- package/mcp-server/lib/spec-learning.cjs +0 -284
- package/mcp-server/lib/workflow-state.cjs +0 -2965
- package/skills/ultra-think/references/decision-dialogue.md +0 -153
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra-builder-pro-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Explicitly invoked Ultra Builder Pro workflows for Claude Code, OpenCode, Codex CLI,
|
|
3
|
+
"version": "0.24.0",
|
|
4
|
+
"description": "Explicitly invoked Ultra Builder Pro workflows for Claude Code, OpenCode, Codex CLI, Kimi Code, and Grok Build, with a project-local MCP persistence and safety kernel.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ultra-builder-pro-cli": "bin/install.js",
|
|
7
7
|
"ubp": "bin/install.js",
|
|
@@ -61,13 +61,19 @@
|
|
|
61
61
|
"!**/*.pyo",
|
|
62
62
|
"!**/*.test.cjs",
|
|
63
63
|
"!**/tests/**",
|
|
64
|
-
"!mcp-server/test-support/**"
|
|
64
|
+
"!mcp-server/test-support/**",
|
|
65
|
+
"!mcp-server/lib/workflow-state.cjs",
|
|
66
|
+
"!mcp-server/lib/decision-dialogue.cjs",
|
|
67
|
+
"!mcp-server/lib/context-spine.cjs",
|
|
68
|
+
"!mcp-server/lib/project-breadcrumb.cjs",
|
|
69
|
+
"!mcp-server/lib/spec-learning.cjs"
|
|
65
70
|
],
|
|
66
71
|
"keywords": [
|
|
67
72
|
"claude-code",
|
|
68
73
|
"opencode",
|
|
69
74
|
"codex",
|
|
70
75
|
"kimi-code",
|
|
76
|
+
"grok-build",
|
|
71
77
|
"agent",
|
|
72
78
|
"cli",
|
|
73
79
|
"multi-runtime",
|
|
@@ -101,6 +107,7 @@
|
|
|
101
107
|
"prepublishOnly": "npm run verify:release",
|
|
102
108
|
"install:claude": "node bin/install.js --claude --local",
|
|
103
109
|
"install:kimi": "node bin/install.js --kimi --local",
|
|
110
|
+
"install:grok": "node bin/install.js --grok --local",
|
|
104
111
|
"install:all": "node bin/install.js --all --local"
|
|
105
112
|
},
|
|
106
113
|
"dependencies": {
|
|
@@ -3,105 +3,46 @@ name: ultra-change
|
|
|
3
3
|
description: Capture or revise one bounded feature, fix, redesign, or incident contract against a ready Ultra baseline. Use when post-baseline work needs accepted intent before research, planning, or implementation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Capture accepted
|
|
6
|
+
# Capture accepted Change intent
|
|
7
7
|
|
|
8
|
-
Change is the durable unit
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Read `../ultra-think/references/decision-dialogue.md` before asking a material question.
|
|
8
|
+
A Change is the durable unit connecting research, plan, implementation, verification,
|
|
9
|
+
review, documentation, and delivery. Its draft stays editable until a semantic
|
|
10
|
+
checkpoint accepts the downstream authority.
|
|
13
11
|
|
|
14
12
|
## Inspect and align
|
|
15
13
|
|
|
16
|
-
1.
|
|
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
|
-
## Persist the contract
|
|
52
|
-
|
|
53
|
-
When a durable alignment checkpoint is necessary, bind it to a compact artifact and
|
|
54
|
-
pass its id as `alignment_thread_id`. Do not require a checkpoint for a complete,
|
|
55
|
-
unambiguous request that already provides current authority.
|
|
56
|
-
|
|
57
|
-
Call `change.create`. It records and completes exactly:
|
|
58
|
-
|
|
59
|
-
1. `bind-baseline`
|
|
60
|
-
2. `classify-change`
|
|
61
|
-
3. `record-intent`
|
|
62
|
-
|
|
63
|
-
The returned change workflow must be `completed`; research, plan, context, dev, test,
|
|
64
|
-
review, and deliver remain independent capabilities. Keep every Change-owned semantic
|
|
65
|
-
artifact, finding, plan, context, test result, review result, documentation update,
|
|
66
|
-
and progress projection below `.ultra/changes/active/<id>/`. Incidents maintain the
|
|
67
|
-
structured diagnosis artifact there as well.
|
|
68
|
-
|
|
69
|
-
`change.create` and `change.update` publish the portable Change Contract to
|
|
70
|
-
`.ultra/tasks/tasks.json`, even before the Change owns tasks. The tracked Change
|
|
71
|
-
artifacts carry semantic bodies; the checkpoint carries normalized baseline, Change,
|
|
72
|
-
and task records with digest ancestry. Never edit either generated checkpoint or
|
|
73
|
-
checkout-local projection directly.
|
|
74
|
-
|
|
75
|
-
Before planning a standard or major change, write the accepted specification updates
|
|
76
|
-
to the Change overlay and call `change.delta` with exact baseline id, repository
|
|
77
|
-
revision, specification digests, decisions, non-goals, acceptance, documentation
|
|
78
|
-
impact, unknowns, and mutation before/after digests. If accepted behavior truly does
|
|
79
|
-
not change baseline semantics, record an empty typed delta with a specific
|
|
80
|
-
`no_semantic_change_reason`; do not manufacture a mutation. Read back the registered
|
|
81
|
-
delta and deterministic `progress.md`. This records proposed authority only and must
|
|
82
|
-
not edit baseline specifications.
|
|
83
|
-
|
|
84
|
-
Use `change.update` when accepted intent or evidence changes. Update the Change
|
|
85
|
-
Contract, classification, research disposition, and docs impact together when their
|
|
86
|
-
meaning is coupled. Downstream task, context, test, or review evidence affected by that
|
|
87
|
-
change must become stale and be regenerated; never keep old evidence green by prompt
|
|
88
|
-
assertion.
|
|
89
|
-
|
|
90
|
-
If research is required, recommend `ultra-research` with the recorded disposition. If
|
|
91
|
-
the contract is sufficiently evidenced, finish the typed delta and recommend
|
|
92
|
-
`ultra-plan`. Direct Build skips Research only; it never skips Plan, DB-backed task
|
|
93
|
-
contracts, or fresh task context. Return and wait for an explicit user invocation; do
|
|
94
|
-
not start another workflow. `change.context` is compiled only for an actual plan,
|
|
95
|
-
implementation, test, or review consumer.
|
|
96
|
-
|
|
97
|
-
Stable implementation discoveries use the approval-gated specification-learning
|
|
98
|
-
transitions. External memory and graph providers retain their own content; Ultra stores
|
|
99
|
-
metadata references only.
|
|
100
|
-
|
|
101
|
-
Return the normalized contract, change id and kind, research disposition, blockers,
|
|
102
|
-
and `allowed_transitions`. Recommend a semantic next action from those transitions.
|
|
103
|
-
If current intent does not already select it, present the recommendation and credible
|
|
104
|
-
alternatives through the interaction protocol, then wait. MCP does not encode a
|
|
105
|
-
semantic next action.
|
|
106
|
-
|
|
107
|
-
Never invoke the recommended capability here; wait for an explicit user invocation.
|
|
14
|
+
1. Call `ultra.context { stage: project, detail: full }`.
|
|
15
|
+
2. Inspect or import the team checkpoint with `ultra.sync`. Stop only on a real
|
|
16
|
+
baseline, Change, task, ancestry, or active-session conflict.
|
|
17
|
+
3. Reuse an existing matching Change. Do not duplicate authority.
|
|
18
|
+
4. Convert the request into observable outcome, executable acceptance, non-goals,
|
|
19
|
+
public seams, recovery, verification, documentation impact, risk, and research
|
|
20
|
+
disposition.
|
|
21
|
+
5. Recommend `quick`, `standard`, `major`, or `incident` from evidence. Ask only when
|
|
22
|
+
a choice changes accepted product intent, compatibility, security, material cost,
|
|
23
|
+
external effects, or recovery.
|
|
24
|
+
|
|
25
|
+
Read `../ultra-think/references/interaction-boundary.md` before asking. MCP may report
|
|
26
|
+
contradictory risk fields, but the model and owner choose the semantic correction.
|
|
27
|
+
|
|
28
|
+
## Record the contract
|
|
29
|
+
|
|
30
|
+
Use one `ultra.record` batch with `change_contract / open` or
|
|
31
|
+
`change_contract / revise`, relevant `decision / accept`, and `artifact / bind` for
|
|
32
|
+
an already-known typed delta. Every entry carries a stable idempotency key. Read the
|
|
33
|
+
result through `ultra.context`.
|
|
34
|
+
|
|
35
|
+
Keep every Change-owned semantic artifact below
|
|
36
|
+
`.ultra/changes/active/<change-id>/`. Standard and major Changes require a typed delta
|
|
37
|
+
before planning. A true no-semantic-change case records an explicit reason instead of
|
|
38
|
+
manufacturing a mutation.
|
|
39
|
+
|
|
40
|
+
Changing accepted intent creates a new accepted checkpoint revision and makes only
|
|
41
|
+
genuinely dependent evidence stale. Readiness is derived, not a stored absorbing
|
|
42
|
+
state. A semantic rejection returns diagnostics; repair and retry the same draft.
|
|
43
|
+
Use `change_contract / cancel` only when the owner intentionally abandons the Change.
|
|
44
|
+
|
|
45
|
+
Publish the durable Change contract with `ultra.sync { action: publish }` when it is a
|
|
46
|
+
useful team handoff. Recommend bounded `ultra-research` for a real evidence gap or
|
|
47
|
+
`ultra-plan` when the contract is sufficiently evidenced. Do not invoke the next
|
|
48
|
+
capability automatically.
|
|
@@ -1,71 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-deliver
|
|
3
|
-
description: Converge a verified Ultra
|
|
3
|
+
description: Converge a verified Ultra Change, reconcile baseline specifications, and archive it with recoverable local evidence. Use when implementation, testing, and review are current.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Converge and archive local authority
|
|
7
7
|
|
|
8
|
-
Delivery closes
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
1.
|
|
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
|
-
rebinds every registered artifact into the self-contained archive, and rolls back or
|
|
50
|
-
resumes from its transaction journal after interruption. A partial success is not
|
|
51
|
-
delivery. Archive publication refreshes the checkpoint with the archived Change and
|
|
52
|
-
new baseline summary. Verify the refreshed baseline and archived packet, then record
|
|
53
|
-
`archive-change`.
|
|
54
|
-
|
|
55
|
-
Write `<archived-change-root>/delivery/<workflow-id>/report.json` with
|
|
56
|
-
`ultra-delivery-report-v1`: archived change, baseline, HEAD, worktree and context
|
|
57
|
-
digests, local checks, rollback notes, and timestamp. The report must not contain a
|
|
58
|
-
release decision. Record it under `verify-delivery` and complete the workflow.
|
|
59
|
-
|
|
60
|
-
## External effects
|
|
61
|
-
|
|
62
|
-
If the user separately requests commit, push, tag, publish, or deploy, handle that as a
|
|
63
|
-
host-owned effect after Ultra delivery. Confirm only missing material authority, run
|
|
64
|
-
the repository's release checks, and report remote evidence separately. Never infer an
|
|
65
|
-
external effect from `ultra-deliver`, and never encode it as completed Ultra delivery
|
|
66
|
-
state.
|
|
67
|
-
|
|
68
|
-
Return archive and baseline state, evidence digests, recovery notes, residual risks,
|
|
69
|
-
and allowed transitions.
|
|
70
|
-
|
|
71
|
-
Never invoke the recommended capability here; wait for an explicit user invocation.
|
|
8
|
+
Delivery closes local Ultra authority. It never grants commit, push, tag, registry
|
|
9
|
+
publication, deployment, or another external effect.
|
|
10
|
+
|
|
11
|
+
## Prepare the packet
|
|
12
|
+
|
|
13
|
+
1. Call `ultra.context { stage: deliver, scope: { change_id }, detail: full }`.
|
|
14
|
+
2. Import a newer team checkpoint with `ultra.sync`; stop on a real conflict.
|
|
15
|
+
3. Require current task outcomes, test report, both review axes, accepted decisions,
|
|
16
|
+
typed delta, documentation reconciliation, and current checkout evidence.
|
|
17
|
+
4. Resolve every specification-learning candidate. Keep updates inside the Change
|
|
18
|
+
overlay until archive.
|
|
19
|
+
5. Write and register documentation reconciliation and an
|
|
20
|
+
`ultra-delivery-report-v1` report. The report binds Change, baseline, HEAD,
|
|
21
|
+
worktree/context digests, local checks, rollback guidance, and timestamp; it contains
|
|
22
|
+
no release decision.
|
|
23
|
+
|
|
24
|
+
Use one typed `ultra.record` batch for `artifact / bind`, any normalized
|
|
25
|
+
`decision / accept`, and bounded `event / append` facts.
|
|
26
|
+
|
|
27
|
+
## Archive once
|
|
28
|
+
|
|
29
|
+
Call `ultra.archive` once with the Change id, stable idempotency key, archive summary,
|
|
30
|
+
reconciliation fields, delivery evidence steps, and report output. The operation
|
|
31
|
+
internally:
|
|
32
|
+
|
|
33
|
+
- compiles or reuses convergence context;
|
|
34
|
+
- checks the deliver draft;
|
|
35
|
+
- derives convergence from current dev, test, review, delta, docs, and checkout;
|
|
36
|
+
- applies the overlay and archive through the recoverable filesystem/DB transaction;
|
|
37
|
+
- rebinds registered artifacts into a self-contained archive;
|
|
38
|
+
- accepts one immutable delivery checkpoint revision;
|
|
39
|
+
- publishes the updated team checkpoint.
|
|
40
|
+
|
|
41
|
+
A semantic rejection returns mutable blockers. Repair the same packet and retry. A
|
|
42
|
+
hard corruption, path, concurrency, or recovery error remains fail-closed and routes to
|
|
43
|
+
`ultra-doctor`.
|
|
44
|
+
|
|
45
|
+
Verify the archived packet, baseline, checkpoint, and rollback state. Handle any
|
|
46
|
+
separately authorized Git or release effect only after local delivery and report it as
|
|
47
|
+
external evidence, not Ultra delivery authority. Do not invoke another capability
|
|
48
|
+
automatically.
|
|
@@ -5,102 +5,55 @@ description: Implement one authoritative Ultra task through a fresh-context, tes
|
|
|
5
5
|
|
|
6
6
|
# Implement one task
|
|
7
7
|
|
|
8
|
-
The
|
|
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
|
-
The tracked team checkpoint contains durable task status and contract evidence, not
|
|
61
|
-
live ownership. `in_progress`, `session_id`, leases, worktrees, telemetry, and
|
|
62
|
-
`completion_commit` remain checkout-local. The local generated task view lives under
|
|
63
|
-
`.ultra/.runtime/projections/` and is never committed.
|
|
64
|
-
|
|
65
|
-
Treat the compiled task-context contract as the handoff boundary: purpose, why,
|
|
66
|
-
constraints, non-goals, target seams/files, pattern refs, acceptance, documentation
|
|
67
|
-
impact, recovery, and definition of drift. If accepted intent, the task contract, or a
|
|
68
|
-
digest-bound reference changes, update the owning authority and recompile rather than
|
|
69
|
-
continuing from a stale packet.
|
|
70
|
-
|
|
71
|
-
Keep implementation findings and documentation candidates inside the owning Change
|
|
72
|
-
root. When code changes invalidate or extend maintained documentation, update the
|
|
73
|
-
Change documentation overlay and its evidence rather than editing accepted baseline
|
|
74
|
-
specifications. Hooks may remind the host to reconcile documentation; they must not
|
|
75
|
-
block ordinary development or choose the semantic update.
|
|
76
|
-
|
|
77
|
-
Task-level tests and review belong to this inner loop. They do not replace aggregate
|
|
78
|
-
change testing or review when multiple slices, integrations, or broader risks require
|
|
79
|
-
those capabilities.
|
|
80
|
-
|
|
81
|
-
## Complete or recover
|
|
82
|
-
|
|
83
|
-
In direct mode, integrate the task commit through the repository's accepted path,
|
|
84
|
-
verify ancestry and the public seam, close the session, record `record-completion`,
|
|
85
|
-
and complete the dev workflow. If commit creation fails after the pre-commit
|
|
86
|
-
completion checkpoint, move the still-session-owned task to `blocked`, preserve the
|
|
87
|
-
worktree, and record the failure. A completion with a recorded commit remains
|
|
88
|
-
terminal.
|
|
89
|
-
|
|
90
|
-
Change convergence revalidates the exact latest
|
|
91
|
-
`change_id + task_id + implement + implementation` snapshot for every executable
|
|
92
|
-
task. A newer review, test, or plan packet cannot substitute for it.
|
|
93
|
-
|
|
94
|
-
In a parent-supervised worker, record completion evidence and exit without closing the
|
|
95
|
-
parent-owned lease. The primary host verifies the exact session commit, performs any
|
|
96
|
-
integration, refreshes review if the reviewed checkout changed, settles the lease, and
|
|
97
|
-
completes the workflow.
|
|
98
|
-
|
|
99
|
-
Preserve worktrees by default. Remove one only when Git proves it is clean and
|
|
100
|
-
integrated. On interruption, record the current step and task as blocked, preserve
|
|
101
|
-
worktree and evidence, and resume the same run later.
|
|
102
|
-
|
|
103
|
-
Return outcome, changed paths, public seam, exact checks, review axes, commit and
|
|
104
|
-
session state, residual risk, and allowed transitions.
|
|
105
|
-
|
|
106
|
-
Never invoke the recommended capability here; wait for an explicit user invocation.
|
|
8
|
+
The model owns code reasoning and edits. Ultra owns the durable task contract,
|
|
9
|
+
canonical Context Envelope, execution lease, immutable Worker Packet, evidence
|
|
10
|
+
references, and checkpoint.
|
|
11
|
+
|
|
12
|
+
## Bind execution
|
|
13
|
+
|
|
14
|
+
1. Call `ultra.context { stage: dev, scope: { change_id, task_id }, detail: full }`.
|
|
15
|
+
2. Import a newer team checkpoint with `ultra.sync`; stop on a real same-record or
|
|
16
|
+
active-session conflict.
|
|
17
|
+
3. Reuse a valid lease or call `ultra.session { action: acquire }`. Acquire atomically
|
|
18
|
+
performs admission, compiles or reuses the implementation Context Envelope, mints
|
|
19
|
+
the lease/worktree, and returns the immutable Worker Packet. A separate
|
|
20
|
+
`action: admission` is an optional read-only preview, not a prerequisite.
|
|
21
|
+
4. Verify the returned packet digest, purpose, acceptance, dependencies, public seam,
|
|
22
|
+
exact output path/schema, verification command,
|
|
23
|
+
non-goals, recovery, and required context refs. Update the task contract before
|
|
24
|
+
implementation when accepted intent changed.
|
|
25
|
+
|
|
26
|
+
## Implement adaptively
|
|
27
|
+
|
|
28
|
+
Reproduce the failure, write a failing test, or establish a characterization signal
|
|
29
|
+
before changing logic. Implement the smallest complete vertical slice. Ask the owner
|
|
30
|
+
only when new evidence changes product intent, compatibility, security, material cost,
|
|
31
|
+
external effects, or recovery.
|
|
32
|
+
|
|
33
|
+
Use typed `ultra.record` entries for `task_outcome / start|block|complete`,
|
|
34
|
+
`event / append`, `artifact / bind`, `decision / accept`, and corrected
|
|
35
|
+
`task_contract / revise`. Every worker output must repeat the exact `packet_digest`;
|
|
36
|
+
the parent registers it only after packet, output path, schema, and digest validation.
|
|
37
|
+
Live ownership, `in_progress`, session ids, leases, worktrees, telemetry, and
|
|
38
|
+
completion hashes remain local runtime state; durable task outcome and evidence may
|
|
39
|
+
enter the team checkpoint.
|
|
40
|
+
|
|
41
|
+
Run focused and adjacent risk-justified checks, then a task-scoped independent review.
|
|
42
|
+
Fix blocking findings and refresh affected evidence.
|
|
43
|
+
|
|
44
|
+
## Commit one semantic checkpoint
|
|
45
|
+
|
|
46
|
+
Call `ultra.checkpoint` once with `stage: dev`, the exact Change/Task scope, evidence,
|
|
47
|
+
and stable idempotency key. It binds the exact Context Envelope and Worker Packet and
|
|
48
|
+
reports outcome diagnostics. A rejection leaves the draft mutable.
|
|
49
|
+
|
|
50
|
+
After acceptance, mark the task durably completed, publish with `ultra.sync`, and
|
|
51
|
+
create at most one authorized local task commit containing code and semantic
|
|
52
|
+
artifacts. Record its SHA only in local state; never create a bookkeeping commit.
|
|
53
|
+
|
|
54
|
+
Release the lease through `ultra.session`. Preserve a dirty or unintegrated worktree
|
|
55
|
+
on interruption. Commit, push, tag, publish, deploy, or destructive cleanup require
|
|
56
|
+
separate owner authority.
|
|
57
|
+
|
|
58
|
+
Return changed paths, public seam, exact checks, review result, checkpoint, commit,
|
|
59
|
+
session state, and residual risk. Do not invoke the next capability automatically.
|
|
@@ -1,63 +1,41 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-doctor
|
|
3
|
-
description: Diagnose and mechanically recover Ultra schema,
|
|
3
|
+
description: Diagnose and mechanically recover Ultra schema, projection, session, archive, hook, and installed-asset faults. Use when authority is degraded, contradictory, or unavailable.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Diagnose before repair
|
|
7
7
|
|
|
8
|
-
Doctor owns deterministic health and supported recovery. It cannot
|
|
9
|
-
scope, invent evidence,
|
|
10
|
-
work complete.
|
|
11
|
-
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- SQLite integrity, schema
|
|
17
|
-
- artifact
|
|
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
|
-
It may not create a Git checkpoint, replace a healthy baseline, accept known failures,
|
|
44
|
-
resolve decisions, regenerate semantic content, import or publish the team checkpoint,
|
|
45
|
-
or edit application code. A missing or drifted valid checkpoint is a warning; invalid
|
|
46
|
-
content or conflicting ancestry is degraded authority. Resolve semantic checkpoint
|
|
47
|
-
state explicitly with `task.ledger_import` or `task.ledger_publish` after reviewing
|
|
48
|
-
the typed conflict.
|
|
49
|
-
|
|
50
|
-
Corrupt SQLite requires preservation of DB, WAL, and SHM followed by an explicit
|
|
51
|
-
restore-or-rebaseline choice. Missing hook adapters or stale cache paths require
|
|
52
|
-
`ubp --doctor` and adapter reinstall; never patch plugin cache contents by hand.
|
|
53
|
-
A legacy task projection is never rewritten by doctor. The supported publication path
|
|
54
|
-
first proves its durable task fields match SQLite and preserves its original bytes in
|
|
55
|
-
the local runtime backup directory.
|
|
56
|
-
|
|
57
|
-
After repair, rerun doctor read-only and verify backup paths, schema, installed hashes,
|
|
58
|
-
entry points, MCP startup, and hook smoke tests as applicable.
|
|
59
|
-
|
|
60
|
-
Return health first, failed checks, mechanical repairs performed, preserved recovery
|
|
61
|
-
paths, unresolved owners, and allowed transitions plus any unique required transition.
|
|
62
|
-
|
|
63
|
-
Never invoke the recommended capability here; wait for an explicit user invocation.
|
|
8
|
+
Doctor owns deterministic health and supported recovery. It cannot choose product
|
|
9
|
+
scope, invent evidence, accept a baseline, resolve a user decision, or declare
|
|
10
|
+
semantic work complete.
|
|
11
|
+
|
|
12
|
+
## Diagnose
|
|
13
|
+
|
|
14
|
+
Call `ultra.doctor { repair: false }` and inspect:
|
|
15
|
+
|
|
16
|
+
- SQLite integrity, schema, backups, WAL/SHM, and migration state;
|
|
17
|
+
- artifact ownership, digest freshness, edges, orphans, and duplicate authority;
|
|
18
|
+
- team-checkpoint ancestry and real concurrent record conflicts;
|
|
19
|
+
- projection jobs, sessions, leases, worktrees, and recovery journals;
|
|
20
|
+
- installed plugin assets, MCP startup, and hook paths.
|
|
21
|
+
|
|
22
|
+
An expected workflow pause, editable draft, failed semantic checkpoint, or awaiting
|
|
23
|
+
owner decision is a warning, not corruption.
|
|
24
|
+
|
|
25
|
+
## Repair
|
|
26
|
+
|
|
27
|
+
With explicit repair authority, call `ultra.doctor { repair: true }`. It may apply
|
|
28
|
+
backup-first schema migration, regenerate local projections, recover supported
|
|
29
|
+
journals, reconcile orphan sessions, and repair installed mechanical assets.
|
|
30
|
+
|
|
31
|
+
It may not manufacture semantic evidence, import or publish a team checkpoint, replace
|
|
32
|
+
a healthy baseline, resolve decisions, edit application code, or force a draft to
|
|
33
|
+
accepted. Use `ultra.sync` for reviewed checkpoint import/publish. Doctor never changes
|
|
34
|
+
semantic checkpoint acceptance or Change intent.
|
|
35
|
+
|
|
36
|
+
Preserve corrupt DB/WAL/SHM and dirty worktrees. Never patch plugin cache files by
|
|
37
|
+
hand; reinstall through `ubp` and verify the installed manifest and hook targets.
|
|
38
|
+
|
|
39
|
+
Rerun doctor read-only after repair. Report health, exact failed checks, backups,
|
|
40
|
+
repairs, preserved recovery paths, and remaining owner or semantic work. Do not invoke
|
|
41
|
+
another capability automatically.
|