ultra-builder-pro-cli 0.16.0 → 0.17.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.
Files changed (64) hide show
  1. package/.ultra-template/specs/research-distillate.md +4 -3
  2. package/CHANGELOG.md +86 -0
  3. package/README.md +54 -24
  4. package/adapters/_shared/codex-assets.cjs +10 -5
  5. package/adapters/_shared/handbook.cjs +1 -1
  6. package/adapters/_shared/interaction-contract.cjs +61 -0
  7. package/adapters/claude.js +1 -1
  8. package/adapters/opencode.js +1 -1
  9. package/bin/orchestrator.js +175 -19
  10. package/commands/ultra-change.md +1 -1
  11. package/commands/ultra-deliver.md +3 -3
  12. package/commands/ultra-init.md +1 -1
  13. package/commands/ultra-plan.md +1 -1
  14. package/commands/ultra-research.md +2 -2
  15. package/commands/ultra-review.md +10 -0
  16. package/commands/ultra-status.md +1 -1
  17. package/commands/ultra-test.md +1 -1
  18. package/docs/AGENT-CONTEXT.md +11 -8
  19. package/docs/ARCHITECTURE.md +67 -9
  20. package/docs/LEGACY-CLI-CROSSWALK.md +163 -0
  21. package/docs/PLAN.zh-CN.md +19 -13
  22. package/docs/RUNTIME-COMPAT-MATRIX.md +2 -2
  23. package/docs/WORKFLOW-LIFECYCLE.md +123 -59
  24. package/hooks/pre_stop_check.py +3 -2
  25. package/mcp-server/lib/baseline-workflow.cjs +84 -16
  26. package/mcp-server/lib/change-workflow.cjs +55 -35
  27. package/mcp-server/lib/context-spine.cjs +171 -105
  28. package/mcp-server/lib/git-bootstrap.cjs +240 -0
  29. package/mcp-server/lib/init-project.cjs +178 -41
  30. package/mcp-server/lib/project-breadcrumb.cjs +14 -14
  31. package/mcp-server/lib/state-db.cjs +257 -10
  32. package/mcp-server/lib/state-ops.cjs +64 -1
  33. package/mcp-server/lib/workflow-state.cjs +300 -205
  34. package/mcp-server/server.cjs +58 -34
  35. package/orchestrator/auto-merge.cjs +19 -0
  36. package/orchestrator/daemon.cjs +104 -0
  37. package/orchestrator/parallel-orchestrator.cjs +371 -49
  38. package/orchestrator/session-runner.cjs +354 -25
  39. package/package.json +2 -1
  40. package/skills/ultra-change/SKILL.md +69 -94
  41. package/skills/ultra-deliver/SKILL.md +37 -65
  42. package/skills/ultra-dev/SKILL.md +50 -52
  43. package/skills/ultra-doctor/SKILL.md +34 -49
  44. package/skills/ultra-init/SKILL.md +78 -105
  45. package/skills/ultra-plan/SKILL.md +78 -99
  46. package/skills/ultra-research/SKILL.md +99 -113
  47. package/skills/ultra-review/SKILL.md +38 -53
  48. package/skills/ultra-review/references/review-modes.md +5 -3
  49. package/skills/ultra-review/references/unified-schema.md +26 -6
  50. package/skills/ultra-review/scripts/review_wait.py +12 -0
  51. package/skills/ultra-status/SKILL.md +34 -44
  52. package/skills/ultra-test/SKILL.md +61 -54
  53. package/skills/ultra-think/SKILL.md +37 -51
  54. package/skills/ultra-think/references/decision-dialogue.md +87 -111
  55. package/spec/cli-protocol.md +35 -0
  56. package/spec/mcp-tools.yaml +145 -28
  57. package/spec/schemas/delivery-report.v1.schema.json +1 -46
  58. package/spec/schemas/state-db.sql +8 -2
  59. package/spec/schemas/test-report.v1.schema.json +45 -14
  60. package/ultra-tools/cli.cjs +1 -1
  61. package/ultra-tools/commands/session.cjs +10 -3
  62. package/ultra-tools/commands/status.cjs +19 -14
  63. package/ultra-tools/commands/system.cjs +2 -2
  64. package/ultra-tools/commands/task.cjs +3 -0
@@ -1,117 +1,103 @@
1
1
  ---
