empirical-sdd 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +268 -1
- package/README.md +79 -7
- package/dist/changed-tests.d.ts +18 -0
- package/dist/checkouts.d.ts +9 -0
- package/dist/cli.js +28016 -22264
- package/dist/contract-amendment.d.ts +32 -0
- package/dist/contract-summary.d.ts +18 -0
- package/dist/core.d.ts +130 -4
- package/dist/decisions.d.ts +8 -0
- package/dist/delivery.d.ts +87 -2
- package/dist/demo-integration-repair.js +20793 -15625
- package/dist/demo-ticket-policy.js +20780 -15611
- package/dist/direct.d.ts +43 -0
- package/dist/index.d.ts +13 -6
- package/dist/index.js +27569 -22355
- package/dist/integrations.js +4566 -1895
- package/dist/journal-attributes.d.ts +8 -0
- package/dist/lifecycle.d.ts +28 -1
- package/dist/linear-mcp-tracking.d.ts +4 -1
- package/dist/local-file-patterns.d.ts +24 -0
- package/dist/mcp.d.ts +3 -0
- package/dist/mcp.js +26350 -21026
- package/dist/mockups.d.ts +9 -0
- package/dist/overview.d.ts +14 -1
- package/dist/policy.d.ts +5 -1
- package/dist/promotion-proof.d.ts +225 -0
- package/dist/protocol.d.ts +185 -1
- package/dist/protocol.js +90 -5
- package/dist/qa.d.ts +93 -2
- package/dist/review.d.ts +2 -1
- package/dist/roadmap.d.ts +62 -0
- package/dist/routing.d.ts +10 -0
- package/dist/runtime.d.ts +9 -1
- package/dist/specifications.d.ts +3 -0
- package/dist/storage.d.ts +9 -4
- package/dist/tracker-comments.d.ts +1 -0
- package/dist/tracker-events.d.ts +9 -0
- package/dist/tracker-lifecycle.d.ts +195 -0
- package/dist/tracking.d.ts +107 -1
- package/dist/types.d.ts +385 -5
- package/dist/worktree-files.d.ts +92 -2
- package/dist/worktree-prepare.d.ts +8 -0
- package/dist/worktrees.d.ts +34 -3
- package/docs/mcp.md +300 -32
- package/docs/protocol.md +515 -50
- package/docs/security.md +15 -0
- package/docs/tracking.md +144 -0
- package/docs/verification-performance.md +13 -1
- package/docs/versioning.md +7 -9
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,271 @@ under the alpha rules in [docs/versioning.md](docs/versioning.md).
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.36.0] - 2026-09-16
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added the empirical-init **Track every change** ticket preset. It expands the
|
|
16
|
+
complete feature/fix/chore by Fast/Quick/Complex matrix to `required`, shows
|
|
17
|
+
that matrix before setup is saved, and applies the existing strict tracker
|
|
18
|
+
mutation gate to every kind of work until its ticket is synchronized. Active
|
|
19
|
+
Empirical tasks now also require a destination action and tracker-gate check
|
|
20
|
+
before the first write after changing repository root, checkout, worktree, or
|
|
21
|
+
host environment.
|
|
22
|
+
- Automatic Policy v2 post-commit synchronization, prepared Linear MCP intents,
|
|
23
|
+
and recovery of this checkout's pending completed tickets.
|
|
24
|
+
- Explicit Init confirmations for all workflow/delivery mappings and the Done
|
|
25
|
+
milestone, plus receipt-backed release and deployment observations.
|
|
26
|
+
- Action packets, `empirical_status` and `empirical_explain` return a
|
|
27
|
+
deterministic `roadmap`: `progress` and `phases[]` from the engine's single
|
|
28
|
+
phase order per profile (Complex 8, Quick 5, Fast 2 non-terminal phases),
|
|
29
|
+
one `checks[]` entry per verification-matrix check with its state, receipt id
|
|
30
|
+
and last duration (a `passed` state binds the same proof the completion gate
|
|
31
|
+
requires, including the current repository tree digest), an `estimateMs` for unrun and failed checks from prior
|
|
32
|
+
attempt durations, classified `waitingOn[]` items, a concrete `nextAction`
|
|
33
|
+
and `verificationLeft`. Idle checkouts return `roadmap: null`. Roadmaps and
|
|
34
|
+
estimates are recomputed on every read and never change a gate or transition.
|
|
35
|
+
- Human CLI output for `status`, `explain`, `next` and `loop` renders the
|
|
36
|
+
Empirical status card (Done, Not done, Next, Waiting on you, Verification)
|
|
37
|
+
from that roadmap, and `--json` exposes the same `roadmap` field.
|
|
38
|
+
- Generated agent skills require the status card at start or resume, at every
|
|
39
|
+
phase change, at every stop, and before any run whose summed estimate is over
|
|
40
|
+
60 seconds or unknown, where they state the estimate and offer to defer.
|
|
41
|
+
- `empirical_overview` adds a read-only roadmap summary (progress, phase, next
|
|
42
|
+
action, waiting count, remaining checks) for the first 128 readable spec
|
|
43
|
+
copies; unreadable, failing and beyond-limit copies keep their bounded
|
|
44
|
+
diagnostic and report `roadmap: null`.
|
|
45
|
+
- `empirical_qa_execute` and `empirical_integrate` send MCP
|
|
46
|
+
`notifications/progress` for each existing heartbeat when the request carries
|
|
47
|
+
a `progressToken`; requests without one are unchanged.
|
|
48
|
+
- Added direct mode: the generated local `empirical` skill and the automatic
|
|
49
|
+
instruction block now start with a self-contained Direct mode section. A
|
|
50
|
+
request that says "direct", "without Empirical" or "quick change" is handled
|
|
51
|
+
as a plain agent turn that makes no Empirical call, reads no specification,
|
|
52
|
+
decision, capability or context page, runs a test, lint, typecheck or build
|
|
53
|
+
only when asked, and ends with
|
|
54
|
+
`Changed <X> in <N> files · not tested (not requested) · say "track this" to formalize`.
|
|
55
|
+
- Added `empirical_direct` (library `direct`, private CLI `direct`) with exactly
|
|
56
|
+
three actions: `pause` ("go direct") records `pause: { since, baseCommit }` on
|
|
57
|
+
the selected feature with one `Pause: direct mode` journal event and no spec,
|
|
58
|
+
delta, decision, receipt or tracker gate; `resume` ("back to Empirical")
|
|
59
|
+
clears the pause and folds the paths changed since the base commit in as one
|
|
60
|
+
`iterate` for Fast work in Implement or implemented Done and for iterative
|
|
61
|
+
Complex work in an iterate-eligible phase, and otherwise as one journal event
|
|
62
|
+
that also names any iterate guard a paused feature could not have cleared;
|
|
63
|
+
`track` ("track this") rebuilds direct commits and uncommitted paths from Git
|
|
64
|
+
and starts a Fast (default) or Complex feature whose request lists them.
|
|
65
|
+
- While a feature is paused, `loop` and `next` return only a paused action naming
|
|
66
|
+
`resume`, `status` and `overview` report the pause, and `complete`, `iterate`,
|
|
67
|
+
`consolidate`, `promote`, `retry`, QA execution and recording, evidence
|
|
68
|
+
execution and collection, `integrate`, `deliver` and `publish` fail with
|
|
69
|
+
`FEATURE_PAUSED` without state change.
|
|
70
|
+
- Added an optional team `defaultMode` (`empirical` or `direct`) to
|
|
71
|
+
`.empirical/config.json` and a personal override in the checkout's
|
|
72
|
+
`<git-dir>/empirical-sdd/preferences.json` through `empirical_configure` with
|
|
73
|
+
`scope: "personal"`. Absence keeps existing configuration bytes identical, any
|
|
74
|
+
other value fails `INVALID_CONFIG`, and `status` reports team, personal and
|
|
75
|
+
effective values with a warning for an unreadable or invalid personal file.
|
|
76
|
+
- Complex Implement actions carry `contractSummary`, a deterministic extract of
|
|
77
|
+
the feature's goal, acceptance criteria, accepted decisions and open risks
|
|
78
|
+
bounded to 6,000 characters, with the full spec, design, decisions and plan
|
|
79
|
+
listed as optional `references`. Their `capabilityContext` lists only the
|
|
80
|
+
capabilities the feature's own deltas declare. Iteration actions add
|
|
81
|
+
`adjustmentRequest`, the newest request verbatim, which overrides conflicting
|
|
82
|
+
earlier criteria and decisions; the superseding decision is recorded after the
|
|
83
|
+
change and never blocks Implement completion.
|
|
84
|
+
- During an iteration of a Complex feature started with `iterative: true` (recorded
|
|
85
|
+
durably as `lifecycle.iterative`), contract edits to acceptance criteria, declared
|
|
86
|
+
requirement contents and decisions are an amendment by default:
|
|
87
|
+
`empirical_iterate` and the Implement completion accept them and re-approve the
|
|
88
|
+
amended specification and delta digests in one journal event, without returning
|
|
89
|
+
to Specify and without a human confirmation gate. `amendContract: true`
|
|
90
|
+
(`--amend-contract`) is the explicit equivalent, cannot be combined with
|
|
91
|
+
`reviseContract` (`INVALID_ARGUMENT`), and Fast rejects it with
|
|
92
|
+
`PROFILE_CONFLICT`. The approved contract is retained in
|
|
93
|
+
`contract-revisions/<revision>.baseline.json` and each change in
|
|
94
|
+
`<revision>.amendment.json` with previous and current criterion text and
|
|
95
|
+
superseded decision ids. Consolidation and Review actions, the Review packet and
|
|
96
|
+
`empirical_explain` list every amendment since the last full approval. Raising
|
|
97
|
+
the risk floor, adding or removing a delta capability, adding, removing or
|
|
98
|
+
renaming a requirement block, changing its operation, or changing `impact.json`
|
|
99
|
+
fails with `CONTRACT_REVISION_REQUIRED` and re-approves nothing, while a
|
|
100
|
+
`failed`, `blocked` or `awaiting_human` outcome can still be recorded. The risk
|
|
101
|
+
limit compares the resulting risk level over criteria and declared requirement
|
|
102
|
+
text, so rewording, reordering or lowering the floor is not an escalation.
|
|
103
|
+
Outside the iteration stage, and for Complex features without the iterative
|
|
104
|
+
opt-in, contract edits keep failing with `SPEC_CHANGED`, `DELTA_CHANGED` or
|
|
105
|
+
`IMPACT_CHANGED`, and `reviseContract` is unchanged. Retained history is
|
|
106
|
+
authenticated: a baseline is trusted only while it reproduces the approved
|
|
107
|
+
specification and delta digests, and a missing or malformed amendment record
|
|
108
|
+
fails with `CONTRACT_HISTORY_MISSING` or `CONTRACT_HISTORY_INVALID`.
|
|
109
|
+
|
|
110
|
+
### Fixed
|
|
111
|
+
|
|
112
|
+
- Any verification command can declare `full-ci`, not only `bun run ci`, so
|
|
113
|
+
repositories built with pnpm, npm, Make, Python or other tools can satisfy the
|
|
114
|
+
promotion gate, use integration replay coverage and opt into `remote-checks`
|
|
115
|
+
(SDD-72). Changed-file commands still cannot declare it. For a non-`bun run ci`
|
|
116
|
+
full-CI command, changes to task-runner manifests in its `cwd` or to files named
|
|
117
|
+
in its argv replay every command during integration and require local proof
|
|
118
|
+
under `remote-checks`. Bun-only policies keep their configuration digest.
|
|
119
|
+
- `rationale.missingContext` now lists only unmet requirements: existing
|
|
120
|
+
artifacts, evidence kinds proven by accepted receipts at the current revision
|
|
121
|
+
and QA checks with passing current receipts are excluded, while
|
|
122
|
+
`requiredContext` is unchanged.
|
|
123
|
+
- CLI step counts came from a hardcoded 10-phase Complex list that included
|
|
124
|
+
Deliver and Publish; they now equal the engine's `roadmap.progress`.
|
|
125
|
+
|
|
126
|
+
### Migration
|
|
127
|
+
|
|
128
|
+
- Schema 5 is unchanged. Update the installed package, refresh the managed
|
|
129
|
+
Empirical skills and repository instructions, and restart connected agent/MCP
|
|
130
|
+
sessions to load the new direct-mode and status-card guidance.
|
|
131
|
+
- Existing configurations retain their defaults. To adopt direct mode, request
|
|
132
|
+
it explicitly or configure the optional team/personal `defaultMode`. To adopt
|
|
133
|
+
automatic ticket completion on release or deployment, configure and confirm
|
|
134
|
+
the tracker lifecycle status mappings and production environment in Init.
|
|
135
|
+
- Complex iterative features created before 0.36.0 do not have the durable
|
|
136
|
+
`lifecycle.iterative` opt-in and continue using strict contract revision.
|
|
137
|
+
Finish them with the existing revision path, or start new iterative work
|
|
138
|
+
through the normal workflow to use in-place amendments. Do not edit journal
|
|
139
|
+
state or baseline files to add the marker manually.
|
|
140
|
+
- Non-Bun repositories may explicitly mark their full-CI command with `full-ci`;
|
|
141
|
+
changed-file commands remain ineligible. Existing Bun-only policies need no
|
|
142
|
+
change.
|
|
143
|
+
|
|
144
|
+
## [0.35.0] - 2026-09-15
|
|
145
|
+
|
|
146
|
+
### Added
|
|
147
|
+
|
|
148
|
+
- Approved mockup files and the chosen direction now accompany Implement, with
|
|
149
|
+
instructions to preserve the approved layout and styles. Missing or unreadable
|
|
150
|
+
mockup files do not introduce a new implementation gate.
|
|
151
|
+
|
|
152
|
+
- Added default discovery of ignored, untracked local environment files for
|
|
153
|
+
worktrees through `isolation.localFiles` (`discover`, `include`, `exclude`;
|
|
154
|
+
defaults `**/.env` and `**/.env.*` excluding `.env.example`, `.env.sample` and
|
|
155
|
+
`.env.template`, never under `node_modules`, `.git` or `.empirical`). Proposals
|
|
156
|
+
list every explicit and discovered path and every refusal; approving the
|
|
157
|
+
proposal approves exactly those copies. Discovery is bounded to 200 candidates
|
|
158
|
+
and 1 MiB per file, with refusals reported by path and reason.
|
|
159
|
+
- Added `empirical_worktree_prepare` (library `prepareWorktree`, internal CLI
|
|
160
|
+
`worktree-prepare`) to preview and apply local file copies for worktrees
|
|
161
|
+
created by host tools, `git worktree add`, delegation or transfer.
|
|
162
|
+
- Added `localFiles: { copied, skippedExisting, missingOptional, unapproved, refused }`
|
|
163
|
+
to worktree handoffs and prepare results, plus local file lines in proposal,
|
|
164
|
+
handoff, configuration and Init text.
|
|
165
|
+
|
|
166
|
+
- Fast features iterate through `empirical_iterate` from Implement or
|
|
167
|
+
implemented Done without promotion or test runs: the lifecycle iteration
|
|
168
|
+
counter increments, the journal keeps every `Iterate:` event, and `id`
|
|
169
|
+
addresses a Done feature. Fast consolidate requires explicit promotion.
|
|
170
|
+
- Fast starts create `decisions.md`; status and explain list Accepted Fast
|
|
171
|
+
decisions and report format issues as non-blocking `decisionWarnings`.
|
|
172
|
+
- QA planning, QA execution and evidence execution accept an explicit
|
|
173
|
+
`verificationProfile`: `iterate` runs only `testFiles: "changed"` commands and
|
|
174
|
+
`final` runs the configured final scope (Fast `final` excludes full CI and stays
|
|
175
|
+
unverified). Action packets report `verificationProfiles`.
|
|
176
|
+
- `empirical_yolo` accepts `profile`; explicit Fast defaults to and is limited to
|
|
177
|
+
the `implemented` ceiling.
|
|
178
|
+
- Routes report `matchedFloors`.
|
|
179
|
+
- Policy v2 accepts optional `promotion.fullCi` (`local` or `remote-checks`);
|
|
180
|
+
policy and configure results report a read-only `effective` value. Empirical
|
|
181
|
+
versions before this release reject a policy that sets `promotion`.
|
|
182
|
+
- Opt-in `remote-checks` promotion proof: passing, app-pinned GitHub required
|
|
183
|
+
check runs for the exact pushed commit create an immutable `remote-checks`
|
|
184
|
+
receipt through an injectable checks reader. Integrate accepts it only for an
|
|
185
|
+
already pushed commit; Deliver may push and open the source pull request and
|
|
186
|
+
returns `promotion-proof-required` until it passes, binding proof per head
|
|
187
|
+
before any merge; Publish rejects it. Remote proof is refused when the branch
|
|
188
|
+
changes policy, package scripts, workflows, composite actions, `scripts/**`,
|
|
189
|
+
lockfiles, `.gitmodules`, symlinks or gitlinks, or when target workflows use
|
|
190
|
+
unpinned `uses:` references. Repositories whose protection uses legacy
|
|
191
|
+
unpinned status contexts or ruleset entries without an app pin must pin the app,
|
|
192
|
+
and must SHA-pin workflow and action references, before `remote-checks` can pass.
|
|
193
|
+
|
|
194
|
+
### Changed
|
|
195
|
+
|
|
196
|
+
- Init now declares `.empirical/** -text` in `.gitattributes` to preserve
|
|
197
|
+
digest-bound journal bytes across Git checkouts. Existing project-specific
|
|
198
|
+
Empirical attribute rules are preserved.
|
|
199
|
+
- Lock waiters renew their wait budget as ownership changes, while retaining a
|
|
200
|
+
bounded overall wait, so healthy contention does not report a stuck repository.
|
|
201
|
+
|
|
202
|
+
- Existing configurations now discover local environment files by default
|
|
203
|
+
without being rewritten, so worktree proposals and their approval tokens change
|
|
204
|
+
when ignored environment files exist; pass the proposal's `localFiles`
|
|
205
|
+
unchanged to `empirical_worktree_create`. Set `discover: false` to opt out.
|
|
206
|
+
- Worktrees created outside Empirical can now receive local files through
|
|
207
|
+
prepare, and generated agent guidance routes local file provisioning through
|
|
208
|
+
the Empirical proposal and prepare operation.
|
|
209
|
+
|
|
210
|
+
- Deliver accepts the full-CI receipt Integrate recorded for an identical
|
|
211
|
+
candidate instead of requiring a second local full-CI run; `reuseReceiptId` and
|
|
212
|
+
Publish keep exact revision matching. The delivered source pull request head is
|
|
213
|
+
bound to the proven commit before review, ready or merge.
|
|
214
|
+
- A failed Fast completion now blocks the same Fast feature with `retry` and
|
|
215
|
+
explicit `promote` as recovery paths instead of promoting it to Complex, and
|
|
216
|
+
`promote` accepts that block.
|
|
217
|
+
- An explicit Fast request is no longer promoted by integration or delivery
|
|
218
|
+
wording; sensitive, migration and publication signals still promote it.
|
|
219
|
+
- Integrate, Deliver and Publish refuse Fast features with `PROMOTION_REQUIRED`
|
|
220
|
+
guidance; only explicit `empirical_promote` changes a Fast feature to Complex.
|
|
221
|
+
- `receiptIds` is optional on `empirical_integrate` and `empirical_deliver`.
|
|
222
|
+
- Generated skills and phase instructions explain lane choice, Fast iteration,
|
|
223
|
+
explicit promotion, the phrase-to-profile mapping, one-request test
|
|
224
|
+
authorization, carry-over and remote-checks, and no longer state that
|
|
225
|
+
consolidation authorizes tests.
|
|
226
|
+
|
|
227
|
+
- Fast action packets no longer list every living capability specification;
|
|
228
|
+
agents open a capability only when the change touches it. Complex and
|
|
229
|
+
promoted features keep the full list.
|
|
230
|
+
- Verification commands can opt into `testFiles: "changed"` to run only the
|
|
231
|
+
test files matching changed files, failing with `NO_CHANGED_TESTS` rather than
|
|
232
|
+
falling back to the whole suite.
|
|
233
|
+
- Independent integration validation no longer re-runs verification commands
|
|
234
|
+
whose declared checks a full-CI command in the same directory already covers,
|
|
235
|
+
unless the feature changes the policy or package scripts, and reports which
|
|
236
|
+
commands executed or were covered.
|
|
237
|
+
|
|
238
|
+
### Fixed
|
|
239
|
+
|
|
240
|
+
- Windows worktree creation and recovery recognize canonical directory identity
|
|
241
|
+
across separator, case and short-path spellings. Recovery errors identify the
|
|
242
|
+
mismatched check and explain when a newer runtime is needed to load the base.
|
|
243
|
+
- Invalid mockup approval feedback now shows the approval document shape, even
|
|
244
|
+
during Verify, instead of the fidelity-report shape.
|
|
245
|
+
|
|
246
|
+
- `empirical update` and `empirical uninstall` work on Windows again. Node refuses
|
|
247
|
+
to spawn `.cmd` wrappers without a shell (CVE-2024-27980), so npm and the
|
|
248
|
+
PATH-visible CLI now run through `cmd.exe` by quoted absolute path and the
|
|
249
|
+
npm-installed CLI runs through Node, including prefixes containing spaces (SDD-66).
|
|
250
|
+
|
|
251
|
+
### Migration
|
|
252
|
+
|
|
253
|
+
- Update the package and installed global skills with `empirical update`, restart
|
|
254
|
+
the coding agent/MCP host, invoke `empirical-init` in each existing repository
|
|
255
|
+
to refresh managed instructions and local skills, then reload affected sessions.
|
|
256
|
+
- Existing configurations discover ignored, untracked `.env` and `.env.*` files
|
|
257
|
+
by default. Review the paths in worktree proposals; set
|
|
258
|
+
`isolation.localFiles.discover` to `false` to retain explicit-only copying.
|
|
259
|
+
Existing `isolation.copyFiles` entries remain required. Use worktree prepare
|
|
260
|
+
to provision worktrees created by another tool without overwriting files.
|
|
261
|
+
- Fast failures now stay Fast. Retry or explicitly promote the same feature
|
|
262
|
+
when stronger verification or integration is needed. To iterate on an existing
|
|
263
|
+
Complex implementation, request iterative development and explicitly request
|
|
264
|
+
final verification when ready; iteration alone does not authorize tests.
|
|
265
|
+
- `promotion.fullCi` remains `local` by default. Opt into `remote-checks` only
|
|
266
|
+
after configuring app-pinned required checks and SHA-pinned workflow/action
|
|
267
|
+
references. Upgrade every participating agent before adding this policy field;
|
|
268
|
+
older versions reject it. Publication still requires local proof.
|
|
269
|
+
- When refreshing an existing repository, review and commit the `.gitattributes`
|
|
270
|
+
journal rule added by Init. An existing rule for `.empirical` is left untouched;
|
|
271
|
+
ensure it preserves journal bytes across worktrees. Keep existing journal and
|
|
272
|
+
receipt files intact.
|
|
273
|
+
- Schema 5 and existing specifications, journals, tracker bindings and receipts
|
|
274
|
+
are retained. Do not delete workflow state to upgrade.
|
|
275
|
+
|
|
11
276
|
## [0.34.0] - 2026-09-14
|
|
12
277
|
|
|
13
278
|
### Added
|
|
@@ -543,7 +808,9 @@ Published through GitHub Actions trusted publishing with npm provenance.
|
|
|
543
808
|
|
|
544
809
|
- Prepared and released package version `0.20.2`.
|
|
545
810
|
|
|
546
|
-
[Unreleased]: https://github.com/goempirical/empirical-sdd/compare/v0.
|
|
811
|
+
[Unreleased]: https://github.com/goempirical/empirical-sdd/compare/v0.36.0...HEAD
|
|
812
|
+
[0.36.0]: https://github.com/goempirical/empirical-sdd/compare/v0.35.0...v0.36.0
|
|
813
|
+
[0.35.0]: https://github.com/goempirical/empirical-sdd/compare/v0.34.0...v0.35.0
|
|
547
814
|
[0.34.0]: https://github.com/goempirical/empirical-sdd/compare/v0.33.0...v0.34.0
|
|
548
815
|
[0.33.0]: https://github.com/goempirical/empirical-sdd/compare/v0.32.0...v0.33.0
|
|
549
816
|
[0.32.0]: https://github.com/goempirical/empirical-sdd/compare/v0.31.0...v0.32.0
|
package/README.md
CHANGED
|
@@ -108,24 +108,79 @@ integration are different claims, and Empirical reports only the highest level
|
|
|
108
108
|
actually proven: `implemented`, `verified`, `integrated`, `delivered`, or
|
|
109
109
|
`published`.
|
|
110
110
|
|
|
111
|
-
Fast
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
Choose Fast for small, self-contained changes. Work that builds on an existing
|
|
112
|
+
foundation and will be integrated belongs in Complex iterative
|
|
113
|
+
(`empirical_complex` with `iterative: true`): adjust with `empirical_iterate`
|
|
114
|
+
without test runs, then say "ready to close" to run final verification once.
|
|
115
|
+
Each Complex implementation packet carries a bounded contract summary instead of
|
|
116
|
+
the full documents, and the newest adjustment wins: a behavior change at the same
|
|
117
|
+
risk floor amends the criteria and decisions in place, with the approved contract
|
|
118
|
+
snapshotted for review. Raising the risk floor or changing the declared capability
|
|
119
|
+
scope still requires an explicit contract revision through Specify/Design/Plan.
|
|
120
|
+
|
|
121
|
+
Fast trades verification confidence for less waiting and process. A follow-up
|
|
122
|
+
adjustment to the same Fast feature uses `empirical_iterate`, from Implement or
|
|
123
|
+
after Done: no promotion, no test run, and the journal keeps every adjustment.
|
|
124
|
+
A failed Fast completion blocks in place for `retry` or explicit promotion.
|
|
125
|
+
Promotion is always explicit: Fast consolidate, Integrate and Deliver require
|
|
126
|
+
`empirical_promote`, which continues the same spec through Complex Specify and
|
|
127
|
+
preserves its history and identity. Historical completed Fast records retain the
|
|
128
|
+
evidence and completion level they originally earned.
|
|
115
129
|
|
|
116
130
|
Delivery is never implied. Empirical does not infer permission to merge a pull
|
|
117
131
|
request, bypass protection, create a release, or publish a package.
|
|
118
132
|
|
|
133
|
+
Every read returns one deterministic roadmap, and every stop shows the same
|
|
134
|
+
status card built from it, so you always see where the work is and what it
|
|
135
|
+
needs from you:
|
|
136
|
+
|
|
137
|
+
```text
|
|
138
|
+
Empirical · add-team-invitations · Complex · verify (6/8) · rev 5
|
|
139
|
+
Done: specify, design, plan, implement, context
|
|
140
|
+
Not done: verify: qa-unit unrun, qa-browser missing-environment
|
|
141
|
+
Next: Run qa-unit at revision 5 (~2m 10s) when you request tests
|
|
142
|
+
Waiting on you: [test-request] Ask to run 1 check (~2m 10s), or keep iterating
|
|
143
|
+
[environment] qa-browser needs isolated-consumer
|
|
144
|
+
Verification: 2 of 4 checks left (~2m 10s known; 1 unknown)
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
`empirical status`, `explain`, `next` and `loop` print it, `--json` carries the
|
|
148
|
+
same `roadmap`, and the agent skill shows it at every start, phase change and
|
|
149
|
+
stop, and before a long run it estimates and offers to defer. The card reports
|
|
150
|
+
facts; it authorizes nothing.
|
|
151
|
+
## Work directly when you want to
|
|
152
|
+
|
|
153
|
+
Say "direct", "without Empirical" or "quick change" and the agent just edits:
|
|
154
|
+
no specification, state, phase, receipt, gate, tracker update or worktree
|
|
155
|
+
proposal, and no reading of specs, decisions or context pages. Nothing runs
|
|
156
|
+
unless you ask for it, and the turn ends with one line such as
|
|
157
|
+
`Changed the button label in 1 files · not tested (not requested) · say "track this" to formalize`.
|
|
158
|
+
|
|
159
|
+
Inside a repository or feature that uses Empirical, "go direct" pauses the
|
|
160
|
+
selected feature, "back to Empirical" folds the direct diff back in as one
|
|
161
|
+
iteration, and "track this" rebuilds recent direct commits and uncommitted files
|
|
162
|
+
from Git into a Fast (or Complex) feature. Push, merge, pull request, tag,
|
|
163
|
+
publish, credential use and destructive Git still need an explicit request.
|
|
164
|
+
|
|
165
|
+
A team can set `defaultMode` to `direct` in `.empirical/config.json`, and each
|
|
166
|
+
developer can override it for their own checkout; explicit Fast, Complex or
|
|
167
|
+
"use Empirical" requests always start those lanes.
|
|
168
|
+
|
|
119
169
|
## Run tests when you need them
|
|
120
170
|
|
|
121
171
|
Fast and Complex iteration do not automatically run tests after edits. Ask for a
|
|
122
172
|
run when ready:
|
|
123
173
|
|
|
124
|
-
- “Run
|
|
174
|
+
- “Run the changed tests” or “run the affected tests” uses the `iterate`
|
|
175
|
+
verification profile: only commands configured with `testFiles: "changed"`.
|
|
176
|
+
- “Now run it”, “run everything” or “ready to close” uses the `final` profile.
|
|
125
177
|
- “Keep iterating; skip tests for now” leaves verification pending.
|
|
126
|
-
- “Run the full suite” explicitly requests broader verification.
|
|
127
178
|
|
|
128
|
-
One test request does not enable automatic reruns after subsequent changes
|
|
179
|
+
One test request does not enable automatic reruns after subsequent changes, and
|
|
180
|
+
no phase, iteration or consolidation runs tests by itself. One exact full-CI
|
|
181
|
+
receipt recorded at Integrate also serves Deliver when nothing changed, and a
|
|
182
|
+
repository can opt into `promotion.fullCi: "remote-checks"` so passing GitHub
|
|
183
|
+
required checks on the exact pushed commit stand in for local full CI.
|
|
129
184
|
If no focused command is configured, the agent reports the gap instead of
|
|
130
185
|
silently running the entire suite. Complex still requires real evidence before
|
|
131
186
|
claiming verified completion; Fast can finish implemented and unverified.
|
|
@@ -184,6 +239,14 @@ executes them through the authenticated Linear MCP tools, and validated results
|
|
|
184
239
|
converge the same binding, milestone, and strict-gate records without sharing
|
|
185
240
|
the OAuth token.
|
|
186
241
|
|
|
242
|
+
### Automatic lifecycle tracking
|
|
243
|
+
|
|
244
|
+
Policy v2 workflow actions now synchronize automatically. Linear MCP hosts
|
|
245
|
+
receive a prepared tracker intent, and trusted host dispatchers can execute it
|
|
246
|
+
automatically. Init confirms every discovered mapping and whether Done means
|
|
247
|
+
local completion, a confirmed release, or production deployment. See
|
|
248
|
+
[Lifecycle tracking](docs/tracking.md) for setup, recovery, and the observation hook.
|
|
249
|
+
|
|
187
250
|
## Documentation
|
|
188
251
|
|
|
189
252
|
- [Practical guide](https://goempirical.github.io/empirical-sdd/) — visual onboarding and diagrams
|
|
@@ -225,6 +288,15 @@ their original checkout. Transferring an unfinished spec to another worktree
|
|
|
225
288
|
requires its exact source revision and matching destination history; it keeps
|
|
226
289
|
the original capability bases and receipts.
|
|
227
290
|
|
|
291
|
+
Ignored local environment files such as `apps/api/.env` or `apps/web/.env.local`
|
|
292
|
+
are discovered by default, listed by path in each worktree proposal, and copied
|
|
293
|
+
into the new worktree when you approve it. Copies are independent, never
|
|
294
|
+
overwrite existing files and never enter Git. Set `isolation.localFiles.discover`
|
|
295
|
+
to `false` to opt out, or adjust its `include` and `exclude` patterns. For a
|
|
296
|
+
worktree created by another tool or `git worktree add`, your agent previews and
|
|
297
|
+
applies Empirical prepare to fill in the missing files.
|
|
298
|
+
See [local environment files](docs/protocol.md#local-environment-files-in-worktrees).
|
|
299
|
+
|
|
228
300
|
Ask your agent for the read-only overview to see specs, owners, branches,
|
|
229
301
|
profiles, progress and verification status together. Unrelated malformed records
|
|
230
302
|
appear as local diagnostics without selecting or deleting any spec. Independent
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Paths changed on this branch since `base`, plus uncommitted and untracked work. */
|
|
2
|
+
export declare function changedPaths(root: string, base: string | null): string[];
|
|
3
|
+
/**
|
|
4
|
+
* Existing test files that correspond to the changed paths: changed test files
|
|
5
|
+
* themselves, and tests whose name stem matches a changed source file.
|
|
6
|
+
*/
|
|
7
|
+
export declare function selectChangedTests(root: string, changed: readonly string[]): string[];
|
|
8
|
+
/**
|
|
9
|
+
* The argv to execute for a configured command. Commands that opt into
|
|
10
|
+
* `testFiles: "changed"` receive only matching test paths and never fall back
|
|
11
|
+
* to their bare argv, which would usually run the whole suite.
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveCommandArgv(root: string, command: {
|
|
14
|
+
id: string;
|
|
15
|
+
argv: readonly string[];
|
|
16
|
+
cwd: string;
|
|
17
|
+
testFiles?: "changed" | undefined;
|
|
18
|
+
}, base: string | null): string[];
|
package/dist/checkouts.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export declare function withCheckoutLock<T>(root: string, operation: () => Promi
|
|
|
3
3
|
/** A shared feature lock prevents a writer from racing ownership transfer. */
|
|
4
4
|
export declare function withFeatureLock<T>(root: string, feature: string, operation: () => Promise<T>, options?: {
|
|
5
5
|
allowPendingTransfer?: boolean;
|
|
6
|
+
/** Completed tracking may use its recorded owner or a validated delivery event. */
|
|
7
|
+
completedTransfer?: "tracker-owner" | "lifecycle-record";
|
|
6
8
|
}): Promise<T>;
|
|
7
9
|
export interface CheckoutSelection {
|
|
8
10
|
feature: string | null;
|
|
@@ -14,6 +16,11 @@ export declare function readCheckoutSelection(rootInput: string): Promise<Checko
|
|
|
14
16
|
export declare function writeCheckoutSelection(rootInput: string, feature: string | null, expectedFeature?: string): Promise<void>;
|
|
15
17
|
/** Transfer releases an unfinished owner without creating terminal obligations. */
|
|
16
18
|
export declare function moveCheckoutSelection(sourceRoot: string, targetRoot: string, feature: string): Promise<void>;
|
|
19
|
+
/** Call under the shared feature lock before automatic external side effects. */
|
|
20
|
+
export declare function assertCheckoutFeatureOwner(root: string, feature: string): Promise<void>;
|
|
21
|
+
/** A receipt-backed delivery event may adopt completed work in another checkout.
|
|
22
|
+
* Call as the guarded journal effect, and roll back if that commit fails. */
|
|
23
|
+
export declare function adoptCompletedTrackerFeature(root: string, feature: string): Promise<() => Promise<void>>;
|
|
17
24
|
/** Read only this checkout's recovery anchor, never sibling selections. */
|
|
18
25
|
export declare function readCheckoutLastFeature(rootInput: string): Promise<{
|
|
19
26
|
git: boolean;
|
|
@@ -27,3 +34,5 @@ export declare function readCheckoutRecoveryFeatures(rootInput: string): Promise
|
|
|
27
34
|
* commit, so a process exit before selector cleanup cannot orphan the effect. */
|
|
28
35
|
export declare function recordCheckoutRecoveryFeature(rootInput: string, feature: string): Promise<void>;
|
|
29
36
|
export declare function forgetCheckoutRecoveryFeatures(rootInput: string, resolvedFeatures: string[]): Promise<void>;
|
|
37
|
+
/** A checkout-local runtime file under `<git-dir>/empirical-sdd/`, guarded like the selector; null outside Git. */
|
|
38
|
+
export declare function checkoutRuntimePath(rootInput: string, name: string): Promise<string | null>;
|