ultra-builder-pro-cli 0.21.1 → 0.23.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 (58) hide show
  1. package/.ultra-template/tasks/tasks.json +10 -3
  2. package/.ultra-template/templates/task-context.md +19 -0
  3. package/CHANGELOG.md +78 -0
  4. package/README.md +210 -36
  5. package/adapters/_shared/codex-assets.cjs +8 -3
  6. package/adapters/_shared/interaction-contract.cjs +13 -6
  7. package/adapters/_shared/runtime-assets.cjs +1 -1
  8. package/adapters/claude.js +1 -1
  9. package/adapters/kimi.js +1 -1
  10. package/adapters/opencode.js +24 -13
  11. package/docs/AGENT-CONTEXT.md +58 -51
  12. package/docs/ARCHITECTURE.md +82 -51
  13. package/docs/ARTIFACT-AUTHORITY.md +83 -44
  14. package/docs/COMMIT-HASH-BACKFILL.md +33 -90
  15. package/docs/DECISIONS.md +9 -7
  16. package/docs/LEGACY-CLI-CROSSWALK.md +10 -2
  17. package/docs/PLUGIN-ISOLATION-CONTRACT.md +3 -2
  18. package/docs/ROADMAP.md +3 -3
  19. package/docs/RUNTIME-COMPAT-MATRIX.md +13 -10
  20. package/docs/STATE-DB-ACCESS-POLICY.md +47 -19
  21. package/docs/WORKFLOW-LIFECYCLE.md +79 -49
  22. package/hooks/README.md +5 -4
  23. package/hooks/active_task_context.py +41 -39
  24. package/mcp-server/lib/artifact-registry.cjs +32 -7
  25. package/mcp-server/lib/baseline-workflow.cjs +60 -24
  26. package/mcp-server/lib/change-workflow.cjs +42 -6
  27. package/mcp-server/lib/context-paths.cjs +34 -3
  28. package/mcp-server/lib/doctor.cjs +28 -0
  29. package/mcp-server/lib/git-bootstrap.cjs +0 -1
  30. package/mcp-server/lib/init-project.cjs +52 -2
  31. package/mcp-server/lib/projector.cjs +43 -8
  32. package/mcp-server/lib/state-authority.cjs +19 -3
  33. package/mcp-server/lib/state-ops.cjs +6 -1
  34. package/mcp-server/lib/task-ledger.cjs +1342 -0
  35. package/mcp-server/lib/ultra-facade.cjs +646 -0
  36. package/mcp-server/lib/workflow-state.cjs +166 -2
  37. package/mcp-server/server.cjs +214 -26
  38. package/package.json +1 -1
  39. package/skills/ultra-change/SKILL.md +38 -90
  40. package/skills/ultra-deliver/SKILL.md +42 -62
  41. package/skills/ultra-dev/SKILL.md +34 -73
  42. package/skills/ultra-doctor/SKILL.md +26 -39
  43. package/skills/ultra-init/SKILL.md +37 -69
  44. package/skills/ultra-plan/SKILL.md +52 -125
  45. package/skills/ultra-research/SKILL.md +41 -101
  46. package/skills/ultra-review/SKILL.md +25 -44
  47. package/skills/ultra-status/SKILL.md +21 -40
  48. package/skills/ultra-test/SKILL.md +25 -60
  49. package/skills/ultra-think/SKILL.md +29 -48
  50. package/skills/ultra-think/references/decision-dialogue.md +6 -4
  51. package/spec/cli-protocol.md +15 -0
  52. package/spec/mcp-tools.yaml +286 -0
  53. package/spec/schemas/context-file.v4.5.schema.json +1 -1
  54. package/spec/schemas/mcp-tools.schema.json +1 -1
  55. package/spec/schemas/state-db.sql +1 -1
  56. package/spec/schemas/task-ledger.v1.schema.json +217 -0
  57. package/ultra-tools/commands/migrate.cjs +5 -2
  58. package/.ultra-template/tasks/contexts/TEMPLATE.md +0 -19
@@ -5,128 +5,55 @@ description: Turn an accepted Ultra Change Contract into dependency-valid, DB-ba
5
5
 
6
6
  # Build an executable plan
7
7
 
