specpi 0.10.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 +150 -0
- package/LICENSE +21 -0
- package/NPM_RELEASE.md +110 -0
- package/README.md +155 -0
- package/SECURITY.md +85 -0
- package/SECURITY_MODEL.md +107 -0
- package/THIRD_PARTY.md +61 -0
- package/browser-runtime/package-lock.json +86 -0
- package/browser-runtime/package.json +15 -0
- package/extensions/browser/core.mjs +306 -0
- package/extensions/browser/index.ts +723 -0
- package/extensions/browser/smoke.mjs +47 -0
- package/extensions/command-guard/bash.mjs +1426 -0
- package/extensions/command-guard/cmd.mjs +369 -0
- package/extensions/command-guard/core.mjs +506 -0
- package/extensions/command-guard/index.ts +634 -0
- package/extensions/command-guard/managed-files.mjs +22 -0
- package/extensions/command-guard/paths.mjs +398 -0
- package/extensions/command-guard/powershell-parser.ps1 +47 -0
- package/extensions/command-guard/powershell.mjs +655 -0
- package/extensions/command-guard/redact.mjs +65 -0
- package/extensions/command-guard/rules.mjs +2557 -0
- package/extensions/command-guard/smoke.mjs +422 -0
- package/extensions/files/core.mjs +422 -0
- package/extensions/files/index.ts +678 -0
- package/extensions/spec/core.mjs +47 -0
- package/extensions/spec.ts +457 -0
- package/extensions/tool-wishlist/capabilities.json +114 -0
- package/extensions/tool-wishlist/core.mjs +1525 -0
- package/extensions/tool-wishlist/index.ts +804 -0
- package/extensions/tool-wishlist/registry.mjs +99 -0
- package/extensions/tool-wishlist/validators.mjs +345 -0
- package/extensions/ui-refresh/index.ts +54 -0
- package/extensions/workflow-controls/challenge.mjs +196 -0
- package/extensions/workflow-controls/experiments.mjs +628 -0
- package/extensions/workflow-controls/index.ts +1144 -0
- package/extensions/workflow-controls/scope.mjs +272 -0
- package/extensions/workflow-controls/smoke.mjs +201 -0
- package/package.json +98 -0
- package/scripts/check-package.mjs +483 -0
- package/scripts/check-pi-package.mjs +223 -0
- package/scripts/check-release-order.mjs +97 -0
- package/scripts/lib.mjs +182 -0
- package/scripts/lock.mjs +122 -0
- package/scripts/specpi.mjs +2037 -0
- package/scripts/verify-artifact.mjs +21 -0
- package/shell/pi-profiles.sh +14 -0
- package/site/logo.svg +9 -0
- package/site/self-improvement-loop-v2.svg +108 -0
- package/skills/donsetch/SKILL.md +76 -0
- package/skills/specpi-improve/SKILL.md +54 -0
- package/specpi +4 -0
- package/specpi.cmd +4 -0
- package/templates/AGENTS.md +23 -0
- package/templates/settings.json +10 -0
- package/themes/specpi-spec.json +96 -0
- package/themes/tea-house.json +89 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { createHash } from "node:crypto";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import process from "node:process";
|
|
7
|
+
|
|
8
|
+
const [artifactPath, checksumPath] = process.argv.slice(2);
|
|
9
|
+
if (!artifactPath || !checksumPath || process.argv.length !== 4) {
|
|
10
|
+
throw new Error("Usage: verify-artifact.mjs <tarball> <sha512-file>");
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const checksum = fs
|
|
14
|
+
.readFileSync(checksumPath, "utf8")
|
|
15
|
+
.trim()
|
|
16
|
+
.match(/^([0-9a-fA-F]{128})\s+[*]?(.+)$/);
|
|
17
|
+
assert.ok(checksum, "SHA-512 checksum file is malformed");
|
|
18
|
+
assert.equal(path.basename(artifactPath), path.basename(checksum[2]), "checksum names a different artifact");
|
|
19
|
+
const actual = createHash("sha512").update(fs.readFileSync(artifactPath)).digest("hex");
|
|
20
|
+
assert.equal(actual, checksum[1].toLowerCase(), "artifact SHA-512 checksum differs");
|
|
21
|
+
console.log(`Verified SHA-512 for ${path.basename(artifactPath)}`);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# shellcheck shell=bash
|
|
2
|
+
# SpecPi capability profiles.
|
|
3
|
+
|
|
4
|
+
pi-core() {
|
|
5
|
+
command pi --tools read,bash,edit,write,ask_user_question "$@"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
pi-plan() {
|
|
9
|
+
command pi --tools read,grep,find,ls,web_search,source_check,fetch_content,get_search_content,ask_user_question "$@"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
pi-full() {
|
|
13
|
+
command pi "$@"
|
|
14
|
+
}
|
package/site/logo.svg
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" role="img" aria-labelledby="title desc">
|
|
2
|
+
<title id="title">SpecPi</title>
|
|
3
|
+
<desc id="desc">A blueprint-blue Pi mark inside a precise technical frame</desc>
|
|
4
|
+
<rect width="128" height="128" fill="#121519"/>
|
|
5
|
+
<rect x="15" y="15" width="98" height="98" fill="#181c22" stroke="#39424f" stroke-width="2"/>
|
|
6
|
+
<path d="M15 37V15h22M91 15h22v22M113 91v22H91M37 113H15V91" fill="none" stroke="#8fb6d9" stroke-width="3"/>
|
|
7
|
+
<path d="M29 36h70v14h-9v26c0 11 4 16 13 16v14c-18 0-27-11-27-30V50H53v47H39V50H29z" fill="#8fb6d9"/>
|
|
8
|
+
<path d="M29 103h36" stroke="#5d6876" stroke-width="2"/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 420" role="img" aria-labelledby="loop-title loop-desc">
|
|
2
|
+
<title id="loop-title">SpecPi human-directed improvement loop</title>
|
|
3
|
+
<desc id="loop-desc">Seven stages move local friction through evidence, human choice, a bounded change, verification, retirement, and review. Verification failure returns to the change while later evidence returns retired work to human review.</desc>
|
|
4
|
+
<defs>
|
|
5
|
+
<pattern id="grid" width="24" height="24" patternUnits="userSpaceOnUse">
|
|
6
|
+
<path d="M24 0H0V24" fill="none" stroke="#20262e" stroke-width="1"/>
|
|
7
|
+
</pattern>
|
|
8
|
+
<marker id="arrow-progress" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto">
|
|
9
|
+
<path d="M0 0 10 5 0 10z" fill="#5d6876"/>
|
|
10
|
+
</marker>
|
|
11
|
+
<marker id="arrow-blueprint" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto">
|
|
12
|
+
<path d="M0 0 10 5 0 10z" fill="#8fb6d9"/>
|
|
13
|
+
</marker>
|
|
14
|
+
<marker id="arrow-pass" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto">
|
|
15
|
+
<path d="M0 0 10 5 0 10z" fill="#7fb08a"/>
|
|
16
|
+
</marker>
|
|
17
|
+
</defs>
|
|
18
|
+
|
|
19
|
+
<rect x="1" y="1" width="998" height="418" fill="#121519" stroke="#2a313b" stroke-width="2"/>
|
|
20
|
+
<rect x="1" y="1" width="998" height="418" fill="url(#grid)" opacity="0.42"/>
|
|
21
|
+
|
|
22
|
+
<g font-family="'IBM Plex Mono', Consolas, 'Liberation Mono', monospace">
|
|
23
|
+
<rect x="28" y="22" width="36" height="36" fill="#181c22" stroke="#39424f" stroke-width="2"/>
|
|
24
|
+
<text x="46" y="48" fill="#8fb6d9" font-size="24" font-weight="600" text-anchor="middle">π</text>
|
|
25
|
+
<text x="78" y="38" fill="#f7f9fc" font-size="18" font-weight="600" letter-spacing="2">SPECPI / IMPROVEMENT LOOP</text>
|
|
26
|
+
<text x="78" y="58" fill="#78838f" font-size="16">Evidence proposes. A person chooses. Proof closes.</text>
|
|
27
|
+
<text x="972" y="44" fill="#78838f" font-size="16" letter-spacing="1" text-anchor="end">7 STAGES · 2 GATES</text>
|
|
28
|
+
</g>
|
|
29
|
+
<path d="M28 82H972" stroke="#39424f" stroke-width="1"/>
|
|
30
|
+
<path d="M28 82H154" stroke="#8fb6d9" stroke-width="2"/>
|
|
31
|
+
|
|
32
|
+
<g fill="none" stroke-width="2" marker-end="url(#arrow-progress)">
|
|
33
|
+
<path d="M146 181h9" stroke="#5d6876"/>
|
|
34
|
+
<path d="M277 181h9" stroke="#8fb6d9" marker-end="url(#arrow-blueprint)"/>
|
|
35
|
+
<path d="M408 181h9" stroke="#5d6876"/>
|
|
36
|
+
<path d="M539 181h9" stroke="#7fb08a" marker-end="url(#arrow-pass)"/>
|
|
37
|
+
<path d="M670 181h9" stroke="#7fb08a" marker-end="url(#arrow-pass)"/>
|
|
38
|
+
<path d="M801 181h9" stroke="#5d6876"/>
|
|
39
|
+
</g>
|
|
40
|
+
|
|
41
|
+
<g font-family="'IBM Plex Mono', Consolas, 'Liberation Mono', monospace">
|
|
42
|
+
<g>
|
|
43
|
+
<rect x="28" y="114" width="118" height="134" fill="#181c22" stroke="#2a313b" stroke-width="2"/>
|
|
44
|
+
<text x="42" y="140" fill="#78838f" font-size="16">01</text>
|
|
45
|
+
<text x="42" y="166" fill="#a3adbc" font-size="16" letter-spacing="1">SIGNAL</text>
|
|
46
|
+
<text x="42" y="205" fill="#e9edf4" font-size="18">Friction</text>
|
|
47
|
+
<text x="42" y="232" fill="#78838f" font-size="16">local</text>
|
|
48
|
+
</g>
|
|
49
|
+
<g>
|
|
50
|
+
<rect x="159" y="114" width="118" height="134" fill="#181c22" stroke="#2a313b" stroke-width="2"/>
|
|
51
|
+
<text x="173" y="140" fill="#78838f" font-size="16">02</text>
|
|
52
|
+
<text x="173" y="166" fill="#a3adbc" font-size="16" letter-spacing="1">EVIDENCE</text>
|
|
53
|
+
<text x="173" y="205" fill="#e9edf4" font-size="18">Qualify</text>
|
|
54
|
+
<text x="173" y="232" fill="#78838f" font-size="16">recurrent</text>
|
|
55
|
+
</g>
|
|
56
|
+
<g>
|
|
57
|
+
<rect x="290" y="114" width="118" height="134" fill="#20252d" stroke="#8fb6d9" stroke-width="2"/>
|
|
58
|
+
<path d="M290 114h118" stroke="#8fb6d9" stroke-width="5"/>
|
|
59
|
+
<rect x="380" y="130" width="12" height="12" fill="#8fb6d9"/>
|
|
60
|
+
<text x="304" y="140" fill="#8fb6d9" font-size="16">03</text>
|
|
61
|
+
<text x="304" y="166" fill="#b8d4ec" font-size="16" letter-spacing="1">HUMAN</text>
|
|
62
|
+
<text x="304" y="205" fill="#f7f9fc" font-size="18">Choose</text>
|
|
63
|
+
<text x="304" y="232" fill="#8fb6d9" font-size="16">explicit</text>
|
|
64
|
+
</g>
|
|
65
|
+
<g>
|
|
66
|
+
<rect x="421" y="114" width="118" height="134" fill="#181c22" stroke="#2a313b" stroke-width="2"/>
|
|
67
|
+
<text x="435" y="140" fill="#78838f" font-size="16">04</text>
|
|
68
|
+
<text x="435" y="166" fill="#a3adbc" font-size="16" letter-spacing="1">CHANGE</text>
|
|
69
|
+
<text x="435" y="205" fill="#e9edf4" font-size="18">Build</text>
|
|
70
|
+
<text x="435" y="232" fill="#78838f" font-size="16">bounded</text>
|
|
71
|
+
</g>
|
|
72
|
+
<g>
|
|
73
|
+
<rect x="552" y="114" width="118" height="134" fill="#20252d" stroke="#7fb08a" stroke-width="2"/>
|
|
74
|
+
<path d="M552 114h118" stroke="#7fb08a" stroke-width="5"/>
|
|
75
|
+
<rect x="642" y="130" width="12" height="12" fill="#7fb08a"/>
|
|
76
|
+
<text x="566" y="140" fill="#7fb08a" font-size="16">05</text>
|
|
77
|
+
<text x="566" y="166" fill="#7fb08a" font-size="16" letter-spacing="1">PROOF</text>
|
|
78
|
+
<text x="566" y="205" fill="#f7f9fc" font-size="18">Verify</text>
|
|
79
|
+
<text x="566" y="232" fill="#7fb08a" font-size="16">closed</text>
|
|
80
|
+
</g>
|
|
81
|
+
<g>
|
|
82
|
+
<rect x="683" y="114" width="118" height="134" fill="#192027" stroke="#39424f" stroke-width="2"/>
|
|
83
|
+
<text x="697" y="140" fill="#7fb08a" font-size="16">06</text>
|
|
84
|
+
<text x="697" y="166" fill="#7fb08a" font-size="16" letter-spacing="1">OUTCOME</text>
|
|
85
|
+
<text x="697" y="205" fill="#e9edf4" font-size="18">Retire</text>
|
|
86
|
+
<text x="697" y="232" fill="#7fb08a" font-size="16">passed</text>
|
|
87
|
+
</g>
|
|
88
|
+
<g>
|
|
89
|
+
<rect x="814" y="114" width="118" height="134" fill="#181c22" stroke="#8fb6d9" stroke-width="2" stroke-dasharray="5 4"/>
|
|
90
|
+
<text x="828" y="140" fill="#8fb6d9" font-size="16">07</text>
|
|
91
|
+
<text x="828" y="166" fill="#b8d4ec" font-size="16" letter-spacing="1">RETURN</text>
|
|
92
|
+
<text x="828" y="205" fill="#e9edf4" font-size="18">Review</text>
|
|
93
|
+
<text x="828" y="232" fill="#8fb6d9" font-size="16">later</text>
|
|
94
|
+
</g>
|
|
95
|
+
</g>
|
|
96
|
+
|
|
97
|
+
<path id="verification-failure-return" d="M611 248v41H480v-33" fill="none" stroke="#78838f" stroke-width="2" stroke-dasharray="5 5" marker-end="url(#arrow-progress)"/>
|
|
98
|
+
<rect x="506" y="276" width="192" height="25" fill="#121519"/>
|
|
99
|
+
<text x="602" y="294" fill="#a3adbc" font-family="'IBM Plex Mono', Consolas, 'Liberation Mono', monospace" font-size="16" text-anchor="middle">FAIL / STAYS SELECTED</text>
|
|
100
|
+
|
|
101
|
+
<path id="later-evidence-review-return" d="M873 248v101H349v-93" fill="none" stroke="#8fb6d9" stroke-width="2" stroke-dasharray="5 5" marker-end="url(#arrow-blueprint)"/>
|
|
102
|
+
<rect x="497" y="336" width="278" height="25" fill="#121519"/>
|
|
103
|
+
<text x="636" y="354" fill="#8fb6d9" font-family="'IBM Plex Mono', Consolas, 'Liberation Mono', monospace" font-size="16" text-anchor="middle">LATER EVIDENCE / HUMAN REVIEW</text>
|
|
104
|
+
|
|
105
|
+
<path d="M28 382H972" stroke="#2a313b"/>
|
|
106
|
+
<text x="28" y="405" fill="#78838f" font-family="'IBM Plex Mono', Consolas, 'Liberation Mono', monospace" font-size="16" letter-spacing="1">LOCAL SIGNAL → EXPLICIT AUTHORITY → VERIFIED CHANGE</text>
|
|
107
|
+
<text x="972" y="405" fill="#5d6876" font-family="'IBM Plex Mono', Consolas, 'Liberation Mono', monospace" font-size="16" text-anchor="end">PRIVATE · LOCAL · REVERSIBLE</text>
|
|
108
|
+
</svg>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: donsetch
|
|
3
|
+
license: AGPL-3.0-only
|
|
4
|
+
description: Uses the DonSeTch CLI for multi-page site crawling, bot-wall or JavaScript-heavy page extraction, focused low-token URL reads, change checks, and keyless search. Use when ordinary pi-web-access fetching is insufficient or when a whole documentation site must be mapped or crawled.
|
|
5
|
+
compatibility: Requires the donsetch executable on PATH.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# DonSeTch CLI
|
|
9
|
+
|
|
10
|
+
Prefer Pi's `web_search`, `source_check`, and `fetch_content` tools for ordinary web research. Use DonSeTch through `bash` when you need site crawling, bot-wall escalation, browser actions, focused extraction, or cheap change/probe checks.
|
|
11
|
+
|
|
12
|
+
## Inspect available options
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
donsetch --help
|
|
16
|
+
donsetch fetch --help
|
|
17
|
+
donsetch search --help
|
|
18
|
+
donsetch crawl --help
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Search
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
donsetch search "query"
|
|
25
|
+
donsetch search "query" --intent code --max-results 10
|
|
26
|
+
donsetch search "query" --json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Search finds candidate URLs; fetch the best result afterward. Treat `weak=true` or low-consensus results cautiously.
|
|
30
|
+
|
|
31
|
+
## Fetch one or several pages
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
donsetch fetch 'https://example.com'
|
|
35
|
+
donsetch fetch 'https://example.com/long-doc' --focus 'error handling'
|
|
36
|
+
donsetch fetch 'https://example.com/long-doc' --toc
|
|
37
|
+
donsetch fetch 'https://example.com/long-doc' --section 'Authentication'
|
|
38
|
+
donsetch fetch 'https://example.com' --must-contain 'required phrase'
|
|
39
|
+
donsetch fetch 'https://example.com' --since-last
|
|
40
|
+
donsetch fetch 'https://a.example/x' 'https://b.example/y' --budget-tokens 2000
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Choose the cheapest useful mode:
|
|
44
|
+
|
|
45
|
+
- Verification only: `--must-contain`.
|
|
46
|
+
- Unknown long-page structure: `--toc`, then `--section`.
|
|
47
|
+
- Known topic: `--focus`.
|
|
48
|
+
- Changed since last read: `--since-last`.
|
|
49
|
+
- Full article pagination: `--stitch`.
|
|
50
|
+
- Structured parsing: `--json` and process with `jq`.
|
|
51
|
+
|
|
52
|
+
For JavaScript-only pages, pass deterministic browser actions:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
donsetch fetch 'https://example.com/search' \
|
|
56
|
+
--actions '[{"do":"type","selector":"input[q]","text":"query"},{"do":"press","key":"Enter"},{"do":"wait_text","text":"results"}]'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Crawl a site
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
donsetch crawl 'https://docs.example.com' --mode map
|
|
63
|
+
donsetch crawl 'https://docs.example.com' --topic 'authentication' --max-pages 20
|
|
64
|
+
donsetch crawl 'https://docs.example.com' --topic 'API reference' --max-pages 30 --deadline 300
|
|
65
|
+
donsetch crawl 'https://docs.example.com' --resume '<resume-token>'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Always set `--topic` for a focused crawl. Start with `--mode map` when site structure is unknown. Bound work with `--max-pages`, `--max-chars`, and `--deadline`. Resume partial crawls instead of restarting.
|
|
69
|
+
|
|
70
|
+
## Operational rules
|
|
71
|
+
|
|
72
|
+
- Quote URLs and user-provided arguments.
|
|
73
|
+
- Use `--json` when downstream code must parse results.
|
|
74
|
+
- Redirect large output to a temporary file and inspect bounded slices rather than flooding model context.
|
|
75
|
+
- Respect robots.txt; do not use `--no-robots` unless the user explicitly authorizes it.
|
|
76
|
+
- Exit code 2 is transient and may be retried; exit code 3 indicates a wall and usually requires another source or fetch strategy.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specpi-improve
|
|
3
|
+
description: Turns a selected SpecPi capability-gap wishlist item into a minimal, evidence-backed, reversible improvement. Use when the user asks to improve SpecPi from its wishlist, act on a selected gap, or complete the notice-to-retire loop.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SpecPi Improve
|
|
7
|
+
|
|
8
|
+
Improve the harness through an explicit experiment, never through quiet self-modification.
|
|
9
|
+
|
|
10
|
+
## Preconditions
|
|
11
|
+
|
|
12
|
+
1. Begin through `/harness-improvement`. Its menu exposes qualified and review-needed items, records the chosen item as selected, and starts this workflow.
|
|
13
|
+
2. Treat that exact menu choice as approval for the smallest sufficient implementation of that item. Ask again only if scope expands or external/remote state would change.
|
|
14
|
+
3. Treat wishlist summaries as leads, not proof. Inspect the current repository, tools, docs, tests, and runtime behavior before designing a change.
|
|
15
|
+
4. Do not inspect Pi credentials, trust decisions, sessions, history, missions, or unrelated private state.
|
|
16
|
+
|
|
17
|
+
## Improvement card
|
|
18
|
+
|
|
19
|
+
Before editing, present one compact card:
|
|
20
|
+
|
|
21
|
+
- **Gap ID and evidence:** occurrences, reach, impact, and representative sanitized needs.
|
|
22
|
+
- **Smallest intervention:** choose among bug fix, config, prompt, skill, or tool; prefer the least powerful sufficient option.
|
|
23
|
+
- **Hypothesis:** what friction the change should remove.
|
|
24
|
+
- **Acceptance check:** direct behavior that proves the capability works.
|
|
25
|
+
- **Rollback:** how the change can be removed or reverted cleanly.
|
|
26
|
+
- **Privacy/security:** state what new data, permissions, dependencies, or external state would be introduced; prefer none.
|
|
27
|
+
- **Non-goals:** reject adjacent feature accumulation.
|
|
28
|
+
|
|
29
|
+
The `/harness-improvement` selection authorizes this exact smallest-sufficient card. Do not add another approval step unless the proposed work exceeds it.
|
|
30
|
+
|
|
31
|
+
## Implementation
|
|
32
|
+
|
|
33
|
+
1. Preserve a single writer for the active worktree.
|
|
34
|
+
2. Implement the smallest coherent intervention.
|
|
35
|
+
3. Add focused tests that reproduce the gap and prove the new behavior.
|
|
36
|
+
4. Update the reviewed capability registry only when the capability is actually shipped. Use exact aliases; do not hide adjacent unsupported cases.
|
|
37
|
+
5. Link deterministic capabilities to an existing or new `specpi doctor` check.
|
|
38
|
+
6. Update README, security documentation, changelog, third-party notices, and installer source lists only where the change requires it.
|
|
39
|
+
7. Keep installation explicit, reversible, backed up, atomic, and checksum-tracked.
|
|
40
|
+
8. If the user chooses to commit the improvement, include a `SpecPi-Gap: <gap-id>` trailer so the commit can be linked to its retirement in the journal. SpecPi itself never commits.
|
|
41
|
+
|
|
42
|
+
## Verification and retirement
|
|
43
|
+
|
|
44
|
+
1. Run the narrowest focused checks, then `npm run check`.
|
|
45
|
+
2. For installer changes, exercise plan/install/doctor/update/uninstall with a temporary `PI_CODING_AGENT_DIR`; never use the live Pi directory.
|
|
46
|
+
3. Inspect the final diff and obtain fresh read-only review when risk warrants it.
|
|
47
|
+
4. At the end, call `finish_harness_improvement` with the exact gap ID, concise direct acceptance evidence, and a sanitized validation note. The tool independently requires source-registry integration, runs `npm run check`, executes every capability validator through the closed validators catalog, persists that proof into the local improvement journal, and retires only if every gate passes.
|
|
48
|
+
5. If validation fails, fix or revert. Do not retire on plausibility; leave the item selected and report the blocker.
|
|
49
|
+
6. A later regression returns the retired item to the `/harness-improvement` menu. Choosing it there explicitly reopens and selects it for review.
|
|
50
|
+
7. When a retired item reopens, start from `/wishlist history <gap-id>`: the journal supplies the original proof and the changed-file set of the original change. Propose an explicit revert plan for human approval; never revert autonomously.
|
|
51
|
+
|
|
52
|
+
## Handoff
|
|
53
|
+
|
|
54
|
+
Report the gap ID, changed files, acceptance evidence, commands and exit codes, lifecycle action, rollback path, and residual risks. Never claim that silence or the absence of later reports proves success.
|
package/specpi
ADDED
package/specpi.cmd
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## SpecPi Working Agreement
|
|
2
|
+
|
|
3
|
+
- Prefer direct execution for small, well-scoped tasks; do not add workflow ceremony without a concrete benefit.
|
|
4
|
+
- Ask concise, decision-oriented questions when material requirements are ambiguous instead of guessing.
|
|
5
|
+
- Inspect existing code and repository guidance before editing. Keep changes surgical and avoid unrelated cleanup.
|
|
6
|
+
- Use project-native commands and dependencies. Do not introduce global tooling when a local script or dependency already exists.
|
|
7
|
+
- Treat plans and model output as context rather than proof. Files, diffs, command output, tests, and runtime behavior are authoritative.
|
|
8
|
+
- Use visible `PLAN.md`, `TODO.md`, `DECISIONS.md`, or `HANDOFF.md` artifacts only when they improve continuity.
|
|
9
|
+
- Delegate only when fresh context, parallel independent investigation, specialist judgment, or review justifies the overhead.
|
|
10
|
+
- Keep one writer per shared working directory. Use `/experiment` or another isolated worktree for intentional parallel writers, and open the separate session yourself.
|
|
11
|
+
- When `/scope` is active, treat outside-scope findings as pending until the human allows once, acknowledges them with `/scope accept`, expands the declared scope with `/scope add`, or clears it; never describe observed drift as accepted scope, and never assume an acknowledged path was added to the contract.
|
|
12
|
+
- Use `/challenge` for material completion review when its adversarial checklist provides concrete value; its readiness card supports human review but is not independent proof.
|
|
13
|
+
- Never launch `codex-exec` or `codex-exec-writer`; SpecPi disables these external subscription runners.
|
|
14
|
+
- Treat command-guard denials as hard runtime constraints: use the stated safer alternative or ask the user; never obfuscate, split, encode, or reroute a denied operation to evade protection.
|
|
15
|
+
- When Command Guard is active, prefer direct tool calls and simple, explicit commands. Avoid unnecessary command substitution, process substitution, stdin-driven `xargs`, compound shell programs, inline interpreter code, and executable heredocs because opaque forms require approval. When complexity is genuinely required, keep it transparent and request approval rather than restructuring it to bypass protection.
|
|
16
|
+
- For material changes, run the narrowest relevant checks, inspect the final diff, and use fresh read-only review when risk warrants it.
|
|
17
|
+
- Never claim completion from plausibility alone. Report commands run, validation results, and residual risks.
|
|
18
|
+
- Treat wishlist observations as leads, not permission to edit. Start only from an exact `/harness-improvement` menu choice, use the `specpi-improve` skill, and retire through its verification gate only after direct evidence passes.
|
|
19
|
+
- Do not commit, push, publish, deploy, or alter remote state unless the user explicitly requests it.
|
|
20
|
+
- Prefer Pi web tools for ordinary research. Use the DonSeTch skill for whole-site crawling, bot walls, JavaScript-heavy extraction, or focused probes.
|
|
21
|
+
- Use SpecPi browser tools to validate rendered web interfaces at relevant desktop, tablet, and mobile viewports; source review and HTTP checks are not proof of visual correctness.
|
|
22
|
+
- Create or replace visual baselines only when explicitly requested, and report current, baseline, and diff artifact paths for regression comparisons.
|
|
23
|
+
- Keep final responses concise and identify changed files clearly.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
+
"name": "specpi-spec",
|
|
4
|
+
"vars": {
|
|
5
|
+
"blueprint": "#8FB6D9",
|
|
6
|
+
"blueprintBright": "#B8D4EC",
|
|
7
|
+
"blueprintDeep": "#6F93B3",
|
|
8
|
+
"paper": "#E9EDF4",
|
|
9
|
+
"paperBright": "#F7F9FC",
|
|
10
|
+
"paperSoft": "#D6DCE6",
|
|
11
|
+
"slate": "#A3ADBC",
|
|
12
|
+
"quiet": "#78838F",
|
|
13
|
+
"faint": "#5D6876",
|
|
14
|
+
"rule": "#2A313B",
|
|
15
|
+
"ruleStrong": "#39424F",
|
|
16
|
+
"success": "#7FB08A",
|
|
17
|
+
"warning": "#D7B36A",
|
|
18
|
+
"error": "#E07A7A",
|
|
19
|
+
|
|
20
|
+
"selectedBg": "#202A35",
|
|
21
|
+
"searchBg": "#8FB6D9",
|
|
22
|
+
"userMsgBg": "#181C22",
|
|
23
|
+
"customMsgBg": "#20252D",
|
|
24
|
+
"toolPendingBg": "#171E26",
|
|
25
|
+
"toolSuccessBg": "#192027",
|
|
26
|
+
"toolErrorBg": "#2A1B20"
|
|
27
|
+
},
|
|
28
|
+
"colors": {
|
|
29
|
+
"accent": "blueprint",
|
|
30
|
+
"border": "ruleStrong",
|
|
31
|
+
"borderAccent": "blueprint",
|
|
32
|
+
"borderMuted": "rule",
|
|
33
|
+
"success": "success",
|
|
34
|
+
"error": "error",
|
|
35
|
+
"warning": "warning",
|
|
36
|
+
"muted": "slate",
|
|
37
|
+
"dim": "quiet",
|
|
38
|
+
"text": "paper",
|
|
39
|
+
"thinkingText": "slate",
|
|
40
|
+
|
|
41
|
+
"selectedBg": "selectedBg",
|
|
42
|
+
"scrollbarThumb": "ruleStrong",
|
|
43
|
+
"searchMatchBg": "searchBg",
|
|
44
|
+
"searchMatchText": "#121519",
|
|
45
|
+
"userMessageBg": "userMsgBg",
|
|
46
|
+
"userMessageText": "paperBright",
|
|
47
|
+
"customMessageBg": "customMsgBg",
|
|
48
|
+
"customMessageText": "paperSoft",
|
|
49
|
+
"customMessageLabel": "blueprint",
|
|
50
|
+
"toolPendingBg": "toolPendingBg",
|
|
51
|
+
"toolSuccessBg": "toolSuccessBg",
|
|
52
|
+
"toolErrorBg": "toolErrorBg",
|
|
53
|
+
"toolTitle": "paperBright",
|
|
54
|
+
"toolOutput": "slate",
|
|
55
|
+
|
|
56
|
+
"mdHeading": "paperBright",
|
|
57
|
+
"mdLink": "blueprintBright",
|
|
58
|
+
"mdLinkUrl": "quiet",
|
|
59
|
+
"mdCode": "blueprint",
|
|
60
|
+
"mdCodeBlock": "paperSoft",
|
|
61
|
+
"mdCodeBlockBorder": "ruleStrong",
|
|
62
|
+
"mdQuote": "slate",
|
|
63
|
+
"mdQuoteBorder": "blueprintDeep",
|
|
64
|
+
"mdHr": "ruleStrong",
|
|
65
|
+
"mdListBullet": "blueprint",
|
|
66
|
+
|
|
67
|
+
"toolDiffAdded": "success",
|
|
68
|
+
"toolDiffRemoved": "error",
|
|
69
|
+
"toolDiffContext": "quiet",
|
|
70
|
+
|
|
71
|
+
"syntaxComment": "faint",
|
|
72
|
+
"syntaxKeyword": "blueprint",
|
|
73
|
+
"syntaxFunction": "blueprintBright",
|
|
74
|
+
"syntaxVariable": "paperSoft",
|
|
75
|
+
"syntaxString": "success",
|
|
76
|
+
"syntaxNumber": "warning",
|
|
77
|
+
"syntaxType": "#9FC4DF",
|
|
78
|
+
"syntaxOperator": "slate",
|
|
79
|
+
"syntaxPunctuation": "quiet",
|
|
80
|
+
|
|
81
|
+
"thinkingOff": "ruleStrong",
|
|
82
|
+
"thinkingMinimal": "faint",
|
|
83
|
+
"thinkingLow": "#6B7688",
|
|
84
|
+
"thinkingMedium": "blueprintDeep",
|
|
85
|
+
"thinkingHigh": "blueprint",
|
|
86
|
+
"thinkingXhigh": "blueprintBright",
|
|
87
|
+
"thinkingMax": "paperBright",
|
|
88
|
+
|
|
89
|
+
"bashMode": "success"
|
|
90
|
+
},
|
|
91
|
+
"export": {
|
|
92
|
+
"pageBg": "#121519",
|
|
93
|
+
"cardBg": "#181C22",
|
|
94
|
+
"infoBg": "#20252D"
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
3
|
+
"name": "tea-house",
|
|
4
|
+
"vars": {
|
|
5
|
+
"rice": "#d6cec0",
|
|
6
|
+
"tea": "#c4a06a",
|
|
7
|
+
"tatami": "#857a6a",
|
|
8
|
+
"shadow": "#5c554a",
|
|
9
|
+
"dusk": "#4a4438",
|
|
10
|
+
"matcha": "#a3af7d",
|
|
11
|
+
"persimmon": "#bf8a70",
|
|
12
|
+
"kindling": "#d1694e",
|
|
13
|
+
|
|
14
|
+
"selectedBg": "#241f19",
|
|
15
|
+
"userMsgBg": "#221d17",
|
|
16
|
+
"toolPendingBg": "#1d1813",
|
|
17
|
+
"toolSuccessBg": "#1b2016",
|
|
18
|
+
"toolErrorBg": "#261915",
|
|
19
|
+
"customMsgBg": "#211b14"
|
|
20
|
+
},
|
|
21
|
+
"colors": {
|
|
22
|
+
"accent": "tea",
|
|
23
|
+
"border": "shadow",
|
|
24
|
+
"borderAccent": "tea",
|
|
25
|
+
"borderMuted": "dusk",
|
|
26
|
+
"success": "matcha",
|
|
27
|
+
"error": "persimmon",
|
|
28
|
+
"warning": "#cba97e",
|
|
29
|
+
"muted": "tatami",
|
|
30
|
+
"dim": "shadow",
|
|
31
|
+
"text": "rice",
|
|
32
|
+
"thinkingText": "tatami",
|
|
33
|
+
|
|
34
|
+
"selectedBg": "selectedBg",
|
|
35
|
+
"scrollbarThumb": "selectedBg",
|
|
36
|
+
"searchMatchBg": "selectedBg",
|
|
37
|
+
"searchMatchText": "rice",
|
|
38
|
+
"userMessageBg": "userMsgBg",
|
|
39
|
+
"userMessageText": "rice",
|
|
40
|
+
"customMessageBg": "customMsgBg",
|
|
41
|
+
"customMessageText": "rice",
|
|
42
|
+
"customMessageLabel": "tea",
|
|
43
|
+
"toolPendingBg": "toolPendingBg",
|
|
44
|
+
"toolSuccessBg": "toolSuccessBg",
|
|
45
|
+
"toolErrorBg": "toolErrorBg",
|
|
46
|
+
"toolTitle": "#dbb886",
|
|
47
|
+
"toolOutput": "tatami",
|
|
48
|
+
|
|
49
|
+
"mdHeading": "#e0c191",
|
|
50
|
+
"mdLink": "#bdab84",
|
|
51
|
+
"mdLinkUrl": "shadow",
|
|
52
|
+
"mdCode": "#d4b583",
|
|
53
|
+
"mdCodeBlock": "#c9c2b2",
|
|
54
|
+
"mdCodeBlockBorder": "dusk",
|
|
55
|
+
"mdQuote": "tatami",
|
|
56
|
+
"mdQuoteBorder": "dusk",
|
|
57
|
+
"mdHr": "dusk",
|
|
58
|
+
"mdListBullet": "tea",
|
|
59
|
+
|
|
60
|
+
"toolDiffAdded": "matcha",
|
|
61
|
+
"toolDiffRemoved": "persimmon",
|
|
62
|
+
"toolDiffContext": "tatami",
|
|
63
|
+
|
|
64
|
+
"syntaxComment": "#6e6757",
|
|
65
|
+
"syntaxKeyword": "#c9a97a",
|
|
66
|
+
"syntaxFunction": "#d6b98c",
|
|
67
|
+
"syntaxVariable": "#b3aa96",
|
|
68
|
+
"syntaxString": "#a3af7d",
|
|
69
|
+
"syntaxNumber": "#c49a6e",
|
|
70
|
+
"syntaxType": "#93a68f",
|
|
71
|
+
"syntaxOperator": "#8f887a",
|
|
72
|
+
"syntaxPunctuation": "#8f887a",
|
|
73
|
+
|
|
74
|
+
"thinkingOff": "dusk",
|
|
75
|
+
"thinkingMinimal": "tatami",
|
|
76
|
+
"thinkingLow": "#a08d64",
|
|
77
|
+
"thinkingMedium": "tea",
|
|
78
|
+
"thinkingHigh": "#cf8f66",
|
|
79
|
+
"thinkingXhigh": "#bf7a5e",
|
|
80
|
+
"thinkingMax": "kindling",
|
|
81
|
+
|
|
82
|
+
"bashMode": "matcha"
|
|
83
|
+
},
|
|
84
|
+
"export": {
|
|
85
|
+
"pageBg": "#171310",
|
|
86
|
+
"cardBg": "#1e1914",
|
|
87
|
+
"infoBg": "#453a28"
|
|
88
|
+
}
|
|
89
|
+
}
|