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-ralplan

v0.1.8

Published

Consensus-driven planning extension for Pi

Readme

pi-ralplan

npm GitHub

Note: The docs/ folder is managed by the pi-docs package. Best with pi-subagentura: Works better when paired with the pi-subagentura package for spawning sub-agents.

Consensus-driven planning extension for Pi. Brings the RALPLAN pipeline from oh-my-claudecode to Pi as an extension + skill package.

Features

  • Consensus Planning — Planner → Architect → Critic iteration loop
  • Configurable Pipeline — RALPLAN → Execution → Verification → QA
  • Stage Prompt Injection — Automatic stage-specific prompts via before_agent_start
  • Signal-Based Advancement — Detects PIPELINE_*_COMPLETE signals to auto-advance
  • Session Persistence — Dual persistence: session entries (branch-safe) + file state (resume)
  • UI Integration — Status line and progress widget
  • Deliberate Mode — Enhanced scrutiny for high-risk work (auth, migrations, production)

Installation

As a Pi package

pi install npm:pi-ralplan

Or for local development:

cd ~/dev/pi-ralplan
pi install -l .

Manual (copy files)

Copy the extension and skill to your Pi directories:

mkdir -p ~/.pi/agent/extensions/ralplan
mkdir -p ~/.pi/agent/skills/ralplan
cp -r pi/extensions/ralplan/* ~/.pi/agent/extensions/ralplan/
cp -r pi/skills/ralplan/* ~/.pi/agent/skills/ralplan/

Then reload Pi with /reload.

Usage

Start a planning session

/ralplan build me a todo app

Or start Pi with the flag:

pi --ralplan "build me a todo app"

Auto-start is slash-only. The pipeline auto-starts ONLY when the prompt begins with /ralplan or /brainstorm (or when --ralplan / --brainstorm flags are used). Bare mentions of ralplan or brainstorm in prose — including action verbs like use ralplan to plan this or start-of-prompt directives like ralplan: build auth — do NOT trigger auto-start. This prevents the planner/architect/critic role prompts (which all mention ralplan naturally in their role descriptions) from accidentally re-triggering a fresh pipeline for each consensus round. To start a pipeline from prose, prefix the prompt with /:

/ralplan build me a todo app

Worktrees

Each pipeline run creates a single Git worktree under <repo>-worktrees/. Follow-up sessions launched from inside that worktree reuse the same worktree instead of creating a sibling — one worktree per pipeline run, regardless of how many consensus rounds are run. This is detected via git rev-parse --git-dir vs --git-common-dir and works automatically; no configuration required.

Commands

| Command | Description | | -------------------- | ------------------------ | | /ralplan [idea] | Start consensus planning | | /ralplan:status | Show pipeline status | | /ralplan:cancel | Cancel active session | | /ralplan:skip | Skip current stage | | /ralplan:artifacts | List planning artifacts |

Tools (callable by LLM)

| Tool | Description | | ------------------------- | ------------------------ | | ralplan_advance | Advance to next stage | | ralplan_submit_artifact | Save spec/plan/test-spec | | ralplan_set_config | Modify pipeline config |

Pipeline Stages

  1. RALPLAN — Consensus planning (spec + plan creation)
  2. Execution — Implement the approved plan
  3. Verification (RALPH) — Review implementation quality
  4. QA — Build / lint / test cycling

Completion Signals

The LLM emits these signals to advance stages:

  • PIPELINE_RALPLAN_COMPLETE
  • PIPELINE_EXECUTION_COMPLETE
  • PIPELINE_RALPH_COMPLETE
  • PIPELINE_QA_COMPLETE

Configuration

Add to .pi/settings.json:

{
  "ralplan": {
    "planning": "ralplan",
    "execution": "solo",
    "verification": {
      "engine": "ralph",
      "maxIterations": 100
    },
    "qa": true
  }
}

| Option | Values | Description | | -------------- | ------------------------------------------------ | -------------------------------- | | planning | "ralplan", "direct", false | Planning mode or skip | | execution | "solo", "team" | Sequential or parallel execution | | verification | { engine: "ralph", maxIterations: n }, false | Verification settings | | qa | true, false | Enable QA stage |

Architecture

User Input → /ralplan Command → Pipeline Init → Stage Machine
                                      ↓
Agent Loop ← Signal Detection ← Agent Response ← Stage Prompt
pi/extensions/ralplan/
├── index.ts          # Main extension entry point
├── pipeline.ts       # Stage machine + config
├── adapters.ts       # Stage prompt generators
├── prompts.ts        # Prompt templates
├── state.ts          # Session + file persistence
├── signals.ts        # Signal detection
├── artifacts.ts      # Plan file management
├── worktree.ts       # Git worktree management (with reuse rule)
├── brainstorm.ts     # Brainstorm mode sub-phase logic
├── naming.ts         # Filename generation helpers
└── utils.ts          # Shared helpers

pi/skills/ralplan/
├── SKILL.md                      # Skill definition
├── prompts/
│   ├── planner.md
│   ├── architect.md
│   └── critic.md
└── references/
    └── consensus-workflow.md

Troubleshooting

| Issue | Solution | | ------------------------ | ----------------------------------------------------------------- | | Signal not detected | Ensure the exact signal text appears in the assistant response | | State lost after /tree | State is branch-safe; check /.pi/ralplan/state.json as fallback | | Pipeline stuck | Use /ralplan:skip to skip the current stage | | Extension not loading | Verify paths in package.json pi.extensions and run /reload |

Testing

npm test

License

MIT