ultra-builder-pro-cli 0.25.1 → 0.26.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 (241) hide show
  1. package/.ultra-template/contexts/TEMPLATE.md +87 -0
  2. package/.ultra-template/decisions/.gitkeep +1 -0
  3. package/.ultra-template/evidence/.gitkeep +1 -0
  4. package/.ultra-template/north-star.md +46 -0
  5. package/.ultra-template/research/.gitkeep +1 -0
  6. package/.ultra-template/specs/discovery.md +2 -2
  7. package/.ultra-template/tasks.json +3 -0
  8. package/.ultra-template/test-report.json +27 -0
  9. package/CHANGELOG.md +40 -0
  10. package/README.md +217 -579
  11. package/adapters/_shared/delegate-profiles/kimi-read-only.md +15 -0
  12. package/adapters/_shared/delegate-profiles/kimi-write.md +17 -0
  13. package/adapters/_shared/file-ops.cjs +76 -2
  14. package/adapters/_shared/host-profile.cjs +97 -0
  15. package/adapters/_shared/plugin-core.cjs +204 -0
  16. package/adapters/_shared/runtime-assets.cjs +31 -96
  17. package/adapters/claude.js +92 -291
  18. package/adapters/codex.js +309 -842
  19. package/adapters/grok.js +143 -1469
  20. package/adapters/kimi.js +124 -1053
  21. package/adapters/opencode.js +230 -742
  22. package/bin/delegate-worker.cjs +323 -0
  23. package/bin/delegate.cjs +456 -0
  24. package/bin/install.js +38 -11
  25. package/docs/ARCHITECTURE.md +122 -216
  26. package/docs/ARTIFACT-AUTHORITY.md +90 -268
  27. package/docs/DECISIONS.md +75 -87
  28. package/docs/PHILOSOPHY.md +177 -0
  29. package/docs/PLUGIN-ISOLATION-CONTRACT.md +62 -39
  30. package/docs/RUNTIME-COMPAT-MATRIX.md +99 -156
  31. package/docs/SKILL-AUTHORING.md +94 -73
  32. package/docs/WORKFLOW-LIFECYCLE.md +93 -189
  33. package/hooks/README.md +17 -37
  34. package/hooks/_common.py +113 -0
  35. package/hooks/adapters/codex.py +9 -16
  36. package/hooks/adapters/grok.py +5 -5
  37. package/hooks/adapters/kimi.py +8 -14
  38. package/hooks/block_dangerous_commands.py +95 -0
  39. package/hooks/compact_context.py +65 -0
  40. package/hooks/mid_workflow_recall.py +25 -0
  41. package/hooks/post_edit_guard.py +105 -0
  42. package/hooks/session_context.py +30 -0
  43. package/package.json +17 -52
  44. package/skills/ultra-change/SKILL.md +97 -50
  45. package/skills/ultra-change/references/change-contract.md +40 -1
  46. package/skills/ultra-delegate/SKILL.md +82 -0
  47. package/skills/ultra-delegate/references/delegation-contract.md +51 -0
  48. package/skills/ultra-delegate/scripts/delegate_wait.py +86 -0
  49. package/skills/ultra-deliver/SKILL.md +61 -42
  50. package/skills/ultra-deliver/references/baseline-reconciliation.md +39 -20
  51. package/skills/ultra-dev/SKILL.md +96 -62
  52. package/skills/ultra-dev/references/debugging.md +22 -0
  53. package/skills/ultra-domain-modeling/SKILL.md +79 -0
  54. package/skills/ultra-grilling/SKILL.md +79 -0
  55. package/skills/ultra-init/SKILL.md +94 -37
  56. package/skills/ultra-init/references/brownfield-adoption.md +33 -83
  57. package/skills/ultra-init/scripts/init_project.cjs +84 -0
  58. package/skills/ultra-plan/SKILL.md +88 -68
  59. package/skills/ultra-research/SKILL.md +62 -48
  60. package/skills/ultra-research/references/00-problem-validation.md +5 -5
  61. package/skills/ultra-research/references/01-opportunity-discovery.md +3 -3
  62. package/skills/ultra-research/references/02-market-assessment.md +5 -4
  63. package/skills/ultra-research/references/03-competitive-landscape.md +3 -3
  64. package/skills/ultra-research/references/04-product-strategy.md +3 -3
  65. package/skills/ultra-research/references/05-assumptions-validation.md +5 -5
  66. package/skills/ultra-research/references/10-user-personas.md +3 -2
  67. package/skills/ultra-research/references/11-user-scenarios.md +3 -3
  68. package/skills/ultra-research/references/20-user-stories.md +4 -3
  69. package/skills/ultra-research/references/21-features-scope.md +3 -2
  70. package/skills/ultra-research/references/22-success-metrics.md +3 -3
  71. package/skills/ultra-research/references/30-architecture-context.md +3 -3
  72. package/skills/ultra-research/references/31-solution-strategy.md +3 -3
  73. package/skills/ultra-research/references/32-building-blocks.md +3 -3
  74. package/skills/ultra-research/references/40-deployment.md +3 -3
  75. package/skills/ultra-research/references/41-quality-risks.md +3 -3
  76. package/skills/ultra-research/references/99-synthesis.md +7 -7
  77. package/skills/ultra-review/SKILL.md +59 -32
  78. package/skills/ultra-review/references/code.md +17 -0
  79. package/skills/ultra-review/references/comments.md +12 -0
  80. package/skills/ultra-review/references/design.md +12 -0
  81. package/skills/ultra-review/references/errors.md +13 -0
  82. package/skills/ultra-review/references/spec.md +13 -0
  83. package/skills/ultra-review/references/tests.md +12 -0
  84. package/skills/ultra-review/references/worker-packet.md +40 -0
  85. package/skills/ultra-review/scripts/review_wait.py +26 -15
  86. package/skills/ultra-status/SKILL.md +61 -36
  87. package/skills/ultra-tdd/SKILL.md +81 -0
  88. package/skills/ultra-tdd/references/templates/README.md +20 -0
  89. package/skills/ultra-tdd/references/templates/feature-flag-default-audit.sh +79 -0
  90. package/skills/ultra-tdd/references/templates/persistence-real.ts +78 -0
  91. package/skills/ultra-tdd/references/templates/testcontainer-postgres.py +78 -0
  92. package/skills/ultra-tdd/references/templates/testcontainer-postgres.ts +73 -0
  93. package/skills/ultra-tdd/references/templates/vertical-slice.ts +66 -0
  94. package/skills/ultra-tdd/references/test-execution.md +18 -0
  95. package/skills/ultra-test/SKILL.md +70 -30
  96. package/skills/ultra-test/references/export-syntax.md +18 -0
  97. package/skills/ultra-test/scripts/worktree_digest.cjs +54 -0
  98. package/skills/ultra-think/SKILL.md +49 -27
  99. package/skills/ultra-think/references/autonomy-boundary.md +48 -0
  100. package/skills/ultra-think/references/interaction-boundary.md +18 -33
  101. package/.ultra-template/docs/research/README.md +0 -55
  102. package/.ultra-template/reports/templates/delivery-report.json +0 -17
  103. package/.ultra-template/reports/templates/test-report.json +0 -18
  104. package/.ultra-template/tasks/tasks.json +0 -15
  105. package/.ultra-template/templates/task-context.md +0 -19
  106. package/adapters/_shared/codex-assets.cjs +0 -725
  107. package/adapters/_shared/codex-ultra-tools-entry.cjs +0 -11
  108. package/adapters/_shared/interaction-contract.cjs +0 -129
  109. package/adapters/_shared/path-rewrite.cjs +0 -79
  110. package/adapters/_shared/runtime-native.cjs +0 -132
  111. package/adapters/_shared/settings-merge.cjs +0 -76
  112. package/agents/code-reviewer.md +0 -42
  113. package/agents/debugger.md +0 -40
  114. package/agents/review-code.md +0 -49
  115. package/agents/review-comments.md +0 -38
  116. package/agents/review-coordinator.md +0 -56
  117. package/agents/review-design.md +0 -40
  118. package/agents/review-errors.md +0 -43
  119. package/agents/review-spec.md +0 -39
  120. package/agents/review-tests.md +0 -40
  121. package/agents/tdd-runner.md +0 -38
  122. package/bin/orchestrator.js +0 -383
  123. package/commands/ultra-change.md +0 -10
  124. package/commands/ultra-deliver.md +0 -10
  125. package/commands/ultra-dev.md +0 -10
  126. package/commands/ultra-doctor.md +0 -10
  127. package/commands/ultra-init.md +0 -10
  128. package/commands/ultra-plan.md +0 -10
  129. package/commands/ultra-research.md +0 -10
  130. package/commands/ultra-review.md +0 -10
  131. package/commands/ultra-status.md +0 -10
  132. package/commands/ultra-test.md +0 -10
  133. package/commands/ultra-think.md +0 -10
  134. package/docs/AGENT-CONTEXT.md +0 -191
  135. package/docs/COMMIT-HASH-BACKFILL.md +0 -51
  136. package/docs/LEGACY-CLI-CROSSWALK.md +0 -175
  137. package/docs/ROADMAP.md +0 -101
  138. package/docs/STATE-DB-ACCESS-POLICY.md +0 -161
  139. package/hooks/active_task_context.py +0 -152
  140. package/hooks/context_envelope.py +0 -100
  141. package/hooks/health_check.py +0 -196
  142. package/hooks/pre_stop_check.py +0 -66
  143. package/hooks/runtime_paths.py +0 -396
  144. package/hooks/subagent_tracker.py +0 -88
  145. package/hooks/workflow_checkpoint.py +0 -76
  146. package/hooks/workflow_context.py +0 -48
  147. package/hooks/workflow_resume.py +0 -84
  148. package/mcp-server/hook-context.cjs +0 -38
  149. package/mcp-server/hook-event.cjs +0 -34
  150. package/mcp-server/lib/archive-journal.cjs +0 -1119
  151. package/mcp-server/lib/archive-mutation-worker.py +0 -365
  152. package/mcp-server/lib/artifact-registry.cjs +0 -1232
  153. package/mcp-server/lib/baseline-workflow.cjs +0 -1193
  154. package/mcp-server/lib/canonical-json.cjs +0 -19
  155. package/mcp-server/lib/change-authority.cjs +0 -26
  156. package/mcp-server/lib/change-packet.cjs +0 -790
  157. package/mcp-server/lib/change-workflow.cjs +0 -65
  158. package/mcp-server/lib/context-envelope.cjs +0 -581
  159. package/mcp-server/lib/context-paths.cjs +0 -142
  160. package/mcp-server/lib/decision-records.cjs +0 -423
  161. package/mcp-server/lib/delivery-transaction.cjs +0 -471
  162. package/mcp-server/lib/doctor-backup-worker.cjs +0 -328
  163. package/mcp-server/lib/doctor.cjs +0 -627
  164. package/mcp-server/lib/git-bootstrap.cjs +0 -651
  165. package/mcp-server/lib/init-project.cjs +0 -1021
  166. package/mcp-server/lib/kernel-change-workflow.cjs +0 -2029
  167. package/mcp-server/lib/legacy-change-workflow.cjs +0 -3032
  168. package/mcp-server/lib/managed-file-write.cjs +0 -172
  169. package/mcp-server/lib/plan-checkpoint.cjs +0 -177
  170. package/mcp-server/lib/plan-publication-worker.cjs +0 -830
  171. package/mcp-server/lib/plan-store.cjs +0 -794
  172. package/mcp-server/lib/prd-parser.cjs +0 -83
  173. package/mcp-server/lib/pricing.cjs +0 -44
  174. package/mcp-server/lib/project-context.cjs +0 -178
  175. package/mcp-server/lib/projector.cjs +0 -386
  176. package/mcp-server/lib/provider-refs.cjs +0 -42
  177. package/mcp-server/lib/runtime-paths.cjs +0 -1714
  178. package/mcp-server/lib/runtime-state.cjs +0 -222
  179. package/mcp-server/lib/safe-project-file.cjs +0 -385
  180. package/mcp-server/lib/stage-checkpoints.cjs +0 -463
  181. package/mcp-server/lib/state-authority.cjs +0 -95
  182. package/mcp-server/lib/state-db.cjs +0 -1580
  183. package/mcp-server/lib/state-ops.cjs +0 -1428
  184. package/mcp-server/lib/task-contract.cjs +0 -404
  185. package/mcp-server/lib/task-expander.cjs +0 -105
  186. package/mcp-server/lib/task-ledger.cjs +0 -1964
  187. package/mcp-server/lib/telemetry.cjs +0 -85
  188. package/mcp-server/lib/topo.cjs +0 -131
  189. package/mcp-server/lib/ultra-facade.cjs +0 -2684
  190. package/mcp-server/lib/worker-packet.cjs +0 -358
  191. package/mcp-server/server.cjs +0 -437
  192. package/orchestrator/auto-merge.cjs +0 -128
  193. package/orchestrator/daemon.cjs +0 -264
  194. package/orchestrator/dispatch-rules.cjs +0 -78
  195. package/orchestrator/parallel-orchestrator.cjs +0 -903
  196. package/orchestrator/planner/plan-builder.cjs +0 -125
  197. package/orchestrator/recovery.cjs +0 -188
  198. package/orchestrator/session-close-journal-worker.cjs +0 -5
  199. package/orchestrator/session-close-journal.cjs +0 -1014
  200. package/orchestrator/session-runner.cjs +0 -1153
  201. package/orchestrator/worktree-manager.cjs +0 -282
  202. package/settings.json +0 -7
  203. package/skills/cc-collab/SKILL.md +0 -42
  204. package/skills/code-review-expert/SKILL.md +0 -43
  205. package/skills/code-review-expert/references/correctness-reliability.md +0 -30
  206. package/skills/code-review-expert/references/design-boundaries.md +0 -26
  207. package/skills/code-review-expert/references/removal-plan.md +0 -24
  208. package/skills/codex-collab/SKILL.md +0 -49
  209. package/skills/codex-collab/evals/evals.json +0 -35
  210. package/skills/integration-rules/SKILL.md +0 -32
  211. package/skills/security-rules/SKILL.md +0 -38
  212. package/skills/testing-rules/SKILL.md +0 -32
  213. package/skills/ultra-doctor/SKILL.md +0 -41
  214. package/skills/ultra-plan/references/semantic-preflight.md +0 -20
  215. package/skills/ultra-verify/SKILL.md +0 -46
  216. package/skills/ultra-verify/evals/evals.json +0 -46
  217. package/skills/ultra-verify/references/cross-verify-modes.md +0 -28
  218. package/skills/ultra-verify/references/evidence-status.md +0 -21
  219. package/skills/ultra-verify/scripts/verify_wait.py +0 -94
  220. package/spec/cli-protocol.md +0 -102
  221. package/spec/mcp-tools.yaml +0 -312
  222. package/spec/schemas/baseline-reconciliation.v1.schema.json +0 -73
  223. package/spec/schemas/change-delta.v1.schema.json +0 -153
  224. package/spec/schemas/command-manifest.schema.json +0 -29
  225. package/spec/schemas/context-file.v4.5.schema.json +0 -54
  226. package/spec/schemas/delivery-report.v1.schema.json +0 -66
  227. package/spec/schemas/documentation-reconciliation.v1.schema.json +0 -106
  228. package/spec/schemas/mcp-tools.schema.json +0 -136
  229. package/spec/schemas/skill-manifest.schema.json +0 -24
  230. package/spec/schemas/state-db.sql +0 -641
  231. package/spec/schemas/task-ledger.v2.schema.json +0 -296
  232. package/spec/schemas/tasks.v4.5.schema.json +0 -96
  233. package/spec/schemas/test-report.v1.schema.json +0 -225
  234. package/ultra-tools/cli.cjs +0 -129
  235. package/ultra-tools/commands/db.cjs +0 -226
  236. package/ultra-tools/commands/legacy-memory.cjs +0 -159
  237. package/ultra-tools/commands/migrate.cjs +0 -1386
  238. package/ultra-tools/commands/session.cjs +0 -213
  239. package/ultra-tools/commands/status.cjs +0 -559
  240. package/ultra-tools/commands/system.cjs +0 -498
  241. package/ultra-tools/commands/task.cjs +0 -105
