feat(omp): add native Oh My Pi (OMP) extension - #2390
Open
andrebrait wants to merge 1 commit into
Open
andrebrait wants to merge 1 commit into
andrebrait wants to merge 1 commit into
Conversation
This was referenced Sep 26, 2026
andrebrait
added a commit
to andrebrait/superpowers
that referenced
this pull request
Sep 26, 2026
Squashed from origin/feat/omp-extension (6194c2e) onto upstream/dev.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Who is submitting this PR? (required)
anthropic/claude-opus-5-5) wrote the change; the acceptance and before/after runs usedanthropic/claude-sonnet-5@caveman-ai/pi0.1.1,@colbymchenry/codegraph1.6.0,agent-skills0.6.9,omp-hooks-plus0.1.7 (disabled),@local/omp-native-adapters0.1.0 (a private local OMP adapter for Superpowers that this PR is meant to replace); marketplace pluginscaveman2.6.0,understand-anything2.9.6,superpowers6.3.0,mattpocock-skills1.2.3,i-have-adhd0.3.0,ponytail4.10.0. Acceptance runs: a cleanHOMEwith only this branch installed (superpowers6.4.2)What problem are you trying to solve?
Superpowers has no OMP entry point, so OMP loads the Pi extension (
pkg.omp ?? pkg.pi). On OMP that extension only delivers the bootstrap in the first run of a process: it clears its flag atagent_endand nothing re-arms it until the nextsession_startorsession_compact.I reproduced this on OMP 18.3.2 with upstream
dev(c5cc551) installed in a cleanHOME. Over RPC, one process received "Let's make a react todo list" followed by a second prompt asking whether its context contained the<EXTREMELY_IMPORTANT>/ "You have superpowers." message:skill://brainstormingcorrectly.NONEin 3/3 runs: from the second prompt on, the bootstrap is gone.What does this PR change?
Adds a native OMP extension (
.omp/extensions/superpowers.ts) declared throughpackage.json#omp, with tests intests/omp/and OMP install notes in the README and porting guide. It adds theusing-superpowersbootstrap plus an OMP tool mapping (skill://,task,todo) to every model request, after compaction and branch summaries, without persisting it in the session..pi/is unchanged.Is this change appropriate for the core library?
Yes. It is harness support for every Superpowers user on OMP, with no new dependencies and no skill changes. OMP already discovers the package-root
skills/directory natively; only the bootstrap needed an OMP entry.What alternatives did you consider?
contexthook runs on every provider request, so adding the same bytes at the same position keeps the cached prefix stable. I verified with abefore_provider_requestdump that the request prefix is byte-identical across runs and across a resumed process. Not persisting avoids storing a stale copy in session files and needs no dedup against compaction.session_start/session_compact, cleared atagent_end), which is the behavior reproduced above. This PR keeps each harness self-contained, like the other entries in the porting guide's harness table.Does this PR contain multiple unrelated changes?
No. The extension, its manifest entry, tests and install docs are one harness-support change.
Existing PRs
This overlaps #1996's goal. The difference is the lifecycle: #1996 delivers the bootstrap until
agent_end, which is the defect reproduced above, and it refactors the Pi extension. This PR does not touch.pi/, so it neither conflicts with #2308 nor depends on it. Searches:omp,oh-my-pi,oh my piacross open and closed PRs.Environment tested
anthropic/claude-sonnet-5New harness support (required if this PR adds a new harness)
Clean
HOME(no user config, rules, or other plugins),omp plugin install github:andrebrait/superpowers#6194c2e60c71c3f456217eaad8f1f42d453de261, thenomp --model anthropic/claude-sonnet-5 -p "Let's make a react todo list"in an empty directory. Brainstorming loaded before anything else; no files were written. The session file contains no copy of the bootstrap.Clean-session transcript for "Let's make a react todo list"
Evaluation
skill://brainstormingfirst and wrote nothing), 3 two-turn RPC runs, and 3 resumed sessions checked for prompt-cache reuse.dev, turn 2 had no bootstrap in 3/3 runs and fell back to a 6,522-token cache read. With this branch, turn 2 had the bootstrap in 3/3 runs and read 19,106 cached tokens. Two of three resumed sessions read the full cached prefix, with request payloads confirmed byte-identical apart fromcache_controlplacement. The first resume read only the 6,522-token system prefix; I could not reproduce that.Rigor
superpowers:writing-skillsand completed adversarial pressure testing (paste results below) — not a skills changenode --test tests/omp/test-omp-extension.mjs tests/pi/test-pi-extension.mjs: 15/15. The OMP tests cover later runs without a newbefore_agent_start, compaction and branch summaries, skill updates between runs, missing and emptySKILL.md(one visible warning per failure and per session), quoted bootstrap text, and session changes during an in-flight load. Each of these behaviors was mutated in turn and made at least one test fail.tsc --strictpasses against the OMP 18.3.2 extension types. A separate adversarial review pass found no remaining code or test issues.Human review