empirical-sdd 0.20.1 → 0.20.3

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/README.md CHANGED
@@ -1,279 +1,76 @@
1
1
  # Empirical SDD
2
2
 
3
- Empirical is an agent-neutral spec-driven development engine for Codex, Claude
4
- Code, Cursor, Gemini CLI, Windsurf, and MCP clients. It turns a coding request
5
- into an exact, resumable workflow with observable contracts, evidence, review,
6
- living capability specifications, and safe Git worktree isolation.
3
+ Agent-neutral, resumable spec-driven development for 73 global agent-skill
4
+ targets, with verified runtime guidance for Codex, Claude Code, Cursor, Gemini
5
+ CLI, Windsurf, and MCP clients.
7
6
 
8
- Empirical `0.20.1` is an alpha release. It uses one active feature per checkout
9
- and real Git worktrees for parallel work.
7
+ > Empirical is alpha software. It supports one active feature per checkout and
8
+ > uses Git worktrees for isolated parallel work.
10
9
 
11
10
  ## Install
12
11
 
13
- ```bash
14
- npm install -g empirical-sdd
15
- empirical install
16
- ```
17
-
18
- `empirical install` opens a multi-select list of every supported coding agent.
19
- Detected agents and existing Empirical installations are labeled and selected
20
- by default. Use the arrow keys to move, Space to select, `a` to toggle all, and
21
- Enter to install.
22
-
23
- The selection is exact: Empirical installs one global entrypoint in every
24
- selected agent and removes only Empirical-managed entrypoints from agents you
25
- deselect. Unmanaged files are never overwritten or deleted. The installer works
26
- from any directory and neither creates repository state nor launches an agent.
27
-
28
- For scripts and unattended setup, choose agents explicitly:
29
-
30
- ```bash
31
- # Exact selection; repeat -a/--agent
32
- empirical install --agent codex --agent cursor
33
-
34
- # Every supported agent
35
- empirical install --all
36
-
37
- # Detected agents plus existing managed installations
38
- empirical install --yes
39
- ```
40
-
41
- Then open your repository in a coding agent and use its one Empirical entrypoint:
42
-
43
- | Agent | Invocation |
12
+ | Command | Purpose |
44
13
  | --- | --- |
45
- | Codex | `$empirical` |
46
- | Claude Code | `/empirical` |
47
- | Cursor Agent chat | `empirical` |
48
- | Gemini CLI | `empirical` |
49
- | Windsurf Cascade | `@empirical` |
50
-
51
- To upgrade both the package and installed entrypoints:
52
-
53
- ```bash
54
- empirical update
55
- ```
56
-
57
- `empirical install` and `empirical update` are the entire public terminal CLI.
58
- Repository setup and feature work happen inside the current coding agent; old
59
- terminal verbs such as `init`, `config`, `explore`, `fast`, `complex`, and
60
- `loop` are rejected.
61
-
62
- ## One entrypoint owns the workflow
63
-
64
- Ask the installed Empirical entrypoint for repository work in ordinary language.
65
- It deterministically:
66
-
67
- 1. initializes an uninitialized repository in the current runtime;
68
- 2. builds or refreshes compact repository knowledge;
69
- 3. resumes non-terminal work already owned by this checkout;
70
- 4. uses the original five-pass Socratic interview only when the request is
71
- genuinely vague;
72
- 5. routes an approved, concrete request internally to Fast or Complex;
73
- 6. executes exact revisions through evidence, review, and living-spec archive;
74
- 7. offers an explicit agent handoff only after a Complex specification exists.
75
-
76
- ```text
77
- one Empirical invocation
78
-
79
- ├─ repository uninitialized ──> first-run setup + compact context
80
- ├─ active feature found ──────> resume exact revision
81
- └─ new request
82
- ├─ genuinely vague ────> five Socratic passes ──> approval
83
- └─ concrete ───────────> internal Fast / Complex routing
84
-
85
- approved Complex spec exists?
86
-
87
- Continue here | Save | Continue in agent
88
- ```
89
-
90
- Fast is only for explicit, tiny, localized, reversible, low-risk, non-UI work.
91
- Everything else—including UI, architecture, public APIs, security, migrations,
92
- and cross-cutting changes—uses Complex.
93
-
94
- ## First use and repository knowledge
95
-
96
- On first use, the agent initializes `.empirical/`. It applies safe defaults or
97
- asks only questions that materially change Git isolation or Complex decision
98
- policy. It does not install project-local workflow skills.
99
-
100
- Initialization also creates a compact, committed context set:
101
-
102
- ```text
103
- .empirical/context/
104
- ├── manifest.json
105
- ├── index.md
106
- ├── overview.md
107
- ├── architecture.md
108
- ├── commands.md
109
- └── conventions.md
110
- ```
111
-
112
- The deterministic manifest contains bounded path, size, and content-digest
113
- metadata—not source contents. Dependency trees, build output, ignored files,
114
- secret-like paths, credentials, binary files, and large files are excluded.
115
- Topic pages are maintained from repository evidence and are not overwritten by
116
- a routine refresh. There are no embeddings, hosted services, or vector database.
117
-
118
- ## Socratic discovery
119
-
120
- For a vague idea such as “make onboarding better,” Empirical asks one question
121
- at a time across five passes:
122
-
123
- 1. primary user and observed problem;
124
- 2. smallest observable outcome;
125
- 3. boundaries, constraints, and explicit non-goals;
126
- 4. failures and solution-changing risks;
127
- 5. concrete verification.
128
-
129
- It adds only material follow-ups, saves the answers, presents the complete
130
- refined contract, and waits for explicit approval before creating workflow
131
- state. A concrete request does not pay this discovery cost.
132
-
133
- ## Small feature demo
14
+ | `npm install -g empirical-sdd` | Install the Empirical CLI globally. |
15
+ | `empirical install` | Choose coding agents and install their five Empirical skills. |
16
+ | `empirical update` | Upgrade Empirical and refresh the installed skills. |
134
17
 
