empirical-sdd 0.33.0 → 0.34.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,75 @@ under the alpha rules in [docs/versioning.md](docs/versioning.md).
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.34.0] - 2026-09-14
12
+
13
+ ### Added
14
+
15
+ - Added opt-in iterative Complex development, same-feature adjustments and
16
+ explicit contract revisions, followed by user-requested consolidation and QA.
17
+ - Added approved `isolation.copyFiles` preparation for ignored local environment
18
+ files in new worktrees, with independent copies and interrupted-copy recovery.
19
+ - Added Plane Cloud and self-hosted Plane as first-class external tracker
20
+ providers, including project/state discovery, host-only Personal Access Token
21
+ authentication, work-item binding and reconciliation, state synchronization,
22
+ and idempotent milestone comments through current `work-items` endpoints.
23
+ - Added explicit repository activation as the default. Init offers individual
24
+ invocation or team-approved automatic routing, with safe opt-out that
25
+ preserves other instructions and workflow history.
26
+ - Added a read-only overview of preserved specs, worktree ownership and progress,
27
+ with individual diagnostics for malformed records.
28
+ - Added exact-revision Fast-to-Complex promotion and explicit transfer of an
29
+ unfinished spec between registered worktrees with matching history.
30
+ - Added a host-native sub-agent bridge for bounded consult, specification and
31
+ implementation assignments, with shared reservations, launch reconciliation
32
+ and confirmed cancellation. Writable workers use separate worktrees and specs.
33
+
34
+ ### Fixed
35
+
36
+ - Doctor accepts direct instruction aliases such as `AGENTS.md -> CLAUDE.md`
37
+ when the canonical target is a regular sibling file. Repair preserves the
38
+ symlink, validates the target content, and keeps it from becoming dangling
39
+ when automatic routing is disabled. Unsafe links remain rejected.
40
+
41
+ ### Changed
42
+
43
+ - Assisted Fast and Complex iteration runs tests on demand, scoped to the active
44
+ feature. Unrun verification stays pending, full CI is excluded from ordinary
45
+ feature-check candidates, and final promotion/release gates remain enforced.
46
+ - Treat absent legacy activation choices as explicit; refresh project skills
47
+ with `empirical-init` and restart the agent session after upgrading.
48
+ - Explicit Fast supports scoped ordinary behavioral and UI features without
49
+ mandatory tests, formal review or Context and reports implemented with
50
+ verification skipped. Explicit Complex and sensitive safety floors retain
51
+ their full workflow; historical completion records remain readable unchanged.
52
+ - Independent specs use narrower operation locks and addressed capability-claim
53
+ validation so unrelated delayed work or malformed claims do not block progress.
54
+ - Approved worktree creation starts from its committed base while preserving
55
+ uncommitted source edits, and remains retryable after interruption.
56
+ - Generated agent guidance explains native delegation, preserved specs,
57
+ ownership transfer and the distinct Fast and Complex completion guarantees.
58
+
59
+ ### Migration
60
+
61
+ - Update the package and installed global skills with `empirical update`, then
62
+ restart the coding agent/MCP host so the new Init skill and tools are loaded.
63
+ - Invoke `empirical-init` explicitly in each existing repository to refresh
64
+ managed instructions and local skills. A missing `activationMode` now means
65
+ explicit invocation. Choose **Automatically for this team** during repair only
66
+ when the affected team agrees; an existing saved choice is preserved.
67
+ - Reload or start a fresh affected agent session after repository repair to
68
+ discard cached routing instructions. In explicit mode invoke the local
69
+ `empirical` skill for chosen tasks; ordinary requests remain outside it.
70
+ - New Fast work finishes at implemented with verification skipped. Choose
71
+ Complex or explicitly promote the same feature when stronger assurance is
72
+ needed. Previously verified Fast history retains its recorded evidence.
73
+ - Existing tracker configurations remain unchanged. Choose Plane explicitly
74
+ during setup to adopt it; self-hosted Plane needs the exact API origin in the
75
+ host-controlled `EMPIRICAL_PLANE_ALLOWED_ORIGINS` allowlist before authentication.
76
+ - Schema 5, specifications, tracker bindings and evidence are retained. Do not
77
+ delete inactive specs or replace instruction symlinks to upgrade. Safe direct
78
+ aliases such as `AGENTS.md -> CLAUDE.md` are preserved during repair.
79
+
11
80
  ## [0.33.0] - 2026-09-09
