ultra-builder-pro-cli 0.18.0 → 0.20.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 +54 -1
- package/README.md +16 -27
- package/adapters/_shared/interaction-contract.cjs +26 -4
- package/adapters/claude.js +3 -1
- package/adapters/kimi.js +4 -30
- package/adapters/opencode.js +50 -14
- package/commands/ultra-research.md +1 -1
- package/docs/AGENT-CONTEXT.md +23 -34
- package/docs/ARCHITECTURE.md +26 -12
- package/docs/DECISIONS.md +12 -8
- package/docs/LEGACY-CLI-CROSSWALK.md +9 -7
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +54 -0
- package/docs/ROADMAP.md +5 -5
- package/docs/RUNTIME-COMPAT-MATRIX.md +26 -25
- package/docs/STATE-DB-ACCESS-POLICY.md +1 -1
- package/docs/WORKFLOW-LIFECYCLE.md +45 -25
- package/hooks/active_task_context.py +1 -1
- package/hooks/context_spine.py +1 -1
- package/hooks/health_check.py +19 -0
- package/hooks/pre_stop_check.py +1 -1
- package/hooks/workflow_checkpoint.py +1 -1
- package/hooks/workflow_context.py +1 -1
- package/hooks/workflow_resume.py +1 -1
- package/mcp-server/lib/decision-dialogue.cjs +84 -11
- package/mcp-server/lib/doctor.cjs +2 -1
- package/mcp-server/lib/state-db.cjs +143 -13
- package/mcp-server/lib/workflow-state.cjs +4 -4
- package/mcp-server/server.cjs +24 -8
- package/package.json +3 -4
- package/skills/ultra-change/SKILL.md +16 -8
- package/skills/ultra-init/SKILL.md +2 -1
- package/skills/ultra-plan/SKILL.md +20 -3
- package/skills/ultra-research/SKILL.md +25 -15
- package/skills/ultra-test/SKILL.md +5 -2
- package/skills/ultra-think/SKILL.md +2 -0
- package/skills/ultra-think/references/decision-dialogue.md +47 -11
- package/spec/cli-protocol.md +1 -0
- package/spec/mcp-tools.yaml +30 -3
- package/spec/schemas/state-db.sql +7 -4
- package/ultra-tools/cli.cjs +1 -1
- package/ultra-tools/commands/status.cjs +2 -1
- package/adapters/_shared/handbook.cjs +0 -569
- package/bin/handbook.js +0 -107
- package/docs/USER-HANDBOOK-CONTRACT.md +0 -120
|
@@ -29,13 +29,18 @@ Read `../ultra-think/references/decision-dialogue.md` before asking a material q
|
|
|
29
29
|
- change kind and evidence-backed risk flags;
|
|
30
30
|
- research disposition.
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
change may have no material risk,
|
|
32
|
+
Recommend `quick`, `standard`, `major`, or `incident` from actual scope and risk,
|
|
33
|
+
together with the research disposition. A quick change may have no material risk,
|
|
34
|
+
research obligation, or more than one task. MCP may reject a profile that contradicts
|
|
35
|
+
hard risk invariants; it does not choose a replacement.
|
|
34
36
|
|
|
35
37
|
Ask only when a choice changes accepted product intent, scope, public behavior,
|
|
36
38
|
compatibility, security, material cost, external effects, or recovery. Use the host's
|
|
37
39
|
native question UI when available. Normalize clear choices already in the user's
|
|
38
|
-
request.
|
|
40
|
+
request. When profile or research posture remains unresolved, present the recommended
|
|
41
|
+
route and credible alternatives through that same UI, then stop. The user selects,
|
|
42
|
+
modifies, delegates, or defers the semantic route. The model owns reversible
|
|
43
|
+
implementation detail inside the accepted contract.
|
|
39
44
|
|
|
40
45
|
## Persist the contract
|
|
41
46
|
|
|
@@ -60,14 +65,17 @@ meaning is coupled. Downstream task, context, test, or review evidence affected
|
|
|
60
65
|
change must become stale and be regenerated; never keep old evidence green by prompt
|
|
61
66
|
assertion.
|
|
62
67
|
|
|
63
|
-
If research is required,
|
|
64
|
-
contract is sufficiently evidenced,
|
|
65
|
-
|
|
68
|
+
If research is required, recommend `ultra-research` with the recorded disposition. If
|
|
69
|
+
the contract is sufficiently evidenced, recommend `ultra-plan`. Return and wait for an
|
|
70
|
+
explicit user invocation; do not start either workflow. `change.context` is compiled
|
|
71
|
+
only for an actual plan, implementation, test, or review consumer.
|
|
66
72
|
|
|
67
73
|
Stable implementation discoveries use the approval-gated specification-learning
|
|
68
74
|
transitions. External memory and graph providers retain their own content; Ultra stores
|
|
69
75
|
metadata references only.
|
|
70
76
|
|
|
71
77
|
Return the normalized contract, change id and kind, research disposition, blockers,
|
|
72
|
-
and `allowed_transitions`.
|
|
73
|
-
|
|
78
|
+
and `allowed_transitions`. Recommend a semantic next action from those transitions.
|
|
79
|
+
If current intent does not already select it, present the recommendation and credible
|
|
80
|
+
alternatives through the interaction protocol, then wait. MCP does not encode a
|
|
81
|
+
semantic next action.
|
|
@@ -75,7 +75,8 @@ Read the returned `allowed_transitions` and `required_transition`:
|
|
|
75
75
|
- a required transition represents a hard recovery invariant and must be followed;
|
|
76
76
|
- otherwise the host model recommends among the allowed capabilities using the user's
|
|
77
77
|
goal and current evidence;
|
|
78
|
-
-
|
|
78
|
+
- never invoke another public Ultra workflow automatically; recommend the best allowed
|
|
79
|
+
capability and wait for an explicit user invocation.
|
|
79
80
|
|
|
80
81
|
Report classification, scope, schema and backup result, Git state, init workflow id,
|
|
81
82
|
baseline state, and allowed transitions. Do not claim that a baseline is ready until a
|
|
@@ -15,17 +15,34 @@ accepted Change Contract without adding ceremonial approval.
|
|
|
15
15
|
checkout.
|
|
16
16
|
2. Require one mutable change with a healthy baseline or recorded incident bypass.
|
|
17
17
|
3. Complete the exact change-bound research disposition before planning.
|
|
18
|
-
4. Resume the matching plan run
|
|
18
|
+
4. Resume the matching plan run. Do not start a new run until planning posture is
|
|
19
|
+
accepted.
|
|
19
20
|
|
|
20
21
|
Read `references/semantic-preflight.md` and inspect requirements, real consumers,
|
|
21
22
|
state, tests, deployment, and recovery paths.
|
|
22
23
|
|
|
24
|
+
## Align planning posture
|
|
25
|
+
|
|
26
|
+
Use the interaction protocol in `../ultra-think/references/decision-dialogue.md`.
|
|
27
|
+
Normalize a posture already explicit in current intent. Otherwise recommend one based
|
|
28
|
+
on the Change Contract, explain its scope effect, and use the host's native question
|
|
29
|
+
surface:
|
|
30
|
+
|
|
31
|
+
- `EXPAND`: surface evidence-backed opportunities beyond accepted scope;
|
|
32
|
+
- `SELECTIVE`: hold accepted scope and offer optional expansions individually;
|
|
33
|
+
- `HOLD`: preserve scope and strengthen completeness, failure handling, and recovery;
|
|
34
|
+
- `REDUCE`: propose the smallest outcome that still satisfies revised acceptance.
|
|
35
|
+
|
|
36
|
+
The user may select, modify, delegate, or defer the posture. Stop on an unanswered
|
|
37
|
+
choice. Start `workflow.start` only after alignment and store `planning_posture` plus
|
|
38
|
+
its rationale in workflow metadata. This is a scope boundary, not approval of the
|
|
39
|
+
eventual technical design.
|
|
40
|
+
|
|
23
41
|
## Design with model autonomy
|
|
24
42
|
|
|
25
43
|
Build a candidate plan privately. Ask the user only if the plan would change accepted
|
|
26
44
|
scope, public behavior, compatibility, security, material cost, external effects, or
|
|
27
|
-
recovery. Use the host
|
|
28
|
-
in `../ultra-think/references/decision-dialogue.md`.
|
|
45
|
+
recovery. Use the same host-native interaction protocol.
|
|
29
46
|
|
|
30
47
|
When the candidate remains inside the accepted Change Contract, proceed without a
|
|
31
48
|
second approval. A user may still request a plan review before persistence; that is an
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-research
|
|
3
|
-
description: Build or refresh an evidence-backed product and architecture baseline
|
|
3
|
+
description: Build or refresh an evidence-backed product and architecture baseline through recommended, user-selected semantic coverage and low-load alignment. 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
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
The model owns investigation, synthesis, and coverage recommendations. The user owns
|
|
9
|
+
the accepted semantic route and material deferrals. Ultra MCP owns the run, evidence
|
|
10
|
+
references, semantic records, artifact digests, freshness, and convergence. The
|
|
11
|
+
reference areas are an optional catalog, not a mandatory questionnaire or fixed
|
|
12
|
+
sequence of user conversations.
|
|
12
13
|
|
|
13
14
|
Read `../ultra-think/references/decision-dialogue.md` before asking a material question.
|
|
14
15
|
|
|
@@ -16,20 +17,27 @@ Read `../ultra-think/references/decision-dialogue.md` before asking a material q
|
|
|
16
17
|
|
|
17
18
|
1. Read `system.doctor`, `baseline.get`, active decisions, and existing research runs.
|
|
18
19
|
2. Resume the matching active, blocked, or ready run. Do not create parallel authority.
|
|
19
|
-
3. If none exists,
|
|
20
|
+
3. If none exists, determine the authority-bound mode:
|
|
20
21
|
- `full` for a greenfield baseline;
|
|
21
22
|
- `adoption` for a brownfield baseline;
|
|
22
23
|
- a bounded mode only for a recorded active-change research disposition.
|
|
24
|
+
Focused baseline coverage retains `full` or `adoption`; `custom` is only
|
|
25
|
+
change-bound and narrows coverage inside an active Change.
|
|
23
26
|
4. Before `workflow.start`, inspect current code, docs, tests, runtime, and prior
|
|
24
|
-
artifacts.
|
|
25
|
-
|
|
27
|
+
artifacts. Recommend the smallest sufficient set of applicable catalog areas.
|
|
28
|
+
Explain the net effect without dumping all 17 areas. Offer at most three credible
|
|
29
|
+
routes: the recommended adaptive set, the full catalog, and a focused or custom set.
|
|
30
|
+
5. If current user intent does not already select a route, use the host's native
|
|
31
|
+
structured question surface. The user selects, modifies, delegates, or defers.
|
|
32
|
+
Treat a dismissal as unanswered, stop, and perform no route-dependent write.
|
|
33
|
+
6. Normalize the answer and persist the accepted coverage through `workflow.start`:
|
|
26
34
|
- `execute`: produce fresh evidence;
|
|
27
35
|
- `verify_existing`: verify a current artifact against its source;
|
|
28
36
|
- `reuse`: reuse evidence that is still current;
|
|
29
37
|
- `not_applicable`: exclude with an evidence reference and rationale;
|
|
30
38
|
- `deferred`: record the consequence and owner acceptance when deferral changes the
|
|
31
39
|
accepted scope or leaves material risk.
|
|
32
|
-
|
|
40
|
+
7. Pass the evidence-based coverage rationale as `metadata.selection_reason`. Omitted
|
|
33
41
|
catalog areas create no DB step and need no ceremonial disposition.
|
|
34
42
|
|
|
35
43
|
`99-synthesis` must execute, verify, or reuse. A missing disposition is a coverage
|
|
@@ -96,11 +104,13 @@ known failures, blocking gaps, and scope. Reuse an unambiguous current approval;
|
|
|
96
104
|
ask twice. MCP must reject stale research, drift, missing evidence, and unaccepted
|
|
97
105
|
failures.
|
|
98
106
|
|
|
99
|
-
Reuse the final research
|
|
100
|
-
for an equivalent approval again. After initial or adoption
|
|
101
|
-
`ultra-change` becomes an available transition. Bounded change research
|
|
102
|
-
its owning Change authority.
|
|
107
|
+
Reuse the final research acceptance or current artifact checkpoint during baseline
|
|
108
|
+
convergence; do not ask for an equivalent approval again. After initial or adoption
|
|
109
|
+
convergence, `ultra-change` becomes an available transition. Bounded change research
|
|
110
|
+
returns to its owning Change authority.
|
|
103
111
|
|
|
104
112
|
Return a compact coverage summary by disposition, current evidence or decision
|
|
105
|
-
blocker, baseline state, gaps, and allowed transitions.
|
|
106
|
-
|
|
113
|
+
blocker, baseline state, gaps, and allowed transitions. Recommend a semantic next
|
|
114
|
+
action from those transitions. If current intent does not already select it, present
|
|
115
|
+
the recommendation and credible alternatives through the interaction protocol, then
|
|
116
|
+
wait. MCP supplies only valid and required transitions.
|
|
@@ -61,5 +61,8 @@ report and current checkout before `verify-test-gate`. `workflow.complete` deriv
|
|
|
61
61
|
summary from the report and rejects stale, malformed, or contradictory evidence.
|
|
62
62
|
|
|
63
63
|
Return the profile, exact results, verified seams, blockers, report digest, workflow
|
|
64
|
-
state, and allowed transitions.
|
|
65
|
-
|
|
64
|
+
state, and allowed transitions. Recommend broader review, more implementation, or
|
|
65
|
+
delivery from those transitions. If current intent does not already select the
|
|
66
|
+
semantic next action, use
|
|
67
|
+
`../ultra-think/references/decision-dialogue.md` and wait for the user to select,
|
|
68
|
+
modify, delegate, or defer it.
|
|
@@ -37,6 +37,8 @@ Do not expose the hidden decision queue.
|
|
|
37
37
|
For durable project decisions, use `decision.thread_start`, `decision.open`, and the
|
|
38
38
|
appropriate resolve, delegate, defer, or supersede transition. Store normalized
|
|
39
39
|
decisions and artifact references, never transcripts or internal reasoning.
|
|
40
|
+
Call `decision.complete` when normalized state is settled and no artifact-bound
|
|
41
|
+
checkpoint is needed; completion is not another owner approval.
|
|
40
42
|
|
|
41
43
|
Prepare and confirm a checkpoint only when the decision changes a durable contract or
|
|
42
44
|
artifact and a checkpoint is needed for recovery. Do not add a ceremonial approval
|
|
@@ -10,6 +10,7 @@ The user owns:
|
|
|
10
10
|
|
|
11
11
|
- product intent and accepted outcomes;
|
|
12
12
|
- material scope, compatibility, security, cost, and recovery tradeoffs;
|
|
13
|
+
- semantic route selection and risk acceptance;
|
|
13
14
|
- authorization for destructive or external effects.
|
|
14
15
|
|
|
15
16
|
The model owns:
|
|
@@ -22,15 +23,36 @@ The model owns:
|
|
|
22
23
|
MCP owns durable state, evidence references, digests, freshness, locks, valid
|
|
23
24
|
transitions, and hard invariants. It does not choose semantic intent.
|
|
24
25
|
|
|
26
|
+
## Follow the common selection flow
|
|
27
|
+
|
|
28
|
+
1. **Inspect** repository authority, source, runtime, tests, and relevant primary
|
|
29
|
+
sources.
|
|
30
|
+
2. **Suggest** one recommendation and only credible alternatives, with their effects.
|
|
31
|
+
3. **Ask** through the host-native structured question surface only when current user
|
|
32
|
+
intent does not already resolve the material choice.
|
|
33
|
+
4. **Normalize** a direct choice, modified route, delegation, or deferral. Treat a
|
|
34
|
+
dismissed question as unanswered.
|
|
35
|
+
5. **Persist** the normalized result through MCP, then trust the DB record as current
|
|
36
|
+
authority across sessions.
|
|
37
|
+
|
|
38
|
+
The DB treats normalized intent as current authority. It does not prove that the user
|
|
39
|
+
selected it, store a host interaction receipt, or judge whether the choice was wise.
|
|
40
|
+
The host interaction is the semantic gate; MCP validates state shape, bindings,
|
|
41
|
+
freshness, and legal transitions.
|
|
42
|
+
|
|
43
|
+
When an unanswered material question must survive interruption, `decision.open` stores
|
|
44
|
+
that pending question before the host presents it. A pending question is recovery
|
|
45
|
+
state, not accepted user intent. Only the normalized resolution becomes intent
|
|
46
|
+
authority.
|
|
47
|
+
|
|
25
48
|
## Decide whether to ask
|
|
26
49
|
|
|
27
50
|
Before asking:
|
|
28
51
|
|
|
29
|
-
1.
|
|
30
|
-
2.
|
|
31
|
-
3.
|
|
32
|
-
4.
|
|
33
|
-
5. Ask only if the remaining choice changes accepted intent, public behavior,
|
|
52
|
+
1. Separate `Observed`, `Verified`, `Decided`, `Delegated`, and `Unknown`.
|
|
53
|
+
2. Resolve evidence-answerable unknowns autonomously.
|
|
54
|
+
3. Normalize clear decisions already present in the user's current request.
|
|
55
|
+
4. Ask only if the remaining choice changes accepted intent, public behavior,
|
|
34
56
|
compatibility, security, material cost, external effects, or recovery.
|
|
35
57
|
|
|
36
58
|
Do not ask about a reversible implementation detail already delegated by the contract.
|
|
@@ -50,8 +72,11 @@ that choice itself changes the outcome.
|
|
|
50
72
|
## Present questions
|
|
51
73
|
|
|
52
74
|
Use the host-native structured question surface declared by the installed interaction
|
|
53
|
-
contract when it exists. If that surface is unavailable
|
|
54
|
-
concise direct question instead of inventing a tool or foreign-host
|
|
75
|
+
contract when it exists. If that surface is unavailable but normal conversation is
|
|
76
|
+
permitted, ask one concise direct question instead of inventing a tool or foreign-host
|
|
77
|
+
syntax. If the host mode forbids interaction entirely, keep the choice unanswered and
|
|
78
|
+
stop before any route-dependent write. Do not convert host unavailability into
|
|
79
|
+
delegated authority.
|
|
55
80
|
|
|
56
81
|
Ask one question only for a dependent decision. STOP is mandatory after presenting
|
|
57
82
|
that question: do not perform writes whose meaning depends on an unanswered choice.
|
|
@@ -70,6 +95,7 @@ low-cognitive-load facts when seeing them together improves consistency. Never d
|
|
|
70
95
|
questionnaire, hidden queue, or every research area.
|
|
71
96
|
|
|
72
97
|
The question tool or direct question ends the current interaction naturally.
|
|
98
|
+
A dismissed or unavailable response is not acceptance of the recommendation.
|
|
73
99
|
|
|
74
100
|
## Persist only when recovery needs it
|
|
75
101
|
|
|
@@ -77,20 +103,25 @@ For a project-bound material decision:
|
|
|
77
103
|
|
|
78
104
|
1. Call `decision.list` and resume a matching active decision thread, or use
|
|
79
105
|
`decision.thread_start` for one new baseline-, change-, or workflow-bound thread.
|
|
80
|
-
2. Use `decision.open`
|
|
81
|
-
alternatives, effects, and blocking consequence.
|
|
106
|
+
2. Use `decision.open` before presenting only the current decision, with evidence refs,
|
|
107
|
+
recommendation, credible alternatives, effects, and its real blocking consequence.
|
|
108
|
+
A non-blocking follow-up must not become a global workflow gate.
|
|
82
109
|
3. After the answer:
|
|
83
110
|
- `decision.resolve` for a direct user choice;
|
|
84
111
|
- `decision.delegate` for explicit model delegation;
|
|
85
112
|
- `decision.defer` with consequence and revisit condition;
|
|
86
113
|
- `decision.supersede` when accepted intent actually changed.
|
|
87
|
-
4.
|
|
88
|
-
|
|
114
|
+
4. Call `decision.complete` when normalized state is settled and no artifact checkpoint
|
|
115
|
+
is needed. This closes lifecycle state; it is not another user approval.
|
|
116
|
+
5. Use `decision.checkpoint` instead only for the digest-bound recovery boundary
|
|
117
|
+
described below.
|
|
89
118
|
|
|
90
119
|
Keep fact acquisition autonomous and decision authority explicit.
|
|
91
120
|
Never store raw prompts or transcripts; store normalized decisions, not internal
|
|
92
121
|
chain of thought.
|
|
93
122
|
Do not require a redundant confirmation after an unambiguous answer.
|
|
123
|
+
An answered thread with no open or blocking deferred decision does not require a
|
|
124
|
+
checkpoint merely to prove intent.
|
|
94
125
|
|
|
95
126
|
Use a checkpoint only when a coherent decision cluster changes a durable contract or
|
|
96
127
|
artifact and interruption recovery requires a digest-bound boundary. Present the
|
|
@@ -98,6 +129,11 @@ compact effect once, obtain any missing approval, update the artifact, and confi
|
|
|
98
129
|
digest. Do not create ceremonial checkpoints for routine implementation detail or an
|
|
99
130
|
already explicit current instruction.
|
|
100
131
|
|
|
132
|
+
Every checkpoint binds the normalized decision digest. Change- and workflow-bound
|
|
133
|
+
checkpoints also require at least one current artifact digest. A standalone baseline
|
|
134
|
+
thread may instead record a specific `no_artifact_reason` when no durable artifact
|
|
135
|
+
exists; that exception does not create interaction proof.
|
|
136
|
+
|
|
101
137
|
## Return to the capability graph
|
|
102
138
|
|
|
103
139
|
After alignment, re-read the invoking workflow and breadcrumb. A
|
package/spec/cli-protocol.md
CHANGED
|
@@ -122,6 +122,7 @@ as a fallback unless `ultra-tools <family> --help` lists it.
|
|
|
122
122
|
| `decision.delegate` | `decision delegate` | 16 | mcp |
|
|
123
123
|
| `decision.defer` | `decision defer` | 16 | mcp |
|
|
124
124
|
| `decision.supersede` | `decision supersede` | 16 | mcp |
|
|
125
|
+
| `decision.complete` | `decision complete` | 19 | mcp |
|
|
125
126
|
| `decision.checkpoint` | `decision checkpoint` | 16 | mcp |
|
|
126
127
|
| `workflow.start` | `workflow start` | 13 | mcp |
|
|
127
128
|
| `workflow.get` | `workflow get` | 13 | any |
|
package/spec/mcp-tools.yaml
CHANGED
|
@@ -1600,7 +1600,7 @@ tools:
|
|
|
1600
1600
|
type: object
|
|
1601
1601
|
additionalProperties: false
|
|
1602
1602
|
properties:
|
|
1603
|
-
status: { type: string, enum: [active, checkpoint_ready, confirmed, cancelled] }
|
|
1603
|
+
status: { type: string, enum: [active, checkpoint_ready, completed, confirmed, cancelled] }
|
|
1604
1604
|
mode: { type: string, enum: [guided, fast, autonomous, diagnostic] }
|
|
1605
1605
|
baseline_id: { type: string }
|
|
1606
1606
|
change_id: { type: string }
|
|
@@ -1788,6 +1788,33 @@ tools:
|
|
|
1788
1788
|
cli_subcommand: decision supersede
|
|
1789
1789
|
emits_events: [decision_opened]
|
|
1790
1790
|
|
|
1791
|
+
- name: decision.complete
|
|
1792
|
+
family: decision
|
|
1793
|
+
description: Complete a decision thread after its normalized state is settled, without creating an approval receipt or artifact checkpoint.
|
|
1794
|
+
phase: '19'
|
|
1795
|
+
writer_role: mcp
|
|
1796
|
+
input_schema:
|
|
1797
|
+
type: object
|
|
1798
|
+
required: [id, summary]
|
|
1799
|
+
additionalProperties: false
|
|
1800
|
+
properties:
|
|
1801
|
+
id: { type: string, minLength: 1 }
|
|
1802
|
+
summary: { type: string, minLength: 1 }
|
|
1803
|
+
output_schema:
|
|
1804
|
+
type: object
|
|
1805
|
+
required: [thread]
|
|
1806
|
+
additionalProperties: false
|
|
1807
|
+
properties:
|
|
1808
|
+
thread: { type: object }
|
|
1809
|
+
errors:
|
|
1810
|
+
- { code: DECISION_THREAD_NOT_FOUND, description: 'decision thread id does not exist' }
|
|
1811
|
+
- { code: DECISION_THREAD_NOT_MUTABLE, description: 'the decision thread is already terminal' }
|
|
1812
|
+
- { code: DECISION_CHECKPOINT_PENDING, description: 'a prepared artifact checkpoint must be confirmed or revised first' }
|
|
1813
|
+
- { code: DECISION_ALIGNMENT_BLOCKING, description: 'an unanswered question or blocking deferral prevents completion' }
|
|
1814
|
+
- { code: VALIDATION_ERROR, description: 'the completion summary is missing' }
|
|
1815
|
+
cli_subcommand: decision complete
|
|
1816
|
+
emits_events: [decision_thread_completed]
|
|
1817
|
+
|
|
1791
1818
|
- name: decision.checkpoint
|
|
1792
1819
|
family: decision
|
|
1793
1820
|
description: Prepare or confirm a decision checkpoint, including renewal of unchanged decisions against current artifacts; change- and workflow-bound threads require an artifact, while a standalone baseline thread may record an explicit no-artifact reason.
|
|
@@ -1833,7 +1860,7 @@ tools:
|
|
|
1833
1860
|
# ────────────────────────── workflow family ────────────────────────────
|
|
1834
1861
|
- name: workflow.start
|
|
1835
1862
|
family: workflow
|
|
1836
|
-
description: Start one durable Ultra workflow run. For research, the host
|
|
1863
|
+
description: Start one durable Ultra workflow run. For research, the host supplies normalized accepted semantic coverage after user-model alignment; MCP records and validates the state without choosing or proving user intent.
|
|
1837
1864
|
phase: '13'
|
|
1838
1865
|
writer_role: mcp
|
|
1839
1866
|
input_schema:
|
|
@@ -1883,7 +1910,7 @@ tools:
|
|
|
1883
1910
|
- { code: WORKFLOW_AUTHORITY_REQUIRED, description: 'the workflow is missing its required baseline, change, or task authority' }
|
|
1884
1911
|
- { code: WORKFLOW_CHANGE_DECISION_BLOCKING, description: 'the change contains unresolved material owner decisions' }
|
|
1885
1912
|
- { code: WORKFLOW_CHANGE_RESEARCH_INCOMPLETE, description: 'the change-bound research disposition is not current and complete' }
|
|
1886
|
-
- { code: WORKFLOW_RESEARCH_COVERAGE_REQUIRED, description: 'research requires
|
|
1913
|
+
- { code: WORKFLOW_RESEARCH_COVERAGE_REQUIRED, description: 'research requires accepted coverage with at least one applicable semantic area beyond synthesis' }
|
|
1887
1914
|
- { code: WORKFLOW_RESEARCH_COVERAGE_EVIDENCE_REQUIRED, description: 'reuse, verification, and not-applicable dispositions require evidence references' }
|
|
1888
1915
|
- { code: WORKFLOW_RESEARCH_SYNTHESIS_REQUIRED, description: 'research synthesis must execute, verify, or reuse durable evidence' }
|
|
1889
1916
|
- { code: WORKFLOW_RESEARCH_MODE_MISMATCH, description: 'the selected research mode does not match its authority or baseline mode' }
|
|
@@ -407,16 +407,16 @@ CREATE INDEX IF NOT EXISTS workflow_steps_status
|
|
|
407
407
|
ON workflow_steps(run_id, status, position);
|
|
408
408
|
|
|
409
409
|
-- ──────────────────────────── decision dialogue ─────────────────────────
|
|
410
|
-
-- The host owns reasoning and normalized decision content. MCP
|
|
411
|
-
--
|
|
412
|
-
-- and transcripts never belong
|
|
410
|
+
-- The host owns reasoning, presentation, and normalized decision content. MCP
|
|
411
|
+
-- owns the one-open-item invariant, pending recovery state, durable authority,
|
|
412
|
+
-- checkpoints, and recovery. Raw prompts and transcripts never belong here.
|
|
413
413
|
CREATE TABLE IF NOT EXISTS decision_threads (
|
|
414
414
|
id TEXT PRIMARY KEY,
|
|
415
415
|
purpose TEXT NOT NULL,
|
|
416
416
|
mode TEXT NOT NULL DEFAULT 'guided'
|
|
417
417
|
CHECK (mode IN ('guided', 'fast', 'autonomous', 'diagnostic')),
|
|
418
418
|
status TEXT NOT NULL DEFAULT 'active'
|
|
419
|
-
CHECK (status IN ('active', 'checkpoint_ready', 'confirmed', 'cancelled')),
|
|
419
|
+
CHECK (status IN ('active', 'checkpoint_ready', 'completed', 'confirmed', 'cancelled')),
|
|
420
420
|
baseline_id TEXT REFERENCES baselines(id) ON DELETE SET NULL,
|
|
421
421
|
change_id TEXT REFERENCES changes(id) ON DELETE CASCADE,
|
|
422
422
|
workflow_run_id TEXT REFERENCES workflow_runs(id) ON DELETE CASCADE,
|
|
@@ -424,6 +424,7 @@ CREATE TABLE IF NOT EXISTS decision_threads (
|
|
|
424
424
|
checkpoint_json TEXT NOT NULL DEFAULT '{}',
|
|
425
425
|
started_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),
|
|
426
426
|
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),
|
|
427
|
+
completed_at TEXT,
|
|
427
428
|
confirmed_at TEXT,
|
|
428
429
|
CHECK (baseline_id IS NOT NULL OR change_id IS NOT NULL OR workflow_run_id IS NOT NULL)
|
|
429
430
|
);
|
|
@@ -492,3 +493,5 @@ INSERT OR IGNORE INTO schema_version (version, description)
|
|
|
492
493
|
VALUES ('17.0', 'Explicit unborn Git authority and owner-authorized baseline checkpoints');
|
|
493
494
|
INSERT OR IGNORE INTO schema_version (version, description)
|
|
494
495
|
VALUES ('18.0', 'Adaptive capability transitions, independent initialization, and recoverable workflow migration');
|
|
496
|
+
INSERT OR IGNORE INTO schema_version (version, description)
|
|
497
|
+
VALUES ('19.0', 'Non-ceremonial decision completion and host-neutral intent persistence');
|
package/ultra-tools/cli.cjs
CHANGED
|
@@ -38,7 +38,7 @@ SUBCOMMANDS:
|
|
|
38
38
|
system doctor [--repair] | restore | rebaseline
|
|
39
39
|
status [--cost] [--since <duration>] [--json]
|
|
40
40
|
db init | checkpoint | vacuum | integrity | backup (Phase 2)
|
|
41
|
-
migrate --from=<4.4|4.5> --to=<4.5|
|
|
41
|
+
migrate --from=<4.4|4.5> --to=<4.5|19.0> [--dry|--rollback]
|
|
42
42
|
legacy-memory inspect | archive | prune --confirm DELETE_ULTRA_LEGACY_MEMORY
|
|
43
43
|
|
|
44
44
|
--help / -h show this message
|
|
@@ -171,7 +171,8 @@ function buildStatusPanel(db, { since = null, limit = 3, rootDir = process.cwd()
|
|
|
171
171
|
const decisions = tables.has('decision_threads') && tables.has('decision_items')
|
|
172
172
|
? decisionDialogue.inspectDecisionHealth(db, { rootDir })
|
|
173
173
|
: {
|
|
174
|
-
status: 'unavailable', active: 0,
|
|
174
|
+
status: 'unavailable', active: 0, completed: 0, awaiting_owner: 0,
|
|
175
|
+
awaiting_blocking: 0, checkpoint_ready: 0,
|
|
175
176
|
deferred_blocking: 0, stale_artifacts: [], current: null, current_thread_id: null,
|
|
176
177
|
};
|
|
177
178
|
let transitions;
|