specpi 0.15.0 → 0.17.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
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.0 - 2026-09-06
4
+
5
+ - Let delegation workers correct ordinary source-tool arguments and malformed/truncated reports in the same child session, preserving previously read passages and spending the original budgets. Keep source changes, revocations, unavailable tools, and exhausted budgets terminal. Remove the delegation-specific 8,192-token cap in favor of Pi's provider/model settings; scale SDK response acceptance with `/delegate budget` (1 MiB by default).
6
+ - Replace generic delegation worker failures with safe diagnostics for source tools, provider requests, stream/context/response limits, output-token truncation, and final JSON/schema/evidence validation. Preserve the original tool failure through SDK cancellation, disclose report constraints in the worker prompt, and cover low-usage failures with controller and native Pi regressions.
7
+ - Raise default delegation budgets to 96 source calls/512 KiB and 32 model turns per job, with 32 batches/256 model turns per Pi process. Add human-only, persisted `/delegate budget <multiplier>` (1–64, default 8), scaling counts and context together while preserving spent usage, deadlines, and concurrency. Keep handoff and response sizes independently bounded.
8
+ - Count only delivered source JSON, report the specific exhausted allowance, and reject spent-budget follow-ups before starting a child. Tell workers their remaining allowance and verify substantial reading plus passage-preserving follow-up with offline regressions.
9
+ - Preserve safe delegation snapshot rejection reasons and identify the selected-source position so failed reviews are diagnosable in SpecPi Chat and terminal Pi. Redact raw filesystem errors and verify that rejected snapshots start no worker or inference.
10
+ - Replace delegation's private-topic keyword filter with known private namespaces and credential-store formats. Allow ordinary authentication, credential, session, and history source files/directories in all supported text formats, including `src/lib/security/credential-url.ts` and `credentials.ts`. Protect configured Pi storage and its canonical aliases; retain selected-file scope, containment, link, text, size, and freshness checks.
11
+
12
+ ## 0.16.0 - 2026-09-05
13
+
14
+ - Enable experimental read-only delegation by default at the first session start of each Pi process, including TUI, RPC, print and JSON modes. Startup preflights the host without launching workers or model inference; selective review/scout admission, Guard checks, source restrictions and resource ceilings remain unchanged.
15
+ - Keep `/delegate off` and safety revocations effective through reloads and session switches. `/delegate on` explicitly re-enables dispatch; restarting Pi reapplies the on default. Invalid settings, unsupported providers and locked, unready or ambiguous Guard policies still block activation.
16
+ - Update delegation guidance and release references, and add startup/default-on regression coverage alongside real-Pi lifecycle checks. Restart Pi after updating SpecPi to load the changed delegation runtime.
17
+
3
18
  ## 0.15.0 - 2026-09-05
4
19
 
5
20
  - Add **SpecPi Chat 0.3.1**, a separately packaged VS Code sidebar with streamed Pi replies, safe Markdown, expanded thinking and collapsed tool output by default, model/thinking controls, exact approvals, and a compact composer. It reuses the user's Pi configuration without managing credentials or installing the harness.
package/README.md CHANGED
@@ -5,237 +5,65 @@
5
5
  <h1 align="center">SpecPi</h1>
6
6
 
7
7
  <p align="center">
8
- A local, human-directed improvement harness for the
9
- <a href="https://pi.dev/">Pi coding agent</a>.
8
+ A small toolkit for the <a href="https://pi.dev/">Pi coding agent</a>.
10
9
  </p>
11
10
 
12
11
  <p align="center">
13
- <a href="#install"><strong>Install</strong></a>
14
- · <a href="#included-capabilities">Capabilities</a>
15
- · <a href="#improvement-loop">Improvement loop</a>
12
+ <a href="#install">Install</a>
16
13
  · <a href="https://tannermidd.github.io/SpecPi/">Website</a>
17
- · <a href="https://tannermidd.github.io/SpecPi/wiki/">Wiki</a>
18
- · <a href="SECURITY.md">Security</a>
14
+ · <a href="https://tannermidd.github.io/SpecPi/wiki/">Documentation</a>
19
15
  </p>
20
16
 
21
- ## Purpose
17
+ SpecPi extends Pi with chat, review tools, and focused delegation. Its principles are simple: you choose the improvements, changes stay small and reversible, improvement records stay local, and checks matter more than an agent's claims.
22
18
 
23
- SpecPi adds task contracts, workflow controls, and a local improvement loop to Pi. It records recurring capability gaps and presents qualified items for human review. Selecting one exact item with `/harness-improvement` authorizes a bounded change; repository checks and capability-specific validators must pass before it can retire.
24
-
25
- Collection is disabled until explicitly enabled. Reports are sanitized, bounded, deduplicated by task, and never uploaded. Later evidence can reopen an item for review, but never restarts implementation automatically.
26
-
27
- Version `0.15.0` adds the separately packaged SpecPi Chat sidebar and RPC-compatible Guard startup and report dialogs. The terminal harness, optional read-only delegation, browser checks, and human-selected improvement workflow remain available. See the [release notes](CHANGELOG.md) for the change list.
28
-
29
- ## SpecPi Chat for VS Code
30
-
31
- The `vscode/` source contains **SpecPi Chat 0.3.1**, a separately packaged native sidebar with streamed replies, tool results, file and image attachments, model/thinking controls, Pi approvals, and searchable workspace conversation history. Rename or archive chats, switch between independent live conversations, branch or edit an earlier prompt, search and export visible messages, inspect usage, and review changes through VS Code's native diff tools. Switching chats preserves background work, approvals, drafts, and attachments. Connected conversations share workspace files; use separate worktrees for isolated writers. Opening the sidebar does not start Pi.
19
+ <details>
20
+ <summary>Watch the showcase · 51 seconds</summary>
32
21
 
