ultra-builder-pro-cli 5.0.1 → 6.0.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/CHANGELOG.md +103 -3
- package/README.md +67 -478
- package/README.zh-CN.md +49 -422
- package/adapters/_shared/frontmatter.cjs +1 -18
- package/adapters/_shared/plugin-core.cjs +17 -83
- package/adapters/_shared/runtime-assets.cjs +6 -120
- package/adapters/claude.js +8 -24
- package/adapters/codex.js +13 -32
- package/bin/install.js +35 -57
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +13 -101
- package/docs/examples/drive/claude-reviewer.sh +53 -0
- package/docs/examples/drive/claude-writer.sh +43 -0
- package/engine/FORMATS.md +1051 -0
- package/engine/checks.cjs +139 -0
- package/engine/cli.cjs +148 -0
- package/engine/completion.cjs +48 -0
- package/engine/context.cjs +94 -0
- package/engine/drive.cjs +220 -0
- package/engine/expect-worker.cjs +5 -0
- package/engine/expect.cjs +33 -0
- package/engine/formats.cjs +189 -0
- package/engine/git-state.cjs +112 -0
- package/engine/ledger.cjs +205 -0
- package/engine/loading.cjs +28 -0
- package/engine/merge.cjs +273 -0
- package/engine/milestone.cjs +89 -0
- package/engine/plan.cjs +232 -0
- package/engine/project.cjs +5 -0
- package/engine/signals.cjs +3 -0
- package/engine/states.cjs +175 -0
- package/hooks/session-start.cjs +54 -0
- package/package.json +17 -52
- package/skills/ultra/SKILL.md +395 -0
- package/.ultra-template/changes/abandoned/.gitkeep +0 -0
- package/.ultra-template/changes/active/.gitkeep +0 -1
- package/.ultra-template/changes/archive/.gitkeep +0 -1
- package/.ultra-template/contexts/TEMPLATE.md +0 -135
- package/.ultra-template/decisions/.gitkeep +0 -1
- package/.ultra-template/evidence/.gitkeep +0 -1
- package/.ultra-template/north-star.md +0 -52
- package/.ultra-template/project-brief.md +0 -28
- package/.ultra-template/research/.gitkeep +0 -1
- package/.ultra-template/specs/architecture.md +0 -81
- package/.ultra-template/specs/discovery.md +0 -74
- package/.ultra-template/specs/product.md +0 -80
- package/.ultra-template/specs/research-distillate.md +0 -57
- package/.ultra-template/tasks.json +0 -4
- package/.ultra-template/test-report.json +0 -44
- package/adapters/_shared/host-profile.cjs +0 -5
- package/adapters/grok.js +0 -242
- package/adapters/kimi.js +0 -232
- package/adapters/opencode.js +0 -408
- package/adapters/zcode.js +0 -375
- package/bin/delegate-worker.cjs +0 -5
- package/bin/delegate.cjs +0 -5
- package/docs/ARCHITECTURE.md +0 -274
- package/docs/ARTIFACT-AUTHORITY.md +0 -305
- package/docs/DECISIONS.md +0 -229
- package/docs/PHILOSOPHY.md +0 -261
- package/docs/RUNTIME-COMPAT-MATRIX.md +0 -316
- package/docs/SKILL-AUTHORING.md +0 -113
- package/docs/WORKFLOW-LIFECYCLE.md +0 -350
- package/docs/evals/adversarial-review-2026-08-14.md +0 -84
- package/docs/evals/ultra-5-0-journey-results.md +0 -62
- package/docs/evals/ultra-5-0-live-acp-conformance.md +0 -93
- package/docs/evals/ultra-5-0-route-journeys.md +0 -145
- package/docs/evals/zcode-automation-2026-08-14.md +0 -103
- package/hooks/README.md +0 -52
- package/hooks/_common.py +0 -1779
- package/hooks/adapters/codex.py +0 -295
- package/hooks/adapters/grok.py +0 -134
- package/hooks/adapters/kimi.py +0 -156
- package/hooks/adapters/zcode.py +0 -227
- package/hooks/block_dangerous_commands.py +0 -201
- package/hooks/compact_context.py +0 -224
- package/hooks/mid_workflow_recall.py +0 -47
- package/hooks/post_edit_guard.py +0 -215
- package/hooks/session_context.py +0 -741
- package/skills/ultra-change/SKILL.md +0 -165
- package/skills/ultra-change/references/change-contract.md +0 -199
- package/skills/ultra-change/references/execution-grant.md +0 -109
- package/skills/ultra-change/references/primary-transfer.md +0 -273
- package/skills/ultra-change/scripts/validate_primary_transfer.cjs +0 -1928
- package/skills/ultra-delegate/SKILL.md +0 -195
- package/skills/ultra-delegate/patches/zcode-acp-0.1.0-zcode-0.16.5.patch +0 -184
- package/skills/ultra-delegate/references/delegation-contract.md +0 -138
- package/skills/ultra-delegate/scripts/acp-conformance.cjs +0 -287
- package/skills/ultra-delegate/scripts/acp-driver.cjs +0 -762
- package/skills/ultra-delegate/scripts/agent-execution-driver.cjs +0 -320
- package/skills/ultra-delegate/scripts/cli-driver.cjs +0 -61
- package/skills/ultra-delegate/scripts/delegate-profiles/kimi-read-only.md +0 -15
- package/skills/ultra-delegate/scripts/delegate-profiles/kimi-write.md +0 -17
- package/skills/ultra-delegate/scripts/delegate-worker.cjs +0 -328
- package/skills/ultra-delegate/scripts/delegate.cjs +0 -690
- package/skills/ultra-delegate/scripts/delegate_wait.py +0 -86
- package/skills/ultra-delegate/scripts/host-profile.cjs +0 -267
- package/skills/ultra-deliver/SKILL.md +0 -194
- package/skills/ultra-deliver/references/baseline-reconciliation.md +0 -41
- package/skills/ultra-dev/SKILL.md +0 -265
- package/skills/ultra-dev/references/debugging.md +0 -22
- package/skills/ultra-domain-modeling/SKILL.md +0 -79
- package/skills/ultra-grilling/SKILL.md +0 -121
- package/skills/ultra-grilling/references/reframing.md +0 -76
- package/skills/ultra-init/SKILL.md +0 -143
- package/skills/ultra-init/references/brownfield-adoption.md +0 -32
- package/skills/ultra-init/scripts/init_project.cjs +0 -1031
- package/skills/ultra-plan/SKILL.md +0 -160
- package/skills/ultra-plan/references/task-evidence-v2.md +0 -300
- package/skills/ultra-plan/scripts/validate_task_evidence.cjs +0 -859
- package/skills/ultra-research/SKILL.md +0 -167
- package/skills/ultra-research/references/00-problem-validation.md +0 -36
- package/skills/ultra-research/references/01-opportunity-discovery.md +0 -33
- package/skills/ultra-research/references/02-market-assessment.md +0 -31
- package/skills/ultra-research/references/03-alternatives.md +0 -31
- package/skills/ultra-research/references/04-product-strategy.md +0 -41
- package/skills/ultra-research/references/05-assumptions-validation.md +0 -31
- package/skills/ultra-research/references/10-user-personas.md +0 -30
- package/skills/ultra-research/references/11-user-scenarios.md +0 -28
- package/skills/ultra-research/references/20-user-stories.md +0 -31
- package/skills/ultra-research/references/21-features-scope.md +0 -38
- package/skills/ultra-research/references/22-success-metrics.md +0 -33
- package/skills/ultra-research/references/30-architecture-context.md +0 -30
- package/skills/ultra-research/references/31-solution-strategy.md +0 -28
- package/skills/ultra-research/references/32-building-blocks.md +0 -28
- package/skills/ultra-research/references/40-deployment.md +0 -29
- package/skills/ultra-research/references/41-quality-risks.md +0 -28
- package/skills/ultra-research/references/99-synthesis.md +0 -59
- package/skills/ultra-research/references/north-star-v2.md +0 -168
- package/skills/ultra-research/references/wayfinding.md +0 -50
- package/skills/ultra-research/scripts/validate_north_star.cjs +0 -1174
- package/skills/ultra-review/SKILL.md +0 -275
- package/skills/ultra-review/references/adversarial-evaluation.md +0 -31
- package/skills/ultra-review/references/code.md +0 -17
- package/skills/ultra-review/references/comments.md +0 -12
- package/skills/ultra-review/references/design.md +0 -12
- package/skills/ultra-review/references/errors.md +0 -13
- package/skills/ultra-review/references/review-modes.md +0 -29
- package/skills/ultra-review/references/spec.md +0 -18
- package/skills/ultra-review/references/tests.md +0 -12
- package/skills/ultra-review/references/unified-schema.md +0 -284
- package/skills/ultra-review/references/worker-packet.md +0 -183
- package/skills/ultra-review/scripts/review_wait.py +0 -2943
- package/skills/ultra-status/SKILL.md +0 -209
- package/skills/ultra-status/references/route-contract.md +0 -100
- package/skills/ultra-tdd/SKILL.md +0 -91
- package/skills/ultra-tdd/references/templates/README.md +0 -20
- package/skills/ultra-tdd/references/templates/feature-flag-default-audit.sh +0 -79
- package/skills/ultra-tdd/references/templates/persistence-real.ts +0 -78
- package/skills/ultra-tdd/references/templates/testcontainer-postgres.py +0 -78
- package/skills/ultra-tdd/references/templates/testcontainer-postgres.ts +0 -73
- package/skills/ultra-tdd/references/templates/vertical-slice.ts +0 -66
- package/skills/ultra-tdd/references/test-execution.md +0 -23
- package/skills/ultra-test/SKILL.md +0 -244
- package/skills/ultra-test/references/export-syntax.md +0 -18
- package/skills/ultra-test/scripts/validate_review_transport.cjs +0 -549
- package/skills/ultra-test/scripts/worktree_digest.cjs +0 -576
- package/skills/ultra-think/SKILL.md +0 -56
- package/skills/ultra-think/references/autonomy-boundary.md +0 -48
- package/skills/ultra-think/references/interaction-boundary.md +0 -42
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ultra-plan
|
|
3
|
-
description: Turn an evidenced Change intent into a dependency-valid task ledger, confirmed test seams, and resumable task contexts. Use when implementation needs decomposition, a wide refactor needs an expand-contract route, or an interrupted plan must be reconstructed from repository files.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Turn one Change into executable tracer bullets
|
|
7
|
-
|
|
8
|
-
Planning owns decomposition and technical design; files carry it across sessions and hosts.
|
|
9
|
-
|
|
10
|
-
## Route modes
|
|
11
|
-
|
|
12
|
-
| Mode | Entry | Observable exit | Next |
|
|
13
|
-
|---|---|---|---|
|
|
14
|
-
| `decompose` | Explicit invocation or a valid Execution Grant for one accepted, evidenced Change | A dependency-valid task graph, contexts, acceptance mapping, review, and earliest observable slice are read back | Recommend the exact first `ultra-dev/execute` task |
|
|
15
|
-
| `recover` | Explicit invocation or a valid Execution Grant when the current Change's planning artifacts are incomplete or inconsistent | Ledger/context/trace defects are repaired or a bounded unavailable path is reported | Recommend the exact first `ultra-dev/execute` task, or `ultra-change/reconcile` for a product evidence gap |
|
|
16
|
-
|
|
17
|
-
Follow `../ultra-status/references/route-contract.md`. Show the Route Card before
|
|
18
|
-
decomposition, at any material posture decision, and after reporting the graph. The
|
|
19
|
-
first executable slice must name its real consumer, real data path, and owner-visible
|
|
20
|
-
observation; a task count or completed plan file is not early value.
|
|
21
|
-
|
|
22
|
-
## Before you start
|
|
23
|
-
|
|
24
|
-
1. If model-selected, verify the live execution grant in `../ultra-change/references/execution-grant.md` — a current session-local activation or a stably verified durable work-package grant; without either, stop.
|
|
25
|
-
2. Read `../ultra-change/references/change-contract.md` and apply its **Active Change
|
|
26
|
-
authority resolution** before reading any active `intent.md` or resolving a current
|
|
27
|
-
`change_id`. This workflow requires its one valid active authority; any zero result
|
|
28
|
-
or typed diagnostic stops before decomposition until the stated repair or retry
|
|
29
|
-
succeeds. The intent must be `accepted`, every blocking decision resolved, its
|
|
30
|
-
`## Research Disposition` exit evidence satisfied, and its `## North Star Trace`
|
|
31
|
-
current before decomposition.
|
|
32
|
-
3. Read `.ultra/tasks.json`; select matching tasks and read each unfinished context and
|
|
33
|
-
Resume Note. Preserve all historical tasks in the append-only ledger.
|
|
34
|
-
4. Read `CONTEXT.md` for vocabulary and the relevant `.ultra/decisions/` entries.
|
|
35
|
-
5. Read the active Change intent, its `trace_to` specification anchors, and the
|
|
36
|
-
source, tests, consumers and recovery paths those anchors describe.
|
|
37
|
-
|
|
38
|
-
## Definition of done
|
|
39
|
-
|
|
40
|
-
- `.ultra/tasks.json` uses `$schema: "ultra-task-ledger-v2"` and is the sole
|
|
41
|
-
task-status authority. Every current-Change row resolves one context whose stable
|
|
42
|
-
identifiers, dependencies and trace anchors agree with the ledger.
|
|
43
|
-
- The owner confirmed any material posture. Seams resolve to code; technical selection
|
|
44
|
-
stays model-owned unless it changes public contract, accepted risk, or material trade-off.
|
|
45
|
-
- Every feature task is a tracer bullet crossing the real boundaries needed to make its
|
|
46
|
-
observable behavior work; a genuinely local Change does not invent extra layers.
|
|
47
|
-
- Every task context records resolving `FP-<n>` premises, `NS-<n>` outcomes, and
|
|
48
|
-
`HC-<n>` constraints as IDs only. It explains the task-local causal contribution and
|
|
49
|
-
potential constraint breach without mirroring North Star prose.
|
|
50
|
-
- Every Change acceptance id maps to at least one task context, and every context id
|
|
51
|
-
resolves back to the active Change.
|
|
52
|
-
- Coverage, dependency, trace, scope and context-pressure checks have concrete results.
|
|
53
|
-
|
|
54
|
-
## Fix the planning posture
|
|
55
|
-
|
|
56
|
-
Choose `EXPAND`, `SELECTIVE`, `HOLD` or `REDUCE`; default to `SELECTIVE`. Write it under
|
|
57
|
-
`## Planning Posture` in active `intent.md`; there is no separate `plan.md` authority.
|
|
58
|
-
Keep the posture visible rather than silently drifting.
|
|
59
|
-
Use `../ultra-grilling/SKILL.md` through the host-native question surface when the
|
|
60
|
-
choice remains material, one question with a recommendation at a time.
|
|
61
|
-
|
|
62
|
-
When a product or contract evidence gap leaves the whole path unclear, return the exact
|
|
63
|
-
gap to `ultra-change/reconcile`; Plan does not open Research directly. Change decides
|
|
64
|
-
whether to record a bounded Research Disposition. For ordinary technical uncertainty,
|
|
65
|
-
the model resolves it or writes one bounded spike/tracer task. For one consequential
|
|
66
|
-
trade-off, use `../ultra-think/SKILL.md`.
|
|
67
|
-
|
|
68
|
-
## Choose the plan shape
|
|
69
|
-
|
|
70
|
-
Use tracer bullets for ordinary work: each slice delivers one observable path through
|
|
71
|
-
the layers it changes. Use expand–contract only when one mechanical change has a
|
|
72
|
-
repository-wide blast radius and no vertical slice can keep the checkout green:
|
|
73
|
-
expand with old and new forms, migrate bounded batches, then contract the old form.
|
|
74
|
-
|
|
75
|
-
Build the graph with these structural defences:
|
|
76
|
-
|
|
77
|
-
- **Walking Skeleton**: the earliest executable tracer bullet traverses the real
|
|
78
|
-
boundaries this Change touches with real data. A genuinely one-layer Change does not
|
|
79
|
-
invent extra layers.
|
|
80
|
-
- **Contract task**: create one before dependent implementations when a shared contract
|
|
81
|
-
must remain valid while independently changed boundaries coexist.
|
|
82
|
-
- **Integration Checkpoint**: insert one where independently developed slices first
|
|
83
|
-
compose, or where the observed coupling or recovery risk makes an intermediate
|
|
84
|
-
whole-path check useful.
|
|
85
|
-
- A feature task that touches only one of several affected layers is merged or split
|
|
86
|
-
into a tracer bullet; moving a whole layer into one task is horizontal slicing.
|
|
87
|
-
|
|
88
|
-
Record seams before tests. The model chooses the technical seam: prefer an existing,
|
|
89
|
-
highest observable public seam, ideally one. Ask the owner only when it changes the
|
|
90
|
-
public contract or another material product, risk, or recovery trade-off.
|
|
91
|
-
|
|
92
|
-
## Write the files
|
|
93
|
-
|
|
94
|
-
The ledger root records `$schema: "ultra-task-ledger-v2"` and `tasks`. Each new task
|
|
95
|
-
records `id`, `title`, `type`, `priority`, `status`, `dependencies`, `context_file`,
|
|
96
|
-
`trace_to` and `change_id`. Task ids are globally unique, and every dependency must name
|
|
97
|
-
a task with the same `change_id`; an archived Change must never become an implicit
|
|
98
|
-
prerequisite of current work. A legacy `complexity` field remains readable only as a
|
|
99
|
-
migration diagnostic. It is not copied into new rows and never decides splitting,
|
|
100
|
-
priority, scope, context, or completion.
|
|
101
|
-
|
|
102
|
-
Append new tasks or repair matching current-Change tasks in place; never replace the
|
|
103
|
-
ledger with only the latest graph. Every active Change receives the smallest graph that
|
|
104
|
-
covers its real seams, evidence, review, and recovery needs. A profile does not decide
|
|
105
|
-
the number of tasks or contexts.
|
|
106
|
-
|
|
107
|
-
Each context records Change Acceptance IDs, a task-local Acceptance table with `ID`,
|
|
108
|
-
`Criterion`, `Verification type`, and `Required evidence`, confirmed seams, layers
|
|
109
|
-
touched, target files, Implementation, verification commands, the hard constraints the
|
|
110
|
-
work could violate, a Trace containing `FP-<n>`, `NS-<n>`, and `HC-<n>` IDs, Definition
|
|
111
|
-
of Drift, Change Log, Completion, Task Review, and Resume Note. A v2 context does not
|
|
112
|
-
repeat task status. If a legacy context contains a Status or Complexity header, preserve
|
|
113
|
-
it as a migration diagnostic and use the ledger value. Read every file back and verify
|
|
114
|
-
that every row resolves its named context and every current context resolves one row.
|
|
115
|
-
|
|
116
|
-
Name a hard constraint whenever the task could plausibly breach it, not only when you
|
|
117
|
-
expect it to. The entry costs one line and is what makes a later breach a checkable
|
|
118
|
-
question instead of a judgement call; `none` is a legitimate answer for a task that
|
|
119
|
-
touches nothing constrained.
|
|
120
|
-
|
|
121
|
-
## Verify the plan
|
|
122
|
-
|
|
123
|
-
1. Map every Change acceptance ID to at least one task context and reject dangling
|
|
124
|
-
context IDs. Map every in-scope user story or specification anchor to at least one task.
|
|
125
|
-
2. Walk dependencies and repair every cycle with the exact cycle chain visible.
|
|
126
|
-
3. Resolve every `trace_to` path and heading against a real file.
|
|
127
|
-
4. Resolve the Change and task `North Star Trace` `FP-<n>`/`NS-<n>`/`HC-<n>` ids
|
|
128
|
-
against `.ultra/north-star.md`. A revision mismatch is a stale observation that
|
|
129
|
-
returns to Change reconciliation, not a semantic verdict about alignment.
|
|
130
|
-
5. Surface concrete scope pressure: unresolved dependencies, duplicated ownership,
|
|
131
|
-
boundaries that cannot be tested independently, evidence that cannot fit the named
|
|
132
|
-
seam, or a context that no longer supports a reliable resume. File, task, line, and
|
|
133
|
-
context counts do not decide plan quality.
|
|
134
|
-
6. Validate exact ledger fields, ids, dependency edges, paths and typed acceptance
|
|
135
|
-
shapes. A validator reports structural diagnostics only; it never decides whether
|
|
136
|
-
the decomposition, criterion, evidence, or plan is semantically sufficient.
|
|
137
|
-
Follow `../ultra-review/SKILL.md` in plan mode. Require a validated current
|
|
138
|
-
`SUMMARY.json`; resolve every blocking finding and refresh affected evidence before
|
|
139
|
-
handoff. If further repair is not justified or an authorized resource ceiling is
|
|
140
|
-
reached, preserve the findings and return the evidence to the responsible model or
|
|
141
|
-
owner. Attempt and finding counts never manufacture convergence or failure.
|
|
142
|
-
|
|
143
|
-
Report the graph, frontier, seams, warnings and first task. Recommend the next explicit
|
|
144
|
-
capability from the files. Under a valid grant covering that exact task, show the
|
|
145
|
-
transition Route Card before allowing Dev to re-verify and continue; otherwise do not
|
|
146
|
-
invoke it.
|
|
147
|
-
|
|
148
|
-
## When the owner decides
|
|
149
|
-
|
|
150
|
-
The owner chooses material posture, reductions, omissions, and any seam changing public
|
|
151
|
-
contract or material trade-off. The model owns decomposition and repairs broken paths.
|
|
152
|
-
## References
|
|
153
|
-
|
|
154
|
-
- `../ultra-change/references/change-contract.md` — canonical Active Change authority resolution.
|
|
155
|
-
- `../ultra-grilling/SKILL.md` — read before a material posture or seam question.
|
|
156
|
-
- `../ultra-think/SKILL.md` — read when one evidenced decision blocks decomposition.
|
|
157
|
-
- `../ultra-review/SKILL.md` — read after plan files pass mechanical verification.
|
|
158
|
-
- `../ultra-change/references/execution-grant.md` — read only for grant-activated continuation.
|
|
159
|
-
- `../ultra-status/references/route-contract.md` — owner-visible route, checkpoint, and recovery output.
|
|
160
|
-
- `references/task-evidence-v2.md` — canonical typed task evidence and task-review contract.
|
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
# Task ledger, context, and evidence v2
|
|
2
|
-
|
|
3
|
-
Use this contract when Plan creates a task or when Dev refreshes completion evidence.
|
|
4
|
-
The ledger owns mechanical task status. A task context contains meaning and resume
|
|
5
|
-
information but does not repeat `status`, `priority`, or `complexity` in a metadata
|
|
6
|
-
header. A legacy header is readable only as an observation; the ledger wins and the
|
|
7
|
-
reader reports a migration diagnostic.
|
|
8
|
-
|
|
9
|
-
## Ledger and context
|
|
10
|
-
|
|
11
|
-
The ledger root is exactly `$schema` plus `tasks`, with `$schema` set to
|
|
12
|
-
`ultra-task-ledger-v2`. A current task row has these fields:
|
|
13
|
-
|
|
14
|
-
```text
|
|
15
|
-
id, title, type, priority, status, dependencies, context_file, trace_to, change_id
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Legacy rows may retain `complexity`; do not use it to decide task, file, question,
|
|
19
|
-
finding, repair-round, or quality limits. The Acceptance section in every current
|
|
20
|
-
context starts with the Change Acceptance IDs and this exact table:
|
|
21
|
-
|
|
22
|
-
```markdown
|
|
23
|
-
| ID | Criterion | Verification type | Required evidence |
|
|
24
|
-
|---|---|---|---|
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Criterion IDs are unique inside one task. Verification type is exactly `command`,
|
|
28
|
-
`inspection`, `owner-judgment`, or `external-observation`. The required-evidence cell
|
|
29
|
-
names evidence that can actually establish the criterion; it is not a second status.
|
|
30
|
-
|
|
31
|
-
## Evidence root
|
|
32
|
-
|
|
33
|
-
`.ultra/evidence/<task-id>/evidence.json` is the one final completion record. It uses
|
|
34
|
-
`ultra-task-evidence-v2` and the exact ordered root fields below:
|
|
35
|
-
|
|
36
|
-
The product-worktree digest has one fixed boundary: it excludes `.ultra/evidence/**`,
|
|
37
|
-
whose command and external-observation entries bind raw bytes as
|
|
38
|
-
`raw_evidence_sha256` before stable exact record bytes are bound as `evidence_digest` by
|
|
39
|
-
aggregate Test. This makes evidence publication and refresh non-self-referential without
|
|
40
|
-
hiding provenance. No workflow supplies an additional exclusion.
|
|
41
|
-
|
|
42
|
-
```text
|
|
43
|
-
$schema, task_id, change_id, context, subject, acceptance, dimensions,
|
|
44
|
-
task_review, artifacts, limitations, timestamp
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
`context` is exactly `{path, acceptance_sha256}`. Hash the UTF-8 bytes beginning with
|
|
48
|
-
the `## Acceptance Criteria` heading and ending immediately before the next level-two
|
|
49
|
-
heading. Do not bind the whole mutable task context. `subject` is exactly
|
|
50
|
-
`{git_head, worktree_digest, observed_at}`. The `subject` is an independently captured
|
|
51
|
-
completion-snapshot freshness observation: capture it after the final strict task Review
|
|
52
|
-
validates and immediately before evidence publication. `task_review` separately binds
|
|
53
|
-
the retained strict summary. Worker Packet v1 carries no worktree digest and its
|
|
54
|
-
`SUMMARY.json` records `worktree_digest: null`, so neither review artifact proves or
|
|
55
|
-
cryptographically binds `subject.worktree_digest`. The subject is not rebound to a later
|
|
56
|
-
aggregate Change worktree.
|
|
57
|
-
|
|
58
|
-
Each acceptance item is exactly:
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"criterion_id": "A-01",
|
|
63
|
-
"verification_type": "inspection",
|
|
64
|
-
"evidence": {
|
|
65
|
-
"source": "path/to/source",
|
|
66
|
-
"observation": "The observable fact.",
|
|
67
|
-
"revision": "the observed revision"
|
|
68
|
-
},
|
|
69
|
-
"disposition": {
|
|
70
|
-
"authority": "model",
|
|
71
|
-
"result": "satisfied",
|
|
72
|
-
"rationale": "Why the evidence supports this disposition."
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
`result` is `satisfied`, `gap`, or `not_applicable`. The validator checks the record's
|
|
78
|
-
shape and authority token. It never infers the result from an exit code, digest,
|
|
79
|
-
counter, validator success, or model assertion.
|
|
80
|
-
|
|
81
|
-
## Typed evidence
|
|
82
|
-
|
|
83
|
-
Use exactly one evidence object for each criterion:
|
|
84
|
-
|
|
85
|
-
- `command`: `{command, cwd, exit_code, raw_evidence_ref, raw_evidence_sha256,
|
|
86
|
-
freshness_identity}`, where freshness identity is
|
|
87
|
-
`{git_head, worktree_digest, observed_at}`.
|
|
88
|
-
- `inspection`: `{source, observation, revision}`.
|
|
89
|
-
- `owner-judgment`: `{owner_record_ref, owner_statement_or_disposition}`. Its
|
|
90
|
-
disposition authority must be `owner`; the model and validator cannot satisfy it.
|
|
91
|
-
- `external-observation`: `{provider, run_id, observed_at, raw_evidence_ref,
|
|
92
|
-
raw_evidence_sha256, observation}`.
|
|
93
|
-
|
|
94
|
-
`raw_evidence_sha256` is the lowercase SHA-256 of the exact bytes named by
|
|
95
|
-
`raw_evidence_ref`. The structural validator requires a normalized, mechanically safe
|
|
96
|
-
repository-relative ref and an exact 64-hex digest; structural mode does not dereference
|
|
97
|
-
the ref. Dev, Test, Status, and Deliver resolve it below the real repository root, require
|
|
98
|
-
every parent and the final file to remain repository-contained and non-symlink, open the
|
|
99
|
-
final ordinary regular file nonblocking and no-follow, cap the snapshot at 8 MiB, and
|
|
100
|
-
compare path and descriptor identity before and after reading. They hash only that one
|
|
101
|
-
bounded stable byte snapshot. A missing, special, symlinked, escaped, oversized, or
|
|
102
|
-
replaced ref is a typed evidence gap with retry or owning-task repair, never accepted
|
|
103
|
-
provenance.
|
|
104
|
-
|
|
105
|
-
`dimensions` contains exactly `tests_written`, `tests_passed`, `persistence_real`,
|
|
106
|
-
`feature_flags_audit`, `vertical_slice`, and `spec_trace`. Each dimension is an explicit
|
|
107
|
-
`{status, evidence_refs, rationale}` observation; its status uses the same three result
|
|
108
|
-
tokens and is not a semantic score.
|
|
109
|
-
|
|
110
|
-
## Task review
|
|
111
|
-
|
|
112
|
-
First-review admission does not consume this final record. It consumes the ledger's
|
|
113
|
-
`in_progress` row, the task context and acceptance bytes, the immutable review packet,
|
|
114
|
-
and actual pre-review evidence already observed at the four typed authorities. Raw
|
|
115
|
-
outputs and citations may exist before review, but they do not form another evidence
|
|
116
|
-
schema, completion record, or task-status authority. Do not write `evidence.json` before the task's validated final `SUMMARY.json` exists.
|
|
117
|
-
|
|
118
|
-
`task_review` is exactly:
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
{
|
|
122
|
-
"execution_packet": {
|
|
123
|
-
"state": "available",
|
|
124
|
-
"digest": "<sha256>",
|
|
125
|
-
"limitation": null
|
|
126
|
-
},
|
|
127
|
-
"session_id": "<review-session>",
|
|
128
|
-
"summary_ref": ".ultra/reviews/<review-session>/SUMMARY.json",
|
|
129
|
-
"summary_digest": "<sha256>",
|
|
130
|
-
"blocking_findings": [
|
|
131
|
-
{
|
|
132
|
-
"id": "<finding-id>",
|
|
133
|
-
"resolution": "<what changed>",
|
|
134
|
-
"disposition": "<resolved, accepted risk, or still a gap>",
|
|
135
|
-
"evidence_refresh_refs": ["<fresh evidence>"]
|
|
136
|
-
}
|
|
137
|
-
],
|
|
138
|
-
"retention": "<when the derived review may be removed>"
|
|
139
|
-
}
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
For work that predates Execution Packet v1, use `state: pre-v1-unavailable`, a null
|
|
143
|
-
digest, and a non-empty limitation. Never manufacture a bootstrap digest. Keep the task
|
|
144
|
-
`in_progress` through implementation and blocking review repair. If a repair changes
|
|
145
|
-
implementation or evidence in review scope, create and validate a new immutable review
|
|
146
|
-
session before closeout; do not claim that Worker Packet v1 binds the resulting worktree.
|
|
147
|
-
|
|
148
|
-
### Task-review provenance branches
|
|
149
|
-
|
|
150
|
-
`task_review` carries exactly one of two discriminated provenance branches. Records
|
|
151
|
-
with no `review_mode` field remain the strict-v4 branch, so every existing v2 record
|
|
152
|
-
and aggregate projection stays valid without migration.
|
|
153
|
-
|
|
154
|
-
The **strict-v4 branch** (`review_mode: "strict-v4"` or absent) is exactly the shape
|
|
155
|
-
above: a real retained `.ultra/reviews/<session>/SUMMARY.json` identity consumed by
|
|
156
|
-
the review waiter and the transport validator.
|
|
157
|
-
|
|
158
|
-
The **external-manual branch** (`review_mode: "external-manual"`) binds one real
|
|
159
|
-
repository-relative JSON receipt published by the owner-designated external reviewer
|
|
160
|
-
under `.ultra/evidence/<task-id>/`, never under `.ultra/reviews/`:
|
|
161
|
-
|
|
162
|
-
```json
|
|
163
|
-
{
|
|
164
|
-
"review_mode": "external-manual",
|
|
165
|
-
"execution_packet": { "state": "pre-v1-unavailable", "digest": null, "limitation": "..." },
|
|
166
|
-
"receipt_ref": ".ultra/evidence/<task-id>/external-review.json",
|
|
167
|
-
"receipt_sha256": "<sha256-of-exact-receipt-bytes>",
|
|
168
|
-
"blocking_findings": [],
|
|
169
|
-
"retention": "Retain the exact external receipt bytes; it is a reconstructable observation, never semantic authority."
|
|
170
|
-
}
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
The receipt itself uses `$schema: ultra-external-review-receipt-v1` with exactly
|
|
174
|
-
`reviewer` (identity), `reviewer_role: "read-only"`, `task_id`, `change_id`,
|
|
175
|
-
`reviewer_authority` (`ref` + `sha256` of the owner record authorizing the external
|
|
176
|
-
review mode/reviewer), `reviewed_contract` (`ref` + `sha256` of the reviewed
|
|
177
|
-
contract bytes), `subject` (`git_head` 40-hex + `worktree_digest` 64-hex of the
|
|
178
|
-
reviewed product worktree), `verdict` (`approve | request_changes`), `findings` (an
|
|
179
|
-
exact array of `{id, severity, title}` with severity P0–P3 and unique ids), and an
|
|
180
|
-
RFC 3339 `timestamp`. It is a reconstructable observation of who reviewed what bytes
|
|
181
|
-
with what result — it is not semantic authority, not owner acceptance, and never a
|
|
182
|
-
fabricated strict SUMMARY/ADMISSION/session. Only current P0/P1 (or owner-promoted)
|
|
183
|
-
receipt findings may appear in `blocking_findings`, and the blocking disposition id
|
|
184
|
-
set must equal exactly the receipt's P0/P1 id set: `approve` is rejected with any
|
|
185
|
-
unresolved P0/P1, `request_changes` with none, and P2/P3 stay recorded and
|
|
186
|
-
non-blocking.
|
|
187
|
-
|
|
188
|
-
Receipt verification is mandatory: the normal canonical sensor invocation below
|
|
189
|
-
verifies an external-manual record's receipt automatically, and
|
|
190
|
-
`--verify-external-receipt` remains a compatible alias:
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
node skills/ultra-plan/scripts/validate_task_evidence.cjs \
|
|
194
|
-
.ultra/evidence/<task-id>/evidence.json
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
The sensor reuses one canonical stable bounded no-follow repository-chain snapshot
|
|
198
|
-
for the receipt, the reviewed contract, and the reviewer-authority record: the real
|
|
199
|
-
repository root and every managed parent must stay ordinary non-symlink directories
|
|
200
|
-
(identities rechecked after reading), and the final entry must be an ordinary
|
|
201
|
-
regular file. It checks only authority/provenance facts: safe normalized receipt
|
|
202
|
-
location inside the task's evidence directory and outside `.ultra/reviews/`, exact
|
|
203
|
-
stable bytes against `receipt_sha256`, the exact receipt schema, task/change
|
|
204
|
-
identity equality with the evidence, reviewed HEAD and product-worktree digest
|
|
205
|
-
equality with the completion subject, exact stable bytes and digests for the
|
|
206
|
-
reviewed contract and the reviewer-authority record, well-formed severities, the
|
|
207
|
-
exact blocker/verdict set, and that every blocking disposition binds a P0/P1
|
|
208
|
-
finding that actually exists in the receipt. A missing, malformed, symlinked,
|
|
209
|
-
special, escaped, oversized, replaced, digest-mismatched, identity- or
|
|
210
|
-
subject-mismatched, unbound-contract, unbound-authority, or substituted receipt
|
|
211
|
-
returns typed reachable repair and is never treated as accepted. It never infers
|
|
212
|
-
semantic acceptance: an `approve` verdict is a recorded observation, and owner
|
|
213
|
-
acceptance remains a separate owner-judgment.
|
|
214
|
-
|
|
215
|
-
The same invocation with `--projection` emits, after successful verification, the
|
|
216
|
-
exact branch-specific aggregate Test projection item for the record. A strict-v4
|
|
217
|
-
record keeps the byte-compatible
|
|
218
|
-
`{task_id, schema, evidence_ref, evidence_digest, task_review_session,
|
|
219
|
-
task_review_summary_digest}` shape; an external-manual record carries
|
|
220
|
-
`{task_id, schema, evidence_ref, evidence_digest, task_review_mode:
|
|
221
|
-
"external-manual", task_review_receipt_ref, task_review_receipt_digest}` instead.
|
|
222
|
-
Test, Status, and Deliver consume that mechanical result verbatim; a strict session
|
|
223
|
-
identity can never substitute for the receipt fields and neither branch's
|
|
224
|
-
projection is rewritten into the other's. The projection is withheld whenever any
|
|
225
|
-
diagnostic is present.
|
|
226
|
-
|
|
227
|
-
Aggregate Test, Status, and Deliver preserve and recheck the declared branch: strict
|
|
228
|
-
items replay the retained strict summary through the existing waiter and transport
|
|
229
|
-
consumers; external-manual items take the bounded stable receipt bytes, recompute
|
|
230
|
-
`receipt_sha256`, and rerun the sensor's verify mode instead. An aggregate
|
|
231
|
-
projection item for an external-manual task substitutes
|
|
232
|
-
`task_review_mode: "external-manual"` plus `task_review_receipt_ref` and
|
|
233
|
-
`task_review_receipt_digest` for the strict `task_review_session` and
|
|
234
|
-
`task_review_summary_digest` fields; strict items keep their existing exact shape.
|
|
235
|
-
No consumer may rewrite one branch into the other or accept a strict SUMMARY where
|
|
236
|
-
the branch declares an external receipt.
|
|
237
|
-
When the newest current-subject summary returns `REQUEST_CHANGES`, consume its exact
|
|
238
|
-
validated `findings` array rather than a count or list copied from any historical summary.
|
|
239
|
-
Preserve every finding id, resolve or authoritatively disposition every current P0/P1,
|
|
240
|
-
and refresh each affected evidence reference before creating one fresh subject and
|
|
241
|
-
review. The blocking disposition set binds only current P0/P1 findings (or a P2 the
|
|
242
|
-
owner promoted after the current review reclassified it as P1 on evidence); P2 and P3
|
|
243
|
-
findings stay recorded in the retained summary as non-blocking backlog and never block
|
|
244
|
-
closeout, and no consumer may implicitly promote them to blockers inside the same task.
|
|
245
|
-
A later summary may contain a different set; that current exact set controls
|
|
246
|
-
recovery.
|
|
247
|
-
After the final validated `SUMMARY.json`, independently capture the completion subject and immediately write one canonical `ultra-task-evidence-v2` record with its separate exact task-review binding.
|
|
248
|
-
Write `completed` to the ledger only after every blocking finding has a disposition,
|
|
249
|
-
relevant evidence is refreshed, the canonical record and context review facts are
|
|
250
|
-
durable, and both are read back.
|
|
251
|
-
|
|
252
|
-
If later work invalidates a completed task, reopening is an explicit recovery action.
|
|
253
|
-
A reopen changes the ledger-authoritative row from `completed` to `in_progress`; there
|
|
254
|
-
is no silent demotion. Before the transition, record the affected criterion IDs and reason in both the context Change Log and Resume Note. Preserve the prior frozen review
|
|
255
|
-
as historical evidence, read the ledger write back, refresh only the affected evidence,
|
|
256
|
-
obtain a new final review, then capture and publish a new completion subject.
|
|
257
|
-
|
|
258
|
-
## Aggregate Test projection
|
|
259
|
-
|
|
260
|
-
The v2 Test template carries ordered `task_evidence` immediately after `task_ids`.
|
|
261
|
-
Every item is exactly:
|
|
262
|
-
|
|
263
|
-
```json
|
|
264
|
-
{
|
|
265
|
-
"task_id": "<task-id>",
|
|
266
|
-
"schema": "ultra-task-evidence-v2",
|
|
267
|
-
"evidence_ref": ".ultra/evidence/<task-id>/evidence.json",
|
|
268
|
-
"evidence_digest": "<sha256>",
|
|
269
|
-
"task_review_session": "<review-session>",
|
|
270
|
-
"task_review_summary_digest": "<sha256>"
|
|
271
|
-
}
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
The evidence digest already binds `context.acceptance_sha256`; do not copy that field
|
|
275
|
-
into the Test projection. Historical `ultra-task-evidence-v1` remains readable and is
|
|
276
|
-
classified `legacy-v1`, but it cannot support a new v2 completion claim without an
|
|
277
|
-
honest migration.
|
|
278
|
-
|
|
279
|
-
The projection preserves each task's independently captured completion-snapshot
|
|
280
|
-
freshness observation and its separate task-review provenance. Aggregate Test binds its
|
|
281
|
-
report subject independently to the current whole Change; it never requires an earlier
|
|
282
|
-
task `subject.worktree_digest` to equal that aggregate digest and never treats the
|
|
283
|
-
retained task-review summary as proof of the completion subject. Instead it independently
|
|
284
|
-
rechecks the current Acceptance bytes, typed criterion IDs and verification types,
|
|
285
|
-
retained strict task-review summary, durable owner records, and every cited affected
|
|
286
|
-
artifact. An invalidated item uses the explicit reopen path above.
|
|
287
|
-
|
|
288
|
-
Run the structural sensor with:
|
|
289
|
-
|
|
290
|
-
```bash
|
|
291
|
-
node skills/ultra-plan/scripts/validate_task_evidence.cjs \
|
|
292
|
-
.ultra/evidence/<task-id>/evidence.json
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
The sensor resolves one input path and captures at most 8 MiB from a regular,
|
|
296
|
-
non-symlink file opened nonblocking and no-follow where the platform supports it. It
|
|
297
|
-
compares path and descriptor identity before and after the read, decodes the captured
|
|
298
|
-
bytes as strict UTF-8, and parses JSON from that same snapshot. Typed `input_*`
|
|
299
|
-
diagnostics return control for retry when the path is missing, replaced, oversized,
|
|
300
|
-
non-regular, a symlink, invalid UTF-8, or invalid JSON.
|