8
- The model owns decomposition and technical design. MCP owns plan state, task contracts,
9
- dependency integrity, output digests, and recovery. Planning must stay inside the
10
- accepted Change Contract without adding ceremonial approval.
11
-
12
- ## Bind current authority
13
-
14
- 1. Read doctor, baseline, change, breadcrumb `accepted_intent`, decisions, existing plan
15
- runs, tasks, and current checkout.
16
- 2. Require one mutable change with a healthy baseline or recorded incident bypass.
17
- For the first delivery of a greenfield project, an accepted ready baseline may
18
- already contain the complete delivery outcome. When no matching Change exists,
19
- materialize one `change.create` contract from that accepted intent and read it back
20
- without asking the owner to repeat the same choice. Do not invent scope, expand an
21
- incomplete baseline, or use this shortcut for a later change.
22
- 3. Complete the exact change-bound research disposition before planning.
23
- 4. For a standard or major Change, read the current registered `change.delta` and
24
- verify its baseline anchors and digest. A Direct Build route supplies the delta
25
- directly from accepted intent; it skips Research, not this authority boundary.
26
- 5. Resume the matching plan run. Do not start a new run until planning posture is
27
- accepted.
28
-
29
- Read `references/semantic-preflight.md` and inspect requirements, real consumers,
30
- state, tests, deployment, and recovery paths.
31
-
32
- ## Align planning posture
33
-
34
- Use the interaction protocol in `../ultra-think/references/decision-dialogue.md`.
35
- Normalize a posture already explicit in current intent. Otherwise recommend one based
36
- on the Change Contract, explain its scope effect, and use the host's native question
37
- surface:
38
-
39
- - `EXPAND`: surface evidence-backed opportunities beyond accepted scope;
40
- - `SELECTIVE`: hold accepted scope and offer optional expansions individually;
41
- - `HOLD`: preserve scope and strengthen completeness, failure handling, and recovery;
42
- - `REDUCE`: propose the smallest outcome that still satisfies revised acceptance.
43
-
44
- The user may select, modify, delegate, or defer the posture. Stop on an unanswered
45
- choice. Start `workflow.start` only after alignment and store `planning_posture` plus
46
- its rationale in workflow metadata. This is a scope boundary, not approval of the
47
- eventual technical design.
48
-
49
- ## Design with model autonomy
50
-
51
- Build a candidate plan from the Change Contract, current typed delta, and any selected
52
- research. Ask the user only if the plan would change accepted
53
- scope, public behavior, compatibility, security, material cost, external effects, or
54
- recovery. Use the same host-native interaction protocol.
55
-
56
- When the candidate remains inside the accepted Change Contract, proceed without a
57
- second approval. A user may still request a plan review before persistence; that is an
58
- interaction preference, not a runtime invariant.
59
-
60
- Record:
61
-
62
- 1. `validate-baseline`
63
- 2. `compile-context`
64
- 3. `analyze-requirements`
65
- 4. `analyze-codebase`
66
- 5. `design-slices`
67
- 6. `validate-dependencies`
68
- 7. `persist-task-contracts`
69
- 8. `verify-plan`
70
-
71
- Design a walking skeleton and subsequent vertical slices. Every slice reaches a real
72
- consumer and owns its validation, side effects, errors, documentation, migration,
73
- observability, and recovery obligations. Avoid unconsumed horizontal scaffolding.
74
-
75
- After starting or resuming the workflow, compile `change.context` with `role: plan`
76
- and `gate: planning`. Record its immutable manifest as the `compile-context` output.
77
- The packet is the accepted planning input, not a mutable plan draft. `change.context`
78
- must not update Change provider references; persist new provider metadata with
79
- `change.update` before recompiling.
80
-
81
- ## Persist task contracts
82
-
83
- Create each task with:
84
-
85
- - observable outcome (`purpose`) and stable trace (`why`);
86
- - `slice_kind`, public seam, and exact verification command;
87
- - structured acceptance mapped to Change acceptance ids;
88
- - target seams and affected files when known;
89
- - bounded pattern/context refs with a reason, optional anchor and scope, and an
90
- explicit freshness policy;
91
- - documentation impact, ownership, and dependencies.
92
-
93
- Use `digest` freshness with `expected_digest` for accepted inputs that must remain
94
- byte-current. Use `existence` for source targets expected to change during
95
- implementation. Use `advisory` only when drift should be visible but non-blocking.
96
- The compiled task context restores constraints and non-goals from the Change Contract,
97
- plus acceptance, recovery, documentation impact, and the definition of drift. Keep
98
- large referenced files lazy; do not paste their bodies into the plan packet.
99
-
100
- Use estimates only when evidence supports them. A quick change has exactly one task.
101
- Read every task back from DB. Never read or write `.ultra/tasks/tasks.json` directly;
102
- it is a generated projection, not authority.
103
-
104
- If a semantic `change.update` invalidated existing tasks, reconcile every affected
105
- task contract against the current intent, acceptance, decisions, and research
106
- evidence. Rebind the complete execution contract while clearing `stale` through
107
- `task.update`; MCP rejects a marker-only clear, validates the read-back, and records
108
- the current Change authority digest. Never clear staleness merely to pass a gate.
109
-
110
- Validate the change-scoped graph with `task.dependency_topo`. Export
111
- the deterministic `<artifact_root>/plan.json` and `<artifact_root>/plan.md` pair with
112
- `plan.export { change_id }`. The JSON binds the exact planning context snapshot and
113
- manifest digest; the Markdown is a deterministic human view of the same task graph.
114
- Read the JSON through `plan.get` and record it as the `verify-plan` output. Do not
115
- choose an arbitrary output path or overwrite another Change's plan. A legacy global
116
- `.ultra/execution-plan.json` may be read for migration diagnosis only and is never a
117
- current write target.
118
-
119
- Call `workflow.complete`. `approval` is optional: include it only when a material plan
120
- decision actually required and received user approval. MCP derives task coverage and
121
- topology from DB and must reject incomplete contracts, uncovered acceptance, cycles,
122
- cross-change tasks, stale research, or a mismatched export.
123
-
124
- Do not advance or complete the Change workflow; change capture is already complete.
125
- Compile a separate task context later for each consumer that needs it. Planning,
126
- implementation, testing, review, and convergence snapshots are not interchangeable.
127
-
128
- Return topology, first executable slices, public seams, verification commands, plan
129
- workflow id, and allowed transitions. The host may recommend parallel or sequential
130
- execution based on dependency and conflict evidence.
131
-
132
- Never invoke the recommended capability here; wait for an explicit user invocation.
8
+ The model owns decomposition and technical design. MCP commits the accepted task graph,
9
+ digests, context, and team checkpoint in one semantic operation.
10
+
11
+ ## Bind and design
12
+
13
+ 1. Call `ultra.context { stage: plan, scope: { change_id }, detail: full }`.
14
+ 2. Inspect or import the team checkpoint with `ultra.sync`. Resolve real concurrent
15
+ record conflicts; do not merge authority by editing JSON.
16
+ 3. Require an accepted Change contract and its current typed delta. Direct Build skips
17
+ extra research, never Plan or task contracts.
18
+ 4. Read `references/semantic-preflight.md`; inspect real consumers, source, tests,
19
+ deployment, and recovery.
20
+ 5. Recommend `EXPAND`, `SELECTIVE`, `HOLD`, or `REDUCE` only when posture changes
21
+ accepted scope. Reuse an explicit posture and ask through the host-native UI only
22
+ for a material unresolved choice.
23
+ 6. Design a walking skeleton and vertical slices. Each task owns an observable outcome,
24
+ public seam, verification command, acceptance mapping, target seams, bounded
25
+ context refs, documentation impact, recovery, owner, and dependencies.
26
+
27
+ Large sources stay lazy. Use digest freshness for accepted inputs that must remain
28
+ byte-current, existence for expected implementation targets, and advisory only when
29
+ drift must be visible without blocking.
30
+
31
+ Read `../ultra-think/references/decision-dialogue.md` before asking a material
32
+ question.
33
+
34
+ ## Record and checkpoint
35
+
36
+ Use one `ultra.record` batch for all `task.create` and necessary `task.update`
37
+ operations. Read back the draft with `ultra.context`.
38
+ Never read or write `.ultra/tasks/tasks.json`; use `ultra.sync` for the Git team
39
+ checkpoint, and never edit the local runtime projection directly.
40
+
41
+ Call exactly one `ultra.checkpoint`:
42
+
43
+ ```text
44
+ stage: plan
45
+ scope: { change_id }
46
+ payload: planning posture, optional approval already obtained, context budget/refs
47
+ idempotency_key: stable semantic Plan checkpoint id
48
+ ```
49
+
50
+ The checkpoint compiles or reuses the content-addressed Context Manifest, validates
51
+ task coverage and dependencies, exports `plan.json` and `plan.md` once, completes the
52
+ durable Plan, and publishes the team checkpoint. Do not export again after validation.
53
+
54
+ If rejected, the same Plan draft stays mutable. Fix task contracts or evidence and
55
+ retry. To discard it, record `workflow.abandon`; never edit SQLite or open a parallel
56
+ run to escape a blocker.
57
+
58
+ Return topology, executable slices, public seams, exact checks, checkpoint result, and
59
+ the model's recommended execution order. Do not invoke `ultra-dev` automatically.
@@ -1,119 +1,59 @@
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 and low-load alignment. Use when initialization, brownfield adoption, or an active change has a real evidence gap.
3
+ description: Build or refresh an evidence-backed product and architecture baseline through recommended, user-selected semantic coverage. Use when initialization, brownfield adoption, or an active Change has a real evidence gap.
4
4
  ---
