-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
docs(pi): add experimental pi support (Phase 1) #500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sheurich
wants to merge
4
commits into
obra:main
Choose a base branch
from
sheurich:feature/pi-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+265
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Installing Superpowers for Pi | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - [Pi](https://github.com/mariozechner/pi-coding-agent) installed | ||
| - Git | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| pi install https://github.com/obra/superpowers | ||
| ``` | ||
|
|
||
| Pi clones the repo and discovers all skills from the `skills/` directory automatically. | ||
|
|
||
| ### Alternative: Local Clone | ||
|
|
||
| If you already have a local clone: | ||
|
|
||
| ```bash | ||
| pi install /path/to/superpowers | ||
| ``` | ||
|
|
||
| ## Verify | ||
|
|
||
| Check that the package appears: | ||
|
|
||
| ```bash | ||
| pi list | ||
| ``` | ||
|
|
||
| Then start pi and use `/skill:brainstorming` to confirm skills load. | ||
|
|
||
| ## Updating | ||
|
|
||
| Update superpowers: | ||
|
|
||
| ```bash | ||
| pi update https://github.com/obra/superpowers | ||
| ``` | ||
|
|
||
| Or pull manually if using a local path: | ||
|
|
||
| ```bash | ||
| cd /path/to/superpowers && git pull | ||
| ``` | ||
|
|
||
| ## Uninstalling | ||
|
|
||
| ```bash | ||
| pi remove https://github.com/obra/superpowers | ||
| ``` | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Or, if installed from a local path: | ||
|
|
||
| ```bash | ||
| pi remove /path/to/superpowers | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,197 @@ | ||
| # Superpowers for Pi | ||
|
|
||
| > **Experimental.** Pi support is new. Report issues at <https://github.com/obra/superpowers/issues>. | ||
|
|
||
| Complete guide for using Superpowers with [pi](https://github.com/mariozechner/pi-coding-agent). | ||
|
|
||
| ## Quick Install | ||
|
|
||
| ```bash | ||
| pi install https://github.com/obra/superpowers | ||
| ``` | ||
|
|
||
| Pi clones the repository and discovers all skills from the `skills/` directory automatically. No plugins, hooks, or bootstrap scripts required. | ||
|
|
||
| ## Installation Options | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - [Pi](https://github.com/mariozechner/pi-coding-agent) installed | ||
| - Git | ||
|
|
||
| ### Option A: Git Package (recommended) | ||
|
|
||
| ```bash | ||
| pi install https://github.com/obra/superpowers | ||
| ``` | ||
|
|
||
| This clones to `~/.pi/agent/git/github.com/obra/superpowers/` and adds the package to `~/.pi/agent/settings.json`. | ||
|
|
||
| ### Option B: Local Path | ||
|
|
||
| If you already have a local clone: | ||
|
|
||
| ```bash | ||
| pi install /path/to/superpowers | ||
| ``` | ||
|
|
||
| ### Option C: Symlink Skills Only | ||
|
|
||
| To add superpowers skills alongside an existing skill tree: | ||
|
|
||
| ```bash | ||
| ln -s /path/to/superpowers/skills ~/.pi/agent/skills/superpowers | ||
| ``` | ||
|
|
||
| > **Note:** Symlinked skills are not managed by `pi update` or shown by `pi list`. Update manually with `git pull`. | ||
|
|
||
| ### Verify Installation | ||
|
|
||
| Check the package appears: | ||
|
|
||
| ```bash | ||
| pi list | ||
| ``` | ||
|
|
||
| Then start pi and type `/skill:brainstorming` to confirm skills load. | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Finding Skills | ||
|
|
||
| Pi lists available skills at startup in the `<available_skills>` section of the system prompt. The agent sees skill names and descriptions automatically. | ||
|
|
||
| ### Loading a Skill | ||
|
|
||
| Three ways: | ||
|
|
||
| 1. **Automatic** — the agent reads a matching skill when a task fits its description | ||
| 2. **Command** — type `/skill:brainstorming` (or any skill name) | ||
| 3. **Direct** — the agent uses `read` on the SKILL.md file | ||
|
|
||
| ### Personal Skills | ||
|
|
||
| Create skills in `~/.pi/agent/skills/`: | ||
|
|
||
| ```bash | ||
| mkdir -p ~/.pi/agent/skills/my-skill | ||
| ``` | ||
|
|
||
| Create `~/.pi/agent/skills/my-skill/SKILL.md`: | ||
|
|
||
| ```markdown | ||
| --- | ||
| name: my-skill | ||
| description: Use when [condition] - [what it does] | ||
| --- | ||
|
|
||
| # My Skill | ||
|
|
||
| [Your skill content here] | ||
| ``` | ||
|
|
||
| ### Project Skills | ||
|
|
||
| Create project-specific skills in `.pi/skills/` within your project. | ||
|
|
||
| ## Tool Mapping | ||
|
|
||
| Skills are written for Claude Code. Pi equivalents: | ||
|
|
||
| | Claude Code | Pi | Notes | | ||
| |---|---|---| | ||
| | `Skill` tool | `read` tool / `/skill:name` | Pi loads skill content via `read` | | ||
| | `TodoWrite` | — | No direct equivalent; use markdown checklists | | ||
| | `Task` with subagents | `subagent` tool | Pi's native delegation system | | ||
| | `Read` | `read` | Same | | ||
| | `Write` | `write` | Same | | ||
| | `Edit` | `edit` | Same | | ||
| | `Bash` | `bash` | Same | | ||
|
|
||
| ### Subagent Differences | ||
|
|
||
| Claude Code's `Task` tool spawns a subagent with isolated context. Pi's `subagent` tool provides similar functionality with three modes: | ||
|
|
||
| - **single** — one agent, one task (closest to Claude Code's `Task`) | ||
| - **parallel** — multiple independent tasks | ||
| - **chain** — sequential tasks where each receives prior output | ||
|
|
||
| ## Architecture | ||
|
|
||
| Pi's package system discovers superpowers with zero integration code: | ||
|
|
||
| 1. `pi install` clones the repo | ||
| 2. Pi scans the `skills/` directory (convention-based discovery) | ||
| 3. Each `SKILL.md` frontmatter is parsed for name and description | ||
| 4. Skills appear in the system prompt's `<available_skills>` XML | ||
| 5. The agent loads full skill content on demand via `read` | ||
|
|
||
| No plugins, hooks, bootstrap scripts, or CLI wrappers needed. | ||
|
|
||
| ### Skill Locations | ||
|
|
||
| Pi discovers skills from multiple locations. On name collision, the first skill found wins. See [pi's skill documentation](https://github.com/mariozechner/pi-coding-agent/blob/main/docs/skills.md) for authoritative loading order. | ||
|
|
||
| - **Global** — `~/.pi/agent/skills/` | ||
| - **Project** — `.pi/skills/` | ||
| - **Settings/Packages** — `skills` array and installed packages | ||
| - **CLI** — `--skill <path>` | ||
|
|
||
| ## Updating | ||
|
|
||
| ```bash | ||
| pi update | ||
| ``` | ||
|
|
||
| `pi update` updates all installed packages. To update only Superpowers: | ||
|
|
||
| ```bash | ||
| pi update https://github.com/obra/superpowers | ||
| ``` | ||
|
|
||
| For local path installs, pull manually: | ||
|
|
||
| ```bash | ||
| cd /path/to/superpowers && git pull | ||
| ``` | ||
|
|
||
| ## Uninstalling | ||
|
|
||
| ```bash | ||
| pi remove https://github.com/obra/superpowers | ||
| ``` | ||
|
|
||
| For symlink installs: | ||
|
|
||
| ```bash | ||
| rm ~/.pi/agent/skills/superpowers | ||
| ``` | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### Skills not found | ||
|
|
||
| 1. Check package is installed: `pi list` | ||
| 2. Check skills exist: `ls ~/.pi/agent/git/github.com/obra/superpowers/skills/` | ||
| 3. Verify each skill has a `SKILL.md` with valid frontmatter | ||
|
|
||
| ### Skill not triggering automatically | ||
|
|
||
| Pi includes skill descriptions in the system prompt but relies on the model to decide when to load them. Use `/skill:name` to load explicitly. | ||
|
|
||
| ### Tool mapping confusion | ||
|
|
||
| If the agent attempts a Claude Code tool that doesn't exist in pi, remind it of the mapping above. | ||
|
|
||
| ## Known Differences from Claude Code | ||
|
|
||
| - **No `TodoWrite`** — Pi has no built-in task tracking tool. Skills that use `TodoWrite` checklists produce markdown checklists instead. | ||
| - **No hooks system** — Pi doesn't inject bootstrap content on session start. The `using-superpowers` skill triggers via its description in `<available_skills>`. | ||
| - **Skill loading** — Claude Code has a dedicated `Skill` tool. Pi uses `read` on SKILL.md files. Functionally equivalent, syntactically different. | ||
| - **Subagent model** — Pi's `subagent` tool supports single/parallel/chain modes. Claude Code's `Task` maps to single mode. | ||
|
|
||
| ## Getting Help | ||
|
|
||
| - Report issues: <https://github.com/obra/superpowers/issues> | ||
| - Main documentation: <https://github.com/obra/superpowers> | ||
| - Pi documentation: <https://github.com/mariozechner/pi-coding-agent> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.