2
2
  name: ultra-research
3
- description: Establish or extend an evidence-backed Ultra product and architecture baseline through the complete semantic research workflow, with resumable step state and traceable outputs. Use when initialization routes to research, baseline evidence is incomplete, or the owner explicitly requests bounded research for an active change.
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.
4
4
  ---
5
5
 
6
- # Establish research authority without overwhelming the owner
7
-
8
- Use host reasoning to discover facts and synthesize artifacts. Use Ultra MCP for run
9
- position, decision authority, output digests, blockers, and convergence. Read
10
- `../ultra-think/references/decision-dialogue.md` before asking any owner question.
11
- Never ask MCP to generate research content.
12
-
13
- ## Bind the run
14
-
15
- 1. Call `baseline.get`. Route absent, migrated, unreadable, or corrupt authority to
16
- `ultra-init` or `ultra-doctor` as reported.
17
- 2. Call `workflow.list` for `kind: "research"` and the bound baseline or change. Resume
18
- the active, blocked, or ready run; use `workflow.get` before doing more work.
19
- 3. When no run exists:
20
- - start `full` for an initial greenfield baseline;
21
- - start `adoption` for a brownfield baseline;
22
- - use `product`, `feature`, `architecture`, or `custom` only when the owner
23
- explicitly selected that bounded scope for an active change.
24
-
25
- Never infer an MVP, reduced product posture, skipped step, or release phase. Full and
26
- adoption modes execute all seventeen semantic steps. A custom run records every
27
- excluded step and its selection reason in DB.
28
-
29
- ## Preserve complete semantic coverage
30
-
31
- Read only the reference matching `workflow.next_step.step_id`:
32
-
33
- | Step | Reference |
34
- |---|---|
35
- | `00-problem-validation` | `references/00-problem-validation.md` |
36
- | `01-opportunity-discovery` | `references/01-opportunity-discovery.md` |
37
- | `02-market-assessment` | `references/02-market-assessment.md` |
38
- | `03-competitive-landscape` | `references/03-competitive-landscape.md` |
39
- | `04-product-strategy` | `references/04-product-strategy.md` |
40
- | `05-assumptions-validation` | `references/05-assumptions-validation.md` |
41
- | `10-user-personas` | `references/10-user-personas.md` |
42
- | `11-user-scenarios` | `references/11-user-scenarios.md` |
43
- | `20-user-stories` | `references/20-user-stories.md` |
44
- | `21-features-scope` | `references/21-features-scope.md` |
45
- | `22-success-metrics` | `references/22-success-metrics.md` |
46
- | `30-architecture-context` | `references/30-architecture-context.md` |
47
- | `31-solution-strategy` | `references/31-solution-strategy.md` |
48
- | `32-building-blocks` | `references/32-building-blocks.md` |
49
- | `40-deployment` | `references/40-deployment.md` |
50
- | `41-quality-risks` | `references/41-quality-risks.md` |
51
- | `99-synthesis` | `references/99-synthesis.md` |
52
-
53
- The seventeen steps are an internal completeness contract, not a questionnaire or the
54
- default user interface. For each selected step:
55
-
56
- 1. Read only its reference and inspect repository, specification, runtime, tests, and
57
- current primary-source evidence. Do not ask the owner to repeat observable facts.
58
- 2. Separate `Observed`, `Verified`, `Decided`, and `Unknown`. Resolve evidence-answerable
59
- unknowns autonomously and record evidence-backed `not_applicable` results.
60
- 3. If a load-bearing owner decision remains, start or resume one decision thread bound
61
- to this research workflow. Open the earliest dependent decision, present only that
62
- question, and STOP. Do not update specifications or complete the workflow step while
63
- its checkpoint is unconfirmed.
64
- 4. After a coherent decision cluster, prepare one checkpoint. Present the compact
65
- shared understanding and affected specifications, obtain approval, and apply the
66
- accepted decisions.
67
- 5. Update only the relevant baseline specification or active-change research artifact.
68
- Preserve evidence, decisions, drift, and unknowns without copying conversation text.
69
- Write the accepted cluster to the stable
70
- `.ultra/docs/decisions/<thread-id>.md` projection and confirm its checkpoint with
71
- that digest. Do not bind an intermediate shared specification that later research
72
- steps are expected to extend.
73
- 6. Write one immutable step report at
74
- `.ultra/docs/research/<workflow-id>/<step-id>.md`. It must have a title and the
75
- sections `Evidence`, `Specification updates`, and `Decisions and unknowns`. Link
76
- specification anchors and external sources; do not copy transcripts or provider
77
- payloads.
78
- 7. Call `workflow.step` with `completed`, bounded evidence references, that step report
79
- as `research-step-report`, material decisions, and one or more `semantic_records`.
80
- Each record has a stable `id`, the step-specific `kind` and `attributes` named in
81
- its reference, a status (`observed`, `verified`, `decided`, `accepted`, `unknown`,
82
- or `not_applicable`), a concise summary, evidence refs, optional typed links, and a
83
- project-relative `source_ref` using `path#anchor`. Use the immutable step report as
84
- the source when later edits could change a shared specification. MCP verifies the
85
- anchor and stores its digest; `not_applicable` requires an evidence-backed rationale.
86
- 8. For `99-synthesis` in `full` or `adoption` mode, also bind the current
87
- `discovery.md`, `product.md`, `architecture.md`, and `research-distillate.md` as
88
- outputs. This freezes the exact researched baseline without making the reports a
89
- second specification authority.
90
- 9. If evidence or owner authority is missing, call `workflow.step` with `blocked` and
91
- specific blocker codes. Resume that same step after resolution; never skip a
92
- required step to obtain a ready state.
93
-
94
- ## Converge
95
-
96
- When all selected steps are ready, call `workflow.complete` and read the completed run
97
- back. Missing or stale output blocks completion.
98
-
99
- For initial or adoption research, call `baseline.record` with discovery, product, and
100
- architecture specification refs; current repository revision and scope; bounded source,
101
- docs, runtime, test, deployment, and external evidence; actual verification commands
102
- and results; unknowns; the complete gap ledger; classification; and external provider
103
- metadata references. Do not store prompts, transcripts, memory, or graph content.
104
-
105
- Present the recorded revision, worktree snapshot, known failures, blockers, and gaps.
106
- Only after explicit owner approval call `baseline.converge`. Reuse the final research
107
- checkpoint approval when it names this exact recorded revision, worktree snapshot,
108
- known failures, blockers, and gaps; do not ask for an equivalent approval again. If
109
- that snapshot changed, prepare one refreshed checkpoint instead. Accept known-red or a
110
- dirty worktree only when that exact snapshot was approved. Convergence must verify the
111
- completed full/adoption research run and current output digests.
112
-
113
- Return a compact checkpoint: workflow id, completed/selected semantic coverage,
114
- current decision or blocker, baseline state, open gaps, approval state, and one route.
115
- Do not print all seventeen report paths unless requested; they remain discoverable
116
- through workflow state. A ready initial baseline routes to `ultra-change`; bounded
117
- change research returns to its breadcrumb and then `ultra-plan` when ready.
6
+ # Research with adaptive coverage
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 seventeen areas are a coverage catalog, not a mandatory questionnaire
11
+ or a fixed sequence of user conversations.
12
+
13
+ Read `../ultra-think/references/decision-dialogue.md` before asking a material question.
14
+
15
+ ## Bind authority
16
+
17
+ 1. Read `system.doctor`, `baseline.get`, active decisions, and existing research runs.
18
+ 2. Resume the matching active, blocked, or ready run. Do not create parallel authority.
19
+ 3. If none exists, select:
20
+ - `full` for a greenfield baseline;
21
+ - `adoption` for a brownfield baseline;
22
+ - a bounded mode only for a recorded active-change research disposition.
23
+ 4. Before `workflow.start`, inspect current code, docs, tests, runtime, and prior
24
+ artifacts. Provide one disposition for every catalog area in `full` or `adoption`:
25
+ - `execute`: produce fresh evidence;
26
+ - `verify_existing`: verify a current artifact against its source;
27
+ - `reuse`: reuse evidence that is still current;
28
+ - `not_applicable`: exclude with an evidence reference and rationale;
29
+ - `deferred`: record the consequence and owner acceptance when deferral changes the
30
+ accepted scope or leaves material risk.
31
+
32
+ `99-synthesis` must execute, verify, or reuse. A missing disposition is a coverage
33
+ error; a non-executed area with evidence is not an incomplete workflow.
34
+
35
+ ## Coverage catalog
36
+
37
+ Load only the reference for a step that must execute, verify, or reuse:
38
+
39
+ | Area | Reference | Area | Reference |
40
+ |---|---|---|---|
41
+ | `00-problem-validation` | `references/00-problem-validation.md` | `01-opportunity-discovery` | `references/01-opportunity-discovery.md` |
42
+ | `02-market-assessment` | `references/02-market-assessment.md` | `03-competitive-landscape` | `references/03-competitive-landscape.md` |
43
+ | `04-product-strategy` | `references/04-product-strategy.md` | `05-assumptions-validation` | `references/05-assumptions-validation.md` |
44
+ | `10-user-personas` | `references/10-user-personas.md` | `11-user-scenarios` | `references/11-user-scenarios.md` |
45
+ | `20-user-stories` | `references/20-user-stories.md` | `21-features-scope` | `references/21-features-scope.md` |
46
+ | `22-success-metrics` | `references/22-success-metrics.md` | `30-architecture-context` | `references/30-architecture-context.md` |
47
+ | `31-solution-strategy` | `references/31-solution-strategy.md` | `32-building-blocks` | `references/32-building-blocks.md` |
48
+ | `40-deployment` | `references/40-deployment.md` | `41-quality-risks` | `references/41-quality-risks.md` |
49
+ | `99-synthesis` | `references/99-synthesis.md` | | |
50
+
51
+ ## Investigate and interact
52
+
53
+ For each active area:
54
+
55
+ 1. Resolve observable facts from the checkout, runtime, tests, existing specifications,
56
+ and primary sources. Separate `Observed`, `Verified`, `Decided`, and `Unknown`.
57
+ 2. Ask the user only for a material intent, scope, compatibility, risk, or recovery
58
+ decision that evidence cannot answer. Use the host's native question UI when
59
+ available. Present the recommendation and effect; avoid a questionnaire or a dump
60
+ of the hidden research queue.
61
+ 3. Process dependent decisions one at a time. A small group of independent,
62
+ low-cognitive-load facts may be asked together when the host UI supports it.
63
+ 4. Normalize explicit user intent without redundant confirmation. Create durable
64
+ decision state only when a project-bound decision must survive interruption.
65
+ 5. Update the smallest relevant baseline specification or active-change research
66
+ artifact. Do not copy prompts, transcripts, provider payloads, or internal chain of
67
+ thought.
68
+
69
+ For every required workflow step, write
70
+ `.ultra/docs/research/<workflow-id>/<step-id>.md` with `Evidence`,
71
+ `Specification updates`, and `Decisions and unknowns`. Call `workflow.step` with
72
+ bounded evidence, the report output, and typed semantic records. Reused or verified
73
+ evidence must still produce a current report and digest. Block the same step when
74
+ required evidence or owner authority is missing.
75
+
76
+ At synthesis, bind the current `discovery.md`, `product.md`, `architecture.md`, and
77
+ `research-distillate.md` for initial/adoption research.
78
+
79
+ ## Baseline convergence
80
+
81
+ After `workflow.complete`, initial or adoption research calls `baseline.record` with
82
+ the current repository scope and revision, specification refs, evidence, real
83
+ verification results, unknowns, gap ledger, classification, and external provider
84
+ metadata references.
85
+
86
+ If Git is initialized but unborn, present the exact local checkpoint paths and purpose
87
+ for user authorization, then create only that local commit. Never create a remote,
88
+ tag, or push through research. If authorization or identity is missing, preserve the
89
+ run as blocked with `BASELINE_GIT_HEAD_REQUIRED`.
90
+
91
+ Call `baseline.converge` only when the user has accepted the exact baseline snapshot,
92
+ known failures, blocking gaps, and scope. Reuse an unambiguous current approval; do not
93
+ ask twice. MCP must reject stale research, drift, missing evidence, and unaccepted
94
+ failures.
95
+
96
+ Reuse the final research checkpoint approval during baseline convergence; do not ask
97
+ for an equivalent approval again. After initial or adoption convergence,
98
+ `ultra-change` becomes an available transition. Bounded change research returns to
99
+ its owning Change authority.
100
+
101
+ Return a compact coverage summary by disposition, current evidence or decision
102
+ blocker, baseline state, gaps, and allowed transitions. The host chooses the semantic
103
+ recommendation; MCP supplies only valid and required transitions.
@@ -1,71 +1,56 @@
1
1
  ---
