specpi 0.10.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +169 -150
- package/LICENSE +21 -21
- package/NPM_RELEASE.md +110 -110
- package/README.md +223 -155
- package/SECURITY.md +86 -85
- package/SECURITY_MODEL.md +123 -107
- package/THIRD_PARTY.md +61 -61
- package/browser-runtime/package-lock.json +86 -86
- package/browser-runtime/package.json +15 -15
- package/extensions/command-guard/powershell-parser.ps1 +47 -47
- package/extensions/spec.ts +236 -10
- package/extensions/tool-wishlist/capabilities.json +114 -114
- package/extensions/tool-wishlist/core.mjs +285 -24
- package/extensions/tool-wishlist/index.ts +939 -90
- package/extensions/tool-wishlist/verification.mjs +810 -0
- package/extensions/workflow-controls/challenge.mjs +139 -13
- package/extensions/workflow-controls/index.ts +811 -35
- package/extensions/workflow-controls/scope.mjs +41 -5
- package/extensions/workflow-controls/smoke.mjs +55 -0
- package/extensions/workflow-controls/task-contract.mjs +439 -0
- package/package.json +98 -98
- package/scripts/check-package.mjs +3 -0
- package/scripts/check-pi-package.mjs +103 -4
- package/scripts/pi-test-harness.mjs +309 -0
- package/scripts/specpi.mjs +31 -2
- package/skills/specpi-improve/SKILL.md +60 -54
- package/specpi +0 -0
- package/templates/AGENTS.md +25 -23
- package/templates/settings.json +10 -10
- package/themes/specpi-spec.json +96 -96
package/NPM_RELEASE.md
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
# npm Release Runbook
|
|
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.
|
|
4
|
-
|
|
5
|
-
## One-time npm setup
|
|
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.
|
|
12
|
-
|
|
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`, and `site/wiki/index.html` to the same version.
|
|
25
|
-
3. For a stable release, add a dated changelog heading. Use a prerelease version when the package should not receive the `latest` dist-tag.
|
|
26
|
-
4. Install the pinned development tools without lifecycle scripts or peers:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
npm install --ignore-scripts --omit=peer --no-package-lock
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
5. Run the complete repository and package gates:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npm run check
|
|
36
|
-
npm run check:pi-package
|
|
37
|
-
npm publish --dry-run --ignore-scripts --provenance=false
|
|
38
|
-
git diff --check
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Dry runs explicitly disable provenance because local and validation contexts do not have GitHub OIDC; the protected publish job still requires provenance.
|
|
42
|
-
|
|
43
|
-
6. Inspect the final diff and the JSON file manifest emitted by `npm pack --dry-run --json`.
|
|
44
|
-
7. Obtain fresh read-only review of package metadata, installer behavior, workflow permissions, and the packed artifact.
|
|
45
|
-
8. Commit the reviewed release, create the matching `v<version>` tag, and create a GitHub Release only after explicit approval.
|
|
46
|
-
|
|
47
|
-
## Documentation and publication order
|
|
48
|
-
|
|
49
|
-
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.
|
|
50
|
-
|
|
51
|
-
`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.
|
|
52
|
-
|
|
53
|
-
Keep that window short and bounded:
|
|
54
|
-
|
|
55
|
-
1. Merge the reviewed release to `main`.
|
|
56
|
-
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.
|
|
57
|
-
3. Wait for the publish job to verify registry version, integrity, dist-tag, and attestation state.
|
|
58
|
-
4. Complete the registry smoke check below, then confirm the deployed site and announce the release.
|
|
59
|
-
|
|
60
|
-
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.
|
|
61
|
-
|
|
62
|
-
## Automated publication
|
|
63
|
-
|
|
64
|
-
Publishing the GitHub Release starts `.github/workflows/npm-publish.yml`.
|
|
65
|
-
|
|
66
|
-
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.
|
|
67
|
-
|
|
68
|
-
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.
|
|
69
|
-
|
|
70
|
-
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.
|
|
71
|
-
|
|
72
|
-
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.
|
|
73
|
-
|
|
74
|
-
## Registry smoke check
|
|
75
|
-
|
|
76
|
-
After publication, install from the registry into disposable state rather than reusing the local tarball:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
npm install --global specpi@<version>
|
|
80
|
-
specpi plan
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
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.
|
|
84
|
-
|
|
85
|
-
## Update and uninstall contract
|
|
86
|
-
|
|
87
|
-
Updating the npm CLI and managed SpecPi state are separate operations:
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
npm install --global specpi@latest
|
|
91
|
-
specpi update
|
|
92
|
-
specpi doctor
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Remove managed resources before removing the CLI:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
specpi uninstall
|
|
99
|
-
npm uninstall --global specpi
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Private wishlist, journal, experiment, and patch state survives managed uninstall unless explicitly removed.
|
|
103
|
-
|
|
104
|
-
## Failure policy
|
|
105
|
-
|
|
106
|
-
Before publication, stop and fix any failed gate without changing npm.
|
|
107
|
-
|
|
108
|
-
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.
|
|
109
|
-
|
|
110
|
-
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.
|
|
1
|
+
# npm Release Runbook
|
|
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.
|
|
4
|
+
|
|
5
|
+
## One-time npm setup
|
|
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.
|
|
12
|
+
|
|
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`, and `site/wiki/index.html` to the same version.
|
|
25
|
+
3. For a stable release, add a dated changelog heading. Use a prerelease version when the package should not receive the `latest` dist-tag.
|
|
26
|
+
4. Install the pinned development tools without lifecycle scripts or peers:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install --ignore-scripts --omit=peer --no-package-lock
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
5. Run the complete repository and package gates:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm run check
|
|
36
|
+
npm run check:pi-package
|
|
37
|
+
npm publish --dry-run --ignore-scripts --provenance=false
|
|
38
|
+
git diff --check
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Dry runs explicitly disable provenance because local and validation contexts do not have GitHub OIDC; the protected publish job still requires provenance.
|
|
42
|
+
|
|
43
|
+
6. Inspect the final diff and the JSON file manifest emitted by `npm pack --dry-run --json`.
|
|
44
|
+
7. Obtain fresh read-only review of package metadata, installer behavior, workflow permissions, and the packed artifact.
|
|
45
|
+
8. Commit the reviewed release, create the matching `v<version>` tag, and create a GitHub Release only after explicit approval.
|
|
46
|
+
|
|
47
|
+
## Documentation and publication order
|
|
48
|
+
|
|
49
|
+
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.
|
|
50
|
+
|
|
51
|
+
`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.
|
|
52
|
+
|
|
53
|
+
Keep that window short and bounded:
|
|
54
|
+
|
|
55
|
+
1. Merge the reviewed release to `main`.
|
|
56
|
+
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.
|
|
57
|
+
3. Wait for the publish job to verify registry version, integrity, dist-tag, and attestation state.
|
|
58
|
+
4. Complete the registry smoke check below, then confirm the deployed site and announce the release.
|
|
59
|
+
|
|
60
|
+
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.
|
|
61
|
+
|
|
62
|
+
## Automated publication
|
|
63
|
+
|
|
64
|
+
Publishing the GitHub Release starts `.github/workflows/npm-publish.yml`.
|
|
65
|
+
|
|
66
|
+
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.
|
|
67
|
+
|
|
68
|
+
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.
|
|
69
|
+
|
|
70
|
+
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.
|
|
71
|
+
|
|
72
|
+
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.
|
|
73
|
+
|
|
74
|
+
## Registry smoke check
|
|
75
|
+
|
|
76
|
+
After publication, install from the registry into disposable state rather than reusing the local tarball:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm install --global specpi@<version>
|
|
80
|
+
specpi plan
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
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.
|
|
84
|
+
|
|
85
|
+
## Update and uninstall contract
|
|
86
|
+
|
|
87
|
+
Updating the npm CLI and managed SpecPi state are separate operations:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npm install --global specpi@latest
|
|
91
|
+
specpi update
|
|
92
|
+
specpi doctor
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Remove managed resources before removing the CLI:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
specpi uninstall
|
|
99
|
+
npm uninstall --global specpi
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Private wishlist, journal, experiment, and patch state survives managed uninstall unless explicitly removed.
|
|
103
|
+
|
|
104
|
+
## Failure policy
|
|
105
|
+
|
|
106
|
+
Before publication, stop and fix any failed gate without changing npm.
|
|
107
|
+
|
|
108
|
+
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.
|
|
109
|
+
|
|
110
|
+
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.
|
package/README.md
CHANGED
|
@@ -1,155 +1,223 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="site/logo.svg" width="104" alt="SpecPi logo">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<h1 align="center">SpecPi</h1>
|
|
6
|
-
|
|
7
|
-
<p align="center">
|
|
8
|
-
A local, human-directed improvement harness for the
|
|
9
|
-
<a href="https://pi.dev/">Pi coding agent</a>.
|
|
10
|
-
</p>
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
<a href="
|
|
14
|
-
· <a href="
|
|
15
|
-
· <a href="#
|
|
16
|
-
· <a href="
|
|
17
|
-
</
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
##
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
specpi
|
|
75
|
-
specpi
|
|
76
|
-
specpi doctor
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
`
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
SpecPi
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="site/logo.svg" width="104" alt="SpecPi logo">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">SpecPi</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
A local, human-directed improvement harness for the
|
|
9
|
+
<a href="https://pi.dev/">Pi coding agent</a>.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<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>
|
|
16
|
+
· <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>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
## Purpose
|
|
22
|
+
|
|
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
|
+
This README documents `0.11.2`, including task cards, verification receipts, and human outcome assessments. See the [release notes](CHANGELOG.md#0112---2026-09-04) for the complete change list.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
Requires **Node.js 22.19+**, **npm**, **Git**, and **Pi 0.84.4+**. If Pi is absent, the confirmed install adds the reviewed pinned package.
|
|
32
|
+
|
|
33
|
+
Install the CLI, inspect its non-mutating plan, and confirm the managed installation:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install --global specpi@latest
|
|
37
|
+
specpi plan
|
|
38
|
+
specpi install
|
|
39
|
+
specpi doctor
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`plan` does not mutate the system. Install, update, and uninstall require confirmation unless `--yes` is supplied. After installation, run `/reload` in Pi.
|
|
43
|
+
|
|
44
|
+
<details>
|
|
45
|
+
<summary><strong>Pin a release or install from audited source</strong></summary>
|
|
46
|
+
|
|
47
|
+
Pin the reusable CLI when installing a reviewed release, or inspect its plan without retaining a global CLI installation:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install --global specpi@0.11.2
|
|
51
|
+
npx --package specpi@0.11.2 specpi plan
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
For a source-audited installation, clone the exact release:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
git clone --branch v0.11.2 --depth 1 https://github.com/TannerMidd/SpecPi.git
|
|
58
|
+
cd SpecPi
|
|
59
|
+
./specpi plan
|
|
60
|
+
./specpi install
|
|
61
|
+
./specpi doctor
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
On Windows source checkouts, use `.\specpi.cmd` in place of `./specpi`. The npm installation provides the `specpi` command on every supported platform.
|
|
65
|
+
|
|
66
|
+
</details>
|
|
67
|
+
|
|
68
|
+
<details>
|
|
69
|
+
<summary><strong>Update or uninstall</strong></summary>
|
|
70
|
+
|
|
71
|
+
Update the npm CLI and its managed installation as two explicit steps:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm install --global specpi@latest
|
|
75
|
+
specpi update
|
|
76
|
+
specpi doctor
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Uninstall managed SpecPi resources before removing the CLI. Private wishlist, journal, experiment, and patch state remains local unless explicitly removed:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
specpi uninstall
|
|
83
|
+
npm uninstall --global specpi
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
</details>
|
|
87
|
+
|
|
88
|
+
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.
|
|
89
|
+
|
|
90
|
+
## Included capabilities
|
|
91
|
+
|
|
92
|
+
### Define and review work
|
|
93
|
+
|
|
94
|
+
| Interface | Purpose |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| `/task` | Record the objective, fixed requirements, acceptance checks, expected paths, hypothesis, rollback, and non-goals on the current session branch. |
|
|
97
|
+
| `/scope` | Declare expected paths and report unacknowledged drift. |
|
|
98
|
+
| `/files` | Browse source, rendered Markdown, Git diffs, and bounded review comments. |
|
|
99
|
+
| `/experiment` | Create detached worktrees with keep, binary patch export, and confirmed discard outcomes. |
|
|
100
|
+
| `/challenge` | Review readiness through structured evidence, gaps, contradictions, and residual risk. |
|
|
101
|
+
|
|
102
|
+
### Improve from evidence
|
|
103
|
+
|
|
104
|
+
| Interface | Purpose |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| `/wishlist` | Store and curate privacy-minimized local capability-gap reports. |
|
|
107
|
+
| `/harness-improvement` | Select one qualified or review-needed item and authorize its bounded implementation. |
|
|
108
|
+
|
|
109
|
+
### Work inside Pi
|
|
110
|
+
|
|
111
|
+
| Interface | Purpose |
|
|
112
|
+
| --- | --- |
|
|
113
|
+
| `/spec` | Replace normal chrome with a technical run panel, seal live reasoning, hold streaming prose until complete, and keep tools collapsed. |
|
|
114
|
+
| `/guard` | Deny confirmed host-wide destructive calls and request approval for bounded risk classes. |
|
|
115
|
+
| Browser tools | Open an isolated Chromium context for rendered inspection and screenshots. |
|
|
116
|
+
| `specpi-spec` theme | Bring blueprint blue, technical greys, layered surfaces, and restrained semantic states into Pi. |
|
|
117
|
+
| `specpi` CLI | Plan, install, update, verify, and uninstall managed state with backups and rollback. |
|
|
118
|
+
|
|
119
|
+
`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`.
|
|
120
|
+
|
|
121
|
+
Capability registry entries include closed offline validators. Completion, `npm run check`, and `specpi doctor` run those validators.
|
|
122
|
+
|
|
123
|
+
## How SpecPi fits
|
|
124
|
+
|
|
125
|
+
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.
|
|
126
|
+
|
|
127
|
+
```mermaid
|
|
128
|
+
flowchart TB
|
|
129
|
+
human["You · goals, selections, review"]
|
|
130
|
+
subgraph session["Pi session"]
|
|
131
|
+
specpi["SpecPi · contracts, guard, review, improvement"]
|
|
132
|
+
pi["Pi · agent loop, tools, sessions"]
|
|
133
|
+
specpi <-->|extension hooks| pi
|
|
134
|
+
end
|
|
135
|
+
human --> specpi
|
|
136
|
+
human --> pi
|
|
137
|
+
pi -->|model requests| provider["Selected model provider"]
|
|
138
|
+
pi -->|tools| project["Project files and commands"]
|
|
139
|
+
specpi -->|local records| evidence["Task cards, wishlist, verification receipts"]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Work ownership
|
|
143
|
+
|
|
144
|
+
### Task contracts and handoff
|
|
145
|
+
|
|
146
|
+
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.
|
|
147
|
+
|
|
148
|
+
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.
|
|
149
|
+
|
|
150
|
+
`/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.
|
|
151
|
+
|
|
152
|
+
### Scope and completion
|
|
153
|
+
|
|
154
|
+
`/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.
|
|
155
|
+
|
|
156
|
+
`/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.
|
|
157
|
+
|
|
158
|
+
### Isolated experiments
|
|
159
|
+
|
|
160
|
+
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.
|
|
161
|
+
|
|
162
|
+
SpecPi does not install subagent orchestration. Keep one writer per working directory. A parent agent determines what context a child receives and summarizes what returns, so either handoff can omit a material constraint. Parallel writers also introduce conflicting assumptions and increase review work.
|
|
163
|
+
|
|
164
|
+
## Improvement loop
|
|
165
|
+
|
|
166
|
+
1. **Record:** A reusable capability gap is stored as a sanitized local report.
|
|
167
|
+
2. **Qualify:** Recurrence, project reach, impact, and recency determine whether the item enters the review menu.
|
|
168
|
+
3. **Select:** `/harness-improvement` authorizes one exact item.
|
|
169
|
+
4. **Implement:** The `specpi-improve` skill makes the narrowest sufficient change and adds direct checks.
|
|
170
|
+
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.
|
|
171
|
+
6. **Retire:** A passing item leaves the queue. Its model-reported evidence and executable verification receipt remain separately identified in the local journal.
|
|
172
|
+
7. **Review again:** Later evidence returns the item as `review-needed`. Implementation does not restart automatically.
|
|
173
|
+
|
|
174
|
+
<details>
|
|
175
|
+
<summary><strong>View the improvement loop</strong></summary>
|
|
176
|
+
|
|
177
|
+
<p align="center">
|
|
178
|
+
<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.">
|
|
179
|
+
</p>
|
|
180
|
+
|
|
181
|
+
</details>
|
|
182
|
+
|
|
183
|
+
### Inspect the record
|
|
184
|
+
|
|
185
|
+
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.
|
|
186
|
+
|
|
187
|
+
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.
|
|
188
|
+
|
|
189
|
+
## Command guard
|
|
190
|
+
|
|
191
|
+
Every supported model-initiated Pi tool call is classified before execution. Select one mode at session start:
|
|
192
|
+
|
|
193
|
+
| Mode | Behavior |
|
|
194
|
+
| --- | --- |
|
|
195
|
+
| **Guard** | Denies confirmed host-wide catastrophe and guard tampering, asks before Git destroys work, and otherwise remains quiet. |
|
|
196
|
+
| **Strict** | Adds approval requests for mutation, execution, sensitive reads, and network activity. |
|
|
197
|
+
| **Off** | Requires confirmation and applies only to the current session. |
|
|
198
|
+
|
|
199
|
+
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.
|
|
200
|
+
|
|
201
|
+
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.
|
|
202
|
+
|
|
203
|
+
## Data and security boundaries
|
|
204
|
+
|
|
205
|
+
**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.
|
|
206
|
+
|
|
207
|
+
**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.
|
|
208
|
+
|
|
209
|
+
**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.
|
|
210
|
+
|
|
211
|
+
**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.
|
|
212
|
+
|
|
213
|
+
## Development
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
npm install --ignore-scripts --omit=peer --no-package-lock
|
|
217
|
+
npm run format
|
|
218
|
+
npm run check
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
JavaScript and TypeScript use four-space indentation, explicit braced control flow, and one statement per line. The repository check enforces formatting, validates syntax, 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.
|
|
222
|
+
|
|
223
|
+
MIT licensed.
|