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
|
@@ -1,94 +1,54 @@
|
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
## Inspect
|
|
13
|
-
|
|
14
|
-
1.
|
|
15
|
-
monorepo boundaries, and current
|
|
16
|
-
2.
|
|
17
|
-
|
|
18
|
-
3.
|
|
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
|
-
- 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.
|
|
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
|
+
|
|
12
|
+
## Inspect and align
|
|
13
|
+
|
|
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.
|
|
25
|
+
|
|
26
|
+
Read `../ultra-think/references/interaction-boundary.md` before asking a material
|
|
27
|
+
question.
|
|
28
|
+
|
|
29
|
+
## Initialize once
|
|
30
|
+
|
|
31
|
+
Call `ultra.record` with one typed entry:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
kind: baseline
|
|
35
|
+
action: initialize
|
|
36
|
+
data: { target_dir, project_name, mode=auto, git_mode=auto, optional scope }
|
|
37
|
+
idempotency_key: <stable init attempt id>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This stateless bootstrap is the only `ultra.record` operation allowed before
|
|
41
|
+
`state.db` exists. It must create or migrate `.ultra/.runtime/state.db`, preserve
|
|
42
|
+
existing artifacts and Git history, install only missing scaffold assets on resume,
|
|
43
|
+
validate or safely upgrade a legacy task ledger, and read back the result.
|
|
44
|
+
|
|
45
|
+
An unborn Git repository may require a local initial commit, but init never creates a
|
|
46
|
+
remote, tag, push, publish, or deployment. Corrupt DB/WAL/SHM and backups remain
|
|
47
|
+
preserved until an explicit recovery choice is made.
|
|
48
|
+
|
|
49
|
+
## Return control
|
|
50
|
+
|
|
51
|
+
Report classification, scope, schema and backup result, Git state, imported team
|
|
52
|
+
checkpoint state, and any mechanical blocker. Recommend the next useful capability
|
|
53
|
+
from current evidence, usually `ultra-research`, `ultra-change`, `ultra-status`, or
|
|
54
|
+
`ultra-doctor`; do not invoke it automatically.
|
|
@@ -66,7 +66,8 @@ ledger into hundreds of application tasks.
|
|
|
66
66
|
|
|
67
67
|
## Record authority
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Use `ultra.record` with `kind: baseline`, `action: observe`, and full replacement
|
|
70
|
+
arrays for:
|
|
70
71
|
|
|
71
72
|
- scope and repository revision;
|
|
72
73
|
- repository classification;
|
|
@@ -82,12 +83,14 @@ Use the server-returned revision, branch, worktree digest, and specification dig
|
|
|
82
83
|
## Obtain approval and converge
|
|
83
84
|
|
|
84
85
|
Present scope, observed behavior, drift, known-red verification, unknowns, gaps, dirty
|
|
85
|
-
worktree state, and material decisions to the owner.
|
|
86
|
-
|
|
87
|
-
items the owner
|
|
86
|
+
worktree state, and material decisions to the owner. Use `ultra.record` with
|
|
87
|
+
`kind: baseline`, `action: accept` only after explicit approval. Set
|
|
88
|
+
`accept_known_red` and `accept_dirty_worktree` only for the exact items the owner
|
|
89
|
+
accepted.
|
|
88
90
|
|
|
89
91
|
Resolve returned blockers through evidence or an owner decision, record the replacement
|
|
90
|
-
snapshot, and retry. Adoption is complete only when `
|
|
91
|
-
|
|
92
|
-
failure. Route all selected work through `ultra-change`, including work
|
|
93
|
-
legacy plan. Import its accepted intent into a current Change Contract
|
|
92
|
+
snapshot, and retry. Adoption is complete only when `ultra.context` reports a current
|
|
93
|
+
accepted baseline, the gap ledger has no open blocker, and project doctor has no
|
|
94
|
+
authority failure. Route all selected work through `ultra-change`, including work
|
|
95
|
+
described by a legacy plan. Import its accepted intent into a current Change Contract
|
|
96
|
+
before planning.
|
|
@@ -5,135 +5,57 @@ 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
|
-
|
|
61
|
-
|
|
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/interaction-boundary.md` before asking a material
|
|
32
|
+
question.
|
|
33
|
+
|
|
34
|
+
## Record and checkpoint
|
|
35
|
+
|
|
36
|
+
Use one `ultra.record` batch with `task_contract / define` for new tasks and
|
|
37
|
+
`task_contract / revise` for corrected contracts. Read back the draft with
|
|
38
|
+
`ultra.context`.
|
|
39
|
+
Never read or write `.ultra/tasks/tasks.json`; use `ultra.sync` for the Git team
|
|
40
|
+
checkpoint, and never edit the local runtime projection directly.
|
|
41
|
+
|
|
42
|
+
Call exactly one `ultra.checkpoint`:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
stage: plan
|
|
46
|
+
scope: { change_id }
|
|
47
|
+
payload: planning posture, optional approval already obtained, context budget/refs
|
|
48
|
+
idempotency_key: stable semantic Plan checkpoint id
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The checkpoint compiles or reuses the content-addressed Context Envelope, derives
|
|
52
|
+
coverage diagnostics, exports `plan.json` and `plan.md` inside the same recoverable
|
|
53
|
+
publication, accepts one Plan revision, and publishes the team checkpoint. Do not
|
|
54
|
+
export separately.
|
|
55
|
+
|
|
56
|
+
If rejected, the same Plan draft stays mutable. Fix task contracts or evidence and
|
|
57
|
+
retry. To replace an accepted Plan, submit a new checkpoint revision; never edit
|
|
58
|
+
SQLite or open a parallel run to escape a diagnostic.
|
|
59
|
+
|
|
60
|
+
Return topology, executable slices, public seams, exact checks, checkpoint result, and
|
|
61
|
+
the model's recommended execution order. Do not invoke `ultra-dev` automatically.
|
|
@@ -1,118 +1,64 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-research
|
|
3
|
-
description: Build or refresh an evidence-backed product and architecture baseline through recommended, user-selected semantic coverage
|
|
3
|
+
description: Build or refresh an evidence-backed product and architecture baseline through recommended, user-selected semantic coverage. Use when initialization, brownfield adoption, or an active Change has a real evidence gap.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Research with adaptive coverage
|
|
7
7
|
|
|
8
|
-
The model owns investigation
|
|
9
|
-
MCP
|
|
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
|
-
of the hidden research queue.
|
|
66
|
-
3. Process dependent decisions one at a time. A small group of independent,
|
|
67
|
-
low-cognitive-load facts may be asked together when the host UI supports it.
|
|
68
|
-
4. Normalize explicit user intent without redundant confirmation. Create durable
|
|
69
|
-
decision state only when a project-bound decision must survive interruption.
|
|
70
|
-
5. Update the smallest relevant baseline specification or active-change research
|
|
71
|
-
artifact. Do not copy prompts, transcripts, provider payloads, or internal chain of
|
|
72
|
-
thought.
|
|
73
|
-
|
|
74
|
-
Every required step writes `Evidence`, `Specification updates`, and `Decisions and
|
|
75
|
-
unknowns` to `.ultra/docs/research/<workflow-id>/<step-id>.md` for a baseline, or
|
|
76
|
-
`<change-root>/research/<workflow-id>/<step-id>.md` for an active Change.
|
|
77
|
-
|
|
78
|
-
Call `workflow.step` with bounded evidence, the report output, and typed semantic
|
|
79
|
-
records. Reused or verified evidence must still produce a current report and digest.
|
|
80
|
-
Block the same step when required evidence or owner authority is missing. For Change
|
|
81
|
-
research, keep `findings.md` and every semantic output inside the same Change root and
|
|
82
|
-
register them through workflow outputs; do not write baseline specifications.
|
|
83
|
-
|
|
84
|
-
At synthesis, bind the current `discovery.md`, `product.md`, `architecture.md`, and
|
|
85
|
-
`research-distillate.md` only for initial/adoption research. Change-bound synthesis
|
|
86
|
-
updates the Change findings and specification overlay, then records or refreshes
|
|
87
|
-
`change.delta`. It never mutates the accepted baseline.
|
|
88
|
-
|
|
89
|
-
## Baseline convergence
|
|
90
|
-
|
|
91
|
-
After `workflow.complete`, initial or adoption research calls `baseline.record` with
|
|
92
|
-
the current repository scope and revision, specification refs, evidence, real
|
|
93
|
-
verification results, unknowns, gap ledger, classification, and external provider
|
|
94
|
-
metadata references.
|
|
95
|
-
|
|
96
|
-
If Git is initialized but unborn, present the exact local checkpoint paths and purpose
|
|
97
|
-
for user authorization, then create only that local commit. Never create a remote,
|
|
98
|
-
tag, or push through research. If authorization or identity is missing, preserve the
|
|
99
|
-
run as blocked with `BASELINE_GIT_HEAD_REQUIRED`.
|
|
100
|
-
|
|
101
|
-
Call `baseline.converge` only when the user has accepted the exact baseline snapshot,
|
|
102
|
-
known failures, blocking gaps, and scope. Reuse an unambiguous current approval; do not
|
|
103
|
-
ask twice. MCP must reject stale research, drift, missing evidence, and unaccepted
|
|
104
|
-
failures. Successful convergence publishes the portable baseline, Changes, and tasks
|
|
105
|
-
to the Git team checkpoint; the receiving checkout must still revalidate a ready
|
|
106
|
-
baseline against its own HEAD and files.
|
|
107
|
-
|
|
108
|
-
Reuse the final research acceptance or current artifact checkpoint during baseline
|
|
109
|
-
convergence; do not ask for an equivalent approval again. After initial or adoption
|
|
110
|
-
convergence, `ultra-change` becomes an available transition. Bounded change research
|
|
111
|
-
returns to its owning Change authority; the next route is still `ultra-plan`, never
|
|
112
|
-
direct implementation.
|
|
113
|
-
|
|
114
|
-
Return a compact coverage summary by disposition, current evidence or decision blocker, baseline state, gaps, and allowed transitions.
|
|
115
|
-
Recommend a semantic next action from those transitions. If current intent does not already select it, present the recommendation
|
|
116
|
-
and credible alternatives through the interaction protocol, then wait. MCP supplies only valid and required transitions.
|
|
117
|
-
|
|
118
|
-
Never invoke the recommended capability here; wait for an explicit user invocation.
|
|
8
|
+
The model owns investigation and synthesis. The owner controls material scope and
|
|
9
|
+
deferrals. MCP records the accepted draft and commits one durable checkpoint; it is
|
|
10
|
+
not a questionnaire or a step-by-step supervisor.
|
|
11
|
+
|
|
12
|
+
## Bind current context
|
|
13
|
+
|
|
14
|
+
1. Call `ultra.context { stage: research, detail: full }`.
|
|
15
|
+
2. If the team checkpoint is newer, call `ultra.sync { action: import }`. Stop only
|
|
16
|
+
on a real ancestry or same-record conflict.
|
|
17
|
+
3. Inspect code, docs, tests, runtime, accepted intent, decisions, and existing
|
|
18
|
+
research. Reuse current evidence and the matching mutable draft.
|
|
19
|
+
4. Recommend the smallest sufficient coverage. Offer the adaptive set, the full
|
|
20
|
+
catalog, and a focused Change-bound set only when all are credible.
|
|
21
|
+
5. Use the host-native question surface only for a material unresolved route. Reuse an
|
|
22
|
+
explicit owner choice without asking again.
|
|
23
|
+
|
|
24
|
+
Read `../ultra-think/references/interaction-boundary.md` before asking. Load only the
|
|
25
|
+
reference files for research areas that actually apply.
|
|
26
|
+
|
|
27
|
+
## Investigate
|
|
28
|
+
|
|
29
|
+
For each selected area:
|
|
30
|
+
|
|
31
|
+
- separate `Observed`, `Verified`, `Decided`, and `Unknown`;
|
|
32
|
+
- resolve observable facts yourself and use primary sources where needed;
|
|
33
|
+
- update the smallest baseline or Change-owned research artifact;
|
|
34
|
+
- never store transcripts, hidden reasoning, raw provider payloads, or copied prompts;
|
|
35
|
+
- record evidence, specification updates, decisions, deferrals, and consequences.
|
|
36
|
+
|
|
37
|
+
Use one `ultra.record` batch for typed durable facts:
|
|
38
|
+
|
|
39
|
+
- `artifact / bind` for a managed research or specification artifact;
|
|
40
|
+
- `decision / accept` for normalized owner intent;
|
|
41
|
+
- `baseline / observe` or `baseline / accept` for baseline authority;
|
|
42
|
+
- `change_contract / revise` for Change-bound findings.
|
|
43
|
+
|
|
44
|
+
Every entry needs a stable idempotency key. A semantic rejection is a mutable
|
|
45
|
+
diagnostic: correct the same draft and retry.
|
|
46
|
+
|
|
47
|
+
## Commit one research checkpoint
|
|
48
|
+
|
|
49
|
+
Call exactly one `ultra.checkpoint` with `stage: research`. Put the selected research areas
|
|
50
|
+
and their report outputs in `payload.steps`; include only work actually performed,
|
|
51
|
+
verified, reused, deferred with owner authority, or proved not applicable. Synthesis
|
|
52
|
+
must always be present.
|
|
53
|
+
|
|
54
|
+
For baseline research, update and accept the baseline through typed `ultra.record`
|
|
55
|
+
entries, then publish the team checkpoint with `ultra.sync { action: publish }`.
|
|
56
|
+
For Change-bound research, keep all findings and delta artifacts below the Change
|
|
57
|
+
root and never edit accepted baseline specs directly.
|
|
58
|
+
|
|
59
|
+
If the checkpoint returns `accepted: false`, keep the same draft mutable, repair the
|
|
60
|
+
reported evidence, and retry. Do not manufacture evidence or open a replacement run.
|
|
61
|
+
|
|
62
|
+
Return coverage, decisive evidence, remaining gaps, durable artifact paths, and a
|
|
63
|
+
model recommendation for the next explicit capability, such as `ultra-change` after a
|
|
64
|
+
ready baseline. Never invoke it automatically.
|