2
2
  name: ultra-review
3
- description: Run independent specification-fidelity and engineering reviews over one current Ultra diff and persist bounded review evidence. Use when a task or change needs a read-only review gate before completion, convergence, or delivery.
3
+ description: Independently review one current Ultra plan, task diff, or aggregate change on specification fidelity and engineering standards. Use when current evidence needs a review gate or focused risk analysis.
4
4
  ---
5
5
 
6
- # Review one current diff
6
+ # Review one bounded scope
7
7
 
8
- Keep two verdict axes independent:
8
+ Keep two independent verdict axes:
9
9
 
10
- - `spec_fidelity`: accepted intent, delta, behavior, docs impact, and public seam;
11
- - `engineering_standards`: correctness, safety, tests, maintainability, observability,
12
- integration, and recovery.
10
+ - `spec_fidelity`: accepted intent, behavior, documentation impact, and public seams;
11
+ - `engineering_standards`: correctness, safety, tests, integration, maintainability,
12
+ observability, and recovery.
13
13
 
14
- One axis cannot compensate for the other.
14
+ Neither axis can compensate for the other.
15
15
 
16
- ## Bind durable scope
16
+ ## Bind evidence
17
17
 
18
- 1. Read `references/review-modes.md`. Select exactly one review mode: `task` for one
19
- implementation slice, `change` for aggregate delivery readiness, or `plan` for an
20
- approved plan before implementation. Bind only the evidence defined by that mode.
21
- 2. Resolve one explicit diff range, current full HEAD, change, task set, accepted
22
- evidence, and decision checkpoint state. Stop on an empty or ambiguous scope or an
23
- unconfirmed alignment checkpoint.
24
- 3. Resume or start a `review` workflow. Record `bind-diff` with revision, paths, mode,
25
- and task set.
26
- 4. Compile `change.context` for `review` using only accepted intent, delta, task
27
- contracts, tests, public seams, and diff paths. Record `compile-context` only when
28
- ready, with the immutable context manifest as the step output.
29
- 5. Create `.ultra/reviews/<session-id>/` with mode, change id, exact task ids, full HEAD,
30
- worktree digest, diff range, scope metadata, and pending verdicts.
18
+ 1. Read `references/review-modes.md` and select `plan`, `task`, or `change` from the
19
+ actual review request.
20
+ 2. Bind one explicit diff or plan artifact, full HEAD, worktree digest, task set,
21
+ acceptance, and current decision state.
22
+ 3. Resume or start the review workflow and record `bind-diff`.
23
+ 4. Compile `change.context` for `review` and record the immutable manifest under
24
+ `compile-context`.
31
25
 
