ultra-builder-pro-cli 0.14.0 → 0.15.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 (154) hide show
  1. package/.ultra-template/docs/research/README.md +11 -7
  2. package/.ultra-template/specs/architecture.md +36 -36
  3. package/.ultra-template/specs/discovery.md +46 -33
  4. package/.ultra-template/specs/product.md +38 -29
  5. package/.ultra-template/specs/research-distillate.md +48 -0
  6. package/.ultra-template/tasks/contexts/TEMPLATE.md +11 -28
  7. package/CHANGELOG.md +44 -1
  8. package/README.md +34 -19
  9. package/adapters/_shared/codex-assets.cjs +6 -2
  10. package/adapters/_shared/file-ops.cjs +6 -2
  11. package/adapters/claude.js +3 -2
  12. package/adapters/codex.js +1 -0
  13. package/adapters/kimi.js +3 -2
  14. package/adapters/opencode.js +3 -2
  15. package/agents/review-coordinator.md +9 -6
  16. package/docs/AGENT-CONTEXT.md +15 -8
  17. package/docs/ARCHITECTURE.md +33 -12
  18. package/docs/PLAN.zh-CN.md +3 -2
  19. package/docs/ROADMAP.md +8 -4
  20. package/docs/RUNTIME-COMPAT-MATRIX.md +4 -4
  21. package/docs/STATE-DB-ACCESS-POLICY.md +27 -25
  22. package/docs/WORKFLOW-LIFECYCLE.md +266 -0
  23. package/hooks/README.md +6 -1
  24. package/hooks/health_check.py +12 -3
  25. package/hooks/subagent_tracker.py +52 -77
  26. package/mcp-server/hook-event.cjs +34 -0
  27. package/mcp-server/lib/archive-journal.cjs +17 -5
  28. package/mcp-server/lib/baseline-workflow.cjs +158 -18
  29. package/mcp-server/lib/change-workflow.cjs +550 -85
  30. package/mcp-server/lib/context-spine.cjs +242 -24
  31. package/mcp-server/lib/doctor.cjs +33 -3
  32. package/mcp-server/lib/init-project.cjs +210 -16
  33. package/mcp-server/lib/plan-store.cjs +4 -1
  34. package/mcp-server/lib/pricing.cjs +7 -10
  35. package/mcp-server/lib/project-breadcrumb.cjs +6 -0
  36. package/mcp-server/lib/projector.cjs +57 -3
  37. package/mcp-server/lib/spec-learning.cjs +79 -2
  38. package/mcp-server/lib/state-db.cjs +145 -8
  39. package/mcp-server/lib/state-ops.cjs +160 -9
  40. package/mcp-server/lib/workflow-state.cjs +2292 -0
  41. package/mcp-server/server.cjs +161 -15
  42. package/orchestrator/daemon.cjs +1 -2
  43. package/orchestrator/dispatch-rules.cjs +5 -31
  44. package/orchestrator/planner/plan-builder.cjs +21 -12
  45. package/package.json +13 -3
  46. package/skills/ultra-change/SKILL.md +53 -68
  47. package/skills/ultra-change/references/change-contract.md +36 -0
  48. package/skills/ultra-deliver/SKILL.md +69 -79
  49. package/skills/ultra-deliver/references/baseline-reconciliation.md +20 -0
  50. package/skills/ultra-dev/SKILL.md +54 -59
  51. package/skills/ultra-doctor/SKILL.md +40 -71
  52. package/skills/ultra-init/SKILL.md +96 -103
  53. package/skills/ultra-init/references/brownfield-adoption.md +2 -2
  54. package/skills/ultra-plan/SKILL.md +79 -85
  55. package/skills/ultra-plan/references/semantic-preflight.md +18 -0
  56. package/skills/ultra-research/SKILL.md +87 -60
  57. package/skills/ultra-research/references/00-problem-validation.md +36 -0
  58. package/skills/ultra-research/references/01-opportunity-discovery.md +33 -0
  59. package/skills/ultra-research/references/02-market-assessment.md +30 -0
  60. package/skills/ultra-research/references/03-competitive-landscape.md +31 -0
  61. package/skills/ultra-research/references/04-product-strategy.md +32 -0
  62. package/skills/ultra-research/references/05-assumptions-validation.md +31 -0
  63. package/skills/ultra-research/references/10-user-personas.md +29 -0
  64. package/skills/ultra-research/references/11-user-scenarios.md +28 -0
  65. package/skills/ultra-research/references/20-user-stories.md +30 -0
  66. package/skills/ultra-research/references/21-features-scope.md +29 -0
  67. package/skills/ultra-research/references/22-success-metrics.md +28 -0
  68. package/skills/ultra-research/references/30-architecture-context.md +30 -0
  69. package/skills/ultra-research/references/31-solution-strategy.md +28 -0
  70. package/skills/ultra-research/references/32-building-blocks.md +28 -0
  71. package/skills/ultra-research/references/40-deployment.md +29 -0
  72. package/skills/ultra-research/references/41-quality-risks.md +28 -0
  73. package/skills/ultra-research/references/99-synthesis.md +35 -0
  74. package/skills/ultra-review/SKILL.md +57 -73
  75. package/skills/ultra-review/references/review-modes.md +27 -0
  76. package/skills/ultra-review/references/unified-schema.md +25 -0
  77. package/skills/ultra-review/scripts/review_wait.py +40 -3
  78. package/skills/ultra-status/SKILL.md +41 -45
  79. package/skills/ultra-test/SKILL.md +48 -55
  80. package/skills/ultra-verify/SKILL.md +1 -1
  81. package/skills/ultra-verify/references/{confidence-system.md → evidence-status.md} +3 -3
  82. package/spec/cli-protocol.md +7 -2
  83. package/spec/mcp-tools.yaml +384 -63
  84. package/spec/schemas/baseline-reconciliation.v1.schema.json +73 -0
  85. package/spec/schemas/delivery-report.v1.schema.json +111 -0
  86. package/spec/schemas/mcp-tools.schema.json +1 -1
  87. package/spec/schemas/state-db.sql +82 -1
  88. package/spec/schemas/tasks.v4.5.schema.json +8 -1
  89. package/spec/schemas/test-report.v1.schema.json +194 -0
  90. package/ultra-tools/cli.cjs +1 -1
  91. package/ultra-tools/commands/migrate.cjs +3 -3
  92. package/ultra-tools/commands/status.cjs +213 -12
  93. package/.ultra-template/delivery-report.json +0 -9
  94. package/.ultra-template/test-report.json +0 -8
  95. package/adapters/_shared/tests/file-ops.test.cjs +0 -54
  96. package/adapters/_shared/tests/frontmatter.test.cjs +0 -47
  97. package/adapters/_shared/tests/handbook.test.cjs +0 -101
  98. package/adapters/_shared/tests/path-rewrite.test.cjs +0 -60
  99. package/adapters/_shared/tests/provenance.test.cjs +0 -133
  100. package/adapters/_shared/tests/resolve-target.test.cjs +0 -75
  101. package/adapters/_shared/tests/runtime-assets.test.cjs +0 -149
  102. package/adapters/_shared/tests/settings-merge.test.cjs +0 -85
  103. package/adapters/_shared/tests/validate.test.cjs +0 -30
  104. package/adapters/tests/claude.test.cjs +0 -138
  105. package/adapters/tests/codex-hook.test.cjs +0 -142
  106. package/adapters/tests/codex.test.cjs +0 -430
  107. package/adapters/tests/kimi-hook.test.cjs +0 -149
  108. package/adapters/tests/kimi.test.cjs +0 -259
  109. package/adapters/tests/opencode.test.cjs +0 -357
  110. package/mcp-server/lib/archive-journal.test.cjs +0 -35
  111. package/mcp-server/lib/baseline-workflow.test.cjs +0 -477
  112. package/mcp-server/lib/change-workflow.test.cjs +0 -971
  113. package/mcp-server/lib/context-spine.test.cjs +0 -93
  114. package/mcp-server/lib/doctor.test.cjs +0 -148
  115. package/mcp-server/lib/plan-store.test.cjs +0 -132
  116. package/mcp-server/lib/prd-parser.test.cjs +0 -82
  117. package/mcp-server/lib/project-breadcrumb.test.cjs +0 -112
  118. package/mcp-server/lib/runtime-state.test.cjs +0 -92
  119. package/mcp-server/lib/spec-learning.test.cjs +0 -67
  120. package/mcp-server/lib/state-db.test.cjs +0 -314
  121. package/mcp-server/lib/task-expander.test.cjs +0 -169
  122. package/mcp-server/lib/topo.test.cjs +0 -158
  123. package/mcp-server/tests/circuit-breaker.test.cjs +0 -125
  124. package/mcp-server/tests/commit-hash-flow.test.cjs +0 -117
  125. package/mcp-server/tests/concurrency-update.test.cjs +0 -96
  126. package/mcp-server/tests/concurrency.test.cjs +0 -112
  127. package/mcp-server/tests/db-ops.test.cjs +0 -121
  128. package/mcp-server/tests/init-project.test.cjs +0 -393
  129. package/mcp-server/tests/migrate.test.cjs +0 -232
  130. package/mcp-server/tests/projector.test.cjs +0 -162
  131. package/mcp-server/tests/server-contract.test.cjs +0 -1467
  132. package/mcp-server/tests/staleness.test.cjs +0 -190
  133. package/mcp-server/tests/state-db.test.cjs +0 -106
  134. package/mcp-server/tests/state-ops.test.cjs +0 -449
  135. package/mcp-server/tests/tagged-tasks.test.cjs +0 -163
  136. package/mcp-server/tests/telemetry.test.cjs +0 -219
  137. package/orchestrator/planner/plan-builder.test.cjs +0 -165
  138. package/orchestrator/tests/auto-merge.test.cjs +0 -216
  139. package/orchestrator/tests/daemon.test.cjs +0 -311
  140. package/orchestrator/tests/dispatch-rules.test.cjs +0 -124
  141. package/orchestrator/tests/parallel-orchestrator.test.cjs +0 -233
  142. package/orchestrator/tests/phase-8b-gate.test.cjs +0 -183
  143. package/orchestrator/tests/recovery.test.cjs +0 -190
  144. package/orchestrator/tests/session-runner.test.cjs +0 -314
  145. package/orchestrator/tests/skill-miner.test.cjs +0 -147
  146. package/orchestrator/tests/worktree-manager.test.cjs +0 -148
  147. package/skills/ultra-research/references/architecture.md +0 -38
  148. package/skills/ultra-research/references/problem-product.md +0 -39
  149. package/skills/ultra-research/references/quality-delivery.md +0 -34
  150. package/skills/ultra-research/references/synthesis.md +0 -38
  151. package/skills/ultra-research/references/users-scope.md +0 -40
  152. package/ultra-tools/legacy-memory.test.cjs +0 -80
  153. package/ultra-tools/status-command.test.cjs +0 -181
  154. package/ultra-tools/system-command.test.cjs +0 -309
