empirical-sdd 0.29.0 → 0.31.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,74 @@ under the alpha rules in [docs/versioning.md](docs/versioning.md).
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.31.0] - 2026-09-04
12
+
13
+ ### Added
14
+
15
+ - Added authenticated Linear MCP tracker transport that reuses the host's
16
+ existing OAuth connection without copying credentials, with durable
17
+ discovery, preview, prepare, reconciliation, and exactly-once acceptance.
18
+ - Added a conditional design-language knowledge page for repositories with a
19
+ product interface, supporting explicit import, repository-derived proposals,
20
+ and human-confirmed elicitation while excluding documentation-only surfaces.
21
+
22
+ ### Changed
23
+
24
+ - Projected the shipped specialist-consult protocol into living capability and
25
+ workflow-routing specifications so required, bounded advisories remain
26
+ reviewable and protected from specification drift.
27
+
28
+ ### Fixed
29
+
30
+ - Kept Linear OAuth timeout handling live on Windows and isolated its complete
31
+ test suite from the Bun coverage instrumentation hang while retaining
32
+ aggregate coverage enforcement.
33
+ - Hardened Linear MCP bridge persistence against symlink escapes and serialized
34
+ intent acceptance so concurrent submissions cannot both advance one durable
35
+ operation.
36
+
37
+ ### Migration
38
+
39
+ No migration required.
40
+
41
+ ## [0.30.0] - 2026-09-01
42
+
43
+ ### Added
44
+
45
+ - Added a zero-build, responsive project wiki with practical onboarding,
46
+ architecture and workflow guidance, searchable task-oriented navigation,
47
+ accessible Agentum motion, strict content security, reduced-motion support,
48
+ and meaningful no-JavaScript fallbacks.
49
+ - Added exact GitHub Copilot MCP configuration management that preserves
50
+ unrelated servers and user-owned collisions while installing and removing
51
+ only Empirical's managed stdio bridge.
52
+ - Added in-memory OAuth for Linear's official remote MCP endpoint through the
53
+ standalone `empirical mcp` bridge, using dynamic client registration, PKCE,
54
+ a state-bound ephemeral loopback callback, URL-mode elicitation, bounded
55
+ remote operations, sanitized failures, and complete session cleanup.
56
+
57
+ ### Changed
58
+
59
+ - Replaced the long-form README with a concise project introduction derived
60
+ from the wiki while retaining strict tracker recovery guidance and keeping
61
+ obsolete public integration examples out of generated onboarding.
62
+ - Generated initialization guidance now recommends an OAuth-capable Empirical
63
+ host when the current skill-only host cannot perform the browser handoff,
64
+ while retaining the secure host-only secret-file fallback.
65
+
66
+ ### Fixed
67
+
68
+ - Linear discovery, lifecycle suggestion, and preview now accept any finite
69
+ workflow-state position, including the negative floating-point ordering
70
+ values Linear legitimately assigns to backlog states.
71
+ - Fixed standalone Linear OAuth lifecycle behavior so cancellation, timeout,
72
+ callback races, invalid responses, and transport shutdown remain bounded and
73
+ cannot leak credentials or leave callback listeners running.
74
+
75
+ ### Migration
76
+
77
+ No migration required.
78
+
11
79
  ## [0.29.0] - 2026-08-28
12
80
 
13
81
  ### Added
@@ -313,7 +381,9 @@ Published through GitHub Actions trusted publishing with npm provenance.
313
381
 
314
382
  - Prepared and released package version `0.20.2`.
315
383
 
316
- [Unreleased]: https://github.com/goempirical/empirical-sdd/compare/v0.29.0...HEAD
384
+ [Unreleased]: https://github.com/goempirical/empirical-sdd/compare/v0.31.0...HEAD
385
+ [0.31.0]: https://github.com/goempirical/empirical-sdd/compare/v0.30.0...v0.31.0
386
+ [0.30.0]: https://github.com/goempirical/empirical-sdd/compare/v0.29.0...v0.30.0
317
387
  [0.29.0]: https://github.com/goempirical/empirical-sdd/compare/v0.28.0...v0.29.0
318
388
  [0.28.0]: https://github.com/goempirical/empirical-sdd/compare/v0.27.0...v0.28.0
