ultra-builder-pro-cli 0.26.1 → 0.26.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.
Files changed (39) hide show
  1. package/.ultra-template/north-star.md +20 -31
  2. package/.ultra-template/project-brief.md +28 -0
  3. package/.ultra-template/specs/product.md +4 -0
  4. package/.ultra-template/specs/research-distillate.md +8 -0
  5. package/.ultra-template/test-report.json +1 -0
  6. package/CHANGELOG.md +64 -0
  7. package/README.md +60 -28
  8. package/docs/ARCHITECTURE.md +32 -9
  9. package/docs/ARTIFACT-AUTHORITY.md +42 -13
  10. package/docs/DECISIONS.md +20 -3
  11. package/docs/PHILOSOPHY.md +9 -7
  12. package/docs/SKILL-AUTHORING.md +10 -6
  13. package/docs/WORKFLOW-LIFECYCLE.md +99 -39
  14. package/hooks/README.md +7 -2
  15. package/hooks/_common.py +54 -5
  16. package/hooks/session_context.py +34 -8
  17. package/package.json +1 -1
  18. package/skills/ultra-change/SKILL.md +52 -63
  19. package/skills/ultra-change/references/change-contract.md +37 -5
  20. package/skills/ultra-delegate/SKILL.md +14 -3
  21. package/skills/ultra-deliver/SKILL.md +48 -43
  22. package/skills/ultra-deliver/references/baseline-reconciliation.md +5 -3
  23. package/skills/ultra-dev/SKILL.md +8 -8
  24. package/skills/ultra-grilling/SKILL.md +9 -9
  25. package/skills/ultra-init/SKILL.md +62 -87
  26. package/skills/ultra-init/references/brownfield-adoption.md +23 -40
  27. package/skills/ultra-plan/SKILL.md +29 -18
  28. package/skills/ultra-research/SKILL.md +91 -68
  29. package/skills/ultra-research/references/{03-competitive-landscape.md → 03-alternatives.md} +6 -6
  30. package/skills/ultra-research/references/22-success-metrics.md +8 -4
  31. package/skills/ultra-research/references/99-synthesis.md +8 -1
  32. package/skills/ultra-research/references/wayfinding.md +42 -0
  33. package/skills/ultra-review/SKILL.md +4 -1
  34. package/skills/ultra-status/SKILL.md +62 -32
  35. package/skills/ultra-tdd/SKILL.md +5 -2
  36. package/skills/ultra-test/SKILL.md +26 -12
  37. package/skills/ultra-test/scripts/worktree_digest.cjs +42 -8
  38. package/skills/ultra-think/SKILL.md +5 -10
  39. package/skills/ultra-think/references/interaction-boundary.md +2 -1
@@ -1,46 +1,35 @@
1
1
  # Project North Star
2
2
 
3
- > **Authority**: the owner's literal intent for this project, kept short enough to re-inject every
4
- > session. Every task must trace back here.
3
+ > **Authority**: the accepted steering contract established by `ultra-research` from
4
+ > owner decisions and cited evidence. Every Change and task must serve this contract.
5
5
  >
6
- > **Scope**: only what cannot be derived from `specs/product.md`. Success metrics,
7
- > excluded features, actors and scenarios stay in that file — do not copy them here.
6
+ > **Scope**: this file owns the project direction, the one North Star outcome or metric
7
+ > when one is justified, hard constraints, and explicit exclusions. Product requirements,
8
+ > supporting measurements, actors, and scenarios stay in `specs/product.md`.
8
9
 
9
- ---
10
+ ## Project Direction
10
11
 
11
- ## One-line
12
+ [NEEDS CLARIFICATION]
12
13
 
13
- <!-- ONE sentence, in the owner's own words, describing what they want.
14
- Captured by ultra-init, or from the owner's first request.
15
- Do not paraphrase into product-speak: specs/product.md holds the processed version.
16
- The value of this line is that it is the unprocessed baseline you check the
17
- processed version against. -->
14
+ ## North Star Outcome
18
15
 
19
- _(not yet defined — run `ultra-init`, or the first owner request will populate this)_
16
+ - `NS-01` outcome: [NEEDS CLARIFICATION]
17
+ - Metric or observation contract: [NEEDS CLARIFICATION]
18
+ - Why it represents delivered value: [NEEDS CLARIFICATION]
20
19
 
21
- ---
20
+ A single metric is optional. When one would distort the product, record that decision and
21
+ use an observable outcome plus guardrails instead of inventing numeric precision.
22
22
 
23
23
  ## Hard Constraints
24
24
 
25
- <!-- What must never happen, even when convenient. These are prohibitions, not technical
26
- constraints — architecture.md holds those. Examples:
27
- - Never store plaintext passwords
28
- - Cannot break backwards compatibility with API v1
29
- - Bundle stays under 500 KB
30
- - External API cost stays under $X/month -->
25
+ - `HC-1`: [NEEDS CLARIFICATION]
31
26
 
32
- _(not yet defined)_
27
+ ## Explicit Exclusions
33
28
 
34
- ---
29
+ - [NEEDS CLARIFICATION]
35
30
 
36
- ## Notes for agents
31
+ ## Research Trace
37
32
 