@@ -1,81 +1,65 @@
1
1
  ---
2
2
  name: ultra-review
3
- description: Run independent specification-fidelity and engineering reviews over one current diff using bounded workers and file-based evidence. Use when implementation needs a read-only review gate before task completion or delivery.
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.
4
4
  ---
5
5
 
6
6
  # Review one current diff
7
7
 
8
8
  Keep two verdict axes independent:
9
9
 
10
- 1. `spec_fidelity`: intent, acceptance, delta, documentation impact, and public seam;
11
- 2. `engineering_standards`: correctness, safety, maintainability, testing,
12
- observability, and recovery.
13
-
14
- One axis cannot compensate for the other. Preserve each finding's source, severity,
15
- file and line, and axis during coordination.
16
-
17
- ## Scope and context
18
-
19
- 1. Resolve one explicit diff range and file set. Include staged and unstaged changes
20
- for a default working-tree review.
21
- 2. Bind the single matching change through `change.list` and `task.list`; require an id
22
- when ambiguous.
23
- 3. Compile `change.context` for the review role and gate with only the intent, delta,
24
- acceptance, tests, diff paths, and public-seam contract needed for this review.
25
- 4. Stop on stale HEAD, blocked readiness, empty scope, or missing acceptance evidence.
26
- 5. Create `.ultra/reviews/<session-id>/` with the reviewed HEAD, range, change id,
27
- selected workers, and a pending verdict.
28
-
29
- ## Run the independent fidelity axis
30
-
31
- Always dispatch `review-spec` with only the accepted intent, delta, acceptance criteria,
32
- public-seam context, current HEAD, and diff scope. Do not give it engineering findings
33
- or an implementation rationale that is not part of the accepted contract. It writes
34
- `spec-fidelity.json` with `axis: spec_fidelity`.
35
-
36
- ## Select engineering specialists
37
-
38
- Use the smallest set that covers the diff. The delivery gate runs all five:
39
-
40
- - `review-code`: correctness, security, and live-path reachability;
41
- - `review-tests`: behavioral coverage and feedback-loop evidence;
42
- - `review-errors`: hidden failures, recovery, and observability;
43
- - `review-design`: types, boundaries, complexity, and coupling;
44
- - `review-comments`: stale or misleading comments and documentation.
45
-
46
- Record why any engineering specialist is skipped. The independent specification
47
- worker is required for every change-linked review.
48
-
49
- ## Execute bounded workers
50
-
51
- Use the current host's native bounded-worker mechanism. Dispatch `review-spec` and the
52
- selected engineering workers independently. Each worker must inspect only the supplied
53
- diff and role context. Resolve `references/unified-schema.md` from this
54
- Skill directory and pass that absolute path as `SCHEMA_PATH`; never make a worker infer
55
- the plugin installation root. Each worker writes `<session>/<worker>.json` following
56
- that contract, limits output to actionable findings, and returns only a short file
57
- acknowledgement to the parent context.
58
-
59
- Resolve bundled paths relative to this skill directory. Validate the exact expected
60
- artifacts before coordination:
61
-
62
- ```bash
63
- python3 scripts/review_wait.py <session-path> agents spec-fidelity review-code review-tests
64
- ```
65
-
66
- Pass only the engineering worker stems actually selected. Missing or invalid required
67
- artifacts make the corresponding axis incomplete; a partial set is never a pass.
68
-
69
- Run `review-coordinator` only after validation. It may merge duplicate root causes but
70
- must retain source identifiers and the highest original severity.
71
- Validate its summary with the same waiter.
72
-
73
- ## Report and handoff
74
-
75
- Report both axis verdicts first, followed by blocking findings and artifact paths.
76
- Review is read-only except for review artifacts; fixes are a separate implementation
77
- action. Recheck only unresolved or changed scope after fixes.
78
-
79
- At the final HEAD, compile review context with one convergence action. Delivery must
80
- submit separate review evidence rows for `spec_fidelity` and
81
- `engineering_standards`; a single aggregate pass is invalid.
10
+ - `spec_fidelity`: accepted intent, delta, behavior, docs impact, and public seam;
11
+ - `engineering_standards`: correctness, safety, tests, maintainability, observability,
12
+ integration, and recovery.
13
+
14
+ One axis cannot compensate for the other.
15
+
16
+ ## Bind durable scope
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, and accepted
22
+ evidence. Stop on an empty or ambiguous scope.
23
+ 3. Resume or start a `review` workflow. Record `bind-diff` with revision, paths, mode,
24
+ and task set.
25
+ 4. Compile `change.context` for `review` using only accepted intent, delta, task
26
+ contracts, tests, public seams, and diff paths. Record `compile-context` only when
27
+ ready, with the immutable context manifest as the step output.
28
+ 5. Create `.ultra/reviews/<session-id>/` with mode, change id, exact task ids, full HEAD,
29
+ worktree digest, diff range, scope metadata, and pending verdicts.
30
+
31
+ ## Execute independent axes
32
+
33
+ Always run the bounded `review-spec` worker for specification fidelity. Select the
34
+ smallest necessary engineering workers using the mode and risk matrix; a change review
35
+ for delivery runs every applicable role. Record every selected and skipped role with a
36
+ scope-specific rationale. Invoke them through the current host's native bounded-worker
37
+ mechanism. Keep workers independent and pass only the current diff plus their role
38
+ context.
39
+
40
+ Resolve `references/unified-schema.md` from this Skill directory and pass its absolute
41
+ path as `SCHEMA_PATH`. Validate artifacts with `scripts/review_wait.py`; a missing,
42
+ invalid, stale, or partial required artifact is not a pass.
43
+
44
+ Record:
45
+
46
+ - `review-specification` with `spec-fidelity.json` as an output;
47
+ - `review-engineering` with every selected engineering artifact as outputs;
48
+ - `coordinate-findings` with the coordinated summary output.
49
+
50
+ The coordinator preserves every specialist finding unchanged in `SUMMARY.json`.
51
+ Duplicate root causes may be grouped only in the human-readable summary. Review is
52
+ read-only except for review artifacts; implementation fixes are a separate dev action.
53
+
54
+ ## Verify and complete
55
+
56
+ Recheck reviewed HEAD, worktree digest, review-context digest, diff, acceptance, task
57
+ set, artifact schemas, and both verdicts. Record `verify-review-gate`, then call
58
+ `workflow.complete`. MCP
59
+ derives each axis and the durable verdict from the specialist outputs, then requires
60
+ `SUMMARY.json` to match their complete finding set. Prompt claims and a lossy
61
+ coordinator summary cannot replace either axis. Any code, test, spec, or contract edit
62
+ invalidates affected review evidence and requires a new or resumed run.
63
+
64
+ Return both axis verdicts first, blocking findings, reviewed revision and paths,
65
+ artifact digests, workflow id, skipped-role rationale, and one exact next route.
@@ -0,0 +1,27 @@
1
+ # Review modes and worker selection
2
+
3
+ Select one mode before creating review artifacts.
4
+
5
+ ## Task
6
+
7
+ Review one completed task and its bounded diff. Require specification fidelity and the
8
+ engineering roles implicated by the task's code, tests, errors, comments, or design.
9
+ The result supports `review-slice`; it does not replace aggregate change review.
10
+
11
+ ## Change
12
+
13
+ Review the current full change, accepted task set, test report, documentation impact,
14
+ and convergence boundary. Run specification fidelity plus every engineering role that
15
+ can materially affect delivery. This is the delivery-facing review.
16
+
17
+ ## Plan
18
+
19
+ Review accepted intent, task coverage, seams, dependencies, recovery, and verification
20
+ before implementation. Use a plan artifact as the bounded scope; code-diff-only roles
21
+ may be skipped with a concrete rationale.
22
+
23
+ ## Selection record
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.
@@ -67,8 +67,13 @@ preference as a defect. Preserve the source specialist's severity during coordin
67
67
  ```json
68
68
  {
69
69
  "$schema": "ultra-review-summary-v2",
70
+ "mode": "change",
70
71
  "session": "<session-id>",
72
+ "change_id": "<change-id>",
73
+ "task_ids": ["<task-id>"],
71
74
  "head": "<full-git-head>",
75
+ "worktree_digest": "<sha256-of-current-worktree>",
76
+ "context_digest": "<sha256-of-recorded-review-context>",
72
77
  "status": "complete",
73
78
  "verdict": "REQUEST_CHANGES",
74
79
  "axes": {
@@ -86,12 +91,32 @@ preference as a defect. Preserve the source specialist's severity during coordin
86
91
  "failed": [],
87
92
  "skipped": []
88
93
  },
94
+ "worker_selection": [
95
+ {
96
+ "worker": "review-spec",
97
+ "status": "selected",
98
+ "rationale": "The specification axis is required for every review mode."
99
+ },
100
+ {
101
+ "worker": "review-comments",
102
+ "status": "skipped",
103
+ "rationale": "The current diff does not change maintained comments or API documentation."
104
+ }
105
+ ],
89
106
  "findings": [],
90
107
  "positive_observations": [],
91
108
  "limitations": []
92
109
  }
93
110
  ```