135
- In your coding agent:
18
+ Restart or reload each selected agent after installation.
136
19
 
137
- > `$empirical` Add a health command that prints `ok`.
20
+ `empirical install` uses a searchable, scrollable local catalog pinned to a
21
+ reviewed `vercel-labs/skills` release. It remembers the exact selected ids,
22
+ deduplicates shared skill roots, and never runs `npx` or uses the network. Type
23
+ to search by agent name, id, or destination; use arrows, Space, Enter, Escape,
24
+ or Ctrl-C. Automation can use repeatable `--agent`/`-a`, `--all`, `--yes`, and
25
+ `--json`; the legacy ids `claude` and `gemini` remain aliases.
138
26
 
139
- Empirical recognizes an explicit, localized, low-risk non-UI change and routes
140
- it internally to Fast. The agent inspects only relevant files, implements the
141
- generated observable criterion, runs one focused test, reviews the diff, and
142
- completes the exact revision. The durable result is:
27
+ ## Use
143
28
 
144
- ```text
145
- .empirical/specs/add-a-health-command-that-prints-ok/
146
- ├── spec.md
147
- ├── state.json
148
- ├── events/
149
- └── evidence.json
150
- ```
29
+ These are coding-agent skills, not shell commands:
151
30
 
152
- You do not choose or invoke a separate Fast command.
31
+ | Agent | Automatic | Init | Spec | Socratic | Loop |
32
+ | --- | --- | --- | --- | --- | --- |
33
+ | Codex | `$empirical` | `$empirical-init` | `$empirical-spec` | `$empirical-socratic` | `$empirical-loop` |
34
+ | Claude Code | `/empirical` | `/empirical-init` | `/empirical-spec` | `/empirical-socratic` | `/empirical-loop` |
35
+ | Cursor | `empirical` | `empirical-init` | `empirical-spec` | `empirical-socratic` | `empirical-loop` |
36
+ | Gemini CLI | `empirical` | `empirical-init` | `empirical-spec` | `empirical-socratic` | `empirical-loop` |
37
+ | Windsurf | `@empirical` | `@empirical-init` | `@empirical-spec` | `@empirical-socratic` | `@empirical-loop` |
153
38
 