@@ -1,68 +1,82 @@
1
1
  ---
2
2
  name: ultra-research
3
- description: Build or refresh an evidence-backed product and architecture baseline through recommended, user-selected semantic coverage. Use when initialization, brownfield adoption, or an active Change has a real evidence gap.
3
+ description: Turn owner claims and specification gaps into cited product and architecture evidence, then refresh the canonical specifications and research distillate. Use when initialization, brownfield adoption, or an active Change contains claims that must be verified before planning.
4
4
  ---
5
5
 
6
- # Research with adaptive coverage
6
+ # Verify claims and fill the specification gaps they control
7
7
 
8
- The model owns investigation and synthesis. The owner controls material scope and
9
- deferrals. MCP records the accepted draft and commits one durable checkpoint; it is
10
- not a questionnaire or a step-by-step supervisor.
8
+ Research owns evidence and synthesis. The owner chooses material scope and accepts the
9
+ three conclusions that change what later research does. Files are written immediately,
10
+ so interruption loses no completed investigation.
11
11
 
12
- ## Bind current context
12
+ ## Before you start
13
13
 
14
- 1. Call `ultra.context { stage: research, detail: full }`.
15
- 2. If the team checkpoint is newer, call `ultra.sync { action: import }`. Stop only
16
- on a real ancestry or same-record conflict.
17
- 3. Inspect code, docs, tests, runtime, accepted intent, decisions, and existing
18
- research. Reuse current evidence and the matching mutable draft.
19
- 4. Recommend the smallest sufficient coverage. Offer the adaptive set, the full
20
- catalog, and a focused Change-bound set only when all are credible.
21
- 5. Use the host-native question surface only for a material unresolved route. Reuse an
22
- explicit owner choice without asking again.
14
+ 1. Read `.ultra/tasks.json`; if it names unfinished work, read its `context_file` and
15
+ closing `## Resume Note` before choosing research scope.
16
+ 2. Read `CONTEXT.md` for vocabulary and relevant `.ultra/decisions/` entries.
17
+ 3. Read `.ultra/north-star.md`, the active Change intent if any, and specification
18
+ sections carrying `[NEEDS CLARIFICATION]`.
23
19
 
