repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

extensions/superpowers/README.md

Raw

superpowers

Background subagents and explicit workflow discipline for Pi.

Activation

pi -e ./extensions/superpowers/index.ts
pi -e ./extensions/superpowers/index.ts --superpowers

/superpowers toggles strict upstream-style workflow discipline for the current session. --superpowers starts with that mode already enabled.

Strict mode means future non-trivial coding turns must pick and follow the smallest applicable Superpowers workflow, then verify before claiming completion.

Prompts/skills remain installed and manually callable when off. Off only disables automatic methodology pressure. No always-on activation unless you opt in. No hidden agents.

Commands

/superpowers                  # toggle workflow discipline
/superpowers on
/superpowers off
/superpowers run <agent> [args]
/superpowers open <id>
/superpowers branch <id>
/superpowers return <summary>
/superpowers abort <id>
/superpowers status [id]

# workflow aliases → background workers
/superpowers design <args>    # brainstorming
/superpowers plan <args>      # writing-plans
/superpowers execute <args>   # executing-plans
/superpowers parallel <args>  # dispatching-parallel-agents
/superpowers review <args>    # requesting-code-review
/superpowers deslop <args>    # requesting-code-review, focused on slop
/superpowers compress <args>  # requesting-code-review, focused on DRY/design compression
/superpowers debug <args>     # systematic-debugging
/superpowers git <args>       # using-git-worktrees
/superpowers meta <args>      # writing-skills
/superpowers verify <args>    # verification-before-completion

# visual brainstorming companion
/superpowers visual start
/superpowers visual status
/superpowers visual stop

Agents are normal Pi prompt templates:

.pi/prompts/*.md
~/.pi/agent/prompts/*.md

Use the same file either way:

/review ...
/superpowers run review ...

Supported frontmatter:

tools: [read, grep]
extensions: ["*", "-superpowers"]
thinking: off
model: provider/model

Bundled workflow skills + prompt entrypoints:

/using-superpowers
/brainstorming
/writing-plans
/executing-plans
/dispatching-parallel-agents
/subagent-driven-development
/requesting-code-review
/receiving-code-review
/test-driven-development
/systematic-debugging
/verification-before-completion
/using-git-worktrees
/finishing-a-development-branch
/writing-skills

skills/*/SKILL.md holds the methodology. prompts/*.md are normal Pi slash prompt wrappers around those skills.

Same prompts work as background workers:

/superpowers run systematic-debugging flaky test
/superpowers run requesting-code-review current diff

Runtime state lives in the platform state dir, per project:

Linux:   ${XDG_STATE_HOME:-~/.local/state}/pi/superpowers/<project-hash>/
macOS:   ~/Library/Application Support/pi/superpowers/<project-hash>/
Windows: %LOCALAPPDATA%\\pi\\superpowers\\<project-hash>\\

Project/VCS state is only written by workflows that intentionally create docs/specs, e.g. docs/superpowers/specs/....

status is optimized for tmux supervision: summaries include id, state, elapsed time, agent name, tool count, and first result line. status <id> shows prompt, parent/child sessions, and latest result without opening an editor.

Shape

From /tmp/pi-superpowers-proto/DESIGN.md:

run    = background SDK agent
open   = inspect checkpoint/log
branch = stop/promote into ctx.newSession({ parentSession })
return = ctx.switchSession(parent)

No Pi subprocesses. Uses Pi SDK sessions/resource loading directly.

Markdown source
File outline
# superpowers

Background subagents and explicit workflow discipline for Pi.

## Activation

```bash
pi -e ./extensions/superpowers/index.ts
pi -e ./extensions/superpowers/index.ts --superpowers
```

`/superpowers` toggles strict upstream-style workflow discipline for the current session.
`--superpowers` starts with that mode already enabled.

Strict mode means future non-trivial coding turns must pick and follow the smallest applicable Superpowers workflow, then verify before claiming completion.

Prompts/skills remain installed and manually callable when off. Off only disables automatic methodology pressure.
No always-on activation unless you opt in. No hidden agents.

## Commands

```text
/superpowers                  # toggle workflow discipline
/superpowers on
/superpowers off
/superpowers run <agent> [args]
/superpowers open <id>
/superpowers branch <id>
/superpowers return <summary>
/superpowers abort <id>
/superpowers status [id]

# workflow aliases → background workers
/superpowers design <args>    # brainstorming
/superpowers plan <args>      # writing-plans
/superpowers execute <args>   # executing-plans
/superpowers parallel <args>  # dispatching-parallel-agents
/superpowers review <args>    # requesting-code-review
/superpowers deslop <args>    # requesting-code-review, focused on slop
/superpowers compress <args>  # requesting-code-review, focused on DRY/design compression
/superpowers debug <args>     # systematic-debugging
/superpowers git <args>       # using-git-worktrees
/superpowers meta <args>      # writing-skills
/superpowers verify <args>    # verification-before-completion

# visual brainstorming companion
/superpowers visual start
/superpowers visual status
/superpowers visual stop
```

Agents are normal Pi prompt templates:

```text
.pi/prompts/*.md
~/.pi/agent/prompts/*.md
```

Use the same file either way:

```text
/review ...
/superpowers run review ...
```

Supported frontmatter:

```yaml
tools: [read, grep]
extensions: ["*", "-superpowers"]
thinking: off
model: provider/model
```

Bundled workflow skills + prompt entrypoints:

```text
/using-superpowers
/brainstorming
/writing-plans
/executing-plans
/dispatching-parallel-agents
/subagent-driven-development
/requesting-code-review
/receiving-code-review
/test-driven-development
/systematic-debugging
/verification-before-completion
/using-git-worktrees
/finishing-a-development-branch
/writing-skills
```

`skills/*/SKILL.md` holds the methodology. `prompts/*.md` are normal Pi slash prompt wrappers around those skills.

Same prompts work as background workers:

```text
/superpowers run systematic-debugging flaky test
/superpowers run requesting-code-review current diff
```

Runtime state lives in the platform state dir, per project:

```text
Linux:   ${XDG_STATE_HOME:-~/.local/state}/pi/superpowers/<project-hash>/
macOS:   ~/Library/Application Support/pi/superpowers/<project-hash>/
Windows: %LOCALAPPDATA%\\pi\\superpowers\\<project-hash>\\
```

Project/VCS state is only written by workflows that intentionally create docs/specs, e.g. `docs/superpowers/specs/...`.

`status` is optimized for tmux supervision: summaries include id, state,
elapsed time, agent name, tool count, and first result line. `status <id>` shows
prompt, parent/child sessions, and latest result without opening an editor.

## Shape

From `/tmp/pi-superpowers-proto/DESIGN.md`:

```text
run    = background SDK agent
open   = inspect checkpoint/log
branch = stop/promote into ctx.newSession({ parentSession })
return = ctx.switchSession(parent)
```

No Pi subprocesses. Uses Pi SDK sessions/resource loading directly.