5
5
 
6
6
  # Research with adaptive coverage
7
7
 
8
- The model owns investigation, synthesis, and coverage recommendations; the user owns
9
- the accepted semantic route and material deferrals. MCP owns run state, evidence,
10
- semantic records, digests, freshness, and convergence, not a questionnaire.
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.
11
11
 
12
- Read `../ultra-think/references/decision-dialogue.md` before asking a material question.
12
+ ## Bind current context
13
13
 
14
- ## Bind authority
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.
15
23
 
16
- 1. Read `system.doctor`, `baseline.get`, breadcrumb `accepted_intent`, active decisions,
17
- and existing research runs.
18
- 2. Resume the matching active, blocked, or ready run. Do not create parallel authority.
19
- 3. If none exists, use `full` for greenfield, `adoption` for brownfield, or a bounded
20
- mode only for a recorded active-Change disposition. Focused baseline coverage
21
- remains `full` or `adoption`; `custom` is Change-bound only.
22
- 4. Before `workflow.start`, inspect current code, docs, tests, runtime, and prior
23
- artifacts. Recommend the smallest sufficient set of applicable catalog areas.
24
- Explain the net effect without dumping all 17 areas. Offer at most three credible
25
- routes: the recommended adaptive set, the full catalog, and a focused or custom set.
26
- 5. If current user intent does not already select a route, use the host's native
27
- structured question surface. The user selects, modifies, delegates, or defers.
28
- Treat a dismissal as unanswered, stop, and perform no route-dependent write.
29
- 6. Normalize the answer and persist the accepted coverage through `workflow.start`.
30
- Use `execute` for fresh evidence, `verify_existing` for source validation, `reuse`
31
- for current evidence, `not_applicable` with evidence and rationale, or `deferred`
32
- with consequence and owner acceptance when scope or material risk changes.
33
- 7. Pass the evidence-based coverage rationale as `metadata.selection_reason`. Omitted
34
- catalog areas create no DB step and need no ceremonial disposition.
35
- 8. Read back the created workflow and accepted coverage. When a durable decision thread
36
- recorded the route, complete it with the workflow reference in `applied_refs`.
24
+ Read `../ultra-think/references/decision-dialogue.md` before asking. Load only the
25
+ reference files for research areas that actually apply.
37
26
 
