ultra-builder-pro-cli 0.22.0 → 0.23.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/CHANGELOG.md +38 -0
- package/README.md +55 -25
- package/adapters/_shared/codex-assets.cjs +8 -3
- package/adapters/_shared/interaction-contract.cjs +13 -6
- package/adapters/_shared/runtime-assets.cjs +1 -1
- package/adapters/claude.js +1 -1
- package/adapters/kimi.js +1 -1
- package/adapters/opencode.js +1 -1
- package/docs/AGENT-CONTEXT.md +38 -40
- package/docs/ARCHITECTURE.md +29 -33
- package/docs/ARTIFACT-AUTHORITY.md +15 -16
- package/docs/ROADMAP.md +2 -2
- package/docs/RUNTIME-COMPAT-MATRIX.md +7 -6
- package/docs/STATE-DB-ACCESS-POLICY.md +14 -14
- package/docs/WORKFLOW-LIFECYCLE.md +39 -33
- package/mcp-server/lib/artifact-registry.cjs +25 -1
- package/mcp-server/lib/change-workflow.cjs +42 -6
- package/mcp-server/lib/ultra-facade.cjs +646 -0
- package/mcp-server/lib/workflow-state.cjs +166 -2
- package/mcp-server/server.cjs +73 -21
- package/package.json +1 -1
- package/skills/ultra-change/SKILL.md +38 -98
- package/skills/ultra-deliver/SKILL.md +42 -65
- package/skills/ultra-dev/SKILL.md +34 -88
- package/skills/ultra-doctor/SKILL.md +35 -57
- package/skills/ultra-init/SKILL.md +37 -78
- package/skills/ultra-plan/SKILL.md +52 -132
- package/skills/ultra-research/SKILL.md +41 -100
- package/skills/ultra-review/SKILL.md +25 -46
- package/skills/ultra-status/SKILL.md +21 -44
- package/skills/ultra-test/SKILL.md +25 -61
- package/skills/ultra-think/SKILL.md +29 -48
- package/skills/ultra-think/references/decision-dialogue.md +6 -4
- package/spec/cli-protocol.md +12 -0
- package/spec/mcp-tools.yaml +159 -0
- package/spec/schemas/mcp-tools.schema.json +1 -1
|
@@ -5,102 +5,48 @@ description: Implement one authoritative Ultra task through a fresh-context, tes
|
|
|
5
5
|
|
|
6
6
|
# Implement one task
|
|
7
7
|
|
|
8
|
-
The
|
|
9
|
-
|
|
8
|
+
The model owns code reasoning and edits. Ultra owns the durable task contract, current
|
|
9
|
+
Context Manifest, execution lease, evidence references, and checkpoint.
|
|
10
10
|
|
|
11
|
-
## Bind
|
|
11
|
+
## Bind execution
|
|
12
12
|
|
|
13
|
-
1.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
contract; update that contract before compilation instead of overriding it in the
|
|
22
|
-
call. Persist any changed external-provider metadata with `change.update` first.
|
|
23
|
-
Context compilation itself is read-only with respect to Change and provider
|
|
24
|
-
authority.
|
|
25
|
-
5. Confirm the manifest contains the selected task, its direct dependencies, direct
|
|
26
|
-
dependents needed for integration, and relevant integration checkpoints—not the
|
|
27
|
-
entire task graph. Referenced file bodies stay lazy. The token estimate includes
|
|
28
|
-
inline Change/task authority as well as file estimates; budget overflow is
|
|
29
|
-
advisory, while a missing or stale required reference is blocking. Record the
|
|
30
|
-
immutable manifest as `compile-context`.
|
|
31
|
-
6. Reuse an existing valid session. Otherwise pass admission and call `session.spawn`.
|
|
32
|
-
Work only in the returned worktree and preserve unrelated changes.
|
|
13
|
+
1. Call `ultra.context { stage: dev, scope: { change_id, task_id }, detail: full }`.
|
|
14
|
+
2. Import a newer team checkpoint with `ultra.sync`; stop on a real same-record or
|
|
15
|
+
active-session conflict.
|
|
16
|
+
3. Reuse a valid lease or call `ultra.session { action: admission }`, then
|
|
17
|
+
`ultra.session { action: acquire }`. Work only in the returned worktree.
|
|
18
|
+
4. Confirm purpose, acceptance, dependencies, public seam, verification command,
|
|
19
|
+
non-goals, recovery, and required context refs. Update the task contract before
|
|
20
|
+
implementation when accepted intent changed.
|
|
33
21
|
|
|
34
|
-
|
|
35
|
-
evidence, never task completion.
|
|
22
|
+
## Implement adaptively
|
|
36
23
|
|
|
37
|
-
|
|
24
|
+
Reproduce the failure, write a failing test, or establish a characterization signal
|
|
25
|
+
before changing logic. Implement the smallest complete vertical slice. Ask the owner
|
|
26
|
+
only when new evidence changes product intent, compatibility, security, material cost,
|
|
27
|
+
external effects, or recovery.
|
|
38
28
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
3. Keep the loop adaptive. The model may choose implementation details inside the
|
|
44
|
-
accepted contract. If new evidence changes product intent, compatibility, security,
|
|
45
|
-
material cost, external effects, or recovery, use the host's native question UI and
|
|
46
|
-
the decision protocol; do not ask about ordinary reversible details.
|
|
47
|
-
4. Record `implement-slice`, then run focused tests plus the adjacent checks justified
|
|
48
|
-
by the task risk. Record exact results under `verify-slice`.
|
|
49
|
-
5. Run a task-scoped independent review on specification fidelity and relevant
|
|
50
|
-
engineering risks. Record `review-slice`. Fix blocking findings and refresh affected
|
|
51
|
-
evidence.
|
|
52
|
-
6. In direct mode, update the task to `completed` only after verification and review
|
|
53
|
-
are current. This publishes the durable team ledger checkpoint. Create one
|
|
54
|
-
authorized local task commit containing code, semantic artifacts, and that
|
|
55
|
-
checkpoint. Read the resulting `HEAD`, then record it as `completion_commit`;
|
|
56
|
-
that hash remains checkout-local and must not create another Git commit. Do not
|
|
57
|
-
push, publish, tag, or deploy unless the user separately authorized that external
|
|
58
|
-
effect.
|
|
29
|
+
Use `ultra.record` batches for task status, bounded events, artifacts, decisions, and
|
|
30
|
+
documentation candidates. Live ownership, `in_progress`, session ids, leases,
|
|
31
|
+
worktrees, telemetry, and completion hashes remain local runtime state; durable task
|
|
32
|
+
outcome and evidence may enter the team checkpoint.
|
|
59
33
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
`completion_commit` remain checkout-local. The local generated task view lives under
|
|
63
|
-
`.ultra/.runtime/projections/` and is never committed.
|
|
34
|
+
Run focused and adjacent risk-justified checks, then a task-scoped independent review.
|
|
35
|
+
Fix blocking findings and refresh affected evidence.
|
|
64
36
|
|
|
65
|
-
|
|
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.
|
|
37
|
+
## Commit one semantic checkpoint
|
|
70
38
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
specifications. Hooks may remind the host to reconcile documentation; they must not
|
|
75
|
-
block ordinary development or choose the semantic update.
|
|
39
|
+
Call `ultra.checkpoint` once with `stage: dev`, the exact Change/Task scope, evidence,
|
|
40
|
+
and stable idempotency key. It compiles or reuses the implementation Context Manifest
|
|
41
|
+
and validates the durable outcome. A rejection leaves the draft mutable.
|
|
76
42
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
43
|
+
After acceptance, mark the task durably completed, publish with `ultra.sync`, and
|
|
44
|
+
create at most one authorized local task commit containing code and semantic
|
|
45
|
+
artifacts. Record its SHA only in local state; never create a bookkeeping commit.
|
|
80
46
|
|
|
81
|
-
|
|
47
|
+
Release the lease through `ultra.session`. Preserve a dirty or unintegrated worktree
|
|
48
|
+
on interruption. Commit, push, tag, publish, deploy, or destructive cleanup require
|
|
49
|
+
separate owner authority.
|
|
82
50
|
|
|
83
|
-
|
|
84
|
-
|
|
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.
|
|
51
|
+
Return changed paths, public seam, exact checks, review result, checkpoint, commit,
|
|
52
|
+
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 and
|
|
34
|
+
`workflow.abandon` through `ultra.record` for intentional draft cancellation.
|
|
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.
|
|
@@ -1,94 +1,53 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-init
|
|
3
|
-
description: Create or recover Ultra project authority for a new repository, an existing codebase, or an older Ultra installation. Use when `.ultra` is absent, initialization is incomplete, or doctor reports a migration
|
|
3
|
+
description: Create or recover Ultra project authority for a new repository, an existing codebase, or an older Ultra installation. Use when `.ultra` is absent, initialization is incomplete, or doctor reports a migration fault.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Initialize project authority
|
|
7
7
|
|
|
8
|
-
Initialization
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Initialization creates the repository-local Ultra authority. It does not perform
|
|
9
|
+
research, accept a product baseline, choose a Change, or start another public
|
|
10
|
+
capability.
|
|
11
11
|
|
|
12
|
-
## Inspect
|
|
12
|
+
## Inspect and align
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
monorepo boundaries, and current
|
|
16
|
-
2.
|
|
17
|
-
|
|
18
|
-
3.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
1. Inspect the repository root, Git state, meaningful source, existing `.ultra`,
|
|
15
|
+
monorepo boundaries, and the current request.
|
|
16
|
+
2. When authority already exists, call `ultra.doctor { repair: false }` and preserve
|
|
17
|
+
healthy state. Never replace or delete it merely to obtain a clean init.
|
|
18
|
+
3. Classify the repository from evidence:
|
|
19
|
+
- `greenfield`: no meaningful delivered behavior exists;
|
|
20
|
+
- `brownfield`: source, runtime, API, data, deployment, or tests describe an
|
|
21
|
+
existing maintained system;
|
|
22
|
+
- `migrated`: older Ultra authority was preserved but is not yet a trusted baseline.
|
|
23
|
+
4. Ask the owner only when scope, healthy-authority replacement, destructive recovery,
|
|
24
|
+
or another material choice cannot be derived. Reuse explicit intent.
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
Read `../ultra-think/references/decision-dialogue.md` before asking a material
|
|
27
|
+
question.
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
- `brownfield`: source, runtime, API, data, deployment, or tests describe an existing
|
|
28
|
-
maintained system;
|
|
29
|
-
- `migrated`: older Ultra authority was preserved but is not a trusted baseline.
|
|
29
|
+
## Initialize once
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
user decision. Classification must not infer product scope, an MVP, or a release plan.
|
|
31
|
+
Call `ultra.record` with one entry:
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
```text
|
|
34
|
+
operation: task.init_project
|
|
35
|
+
data: target_dir, project_name, mode=auto, git_mode=auto, optional scope
|
|
36
|
+
idempotency_key: stable init attempt id
|
|
37
|
+
```
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
unresolved. Normalize clear intent already present in the request without asking again.
|
|
39
|
+
This stateless bootstrap is the only `ultra.record` operation allowed before
|
|
40
|
+
`state.db` exists. It must create or migrate `.ultra/.runtime/state.db`, preserve
|
|
41
|
+
existing artifacts and Git history, install only missing scaffold assets on resume,
|
|
42
|
+
validate or safely upgrade a legacy task ledger, and read back the result.
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
An unborn Git repository may require a local initial commit, but init never creates a
|
|
45
|
+
remote, tag, push, publish, or deployment. Corrupt DB/WAL/SHM and backups remain
|
|
46
|
+
preserved until an explicit recovery choice is made.
|
|
43
47
|
|
|
44
|
-
|
|
48
|
+
## Return control
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
The operation must:
|
|
52
|
-
|
|
53
|
-
- create or migrate `.ultra/.runtime/state.db` with a backup before schema migration;
|
|
54
|
-
- install only missing scaffold assets on resume;
|
|
55
|
-
- create an empty `.ultra/tasks/tasks.json` team checkpoint for a new project;
|
|
56
|
-
- import a validated team checkpoint on clone or resume, while requiring
|
|
57
|
-
checkout-local revalidation before an imported ready baseline can authorize work;
|
|
58
|
-
- preserve existing artifacts and unrelated work;
|
|
59
|
-
- preserve an existing Git repository and HEAD;
|
|
60
|
-
- initialize Git and a safe `.gitignore` entry when Git is absent;
|
|
61
|
-
- report an unborn repository as `initial_commit_required` without manufacturing a
|
|
62
|
-
commit, remote, tag, or push;
|
|
63
|
-
- read back the created DB, classification, local runtime projection, team checkpoint,
|
|
64
|
-
and Git result before completing the init workflow.
|
|
65
|
-
|
|
66
|
-
Projection-only projects must use the exact backup-first migration command returned by
|
|
67
|
-
the runtime. On the first supported team-checkpoint publication, a matching legacy
|
|
68
|
-
task projection is copied byte-for-byte into `.ultra/.runtime/backups/task-ledger/`
|
|
69
|
-
before replacement; any task-id or durable-field mismatch stops with a typed conflict.
|
|
70
|
-
A migrated compatibility baseline requires a new brownfield adoption with
|
|
71
|
-
`replace_migrated: true`. Replacing a healthy baseline requires explicit replacement
|
|
72
|
-
authority. Corrupt DB, WAL, SHM, and backups must be preserved until the user chooses
|
|
73
|
-
a documented recovery operation.
|
|
74
|
-
|
|
75
|
-
## Completion and handoff
|
|
76
|
-
|
|
77
|
-
Initialization is complete when the init workflow is `completed`, the current schema is
|
|
78
|
-
healthy, the scaffold is readable, and repository classification and Git state are
|
|
79
|
-
durable. Research status may still be `not_started`; that is not incomplete init.
|
|
80
|
-
|
|
81
|
-
Read the returned `allowed_transitions` and `required_transition`:
|
|
82
|
-
|
|
83
|
-
- a required transition represents a hard recovery invariant and must be followed;
|
|
84
|
-
- otherwise the host model recommends among the allowed capabilities using the user's
|
|
85
|
-
goal and current evidence;
|
|
86
|
-
- never invoke another public Ultra workflow automatically; recommend the best allowed
|
|
87
|
-
capability and wait for an explicit user invocation.
|
|
88
|
-
|
|
89
|
-
Report classification, scope, schema and backup result, Git state, init workflow id,
|
|
90
|
-
team-checkpoint import or revalidation state, baseline state, and allowed transitions.
|
|
91
|
-
Do not claim that a baseline is ready until a separate research/adoption workflow has
|
|
92
|
-
recorded and converged it in the current checkout.
|
|
93
|
-
|
|
94
|
-
Never invoke the recommended capability here; wait for an explicit user invocation.
|
|
50
|
+
Report classification, scope, schema and backup result, Git state, imported team
|
|
51
|
+
checkpoint state, and any mechanical blocker. Recommend the next useful capability
|
|
52
|
+
from current evidence, usually `ultra-research`, `ultra-change`, `ultra-status`, or
|
|
53
|
+
`ultra-doctor`; do not invoke it automatically.
|
|
@@ -5,135 +5,55 @@ description: Turn an accepted Ultra Change Contract into dependency-valid, DB-ba
|
|
|
5
5
|
|
|
6
6
|
# Build an executable plan
|
|
7
7
|
|
|
8
|
-
The model owns decomposition and technical design. MCP
|
|
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
|
-
second approval. A user may still request a plan review before persistence; that is an
|
|
61
|
-
interaction preference, not a runtime invariant.
|
|
62
|
-
|
|
63
|
-
Record:
|
|
64
|
-
|
|
65
|
-
1. `validate-baseline`
|
|
66
|
-
2. `compile-context`
|
|
67
|
-
3. `analyze-requirements`
|
|
68
|
-
4. `analyze-codebase`
|
|
69
|
-
5. `design-slices`
|
|
70
|
-
6. `validate-dependencies`
|
|
71
|
-
7. `persist-task-contracts`
|
|
72
|
-
8. `verify-plan`
|
|
73
|
-
|
|
74
|
-
Design a walking skeleton and subsequent vertical slices. Every slice reaches a real
|
|
75
|
-
consumer and owns its validation, side effects, errors, documentation, migration,
|
|
76
|
-
observability, and recovery obligations. Avoid unconsumed horizontal scaffolding.
|
|
77
|
-
|
|
78
|
-
After starting or resuming the workflow, compile `change.context` with `role: plan`
|
|
79
|
-
and `gate: planning`. Record its immutable manifest as the `compile-context` output.
|
|
80
|
-
The packet is the accepted planning input, not a mutable plan draft. `change.context`
|
|
81
|
-
must not update Change provider references; persist new provider metadata with
|
|
82
|
-
`change.update` before recompiling.
|
|
83
|
-
|
|
84
|
-
## Persist task contracts
|
|
85
|
-
|
|
86
|
-
Create each task with:
|
|
87
|
-
|
|
88
|
-
- observable outcome (`purpose`) and stable trace (`why`);
|
|
89
|
-
- `slice_kind`, public seam, and exact verification command;
|
|
90
|
-
- structured acceptance mapped to Change acceptance ids;
|
|
91
|
-
- target seams and affected files when known;
|
|
92
|
-
- bounded pattern/context refs with a reason, optional anchor and scope, and an
|
|
93
|
-
explicit freshness policy;
|
|
94
|
-
- documentation impact, ownership, and dependencies.
|
|
95
|
-
|
|
96
|
-
Use `digest` freshness with `expected_digest` for accepted inputs that must remain
|
|
97
|
-
byte-current. Use `existence` for source targets expected to change during
|
|
98
|
-
implementation. Use `advisory` only when drift should be visible but non-blocking.
|
|
99
|
-
The compiled task context restores constraints and non-goals from the Change Contract,
|
|
100
|
-
plus acceptance, recovery, documentation impact, and the definition of drift. Keep
|
|
101
|
-
large referenced files lazy; do not paste their bodies into the plan packet.
|
|
102
|
-
|
|
103
|
-
Use estimates only when evidence supports them. A quick change has exactly one task.
|
|
104
|
-
Read every task back from DB. Never read or write `.ultra/tasks/tasks.json` directly.
|
|
105
|
-
It is the MCP-published Git team checkpoint, while
|
|
106
|
-
`.ultra/.runtime/projections/tasks.json` is the generated checkout-local view.
|
|
107
|
-
|
|
108
|
-
If a semantic `change.update` invalidated existing tasks, reconcile every affected
|
|
109
|
-
task contract against the current intent, acceptance, decisions, and research
|
|
110
|
-
evidence. Rebind the complete execution contract while clearing `stale` through
|
|
111
|
-
`task.update`; MCP rejects a marker-only clear, validates the read-back, and records
|
|
112
|
-
the current Change authority digest. Never clear staleness merely to pass a gate.
|
|
113
|
-
|
|
114
|
-
Validate the change-scoped graph with `task.dependency_topo`. Export
|
|
115
|
-
the deterministic `<artifact_root>/plan.json` and `<artifact_root>/plan.md` pair with
|
|
116
|
-
`plan.export { change_id }`. The JSON binds the exact planning context snapshot and
|
|
117
|
-
manifest digest; the Markdown is a deterministic human view of the same task graph.
|
|
118
|
-
An accepted export also publishes the portable baseline, Change, task contracts,
|
|
119
|
-
dependencies, and durable statuses to the team checkpoint. Local sessions, leases,
|
|
120
|
-
`in_progress` ownership, telemetry, and completion hashes remain in `.ultra/.runtime`.
|
|
121
|
-
Read the JSON through `plan.get` and record it as the `verify-plan` output. Do not
|
|
122
|
-
choose an arbitrary output path or overwrite another Change's plan. A legacy global
|
|
123
|
-
`.ultra/execution-plan.json` may be read for migration diagnosis only and is never a
|
|
124
|
-
current write target.
|
|
125
|
-
|
|
126
|
-
Call `workflow.complete`. `approval` is optional: include it only when a material plan
|
|
127
|
-
decision actually required and received user approval. MCP derives task coverage and
|
|
128
|
-
topology from DB and must reject incomplete contracts, uncovered acceptance, cycles,
|
|
129
|
-
cross-change tasks, stale research, or a mismatched export.
|
|
130
|
-
|
|
131
|
-
Do not advance or complete the Change workflow; change capture is already complete.
|
|
132
|
-
Compile a separate task context later for each consumer that needs it. Planning,
|
|
133
|
-
implementation, testing, review, and convergence snapshots are not interchangeable.
|
|
134
|
-
|
|
135
|
-
Return topology, first executable slices, public seams, verification commands, plan
|
|
136
|
-
workflow id, and allowed transitions. The host may recommend parallel or sequential
|
|
137
|
-
execution based on dependency and conflict evidence.
|
|
138
|
-
|
|
139
|
-
Never invoke the recommended capability here; wait for an explicit user invocation.
|
|
8
|
+
The model owns decomposition and technical design. MCP commits the accepted task graph,
|
|
9
|
+
digests, context, and team checkpoint in one semantic operation.
|
|
10
|
+
|
|
11
|
+
## Bind and design
|
|
12
|
+
|
|
13
|
+
1. Call `ultra.context { stage: plan, scope: { change_id }, detail: full }`.
|
|
14
|
+
2. Inspect or import the team checkpoint with `ultra.sync`. Resolve real concurrent
|
|
15
|
+
record conflicts; do not merge authority by editing JSON.
|
|
16
|
+
3. Require an accepted Change contract and its current typed delta. Direct Build skips
|
|
17
|
+
extra research, never Plan or task contracts.
|
|
18
|
+
4. Read `references/semantic-preflight.md`; inspect real consumers, source, tests,
|
|
19
|
+
deployment, and recovery.
|
|
20
|
+
5. Recommend `EXPAND`, `SELECTIVE`, `HOLD`, or `REDUCE` only when posture changes
|
|
21
|
+
accepted scope. Reuse an explicit posture and ask through the host-native UI only
|
|
22
|
+
for a material unresolved choice.
|
|
23
|
+
6. Design a walking skeleton and vertical slices. Each task owns an observable outcome,
|
|
24
|
+
public seam, verification command, acceptance mapping, target seams, bounded
|
|
25
|
+
context refs, documentation impact, recovery, owner, and dependencies.
|
|
26
|
+
|
|
27
|
+
Large sources stay lazy. Use digest freshness for accepted inputs that must remain
|
|
28
|
+
byte-current, existence for expected implementation targets, and advisory only when
|
|
29
|
+
drift must be visible without blocking.
|
|
30
|
+
|
|
31
|
+
Read `../ultra-think/references/decision-dialogue.md` before asking a material
|
|
32
|
+
question.
|
|
33
|
+
|
|
34
|
+
## Record and checkpoint
|
|
35
|
+
|
|
36
|
+
Use one `ultra.record` batch for all `task.create` and necessary `task.update`
|
|
37
|
+
operations. Read back the draft with `ultra.context`.
|
|
38
|
+
Never read or write `.ultra/tasks/tasks.json`; use `ultra.sync` for the Git team
|
|
39
|
+
checkpoint, and never edit the local runtime projection directly.
|
|
40
|
+
|
|
41
|
+
Call exactly one `ultra.checkpoint`:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
stage: plan
|
|
45
|
+
scope: { change_id }
|
|
46
|
+
payload: planning posture, optional approval already obtained, context budget/refs
|
|
47
|
+
idempotency_key: stable semantic Plan checkpoint id
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The checkpoint compiles or reuses the content-addressed Context Manifest, validates
|
|
51
|
+
task coverage and dependencies, exports `plan.json` and `plan.md` once, completes the
|
|
52
|
+
durable Plan, and publishes the team checkpoint. Do not export again after validation.
|
|
53
|
+
|
|
54
|
+
If rejected, the same Plan draft stays mutable. Fix task contracts or evidence and
|
|
55
|
+
retry. To discard it, record `workflow.abandon`; never edit SQLite or open a parallel
|
|
56
|
+
run to escape a blocker.
|
|
57
|
+
|
|
58
|
+
Return topology, executable slices, public seams, exact checks, checkpoint result, and
|
|
59
|
+
the model's recommended execution order. Do not invoke `ultra-dev` automatically.
|