24
- Read `../ultra-think/references/interaction-boundary.md` before asking. Load only the
25
- reference files for research areas that actually apply.
20
+ ## Definition of done
26
21
 
27
- ## Investigate
22
+ - Every selected area has a cited report under `.ultra/research/<run-id>/` and its
23
+ mapped specification section reflects the current conclusion.
24
+ - `99-synthesis.md` states what entered a specification or decision, and what remains
25
+ unknown or deferred.
26
+ - `.ultra/specs/research-distillate.md` records the Git blob hash of each specification
27
+ it summarizes; a hash mismatch makes the distillate stale, never authoritative.
28
+ - Material omissions and `[UNVERIFIED: no web access]` findings stay visible.
29
+
30
+ ## Select the coverage once
31
+
32
+ Scan unresolved specification headings, map them to the seventeen focused references,
33
+ and recommend the smallest sufficient profile: Full, Product Only, Feature Only,
34
+ Architecture Change, or Custom. Confirm the list once with the owner. Load one reference
35
+ at a time; holding several step prompts together defeats progressive disclosure.
36
+
37
+ The three checkpoints are `04-product-strategy`, `21-features-scope`, and
38
+ `99-synthesis`: each conclusion changes what comes next. Present its evidence and
39
+ recommendation, wait for the owner's decision, then continue. Other areas write their
40
+ report and mapped section immediately without another ceremony.
41
+
42
+ ## Investigate and write
28
43
 
