empirical-sdd 0.20.4 → 0.22.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/README.md CHANGED
@@ -1,74 +1,119 @@
1
1
  # Empirical SDD
2
2
 
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.
3
+ Agent-neutral, resumable spec-driven development with deterministic routing,
4
+ immutable evidence, safe cross-worktree integration, and six agent-native
5
+ skills. Empirical installs across 73 global agent targets and provides verified
6
+ guidance for Codex, Claude Code, Cursor, Gemini CLI, Windsurf, and MCP clients.
6
7
 
7
- > Empirical is alpha software. It supports one active feature per checkout and
8
- > uses Git worktrees for isolated parallel work.
8
+ > Empirical 0.22 is alpha software and intentionally introduces the breaking
9
+ > Schema 5 protocol. One checkout selects at most one active feature; linked Git
10
+ > worktrees isolate parallel work.
9
11
 
10
12
  ## Install
11
13
 
12
14
  | Command | Purpose |
13
15
  | --- | --- |
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. |
16
+ | `npm install -g empirical-sdd` | Install the CLI. Node.js 22 or newer is required. |
17
+ | `empirical install` | Choose coding agents and install all six skills. |
18
+ | `empirical update` | Upgrade Empirical and reconcile installed skills. |
19
+ | `empirical uninstall` | Remove managed global skills, owned selection metadata, then the global package. |
17
20
 
18
- Restart or reload each selected agent after installation.
21
+ The installer uses a pinned local catalog. It remembers exact target IDs,
22
+ deduplicates shared skill roots, and performs no runtime network fetch or `npx`
23
+ execution. Automation can use repeatable `--agent`/`-a`, `--all`, `--yes`, and
24
+ `--json` options.
19
25
 
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.
26
+ Uninstall is fail-closed: interactive use shows the exact scope and defaults to
27
+ cancel, while automation must use `empirical uninstall --yes` (optionally with
28
+ `--json`). It removes only marker-owned global artifacts. Project `.empirical`
29
+ history, evidence, and repository MCP/agent configuration are always preserved;
30
+ unmanaged or unsafe global paths are also preserved and reported.
26
31
 
27
- ## Use
32
+ ### Difference from the previous command surface
28
33
 
29
- These are coding-agent skills, not shell commands:
34
+ | Previous 0.21 behavior | Updated behavior |
35
+ | --- | --- |
36
+ | Public lifecycle exposed Install and Update only. | Public lifecycle also exposes `empirical uninstall`. |
37
+ | Removing six agent skills required manual per-agent cleanup. | One command scans every unique catalog root and removes only marker-owned skills. |
38
+ | Selection metadata had to be found manually. | Valid Empirical-owned metadata is removed; invalid or user-owned metadata is preserved. |
39
+ | Package removal was a separate manual npm command. | Confirmed uninstall runs exact `npm uninstall -g empirical-sdd` last. |
40
+ | Project preservation was implicit. | Help, confirmation, human output, and JSON explicitly report preserved project state. |
41
+
42
+ ## Skills
30
43
 
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` |
44
+ These are coding-agent skills, not public shell workflow commands.
38
45
 
39
46
  | Skill | Purpose |
40
47
  | --- | --- |
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.
48
+ | `empirical <request>` | Initialize, resume, route, and run in normal mode. |
49
+ | `empirical-init` | Initialize or repair repository context without starting work. |
50
+ | `empirical-spec <request>` | Draft a concrete Complex contract and stop for approval. |
51
+ | `empirical-socratic <idea>` | Run the durable five-pass interview, then draft the contract. |
52
+ | `empirical-loop` | Resume the selected feature from its exact current revision. |
53
+ | `empirical-yolo <request>` | Run autonomously to an explicit safe completion ceiling. |
54
+
55
+ Native invocation examples include `$empirical` in Codex, `/empirical` in
56
+ Claude Code, and `@empirical` in Windsurf. Reload an agent after installation.
57
+
58
+ ## Trust model
59
+
60
+ Requests are classified into deterministic risk floors: contract-neutral,
61
+ behavioral, sensitive, migration, integration, delivery, or publication. Fast
62
+ is available only to contract-neutral work. Every higher floor uses Complex;
63
+ wording a risky request as “quick” cannot demote it.
64
+
65
+ Normal mode asks only when a material product choice or permission is missing.
66
+ YOLO persists bounded standing authorization and asks only for genuine blockers
67
+ before its authorized ceiling. It never bypasses host permissions or branch
68
+ protection, force-writes Git, extracts credentials, deletes real worktrees or
69
+ branches, replaces immutable releases, or infers publication.
70
+
71
+ Fast is contract-neutral and ends at verified. Complex records an impact
72
+ manifest and proceeds through Specify, Design, Plan, Implement, Verify, Review,
73
+ and independent Integrate. An authorized delivery may continue through two
74
+ protected GitHub PRs. Publication is always a separate explicit operation bound
75
+ to an exact version, commit, tag, and dist-tag.
76
+
77
+ Evidence is not a caller-supplied boolean. Empirical either executes a Policy v2
78
+ command or collects a content-addressed artifact, then writes an immutable
79
+ receipt tied to criteria, source state, and provenance. Completion reports only
80
+ the highest proven level: implemented, verified, integrated, delivered, or
81
+ published.
82
+
83
+ ## Repository model
84
+
85
+ Schema 5 stores strict Policy v2 configuration, Manifest v2 knowledge
86
+ fingerprints, impact manifests, receipts, Git-common-dir capability claims, and
87
+ hash-chained per-feature journals. Terminal journals compact transactionally to
88
+ a verified snapshot boundary. `empirical_doctor` diagnoses schema, journal,
89
+ lock, claim, toolchain, policy, knowledge, evidence, worktree, and delivery
90
+ state without mutating the repository.
91
+
92
+ Schema 4 repositories migrate atomically on the first mutating 0.22 operation.
93
+ The migration validates a complete candidate tree before promotion and retains
94
+ a recovery receipt. Earlier schemas must first be upgraded to Schema 4 with the
95
+ version that created them.
58
96
 
59
97
  ## Development
60
98
 
61
- Requires Node.js 20+ and Bun.
99
+ Development requires Node.js 22+ and Bun. CI covers Node 22, 24, and 26.
62
100
 
63
101
  | Command | Purpose |
64
102
  | --- | --- |
65
- | `bun install` | Install development dependencies. |
66
- | `bun run ci` | Run type checking, tests, build smoke tests, and package tests. |
103
+ | `bun install` | Install dependencies. |
104
+ | `bun run check` | Type-check the source. |
105
+ | `bun run test` | Run the test suite. |
106
+ | `bun run test:coverage` | Enforce aggregate and per-module coverage gates. |
107
+ | `bun run test:dist` | Build and smoke-test the packaged CLI and MCP server. |
108
+ | `bun run test:package` | Install and import the generated npm package. |
109
+ | `bun run ci` | Run every required gate. |
110
+
111
+ The package exposes only `.`, `./protocol`, `./mcp`, and `./integrations`.
67
112
 
68
113
  ## Documentation
69
114
 
70
- [Architecture](docs/architecture.md) · [Demos](docs/demo.md) ·
71
- [MCP](docs/mcp.md) · [Security](docs/security.md) ·
115
+ [Protocol](docs/protocol.md) · [Architecture](docs/architecture.md) ·
116
+ [MCP](docs/mcp.md) · [Demo](docs/demo.md) · [Security](docs/security.md) ·
72
117
  [Migration](docs/migration-v1.md)
73
118
 
74
119
  ## License