feat: add pi extension and eval backend#1499
Conversation
|
Thank you for all the work that went into this PR — this feature is exactly what I’ve been needing for my Pi + Superpowers workflow. Having the bootstrap automatically injected on session startup and after compaction makes a huge difference in real-world usage, and the design here feels clean and well thought out. Really appreciate the thorough testing and attention to detail. Also looping in the author of #500, since your earlier work laid much of the groundwork for Pi support. It would be great to have your eyes on this PR as well and help push the Pi integration forward together. Thanks again to everyone contributing to this effort — it’s exciting to see Pi support becoming more complete. |
|
Huge thanks for the work in this branch! Jazzed about more Pi support, everything seems to work well! |
What problem are you trying to solve?
Pi can discover Superpowers skills, but Superpowers did not have a proper Pi package integration that loads the
using-superpowersbootstrap at the right lifecycle points. In practice that means the skills can be present on disk without the startup instructions that make the agent check and load them before acting. The desired Pi behavior is a package users can install with Pi that loads the bootstrap at session startup and again after compaction, because compaction can remove the earlier bootstrap context.This came from a Pi session where the human partner asked for a proper Superpowers extension for Pi: installable as a Pi package, with
using-superpowersloaded as a user message at session startup and after compact, plus Pi-specific tool mapping and Pi coverage in the eval harness.What does this PR change?
Adds a Pi package manifest and Pi extension under
.pi/extensions/superpowers.tsthat exposes the bundled skills and injects theusing-superpowersbootstrap into Pi context on session start and aftersession_compact. Adds a Pi tool-mapping reference, Pi install docs, and a Drillpibackend with Pi session-log normalization and tests.Is this change appropriate for the core library?
Yes. This is new harness support for Pi, which is general-purpose infrastructure for using the existing Superpowers workflow skills in another coding-agent harness. It does not add domain-specific skills or project-specific configuration.
What alternatives did you consider?
using-superpowersbootstrap that causes automatic skill checks.Skilltool: rejected because Pi already has native skill support; the integration only needs Pi-specific instructions/tool mapping.extensions/: changed to.pi/extensions/to match this repo's existing harness-specific layout.Does this PR contain multiple unrelated changes?
No. The package extension, Pi tool mapping, docs, and Drill backend are all part of adding first-class Pi harness support and validating it.
Existing PRs
#500 (
docs(pi): add experimental pi support (Phase 1)) is open and adds documentation/smoke-test oriented Pi support againstmain. This PR targetsdevand is materially different: it adds runtime bootstrap injection at session start and after compaction, plus a Drill backend for Pi session logs. It should still be reconciled with #500 before merge.#1440 (
Add pi-review and pi-refine skills using pi-subagents) was closed and added Pi/subagent-specific skills. This PR does not add new workflow skills and does not requirepi-subagents; subagents remain optional companion packages.Environment tested
Implementation session ID:
019e0356-3e52-751f-af4a-d05ba8d44a75New harness support (required if this PR adds a new harness)
Clean-session transcript for "Let's make a react todo list"
This is the first response from the
brainstormingskill, before code was written.Evaluation
using-superpowersafter compaction.brainstorming, and targeted tests verify package manifest, startup injection, post-compact injection, Pi tool mapping, and Pi Drill log normalization.Needs real-world user testing: this PR adds the runtime integration and test coverage, but should be exercised in real interactive Pi sessions across startup,
/compact, auto-compaction, and resumed sessions before considering the integration fully proven.Verification commands run:
Results: Node tests 6/6 pass; Ruff all checks passed; Ty all checks passed; targeted pytest suite 49 passed.
Rigor
superpowers:writing-skillsand completed adversarial pressure testing (paste results below)This PR adds a Pi-specific reference document but does not rewrite existing behavior-shaping skill content. A reviewer subagent reviewed the implementation twice; one issue about Bash source classification was fixed, and one issue about persistent-vs-context injection was evaluated against the requirement and test behavior.
Human review
Complete diff for review: dev...pi-extension-evals