32
- ## Execute independent axes
26
+ An empty, ambiguous, or stale scope cannot pass.
33
27
 
34
- Always run the bounded `review-spec` worker for specification fidelity. Select the
35
- smallest necessary engineering workers using the mode and risk matrix; a change review
36
- for delivery runs every applicable role. Record every selected and skipped role with a
37
- scope-specific rationale. Invoke them through the current host's native bounded-worker
38
- mechanism. Keep workers independent and pass only the current diff plus their role
39
- context.
28
+ ## Select workers by risk
40
29
 
41
- Resolve `references/unified-schema.md` from this Skill directory and pass its absolute
42
- path as `SCHEMA_PATH`. Validate artifacts with `scripts/review_wait.py`; a missing,
43
- invalid, stale, or partial required artifact is not a pass.
30
+ Always run `review-spec`. Select the smallest engineering worker set that covers the
31
+ actual diff and risk. Record every selected and excluded worker with a specific
32
+ rationale; do not run every specialist ceremonially.
44
33
 
45
- Record:
34
+ Invoke workers through the current host's native bounded-worker mechanism and pass
35
+ only their role, current scope, and relevant evidence. Workers are read-only and may
36
+ not decide owner choices or edit source.
46
37
 
47
- - `review-specification` with `spec-fidelity.json` as an output;
48
- - `review-engineering` with every selected engineering artifact as outputs;
49
- - `coordinate-findings` with the coordinated summary output.
38
+ Resolve `references/unified-schema.md` from this Skill directory and pass its absolute
39
+ path as `SCHEMA_PATH`. Validate specialist artifacts with
40
+ `scripts/review_wait.py`. Record outputs under `review-specification`,
41
+ `review-engineering`, and `coordinate-findings`.
50
42
 
