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 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.28.0...HEAD
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
- Agent-neutral, resumable spec-driven development for coding agents. Empirical
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
- > Empirical 0.28 is alpha software. It requires Node.js 22 or newer.
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
- ## Install
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
- Choose the agents you use, reload them, then run `empirical-init` once in each
17
- repository. After initialization, ask for work normally—for example, “fix the
18
- pagination bug.” Empirical activates automatically for change requests while
19
- read-only questions stay outside the workflow.
20
-
21
- Codex uses `$empirical-init`, Claude Code uses `/empirical-init`, and Windsurf
22
- uses `@empirical-init`. Existing 0.22 repositories should invoke it once after
23
- upgrading; configuration, history, and evidence are preserved.
24
-
25
- Doctor verifies that completed repositories still have every required local
26
- instruction, native skill, and MCP bridge, including nested-directory and
27
- linked-worktree discovery. It distinguishes missing, stale, malformed, unsafe,
28
- non-canonical, shadowing, and global-collision states. Invoke `empirical-init`
29
- explicitly to reconcile Empirical-owned artifacts; unmanaged or unsafe
30
- conflicts are preserved. Correct files do not prove that an existing host
31
- session loaded them, so Doctor reports runtime loading as unverified and gives
32
- the applicable reload or fresh-session step.
33
-
34
- ## What it provides
35
-
36
- - Deterministic Fast or Complex routing based on the request's risk.
37
- - Resumable Specify, Design, Plan, Implement, Verify, Review, and Integrate phases.
38
- - Immutable evidence tied to criteria, source state, and provenance.
39
- - Isolated parallel work through linked Git worktrees.
40
- - Guided Linear, GitHub Issues + Projects, or Jira ticket mirrors with automatic
41
- binding, milestone comments, and safe evidence projection.
42
- - Selectable concise or detailed agent questions and runtime summaries.
43
- - Explicit, guarded delivery and npm publication boundaries.
44
-
45
- Completion is reported only at the highest proven level: implemented,
46
- verified, integrated, delivered, or published.
47
-
48
- ## Tracker setup
49
-
50
- `empirical-init` always shows Interaction and Tracker sections. New recommended
51
- setup selects **concise** questions: agents ask only when an answer changes
52
- scope, architecture, authorization, or a safety gate. **Detailed** preserves
53
- the expanded guidance used by existing Schema-5 repositories. Automation can
54
- set the same value with `--questions concise|detailed` or the MCP `questions`
55
- field.
56
-
57
- When no tracker choice exists, Init recommends **Track work by type** and
58
- requires choosing that or **No tracking** before setup can be saved. Track work
59
- selects Linear, GitHub Projects, or Jira; No tracking persists a provider-free
60
- choice and makes no provider requests.
61
-
62
- Authentication starts with OAuth when a trusted host supplies a connection.
63
- MCP clients may open that connection only through explicitly negotiated
64
- URL-mode elicitation; Empirical never requests a credential through a form,
65
- tool argument, tool result, assistant message, or repository file. The default
66
- standalone CLI has no hosted OAuth broker and truthfully proceeds to the
67
- host-only fallback.
68
-
69
- > **Never paste credentials into chat.** If OAuth is unavailable, edit the
70
- > secrets file directly on the host: `${XDG_CONFIG_HOME:-$HOME/.config}/empirical/secrets.env`
71
- > on POSIX or `%APPDATA%\Empirical\secrets.env` on Windows. Do not put a
72
- > credential value in a shell command, process argument, tool call, or
73
- > repository `.env` file.
74
-
75
- New setup uses `LINEAR_SECRET_KEY` for Linear, `GITHUB_TOKEN` for GitHub, and
76
- both `JIRA_EMAIL` and `JIRA_API_TOKEN` for Jira. The file must be a regular,
77
- non-symbolic-link file outside the repository and, on POSIX, owner-only (for
78
- example mode `0600`). Runtime precedence is connected host OAuth, then a
79
- complete injected environment set, then the checked host file. Existing
80
- Tracker Policy v1/v2 names—including `LINEAR_API_KEY` and custom names—remain
81
- valid and are never rewritten automatically.
82
-
83
- After authentication, Empirical discovers accessible targets and workflow
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 Empirical integrations. |
120
- | `empirical update` | Upgrade the package and refresh installed integrations. |
121
- | `empirical uninstall` | Remove Empirical-managed global files and the package. |
122
- | `empirical --help` | Show commands and automation options. |
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
- `empirical uninstall` preserves project `.empirical` history, evidence, and
125
- repository configuration. Automation must confirm removal with `--yes`.
124
+ Empirical fails closed at the boundaries that matter:
126
125
 
127
- ## Safety
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
- Empirical asks when a material product choice or permission is missing. It does
130
- not bypass host permissions or branch protection, extract credentials,
131
- force-write Git history, delete real worktrees, or infer publication. Releases
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) · [Architecture](docs/architecture.md) ·
137
- [MCP and tracking](docs/mcp.md) · [Demo](docs/demo.md) ·
138
- [Security](docs/security.md) · [Migration](docs/migration-v1.md) ·
139
- [Versioning](docs/versioning.md) · [Changelog](CHANGELOG.md)
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. CI covers Node 22, 24, and 26.
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
- The package exports `.`, `./protocol`, `./mcp`, and `./integrations`.
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