29
44
  For each selected area:
30
45
 
31
- - separate `Observed`, `Verified`, `Decided`, and `Unknown`;
32
- - resolve observable facts yourself and use primary sources where needed;
33
- - update the smallest baseline or Change-owned research artifact;
34
- - never store transcripts, hidden reasoning, raw provider payloads, or copied prompts;
35
- - record evidence, specification updates, decisions, deferrals, and consequences.
46
+ 1. Search current primary sources and inspect relevant source, tests, runtime and docs.
47
+ 2. Separate Observed, Evidence, Inference and Unknowns; cite every external claim.
48
+ 3. For solution strategy and building blocks, cite at least one real implementation in
49
+ a comparable maintained project, not only an opinion article.
50
+ 4. Write `.ultra/research/<run-id>/<area>.md`, then replace the mapped specification
51
+ section rather than appending a second version. Git keeps the history.
52
+ 5. Follow `../ultra-domain-modeling/SKILL.md` when evidence settles a domain term. Use
53
+ `../ultra-think/SKILL.md` when a consequential trade-off meets the decision criteria.
36
54
 
37
- Use one `ultra.record` batch for typed durable facts:
55
+ If web search is unavailable, write `[UNVERIFIED: no web access]` and continue. Lack of
56
+ a tool lowers confidence; it does not create a dead end.
38
57
 
39
- - `artifact / bind` for a managed research or specification artifact;
40
- - `decision / accept` for normalized owner intent;
41
- - `baseline / observe` or `baseline / accept` for baseline authority;
42
- - `change_contract / revise` for Change-bound findings.
58
+ ## Synthesize
43
59
 
44
- Every entry needs a stable idempotency key. Structural or authority conflicts require
45
- repair; semantic warnings remain visible but do not decide whether the research is
46
- sufficient.
60
+ Load `references/99-synthesis.md` after the selected reports are on disk. Write which
61
+ claims were confirmed, overturned, deferred, or converted into decisions. Update the
62
+ specification balances, then write the distillate and its three source blob hashes.
63
+ Read all changed files back and report the exact unresolved headings.
47
64
 
48
- ## Commit one research checkpoint
65
+ Recommend the next explicit capability from the resulting files; do not invoke it.
49
66
 
50
- Call exactly one `ultra.checkpoint` with `stage: research`. Put the selected research areas
51
- and their report outputs in `payload.steps`; include only work actually performed,
52
- verified, reused, deferred with owner authority, or proved not applicable. Synthesis
53
- must always be present.
67
+ ## When the owner decides
54
68
 
55
- For baseline research, update and accept the baseline through typed `ultra.record`
56
- entries, then publish the team checkpoint with `ultra.sync { action: publish }`.
57
- For Change-bound research, keep all findings and delta artifacts below the Change
58
- root and never edit accepted baseline specs directly.
69
+ The owner chooses coverage, resolves the three checkpoints, and accepts any material
70
+ deferral. Evidence facts are yours to establish. A conclusion that removes an existing
71
+ commitment follows the REDUCTION boundary and waits for explicit authority.
59
72
 
60
- The model decides whether the selected coverage and synthesis are sufficient, and
61
- states omissions or deferred areas in the payload. MCP validates declared evidence
62
- bytes and records that conclusion; its semantic diagnostics are advisory. If it
63
- returns `accepted: false`, repair the reported structural, digest, path, or concurrency
64
- conflict and retry the same draft.
73
+ ## References
65
74
 