51
- The coordinator preserves every specialist finding unchanged in `SUMMARY.json`.
52
- Duplicate root causes may be grouped only in the human-readable summary. Review is
53
- read-only except for review artifacts; implementation fixes are a separate dev action.
54
- If a finding exposes a new owner choice, preserve it as a finding and route the primary
55
- agent to `ultra-think`; a review worker must not open, answer, or hide that decision.
43
+ The coordinator preserves every finding unchanged in `SUMMARY.json`; it may group
44
+ duplicate root causes only in the human summary. A new material owner choice remains a
45
+ finding and routes to the interaction protocol.
56
46
 
57
- ## Verify and complete
47
+ ## Complete
58
48
 
59
- Recheck reviewed HEAD, worktree digest, review-context digest, diff, acceptance, task
60
- set, artifact schemas, and both verdicts. Record `verify-review-gate`, then call
61
- `workflow.complete`. MCP
62
- derives each axis and the durable verdict from the specialist outputs, then requires
63
- `SUMMARY.json` to match their complete finding set. Prompt claims and a lossy
64
- coordinator summary cannot replace either axis. Any code, test, spec, or contract edit
65
- invalidates affected review evidence and requires a new or resumed run.
49
+ Recheck HEAD, worktree, context digest, diff, task set, acceptance, artifact schemas,
50
+ and both axes. Record `verify-review-gate`, then call `workflow.complete`. MCP derives
51
+ the durable verdict and rejects missing specialists, lossy coordination, stale
52
+ artifacts, or prompt-supplied conclusions.
66
53
 