12
81
 
13
82
  ### Added
@@ -474,7 +543,8 @@ Published through GitHub Actions trusted publishing with npm provenance.
474
543
 
475
544
  - Prepared and released package version `0.20.2`.
476
545
 
477
- [Unreleased]: https://github.com/goempirical/empirical-sdd/compare/v0.33.0...HEAD
546
+ [Unreleased]: https://github.com/goempirical/empirical-sdd/compare/v0.34.0...HEAD
547
+ [0.34.0]: https://github.com/goempirical/empirical-sdd/compare/v0.33.0...v0.34.0
478
548
  [0.33.0]: https://github.com/goempirical/empirical-sdd/compare/v0.32.0...v0.33.0
479
549
  [0.32.0]: https://github.com/goempirical/empirical-sdd/compare/v0.31.0...v0.32.0
480
550
  [0.31.0]: https://github.com/goempirical/empirical-sdd/compare/v0.30.0...v0.31.0
package/README.md CHANGED
@@ -6,7 +6,7 @@ Empirical is a repository-native harness for coding agents. The model writes;
6
6
  Empirical keeps the contract, progress, proof, and exact next action in Git so
7
7
  work can resume across sessions, agents, and machines.
8
8
 
9
- > Empirical 0.31 is alpha software and requires Node.js 22 or newer.
9
+ > Empirical is alpha software and requires Node.js 22 or newer.
10
10
 
