empirical-sdd 0.20.0 → 0.20.2
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 +197 -252
- package/dist/agents.d.ts +27 -0
- package/dist/checkouts.d.ts +8 -0
- package/dist/cli.js +2044 -871
- package/dist/core.d.ts +6 -1
- package/dist/discovery.d.ts +26 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1611 -551
- package/dist/integrations.d.ts +32 -2
- package/dist/knowledge.d.ts +5 -0
- package/dist/lifecycle.d.ts +10 -0
- package/dist/selector.d.ts +18 -0
- package/dist/types.d.ts +61 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,315 +1,261 @@
|
|
|
1
1
|
# Empirical SDD
|
|
2
2
|
|
|
3
|
-
Empirical is
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
review, living capability
|
|
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 a durable contract, exact workflow revisions, verification evidence,
|
|
6
|
+
review, and living capability specifications.
|
|
7
7
|
|
|
8
|
-
Empirical `0.20.
|
|
9
|
-
|
|
8
|
+
Empirical `0.20.2` is an alpha release. It supports one active feature per
|
|
9
|
+
checkout and uses real Git worktrees for isolated parallel work.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
npm install -g empirical-sdd
|
|
15
|
-
|
|
16
|
-
empirical init
|
|
15
|
+
empirical install
|
|
17
16
|
```
|
|
18
17
|
|
|
19
|
-
|
|
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.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
- the detected or edited default Git base;
|
|
23
|
-
- the sibling path template, defaulting to `../{repo}-{feature}`;
|
|
24
|
-
- the branch pattern, defaulting to `{type}/{feature}`;
|
|
25
|
-
- whether Complex features require evidence-backed decision records.
|
|
22
|
+
Every selected agent receives five global skills:
|
|
26
23
|
|
|
27
|
-
|
|
24
|
+
| Intent | Skill |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| Automatic setup, routing, and execution | `empirical` |
|
|
27
|
+
| Initialize or repair this repository only | `empirical-init` |
|
|
28
|
+
| Draft a concrete specification and stop | `empirical-spec` |
|
|
29
|
+
| Run the five-pass interview, draft, and stop | `empirical-socratic` |
|
|
30
|
+
| Resume the approved specification to completion | `empirical-loop` |
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
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.
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
For unattended installation:
|
|
34
38
|
|
|
35
39
|
```bash
|
|
36
|
-
|
|
37
|
-
empirical
|
|
38
|
-
--worktree-path '../{repo}-{feature}' \
|
|
39
|
-
--branch-pattern '{type}/{feature}' \
|
|
40
|
-
--decisions required
|
|
41
|
-
```
|
|
40
|
+
# Exact selection; repeat -a/--agent
|
|
41
|
+
empirical install --agent codex --agent cursor
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
# Every supported agent
|
|
44
|
+
empirical install --all
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
the exact revision, and consumes the next action until Done.
|
|
48
|
-
|
|
49
|
-
```text
|
|
50
|
-
vague idea ──> five Socratic passes ──> approved refined contract
|
|
51
|
-
│
|
|
52
|
-
concrete request ─────────────────────────────┤
|
|
53
|
-
▼
|
|
54
|
-
Fast or Complex exact workflow
|
|
55
|
-
│
|
|
56
|
-
another feature already active?
|
|
57
|
-
│ no │ yes
|
|
58
|
-
▼ ▼
|
|
59
|
-
work here preview Git worktree
|
|
60
|
-
│
|
|
61
|
-
explicit approval
|
|
62
|
-
│
|
|
63
|
-
▼
|
|
64
|
-
create, start, show resume
|
|
46
|
+
# Detected agents plus existing managed installations
|
|
47
|
+
empirical install --yes
|
|
65
48
|
```
|
|
66
49
|
|
|
67
|
-
|
|
68
|
-
Everything else—including UI, architecture, public APIs, security, migrations,
|
|
69
|
-
and cross-cutting changes—uses Complex.
|
|
50
|
+
Restart or reload the selected agent after installation. Native invocations are:
|
|
70
51
|
|
|
71
|
-
|
|
52
|
+
| Agent | Automatic | Init | Spec | Socratic | Loop |
|
|
53
|
+
| --- | --- | --- | --- | --- | --- |
|
|
54
|
+
| Codex | `$empirical` | `$empirical-init` | `$empirical-spec` | `$empirical-socratic` | `$empirical-loop` |
|
|
55
|
+
| Claude Code | `/empirical` | `/empirical-init` | `/empirical-spec` | `/empirical-socratic` | `/empirical-loop` |
|
|
56
|
+
| Cursor Agent | `empirical` | `empirical-init` | `empirical-spec` | `empirical-socratic` | `empirical-loop` |
|
|
57
|
+
| Gemini CLI | `empirical` | `empirical-init` | `empirical-spec` | `empirical-socratic` | `empirical-loop` |
|
|
58
|
+
| Windsurf Cascade | `@empirical` | `@empirical-init` | `@empirical-spec` | `@empirical-socratic` | `@empirical-loop` |
|
|
72
59
|
|
|
73
|
-
|
|
60
|
+
To upgrade the package and refresh every selected skill:
|
|
74
61
|
|
|
75
62
|
```bash
|
|
76
|
-
empirical
|
|
63
|
+
empirical update
|
|
77
64
|
```
|
|
78
65
|
|
|
79
|
-
|
|
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.
|
|
80
70
|
|
|
81
|
-
|
|
82
|
-
2. smallest observable outcome;
|
|
83
|
-
3. boundaries, constraints, and explicit non-goals;
|
|
84
|
-
4. failures and solution-changing risks;
|
|
85
|
-
5. concrete verification.
|
|
71
|
+
## Choose automatic or deliberate mode
|
|
86
72
|
|
|
87
|
-
|
|
88
|
-
|
|
73
|
+
Both modes use the same state machine, artifacts, evidence gates, and safety
|
|
74
|
+
rules.
|
|
89
75
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
+
┘
|
|
95
86
|
```
|
|
96
87
|
|
|
97
|
-
|
|
98
|
-
skills
|
|
99
|
-
|
|
100
|
-
|
|
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.
|
|
101
92
|
|
|
102
|
-
|
|
93
|
+
## Initialize a repository
|
|
103
94
|
|
|
104
|
-
|
|
105
|
-
empirical fast "Add a health command that prints ok"
|
|
106
|
-
```
|
|
95
|
+
Inside the repository, invoke the Init skill in your coding agent. For Codex:
|
|
107
96
|
|
|
108
|
-
|
|
97
|
+
> `$empirical-init`
|
|
109
98
|
|
|
110
|
-
|
|
111
|
-
Empirical
|
|
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:
|
|
112
102
|
|
|
113
|
-
|
|
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.
|
|
114
106
|
|
|
115
|
-
|
|
116
|
-
|
|
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.
|
|
117
110
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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.
|
|
123
117
|
|
|
124
|
-
|
|
118
|
+
Initialization creates:
|
|
125
119
|
|
|
126
120
|
```text
|
|
127
|
-
.empirical/
|
|
128
|
-
├──
|
|
129
|
-
├──
|
|
130
|
-
├──
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
## Complex feature demo
|
|
135
|
-
|
|
136
|
-
Request:
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
empirical complex "Add team invitations with expiration and revocation"
|
|
121
|
+
.empirical/context/
|
|
122
|
+
├── manifest.json
|
|
123
|
+
├── index.md
|
|
124
|
+
├── overview.md
|
|
125
|
+
├── architecture.md
|
|
126
|
+
├── commands.md
|
|
127
|
+
└── conventions.md
|
|
140
128
|
```
|
|
141
129
|
|
|
142
|
-
The
|
|
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.
|
|
143
134
|
|
|
144
|
-
|
|
145
|
-
2. Design: architecture plus accepted decisions.
|
|
146
|
-
3. Plan: executable implementation sequence.
|
|
147
|
-
4. Implement: code and focused checks.
|
|
148
|
-
5. Verify: criterion-by-criterion evidence; real browser and screenshot for UI.
|
|
149
|
-
6. Review: diff, criteria, and accepted-decision alignment.
|
|
150
|
-
7. Archive: apply reviewed deltas to living capability specifications.
|
|
135
|
+
## Explicit Spec: a small concrete feature
|
|
151
136
|
|
|
152
|
-
|
|
137
|
+
In Codex:
|
|
153
138
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
# edit design.md and decisions.md
|
|
157
|
-
empirical complete --revision 2 --outcome passed --summary "Designed invitation ownership"
|
|
158
|
-
# continue with the exact commands returned by Empirical
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
A material decision is concise and reviewable:
|
|
139
|
+
> `$empirical-spec` Add a keyboard shortcut that opens the existing command
|
|
140
|
+
> palette with Cmd/Ctrl+K. Do not change the palette design.
|
|
162
141
|
|
|
163
|
-
|
|
164
|
-
|
|
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.
|
|
165
147
|
|
|
166
|
-
|
|
148
|
+
Review the files under `.empirical/specs/<feature>/`. When the contract is right:
|
|
167
149
|
|
|
168
|
-
|
|
169
|
-
- Existing invitation writes already pass through the domain service.
|
|
150
|
+
> `$empirical-loop`
|
|
170
151
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
2. Expire in the domain service.
|
|
152
|
+
That invocation is explicit approval to complete Specify and continue through
|
|
153
|
+
Design, Plan, Implement, Verify, Review, and Archive.
|
|
174
154
|
|
|
175
|
-
|
|
176
|
-
Use the domain service so API and background jobs share one rule.
|
|
155
|
+
## Explicit Socratic: a complex or vague feature
|
|
177
156
|
|
|
178
|
-
|
|
179
|
-
The service gains time semantics; inject a clock for deterministic tests.
|
|
157
|
+
In Codex:
|
|
180
158
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
This is a visible decision trail, not persisted private chain-of-thought. Raw
|
|
186
|
-
prompts, scratchpads, tokens, credentials, and secrets do not belong there.
|
|
159
|
+
> `$empirical-socratic` Build a team notification center that works well across
|
|
160
|
+
> desktop and mobile.
|
|
187
161
|
|
|
188
|
-
|
|
162
|
+
Socratic asks one question at a time across the original five passes:
|
|
189
163
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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.
|
|
194
169
|
|
|
195
|
-
|
|
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.
|
|
196
175
|
|
|
197
|
-
|
|
198
|
-
- why the state machine selected the next action;
|
|
199
|
-
- required and missing context;
|
|
200
|
-
- whether the gate says proceed or stop;
|
|
201
|
-
- accepted decision summaries.
|
|
176
|
+
After reviewing the draft:
|
|
202
177
|
|
|
203
|
-
|
|
178
|
+
> `$empirical-loop`
|
|
204
179
|
|
|
205
|
-
##
|
|
180
|
+
## Automatic demos
|
|
206
181
|
|
|
207
|
-
|
|
208
|
-
overwriting state:
|
|
182
|
+
For a tiny, localized, reversible, low-risk, non-UI change:
|
|
209
183
|
|
|
210
|
-
|
|
211
|
-
Empirical needs an isolated Git worktree (approval required)
|
|
212
|
-
Active feature: add-team-invitations
|
|
213
|
-
New request: Fix password reset expiry
|
|
214
|
-
Workflow/type: complex/fix
|
|
215
|
-
Base: main
|
|
216
|
-
Base commit: <approved-base-commit>
|
|
217
|
-
Branch: fix/fix-password-reset-expiry
|
|
218
|
-
Path: /projects/my-app-fix-password-reset-expiry
|
|
219
|
-
Command: git worktree add -b fix/fix-password-reset-expiry ... <approved-base-commit>
|
|
220
|
-
No mutation has occurred.
|
|
221
|
-
```
|
|
184
|
+
> `$empirical` Add a health command that prints `ok`.
|
|
222
185
|
|
|
223
|
-
|
|
186
|
+
Empirical routes internally to Fast, implements the criterion, runs focused
|
|
187
|
+
tests, reviews the diff, and completes the exact revision.
|
|
224
188
|
|
|
225
|
-
|
|
226
|
-
2. resolves the selected base;
|
|
227
|
-
3. rejects existing branches, paths, and registered checkout collisions;
|
|
228
|
-
4. runs `git worktree add -b <branch> <path> <approved-base-commit>` without
|
|
229
|
-
`--force`, so the approved base cannot move before creation;
|
|
230
|
-
5. initializes or migrates the new checkout;
|
|
231
|
-
6. starts the exact request there;
|
|
232
|
-
7. returns path, branch, base, feature, revision, and resume command.
|
|
189
|
+
For a substantial feature:
|
|
233
190
|
|
|
234
|
-
|
|
191
|
+
> `$empirical` Add team invitations with expiration, revocation, and audit
|
|
192
|
+
> history. Existing members must keep access during rollout.
|
|
235
193
|
|
|
236
|
-
|
|
237
|
-
empirical worktree create "Fix password reset expiry" \
|
|
238
|
-
--workflow complex --type fix
|
|
239
|
-
```
|
|
194
|
+
Empirical routes to Complex and drives seven gates:
|
|
240
195
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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.
|
|
244
203
|
|
|
245
|
-
|
|
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.
|
|
246
207
|
|
|
247
|
-
|
|
208
|
+
## Resume safely with Loop
|
|
248
209
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
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.
|
|
252
213
|
|
|
253
|
-
|
|
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.
|
|
254
218
|
|
|
255
|
-
|
|
256
|
-
empirical integrate --global
|
|
257
|
-
```
|
|
219
|
+
## Worktrees and agent handoff
|
|
258
220
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
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.
|
|
263
226
|
|
|
264
|
-
|
|
265
|
-
passes, show a worktree proposal, wait for approval, execute creation, maintain
|
|
266
|
-
Complex decisions, and consume exact revisions. It never starts another agent.
|
|
227
|
+
After a Complex specification passes, Automatic or Loop offers:
|
|
267
228
|
|
|
268
|
-
|
|
229
|
+
- Continue here.
|
|
230
|
+
- Save for later.
|
|
231
|
+
- Continue in a detected agent.
|
|
269
232
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
empirical adopt
|
|
274
|
-
empirical explore "<problem>" [--interactive] [--agent codex|none]
|
|
275
|
-
empirical fast "<request>"
|
|
276
|
-
empirical complex "<request>"
|
|
277
|
-
empirical worktree create "<request>" [--workflow fast|complex]
|
|
278
|
-
empirical loop
|
|
279
|
-
empirical explain
|
|
280
|
-
empirical status
|
|
281
|
-
empirical complete --revision N --outcome <outcome> --summary "..."
|
|
282
|
-
empirical verify
|
|
283
|
-
empirical retry --revision N
|
|
284
|
-
empirical archive --revision N
|
|
285
|
-
empirical capabilities [name]
|
|
286
|
-
empirical policy
|
|
287
|
-
empirical integrate [--global]
|
|
288
|
-
empirical doctor
|
|
289
|
-
empirical migrate
|
|
290
|
-
empirical mcp
|
|
291
|
-
empirical update [--check]
|
|
292
|
-
```
|
|
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.
|
|
293
236
|
|
|
294
|
-
|
|
295
|
-
|
|
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.
|
|
296
240
|
|
|
297
|
-
##
|
|
241
|
+
## Internal automation API
|
|
298
242
|
|
|
299
|
-
The
|
|
243
|
+
The TypeScript API and MCP server expose the primitives used by installed
|
|
244
|
+
skills. They are not additional public terminal commands.
|
|
300
245
|
|
|
301
|
-
-
|
|
302
|
-
`
|
|
303
|
-
-
|
|
304
|
-
`
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
-
|
|
308
|
-
|
|
309
|
-
|
|
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`.
|
|
310
256
|
|
|
311
|
-
|
|
312
|
-
|
|
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.
|
|
313
259
|
|
|
314
260
|
## Committed layout
|
|
315
261
|
|
|
@@ -317,6 +263,7 @@ and Explain tools are annotated read-only.
|
|
|
317
263
|
.empirical/
|
|
318
264
|
├── config.json
|
|
319
265
|
├── policy.json
|
|
266
|
+
├── context/
|
|
320
267
|
├── capabilities/<capability>/spec.md
|
|
321
268
|
├── discoveries/<discovery>/
|
|
322
269
|
│ ├── interview.json
|
|
@@ -333,34 +280,32 @@ and Explain tools are annotated read-only.
|
|
|
333
280
|
└── evidence.json
|
|
334
281
|
```
|
|
335
282
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
283
|
+
Specifications, decisions, journals, context, capabilities, configuration, and
|
|
284
|
+
policy are durable, reviewable state. Decision records contain evidence,
|
|
285
|
+
options, the chosen approach, trade-offs, risks, and verification—not private
|
|
286
|
+
chain-of-thought, prompts, tokens, credentials, or scratchpads.
|
|
340
287
|
|
|
341
|
-
|
|
342
|
-
the matching feature directory. Terminal root state does not reserve the
|
|
343
|
-
checkout. Historical named parallel-state data is deliberately unsupported and
|
|
344
|
-
is not merged; inspect it with the older package before upgrading if needed.
|
|
288
|
+
## Migration and development
|
|
345
289
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
290
|
+
Running `empirical install` again migrates global integrations. Repository Init
|
|
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.
|
|
349
294
|
|
|
350
|
-
|
|
351
|
-
|
|
295
|
+
Schema-1 through schema-3 root state migrates idempotently into feature-local
|
|
296
|
+
state. Empirical v1 `ai/` adoption remains available through agent automation.
|
|
352
297
|
|
|
353
|
-
|
|
298
|
+
See [migration details](docs/migration-v1.md), the
|
|
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).
|
|
354
302
|
|
|
355
303
|
```bash
|
|
356
304
|
bun install
|
|
357
|
-
bun run
|
|
358
|
-
bun test
|
|
359
|
-
bun run test:dist
|
|
360
|
-
npm pack --dry-run
|
|
305
|
+
bun run ci
|
|
361
306
|
```
|
|
362
307
|
|
|
363
|
-
Empirical targets Node.js 20+ at runtime. Bun is used
|
|
364
|
-
|
|
308
|
+
Empirical targets Node.js 20+ at runtime. Bun is used for development, tests,
|
|
309
|
+
and building the published JavaScript package.
|
|
365
310
|
|
|
366
311
|
License: MIT.
|
package/dist/agents.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AgentHandoffOption, AgentIntegrationId, AgentLaunchCapability, DetectedAgent } from "./types.js";
|
|
2
|
+
export interface SupportedAgentDefinition {
|
|
3
|
+
id: AgentIntegrationId;
|
|
4
|
+
agent: string;
|
|
5
|
+
executables: string[];
|
|
6
|
+
skillSegments: string[];
|
|
7
|
+
invocation: string;
|
|
8
|
+
reload: string;
|
|
9
|
+
capability: AgentLaunchCapability;
|
|
10
|
+
}
|
|
11
|
+
export declare const SUPPORTED_AGENTS: SupportedAgentDefinition[];
|
|
12
|
+
export interface AgentDetectionOptions {
|
|
13
|
+
homeRoot?: string;
|
|
14
|
+
pathValue?: string;
|
|
15
|
+
includeAll?: boolean;
|
|
16
|
+
includeConfigured?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function detectSupportedAgents(options?: AgentDetectionOptions): Promise<DetectedAgent[]>;
|
|
19
|
+
export declare function agentDefinition(id: AgentIntegrationId): SupportedAgentDefinition;
|
|
20
|
+
export declare function buildHandoffOption(input: {
|
|
21
|
+
root: string;
|
|
22
|
+
feature: string;
|
|
23
|
+
specification: string;
|
|
24
|
+
specDigest: string;
|
|
25
|
+
agent: DetectedAgent;
|
|
26
|
+
}): AgentHandoffOption;
|
|
27
|
+
export declare function handoffToken(value: unknown): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CheckoutSelection {
|
|
2
|
+
feature: string | null;
|
|
3
|
+
linked: boolean;
|
|
4
|
+
selectionPath: string | null;
|
|
5
|
+
claimedElsewhere: Set<string>;
|
|
6
|
+
}
|
|
7
|
+
export declare function readCheckoutSelection(rootInput: string): Promise<CheckoutSelection>;
|
|
8
|
+
export declare function writeCheckoutSelection(rootInput: string, feature: string | null): Promise<void>;
|