38
- 1. Re-anchor on the One-line — that is the literal owner request. When the spec and this line
39
- disagree, the spec drifted.
40
- 2. Check Hard Constraints before any "improvement". An improvement that violates a constraint is
41
- a regression.
42
- 3. If your current work does not trace back here, **stop and ask**. You may be building the
43
- wrong thing.
44
-
45
- The One-line is injected by `session_context` at SessionStart. `mid_workflow_recall`
46
- re-injects the active task acceptance before relevant tool use. See PHILOSOPHY C1.
33
+ - Project brief: `project-brief.md`
34
+ - Accepted research run: [NEEDS CLARIFICATION]
35
+ - Decision references: [NEEDS CLARIFICATION]
@@ -0,0 +1,28 @@
1
+ # Project Brief
2
+
3
+ > **Authority**: raw owner intake captured by `ultra-init`. It preserves what the owner
4
+ > initially asked for and the broad outline needed to begin research. It is not an
5
+ > evidence-backed product baseline.
6
+ >
7
+ > **Lifecycle**: `ultra-research` reads this seed and promotes accepted conclusions into
8
+ > the North Star, specifications, domain language, or decisions. It does not rewrite the
9
+ > brief to make later conclusions look inevitable.
10
+
11
+ ## One-line
12
+
13
+ [NEEDS CLARIFICATION]
14
+
15
+ ## Initial Outline
16
+
17
+ - What it is: [NEEDS CLARIFICATION]
18
+ - Broadly for whom or what: [NEEDS CLARIFICATION]
19
+ - Intended result: [NEEDS CLARIFICATION]
20
+ - Broad boundary: [NEEDS CLARIFICATION]
21
+
22
+ ## Explicit Inputs
23
+
24
+ - [NEEDS CLARIFICATION]
25
+
26
+ ## Open Questions for Research
27
+
28
+ - [NEEDS CLARIFICATION]
@@ -60,6 +60,10 @@ Scope status must reflect an explicit decision. Do not infer a reduced product p
60
60
 
61
61
  ## 22 Outcomes and Measurements
62
62
 
63
+ The accepted project direction and any single North Star outcome or metric live in
64
+ `.ultra/north-star.md`. Record supporting outcomes, measures, and guardrails here; do
65
+ not force one metric when an observable outcome plus guardrails is the honest contract.
66
+
63
67
  | Outcome or guardrail | Definition | Evidence source | Decision use | Owner |
64
68
  |---|---|---|---|---|
65
69
  | | | | | |
@@ -28,6 +28,14 @@ specifications' prose.
28
28
  |---|---|---|
29
29
  | | | |
30
30
 
31
+ ## Source Revisions
32
+
33
+ | Canonical source | Git blob hash from `git hash-object` | Status |
34
+ |---|---|---|
35
+ | `.ultra/specs/product.md` | | current or stale |
36
+ | `.ultra/specs/architecture.md` | | current or stale |
37
+ | `.ultra/specs/discovery.md` | | current or stale |
38
+
31
39
  ## End-to-End Trace
32
40
 
33
41
  | Problem or constraint | Actor and scenario | Requirement and acceptance | Architecture path | Verification |
@@ -3,6 +3,7 @@
3
3
  "change_id": null,
4
4
  "task_ids": [],
5
5
  "git_commit": null,
6
+ "intent_digest": null,
6
7
  "worktree": {
7
8
  "dirty": null,
8
9
  "diff_digest": null
package/CHANGELOG.md CHANGED
@@ -7,6 +7,70 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.26.2] — 2026-08-04
11
+
12
+ ### Added
13
+
14
+ - Added `.ultra/project-brief.md` as the raw owner-intake artifact and optional
15
+ Research `wayfinding.md` navigation for unclear multi-lens paths, without adding a
16
+ fifteenth Skill or another semantic authority.
17
+ - Expanded Research alternatives beyond direct competitors and made a single North
18
+ Star metric optional when an observable outcome plus guardrails is more honest.
19
+
20
+ ### Changed
21
+
22
+ - Narrowed `ultra-init` to the Project Brief and empty skeleton, made
23
+ `ultra-research` own the first accepted North Star, domain language, and
24
+ specification baseline, and limited `ultra-change` to touched baseline sections.
25
+ - Made the first six Research lenses dependency-aware and kept Grilling, Think, and
26
+ Domain Modeling as caller-bounded reusable methods rather than Research stages or
27
+ owner routes.
28
+ - Routed `ultra-status` from semantic file contents instead of a Research completion
29
+ bit or any single unresolved marker.
30
+ - Gave every Change one stable id across active, archive, and abandoned positions;
31
+ made the task ledger append-only and every current reader active-id scoped.
32
+ - Added explicit `none`, `bounded`, and `required` Research Disposition contracts,
33
+ one-task planning for quick Changes, and two-pass delivery against a fresh semantic
34
+ plus product snapshot.
35
+ - Gave the exact Change Contract explicit Profile rationale and Risk flags fields so
36
+ its required blast-radius decision has one stable representation.
37
+ - Kept ordinary technical seam selection model-owned and made delegation reachable for
38
+ task execution, scoped Research evidence, and aggregate Change review without
39
+ manufacturing task rows.
40
+
41
+ ### Fixed
42
+
43
+ - Made session context prefer the accepted North Star, fall back to the Project Brief
44
+ before Research, retain legacy one-line compatibility, and always append active task
45
+ acceptance when present.
46
+ - Bound Research distillates to the actual `git hash-object` value of all three
47
+ baseline specifications so staleness is mechanically observable.
48
+ - Prevented archived or abandoned unfinished tasks, invalid Change ids, blocked
49
+ dependencies, and ambiguous multiple `in_progress` rows from being injected as the
50
+ current Hook acceptance.
51
+ - Made canonical `change_id` override a conflicting legacy `change_ref`, so migration
52
+ compatibility cannot revive a historical task.
53
+ - Bound Test reports to exact Change id, ordered task ids, intent digest, HEAD, and a
54
+ product-worktree digest that excludes the report and Change-directory metadata while
55
+ binding current intent separately, so product reconciliation requires retest while
56
+ delivery metadata and archive finalization do not self-invalidate.
57
+ - Prevented a separate request from opening a second active Change, and gave abandoned
58
+ intents an exact owner decision, reason, reusable-evidence, and recovery closure read
59
+ by future Change and Status workflows.
60
+ - Kept non-publishing package inspection diagnostic while the explicit Deliver gate
61
+ blocks release-package creation only for an undispositioned changed export with no
62
+ non-test consumer.
63
+ - Made that gate's authorization path use the finding disposition in the current Test
64
+ report and carry the accepted decision into `delivery.md`.
65
+ - Aligned `.npmignore` with the explicit package allowlist and locked all eight
66
+ maintained product documents into the tarball smoke contract.
67
+
68
+ ### Verified
69
+
70
+ - Passed 119 Node tests, 21 Hook tests, 14 Skill Creator validations, five isolated
71
+ host install/Doctor/uninstall lifecycles, a 115-entry package dry-run inspection, and
72
+ an audit with zero vulnerabilities.
73
+
10
74
  ## [0.26.1] — 2026-08-03