11
11
  **[Open the practical harness guide](https://goempirical.github.io/empirical-sdd/)**
12
12
  for the visual walkthrough, diagrams, generated-file explorer, and complete
@@ -37,15 +37,28 @@ workflow. Its zero-build source is [docs/index.html](docs/index.html).
37
37
  Fresh-context review still uses an isolated reviewer, but does not count as
38
38
  an independent GitHub approval.
39
39
 
40
- 3. Ask for the change normally.
40
+ 3. Choose when to use Empirical.
41
+
42
+ Init recommends **Only when explicitly requested**. Use the local skill for
43
+ work you want to run through Empirical: `$empirical` in Codex or `/empirical`
44
+ in Claude Code. Ordinary coding requests stay outside the workflow.
45
+
46
+ Choose **Automatically for this team** only when the team agrees to shared
47
+ routing instructions. You can then ask for a change normally:
41
48
 
42
49
  ```text
43
50
  Add rate limiting to the public API and prove the failure path.
44
51
  ```
45
52
 
46
- Repository mutations route automatically. Read-only questions remain
47
- read-only. If work stops, reopen the same checkout and ask the agent to
48
- continue—the committed journal provides the resume point.
53
+ Empirical is optional. You can ask to work without it in either mode. Read-only
54
+ questions remain read-only. If Empirical work stops, invoke it again in the same
55
+ checkout to resume from the committed journal.
56
+
57
+ To change the choice later, ask your agent to configure Empirical activation.
58
+ Switching to explicit removes only Empirical's shared routing blocks and keeps
59
+ workflow history. Repair preserves saved choices. Older repositories without a
60
+ recorded choice become explicit on repair; start a fresh agent session afterward.
61
+ See [optional adoption](docs/optional-adoption.md) for mixed teams and migration.
49
62
 
50
63
  ## Why use it?
51
64
 
@@ -60,32 +73,69 @@ continue—the committed journal provides the resume point.
60
73
 
61
74
  ## How it works
62
75
 
63
- Empirical routes by risk, not prompt length:
76
+ Choose the amount of process for the work; Empirical retains the safety floor:
64
77
 
65
- - **Fast** handles explicit, tiny, localized, reversible, contract-neutral work
66
- with focused proof.
67
- - **Complex** carries material work through a durable contract, decisions,
68
- verification, exact-diff review, and independent integration.
78
+ - **Fast** handles explicitly requested small, scoped, reversible features and
79
+ fixes, including ordinary behavior and UI changes. It requires no tests,
80
+ formal review, or Context phase and finishes **implemented; verification
81
+ skipped**. Its spec and journal remain available.
82
+ - **Complex** carries work through a durable contract, decisions, verification,
83
+ exact-diff review, and independent integration. Explicit Complex is honored;
84
+ sensitive and higher-risk work always requires it.
85
+
86
+ Fast:
87
+
88
+ ```text
89
+ Implement → Done (implemented; verification skipped)
90
+ ```
91
+
92
+ Complex:
69
93
 
70
94
  ```text
71
95
  Specify → Design → Plan → Implement → Context? → Verify → Review → Integrate
72
96
  ```
73
97
 
74
- A feature that shows an interface gets its mockup at Specify, while the
75
- contract is still open, because seeing a screen reveals states and flows that
76
- prose misses and those belong in the criteria. `empirical mockups` serves the
98
+ A Complex feature that shows an interface gets its mockup at Specify when the
99
+ saved mockup preference is enabled. The contract is still open: seeing a screen
100
+ reveals states and flows that prose misses and those belong in the criteria.
101
+ `empirical mockups` serves the
77
102
  directions on a local address so a person can click through and choose one;
78
103
  Verify then checks what was built against what was approved.
79
104
 
80
- Context runs when repository knowledge needs refinement. Failed verification or
81
- requested review changes return to implementation. Evidence, review, and
105
+ Complex runs Context when repository knowledge needs refinement. Failed
106
+ verification or requested review changes return to implementation. Evidence, review, and
82
107
  integration are different claims, and Empirical reports only the highest level
83
108
  actually proven: `implemented`, `verified`, `integrated`, `delivered`, or
84
109
  `published`.
85
110
 
111
+ Fast trades verification confidence for less waiting and process. If a quick
112
+ feature needs the full workflow, promote that same spec to Complex; its history
113
+ and original identity are preserved. Historical completed Fast records retain
114
+ the evidence and completion level they originally earned.
115
+
86
116
  Delivery is never implied. Empirical does not infer permission to merge a pull
87
117
  request, bypass protection, create a release, or publish a package.
88
118
 
119
+ ## Run tests when you need them
120
+
121
+ Fast and Complex iteration do not automatically run tests after edits. Ask for a
122
+ run when ready:
123
+
124
+ - “Run tests for this feature” selects the smallest relevant configured checks.
125
+ - “Keep iterating; skip tests for now” leaves verification pending.
126
+ - “Run the full suite” explicitly requests broader verification.
127
+
128
+ One test request does not enable automatic reruns after subsequent changes.
129
+ If no focused command is configured, the agent reports the gap instead of
130
+ silently running the entire suite. Complex still requires real evidence before
131
+ claiming verified completion; Fast can finish implemented and unverified.
132
+ Explicit final verification or promotion requests include their required checks,
133
+ and CI/release gates remain enforced. An explicit no-tests request takes
134
+ precedence over execution and leaves any conflicting gate pending.
135
+
136
+ Existing repositories need their managed skills refreshed with `empirical-init`
137
+ and a restarted agent session after upgrading to receive this guidance.
138
+
89
139
  ## What it creates
90
140
 
91
141
  Init installs the harness; selected work fills in the record:
@@ -116,7 +166,7 @@ Exact host files depend on the integrations selected during install. Init
116
166
  creates durable setup and empty work containers; a real mutation creates a
117
167
  feature record, and conditional artifacts appear only when their phases run.
118
168
 
119
- Optional tracking mirrors approved milestones to Linear, GitHub, or Jira; the
169
+ Optional tracking mirrors approved milestones to Linear, GitHub, Jira, or Plane; the
120
170
  repository remains authoritative. Policy supports
121
171
  `enforcement: "best-effort" | "strict"`; strict recovery retries the exact
122
172
  feature. Credentials never belong in chat, prompts, repository files, tool
@@ -170,4 +220,30 @@ feature. Explicit new feature starts and repository setup/context repair are not
170
220
  blocked by unrelated unclaimed specs. If a feature-required operation needs a
171
221
  choice, it lists candidates rather than choosing or moving a spec. An approved
172
222
  worktree handoff can be retried with its original input after interruption.
223
+ Creating it from an approved committed base leaves uncommitted source edits in
224
+ their original checkout. Transferring an unfinished spec to another worktree
225
+ requires its exact source revision and matching destination history; it keeps
226
+ the original capability bases and receipts.
227
+
228
+ Ask your agent for the read-only overview to see specs, owners, branches,
229
+ profiles, progress and verification status together. Unrelated malformed records
230
+ appear as local diagnostics without selecting or deleting any spec. Independent
231
+ work uses separate locks; overlapping feature writers and integration targets
232
+ still serialize safely. Multiple worktrees cost disk space and setup, and
233
+ changes to shared capabilities can still conflict when they integrate.
173
234
  See [selection and recovery semantics](docs/protocol.md#shared-specs-and-checkout-selection).
235
+
236
+ ### Sub-agents for specs and implementation
237
+
238
+ Ask your agent to delegate bounded specification or implementation work. Empirical
239
+ discovers the host's actual native agent capabilities, reserves each assignment
240
+ before spawning, and tracks its identity through interruption or cancellation.
241
+ Writable children use separate registered worktrees and selected specs. Read-only
242
+ consults require a host that enforces read-only access.
243
+
244
+ Delegation can progress independent specs concurrently, at the cost of additional
245
+ agent usage, worktrees and integration work. Host support varies: installation
246
+ alone does not prove that spawning, lookup, observation and cancellation are
247
+ available. Worker completion never substitutes for workflow evidence. Fast workers
248
+ remain unverified; Complex workers still pass the full applicable gates.
249
+ See the [native delegation bridge](docs/mcp.md#native-sub-agent-delegation).
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ export declare const activationModeSchema: z.ZodEnum<{
3
+ automatic: "automatic";
4
+ explicit: "explicit";
5
+ }>;
6
+ export type ActivationMode = z.infer<typeof activationModeSchema>;
7
+ /** Absence is not consent to automatically route a team's work. */
8
+ export declare function resolveActivationMode(value: unknown): ActivationMode;
@@ -1,5 +1,9 @@
1
- /** Serialize checkout ownership across every worktree sharing Git metadata. */
1
+ /** Long operations serialize only their own checkout. */
2
2
  export declare function withCheckoutLock<T>(root: string, operation: () => Promise<T>): Promise<T>;
3
+ /** A shared feature lock prevents a writer from racing ownership transfer. */
4
+ export declare function withFeatureLock<T>(root: string, feature: string, operation: () => Promise<T>, options?: {
5
+ allowPendingTransfer?: boolean;
6
+ }): Promise<T>;
3
7
  export interface CheckoutSelection {
4
8
  feature: string | null;
5
9
  linked: boolean;
@@ -8,6 +12,8 @@ export interface CheckoutSelection {
8
12
  }
9
13
  export declare function readCheckoutSelection(rootInput: string): Promise<CheckoutSelection>;
10
14
  export declare function writeCheckoutSelection(rootInput: string, feature: string | null, expectedFeature?: string): Promise<void>;
15
+ /** Transfer releases an unfinished owner without creating terminal obligations. */
16
+ export declare function moveCheckoutSelection(sourceRoot: string, targetRoot: string, feature: string): Promise<void>;
11
17
  /** Read only this checkout's recovery anchor, never sibling selections. */
12
18
  export declare function readCheckoutLastFeature(rootInput: string): Promise<{
13
19
  git: boolean;