38
- `99-synthesis` must execute, verify, or reuse. A missing disposition is a coverage
39
- error only for an included area; a recorded exclusion with evidence is not incomplete.
27
+ ## Investigate
40
28
 
41
- ## Coverage catalog
29
+ For each selected area:
42
30
 
43
- Load only the reference for a step that must execute, verify, or reuse:
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.
44
36
 
45
- | Area | Reference | Area | Reference |
46
- |---|---|---|---|
47
- | `00-problem-validation` | `references/00-problem-validation.md` | `01-opportunity-discovery` | `references/01-opportunity-discovery.md` |
48
- | `02-market-assessment` | `references/02-market-assessment.md` | `03-competitive-landscape` | `references/03-competitive-landscape.md` |
49
- | `04-product-strategy` | `references/04-product-strategy.md` | `05-assumptions-validation` | `references/05-assumptions-validation.md` |
50
- | `10-user-personas` | `references/10-user-personas.md` | `11-user-scenarios` | `references/11-user-scenarios.md` |
51
- | `20-user-stories` | `references/20-user-stories.md` | `21-features-scope` | `references/21-features-scope.md` |
52
- | `22-success-metrics` | `references/22-success-metrics.md` | `30-architecture-context` | `references/30-architecture-context.md` |
53
- | `31-solution-strategy` | `references/31-solution-strategy.md` | `32-building-blocks` | `references/32-building-blocks.md` |
54
- | `40-deployment` | `references/40-deployment.md` | `41-quality-risks` | `references/41-quality-risks.md` |
55
- | `99-synthesis` | `references/99-synthesis.md` | | |
37
+ Use one `ultra.record` batch for durable facts such as `artifact.record`,
38
+ `decision.*`, `baseline.*`, `change.update`, or `change.delta`. Every entry needs a
39
+ stable idempotency key. A rejected entry is a mutable diagnostic: fix the draft and
40
+ retry; use `workflow.abandon` only when intentionally discarding that attempt.
56
41
 