94
111
 
112
+ `findings` must contain every specialist finding unchanged. Group duplicates only in
113
+ the human-readable summary; never delete or merge machine-readable records.
114
+
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.
119
+
95
120
  The overall verdict is `APPROVE` only when both axes pass, artifacts are complete and
96
121
  current, and no P0 or P1 finding remains. Use `REQUEST_CHANGES` for a failed axis or
97
122
  blocking finding, and `INCOMPLETE` when required evidence or workers are missing.
@@ -23,6 +23,8 @@ AXES = {"spec_fidelity", "engineering_standards"}
23
23
  SEVERITIES = {"P0", "P1", "P2", "P3"}
24
24
  AXIS_VERDICTS = {"PASS", "FAIL", "INCOMPLETE"}
25
25
  OVERALL_VERDICTS = {"APPROVE", "REQUEST_CHANGES", "INCOMPLETE"}
26
+ REVIEW_MODES = {"task", "change", "plan"}
27
+ SELECTION_STATUSES = {"selected", "skipped"}
26
28
  ARTIFACT_STEM = re.compile(r"^[a-z][a-z0-9-]*$")
27
29
  FINDING_FIELDS = {
28
30
  "id", "axis", "severity", "category", "title", "file", "line", "trigger",
@@ -182,9 +184,16 @@ def expected_overall_verdict(data) -> str:
182
184
  def validate_summary(data):
183
185
  if data.get("$schema") != SUMMARY_SCHEMA:
184
186
  return f"$schema must be {SUMMARY_SCHEMA}"
185
- for field in ["session", "head"]:
187
+ if data.get("mode") not in REVIEW_MODES:
188
+ return "mode must be task, change, or plan"
189
+ for field in ["session", "change_id", "head", "context_digest"]:
186
190
  if not nonempty_string(data.get(field)):
187
191
  return f"{field} must be a non-empty string"
192
+ if data.get("worktree_digest") is not None and not nonempty_string(data.get("worktree_digest")):
193
+ return "worktree_digest must be null or a non-empty string"
194
+ task_ids = data.get("task_ids")
195
+ if not isinstance(task_ids, list) or not all(nonempty_string(item) for item in task_ids):
196
+ return "task_ids must be a string array"
188
197
  if data.get("status") != "complete":
189
198
  return "status must be complete"
190
199
  if data.get("verdict") not in OVERALL_VERDICTS:
@@ -203,8 +212,36 @@ def validate_summary(data):
203
212
  if not isinstance(workers, dict):
204
213
  return "workers must be an object"
205
214
  for field in ["completed", "failed", "skipped"]:
206
- if not isinstance(workers.get(field), list):
207
- return f"workers.{field} must be an array"
215
+ values = workers.get(field)
216
+ if not isinstance(values, list) or not all(nonempty_string(item) for item in values):
217
+ return f"workers.{field} must be a string array"
218
+ if len(values) != len(set(values)):
219
+ return f"workers.{field} must not contain duplicates"
220
+ worker_selection = data.get("worker_selection")
221
+ if not isinstance(worker_selection, list) or not worker_selection:
222
+ return "worker_selection must be a non-empty array"
223
+ selected = set()
224
+ skipped = set()
225
+ seen_workers = set()
226
+ for item in worker_selection:
227
+ if not isinstance(item, dict):
228
+ return "worker_selection items must be objects"
229
+ worker = item.get("worker")
230
+ status = item.get("status")
231
+ if not nonempty_string(worker) or status not in SELECTION_STATUSES:
232
+ return "worker_selection requires worker and selected or skipped status"
233
+ if worker in seen_workers:
234
+ return f"duplicate worker selection: {worker}"
235
+ if not nonempty_string(item.get("rationale")):
236
+ return f"worker selection rationale is required: {worker}"
237
+ seen_workers.add(worker)
238
+ (selected if status == "selected" else skipped).add(worker)
239
+ if selected != set(workers["completed"]) | set(workers["failed"]):
240
+ return "selected workers must equal completed and failed workers"
241
+ if skipped != set(workers["skipped"]):
242
+ return "skipped worker selection must match workers.skipped"
243
+ if "review-spec" not in selected or "review-spec" not in set(workers["completed"]):
244
+ return "review-spec must be selected and completed"
208
245
  findings = data.get("findings")
209
246
  if not isinstance(findings, list):
210
247
  return "findings must be an array"
@@ -1,64 +1,60 @@
1
1
  ---
2
2
  name: ultra-status
3
- description: Report authoritative Ultra health, position, readiness, evidence freshness, and one deterministic next action. Use when the user asks where an Ultra project stands or what should happen next.
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.
4
4
  ---
5
5
 
6
- # Route from authoritative status
6
+ # Route from authoritative state
7
7
 
8
- Answer status questions without reconstructing state from prose. `.ultra/state.db` is
9
- authoritative; reports and Markdown are evidence or projections.
8
+ This workflow is read-only. Never reconstruct status from prose or generated task
9
+ projections.
10
10
 
11
11
  ## Read order
12
12
 
13
- 1. Call `system.doctor` in read-only mode. If authority is unhealthy, route only to
14
- `ultra-doctor` and include the blocking diagnostic.
15
- 2. Call `baseline.get` for mode, lifecycle status, repository revision, branch,
16
- worktree snapshot, specification digest health, gap ledger, and adoption blockers.
17
- 3. Call `change.breadcrumb` for the active change, task, role, gate, readiness,
18
- blockers, advisory warnings, staleness, and next action.
19
- 4. Call `task.list` and `session.list` for progress and active execution details.
20
- 5. Read test and delivery reports only when present, and mark a report stale when its
21
- HEAD differs from the current checkout.
22
- 6. Read Git branch, HEAD, and worktree status without mutation.
23
-
24
- If MCP task or change state is unavailable, label that panel unavailable. Never fall
25
- back to generated task JSON, context frontmatter, or raw SQLite.
26
-
27
- ## Routing
28
-
29
- Follow the breadcrumb's primary route and return one action, not a menu:
30
-
31
- - unhealthy authority: `ultra-doctor`;
32
- - missing Ultra project: `ultra-init`;
33
- - projection-only authority conflict: run the exact supported import command from the
34
- MCP error, then `ultra-init`;
35
- - migrated or missing baseline evidence with no active change: `ultra-init`, then
36
- `ultra-research` or `ultra-plan` according to the gap;
37
- - baseline or context-budget warning during an active change: keep the current route
38
- and surface the warning; do not turn it into a refusal;
39
- - blocked or stale context: the workflow named by the breadcrumb;
40
- - ready implementation task: `ultra-dev <task-id>`;
41
- - completed tasks with missing or stale test evidence: `ultra-test`;
42
- - incomplete review or convergence: `ultra-review` or `ultra-deliver`;
43
- - ready change: `ultra-deliver`;
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 `workflow.list`, then `workflow.get` for every active, blocked, or ready run.
17
+ 4. Call `change.breadcrumb`, `change.list`, `task.list`, and `session.list`.
18
+ 5. Inspect current Git branch, full HEAD, and worktree without mutation.
19
+ 6. Read test, review, and delivery artifacts only when referenced by DB workflow state;
20
+ compare their recorded digest and revision with current authority.
21
+
22
+ If state is unreadable, report that panel unavailable and route to `ultra-doctor`.
23
+ Never fall back to generated task JSON, raw SQLite queries, or context frontmatter.
24
+
25
+ ## Choose one route
26
+
27
+ Prefer the breadcrumb and durable workflow position:
28
+
29
+ - state integrity, schema, projection, or installed-asset failure: `ultra-doctor`;
30
+ - missing project or migrated compatibility authority: `ultra-init`;
31
+ - active/blocked research: `ultra-research` at its exact `current_step`;
32
+ - ready research with unconverged baseline: finalize research, record, approve, and
33
+ converge through `ultra-research`;
34
+ - active plan/change/dev/test/review/deliver run: its matching workflow at the exact
35
+ step or blocker;
36
+ - ready baseline with no change: `ultra-change` to persist the requested outcome before
37
+ any planning;
44
38
  - archived change with fresh evidence: report completion without inventing more work.
45
39
 
46
- Require an explicit change id when several active changes make the route ambiguous.
40
+ Context-size warnings are advisory. Missing authority, stale required refs or outputs,
41
+ incomplete task contracts, failed evidence, unresolved learning, and missing approval
42
+ are blockers.
47
43
 
48
44
  ## Output
49
45
 
50
- Use a compact shape:
46
+ Report:
51
47
 
52
48
  ```text
53
49
  Ultra: <healthy|degraded> · <branch>@<head> · worktree <clean|dirty>
54
- Position: change=<id|none> task=<id|none> role=<role> gate=<gate>
55
- Baseline: <greenfield|brownfield|migrated>/<status> revision=<revision|none> gaps=<open>/<blocking>
56
- Readiness: <ready|blocked|stale> — <blockers or none>
57
- Warnings: <advisory conditions or none>
58
- Progress: <completed>/<total>; sessions=<active count>
59
- Evidence: tests=<fresh|stale|missing>; delivery=<fresh|stale|missing>
50
+ Baseline: <mode>/<status> · research=<run/status> · gaps=<open>/<blocking>
51
+ Workflow: <kind/id/status> · step=<current|finalize> · outputs=<fresh|stale>
52
+ Change: <id/status|none> · Task: <id/status|none> · Sessions: <active>
53
+ Evidence: test=<state> · review=<two axes> · delivery=<state>
54
+ Blockers: <specific codes or none>
55
+ Warnings: <advisory codes or none>
60
56
  Next: <one exact action>
61
57
  ```
62
58
 
63
- This workflow is read-only. It does not repair state, compile context, update tasks, or
64
- release software.
59
+ Separate verified facts, inferences, and unavailable evidence. Do not modify state,
60
+ compile context, repair, or release from this Skill.
@@ -1,59 +1,52 @@
1
1
  ---
2
2
  name: ultra-test
3
- description: Run an independent pre-delivery verification gate and record exact feedback-loop, reachability, recovery, and acceptance evidence. Use when scoped implementation tasks are complete and delivery readiness must be established.
3
+ description: Verify completed Ultra tasks and one current change through independent acceptance, regression, build, public-seam, failure, and recovery evidence. Use when implementation needs a current test gate before review, convergence, or delivery.
4
4
  ---
5
5
 
6
- # Verify delivery readiness
7
-
8
- Run this gate from a fresh checking context. It complements task-level development
9
- tests and writes `.ultra/test-report.json`; it does not replace authoritative task or
10
- change state.
11
-
12
- ## Entry gate
13
-
14
- 1. Call `task.list` and require at least one completed task in scope.
15
- 2. Call `change.list` and bind exactly one relevant change, or record a null change id
16
- for an initial baseline.
17
- 3. For a change, compile `change.context` for the checking role and verification gate
18
- with only the specifications, tests, and source seams needed for acceptance.
19
- 4. Call `change.breadcrumb`; stop when context is stale or readiness is blocked.
20
-
21
- Never use generated task JSON as authority or reuse the implementer's full
22
- conversation as test context.
23
-
24
- ## Evidence matrix
25
-
26
- Map each acceptance claim to observable evidence:
27
-
28
- | Check | Evidence | Blocking result |
29
- |---|---|---|
30
- | Feedback loop | exact command and observed result | failure or missing baseline signal for a fix |
31
- | Public seam | reachable entry-to-consumer path | orphan, stub, or unwired behavior |
32
- | Regression | focused and adjacent suites | failure or weakened assertion |
33
- | Static/build | applicable type, lint, and build commands | non-zero result |
34
- | Error/recovery | exercised failure and recovery path | silent or unrecoverable critical path |
35
- | Security | relevant input, authorization, secret, and dependency checks | high-impact exploitable issue |
36
- | Docs/spec | delivered behavior matches the declared baseline or delta | drift or unknown impact |
37
-
38
- Use repository-native commands and real boundaries when practical. Use test doubles
39
- only at costly or nondeterministic external boundaries, and state why they preserve
40
- the contract being tested.
41
-
42
- Inspect tests for tautologies, empty assertions, hidden skips, excessive boundary
43
- mocking, changed exports without behavioral coverage, and code with no non-test
44
- consumer. Apply checks by risk and scope rather than forcing every category.
45
-
46
- ## Report contract
47
-
48
- Write the report atomically with the current full HEAD, change id, context manifest
49
- hash, exact commands, baseline and final signals, verified public seams, checks, and
50
- blocking issues. Preserve concise failure excerpts instead of full logs.
51
-
52
- Set `passed: true` only when every required check passes, the report HEAD is current,
53
- and at least one declared public seam is verified. A not-applicable check needs a
54
- specific scope reason.
55
-
56
- ## Exit
57
-
58
- Call `change.breadcrumb` and return one next action: fix a named blocker, run
59
- `ultra-review`, or run `ultra-deliver`. A stale report never routes to delivery.
6
+ # Verify the current change
7
+
8
+ Testing is independent checking. Do not reuse the implementer's conclusions as proof
9
+ or use generated task JSON as authority.
10
+
11
+ ## Bind and execute
12
+
13
+ 1. Read `system.doctor`, `change.breadcrumb`, authoritative tasks, completed dev runs,
14
+ current HEAD/diff, and prior test report freshness.
15
+ 2. Resume or start a `test` workflow linked to the change and optional task. Record
16
+ `bind-scope` with the exact revision, task set, and acceptance ids.
17
+ 3. Compile `change.context` for `check`; record `compile-context` only when required
18
+ refs and DB-backed execution contracts are ready, with the immutable context
19
+ manifest as the step output.
20
+ 4. Map each accepted claim to an executable command or a specific bounded manual
21
+ observation. Record `map-acceptance`.
22
+ 5. Run repository-native focused and regression tests, applicable type/lint/build
23
+ checks, public-seam acceptance, and material error/recovery/security checks. Record
24
+ `execute-checks` and `verify-public-seam` with commands and observed results.
25
+
26
+ Use real boundaries where practical. A test double is acceptable at a costly or
27
+ nondeterministic external boundary only when the report explains why it preserves the
28
+ contract. Reject tautologies, hidden skips, weakened assertions, and unconsumed code.
29
+
30
+ ## Report and converge
31
+
32
+ Write `.ultra/reports/tests/<workflow-id>.json` atomically using
33
+ `ultra-test-report-v1`: bind the full HEAD and worktree digest, change and exact task
34
+ ids, the recorded checking-context digest, acceptance
35
+ mapping, exact command results, public seams, failures, recovery evidence, run count,
36
+ timestamp, and blocking issues. Populate every `verification_dimensions` entry:
37
+ acceptance, regression, integration, static analysis, build, performance, security,
38
+ and recovery. Use `not_applicable` only with a concrete rationale; `not_run` cannot
39
+ support a passing gate. For an incident or any bugfix task, also record one
40
+ deterministic `regression_signal` with the exact command, expected red symptom,
41
+ observed red and green results, duration when known, and evidence. `passed` is true only when every recorded command and
42
+ required public seam passes with no blocking issue at that exact checkout.
43
+
44
+ Record `write-report` with the report output so MCP stores its digest. Re-read the file,
45
+ HEAD, task set, and breadcrumb; record `verify-test-gate`, then call
46
+ `workflow.complete`. MCP derives the durable test summary from the report rather than
47
+ trusting a Prompt claim. A malformed, mismatched, changed, or stale report blocks
48
+ completion.
49
+
50
+ Return the workflow id, revision, pass/fail result, exact checks, verified seams,
51
+ blocking failures, report path/digest, and one route to fix, `ultra-review`, or
52
+ `ultra-deliver`.
@@ -36,7 +36,7 @@ never recurse into the current host or treat advisor output as authority.
36
36
  7. Write `metadata.json` and `synthesis.md`, then return one host-owned conclusion.
37
37
 
38
38
  Read `references/cross-verify-modes.md` for mode-specific evidence and
39
- `references/confidence-system.md` when confidence language is useful. Model agreement
39
+ `references/evidence-status.md` when the synthesis needs an evidence status. Model agreement
40
40
  never overrides failing tests or authoritative runtime evidence.
41
41
 
42
42
  Advisor failure degrades to the primary analysis with a single-source warning. It
@@ -1,7 +1,7 @@
1
- # Evidence-Based Confidence
1
+ # Evidence Status
2
2
 
3
- Cross-model agreement is a signal, not an authority. Assign confidence only after checking claims
4
- against source code, tests, runtime output, or primary documentation.
3
+ Cross-model agreement is a signal, not an authority. Classify the synthesis only after checking
4
+ consequential claims against source code, tests, runtime output, or primary documentation.
5
5
 
6
6
  ## Levels
7
7
 
@@ -91,7 +91,7 @@ as a fallback unless `ultra-tools <family> --help` lists it.
91
91
  | `task.expand` | `task expand` | 8a | mcp |
92
92
  | `task.parse_prd` | `task parse-prd` | 8a | mcp |
93
93
  | `task.dependency_topo` | `task topo` | 8a | mcp |
94
- | `task.append_event` | `task append-event` | 2 | any |
94
+ | `task.append_event` | `task append-event` | 2 | any (allowlisted observations only) |
95
95
  | `task.subscribe_events` | `task subscribe` | 2 | any |
96
96
  | `session.spawn` | `session spawn` | 4.5 | mcp |
97
97
  | `session.close` | `session close` | 4.5 | mcp |
@@ -114,6 +114,11 @@ as a fallback unless `ultra-tools <family> --help` lists it.
114
114
  | `change.learning_resolve` | `change learning-resolve` | 10 | mcp |
115
115
  | `change.converge` | `change converge` | 9 | mcp |
116
116
  | `change.archive` | `change archive` | 9 | mcp |
117
+ | `workflow.start` | `workflow start` | 13 | mcp |
118
+ | `workflow.get` | `workflow get` | 13 | any |
119
+ | `workflow.list` | `workflow list` | 13 | any |
120
+ | `workflow.step` | `workflow step` | 13 | mcp |
121
+ | `workflow.complete` | `workflow complete` | 13 | mcp |
117
122
  | `system.doctor` | `system doctor` | 9 | mcp |
118
123
  | `plan.export` | `plan export` | 8a | mcp |
119
124
  | `plan.get` | `plan get` | 8a | any |
@@ -126,7 +131,7 @@ the live MCP server; `system doctor` may additionally be exposed by the
126
131
  maintenance CLI because it is the recovery path when MCP startup is degraded.
127
132
  `task init-project --resume` preserves existing `.ultra` files and installs only
128
133
  missing current scaffold assets. Projection-only state uses the supported
129
- `migrate --from=4.4 --to=4.5` or `--from=4.5 --to=12.0` transition before resume.
134
+ `migrate --from=4.4 --to=4.5` or `--from=4.5 --to=15.0` transition before resume.
130
135
  `system doctor --repair` applies supported schema upgrades with a pre-migration
131
136
  backup before mechanical recovery.
132
137
  `system restore` requires the exact `REPLACE_CORRUPT_ULTRA_STATE` confirmation and a