npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-palpatine

v0.1.0

Published

Pi-native Palpatine commands, lookups, always-on state, and bounded workflow prompts

Downloads

174

Readme

Palpatine

License: SPL

Pi-native compatibility layer for NovusEdge/palpatine.

High-functioning predator for Pi. No moralizing. No disclaimers. Pattern recognition without sentiment.

What it does

/palpatine takes any situation and sends Pi a bounded routing prompt. Pi then renders:

  • The actual problem - what you're not seeing
  • Actions - who does what by when

50 words. Patterns inform the thinking, not the output. Direct CLI usage prints the routing prompt rather than the final model answer.

Modes (auto-detected by the Palpatine skill): | Mode | Trigger | Output | |------|---------|--------| | Advise | Situation or question | Diagnosis + actions | | Analyze | Pasted text | What's wrong + fix | | Write | "draft", "help me say" | The artifact | | Counter | "against me" | Their playbook + pre-empt | | Escalate | "burn it down" | Ladder with costs |

Example

/palpatine my boss keeps taking credit for my work in meetings

Expected Pi-rendered output:

**Problem:** You're a production asset, not visible. Boss has no incentive to change.

**Do this:**
1. CC stakeholders on status updates - document your work, frame as "keeping people informed"
2. Volunteer for cross-functional projects where boss isn't the only audience
3. Create a deliverable only you can run - make your absence costly
4. If they escalate: paper trail for HR or exit

Installation

npm install -g ./      # local tarball/global install from this checkout
# or, for development:
npm link

pi-palpatine /palpatine:laws 7
pi-palpatine laws 7   # direct CLI alias
npm test              # validates router, docs metadata, package contents, and extension shim

Pi plugin metadata lives in .pi-plugin/plugin.json; the npm package.json pi field mirrors command, hook, extension, and skill discovery metadata. The extension entry point is extensions/palpatine.ts; it requires a Pi loader that can execute TypeScript/ESM extension files and supports @earendil-works/pi-coding-agent >=0.74.0 <1 (tested against .pi-plugin/plugin.json piPeerDependency / testedPiHost and the package peer range). The published package intentionally includes only runtime assets and public docs.

Register this repository root, the installed package root, or an unpacked npm tarball with Pi's plugin loader as a local plugin. The exact command depends on the Pi host build; use the host's local-plugin registration command with .pi-plugin/plugin.json as the manifest. Then verify that the loader expands ${PI_PLUGIN_ROOT} in hooks/hooks.json to that plugin root before SessionStart hooks run. The SessionStart hook command is node "${PI_PLUGIN_ROOT}/hooks/activate.js", so it must work regardless of the host cwd. Success signals: /palpatine:laws 7 returns the law lookup, and after /palpatine on, running the expanded hook path from any directory prints the active-lens reminder.

Workflow runtime note: from the CLI and slash-command extension, /palpatine:adversary and /palpatine:unlimited-power return bounded prompts unless a Pi trusted workflow runtime injects agent and parallel functions. The runnable workflow entrypoints live in workflows/*.mjs and call the same shared runners as the library router; host runtime wiring is intentionally listed below as host-dependent. Injected runtimes are bounded by a default 30s per-call timeout, clamped to a 60s per-call maximum, and receive abort signals. Host runtimes should honor signal to cancel work after timeout; non-cooperative work can only be reported as timed out by this package.

Commands

# CLI prompt/lookup mode
node bin/pi-palpatine.js /palpatine "my boss takes credit for my work"
node bin/pi-palpatine.js /palpatine on
node bin/pi-palpatine.js /palpatine off
node bin/pi-palpatine.js /palpatine:laws boss
node bin/pi-palpatine.js /palpatine:war blitz
node bin/pi-palpatine.js /palpatine:seduce coquette
node bin/pi-palpatine.js /palpatine:defense "is this manipulation?"
node bin/pi-palpatine.js /palpatine:wargame "if I ask for 30%"

# Workflow commands emit prompts in plain CLI mode unless a trusted host injects agent/parallel.
node bin/pi-palpatine.js /palpatine:adversary "model the stakeholders"
node bin/pi-palpatine.js /palpatine:unlimited-power "document every public function"

Library/host runtimes can execute workflows by calling route() with workflowRuntime and, for unlimited-power, a verifiable doneCondition. Direct aliases such as laws, war, and unlimited-power are CLI-router conveniences; plugin metadata registers the slash commands listed above.

Always-On Mode

/palpatine on   # Strategic lens on all interactions
/palpatine off  # Back to normal

When enabled, the session-start hook reminds Pi to apply the strategic lens, and /palpatine prompts include matched power-dynamic context. Pi state is stored at ~/.pi/palpatine-enabled. The state directory is created with owner-only permissions where supported, and state writes use no-follow file opens where Node/platform support exists. To validate hook wiring, enable the lens, expand the manifest command to node "$PWD/hooks/activate.js", and run it from a different directory; it should print the active-lens reminder.

Parity

This repo preserves the original user-visible command surface, skill prompts, JSON reference libraries, always-on state, and workflow prompts/sketches while adapting Claude Code-specific pieces to Pi. CLI and extension routes may emit prompts that Pi must render into final answers.

Implemented:

  • upstream skill files under skills/
  • upstream data indexes under data/
  • slash-compatible router in bin/pi-palpatine.js
  • deterministic lookup and matching in lib/palpatine.js
  • always-on state via ~/.pi/palpatine-enabled
  • session-start activation hook in hooks/activate.js
  • Pi workflow entrypoints for adversary and unlimited-power modes, backed by shared library runners
  • smoke tests for routing, lookup, always-on state, async CLI output, malformed workflow plans, hook state isolation, and extension runner timeout behavior

Host-dependent surfaces:

  • registering .pi-plugin/plugin.json with Pi's plugin loader
  • wiring hooks/hooks.json into Pi session start
  • exposing the router as true slash commands
  • running workflows/*.mjs through Pi's trusted workflow runtime

Credits

Pattern libraries derived from Robert Greene:

  • The 48 Laws of Power (1998)
  • The Art of Seduction (2001)
  • The 33 Strategies of War (2006)

Licensed under the Sith Public License. Because SPL is not a standard SPDX identifier, package metadata uses SEE LICENSE IN LICENSE plus explicit licenseMetadata; this Pi port follows the checked-in SPL license text and preserves NovusEdge attribution in package and plugin provenance metadata. Use at your own risk. We're not your mom.

Test

npm test