omp packages

pi-pstack-adapter0.7.0

Run Cursor's official pstack plugin inside Pi from an unmodified upstream checkout

GitHub Actions Published 14 hours ago MIT ~357 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-pstack-adapter

npm CI License: MIT

Use Cursor's pstack skills and agents in Pi.

pstack is Cursor's collection of engineering workflows: design reviews (how), prose cleanup (unslop), test-driven development (tdd), parallel fan-out (swarm), and the full Poteto Mode working style. This package downloads a tested pstack release and exposes every workflow as a Pi skill named pistack-*. The upstream files stay unmodified, so you can audit exactly what the agent reads.

Quick start

  1. Install the package:

    pi install npm:pi-pstack-adapter
    
  2. Start Pi. On the first interactive start, the adapter asks before it downloads pstack. Answer yes.

  3. Run a workflow. unslop needs no other packages:

    /skill:pistack-unslop
    

To see everything the adapter loaded, run /pistack-status.

Requirements

  • Pi
  • Git on your PATH
  • Linux, macOS, or Windows

On native Windows, install Git for Windows. It provides both Git and the Git Bash shell that Pi's bash tool uses. pstack skills are written as Bash commands, so keep the bash tool active rather than switching to Pi's powershell tool. /pistack-status warns when Bash is missing or the bash tool is inactive. Pi inside WSL counts as Linux.

Add optional providers for delegating workflows

Some workflows hand work to subagents or ask you multiple-choice questions. Two providers can run the subagents:

  • T3 Code. When Pi runs inside T3 Code, workflows delegate through T3's delegate_task tool. Each child appears in T3, can run on any provider and model T3 offers, and can work in its own worktree. You install nothing extra.
  • pi-subagents. Outside T3 Code, install pi-subagents. The upstream agents register as pistack-comment-sicko and pistack-poteto-agent.

For multiple-choice questions, install pi-ask-user:

pi install npm:pi-subagents
pi install npm:pi-ask-user

The adapter uses T3 Code first and falls back to pi-subagents. To reverse that order, set "delegation": "pi-subagents" in the adapter config, or set PISTACK_DELEGATION=pi-subagents. Restart Pi or run /reload after changing it. /pistack-status shows the order and the provider the session resolved.

The adapter counts T3's tools, including task_status and orchestrator_capabilities, only when T3 Code's own bridge registered them. A tool that another extension or MCP server registers under the same name is ignored, and /pistack-check <skill> names the one tool to delegate with.

When a delegating workflow starts, the adapter turns on that provider's tool, even if you turned it off in the tool selector. This happens whether you run the workflow's /skill: command or the agent opens the skill itself. While Poteto Mode is on, the adapter turns it on for every prompt.

To find missing providers or executables before you start a workflow, run /pistack-check <skill>.

Install from Git instead of npm

To track the repository directly, install from GitHub:

pi install git:github.com/elderfo/pi-pstack-adapter

To pin a release, add its tag, for example git:github.com/elderfo/pi-pstack-adapter@v0.3.0. For a pinned npm release, use npm:pi-pstack-adapter@0.3.0.

Run pstack workflows

Each pstack skill appears as a /skill:pistack-* command:

/skill:pistack-how
/skill:pistack-unslop
/skill:pistack-poteto-mode

Before you run a workflow, check what it needs:

/pistack-check how

The check reports the workflow's support tier and any missing capabilities or executables.

The adapter also adds these commands:

Command What it does
/pistack-status Shows versions, the resolved commit, trust, capabilities, support tiers, and diagnostics.
/pistack-check <skill> Checks one workflow's requirements.
/pistack-mode on|off|status Turns Poteto Mode on or off for the current session.
/skill:pistack-setup Assigns Pi models to pstack roles or changes the upstream source.
/skill:pistack-status Asks the agent to produce the status report.

Check how well a workflow is supported

/pistack-status lists a support tier for each skill:

Tier Meaning
native The skill needs no Pi-specific changes, or the adapter supplies a Pi version.
adapted The upstream body works with the host mappings in its wrapper.
dependency-gated The workflow needs a capability or executable that may be missing.
experimental Part of the workflow has no direct Pi equivalent.
unsupported Pi cannot provide a required host feature.