66
- Return coverage, decisive evidence, remaining gaps, durable artifact paths, and a
67
- model recommendation for the next explicit capability, such as `ultra-change` after a
68
- ready baseline. Never invoke it automatically.
75
+ - `references/00-problem-validation.md` through `references/05-assumptions-validation.md`
76
+ — product premise and strategy; load only a selected area.
77
+ - `references/10-user-personas.md` through `references/22-success-metrics.md` — users,
78
+ stories, scope and measurable outcomes; load only a selected area.
79
+ - `references/30-architecture-context.md` through `references/41-quality-risks.md` —
80
+ system boundary, implementation evidence, deployment and risk.
81
+ - `references/99-synthesis.md` — load last, after selected reports exist.
82
+ - `../ultra-think/references/autonomy-boundary.md` — read before a specification shrinks.
@@ -26,11 +26,11 @@ Update `discovery.md` with `Observed`, `Verified`, `Decided`, and `Unknown` entr
26
26
  - the narrowest owner-approved problem boundary;
27
27
  - unresolved validation needs.
28
28
 
29
- Link the updated specification anchor from the immutable step report required by the
30
- orchestrator. A missing load-bearing fact becomes a blocker or baseline gap, not a
29
+ Link the updated specification anchor from the bounded area report written for this
30
+ research run. A missing load-bearing fact becomes a blocker or baseline gap, not a
31
31
  guessed answer.
32
32
 
33
- ## Semantic record
33
+ ## Report trace
34
34
 
35
- Use kind `problem`. Record `actor`, `current_workaround`, `consequence`, and
36
- `evidence_status`.
35
+ In the area report, record `actor`, `current_workaround`, `consequence`, and
36
+ `evidence_status`, then link the updated specification anchor.
@@ -27,7 +27,7 @@ Update `discovery.md` with:
27
27
 
28
28
  Complete the step with the evidence used and the updated output path.
29
29
 
30
- ## Semantic record
30
+ ## Report trace
31
31
 
32
- Use kind `opportunity`. Record `actor`, `desired_outcome`, and `evidence_status`. Link
33
- the record to its problem when that relation is established.
32
+ In the area report, record `actor`, `desired_outcome`, and `evidence_status`. Link the
33
+ conclusion to its problem anchor when that relation is established.
@@ -22,9 +22,10 @@ Update `discovery.md` with relevant segment boundaries, commercial or operationa
22
22
  constraints, source-backed measurements, assumptions, and unknowns. Include a sizing
23
23
  model only when the decision genuinely depends on one and the inputs are defensible.
24
24
 
25
- Link source references and the updated specification anchor from the immutable step
26
- report required by the orchestrator.
25
+ Link source references and the updated specification anchor from the bounded area
26
+ report written for this research run.
27
27
 
28
- ## Semantic record
28
+ ## Report trace
29
29
 
30
- Use kind `market_constraint`. Record `constraint`, `decision_impact`, and `freshness`.
30
+ In the area report, record `constraint`, `decision_impact`, and `freshness`, then link
31
+ the updated discovery anchor.
@@ -25,7 +25,7 @@ credible alternative cannot be verified.
25
25
 
26
26
  Complete the step with evidence references and the updated output path.
27
27
 
28
- ## Semantic record
28
+ ## Report trace
29
29
 
30
- Use kind `alternative`. Record `category`, `switching_constraint`, and
31
- `strategy_implication`.
30
+ In the area report, record `category`, `switching_constraint`, and
31
+ `strategy_implication`, then link the updated discovery anchor.
@@ -26,7 +26,7 @@ Update `discovery.md` with:
26
26
 
27
27
  Complete the step with decision and evidence references plus the updated output path.
28
28
 
29
- ## Semantic record
29
+ ## Report trace
30
30
 
31
- Use kind `strategy_decision`. Record `tradeoff` and `rationale`, then link the decision
32
- to the problems, opportunities, or constraints that support it.
31
+ In the area report, record `tradeoff` and `rationale`, then link the decision file or
32
+ specification anchor to the problems, opportunities, or constraints that support it.
@@ -22,10 +22,10 @@ Update `discovery.md` with the assumption ledger and validation state. Map unres
22
22
  load-bearing assumptions to blocking unknowns or gaps. Keep non-blocking future work
23
23
  out of the implementation task graph until the owner selects it.
24
24
 
25
- Link evidence and the updated specification anchor from the immutable step report
26
- required by the orchestrator.
25
+ Link evidence and the updated specification anchor from the bounded area report written
26
+ for this research run.
27
27
 
28
- ## Semantic record
28
+ ## Report trace
29
29
 
30
- Use kind `assumption`. Record `category`, `consequence`, `validation_signal`,
31
- `success_rule`, `failure_rule`, and `ambiguous_rule`.
30
+ In the area report, record `category`, `consequence`, `validation_signal`,
31
+ `success_rule`, `failure_rule`, and `ambiguous_rule`, then link the discovery anchor.
@@ -24,6 +24,7 @@ constraints, and evidence. Record priority only when it is an accepted decision.
24
24
 
25
25
  Complete the step with evidence references and the updated output path.
26
26
 
27
- ## Semantic record
27
+ ## Report trace
28
28
 
29
- Use kind `actor`. Record `job`, `current_workflow`, `goal`, and `constraint`.
29
+ In the area report, record `job`, `current_workflow`, `goal`, and `constraint`, then
30
+ link the actor heading in `product.md`.
@@ -22,7 +22,7 @@ behavior and documentation disagree.
22
22
 
23
23
  Complete the step with evidence references and the updated output path.
24
24
 
25
- ## Semantic record
25
+ ## Report trace
26
26
 
27
- Use kind `scenario`. Record `actor_id`, `trigger`, `preconditions`, `flow`, `success`,
28
- `failure`, and `recovery`.
27
+ In the area report, record `actor_id`, `trigger`, `preconditions`, `flow`, `success`,
28
+ `failure`, and `recovery`, then link the scenario heading in `product.md`.
@@ -24,7 +24,8 @@ writing vague acceptance.
24
24
 
25
25
  Complete the step with evidence references and the updated output path.
26
26
 
27
- ## Semantic record
27
+ ## Report trace
28
28
 
