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

@wsxyt/pi-agents-md

v0.3.1

Published

Safe nested AGENTS.md injection and managed guidance for Pi.

Readme

@wsxyt/pi-agents-md

A Pi package for nested AGENTS.md context injection and autonomous, managed instruction files.

Install

pi install npm:@wsxyt/pi-agents-md

The package registers one extension entrypoint and two on-demand skills. It supports Pi >=0.84.2 <0.85.0 on Node >=24 <25 and has no runtime dependency beyond Pi's peer packages.

What It Does

  • Appends descendant AGENTS.md guidance only after successful textual read results.
  • Resolves instruction candidates canonically, rejects symlinks and outside-root paths, and enforces file, read, and session byte budgets.
  • Lets the AI explore the repository, summarize its structure, and choose useful root and child scopes.
  • Generates and applies package-owned blocks automatically with preimage checks and same-directory atomic renames.
  • Adds one persistent maintenance cue after a successful source edit or write, limited to affected scopes.

The package generates only AGENTS.md. AGENTS.override.md is read for precedence but is never generated.

Commands

| Command | Purpose | | --- | --- | | /agents-init | Autonomously explore the repository, generate practical guidance, and write it. | | /agents-cancel | Stop a stalled initialization and unblock ordinary writes. | | /agents-audit [path] | Check managed scopes for marker, scope, and line-budget problems. | | /agents-apply <plan-id> | Apply an already staged fallback plan. | | /agents-refresh | Clear the nested instruction read cache. | | /agents-status | Show injection decisions, budgets, maintenance, and initialization state. |

Normal source edits can add a prompt-mode maintenance cue. The cue activates agents_scan_changed, then the package-owned agents_apply_managed tool after a validated fact pack is available. maxAffectedFiles caps distinct changed source paths in one agent run. Configure the behavior in trusted .pi/agents-md.json or the global agent config:

{
  "maintenance": {
    "mode": "prompt",
    "maxCuesPerAgentRun": 1,
    "maxAffectedFiles": 12,
    "maxGeneratedBytes": 32768,
    "allowHeadlessAuto": false
  }
}

Modes are prompt, settled, review, and off. review records a notification only; it does not generate or apply a draft. Automatic modes are disabled in print and JSON runs unless explicitly enabled.

Safety Model

Pi's startup context remains the authority for ancestor instructions. This extension considers descendants only and appends provenance-labelled text without replacing the original read result. It never fetches prompt sources at runtime. Generated files must still pass scope, path, marker, preimage, per-file, and effective-chain limits.

/agents-init gives the AI an autonomous exploration turn: it can inspect the repository with read, search, code-navigation, project-analysis, and shell inspection tools, then summarize what matters for future work. The extension uses those findings to select scopes, accepts natural Markdown guidance, and automatically writes every successfully staged scope. Existing human text is preserved outside pi-agents-md markers. During initialization, ordinary edit and write calls are blocked; the package-owned apply path performs the final writes.

Development

npm install
npm run check
npm test
npm run pack:smoke

npm run pack:smoke packs the allowlisted artifact, installs it into a temporary clean project with scripts disabled, and checks the installed resource paths. The source manifest at sources/prompt-sources.json records the development-time prompt research and is not fetched by the extension.

License

MIT. See LICENSE. Prompt-source provenance and reuse decisions are recorded in sources/prompt-sources.json.