11
75
 
12
76
  ### Added
package/README.md CHANGED
@@ -29,14 +29,14 @@ The package installs exactly fourteen Skills in three roles.
29
29
 
30
30
  | Skill | Outcome |
31
31
  |---|---|
32
- | `ultra-init` | Establish the project skeleton and one-line north star |
33
- | `ultra-research` | Verify external claims and refresh specifications |
34
- | `ultra-change` | Reconcile a requested change against current product truth |
32
+ | `ultra-init` | Establish the project skeleton and raw Project Brief |
33
+ | `ultra-research` | Establish an accepted North Star and evidence-backed baseline |
34
+ | `ultra-change` | Reconcile one requested delta against the accepted baseline |
35
35
  | `ultra-plan` | Write tracer-bullet tasks, contexts, dependencies, and seams |
36
36
  | `ultra-dev` | Implement one task through red/green development and six evidence dimensions |
37
37
  | `ultra-test` | Audit whole-system wiring, E2E behavior, performance, and security |
38
38
  | `ultra-deliver` | Reconcile, review, document, and archive a completed Change |
39
- | `ultra-delegate` | Run a bounded instruction through another supported CLI |
39
+ | `ultra-delegate` | Run bounded task work, Research evidence, or aggregate review through another supported CLI |
40
40
 
41
41
  ### Model-invoked disciplines
42
42
 
@@ -60,6 +60,14 @@ review, and a consequential unresolved decision uses think. A host with native b
60
60
  subagents may parallelize review lenses; another host runs the same lens assets
61
61
  sequentially.
62
62
 
63
+ Inside `ultra-research`, the first six references are six semantic lenses, not six
64
+ extra Skills: problem validation, opportunity discovery, market assessment,
65
+ alternatives, product strategy, and assumptions validation. `wayfinding.md` chooses
66
+ the smallest dependency-correct path through those and the later evidence lenses.
67
+ Grilling still owns how to ask one missing question, Think owns one consequential
68
+ trade-off, and Domain Modeling owns vocabulary; Research owns the overall question
69
+ map, evidence convergence, owner checkpoints, and baseline promotion.
70
+
63
71
  ### What happened to the original Agents
64
72
 
65
73
  v0.26 does not install a custom `agents/` projection. The old review workers became the
@@ -72,12 +80,15 @@ host exposes the same custom-agent API.
72
80
 
73
81
  ## Project authority
74
82
 
75
- A new project uses this shape:
83
+ A project after its first accepted Research baseline uses this shape. Immediately after
84
+ Init, `CONTEXT.md` does not exist yet and the North Star/specification files are empty
85
+ skeletons.
76
86
 
77
87
  ```text
78
88
  CONTEXT.md
79
89
  .ultra/
80
90
  ├── .gitignore # ignores only derived Ultra paths
91
+ ├── project-brief.md
81
92
  ├── north-star.md
82
93
  ├── tasks.json
83
94
  ├── test-report.json
@@ -88,15 +99,18 @@ CONTEXT.md
88
99
  │ └── research-distillate.md
89
100
  ├── changes/
90
101
  │ ├── active/<change-id>/{intent.md,delivery.md}
91
- │ └── archive/<change-id>/intent.md
102
+ │ ├── archive/<change-id>/{intent.md,delivery.md}
103
+ │ └── abandoned/<change-id>/intent.md # includes exact Abandonment closure
92
104
  ├── contexts/<task-id>.md
93
105
  ├── decisions/<decision-id>.md
94
106
  ├── evidence/<task-id>/...
95
- └── research/<run-id>/...
107
+ └── research/<run-id>/{brief.md,<step-id>.md}
96
108
  ```