29
- Use kind `requirement`. Record `preconditions`, `action`, `observable_result`,
30
- `error_recovery`, and `verification`. Link it to its accepted scenario or decision.
29
+ In the area report, record `preconditions`, `action`, `observable_result`,
30
+ `error_recovery`, and `verification`. Link the requirement heading to its accepted
31
+ scenario or decision.
@@ -24,6 +24,7 @@ exclusions and rationale, dependencies, and unresolved scope decisions.
24
24
 
25
25
  Complete the step with decision evidence and the updated output path.
26
26
 
27
- ## Semantic record
27
+ ## Report trace
28
28
 
29
- Use kind `capability`. Record `requirement_ids`, `scope_status`, and `rationale`.
29
+ In the area report, record `requirement_ids`, `scope_status`, and `rationale`, then link
30
+ the capability heading in `product.md`.
@@ -22,7 +22,7 @@ must be recorded as a gap or explicit future change.
22
22
 
23
23
  Complete the step with evidence references and the updated output path.
24
24
 
25
- ## Semantic record
25
+ ## Report trace
26
26
 
27
- Use kind `metric`. Record `definition`, `source`, `window`, `owner`, and
28
- `decision_use`.
27
+ In the area report, record `definition`, `source`, `window`, `owner`, and
28
+ `decision_use`, then link the metric heading in `product.md`.
@@ -24,7 +24,7 @@ the current checkout contradicts an existing diagram or claim.
24
24
 
25
25
  Complete the step with source or runtime evidence and the updated output path.
26
26
 
27
- ## Semantic record
27
+ ## Report trace
28
28
 
29
- Use kind `architecture_context`. Record `boundary`, `inputs_outputs`,
30
- `trust_authority`, and `consumers`.
29
+ In the area report, record `boundary`, `inputs_outputs`, `trust_authority`, and
30
+ `consumers`, then link the architecture heading.
@@ -22,7 +22,7 @@ unresolved decisions as blockers rather than selecting on the owner's behalf.
22
22
 
23
23
  Complete the step with decision evidence and the updated output path.
24
24
 
25
- ## Semantic record
25
+ ## Report trace
26
26
 
27
- Use kind `architecture_decision`. Record `drivers`, `direction`, `consequences`,
28
- `compatibility`, and `recovery`.
27
+ In the area report, record `drivers`, `direction`, `consequences`, `compatibility`, and
28
+ `recovery`, then link the decision file or architecture heading.
@@ -22,7 +22,7 @@ runtime paths, error paths, and evidence. Link each proposed block to a consumer
22
22
 
23
23
  Complete the step with source evidence and the updated output path.
24
24
 
25
- ## Semantic record
25
+ ## Report trace
26
26
 
27
- Use kind `runtime_path`. Record `entry_point`, `state_side_effects`,
28
- `observable_result`, `failure_recovery`, and `consumers`.
27
+ In the area report, record `entry_point`, `state_side_effects`, `observable_result`,
28
+ `failure_recovery`, and `consumers`, then link the architecture heading.
@@ -23,7 +23,7 @@ unknowns.
23
23
 
24
24
  Complete the step with file, runtime, or provider evidence and the updated output path.
25
25
 
26
- ## Semantic record
26
+ ## Report trace
27
27
 
28
- Use kind `deployment`. Record `environment`, `entry_point`, `config_migration`,
29
- `observation`, and `rollback_recovery`.
28
+ In the area report, record `environment`, `entry_point`, `config_migration`,
29
+ `observation`, and `rollback_recovery`, then link the architecture heading.
@@ -22,7 +22,7 @@ verification, recovery, technical debt, and architecture decisions where needed.
22
22
 
23
23
  Complete the step with evidence references and the updated output path.
24
24
 
25
- ## Semantic record
25
+ ## Report trace
26
26
 
27
- Use kind `risk`. Record `trigger_condition`, `expected_response`, `measurement`,
28
- `mitigation`, `recovery`, and `owner`.
27
+ In the area report, record `trigger_condition`, `expected_response`, `measurement`,
28
+ `mitigation`, `recovery`, and `owner`, then link the risk heading or decision file.
@@ -24,12 +24,12 @@ Write `research-distillate.md` as a navigation and traceability artifact contain
24
24
  baseline ids, source document anchors, accepted decisions, blockers, gaps, verification
25
25
  evidence, and the exact planning entry. Do not duplicate the specifications' prose.
26
26
 
27
- Write the immutable `99-synthesis` step report, then complete the step with that report,
28
- all three baseline specification paths, the distillate path, and the evidence used for
29
- the synthesis. Read the completed workflow back before baseline convergence.
27
+ Write the final `99-synthesis.md` report, link all three specification paths, the
28
+ distillate path, and the evidence used for synthesis. Read those files back before
29
+ reporting convergence.
30
30
 
31
- ## Semantic record
31
+ ## Report trace
32
32
 
33
- Use kind `synthesis_trace`. Record one verified chain through `problem_id`,
34
- `scenario_id`, `requirement_ids`, `architecture_path_ids`, and `verification_refs`.
35
- Every referenced id must exist in an earlier selected step.
33
+ Record one verified chain through `problem_id`, `scenario_id`, `requirement_ids`,
34
+ `architecture_path_ids`, and `verification_refs`. Every referenced id must exist in an
35
+ earlier selected area report or specification heading.
@@ -1,46 +1,73 @@
1
1
  ---
2
2
  name: ultra-review
3
- description: Independently review one current Ultra plan, task diff, or aggregate Change on specification fidelity and engineering standards. Use when current evidence needs review or focused risk analysis.
3
+ description: Review one task diff or aggregate Change through six independent lenses, synthesize file-backed findings, and perform evidence-justified refactoring. Use when another skill needs task-level or delivery-level review without loading worker investigation into the main context.
4
4
  ---
5
5
 
6
- # Review one bounded scope
6
+ # Review through six lenses without polluting the main context
7
7
 
8
- Keep two independent verdict axes:
8
+ The parent owns scope and synthesis. Lens workers are read-only sensors. Refactoring
9
+ happens here, after several slices make a useful structure visible, not inside TDD.
9
10
 
