specpi 0.16.0 → 0.17.1

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.1 - 2026-09-07
4
+
5
+ - Reduce the npm package by shipping only runtime scripts; remove obsolete plans, research documents and unused assets, and shorten operational guides.
6
+ - Use structured wishlist candidates directly instead of parsing generated Markdown. Human selection and proof-gated retirement remain unchanged.
7
+ - Remove obsolete tests, editorial assertions and duplicate CI execution while retaining supported safety coverage. SpecPi Chat 0.3.7 separately removes unused standalone conversation paths.
8
+
9
+ ## 0.17.0 - 2026-09-06
10
+
11
+ - 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).
12
+ - 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.
13
+ - 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.
14
+ - 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.
15
+ - 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.
16
+ - 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.
17
+
3
18
  ## 0.16.0 - 2026-09-05
4
19
 
5
20
  - 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.
package/NPM_RELEASE.md CHANGED
@@ -1,114 +1,46 @@
1
- # npm Release Runbook
1
+ # npm release
2
2
 
3
- This runbook is for SpecPi maintainers. Publishing, changing dist-tags, deprecating versions, and changing package ownership are remote operations and require an explicit human decision.
3
+ Publishing, tags, deprecation, ownership changes and GitHub Releases require explicit human approval. Publication is a post-merge operation: never publish from an unmerged commit. npm versions are immutable.
4
4
 
5
- ## One-time npm setup
5
+ ## Prepare
6
6
 
7
- 1. Sign in to the intended npm owner account and enable two-factor authentication and recovery access.
8
- 2. Confirm that the unscoped `specpi` name is available immediately before the first release.
9
- 3. Create a protected GitHub environment named `npm` with required reviewer approval.
10
- 4. Configure npm trusted publishing for `TannerMidd/SpecPi` and `.github/workflows/npm-publish.yml`.
11
- 5. Do not configure a long-lived `NPM_TOKEN` when trusted publishing is available.
7
+ 1. Choose an unused version; update `package.json`, dated `CHANGELOG.md` entry, README and site. Preserve historical changelog entries.
8
+ 2. Chat has an independent version: if changed, align `vscode/package.json`, its changelog, guides and VSIX filenames. Run its check, render, isolated VSIX and package scripts. The VSIX is not in the npm tarball; building does not authorize Marketplace publication.
9
+ 3. Validate:
12
10
 
13
- If npm requires an initial interactive publication before a trusted publisher can be attached, validate the release artifact through every gate below. A local interactive npm session cannot issue GitHub's OIDC provenance, while this package requests provenance by default. For this one bootstrap exception only, publish the exact reviewed tarball with 2FA and an explicit override:
14
-
15
- ```bash
16
- npm publish --ignore-scripts --access public --provenance=false ./specpi-<version>.tgz
17
- ```
18
-
19
- Verify the registry bytes and metadata immediately, then configure trusted publishing before any later release. Do not publish a GitHub Release for that same bootstrap version: the release workflow deliberately rejects versions that already exist. Keep the reviewed source tag as its immutable source reference. All later versions use the protected OIDC workflow and provenance.
20
-
21
- ## Prepare a release
22
-
23
- 1. Select a version that has never appeared on npm. npm versions are immutable.
24
- 2. Update `package.json`, `CHANGELOG.md`, `README.md`, `site/index.html`, `site/wiki/index.html`, `site/single-agent/index.html`, and the delegation guide to the same version. Keep historical changelog entries intact and remove stale unreleased-status wording.
25
- If Chat changes are included, increment its independent version in `vscode/package.json` and `vscode/CHANGELOG.md`, and align the VSIX filenames and feature descriptions in the root README, extension README, and Pages guides. Build it with `npm --prefix vscode run package`, run `npm --prefix vscode run test:render` and the isolated `npm --prefix vscode run test:vsix`, and inspect the VSIX allowlist. The editor extension is not part of the npm tarball; creating this local artifact does not publish it or authorize a Marketplace release.
26
-
27
- 3. For a stable release, add a dated changelog heading. Use a prerelease version when the package should not receive the `latest` dist-tag.
28
- 4. Install the pinned development tools without lifecycle scripts or peers:
29
-
30
- ```bash
11
+ ```sh
31
12
  npm install --ignore-scripts --omit=peer --no-package-lock
32
- ```
33
-
34
- 5. Run the complete repository and package gates:
35
-
36
- ```bash
37
13
  npm run check
38
14
  npm run check:pi-package
39
15
  npm publish --dry-run --ignore-scripts --provenance=false