97
109
 
98
- Canonical semantic facts live in those files. Git provides history, comparison,
99
- rollback, and archive moves. The following are derived and can be deleted or rebuilt:
110
+ The optional `brief.md` is derived navigation; the selected step reports are cited
111
+ evidence, and promoted semantic facts live in the other canonical files. Git provides
112
+ history, comparison, rollback, and archive moves. The following additional paths are
113
+ derived and can be deleted or rebuilt:
100
114
 
101
115
  ```text
102
116
  .ultra/.runtime/
@@ -111,13 +125,13 @@ staleness, and recovery rules.
111
125
 
112
126
  | Route | Canonical write | Who consumes it next |
113
127
  |---|---|---|
114
- | `ultra-init` | north star and four specification skeletons; empty task and test ledgers | every later workflow and context Hook |
115
- | `ultra-research` | selected cited reports plus reconciled specifications and distillate | change, plan, and delivery |
116
- | `ultra-change` | one active `intent.md` with exact acceptance, seams, reconciliation, and recovery | plan, dev, test, review, status, delivery |
117
- | `ultra-plan` | `tasks.json`, one context per task, and Planning Posture in the active intent | dev and every resume path |
128
+ | `ultra-init` | raw `project-brief.md`, empty North Star and specification skeletons, and empty task/test ledgers | research, status, and the pre-baseline session Hook fallback |
129
+ | `ultra-research` | accepted North Star, first domain baseline, selected cited reports, reconciled specifications, and distillate | change, plan, and delivery |
130
+ | `ultra-change` | one active `intent.md` with stable `change_id`, Research Disposition, and only the accepted baseline sections touched by that delta; or an exact Abandonment closure before an owner-authorized move | active: research through delivery; abandoned: future Change history and status |
131
+ | `ultra-plan` | append-only `tasks.json` rows for the active `change_id`, one context per task, and Planning Posture in the active intent | dev and every resume path |
118
132
  | `ultra-dev` | source/tests, task evidence, synchronized task/context status, Completion and Resume Note | review, test, status, delivery |
119
- | `ultra-test` | the one current `test-report.json` bound to HEAD and worktree digest | status and delivery |
120
- | `ultra-deliver` | one `delivery.md`, reconciled specs/docs, then the archived Change directory | owner and future Change history |
133
+ | `ultra-test` | the one current `test-report.json` bound to Change id, current task ids, intent digest, HEAD, and product-worktree digest | status and delivery |
134
+ | `ultra-deliver` | first reconciled specs/docs, then after a fresh Test snapshot one `delivery.md` and the archived Change directory | owner and future Change history |
121
135
  | `ultra-status` | none | recommends the smallest explicit route from current files |
122
136
  | `ultra-delegate` | derived runtime receipt plus an isolated worktree diff | primary host inspection and optional integration |
123
137
 
@@ -178,23 +192,37 @@ installation; all five support managed global installation and isolated
178
192
 
179
193
  ## Typical workflow
180
194
 
181
- 1. Select `ultra-init` once. It writes the skeleton, records the owner's one-line goal,
182
- initializes Git when needed, and recommends the next route.
183
- 2. Select `ultra-research` when a product or architecture claim needs evidence.
184
- 3. Select `ultra-change` for the requested outcome and reconcile it against current
185
- specifications before planning.
186
- 4. Select `ultra-plan` to confirm public seams and produce resumable tracer-bullet tasks.
195
+ 1. Select `ultra-init` once. It writes the skeleton, preserves the owner's raw one-line
196
+ request and broad outline in the Project Brief, initializes Git when needed, and
197
+ stops before product research.
198
+ 2. Select `ultra-research` to turn that brief into the first accepted North Star,
199
+ shared vocabulary, and evidence-backed product and architecture baseline. For an
200
+ unclear multi-lens question it first writes a derived Wayfinding brief; for one
201
+ bounded evidence gap it skips that extra file.
202
+ 3. Select `ultra-change` for a requested delta. It reconciles only the baseline sections
203
+ the delta touches before planning; it does not rebuild the project baseline. Its
204
+ Research Disposition either cites sufficient evidence or names the bounded question
205
+ and exit evidence that must return through Research. A micro edit that makes no
206
+ specification sentence false stays outside Ultra; an accepted quick Change still
207
+ receives one Plan task. While that Change remains active, reconcile its same stable
208
+ id; never open a second active Change for a separate request.
209
+ 4. Select `ultra-plan` to record public seams and produce resumable tracer-bullet tasks.
210
+ The model owns ordinary technical seams; the owner decides only a seam that changes
211
+ the public contract or another material trade-off.
187
212
  5. Select `ultra-dev` for one task at a time. Each task leaves a Completion entry,
188
213
  evidence, and a closing Resume Note.
189
- 6. Select `ultra-test` once the ledger is complete. Local green tests do not substitute
190
- for wiring and E2E proof.
191
- 7. Select `ultra-deliver` to run aggregate review, reconcile documentation, and archive
192
- the Change. Commit, push, tag, publication, and deployment remain separately
193
- authorized effects.
214
+ 6. Select `ultra-test` once tasks for the active Change are complete. Historical ledger
215
+ rows do not enter this audit. Local green tests do not substitute for wiring and E2E proof.
216
+ 7. Select `ultra-deliver` to run aggregate review and reconcile documentation. If that
217
+ changes product or semantic files, rerun Test; re-enter Deliver on the fresh snapshot
218
+ to write delivery metadata and archive the stable Change id. Commit, push, tag,
219
+ publication, and deployment remain separately authorized effects.
194
220
 
195
221
  At any point, `ultra-status` can reconstruct the current position. A fresh session or
196
222
  different host resumes by reading `.ultra/tasks.json`, the selected `context_file`, its
197
- `## Resume Note`, `CONTEXT.md`, relevant decisions, the active Change, and Git.
223
+ `## Resume Note`, `CONTEXT.md`, relevant decisions, the active Change, and Git. It first
224
+ filters the append-only ledger to tasks whose `change_id` matches the unique active
225
+ Change; archived and abandoned unfinished rows are history, not the frontier.
198
226
 