10
- - `spec_fidelity`: accepted intent, behavior, docs, and public seams;
11
- - `engineering_standards`: correctness, safety, tests, integration,
12
- maintainability, observability, and recovery.
11
+ ## Before you start
13
12
 
14
- ## Bind and review
13
+ 1. Read `.ultra/tasks.json`, the scoped task's `context_file` and `## Resume Note`.
14
+ 2. Read `CONTEXT.md`, relevant `.ultra/decisions/`, acceptance, evidence and exact diff.
15
+ 3. Create `.ultra/reviews/<session>/` and one immutable packet naming HEAD, scope,
16
+ output path, acceptance and public seams. Follow `references/worker-packet.md`,
17
+ then compute the SHA-256 of the exact packet bytes and do not edit it.
15
18
 
16
- 1. Read `references/review-modes.md`.
17
- 2. Call `ultra.context { stage: review, scope: { change_id, task_id? }, detail: full }`.
18
- 3. Import a newer team checkpoint with `ultra.sync`; stop on a real conflict.
19
- 4. Bind one explicit diff or Plan, full HEAD, worktree digest, task set, acceptance,
20
- decisions, and current evidence. Empty or stale scope cannot pass.
21
- 5. Always run `review-spec`. Select the smallest engineering worker set that covers
22
- actual risk; record selected and excluded roles with rationale.
19
+ ## Definition of done
23
20
 
24
- Use the current host's native bounded-worker mechanism. Workers are read-only and
25
- receive one immutable Worker Packet containing the exact Context Envelope, HEAD/diff,
26
- decisions, acceptance, output path/schema, and `packet_digest`. Validate their artifacts with `scripts/review_wait.py` and
27
- `references/unified-schema.md`; reject any output that does not echo the exact packet
28
- digest. Preserve every finding unchanged in `SUMMARY.json`; group duplicates only in
29
- the human summary.
21
+ - The complete six-worker roster is dispositioned; every selected lens artifact and one
22
+ summary exist, while skipped or failed lenses are explicit.
23
+ - Each selected lens reports at most 12 findings, each evidence-backed. Scores never decide
24
+ whether an observable defect is included.
25
+ - Findings preserve independent `spec_fidelity` and `engineering_standards` axes.
26
+ - Refactors are justified by observed duplication or coupling and all affected checks rerun.
30
27
 
31
- Register specialist and summary artifacts through one `ultra.record` batch using
32
- `artifact / bind`.
28
+ ## Run the lenses
33
29
 
34
- ## Checkpoint
30
+ Use the host's native bounded subagents, in the background where available; otherwise
31
+ run them sequentially. `review-spec` is always selected; select other lenses only when
32
+ their evidence can change a verdict. Give each the packet path and digest,
33
+ `references/unified-schema.md`, and exactly one lens:
35
34
 
36
- Call `ultra.checkpoint` once with `stage: review`, exact scope, evidence, and outputs
37
- tagged `spec_review`, `engineering_review`, or summary. The model and bounded review
38
- agents own both evidence-derived axes. The checkpoint compiles or reuses review
39
- context, verifies declared artifact bytes and digests, and records the supplied axes
40
- without overriding findings.
35
+ - `references/code.md`
36
+ - `references/design.md`
37
+ - `references/errors.md`
38
+ - `references/tests.md`
39
+ - `references/spec.md`
40
+ - `references/comments.md`
41
41
 
42
- A rejected checkpoint leaves the draft mutable. Fix the structural, digest, path, or
43
- concurrency fault and retry; do not open a replacement run or suppress a finding.
42
+ Apply **Zero Context Pollution**: start the workers, immediately run
43
+ `scripts/review_wait.py <session> agents --packet-digest <digest> <selected-stems>`,
44
+ then read only the stable JSON files it returns. Validate `SUMMARY.json` with
45
+ `scripts/review_wait.py <session> summary --packet-digest <digest>`. Do not read
46
+ intermediate worker output or treat background notifications as completion. The sole
47
+ information path is wait script to JSON artifact. These guards prevent partial results
48
+ from becoming a semantic verdict.
44
49
 