16
+ npm pack --dry-run --json
40
17
  git diff --check
41
18
  ```
42
19
 
43
- Dry runs explicitly disable provenance because local and validation contexts do not have GitHub OIDC; the protected publish job still requires provenance.
44
-
45
- 6. Inspect the final diff and the JSON file manifest emitted by `npm pack --dry-run --json`.
46
- 7. Obtain fresh read-only review of package metadata, installer behavior, workflow permissions, and the packed artifact.
47
- 8. Commit the reviewed release, create the matching `v<version>` tag, and create a GitHub Release only after explicit approval.
48
-
49
- ## Documentation and publication order
50
-
51
- Publication is a post-merge operation. npm versions are immutable, and the protected workflow must run from a reviewed release tag on `main`, so never publish from an unmerged commit: that would leave permanent public bytes whose source might never land.
52
-
53
- `README.md`, `site/index.html`, and `site/wiki/index.html` document both the canonical `npm install --global specpi@latest` route and a version-pinned example, while `.github/workflows/pages.yml` deploys the site on any push to `main` that touches `site/**`. The release merge therefore deploys install instructions for a version that is not yet on the registry, and the site advertises a command that resolves to `E404` until publication completes.
54
-
55
- Keep that window short and bounded:
20
+ Browser changes also require their opt-in browser gates. Installer/Pi lifecycle tests must use disposable state, never a live profile. Local dry runs disable provenance because they lack GitHub OIDC.
21
+ 4. Review the diff, exact package manifest and artifact; obtain fresh read-only review for lifecycle, permissions and packaging changes.
22
+ 5. After approval, merge to `main`, then create the matching `v<version>` tag and GitHub Release. Approve the protected `npm` environment promptly: Pages may already advertise the version. If publication cannot complete, revert the release merge and use a new version for the next attempt.
56
23
 
57
- 1. Merge the reviewed release to `main`.
58
- 2. Create the `v<version>` tag and GitHub Release immediately, and approve the `npm` environment without delay. For the one bootstrap version described above, publish the reviewed tarball interactively instead and create no GitHub Release.
59
- 3. Wait for the publish job to verify registry version, integrity, dist-tag, and attestation state.
60
- 4. Complete the registry smoke check below, then confirm the deployed site and announce the release.
24
+ ## Protected publication
61
25
 
62
- If publication cannot complete, revert the release merge on `main` so the site stops advertising an unavailable version, and restart from a new version rather than reusing the failed one.
26
+ `.github/workflows/npm-publish.yml` builds one immutable, checksummed candidate; validates that same tarball on Ubuntu, Windows and macOS; then publishes through approved GitHub OIDC with provenance. Stable releases use `latest`, prereleases `next`. Runs are serialized, existing versions are rejected and the candidate must advance its dist-tag. Registry readback must match version, integrity, dist-tag and attestation.
63
27
 
64
- ## Automated publication
28
+ After publication, install the registry artifact into disposable state and exercise plan/install/doctor/uninstall. Check package-page links/images, license, provenance and dist-tag before announcing.
65
29
 
66
- Publishing the GitHub Release starts `.github/workflows/npm-publish.yml`.
30
+ ## First publication only
67
31
 
68
- All three jobs pin npm 11.19.1, above npm's 11.5.1 trusted-publishing minimum, on Node.js 22.19.0 and GitHub-hosted runners.
32
+ Enable npm 2FA/recovery, create a reviewer-protected GitHub `npm` environment and configure trusted publishing for `TannerMidd/SpecPi`, `.github/workflows/npm-publish.yml`. Do not add a long-lived npm token when OIDC is available.
69
33
 
70
- The build job checks tag, package version, changelog entry, and registry immutability, then creates and checksums one tarball before installing repository development tools. It stores that immutable candidate for seven days.
34
+ If npm requires an initial interactive publication before attaching the trusted publisher, run every gate above, then publish the exact reviewed tarball with 2FA:
71
35
 
72
- The validation job runs as an Ubuntu, Windows, and macOS matrix. Every runner downloads and verifies the same candidate, exercises that exact tarball through the npm and native Pi package lifecycles, and runs an npm publish dry-run; Ubuntu also runs the full repository checks.
73
-
74
- The publish job requires approval in the `npm` environment. Publication runs are serialized, and every candidate must advance its existing dist-tag. The job downloads and verifies the same immutable candidate, publishes through GitHub OIDC with npm provenance, uses `next` for prereleases and `latest` for stable versions, and reads the registry back until version, integrity, dist-tag, and attestation state match.
75
-
76
- ## Registry smoke check
77
-
78
- After publication, install from the registry into disposable state rather than reusing the local tarball:
79
-
80
- ```bash
81
- npm install --global specpi@<version>
82
- specpi plan
83
- ```
84
-
85
- Then complete one isolated install, doctor, and uninstall lifecycle before announcing the release. Verify the npm package page, README images, license, repository links, provenance, and dist-tag.
86
-
87
- ## Update and uninstall contract
88
-
89
- Updating the npm CLI and managed SpecPi state are separate operations:
90
-
91
- ```bash
92
- npm install --global specpi@latest
93
- specpi update
94
- specpi doctor
95
- ```
96
-
97
- Restart Pi after updating managed resources so it loads the new delegation runtime.
98
-
99
- Remove managed resources before removing the CLI:
100
-
101
- ```bash
102
- specpi uninstall
103
- npm uninstall --global specpi
36
+ ```sh
37
+ npm publish --ignore-scripts --access public --provenance=false ./specpi-<version>.tgz
104
38
  ```
105
39
 
106
- Private wishlist, journal, experiment, and patch state survives managed uninstall unless explicitly removed.
107
-
108
- ## Failure policy
40
+ This one bootstrap exception lacks GitHub provenance. Verify registry bytes/metadata immediately and configure trusted publishing before subsequent releases. Do not publish a GitHub Release for that same bootstrap version: the workflow rejects existing versions. Keep its reviewed source tag.
109
41
 
110
- Before publication, stop and fix any failed gate without changing npm.
42
+ ## Recovery
111
43
 
112
- After publication, never attempt to replace a version with different bytes. Verify the defect from the registry artifact, deprecate the affected version when warranted, publish a corrected patch after all gates pass, and change a dist-tag only through an explicit reviewed operation. Use unpublish only when npm policy, legal requirements, or credential exposure makes it necessary.
44
+ Stop before publication if any gate fails. After publication, never replace a version's bytes: verify the registry defect, deprecate when warranted, and ship a checked patch through an explicitly approved operation. Unpublish only when npm policy, legal requirements or credential exposure warrants it.
113
45
 
114
- If a publishing credential is exposed, revoke it, stop active workflows, inspect npm ownership and dist-tag history, follow the private security-reporting process, and rotate related credentials before resuming.
46
+ For exposed credentials, revoke them, stop workflows, inspect ownership/dist-tag history, use the [private reporting channel](SECURITY.md), and rotate related credentials before resuming.
package/README.md CHANGED
@@ -5,237 +5,67 @@
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.16.0` enables bounded read-only delegation by default at Pi startup. One agent still owns edits and verification; worker use remains selective. SpecPi Chat, browser checks, and the 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.2**, 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.2.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
- ## Selective 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 **on by default at Pi startup**, subject to compatibility, settings, and Guard checks. Startup does not launch workers or model inference. Use `/delegate status` to inspect work and limits, `/delegate off` to revoke it, and `/delegate on` to re-enable it. Off and safety revocations survive reloads and session switches; restarting Pi reapplies the on default. 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.16.0
65
- npx --package specpi@0.16.0 specpi plan
66
- ```
67
-
68
- For a source-audited installation, clone the exact release:
69
-
70
- ```bash
71
- git clone --branch v0.16.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
124
-
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. |
132
-
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`.
134
-
135
- Capability registry entries include closed offline validators. Completion, `npm run check`, and `specpi doctor` run those validators.
136
-
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.
49
+ Preview the changes, confirm the install, then check the setup. Restart Pi when finished.
177
50
 
178
- ## Improvement loop
51
+ To pin this release, use `npm install --global specpi@0.17.1`.
179
52
 
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.
53
+ Delegation is enabled at startup. Use `/delegate off` to turn it off.
187
54
 
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
55
+ [Setup, updates & removal](https://tannermidd.github.io/SpecPi/wiki/#getting-started) · [Delegation settings](docs/delegation/README.md)
204
56
 
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.
57
+ ## SpecPi Chat for VS Code
224
58
 
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.
59
+ Chat beside your code, attach files, and switch conversations.
226
60
 
227
- ## Development
61
+ [**Install from Marketplace**](https://marketplace.visualstudio.com/items?itemName=tannermidd.specpi-chat) · Requires VS Code 1.96+, Node.js 22.19+, and Pi 0.84.4+. SpecPi is optional.
228
62
 
229
- ```bash
230
- npm install --ignore-scripts --omit=peer --no-package-lock
231
- npm run format
232
- npm run check
233
- ```
63
+ In VS Code, find **SpecPi Chat** by **tannermidd** in Extensions and install it. Open **SpecPi** in the Activity Bar, then **Connect Pi**.
234
64
 
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.
65
+ Chat 0.3.7 includes **Restart Pi** in the Chat title bar and Command Palette to reconnect the selected conversation and reload its Pi extensions. Other conversations keep running.
236
66
 
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.
67
+ ## Go further
238
68
 
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.
69
+ [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
70
 
241
- MIT licensed.
71
+ [MIT License](LICENSE)
package/SECURITY.md CHANGED
@@ -1,86 +1,11 @@
1
- # Security Policy
1
+ # Security policy
2
2
 
3
- This policy explains which SpecPi releases receive security fixes, how to report a vulnerability, and the security responsibilities shared by SpecPi and its users. For architecture, trust boundaries, and component limitations, see [SECURITY_MODEL.md](SECURITY_MODEL.md). Exact third-party versions and licenses are listed in [THIRD_PARTY.md](THIRD_PARTY.md).
3
+ Security fixes target the latest tagged SpecPi release. Older releases are unsupported unless an advisory says otherwise.
4
4
 
5
- ## Supported versions
5
+ Report vulnerabilities privately through [GitHub Security Advisories](https://github.com/TannerMidd/SpecPi/security/advisories/new). Include the affected version, platform, impact, and a minimal reproduction using synthetic data. Do not post exploit details publicly or include real credentials. If private reporting is unavailable, open an issue requesting restoration of the channel without disclosing the vulnerability.
6
6
 
7
- SpecPi provides security fixes for the latest tagged release only. Older releases are unsupported unless a published security advisory says otherwise. Before reporting, check whether the latest release already corrects the behavior; reports affecting the supported release remain welcome.
7
+ Responses and fixes are best-effort, without a guaranteed timeline or bug bounty. Coordinate disclosure with the maintainer. Updates appear in [advisories](https://github.com/TannerMidd/SpecPi/security/advisories) and [release notes](CHANGELOG.md).
8
8
 
9
- | Release | Security support |
10
- | --- | --- |
11
- | Latest tagged release | Supported |
12
- | Older releases | Unsupported |
9
+ Reports covering SpecPi's installer, extensions, Chat, website, automation, or dependency integration are welcome. Upstream-only problems may be redirected to the responsible project.
13
10
 
14
- ## Report a vulnerability
15
-
16
- Report suspected vulnerabilities through [GitHub private vulnerability reporting](https://github.com/TannerMidd/SpecPi/security/advisories/new). SpecPi currently accepts private reports only through GitHub.
17
-
18
- Do not open a public issue, pull request, discussion, or other public report containing vulnerability or exploit details. A GitHub account is required. If private reporting is unexpectedly unavailable, open a public issue containing no vulnerability details and ask the maintainer to restore the private reporting channel before sharing the report.
19
-
20
- Include as much of the following as is safe and practical:
21
-
22
- - the affected SpecPi release or commit;
23
- - the affected installer command, extension, tool, workflow, or website component;
24
- - operating system and relevant configuration;
25
- - expected and observed behavior;
26
- - security impact and plausible attack scenario;
27
- - minimal reproduction steps or proof of concept;
28
- - known mitigations or workarounds;
29
- - whether the issue is already public or actively exploited;
30
- - preferred credit or anonymity.
31
-
32
- Do not include real credentials, personal data, production secrets, or destructive payloads when a minimized demonstration is sufficient.
33
-
34
- SpecPi handles reports on a best-effort basis. Maintainers will acknowledge, assess, and communicate as capacity permits, but the project does not promise fixed response or remediation times. Fix timing depends on impact, exploitability, complexity, upstream coordination, and release safety.
35
-
36
- Please keep the report private while impact, mitigations, a fix, and an advisory are coordinated. Disclosure timing will be discussed with the reporter and may be accelerated when details are already public or exploitation is active. SpecPi does not currently operate a bug bounty program.
37
-
38
- ## Scope
39
-
40
- Reports are in scope when they concern SpecPi-owned behavior, including:
41
-
42
- - the plan, install, update, doctor, and uninstall lifecycle;
43
- - managed configuration, backups, checksums, rollback, and shell integration;
44
- - bundled extensions, skills, themes, browser integration, and local state;
45
- - Command Guard classification, enforcement, approval, or bypass behavior;
46
- - the GitHub Pages site and repository release or deployment workflows;
47
- - an upstream dependency when SpecPi's integration, configuration, or selected version creates or exposes the vulnerability.
48
-
49
- Pi, npm, Chromium, Playwright, DonSeTch, GitHub, and other third-party projects maintain their own security boundaries. Upstream-only vulnerabilities may be redirected to the responsible project. Reports remain relevant to SpecPi when its use of an upstream component creates a distinct risk or requires a SpecPi mitigation.
50
-
51
- A disagreement with an intentional, documented limitation is not by itself a vulnerability. Reports that show the implementation violating its stated boundary, silently weakening a protection, exposing protected data, or enabling a practical bypass are welcome.
52
-
53
- ## Security updates
54
-
55
- When appropriate, SpecPi publishes security information through [GitHub Security Advisories](https://github.com/TannerMidd/SpecPi/security/advisories), tagged releases, and [CHANGELOG.md](CHANGELOG.md). An advisory should identify affected and fixed releases, impact, mitigations or workarounds, and upgrade guidance. A CVE may be requested when appropriate.
56
-
57
- ## Secure installation and operation
58
-
59
- - Install a version-pinned npm release or clone and review the matching source tag. Verify npm provenance when relying on the registry artifact. Do not pipe remote installer content directly into a shell.
60
- - Installing the npm package adds the CLI only. Review `specpi plan` before installation or update, and use `--yes` only when every planned external installation is intended.
61
- - Treat `pi install npm:specpi` as limited resource-only mode, not as the managed installer with browser runtime, supporting packages, instructions, backups, and rollback ownership.
62
- - Run `specpi doctor` after installation and updates.
63
- - Run Pi and SpecPi with the least operating-system privilege practical. Use a container or VM for hostile repositories, code, or web content.
64
- - Protect Pi configuration and credentials with operating-system permissions. SpecPi is not a credential or process sandbox.
65
- - Use dedicated test accounts rather than personal authenticated browser sessions.
66
- - Inspect task cards, review packets, wishlist reports, issue drafts, screenshots, page text, downloads, console output, and visual baselines before sharing them.
67
- - Review optional and global package installations. Some external state and package caches survive rollback or uninstall.
68
-
69
- ## Security boundaries at a glance
70
-
71
- | Area | SpecPi provides | SpecPi does not provide |
72
- | --- | --- | --- |
73
- | npm distribution | Reviewed file allow-list, no install lifecycle script, protected publishing, and requested provenance | Automatic execution of the managed SpecPi installer or proof that packaged code is safe |
74
- | Installer | Explicit plans and confirmation, bounded managed changes, backups, checksums, atomic promotion, and rollback | Rollback of every external package-manager side effect or cache |
75
- | Command Guard | Pre-execution defense in depth for documented model-tool seams | A general sandbox for direct user commands, arbitrary tools, scripts, extensions, or running processes |
76
- | Local improvement state | Explicit collection choice, bounded local records, sanitization, and no SpecPi upload | Guaranteed removal of every plain-language identity or automatic deletion on uninstall |
77
- | Task and verification records | Fixed task requirements, source-bound gate observations, and explicit human outcome feedback | Independent model judgment, cryptographic attestation, or automatic authority to expand a task |
78
- | Browser | A fresh Chromium context without the personal browser profile | Operating-system or network isolation from hostile web content |
79
-
80
- The authoritative assumptions, enforcement seams, residual risks, and component details are in [SECURITY_MODEL.md](SECURITY_MODEL.md).
81
-
82
- ## Dependencies and supply chain
83
-
84
- SpecPi pins reviewed executable dependencies and uses a reviewed lockfile for its managed browser runtime. The npm release workflow validates one tarball, publishes those same bytes from a protected environment with GitHub OIDC, and requests npm provenance. Provenance links an artifact to its build workflow but does not prove the source or dependencies are safe. Pinning, lockfiles, and provenance improve accountability but are not complete reproducible-build guarantees. Installation still trusts the configured package registries, upstream publishers, downloaded browser distribution, GitHub Actions, and the invoking host.
85
-
86
- Some optional or bootstrap packages are installed globally and remain external system state. SpecPi uninstall does not remove them. See [THIRD_PARTY.md](THIRD_PARTY.md) for the canonical component and version inventory and [SECURITY_MODEL.md](SECURITY_MODEL.md) for acquisition and rollback boundaries.
11
+ See [SECURITY_MODEL.md](SECURITY_MODEL.md) for trust boundaries and [THIRD_PARTY.md](THIRD_PARTY.md) for dependencies and licenses. SpecPi is not an OS sandbox; use least privilege and containers or VMs for hostile code.