empirical-sdd 0.28.0 → 0.29.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 +79 -1
- package/README.md +132 -123
- package/dist/cli.js +3291 -649
- package/dist/core.d.ts +18 -4
- package/dist/delivery.d.ts +44 -1
- package/dist/demo-integration-repair.js +3002 -626
- package/dist/demo-ticket-policy.js +2996 -620
- package/dist/evidence.d.ts +9 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3015 -614
- package/dist/integrations.js +1008 -106
- package/dist/mcp.d.ts +3 -0
- package/dist/mcp.js +3148 -660
- package/dist/protocol.d.ts +315 -1
- package/dist/protocol.js +115 -3
- package/dist/qa.d.ts +165 -0
- package/dist/release-runtime.d.ts +95 -0
- package/dist/release.d.ts +208 -0
- package/dist/review.d.ts +99 -0
- package/dist/runtime.d.ts +4 -0
- package/dist/setup.d.ts +4 -1
- package/dist/storage.d.ts +1 -1
- package/dist/tracking.d.ts +36 -1
- package/dist/types.d.ts +205 -3
- package/docs/demo.md +11 -1
- package/docs/mcp.md +43 -10
- package/docs/protocol.md +56 -3
- package/docs/releasing.md +316 -0
- package/docs/security.md +64 -12
- package/docs/versioning.md +69 -15
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,83 @@ under the alpha rules in [docs/versioning.md](docs/versioning.md).
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.29.0] - 2026-08-28
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Added a disabled-by-default, protected-environment emergency release path with
|
|
16
|
+
exact administrator, incident, PR, merge, version, integrity, check, expiry,
|
|
17
|
+
and audit receipts while preserving ordinary exact protected-merge gates.
|
|
18
|
+
- Added public CLI help and README guidance explaining how Empirical routes and
|
|
19
|
+
advances work, where durable evidence lives, and how to use one consolidated
|
|
20
|
+
development setup command block.
|
|
21
|
+
- Added configurable pull-request review with a recommended independently
|
|
22
|
+
authenticated GitHub bot and an explicit fresh-context fallback, one
|
|
23
|
+
canonical criterion-complete review body, exact base/head diff binding, and
|
|
24
|
+
guided name-only credential setup.
|
|
25
|
+
- Added a guarded, idempotent `develop` to `main` release pipeline that binds
|
|
26
|
+
exact protected PR merge provenance and clean release checks to one
|
|
27
|
+
changelog-backed Git tag, non-draft GitHub Release, and npm trusted
|
|
28
|
+
publication with provenance.
|
|
29
|
+
- Added deterministic patch, minor, migration, conflict, partial-effect,
|
|
30
|
+
lost-response, duplicate, and retry fixtures plus an offline release dry run.
|
|
31
|
+
- Added a checked repository release-request shorthand and canonical playbook so
|
|
32
|
+
`make a new release` prepares every current `develop` change, verifies the
|
|
33
|
+
candidate, and creates or resumes the two guarded PR stages without granting
|
|
34
|
+
merge or direct publication authority.
|
|
35
|
+
- Added opt-in Tracker Policy v2 `strict` enforcement so deterministically
|
|
36
|
+
required work hard-stops before further source or workflow mutation until its
|
|
37
|
+
exact current revision is bound and synchronized.
|
|
38
|
+
- Added structured tracker mutation gates, exact feature-addressed terminal
|
|
39
|
+
synchronization, and crash recovery that refuses new work while strict final
|
|
40
|
+
tracking remains unresolved.
|
|
41
|
+
- Added criterion-complete risk-based QA matrices, anomaly-visible immutable
|
|
42
|
+
receipts, fresh-context and clean packaged-consumer acceptance, deterministic
|
|
43
|
+
failure-path coverage, and exact full-CI promotion gates.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- Ordinary release publication now supports solo-owned repositories without a
|
|
48
|
+
mandatory positive review while retaining `CHANGES_REQUESTED` blocking,
|
|
49
|
+
protected two-parent merge proof, complete CI and Release Gate, immutable
|
|
50
|
+
conflict refusal, protected npm environment, and trusted OIDC provenance.
|
|
51
|
+
- Made `develop` the ordinary feature/fix and source-evidence integration base;
|
|
52
|
+
protected `main` now accepts only the validated release PR from `develop`.
|
|
53
|
+
- Superseded the human-created GitHub Release boundary with exact merged-PR
|
|
54
|
+
authorization while preserving branch protection, immutable conflicts,
|
|
55
|
+
least-privilege GitHub/OIDC jobs, and token-free npm publication.
|
|
56
|
+
- Generated agent guidance now treats a blocked strict tracker gate as a hard
|
|
57
|
+
stop with OAuth/host-file, binding, reconciliation, or sync recovery, while
|
|
58
|
+
best-effort, optional, off, and Tracker Policy v1 behavior remain compatible.
|
|
59
|
+
- Approved worktree creation now resumes its returned action immediately,
|
|
60
|
+
including across a required host restart, without requesting a second
|
|
61
|
+
confirmation.
|
|
62
|
+
|
|
63
|
+
### Fixed
|
|
64
|
+
|
|
65
|
+
- Normalized GitHub's null and empty post-merge `reviewDecision` forms before
|
|
66
|
+
complete review-history reduction so later reconciliation matches the earlier
|
|
67
|
+
solo-owner authorization while effective change requests still block.
|
|
68
|
+
- Made mutually exclusive ordinary/emergency authorizers use explicit
|
|
69
|
+
predecessor-success conditions so an intentionally skipped sibling cannot
|
|
70
|
+
transitively skip GitHub, npm, provenance, or verification jobs.
|
|
71
|
+
- Made immutable tag reconciliation create an annotated tag object and exact
|
|
72
|
+
tag ref through authenticated GitHub APIs instead of Git transport, while
|
|
73
|
+
retaining observation-led lost-response recovery and conflict refusal.
|
|
74
|
+
- Made Release Gate authentication available only to its exact read-only
|
|
75
|
+
candidate preflight while preserving `contents: read` and rejecting GitHub,
|
|
76
|
+
npm, tag, release, push, publish, and dist-tag mutation authority.
|
|
77
|
+
- Made protected delivery keep request-changes PRs draft, refuse draft or stale
|
|
78
|
+
merges, stop after two automatic repair rounds, and accept a valid non-author
|
|
79
|
+
latest approval when GitHub leaves aggregate `reviewDecision` empty.
|
|
80
|
+
- Made guarded tracker host files decode supported single- and double-quoted
|
|
81
|
+
dotenv values across LF and CRLF while rejecting malformed or control-bearing
|
|
82
|
+
assignments before provider access.
|
|
83
|
+
|
|
84
|
+
### Migration
|
|
85
|
+
|
|
86
|
+
No migration required.
|
|
87
|
+
|
|
11
88
|
## [0.28.0] - 2026-08-24
|
|
12
89
|
|
|
13
90
|
### Added
|
|
@@ -236,7 +313,8 @@ Published through GitHub Actions trusted publishing with npm provenance.
|
|
|
236
313
|
|
|
237
314
|
- Prepared and released package version `0.20.2`.
|
|
238
315
|
|
|
239
|
-
[Unreleased]: https://github.com/goempirical/empirical-sdd/compare/v0.
|
|
316
|
+
[Unreleased]: https://github.com/goempirical/empirical-sdd/compare/v0.29.0...HEAD
|
|
317
|
+
[0.29.0]: https://github.com/goempirical/empirical-sdd/compare/v0.28.0...v0.29.0
|
|
240
318
|
[0.28.0]: https://github.com/goempirical/empirical-sdd/compare/v0.27.0...v0.28.0
|
|
241
319
|
[0.27.0]: https://github.com/goempirical/empirical-sdd/compare/v0.26.1...v0.27.0
|
|
242
320
|
[0.26.1]: https://github.com/goempirical/empirical-sdd/compare/v0.26.0...v0.26.1
|
package/README.md
CHANGED
|
@@ -1,153 +1,162 @@
|
|
|
1
1
|
# Empirical SDD
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
turns an ordinary change request into a deterministic workflow with durable
|
|
5
|
-
state, reviewable evidence, and safe Git integration.
|
|
3
|
+
Reliable, resumable spec-driven development for coding agents.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Empirical turns a normal request such as “fix the pagination bug” into a
|
|
6
|
+
reviewable workflow: define the outcome, implement it, run risk-appropriate
|
|
7
|
+
checks, record exact evidence, review the committed diff, and safely integrate
|
|
8
|
+
the result. State lives in the repository, so work can resume across sessions,
|
|
9
|
+
agents, and machines without relying on chat history.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
> Empirical 0.29 is alpha software and requires Node.js 22 or newer.
|
|
12
|
+
|
|
13
|
+
## Quick start
|
|
14
|
+
|
|
15
|
+
Install Empirical globally, then install its integrations for the coding agents
|
|
16
|
+
you use:
|
|
10
17
|
|
|
11
18
|
```sh
|
|
12
19
|
npm install -g empirical-sdd
|
|
13
20
|
empirical install
|
|
14
21
|
```
|
|
15
22
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
##
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
states, proposes all seven semantic mappings, and shows the complete
|
|
85
|
-
secret-free policy before saving. Ambiguous state suggestions require an
|
|
86
|
-
explicit choice; simple boards may intentionally reuse one provider state for
|
|
87
|
-
several phases. Repair preserves an existing tracker policy or explicit No
|
|
88
|
-
tracking choice unless you change it.
|
|
89
|
-
|
|
90
|
-
Tracker Policy v2 supports `off`, `manual`, and `ensure` ticket behavior plus
|
|
91
|
-
blockers/final, phase-milestone, or every-revision progress comments. `ensure`
|
|
92
|
-
validates a referenced ticket, reconciles the feature marker, and creates only
|
|
93
|
-
when neither identifies one unique ticket. Local workflow state commits first;
|
|
94
|
-
provider outages leave exact retry state and never rewind local work. Comments
|
|
95
|
-
preserve user-authored descriptions, and receipt-approved evidence is uploaded
|
|
96
|
-
or linked only after repository containment, media, size, and digest checks.
|
|
97
|
-
Existing Tracker Policy v1 files remain valid with manual binding and legacy
|
|
98
|
-
projection until deliberately upgraded.
|
|
99
|
-
|
|
100
|
-
An optional strict `ticketRules` matrix refines `ensure` by change type and
|
|
101
|
-
workflow size. The recommended `features+large-fixes` preset is:
|
|
102
|
-
|
|
103
|
-
| Work | Fast | Quick | Complex |
|
|
104
|
-
| --- | --- | --- | --- |
|
|
105
|
-
| Feature | required | required | required |
|
|
106
|
-
| Fix | optional | required | required |
|
|
107
|
-
| Chore | optional | optional | optional |
|
|
108
|
-
|
|
109
|
-
Optional work with no referenced ticket stays local without OAuth, provider
|
|
110
|
-
access, ticket creation, or a redundant question. One explicit reference is
|
|
111
|
-
attached; multiple references fail closed. See the [demo](docs/demo.md) for a
|
|
112
|
-
provider-independent new-feature run and [MCP documentation](docs/mcp.md) for
|
|
113
|
-
the complete custom JSON form.
|
|
114
|
-
|
|
115
|
-
## CLI
|
|
23
|
+
In each repository, initialize Empirical once from your agent:
|
|
24
|
+
|
|
25
|
+
- Codex: `$empirical-init`
|
|
26
|
+
- Claude Code: `/empirical-init`
|
|
27
|
+
- Windsurf: `@empirical-init`
|
|
28
|
+
|
|
29
|
+
Reload the agent if prompted. Then ask for work normally:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
Add rate limiting to the public API and prove the failure path.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Empirical activates automatically for repository changes. Read-only questions
|
|
36
|
+
stay read-only and do not start a workflow.
|
|
37
|
+
|
|
38
|
+
## What Empirical does
|
|
39
|
+
|
|
40
|
+
- Routes tiny, contract-neutral edits through a fast path and material changes
|
|
41
|
+
through a complete specification and review path.
|
|
42
|
+
- Persists specifications, decisions, journal events, capability contracts, and
|
|
43
|
+
evidence under `.empirical/`.
|
|
44
|
+
- Links every acceptance criterion to executable evidence or an explicit human
|
|
45
|
+
QA step.
|
|
46
|
+
- Selects focused, integration, fault-injection, cross-platform, clean-consumer,
|
|
47
|
+
and full-CI checks according to risk.
|
|
48
|
+
- Requires fresh-context review of the exact committed diff.
|
|
49
|
+
- Keeps concurrent work isolated with Git worktrees and detects overlapping
|
|
50
|
+
capability changes before they collide.
|
|
51
|
+
- Optionally mirrors progress to Linear, GitHub Issues + Projects, or Jira.
|
|
52
|
+
- Reports only the highest level actually proven: implemented, verified,
|
|
53
|
+
integrated, delivered, or published.
|
|
54
|
+
|
|
55
|
+
## Workflow at a glance
|
|
56
|
+
|
|
57
|
+
Material work follows a deterministic state machine:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
Specify → Design → Plan → Implement → Context → Verify → Review → Integrate
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Each transition has concrete requirements. A test receipt is bound to the
|
|
64
|
+
command, platform, source tree, duration, attempts, and output digests; changing
|
|
65
|
+
the code makes stale evidence unusable. Failed retries, skipped checks, missing
|
|
66
|
+
environments, and unsupported platforms remain visible.
|
|
67
|
+
|
|
68
|
+
Behavioral changes also update living capability specifications during
|
|
69
|
+
integration. This keeps “what the system does now” derived from reviewed change
|
|
70
|
+
history instead of a separate document that quietly drifts.
|
|
71
|
+
|
|
72
|
+
Delivery and publication are separate explicit boundaries. Empirical does not
|
|
73
|
+
infer permission to merge pull requests, bypass protection, create releases, or
|
|
74
|
+
publish packages from ordinary implementation work.
|
|
75
|
+
|
|
76
|
+
## Everyday use
|
|
77
|
+
|
|
78
|
+
You communicate with your coding agent, not a workflow CLI.
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
Where does the current Empirical feature stand?
|
|
82
|
+
Continue the active feature.
|
|
83
|
+
Show me which acceptance criteria still lack evidence.
|
|
84
|
+
Why did this change require the clean package-consumer check?
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If a session stops, open the repository in a supported agent and ask it to
|
|
88
|
+
continue. The committed journal and receipts provide the resume point.
|
|
89
|
+
|
|
90
|
+
Useful lifecycle commands remain intentionally small:
|
|
116
91
|
|
|
117
92
|
| Command | Purpose |
|
|
118
93
|
| --- | --- |
|
|
119
|
-
| `empirical install` | Select agents and install or repair
|
|
120
|
-
| `empirical update` | Upgrade
|
|
121
|
-
| `empirical uninstall` | Remove
|
|
122
|
-
| `empirical
|
|
94
|
+
| `empirical install` | Select agents and install or repair integrations. |
|
|
95
|
+
| `empirical update` | Upgrade Empirical and refresh integrations. |
|
|
96
|
+
| `empirical uninstall` | Remove managed global integrations and the package. |
|
|
97
|
+
| `empirical help` | Explain commands, routing, phases, and documentation. |
|
|
98
|
+
|
|
99
|
+
`empirical uninstall` preserves repository `.empirical` history and
|
|
100
|
+
configuration. Workflow operations are machine-facing and reached by agents
|
|
101
|
+
over MCP; there is no human CLI command for manually advancing a phase.
|
|
102
|
+
|
|
103
|
+
## Review and tracking
|
|
104
|
+
|
|
105
|
+
Recommended review uses a separately authenticated GitHub bot so PR approval is
|
|
106
|
+
genuinely non-author. Teams that do not use a second identity can explicitly
|
|
107
|
+
choose fresh-context review; Empirical records that distinction rather than
|
|
108
|
+
mislabeling it as independent forge approval.
|
|
109
|
+
|
|
110
|
+
Tracking is optional. Setup can select Linear, GitHub Projects, Jira, or no
|
|
111
|
+
tracking. Best-effort tracking never rewinds local work when a provider is
|
|
112
|
+
unavailable. Strict tracking is opt-in and blocks only work whose configured
|
|
113
|
+
ticket rule is required. Policy exposes `enforcement: "best-effort" | "strict"`;
|
|
114
|
+
strict recovery retries the exact feature after credentials or provider state
|
|
115
|
+
recover, without accepting a token through chat.
|
|
116
|
+
|
|
117
|
+
Credentials never belong in chat, repository files, prompts, tool arguments,
|
|
118
|
+
or evidence. Use connected host OAuth where available. For the guarded host-file
|
|
119
|
+
fallback and complete policy options, see [MCP and tracking](docs/mcp.md) and
|
|
120
|
+
[Security](docs/security.md).
|
|
121
|
+
|
|
122
|
+
## Safety model
|
|
123
123
|
|
|
124
|
-
|
|
125
|
-
repository configuration. Automation must confirm removal with `--yes`.
|
|
124
|
+
Empirical fails closed at the boundaries that matter:
|
|
126
125
|
|
|
127
|
-
|
|
126
|
+
- no silent acceptance of stale evidence or changed review heads;
|
|
127
|
+
- no force-writing Git history or deleting real worktrees;
|
|
128
|
+
- no implicit credential discovery from repository files;
|
|
129
|
+
- no claim that mocked tests replace required live acceptance;
|
|
130
|
+
- no automatic merge, branch-protection bypass, or inferred publication;
|
|
131
|
+
- no hiding a failed attempt by reporting a later retry as first-pass green.
|
|
128
132
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
remain bound to an exact version, commit, tag, and npm dist-tag.
|
|
133
|
+
Run `empirical-init` again to repair Empirical-owned repository integrations.
|
|
134
|
+
Doctor-style diagnostics preserve unmanaged conflicts and explain when a reload
|
|
135
|
+
or fresh agent session is still required.
|
|
133
136
|
|
|
134
137
|
## Documentation
|
|
135
138
|
|
|
136
|
-
[Protocol](docs/protocol.md)
|
|
137
|
-
[
|
|
138
|
-
[
|
|
139
|
-
[
|
|
139
|
+
- [Protocol](docs/protocol.md) — state machine, artifacts, and completion rules
|
|
140
|
+
- [Architecture](docs/architecture.md) — trust boundaries and system design
|
|
141
|
+
- [MCP and tracking](docs/mcp.md) — agent operations and tracker configuration
|
|
142
|
+
- [Demo](docs/demo.md) — provider-independent feature walkthrough
|
|
143
|
+
- [Security](docs/security.md) — credentials, isolation, and threat model
|
|
144
|
+
- [Versioning](docs/versioning.md) — alpha compatibility policy
|
|
145
|
+
- [Releasing](docs/releasing.md) — guarded repository release procedure
|
|
146
|
+
- [Changelog](CHANGELOG.md) — shipped behavior and migrations
|
|
140
147
|
|
|
141
148
|
## Development
|
|
142
149
|
|
|
143
|
-
Development requires Node.js 22+ and Bun
|
|
150
|
+
Development requires Node.js 22+ and the Bun version pinned by CI.
|
|
144
151
|
|
|
145
152
|
```sh
|
|
146
|
-
bun install
|
|
153
|
+
bun install --frozen-lockfile
|
|
147
154
|
bun run ci
|
|
148
155
|
```
|
|
149
156
|
|
|
150
|
-
|
|
157
|
+
CI covers Node.js 22, 24, and 26. Ordinary changes target `develop`; `main` is
|
|
158
|
+
reserved for validated release PRs. The package exports `.`, `./protocol`,
|
|
159
|
+
`./mcp`, and `./integrations`.
|
|
151
160
|
|
|
152
161
|
## License
|
|
153
162
|
|