319
389
  [0.27.0]: https://github.com/goempirical/empirical-sdd/compare/v0.26.1...v0.27.0
package/README.md CHANGED
@@ -1,162 +1,139 @@
1
1
  # Empirical SDD
2
2
 
3
- Reliable, resumable spec-driven development for coding agents.
3
+ **Agent work that survives the chat.**
4
4
 
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.
5
+ Empirical is a repository-native harness for coding agents. The model writes;
6
+ Empirical keeps the contract, progress, proof, and exact next action in Git so
7
+ work can resume across sessions, agents, and machines.
10
8
 
11
- > Empirical 0.29 is alpha software and requires Node.js 22 or newer.
9
+ > Empirical 0.31 is alpha software and requires Node.js 22 or newer.
12
10
 
13
- ## Quick start
11
+ **[Open the practical harness guide](https://goempirical.github.io/empirical-sdd/)**
12
+ for the visual walkthrough, diagrams, generated-file explorer, and complete
13
+ workflow. Its zero-build source is [docs/index.html](docs/index.html).
14
14
 
15
- Install Empirical globally, then install its integrations for the coding agents
16
- you use:
15
+ ## Start in three steps
17
16
 
18
- ```sh
19
- npm install -g empirical-sdd
20
- empirical install
21
- ```
22
-
23
- In each repository, initialize Empirical once from your agent:
17
+ 1. Install the package and the agent integrations you use.
24
18
 
25
- - Codex: `$empirical-init`
26
- - Claude Code: `/empirical-init`
27
- - Windsurf: `@empirical-init`
19
+ ```sh
20
+ npm install -g empirical-sdd
21
+ empirical install
22
+ ```
28
23
 
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
- ```
24
+ 2. Initialize each repository once from your coding agent.
34
25
 
35
- Empirical activates automatically for repository changes. Read-only questions
36
- stay read-only and do not start a workflow.
26
+ - Codex: `$empirical-init`
27
+ - Claude Code: `/empirical-init`
37
28
 
38
- ## What Empirical does
29
+ 3. Ask for the change normally.
39
30
 
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.
31
+ ```text
32
+ Add rate limiting to the public API and prove the failure path.
33
+ ```
54
34
 
55
- ## Workflow at a glance
35
+ Repository mutations route automatically. Read-only questions remain
36
+ read-only. If work stops, reopen the same checkout and ask the agent to
37
+ continue—the committed journal provides the resume point.
56
38
 
57
- Material work follows a deterministic state machine:
39
+ ## Why use it?
58
40
 
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.
41
+ | Without a harness | With Empirical |
42
+ | --- | --- |
43
+ | Lost chat | **Continuity** — resume from repository state. |
44
+ | Ambiguous request | **Shared contract** — agree on observable outcomes first. |
45
+ | Confidence without proof | **Honest evidence** bind claims to exact source, commands, attempts, and results. |
46
+ | Scope drift | **Reviewable scope** — keep decisions, diffs, failures, and gaps visible. |
47
+ | Unsafe convergence | **Safer integration** isolate parallel work and validate against an independent target. |
48
+ | Accidental publication | **Bounded authority** — keep implementation, delivery, and publication separate. |
71
49
 
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.
50
+ ## How it works
75
51
 
76
- ## Everyday use
52
+ Empirical routes by risk, not prompt length:
77
53
 
78
- You communicate with your coding agent, not a workflow CLI.
54
+ - **Fast** handles explicit, tiny, localized, reversible, contract-neutral work
55
+ with focused proof.
56
+ - **Complex** carries material work through a durable contract, decisions,
57
+ verification, exact-diff review, and independent integration.
79
58
 
80
59
  ```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?
60
+ Specify Design Plan Implement → Context? → Verify → Review → Integrate
85
61
  ```
86
62
 
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.
63
+ Context runs when repository knowledge needs refinement. Failed verification or
64
+ requested review changes return to implementation. Evidence, review, and
65
+ integration are different claims, and Empirical reports only the highest level
66
+ actually proven: `implemented`, `verified`, `integrated`, `delivered`, or
67
+ `published`.
89
68
 
90
- Useful lifecycle commands remain intentionally small:
69
+ Delivery is never implied. Empirical does not infer permission to merge a pull
70
+ request, bypass protection, create a release, or publish a package.
91
71
 
92
- | Command | Purpose |
93
- | --- | --- |
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.
72
+ ## What it creates
116
73
 
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).
74
+ Init installs the harness; selected work fills in the record:
121
75
 
122
- ## Safety model
123
-
124
- Empirical fails closed at the boundaries that matter:
125
-
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.
76
+ ```text
77
+ repository/
78
+ ├── AGENTS.md / CLAUDE.md / GEMINI.md bounded activation markers
79
+ ├── agent skill + MCP entries selected integrations
80
+ └── .empirical/
81
+ ├── config.json project setup
82
+ ├── policy.json verification and delivery policy
83
+ ├── tracker.json secret-free tracker choice
84
+ ├── context/ repository knowledge
85
+ ├── specs/<feature>/
86
+ │ ├── spec.md + decisions.md contract and decisions
87
+ │ ├── design.md + plan.md Complex approach and plan
88
+ │ ├── impact.json affected behavior and surfaces
89
+ │ ├── state.json + events/ phase and resumable journal
90
+ │ ├── evidence/receipts/ immutable attempts and artifacts
91
+ │ ├── reviews/ exact-diff review, when reached
92
+ │ └── integration-receipt.json convergence proof, when reached
93
+ └── capabilities/<capability>/ living behavior after integration
94
+ ```
132
95
 
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.
96
+ Exact host files depend on the integrations selected during install. Init
97
+ creates durable setup and empty work containers; a real mutation creates a
98
+ feature record, and conditional artifacts appear only when their phases run.
99
+
100
+ Optional tracking mirrors approved milestones to Linear, GitHub, or Jira; the
101
+ repository remains authoritative. Policy supports
102
+ `enforcement: "best-effort" | "strict"`; strict recovery retries the exact
103
+ feature. Credentials never belong in chat, prompts, repository files, tool
104
+ arguments, or evidence.
105
+
106
+ When GitHub Copilot is selected, installation also reconciles the exact
107
+ Empirical stdio bridge in `~/.copilot/mcp-config.json`; start a new session after
108
+ install or update. Linear setup then uses an in-memory OAuth client for Linear's
109
+ official remote MCP endpoint, with browser authorization through negotiated URL
110
+ elicitation. Empirical never reads Copilot's token store or persists the OAuth
111
+ token. The guarded `LINEAR_SECRET_KEY` host file remains a fallback, not the
112
+ default requirement for an OAuth-capable session. On Codex, Policy v2 can use
113
+ `connection: "linear-mcp"`: Empirical emits durable secret-free intents, Codex
114
+ executes them through the authenticated Linear MCP tools, and validated results
115
+ converge the same binding, milestone, and strict-gate records without sharing
116
+ the OAuth token.
136
117
 
137
118
  ## Documentation
138
119
 
120
+ - [Practical guide](https://goempirical.github.io/empirical-sdd/) — visual onboarding and diagrams
121
+ - [Demo](docs/demo.md) — installation and representative scenarios
139
122
  - [Protocol](docs/protocol.md) — state machine, artifacts, and completion rules
140
- - [Architecture](docs/architecture.md) — trust boundaries and system design
123
+ - [Architecture](docs/architecture.md) — persistence and trust boundaries
141
124
  - [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
125
+ - [Security](docs/security.md) — credentials, execution, review, and authority
126
+ - [Releasing](docs/releasing.md) — guarded maintainer playbook
147
127
 
148
128
  ## Development
149
129
 
150
- Development requires Node.js 22+ and the Bun version pinned by CI.
151
-
152
130
  ```sh
153
131
  bun install --frozen-lockfile
154
132
  bun run ci
155
133
  ```
156
134
 
157
135
  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`.
136
+ reserved for validated release pull requests.
160
137
 
161
138
  ## License
162
139
 
@@ -189,6 +189,8 @@ export declare const AGENT_SKILL_TARGETS: readonly [{
189
189
  readonly label: "GitHub Copilot";
190
190
  readonly globalSkillPath: ".copilot/skills";
191
191
  readonly detectPaths: readonly [".copilot"];
192
+ readonly reload: "Start a new Copilot CLI or Agent Host session so it reloads the global Empirical MCP bridge.";
193
+ readonly projectMcp: true;
192
194
  }, {
193
195
  readonly id: "goose";
194
196
  readonly label: "Goose";