33
- From a repository checkout, build a local VSIX with `npm --prefix vscode run package`, then install `.specpi-test/vscode/specpi-chat-0.3.1.vsix` through **Extensions: Install from VSIX…**. See the [extension guide](https://github.com/TannerMidd/SpecPi/blob/main/vscode/README.md) for prerequisites, image/provider limits, commands, privacy, and testing. Pi owns provider authentication and tool execution. Stop and Disconnect affect the selected conversation only; branching does not undo code changes. The extension is separate from the SpecPi npm package and has not been published to a marketplace.
22
+ <p>
23
+ <a href="https://tannermidd.github.io/SpecPi/#showcase">
24
+ <img src="https://tannermidd.github.io/SpecPi/media/showcase-poster.jpg" width="560" alt="Play the SpecPi showcase">
25
+ </a>
26
+ </p>
34
27
 
35
- ## Optional delegation
28
+ </details>
36
29
 
37
- One agent owns edits and verifies results. Experimental delegation adds up to two read-only Pi workers: `review` checks a frozen artifact; `scout` answers a focused question using selected sources. Workers cannot write, run shell commands, browse the web, or delegate further.
30
+ ## What it adds
38
31
 
39
- Delegation is **off by default**. In Pi, use `/delegate on` to enable it, `/delegate status` to inspect work, and `/delegate off` to revoke it. Research informed the design; SpecPi quality, speed, and cost gains remain unmeasured.
32
+ - **Focused delegation.** One agent makes changes. Up to two read-only subagents help investigate and review. [Research and design](https://tannermidd.github.io/SpecPi/single-agent/)
33
+ - **Review as you work.** Track changed files, inspect diffs, check pages in a browser, and review risky commands.
34
+ - **Improvements you choose.** Record recurring problems, select one with `/harness-improvement`, and test the change before calling it done.
40
35
 
41
- See [setup and limits](docs/delegation/README.md) or [how the research shaped the architecture](https://tannermidd.github.io/SpecPi/single-agent/).
36
+ Problem collection is off by default. Its records stay on your machine. Pi connects to your chosen model provider.
42
37
 
43
38
  ## Install
44
39
 
45
- Requires **Node.js 22.19+**, **npm**, **Git**, and **Pi 0.84.4+**. If Pi is absent, the confirmed install adds the reviewed pinned package.
40
+ Requires **Node.js 22.19+**, **npm**, and **Git**. SpecPi needs **Pi 0.84.4+**; the installer can add it if missing.
46
41
 
47
- Install the CLI, inspect its non-mutating plan, and confirm the managed installation:
48
-
49
- ```bash
42
+ ```sh
50
43
  npm install --global specpi@latest
51
44
  specpi plan
52
45
  specpi install
53
46
  specpi doctor
54
47
  ```
55
48
 
56
- `plan` does not mutate the system. Install, update, and uninstall require confirmation unless `--yes` is supplied. Restart Pi after installation or updating SpecPi to load the delegation runtime.
57
-
58
- <details>
59
- <summary><strong>Pin a release or install from audited source</strong></summary>
60
-
61
- Pin the reusable CLI when installing a reviewed release, or inspect its plan without retaining a global CLI installation:
62
-
63
- ```bash
64
- npm install --global specpi@0.15.0
65
- npx --package specpi@0.15.0 specpi plan
66
- ```
67
-
68
- For a source-audited installation, clone the exact release:
69
-
70
- ```bash
71
- git clone --branch v0.15.0 --depth 1 https://github.com/TannerMidd/SpecPi.git
72
- cd SpecPi
73
- ./specpi plan
74
- ./specpi install
75
- ./specpi doctor
76
- ```
77
-
78
- On Windows source checkouts, use `.\specpi.cmd` in place of `./specpi`. The npm installation provides the `specpi` command on every supported platform.
79
-
80
- </details>
81
-
82
- <details>
83
- <summary><strong>Update or uninstall</strong></summary>
84
-
85
- Update the npm CLI and its managed installation as two explicit steps:
86
-
87
- ```bash
88
- npm install --global specpi@latest
89
- specpi update
90
- specpi doctor
91
- ```
92
-
93
- Uninstall managed SpecPi resources before removing the CLI. Private wishlist, journal, experiment, and patch state remains local unless explicitly removed:
94
-
95
- ```bash
96
- specpi uninstall
97
- npm uninstall --global specpi
98
- ```
99
-
100
- </details>
101
-
102
- Direct `pi install npm:specpi` loads extensions, skills, and themes only. It does not run the full installer or provide managed instructions, browser runtime dependencies, supporting Pi packages, optional tools, shell integration, backups, or ownership records.
103
-
104
- ## Included capabilities
105
-
106
- ### Define and review work
107
-
108
- | Interface | Purpose |
109
- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
110
- | `/task` | Record the objective, fixed requirements, acceptance checks, expected paths, hypothesis, rollback, and non-goals on the current session branch. |
111
- | `/scope` | Declare expected paths and report unacknowledged drift. |
112
- | `/files` | Browse source, rendered Markdown, Git diffs, and bounded review comments. |
113
- | `/experiment` | Create detached worktrees with keep, binary patch export, and confirmed discard outcomes. |
114
- | `/challenge` | Review readiness through structured evidence, gaps, contradictions, and residual risk. |
115
-
116
- ### Improve from evidence
117
-
118
- | Interface | Purpose |
119
- | ---------------------- | ------------------------------------------------------------------------------------ |
120
- | `/wishlist` | Store and curate privacy-minimized local capability-gap reports. |
121
- | `/harness-improvement` | Select one qualified or review-needed item and authorize its bounded implementation. |
122
-
123
- ### Work inside Pi
49
+ Preview the changes, confirm the install, then check the setup. Restart Pi when finished.
124
50
 
125
- | Interface | Purpose |
126
- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
127
- | `/spec` | Replace normal chrome with a technical run panel, seal live reasoning, hold streaming prose until complete, and keep tools collapsed. |
128
- | `/guard` | Deny confirmed host-wide destructive calls and request approval for bounded risk classes. |
129
- | Browser tools | Inspect isolated Chromium, diagnose errors, exercise keyboard/select/wait flows, and capture screenshots. |
130
- | `specpi-spec` theme | Bring blueprint blue, technical greys, layered surfaces, and restrained semantic states into Pi. |
131
- | `specpi` CLI | Plan, install, update, verify, and uninstall managed state with backups and rollback. |
51
+ To pin this release, use `npm install --global specpi@0.17.0`.
132
52
 
133
- `specpi-spec` is the default Pi theme, carrying the site's specification design through message surfaces, tools, Markdown, diffs, syntax highlighting, search, and the full thinking-level scale. **Existing valid theme preferences survive installation and updates.** The original `tea-house` theme remains bundled and selectable from `/settings`.
53
+ Delegation is enabled at startup. Use `/delegate off` to turn it off.
134
54
 
135
- Capability registry entries include closed offline validators. Completion, `npm run check`, and `specpi doctor` run those validators.
55
+ [Setup, updates & removal](https://tannermidd.github.io/SpecPi/wiki/#getting-started) · [Delegation settings](docs/delegation/README.md)
136
56
 
137
- ## How SpecPi fits
138
-
139
- SpecPi runs inside Pi through extensions, skills, settings, and themes. Pi supplies the agent runtime, tools, sessions, and model connections; SpecPi adds the working agreement, workflow controls, and local improvement loop.
140
-
141
- ```mermaid
142
- flowchart TB
143
- human["You · goals, selections, review"]
144
- subgraph session["Pi session"]
145
- specpi["SpecPi · contracts, guard, review, improvement"]
146
- pi["Pi · agent loop, tools, sessions"]
147
- specpi <-->|extension hooks| pi
148
- end
149
- human --> specpi
150
- human --> pi
151
- pi -->|model requests| provider["Selected model provider"]
152
- pi -->|tools| project["Project files and commands"]
153
- specpi -->|local records| evidence["Task cards, wishlist, verification receipts"]
154
- ```
155
-
156
- ## Work ownership
157
-
158
- ### Task contracts and handoff
159
-
160
- Use `/task set` when a shared contract would improve continuity. Its card supplies fixed requirement IDs to `/challenge` and can seed an experiment's hypothesis and acceptance checks. `/spec` shows the active task. `/scope task` explicitly imports the card's expected paths; recording a card alone never widens scope. Human edits create a new card revision and invalidate a review of the earlier card.
161
-
162
- Use `/task clear` before recording an unrelated task. Within a session, repeated reports for the same capability share the card's task ID across agent runs and card revisions. Without a card, report grouping remains per run.
163
-
164
- `/task handoff` displays a review packet containing the original card, observed change information, the latest completion review, and unresolved facts. Inspect the packet before sharing it or opening a separate review session. It does not launch another agent or write an export.
165
-
166
- ### Scope and completion
167
-
168
- `/scope set` declares expected paths. `/scope accept <path>` acknowledges one finding without widening the contract. `/scope add <path>` widens it. `/scope recheck` replaces an uncertain baseline.
169
-
170
- `/challenge` requires structured requirement evidence and checks for contradictions, false-positive validation, scope drift, missing runtime or visual checks, and residual risk. Its result supports human review and does not replace direct proof.
171
-
172
- ### Isolated experiments
173
-
174
- Use `/experiment start` when an independent review or trial justifies a separate worktree. Open the reported path in another Pi session. SpecPi does not launch an agent, copy dirty base changes, commit, merge, or touch remotes.
175
-
176
- SpecPi's default workflow uses one writer per working directory. Its experimental delegation adds bounded read-only Pi sessions. SpecPi Chat also supports independent conversations that you start explicitly; connected chats can continue concurrently in the same workspace. They share workspace files rather than receiving separate worktrees. A parent determines what context a delegated child receives and verifies what returns, so either handoff can omit a material constraint. Parallel writers also introduce conflicting assumptions and increase review work.
177
-
178
- ## Improvement loop
179
-
180
- 1. **Record:** A reusable capability gap is stored as a sanitized local report.
181
- 2. **Qualify:** Recurrence, project reach, impact, and recency determine whether the item enters the review menu.
182
- 3. **Select:** `/harness-improvement` authorizes one exact item.
183
- 4. **Implement:** The `specpi-improve` skill makes the narrowest sufficient change and adds direct checks.
184
- 5. **Verify:** The completion gate checks the selected task contract and registry integration, runs `npm run check` and the item's closed validators, and rejects evidence if the checked source changes.
185
- 6. **Retire:** A passing item leaves the queue. Its model-reported evidence and executable verification receipt remain separately identified in the local journal.
186
- 7. **Review again:** Later evidence returns the item as `review-needed`. Implementation does not restart automatically.
187
-
188
- <details>
189
- <summary><strong>View the improvement loop</strong></summary>
190
-
191
- <p align="center">
192
- <img src="site/self-improvement-loop-v2.svg" width="760" alt="SpecPi improvement loop: local friction becomes qualified evidence; a person chooses one change; verification failure keeps it selected; later evidence returns it to human review.">
193
- </p>
194
-
195
- </details>
196
-
197
- ### Inspect the record
198
-
199
- Use `/wishlist status` for queue and loop-health totals. Use `/wishlist history [gap-id]` for retirement evidence, validators, changed files, reopen signals, and rollback context. `/wishlist` also supports duplicate cleanup, local issue drafts, archive, and reset operations.
200
-
201
- With collection enabled, `/wishlist outcome <gap-id>` records an explicit human assessment of the latest local retirement: helped, failed, not exercised, or reverted. Later assessments replace the earlier assessment in totals while history retains both. Failure is a reason to review; it never authorizes another implementation. Unused capabilities remain unassessed.
202
-
203
- ## Command guard
204
-
205
- Every supported model-initiated Pi tool call is classified before execution. Select one mode at session start:
206
-
207
- | Mode | Behavior |
208
- | ---------- | ----------------------------------------------------------------------------------------------------------------------- |
209
- | **Guard** | Denies confirmed host-wide catastrophe and guard tampering, asks before Git destroys work, and otherwise remains quiet. |
210
- | **Strict** | Adds approval requests for mutation, execution, sensitive reads, and network activity. |
211
- | **Off** | Requires confirmation and applies only to the current session. |
212
-
213
- Approvals apply to one exact call and one session. Only a structurally proven critical mutation locks the session. Parser uncertainty and invalid cleanup syntax are denied without locking later work.
214
-
215
- The guard covers the documented `bash`, `powershell`, `read`, `write`, and `edit` seams. Direct shell escapes, malicious extensions, unclassified custom tools, approved scripts, TOCTOU changes, and external processes remain outside its scope.
216
-
217
- ## Data and security boundaries
218
-
219
- **Local state.** SpecPi does not persist command text or read Pi credentials, unrelated sessions, or history. Scope and challenge records are bounded entries in the current Pi session; task cards are bounded to the active session branch. Wishlist reports, improvement journals, experiment metadata, and exported patches remain in private local SpecPi state and can survive uninstall. Review local artifacts before sharing.
220
-
221
- **Verification receipts.** Improvement verification fingerprints supported source and validation inputs, records actual gate results, and detects changes between verification snapshots. Receipts retain hashes and runtime metadata, not source contents or raw command output. They describe what was checked; they are not cryptographic attestations or proof that a model's acceptance explanation is correct. Older journals remain readable and are identified as lacking a receipt.
222
-
223
- **Provider and network access.** Local SpecPi evidence does not make the whole agent offline. Pi sends model requests to the selected provider, browser pages and installed packages may contact the network, and Pi has separate telemetry and update-check settings. The installer explains these boundaries without changing those upstream preferences.
224
-
225
- **Host permissions.** Pi extensions run with the current user's permissions. Use OS permissions, a least-privilege account, a container, or a VM for hostile code or data. See [SECURITY_MODEL.md](SECURITY_MODEL.md) for the complete trust model and [SECURITY.md](SECURITY.md) for vulnerability reporting.
57
+ ## SpecPi Chat for VS Code
226
58
 
227
- ## Development
59
+ Chat beside your code, attach files, and switch conversations.
228
60
 
229
- ```bash
230
- npm install --ignore-scripts --omit=peer --no-package-lock
231
- npm run format
232
- npm run check
233
- ```
61
+ [**Install from Marketplace**](https://marketplace.visualstudio.com/items?itemName=tannermidd.specpi-chat) · Requires the setup above and VS Code 1.96+.
234
62
 
235
- JavaScript and TypeScript use four-space indentation, explicit braced control flow, and one statement per line. The repository check enforces formatting, validates syntax, strictly type-checks the browser extension, runs the Node test suite, executes registry-linked validators, and installs the exact npm tarball through an isolated lifecycle. Maintainers should follow [NPM_RELEASE.md](NPM_RELEASE.md) for release preparation and protected publication.
63
+ In VS Code, find **SpecPi Chat** by **tannermidd** in Extensions and install it. Open **SpecPi** in the Activity Bar, then **Connect Pi**.
236
64
 
237
- For application testing, use `browser_diagnostics` alongside rendered inspection, and `browser_press`, `browser_select_option`, and `browser_wait_for` for keyboard, native dropdown, and asynchronous flows. Diagnostics are bounded and best-effort sanitized, not guaranteed secret-free or proof of application health.
65
+ ## Go further
238
66
 
239
- Provision repository-local Chromium with `npm run setup:browser`, then run `npm run test:browser` and `npm run test:site:browser`. The required CI browser commands reject skipped coverage; Pages deployment waits for the same rendered check. See [browser testing](docs/browser-testing.md) for tool contracts, privacy limits, type-check scope, and the semantic-navigation assessment.
67
+ [Commands](https://tannermidd.github.io/SpecPi/wiki/#reference) · [Chat help](https://github.com/TannerMidd/SpecPi/blob/main/vscode/README.md) · [Development](https://tannermidd.github.io/SpecPi/wiki/#development) · [Security](SECURITY_MODEL.md) · [Release notes](CHANGELOG.md)
240
68
 
241
- MIT licensed.
69
+ [MIT License](LICENSE)
package/SECURITY_MODEL.md CHANGED
@@ -6,33 +6,62 @@ This document describes SpecPi's architecture-level security assumptions, enforc
6
6
 
7
7
  ### Experimental native delegation
8
8
 
9
- Delegation is a native extension discovered through the ordinary Pi package and SpecPi lifecycle. Start `pi` normally; workers remain disabled and the model-facing schema absent until human activation. It adds no launcher, separate host process, service or trust override. Parent Pi retains normal resource discovery, trust decisions and proxy policy. Delegation checks required public SDK capabilities, not exact version identifiers. Missing session/runtime/settings/thinking APIs prevent activation; session construction and every request still enforce the tool, model and resource policy. API presence is not proof of every future SDK behavior or a passing integration receipt. Normal installation's minimum Pi version and 0.84.4 bootstrap pin are separate contracts.
9
+ Snapshot creation diagnostics expose only code-owned reasons and an optional one-based
10
+ selected-source position. Known filesystem error codes map to fixed missing/access
11
+ messages; raw paths, messages, causes, stacks, and file contents are not returned.
12
+ Rejected captures start no worker and spend no batch or inference allowance.
13
+ Worker diagnostics identify the failing stage and include only allowlisted source-tool
14
+ or report-validation reasons. Raw provider errors and malformed report text never cross
15
+ the diagnostic boundary. The original tool reason survives SDK cancellation. Output-token
16
+ truncation, invalid JSON and invalid evidence cannot become review sign-off. Workers can
17
+ correct these reports and ordinary tool arguments in the same session, retaining prior
18
+ passages and spending the original inference/context/time budgets. Source changes,
19
+ revocation, unavailable tools and exhausted allowances still abort. The worker prompt
20
+ discloses report constraints; raw provider errors are not automatically retried.
21
+ Source topic words are not private-state boundaries: selected `auth.ts`,
22
+ `credentials.ts`, `sessions/`, and similar application paths are allowed in every
23
+ supported text format. The broker reserves known private namespaces (including
24
+ `.pi`, `.codex`, `.ssh`, cloud credential directories, and SpecPi Chat storage),
25
+ credential-store filenames such as `.env`, `auth.json`, and `credentials.json`,
26
+ and private-key formats. Both lexical and canonical locations of the configured
27
+ `PI_CODING_AGENT_DIR` are excluded; only directory metadata is resolved, never
28
+ private contents. An inaccessible configured boundary rejects snapshot creation.
29
+ These rules prevent accidental selection of known stores, not secrets embedded
30
+ in otherwise ordinary source. The parent remains responsible for selecting
31
+ appropriate material. Selected-file scope, containment, link, text, size, and
32
+ freshness checks apply to every source. Child access limits prevent the reviewer
33
+ from expanding its assignment; sending selected source to the same provider is
34
+ not a new provider-disclosure boundary.
35
+
36
+ Delegation is a native extension discovered through the ordinary Pi package and SpecPi lifecycle. Start `pi` normally; delegation is enabled by default at the first session start of each Pi process, including TUI, RPC, print and JSON modes, after settings, host and Guard checks. Startup launches no workers or model inference, but Pi-owned authentication/OAuth preparation may occur. The model-facing schema is present only while dispatch is enabled. It adds no launcher, separate host process, service or trust override. Parent Pi retains normal resource discovery, trust decisions and proxy policy. Delegation checks required public SDK capabilities, not exact version identifiers. Missing session/runtime/settings/thinking APIs prevent activation; session construction and every request still enforce the tool, model and resource policy. API presence is not proof of every future SDK behavior or a passing integration receipt. Normal installation's minimum Pi version and 0.84.4 bootstrap pin are separate contracts.
10
37
 
11
38
  Each worker is an SDK `createAgentSession` instance with in-memory session storage. Pi owns its model/tool loop. A fresh Pi `ModelRuntime` uses standard authentication, environment and `models.json` resolution. Child transport and thinking budgets come from configured global settings; project settings are not loaded. Parent model/thinking are explicit with Pi's supported-level clamping. SpecPi does not extract credentials, copy authentication state or inspect private runtime fields. Preflight rejects runtime-only authentication, selected extension-registered provider overrides, model-specific headers, startup proxy configuration and mismatched safe model descriptors because those routes cannot be faithfully reconstructed. These rejections leave parent configuration unchanged.
12
39
 
13
40
  This is not full parent inference parity: parent request hooks, ephemeral runtime settings and session affinity are not automatically inherited. Keep delegation disabled if those inherited controls are required for every request. Children load no ambient extensions, skills, AGENTS files or parent transcript. Their only tools are selected-source list/read/literal-search; shell, write, arbitrary plugin, live-web and nested delegation tools are absent. Trusted parent extensions remain privileged in the same process. This is an application boundary, not an OS sandbox against malicious extensions.
14
41
 
15
- Human `/delegate on` activates the displayed experimental calls/time policy. Admission supports only frozen `review` and bounded `scout` analysis. Each job receives its assigned requirement IDs and fixed global constraints. Review needs inline context or selected files; scouts need selected files. A declared parallel benefit requires useful parent work. Structural checks reject unsupported mode/benefit combinations and duplicate normalized questions; they do not prove semantic independence or improved outcomes. Command Guard still intercepts the parent tool; Strict approval binds its capability summary to the exact call and policy generation. Guard, task, scope, model, session and branch changes revoke old generations; normal leaf advancement does not. Model requests cannot enable delegation, change models, raise ceilings or grant tools. Parent acceptance does not mint human authorization, actual verification or wishlist selection.
42
+ The startup default activates the documented experimental calls/time policy. Human `/delegate off` revokes it and `/delegate on` re-enables it. Off and safety revocations survive reloads and session switches; restarting Pi reapplies the on default. No on/off preference is persisted. Admission supports only frozen `review` and bounded `scout` analysis. Each job receives its assigned requirement IDs and fixed global constraints. Review needs inline context or selected files; scouts need selected files. A declared parallel benefit requires useful parent work. Structural checks reject unsupported mode/benefit combinations and duplicate normalized questions; they do not prove semantic independence or improved outcomes. Command Guard still intercepts the parent tool; Strict approval binds its capability summary to the exact call and policy generation. Guard, task, scope, model, session and branch changes revoke old generations; normal leaf advancement does not. Model requests cannot enable delegation, change models, raise ceilings or grant tools. Parent acceptance does not mint human authorization, actual verification or wishlist selection.
16
43
 
17
- Command Guard is optional for delegation. Human activation works when Guard is absent or Off; read-only snapshot tools, admission policy and resource limits are enforced by delegation itself. An installed Guard's Strict approvals and explicit locks still apply. A responder with an unready policy, or multiple responders, blocks activation with a specific error. Guard installation, removal or mode changes invalidate the enabled generation before further worker calls.
44
+ Command Guard is optional for delegation. Activation works when Guard is absent or Off; read-only snapshot tools, admission policy and resource limits are enforced by delegation itself. An installed Guard's Strict approvals and explicit locks still apply. A responder with an unready policy, or multiple responders, blocks activation with a specific error. Guard installation, removal or mode changes invalidate the enabled generation before further worker calls.
18
45
 
19
46
  Guard responders reattach on each session startup, including reuse of an extension instance. Invalid commands, declined confirmations and no-op mode requests do not revoke delegation. Accepted changes and critical locks do; an asynchronous confirmation must still match the active Guard generation before it can commit.
20
47
 
21
- The human activation choice follows subsequent parent provider/model and thinking selections. A selection revokes old generations and preflights the new host before automatically resuming dispatch; unsupported selections pause without falling back to the previous model. No job is automatically retried and no quota or settling slot is reset. New model generations invalidate old Strict approval fingerprints. Concurrent setup is bound to the latest selection and extension instance; completion cannot undo explicit off, Guard revocation or session/task/scope changes. Status distinguishes the requested on/off choice from whether dispatch is ready.
48
+ The default or human activation choice follows subsequent parent provider/model and thinking selections. A selection revokes old generations and preflights the new host before automatically resuming dispatch; unsupported selections pause without falling back to the previous model. No job is automatically retried and no quota or settling slot is reset. New model generations invalidate old Strict approval fingerprints. Concurrent setup is bound to the latest selection and extension instance; completion cannot undo explicit off, Guard revocation or session/task/scope changes. Status distinguishes the requested on/off choice from whether dispatch is ready.
22
49
 
23
50
  The broker reads only explicitly selected, bounded regular text files under the fixed canonical working root captured for the Pi process, with private-path, traversal, symlink/junction, hardlink, binary and size checks. Restart Pi to change this root or load a new delegation runtime version. It rechecks source identity/content and validates evidence line ranges. Each job sees only its selected IDs. These checks assume a trusted local filesystem: portable Node APIs do not establish an atomic OS snapshot against hostile filesystem races, and filenames cannot reveal secrets embedded in ordinary source files. No live web adapter is included.
24
51
 
25
52
  Snapshot tool calls check canonical paths, identity and change metadata without rereading and hashing the entire selection. Capture, publication, collect, follow-up and resolve also verify content digests. Metadata-evasive changes are detected at the next digest boundary. Stream events use cheap epoch/model/context identity checks; full root, safe model-descriptor and provider-policy validation still precede requests, tools and accepted results. An in-place change during a dispatched stream may be detected at that next protected boundary.
26
53
 
27
- Quotas cover SDK model invocations, logical deadlines, tool calls/bytes, snapshot bytes and observed responses. Admission occurs before each SDK dispatch. Provider/session retries and automatic compaction are disabled; one changed-input follow-up keeps original allowances and deadlines. Requested output is 8,192 tokens clamped to the model maximum. SDK streaming exposes response content for checks while the child runs, but bytes may already be buffered before an event. There are no hard raw-transport, hidden-provider-attempt, invoice or process-memory caps. Missing usage is explicit and cost is unavailable. Cancellation revokes broker grants and requests SDK abort; slots remain held through SDK-visible stream/result and prompt settlement. That does not prove physical remote execution has ended. A non-cooperative SDK/provider can require ending Pi; late results do not revive a job.
54
+ Quotas cover SDK model invocations, logical deadlines, tool calls/bytes, snapshot bytes and observed responses. Admission occurs before each SDK dispatch. Provider/session retries and automatic compaction are disabled; one changed-input follow-up keeps original allowances and deadlines. Requested output follows Pi's normal provider/model settings without a delegation-specific token cap. Report corrections use ordinary admitted calls in the same session; they are not opaque SDK retries. SDK streaming exposes response content for checks while the child runs, but bytes may already be buffered before an event. There are no hard raw-transport, hidden-provider-attempt, invoice or process-memory caps. Missing usage is explicit and cost is unavailable. Cancellation revokes broker grants and requests SDK abort; slots remain held through SDK-visible stream/result and prompt settlement. That does not prove physical remote execution has ended. A non-cooperative SDK/provider can require ending Pi; late results do not revive a job.
28
55
 
29
56
  Incremental stream checks count recognized delta bytes and bound event structures, with exact full response checks at content/terminal boundaries. This trusts Pi's parsed event contract; it is not an exact per-event bound for arbitrary inconsistent SDK partials or a peak-memory guarantee. Usage preserves valid fields independently, reports never-supplied fields as null, and counts reporting coverage per field. Unknown SDK/setup/tool errors expose only generic diagnostics; code-owned policy failures retain specific messages. Synchronous and asynchronous teardown failures are contained without freeing unsettled slots.
30
57
 
31
- The same controller and bounded idempotency journal remain in memory for the Pi process lifetime, including `/reload`, session switches and off/on. Successful spending and final-disposition receipts are retained (at most 20 under the fixed ceilings); cancellation and nonfinal assessments have a separate 128-entry oldest-first cache. Failures reserve no keys. Cache churn cannot evict spending receipts, reset quotas or disable cancellation. Limits are two active workers, four batches and 32 SDK invocations per process; two jobs and 8 invocations per batch; four invocations per logical job including follow-up. Invalidation does not reset these counters or release settling work. Completed reports retain their source bindings after the deadline, but child sessions are released at the deadline and later follow-up is rejected. These numeric limits are engineering choices, not empirical optima.
58
+ The same controller and bounded idempotency journal remain in memory for the Pi process lifetime, including `/reload`, session switches and off/on. Successful spending and final-disposition receipts are retained (at most five per admitted batch); cancellation and nonfinal assessments have a separate 128-entry oldest-first cache. Failures reserve no keys. Cache churn cannot evict spending receipts, reset quotas or disable cancellation. Defaults are two active workers, 32 batches and 256 SDK invocations per process; two jobs and 64 invocations per batch; 32 invocations, 96 source tool calls and 512 KiB delivered source JSON per logical job including follow-up. Invalidation does not reset these counters or release settling work. Completed reports retain their source bindings after the deadline, but child sessions are released at the deadline and later follow-up is rejected. These numeric limits are engineering choices, not empirical optima.
59
+
60
+ Human `/delegate budget <multiplier>` while off saves a whole multiplier from 1 to 64 (default 8). Counts for process batches and job/batch/process model calls, job source tools/output bytes, serialized child context and SDK response bytes scale together. Maximum values are 256 batches and 2,048 model invocations per process, 512 invocations per batch, 256 invocations and 768 source calls/4 MiB source output per job, and 16 MiB serialized child context. The default child-context bound is 2 MiB. SDK response acceptance defaults to 1 MiB and scales to 8 MiB at multiplier 64. Concurrency, timeouts, 256 KiB handoffs, individual tool responses and final-report bounds do not scale. Changes invalidate prior jobs without resetting spent usage; increased limits permit greater cost and memory use. Exhaustion diagnostics are code-owned, rejected source output is not counted as delivered, and exhausted jobs cannot launch a follow-up with a spent allowance.
32
61
 
33
62
  Logical jobs default to 10 minutes and batches to 20 minutes. Human `/delegate timeout <minutes>` persists a whole-minute value from 1–60 while delegation is off; the batch window is twice the job window. Queue and follow-up time count from admission. SDK request timeouts and adapter abort timers use the remaining job window, with a 60-minute ceiling. Changes revoke old policy bindings, never extend old jobs or reset quotas/settling slots, and are absent from the model-facing schema. The effective time policy is included in Guard fingerprints and packet digests. Longer windows also allow longer in-memory input/child retention; they do not add calls, retries or billing guarantees.
34
63
 
35
- Only the numeric timeout preference is persisted under `<agent-dir>/specpi/delegation/settings.json`; its previous content and SHA-256 are backed up in `settings.json.bak`. The human-selected agent directory is canonicalized once, including platform aliases; owned SpecPi subdirectories and preference files still reject links. Reads reject malformed/nonregular settings and are bounded to 4 KiB; the encoded backup has a separate 32 KiB bound. Saves use exclusive staging and atomic promotion. Invalid settings block activation. This store does not read Pi authentication, settings or sessions. The process loads it once; manual or other-process edits require restart, and concurrent saves are last-writer-wins. As with snapshots, this is a trusted-local-filesystem contract, not protection against hostile filesystem races. User-owned preferences survive uninstall. Requested file/directory modes are 0600/0700; Windows relies on profile ACLs.
64
+ The numeric timeout and optional budget multiplier are persisted under `<agent-dir>/specpi/delegation/settings.json`; its previous content and SHA-256 are backed up in `settings.json.bak`. The human-selected agent directory is canonicalized once, including platform aliases; owned SpecPi subdirectories and preference files still reject links. Reads reject malformed/nonregular settings and are bounded to 4 KiB; the encoded backup has a separate 32 KiB bound. Saves use exclusive staging and atomic promotion. Invalid settings block activation. This store does not read Pi authentication, settings or sessions. The process loads it once; manual or other-process edits require restart, and concurrent saves are last-writer-wins. As with snapshots, this is a trusted-local-filesystem contract, not protection against hostile filesystem races. User-owned preferences survive uninstall. Requested file/directory modes are 0600/0700; Windows relies on profile ACLs.
36
65
 
37
66
  Shared snapshot text is destroyed once no job can continue; failed attempts retain original expiry cleanup. Packet/job-input references are dropped after owned workers settle. Metadata and digests remain for completed receipt freshness. Starting the next accepted batch retires previous reports; invalidation retires old generations after settlement. Retired batch objects are pruned, leaving only bounded state summaries and idempotency/usage counters. Replay cannot restore their reports, inputs, sessions or allowances. JavaScript strings, provider buffers and values already returned to Pi cannot be securely erased.
38
67
 
package/THIRD_PARTY.md CHANGED
@@ -14,7 +14,7 @@ and produces a capability error on activation, rather than an extension-load fai
14
14
 
15
15
  When Pi is absent, SpecPi can install the reviewed `@earendil-works/pi-coding-agent@0.84.4` npm package globally after confirmation. The package provides the `pi` executable, is installed with lifecycle scripts disabled, retains its upstream license, and remains external system state after SpecPi uninstall.
16
16
 
17
- The experimental delegation extension uses native discovery and public Pi SDK `createAgentSession`, in-memory sessions and a fresh `ModelRuntime`, with **public SDK capability checks instead of an exact-version allowlist**. Compatible Pi updates can activate without a SpecPi release. Missing APIs are named in the activation error; actual SDK/provider behavior remains subject to runtime checks and regression testing. The installer floor and pinned 0.84.4 bootstrap package are unchanged. Pi supplies the conversation/tool loop, standard configuration, authentication and OAuth. The child receives the parent model and thinking level with Pi clamping; unsupported runtime-only authentication, selected extension-provider overrides and safe descriptor mismatches fail preflight. Children load no ambient extensions, skills, AGENTS files or parent history. Parent hooks, ephemeral settings and session affinity are not inherited. Each SDK invocation is admitted before dispatch, retries and compaction are disabled, and SDK-visible streams are checked without claiming hard raw-transport, hidden-attempt, memory or invoice bounds. SpecPi does not install or vendor another runtime, add a launcher/service, or introduce a direct `pi-agent-core` dependency or additional runtime library. Parent Pi startup, resources and trust remain unchanged.
17
+ The experimental delegation extension uses native discovery and public Pi SDK `createAgentSession`, in-memory sessions and a fresh `ModelRuntime`, with **public SDK capability checks instead of an exact-version allowlist**. Compatible Pi updates can activate without a SpecPi release. Missing APIs are named in the activation error; actual SDK/provider behavior remains subject to runtime checks and regression testing. The installer floor and pinned 0.84.4 bootstrap package are unchanged. Pi supplies the conversation/tool loop, standard configuration, authentication and OAuth. The child receives the parent model and thinking level with Pi clamping; unsupported runtime-only authentication, selected extension-provider overrides and safe descriptor mismatches fail preflight. Children load no ambient extensions, skills, AGENTS files or parent history. Parent hooks, ephemeral settings and session affinity are not inherited. Each SDK invocation is admitted before dispatch. SDK provider retries and compaction are disabled; ordinary tool-argument and report corrections use admitted calls in the same child session. Output length follows Pi's normal provider/model settings without a delegation-specific token cap, and SDK-visible streams are checked without claiming hard raw-transport, hidden-attempt, memory or invoice bounds. SpecPi does not install or vendor another runtime, add a launcher/service, or introduce a direct `pi-agent-core` dependency or additional runtime library. Parent Pi startup, resources and trust remain unchanged.
18
18
 
19
19
  The [Pi 0.85.0 release](https://github.com/earendil-works/pi/releases/tag/v0.85.0), published 4 September 2026, prompted the additional compatibility review. It does not change the installer pin or imply that every provider/setup has passed. The [compatibility record](docs/delegation/research.md#pi-compatibility-evidence) records completed validation independently of activation. Pi 0.85.1 also passes the isolated native/provider fixtures; its SDK session, agent-session and model-runtime modules match 0.85.0.
20
20
 
@@ -64,6 +64,8 @@ Browser type checking and registered-tool tests additionally use exact project-l
64
64
 
65
65
  The GitHub Pages site vendors the Latin subsets of IBM Plex Sans and IBM Plex Mono. Copyright © 2017 IBM Corp. with Reserved Font Name "Plex". The font files are distributed under the SIL Open Font License 1.1; the required license text is included at `site/fonts/LICENSE.txt`.
66
66
 
67
+ The site showcase at `site/media/specpi-showcase.mp4` incorporates “Machina” by Scott Buckley, released under Creative Commons Attribution 4.0 (CC BY 4.0), https://creativecommons.org/licenses/by/4.0/. Source and composer credit: https://www.scottbuckley.com.au/library/machina/ and https://www.scottbuckley.com.au/. The music excerpt is edited, level-adjusted, and faded; its license is separate from SpecPi's MIT license. Credit appears in the film and the player's transcript/credits disclosure. Preserve that attribution with redistribution; YouTube uploads require it in the video description. See `site/media/README.md`.
68
+
67
69
  The npm release workflow installs `npm@11.19.1` as its pinned publishing client. npm is distributed under the Artistic License 2.0 and runs only on the ephemeral GitHub-hosted release runner.
68
70
 
69
71
  Repository automation uses these official GitHub Actions. General CI and Pages workflows track the listed major versions; the npm publishing workflow pins exact reviewed commit SHAs so the OIDC job does not execute mutable action tags:
@@ -1,6 +1,6 @@
1
1
  # Bounded delegation
2
2
 
3
- Status: experimental in SpecPi 0.15.0. Disabled by default.
3
+ Status: experimental in SpecPi 0.17.0. Enabled by default at Pi startup.
4
4
  The package remains `specpi`; no separate npm package or background service is required.
5
5
 
6
6
  SpecPi keeps one agent responsible for changes and acceptance. This extension adds
@@ -62,12 +62,16 @@ those inherited controls for every request must keep delegation disabled. Receip
62
62
  bind supported model and source descriptors; they cannot certify an unchanged remote
63
63
  service or every configuration change behind a stable provider identity.
64
64
 
65
- ## Enable deliberately
65
+ ## Control delegation
66
66
 
67
- In the interactive session:
67
+ The first session start of each Pi process enables delegation after settings, host and
68
+ Guard checks, in TUI, RPC, print and JSON modes. Startup does not launch workers or
69
+ model inference. Preflight may perform Pi-owned authentication/OAuth preparation.
70
+ Use one agent for small or sequential work; delegate only a justified independent question.
71
+
72
+ In an interactive session:
68
73
 
69
74
  ```text
70
- /delegate on
71
75
  /delegate status
72
76
  /delegate limits
73
77
  /delegate cancel <batchId>
@@ -93,7 +97,10 @@ it does not retain or display live child reasoning. RPC and print mode keep the
93
97
  structured tool responses and do not mount terminal widgets. The UI uses Pi's public
94
98
  [widget and tool-rendering APIs](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/extensions.md).
95
99
 
96
- `on` grants the displayed experimental calls/time envelope. There is no model-call
100
+ The startup default enables the documented experimental calls/time envelope. Use
101
+ `/delegate off` to revoke it and `/delegate on` to explicitly re-enable it. Off and
102
+ safety revocations survive `/reload` and session switches; restarting Pi reapplies the
103
+ on default. No on/off preference is written to disk. There is no model-call
97
104
  permission toggle in the model-facing tool. `limits` is read-only; prompts cannot
98
105
  change timeouts or raise other ceilings. Turning delegation off, changing guard policy, switching
99
106
  sessions or models, navigating branches, and changing task/scope bindings revoke the
@@ -108,7 +115,7 @@ unsettled slots and consumed quotas, and checks the new host before resuming dis
108
115
  Old jobs are not retried. An unsupported selection pauses delegation with a reason;
109
116
  selecting a compatible model resumes it automatically. `/delegate off` remains off
110
117
  through later model changes. Guard, task/scope and session lifecycle changes still
111
- revoke activation. Status separates the user's `requested` choice from `enabled`
118
+ revoke activation. Status separates the default or human `requested` choice from `enabled`
112
119
  dispatch, with `updating` and `pauseReason` for model setup.
113
120
 
114
121
  While delegation is off, its tool is removed from the parent's active tool list.
@@ -181,7 +188,7 @@ edits, coupled mutable work, generic second opinions or repeated role-based answ
181
188
  Use parallel parent tool calls when retrieval alone answers the question.
182
189
 
183
190
  Workers have no shell, writes, arbitrary plugin tools or recursive delegation.
184
- The parent obtains and selects source material. Model routing, automatic retries,
191
+ The parent obtains and selects source material. Model routing, automatic provider retries,
185
192
  live-web access, monetary admission and automatic policy tuning remain unimplemented.
186
193
 
187
194
  `/task` remains optional. Changes to an active task contract invalidate delegation,
@@ -198,21 +205,42 @@ and counters. [Protocol and executable examples](protocol.md) define the exact f
198
205
  | Resource | Ceiling |
199
206
  | ------------------------- | ---------------------------------------------------------------------------- |
200
207
  | Active worker requests | 2 per Pi process, including cancelled requests still settling |
201
- | Batches / jobs | 4 batches per Pi process; one unresolved batch; 2 jobs per batch |
202
- | SDK model invocations | 32 per Pi process, 8 per batch; 4 per logical job including follow-up |
208
+ | Batches / jobs | 32 batches per Pi process; one unresolved batch; 2 jobs per batch |
209
+ | SDK model invocations | 256 per Pi process, 64 per batch; 32 per logical job including follow-up |
203
210
  | Follow-ups / retries | 1 changed-input follow-up per job; provider and session retries disabled |
204
211
  | Time | 10 minutes per job by default (human configurable 1–60); batch twice that; queue/follow-up included |
205
- | Packet / child context | 256 KiB, checked before dispatch |
212
+ | Packet / child context | 256 KiB handoff; 2 MiB serialized child context, checked before dispatch |
206
213
  | Selected sources | 200 files and 8 MiB per batch |
207
- | Tools | 12 calls and 64 KiB total returned JSON per logical job |
214
+ | Tools | 96 calls and 512 KiB total returned JSON per logical job |
208
215
  | Tool response | Bounded reads/search; 16 KiB per snapshot read/search response |
209
216
  | Final report | 16 KiB; 8 findings; coverage for each assigned requirement |
210
- | Requested provider output | 8,192 tokens, clamped to the model maximum |
211
- | SDK-visible response | 256 KiB acceptance limit on observed response content |
217
+ | Requested provider output | Pi's normal provider/model output and thinking settings |
218
+ | SDK-visible response | 1 MiB acceptance limit on observed response content; scales with budget |
212
219
 
213
- These are conservative experiment limits, not empirically optimal values. Each SDK
220
+ These use the default budget multiplier of 8, not empirically optimal values. Each SDK
214
221
  invocation is admitted before dispatch. Automatic provider/session retries and
215
222
  compaction are disabled, so they cannot silently create another SDK request.
223
+ Ordinary source-argument mistakes return corrective feedback. Invalid or truncated
224
+ reports trigger a correction in the same child session with its passages preserved.
225
+ These corrections consume the existing model-call, context and deadline budgets;
226
+ they do not create a fresh job or reset usage. Only a validated report can complete.
227
+
228
+ Use `/delegate off`, `/delegate budget 16`, then `/delegate on` for a larger review:
229
+ 192 source tool calls, 1 MiB source output, and 64 model turns per job. The human-only
230
+ budget command saves a multiplier from 1 to 64; `budget reset` restores 8. It scales
231
+ tool calls/output, model turns per job/batch/process, process batches, and serialized
232
+ child context and SDK response bytes together. It leaves concurrency, tool-response/packet/result limits,
233
+ and timeouts unchanged. Existing settings files use 8 when no budget is saved.
234
+ Budget changes invalidate old jobs and preserve spent process counters. Use a fresh
235
+ batch afterward. Increasing budgets can increase model usage, cost, and retained
236
+ context; provider context-window limits still apply.
237
+
238
+ Tool-byte receipts count only delivered JSON; a rejected response cannot inflate the
239
+ total beyond the allowance. Budget exhaustion reports the specific allowance and
240
+ blocks a follow-up before launching a child. Successful follow-ups retain their
241
+ existing passages and share the original budget/deadline. A failed child is released;
242
+ when another attempt is eligible it starts with the original handoff, not the failed
243
+ child's transcript.
216
244
  Pi authentication preflight occurs before the model-invocation counter; these quotas
217
245
  do not count or bound Pi's authentication/OAuth preparation.
218
246
 
@@ -250,6 +278,27 @@ all selected bytes. Publication, collection, follow-up and disposition also rech
250
278
  content digests. Changed source bindings require a fresh batch. A content change that
251
279
  evades filesystem metadata is detected at the next digest check, not by each tool call.
252
280
 
281
+ Snapshot creation failures report a safe reason and, when applicable, the one-based
282
+ position in the batch's selected-source list (job order, with repeated paths removed).
283
+ Paths must be exact repository-relative filenames. A relative path can still be
284
+ rejected for known private storage or credential-store filenames,
285
+ unsupported file types, missing or inaccessible files, links, quotas, or changed or
286
+ non-text content. The diagnostic never includes raw filesystem errors or file contents.
287
+ Rejection starts no worker and consumes no batch or inference allowance. It provides
288
+ no independent review. Check the reported cause before submitting corrected inputs;
289
+ do not rename or copy restricted files to bypass the source policy.
290
+
291
+ Ordinary application names such as `auth.ts`, `credentials.ts`, `secrets.py`,
292
+ `credential-url.json`, and `sessions/` are allowed across supported text formats.
293
+ The parent chooses the review material. Private namespaces such as `.pi`, `.ssh`,
294
+ and SpecPi Chat storage, the configured Pi agent directory (including its canonical
295
+ alias target), `.env` files, credential stores such as `auth.json` and
296
+ `credentials.json`, and private keys remain blocked. An inaccessible configured
297
+ Pi storage boundary must be repaired before capture. All selected-file scope,
298
+ containment, link, text, size, and freshness checks still apply. Source naming is
299
+ not proof that a file contains no secrets. Workers have no ambient source access;
300
+ using the parent's provider does not grant them the parent's tools or transcript.
301
+
253
302
  This is a trusted-local-filesystem contract, not an operating-system sandbox or an
254
303
  atomic filesystem snapshot. Filename restrictions cannot detect secrets embedded in
255
304
  an ordinary source file. The parent must select appropriate material for the configured
@@ -275,6 +324,17 @@ Only bounded state summaries, quota counters and the idempotency journal remain
275
324
  the Pi process lifetime, including `/reload` and session switches. They cannot recreate
276
325
  retired work. SDK setup errors are replaced with generic diagnostics before reaching
277
326
  status, command notices or model-facing errors; code-owned policy errors stay specific.
327
+ Worker failures identify the failing stage: source tools, provider requests, stream or
328
+ context/response limits, missing/truncated output, or final JSON/schema/evidence validation.
329
+ Known source and report-validation reasons are included; raw provider errors, rejected
330
+ report text, and filesystem paths are not. A tool failure keeps its original diagnostic
331
+ even when Pi aborts the session. A low tool-call count therefore does not imply a reading
332
+ budget failure. Delegation does not impose its own output-token cap. Ordinary argument
333
+ errors and invalid reports can be corrected within the same session; source changes,
334
+ revocation, unavailable tools and exhausted allowances still terminate it. No failure
335
+ is a completed review or independent sign-off. Provider failures do not trigger automatic
336
+ retries; a changed-input follow-up still shares the original job allowances
337
+ and deadline, and a released failed child starts from its original handoff.
278
338
  There is no child session database, raw metrics log,
279
339
  credential copy, automatic resume, or secure memory-erasure claim. Normal Pi parent
280
340
  tool results may be retained in its ordinary session. Turning delegation off does not
@@ -2,7 +2,7 @@
2
2
 
3
3
  Status: archived target architecture, not the implemented runtime contract.
4
4
 
5
- The experimental implementation is part of `specpi` and is disabled by default.
5
+ The experimental implementation is part of `specpi` and is enabled by default at Pi startup.
6
6
  Read the [implemented guide](README.md) and [calls/time protocol](protocol.md) for
7
7
  supported commands, tested API compatibility, limits and trust assumptions. This
8
8
  document preserves the original broader proposal, including unimplemented live-web,