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

@koltmcbride/pi-goal

v0.1.3

Published

Pi extension for goal-directed autonomous work loops

Downloads

604

Readme

pi-goal

License: MIT pi package

Goal-directed autonomous work loops for pi.

Set a goal as a single completion condition. After every turn, a lightweight evaluator checks whether the condition is met. If it isn't, the agent is automatically prompted to keep working — turn after turn — until the goal is satisfied or you stop it. It's the autonomous counterpart to a plain prompt: you describe the end state, not each step.

/goal all tests in test/auth pass and the lint step is clean

Features

  • Single-condition goals — describe a verifiable end state; the agent drives toward it.
  • Self-evaluating loop — after each turn the configured model judges progress with a cheap yes/no call.
  • Live status — a footer timer shows elapsed time and turn count while a goal runs.
  • Resumes across sessions — an in-progress goal is restored automatically when you reopen the session.
  • Bounded — a hard turn cap prevents a goal that never resolves from looping forever.

Requirements

  • pi (@earendil-works/pi-coding-agent).
  • A configured model — the same model that powers your session is reused for evaluation.

Installation

From npm:

pi install npm:@koltmcbride/pi-goal

From git:

pi install git:github.com/kolt-mcb/[email protected]

⚠️ Pi packages run with full system access. Review the source before installing.

Usage

/goal <condition>    Set a goal and start working immediately
/goal                Show the active goal's status
/goal status         Alias for /goal
/goal clear          Clear the active goal

clear also accepts the aliases stop, off, reset, none, and cancel. The subcommands are offered as autocompletions when you type /goal and press Tab.

Re-issuing /goal <condition> while a goal is active replaces the condition and restarts the loop with it.

Writing effective conditions

A good condition has one measurable end state and a clear way for the agent to demonstrate it in its output:

/goal all tests in test/auth pass and the lint step is clean
/goal refactor src/database to use connection pooling, verified by tests in test/db.test.ts
/goal every exported symbol in src/api has a docstring

Goals work best for substantial, verifiable work — migrating a module until every call site compiles, implementing a design doc until its acceptance criteria hold, or working through a backlog until the queue is empty.

Status display

While a goal is active, the footer shows a live timer:

⏱ 3t · 2m 15s

/goal (or /goal status) prints the full state:

Condition: all tests in test/auth pass and the lint step is clean
Running:   2m 15s
Turns:     3
Last reason: one failing test remains in test/auth/login.test.ts

On completion the footer reports ✓ Goal achieved in 3 turns.

How it works

  1. Set/goal <condition> records the condition and sends it as the first prompt, kicking off work immediately.
  2. Evaluate — at the end of each turn, the agent's text and tool results are summarized and passed to a minimal evaluator call on the same configured model: has the condition been met?
  3. Continue or stop — if not met, a hidden continuation message is queued as the next turn with the latest evaluation reason, and the agent keeps working. When the evaluator returns yes, the loop stops and the result is reported.

A goal stops automatically when the condition is met, when you run /goal clear, or after a safety cap of 120 turns without success. State is persisted as custom session entries, so a goal that was still running when a session ended is restored on resume.

Relationship to Claude Code's /goal

pi-goal mirrors the /goal interface from Claude Code, with a few differences:

| | Claude Code | pi-goal | |---|:---:|:---:| | Slash interface | ✓ | ✓ | | Session persistence | ✓ | ✓ | | Footer timer | ✓ | ✓ | | Evaluation model | separate small model | your configured model (minimal reasoning) |

Development

npm install        # install dev + peer dependencies
npm run typecheck  # tsc --noEmit
npm test           # run the smoke test

The extension is plain TypeScript; pi loads the source directly via the pi manifest in package.json, so there is no build step.

License

MIT © Kolt McBride