199
227
  ## Three independent integration defences
200
228
 
@@ -215,7 +243,7 @@ Five optional hooks accelerate file reading and protect a narrow effect boundary
215
243
 
216
244
  | Hook | Behavior |
217
245
  |---|---|
218
- | `session_context.py` | Inject north star and current acceptance at session start |
246
+ | `session_context.py` | Inject the accepted North Star, or the Project Brief fallback before Research, plus current acceptance |
219
247
  | `mid_workflow_recall.py` | Restate acceptance before relevant source operations |
220
248
  | `compact_context.py` | Save and restore a disposable Git/file snapshot |
221
249
  | `post_edit_guard.py` | Record mechanical evidence observations after edits |
@@ -244,6 +272,10 @@ Use `skills/ultra-delegate/scripts/delegate_wait.py` to wait for `result.json` w
244
272
  loading intermediate worker output into the parent context. Delegation grants no new
245
273
  authority; writable roots remain inside the worktree, and its permission file must
246
274
  declare zero external effects without widening the host sandbox.
275
+ The immutable instruction names task execution/continuation, scoped Research evidence,
276
+ or aggregate Change review/verification. The latter two may be read-only and do not
277
+ require a task row, keeping pre-Plan Research and post-task cross-family review
278
+ reachable without inventing ledger work.
247
279
 
248
280
  ## Host support
249
281
 
@@ -38,14 +38,22 @@ The exact allowlists live in `adapters/_shared/runtime-assets.cjs`. Public workf
38
38
  never invoke another public workflow. They may use model-invoked disciplines and then
39
39
  recommend the next owner route.
40
40
 
41
+ Research's seventeen references are workflow-owned semantic lenses. Its optional
42
+ `wayfinding.md` maps a multi-lens question without becoming a new Skill or authority.
43
+ The reusable mechanics remain separate: Grilling owns the interaction loop, Think owns
44
+ one consequential decision, and Domain Modeling owns vocabulary promotion.
45
+
41
46
  ### Authority plane
42
47
 
43
48
  Canonical semantic authority consists of:
44
49
 
45
- - `.ultra/north-star.md` for owner wording and hard constraints;
50
+ - `.ultra/project-brief.md` for raw owner intake and the initial outline;
51
+ - `.ultra/north-star.md` for the accepted direction, outcome or metric decision, hard
52
+ constraints, and exclusions established by Research;
46
53
  - `.ultra/specs/*.md` for product, architecture, discovery, and research distillate;
47
- - `.ultra/changes/{active,archive}/<id>/intent.md` for bounded outcomes;
48
- - `.ultra/tasks.json` plus each task's `context_file`;
54
+ - `.ultra/changes/{active,archive,abandoned}/<id>/intent.md` for bounded outcomes with
55
+ one stable id across directory moves;
56
+ - append-only `.ultra/tasks.json` rows carrying `change_id`, plus each task's `context_file`;
49
57
  - `.ultra/decisions/*.md`, `.ultra/evidence/`, `.ultra/test-report.json`, and research;
50
58
  - repository-root `CONTEXT.md` for ubiquitous language;
51
59
  - Git for revision identity, history, moves, diff, and rollback.
@@ -53,6 +61,12 @@ Canonical semantic authority consists of:
53
61
  Each semantic fact has one canonical representation. A summary can point to authority,
54
62
  but cannot become a second authority merely because it is convenient to read.
55
63
 
64
+ One primary host model writes this authority in a worktree. Native subagents are
65
+ read-only sensors; delegated CLIs write isolated non-`.ultra` roots and return receipts.
66
+ Sequential Changes share the ledger by stable id, while current readers filter by the
67
+ one unique active Change. This keeps concurrency explicit in Git instead of adding a
68
+ semantic lock service or workflow engine.
69
+
56
70
  ### Adaptation plane
57
71
 
58
72
  `adapters/*.js` translates the shared package into native host surfaces:
@@ -100,10 +114,11 @@ end-to-end evidence by themselves.
100
114
 
