ultra-builder-pro-cli 0.19.1 → 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.
@@ -1,14 +1,15 @@
1
1
  ---
2
2
  name: ultra-research
3
- description: Build or refresh an evidence-backed product and architecture baseline with model-selected semantic coverage and low-load user alignment. Use when initialization, brownfield adoption, or an active change has a real evidence gap.
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 host model owns investigation, synthesis, and coverage judgment. Ultra MCP owns the
9
- run, evidence references, semantic records, artifact digests, freshness, and
10
- convergence. The reference areas are an optional coverage catalog, not a mandatory
11
- questionnaire or a fixed sequence of user conversations.
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, select:
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. Select the smallest sufficient set of applicable catalog areas. Include
25
- only areas that need work or whose exclusion must remain auditable:
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
- 5. Pass the evidence-based coverage rationale as `metadata.selection_reason`. Omitted
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 checkpoint approval during baseline convergence; do not ask
100
- for an equivalent approval again. After initial or adoption convergence,
101
- `ultra-change` becomes an available transition. Bounded change research returns to
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. The host chooses the semantic
106
- recommendation; MCP supplies only valid and required transitions.
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. The host decides whether a broader review, more
65
- implementation, or delivery is appropriate.
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. Inspect repository authority, source, runtime, tests, and relevant primary sources.
30
- 2. Separate `Observed`, `Verified`, `Decided`, `Delegated`, and `Unknown`.
31
- 3. Resolve evidence-answerable unknowns autonomously.
32
- 4. Normalize clear decisions already present in the user's current request.
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 in the current mode, ask one
54
- concise direct question instead of inventing a tool or foreign-host syntax.
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` for only the current decision with evidence refs, recommendation, credible
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. Use `decision.checkpoint` only for the digest-bound recovery boundary described
88
- below.
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
@@ -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 |
@@ -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 model supplies only evidence-relevant semantic coverage; MCP records and validates the selection without choosing it.
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 model-selected coverage with at least one applicable semantic area beyond synthesis' }
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 owns one-at-a-
411
- -- time presentation, durable authority, checkpoints, and recovery. Raw prompts
412
- -- and transcripts never belong in these tables.
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');
@@ -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|18.0> [--dry|--rollback]
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, awaiting_owner: 0, checkpoint_ready: 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;