ultra-builder-pro-cli 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +44 -1
- package/README.md +34 -19
- package/adapters/_shared/codex-assets.cjs +6 -2
- package/adapters/_shared/file-ops.cjs +6 -2
- 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/docs/AGENT-CONTEXT.md +15 -8
- package/docs/ARCHITECTURE.md +33 -12
- package/docs/PLAN.zh-CN.md +3 -2
- package/docs/ROADMAP.md +8 -4
- package/docs/RUNTIME-COMPAT-MATRIX.md +4 -4
- package/docs/STATE-DB-ACCESS-POLICY.md +27 -25
- package/docs/WORKFLOW-LIFECYCLE.md +266 -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 +550 -85
- package/mcp-server/lib/context-spine.cjs +242 -24
- package/mcp-server/lib/doctor.cjs +33 -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 +6 -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 +145 -8
- package/mcp-server/lib/state-ops.cjs +160 -9
- package/mcp-server/lib/workflow-state.cjs +2292 -0
- package/mcp-server/server.cjs +161 -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 +53 -68
- package/skills/ultra-change/references/change-contract.md +36 -0
- package/skills/ultra-deliver/SKILL.md +69 -79
- package/skills/ultra-deliver/references/baseline-reconciliation.md +20 -0
- package/skills/ultra-dev/SKILL.md +54 -59
- package/skills/ultra-doctor/SKILL.md +40 -71
- package/skills/ultra-init/SKILL.md +96 -103
- package/skills/ultra-init/references/brownfield-adoption.md +2 -2
- package/skills/ultra-plan/SKILL.md +79 -85
- package/skills/ultra-plan/references/semantic-preflight.md +18 -0
- package/skills/ultra-research/SKILL.md +87 -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 +57 -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 -45
- package/skills/ultra-test/SKILL.md +48 -55
- 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 +7 -2
- package/spec/mcp-tools.yaml +384 -63
- 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 +82 -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 +213 -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,111 +1,104 @@
|
|
|
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
|
-
|
|
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
|
-
run `ultra-tools system rebaseline --project-name <name> [--scope <path>] --confirm
|
|
93
|
-
REBASELINE_CORRUPT_ULTRA_STATE`; verify the quarantined database and legacy
|
|
94
|
-
projection paths before continuing adoption.
|
|
95
|
-
- `IO_ERROR`: verify rollback restoration and preserve every reported backup path.
|
|
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
|
+
|
|
12
|
+
## Classify without guessing product scope
|
|
13
|
+
|
|
14
|
+
Run `system.doctor` read-only when `.ultra/state.db` exists. Otherwise call
|
|
15
|
+
`task.init_project` with `mode: "auto"`, the repository root, project name, and an
|
|
16
|
+
owner-selected monorepo scope when applicable.
|
|
17
|
+
|
|
18
|
+
Interpret classification independently from readiness:
|
|
19
|
+
|
|
20
|
+
- `greenfield`: no meaningful delivered application behavior exists outside docs,
|
|
21
|
+
generated output, or a starter skeleton;
|
|
22
|
+
- `brownfield`: source, runtime, deployment, API, schema, or test evidence shows an
|
|
23
|
+
existing maintained system;
|
|
24
|
+
- `migrated`: older DB or projection-only authority was preserved and must be
|
|
25
|
+
replaced by an evidence-backed brownfield baseline.
|
|
26
|
+
|
|
27
|
+
The presence of `.ultra/`, a manifest, or a Git repository does not make a baseline
|
|
28
|
+
ready. Classification never chooses an MVP, reduced scope, or delivery posture.
|
|
29
|
+
Report the detected project type, technology signals, verification commands, and
|
|
30
|
+
monorepo roots. Pass an explicit `project_type` or `stack` only when repository evidence
|
|
31
|
+
or an owner decision supports the override; MCP preserves both detection and selection.
|
|
32
|
+
|
|
33
|
+
## Resume safely
|
|
34
|
+
|
|
35
|
+
When `.ultra/` exists, call `task.init_project` with `resume: true`. It must preserve
|
|
36
|
+
existing artifacts, create a pre-migration backup when needed, upgrade the schema,
|
|
37
|
+
install only missing assets, and return the durable workflow ids and exact route.
|
|
38
|
+
|
|
39
|
+
For projection-only state, execute only the backup-first migration command returned by
|
|
40
|
+
the structured error. For a `migrated` compatibility row, call `baseline.start` with a
|
|
41
|
+
new brownfield id and `replace_migrated: true`; never treat migration as owner approval.
|
|
42
|
+
|
|
43
|
+
Replacing a healthy baseline requires a new id plus `replace_ready: true` and explicit
|
|
44
|
+
`replacement_authorization`. Preserve corrupt DB, WAL, SHM, and backups; use the
|
|
45
|
+
documented restore or rebaseline command only after the owner selects that destructive
|
|
46
|
+
recovery path.
|
|
47
|
+
|
|
48
|
+
## Follow durable initialization state
|
|
49
|
+
|
|
50
|
+
Read the returned init and research runs with `workflow.get`.
|
|
51
|
+
|
|
52
|
+
- `inspect-authority`: `task.init_project` records the bounded repository and existing
|
|
53
|
+
Ultra evidence it inspected.
|
|
54
|
+
- `classify-repository`: `task.init_project` records classification, detected signals,
|
|
55
|
+
selected scope, and supported overrides.
|
|
56
|
+
- `scaffold-authority`: `task.init_project` creates or resumes DB authority and installs
|
|
57
|
+
only missing scaffold assets.
|
|
58
|
+
- `establish-baseline`: research completion, `baseline.record`, and owner-approved
|
|
59
|
+
`baseline.converge` establish the evidence-backed authority.
|
|
60
|
+
- `verify-initialization`: convergence re-reads baseline, init, research, repository,
|
|
61
|
+
verification, and output health before completing initialization.
|
|
62
|
+
|
|
63
|
+
The first three steps are deterministic writes owned by `task.init_project`; the final
|
|
64
|
+
two are completed atomically by successful baseline convergence. Do not mark or emulate
|
|
65
|
+
these transitions in Prompt text or projection files.
|
|
66
|
+
|
|
67
|
+
- Greenfield starts a `full` research run.
|
|
68
|
+
- Brownfield starts an `adoption` research run.
|
|
69
|
+
- Both modes require all seventeen research steps before baseline convergence.
|
|
70
|
+
- A migrated project remains routed to re-adoption before research can authorize work.
|
|
71
|
+
|
|
72
|
+
Continue through `ultra-research`. Research completion records output digests; then
|
|
73
|
+
`baseline.record` captures current scope, revision, discovery/product/architecture
|
|
74
|
+
specs, source and runtime evidence, actual verification, unknowns, gaps,
|
|
75
|
+
classification, and external provider metadata references.
|
|
76
|
+
|
|
77
|
+
Call `baseline.converge` only after explicit owner approval. The MCP rejects missing
|
|
78
|
+
research, missing discovery/product/architecture refs, stale evidence, revision or
|
|
79
|
+
worktree drift, unaccepted known failures, blocking unknowns, and blocking gaps. A
|
|
80
|
+
successful convergence atomically marks the baseline ready and completes the init run.
|
|
81
|
+
|
|
82
|
+
## Recovery
|
|
83
|
+
|
|
84
|
+
- Record deterministic blockers on the current workflow; never create a parallel run.
|
|
85
|
+
- Use `system.doctor` repair only for supported schema, projection, session, incident,
|
|
86
|
+
archive, or legacy workflow-provenance recovery. A recovered legacy change workflow
|
|
87
|
+
remains blocked for real baseline evidence; repair cannot invent research or approve
|
|
88
|
+
a baseline.
|
|
89
|
+
- Treat context budgets as advisory. Missing authority, evidence, output, or approval
|
|
90
|
+
is blocking.
|
|
91
|
+
- Store only references to external memory and code-graph providers.
|
|
96
92
|
|
|
97
93
|
## Completion
|
|
98
94
|
|
|
99
|
-
|
|
95
|
+
Read `baseline.get`, `workflow.get`, and `system.doctor` after convergence. Report
|
|
96
|
+
classification evidence, scope, revision, worktree snapshot, migration backups,
|
|
97
|
+
research run and output health, verification, gaps, approval, and one route.
|
|
100
98
|
|
|
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.
|
|
99
|
+
Initialization is complete only when the baseline is `ready`, the init workflow is
|
|
100
|
+
`completed`, the research workflow is `completed`, and
|
|
101
|
+
`baseline.research_run_id` names that exact research run with healthy outputs. Route
|
|
102
|
+
every newly converged or already initialized baseline through `ultra-change`; planning
|
|
103
|
+
starts only after that command persists a complete Change Contract, profile, and
|
|
104
|
+
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,83 @@
|
|
|
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
|
-
## Completion gate
|
|
86
|
-
|
|
87
|
-
Planning is complete only when the DAG is valid, each task reaches a public seam, each
|
|
88
|
-
verification command is executable, every change-linked context is ready, and no
|
|
89
|
-
required documentation or decision remains unknown.
|
|
6
|
+
# Persist an executable plan
|
|
7
|
+
|
|
8
|
+
Use host reasoning for decomposition, tradeoffs, and approval. Use Ultra MCP for
|
|
9
|
+
workflow position, task contracts, graph validation, projection, and recovery.
|
|
10
|
+
|
|
11
|
+
## Bind authority
|
|
12
|
+
|
|
13
|
+
1. Call `system.doctor`, `baseline.get`, `change.list`, and `change.breadcrumb`.
|
|
14
|
+
2. Require a current ready baseline for new ordinary work. Resume an already-authorized
|
|
15
|
+
active change when appropriate; an incident uses only its recorded break-glass
|
|
16
|
+
authority.
|
|
17
|
+
3. Ensure exactly one active change owns the plan. For initial implementation, open a
|
|
18
|
+
standard or major change from the accepted baseline before creating tasks.
|
|
19
|
+
4. Read `references/semantic-preflight.md`. Resolve every blocking Change decision and
|
|
20
|
+
complete the exact recorded bounded research selection before starting the plan.
|
|
21
|
+
5. Resume the active `plan` workflow from `workflow.list`, or call `workflow.start`
|
|
22
|
+
with its `baseline_id`, `change_id`, subject, and source refs.
|
|
23
|
+
|
|
24
|
+
## Plan through the durable steps
|
|
25
|
+
|
|
26
|
+
Record each completed step with `workflow.step`:
|
|
27
|
+
|
|
28
|
+
1. `validate-baseline`: verify baseline and completed research provenance.
|
|
29
|
+
2. `select-posture`: preserve the owner-approved scope and delivery posture. Never
|
|
30
|
+
infer an MVP, reduction, phase, or exclusion. Ask only when a proposed plan changes
|
|
31
|
+
accepted scope, cost, risk, compatibility, or delivery semantics.
|
|
32
|
+
3. `analyze-requirements`: trace stable requirement ids to acceptance and public seams.
|
|
33
|
+
4. `analyze-codebase`: inspect current entry points, consumers, patterns, state
|
|
34
|
+
authority, tests, deployment, and recovery paths before designing new structure.
|
|
35
|
+
5. `design-slices`: design a walking skeleton and subsequent vertical slices. Every
|
|
36
|
+
slice must reach a real consumer; include validation, side effects, errors,
|
|
37
|
+
documentation, migration, observability, and recovery in the owning slice.
|
|
38
|
+
6. `validate-dependencies`: validate ownership, missing dependencies, cycles, conflict
|
|
39
|
+
surfaces, and meaningful integration checkpoints.
|
|
40
|
+
7. `approve-plan`: persist owner approval when the plan makes a material decision.
|
|
41
|
+
|
|
42
|
+
## Persist complete task contracts
|
|
43
|
+
|
|
44
|
+
Call `task.create` for each approved task with:
|
|
45
|
+
|
|
46
|
+
- one observable `outcome` and stable `trace_to`;
|
|
47
|
+
- `slice_kind`, `public_seam`, and exact `verification_command`;
|
|
48
|
+
- structured `acceptance` items with their verification;
|
|
49
|
+
- bounded `context_refs` with reasons;
|
|
50
|
+
- resolved `docs_impact` and durable `ownership`;
|
|
51
|
+
- dependencies, affected files when known, estimates only when evidence supports them,
|
|
52
|
+
and the owning `change_id`.
|
|
53
|
+
|
|
54
|
+
Copy each Change acceptance id into at least one task acceptance item without changing
|
|
55
|
+
its meaning. Set `trace_to` to that accepted id, a current research semantic id, or a
|
|
56
|
+
real project-relative Markdown `path#anchor`. A quick profile has exactly one task.
|
|
57
|
+
The MCP derives the coverage matrix and rejects uncovered acceptance, orphan tasks,
|
|
58
|
+
stale research, and oversized quick plans.
|
|
59
|
+
|
|
60
|
+
Never read or write `.ultra/tasks.json` or generated context Markdown as authority.
|
|
61
|
+
The DB owns the task contract and the projector regenerates both views.
|
|
62
|
+
`persist-task-contracts` completes only after `task.get` reads every field back without
|
|
63
|
+
a contract blocker.
|
|
64
|
+
|
|
65
|
+
Call `task.dependency_topo` with the current `change_id`, then call
|
|
66
|
+
`plan.export` with `change_id`, `format: "json"`, and
|
|
67
|
+
`out_path: ".ultra/execution-plan.json"`. Export records `plan_exported`; it does
|
|
68
|
+
not approve the plan. Read the same change back with `plan.get`.
|
|
69
|
+
The exported artifact is change-bound and may not include tasks from another active
|
|
70
|
+
or historical change. Recompile `change.context`
|
|
71
|
+
for the first task; it derives its execution contract and context refs from DB and
|
|
72
|
+
rejects a conflicting prompt override. Missing required refs block readiness; context
|
|
73
|
+
size is advisory.
|
|
74
|
+
|
|
75
|
+
Record `verify-plan` with `.ultra/execution-plan.json` as its sole output, then call
|
|
76
|
+
`workflow.complete` with
|
|
77
|
+
`approval.approved_by` and `approval.approval_note`. Do not send a task summary: MCP
|
|
78
|
+
derives the complete task set from every task owned by the change. Completion
|
|
79
|
+
revalidates every task contract, change ownership, dependency existence, graph cycles,
|
|
80
|
+
the exact exported topology, approval, and current output digests; it also advances
|
|
81
|
+
the linked change workflow to context compilation.
|
|
82
|
+
Return the persisted topology, first task/public seam,
|
|
83
|
+
approval evidence, plan workflow id, and one `ultra-dev` route.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Semantic planning preflight
|
|
2
|
+
|
|
3
|
+
Before task decomposition, read the normalized Change Contract and the current
|
|
4
|
+
change-bound research records.
|
|
5
|
+
|
|
6
|
+
1. Resolve every blocking `unresolved_decision` or return to `ultra-change`.
|
|
7
|
+
2. When research is recorded, verify one completed run has the same mode and selected
|
|
8
|
+
step set. Re-run stale or missing evidence through `ultra-research`.
|
|
9
|
+
3. Build a coverage ledger from Change acceptance ids to task acceptance ids.
|
|
10
|
+
4. Bind every task to an accepted id, semantic record id, semantic source ref, or real
|
|
11
|
+
Markdown anchor through `trace_to`.
|
|
12
|
+
5. Check that every task reaches a public consumer and owns its error, documentation,
|
|
13
|
+
verification, and recovery obligations.
|
|
14
|
+
6. Validate dependencies and ensure a quick profile contains exactly one task.
|
|
15
|
+
|
|
16
|
+
Treat the MCP completion result as the final planning gate. It derives the coverage
|
|
17
|
+
matrix from durable records and rejects unresolved decisions, missing research,
|
|
18
|
+
uncovered acceptance, orphan tasks, incomplete contracts, or invalid topology.
|
|
@@ -1,75 +1,102 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-research
|
|
3
|
-
description:
|
|
3
|
+
description: Establish or extend an evidence-backed Ultra product and architecture baseline through the complete semantic research workflow, with resumable step state and traceable outputs. Use when initialization routes to research, baseline evidence is incomplete, or the owner explicitly requests bounded research for an active change.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Establish research authority
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Use host reasoning for evidence gathering, product judgment, questions, and artifact
|
|
9
|
+
content. Use Ultra MCP for run selection, state transitions, output digests, blockers,
|
|
10
|
+
and baseline convergence. Never ask MCP to generate research content.
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
+
## Bind the run
|
|
12
13
|
|
|
13
|
-
1.
|
|
14
|
-
`ultra-init`
|
|
15
|
-
2.
|
|
16
|
-
|
|
17
|
-
3.
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
- quality and delivery: `references/quality-delivery.md`;
|
|
23
|
-
- final traceability: `references/synthesis.md`.
|
|
14
|
+
1. Call `baseline.get`. Route absent, migrated, unreadable, or corrupt authority to
|
|
15
|
+
`ultra-init` or `ultra-doctor` as reported.
|
|
16
|
+
2. Call `workflow.list` for `kind: "research"` and the bound baseline or change. Resume
|
|
17
|
+
the active, blocked, or ready run; use `workflow.get` before doing more work.
|
|
18
|
+
3. When no run exists:
|
|
19
|
+
- start `full` for an initial greenfield baseline;
|
|
20
|
+
- start `adoption` for a brownfield baseline;
|
|
21
|
+
- use `product`, `feature`, `architecture`, or `custom` only when the owner
|
|
22
|
+
explicitly selected that bounded scope for an active change.
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
Never infer an MVP, reduced product posture, skipped step, or release phase. Full and
|
|
25
|
+
adoption modes execute all seventeen semantic steps. A custom run records every
|
|
26
|
+
excluded step and its selection reason in DB.
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Execute one recoverable step at a time
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
- Browse only when a claim is external, unstable, or requires primary-source support.
|
|
32
|
-
- Prefer official and primary sources; cite each consequential external claim near the
|
|
33
|
-
statement it supports.
|
|
34
|
-
- Separate observed facts, evidence-backed inferences, user decisions, and unresolved
|
|
35
|
-
assumptions.
|
|
36
|
-
- Do not manufacture confidence percentages, market numbers, personas, competitors,
|
|
37
|
-
or options when evidence does not support them.
|
|
30
|
+
Read only the reference matching `workflow.next_step.step_id`:
|
|
38
31
|
|
|
39
|
-
|
|
32
|
+
| Step | Reference |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `00-problem-validation` | `references/00-problem-validation.md` |
|
|
35
|
+
| `01-opportunity-discovery` | `references/01-opportunity-discovery.md` |
|
|
36
|
+
| `02-market-assessment` | `references/02-market-assessment.md` |
|
|
37
|
+
| `03-competitive-landscape` | `references/03-competitive-landscape.md` |
|
|
38
|
+
| `04-product-strategy` | `references/04-product-strategy.md` |
|
|
39
|
+
| `05-assumptions-validation` | `references/05-assumptions-validation.md` |
|
|
40
|
+
| `10-user-personas` | `references/10-user-personas.md` |
|
|
41
|
+
| `11-user-scenarios` | `references/11-user-scenarios.md` |
|
|
42
|
+
| `20-user-stories` | `references/20-user-stories.md` |
|
|
43
|
+
| `21-features-scope` | `references/21-features-scope.md` |
|
|
44
|
+
| `22-success-metrics` | `references/22-success-metrics.md` |
|
|
45
|
+
| `30-architecture-context` | `references/30-architecture-context.md` |
|
|
46
|
+
| `31-solution-strategy` | `references/31-solution-strategy.md` |
|
|
47
|
+
| `32-building-blocks` | `references/32-building-blocks.md` |
|
|
48
|
+
| `40-deployment` | `references/40-deployment.md` |
|
|
49
|
+
| `41-quality-risks` | `references/41-quality-risks.md` |
|
|
50
|
+
| `99-synthesis` | `references/99-synthesis.md` |
|
|
40
51
|
|
|
41
|
-
|
|
42
|
-
unlock.
|
|
43
|
-
2. Gather evidence before recommending a direction. Ask one concise question when a
|
|
44
|
-
user decision is load-bearing; batch independent low-impact questions only when it
|
|
45
|
-
improves flow.
|
|
46
|
-
3. Present material tradeoffs before recording a decision. Comparisons are appropriate
|
|
47
|
-
only when real alternatives share meaningful criteria.
|
|
48
|
-
4. Update the relevant baseline specification sections. Preserve source links,
|
|
49
|
-
decisions, rejected alternatives when useful, acceptance criteria, and explicit
|
|
50
|
-
open questions. Do not duplicate the same narrative across several files.
|
|
51
|
-
5. Validate cross-document consistency and trace each required behavior from problem
|
|
52
|
-
or constraint to acceptance and architecture.
|
|
53
|
-
6. Use `references/synthesis.md` for the completion check.
|
|
54
|
-
7. Record unresolved evidence as the baseline gap ledger: `baseline_blocker`,
|
|
55
|
-
`documentation_drift`, `known_defect`, `technical_debt`, `unknown`, or
|
|
56
|
-
`future_change`. Keep accepted non-blocking work out of the implementation backlog
|
|
57
|
-
until the owner selects it.
|
|
58
|
-
8. Call `baseline.record` with the complete current specification list, bounded evidence
|
|
59
|
-
references, actual verification results, provider metadata, explicit unknowns,
|
|
60
|
-
classification, and the full gap ledger. Use the returned repository revision for
|
|
61
|
-
convergence.
|
|
62
|
-
9. Present the baseline, open gaps, dirty-worktree state, and any known-red verification
|
|
63
|
-
to the owner. After explicit approval, call `baseline.converge`, setting acceptance
|
|
64
|
-
flags only for the exact known-red or dirty snapshot approved by the owner. Resolve
|
|
65
|
-
deterministic blockers before routing.
|
|
52
|
+
For each selected step:
|
|
66
53
|
|
|
67
|
-
|
|
54
|
+
1. Inspect current repository and specification evidence before asking the owner to
|
|
55
|
+
repeat known facts. Browse only for unstable or external claims, using primary
|
|
56
|
+
sources where possible.
|
|
57
|
+
2. Separate `Observed`, `Verified`, `Decided`, and `Unknown`. Ask one concise question
|
|
58
|
+
only when the answer changes scope, product intent, security, cost, or another
|
|
59
|
+
load-bearing decision.
|
|
60
|
+
3. Update the relevant baseline specification or active change research artifact.
|
|
61
|
+
Preserve citations, decisions, drift, and unresolved gaps without duplicating prose.
|
|
62
|
+
4. Write one immutable step report at
|
|
63
|
+
`.ultra/docs/research/<workflow-id>/<step-id>.md`. It must have a title and the
|
|
64
|
+
sections `Evidence`, `Specification updates`, and `Decisions and unknowns`. Link
|
|
65
|
+
specification anchors and external sources; do not copy transcripts or provider
|
|
66
|
+
payloads.
|
|
67
|
+
5. Call `workflow.step` with `completed`, bounded evidence references, that step report
|
|
68
|
+
as `research-step-report`, material decisions, and one or more `semantic_records`.
|
|
69
|
+
Each record has a stable `id`, the step-specific `kind` and `attributes` named in
|
|
70
|
+
its reference, a status (`observed`, `verified`, `decided`, `accepted`, `unknown`,
|
|
71
|
+
or `not_applicable`), a concise summary, evidence refs, optional typed links, and a
|
|
72
|
+
project-relative `source_ref` using `path#anchor`. Use the immutable step report as
|
|
73
|
+
the source when later edits could change a shared specification. MCP verifies the
|
|
74
|
+
anchor and stores its digest; `not_applicable` requires an evidence-backed rationale.
|
|
75
|
+
6. For `99-synthesis` in `full` or `adoption` mode, also bind the current
|
|
76
|
+
`discovery.md`, `product.md`, `architecture.md`, and `research-distillate.md` as
|
|
77
|
+
outputs. This freezes the exact researched baseline without making the reports a
|
|
78
|
+
second specification authority.
|
|
79
|
+
7. If evidence or owner authority is missing, call `workflow.step` with `blocked` and
|
|
80
|
+
specific blocker codes. Resume that same step after resolution; never skip a
|
|
81
|
+
required step to obtain a ready state.
|
|
68
82
|
|
|
69
|
-
|
|
70
|
-
material decision is recorded, required acceptance is testable, architecture respects
|
|
71
|
-
known constraints, and unresolved items are either blocking or explicitly outside the
|
|
72
|
-
accepted scope.
|
|
83
|
+
## Converge
|
|
73
84
|
|
|
74
|
-
|
|
75
|
-
|
|
85
|
+
When all selected steps are ready, call `workflow.complete` and read the completed run
|
|
86
|
+
back. Missing or stale output blocks completion.
|
|
87
|
+
|
|
88
|
+
For initial or adoption research, call `baseline.record` with discovery, product, and
|
|
89
|
+
architecture specification refs; current repository revision and scope; bounded source,
|
|
90
|
+
docs, runtime, test, deployment, and external evidence; actual verification commands
|
|
91
|
+
and results; unknowns; the complete gap ledger; classification; and external provider
|
|
92
|
+
metadata references. Do not store prompts, transcripts, memory, or graph content.
|
|
93
|
+
|
|
94
|
+
Present the recorded revision, worktree snapshot, known failures, blockers, and gaps.
|
|
95
|
+
Only after explicit owner approval call `baseline.converge`. Accept known-red or a
|
|
96
|
+
dirty worktree only when that exact snapshot was approved. Convergence must verify the
|
|
97
|
+
completed full/adoption research run and current output digests.
|
|
98
|
+
|
|
99
|
+
Return the workflow id, all seventeen step-report paths for full/adoption research,
|
|
100
|
+
the four synthesis artifacts, baseline status, open gaps, approval state, and one exact
|
|
101
|
+
next route. A ready initial baseline routes to `ultra-change`; bounded change research
|
|
102
|
+
returns to its change breadcrumb and then `ultra-plan` when the research gate is ready.
|