101
115
  Every user Skill starts by reading:
102
116
 
103
- 1. `.ultra/tasks.json`;
104
- 2. the unfinished task's `context_file` and closing `## Resume Note`;
105
- 3. `CONTEXT.md` and relevant decisions;
106
- 4. the active Change, specifications, evidence, and current Git state.
117
+ 1. zero or one active `change_id`, diagnosing more than one;
118
+ 2. `.ultra/tasks.json` tasks whose `change_id` matches it;
119
+ 3. the matching frontier task's `context_file` and closing `## Resume Note`;
120
+ 4. `CONTEXT.md` and relevant decisions;
121
+ 5. the active Change, specifications, evidence, and current Git state.
107
122
 
108
123
  That same sequence works after compaction, a fresh process, disabled hooks, or a host
109
124
  change. Compact snapshots can accelerate recovery but never outrank the source files.
@@ -112,10 +127,12 @@ change. Compact snapshots can accelerate recovery but never outrank the source f
112
127
 
113
128
  Three independent Skills protect the vertical path:
114
129
 
115
- 1. `ultra-plan` confirms seams and rejects horizontal feature tasks.
130
+ 1. `ultra-plan` records model-selected technical seams, asks the owner only for a
131
+ public-contract or material trade-off, and rejects horizontal feature tasks.
116
132
  2. `ultra-dev` records six separate evidence dimensions, including real persistence,
117
133
  default-on behavior, vertical execution, and spec trace.
118
- 3. `ultra-test` searches exports for real consumers and exercises the primary flow.
134
+ 3. `ultra-test` searches exports for real consumers, exercises the primary flow, and
135
+ binds the result to Change id, task ids, intent, HEAD, and product-worktree digest.
119
136
 
120
137
  These are independent sensors. None rewrites a finding into product truth.
121
138
 