67
- Return both axis verdicts first, blocking findings, reviewed revision and paths,
68
- artifact digests, workflow id, skipped-role rationale, and one exact next route. A
69
- blocking implementation finding returns to `ultra-dev`; stale verification returns to
70
- `ultra-test`; a new owner choice returns to `ultra-think`; an approved current change
71
- review routes to `ultra-deliver`.
54
+ Any relevant code, test, specification, or contract edit invalidates the affected
55
+ review evidence. Return both verdict axes, blocking findings, reviewed scope, worker
56
+ selection rationale, artifact digests, and allowed transitions.
@@ -22,6 +22,8 @@ may be skipped with a concrete rationale.
22
22
 
23
23
  ## Selection record
24
24
 
25
- For every available worker, record `selected` or `skipped` and a rationale tied to the
26
- mode, changed paths, public seam, and risk flags. A role is applicable when its evidence
27
- could change either verdict axis. Tool availability alone is not a selection reason.
25
+ Disposition the complete specialist roster: `review-spec`, `review-code`,
26
+ `review-tests`, `review-errors`, `review-design`, and `review-comments`. Record each as
27
+ `selected` or `skipped` with a rationale tied to the mode, changed paths, public seam,
28
+ and risk flags. A role is applicable when its evidence could change either verdict
29
+ axis. Tool availability alone is not a selection reason.
@@ -87,9 +87,9 @@ preference as a defect. Preserve the source specialist's severity during coordin
87
87
  }
88
88
  },
89
89
  "workers": {
90
- "completed": ["review-code", "review-tests"],
90
+ "completed": ["review-spec", "review-code", "review-tests"],
91
91
  "failed": [],
92
- "skipped": []
92
+ "skipped": ["review-errors", "review-design", "review-comments"]
93
93
  },
