ultra-builder-pro-cli 0.26.2 → 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 +35 -18
- package/.ultra-template/tasks.json +1 -0
- package/.ultra-template/test-report.json +17 -1
- package/CHANGELOG.md +163 -1
- package/README.md +108 -38
- 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 +84 -23
- package/docs/ARTIFACT-AUTHORITY.md +167 -22
- package/docs/DECISIONS.md +131 -17
- package/docs/PHILOSOPHY.md +58 -7
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +6 -0
- package/docs/RUNTIME-COMPAT-MATRIX.md +106 -13
- package/docs/SKILL-AUTHORING.md +4 -3
- package/docs/WORKFLOW-LIFECYCLE.md +126 -28
- 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 +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 +6 -3
- package/skills/ultra-change/SKILL.md +40 -9
- 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 +24 -2
- package/skills/ultra-delegate/references/delegation-contract.md +21 -1
- package/skills/ultra-deliver/SKILL.md +85 -11
- package/skills/ultra-dev/SKILL.md +171 -41
- package/skills/ultra-grilling/SKILL.md +10 -7
- package/skills/ultra-grilling/references/reframing.md +7 -3
- package/skills/ultra-init/SKILL.md +44 -7
- package/skills/ultra-init/scripts/init_project.cjs +968 -21
- package/skills/ultra-plan/SKILL.md +70 -44
- 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 +38 -10
- 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 +95 -11
- package/skills/ultra-tdd/SKILL.md +11 -4
- package/skills/ultra-tdd/references/test-execution.md +6 -1
- package/skills/ultra-test/SKILL.md +145 -17
- package/skills/ultra-test/scripts/validate_review_transport.cjs +549 -0
- package/skills/ultra-test/scripts/worktree_digest.cjs +518 -30
|
@@ -5,26 +5,36 @@ description: Turn a raw Project Brief or scoped evidence gap into an accepted No
|
|
|
5
5
|
|
|
6
6
|
# Mature a project outline into an evidence-backed baseline
|
|
7
7
|
|
|
8
|
-
Research
|
|
8
|
+
Research is the first semantic writer of North Star v2 and owns the first accepted
|
|
9
|
+
baseline plus later evidence-backed corrections. Web
|
|
9
10
|
search is one evidence source, not the workflow: repository files, Git, tests, runtime,
|
|
10
11
|
maintained documentation, owner decisions, and current primary sources all count.
|
|
11
12
|
|
|
12
13
|
## Before you start
|
|
13
14
|
|
|
14
|
-
1.
|
|
15
|
+
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.
|
|
16
|
+
2. Resolve at most one active `change_id`, then read `.ultra/tasks.json` plus the
|
|
15
17
|
`context_file` and `## Resume Note` of unfinished tasks whose `change_id` matches it,
|
|
16
18
|
if any. Archived or abandoned unfinished rows are history, not the current frontier.
|
|
17
|
-
|
|
19
|
+
3. Read `.ultra/project-brief.md`. For a legacy project without it, treat the exact
|
|
18
20
|
`.ultra/north-star.md` `## One-line` as raw intake until a brief is preserved.
|
|
19
|
-
|
|
21
|
+
4. Read existing `.ultra/north-star.md`, specifications, `CONTEXT.md`, relevant
|
|
20
22
|
`.ultra/decisions/`, active Change intent, evidence, Git state, and maintained docs.
|
|
23
|
+
Run `node <ultra-research-skill-dir>/scripts/validate_north_star.cjs
|
|
24
|
+
.ultra/north-star.md`; this entry captures one bounded regular non-symlink snapshot
|
|
25
|
+
and returns a typed repair diagnostic instead of following, blocking on, or validating
|
|
26
|
+
a changing path. Treat `unresearched` as an empty destination and `legacy_unadopted`
|
|
27
|
+
as preserved intake for explicit adoption, not accepted v2 truth.
|
|
21
28
|
|
|
22
29
|
## Definition of done
|
|
23
30
|
|
|
24
31
|
- Every selected lens has a cited `.ultra/research/<run-id>/<area>.md` report and its
|
|
25
|
-
canonical specification section contains the current conclusion.
|
|
32
|
+
canonical specification section contains the current conclusion and North Star relation.
|
|
26
33
|
- The accepted North Star, shared vocabulary, product baseline, and architecture
|
|
27
34
|
baseline are sufficient for the current planning boundary; unknowns stay explicit.
|
|
35
|
+
- The North Star follows `references/north-star-v2.md`; all `FP-*`, `NS-*`, and `HC-*`
|
|
36
|
+
definitions and references pass the structural validator without making that result
|
|
37
|
+
a semantic verdict.
|
|
28
38
|
- `99-synthesis.md` names what was promoted, overturned, deferred, or left blocking.
|
|
29
39
|
- `.ultra/specs/research-distillate.md` stores the Git blob hash of each specification
|
|
30
40
|
it summarizes. A mismatch makes the distillate stale, never authoritative.
|
|
@@ -50,6 +60,8 @@ The first six lenses have real semantic dependencies:
|
|
|
50
60
|
The later groups turn that premise into product behavior (`10` through `22`), then an
|
|
51
61
|
architecture and operating baseline (`30` through `41`). The three owner checkpoints
|
|
52
62
|
remain `04-product-strategy`, `21-features-scope`, and `99-synthesis`.
|
|
63
|
+
At each checkpoint, use `../ultra-think/SKILL.md` for an adversarial challenge of the
|
|
64
|
+
working candidate before asking the owner to accept direction, scope, or synthesis.
|
|
53
65
|
|
|
54
66
|
Only areas with satisfied inputs may fan out through native bounded subagents. Never
|
|
55
67
|
parallelize a lens whose question depends on an unresolved earlier conclusion.
|
|
@@ -61,6 +73,8 @@ For each selected lens:
|
|
|
61
73
|
1. Inspect reachable facts before asking. Search current primary sources when a claim
|
|
62
74
|
depends on current external reality.
|
|
63
75
|
2. Separate Observed, Verified, Decided, Inference, and Unknown; cite external claims.
|
|
76
|
+
Record `north_star_effect: supports | refines | contradicts | independent` and
|
|
77
|
+
`north_star_claim: <the evidenced causal relation>` in the area report.
|
|
64
78
|
3. Follow `../ultra-grilling/SKILL.md` when a required owner field is missing. The lens
|
|
65
79
|
supplies what to ask; Grilling supplies the one-question interaction loop.
|
|
66
80
|
4. Follow `../ultra-think/SKILL.md` for one consequential trade-off, not for mapping the
|
|
@@ -81,12 +95,23 @@ other evidence. Missing tooling lowers confidence; it does not manufacture a blo
|
|
|
81
95
|
|
|
82
96
|
## Synthesize the accepted baseline
|
|
83
97
|
|
|
84
|
-
`04-product-strategy` proposes
|
|
98
|
+
`04-product-strategy` proposes problem reality and falsifiable first-principle
|
|
99
|
+
propositions. `22-success-metrics` determines whether a
|
|
85
100
|
single North Star metric is justified or whether an observable outcome plus guardrails
|
|
86
|
-
is more honest.
|
|
87
|
-
the
|
|
88
|
-
|
|
89
|
-
|
|
101
|
+
is more honest. Follow `references/north-star-v2.md`: validate a mutable candidate while
|
|
102
|
+
the last accepted revision remains current, show the owner the semantic delta and
|
|
103
|
+
unresolved contradictions, and preserve one stable `.ultra/decisions/<id>.md` acceptance
|
|
104
|
+
record with the owner's exact words, conversation scope, the model's responsibility for
|
|
105
|
+
final wording, and no invented timestamp or inheritance by a future revision. Only after
|
|
106
|
+
the owner accepts the candidate, atomically replace `.ultra/north-star.md`, then update the three
|
|
107
|
+
specifications, domain language, qualifying decisions, and distillate for the first
|
|
108
|
+
baseline. A scoped Research run updates only its mapped specification sections and then
|
|
109
|
+
refreshes the distillate's three source hashes.
|
|
110
|
+
|
|
111
|
+
When an accepted revision supersedes another, preserve prior evidence and report every
|
|
112
|
+
active Change whose recorded revision or digest differs as a stale observation requiring
|
|
113
|
+
Change reconciliation. Supersession never deletes evidence, rewrites a Change silently,
|
|
114
|
+
or grants execution.
|
|
90
115
|
|
|
91
116
|
Load `references/99-synthesis.md` only after selected reports exist. Read every promoted
|
|
92
117
|
file back, verify trace anchors and source hashes, and report exact unresolved gaps.
|
|
@@ -108,4 +133,7 @@ selects methods, and updates accepted files inside that frame.
|
|
|
108
133
|
- `references/30-architecture-context.md` through `references/41-quality-risks.md` —
|
|
109
134
|
system boundary, implementation evidence, operations, and risk.
|
|
110
135
|
- `references/99-synthesis.md` — load last, after selected reports exist.
|
|
136
|
+
- `references/north-star-v2.md` — exact semantic structure, adoption, validation, and
|
|
137
|
+
supersession contract.
|
|
138
|
+
- `../ultra-change/references/execution-grant.md` — read only for grant-activated continuation.
|
|
111
139
|
- `../ultra-think/references/autonomy-boundary.md` — read before reducing authority.
|
|
@@ -4,8 +4,8 @@ Use for workflow step `04-product-strategy`.
|
|
|
4
4
|
|
|
5
5
|
## Objective
|
|
6
6
|
|
|
7
|
-
Turn accepted evidence into
|
|
8
|
-
and explicit tradeoffs.
|
|
7
|
+
Turn accepted evidence into problem reality, falsifiable first-principle propositions,
|
|
8
|
+
a product direction, target boundary, value proposition, and explicit tradeoffs.
|
|
9
9
|
|
|
10
10
|
## Evidence and decisions
|
|
11
11
|
|
|
@@ -13,6 +13,8 @@ and explicit tradeoffs.
|
|
|
13
13
|
- Ask the owner when a scope, customer, business, or risk decision is load-bearing.
|
|
14
14
|
- Do not infer an MVP, reduced scope, release phase, or commercial posture.
|
|
15
15
|
- Record exclusions only when the owner or an accepted constraint establishes them.
|
|
16
|
+
- For each proposed `FP-*`, record evidence, causal consequence, and the falsifier or
|
|
17
|
+
revisit trigger. The ID becomes canonical only in an owner-accepted synthesis.
|
|
16
18
|
|
|
17
19
|
## Record
|
|
18
20
|
|
|
@@ -22,6 +24,7 @@ Update `discovery.md` with:
|
|
|
22
24
|
- value delivered through observable behavior;
|
|
23
25
|
- chosen tradeoffs and their rationale;
|
|
24
26
|
- constraints, exclusions, and unresolved decisions;
|
|
27
|
+
- the candidate `FP-* -> capability -> behavior -> outcome` causal chain;
|
|
25
28
|
- any defensibility claim with its supporting evidence.
|
|
26
29
|
|
|
27
30
|
Complete the step with decision and evidence references plus the updated output path.
|
|
@@ -30,3 +33,9 @@ Complete the step with decision and evidence references plus the updated output
|
|
|
30
33
|
|
|
31
34
|
In the area report, record `tradeoff` and `rationale`, then link the decision file or
|
|
32
35
|
specification anchor to the problems, opportunities, or constraints that support it.
|
|
36
|
+
|
|
37
|
+
## Adversarial challenge
|
|
38
|
+
|
|
39
|
+
Before the owner checkpoint, challenge whether the proposed direction follows from the
|
|
40
|
+
underlying problem and first principles, steel-man the best conflicting direction, and
|
|
41
|
+
name evidence that would overturn the working North Star candidate.
|
|
@@ -13,6 +13,8 @@ excluded, deferred, or unresolved.
|
|
|
13
13
|
- Never infer an MVP, reduced version, phase label, or omission from implementation
|
|
14
14
|
convenience.
|
|
15
15
|
- Trace included capabilities to requirements and observable outcomes.
|
|
16
|
+
- Trace each included capability to candidate `FP-*` and `NS-*` IDs, and name every
|
|
17
|
+
candidate `HC-*` it could breach, without copying North Star prose.
|
|
16
18
|
- Record dependencies, migrations, compatibility, and operational obligations inside
|
|
17
19
|
the capability that owns them.
|
|
18
20
|
- Keep speculative future ideas outside the active scope unless selected.
|
|
@@ -28,3 +30,9 @@ Complete the step with decision evidence and the updated output path.
|
|
|
28
30
|
|
|
29
31
|
In the area report, record `requirement_ids`, `scope_status`, and `rationale`, then link
|
|
30
32
|
the capability heading in `product.md`.
|
|
33
|
+
|
|
34
|
+
## Adversarial challenge
|
|
35
|
+
|
|
36
|
+
Before the owner checkpoint, challenge whether every included capability causally serves
|
|
37
|
+
the working North Star, whether an exclusion breaks that outcome or a hard constraint,
|
|
38
|
+
and whether the proposed scope can optimize a proxy while missing delivered value.
|
|
@@ -12,8 +12,9 @@ including signals that would reveal harmful optimization.
|
|
|
12
12
|
- Derive measurements from accepted outcomes and available instrumentation.
|
|
13
13
|
- State definition, source, observation window, owner, and decision use.
|
|
14
14
|
- Separate current measurements, target decisions, and unavailable telemetry.
|
|
15
|
-
- Propose one
|
|
16
|
-
credible observation contract.
|
|
15
|
+
- Propose one or more stable `NS-*` outcomes when justified by delivered value and a
|
|
16
|
+
credible observation contract. Each records observation method, baseline, target or
|
|
17
|
+
expected change, horizon, and anti-metric.
|
|
17
18
|
- Do not force a single metric, or invent baselines and targets, when guardrails plus an
|
|
18
19
|
observable outcome represent the product more honestly.
|
|
19
20
|
|
|
@@ -21,7 +22,7 @@ including signals that would reveal harmful optimization.
|
|
|
21
22
|
|
|
22
23
|
Update `product.md` with supporting outcome measures, operational measures, guardrails,
|
|
23
24
|
evidence availability, and unresolved instrumentation needs. Propose the canonical
|
|
24
|
-
`NS
|
|
25
|
+
`NS-*` entries for `north-star.md`; they become authority only through accepted synthesis.
|
|
25
26
|
A metric that cannot be observed is a gap or explicit future Change.
|
|
26
27
|
|
|
27
28
|
Complete the step with evidence references and the updated output path.
|
|
@@ -17,11 +17,22 @@ creating a second condensed authority.
|
|
|
17
17
|
- Documentation conflicts, known failures, and load-bearing unknowns are in the gap
|
|
18
18
|
ledger with owners or explicit decisions.
|
|
19
19
|
- Verification commands and observed results are current.
|
|
20
|
+
- Every accepted `FP-*` has evidence, causal consequence, and a falsifier or revisit
|
|
21
|
+
trigger; every `NS-*` has an observation contract and anti-metric; every `HC-*` names
|
|
22
|
+
the protected value or threat, authority, and revisit condition.
|
|
20
23
|
|
|
21
24
|
## Record
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
Follow `north-star-v2.md`. Validate the complete mutable candidate with
|
|
27
|
+
`scripts/validate_north_star.cjs` while the previous accepted revision remains current.
|
|
28
|
+
Only after the owner accepts this checkpoint and exact semantic delta, record the owner
|
|
29
|
+
acceptance source and atomically replace `.ultra/north-star.md` with accepted problem
|
|
30
|
+
reality, `FP-*` propositions, causal chains, `NS-*` outcomes, `HC-*` constraints,
|
|
31
|
+
exclusions, uncertainties, revisit triggers, and Research trace.
|
|
32
|
+
|
|
33
|
+
If this supersedes an accepted revision, preserve its Git and downstream evidence.
|
|
34
|
+
Report dependent active Change traces as stale observations until Change reconciliation;
|
|
35
|
+
do not silently rewrite intent or infer new execution authority.
|
|
25
36
|
Keep raw owner wording in `project-brief.md`; do not process it in place.
|
|
26
37
|
|
|
27
38
|
Write `research-distillate.md` as a navigation and traceability artifact containing
|
|
@@ -40,3 +51,9 @@ reporting convergence.
|
|
|
40
51
|
Record one verified chain through `problem_id`, `scenario_id`, `requirement_ids`,
|
|
41
52
|
`architecture_path_ids`, and `verification_refs`. Every referenced id must exist in an
|
|
42
53
|
earlier selected area report or specification heading.
|
|
54
|
+
|
|
55
|
+
## Adversarial challenge
|
|
56
|
+
|
|
57
|
+
Before acceptance, challenge the strongest premise, Goodhart or proxy failure, and a
|
|
58
|
+
scenario where every stated output passes while the claimed delivered value still fails.
|
|
59
|
+
Record what would change the conclusion and every unresolved contradiction.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# North Star v2 contract
|
|
2
|
+
|
|
3
|
+
Use this contract when Research proposes the first steering authority or a replacement
|
|
4
|
+
revision. Init creates only the packaged `unresearched` placeholder.
|
|
5
|
+
|
|
6
|
+
## Agency boundary
|
|
7
|
+
|
|
8
|
+
Research selects evidence, synthesizes causal propositions, and proposes language. The
|
|
9
|
+
owner accepts the problem boundary, `FP-*`, `NS-*`, `HC-*`, exclusions, and material
|
|
10
|
+
uncertainty. The validator observes headings, fields, IDs, and references; it never
|
|
11
|
+
decides whether a proposition is true, an outcome is valuable, or a constraint is wise.
|
|
12
|
+
|
|
13
|
+
Keep the last accepted file current while a replacement is drafted. Validation failure
|
|
14
|
+
returns diagnostics and leaves the draft mutable. Only explicit owner acceptance permits
|
|
15
|
+
an atomic replacement of `.ultra/north-star.md`.
|
|
16
|
+
|
|
17
|
+
## Exact top-level headings
|
|
18
|
+
|
|
19
|
+
1. `## Acceptance and Revision`
|
|
20
|
+
2. `## Problem Reality`
|
|
21
|
+
3. `## First-Principle Propositions`
|
|
22
|
+
4. `## Value Causal Chain`
|
|
23
|
+
5. `## North Star Outcomes`
|
|
24
|
+
6. `## Hard Constraints`
|
|
25
|
+
7. `## Explicit Exclusions`
|
|
26
|
+
8. `## Uncertainties and Revisit Triggers`
|
|
27
|
+
9. `## Research Trace`
|
|
28
|
+
|
|
29
|
+
`Acceptance and Revision` records `Schema`, `Status`, `Revision`, `Owner acceptance
|
|
30
|
+
source`, `Acceptance time`, and `Supersedes`. Do not invent a timestamp: use
|
|
31
|
+
`not-recorded` when the authoritative owner source has none. `Status` is exactly
|
|
32
|
+
`unresearched` for the empty Init placeholder, `draft` for a mutable candidate, or
|
|
33
|
+
`accepted` after owner acceptance. A draft may define semantic IDs but must use
|
|
34
|
+
`Owner acceptance source: none`; every First-Principle Proposition in an accepted
|
|
35
|
+
revision has `Status: accepted`.
|
|
36
|
+
|
|
37
|
+
The `unresearched` form is one exact packaged byte sequence, not a looser shape. Its
|
|
38
|
+
title, authority and adoption preamble, all six acceptance fields, all eight later
|
|
39
|
+
sentinel bodies, interstitial whitespace, and trailing newline must match
|
|
40
|
+
`.ultra-template/north-star.md`. Any mutation is invalid and Init stops before publication
|
|
41
|
+
with an `ultra-init-error-v1` payload: `code: north_star_template_invalid`, plus the full
|
|
42
|
+
canonical validator `diagnostics`, including `invalid_unresearched_placeholder` for an
|
|
43
|
+
exact-byte mismatch. This checksum-backed grammar prevents Init from becoming a hidden
|
|
44
|
+
semantic writer; it does not judge any researched proposition.
|
|
45
|
+
|
|
46
|
+
## Stable semantic entries
|
|
47
|
+
|
|
48
|
+
Define accepted entries with level-three headings. IDs are stable within project
|
|
49
|
+
history, unique, and never silently recycled.
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
### FP-1 — Short name
|
|
53
|
+
- Proposition:
|
|
54
|
+
- Evidence:
|
|
55
|
+
- Causal consequence:
|
|
56
|
+
- Falsifier or revisit trigger:
|
|
57
|
+
- Status: `accepted`
|
|
58
|
+
|
|
59
|
+
### NS-1 — Short name
|
|
60
|
+
- Outcome:
|
|
61
|
+
- Observation method:
|
|
62
|
+
- Baseline:
|
|
63
|
+
- Target or expected change:
|
|
64
|
+
- Horizon:
|
|
65
|
+
- Anti-metric:
|
|
66
|
+
|
|
67
|
+
### HC-1 — Short name
|
|
68
|
+
- Protected value or threat:
|
|
69
|
+
- Constraint:
|
|
70
|
+
- Authority or evidence:
|
|
71
|
+
- Revisit condition:
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Do not impose a maximum count. Prefer the smallest set that explains the accepted
|
|
75
|
+
boundary, but let Research and the owner decide semantic sufficiency.
|
|
76
|
+
|
|
77
|
+
The Value Causal Chain references definitions instead of repeating them:
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
FP-* -> capability -> observable behavior -> NS-*
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
In a draft or accepted revision every pipe-delimited causal-chain row has exactly five
|
|
84
|
+
cells. Header and separator rows use that same width; each data row carries a `VC-*`, a
|
|
85
|
+
resolving `FP-*`, nonempty capability and behavior, and a resolving `NS-*`. A malformed
|
|
86
|
+
row remains invalid even when another row is valid. Every one of the nine required
|
|
87
|
+
sections is nonempty for accepted publication; these are exact structural observations,
|
|
88
|
+
not a mechanical claim that the content is semantically sufficient.
|
|
89
|
+
|
|
90
|
+
Supporting product behavior, actors, requirements, measurements, and architecture stay
|
|
91
|
+
in specifications. Shared vocabulary stays in `CONTEXT.md`. Change-local outcome,
|
|
92
|
+
non-goals, acceptance, risk, and recovery stay in the active intent.
|
|
93
|
+
|
|
94
|
+
## Validation and adoption
|
|
95
|
+
|
|
96
|
+
Callers that already own a bounded stable no-symlink snapshot pass those exact bytes
|
|
97
|
+
through stdin while identifying the canonical absolute path:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
node <ultra-research-skill-dir>/scripts/validate_north_star.cjs --stdin --path <canonical-absolute-path>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Research and manual callers may instead use the direct path entry:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
node <ultra-research-skill-dir>/scripts/validate_north_star.cjs <candidate-path>
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Path mode applies the same 8 MiB ceiling itself. It requires a regular non-symlink file,
|
|
110
|
+
opens with `O_NONBLOCK` and `O_NOFOLLOW`, binds the pre-read `lstat` to the open
|
|
111
|
+
descriptor, and rechecks descriptor/path identity, size, and the retained-byte digest
|
|
112
|
+
after the bounded read. An oversized file, symlink, special file, read failure, or
|
|
113
|
+
observable ordinary replacement returns `input_too_large`, `input_symlink`,
|
|
114
|
+
`input_not_regular`, `read_error`, or `input_changed`; preserve the current path and
|
|
115
|
+
retry after cooperative workspace writes settle. No typed input failure is a semantic
|
|
116
|
+
judgment or a promise to defeat a malicious operating-system-level writer.
|
|
117
|
+
|
|
118
|
+
Every verdict over a completed byte snapshot carries `input.path`, `input.byte_length`,
|
|
119
|
+
and `input.sha256` for those bytes. A capture failure keeps the same keys but uses null
|
|
120
|
+
for any byte length or digest it could not safely observe. Markdown headings, grammar
|
|
121
|
+
fields, causal rows, and decision-record fields count only rendered lines outside
|
|
122
|
+
backtick or tilde fences; acceptance binding still hashes the exact raw bytes.
|
|
123
|
+
SessionStart applies the same 8 MiB stable no-symlink snapshot limit and validates those
|
|
124
|
+
same bytes, rather than reopening a different path snapshot.
|
|
125
|
+
|
|
126
|
+
The command emits `ultra-north-star-validation-v1`. The actual v0.26 shape containing
|
|
127
|
+
`Project Direction`, `North Star Outcome`, and `Hard Constraints`, and the older
|
|
128
|
+
`## One-line` form, are reported as `legacy_unadopted` with an advisory. A candidate
|
|
129
|
+
combining v2 markers with a legacy semantic heading is reported with
|
|
130
|
+
`kind: "north-star-v2"`, its parsed v2 `status`, `classification: "mixed"`, and
|
|
131
|
+
`valid: false`; appending a legacy heading cannot bypass v2 validation. Other malformed
|
|
132
|
+
shapes are `unknown` and invalid. Research must migrate legacy input through an
|
|
133
|
+
owner-accepted replacement rather than mutating it in place.
|
|
134
|
+
|
|
135
|
+
Init consumes a preserved North Star from the same stable descriptor/path identity and
|
|
136
|
+
SHA-256 snapshot used for classification, and rechecks that snapshot before staging,
|
|
137
|
+
before publication, and before success. Under the cooperative-workspace contract, any
|
|
138
|
+
observable authority-path or byte drift preserves the current bytes and returns the
|
|
139
|
+
typed retryable `preserved_north_star_changed` diagnostic. Other preserved or newly
|
|
140
|
+
published Init paths use the same recovery rule and the typed retryable
|
|
141
|
+
`initialization_snapshot_changed` diagnostic. This is detectable-drift protection, not
|
|
142
|
+
a promise that Node filesystem calls can defend against a malicious operating-system-
|
|
143
|
+
level replacement.
|
|
144
|
+
|
|
145
|
+
For an accepted replacement:
|
|
146
|
+
|
|
147
|
+
1. preserve the current accepted file while drafting and validating the candidate;
|
|
148
|
+
2. challenge premise, falsifiers, causal chain, proxy failure, exclusions, and hard
|
|
149
|
+
constraints independently;
|
|
150
|
+
3. show the owner the semantic delta and unresolved contradictions;
|
|
151
|
+
4. preserve a stable decision record with the owner's exact words, conversation scope,
|
|
152
|
+
the model's responsibility for final wording, and a rule that future revisions do not
|
|
153
|
+
inherit acceptance; record no timestamp the owner source did not provide;
|
|
154
|
+
5. atomically replace the canonical file;
|
|
155
|
+
6. record that dependent active Change traces are stale observations until Change
|
|
156
|
+
reconciliation maps old `FP/NS/HC` references to the new revision.
|
|
157
|
+
|
|
158
|
+
The cited decision fragment resolves exactly one rendered Markdown heading outside fenced
|
|
159
|
+
code. That section carries each of these list fields exactly once with a nonempty value:
|
|
160
|
+
`Conversation scope`, `Exact raw owner acceptance`, `Agency boundary`, `Time boundary`,
|
|
161
|
+
and `Revision boundary`. The validator observes only their anchored presence, uniqueness,
|
|
162
|
+
and nonempty bytes. It does not decide whether the quoted acceptance is genuine,
|
|
163
|
+
sufficiently informed, or semantically adequate; those judgments remain with the owner
|
|
164
|
+
and model.
|
|
165
|
+
|
|
166
|
+
Never delete old task, review, Test, or delivery evidence because of supersession. Git
|
|
167
|
+
preserves the old North Star revision; canonical consumers retain their historical
|
|
168
|
+
revision and digest while current execution waits for explicit reconciliation.
|
|
@@ -27,6 +27,14 @@ Write `.ultra/research/<run-id>/brief.md` with:
|
|
|
27
27
|
- owner decisions and the checkpoint that owns each one;
|
|
28
28
|
- a stop condition stated as an observable artifact or resolved decision.
|
|
29
29
|
|
|
30
|
+
## North Star Working Candidate
|
|
31
|
+
|
|
32
|
+
In the same brief, keep the current candidate outcome, `FP-*` propositions, causal chain,
|
|
33
|
+
evidence, counter-evidence, and the accepted `.ultra/north-star.md` revision and digest it
|
|
34
|
+
began from. Update
|
|
35
|
+
this section as lenses refine or contradict it. It is derived navigation and not semantic
|
|
36
|
+
authority; only accepted synthesis can replace the canonical North Star.
|
|
37
|
+
|
|
30
38
|
The brief is derived navigation, not semantic authority. Specifications, the North Star,
|
|
31
39
|
`CONTEXT.md`, and accepted decisions remain canonical. Rebuild or discard the map when
|
|
32
40
|
evidence changes; never add a completion flag merely to route another Skill.
|