57
- ## Investigate and interact
42
+ ## Commit one research checkpoint
58
43
 
59
- For each active area:
44
+ Call exactly one `ultra.checkpoint` with `stage: research`. Put the selected research areas
45
+ and their report outputs in `payload.steps`; include only work actually performed,
46
+ verified, reused, deferred with owner authority, or proved not applicable. Synthesis
47
+ must always be present.
60
48
 
61
- 1. Resolve observable facts from the checkout, runtime, tests, existing specifications,
62
- and primary sources. Separate `Observed`, `Verified`, `Decided`, and `Unknown`.
63
- 2. Ask the user only for a material intent, scope, compatibility, risk, or recovery
64
- decision that evidence cannot answer. Use the host's native question UI when
65
- available. Present the recommendation and effect; avoid a questionnaire or a dump
66
- of the hidden research queue.
67
- 3. Process dependent decisions one at a time. A small group of independent,
68
- low-cognitive-load facts may be asked together when the host UI supports it.
69
- 4. Normalize explicit user intent without redundant confirmation. Create durable
70
- decision state only when a project-bound decision must survive interruption.
71
- 5. Update the smallest relevant baseline specification or active-change research
72
- artifact. Do not copy prompts, transcripts, provider payloads, or internal chain of
73
- thought.
49
+ For baseline research, record and converge the accepted baseline through
50
+ `ultra.record`, then publish the team checkpoint with `ultra.sync { action: publish }`.
51
+ For Change-bound research, keep all findings and delta artifacts below the Change
52
+ root and never edit accepted baseline specs directly.
74
53
 
75
- Every required step writes `Evidence`, `Specification updates`, and `Decisions and
76
- unknowns` to `.ultra/docs/research/<workflow-id>/<step-id>.md` for a baseline, or
77
- `<change-root>/research/<workflow-id>/<step-id>.md` for an active Change.
54
+ If the checkpoint returns `accepted: false`, keep the same draft mutable, repair the
55
+ reported evidence, and retry. Do not manufacture evidence or open a replacement run.
78
56
 
79
- Call `workflow.step` with bounded evidence, the report output, and typed semantic
80
- records. Reused or verified evidence must still produce a current report and digest.
81
- Block the same step when required evidence or owner authority is missing. For Change
82
- research, keep `findings.md` and every semantic output inside the same Change root and
83
- register them through workflow outputs; do not write baseline specifications.
84
-
85
- At synthesis, bind the current `discovery.md`, `product.md`, `architecture.md`, and
86
- `research-distillate.md` only for initial/adoption research. Change-bound synthesis
87
- updates the Change findings and specification overlay, then records or refreshes
88
- `change.delta`. It never mutates the accepted baseline.
89
-
90
- ## Baseline convergence
91
-
92
- After `workflow.complete`, initial or adoption research calls `baseline.record` with
93
- the current repository scope and revision, specification refs, evidence, real
94
- verification results, unknowns, gap ledger, classification, and external provider
95
- metadata references.
96
-
97
- If Git is initialized but unborn, present the exact local checkpoint paths and purpose
98
- for user authorization, then create only that local commit. Never create a remote,
99
- tag, or push through research. If authorization or identity is missing, preserve the
100
- run as blocked with `BASELINE_GIT_HEAD_REQUIRED`.
101
-
102
- Call `baseline.converge` only when the user has accepted the exact baseline snapshot,
103
- known failures, blocking gaps, and scope. Reuse an unambiguous current approval; do not
104
- ask twice. MCP must reject stale research, drift, missing evidence, and unaccepted
105
- failures.
106
-
107
- Reuse the final research acceptance or current artifact checkpoint during baseline
108
- convergence; do not ask for an equivalent approval again. After initial or adoption
109
- convergence, `ultra-change` becomes an available transition. Bounded change research
110
- returns to its owning Change authority; the next route is still `ultra-plan`, never
111
- direct implementation.
112
-
113
- Return a compact coverage summary by disposition, current evidence or decision
114
- blocker, baseline state, gaps, and allowed transitions. Recommend a semantic next
115
- action from those transitions. If current intent does not already select it, present
116
- the recommendation and credible alternatives through the interaction protocol, then
117
- wait. MCP supplies only valid and required transitions.
118
-
119
- Never invoke the recommended capability here; wait for an explicit user invocation.
57
+ Return coverage, decisive evidence, remaining gaps, durable artifact paths, and a
58
+ model recommendation for the next explicit capability, such as `ultra-change` after a
59
+ ready baseline. Never invoke it automatically.
@@ -1,60 +1,41 @@
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 a review gate or focused risk analysis.
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.
4
4
  ---
