empirical-sdd 0.20.2 → 0.20.4
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 +49 -284
- package/dist/agent-catalog.d.ts +441 -0
- package/dist/branding.d.ts +15 -0
- package/dist/cli.js +1166 -316
- package/dist/index.d.ts +5 -1
- package/dist/index.js +687 -170
- package/dist/integrations.d.ts +5 -3
- package/dist/selector.d.ts +26 -7
- package/dist/setup.d.ts +11 -0
- package/dist/types.d.ts +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,311 +1,76 @@
|
|
|
1
1
|
# Empirical SDD
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
review, and living capability specifications.
|
|
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
|
|
9
|
-
|
|
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
|
-
|
|
14
|
-
npm install -g empirical-sdd
|
|
15
|
-
empirical install
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
`empirical install` opens a multi-select list of supported coding agents.
|
|
19
|
-
Detected agents and existing managed installations are selected by default.
|
|
20
|
-
Use Up/Down, Space, `a`, and Enter to submit the exact selection.
|
|
21
|
-
|
|
22
|
-
Every selected agent receives five global skills:
|
|
23
|
-
|
|
24
|
-
| Intent | Skill |
|
|
12
|
+
| Command | Purpose |
|
|
25
13
|
| --- | --- |
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
| Run the five-pass interview, draft, and stop | `empirical-socratic` |
|
|
30
|
-
| Resume the approved specification to completion | `empirical-loop` |
|
|
31
|
-
|
|
32
|
-
The installer removes only marker-owned Empirical skills from agents you
|
|
33
|
-
deselect. It preserves unmanaged files, directories, symbolic links, and
|
|
34
|
-
unrelated settings. It works from any directory and does not create repository
|
|
35
|
-
state or launch an agent.
|
|
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. |
|
|
36
17
|
|
|
37
|
-
|
|
18
|
+
Restart or reload each selected agent after installation.
|
|
38
19
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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.
|
|
42
26
|
|
|
43
|
-
|
|
44
|
-
empirical install --all
|
|
27
|
+
## Use
|
|
45
28
|
|
|
46
|
-
|
|
47
|
-
empirical install --yes
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Restart or reload the selected agent after installation. Native invocations are:
|
|
29
|
+
These are coding-agent skills, not shell commands:
|
|
51
30
|
|
|
52
31
|
| Agent | Automatic | Init | Spec | Socratic | Loop |
|
|
53
32
|
| --- | --- | --- | --- | --- | --- |
|
|
54
33
|
| Codex | `$empirical` | `$empirical-init` | `$empirical-spec` | `$empirical-socratic` | `$empirical-loop` |
|
|
55
34
|
| Claude Code | `/empirical` | `/empirical-init` | `/empirical-spec` | `/empirical-socratic` | `/empirical-loop` |
|
|
56
|
-
| Cursor
|
|
35
|
+
| Cursor | `empirical` | `empirical-init` | `empirical-spec` | `empirical-socratic` | `empirical-loop` |
|
|
57
36
|
| Gemini CLI | `empirical` | `empirical-init` | `empirical-spec` | `empirical-socratic` | `empirical-loop` |
|
|
58
|
-
| Windsurf
|
|
59
|
-
|
|
60
|
-
To upgrade the package and refresh every selected skill:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
empirical update
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
`empirical install` and `empirical update` are the entire public terminal CLI.
|
|
67
|
-
Init, Spec, Socratic, and Loop are coding-agent skills, not shell commands.
|
|
68
|
-
Internal workflow operations remain available to installed skills through MCP
|
|
69
|
-
and a private compatibility transport.
|
|
70
|
-
|
|
71
|
-
## Choose automatic or deliberate mode
|
|
72
|
-
|
|
73
|
-
Both modes use the same state machine, artifacts, evidence gates, and safety
|
|
74
|
-
rules.
|
|
75
|
-
|
|
76
|
-
```text
|
|
77
|
-
Automatic
|
|
78
|
-
empirical request
|
|
79
|
-
└─ setup/repair → resume or discover/route → execute → verify → review → done
|
|
80
|
-
|
|
81
|
-
Deliberate SDD
|
|
82
|
-
empirical-init
|
|
83
|
-
└─ empirical-spec request ──────────────┐
|
|
84
|
-
└─ empirical-socratic idea → interview ├─ review contract → empirical-loop → done
|
|
85
|
-
┘
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Use `empirical` when you want the agent to choose the right path and keep going.
|
|
89
|
-
Use the explicit skills when you want to inspect the specification before any
|
|
90
|
-
implementation begins. Fast and Complex are internal profiles; users do not
|
|
91
|
-
need separate skills for them.
|
|
92
|
-
|
|
93
|
-
## Initialize a repository
|
|
94
|
-
|
|
95
|
-
Inside the repository, invoke the Init skill in your coding agent. For Codex:
|
|
96
|
-
|
|
97
|
-
> `$empirical-init`
|
|
98
|
-
|
|
99
|
-
Init inspects manifests, documentation, source, tests, Git state, existing
|
|
100
|
-
Empirical configuration, and living capabilities. It asks one focused question
|
|
101
|
-
at a time only when the answer changes:
|
|
102
|
-
|
|
103
|
-
- whether unrelated active work should use a sibling Git worktree;
|
|
104
|
-
- the base branch, worktree path, and branch pattern;
|
|
105
|
-
- whether Complex decisions require reviewable decision records.
|
|
106
|
-
|
|
107
|
-
It then creates or repairs `.empirical/`, installs repository MCP bridges,
|
|
108
|
-
refreshes compact context, confirms `setupComplete: true`, and stops. It does not
|
|
109
|
-
create a feature or specification.
|
|
110
|
-
|
|
111
|
-
You can skip explicit Init and invoke `$empirical` directly; the automatic skill
|
|
112
|
-
performs the same preflight first. A partial schema-4 repository—such as one with
|
|
113
|
-
`setupComplete: false` or missing `.empirical/context/`—is repaired rather than
|
|
114
|
-
mistaken for a complete setup. Marker-owned old project-local skills are removed
|
|
115
|
-
so they cannot shadow global updates; unmanaged collisions are preserved and
|
|
116
|
-
reported.
|
|
117
|
-
|
|
118
|
-
Initialization creates:
|
|
119
|
-
|
|
120
|
-
```text
|
|
121
|
-
.empirical/context/
|
|
122
|
-
├── manifest.json
|
|
123
|
-
├── index.md
|
|
124
|
-
├── overview.md
|
|
125
|
-
├── architecture.md
|
|
126
|
-
├── commands.md
|
|
127
|
-
└── conventions.md
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
The deterministic manifest contains bounded path, size, and digest metadata,
|
|
131
|
-
not source contents. Dependencies, build output, ignored files, secret-like
|
|
132
|
-
paths, credentials, binaries, and large files are excluded. There are no
|
|
133
|
-
embeddings, hosted RAG services, or vector databases.
|
|
134
|
-
|
|
135
|
-
## Explicit Spec: a small concrete feature
|
|
136
|
-
|
|
137
|
-
In Codex:
|
|
138
|
-
|
|
139
|
-
> `$empirical-spec` Add a keyboard shortcut that opens the existing command
|
|
140
|
-
> palette with Cmd/Ctrl+K. Do not change the palette design.
|
|
141
|
-
|
|
142
|
-
Spec ensures the repository is initialized, starts internal Complex Specify,
|
|
143
|
-
inspects the relevant code and living capabilities, and writes observable
|
|
144
|
-
acceptance criteria, scope, non-goals, risks, verification, and capability
|
|
145
|
-
deltas. It then stops. No implementation code is written and the pending
|
|
146
|
-
Specify revision is not completed.
|
|
147
|
-
|
|
148
|
-
Review the files under `.empirical/specs/<feature>/`. When the contract is right:
|
|
149
|
-
|
|
150
|
-
> `$empirical-loop`
|
|
151
|
-
|
|
152
|
-
That invocation is explicit approval to complete Specify and continue through
|
|
153
|
-
Design, Plan, Implement, Verify, Review, and Archive.
|
|
154
|
-
|
|
155
|
-
## Explicit Socratic: a complex or vague feature
|
|
37
|
+
| Windsurf | `@empirical` | `@empirical-init` | `@empirical-spec` | `@empirical-socratic` | `@empirical-loop` |
|
|
156
38
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
1. primary user and observed problem;
|
|
165
|
-
2. smallest observable outcome;
|
|
166
|
-
3. boundaries, constraints, and explicit non-goals;
|
|
167
|
-
4. failure behavior and solution-changing risks;
|
|
168
|
-
5. concrete verification.
|
|
169
|
-
|
|
170
|
-
It reflects each answer, asks only a material follow-up, and saves progress after
|
|
171
|
-
every pass. After all five, it displays one exact refined request. Rejecting or
|
|
172
|
-
saving creates no workflow state. Approving binds that exact request to Complex
|
|
173
|
-
Specify, drafts the specification and capability deltas, and stops again for
|
|
174
|
-
contract review.
|
|
175
|
-
|
|
176
|
-
After reviewing the draft:
|
|
177
|
-
|
|
178
|
-
> `$empirical-loop`
|
|
179
|
-
|
|
180
|
-
## Automatic demos
|
|
181
|
-
|
|
182
|
-
For a tiny, localized, reversible, low-risk, non-UI change:
|
|
183
|
-
|
|
184
|
-
> `$empirical` Add a health command that prints `ok`.
|
|
185
|
-
|
|
186
|
-
Empirical routes internally to Fast, implements the criterion, runs focused
|
|
187
|
-
tests, reviews the diff, and completes the exact revision.
|
|
188
|
-
|
|
189
|
-
For a substantial feature:
|
|
190
|
-
|
|
191
|
-
> `$empirical` Add team invitations with expiration, revocation, and audit
|
|
192
|
-
> history. Existing members must keep access during rollout.
|
|
193
|
-
|
|
194
|
-
Empirical routes to Complex and drives seven gates:
|
|
195
|
-
|
|
196
|
-
1. Specify observable behavior and capability deltas.
|
|
197
|
-
2. Design the solution and record accepted evidence-backed decisions.
|
|
198
|
-
3. Plan an executable implementation sequence.
|
|
199
|
-
4. Implement the approved contract.
|
|
200
|
-
5. Verify every criterion; UI work requires real-browser and screenshot evidence.
|
|
201
|
-
6. Review the diff against criteria and decisions.
|
|
202
|
-
7. Archive reviewed deltas into living capability specifications.
|
|
203
|
-
|
|
204
|
-
For a genuinely vague automatic request, Empirical uses the same durable
|
|
205
|
-
five-pass Socratic operation before routing. A concrete request does not pay that
|
|
206
|
-
discovery cost.
|
|
207
|
-
|
|
208
|
-
## Resume safely with Loop
|
|
209
|
-
|
|
210
|
-
`empirical-loop` takes no new feature request. It asks Empirical for the selected
|
|
211
|
-
action, completes its exact revision with required artifacts and evidence, and
|
|
212
|
-
continues until Done, Blocked, or Awaiting Human.
|
|
213
|
-
|
|
214
|
-
If no feature is selected, Loop creates nothing and points to Automatic, Spec,
|
|
215
|
-
or Socratic. Attached text never replaces active work. If another feature is
|
|
216
|
-
already active, starting unrelated work returns a read-only worktree proposal
|
|
217
|
-
instead of overwriting state.
|
|
218
|
-
|
|
219
|
-
## Worktrees and agent handoff
|
|
220
|
-
|
|
221
|
-
An isolation proposal shows its base and immutable base commit, branch, sibling
|
|
222
|
-
path, exact Git argument array, and approval token. Empirical waits for explicit
|
|
223
|
-
approval, requires a clean source checkout, revalidates every field, rejects
|
|
224
|
-
collisions, and creates the linked checkout without force. It never stashes,
|
|
225
|
-
commits, moves local changes, deletes worktrees, or deletes branches.
|
|
226
|
-
|
|
227
|
-
After a Complex specification passes, Automatic or Loop offers:
|
|
228
|
-
|
|
229
|
-
- Continue here.
|
|
230
|
-
- Save for later.
|
|
231
|
-
- Continue in a detected agent.
|
|
232
|
-
|
|
233
|
-
Detection and Save launch nothing. Before external handoff, Empirical displays
|
|
234
|
-
the agent, its prompt/workspace capability, cwd, and exact argv; it authorizes
|
|
235
|
-
only the unchanged option after explicit approval.
|
|
236
|
-
|
|
237
|
-
Active selection lives in checkout-local Git metadata. Portable feature
|
|
238
|
-
contracts remain under `.empirical/specs/`, so a linked checkout does not inherit
|
|
239
|
-
a blocked feature owned by another checkout.
|
|
240
|
-
|
|
241
|
-
## Internal automation API
|
|
242
|
-
|
|
243
|
-
The TypeScript API and MCP server expose the primitives used by installed
|
|
244
|
-
skills. They are not additional public terminal commands.
|
|
245
|
-
|
|
246
|
-
- Setup/context: `empirical_init`, `empirical_adopt`, `empirical_configure`,
|
|
247
|
-
`empirical_context`.
|
|
248
|
-
- Discovery/routing: `empirical_explore`, `empirical_discovery`,
|
|
249
|
-
`empirical_fast`, `empirical_complex`.
|
|
250
|
-
- Workflow: `empirical_loop`, `empirical_next`, `empirical_complete`,
|
|
251
|
-
`empirical_retry`, `empirical_verify`, `empirical_archive`.
|
|
252
|
-
- Handoff/isolation: `empirical_handoff`, `empirical_worktree_propose`,
|
|
253
|
-
`empirical_worktree_create`.
|
|
254
|
-
- Understanding: `empirical_explain`, `empirical_status`,
|
|
255
|
-
`empirical_capabilities`, `empirical_policy`, `empirical_doctor`.
|
|
256
|
-
|
|
257
|
-
Generated skills use MCP first and `empirical __internal` only as a private
|
|
258
|
-
fallback when MCP is unavailable. Humans should not invoke that namespace.
|
|
259
|
-
|
|
260
|
-
## Committed layout
|
|
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. |
|
|
261
46
|
|
|
262
|
-
|
|
263
|
-
.
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
│ ├── interview.json
|
|
270
|
-
│ └── brief.md
|
|
271
|
-
└── specs/<feature>/
|
|
272
|
-
├── spec.md
|
|
273
|
-
├── design.md # Complex
|
|
274
|
-
├── decisions.md # Complex when required
|
|
275
|
-
├── plan.md # Complex
|
|
276
|
-
├── deltas/*.md # Complex behavior changes
|
|
277
|
-
├── state.json
|
|
278
|
-
├── state.lock # ephemeral
|
|
279
|
-
├── events/*.json
|
|
280
|
-
└── evidence.json
|
|
281
|
-
```
|
|
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.
|
|
282
54
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
chain-of-thought, prompts, tokens, credentials, or scratchpads.
|
|
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.
|
|
287
58
|
|
|
288
|
-
##
|
|
59
|
+
## Development
|
|
289
60
|
|
|
290
|
-
|
|
291
|
-
removes only marker-owned old local skills and repairs partial setup. Both
|
|
292
|
-
operations converge, preserve unmanaged content, and keep schema-4 projects and
|
|
293
|
-
discovery records readable.
|
|
61
|
+
Requires Node.js 20+ and Bun.
|
|
294
62
|
|
|
295
|
-
|
|
296
|
-
|
|
63
|
+
| Command | Purpose |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| `bun install` | Install development dependencies. |
|
|
66
|
+
| `bun run ci` | Run type checking, tests, build smoke tests, and package tests. |
|
|
297
67
|
|
|
298
|
-
|
|
299
|
-
[architecture](docs/architecture.md), [MCP guide](docs/mcp.md),
|
|
300
|
-
[security model](docs/security.md), [demos](docs/demo.md), and
|
|
301
|
-
[OpenSpec comparison](docs/openspec-comparison.md).
|
|
68
|
+
## Documentation
|
|
302
69
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
```
|
|
70
|
+
[Architecture](docs/architecture.md) · [Demos](docs/demo.md) ·
|
|
71
|
+
[MCP](docs/mcp.md) · [Security](docs/security.md) ·
|
|
72
|
+
[Migration](docs/migration-v1.md)
|
|
307
73
|
|
|
308
|
-
|
|
309
|
-
and building the published JavaScript package.
|
|
74
|
+
## License
|
|
310
75
|
|
|
311
|
-
|
|
76
|
+
[MIT](LICENSE)
|