@@ -131,6 +148,12 @@ schema-constrained final response; the Node worker validates `finished`, `blocke
131
148
  writes its own receipt; stdout, stderr, native final output, and the launch receipt
132
149
  remain diagnostic files.
133
150
 
151
+ The instruction binds the active `change_id` and one of three semantic scopes: task
152
+ execution/continuation, scoped Research evidence, or aggregate Change
153
+ review/verification. Only task execution requires a task row. The read-only Research
154
+ and aggregate scopes preserve the same process boundary without inventing work merely
155
+ to make delegation reachable.
156
+
134
157
  Delegation does not grant authority or copy semantic state into another store. The
135
158
  worker reads and writes the same repository files in the specified worktree.
136
159
 
@@ -10,29 +10,39 @@ them, how staleness is detected, and how recovery works in Ultra Builder Pro v0.
10
10
  3. The model may interpret, decompose, investigate, and edit inside the authorized frame.
11
11
  4. Generated observations are disposable and never silently promoted.
12
12
  5. Git supplies revision identity, history, archive moves, comparison, and rollback.
13
+ 6. A Change keeps one stable `change_id`; directory position records lifecycle, not identity.
13
14
 
14
15
  ## Canonical artifacts
15
16
 
16
17
  | Artifact | Canonical content | Primary writer | Required readers | Staleness or conflict signal |
17
18
  |---|---|---|---|---|
18
- | `.ultra/north-star.md` | Owner's one-line goal and hard constraints | `ultra-init`, owner | every workflow; session Hook | owner correction or explicit replacement |
19
- | `.ultra/specs/product.md` | Product behavior and acceptance | research/change/delivery reconciliation | change, plan, dev, test, review, delivery | source/evidence conflict or unresolved marker |
20
- | `.ultra/specs/architecture.md` | Boundaries, authority, consumers, failure and recovery | research/change/delivery reconciliation | change, plan, dev, test, review, delivery | live-path evidence conflicts with text |
21
- | `.ultra/specs/discovery.md` | observations, unknowns, drift, and evidence queue | init/research | research, change, status | evidence resolves or overturns an entry |
19
+ | `.ultra/project-brief.md` | Raw owner intake, broad outline, explicit inputs, and open Research questions | `ultra-init`, owner correction | research, status; session Hook before an accepted baseline exists | owner correction or a recovered legacy one-line; never rewritten as researched truth |
20
+ | `.ultra/north-star.md` | Accepted project direction, outcome or metric decision, hard constraints, and exclusions | `ultra-research` after owner acceptance; owner correction | every workflow; session Hook | accepted correction, superseding decision, or evidence conflict |
21
+ | `.ultra/specs/product.md` | Product behavior and acceptance | research establishes; change/delivery reconcile touched sections | change, plan, dev, test, review, delivery | source/evidence conflict or unresolved marker |
22
+ | `.ultra/specs/architecture.md` | Boundaries, authority, consumers, failure and recovery | research establishes; change/delivery reconcile touched sections | change, plan, dev, test, review, delivery | live-path evidence conflicts with text |
23
+ | `.ultra/specs/discovery.md` | observations, unknowns, drift, and evidence queue | research; change for its scoped delta | research, change, status | evidence resolves or overturns an entry |
22
24
  | `.ultra/specs/research-distillate.md` | bounded synthesis of specification state | `ultra-research` | change, plan, delivery | stored source blob hash differs from Git blob hash |
23
- | `CONTEXT.md` | ubiquitous language and relationships | `ultra-domain-modeling` | every workflow and test naming | source/product use reveals ambiguity |
24
- | `.ultra/changes/active/<id>/intent.md` | one bounded requested outcome | `ultra-change`; Planning Posture by `ultra-plan` | plan, dev, test, review, status, delivery | acceptance or scope changes |
25
- | `.ultra/tasks.json` | task identity, graph, status, trace, and context path | `ultra-plan` / `ultra-dev` | every user workflow and context Hook | ledger and context status disagree |
25
+ | `CONTEXT.md` | ubiquitous language and relationships | `ultra-domain-modeling`, first called by research and later by any qualifying workflow | every workflow and test naming | source/product use reveals ambiguity |
26
+ | `.ultra/changes/{active,archive,abandoned}/<id>/intent.md` | one bounded requested outcome, reconciliation, Research Disposition, stable identity, and exact Abandonment closure when abandoned | `ultra-change`; Planning Posture by `ultra-plan` | active: research through delivery; all states: status and future Change history | more than one active Change, duplicate id across positions, missing Abandonment closure, or acceptance/scope change |
27
+ | `.ultra/tasks.json` | append-only task ledger: globally unique identity, stable `change_id`, same-Change graph, status, trace, and context path | `ultra-plan` / `ultra-dev` | every user workflow and context Hook | dependency crosses Change, or ledger/context status disagrees |
26
28
  | task `context_file` | acceptance, seams, implementation, evidence pointers, Completion, Resume Note | plan/dev | dev, test, review, status, delivery, resume | differs from ledger or current implementation |
27
29
  | `.ultra/decisions/<id>.md` | durable consequential owner decision | `ultra-think` after acceptance | every workflow in scope | superseded by a newer decision file |
28
30
  | `.ultra/evidence/<task-id>/...` | command output and bounded task evidence | `ultra-dev` | review, test, delivery | evidence revision differs from affected code |
29
- | `.ultra/test-report.json` | whole-system audit at one Git commit and worktree digest | `ultra-test` | status and delivery | `git_commit` or worktree digest differs from current checkout |
31
+ | `.ultra/test-report.json` | whole-system audit, findings, and owner disposition for one Change/task/intent/product snapshot | `ultra-test`; `ultra-deliver` may add owner disposition without changing findings or `passed` | status and delivery | `change_id`, `task_ids`, `intent_digest`, `git_commit`, or worktree digest differs |
30
32
  | `.ultra/changes/active/<id>/delivery.md` | outcome, docs, verification, review, debt, risk, recovery, effects | `ultra-deliver` | owner and archived Change history | active evidence or accepted scope changes |
31
- | `.ultra/research/<run-id>/...` | cited investigation reports | `ultra-research` | specs, change, plan, delivery | newer sources or later superseding run |
33
+ | `.ultra/research/<run-id>/<step-id>.md` | cited investigation report for one selected lens | `ultra-research` | specs, change, plan, delivery | newer sources or later superseding run |
32
34
 
33
35
  The repository files may use prose, tables, or JSON as appropriate. The format is not
34
36
  authority by itself; the canonical path and accepted writer contract are.
35
37
 
38
+ The append-only task ledger preserves sequential Change history. Current readers select
39
+ only rows whose `change_id` matches the one unique active Change. Moving its directory
40
+ to archive or abandoned never rewrites task identity, and an unfinished historical row
41
+ never becomes current merely because of its status. Before an abandoned move,
42
+ `ultra-change` appends `## Abandonment` with the owner decision, reason, reusable
43
+ evidence, and recovery or successor. Future Change reconciliation and Status consume
44
+ that record as history, not as accepted current intent.
45
+
36
46
  Every completed task has exactly one `.ultra/evidence/<task-id>/evidence.json` with
37
47
  schema `ultra-task-evidence-v1`. It records `task_id`, forty-character `git_head`, exact
38
48
  commands (`command`, `exit_code`, `evidence_ref`), all six evidence dimensions,
@@ -51,10 +61,24 @@ Pure file state uses three mechanisms:
51
61
  A state field records a mechanically checkable fact. Route selection remains a model
52
62
  judgment. Do not add a workflow-position field merely to decide which Skill should run.
53
63
 
64
+ At most one Change is active in one worktree. Zero active Changes is valid before a new
65
+ request and after delivery; completed current tasks may remain active while awaiting
66
+ Test or Deliver. More than one active directory is a conflict for owner/model repair,
67
+ not a reason for code to select the first entry.
68
+
54
69
  Task completion uses a dual write: `.ultra/tasks.json` and the task context header must
55
70
  agree. The writer reads both back. A mismatch is a visible recovery diagnostic; neither
56
71
  side silently wins.
57
72
 
73
+ ## Single-writer boundary
74
+
75
+ One primary host model writes canonical `.ultra` files in a worktree. Native review
76
+ workers are read-only sensors, and delegated CLIs write only declared non-`.ultra`
77
+ roots in isolated registered worktrees; their findings return to the primary writer.
78
+ Parallel implementation uses separate worktrees and explicit Git integration. Ultra
79
+ does not add a lock service or semantic state machine to make concurrent canonical
80
+ writes appear safe.
81
+
58
82
  ## Decisions and reductions