5
5
 
6
6
  # Review one bounded scope
7
7
 
8
8
  Keep two independent verdict axes:
9
9
 
10
- - `spec_fidelity`: accepted intent, behavior, documentation impact, and public seams;
11
- - `engineering_standards`: correctness, safety, tests, integration, maintainability,
12
- observability, and recovery.
10
+ - `spec_fidelity`: accepted intent, behavior, docs, and public seams;
11
+ - `engineering_standards`: correctness, safety, tests, integration,
12
+ maintainability, observability, and recovery.
13
13
 
14
- Neither axis can compensate for the other.
14
+ ## Bind and review
15
15
 
16
- ## Bind evidence
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.
17
23
 
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, breadcrumb `accepted_intent`, 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`.
24
+ Workers are read-only and use the host-native bounded-worker mechanism. Validate their
25
+ artifacts with `scripts/review_wait.py` and
26
+ `references/unified-schema.md`. Preserve every finding unchanged in `SUMMARY.json`;
27
+ group duplicates only in the human summary.
25
28
 
26
- An empty, ambiguous, or stale scope cannot pass.
29
+ Register specialist and summary artifacts through one `ultra.record` batch.
27
30
 
28
- ## Select workers by risk
31
+ ## Checkpoint
29
32
 
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.
33
+ Call `ultra.checkpoint` once with `stage: review`, exact scope, evidence, and outputs
34
+ tagged `spec_review`, `engineering_review`, or summary. The checkpoint compiles or
35
+ reuses review context and derives both axes from registered artifacts.
33
36
 
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.
37
+ A rejected checkpoint leaves the draft mutable. Fix stale scope or evidence and retry;
38
+ do not open a replacement run or suppress a finding.
37
39
 
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`. Store all specialist artifacts and `SUMMARY.json` below
41
- `.ultra/changes/active/<change-id>/review/<workflow-id>/`. Record outputs under
42
- `review-specification`, `review-engineering`, and `coordinate-findings`.
43
-
44
- The coordinator preserves every finding unchanged in `SUMMARY.json`; it may group
45
- duplicate root causes only in the human summary. A new material owner choice remains a
46
- finding and routes to the interaction protocol.
47
-
48
- ## Complete
49
-
50
- Recheck HEAD, worktree, context digest, diff, task set, acceptance, artifact schemas,
51
- and both axes. Record `verify-review-gate`, then call `workflow.complete`. MCP derives
52
- the durable verdict and rejects missing specialists, lossy coordination, stale
53
- artifacts, or prompt-supplied conclusions.
54
-
55
- Any relevant code, test, specification, or contract edit invalidates the affected
56
- review evidence through registered provenance edges; unrelated evidence remains
57
- current. Return both verdict axes, blocking findings, reviewed scope, worker selection
58
- rationale, artifact digests, and allowed transitions.
59
-
60
- Never invoke the recommended capability here; wait for an explicit user invocation.
40
+ Return both axes, findings, reviewed scope, worker rationale, digests, and the model's
41
+ recommended next explicit capability. Do not invoke it automatically.
@@ -1,59 +1,40 @@
1
1
  ---
2
2
  name: ultra-status
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.
3
+ description: Read authoritative Ultra health, workflows, decisions, changes, tasks, evidence freshness, and team checkpoint state. Use when the user asks what is complete, blocked, stale, or currently possible.
4
4
  ---
5
5
 
6
6
  # Report authoritative state
7
7
 
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.
8
+ This Skill is read-only.
10
9
 