The compatibility registry lists the tier and requirements of every skill.

Choose models for pstack roles

pstack assigns work to named model roles such as feature, bug-fix, and judgment. The general role covers every other delegate, such as explorers, swarm workers, and ad-hoc helpers. A role you leave unset uses general, and uses the model of the agent that starts it only when general is unset too.

To list the models in your Pi installation and assign them to roles, run the setup skill:

/skill:pistack-setup

In a noninteractive session, set roles with PISTACK_MODELS:

PISTACK_MODELS='feature=provider/model,bug-fix=provider/other-model' pi

Add a thinking level to a role with a :level suffix. The levels are off, minimal, low, medium, high, xhigh, and max:

PISTACK_MODELS='feature=provider/model:medium,judgment=provider/other-model:high' pi

Role names are lowercase letters, digits, and hyphens. A model value is printable ASCII with no spaces or markup characters, at most 128 characters. A config entry that breaks these rules stops the adapter at startup with an error that names the file, so fix the key there and restart Pi.

A role without a level passes none, so the delegation backend applies its own default. A role's level is a ceiling: a delegate may lower it for routine work but never raises it. A role you leave unset, with general unset too, inherits the model and thinking level of the agent that starts it. A strongest-judgment delegate at xhigh would then start every helper at xhigh, so set general to keep helpers at a cheaper level. The pstack_adapter tool's set_model action takes the same level in its thinking parameter. A level the model does not offer is clamped by Pi at run time.

Run Pi noninteractively

A noninteractive session, such as pi --print, cannot answer the download question. To allow the first download, set PISTACK_ALLOW_BOOTSTRAP=1:

PISTACK_ALLOW_BOOTSTRAP=1 pi --print "Summarize this repository"

The adapter caches pstack in ~/.pi/agent/cache/pi-pstack-adapter/. Later sessions reuse the cached commit without network access.

Use a different pstack version

Each adapter release certifies one pstack version and commit. /pistack-status shows both the certified commit and the commit in use.

To select a branch, tag, commit, repository, or local checkout, run /skill:pistack-setup. The adapter asks you to confirm before it changes the source. Restart Pi or run /reload afterward.

A branch or tag resolves to one commit when you select it. The adapter records that commit and does not move it on later starts. /pistack-status warns when you use a custom repository or a revision the adapter has not certified.

Configuration reference

The setup skill writes user settings to ~/.pi/agent/pi-pstack-adapter.json and project settings to .pi/pi-pstack-adapter.json. Environment variables override both files:

Variable Effect
PISTACK_NAMESPACE Replaces pistack in generated skill and command names.
PISTACK_UPSTREAM_REPO Selects another Git repository.
PISTACK_UPSTREAM_REF Selects a branch, tag, or commit.
PISTACK_UPSTREAM_PATH Uses a local pstack checkout.
PISTACK_UPSTREAM_PLUGIN_PATH Selects the plugin directory inside the checkout.
PISTACK_ALLOW_BOOTSTRAP Allows a noninteractive first download.
PISTACK_CACHE_DIR Changes the cache directory.
PISTACK_MODELS Assigns models as comma-separated role=provider/model[:thinking] pairs.
PISTACK_DELEGATION Sets the delegation provider to try first: t3 (default) or pi-subagents. The config file key is delegation.

Security and trust

Pi skills run with your user permissions, and a skill can tell the agent to run programs. The adapter asks before it downloads pstack or changes the source. Review a custom repository before you select it.

The adapter keeps each upstream skill body byte-for-byte so you can inspect it. Every generated wrapper states that Pi policy, host safety rules, and your instructions override conflicting text in a pstack skill.

Uninstall

pi remove npm:pi-pstack-adapter

To reclaim disk space, delete ~/.pi/agent/cache/pi-pstack-adapter/ and, if you created it, ~/.pi/agent/pi-pstack-adapter.json.

License

This adapter is available under the MIT License. Upstream pstack is also MIT-licensed and remains copyright its authors.