empirical-sdd 0.33.0 → 0.35.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 +204 -1
- package/README.md +115 -16
- package/dist/activation.d.ts +8 -0
- package/dist/changed-tests.d.ts +18 -0
- package/dist/checkouts.d.ts +7 -1
- package/dist/cli.js +26271 -20495
- package/dist/coordination.d.ts +30 -0
- package/dist/core.d.ts +83 -4
- package/dist/decisions.d.ts +8 -0
- package/dist/delegation.d.ts +337 -0
- package/dist/delivery.d.ts +87 -2
- package/dist/demo-integration-repair.js +17532 -12386
- package/dist/demo-ticket-policy.js +17521 -12376
- package/dist/index.d.ts +18 -3
- package/dist/index.js +17995 -12677
- package/dist/integrations.d.ts +2 -0
- package/dist/integrations.js +9300 -993
- package/dist/journal-attributes.d.ts +8 -0
- package/dist/lifecycle.d.ts +28 -1
- package/dist/local-file-patterns.d.ts +24 -0
- package/dist/mcp.d.ts +3 -0
- package/dist/mcp.js +25767 -20342
- package/dist/mockups.d.ts +9 -0
- package/dist/overview.d.ts +41 -0
- package/dist/policy.d.ts +5 -1
- package/dist/promotion-proof.d.ts +225 -0
- package/dist/protocol.d.ts +193 -1
- package/dist/protocol.js +134 -8
- package/dist/qa.d.ts +85 -2
- package/dist/routing.d.ts +8 -0
- package/dist/setup.d.ts +1 -1
- package/dist/storage.d.ts +3 -1
- package/dist/tracker-auth.d.ts +6 -0
- package/dist/tracker-comments.d.ts +1 -1
- package/dist/tracking.d.ts +193 -0
- package/dist/transfer.d.ts +13 -0
- package/dist/types.d.ts +204 -4
- package/dist/worktree-files.d.ts +95 -0
- package/dist/worktree-prepare.d.ts +8 -0
- package/dist/worktrees.d.ts +35 -3
- package/docs/demo.md +15 -8
- package/docs/mcp.md +387 -27
- package/docs/optional-adoption.md +103 -0
- package/docs/protocol.md +500 -23
- package/docs/security.md +36 -3
- package/docs/verification-performance.md +16 -3
- package/docs/versioning.md +11 -7
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,207 @@ under the alpha rules in [docs/versioning.md](docs/versioning.md).
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.35.0] - 2026-09-15
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Approved mockup files and the chosen direction now accompany Implement, with
|
|
16
|
+
instructions to preserve the approved layout and styles. Missing or unreadable
|
|
17
|
+
mockup files do not introduce a new implementation gate.
|
|
18
|
+
|
|
19
|
+
- Added default discovery of ignored, untracked local environment files for
|
|
20
|
+
worktrees through `isolation.localFiles` (`discover`, `include`, `exclude`;
|
|
21
|
+
defaults `**/.env` and `**/.env.*` excluding `.env.example`, `.env.sample` and
|
|
22
|
+
`.env.template`, never under `node_modules`, `.git` or `.empirical`). Proposals
|
|
23
|
+
list every explicit and discovered path and every refusal; approving the
|
|
24
|
+
proposal approves exactly those copies. Discovery is bounded to 200 candidates
|
|
25
|
+
and 1 MiB per file, with refusals reported by path and reason.
|
|
26
|
+
- Added `empirical_worktree_prepare` (library `prepareWorktree`, internal CLI
|
|
27
|
+
`worktree-prepare`) to preview and apply local file copies for worktrees
|
|
28
|
+
created by host tools, `git worktree add`, delegation or transfer.
|
|
29
|
+
- Added `localFiles: { copied, skippedExisting, missingOptional, unapproved, refused }`
|
|
30
|
+
to worktree handoffs and prepare results, plus local file lines in proposal,
|
|
31
|
+
handoff, configuration and Init text.
|
|
32
|
+
|
|
33
|
+
- Fast features iterate through `empirical_iterate` from Implement or
|
|
34
|
+
implemented Done without promotion or test runs: the lifecycle iteration
|
|
35
|
+
counter increments, the journal keeps every `Iterate:` event, and `id`
|
|
36
|
+
addresses a Done feature. Fast consolidate requires explicit promotion.
|
|
37
|
+
- Fast starts create `decisions.md`; status and explain list Accepted Fast
|
|
38
|
+
decisions and report format issues as non-blocking `decisionWarnings`.
|
|
39
|
+
- QA planning, QA execution and evidence execution accept an explicit
|
|
40
|
+
`verificationProfile`: `iterate` runs only `testFiles: "changed"` commands and
|
|
41
|
+
`final` runs the configured final scope (Fast `final` excludes full CI and stays
|
|
42
|
+
unverified). Action packets report `verificationProfiles`.
|
|
43
|
+
- `empirical_yolo` accepts `profile`; explicit Fast defaults to and is limited to
|
|
44
|
+
the `implemented` ceiling.
|
|
45
|
+
- Routes report `matchedFloors`.
|
|
46
|
+
- Policy v2 accepts optional `promotion.fullCi` (`local` or `remote-checks`);
|
|
47
|
+
policy and configure results report a read-only `effective` value. Empirical
|
|
48
|
+
versions before this release reject a policy that sets `promotion`.
|
|
49
|
+
- Opt-in `remote-checks` promotion proof: passing, app-pinned GitHub required
|
|
50
|
+
check runs for the exact pushed commit create an immutable `remote-checks`
|
|
51
|
+
receipt through an injectable checks reader. Integrate accepts it only for an
|
|
52
|
+
already pushed commit; Deliver may push and open the source pull request and
|
|
53
|
+
returns `promotion-proof-required` until it passes, binding proof per head
|
|
54
|
+
before any merge; Publish rejects it. Remote proof is refused when the branch
|
|
55
|
+
changes policy, package scripts, workflows, composite actions, `scripts/**`,
|
|
56
|
+
lockfiles, `.gitmodules`, symlinks or gitlinks, or when target workflows use
|
|
57
|
+
unpinned `uses:` references. Repositories whose protection uses legacy
|
|
58
|
+
unpinned status contexts or ruleset entries without an app pin must pin the app,
|
|
59
|
+
and must SHA-pin workflow and action references, before `remote-checks` can pass.
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
|
|
63
|
+
- Init now declares `.empirical/** -text` in `.gitattributes` to preserve
|
|
64
|
+
digest-bound journal bytes across Git checkouts. Existing project-specific
|
|
65
|
+
Empirical attribute rules are preserved.
|
|
66
|
+
- Lock waiters renew their wait budget as ownership changes, while retaining a
|
|
67
|
+
bounded overall wait, so healthy contention does not report a stuck repository.
|
|
68
|
+
|
|
69
|
+
- Existing configurations now discover local environment files by default
|
|
70
|
+
without being rewritten, so worktree proposals and their approval tokens change
|
|
71
|
+
when ignored environment files exist; pass the proposal's `localFiles`
|
|
72
|
+
unchanged to `empirical_worktree_create`. Set `discover: false` to opt out.
|
|
73
|
+
- Worktrees created outside Empirical can now receive local files through
|
|
74
|
+
prepare, and generated agent guidance routes local file provisioning through
|
|
75
|
+
the Empirical proposal and prepare operation.
|
|
76
|
+
|
|
77
|
+
- Deliver accepts the full-CI receipt Integrate recorded for an identical
|
|
78
|
+
candidate instead of requiring a second local full-CI run; `reuseReceiptId` and
|
|
79
|
+
Publish keep exact revision matching. The delivered source pull request head is
|
|
80
|
+
bound to the proven commit before review, ready or merge.
|
|
81
|
+
- A failed Fast completion now blocks the same Fast feature with `retry` and
|
|
82
|
+
explicit `promote` as recovery paths instead of promoting it to Complex, and
|
|
83
|
+
`promote` accepts that block.
|
|
84
|
+
- An explicit Fast request is no longer promoted by integration or delivery
|
|
85
|
+
wording; sensitive, migration and publication signals still promote it.
|
|
86
|
+
- Integrate, Deliver and Publish refuse Fast features with `PROMOTION_REQUIRED`
|
|
87
|
+
guidance; only explicit `empirical_promote` changes a Fast feature to Complex.
|
|
88
|
+
- `receiptIds` is optional on `empirical_integrate` and `empirical_deliver`.
|
|
89
|
+
- Generated skills and phase instructions explain lane choice, Fast iteration,
|
|
90
|
+
explicit promotion, the phrase-to-profile mapping, one-request test
|
|
91
|
+
authorization, carry-over and remote-checks, and no longer state that
|
|
92
|
+
consolidation authorizes tests.
|
|
93
|
+
|
|
94
|
+
- Fast action packets no longer list every living capability specification;
|
|
95
|
+
agents open a capability only when the change touches it. Complex and
|
|
96
|
+
promoted features keep the full list.
|
|
97
|
+
- Verification commands can opt into `testFiles: "changed"` to run only the
|
|
98
|
+
test files matching changed files, failing with `NO_CHANGED_TESTS` rather than
|
|
99
|
+
falling back to the whole suite.
|
|
100
|
+
- Independent integration validation no longer re-runs verification commands
|
|
101
|
+
whose declared checks a full-CI command in the same directory already covers,
|
|
102
|
+
unless the feature changes the policy or package scripts, and reports which
|
|
103
|
+
commands executed or were covered.
|
|
104
|
+
|
|
105
|
+
### Fixed
|
|
106
|
+
|
|
107
|
+
- Windows worktree creation and recovery recognize canonical directory identity
|
|
108
|
+
across separator, case and short-path spellings. Recovery errors identify the
|
|
109
|
+
mismatched check and explain when a newer runtime is needed to load the base.
|
|
110
|
+
- Invalid mockup approval feedback now shows the approval document shape, even
|
|
111
|
+
during Verify, instead of the fidelity-report shape.
|
|
112
|
+
|
|
113
|
+
- `empirical update` and `empirical uninstall` work on Windows again. Node refuses
|
|
114
|
+
to spawn `.cmd` wrappers without a shell (CVE-2024-27980), so npm and the
|
|
115
|
+
PATH-visible CLI now run through `cmd.exe` by quoted absolute path and the
|
|
116
|
+
npm-installed CLI runs through Node, including prefixes containing spaces (SDD-66).
|
|
117
|
+
|
|
118
|
+
### Migration
|
|
119
|
+
|
|
120
|
+
- Update the package and installed global skills with `empirical update`, restart
|
|
121
|
+
the coding agent/MCP host, invoke `empirical-init` in each existing repository
|
|
122
|
+
to refresh managed instructions and local skills, then reload affected sessions.
|
|
123
|
+
- Existing configurations discover ignored, untracked `.env` and `.env.*` files
|
|
124
|
+
by default. Review the paths in worktree proposals; set
|
|
125
|
+
`isolation.localFiles.discover` to `false` to retain explicit-only copying.
|
|
126
|
+
Existing `isolation.copyFiles` entries remain required. Use worktree prepare
|
|
127
|
+
to provision worktrees created by another tool without overwriting files.
|
|
128
|
+
- Fast failures now stay Fast. Retry or explicitly promote the same feature
|
|
129
|
+
when stronger verification or integration is needed. To iterate on an existing
|
|
130
|
+
Complex implementation, request iterative development and explicitly request
|
|
131
|
+
final verification when ready; iteration alone does not authorize tests.
|
|
132
|
+
- `promotion.fullCi` remains `local` by default. Opt into `remote-checks` only
|
|
133
|
+
after configuring app-pinned required checks and SHA-pinned workflow/action
|
|
134
|
+
references. Upgrade every participating agent before adding this policy field;
|
|
135
|
+
older versions reject it. Publication still requires local proof.
|
|
136
|
+
- When refreshing an existing repository, review and commit the `.gitattributes`
|
|
137
|
+
journal rule added by Init. An existing rule for `.empirical` is left untouched;
|
|
138
|
+
ensure it preserves journal bytes across worktrees. Keep existing journal and
|
|
139
|
+
receipt files intact.
|
|
140
|
+
- Schema 5 and existing specifications, journals, tracker bindings and receipts
|
|
141
|
+
are retained. Do not delete workflow state to upgrade.
|
|
142
|
+
|
|
143
|
+
## [0.34.0] - 2026-09-14
|
|
144
|
+
|
|
145
|
+
### Added
|
|
146
|
+
|
|
147
|
+
- Added opt-in iterative Complex development, same-feature adjustments and
|
|
148
|
+
explicit contract revisions, followed by user-requested consolidation and QA.
|
|
149
|
+
- Added approved `isolation.copyFiles` preparation for ignored local environment
|
|
150
|
+
files in new worktrees, with independent copies and interrupted-copy recovery.
|
|
151
|
+
- Added Plane Cloud and self-hosted Plane as first-class external tracker
|
|
152
|
+
providers, including project/state discovery, host-only Personal Access Token
|
|
153
|
+
authentication, work-item binding and reconciliation, state synchronization,
|
|
154
|
+
and idempotent milestone comments through current `work-items` endpoints.
|
|
155
|
+
- Added explicit repository activation as the default. Init offers individual
|
|
156
|
+
invocation or team-approved automatic routing, with safe opt-out that
|
|
157
|
+
preserves other instructions and workflow history.
|
|
158
|
+
- Added a read-only overview of preserved specs, worktree ownership and progress,
|
|
159
|
+
with individual diagnostics for malformed records.
|
|
160
|
+
- Added exact-revision Fast-to-Complex promotion and explicit transfer of an
|
|
161
|
+
unfinished spec between registered worktrees with matching history.
|
|
162
|
+
- Added a host-native sub-agent bridge for bounded consult, specification and
|
|
163
|
+
implementation assignments, with shared reservations, launch reconciliation
|
|
164
|
+
and confirmed cancellation. Writable workers use separate worktrees and specs.
|
|
165
|
+
|
|
166
|
+
### Fixed
|
|
167
|
+
|
|
168
|
+
- Doctor accepts direct instruction aliases such as `AGENTS.md -> CLAUDE.md`
|
|
169
|
+
when the canonical target is a regular sibling file. Repair preserves the
|
|
170
|
+
symlink, validates the target content, and keeps it from becoming dangling
|
|
171
|
+
when automatic routing is disabled. Unsafe links remain rejected.
|
|
172
|
+
|
|
173
|
+
### Changed
|
|
174
|
+
|
|
175
|
+
- Assisted Fast and Complex iteration runs tests on demand, scoped to the active
|
|
176
|
+
feature. Unrun verification stays pending, full CI is excluded from ordinary
|
|
177
|
+
feature-check candidates, and final promotion/release gates remain enforced.
|
|
178
|
+
- Treat absent legacy activation choices as explicit; refresh project skills
|
|
179
|
+
with `empirical-init` and restart the agent session after upgrading.
|
|
180
|
+
- Explicit Fast supports scoped ordinary behavioral and UI features without
|
|
181
|
+
mandatory tests, formal review or Context and reports implemented with
|
|
182
|
+
verification skipped. Explicit Complex and sensitive safety floors retain
|
|
183
|
+
their full workflow; historical completion records remain readable unchanged.
|
|
184
|
+
- Independent specs use narrower operation locks and addressed capability-claim
|
|
185
|
+
validation so unrelated delayed work or malformed claims do not block progress.
|
|
186
|
+
- Approved worktree creation starts from its committed base while preserving
|
|
187
|
+
uncommitted source edits, and remains retryable after interruption.
|
|
188
|
+
- Generated agent guidance explains native delegation, preserved specs,
|
|
189
|
+
ownership transfer and the distinct Fast and Complex completion guarantees.
|
|
190
|
+
|
|
191
|
+
### Migration
|
|
192
|
+
|
|
193
|
+
- Update the package and installed global skills with `empirical update`, then
|
|
194
|
+
restart the coding agent/MCP host so the new Init skill and tools are loaded.
|
|
195
|
+
- Invoke `empirical-init` explicitly in each existing repository to refresh
|
|
196
|
+
managed instructions and local skills. A missing `activationMode` now means
|
|
197
|
+
explicit invocation. Choose **Automatically for this team** during repair only
|
|
198
|
+
when the affected team agrees; an existing saved choice is preserved.
|
|
199
|
+
- Reload or start a fresh affected agent session after repository repair to
|
|
200
|
+
discard cached routing instructions. In explicit mode invoke the local
|
|
201
|
+
`empirical` skill for chosen tasks; ordinary requests remain outside it.
|
|
202
|
+
- New Fast work finishes at implemented with verification skipped. Choose
|
|
203
|
+
Complex or explicitly promote the same feature when stronger assurance is
|
|
204
|
+
needed. Previously verified Fast history retains its recorded evidence.
|
|
205
|
+
- Existing tracker configurations remain unchanged. Choose Plane explicitly
|
|
206
|
+
during setup to adopt it; self-hosted Plane needs the exact API origin in the
|
|
207
|
+
host-controlled `EMPIRICAL_PLANE_ALLOWED_ORIGINS` allowlist before authentication.
|
|
208
|
+
- Schema 5, specifications, tracker bindings and evidence are retained. Do not
|
|
209
|
+
delete inactive specs or replace instruction symlinks to upgrade. Safe direct
|
|
210
|
+
aliases such as `AGENTS.md -> CLAUDE.md` are preserved during repair.
|
|
211
|
+
|
|
11
212
|
## [0.33.0] - 2026-09-09
|
|
12
213
|
|
|
13
214
|
### Added
|
|
@@ -474,7 +675,9 @@ Published through GitHub Actions trusted publishing with npm provenance.
|
|
|
474
675
|
|
|
475
676
|
- Prepared and released package version `0.20.2`.
|
|
476
677
|
|
|
477
|
-
[Unreleased]: https://github.com/goempirical/empirical-sdd/compare/v0.
|
|
678
|
+
[Unreleased]: https://github.com/goempirical/empirical-sdd/compare/v0.35.0...HEAD
|
|
679
|
+
[0.35.0]: https://github.com/goempirical/empirical-sdd/compare/v0.34.0...v0.35.0
|
|
680
|
+
[0.34.0]: https://github.com/goempirical/empirical-sdd/compare/v0.33.0...v0.34.0
|
|
478
681
|
[0.33.0]: https://github.com/goempirical/empirical-sdd/compare/v0.32.0...v0.33.0
|
|
479
682
|
[0.32.0]: https://github.com/goempirical/empirical-sdd/compare/v0.31.0...v0.32.0
|
|
480
683
|
[0.31.0]: https://github.com/goempirical/empirical-sdd/compare/v0.30.0...v0.31.0
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Empirical is a repository-native harness for coding agents. The model writes;
|
|
|
6
6
|
Empirical keeps the contract, progress, proof, and exact next action in Git so
|
|
7
7
|
work can resume across sessions, agents, and machines.
|
|
8
8
|
|
|
9
|
-
> Empirical
|
|
9
|
+
> Empirical is alpha software and requires Node.js 22 or newer.
|
|
10
10
|
|
|
11
11
|
**[Open the practical harness guide](https://goempirical.github.io/empirical-sdd/)**
|
|
12
12
|
for the visual walkthrough, diagrams, generated-file explorer, and complete
|
|
@@ -37,15 +37,28 @@ workflow. Its zero-build source is [docs/index.html](docs/index.html).
|
|
|
37
37
|
Fresh-context review still uses an isolated reviewer, but does not count as
|
|
38
38
|
an independent GitHub approval.
|
|
39
39
|
|
|
40
|
-
3.
|
|
40
|
+
3. Choose when to use Empirical.
|
|
41
|
+
|
|
42
|
+
Init recommends **Only when explicitly requested**. Use the local skill for
|
|
43
|
+
work you want to run through Empirical: `$empirical` in Codex or `/empirical`
|
|
44
|
+
in Claude Code. Ordinary coding requests stay outside the workflow.
|
|
45
|
+
|
|
46
|
+
Choose **Automatically for this team** only when the team agrees to shared
|
|
47
|
+
routing instructions. You can then ask for a change normally:
|
|
41
48
|
|
|
42
49
|
```text
|
|
43
50
|
Add rate limiting to the public API and prove the failure path.
|
|
44
51
|
```
|
|
45
52
|
|
|
46
|
-
|
|
47
|
-
read-only. If work stops,
|
|
48
|
-
|
|
53
|
+
Empirical is optional. You can ask to work without it in either mode. Read-only
|
|
54
|
+
questions remain read-only. If Empirical work stops, invoke it again in the same
|
|
55
|
+
checkout to resume from the committed journal.
|
|
56
|
+
|
|
57
|
+
To change the choice later, ask your agent to configure Empirical activation.
|
|
58
|
+
Switching to explicit removes only Empirical's shared routing blocks and keeps
|
|
59
|
+
workflow history. Repair preserves saved choices. Older repositories without a
|
|
60
|
+
recorded choice become explicit on repair; start a fresh agent session afterward.
|
|
61
|
+
See [optional adoption](docs/optional-adoption.md) for mixed teams and migration.
|
|
49
62
|
|
|
50
63
|
## Why use it?
|
|
51
64
|
|
|
@@ -60,32 +73,83 @@ continue—the committed journal provides the resume point.
|
|
|
60
73
|
|
|
61
74
|
## How it works
|
|
62
75
|
|
|
63
|
-
|
|
76
|
+
Choose the amount of process for the work; Empirical retains the safety floor:
|
|
64
77
|
|
|
65
|
-
- **Fast** handles
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
78
|
+
- **Fast** handles explicitly requested small, scoped, reversible features and
|
|
79
|
+
fixes, including ordinary behavior and UI changes. It requires no tests,
|
|
80
|
+
formal review, or Context phase and finishes **implemented; verification
|
|
81
|
+
skipped**. Its spec and journal remain available.
|
|
82
|
+
- **Complex** carries work through a durable contract, decisions, verification,
|
|
83
|
+
exact-diff review, and independent integration. Explicit Complex is honored;
|
|
84
|
+
sensitive and higher-risk work always requires it.
|
|
85
|
+
|
|
86
|
+
Fast:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
Implement → Done (implemented; verification skipped)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Complex:
|
|
69
93
|
|
|
70
94
|
```text
|
|
71
95
|
Specify → Design → Plan → Implement → Context? → Verify → Review → Integrate
|
|
72
96
|
```
|
|
73
97
|
|
|
74
|
-
A feature that shows an interface gets its mockup at Specify
|
|
75
|
-
contract is still open
|
|
76
|
-
prose misses and those belong in the criteria.
|
|
98
|
+
A Complex feature that shows an interface gets its mockup at Specify when the
|
|
99
|
+
saved mockup preference is enabled. The contract is still open: seeing a screen
|
|
100
|
+
reveals states and flows that prose misses and those belong in the criteria.
|
|
101
|
+
`empirical mockups` serves the
|
|
77
102
|
directions on a local address so a person can click through and choose one;
|
|
78
103
|
Verify then checks what was built against what was approved.
|
|
79
104
|
|
|
80
|
-
|
|
81
|
-
requested review changes return to implementation. Evidence, review, and
|
|
105
|
+
Complex runs Context when repository knowledge needs refinement. Failed
|
|
106
|
+
verification or requested review changes return to implementation. Evidence, review, and
|
|
82
107
|
integration are different claims, and Empirical reports only the highest level
|
|
83
108
|
actually proven: `implemented`, `verified`, `integrated`, `delivered`, or
|
|
84
109
|
`published`.
|
|
85
110
|
|
|
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
|
+
|
|
116
|
+
Fast trades verification confidence for less waiting and process. A follow-up
|
|
117
|
+
adjustment to the same Fast feature uses `empirical_iterate`, from Implement or
|
|
118
|
+
after Done: no promotion, no test run, and the journal keeps every adjustment.
|
|
119
|
+
A failed Fast completion blocks in place for `retry` or explicit promotion.
|
|
120
|
+
Promotion is always explicit: Fast consolidate, Integrate and Deliver require
|
|
121
|
+
`empirical_promote`, which continues the same spec through Complex Specify and
|
|
122
|
+
preserves its history and identity. Historical completed Fast records retain the
|
|
123
|
+
evidence and completion level they originally earned.
|
|
124
|
+
|
|
86
125
|
Delivery is never implied. Empirical does not infer permission to merge a pull
|
|
87
126
|
request, bypass protection, create a release, or publish a package.
|
|
88
127
|
|
|
128
|
+
## Run tests when you need them
|
|
129
|
+
|
|
130
|
+
Fast and Complex iteration do not automatically run tests after edits. Ask for a
|
|
131
|
+
run when ready:
|
|
132
|
+
|
|
133
|
+
- “Run the changed tests” or “run the affected tests” uses the `iterate`
|
|
134
|
+
verification profile: only commands configured with `testFiles: "changed"`.
|
|
135
|
+
- “Now run it”, “run everything” or “ready to close” uses the `final` profile.
|
|
136
|
+
- “Keep iterating; skip tests for now” leaves verification pending.
|
|
137
|
+
|
|
138
|
+
One test request does not enable automatic reruns after subsequent changes, and
|
|
139
|
+
no phase, iteration or consolidation runs tests by itself. One exact full-CI
|
|
140
|
+
receipt recorded at Integrate also serves Deliver when nothing changed, and a
|
|
141
|
+
repository can opt into `promotion.fullCi: "remote-checks"` so passing GitHub
|
|
142
|
+
required checks on the exact pushed commit stand in for local full CI.
|
|
143
|
+
If no focused command is configured, the agent reports the gap instead of
|
|
144
|
+
silently running the entire suite. Complex still requires real evidence before
|
|
145
|
+
claiming verified completion; Fast can finish implemented and unverified.
|
|
146
|
+
Explicit final verification or promotion requests include their required checks,
|
|
147
|
+
and CI/release gates remain enforced. An explicit no-tests request takes
|
|
148
|
+
precedence over execution and leaves any conflicting gate pending.
|
|
149
|
+
|
|
150
|
+
Existing repositories need their managed skills refreshed with `empirical-init`
|
|
151
|
+
and a restarted agent session after upgrading to receive this guidance.
|
|
152
|
+
|
|
89
153
|
## What it creates
|
|
90
154
|
|
|
91
155
|
Init installs the harness; selected work fills in the record:
|
|
@@ -116,7 +180,7 @@ Exact host files depend on the integrations selected during install. Init
|
|
|
116
180
|
creates durable setup and empty work containers; a real mutation creates a
|
|
117
181
|
feature record, and conditional artifacts appear only when their phases run.
|
|
118
182
|
|
|
119
|
-
Optional tracking mirrors approved milestones to Linear, GitHub, or
|
|
183
|
+
Optional tracking mirrors approved milestones to Linear, GitHub, Jira, or Plane; the
|
|
120
184
|
repository remains authoritative. Policy supports
|
|
121
185
|
`enforcement: "best-effort" | "strict"`; strict recovery retries the exact
|
|
122
186
|
feature. Credentials never belong in chat, prompts, repository files, tool
|
|
@@ -170,4 +234,39 @@ feature. Explicit new feature starts and repository setup/context repair are not
|
|
|
170
234
|
blocked by unrelated unclaimed specs. If a feature-required operation needs a
|
|
171
235
|
choice, it lists candidates rather than choosing or moving a spec. An approved
|
|
172
236
|
worktree handoff can be retried with its original input after interruption.
|
|
237
|
+
Creating it from an approved committed base leaves uncommitted source edits in
|
|
238
|
+
their original checkout. Transferring an unfinished spec to another worktree
|
|
239
|
+
requires its exact source revision and matching destination history; it keeps
|
|
240
|
+
the original capability bases and receipts.
|
|
241
|
+
|
|
242
|
+
Ignored local environment files such as `apps/api/.env` or `apps/web/.env.local`
|
|
243
|
+
are discovered by default, listed by path in each worktree proposal, and copied
|
|
244
|
+
into the new worktree when you approve it. Copies are independent, never
|
|
245
|
+
overwrite existing files and never enter Git. Set `isolation.localFiles.discover`
|
|
246
|
+
to `false` to opt out, or adjust its `include` and `exclude` patterns. For a
|
|
247
|
+
worktree created by another tool or `git worktree add`, your agent previews and
|
|
248
|
+
applies Empirical prepare to fill in the missing files.
|
|
249
|
+
See [local environment files](docs/protocol.md#local-environment-files-in-worktrees).
|
|
250
|
+
|
|
251
|
+
Ask your agent for the read-only overview to see specs, owners, branches,
|
|
252
|
+
profiles, progress and verification status together. Unrelated malformed records
|
|
253
|
+
appear as local diagnostics without selecting or deleting any spec. Independent
|
|
254
|
+
work uses separate locks; overlapping feature writers and integration targets
|
|
255
|
+
still serialize safely. Multiple worktrees cost disk space and setup, and
|
|
256
|
+
changes to shared capabilities can still conflict when they integrate.
|
|
173
257
|
See [selection and recovery semantics](docs/protocol.md#shared-specs-and-checkout-selection).
|
|
258
|
+
|
|
259
|
+
### Sub-agents for specs and implementation
|
|
260
|
+
|
|
261
|
+
Ask your agent to delegate bounded specification or implementation work. Empirical
|
|
262
|
+
discovers the host's actual native agent capabilities, reserves each assignment
|
|
263
|
+
before spawning, and tracks its identity through interruption or cancellation.
|
|
264
|
+
Writable children use separate registered worktrees and selected specs. Read-only
|
|
265
|
+
consults require a host that enforces read-only access.
|
|
266
|
+
|
|
267
|
+
Delegation can progress independent specs concurrently, at the cost of additional
|
|
268
|
+
agent usage, worktrees and integration work. Host support varies: installation
|
|
269
|
+
alone does not prove that spawning, lookup, observation and cancellation are
|
|
270
|
+
available. Worker completion never substitutes for workflow evidence. Fast workers
|
|
271
|
+
remain unverified; Complex workers still pass the full applicable gates.
|
|
272
|
+
See the [native delegation bridge](docs/mcp.md#native-sub-agent-delegation).
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const activationModeSchema: z.ZodEnum<{
|
|
3
|
+
automatic: "automatic";
|
|
4
|
+
explicit: "explicit";
|
|
5
|
+
}>;
|
|
6
|
+
export type ActivationMode = z.infer<typeof activationModeSchema>;
|
|
7
|
+
/** Absence is not consent to automatically route a team's work. */
|
|
8
|
+
export declare function resolveActivationMode(value: unknown): ActivationMode;
|
|
@@ -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
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Long operations serialize only their own checkout. */
|
|
2
2
|
export declare function withCheckoutLock<T>(root: string, operation: () => Promise<T>): Promise<T>;
|
|
3
|
+
/** A shared feature lock prevents a writer from racing ownership transfer. */
|
|
4
|
+
export declare function withFeatureLock<T>(root: string, feature: string, operation: () => Promise<T>, options?: {
|
|
5
|
+
allowPendingTransfer?: boolean;
|
|
6
|
+
}): Promise<T>;
|
|
3
7
|
export interface CheckoutSelection {
|
|
4
8
|
feature: string | null;
|
|
5
9
|
linked: boolean;
|
|
@@ -8,6 +12,8 @@ export interface CheckoutSelection {
|
|
|
8
12
|
}
|
|
9
13
|
export declare function readCheckoutSelection(rootInput: string): Promise<CheckoutSelection>;
|
|
10
14
|
export declare function writeCheckoutSelection(rootInput: string, feature: string | null, expectedFeature?: string): Promise<void>;
|
|
15
|
+
/** Transfer releases an unfinished owner without creating terminal obligations. */
|
|
16
|
+
export declare function moveCheckoutSelection(sourceRoot: string, targetRoot: string, feature: string): Promise<void>;
|
|
11
17
|
/** Read only this checkout's recovery anchor, never sibling selections. */
|
|
12
18
|
export declare function readCheckoutLastFeature(rootInput: string): Promise<{
|
|
13
19
|
git: boolean;
|