11
10
  ## Read
12
11
 
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 and breadcrumb `accepted_intent` without exposing hidden
17
- future questions.
18
- 4. Read active, blocked, and ready workflows and their current steps.
19
- 5. Read the active Change root, typed delta, plan, deterministic progress projection,
20
- documentation reconciliation, findings, tasks, sessions, and current Git state.
21
- 6. Read test, review, and delivery artifacts only through DB references and verify
22
- their digests and revisions.
23
-
24
- If authority is unreadable, report the unavailable panel and the required doctor or
25
- init transition. Do not mutate, compile context, repair, or release.
26
-
27
- ## Interpret transitions
28
-
29
- MCP reports:
30
-
31
- - `allowed_transitions`: mechanically valid capabilities;
32
- - `required_transition`: the sole recovery route only when a hard invariant permits no
33
- safe alternative.
34
-
35
- The host model recommends among allowed transitions using the user's current goal,
36
- workflow evidence, and cost of interruption. Do not present the recommendation as DB
37
- authority. A healthy project may validly allow research, change, thinking, or status at
38
- the same time.
12
+ Call `ultra.context { stage: project, detail: full }`. Use `ultra.sync { action:
13
+ inspect }` only when the user needs team-checkpoint detail. Do not import, publish,
14
+ repair, compile context, or mutate state.
15
+ Never fall back to the Git team checkpoint, generated task JSON, or report files as
16
+ live authority when `ultra.context` reports missing or unhealthy local state.
39
17
 
40
18
  Report:
41
19
 
42
20
  ```text
43
- Ultra: <healthy|degraded> · <branch>@<head|unborn|non-git> · worktree <state>
44
- Baseline: <mode>/<status> · research=<run/status> · gaps=<open>/<blocking>
45
- Workflow: <kind/id/status> · step=<current|complete> · outputs=<fresh|stale>
46
- Decision: <current|checkpoint|none>
47
- Change: <id/status|none> · delta=<fresh|stale|missing> · docs=<fresh|stale|missing>
21
+ Ultra: <healthy|degraded> · <branch>@<head|unborn|non-git>
22
+ Baseline: <mode>/<status> · gaps=<open>/<blocking>
23
+ Workflow drafts: <active|blocked|ready> · accepted checkpoints=<current|stale>
24
+ Change: <id/status|none> · delta/docs=<state>
48
25
  Task: <id/status|none> · Sessions: <active>
49
26
  Evidence: plan=<state> · test=<state> · review=<axes> · delivery=<state>
50
- Blockers: <codes or none>
51
- Warnings: <codes or none>
52
- Allowed transitions: <capabilities>
53
- Required transition: <capability or none>
27
+ Team checkpoint: <current|drifted|revalidation_required|missing|invalid>
28
+ Blockers: <hard mechanical blockers or none>
29
+ Warnings: <advisory semantic diagnostics or none>
54
30
  Host recommendation: <capability and concise rationale>
55
31
  ```
56
32
 
57
- Separate verified facts, host inference, and unavailable evidence.
33
+ Treat warnings and failed draft checks as information, not mechanical orders. Only
34
+ corruption, unsafe paths, real concurrency conflicts, permissions, or irreversible
35
+ external effects are hard blockers.
58
36
 
59
- Never invoke the recommended capability here; wait for an explicit user invocation.
37
+ The host model recommends the next useful capability from accepted intent, current
38
+ evidence, cost of interruption, and owner goal. SQLite does not choose the route.
39
+ Separate verified facts, model inference, and unavailable evidence. Never invoke the
40
+ recommendation automatically.
@@ -1,73 +1,38 @@
1
1
  ---
2
2
  name: ultra-test
3
- description: Independently verify an Ultra task set or change with an evidence-backed, risk-selected test profile. Use when implementation or current acceptance and recovery evidence needs independent verification.
3
+ description: Independently verify an Ultra task set or Change with an evidence-backed, risk-selected test profile. Use when implementation or current acceptance and recovery evidence needs independent verification.
4
4
  ---
5
5
 
6
6
  # Verify current behavior
7
7
 
8
- Testing is independent checking. Do not reuse implementation conclusions or generated
9
- projections as proof.
8
+ Testing independently checks the current checkout. Implementation conclusions and
9
+ generated projections are not evidence.
10
10
 
11
- ## Bind scope
11
+ ## Bind and execute
12
12
 
