ultra-builder-pro-cli 0.23.0 → 0.24.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 +4 -4
- package/CHANGELOG.md +45 -0
- package/README.md +21 -18
- package/adapters/_shared/codex-assets.cjs +121 -65
- package/adapters/_shared/interaction-contract.cjs +7 -1
- package/adapters/_shared/provenance.cjs +7 -2
- package/adapters/_shared/runtime-assets.cjs +3 -2
- package/adapters/_shared/runtime-native.cjs +132 -0
- package/adapters/claude.js +60 -30
- package/adapters/codex.js +178 -81
- package/adapters/grok.js +372 -0
- package/adapters/kimi.js +7 -3
- package/adapters/opencode.js +210 -32
- package/agents/code-reviewer.md +4 -2
- package/agents/debugger.md +4 -1
- package/agents/review-code.md +7 -3
- package/agents/review-comments.md +7 -4
- package/agents/review-coordinator.md +11 -7
- package/agents/review-design.md +8 -4
- package/agents/review-errors.md +8 -4
- package/agents/review-spec.md +8 -5
- package/agents/review-tests.md +7 -4
- package/agents/tdd-runner.md +5 -2
- package/bin/install.js +9 -4
- package/bin/orchestrator.js +4 -13
- package/docs/AGENT-CONTEXT.md +141 -229
- package/docs/ARCHITECTURE.md +203 -494
- package/docs/ARTIFACT-AUTHORITY.md +26 -22
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +12 -9
- package/docs/ROADMAP.md +85 -110
- package/docs/RUNTIME-COMPAT-MATRIX.md +139 -175
- package/docs/SKILL-AUTHORING.md +3 -3
- package/docs/STATE-DB-ACCESS-POLICY.md +13 -8
- package/docs/WORKFLOW-LIFECYCLE.md +174 -448
- package/hooks/README.md +11 -8
- package/hooks/active_task_context.py +16 -16
- package/hooks/adapters/grok.py +134 -0
- package/hooks/{context_spine.py → context_envelope.py} +26 -22
- package/hooks/health_check.py +19 -29
- package/hooks/pre_stop_check.py +22 -12
- package/hooks/subagent_tracker.py +1 -1
- package/hooks/workflow_checkpoint.py +14 -13
- package/hooks/workflow_context.py +11 -12
- package/hooks/workflow_resume.py +14 -13
- package/mcp-server/{breadcrumb.cjs → hook-context.cjs} +7 -9
- package/mcp-server/lib/baseline-workflow.cjs +36 -38
- package/mcp-server/lib/canonical-json.cjs +19 -0
- package/mcp-server/lib/change-workflow.cjs +596 -44
- package/mcp-server/lib/context-envelope.cjs +508 -0
- package/mcp-server/lib/decision-records.cjs +337 -0
- package/mcp-server/lib/doctor.cjs +91 -33
- package/mcp-server/lib/init-project.cjs +78 -39
- package/mcp-server/lib/managed-file-write.cjs +116 -0
- package/mcp-server/lib/plan-checkpoint.cjs +177 -0
- package/mcp-server/lib/project-context.cjs +178 -0
- package/mcp-server/lib/stage-checkpoints.cjs +309 -0
- package/mcp-server/lib/state-db.cjs +155 -24
- package/mcp-server/lib/task-ledger.cjs +522 -13
- package/mcp-server/lib/ultra-facade.cjs +630 -442
- package/mcp-server/lib/worker-packet.cjs +358 -0
- package/mcp-server/server.cjs +200 -1103
- package/orchestrator/daemon.cjs +27 -9
- package/orchestrator/parallel-orchestrator.cjs +111 -76
- package/orchestrator/session-runner.cjs +135 -34
- package/package.json +10 -3
- package/skills/ultra-change/SKILL.md +9 -8
- package/skills/ultra-deliver/SKILL.md +3 -3
- package/skills/ultra-dev/SKILL.md +18 -11
- package/skills/ultra-doctor/SKILL.md +2 -2
- package/skills/ultra-init/SKILL.md +6 -5
- package/skills/ultra-init/references/brownfield-adoption.md +11 -8
- package/skills/ultra-plan/SKILL.md +10 -8
- package/skills/ultra-research/SKILL.md +12 -7
- package/skills/ultra-review/SKILL.md +9 -6
- package/skills/ultra-review/references/unified-schema.md +2 -0
- package/skills/ultra-review/scripts/review_wait.py +8 -0
- package/skills/ultra-status/SKILL.md +2 -2
- package/skills/ultra-test/SKILL.md +4 -2
- package/skills/ultra-think/SKILL.md +7 -7
- package/skills/ultra-think/references/interaction-boundary.md +56 -0
- package/spec/cli-protocol.md +80 -199
- package/spec/mcp-tools.yaml +37 -2804
- package/spec/schemas/state-db.sql +107 -4
- package/spec/schemas/{task-ledger.v1.schema.json → task-ledger.v2.schema.json} +70 -6
- package/ultra-tools/commands/status.cjs +369 -243
- package/mcp-server/lib/context-spine.cjs +0 -1208
- package/mcp-server/lib/decision-dialogue.cjs +0 -1128
- package/mcp-server/lib/project-breadcrumb.cjs +0 -173
- package/mcp-server/lib/spec-learning.cjs +0 -284
- package/mcp-server/lib/workflow-state.cjs +0 -3129
- package/skills/ultra-think/references/decision-dialogue.md +0 -155
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultra-builder-pro-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Explicitly invoked Ultra Builder Pro workflows for Claude Code, OpenCode, Codex CLI,
|
|
3
|
+
"version": "0.24.0",
|
|
4
|
+
"description": "Explicitly invoked Ultra Builder Pro workflows for Claude Code, OpenCode, Codex CLI, Kimi Code, and Grok Build, with a project-local MCP persistence and safety kernel.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ultra-builder-pro-cli": "bin/install.js",
|
|
7
7
|
"ubp": "bin/install.js",
|
|
@@ -61,13 +61,19 @@
|
|
|
61
61
|
"!**/*.pyo",
|
|
62
62
|
"!**/*.test.cjs",
|
|
63
63
|
"!**/tests/**",
|
|
64
|
-
"!mcp-server/test-support/**"
|
|
64
|
+
"!mcp-server/test-support/**",
|
|
65
|
+
"!mcp-server/lib/workflow-state.cjs",
|
|
66
|
+
"!mcp-server/lib/decision-dialogue.cjs",
|
|
67
|
+
"!mcp-server/lib/context-spine.cjs",
|
|
68
|
+
"!mcp-server/lib/project-breadcrumb.cjs",
|
|
69
|
+
"!mcp-server/lib/spec-learning.cjs"
|
|
65
70
|
],
|
|
66
71
|
"keywords": [
|
|
67
72
|
"claude-code",
|
|
68
73
|
"opencode",
|
|
69
74
|
"codex",
|
|
70
75
|
"kimi-code",
|
|
76
|
+
"grok-build",
|
|
71
77
|
"agent",
|
|
72
78
|
"cli",
|
|
73
79
|
"multi-runtime",
|
|
@@ -101,6 +107,7 @@
|
|
|
101
107
|
"prepublishOnly": "npm run verify:release",
|
|
102
108
|
"install:claude": "node bin/install.js --claude --local",
|
|
103
109
|
"install:kimi": "node bin/install.js --kimi --local",
|
|
110
|
+
"install:grok": "node bin/install.js --grok --local",
|
|
104
111
|
"install:all": "node bin/install.js --all --local"
|
|
105
112
|
},
|
|
106
113
|
"dependencies": {
|
|
@@ -22,24 +22,25 @@ checkpoint accepts the downstream authority.
|
|
|
22
22
|
a choice changes accepted product intent, compatibility, security, material cost,
|
|
23
23
|
external effects, or recovery.
|
|
24
24
|
|
|
25
|
-
Read `../ultra-think/references/
|
|
25
|
+
Read `../ultra-think/references/interaction-boundary.md` before asking. MCP may report
|
|
26
26
|
contradictory risk fields, but the model and owner choose the semantic correction.
|
|
27
27
|
|
|
28
28
|
## Record the contract
|
|
29
29
|
|
|
30
|
-
Use one `ultra.record` batch
|
|
31
|
-
`
|
|
32
|
-
a stable idempotency key. Read the
|
|
30
|
+
Use one `ultra.record` batch with `change_contract / open` or
|
|
31
|
+
`change_contract / revise`, relevant `decision / accept`, and `artifact / bind` for
|
|
32
|
+
an already-known typed delta. Every entry carries a stable idempotency key. Read the
|
|
33
|
+
result through `ultra.context`.
|
|
33
34
|
|
|
34
35
|
Keep every Change-owned semantic artifact below
|
|
35
36
|
`.ultra/changes/active/<change-id>/`. Standard and major Changes require a typed delta
|
|
36
37
|
before planning. A true no-semantic-change case records an explicit reason instead of
|
|
37
38
|
manufacturing a mutation.
|
|
38
39
|
|
|
39
|
-
Changing accepted intent
|
|
40
|
-
stale.
|
|
41
|
-
repair and retry the same draft.
|
|
42
|
-
|
|
40
|
+
Changing accepted intent creates a new accepted checkpoint revision and makes only
|
|
41
|
+
genuinely dependent evidence stale. Readiness is derived, not a stored absorbing
|
|
42
|
+
state. A semantic rejection returns diagnostics; repair and retry the same draft.
|
|
43
|
+
Use `change_contract / cancel` only when the owner intentionally abandons the Change.
|
|
43
44
|
|
|
44
45
|
Publish the durable Change contract with `ultra.sync { action: publish }` when it is a
|
|
45
46
|
useful team handoff. Recommend bounded `ultra-research` for a real evidence gap or
|
|
@@ -21,8 +21,8 @@ publication, deployment, or another external effect.
|
|
|
21
21
|
worktree/context digests, local checks, rollback guidance, and timestamp; it contains
|
|
22
22
|
no release decision.
|
|
23
23
|
|
|
24
|
-
Use one `ultra.record` batch for
|
|
25
|
-
|
|
24
|
+
Use one typed `ultra.record` batch for `artifact / bind`, any normalized
|
|
25
|
+
`decision / accept`, and bounded `event / append` facts.
|
|
26
26
|
|
|
27
27
|
## Archive once
|
|
28
28
|
|
|
@@ -35,7 +35,7 @@ internally:
|
|
|
35
35
|
- derives convergence from current dev, test, review, delta, docs, and checkout;
|
|
36
36
|
- applies the overlay and archive through the recoverable filesystem/DB transaction;
|
|
37
37
|
- rebinds registered artifacts into a self-contained archive;
|
|
38
|
-
-
|
|
38
|
+
- accepts one immutable delivery checkpoint revision;
|
|
39
39
|
- publishes the updated team checkpoint.
|
|
40
40
|
|
|
41
41
|
A semantic rejection returns mutable blockers. Repair the same packet and retry. A
|
|
@@ -5,17 +5,21 @@ description: Implement one authoritative Ultra task through a fresh-context, tes
|
|
|
5
5
|
|
|
6
6
|
# Implement one task
|
|
7
7
|
|
|
8
|
-
The model owns code reasoning and edits. Ultra owns the durable task contract,
|
|
9
|
-
Context
|
|
8
|
+
The model owns code reasoning and edits. Ultra owns the durable task contract,
|
|
9
|
+
canonical Context Envelope, execution lease, immutable Worker Packet, evidence
|
|
10
|
+
references, and checkpoint.
|
|
10
11
|
|
|
11
12
|
## Bind execution
|
|
12
13
|
|
|
13
14
|
1. Call `ultra.context { stage: dev, scope: { change_id, task_id }, detail: full }`.
|
|
14
15
|
2. Import a newer team checkpoint with `ultra.sync`; stop on a real same-record or
|
|
15
16
|
active-session conflict.
|
|
16
|
-
3. Reuse a valid lease or call `ultra.session { action:
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
3. Reuse a valid lease or call `ultra.session { action: acquire }`. Acquire atomically
|
|
18
|
+
performs admission, compiles or reuses the implementation Context Envelope, mints
|
|
19
|
+
the lease/worktree, and returns the immutable Worker Packet. A separate
|
|
20
|
+
`action: admission` is an optional read-only preview, not a prerequisite.
|
|
21
|
+
4. Verify the returned packet digest, purpose, acceptance, dependencies, public seam,
|
|
22
|
+
exact output path/schema, verification command,
|
|
19
23
|
non-goals, recovery, and required context refs. Update the task contract before
|
|
20
24
|
implementation when accepted intent changed.
|
|
21
25
|
|
|
@@ -26,10 +30,13 @@ before changing logic. Implement the smallest complete vertical slice. Ask the o
|
|
|
26
30
|
only when new evidence changes product intent, compatibility, security, material cost,
|
|
27
31
|
external effects, or recovery.
|
|
28
32
|
|
|
29
|
-
Use `ultra.record`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
Use typed `ultra.record` entries for `task_outcome / start|block|complete`,
|
|
34
|
+
`event / append`, `artifact / bind`, `decision / accept`, and corrected
|
|
35
|
+
`task_contract / revise`. Every worker output must repeat the exact `packet_digest`;
|
|
36
|
+
the parent registers it only after packet, output path, schema, and digest validation.
|
|
37
|
+
Live ownership, `in_progress`, session ids, leases, worktrees, telemetry, and
|
|
38
|
+
completion hashes remain local runtime state; durable task outcome and evidence may
|
|
39
|
+
enter the team checkpoint.
|
|
33
40
|
|
|
34
41
|
Run focused and adjacent risk-justified checks, then a task-scoped independent review.
|
|
35
42
|
Fix blocking findings and refresh affected evidence.
|
|
@@ -37,8 +44,8 @@ Fix blocking findings and refresh affected evidence.
|
|
|
37
44
|
## Commit one semantic checkpoint
|
|
38
45
|
|
|
39
46
|
Call `ultra.checkpoint` once with `stage: dev`, the exact Change/Task scope, evidence,
|
|
40
|
-
and stable idempotency key. It
|
|
41
|
-
|
|
47
|
+
and stable idempotency key. It binds the exact Context Envelope and Worker Packet and
|
|
48
|
+
reports outcome diagnostics. A rejection leaves the draft mutable.
|
|
42
49
|
|
|
43
50
|
After acceptance, mark the task durably completed, publish with `ultra.sync`, and
|
|
44
51
|
create at most one authorized local task commit containing code and semantic
|
|
@@ -30,8 +30,8 @@ journals, reconcile orphan sessions, and repair installed mechanical assets.
|
|
|
30
30
|
|
|
31
31
|
It may not manufacture semantic evidence, import or publish a team checkpoint, replace
|
|
32
32
|
a healthy baseline, resolve decisions, edit application code, or force a draft to
|
|
33
|
-
accepted. Use `ultra.sync` for reviewed checkpoint import/publish
|
|
34
|
-
|
|
33
|
+
accepted. Use `ultra.sync` for reviewed checkpoint import/publish. Doctor never changes
|
|
34
|
+
semantic checkpoint acceptance or Change intent.
|
|
35
35
|
|
|
36
36
|
Preserve corrupt DB/WAL/SHM and dirty worktrees. Never patch plugin cache files by
|
|
37
37
|
hand; reinstall through `ubp` and verify the installed manifest and hook targets.
|
|
@@ -23,17 +23,18 @@ capability.
|
|
|
23
23
|
4. Ask the owner only when scope, healthy-authority replacement, destructive recovery,
|
|
24
24
|
or another material choice cannot be derived. Reuse explicit intent.
|
|
25
25
|
|
|
26
|
-
Read `../ultra-think/references/
|
|
26
|
+
Read `../ultra-think/references/interaction-boundary.md` before asking a material
|
|
27
27
|
question.
|
|
28
28
|
|
|
29
29
|
## Initialize once
|
|
30
30
|
|
|
31
|
-
Call `ultra.record` with one entry:
|
|
31
|
+
Call `ultra.record` with one typed entry:
|
|
32
32
|
|
|
33
33
|
```text
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
kind: baseline
|
|
35
|
+
action: initialize
|
|
36
|
+
data: { target_dir, project_name, mode=auto, git_mode=auto, optional scope }
|
|
37
|
+
idempotency_key: <stable init attempt id>
|
|
37
38
|
```
|
|
38
39
|
|
|
39
40
|
This stateless bootstrap is the only `ultra.record` operation allowed before
|
|
@@ -66,7 +66,8 @@ ledger into hundreds of application tasks.
|
|
|
66
66
|
|
|
67
67
|
## Record authority
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Use `ultra.record` with `kind: baseline`, `action: observe`, and full replacement
|
|
70
|
+
arrays for:
|
|
70
71
|
|
|
71
72
|
- scope and repository revision;
|
|
72
73
|
- repository classification;
|
|
@@ -82,12 +83,14 @@ Use the server-returned revision, branch, worktree digest, and specification dig
|
|
|
82
83
|
## Obtain approval and converge
|
|
83
84
|
|
|
84
85
|
Present scope, observed behavior, drift, known-red verification, unknowns, gaps, dirty
|
|
85
|
-
worktree state, and material decisions to the owner.
|
|
86
|
-
|
|
87
|
-
items the owner
|
|
86
|
+
worktree state, and material decisions to the owner. Use `ultra.record` with
|
|
87
|
+
`kind: baseline`, `action: accept` only after explicit approval. Set
|
|
88
|
+
`accept_known_red` and `accept_dirty_worktree` only for the exact items the owner
|
|
89
|
+
accepted.
|
|
88
90
|
|
|
89
91
|
Resolve returned blockers through evidence or an owner decision, record the replacement
|
|
90
|
-
snapshot, and retry. Adoption is complete only when `
|
|
91
|
-
|
|
92
|
-
failure. Route all selected work through `ultra-change`, including work
|
|
93
|
-
legacy plan. Import its accepted intent into a current Change Contract
|
|
92
|
+
snapshot, and retry. Adoption is complete only when `ultra.context` reports a current
|
|
93
|
+
accepted baseline, the gap ledger has no open blocker, and project doctor has no
|
|
94
|
+
authority failure. Route all selected work through `ultra-change`, including work
|
|
95
|
+
described by a legacy plan. Import its accepted intent into a current Change Contract
|
|
96
|
+
before planning.
|
|
@@ -28,13 +28,14 @@ Large sources stay lazy. Use digest freshness for accepted inputs that must rema
|
|
|
28
28
|
byte-current, existence for expected implementation targets, and advisory only when
|
|
29
29
|
drift must be visible without blocking.
|
|
30
30
|
|
|
31
|
-
Read `../ultra-think/references/
|
|
31
|
+
Read `../ultra-think/references/interaction-boundary.md` before asking a material
|
|
32
32
|
question.
|
|
33
33
|
|
|
34
34
|
## Record and checkpoint
|
|
35
35
|
|
|
36
|
-
Use one `ultra.record` batch
|
|
37
|
-
|
|
36
|
+
Use one `ultra.record` batch with `task_contract / define` for new tasks and
|
|
37
|
+
`task_contract / revise` for corrected contracts. Read back the draft with
|
|
38
|
+
`ultra.context`.
|
|
38
39
|
Never read or write `.ultra/tasks/tasks.json`; use `ultra.sync` for the Git team
|
|
39
40
|
checkpoint, and never edit the local runtime projection directly.
|
|
40
41
|
|
|
@@ -47,13 +48,14 @@ payload: planning posture, optional approval already obtained, context budget/re
|
|
|
47
48
|
idempotency_key: stable semantic Plan checkpoint id
|
|
48
49
|
```
|
|
49
50
|
|
|
50
|
-
The checkpoint compiles or reuses the content-addressed Context
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
The checkpoint compiles or reuses the content-addressed Context Envelope, derives
|
|
52
|
+
coverage diagnostics, exports `plan.json` and `plan.md` inside the same recoverable
|
|
53
|
+
publication, accepts one Plan revision, and publishes the team checkpoint. Do not
|
|
54
|
+
export separately.
|
|
53
55
|
|
|
54
56
|
If rejected, the same Plan draft stays mutable. Fix task contracts or evidence and
|
|
55
|
-
retry. To
|
|
56
|
-
run to escape a
|
|
57
|
+
retry. To replace an accepted Plan, submit a new checkpoint revision; never edit
|
|
58
|
+
SQLite or open a parallel run to escape a diagnostic.
|
|
57
59
|
|
|
58
60
|
Return topology, executable slices, public seams, exact checks, checkpoint result, and
|
|
59
61
|
the model's recommended execution order. Do not invoke `ultra-dev` automatically.
|
|
@@ -21,7 +21,7 @@ not a questionnaire or a step-by-step supervisor.
|
|
|
21
21
|
5. Use the host-native question surface only for a material unresolved route. Reuse an
|
|
22
22
|
explicit owner choice without asking again.
|
|
23
23
|
|
|
24
|
-
Read `../ultra-think/references/
|
|
24
|
+
Read `../ultra-think/references/interaction-boundary.md` before asking. Load only the
|
|
25
25
|
reference files for research areas that actually apply.
|
|
26
26
|
|
|
27
27
|
## Investigate
|
|
@@ -34,10 +34,15 @@ For each selected area:
|
|
|
34
34
|
- never store transcripts, hidden reasoning, raw provider payloads, or copied prompts;
|
|
35
35
|
- record evidence, specification updates, decisions, deferrals, and consequences.
|
|
36
36
|
|
|
37
|
-
Use one `ultra.record` batch for durable facts
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
Use one `ultra.record` batch for typed durable facts:
|
|
38
|
+
|
|
39
|
+
- `artifact / bind` for a managed research or specification artifact;
|
|
40
|
+
- `decision / accept` for normalized owner intent;
|
|
41
|
+
- `baseline / observe` or `baseline / accept` for baseline authority;
|
|
42
|
+
- `change_contract / revise` for Change-bound findings.
|
|
43
|
+
|
|
44
|
+
Every entry needs a stable idempotency key. A semantic rejection is a mutable
|
|
45
|
+
diagnostic: correct the same draft and retry.
|
|
41
46
|
|
|
42
47
|
## Commit one research checkpoint
|
|
43
48
|
|
|
@@ -46,8 +51,8 @@ and their report outputs in `payload.steps`; include only work actually performe
|
|
|
46
51
|
verified, reused, deferred with owner authority, or proved not applicable. Synthesis
|
|
47
52
|
must always be present.
|
|
48
53
|
|
|
49
|
-
For baseline research,
|
|
50
|
-
|
|
54
|
+
For baseline research, update and accept the baseline through typed `ultra.record`
|
|
55
|
+
entries, then publish the team checkpoint with `ultra.sync { action: publish }`.
|
|
51
56
|
For Change-bound research, keep all findings and delta artifacts below the Change
|
|
52
57
|
root and never edit accepted baseline specs directly.
|
|
53
58
|
|
|
@@ -21,12 +21,15 @@ Keep two independent verdict axes:
|
|
|
21
21
|
5. Always run `review-spec`. Select the smallest engineering worker set that covers
|
|
22
22
|
actual risk; record selected and excluded roles with rationale.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
Use the current host's native bounded-worker mechanism. Workers are read-only and
|
|
25
|
+
receive one immutable Worker Packet containing the exact Context Envelope, HEAD/diff,
|
|
26
|
+
decisions, acceptance, output path/schema, and `packet_digest`. Validate their artifacts with `scripts/review_wait.py` and
|
|
27
|
+
`references/unified-schema.md`; reject any output that does not echo the exact packet
|
|
28
|
+
digest. Preserve every finding unchanged in `SUMMARY.json`; group duplicates only in
|
|
29
|
+
the human summary.
|
|
30
|
+
|
|
31
|
+
Register specialist and summary artifacts through one `ultra.record` batch using
|
|
32
|
+
`artifact / bind`.
|
|
30
33
|
|
|
31
34
|
## Checkpoint
|
|
32
35
|
|
|
@@ -10,6 +10,7 @@ return only a one-line acknowledgement to the parent.
|
|
|
10
10
|
"$schema": "ultra-review-findings-v2",
|
|
11
11
|
"agent": "review-code",
|
|
12
12
|
"axis": "engineering_standards",
|
|
13
|
+
"packet_digest": "<sha256-of-exact-worker-packet>",
|
|
13
14
|
"session": "<session-id>",
|
|
14
15
|
"timestamp": "<ISO-8601>",
|
|
15
16
|
"scope": {
|
|
@@ -74,6 +75,7 @@ preference as a defect. Preserve the source specialist's severity during coordin
|
|
|
74
75
|
"head": "<full-git-head>",
|
|
75
76
|
"worktree_digest": "<sha256-of-current-worktree>",
|
|
76
77
|
"context_digest": "<sha256-of-recorded-review-context>",
|
|
78
|
+
"packet_digest": "<sha256-of-coordinator-worker-packet>",
|
|
77
79
|
"status": "complete",
|
|
78
80
|
"verdict": "REQUEST_CHANGES",
|
|
79
81
|
"axes": {
|
|
@@ -66,6 +66,10 @@ def nonempty_string(value) -> bool:
|
|
|
66
66
|
return isinstance(value, str) and bool(value.strip())
|
|
67
67
|
|
|
68
68
|
|
|
69
|
+
def digest_string(value) -> bool:
|
|
70
|
+
return isinstance(value, str) and re.fullmatch(r"[0-9a-f]{64}", value) is not None
|
|
71
|
+
|
|
72
|
+
|
|
69
73
|
def validate_finding(finding, artifact_axis: str, seen_ids):
|
|
70
74
|
if not isinstance(finding, dict):
|
|
71
75
|
return "finding must be an object"
|
|
@@ -97,6 +101,8 @@ def validate_specialist(data):
|
|
|
97
101
|
return f"$schema must be {FINDINGS_SCHEMA}"
|
|
98
102
|
if not nonempty_string(data.get("agent")):
|
|
99
103
|
return "agent must be a non-empty string"
|
|
104
|
+
if not digest_string(data.get("packet_digest")):
|
|
105
|
+
return "packet_digest must be a lowercase SHA-256 digest"
|
|
100
106
|
axis = data.get("axis")
|
|
101
107
|
if axis not in AXES:
|
|
102
108
|
return "axis must be spec_fidelity or engineering_standards"
|
|
@@ -197,6 +203,8 @@ def validate_summary(data):
|
|
|
197
203
|
for field in ["session", "change_id", "head", "context_digest"]:
|
|
198
204
|
if not nonempty_string(data.get(field)):
|
|
199
205
|
return f"{field} must be a non-empty string"
|
|
206
|
+
if not digest_string(data.get("packet_digest")):
|
|
207
|
+
return "packet_digest must be a lowercase SHA-256 digest"
|
|
200
208
|
if data.get("worktree_digest") is not None and not nonempty_string(data.get("worktree_digest")):
|
|
201
209
|
return "worktree_digest must be null or a non-empty string"
|
|
202
210
|
task_ids = data.get("task_ids")
|
|
@@ -20,14 +20,14 @@ Report:
|
|
|
20
20
|
```text
|
|
21
21
|
Ultra: <healthy|degraded> · <branch>@<head|unborn|non-git>
|
|
22
22
|
Baseline: <mode>/<status> · gaps=<open>/<blocking>
|
|
23
|
-
|
|
23
|
+
Stage checkpoints: drafts=<count> · accepted=<current|stale|none>
|
|
24
24
|
Change: <id/status|none> · delta/docs=<state>
|
|
25
25
|
Task: <id/status|none> · Sessions: <active>
|
|
26
26
|
Evidence: plan=<state> · test=<state> · review=<axes> · delivery=<state>
|
|
27
27
|
Team checkpoint: <current|drifted|revalidation_required|missing|invalid>
|
|
28
28
|
Blockers: <hard mechanical blockers or none>
|
|
29
29
|
Warnings: <advisory semantic diagnostics or none>
|
|
30
|
-
|
|
30
|
+
Model recommendation: <capability and concise rationale>
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Treat warnings and failed draft checks as information, not mechanical orders. Only
|
|
@@ -20,10 +20,12 @@ generated projections are not evidence.
|
|
|
20
20
|
5. Run repository-native commands and real boundaries. A bug or incident needs one
|
|
21
21
|
deterministic red-to-green regression signal.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
When delegated, use the immutable Worker Packet supplied by the parent and echo its
|
|
24
|
+
`packet_digest` in the report. Write an `ultra-test-report-v1` report below the owning
|
|
25
|
+
Change. Bind exact acceptance
|
|
24
26
|
ids, task ids, HEAD, worktree/context digests, commands, seams, failures, recovery,
|
|
25
27
|
profile, timestamp, blockers, and evidence-derived verdict. Register it with
|
|
26
|
-
`ultra.record` using `artifact
|
|
28
|
+
`ultra.record` using `artifact / bind`.
|
|
27
29
|
|
|
28
30
|
## Checkpoint
|
|
29
31
|
|
|
@@ -18,20 +18,20 @@ project-bound decision that must survive interruption or control later work.
|
|
|
18
18
|
implementation judgment, and unresolved owner choice.
|
|
19
19
|
5. Stress-test the leading answer with its strongest failure path and recovery.
|
|
20
20
|
|
|
21
|
-
Read `references/
|
|
21
|
+
Read `references/interaction-boundary.md`. Reuse a clear decision already present in the
|
|
22
22
|
request. Decide reversible delegated implementation details yourself. When owner
|
|
23
23
|
authority is necessary, ask one dependent decision through the host-native question
|
|
24
24
|
surface with a recommendation, decisive evidence, and the effect of the answer.
|
|
25
25
|
|
|
26
26
|
## Persist only the normalized result
|
|
27
27
|
|
|
28
|
-
Use one `ultra.record` batch
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
artifact references, never transcripts or internal reasoning.
|
|
28
|
+
Use one `ultra.record` batch with `decision / accept` and, when required,
|
|
29
|
+
`artifact / bind` for the owning semantic document. A revised answer carries
|
|
30
|
+
`supersedes_id`; accepted records remain immutable history. Store normalized decisions
|
|
31
|
+
and artifact references, never transcripts or internal reasoning.
|
|
32
32
|
|
|
33
|
-
A semantic rejection remains a mutable diagnostic. Correct the record
|
|
34
|
-
|
|
33
|
+
A semantic rejection remains a mutable diagnostic. Correct the record; do not invent a
|
|
34
|
+
new decision merely to satisfy a state machine.
|
|
35
35
|
|
|
36
36
|
Return the conclusion, decisive evidence, uncertainty, affected authority, and the
|
|
37
37
|
model's recommended next explicit capability. Thinking never performs unrelated
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Owner interaction boundary
|
|
2
|
+
|
|
3
|
+
Use this reference only when a material choice remains after inspecting current
|
|
4
|
+
authority and observable facts. Ultra does not require a ceremonial question before
|
|
5
|
+
every write.
|
|
6
|
+
|
|
7
|
+
## Responsibility split
|
|
8
|
+
|
|
9
|
+
- The owner controls product intent, acceptance, non-goals, material tradeoffs, risk
|
|
10
|
+
acceptance, irreversible actions, external effects, and real-money commitments.
|
|
11
|
+
- The host model investigates facts, recommends a direction, makes reversible
|
|
12
|
+
implementation judgments, and explains uncertainty.
|
|
13
|
+
- Use the host-native question surface declared by the installed interaction contract;
|
|
14
|
+
prefer its structured form when the host exposes one.
|
|
15
|
+
- `ultra.record` persists only the normalized result and its provenance.
|
|
16
|
+
- MCP validates structure, identity, digests, CAS, leases, paths, and recovery. It does
|
|
17
|
+
not decide whether a product answer is good.
|
|
18
|
+
|
|
19
|
+
## Interaction sequence
|
|
20
|
+
|
|
21
|
+
1. Read `ultra.context` for the relevant scope.
|
|
22
|
+
2. Inspect source, runtime, tests, accepted artifacts, and primary documentation.
|
|
23
|
+
3. Reuse an explicit choice already present in the current request or an accepted
|
|
24
|
+
Decision Record.
|
|
25
|
+
4. Decide a reversible delegated detail without asking.
|
|
26
|
+
5. When owner authority is still required, ask one unresolved owner choice at a time
|
|
27
|
+
with:
|
|
28
|
+
- the recommendation;
|
|
29
|
+
- the discriminating evidence;
|
|
30
|
+
- the meaningful cost or failure mode;
|
|
31
|
+
- what changes when the answer changes.
|
|
32
|
+
6. Normalize the answer into a deterministic Decision Record and persist it with
|
|
33
|
+
`ultra.record` using `kind: decision`, `action: accept`.
|
|
34
|
+
7. Read `ultra.context` back and verify that the accepted decision is visible before
|
|
35
|
+
relying on it.
|
|
36
|
+
|
|
37
|
+
## Decision Record
|
|
38
|
+
|
|
39
|
+
Persist only:
|
|
40
|
+
|
|
41
|
+
- normalized question;
|
|
42
|
+
- recommendation and selected answer;
|
|
43
|
+
- effects and non-goals;
|
|
44
|
+
- owner, source, and bounded provenance;
|
|
45
|
+
- applied artifact references;
|
|
46
|
+
- supersession link when revising an earlier answer.
|
|
47
|
+
|
|
48
|
+
Never persist raw transcripts, hidden reasoning, full prompts, UI receipts, or copied
|
|
49
|
+
memory-provider payloads.
|
|
50
|
+
|
|
51
|
+
## Revisions and interruptions
|
|
52
|
+
|
|
53
|
+
Accepted decisions are immutable history. A changed answer creates a new Decision
|
|
54
|
+
Record that supersedes the prior record. A cancelled question writes nothing. If a
|
|
55
|
+
decision cannot be obtained, preserve the unresolved issue as a diagnostic or bounded
|
|
56
|
+
event; do not invent an answer or block unrelated work.
|