ultra-builder-pro-cli 0.26.1 → 3.0.2
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 +64 -29
- package/.ultra-template/north-star.md +36 -30
- package/.ultra-template/project-brief.md +28 -0
- package/.ultra-template/specs/product.md +4 -0
- package/.ultra-template/specs/research-distillate.md +8 -0
- package/.ultra-template/tasks.json +1 -0
- package/.ultra-template/test-report.json +18 -1
- package/CHANGELOG.md +227 -1
- package/README.md +161 -59
- package/adapters/_shared/host-profile.cjs +68 -12
- package/adapters/_shared/plugin-core.cjs +4 -5
- package/adapters/_shared/runtime-assets.cjs +11 -2
- package/adapters/zcode.js +375 -0
- package/bin/delegate-worker.cjs +20 -0
- package/bin/delegate.cjs +94 -25
- package/bin/install.js +11 -6
- package/docs/ARCHITECTURE.md +109 -25
- package/docs/ARTIFACT-AUTHORITY.md +204 -30
- package/docs/DECISIONS.md +141 -10
- package/docs/PHILOSOPHY.md +61 -8
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +6 -0
- package/docs/RUNTIME-COMPAT-MATRIX.md +106 -13
- package/docs/SKILL-AUTHORING.md +14 -9
- package/docs/WORKFLOW-LIFECYCLE.md +211 -53
- package/docs/evals/adversarial-review-2026-08-14.md +84 -0
- package/docs/evals/zcode-automation-2026-08-14.md +103 -0
- package/hooks/README.md +31 -3
- package/hooks/_common.py +1699 -33
- 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 +722 -11
- package/package.json +6 -3
- package/skills/ultra-change/SKILL.md +84 -64
- package/skills/ultra-change/references/change-contract.md +130 -32
- 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 +38 -5
- package/skills/ultra-delegate/references/delegation-contract.md +21 -1
- package/skills/ultra-deliver/SKILL.md +123 -44
- package/skills/ultra-deliver/references/baseline-reconciliation.md +5 -3
- package/skills/ultra-dev/SKILL.md +173 -43
- package/skills/ultra-grilling/SKILL.md +19 -16
- package/skills/ultra-grilling/references/reframing.md +7 -3
- package/skills/ultra-init/SKILL.md +99 -87
- package/skills/ultra-init/references/brownfield-adoption.md +23 -40
- package/skills/ultra-init/scripts/init_project.cjs +968 -21
- package/skills/ultra-plan/SKILL.md +83 -46
- 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 +119 -68
- package/skills/ultra-research/references/{03-competitive-landscape.md → 03-alternatives.md} +6 -6
- 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 +9 -4
- package/skills/ultra-research/references/99-synthesis.md +25 -1
- package/skills/ultra-research/references/north-star-v2.md +168 -0
- package/skills/ultra-research/references/wayfinding.md +50 -0
- package/skills/ultra-research/scripts/validate_north_star.cjs +1174 -0
- package/skills/ultra-review/SKILL.md +201 -24
- 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 +146 -32
- package/skills/ultra-tdd/SKILL.md +14 -4
- package/skills/ultra-tdd/references/test-execution.md +6 -1
- package/skills/ultra-test/SKILL.md +157 -15
- package/skills/ultra-test/scripts/validate_review_transport.cjs +549 -0
- package/skills/ultra-test/scripts/worktree_digest.cjs +551 -29
- package/skills/ultra-think/SKILL.md +5 -10
- package/skills/ultra-think/references/interaction-boundary.md +2 -1
|
@@ -1,119 +1,131 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-init
|
|
3
|
-
description:
|
|
3
|
+
description: Create or recover Ultra's repository-local skeleton and raw Project Brief without performing product research. Use when `.ultra` is absent or partial in a new or existing codebase and later workflows need stable file paths, preserved authority, and Git.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Create the skeleton and capture only the initial project outline
|
|
7
7
|
|
|
8
|
-
Initialization
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
The dividing line against research is **authorization versus claim**. What the
|
|
13
|
-
owner authorizes comes out of their head and evidence cannot overturn it. What
|
|
14
|
-
research collects is a claim about the outside world, which evidence can confirm
|
|
15
|
-
or refute. A technology choice is a claim, so it is not initialization's business
|
|
16
|
-
— and a new project has no configuration files to read anyway.
|
|
8
|
+
Initialization establishes places for later authority and records raw owner intake. It
|
|
9
|
+
does not validate the problem, establish a North Star, build a product or architecture
|
|
10
|
+
baseline, settle domain language, choose a Change, or start another public workflow.
|
|
17
11
|
|
|
18
12
|
## Before you start
|
|
19
13
|
|
|
20
|
-
1.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
1. If `.ultra/changes/active/` exists, resolve at most one active `change_id`. Read
|
|
15
|
+
`.ultra/tasks.json` if it exists, plus the `context_file` and closing `## Resume Note`
|
|
16
|
+
of unfinished tasks matching that id. Historical unfinished rows do not turn a
|
|
17
|
+
partial skeleton into current work. A partial `.ultra/` is recovery work.
|
|
18
|
+
2. Read `.ultra/project-brief.md`, `.ultra/north-star.md`, `CONTEXT.md`, and relevant
|
|
19
|
+
`.ultra/decisions/` when they exist. Preserve accepted authority byte-for-byte.
|
|
20
|
+
3. Establish the repository root, Git state, and whether meaningful code or maintained
|
|
21
|
+
documentation exists from the filesystem. Do not ask the owner for those facts.
|
|
25
22
|
|
|
26
23
|
## Definition of done
|
|
27
24
|
|
|
28
|
-
- `.ultra/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- Every
|
|
35
|
-
|
|
36
|
-
- `.git` exists.
|
|
37
|
-
- Nothing is invented: what is unknown says `[NEEDS CLARIFICATION]`.
|
|
38
|
-
|
|
39
|
-
## Which route
|
|
25
|
+
- `.ultra/project-brief.md` contains raw owner intake: one line, a broad outline,
|
|
26
|
+
explicit inputs already supplied, and open questions handed to Research.
|
|
27
|
+
- For a new skeleton, a structurally complete North Star v2 with status `unresearched`
|
|
28
|
+
and the three specification skeletons exist. Init does not populate `FP-*`, `NS-*`,
|
|
29
|
+
or `HC-*`; recovery preserves any populated authority, and Init does not create
|
|
30
|
+
`CONTEXT.md`.
|
|
31
|
+
- Every packaged path was read back after copying, while every pre-existing file stayed
|
|
32
|
+
byte-identical.
|
|
33
|
+
- `.git` exists. Commit, push, remote creation, and publication remain separate effects.
|
|
40
34
|
|
|
41
|
-
|
|
35
|
+
## Classify only for preservation
|
|
42
36
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
| Neither | Greenfield | Write everything |
|
|
37
|
+
Use `references/brownfield-adoption.md` when source, runtime configuration, tests, or
|
|
38
|
+
maintained product documentation already exist. Classification changes what must be
|
|
39
|
+
preserved and what Research should inspect; it never authorizes Init to write observed
|
|
40
|
+
product behavior into a specification.
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
are evidence or an explicitly retained authority; they never justify omitting the
|
|
51
|
-
canonical specification skeleton that downstream workflows require.
|
|
42
|
+
## Draw out the brief, then stop
|
|
52
43
|
|
|
53
|
-
|
|
44
|
+
Follow `../ultra-grilling/SKILL.md` with only these required fields:
|
|
54
45
|
|
|
55
|
-
|
|
56
|
-
the owner cannot state what they want up front. Start from what they already said
|
|
57
|
-
when invoking you, restate it for confirmation, and ask only about what is
|
|
58
|
-
genuinely missing. Five things come out of it:
|
|
59
|
-
|
|
60
|
-
| What you draw out | Where it lands |
|
|
46
|
+
| Raw intake | Project Brief section |
|
|
61
47
|
|---|---|
|
|
62
|
-
| What
|
|
63
|
-
| What
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
| **What you already know you are unsure about** | `discovery.md` — research's priority queue |
|
|
48
|
+
| What the owner wants to build, in one sentence and their words | `## One-line` |
|
|
49
|
+
| What it is, broadly for whom or what, intended result, broad boundary | `## Initial Outline` |
|
|
50
|
+
| Constraints, materials, and decisions the owner already volunteered | `## Explicit Inputs` |
|
|
51
|
+
| Questions already visible but requiring evidence or deeper decisions | `## Open Questions for Research` |
|
|
67
52
|
|
|
68
|
-
|
|
69
|
-
|
|
53
|
+
Ask only enough to distinguish materially different outlines. If an answer would define
|
|
54
|
+
a problem, actor evidence, desired outcome, success measure, product strategy, accepted
|
|
55
|
+
constraint, domain term, requirement, or architecture, record it as an input or open
|
|
56
|
+
question and stop drilling. Research owns that maturation and must not re-ask an answer
|
|
57
|
+
unless evidence conflicts with it.
|
|
70
58
|
|
|
71
|
-
##
|
|
59
|
+
## Write and recover the skeleton
|
|
72
60
|
|
|
73
61
|
Resolve this loaded Skill's directory, then run
|
|
74
|
-
`node <ultra-init-skill-dir>/scripts/init_project.cjs --project <repository-root>`.
|
|
75
|
-
only missing files from `assets/project-template`,
|
|
76
|
-
|
|
77
|
-
|
|
62
|
+
`node <ultra-init-skill-dir>/scripts/init_project.cjs --project <repository-root>`.
|
|
63
|
+
The script stages and reads back only missing files from `assets/project-template`,
|
|
64
|
+
validates the staged North Star from its raw bytes, and then publishes a complete new
|
|
65
|
+
`.ultra/` by atomic rename. Partial recovery publishes each staged file atomically
|
|
66
|
+
without clobbering a concurrent or existing path. A validation or publication failure
|
|
67
|
+
removes a published path only while its current stable identity and digest still match
|
|
68
|
+
this invocation's recorded publication. A workspace edit is preserved and returns the
|
|
69
|
+
typed retryable `initialization_snapshot_changed` diagnostic. Init binds every preserved
|
|
70
|
+
file to one nonblocking, no-follow descriptor/path identity and SHA-256 digest, then
|
|
71
|
+
rechecks all of them before staging, before publication, and before success. It likewise
|
|
72
|
+
captures every staged digest before publication and compares it with a stable target
|
|
73
|
+
snapshot before success. Each file publication takes fresh no-symlink parent-chain and
|
|
74
|
+
resolved-root identity snapshots before and after the effect; detectable directory drift
|
|
75
|
+
stops publication. A failed snapshot `lstat`, `open`, `fstat`, or `read` with no observed
|
|
76
|
+
identity, type, size, or digest change instead returns the typed retryable
|
|
77
|
+
`initialization_snapshot_io_error`; its sanitized `operation`, symbolic `errno`, and
|
|
78
|
+
actionable permission, descriptor-limit, or storage recovery remain in the
|
|
79
|
+
`ultra-init-error-v1` result. The North Star compatibility diagnostic remains
|
|
80
|
+
`preserved_north_star_changed`. A malformed packaged placeholder stops before publication
|
|
81
|
+
with an `ultra-init-error-v1` payload whose `code` is `north_star_template_invalid` and
|
|
82
|
+
whose `diagnostics` preserve the canonical validator entries, including
|
|
83
|
+
`invalid_unresearched_placeholder` for an exact-byte mismatch.
|
|
84
|
+
|
|
85
|
+
This recovery contract assumes a cooperative local workspace. It detects observable
|
|
86
|
+
path-identity or byte drift and preserves the current bytes for retry; it does not claim
|
|
87
|
+
that Node filesystem calls can defeat a malicious operating-system-level replacement.
|
|
88
|
+
Init also binds the root identity of its staging directory. Cleanup recursively removes
|
|
89
|
+
that path only after a fresh no-symlink root rewalk proves the same device and inode. If
|
|
90
|
+
the path was replaced, Init leaves it untouched and returns the retryable typed
|
|
91
|
+
`initialization_cleanup_conflict` diagnostic with the owned identity and manual recovery
|
|
92
|
+
instruction. If a typed initialization failure is already pending, that primary
|
|
93
|
+
diagnostic remains the top-level `ultra-init-error-v1` result and the cleanup diagnostic
|
|
94
|
+
is retained under `cleanup_conflict`, including its identity-bound manual recovery.
|
|
95
|
+
On success every existing file stayed byte-identical and every new file matches its
|
|
96
|
+
packaged digest.
|
|
78
97
|
|
|
79
98
|
```text
|
|
80
|
-
.ultra/
|
|
81
|
-
.ultra/
|
|
82
|
-
.ultra/
|
|
83
|
-
.ultra/
|
|
84
|
-
.ultra/{
|
|
85
|
-
|
|
99
|
+
.ultra/project-brief.md raw intake and initial outline
|
|
100
|
+
.ultra/north-star.md unresearched Research-owned placeholder
|
|
101
|
+
.ultra/specs/{product,architecture,discovery}.md empty specification skeletons
|
|
102
|
+
.ultra/specs/research-distillate.md empty Research synthesis skeleton
|
|
103
|
+
.ultra/{tasks.json,test-report.json} empty or not-yet-run ledgers
|
|
104
|
+
.ultra/{contexts,decisions,evidence,research}/
|
|
105
|
+
.ultra/changes/{active,archive,abandoned}/
|
|
86
106
|
```
|
|
87
107
|
|
|
88
|
-
The
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
108
|
+
The script reports `created_unresearched` for a new placeholder. For a preserved file it
|
|
109
|
+
reports exactly `preserved_unresearched`, `preserved_accepted`, `preserved_legacy`, or
|
|
110
|
+
`preserved_unknown`; unknown or malformed content is never described as authority. For
|
|
111
|
+
a legacy `north-star.md` containing the actual v0.26 headings or the older `## One-line`
|
|
112
|
+
form, keep that file byte-identical.
|
|
113
|
+
When the new Project Brief is still unresolved, copy the legacy one-line verbatim into
|
|
114
|
+
it and list legacy hard constraints under Explicit Inputs without assigning new IDs.
|
|
115
|
+
Research later proposes the accepted North Star; it never rewrites history silently.
|
|
94
116
|
|
|
95
|
-
Git
|
|
96
|
-
|
|
97
|
-
If `.git` is absent, run `git init`. Report the uncommitted initialized files and ask
|
|
98
|
-
for commit authority only if the owner wants that separate effect now.
|
|
117
|
+
Git supplies revision identity, history, comparison, archive moves, and rollback. Run
|
|
118
|
+
`git init` only when `.git` is absent, then report the uncommitted scaffold.
|
|
99
119
|
|
|
100
120
|
## When the owner decides
|
|
101
121
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
Where the host cannot ask at all, leave the one-line goal empty and say plainly
|
|
107
|
-
that it is empty. Do not infer it from the directory name. An empty one-line goal
|
|
108
|
-
is a **blocking** state, not a note: goal injection, boundary read-back and a
|
|
109
|
-
Change's touched-constraints field all read from it, so planning and development
|
|
110
|
-
must not start until it is filled. Say that too, and recommend rerunning this
|
|
111
|
-
skill on a host that can ask.
|
|
122
|
+
The owner confirms the one-line outline and any replacement of healthy authority. Where
|
|
123
|
+
the host cannot ask, leave unresolved fields explicit and recommend resuming Init on a
|
|
124
|
+
host that can; do not infer intent from the directory name. Recommend Research after a
|
|
125
|
+
usable brief exists, but do not invoke it.
|
|
112
126
|
|
|
113
127
|
## References
|
|
114
128
|
|
|
115
|
-
- `../ultra-grilling/SKILL.md` —
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
- `../ultra-think/references/autonomy-boundary.md` — read before touching
|
|
119
|
-
authority that already exists.
|
|
129
|
+
- `../ultra-grilling/SKILL.md` — read before the first missing brief field.
|
|
130
|
+
- `references/brownfield-adoption.md` — read when maintained behavior already exists.
|
|
131
|
+
- `../ultra-think/references/autonomy-boundary.md` — read before replacing authority.
|
|
@@ -1,49 +1,32 @@
|
|
|
1
|
-
# Brownfield
|
|
1
|
+
# Brownfield initialization
|
|
2
2
|
|
|
3
|
-
Use this procedure only when `ultra-init`
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Use this procedure only when `ultra-init` finds maintained behavior but no healthy,
|
|
4
|
+
complete Ultra skeleton. Init preserves the checkout and prepares an evidence route; it
|
|
5
|
+
does not establish the brownfield baseline.
|
|
6
6
|
|
|
7
7
|
## Bind the repository boundary
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
generated
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
Identify the repository root, selected workspace roots, branch, `HEAD`, dirty files,
|
|
10
|
+
generated or vendored exclusions, manifests, maintained documents, verification
|
|
11
|
+
commands, and visible public entry points. Resolve these from files and Git instead of
|
|
12
|
+
asking the owner.
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Preserve before interpreting
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
- Never replace existing `.ultra` files, `CONTEXT.md`, decisions, or maintained project
|
|
17
|
+
documents merely to obtain the current template shape.
|
|
18
|
+
- Treat source, tests, runtime configuration, and documentation as evidence candidates,
|
|
19
|
+
not conclusions Init may promote.
|
|
20
|
+
- Keep out-of-scope dirty files visible in the report without adding them to the
|
|
21
|
+
Project Brief or specification skeletons.
|
|
22
|
+
- Record an exact legacy one-line as raw intake only when the Project Brief is empty.
|
|
20
23
|
|
|
21
|
-
##
|
|
24
|
+
## Prepare the Research handoff
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
unresolved questions.
|
|
28
|
-
- Initialize `.ultra/tasks.json` and `.ultra/test-report.json` from the packaged
|
|
29
|
-
templates without manufacturing passing results.
|
|
26
|
+
List the concrete paths and live seams that can answer each open baseline question.
|
|
27
|
+
`ultra-research` establishes the observed and accepted baseline from those sources. Init
|
|
28
|
+
does not run verification, classify delivered behavior, reconcile documentation drift,
|
|
29
|
+
or write product, discovery, or architecture conclusions.
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## Characterize verification
|
|
35
|
-
|
|
36
|
-
Run the repository's existing verification commands. Record each result as `pass`,
|
|
37
|
-
`known_red`, or `not_run`; a missing command is not a pass. A critical public seam
|
|
38
|
-
without a stable signal is an explicit gap, not an excuse to invent completion.
|
|
39
|
-
|
|
40
|
-
## Converge
|
|
41
|
-
|
|
42
|
-
Read every written file back, show the owner the selected scope, observed behavior,
|
|
43
|
-
drift, known-red verification, unknowns, and material decisions, and leave unresolved
|
|
44
|
-
items marked `[NEEDS CLARIFICATION]`. Adoption is ready when the file set is complete,
|
|
45
|
-
the recorded revision matches the inspected checkout, and every material gap remains
|
|
46
|
-
visible with its evidence and owner decision where one exists.
|
|
47
|
-
|
|
48
|
-
Recommend `ultra-change` for subsequent work and stop; public skills do not invoke one
|
|
49
|
-
another.
|
|
31
|
+
Report the preserved files, repository boundary, candidate evidence, and unresolved
|
|
32
|
+
questions. Recommend Research and stop; public workflows never invoke one another.
|