59
83
 
60
84
  Write a durable decision only when it is difficult to reverse, surprising without
@@ -80,7 +104,10 @@ and provenance support the claim. The evidence is retained or cited; it is not c
80
104
  into a second semantic ledger.
81
105
 
82
106
  A test result is current only for the code and environment it exercised. A report must
83
- carry the exact command, exit code, and Git commit. Missing or stale evidence remains
107
+ carry the exact command, exit code, stable Change id, exact current task ids, intent
108
+ SHA-256, Git commit, and product-worktree digest. Delivery metadata and moving the same
109
+ Change between active and archive do not alter the product digest; changing intent
110
+ bytes does alter `intent_digest`. Missing or stale evidence remains
84
111
  `not_run`, `unknown`, or `stale`; it is never inferred as passing.
85
112
 
86
113
  ## Derived artifacts
@@ -89,6 +116,7 @@ These paths are intentionally non-authoritative:
89
116
 
90
117
  | Path | Purpose | Recovery |
91
118
  |---|---|---|
119
+ | `.ultra/research/<run-id>/brief.md` | optional Wayfinding question map for a multi-lens Research run | rebuild from Project Brief, accepted authority, evidence needs, and owner checkpoints |
92
120
  | `.ultra/.runtime/compact-snapshot.md` | compaction acceleration | rebuild from files and Git |
93
121
  | `.ultra/.runtime/delegations/` | delegated process receipts and logs | inspect result or rerun with new id |
94
122
  | `.ultra/.runtime/worktrees/` | delegated checkout locations | inspect Git worktrees and remove safely |
@@ -104,9 +132,10 @@ those paths cannot delete accepted product intent, task contracts, or decisions.
104
132
  After interruption or host change:
105
133
 
106
134
  1. identify the repository root and current `HEAD`;
107
- 2. read `.ultra/tasks.json`;
108
- 3. read the unfinished task's full context and closing Resume Note;
109
- 4. read `CONTEXT.md`, relevant decisions, active Change, specifications, and evidence;
135
+ 2. resolve zero or one active `change_id`, then read `.ultra/tasks.json`;
136
+ 3. select only matching tasks and read the frontier task's full context and closing Resume Note;
137
+ 4. read the Project Brief, accepted North Star, `CONTEXT.md`, relevant decisions, active
138
+ Change, specifications, and evidence;
110
139
  5. inspect the working tree and compare it with Completion and evidence claims;
111
140
  6. repair any ledger/context mismatch explicitly before relying on status;
112
141
  7. continue through the next observable acceptance boundary.
package/docs/DECISIONS.md CHANGED
@@ -21,6 +21,16 @@ two canonical callers or it is inlined.
21
21
  This keeps reusable reasoning in one place without turning it into another user-facing
22
22
  route or custom-agent registry.
23
23
 
24
+ ## Intake, baseline, and delta
25
+
26
+ Init preserves raw owner intake in the Project Brief; Research establishes the accepted North Star, domain language, and specification baseline; Change reconciles only the sections touched by one requested delta.
27
+
28
+ The optional Research Wayfinding brief is derived navigation, not a fifteenth Skill or
29
+ semantic authority. The first six Research references remain dependency-aware semantic
30
+ lenses. Grilling controls how caller-named questions are asked, Think stress-tests one
31
+ consequential decision, and Domain Modeling promotes settled vocabulary. This prevents
32
+ Init from consuming Research while keeping reusable methods in one canonical place.
33
+
24
34
  ## Rule-side assets travel with Skills
25
35
 
26
36
  `.ultra/` contains project data only. Reusable executable examples live under
@@ -37,8 +47,14 @@ Directory position and explicit fields record mechanically checkable facts. The
37
47
  model reads those facts and chooses the next route. There is no persisted “current
38
48
  workflow stage” whose value can override the actual files.
39
49
 
40
- Task status is written to both the ledger and context, then read back. Change archive
41
- is a `git mv`. Test-report freshness compares `git_commit` with `HEAD`.
50
+ Task status is written to both the ledger and context, then read back. Tasks retain a
51
+ stable `change_id` in an append-only ledger; current readers select only rows matching
52
+ the one active Change. Archive or abandonment is a `git mv`. Test-report freshness
53
+ compares Change id, current task ids, intent digest, `git_commit`, and product-worktree
54
+ digest with the current checkout. Deliver reconciles first and finalizes only while
55
+ that complete snapshot remains current. A separate request cannot create a second
56
+ active Change; it waits, exits the current Change, or is explicitly reconciled into the
57
+ same id.
42
58
 
43
59
  ## Three independent integration defences
44
60
 
@@ -62,7 +78,8 @@ their repair is authorization scoped to the exact command digest.
62
78
  `ubp delegate run` starts a supported CLI with an immutable instruction, explicit
63
79
  permission JSON, and named worktree. Files are the cross-host state. The parent reads a
64
80
  stable terminal result instead of worker chatter. Delegation adds no semantic store and
65
- no authority.
81
+ no authority. The instruction selects task execution, scoped Research evidence, or
82
+ aggregate Change review/verification; only task execution requires a task row.
66
83
 
67
84
  ## Installation isolation
68
85