pi-pstack-adapter 0.3.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 +49 -0
- package/LICENSE +21 -0
- package/README.md +198 -0
- package/VERSION +1 -0
- package/adapter-skills/setup.md +67 -0
- package/adapter-skills/status.md +28 -0
- package/docs/compatibility.md +164 -0
- package/index.ts +472 -0
- package/package.json +71 -0
- package/src/activation.ts +144 -0
- package/src/agents.ts +69 -0
- package/src/capabilities.ts +85 -0
- package/src/certified.ts +13 -0
- package/src/config.ts +210 -0
- package/src/executables.ts +150 -0
- package/src/generate.ts +453 -0
- package/src/manifest.ts +189 -0
- package/src/mode.ts +25 -0
- package/src/namespace.ts +16 -0
- package/src/paths.ts +67 -0
- package/src/registry.ts +104 -0
- package/src/status.ts +215 -0
- package/src/types.ts +98 -0
- package/src/upstream.ts +362 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. release-please writes new entries from Conventional Commit PR titles.
|
|
4
|
+
|
|
5
|
+
## [0.3.0](https://github.com/elderfo/pi-pstack-adapter/compare/v0.2.0...v0.3.0) (2026-10-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* certify native Windows support ([#5](https://github.com/elderfo/pi-pstack-adapter/issues/5)) ([0ebcd76](https://github.com/elderfo/pi-pstack-adapter/commit/0ebcd76d0c24e8918ac16bdf2bda8672fe154e30))
|
|
11
|
+
|
|
12
|
+
## [0.2.0] - 2026-10-05
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Certify pstack `0.15.9` at commit `e43c7ee26e0038c6c1fa8380dd34ce86ff94cb2a`. The adapter now registers 50 upstream skills.
|
|
17
|
+
- Classify the three skills new in this revision. `principle-explain-the-number` is `native`. `correct` is `dependency-gated` on `git`. `benchmark-checklist` is `dependency-gated` on `uptime` and `nproc`, because macOS has no `nproc` without GNU coreutils.
|
|
18
|
+
- Map the role values `auto` and `inherit-parent` in the host mapping. Both mean the subagent runs on the parent model. The mapping now names which upstream role lines correspond to adapter roles, such as `hardest tasks` to `strongest-judgment`. The model slug examples now name the current upstream defaults.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Regenerate cached wrappers when the host mapping text changes. Before this fix, an edit to the mapping did not change the cache key, so a cached revision kept serving the old mapping.
|
|
23
|
+
- Derive the skill count in `npm run test:isolated` from the certified revision instead of a literal.
|
|
24
|
+
|
|
25
|
+
## [0.1.0] - 2026-09-24
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
|
|
29
|
+
- Run Cursor's official pstack plugin in Pi from an unmodified upstream checkout. The adapter downloads a pinned pstack revision, never edits it, and generates Pi skill wrappers and agent definitions from it. This release certifies pstack `0.15.2` at commit `6ed0f7a9504f577d7529064103cecce9be7dfc5e`.
|
|
30
|
+
- 47 upstream skills plus an adapter-owned status workflow, registered under the configurable `pistack` namespace as `/skill:pistack-*`.
|
|
31
|
+
- Both upstream pstack agents, registered with the installed delegation provider as `pistack-comment-sicko` and `pistack-poteto-agent`.
|
|
32
|
+
- Support tiers (`native`, `adapted`, `dependency-gated`, `experimental`, `unsupported`) published in each generated skill's frontmatter and in the status report, so no workflow claims verification it does not have.
|
|
33
|
+
- `/pistack-status`, `/pistack-check <skill>`, and `/pistack-mode on|off|status` commands, plus a `pstack_adapter` tool the agent can call for status, prerequisite checks, model listing, role assignment, and upstream source selection.
|
|
34
|
+
- Automatic activation of the `subagent` tool when a delegating pstack workflow starts. The adapter makes the same tool selection as `subagents_enable`. It does this for a `/skill:` command, for a model-initiated read of the skill's `SKILL.md`, and on each prompt while Poteto Mode is on. Delegating wrappers also tell the model to call `subagents_enable` if `subagent` is still missing.
|
|
35
|
+
- Capability detection for delegation and structured questions by tool shape rather than package name, with `pi-subagents` and `pi-ask-user` as the recommended providers and an actionable report when either is absent.
|
|
36
|
+
- Upstream source overrides by ref, repository, or local checkout, through config files or `PISTACK_*` environment variables. Untested refs warn, custom repositories warn harder, and a moving ref resolves to a recorded commit that startup reuses rather than advances.
|
|
37
|
+
- Offline operation after the first bootstrap. A noninteractive run with an empty cache refuses network access until `PISTACK_ALLOW_BOOTSTRAP=1` permits it.
|
|
38
|
+
- `pi-sandbox.sh`, which launches Pi against a throwaway config root holding only this adapter and its capability providers, optionally in a chosen project directory.
|
|
39
|
+
- `npm run test:isolated`, which clones, packs, and installs the package into an isolated Pi environment and asserts what Pi actually loaded.
|
|
40
|
+
|
|
41
|
+
### Security
|
|
42
|
+
|
|
43
|
+
- Reject git remote strings that name an executing transport such as `ext::`, cleartext or credential-bearing remotes, and refs git would parse as options.
|
|
44
|
+
- Require interactive user confirmation before `set_source` changes the upstream source or reaches the network, and refuse it outright without an interactive session. The tool is model-callable, so an untrusted upstream skill body could otherwise repoint the adapter at attacker-authored skills or use it as an outbound request channel.
|
|
45
|
+
- Accept only model ids the local Pi installation actually offers in `set_model`.
|
|
46
|
+
- Bracket every upstream skill body between explicit markers and repeat the host-precedence statement after it, so a body cannot close with an instruction to disregard the adapter notes. The body between the markers is still reproduced exactly.
|
|
47
|
+
- State host precedence above every upstream skill body and at the top of every converted agent's system prompt: Pi policy, host safety rules, and explicit user instructions override conflicting upstream autonomy instructions. The upstream text is preserved rather than deleted, so it stays auditable.
|
|
48
|
+
- Refuse upstream manifest paths and configured plugin paths that resolve outside the checkout, so a fetched repository cannot make the adapter read files elsewhere on disk.
|
|
49
|
+
- Ignore `__proto__`, `constructor`, and `prototype` keys when merging configuration files.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Chris Freddy Getsfred
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# pi-pstack-adapter
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/pi-pstack-adapter)
|
|
4
|
+
[](https://github.com/elderfo/pi-pstack-adapter/actions/workflows/ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
Use Cursor's [pstack](https://github.com/cursor/plugins/tree/main/pstack) skills and agents in
|
|
8
|
+
[Pi](https://pi.dev).
|
|
9
|
+
|
|
10
|
+
pstack is Cursor's collection of engineering workflows: design reviews (`how`), prose cleanup
|
|
11
|
+
(`unslop`), test-driven development (`tdd`), parallel fan-out (`swarm`), and the full Poteto Mode
|
|
12
|
+
working style. This package downloads a tested pstack release and exposes every workflow as a
|
|
13
|
+
Pi skill named `pistack-*`. The upstream files stay unmodified, so you can audit exactly what
|
|
14
|
+
the agent reads.
|
|
15
|
+
|
|
16
|
+
## Quick start
|
|
17
|
+
|
|
18
|
+
1. Install the package:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pi install npm:pi-pstack-adapter
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
2. Start Pi. On the first interactive start, the adapter asks before it downloads pstack. Answer
|
|
25
|
+
yes.
|
|
26
|
+
|
|
27
|
+
3. Run a workflow. `unslop` needs no other packages:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
/skill:pistack-unslop
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
To see everything the adapter loaded, run `/pistack-status`.
|
|
34
|
+
|
|
35
|
+
## Requirements
|
|
36
|
+
|
|
37
|
+
- [Pi](https://pi.dev)
|
|
38
|
+
- Git on your `PATH`
|
|
39
|
+
- Linux, macOS, or Windows
|
|
40
|
+
|
|
41
|
+
On native Windows, install [Git for Windows](https://git-scm.com/download/win). It provides both
|
|
42
|
+
Git and the Git Bash shell that Pi's `bash` tool uses. pstack skills are written as Bash
|
|
43
|
+
commands, so keep the `bash` tool active rather than switching to Pi's `powershell` tool.
|
|
44
|
+
`/pistack-status` warns when Bash is missing or the `bash` tool is inactive. Pi inside WSL
|
|
45
|
+
counts as Linux.
|
|
46
|
+
|
|
47
|
+
### Add optional providers for delegating workflows
|
|
48
|
+
|
|
49
|
+
Some workflows hand work to subagents or ask you multiple-choice questions. Install these two
|
|
50
|
+
packages to enable them:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pi install npm:pi-subagents
|
|
54
|
+
pi install npm:pi-ask-user
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
With `pi-subagents` installed, the upstream agents register as `pistack-comment-sicko` and
|
|
58
|
+
`pistack-poteto-agent`. The adapter turns on the `subagent` tool when a delegating workflow
|
|
59
|
+
starts, whether you run its `/skill:` command or the agent opens the skill itself. While Poteto
|
|
60
|
+
Mode is on, the adapter turns it on for every prompt.
|
|
61
|
+
|
|
62
|
+
To find missing providers or executables before you start a workflow, run
|
|
63
|
+
`/pistack-check <skill>`.
|
|
64
|
+
|
|
65
|
+
## Install from Git instead of npm
|
|
66
|
+
|
|
67
|
+
To track the repository directly, install from GitHub:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pi install git:github.com/elderfo/pi-pstack-adapter
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
To pin a release, add its tag, for example `git:github.com/elderfo/pi-pstack-adapter@v0.3.0`.
|
|
74
|
+
For a pinned npm release, use `npm:pi-pstack-adapter@0.3.0`.
|
|
75
|
+
|
|
76
|
+
## Run pstack workflows
|
|
77
|
+
|
|
78
|
+
Each pstack skill appears as a `/skill:pistack-*` command:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
/skill:pistack-how
|
|
82
|
+
/skill:pistack-unslop
|
|
83
|
+
/skill:pistack-poteto-mode
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Before you run a workflow, check what it needs:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
/pistack-check how
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The check reports the workflow's support tier and any missing capabilities or executables.
|
|
93
|
+
|
|
94
|
+
The adapter also adds these commands:
|
|
95
|
+
|
|
96
|
+
| Command | What it does |
|
|
97
|
+
| --- | --- |
|
|
98
|
+
| `/pistack-status` | Shows versions, the resolved commit, trust, capabilities, support tiers, and diagnostics. |
|
|
99
|
+
| `/pistack-check <skill>` | Checks one workflow's requirements. |
|
|
100
|
+
| `/pistack-mode on\|off\|status` | Turns Poteto Mode on or off for the current session. |
|
|
101
|
+
| `/skill:pistack-setup` | Assigns Pi models to pstack roles or changes the upstream source. |
|
|
102
|
+
| `/skill:pistack-status` | Asks the agent to produce the status report. |
|
|
103
|
+
|
|
104
|
+
## Check how well a workflow is supported
|
|
105
|
+
|
|
106
|
+
`/pistack-status` lists a support tier for each skill:
|
|
107
|
+
|
|
108
|
+
| Tier | Meaning |
|
|
109
|
+
| --- | --- |
|
|
110
|
+
| `native` | The skill needs no Pi-specific changes, or the adapter supplies a Pi version. |
|
|
111
|
+
| `adapted` | The upstream body works with the host mappings in its wrapper. |
|
|
112
|
+
| `dependency-gated` | The workflow needs a capability or executable that may be missing. |
|
|
113
|
+
| `experimental` | Part of the workflow has no direct Pi equivalent. |
|
|
114
|
+
| `unsupported` | Pi cannot provide a required host feature. |
|
|
115
|
+
|
|
116
|
+
The [compatibility registry](docs/compatibility.md) lists the tier and requirements of every
|
|
117
|
+
skill.
|
|
118
|
+
|
|
119
|
+
## Choose models for pstack roles
|
|
120
|
+
|
|
121
|
+
pstack assigns work to named model roles such as `feature`, `bug-fix`, and `judgment`. A role you
|
|
122
|
+
leave unset uses the current Pi session model.
|
|
123
|
+
|
|
124
|
+
To list the models in your Pi installation and assign them to roles, run the setup skill:
|
|
125
|
+
|
|
126
|
+
```text
|
|
127
|
+
/skill:pistack-setup
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
In a noninteractive session, set roles with `PISTACK_MODELS`:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
PISTACK_MODELS='feature=provider/model,bug-fix=provider/other-model' pi
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Run Pi noninteractively
|
|
137
|
+
|
|
138
|
+
A noninteractive session, such as `pi --print`, cannot answer the download question. To allow
|
|
139
|
+
the first download, set `PISTACK_ALLOW_BOOTSTRAP=1`:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
PISTACK_ALLOW_BOOTSTRAP=1 pi --print "Summarize this repository"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The adapter caches pstack in `~/.pi/agent/cache/pi-pstack-adapter/`. Later sessions reuse the
|
|
146
|
+
cached commit without network access.
|
|
147
|
+
|
|
148
|
+
## Use a different pstack version
|
|
149
|
+
|
|
150
|
+
Each adapter release certifies one pstack version and commit. `/pistack-status` shows both the
|
|
151
|
+
certified commit and the commit in use.
|
|
152
|
+
|
|
153
|
+
To select a branch, tag, commit, repository, or local checkout, run `/skill:pistack-setup`. The
|
|
154
|
+
adapter asks you to confirm before it changes the source. Restart Pi or run `/reload` afterward.
|
|
155
|
+
|
|
156
|
+
A branch or tag resolves to one commit when you select it. The adapter records that commit and
|
|
157
|
+
does not move it on later starts. `/pistack-status` warns when you use a custom repository or a
|
|
158
|
+
revision the adapter has not certified.
|
|
159
|
+
|
|
160
|
+
## Configuration reference
|
|
161
|
+
|
|
162
|
+
The setup skill writes user settings to `~/.pi/agent/pi-pstack-adapter.json` and project
|
|
163
|
+
settings to `.pi/pi-pstack-adapter.json`. Environment variables override both files:
|
|
164
|
+
|
|
165
|
+
| Variable | Effect |
|
|
166
|
+
| --- | --- |
|
|
167
|
+
| `PISTACK_NAMESPACE` | Replaces `pistack` in generated skill and command names. |
|
|
168
|
+
| `PISTACK_UPSTREAM_REPO` | Selects another Git repository. |
|
|
169
|
+
| `PISTACK_UPSTREAM_REF` | Selects a branch, tag, or commit. |
|
|
170
|
+
| `PISTACK_UPSTREAM_PATH` | Uses a local pstack checkout. |
|
|
171
|
+
| `PISTACK_UPSTREAM_PLUGIN_PATH` | Selects the plugin directory inside the checkout. |
|
|
172
|
+
| `PISTACK_ALLOW_BOOTSTRAP` | Allows a noninteractive first download. |
|
|
173
|
+
| `PISTACK_CACHE_DIR` | Changes the cache directory. |
|
|
174
|
+
| `PISTACK_MODELS` | Assigns models as comma-separated `role=provider/model` pairs. |
|
|
175
|
+
|
|
176
|
+
## Security and trust
|
|
177
|
+
|
|
178
|
+
Pi skills run with your user permissions, and a skill can tell the agent to run programs. The
|
|
179
|
+
adapter asks before it downloads pstack or changes the source. Review a custom repository before
|
|
180
|
+
you select it.
|
|
181
|
+
|
|
182
|
+
The adapter keeps each upstream skill body byte-for-byte so you can inspect it. Every generated
|
|
183
|
+
wrapper states that Pi policy, host safety rules, and your instructions override conflicting text
|
|
184
|
+
in a pstack skill.
|
|
185
|
+
|
|
186
|
+
## Uninstall
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
pi remove npm:pi-pstack-adapter
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
To reclaim disk space, delete `~/.pi/agent/cache/pi-pstack-adapter/` and, if you created it,
|
|
193
|
+
`~/.pi/agent/pi-pstack-adapter.json`.
|
|
194
|
+
|
|
195
|
+
## License
|
|
196
|
+
|
|
197
|
+
This adapter is available under the [MIT License](LICENSE). Upstream pstack is also MIT-licensed
|
|
198
|
+
and remains copyright its authors.
|
package/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.3.0
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Set up the pstack adapter
|
|
2
|
+
|
|
3
|
+
Upstream pstack ships a `setup-pstack` skill that writes `~/.cursor/rules/pstack-models.mdc`,
|
|
4
|
+
a Cursor-only always-applied rule full of Cursor model slugs. Pi has neither that file nor
|
|
5
|
+
those models, so this adapter replaces the body with the Pi equivalent.
|
|
6
|
+
|
|
7
|
+
Two things are configurable. Model roles, and the upstream source.
|
|
8
|
+
|
|
9
|
+
## Model roles
|
|
10
|
+
|
|
11
|
+
pstack skills name a model per role. In Pi those names mean nothing, so each role maps to a
|
|
12
|
+
model in your own catalogue. A role you never configure inherits the parent session model,
|
|
13
|
+
which is a working default, not a failure.
|
|
14
|
+
|
|
15
|
+
Roles used by pstack workflows.
|
|
16
|
+
|
|
17
|
+
| role | used by |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `feature` | feature playbook |
|
|
20
|
+
| `refactoring` | refactoring playbook |
|
|
21
|
+
| `bug-fix` | bug-fix playbook |
|
|
22
|
+
| `perf-issue` | perf playbook |
|
|
23
|
+
| `hillclimb` | sustained metric improvement |
|
|
24
|
+
| `judgment` | prose, review, and judgment delegates |
|
|
25
|
+
| `strongest-judgment` | the hardest cross-cutting changes |
|
|
26
|
+
|
|
27
|
+
The status report lists the same roles, so read it back rather than trusting this table if the
|
|
28
|
+
adapter has been upgraded.
|
|
29
|
+
|
|
30
|
+
Steps.
|
|
31
|
+
|
|
32
|
+
1. Call the adapter tool with `action: "models"` to list the provider and model ids this Pi
|
|
33
|
+
installation can actually reach. Do not invent ids.
|
|
34
|
+
2. Ask the user which model each role should use. Offer the listed ids, and offer
|
|
35
|
+
`inherit` for any role they do not care about. Use the structured question tool when it is
|
|
36
|
+
available; otherwise ask in plain text. Only ids from step 1 are accepted.
|
|
37
|
+
3. For each answered role, call the adapter tool with `action: "set_model"`, the role, and the
|
|
38
|
+
chosen `provider/model` id. Pass `scope: "project"` when the user wants the choice to apply
|
|
39
|
+
only to this repository.
|
|
40
|
+
4. Read back `action: "status"` and show the user what was written.
|
|
41
|
+
|
|
42
|
+
For a scripted environment, set `PISTACK_MODELS` instead, for example
|
|
43
|
+
`PISTACK_MODELS=feature=anthropic/claude-sonnet-4-5,bug-fix=openai/gpt-5`. The environment wins
|
|
44
|
+
over both config files, so CI never needs this dialog.
|
|
45
|
+
|
|
46
|
+
## Upstream source
|
|
47
|
+
|
|
48
|
+
By default the adapter uses the pstack revision this release was tested against. Change it only
|
|
49
|
+
when you are deliberately testing another revision.
|
|
50
|
+
|
|
51
|
+
Call the adapter tool with `action: "set_source"` and one of these.
|
|
52
|
+
|
|
53
|
+
- `ref` with a branch, tag, or commit. A branch or tag is resolved to a commit once, here, and
|
|
54
|
+
recorded. Later sessions keep that commit. The adapter never advances it on its own.
|
|
55
|
+
- `repo` with another repository. This is outside the tested trust boundary.
|
|
56
|
+
- `localPath` with a directory holding a pstack checkout. Use this when developing pstack itself.
|
|
57
|
+
|
|
58
|
+
The adapter asks the user to confirm every source change itself and refuses without an
|
|
59
|
+
interactive session, so a change cannot happen on your say-so alone. Explain the consequence in
|
|
60
|
+
plain words before you call it, and report a refusal as a refusal.
|
|
61
|
+
|
|
62
|
+
Regeneration happens on the next Pi start. Tell the user to restart Pi, or run `/reload`.
|
|
63
|
+
|
|
64
|
+
## Finish
|
|
65
|
+
|
|
66
|
+
End by reporting, in your own words, which roles were set, which still inherit, the resolved
|
|
67
|
+
upstream commit, and the trust level from the status output.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# pstack adapter status
|
|
2
|
+
|
|
3
|
+
Report what the adapter is actually running, so nobody has to guess whether a pstack workflow
|
|
4
|
+
is verified here.
|
|
5
|
+
|
|
6
|
+
1. Call the adapter tool with `action: "status"`.
|
|
7
|
+
2. Show the user the full report. Do not summarize away the trust line, the resolved commit, or
|
|
8
|
+
any `error` diagnostic.
|
|
9
|
+
3. If a capability is missing, name the capability, name the workflows it gates, and give the
|
|
10
|
+
install command from the report.
|
|
11
|
+
4. If any diagnostic is an `error`, say which upstream resource failed and that the adapter
|
|
12
|
+
skipped it.
|
|
13
|
+
|
|
14
|
+
To check one workflow before starting it, call the tool with `action: "check"` and the skill
|
|
15
|
+
name. That reports the capabilities and executables that workflow needs and whether this
|
|
16
|
+
environment has them, before the workflow does any work.
|
|
17
|
+
|
|
18
|
+
Support tiers mean this.
|
|
19
|
+
|
|
20
|
+
| tier | meaning |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `native` | adapter-owned content, written for Pi |
|
|
23
|
+
| `adapted` | upstream body works once you apply the host mapping |
|
|
24
|
+
| `dependency-gated` | needs a capability or an executable that may be absent |
|
|
25
|
+
| `experimental` | depends on host behavior with no clean Pi equivalent, may partly work |
|
|
26
|
+
| `unsupported` | needs something Pi cannot provide; the workflow cannot reach its purpose |
|
|
27
|
+
|
|
28
|
+
A tier is a claim about what the adapter verified, not a promise about a given run.
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Compatibility
|
|
2
|
+
|
|
3
|
+
The compatibility registry in `src/registry.ts` assigns one support tier to every skill in the
|
|
4
|
+
certified pstack revision. Generation reads it, the wrapper frontmatter publishes it, and
|
|
5
|
+
`/pistack-status` reports it.
|
|
6
|
+
|
|
7
|
+
Certified revision: pstack `0.15.9` at `e43c7ee26e0038c6c1fa8380dd34ce86ff94cb2a` in
|
|
8
|
+
`https://github.com/cursor/plugins`.
|
|
9
|
+
|
|
10
|
+
## Platforms
|
|
11
|
+
|
|
12
|
+
| platform | status | shell the skills run in |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| Linux, including Pi inside WSL | supported | Bash |
|
|
15
|
+
| macOS | supported | Bash |
|
|
16
|
+
| Windows, native | supported | Git Bash, Pi's default `bash` tool shell |
|
|
17
|
+
| anything else | experimental | whatever Pi resolves |
|
|
18
|
+
|
|
19
|
+
The tiers below apply on every supported platform. `/pistack-check` looks for per-skill
|
|
20
|
+
executables in the shell the skills run in, with Pi's `shellCommandPrefix` applied. On Windows
|
|
21
|
+
that matters most, because Git Bash adds `/usr/bin` and `/mingw64/bin` to the `PATH` Pi
|
|
22
|
+
started with. A shell that is missing, inactive, or cannot run a command blocks every workflow.
|
|
23
|
+
|
|
24
|
+
Windows evidence at the certified revision, on Windows 11 with Git for Windows 2.53, Node 22,
|
|
25
|
+
and Pi 1.0.2:
|
|
26
|
+
|
|
27
|
+
- The unit suite passes, and `npm run test:isolated` passes against the adapter commit that
|
|
28
|
+
introduced Windows support. Pi registers all 51 skills, and a later run reuses the cache
|
|
29
|
+
without the network. CI runs the unit suite on Windows for every change.
|
|
30
|
+
- Every upstream helper script ran in Git Bash: `show-me-your-work/scripts/log.sh`,
|
|
31
|
+
`poteto-mode/scripts/check-plan.mjs`, `worktree-audit.sh`, `watch-pr`, and `orch.ts`.
|
|
32
|
+
- Git for Windows bundles `git`, `curl`, `nproc`, and the POSIX tools the skill bodies call,
|
|
33
|
+
but not `uptime`, so `benchmark-checklist` reports it missing. `gh`, `tailscale`, and `sudo`
|
|
34
|
+
are separate installs on Windows, as on the other platforms.
|
|
35
|
+
- The adapter checks out upstream with `core.autocrlf=false`. Git for Windows enables
|
|
36
|
+
`autocrlf` system-wide, which would otherwise rewrite every upstream file to CRLF. A cache
|
|
37
|
+
written before that setting existed is repaired on the next start, or refused with a recovery
|
|
38
|
+
step when it cannot be written.
|
|
39
|
+
|
|
40
|
+
A session that replaces the `bash` tool with `powershell` cannot run the skills.
|
|
41
|
+
`/pistack-status` reports it, and `/pistack-check` refuses to clear any workflow.
|
|
42
|
+
|
|
43
|
+
## Tiers
|
|
44
|
+
|
|
45
|
+
| tier | meaning |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `native` | adapter-owned content, or a body with no host-specific machinery at all |
|
|
48
|
+
| `adapted` | works once the reader applies the host mapping the wrapper links to |
|
|
49
|
+
| `dependency-gated` | needs a host capability or an executable that may be absent |
|
|
50
|
+
| `experimental` | depends on host behavior with no clean Pi equivalent, may partly work |
|
|
51
|
+
| `unsupported` | needs something Pi cannot provide, so the workflow cannot reach its purpose |
|
|
52
|
+
|
|
53
|
+
## Changing a tier
|
|
54
|
+
|
|
55
|
+
A tier is a claim about what was verified, so raising one needs evidence, not optimism.
|
|
56
|
+
|
|
57
|
+
1. Run the workflow end to end in Pi against the certified revision.
|
|
58
|
+
2. Record what the workflow produced, not that it started. A `dependency-gated` skill rises to
|
|
59
|
+
`adapted` only when its delegation or question steps completed against a real provider.
|
|
60
|
+
3. An `experimental` skill rises only when every Cursor-specific step has a Pi equivalent that
|
|
61
|
+
was exercised, not merely described in the host mapping.
|
|
62
|
+
4. An `unsupported` skill rises only when the missing host feature exists in Pi.
|
|
63
|
+
5. Add or update a test that fails if the claim regresses.
|
|
64
|
+
|
|
65
|
+
Lowering a tier needs one reproduction of the failure and a note saying what broke.
|
|
66
|
+
|
|
67
|
+
## Registry
|
|
68
|
+
|
|
69
|
+
### native (30)
|
|
70
|
+
|
|
71
|
+
| upstream skill | Pi skill | capabilities | executables | why |
|
|
72
|
+
| --- | --- | --- | --- | --- |
|
|
73
|
+
| `bro` | `/skill:pistack-bro` | - | - | - |
|
|
74
|
+
| `principle-attack-the-premise` | `/skill:pistack-principle-attack-the-premise` | - | - | - |
|
|
75
|
+
| `principle-boundary-discipline` | `/skill:pistack-principle-boundary-discipline` | - | - | - |
|
|
76
|
+
| `principle-build-the-lever` | `/skill:pistack-principle-build-the-lever` | - | - | - |
|
|
77
|
+
| `principle-encode-lessons-in-structure` | `/skill:pistack-principle-encode-lessons-in-structure` | - | - | - |
|
|
78
|
+
| `principle-exhaust-the-design-space` | `/skill:pistack-principle-exhaust-the-design-space` | - | - | - |
|
|
79
|
+
| `principle-experience-first` | `/skill:pistack-principle-experience-first` | - | - | - |
|
|
80
|
+
| `principle-explain-the-number` | `/skill:pistack-principle-explain-the-number` | - | - | For a performance number it hands off to benchmark-checklist, which needs uptime and nproc. Check that skill first. |
|
|
81
|
+
| `principle-fix-root-causes` | `/skill:pistack-principle-fix-root-causes` | - | - | - |
|
|
82
|
+
| `principle-foundational-thinking` | `/skill:pistack-principle-foundational-thinking` | - | - | - |
|
|
83
|
+
| `principle-guard-the-context-window` | `/skill:pistack-principle-guard-the-context-window` | - | - | - |
|
|
84
|
+
| `principle-laziness-protocol` | `/skill:pistack-principle-laziness-protocol` | - | - | - |
|
|
85
|
+
| `principle-make-operations-idempotent` | `/skill:pistack-principle-make-operations-idempotent` | - | - | - |
|
|
86
|
+
| `principle-migrate-callers-then-delete-legacy-apis` | `/skill:pistack-principle-migrate-callers-then-delete-legacy-apis` | - | - | - |
|
|
87
|
+
| `principle-minimize-reader-load` | `/skill:pistack-principle-minimize-reader-load` | - | - | - |
|
|
88
|
+
| `principle-model-the-domain` | `/skill:pistack-principle-model-the-domain` | - | - | - |
|
|
89
|
+
| `principle-never-block-on-the-human` | `/skill:pistack-principle-never-block-on-the-human` | - | - | - |
|
|
90
|
+
| `principle-outcome-oriented-execution` | `/skill:pistack-principle-outcome-oriented-execution` | - | - | - |
|
|
91
|
+
| `principle-prove-it-works` | `/skill:pistack-principle-prove-it-works` | - | - | - |
|
|
92
|
+
| `principle-redesign-from-first-principles` | `/skill:pistack-principle-redesign-from-first-principles` | - | - | - |
|
|
93
|
+
| `principle-separate-before-serializing-shared-state` | `/skill:pistack-principle-separate-before-serializing-shared-state` | - | - | - |
|
|
94
|
+
| `principle-sequence-verifiable-units` | `/skill:pistack-principle-sequence-verifiable-units` | - | - | - |
|
|
95
|
+
| `principle-subtract-before-you-add` | `/skill:pistack-principle-subtract-before-you-add` | - | - | - |
|
|
96
|
+
| `principle-test-behavior-not-implementation` | `/skill:pistack-principle-test-behavior-not-implementation` | - | - | - |
|
|
97
|
+
| `principle-type-system-discipline` | `/skill:pistack-principle-type-system-discipline` | - | - | - |
|
|
98
|
+
| `setup-pstack` | `/skill:pistack-setup` | - | - | The upstream body only writes a Cursor .mdc rule, so the adapter replaces it with a Pi setup workflow. |
|
|
99
|
+
| `tdd` | `/skill:pistack-tdd` | - | - | - |
|
|
100
|
+
| `technical-writing` | `/skill:pistack-technical-writing` | - | - | - |
|
|
101
|
+
| `typescript-best-practices` | `/skill:pistack-typescript-best-practices` | - | - | - |
|
|
102
|
+
| `unslop` | `/skill:pistack-unslop` | - | - | - |
|
|
103
|
+
|
|
104
|
+
### adapted (1)
|
|
105
|
+
|
|
106
|
+
| upstream skill | Pi skill | capabilities | executables | why |
|
|
107
|
+
| --- | --- | --- | --- | --- |
|
|
108
|
+
| `create-verification-skill` | `/skill:pistack-create-verification-skill` | - | - | Only the generated skill's output path needs remapping to Pi's skill directory. |
|
|
109
|
+
|
|
110
|
+
### dependency-gated (13)
|
|
111
|
+
|
|
112
|
+
| upstream skill | Pi skill | capabilities | executables | why |
|
|
113
|
+
| --- | --- | --- | --- | --- |
|
|
114
|
+
| `architect` | `/skill:pistack-architect` | `delegation` | - | Phase B delegates to arena runners, so it cannot run without parallel subagents. |
|
|
115
|
+
| `arena` | `/skill:pistack-arena` | `delegation` | `git` | The whole skill is spawning N candidate subagents plus a judge. |
|
|
116
|
+
| `benchmark-checklist` | `/skill:pistack-benchmark-checklist` | - | `uptime`, `nproc` | Its setup step checks load with `uptime` and cores with `nproc`. macOS has no `nproc` without GNU coreutils, and Git Bash on Windows has no `uptime`. |
|
|
117
|
+
| `blast-radius` | `/skill:pistack-blast-radius` | - | `git`, `gh` | Needs git and gh to read the diff, commits, and PR before any analysis. |
|
|
118
|
+
| `correct` | `/skill:pistack-correct` | - | `git` | Mines commit history, then commits fixes and edits lint, CI, and agent instruction files. Run it on a branch you will review. |
|
|
119
|
+
| `figure-it-out` | `/skill:pistack-figure-it-out` | `delegation` | - | Phase B fan-out and the architect/arena routing require parallel subagents. |
|
|
120
|
+
| `how` | `/skill:pistack-how` | `delegation` | - | Every path spawns explorer or explainer subagents; nothing runs inline. |
|
|
121
|
+
| `interrogate` | `/skill:pistack-interrogate` | `delegation` | `git` | Multi-model adversarial review is entirely one subagent per configured model. |
|
|
122
|
+
| `maintain-verification-skill` | `/skill:pistack-maintain-verification-skill` | `delegation` | - | Source wave launches one read-only subagent per feature file. |
|
|
123
|
+
| `no-comments` | `/skill:pistack-no-comments` | `delegation` | `git` | Step 1 must spawn the named Comment Sicko agent; the skill only triages its report. |
|
|
124
|
+
| `show-me-your-work` | `/skill:pistack-show-me-your-work` | `delegation` | - | The mandatory cross-model review of the trail requires spawning a different-family subagent. |
|
|
125
|
+
| `teach` | `/skill:pistack-teach` | `delegation` | - | It runs the how and why skills, both of which need subagents. |
|
|
126
|
+
| `why` | `/skill:pistack-why` | `delegation` | `git`, `gh` | Default posture spawns one investigator subagent per evidence category plus a synthesizer. |
|
|
127
|
+
|
|
128
|
+
### experimental (5)
|
|
129
|
+
|
|
130
|
+
| upstream skill | Pi skill | capabilities | executables | why |
|
|
131
|
+
| --- | --- | --- | --- | --- |
|
|
132
|
+
| `automate-me` | `/skill:pistack-automate-me` | `delegation`, `structured-question` | `git`, `gh` | Mining step depends on Cursor transcript files and the built-in create-skill skill, with no Pi equivalent. |
|
|
133
|
+
| `poteto-mode` | `/skill:pistack-poteto-mode` | `delegation`, `structured-question` | `git`, `gh` | Sticky-mode hosting plus references to Cursor built-in and plugin skills only partially map to Pi. |
|
|
134
|
+
| `recall` | `/skill:pistack-recall` | `delegation` | `git`, `gh` | Core corpus is Cursor's on-disk transcript JSONL, so only the git/gh and shared-record half survives. |
|
|
135
|
+
| `reflect` | `/skill:pistack-reflect` | `delegation` | - | Transcript mining and create-skill routing are Cursor-specific, though the digest fallback partly works. |
|
|
136
|
+
| `swarm` | `/skill:pistack-swarm` | `delegation` | - | Cloud background workers and cloud_base_branch have no Pi mapping; only local fan-out approximates it. |
|
|
137
|
+
|
|
138
|
+
### unsupported (1)
|
|
139
|
+
|
|
140
|
+
| upstream skill | Pi skill | capabilities | executables | why |
|
|
141
|
+
| --- | --- | --- | --- | --- |
|
|
142
|
+
| `make-bot-ui` | `/skill:pistack-make-bot-ui` | - | `curl`, `tailscale`, `sudo` | Built entirely on Cursor Automations webhook routines and the secret-request card. |
|
|
143
|
+
|
|
144
|
+
## Agents
|
|
145
|
+
|
|
146
|
+
| upstream agent | Pi agent | notes |
|
|
147
|
+
| --- | --- | --- |
|
|
148
|
+
| `comment-sicko` | `pistack-comment-sicko` | Display name `Comment Sicko` is preserved in the description. Needs `git` to scope a diff. |
|
|
149
|
+
| `poteto-agent` | `pistack-poteto-agent` | Upstream `is_background: true` has no runtime equivalent; the caller chooses `async` on the `subagent` call. |
|
|
150
|
+
|
|
151
|
+
Both register through the `pi-subagents:runtime-agent-register:v1` contract. Without an owner for
|
|
152
|
+
that event, the status report says so rather than dropping them silently.
|
|
153
|
+
|
|
154
|
+
## Skills the adapter replaces
|
|
155
|
+
|
|
156
|
+
`setup-pstack` writes a Cursor `.mdc` rule and nothing else, so the adapter substitutes its own
|
|
157
|
+
body and publishes it as `/skill:pistack-setup`. The upstream skill stays represented, and the
|
|
158
|
+
wrapper frontmatter records `pistack-upstream-skill: setup-pstack`.
|
|
159
|
+
|
|
160
|
+
## Unknown skills
|
|
161
|
+
|
|
162
|
+
A skill present upstream but absent from the registry is generated as `experimental` and reported
|
|
163
|
+
in diagnostics. A skill in the registry but absent upstream is reported as removed. Neither case
|
|
164
|
+
is silent.
|