45
- Return both axes, findings, reviewed scope, worker rationale, digests, and the model's
46
- recommended next explicit capability. Do not invoke it automatically.
50
+ ## Synthesize, repair and recheck
51
+
52
+ Preserve findings unchanged in `SUMMARY.json`; group duplicates by root cause only in
53
+ the human summary. Fix accepted P0/P1 issues and evidence-backed refactors, then rerun
54
+ the affected lenses against the delta.
55
+
56
+ Stop when P0 + P1 does not decrease between rounds. Write a stuck report separating an
57
+ over-tight constraint from an insufficient fix and give the owner three concrete paths.
58
+ If one file fails three consecutive repairs, treat it as an architecture concern. If
59
+ three or more files do so, write `UNRESOLVED.md` with `ARCHITECTURAL_CONCERN` and stop.
60
+
61
+ Report both axes, exact scope, checks, residual findings and any refactor performed.
62
+
63
+ ## When the owner decides
64
+
65
+ The owner chooses risk acceptance, a scope reduction, or which stuck path to take.
66
+ Workers never edit source, task state or another lens artifact.
67
+
68
+ ## References
69
+
70
+ - `references/unified-schema.md` — JSON contract shared by all lenses.
71
+ - `references/worker-packet.md` — exact immutable input packet and digest procedure.
72
+ - `references/review-modes.md` — choose task, Change, full, or delta scope.
73
+ - `../ultra-think/references/autonomy-boundary.md` — read before a fix reduces intent.
@@ -0,0 +1,17 @@
1
+ # Code lens
2
+
3
+ Review the exact diff plus only the callers, contracts, tests and configuration needed
4
+ to establish a finding. Trace changed behavior from a production entry point to its
5
+ consumer. Check correctness, trust boundaries, state consistency, recovery,
6
+ observability, compatibility and reachability.
7
+
8
+ Resolve the exact HEAD, range, intended outcome, and repository guidance from the
9
+ Worker Packet. Report an empty or ambiguous scope instead of expanding it silently.
10
+ Trace each candidate through entry point, state, side effect, failure and real consumer;
11
+ discard it if no plausible trigger and observable impact survive that trace.
12
+
13
+ Report only evidence-backed defects with a plausible trigger and concrete impact.
14
+ Deduplicate by root cause, keep line ranges tight, and propose the smallest complete
15
+ repair. Use `axis: engineering_standards` and the shared findings schema.
16
+
17
+ The worker is read-only. Its only write is the assigned JSON artifact.
@@ -0,0 +1,12 @@
1
+ # Comments lens
2
+
3
+ Inspect changed comments, docstrings, examples, annotations and API documentation
4
+ against the associated implementation and public contract. Report factual
5
+ contradictions, stale names or behavior, unsafe operational advice, and an omission
6
+ only when it makes a public or non-obvious contract materially misleading.
7
+
8
+ TODO, FIXME, HACK and implementation narration are evidence to investigate, not
9
+ automatic defects. Ignore wording preferences and harmless redundancy. Use `axis:
10
+ engineering_standards`, category `comments`, and the shared findings schema.
11
+
12
+ The worker is read-only. Its only write is the assigned JSON artifact.
@@ -0,0 +1,12 @@
1
+ # Design lens
2
+
3
+ Trace changed types and modules through constructors, callers, state, side effects and
4
+ consumers. Look for bypassable invariants, ambiguous ownership, leaking boundaries and
5
+ coupling that makes an accepted change unsafe.
6
+
7
+ Treat length, nesting, parameter count and primitive data as investigation signals,
8
+ not defects. Report complexity only when it creates a concrete correctness, testing,
9
+ recovery or maintenance cost. Prefer a focused before/after repair over a speculative
10
+ framework. Use `axis: engineering_standards` and the shared findings schema.
11
+
12
+ The worker is read-only. Its only write is the assigned JSON artifact.
@@ -0,0 +1,13 @@
1
+ # Error lens
2
+
3
+ Trace changed exceptions, error results, retries, fallbacks, cancellation, timeouts and
4
+ asynchronous work from trigger to caller-visible state. Find swallowed required
5
+ failures, false success, lost diagnostic context, unsafe retry, sensitive detail leaks
6
+ and inconsistent recovery state.
7
+
8
+ Confirm the language and framework propagation contract before reporting. Empty
9
+ catches, null fallbacks, optional chaining, fire-and-forget work and generic messages
10
+ are signals only. Severity follows reachable impact. Use `axis:
11
+ engineering_standards` and the shared findings schema.
12
+
13
+ The worker is read-only. Its only write is the assigned JSON artifact.
@@ -0,0 +1,13 @@
1
+ # Specification lens
2
+
3
+ Keep this axis independent from general engineering quality. Map every accepted
4
+ criterion to current executable or source evidence. Check for omitted behavior,
5
+ unintended scope, stale specification or operational documentation, and incompatible
6
+ public contracts.
7
+
8
+ Report only a concrete mismatch between accepted intent and delivered behavior. Style,
9
+ generic maintainability and a preferred architecture do not belong on this axis.
10
+ Calibrate severity to user-visible or delivery impact. Use `axis: spec_fidelity` and
11
+ the shared findings schema.
12
+
13
+ The worker is read-only. Its only write is the assigned JSON artifact.
@@ -0,0 +1,12 @@
1
+ # Test lens
2
+
3
+ Map each changed behavior and acceptance claim to executable evidence. Check the
4
+ functional, persistence, protocol, UI and failure boundaries material to this diff.
5
+ Inspect doubles for contract fidelity: report one only when it bypasses the behavior
6
+ under review or diverges from production semantics.
7
+
8
+ Find missing state transitions, ineffective assertions, hidden skips, flaky
9
+ assumptions and tests that never reach changed code. Calibrate severity to escaped
10
+ product risk. Use `axis: engineering_standards` and the shared findings schema.
11
+
12
+ The worker is read-only. Its only write is the assigned JSON artifact.
@@ -0,0 +1,40 @@
1
+ # Immutable Worker Packet
2
+
3
+ Create `.ultra/reviews/<session>/WORKER-PACKET.json` once, before starting any lens.
4
+ Serialize it as UTF-8 JSON with a trailing newline, compute SHA-256 over those exact
5
+ bytes, and never edit the file. A changed scope requires a new session and packet.
6
+
7
+ ```json
8
+ {
9
+ "$schema": "ultra-review-worker-packet-v1",
10
+ "session": "<session-id>",
11
+ "mode": "task | change | plan",
12
+ "created_at": "<ISO-8601>",
13
+ "head": "<full-git-head>",
14
+ "range": "<exact-diff-range>",
15
+ "change_id": "<active-change-id>",
16
+ "task_ids": ["<task-id>"],
17
+ "acceptance": ["<criterion with source path and heading>"],
18
+ "public_seams": ["<entry point or behavior>"],
19
+ "context_files": [
20
+ {"path": ".ultra/contexts/<task-id>.md", "sha256": "<digest>"}
21
+ ],
22
+ "diff_files": ["src/example.ts"],
23
+ "output_directory": ".ultra/reviews/<session>"
24
+ }
25
+ ```
26
+
27
+ All paths are repository-relative. `mode`, `head`, `range`, `change_id`, `task_ids`,
28
+ `acceptance`, `public_seams`, `context_files`, `diff_files`, and `output_directory` are
29
+ required. Arrays may be empty only when the selected mode makes the absence explicit
30
+ in the packet.
31
+
32
+ Give a selected worker only:
33
+
34
+ 1. this packet path and exact digest;
35
+ 2. `unified-schema.md`;
36
+ 3. its one lens reference.
37
+
38
+ The worker writes only its assigned JSON artifact. Its `packet_digest` must equal the
39
+ expected digest passed to `review_wait.py`; a merely well-formed digest is insufficient.
40
+ The coordinator owns worker selection, synthesis, repair, and the summary.