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

@howaboua/pi-subdir-agents

v0.0.9

Published

Pi extension that loads nested AGENTS.md context during repository discovery

Readme

@howaboua/pi-subdir-agents

Loads nested AGENTS.md files only when an agent reaches their directories during repository discovery.

It keeps Pi's base system prompt stable. With an active Pi Codex Responses adapter, it sends the relevant AGENTS.md chain as a developer message after discovery. Otherwise, it appends the guidance to the discovery tool result.

Install

pi install npm:@howaboua/pi-subdir-agents

How it works

When a read or discovery command reaches a file or directory, the extension finds every nested AGENTS.md between that target and its repository root. It delivers those files in outer-to-inner order.

The loader recognizes direct file reads, directory tools, common read-oriented shell commands, and completed Code Mode traces. Listings such as ls, find, and rg --files load guidance for the queried directory, not every child they name. Content searches can also load guidance for matching files. It follows the discovered command working directory, including cd and git -C.

Loaded files are persisted in developer custom-message or tool-result details. A resumed or revisited branch does not receive unchanged guidance again. Discovery reloads guidance only when its content changes. Pi Codex is optional; unavailable developer-message support keeps the tool-result route.

Why append guidance instead of changing the system prompt

Nested guidance is variable. Loading it into Pi's system prompt would change an early provider-rendered prefix whenever the agent enters another directory. This extension leaves that prefix alone and appends new guidance at the point where the agent discovered the directory.

That keeps the stable system prompt, tools, and earlier history intact for provider prompt caching. It does not guarantee a cache hit. Provider cache reuse still depends on the model, request lane, and final rendered request.

What it does not do

  • It does not preload every AGENTS.md in a repository.
  • It does not duplicate the current working directory's base guidance.
  • It does not mutate Pi's system prompt, rewrite earlier messages, or add a model tool.
  • It does not inspect arbitrary shell commands. It reacts only to commands that plausibly discover or read paths.

This package is intentionally standalone. It is not included in @howaboua/pi-extensions or @howaboua/pi-stuff.