ultra-builder-pro-cli 0.26.2 → 5.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/.ultra-template/contexts/TEMPLATE.md +70 -29
- package/.ultra-template/north-star.md +35 -18
- package/.ultra-template/tasks.json +1 -0
- package/.ultra-template/test-report.json +17 -1
- package/CHANGELOG.md +235 -1
- package/README.md +210 -50
- package/README.zh-CN.md +440 -0
- package/adapters/_shared/host-profile.cjs +3 -95
- package/adapters/_shared/plugin-core.cjs +61 -5
- package/adapters/_shared/runtime-assets.cjs +66 -5
- package/adapters/zcode.js +375 -0
- package/bin/delegate-worker.cjs +2 -325
- package/bin/delegate.cjs +3 -461
- package/bin/install.js +11 -6
- package/docs/ARCHITECTURE.md +133 -31
- package/docs/ARTIFACT-AUTHORITY.md +185 -24
- package/docs/DECISIONS.md +153 -18
- package/docs/PHILOSOPHY.md +58 -7
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +34 -12
- package/docs/RUNTIME-COMPAT-MATRIX.md +195 -23
- package/docs/SKILL-AUTHORING.md +19 -6
- package/docs/WORKFLOW-LIFECYCLE.md +196 -44
- package/docs/evals/adversarial-review-2026-08-14.md +84 -0
- package/docs/evals/ultra-5-0-journey-results.md +62 -0
- package/docs/evals/ultra-5-0-live-acp-conformance.md +93 -0
- package/docs/evals/ultra-5-0-route-journeys.md +145 -0
- package/docs/evals/zcode-automation-2026-08-14.md +103 -0
- package/hooks/README.md +27 -4
- package/hooks/_common.py +1678 -61
- package/hooks/adapters/zcode.py +227 -0
- package/hooks/compact_context.py +176 -17
- package/hooks/mid_workflow_recall.py +27 -5
- package/hooks/post_edit_guard.py +133 -23
- package/hooks/session_context.py +707 -22
- package/package.json +7 -3
- package/skills/ultra-change/SKILL.md +69 -12
- package/skills/ultra-change/references/change-contract.md +93 -27
- package/skills/ultra-change/references/execution-grant.md +109 -0
- package/skills/ultra-change/references/primary-transfer.md +273 -0
- package/skills/ultra-change/scripts/validate_primary_transfer.cjs +1928 -0
- package/skills/ultra-delegate/SKILL.md +103 -8
- package/skills/ultra-delegate/patches/zcode-acp-0.1.0-zcode-0.16.5.patch +184 -0
- package/skills/ultra-delegate/references/delegation-contract.md +80 -1
- package/skills/ultra-delegate/scripts/acp-conformance.cjs +287 -0
- package/skills/ultra-delegate/scripts/acp-driver.cjs +762 -0
- package/skills/ultra-delegate/scripts/agent-execution-driver.cjs +320 -0
- package/skills/ultra-delegate/scripts/cli-driver.cjs +61 -0
- package/skills/ultra-delegate/scripts/delegate-worker.cjs +328 -0
- package/skills/ultra-delegate/scripts/delegate.cjs +690 -0
- package/skills/ultra-delegate/scripts/host-profile.cjs +267 -0
- package/skills/ultra-deliver/SKILL.md +98 -11
- package/skills/ultra-dev/SKILL.md +188 -42
- package/skills/ultra-grilling/SKILL.md +10 -7
- package/skills/ultra-grilling/references/reframing.md +7 -3
- package/skills/ultra-init/SKILL.md +56 -7
- package/skills/ultra-init/scripts/init_project.cjs +968 -21
- package/skills/ultra-plan/SKILL.md +91 -47
- package/skills/ultra-plan/references/task-evidence-v2.md +300 -0
- package/skills/ultra-plan/scripts/validate_task_evidence.cjs +859 -0
- package/skills/ultra-research/SKILL.md +70 -14
- package/skills/ultra-research/references/04-product-strategy.md +11 -2
- package/skills/ultra-research/references/21-features-scope.md +8 -0
- package/skills/ultra-research/references/22-success-metrics.md +4 -3
- package/skills/ultra-research/references/99-synthesis.md +19 -2
- package/skills/ultra-research/references/north-star-v2.md +168 -0
- package/skills/ultra-research/references/wayfinding.md +8 -0
- package/skills/ultra-research/scripts/validate_north_star.cjs +1174 -0
- package/skills/ultra-review/SKILL.md +201 -27
- package/skills/ultra-review/references/adversarial-evaluation.md +31 -0
- package/skills/ultra-review/references/spec.md +5 -0
- package/skills/ultra-review/references/unified-schema.md +146 -11
- package/skills/ultra-review/references/worker-packet.md +151 -8
- package/skills/ultra-review/scripts/review_wait.py +2653 -63
- package/skills/ultra-status/SKILL.md +129 -15
- package/skills/ultra-status/references/route-contract.md +100 -0
- package/skills/ultra-tdd/SKILL.md +11 -4
- package/skills/ultra-tdd/references/test-execution.md +6 -1
- package/skills/ultra-test/SKILL.md +161 -18
- package/skills/ultra-test/scripts/validate_review_transport.cjs +549 -0
- package/skills/ultra-test/scripts/worktree_digest.cjs +518 -30
- /package/{adapters/_shared → skills/ultra-delegate/scripts}/delegate-profiles/kimi-read-only.md +0 -0
- /package/{adapters/_shared → skills/ultra-delegate/scripts}/delegate-profiles/kimi-write.md +0 -0
|
@@ -3,31 +3,146 @@
|
|
|
3
3
|
Create `.ultra/reviews/<session>/WORKER-PACKET.json` once, before starting any lens.
|
|
4
4
|
Serialize it as UTF-8 JSON with a trailing newline, compute SHA-256 over those exact
|
|
5
5
|
bytes, and never edit the file. A changed scope requires a new session and packet.
|
|
6
|
+
Before serialization, read each context, the canonical `.ultra/north-star.md`, the exact
|
|
7
|
+
Change trace path, and every acceptance source from stable repository-contained
|
|
8
|
+
regular-file snapshots. Send the captured North Star bytes to the canonical validator,
|
|
9
|
+
then stable-read its reported decision and accepted-snapshot paths and verify their byte
|
|
10
|
+
lengths and SHA-256 values. Compute the recorded context SHA-256, capture the trace
|
|
11
|
+
fields, preserve each acceptance claim with its source path and heading, and write the
|
|
12
|
+
exact ordered v2 `subject_observations`. After writing the packet, run:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
python3 scripts/review_wait.py <session> packet --packet-digest <sha256>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Do not launch a worker unless that producer-side preflight returns `status: complete`.
|
|
19
|
+
On success it atomically writes the derived
|
|
20
|
+
`.ultra/reviews/<session>/ADMISSION.json` receipt. That receipt binds admission version,
|
|
21
|
+
packet digest, observed Git HEAD, stable subject byte observations, and the exact
|
|
22
|
+
canonical North Star report input plus that report's exact decision and snapshot
|
|
23
|
+
`source_observations`. The subject digest binds all of those observations. It is
|
|
24
|
+
evidence of the mechanical ingress check, not semantic authority. Publication is atomic and create-once: exact existing bytes are an
|
|
25
|
+
idempotent success, while different existing bytes return `admission_conflict` and
|
|
26
|
+
require a fresh session without replacing the first receipt. If the receipt was
|
|
27
|
+
published, a fresh canonical root rewalk must confirm the session and exact receipt
|
|
28
|
+
identity. Unresolved cleanup and directory durability failures are returned together
|
|
29
|
+
as `status: complete` with `durability_warning`; a cleanup retry that succeeds is not a
|
|
30
|
+
warning. Retain this derived evidence through Test and Deliver. If it is lost after any
|
|
31
|
+
specialist artifact or `SUMMARY.json` exists, the session is `INCOMPLETE` and must be
|
|
32
|
+
replaced by a fresh review session; do not claim the old receipt is reconstructable.
|
|
33
|
+
Before any output exists, packet mode may recreate a missing v2 receipt only from the
|
|
34
|
+
same packet-recorded bytes. A retained strict v1 packet remains readable with its exact
|
|
35
|
+
existing receipt, but packet mode never creates or recreates a v1 receipt.
|
|
6
36
|
|
|
7
37
|
```json
|
|
8
38
|
{
|
|
9
39
|
"$schema": "ultra-review-worker-packet-v1",
|
|
40
|
+
"admission_contract": "ultra-review-admission-required-v2",
|
|
10
41
|
"session": "<session-id>",
|
|
11
42
|
"mode": "task | change | plan",
|
|
12
|
-
"created_at": "<
|
|
43
|
+
"created_at": "<RFC-3339-instant>",
|
|
13
44
|
"head": "<full-git-head>",
|
|
14
45
|
"range": "<exact-diff-range>",
|
|
15
46
|
"change_id": "<active-change-id>",
|
|
16
47
|
"task_ids": ["<task-id>"],
|
|
17
48
|
"acceptance": ["<criterion with source path and heading>"],
|
|
18
49
|
"public_seams": ["<entry point or behavior>"],
|
|
50
|
+
"north_star_trace": {
|
|
51
|
+
"path": ".ultra/changes/active/<change-id>/intent.md#north-star-trace",
|
|
52
|
+
"first_principles": ["FP-1"],
|
|
53
|
+
"serves": ["NS-01"],
|
|
54
|
+
"touches": ["HC-2"],
|
|
55
|
+
"north_star_revision": "north-star-v2-r1",
|
|
56
|
+
"north_star_digest": "<git-blob-hash>"
|
|
57
|
+
},
|
|
19
58
|
"context_files": [
|
|
20
|
-
{"path": ".ultra/contexts
|
|
59
|
+
{"path": ".ultra/contexts/task-<task-id>.md", "sha256": "<digest>"}
|
|
60
|
+
],
|
|
61
|
+
"subject_observations": [
|
|
62
|
+
{"role": "change", "path": ".ultra/changes/active/<change-id>/intent.md", "sha256": "<digest>", "byte_length": 123},
|
|
63
|
+
{"role": "acceptance_source", "path": ".ultra/changes/active/<change-id>/intent.md", "sha256": "<digest>", "byte_length": 123},
|
|
64
|
+
{"role": "decision", "path": ".ultra/decisions/<decision>.md", "sha256": "<digest>", "byte_length": 456},
|
|
65
|
+
{"role": "snapshot", "path": ".ultra/research/<run>/north-star-v2-r1.accepted.md", "sha256": "<digest>", "byte_length": 789}
|
|
66
|
+
],
|
|
67
|
+
"workers": [
|
|
68
|
+
{
|
|
69
|
+
"agent": "review-spec",
|
|
70
|
+
"axis": "spec_fidelity",
|
|
71
|
+
"lens": "skills/ultra-review/references/spec.md",
|
|
72
|
+
"output": ".ultra/reviews/<session>/review-spec.json"
|
|
73
|
+
}
|
|
21
74
|
],
|
|
22
75
|
"diff_files": ["src/example.ts"],
|
|
23
76
|
"output_directory": ".ultra/reviews/<session>"
|
|
24
77
|
}
|
|
25
78
|
```
|
|
26
79
|
|
|
27
|
-
|
|
28
|
-
`
|
|
29
|
-
|
|
30
|
-
|
|
80
|
+
Every displayed top-level field is required for a current strict packet.
|
|
81
|
+
`admission_contract` has the exact value `ultra-review-admission-required-v2` for every
|
|
82
|
+
new packet.
|
|
83
|
+
`created_at` is RFC 3339; `head` is the
|
|
84
|
+
lowercase 40-hex Git commit digest; `acceptance`, `public_seams`, and `diff_files` are
|
|
85
|
+
non-empty; `task_ids` is non-empty in task mode.
|
|
86
|
+
`north_star_trace` contains exactly the six displayed fields. Its three ID arrays are
|
|
87
|
+
unique resolving IDs, `north_star_revision` is the accepted North Star `Revision`, and
|
|
88
|
+
`north_star_digest` is the lowercase 40-hex result of
|
|
89
|
+
`git hash-object .ultra/north-star.md`. Each `context_files` item contains exactly
|
|
90
|
+
`path` plus a lowercase SHA-256 `sha256`. `subject_observations` is exact and ordered:
|
|
91
|
+
the Change named by `north_star_trace.path`, each unique acceptance source sorted by
|
|
92
|
+
UTF-8 path bytes, then the canonical validator's `decision` and `snapshot`. Every item
|
|
93
|
+
contains exactly `role`, normalized repository-relative `path`, lowercase SHA-256, and
|
|
94
|
+
non-negative integer `byte_length`; each worker contains exactly the four fields shown.
|
|
95
|
+
Top-level extension fields may carry read-only review questions or historical
|
|
96
|
+
references, but they are not provenance and cannot replace a required core field.
|
|
97
|
+
|
|
98
|
+
In task mode, `context_files` is the exact ordered projection of `task_ids`: task
|
|
99
|
+
`<task-id>` maps to `.ultra/contexts/task-<task-id>.md`. Each recorded digest must equal
|
|
100
|
+
the exact current bytes. `north_star_trace.path` binds `change_id` to
|
|
101
|
+
`.ultra/changes/<active|archive|abandoned>/<change-id>/intent.md#north-star-trace`.
|
|
102
|
+
The packet producer captures the trace arrays, revision, digest, and owner-readable
|
|
103
|
+
acceptance claims from those sources. Each `acceptance` item is
|
|
104
|
+
`<repository-path>#<heading>: <captured owner-readable claim>`. Packet admission checks
|
|
105
|
+
that `head` is the current `git rev-parse HEAD`, reads the exact validated Change path,
|
|
106
|
+
every acceptance source, and both canonical validator sources as stable
|
|
107
|
+
repository-contained regular-file bytes, and compares each byte length and SHA-256 with
|
|
108
|
+
the packet. It checks the current context SHA-256 and passes the already captured North
|
|
109
|
+
Star bytes to the one canonical Research validator through its native stdin seam. The
|
|
110
|
+
report must receipt that exact path, byte count, and SHA-256, and its decision/snapshot
|
|
111
|
+
observations must equal the packet's final two observations. Admission then freshly
|
|
112
|
+
rewalks every captured subject before publication. These observations bind only paths
|
|
113
|
+
and bytes; they do not add a second Markdown parser or reinterpret meaning.
|
|
114
|
+
|
|
115
|
+
That current-subject validation occurs only in `packet` mode. Strict v4 `agents`,
|
|
116
|
+
`summary`, and Review-to-Test require the stable packet-bound `ADMISSION.json`, then
|
|
117
|
+
never reread mutable context, Change, acceptance, or North Star prose. Later task
|
|
118
|
+
completion or authority revision does not invalidate the old review; reviewing the new
|
|
119
|
+
subject requires a new session and packet. An immutable v4 session created before
|
|
120
|
+
admission receipts and lacking `admission_contract` is readable only with explicit
|
|
121
|
+
`--legacy-v4`; packet-absent or unmarked v3 history uses explicit `--legacy-v3`.
|
|
122
|
+
Either legacy flag rejects every strict v1 or v2 marker, and there is no automatic
|
|
123
|
+
fallback. A retained strict v1 packet instead consumes only its exact existing receipt.
|
|
124
|
+
|
|
125
|
+
The session argument must resolve to `<repo>/.ultra/reviews/<session>`, and `session`
|
|
126
|
+
must equal that directory name. Every designated repository path uses normalized
|
|
127
|
+
repository-relative POSIX syntax: no absolute path, backslash, empty segment, `.`,
|
|
128
|
+
`..`, or symlink escape. `output_directory` is exactly
|
|
129
|
+
`.ultra/reviews/<session>`. Worker records appear in canonical roster order and use
|
|
130
|
+
these exact bindings (a scope may select a subset, but `review-spec` is permanent and
|
|
131
|
+
always present):
|
|
132
|
+
|
|
133
|
+
| Agent | Axis | Lens | Output basename |
|
|
134
|
+
|---|---|---|---|
|
|
135
|
+
| `review-spec` | `spec_fidelity` | `skills/ultra-review/references/spec.md` | `review-spec.json` |
|
|
136
|
+
| `review-code` | `engineering_standards` | `skills/ultra-review/references/code.md` | `review-code.json` |
|
|
137
|
+
| `review-tests` | `engineering_standards` | `skills/ultra-review/references/tests.md` | `review-tests.json` |
|
|
138
|
+
| `review-errors` | `engineering_standards` | `skills/ultra-review/references/errors.md` | `review-errors.json` |
|
|
139
|
+
| `review-design` | `engineering_standards` | `skills/ultra-review/references/design.md` | `review-design.json` |
|
|
140
|
+
| `review-comments` | `engineering_standards` | `skills/ultra-review/references/comments.md` | `review-comments.json` |
|
|
141
|
+
|
|
142
|
+
The context observation used by `SUMMARY.json` is deterministic. For one context it is
|
|
143
|
+
that item's `sha256`. For zero or multiple contexts, sort items bytewise by `path`,
|
|
144
|
+
serialize the array as UTF-8 JSON with sorted object keys and no insignificant
|
|
145
|
+
whitespace, then SHA-256 those bytes.
|
|
31
146
|
|
|
32
147
|
Give a selected worker only:
|
|
33
148
|
|
|
@@ -35,6 +150,34 @@ Give a selected worker only:
|
|
|
35
150
|
2. `unified-schema.md`;
|
|
36
151
|
3. its one lens reference.
|
|
37
152
|
|
|
38
|
-
The worker writes only its assigned JSON artifact.
|
|
39
|
-
|
|
153
|
+
The worker writes only its assigned JSON artifact. During artifact and summary polling,
|
|
154
|
+
`review_wait.py` rereads the exact `WORKER-PACKET.json` bytes and requires their SHA-256
|
|
155
|
+
to remain unchanged. It binds the requested output stem to the declared worker and scope, requires
|
|
156
|
+
`scope.diff_only: true`, and rejects any `scope.files_analyzed` or finding `file`
|
|
157
|
+
outside `diff_files`. Packet, specialist, and summary inputs must be stable
|
|
158
|
+
repository-contained regular files no larger than 8 MiB; a symlink in any managed path
|
|
159
|
+
component, FIFO, other special file, replacement during a read, oversized file, invalid UTF-8, or invalid JSON
|
|
160
|
+
return typed `incomplete` diagnostics. JSON parsing and SHA-256 always consume the same
|
|
161
|
+
captured bytes. Finding trace IDs outside the packet arrays are invalid.
|
|
162
|
+
The artifact's `packet_digest` must equal the expected digest passed to the waiter; a
|
|
163
|
+
merely well-formed digest is insufficient.
|
|
164
|
+
Every strict current artifact and `SUMMARY.json` also carries `admission_digest`, the
|
|
165
|
+
SHA-256 of the exact retained `ADMISSION.json` bytes, and `subject_digest`, copied from
|
|
166
|
+
that receipt. Both must exactly match the receipt loaded at waiter start. The waiter
|
|
167
|
+
pins that pair across every polling and final reload, so a changed or missing receipt
|
|
168
|
+
makes the session `INCOMPLETE` and requires a fresh session. Pre-admission historical
|
|
169
|
+
v4 artifacts may omit the pair only when read with explicit `--legacy-v4`.
|
|
40
170
|
The coordinator owns worker selection, synthesis, repair, and the summary.
|
|
171
|
+
|
|
172
|
+
## Review history: one direct parent only
|
|
173
|
+
|
|
174
|
+
A task review packet may carry at most one direct parent. The sanctioned channel is
|
|
175
|
+
the optional top-level `review_history` object with exactly `parent_summary_ref`
|
|
176
|
+
(one prior session's `SUMMARY.json` path), `parent_summary_digest`, and
|
|
177
|
+
`unresolved_blocking_ids` — only the parent's still-unresolved current P0/P1 finding
|
|
178
|
+
ids. Packet admission rejects any packet whose fields or extensions reference more
|
|
179
|
+
than one foreign review session. Transitive summary chains, complete historical
|
|
180
|
+
findings, and whole-history disposition requests must not enter a new packet: a delta
|
|
181
|
+
review consumes the current subject, its one direct parent, and the exact evidence
|
|
182
|
+
refs the delta touches. The full archive stays readable under `.ultra/reviews/**` and
|
|
183
|
+
is read only for a dedicated incident or owner audit.
|