154
- ## Complex feature demo
155
-
156
- In your coding agent:
157
-
158
- > `$empirical` Add team invitations with expiration, revocation, and audit
159
- > history. Existing members must keep access during rollout.
160
-
161
- Empirical routes the request to Complex and drives seven gates:
162
-
163
- 1. Specify observable criteria, scope, risks, verification, and capability
164
- deltas.
165
- 2. Design the architecture and record accepted evidence-backed decisions.
166
- 3. Plan an executable implementation sequence.
167
- 4. Implement the approved contract.
168
- 5. Verify every criterion; UI work requires real-browser evidence.
169
- 6. Review the diff against criteria and accepted decisions.
170
- 7. Archive reviewed deltas into living capability specifications.
171
-
172
- After Specify passes, the agent offers:
173
-
174
- - Continue here.
175
- - Save for later.
176
- - Continue in a detected agent.
177
-
178
- For an external handoff, Empirical displays the target, whether it accepts a
179
- prompt or only a workspace, the exact working directory, and exact argument
180
- array. Detection and Save launch nothing. The command is revalidated and
181
- authorized only after you explicitly approve that exact option.
182
-
183
- Decision records store reviewable evidence, options, the selected approach,
184
- trade-offs, risks, and verification—not private chain-of-thought, prompts,
185
- scratchpads, tokens, or credentials.
186
-
187
- ## Parallel work uses Git worktrees
188
-
189
- If a different feature is active, the single entrypoint returns a read-only
190
- worktree proposal instead of overwriting state. It shows the base and immutable
191
- base commit, branch, sibling path, exact Git argument array, and approval token.
192
-
193
- After explicit approval Empirical requires a clean source checkout, revalidates
194
- every field, rejects collisions, creates the linked checkout without force, and
195
- starts the exact request there. It never stashes, commits, moves local changes,
196
- deletes worktrees, or deletes branches.
197
-
198
- Active selection lives in checkout-local Git metadata while portable feature
199
- contracts remain committed under `.empirical/specs/`. A linked checkout therefore
200
- does not accidentally inherit a blocked feature owned by another checkout.
201
-
202
- ## Internal automation API
203
-
204
- The TypeScript API and MCP tools remain available for agent runtimes and
205
- programmatic integrations. They include setup, context refresh, discovery,
206
- Fast/Complex routing, resume, exact completion, verification, review, archive,
207
- status/explain, handoff, capability projection, and worktree proposal/creation.
208
- They are automation primitives, not additional user-facing terminal commands.
209
-
210
- The stdio MCP server exposes these groups:
211
-
212
- - setup/context: `empirical_init`, `empirical_adopt`, `empirical_configure`,
213
- `empirical_context`;
214
- - routing/workflow: `empirical_explore`, `empirical_fast`,
215
- `empirical_complex`, `empirical_loop`, `empirical_next`,
216
- `empirical_complete`, `empirical_retry`, `empirical_verify`,
217
- `empirical_archive`;
218
- - handoff/isolation: `empirical_handoff`, `empirical_worktree_propose`,
219
- `empirical_worktree_create`;
220
- - understanding: `empirical_explain`, `empirical_status`,
221
- `empirical_capabilities`, `empirical_policy`, `empirical_doctor`.
222
-
223
- Only explicitly approved worktree creation mutates Git. Agent handoff returns an
224
- approval-bound command but never launches it itself.
225
-
226
- ## Committed layout
227
-
228
- ```text
229
- .empirical/
230
- ├── config.json
231
- ├── policy.json
232
- ├── context/
233
- ├── capabilities/<capability>/spec.md
234
- ├── discoveries/<discovery>/
235
- │ ├── interview.json
236
- │ └── brief.md
237
- └── specs/<feature>/
238
- ├── spec.md
239
- ├── design.md # Complex
240
- ├── decisions.md # Complex when required
241
- ├── plan.md # Complex
242
- ├── deltas/*.md # Complex behavior changes
243
- ├── state.json
244
- ├── state.lock # ephemeral
245
- ├── events/*.json
246
- └── evidence.json
247
- ```
248
-
249
- Feature contracts, journals, context, capability specs, configuration, and
250
- policy are committed. The checkout's selected feature is stored in its own Git
251
- metadata and is not shared across linked worktrees.
252
-
253
- ## Migration and the 0.20 alpha
39
+ | Skill | Purpose |
40
+ | --- | --- |
41
+ | `empirical <request>` | Initialize if needed, select the workflow, and run the request through review. |
42
+ | `empirical-init` | Initialize or repair repository setup without starting work. |
43
+ | `empirical-spec <request>` | Draft a concrete specification and stop for approval. |
44
+ | `empirical-socratic <idea>` | Refine an idea through a five-pass interview, then draft a specification. |
45
+ | `empirical-loop` | Resume the active approved specification and drive it to completion. |
46
+
47
+ On first `empirical-init`, the agent shows the complete recommended setup before
48
+ writing anything. Apply the defaults, customize Verification, Parallel work,
49
+ and Decisions one section at a time, or cancel. Repair shows current values and
50
+ keeps them unless edited. Verification independently stores acceptance-test,
51
+ UI-browser, UI-screenshot, and code-review gates; all default on. Turning off
52
+ criterion evidence makes its UI sub-policies inactive without erasing them, and
53
+ does not turn off code review.
54
+
55
+ Broad catalog membership means an agent can read global `SKILL.md` files. MCP
56
+ bridging and executable handoff remain separately verified capabilities; the
57
+ installer does not infer either one.
254
58
 
255
- Running the installer again is the migration: it removes only marker-owned old
256
- global and project-local Empirical workflow artifacts, preserves unmanaged
257
- content and existing runtime configuration, and converges without unnecessary
258
- second-run changes. Existing schema-4 projects and discovery records remain
259
- readable.
59
+ ## Development
260
60
 
261
- Schema-1, schema-2, and schema-3 default root state migrates idempotently into
262
- the matching feature directory. Historical alternate parallel-state data is
263
- left untouched and unsupported.
61
+ Requires Node.js 20+ and Bun.
264
62
 
265
- See [migration details](docs/migration-v1.md), the [architecture](docs/architecture.md),
266
- the [MCP guide](docs/mcp.md), the [security model](docs/security.md), and the
267
- [OpenSpec comparison](docs/openspec-comparison.md).
63
+ | Command | Purpose |
64
+ | --- | --- |
65
+ | `bun install` | Install development dependencies. |
66
+ | `bun run ci` | Run type checking, tests, build smoke tests, and package tests. |
268
67
 
269
- ## Development
68
+ ## Documentation
270
69
 
271
- ```bash
272
- bun install
273
- bun run ci
274
- ```
70
+ [Architecture](docs/architecture.md) · [Demos](docs/demo.md) ·
71
+ [MCP](docs/mcp.md) · [Security](docs/security.md) ·
72
+ [Migration](docs/migration-v1.md)
275
73
 
276
- Empirical targets Node.js 20+ at runtime. Bun is used for development, tests,
277
- and building the published JavaScript package.
74
+ ## License
278
75
 
279
- License: MIT.
76
+ [MIT](LICENSE)