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
|
@@ -1,86 +1,65 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-doctor
|
|
3
|
-
description: Diagnose Ultra
|
|
3
|
+
description: Diagnose and recover Ultra DB schema, workflow outputs, projections, sessions, incidents, change artifacts, archives, hooks, and installed host assets. Use when authority is degraded, workflow state disagrees with prompts, outputs are stale, hooks fail, or MCP operations cannot proceed.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Diagnose
|
|
7
|
-
|
|
8
|
-
Default to read-only diagnosis.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
- event and projection
|
|
17
|
-
-
|
|
18
|
-
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
## Installed-plugin failures
|
|
67
|
-
|
|
68
|
-
When a hook points to a missing installed file:
|
|
69
|
-
|
|
70
|
-
1. Capture the hook manifest path and missing target.
|
|
71
|
-
2. Run the installer doctor for the actual host and install scope.
|
|
72
|
-
3. Preserve provenance, asset-hash, and host-contract findings.
|
|
73
|
-
4. Reinstall through the host adapter rather than patching a cache directory.
|
|
74
|
-
5. Rerun installer doctor, `system.doctor`, and a host hook smoke test.
|
|
75
|
-
|
|
76
|
-
Project doctor covers `.ultra/state.db`; installer doctor covers packaged files and
|
|
77
|
-
host wiring. Neither substitutes for the other.
|
|
78
|
-
|
|
79
|
-
## Output
|
|
80
|
-
|
|
81
|
-
Lead with `healthy` or `degraded`. List failing authority checks separately from
|
|
82
|
-
baseline warnings, incident identifiers, cursor lag, whether repair ran, the backup
|
|
83
|
-
path, and each unresolved action with its owner.
|
|
84
|
-
|
|
85
|
-
Do not fix application code, delete state, reset Git, close healthy sessions, or
|
|
86
|
-
install and repair external providers through this workflow.
|
|
6
|
+
# Diagnose before repair
|
|
7
|
+
|
|
8
|
+
Default to read-only diagnosis. Call `system.doctor` with repair disabled and inspect:
|
|
9
|
+
|
|
10
|
+
- SQLite integrity, schema version, required tables, and migration provenance;
|
|
11
|
+
- baseline classification/readiness, research provenance, spec/evidence digests, gaps,
|
|
12
|
+
and revision/worktree drift;
|
|
13
|
+
- active, blocked, and ready workflow runs, current steps, blockers, and output health;
|
|
14
|
+
- active decision threads, the sole current question, blocking deferrals, checkpoint
|
|
15
|
+
state, and current checkpoint artifact digests;
|
|
16
|
+
- event/projection cursor lag and failed or interrupted projection jobs;
|
|
17
|
+
- sessions, incidents, circuit state, active-change artifacts, and archive journals;
|
|
18
|
+
- external provider ownership boundaries.
|
|
19
|
+
|
|
20
|
+
An expected blocked workflow is a workflow warning, not DB corruption. A stale or
|
|
21
|
+
missing recorded output is an authority failure for that run. Doctor cannot invent
|
|
22
|
+
evidence, complete a step, accept a failure, approve a baseline, or change product
|
|
23
|
+
scope.
|
|
24
|
+
An awaiting owner decision is also a recoverable warning, not corruption. A missing or
|
|
25
|
+
changed artifact bound to a current confirmed checkpoint is an authority failure;
|
|
26
|
+
doctor may report it but cannot reconstruct the decision or approval.
|
|
27
|
+
|
|
28
|
+
## Route failures
|
|
29
|
+
|
|
30
|
+
- Missing or migrated baseline evidence: `ultra-init` and the exact research step.
|
|
31
|
+
- Stale workflow output: restore or regenerate the artifact from accepted evidence,
|
|
32
|
+
then record the affected step again and re-run completion.
|
|
33
|
+
- Projection lag with healthy authority: eligible for mechanical regeneration.
|
|
34
|
+
- Orphan session: reconcile the recorded lease; do not kill unrelated processes.
|
|
35
|
+
- Missing change artifact: recover from version control, backup, or explicit owner
|
|
36
|
+
decision rather than silently recreating it.
|
|
37
|
+
- Open decision: resume its exact question through `ultra-think`; checkpoint-ready
|
|
38
|
+
state requires owner confirmation, not mechanical repair.
|
|
39
|
+
- Stale decision artifact: restore or update the artifact from accepted authority,
|
|
40
|
+
then reprepare and reconfirm the same checkpoint through `ultra-think`; do not
|
|
41
|
+
rewrite the owner decision or mark the failure healthy mechanically.
|
|
42
|
+
- Corrupt SQLite: preserve DB/WAL/SHM and obtain a restore-or-rebaseline decision.
|
|
43
|
+
|
|
44
|
+
## Explicit project repair
|
|
45
|
+
|
|
46
|
+
After authorization, call `system.doctor` with repair enabled. Repair is limited to
|
|
47
|
+
supported schema upgrades, backup-first archive recovery, orphan reconciliation,
|
|
48
|
+
staleness consumption, projection requeue, and projection regeneration. Verify the
|
|
49
|
+
pre-migration and repair backup paths and rerun the read-only report. A completed repair
|
|
50
|
+
action does not imply healthy workflow evidence.
|
|
51
|
+
|
|
52
|
+
When integrity prevents opening the DB, use only the documented restore or rebaseline
|
|
53
|
+
command with its explicit confirmation token. Both must quarantine or back up prior
|
|
54
|
+
authority and roll back on failure.
|
|
55
|
+
|
|
56
|
+
## Installed host failures
|
|
57
|
+
|
|
58
|
+
For a missing hook adapter or stale plugin path, capture the manifest and missing
|
|
59
|
+
target, run `ubp --doctor` for the actual host, reinstall through the adapter rather
|
|
60
|
+
than patching cache contents, and verify provenance, hashes, entry points, MCP startup,
|
|
61
|
+
and a hook smoke test. Project doctor and installer doctor are separate authorities.
|
|
62
|
+
|
|
63
|
+
Return health first, failing authority checks, workflow warnings, backup/recovery
|
|
64
|
+
paths, whether repair ran, unresolved owners, and one exact next action. Do not edit
|
|
65
|
+
application code or external memory/graph providers through this Skill.
|
|
@@ -1,111 +1,109 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-init
|
|
3
|
-
description: Initialize a new repository, adopt an existing codebase, or
|
|
3
|
+
description: Initialize a new repository, adopt an existing codebase, or migrate prior Ultra authority into a verified project baseline. Use when `.ultra` is absent, initialization is incomplete, baseline readiness is blocked, or a legacy Ultra project must be resumed.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Establish
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
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
|
-
the
|
|
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
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
6
|
+
# Establish project authority
|
|
7
|
+
|
|
8
|
+
Use host reasoning to inspect repository evidence and prepare baseline content. Use
|
|
9
|
+
Ultra MCP for classification records, schema migration, workflow state, evidence
|
|
10
|
+
digests, approval, and convergence. Never treat generated Markdown or JSON as state.
|
|
11
|
+
Read `../ultra-think/references/decision-dialogue.md` before asking about repository
|
|
12
|
+
scope, replacement authority, or another load-bearing owner choice.
|
|
13
|
+
|
|
14
|
+
## Classify without guessing product scope
|
|
15
|
+
|
|
16
|
+
Run `system.doctor` read-only when `.ultra/state.db` exists. Otherwise call
|
|
17
|
+
`task.init_project` with `mode: "auto"`, the repository root, project name, and an
|
|
18
|
+
owner-selected monorepo scope when applicable.
|
|
19
|
+
|
|
20
|
+
Interpret classification independently from readiness:
|
|
21
|
+
|
|
22
|
+
- `greenfield`: no meaningful delivered application behavior exists outside docs,
|
|
23
|
+
generated output, or a starter skeleton;
|
|
24
|
+
- `brownfield`: source, runtime, deployment, API, schema, or test evidence shows an
|
|
25
|
+
existing maintained system;
|
|
26
|
+
- `migrated`: older DB or projection-only authority was preserved and must be
|
|
27
|
+
replaced by an evidence-backed brownfield baseline.
|
|
28
|
+
|
|
29
|
+
The presence of `.ultra/`, a manifest, or a Git repository does not make a baseline
|
|
30
|
+
ready. Classification never chooses an MVP, reduced scope, or delivery posture.
|
|
31
|
+
Report the detected project type, technology signals, verification commands, and
|
|
32
|
+
monorepo roots. Pass an explicit `project_type` or `stack` only when repository evidence
|
|
33
|
+
or an owner decision supports the override; MCP preserves both detection and selection.
|
|
34
|
+
Inspect first and ask only one unresolved scope or replacement decision at a time. Do
|
|
35
|
+
not request a complete project questionnaire during initialization.
|
|
36
|
+
|
|
37
|
+
## Resume safely
|
|
38
|
+
|
|
39
|
+
When `.ultra/` exists, call `task.init_project` with `resume: true`. It must preserve
|
|
40
|
+
existing artifacts, create a pre-migration backup when needed, upgrade the schema,
|
|
41
|
+
install only missing assets, and return the durable workflow ids and exact route.
|
|
42
|
+
|
|
43
|
+
For projection-only state, execute only the backup-first migration command returned by
|
|
44
|
+
the structured error. For a `migrated` compatibility row, call `baseline.start` with a
|
|
45
|
+
new brownfield id and `replace_migrated: true`; never treat migration as owner approval.
|
|
46
|
+
|
|
47
|
+
Replacing a healthy baseline requires a new id plus `replace_ready: true` and explicit
|
|
48
|
+
`replacement_authorization`. Preserve corrupt DB, WAL, SHM, and backups; use the
|
|
49
|
+
documented restore or rebaseline command only after the owner selects that destructive
|
|
50
|
+
recovery path.
|
|
51
|
+
|
|
52
|
+
## Follow durable initialization state
|
|
53
|
+
|
|
54
|
+
Read the returned init and research runs with `workflow.get`.
|
|
55
|
+
|
|
56
|
+
- `inspect-authority`: `task.init_project` records the bounded repository and existing
|
|
57
|
+
Ultra evidence it inspected.
|
|
58
|
+
- `classify-repository`: `task.init_project` records classification, detected signals,
|
|
59
|
+
selected scope, and supported overrides.
|
|
60
|
+
- `scaffold-authority`: `task.init_project` creates or resumes DB authority and installs
|
|
61
|
+
only missing scaffold assets.
|
|
62
|
+
- `establish-baseline`: research completion, `baseline.record`, and owner-approved
|
|
63
|
+
`baseline.converge` establish the evidence-backed authority.
|
|
64
|
+
- `verify-initialization`: convergence re-reads baseline, init, research, repository,
|
|
65
|
+
verification, and output health before completing initialization.
|
|
66
|
+
|
|
67
|
+
The first three steps are deterministic writes owned by `task.init_project`; the final
|
|
68
|
+
two are completed atomically by successful baseline convergence. Do not mark or emulate
|
|
69
|
+
these transitions in Prompt text or projection files.
|
|
70
|
+
|
|
71
|
+
- Greenfield starts a `full` research run.
|
|
72
|
+
- Brownfield starts an `adoption` research run.
|
|
73
|
+
- Both modes require all seventeen research steps before baseline convergence.
|
|
74
|
+
- A migrated project remains routed to re-adoption before research can authorize work.
|
|
75
|
+
|
|
76
|
+
Continue through `ultra-research`. Research completion records output digests; then
|
|
77
|
+
`baseline.record` captures current scope, revision, discovery/product/architecture
|
|
78
|
+
specs, source and runtime evidence, actual verification, unknowns, gaps,
|
|
79
|
+
classification, and external provider metadata references.
|
|
80
|
+
|
|
81
|
+
Call `baseline.converge` only after the compact research checkpoint receives explicit
|
|
82
|
+
owner approval; do not ask for the same approval twice. The MCP rejects missing
|
|
83
|
+
research, missing discovery/product/architecture refs, stale evidence, revision or
|
|
84
|
+
worktree drift, unaccepted known failures, blocking unknowns, and blocking gaps. A
|
|
85
|
+
successful convergence atomically marks the baseline ready and completes the init run.
|
|
86
|
+
|
|
87
|
+
## Recovery
|
|
88
|
+
|
|
89
|
+
- Record deterministic blockers on the current workflow; never create a parallel run.
|
|
90
|
+
- Use `system.doctor` repair only for supported schema, projection, session, incident,
|
|
91
|
+
archive, or legacy workflow-provenance recovery. A recovered legacy change workflow
|
|
92
|
+
remains blocked for real baseline evidence; repair cannot invent research or approve
|
|
93
|
+
a baseline.
|
|
94
|
+
- Treat context budgets as advisory. Missing authority, evidence, output, or approval
|
|
95
|
+
is blocking.
|
|
96
|
+
- Store only references to external memory and code-graph providers.
|
|
96
97
|
|
|
97
98
|
## Completion
|
|
98
99
|
|
|
99
|
-
|
|
100
|
+
Read `baseline.get`, `workflow.get`, and `system.doctor` after convergence. Report
|
|
101
|
+
classification evidence, scope, revision, worktree snapshot, migration backups,
|
|
102
|
+
research run and output health, verification, gaps, approval, and one route.
|
|
100
103
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
Report the target, classification evidence, migration and backup paths, baseline id,
|
|
109
|
-
mode, status, revision, branch, worktree snapshot, verification results, gap summary,
|
|
110
|
-
approval state, and one exact next action. Stop at the approval step when owner consent
|
|
111
|
-
has not yet been provided.
|
|
104
|
+
Initialization is complete only when the baseline is `ready`, the init workflow is
|
|
105
|
+
`completed`, the research workflow is `completed`, and
|
|
106
|
+
`baseline.research_run_id` names that exact research run with healthy outputs. Route
|
|
107
|
+
every newly converged or already initialized baseline through `ultra-change`; planning
|
|
108
|
+
starts only after that command persists a complete Change Contract, profile, and
|
|
109
|
+
research disposition. Otherwise return the exact current workflow step or blocker.
|
|
@@ -89,5 +89,5 @@ items the owner accepted.
|
|
|
89
89
|
Resolve returned blockers through evidence or an owner decision, record the replacement
|
|
90
90
|
snapshot, and retry. Adoption is complete only when `baseline.get` is `ready` and
|
|
91
91
|
current, the gap ledger has no open blocker, and project doctor has no authority
|
|
92
|
-
failure. Route
|
|
93
|
-
|
|
92
|
+
failure. Route all selected work through `ultra-change`, including work described by a
|
|
93
|
+
legacy plan. Import its accepted intent into a current Change Contract before planning.
|
|
@@ -1,89 +1,103 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-plan
|
|
3
|
-
description: Convert a
|
|
3
|
+
description: Convert a ready Ultra baseline or approved active-change delta into dependency-valid, DB-backed execution contracts and fresh-context vertical slices. Use when accepted requirements are ready for implementation planning or an existing plan must be resumed and verified.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
`
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
6
|
+
# Review and persist an executable plan
|
|
7
|
+
|
|
8
|
+
Use host reasoning for decomposition, tradeoffs, and approval. Use Ultra MCP for
|
|
9
|
+
workflow position, decision authority, task contracts, graph validation, projection,
|
|
10
|
+
and recovery. Read `../ultra-think/references/decision-dialogue.md` before presenting a
|
|
11
|
+
planning choice.
|
|
12
|
+
|
|
13
|
+
## Bind authority
|
|
14
|
+
|
|
15
|
+
1. Call `system.doctor`, `baseline.get`, `change.list`, and `change.breadcrumb`.
|
|
16
|
+
2. Require a current ready baseline for new ordinary work. Resume an already-authorized
|
|
17
|
+
active change when appropriate; an incident uses only its recorded break-glass
|
|
18
|
+
authority.
|
|
19
|
+
3. Ensure exactly one active change owns the plan. For initial implementation, open a
|
|
20
|
+
standard or major change from the accepted baseline before creating tasks.
|
|
21
|
+
4. Read `references/semantic-preflight.md`. Resolve every blocking Change decision and
|
|
22
|
+
complete the exact recorded bounded research selection before starting the plan.
|
|
23
|
+
5. Resume the active `plan` workflow from `workflow.list`, or call `workflow.start`
|
|
24
|
+
with its `baseline_id`, `change_id`, subject, and source refs.
|
|
25
|
+
|
|
26
|
+
## Build a candidate before writing authority
|
|
27
|
+
|
|
28
|
+
Inspect requirements, source, consumers, state, tests, deployment, and recovery before
|
|
29
|
+
drafting slices. Build the candidate plan privately. Separate evidence-backed design
|
|
30
|
+
detail from choices that change accepted scope, public behavior, compatibility, cost,
|
|
31
|
+
risk, delivery semantics, or recovery.
|
|
32
|
+
|
|
33
|
+
When a material planning decision remains, start or resume a decision thread bound to
|
|
34
|
+
the plan workflow. Present exactly one decision with the recommendation, credible
|
|
35
|
+
alternatives, and the tasks or contracts it changes, then STOP. The plan document is
|
|
36
|
+
the result of this review; never use a large plan dump as a substitute for interaction.
|
|
37
|
+
|
|
38
|
+
After all blocking choices are resolved, prepare one checkpoint. Present the compact
|
|
39
|
+
topology, public seams, recovery, and material tradeoffs for approval. After approval,
|
|
40
|
+
write the evidence-linked `plan.md`, confirm the checkpoint with its digest, and reuse
|
|
41
|
+
that same approval for the durable `approve-plan` and workflow completion gates.
|
|
42
|
+
|
|
43
|
+
## Record the durable steps
|
|
44
|
+
|
|
45
|
+
Record each completed step with `workflow.step`:
|
|
46
|
+
|
|
47
|
+
1. `validate-baseline`: verify baseline and completed research provenance.
|
|
48
|
+
2. `select-posture`: preserve the owner-approved scope and delivery posture. Never
|
|
49
|
+
infer an MVP, reduction, phase, or exclusion. Ask only when a proposed plan changes
|
|
50
|
+
accepted scope, cost, risk, compatibility, or delivery semantics.
|
|
51
|
+
3. `analyze-requirements`: trace stable requirement ids to acceptance and public seams.
|
|
52
|
+
4. `analyze-codebase`: inspect current entry points, consumers, patterns, state
|
|
53
|
+
authority, tests, deployment, and recovery paths before designing new structure.
|
|
54
|
+
5. `design-slices`: design a walking skeleton and subsequent vertical slices. Every
|
|
55
|
+
slice must reach a real consumer; include validation, side effects, errors,
|
|
56
|
+
documentation, migration, observability, and recovery in the owning slice.
|
|
57
|
+
6. `validate-dependencies`: validate ownership, missing dependencies, cycles, conflict
|
|
58
|
+
surfaces, and meaningful integration checkpoints.
|
|
59
|
+
7. `approve-plan`: persist the already obtained checkpoint approval; do not ask again.
|
|
60
|
+
|
|
61
|
+
## Persist complete task contracts
|
|
62
|
+
|
|
63
|
+
Only after the plan checkpoint is confirmed, call `task.create` for each approved task
|
|
64
|
+
with:
|
|
65
|
+
|
|
66
|
+
- one observable `outcome` and stable `trace_to`;
|
|
67
|
+
- `slice_kind`, `public_seam`, and exact `verification_command`;
|
|
68
|
+
- structured `acceptance` items with their verification;
|
|
69
|
+
- bounded `context_refs` with reasons;
|
|
70
|
+
- resolved `docs_impact` and durable `ownership`;
|
|
71
|
+
- dependencies, affected files when known, estimates only when evidence supports them,
|
|
72
|
+
and the owning `change_id`.
|
|
73
|
+
|
|
74
|
+
Copy each Change acceptance id into at least one task acceptance item without changing
|
|
75
|
+
its meaning. Set `trace_to` to that accepted id, a current research semantic id, or a
|
|
76
|
+
real project-relative Markdown `path#anchor`. A quick profile has exactly one task.
|
|
77
|
+
The MCP derives the coverage matrix and rejects uncovered acceptance, orphan tasks,
|
|
78
|
+
stale research, and oversized quick plans.
|
|
79
|
+
|
|
80
|
+
Never read or write `.ultra/tasks.json` or generated context Markdown as authority.
|
|
81
|
+
The DB owns the task contract and the projector regenerates both views.
|
|
82
|
+
`persist-task-contracts` completes only after `task.get` reads every field back without
|
|
83
|
+
a contract blocker.
|
|
84
|
+
|
|
85
|
+
Call `task.dependency_topo` with the current `change_id`, then call
|
|
86
|
+
`plan.export` with `change_id`, `format: "json"`, and
|
|
87
|
+
`out_path: ".ultra/execution-plan.json"`. Export records `plan_exported`; it does
|
|
88
|
+
not approve the plan. Read the same change back with `plan.get`.
|
|
89
|
+
The exported artifact is change-bound and may not include tasks from another active
|
|
90
|
+
or historical change. Recompile `change.context`
|
|
91
|
+
for the first task; it derives its execution contract and context refs from DB and
|
|
92
|
+
rejects a conflicting prompt override. Missing required refs block readiness; context
|
|
93
|
+
size is advisory.
|
|
94
|
+
|
|
95
|
+
Record `verify-plan` with `.ultra/execution-plan.json` as its sole output, then call
|
|
96
|
+
`workflow.complete` with
|
|
97
|
+
`approval.approved_by` and `approval.approval_note`. Do not send a task summary: MCP
|
|
98
|
+
derives the complete task set from every task owned by the change. Completion
|
|
99
|
+
revalidates every task contract, change ownership, dependency existence, graph cycles,
|
|
100
|
+
the exact exported topology, approval, and current output digests; it also advances
|
|
101
|
+
the linked change workflow to context compilation.
|
|
102
|
+
Return the persisted topology, first task/public seam,
|
|
103
|
+
approval evidence, plan workflow id, and one `ultra-dev` route.
|