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

@neilurk12/pi-agent-modes

v0.1.3

Published

Multi-mode extension for pi coding agent: yolo, plan, ask, orchestrator

Readme

pi-agent-modes

Multi-mode extension for the pi coding agent: YOLO, PLAN, CODE, ASK, and ORCHESTRATOR.

Installation

npm install @neilurk12/pi-agent-modes

Or link for local development:

npm link

Usage

As a pi extension

Place the extension in pi's extensions directory:

# After npm install, pi will auto-discover from node_modules
# Or symlink/copy to ~/.pi/agent/extensions/
ln -s $(npm root)/@neilurk12/pi-agent-modes/dist/index.js ~/.pi/agent/extensions/modes.js

Or load directly:

pi --extension node_modules/@neilurk12/pi-agent-modes/dist/index.js

Switching modes

  • /mode — interactive mode picker
  • /mode status — show current active tools and config
  • /mode yolo|plan|code|ask|orchestrator — switch immediately
  • /modes — alias for /mode
  • Ctrl+Shift+M — cycle modes (yolo → plan → code → ask → orchestrator)

CLI flag

pi --mode plan          # start in plan mode
pi --mode orchestrator  # start in orchestrator mode
pi --mode yolo          # start in yolo mode (default)
pi --mode ask           # start in ask mode
pi --mode code          # start in code mode

Modes

YOLO (default)

Full unrestricted access. All tools available. No additional restrictions.

PLAN (read-only)

Safe exploration mode. Only read-only tools enabled:

  • Allowed tools: read, bash, grep, find, ls, questionnaire
  • Bash policy: strict_readonly (read-only command safelist)
  • edit/write/apply_patch are disabled by the harness

Useful for exploring codebases, understanding structure, and planning changes without risk.

CODE

Full editing and development tools with non-destructive command protection. All tools available like YOLO, but bash commands are filtered:

  • Bash policy: non_destructive (blocks rm -rf, git push, sudo, npm install, redirects, etc.)
  • Differences from YOLO: bash protection, safety-focused prompt

Useful for active development with safety net against accidental data loss.

ORCHESTRATOR

Coordination mode. Full tool access, but system prompt encourages:

  • Breaking tasks into subtasks
  • Delegating to subagents using the subagent tool
  • Tracking progress and synthesizing results

Requires the subagent extension to be loaded for full delegation capability.

ASK

Clarification-first mode. Enabled tools: read, bash, grep, find, ls, questionnaire. Bash policy is strict_readonly. Gather requirements before any implementation — no code changes.

State persistence

Mode selection persists across sessions. The current mode is stored in session history and restored on startup.

Configuration and Customization

Modes are defined by markdown files in modes/ with YAML frontmatter:

mode: yolo|plan|code|ask|orchestrator
enabled_tools: []   # empty = all tools; omitted/empty = baseline tools; non-empty = exact list
bash_policy: strict_readonly|non_destructive|off
border_label: " LABEL "
border_style: accent|warning|success|muted
prompt_suffix: |           # system prompt injected before each request
  [MODE: ...]
  instructions...

User Overrides

You can override any mode configuration locally by creating a YAML file at ~/.pi/modes/config.yaml:

plan:
  border_label: " MY PLAN "
  enabled_tools:
    - read
    - bash
  bash_policy: strict_readonly

This configuration is merged over the built-in markdown definitions.

Dynamic Reload

  • Run /mode reload to immediately reload the mode definitions and your overrides.
  • The modes/ directory and your config.yaml are auto-watched. Edits trigger an automatic hot-reload when your turn ends.

v0.1.1 (current): markdown-driven config with mode-specific bash_policy, enforced via mode-tool-policy.

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run watch

Then symlink/dist to ~/.pi/agent/extensions/ for testing.

License

MIT