94
94
  "worker_selection": [
95
95
  {
@@ -97,6 +97,26 @@ preference as a defect. Preserve the source specialist's severity during coordin
97
97
  "status": "selected",
98
98
  "rationale": "The specification axis is required for every review mode."
99
99
  },
100
+ {
101
+ "worker": "review-code",
102
+ "status": "selected",
103
+ "rationale": "The runtime diff changes executable behavior."
104
+ },
105
+ {
106
+ "worker": "review-tests",
107
+ "status": "selected",
108
+ "rationale": "The accepted behavior depends on changed test evidence."
109
+ },
110
+ {
111
+ "worker": "review-errors",
112
+ "status": "skipped",
113
+ "rationale": "The diff does not change an error, fallback, or recovery path."
114
+ },
115
+ {
116
+ "worker": "review-design",
117
+ "status": "skipped",
118
+ "rationale": "The bounded change does not alter module or data-flow boundaries."
119
+ },
100
120
  {
101
121
  "worker": "review-comments",
102
122
  "status": "skipped",
@@ -112,10 +132,10 @@ preference as a defect. Preserve the source specialist's severity during coordin
112
132
  `findings` must contain every specialist finding unchanged. Group duplicates only in
113
133
  the human-readable summary; never delete or merge machine-readable records.
114
134
 
115
- `mode` is `task`, `change`, or `plan`. `worker_selection` contains every selected or
116
- skipped worker exactly once with a scope-specific rationale. Its selected set equals
117
- `workers.completed` plus `workers.failed`; its skipped set equals `workers.skipped`.
118
- `review-spec` is always selected and completed.
135
+ `mode` is `task`, `change`, or `plan`. `worker_selection` contains each member of the
136
+ six-worker roster exactly once with a scope-specific selected or skipped rationale.
137
+ Its selected set equals `workers.completed` plus `workers.failed`; its skipped set
138
+ equals `workers.skipped`. `review-spec` is always selected and completed.
119
139
 
120
140
  The overall verdict is `APPROVE` only when both axes pass, artifacts are complete and
121
141
  current, and no P0 or P1 finding remains. Use `REQUEST_CHANGES` for a failed axis or
@@ -25,6 +25,14 @@ AXIS_VERDICTS = {"PASS", "FAIL", "INCOMPLETE"}
25
25
  OVERALL_VERDICTS = {"APPROVE", "REQUEST_CHANGES", "INCOMPLETE"}
26
26
  REVIEW_MODES = {"task", "change", "plan"}
27
27
  SELECTION_STATUSES = {"selected", "skipped"}
28
+ REVIEW_WORKERS = {
29
+ "review-spec",
30
+ "review-code",
31
+ "review-tests",
32
+ "review-errors",
33
+ "review-design",
34
+ "review-comments",
35
+ }
28
36
  ARTIFACT_STEM = re.compile(r"^[a-z][a-z0-9-]*$")
29
37
  FINDING_FIELDS = {
30
38
  "id", "axis", "severity", "category", "title", "file", "line", "trigger",
@@ -240,6 +248,10 @@ def validate_summary(data):
240
248
  return "selected workers must equal completed and failed workers"
241
249
  if skipped != set(workers["skipped"]):
242
250
  return "skipped worker selection must match workers.skipped"
251
+ if seen_workers != REVIEW_WORKERS:
252
+ missing = sorted(REVIEW_WORKERS - seen_workers)
253
+ extra = sorted(seen_workers - REVIEW_WORKERS)
254
+ return f"worker_selection must disposition the complete roster; missing={missing}, extra={extra}"
243
255
  if "review-spec" not in selected or "review-spec" not in set(workers["completed"]):
244
256
  return "review-spec must be selected and completed"
245
257
  findings = data.get("findings")
@@ -1,64 +1,54 @@
1
1
  ---
2
2
  name: ultra-status
3
- description: Report authoritative Ultra project health, baseline, workflow position, task/session progress, evidence freshness, blockers, and one deterministic next action. Use when the user asks what is complete, blocked, stale, or next in an Ultra project.
3
+ description: Read authoritative Ultra health, workflows, decisions, changes, tasks, evidence freshness, and valid transitions. Use when the user asks what is complete, blocked, stale, or currently possible.
4
4
  ---
5
5
 
6
- # Route from authoritative state
6
+ # Report authoritative state
7
7
 
8
- This workflow is read-only. Never reconstruct status from prose or generated task
9
- projections.
8
+ This Skill is read-only. Never fall back to generated task JSON, prose, or context
9
+ frontmatter when DB authority is missing or degraded.
10
10
 
11
- ## Read order
11
+ ## Read
12
12
 
13
- 1. Call `system.doctor` with repair disabled.
14
- 2. Call `baseline.get` for classification, readiness, revision, worktree, spec digests,
15
- research provenance, gaps, and blockers.
16
- 3. Call `decision.list`, then `decision.get` for the current active or checkpoint-ready
17
- thread. Expose only its current question or checkpoint, not the hidden history.
18
- 4. Call `workflow.list`, then `workflow.get` for every active, blocked, or ready run.
19
- 5. Call `change.breadcrumb`, `change.list`, `task.list`, and `session.list`.
20
- 6. Inspect current Git branch, full HEAD, and worktree without mutation.
21
- 7. Read test, review, and delivery artifacts only when referenced by DB workflow state;
22
- compare their recorded digest and revision with current authority.
13
+ 1. Run `system.doctor` without repair.
14
+ 2. Read baseline classification, revision, worktree, research provenance, gaps, and
15
+ health.
16
+ 3. Read current decision state without exposing hidden future questions.
17
+ 4. Read active, blocked, and ready workflows and their current steps.
18
+ 5. Read breadcrumb, changes, tasks, sessions, and current Git state.
19
+ 6. Read test, review, and delivery artifacts only through DB references and verify
20
+ their digests and revisions.
23
21
 
24
- If state is unreadable, report that panel unavailable and route to `ultra-doctor`.
25
- Never fall back to generated task JSON, raw SQLite queries, or context frontmatter.
22
+ If authority is unreadable, report the unavailable panel and the required doctor or
23
+ init transition. Do not mutate, compile context, repair, or release.
26
24
 
27
- ## Choose one route
25
+ ## Interpret transitions
28
26
 
29
- Prefer the breadcrumb and durable workflow position:
27
+ MCP reports:
30
28
 
31
- - state integrity, schema, projection, or installed-asset failure: `ultra-doctor`;
32
- - open decision or checkpoint: `ultra-think` with its exact decision id;
33
- - missing project or migrated compatibility authority: `ultra-init`;
34
- - active/blocked research: `ultra-research` at its exact `current_step`;
35
- - ready research with unconverged baseline: finalize research, record, approve, and
36
- converge through `ultra-research`;
37
- - active plan/change/dev/test/review/deliver run: its matching workflow at the exact
38
- step or blocker;
39
- - ready baseline with no change: `ultra-change` to persist the requested outcome before
40
- any planning;
41
- - archived change with fresh evidence: report completion without inventing more work.
29
+ - `allowed_transitions`: mechanically valid capabilities;
30
+ - `required_transition`: the sole recovery route only when a hard invariant permits no
31
+ safe alternative.
42
32
 
43
- Context-size warnings are advisory. Missing authority, stale required refs or outputs,
44
- incomplete task contracts, failed evidence, unresolved learning, and missing approval
45
- are blockers.
46
-
47
- ## Output
33
+ The host model recommends among allowed transitions using the user's current goal,
34
+ workflow evidence, and cost of interruption. Do not present the recommendation as DB
35
+ authority. A healthy project may validly allow research, change, thinking, or status at
36
+ the same time.
48
37
 
49
38
  Report:
50
39
 
51
40
  ```text
52
- Ultra: <healthy|degraded> · <branch>@<head> · worktree <clean|dirty>
41
+ Ultra: <healthy|degraded> · <branch>@<head|unborn|non-git> · worktree <state>
53
42
  Baseline: <mode>/<status> · research=<run/status> · gaps=<open>/<blocking>
54
- Workflow: <kind/id/status> · step=<current|finalize> · outputs=<fresh|stale>
55
- Decision: <id/phase|checkpoint|none> · thread=<id/status>
43
+ Workflow: <kind/id/status> · step=<current|complete> · outputs=<fresh|stale>
44
+ Decision: <current|checkpoint|none>
56
45
  Change: <id/status|none> · Task: <id/status|none> · Sessions: <active>
57
- Evidence: test=<state> · review=<two axes> · delivery=<state>
58
- Blockers: <specific codes or none>
59
- Warnings: <advisory codes or none>
60
- Next: <one exact action>
46
+ Evidence: test=<state> · review=<axes> · delivery=<state>
47
+ Blockers: <codes or none>
48
+ Warnings: <codes or none>
49
+ Allowed transitions: <capabilities>
50
+ Required transition: <capability or none>
51
+ Host recommendation: <capability and concise rationale>
61
52
  ```
62
53
 
63
- Separate verified facts, inferences, and unavailable evidence. Do not modify state,
64
- compile context, repair, or release from this Skill.
54
+ Separate verified facts, host inference, and unavailable evidence.