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

@aalalice233/pi-brainstorm

v0.3.2

Published

A conversation-only brainstorm mode extension for pi, with dynamic tool detection (grep, ask_user_question, subagent)

Readme

pi-brainstorm

Fork of @paulmupeters/pi-brainstorm with expanded read-only tool support.

A pi extension that adds a read-only /brainstorm mode with dynamic tool detection. During brainstorm, the agent can use read, find, and any of the following optional tools if registered in the environment:

  • grep — for pattern search within files
  • ask_user_question — for structured clarifying questions
  • subagent / get_subagent_result — for deep codebase exploration

What it does

When brainstorm mode is active:

  • allows read, find and any detected optional tools (grep, ask_user_question, subagent, get_subagent_result)
  • blocks shell commands and file edits/writes
  • keeps the conversation exploratory
  • avoids unsolicited "you should do X next" suggestions
  • gives a clear recommendation when you ask for the best option
  • shows a visible reminder in the UI
  • drafts a decision-oriented markdown brief when you finish
  • can replace the brainstorm transcript with the reviewed brief in LLM context when you finish without saving or when you save and choose the context-preserving option

Key difference from upstream

The original extension blocks all non-read tools during brainstorm mode. This fork:

  • dynamically detects which tools are available in the current pi environment (grep, ask_user_question, subagent, get_subagent_result)
  • allows all detected tools alongside read and find, giving the agent richer capabilities during brainstorm (e.g. searching code, asking structured questions, exploring codebases in background)
  • silently omits tools that are not registered — no configuration needed
  • shows a dynamic allowed-tool list in the system prompt so the agent knows exactly what it can use

UX

  • /brainstorm starts brainstorm mode
  • /brainstorm again opens a small menu:
    • Continue brainstorming
    • Finish and summarize
    • Cancel and discard
  • /brainstorm finish finishes directly
  • /brainstorm cancel exits immediately without a summary
  • /brainstorm-summary-model configures an optional dedicated summary model
  • Ctrl+Alt+B is a shortcut for the same flow

While active, the footer/widget reminds you how to finish or cancel.

Install / test

Quick test

pi --no-extensions -e /path/to/brainstorm.ts

Use from your normal pi setup

Install from npm:

pi install npm:@aalalice233/pi-brainstorm

Or copy extensions/brainstorm.ts into ~/.pi/agent/extensions/.

Optional: enable additional brainstorm tools

The extension detects these optional tools at runtime — install any of the packages below and the tool is automatically available in brainstorm mode:

| Tool | Package | |---|---| | grep | Built-in to pi, no extra install needed | | ask_user_question | @juicesharp/rpiv-ask-user-question | | subagent / get_subagent_result | Built-in to pi, no extra install needed |

For example:

pi install npm:@juicesharp/rpiv-ask-user-question

All tool detection is automatic — no config needed.

Brief export

When you finish a brainstorm, the extension:

  1. collects the conversation since brainstorm mode started
  2. asks the current model, or an optional dedicated summary-model override, to draft a concise decision brief
  3. opens that brief in an editor so you can tweak it
  4. then offers:
    • Brief to context
    • Brief to markdown
    • Brief to markdown and context
    • Continue brainstorming
    • Exit

The generated brief uses # Decision Brief: <topic> when the session reached a clear decision, recommendation, or strong preference. If no firm conclusion emerged, it uses # Brainstorm Brief: <topic> and calls out the strongest current leaning without inventing certainty. It leads with the recommendation/current leaning, then covers rationale, alternatives, risks/open questions, and a transcript summary capped at 5 sentences.

Default save path:

brainstorms/YYYY-MM-DD-topic.md

Optional summary model override

By default, brainstorm summaries use the currently active Pi model.

You can persist a separate user-level summary model with:

/brainstorm-summary-model

Or set it directly:

/brainstorm-summary-model google/gemini-2.5-flash
/brainstorm-summary-model clear

The preference is stored globally in ~/.pi/agent/settings.json under piBrainstorm.summaryModel and falls back to the active model when unset or unavailable.

If you choose Brief to context or Brief to markdown and context, the brainstorm transcript stays in session history, but future LLM context uses the reviewed brief instead of the full brainstorm exchange.

Notes

  • During brainstorm mode, read and find are always enabled; grep, ask_user_question, subagent, and get_subagent_result are enabled when their respective packages/tools are registered.
  • The extension restores your previously active tools after finishing/canceling.
  • If model-based brief generation is unavailable, the extension falls back to a simple markdown transcript.
  • Tool detection happens at runtime — no config or restart needed when installing/removing packages or when tools become available/unavailable.