13
- 1. Read doctor, change, breadcrumb `accepted_intent`, decisions, task and dev evidence,
14
- current checkout, and prior report freshness.
15
- 2. Resume or start a test workflow bound to the exact change and optional task.
16
- 3. Record `bind-scope`, then compile `change.context` for `check` and record its
17
- immutable manifest under `compile-context`.
18
- 4. Record `map-acceptance` after mapping every accepted claim to an executable check
19
- or bounded observable seam.
13
+ 1. Call `ultra.context { stage: test, scope: { change_id, task_id? }, detail: full }`.
14
+ 2. Import a newer team checkpoint with `ultra.sync`; stop on a real conflict.
15
+ 3. Bind exact acceptance, task set, HEAD, worktree, decisions, dev evidence, and public
16
+ seams.
17
+ 4. Select a risk-based profile from acceptance, regression, integration, static
18
+ analysis, build, performance, security, and recovery. Acceptance is mandatory;
19
+ explain every material exclusion.
20
+ 5. Run repository-native commands and real boundaries. A bug or incident needs one
21
+ deterministic red-to-green regression signal.
20
22
 
21
- ## Select verification by risk
23
+ Write an `ultra-test-report-v1` report below the owning Change. Bind exact acceptance
24
+ ids, task ids, HEAD, worktree/context digests, commands, seams, failures, recovery,
25
+ profile, timestamp, blockers, and evidence-derived verdict. Register it with
26
+ `ultra.record` using `artifact.record`.
22
27
 
23
- The model selects from:
28
+ ## Checkpoint
24
29
 
25
- - acceptance;
26
- - regression;
27
- - integration;
28
- - static analysis;
29
- - build;
30
- - performance;
31
- - security;
32
- - recovery.
30
+ Call `ultra.checkpoint` once with `stage: test`, exact scope, evidence, and an output
31
+ for the report (`kind: test-report`). The checkpoint compiles or reuses checking
32
+ context and derives the verdict from the registered report.
33
33
 
34
- Acceptance is always selected. Select other dimensions when the change, repository, or
35
- failure mode makes them material. Record excluded dimensions and concrete rationales in
36
- `verification_profile`; omission without a rationale is invalid. A selected dimension
37
- must be `pass`, `fail`, or `not_run`; `not_run` cannot support a passing gate.
34
+ If rejected, keep the same draft, repair evidence, and retry. Never weaken an
35
+ assertion, hide a skip, or turn a warning into proof.
38
36
 
39
- Run repository-native commands and real boundaries where practical. Test doubles are
40
- acceptable only at costly or nondeterministic external boundaries when the report
41
- explains the preserved contract. Do not weaken assertions, hide skips, or validate
42
- unconsumed code.
43
-
44
- For an incident or bugfix, record one deterministic red-to-green `regression_signal`.
45
- When evidence reveals a material product or recovery choice, use the host's native
46
- question UI and decision protocol; testing must not choose the desired outcome.
47
-
48
- ## Report
49
-
50
- Write
51
- `.ultra/changes/active/<change-id>/test/<workflow-id>/report.json` with
52
- `ultra-test-report-v1`, binding:
53
-
54
- - change, exact task ids, current Change acceptance ids, HEAD, worktree digest, and
55
- checking-context digest;
56
- - acceptance mapping, commands, public seams, failures, and recovery evidence;
57
- - `verification_profile` and the selected `verification_dimensions`;
58
- - regression signal when required;
59
- - run count, timestamp, blockers, and evidence-derived `passed`.
60
-
61
- Record `execute-checks`, `verify-public-seam`, and `write-report`, then re-read the
62
- report and current checkout before `verify-test-gate`. `workflow.complete` derives its
63
- summary from the report and rejects stale, malformed, contradictory, out-of-Change,
64
- or acceptance-incomplete evidence.
65
-
66
- Return the profile, exact results, verified seams, blockers, report digest, workflow
67
- state, and allowed transitions. Recommend broader review, more implementation, or
68
- delivery from those transitions. If current intent does not already select the
69
- semantic next action, use
70
- `../ultra-think/references/decision-dialogue.md` and wait for the user to select,
71
- modify, delegate, or defer it.
72
-
73
- Never invoke the recommended capability here; wait for an explicit user invocation.
37
+ Return the profile, exact results, verified seams, blockers, report digest, and the
38
+ model's recommended next explicit capability. Do not invoke it automatically.