ultra-builder-pro-cli 0.14.0 → 0.16.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.
- package/.ultra-template/docs/research/README.md +11 -7
- package/.ultra-template/specs/architecture.md +36 -36
- package/.ultra-template/specs/discovery.md +46 -33
- package/.ultra-template/specs/product.md +38 -29
- package/.ultra-template/specs/research-distillate.md +48 -0
- package/.ultra-template/tasks/contexts/TEMPLATE.md +11 -28
- package/CHANGELOG.md +77 -1
- package/README.md +46 -24
- package/adapters/_shared/codex-assets.cjs +6 -2
- package/adapters/_shared/file-ops.cjs +6 -2
- package/adapters/_shared/handbook.cjs +2 -1
- package/adapters/claude.js +3 -2
- package/adapters/codex.js +1 -0
- package/adapters/kimi.js +3 -2
- package/adapters/opencode.js +3 -2
- package/agents/review-coordinator.md +9 -6
- package/commands/ultra-change.md +1 -1
- package/commands/ultra-plan.md +1 -1
- package/commands/ultra-research.md +1 -1
- package/commands/ultra-think.md +2 -2
- package/docs/AGENT-CONTEXT.md +43 -19
- package/docs/ARCHITECTURE.md +54 -13
- package/docs/PLAN.zh-CN.md +4 -2
- package/docs/ROADMAP.md +10 -4
- package/docs/RUNTIME-COMPAT-MATRIX.md +4 -4
- package/docs/STATE-DB-ACCESS-POLICY.md +33 -29
- package/docs/USER-HANDBOOK-CONTRACT.md +8 -2
- package/docs/WORKFLOW-LIFECYCLE.md +342 -0
- package/hooks/README.md +6 -1
- package/hooks/health_check.py +12 -3
- package/hooks/subagent_tracker.py +52 -77
- package/mcp-server/hook-event.cjs +34 -0
- package/mcp-server/lib/archive-journal.cjs +17 -5
- package/mcp-server/lib/baseline-workflow.cjs +158 -18
- package/mcp-server/lib/change-workflow.cjs +598 -85
- package/mcp-server/lib/context-spine.cjs +305 -25
- package/mcp-server/lib/decision-dialogue.cjs +713 -0
- package/mcp-server/lib/doctor.cjs +42 -3
- package/mcp-server/lib/init-project.cjs +210 -16
- package/mcp-server/lib/plan-store.cjs +4 -1
- package/mcp-server/lib/pricing.cjs +7 -10
- package/mcp-server/lib/project-breadcrumb.cjs +15 -0
- package/mcp-server/lib/projector.cjs +57 -3
- package/mcp-server/lib/spec-learning.cjs +79 -2
- package/mcp-server/lib/state-db.cjs +168 -8
- package/mcp-server/lib/state-ops.cjs +160 -9
- package/mcp-server/lib/workflow-state.cjs +2305 -0
- package/mcp-server/server.cjs +215 -15
- package/orchestrator/daemon.cjs +1 -2
- package/orchestrator/dispatch-rules.cjs +5 -31
- package/orchestrator/planner/plan-builder.cjs +21 -12
- package/package.json +13 -3
- package/skills/ultra-change/SKILL.md +94 -80
- package/skills/ultra-change/references/change-contract.md +36 -0
- package/skills/ultra-deliver/SKILL.md +76 -79
- package/skills/ultra-deliver/references/baseline-reconciliation.md +20 -0
- package/skills/ultra-dev/SKILL.md +62 -59
- package/skills/ultra-doctor/SKILL.md +61 -82
- package/skills/ultra-init/SKILL.md +101 -103
- package/skills/ultra-init/references/brownfield-adoption.md +2 -2
- package/skills/ultra-plan/SKILL.md +99 -85
- package/skills/ultra-plan/references/semantic-preflight.md +18 -0
- package/skills/ultra-research/SKILL.md +102 -60
- package/skills/ultra-research/references/00-problem-validation.md +36 -0
- package/skills/ultra-research/references/01-opportunity-discovery.md +33 -0
- package/skills/ultra-research/references/02-market-assessment.md +30 -0
- package/skills/ultra-research/references/03-competitive-landscape.md +31 -0
- package/skills/ultra-research/references/04-product-strategy.md +32 -0
- package/skills/ultra-research/references/05-assumptions-validation.md +31 -0
- package/skills/ultra-research/references/10-user-personas.md +29 -0
- package/skills/ultra-research/references/11-user-scenarios.md +28 -0
- package/skills/ultra-research/references/20-user-stories.md +30 -0
- package/skills/ultra-research/references/21-features-scope.md +29 -0
- package/skills/ultra-research/references/22-success-metrics.md +28 -0
- package/skills/ultra-research/references/30-architecture-context.md +30 -0
- package/skills/ultra-research/references/31-solution-strategy.md +28 -0
- package/skills/ultra-research/references/32-building-blocks.md +28 -0
- package/skills/ultra-research/references/40-deployment.md +29 -0
- package/skills/ultra-research/references/41-quality-risks.md +28 -0
- package/skills/ultra-research/references/99-synthesis.md +35 -0
- package/skills/ultra-review/SKILL.md +63 -73
- package/skills/ultra-review/references/review-modes.md +27 -0
- package/skills/ultra-review/references/unified-schema.md +25 -0
- package/skills/ultra-review/scripts/review_wait.py +40 -3
- package/skills/ultra-status/SKILL.md +41 -41
- package/skills/ultra-test/SKILL.md +54 -55
- package/skills/ultra-think/SKILL.md +26 -12
- package/skills/ultra-think/references/decision-dialogue.md +130 -0
- package/skills/ultra-verify/SKILL.md +1 -1
- package/skills/ultra-verify/references/{confidence-system.md → evidence-status.md} +3 -3
- package/spec/cli-protocol.md +17 -3
- package/spec/mcp-tools.yaml +683 -64
- package/spec/schemas/baseline-reconciliation.v1.schema.json +73 -0
- package/spec/schemas/delivery-report.v1.schema.json +111 -0
- package/spec/schemas/mcp-tools.schema.json +1 -1
- package/spec/schemas/state-db.sql +140 -1
- package/spec/schemas/tasks.v4.5.schema.json +8 -1
- package/spec/schemas/test-report.v1.schema.json +194 -0
- package/ultra-tools/cli.cjs +1 -1
- package/ultra-tools/commands/migrate.cjs +3 -3
- package/ultra-tools/commands/status.cjs +228 -12
- package/.ultra-template/delivery-report.json +0 -9
- package/.ultra-template/test-report.json +0 -8
- package/adapters/_shared/tests/file-ops.test.cjs +0 -54
- package/adapters/_shared/tests/frontmatter.test.cjs +0 -47
- package/adapters/_shared/tests/handbook.test.cjs +0 -101
- package/adapters/_shared/tests/path-rewrite.test.cjs +0 -60
- package/adapters/_shared/tests/provenance.test.cjs +0 -133
- package/adapters/_shared/tests/resolve-target.test.cjs +0 -75
- package/adapters/_shared/tests/runtime-assets.test.cjs +0 -149
- package/adapters/_shared/tests/settings-merge.test.cjs +0 -85
- package/adapters/_shared/tests/validate.test.cjs +0 -30
- package/adapters/tests/claude.test.cjs +0 -138
- package/adapters/tests/codex-hook.test.cjs +0 -142
- package/adapters/tests/codex.test.cjs +0 -430
- package/adapters/tests/kimi-hook.test.cjs +0 -149
- package/adapters/tests/kimi.test.cjs +0 -259
- package/adapters/tests/opencode.test.cjs +0 -357
- package/mcp-server/lib/archive-journal.test.cjs +0 -35
- package/mcp-server/lib/baseline-workflow.test.cjs +0 -477
- package/mcp-server/lib/change-workflow.test.cjs +0 -971
- package/mcp-server/lib/context-spine.test.cjs +0 -93
- package/mcp-server/lib/doctor.test.cjs +0 -148
- package/mcp-server/lib/plan-store.test.cjs +0 -132
- package/mcp-server/lib/prd-parser.test.cjs +0 -82
- package/mcp-server/lib/project-breadcrumb.test.cjs +0 -112
- package/mcp-server/lib/runtime-state.test.cjs +0 -92
- package/mcp-server/lib/spec-learning.test.cjs +0 -67
- package/mcp-server/lib/state-db.test.cjs +0 -314
- package/mcp-server/lib/task-expander.test.cjs +0 -169
- package/mcp-server/lib/topo.test.cjs +0 -158
- package/mcp-server/tests/circuit-breaker.test.cjs +0 -125
- package/mcp-server/tests/commit-hash-flow.test.cjs +0 -117
- package/mcp-server/tests/concurrency-update.test.cjs +0 -96
- package/mcp-server/tests/concurrency.test.cjs +0 -112
- package/mcp-server/tests/db-ops.test.cjs +0 -121
- package/mcp-server/tests/init-project.test.cjs +0 -393
- package/mcp-server/tests/migrate.test.cjs +0 -232
- package/mcp-server/tests/projector.test.cjs +0 -162
- package/mcp-server/tests/server-contract.test.cjs +0 -1467
- package/mcp-server/tests/staleness.test.cjs +0 -190
- package/mcp-server/tests/state-db.test.cjs +0 -106
- package/mcp-server/tests/state-ops.test.cjs +0 -449
- package/mcp-server/tests/tagged-tasks.test.cjs +0 -163
- package/mcp-server/tests/telemetry.test.cjs +0 -219
- package/orchestrator/planner/plan-builder.test.cjs +0 -165
- package/orchestrator/tests/auto-merge.test.cjs +0 -216
- package/orchestrator/tests/daemon.test.cjs +0 -311
- package/orchestrator/tests/dispatch-rules.test.cjs +0 -124
- package/orchestrator/tests/parallel-orchestrator.test.cjs +0 -233
- package/orchestrator/tests/phase-8b-gate.test.cjs +0 -183
- package/orchestrator/tests/recovery.test.cjs +0 -190
- package/orchestrator/tests/session-runner.test.cjs +0 -314
- package/orchestrator/tests/skill-miner.test.cjs +0 -147
- package/orchestrator/tests/worktree-manager.test.cjs +0 -148
- package/skills/ultra-research/references/architecture.md +0 -38
- package/skills/ultra-research/references/problem-product.md +0 -39
- package/skills/ultra-research/references/quality-delivery.md +0 -34
- package/skills/ultra-research/references/synthesis.md +0 -38
- package/skills/ultra-research/references/users-scope.md +0 -40
- package/ultra-tools/legacy-memory.test.cjs +0 -80
- package/ultra-tools/status-command.test.cjs +0 -181
- package/ultra-tools/system-command.test.cjs +0 -309
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Deployment and operations
|
|
2
|
+
|
|
3
|
+
Use for workflow step `40-deployment`.
|
|
4
|
+
|
|
5
|
+
## Objective
|
|
6
|
+
|
|
7
|
+
Record how the system is built, configured, migrated, deployed, observed, recovered,
|
|
8
|
+
and rolled back across its actual environments.
|
|
9
|
+
|
|
10
|
+
## Evidence
|
|
11
|
+
|
|
12
|
+
- Inspect repository-native build and deployment configuration, environment contracts,
|
|
13
|
+
migrations, health checks, and operational documentation.
|
|
14
|
+
- Use current provider documentation only when repository evidence is insufficient.
|
|
15
|
+
- Separate verified deployment behavior from intended delivery design.
|
|
16
|
+
- Never record secrets or fabricate infrastructure that has not been selected.
|
|
17
|
+
|
|
18
|
+
## Record
|
|
19
|
+
|
|
20
|
+
Update `architecture.md` with environments, topology, CI/CD entry points, configuration,
|
|
21
|
+
migrations, observability, rollback, recovery, cost constraints when relevant, and
|
|
22
|
+
unknowns.
|
|
23
|
+
|
|
24
|
+
Complete the step with file, runtime, or provider evidence and the updated output path.
|
|
25
|
+
|
|
26
|
+
## Semantic record
|
|
27
|
+
|
|
28
|
+
Use kind `deployment`. Record `environment`, `entry_point`, `config_migration`,
|
|
29
|
+
`observation`, and `rollback_recovery`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Quality scenarios and risks
|
|
2
|
+
|
|
3
|
+
Use for workflow step `41-quality-risks`.
|
|
4
|
+
|
|
5
|
+
## Objective
|
|
6
|
+
|
|
7
|
+
Turn quality goals and known failure modes into observable scenarios, mitigations,
|
|
8
|
+
recovery expectations, and a durable risk ledger.
|
|
9
|
+
|
|
10
|
+
## Method
|
|
11
|
+
|
|
12
|
+
- Cover only qualities material to the accepted system: correctness, availability,
|
|
13
|
+
security, performance, privacy, maintainability, or others supported by evidence.
|
|
14
|
+
- State trigger, operating condition, expected response, measurement, and recovery.
|
|
15
|
+
- Separate known defect, technical debt, uncertain risk, and accepted constraint.
|
|
16
|
+
- Do not assign arbitrary probability or confidence scores.
|
|
17
|
+
|
|
18
|
+
## Record
|
|
19
|
+
|
|
20
|
+
Update `architecture.md` with quality scenarios, risk evidence, mitigation, owner,
|
|
21
|
+
verification, recovery, technical debt, and architecture decisions where needed.
|
|
22
|
+
|
|
23
|
+
Complete the step with evidence references and the updated output path.
|
|
24
|
+
|
|
25
|
+
## Semantic record
|
|
26
|
+
|
|
27
|
+
Use kind `risk`. Record `trigger_condition`, `expected_response`, `measurement`,
|
|
28
|
+
`mitigation`, `recovery`, and `owner`.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Research synthesis
|
|
2
|
+
|
|
3
|
+
Use for workflow step `99-synthesis`.
|
|
4
|
+
|
|
5
|
+
## Objective
|
|
6
|
+
|
|
7
|
+
Verify that research artifacts form one traceable, planning-ready baseline without
|
|
8
|
+
creating a second condensed authority.
|
|
9
|
+
|
|
10
|
+
## Validate
|
|
11
|
+
|
|
12
|
+
- Every consequential claim is marked `Observed`, `Verified`, `Decided`, or `Unknown`.
|
|
13
|
+
- Product behavior traces from problem or constraint through actor, scenario,
|
|
14
|
+
requirement, acceptance, architecture, quality, and delivery evidence.
|
|
15
|
+
- Current behavior and proposed behavior are not silently merged.
|
|
16
|
+
- Scope reflects owner decisions and never an inferred MVP or reduction.
|
|
17
|
+
- Documentation conflicts, known failures, and load-bearing unknowns are in the gap
|
|
18
|
+
ledger with owners or explicit decisions.
|
|
19
|
+
- Verification commands and observed results are current.
|
|
20
|
+
|
|
21
|
+
## Record
|
|
22
|
+
|
|
23
|
+
Write `research-distillate.md` as a navigation and traceability artifact containing
|
|
24
|
+
baseline ids, source document anchors, accepted decisions, blockers, gaps, verification
|
|
25
|
+
evidence, and the exact planning entry. Do not duplicate the specifications' prose.
|
|
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.
|
|
30
|
+
|
|
31
|
+
## Semantic record
|
|
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.
|
|
@@ -1,81 +1,71 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-review
|
|
3
|
-
description: Run independent specification-fidelity and engineering reviews over one current diff
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
One axis cannot compensate for the other.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
2.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`spec
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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, accepted
|
|
22
|
+
evidence, and decision checkpoint state. Stop on an empty or ambiguous scope or an
|
|
23
|
+
unconfirmed alignment checkpoint.
|
|
24
|
+
3. Resume or start a `review` workflow. Record `bind-diff` with revision, paths, mode,
|
|
25
|
+
and task set.
|
|
26
|
+
4. Compile `change.context` for `review` using only accepted intent, delta, task
|
|
27
|
+
contracts, tests, public seams, and diff paths. Record `compile-context` only when
|
|
28
|
+
ready, with the immutable context manifest as the step output.
|
|
29
|
+
5. Create `.ultra/reviews/<session-id>/` with mode, change id, exact task ids, full HEAD,
|
|
30
|
+
worktree digest, diff range, scope metadata, and pending verdicts.
|
|
31
|
+
|
|
32
|
+
## Execute independent axes
|
|
33
|
+
|
|
34
|
+
Always run the bounded `review-spec` worker for specification fidelity. Select the
|
|
35
|
+
smallest necessary engineering workers using the mode and risk matrix; a change review
|
|
36
|
+
for delivery runs every applicable role. Record every selected and skipped role with a
|
|
37
|
+
scope-specific rationale. Invoke them through the current host's native bounded-worker
|
|
38
|
+
mechanism. Keep workers independent and pass only the current diff plus their role
|
|
39
|
+
context.
|
|
40
|
+
|
|
41
|
+
Resolve `references/unified-schema.md` from this Skill directory and pass its absolute
|
|
42
|
+
path as `SCHEMA_PATH`. Validate artifacts with `scripts/review_wait.py`; a missing,
|
|
43
|
+
invalid, stale, or partial required artifact is not a pass.
|
|
44
|
+
|
|
45
|
+
Record:
|
|
46
|
+
|
|
47
|
+
- `review-specification` with `spec-fidelity.json` as an output;
|
|
48
|
+
- `review-engineering` with every selected engineering artifact as outputs;
|
|
49
|
+
- `coordinate-findings` with the coordinated summary output.
|
|
50
|
+
|
|
51
|
+
The coordinator preserves every specialist finding unchanged in `SUMMARY.json`.
|
|
52
|
+
Duplicate root causes may be grouped only in the human-readable summary. Review is
|
|
53
|
+
read-only except for review artifacts; implementation fixes are a separate dev action.
|
|
54
|
+
If a finding exposes a new owner choice, preserve it as a finding and route the primary
|
|
55
|
+
agent to `ultra-think`; a review worker must not open, answer, or hide that decision.
|
|
56
|
+
|
|
57
|
+
## Verify and complete
|
|
58
|
+
|
|
59
|
+
Recheck reviewed HEAD, worktree digest, review-context digest, diff, acceptance, task
|
|
60
|
+
set, artifact schemas, and both verdicts. Record `verify-review-gate`, then call
|
|
61
|
+
`workflow.complete`. MCP
|
|
62
|
+
derives each axis and the durable verdict from the specialist outputs, then requires
|
|
63
|
+
`SUMMARY.json` to match their complete finding set. Prompt claims and a lossy
|
|
64
|
+
coordinator summary cannot replace either axis. Any code, test, spec, or contract edit
|
|
65
|
+
invalidates affected review evidence and requires a new or resumed run.
|
|
66
|
+
|
|
67
|
+
Return both axis verdicts first, blocking findings, reviewed revision and paths,
|
|
68
|
+
artifact digests, workflow id, skipped-role rationale, and one exact next route. A
|
|
69
|
+
blocking implementation finding returns to `ultra-dev`; stale verification returns to
|
|
70
|
+
`ultra-test`; a new owner choice returns to `ultra-think`; an approved current change
|
|
71
|
+
review routes to `ultra-deliver`.
|
|
@@ -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
|
-
|
|
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
|
-
|
|
207
|
-
|
|
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,64 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-status
|
|
3
|
-
description: Report authoritative Ultra health, position,
|
|
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
|
|
6
|
+
# Route from authoritative state
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
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`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
1. Call `system.doctor` with repair disabled.
|
|
14
|
+
2. Call `baseline.get` for classification, readiness, revision, worktree, spec digests,
|
|
15
|
+
research provenance, gaps, and blockers.
|
|
16
|
+
3. Call `decision.list`, then `decision.get` for the current active or checkpoint-ready
|
|
17
|
+
thread. Expose only its current question or checkpoint, not the hidden history.
|
|
18
|
+
4. Call `workflow.list`, then `workflow.get` for every active, blocked, or ready run.
|
|
19
|
+
5. Call `change.breadcrumb`, `change.list`, `task.list`, and `session.list`.
|
|
20
|
+
6. Inspect current Git branch, full HEAD, and worktree without mutation.
|
|
21
|
+
7. Read test, review, and delivery artifacts only when referenced by DB workflow state;
|
|
22
|
+
compare their recorded digest and revision with current authority.
|
|
23
23
|
|
|
24
|
-
If
|
|
25
|
-
back to generated task JSON,
|
|
24
|
+
If state is unreadable, report that panel unavailable and route to `ultra-doctor`.
|
|
25
|
+
Never fall back to generated task JSON, raw SQLite queries, or context frontmatter.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Choose one route
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Prefer the breadcrumb and durable workflow position:
|
|
30
30
|
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
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`;
|
|
31
|
+
- state integrity, schema, projection, or installed-asset failure: `ultra-doctor`;
|
|
32
|
+
- open decision or checkpoint: `ultra-think` with its exact decision id;
|
|
33
|
+
- missing project or migrated compatibility authority: `ultra-init`;
|
|
34
|
+
- active/blocked research: `ultra-research` at its exact `current_step`;
|
|
35
|
+
- ready research with unconverged baseline: finalize research, record, approve, and
|
|
36
|
+
converge through `ultra-research`;
|
|
37
|
+
- active plan/change/dev/test/review/deliver run: its matching workflow at the exact
|
|
38
|
+
step or blocker;
|
|
39
|
+
- ready baseline with no change: `ultra-change` to persist the requested outcome before
|
|
40
|
+
any planning;
|
|
44
41
|
- archived change with fresh evidence: report completion without inventing more work.
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
Context-size warnings are advisory. Missing authority, stale required refs or outputs,
|
|
44
|
+
incomplete task contracts, failed evidence, unresolved learning, and missing approval
|
|
45
|
+
are blockers.
|
|
47
46
|
|
|
48
47
|
## Output
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
Report:
|
|
51
50
|
|
|
52
51
|
```text
|
|
53
52
|
Ultra: <healthy|degraded> · <branch>@<head> · worktree <clean|dirty>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
Baseline: <mode>/<status> · research=<run/status> · gaps=<open>/<blocking>
|
|
54
|
+
Workflow: <kind/id/status> · step=<current|finalize> · outputs=<fresh|stale>
|
|
55
|
+
Decision: <id/phase|checkpoint|none> · thread=<id/status>
|
|
56
|
+
Change: <id/status|none> · Task: <id/status|none> · Sessions: <active>
|
|
57
|
+
Evidence: test=<state> · review=<two axes> · delivery=<state>
|
|
58
|
+
Blockers: <specific codes or none>
|
|
59
|
+
Warnings: <advisory codes or none>
|
|
60
60
|
Next: <one exact action>
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
release
|
|
63
|
+
Separate verified facts, inferences, and unavailable evidence. Do not modify state,
|
|
64
|
+
compile context, repair, or release from this Skill.
|
|
@@ -1,59 +1,58 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-test
|
|
3
|
-
description:
|
|
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
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
with
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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`, active decision state, authoritative
|
|
14
|
+
tasks, completed dev runs, current HEAD/diff, and prior test report freshness. An
|
|
15
|
+
open decision or unconfirmed checkpoint blocks testing claims and routes to
|
|
16
|
+
`ultra-think`.
|
|
17
|
+
2. Resume or start a `test` workflow linked to the change and optional task. Record
|
|
18
|
+
`bind-scope` with the exact revision, task set, and acceptance ids.
|
|
19
|
+
3. Compile `change.context` for `check`; record `compile-context` only when required
|
|
20
|
+
refs and DB-backed execution contracts are ready, with the immutable context
|
|
21
|
+
manifest as the step output.
|
|
22
|
+
4. Map each accepted claim to an executable command or a specific bounded manual
|
|
23
|
+
observation. Record `map-acceptance`.
|
|
24
|
+
5. Run repository-native focused and regression tests, applicable type/lint/build
|
|
25
|
+
checks, public-seam acceptance, and material error/recovery/security checks. Record
|
|
26
|
+
`execute-checks` and `verify-public-seam` with commands and observed results.
|
|
27
|
+
|
|
28
|
+
Use real boundaries where practical. A test double is acceptable at a costly or
|
|
29
|
+
nondeterministic external boundary only when the report explains why it preserves the
|
|
30
|
+
contract. Reject tautologies, hidden skips, weakened assertions, and unconsumed code.
|
|
31
|
+
When evidence reveals an unresolved product decision, report the exact consequence and
|
|
32
|
+
route it to the decision dialogue; testing must not silently select the desired result.
|
|
33
|
+
|
|
34
|
+
## Report and converge
|
|
35
|
+
|
|
36
|
+
Write `.ultra/reports/tests/<workflow-id>.json` atomically using
|
|
37
|
+
`ultra-test-report-v1`: bind the full HEAD and worktree digest, change and exact task
|
|
38
|
+
ids, the recorded checking-context digest, acceptance
|
|
39
|
+
mapping, exact command results, public seams, failures, recovery evidence, run count,
|
|
40
|
+
timestamp, and blocking issues. Populate every `verification_dimensions` entry:
|
|
41
|
+
acceptance, regression, integration, static analysis, build, performance, security,
|
|
42
|
+
and recovery. Use `not_applicable` only with a concrete rationale; `not_run` cannot
|
|
43
|
+
support a passing gate. For an incident or any bugfix task, also record one
|
|
44
|
+
deterministic `regression_signal` with the exact command, expected red symptom,
|
|
45
|
+
observed red and green results, duration when known, and evidence. `passed` is true only when every recorded command and
|
|
46
|
+
required public seam passes with no blocking issue at that exact checkout.
|
|
47
|
+
|
|
48
|
+
Record `write-report` with the report output so MCP stores its digest. Re-read the file,
|
|
49
|
+
HEAD, task set, and breadcrumb; record `verify-test-gate`, then call
|
|
50
|
+
`workflow.complete`. MCP derives the durable test summary from the report rather than
|
|
51
|
+
trusting a Prompt claim. A malformed, mismatched, changed, or stale report blocks
|
|
52
|
+
completion.
|
|
53
|
+
|
|
54
|
+
Return the workflow id, revision, pass/fail result, exact checks, verified seams,
|
|
55
|
+
blocking failures, report path/digest, and one route to fix, `ultra-review`, or
|
|
56
|
+
`ultra-deliver`. A failed implementation contract returns to `ultra-dev`; a new owner
|
|
57
|
+
choice returns to `ultra-think`; a passing current change without current aggregate
|
|
58
|
+
review routes to `ultra-review`.
|