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

@travofoz/pi-bake

v0.2.0

Published

Autonomous phase execution for pi — executor → ast-grep audit → LLM audit → remediation loop

Readme

🔥 pi-bake

Autonomous phase execution for pi. Bake runs a spec-driven pipeline: executor → structural audit (ast-grep) → semantic audit (LLM) → remediation → repeat/circuit-breaker. Each phase is a focused, verifiable unit. The meta-point: proving open-weight models are production-ready for agentic coding loops right now.

bake-start → executor → ast-grep audit → LLM audit → (remediate → loop) → ✅ / ❌

How It Works

You write phase specs (markdown files in phases/), each with a clear objective and done-when criteria. Bake runs them sequentially:

  1. Executor — fires up a fresh pi --mode rpc subprocess with the phase spec, lets it code
  2. Structural audit — runs ast-grep rules against the workspace (deterministic, ~50ms)
  3. Semantic audit — LLM checks the phase's done-when criteria
  4. Remediation — if audits fail, feeds findings back to the executor for another pass (up to N attempts)
  5. Circuit breaker — if remediation maxes out, the phase is marked failed and the pipeline halts

State is tracked in .bake/state.json — you can pause, resume, skip, steer, and retry phases at any time.

Commands

| Command | What it does | |---|---| | /bake-start | Run the pipeline (or resume from where it left off) | | /bake-pause | Pause after the current phase finishes | | /bake-resume | Resume a paused pipeline | | /bake-skip | Mark the current phase as skipped, move to next | | /bake-retry | Retry the last completed or failed phase | | /bake-steer <msg> | Inject steering guidance for the next executor run | | /bake-status | Show current state, recent events | | /bake-log | View the full event log | | /bake-detail | Deep dive on the current phase | | /bake-rules | Toggle ast-grep audit rules on/off | | /bake-reset | Reset bake state (prevents re-execution of completed phases unless you delete phase files) | | /bake-spec-decompose <path> | Decompose a raw spec file into clean phase files | | /bake-config | Widget mode, preferences | | /bake-widget | Manually refresh the status widget |

Quick Start

# 1. Install
pi install npm:@travofoz/pi-bake
# (or pi install -l npm:@travofoz/pi-bake for project-local)

# 2. Reload
/reload

# 3. Create a phase file
mkdir -p phases
cat > phases/01_hello.md << 'EOF'
# 01_hello

## Objective

Create a hello.txt file with "Hello from bake!" in it.

## Done When

- [ ] hello.txt exists with the expected content
EOF

# 4. Bake it
/bake-start

The widget will show each phase as it runs through executor → audit → remediation.

Install

Extensions in pi can be global (available in all projects) or project-local (only in the current project). The same package works for both — scope is determined by the -l flag at install time.

You'll need to be logged into npm (npm login) if installing from a private scope.

# Global install — available everywhere
pi install npm:@travofoz/pi-bake

# Project-local install — only in this project
pi install -l npm:@travofoz/pi-bake

# Or try it without installing (one-shot)
pi -e npm:@travofoz/pi-bake

After installing, /reload in pi (or restart) and you'll see the bake widget. Run /bake-start with some phase files in phases/ to kick off.

Requirements

  • pi
  • ast-grep (sg) on $PATH for structural audits — npm install -g @ast-grep/cli or your package manager
  • An LLM provider configured in pi (any model works; open-weight models are the point)

Anatomy of a Phase File

Phase files live in phases/ and look like this:

# 01_setup_project

## Objective

Initialize the project with package.json, TypeScript config, and directory structure.

## Done When

- [ ] `package.json` exists with dependencies
- [ ] `tsconfig.json` exists with proper settings
- [ ] `src/` directory exists
- [ ] `npm install` succeeds

Files are sorted by name and executed in order. Each phase is a focused, verifiable unit — decompose big problems into small phases.

ast-grep Rules

Bake ships with a set of structural audit rules in rules/base/ that run after each executor pass. These catch common issues deterministically (~50ms) before the semantic LLM audit even fires.

| Rule | Catches | |---|---| | no-console-log | console.log(...) in production code | | no-debugger | Stray debugger statements | | no-empty-catch | Bare catch {} swallowing errors | | no-dead-ternary | Ternary branches that always evaluate the same way | | no-hardcoded-branch | Hardcoded conditionals that should be config | | no-sync-revoke | Sync calls in async contexts |

Use /bake-rules to toggle rules on/off per project.

Architecture

index.ts              — entry point, registers commands + lifecycle hooks
bake.ts               — phase execution loop, state machine, orchestration
bake-executor.ts      — runs a phase via pi RPC subprocess
bake-audit.ts         — semantic audit + remediation via LLM
auditor.ts            — ast-grep structural checks + LLM audit prompt builder
rpc-agent.ts          — long-lived pi --mode rpc subprocess wrapper
event-log.ts          — append-only JSONL event log
commands/             — 14 commands (start, pause, resume, skip, steer, etc.)
components/           — TUI components (loader, border)
rules/base/           — ast-grep rule files (structural checks)

Philosophy

Bake is "waterfall with the human problems removed." Sequential execution, deterministic gates, fast feedback — no meetings, no blame, no stakeholder churn. See docs/bake-philosophy.md for the full rationale.

Try It

Drop a few .md phase files into phases/ (or use /bake-spec-decompose on a raw spec to generate them), then /bake-start. The widget will show progress as each phase runs through executor → audit → remediation.

This repo ships with the PocketADB project as an example — 7 phases that build an ESP32-C3 ADB/Shizuku hardware companion. Try:

/bake-start

License

MIT — go build something.