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

@fractaal/pi-directive-roots

v0.1.1

Published

Directive-root loading and mid-turn discovery for Pi across CLAUDE.md, AGENTS.md, MEMORY.md, and shared skill directories.

Readme

@fractaal/pi-directive-roots

Reusable Pi extension for directive roots shared by Aria Local Runtime, Ben's personal Pi, and Cloud Pi Aria-style workflows.

A directive root is a directory containing one or more directive files:

  • CLAUDE.md
  • AGENTS.md
  • MEMORY.md

For each directive root, the extension also exposes skill directories:

  • .claude/skills
  • .agents/skills
  • .codex/skills

Pi usage

pi install npm:@fractaal/pi-directive-roots

Local dogfood before publish:

pi install /path/to/pi-extensions/packages/directive-roots

Pi loads the extension through package.json's pi.extensions manifest entry, which points at ./src/index.ts. Pi's package loader compiles that TypeScript source itself.

Embedding

ALR or another Node host imports the compiled package export:

import { createDirectiveRootsExtension } from '@fractaal/pi-directive-roots';

const extensionFactory = createDirectiveRootsExtension({
  boundary: 'git',
  directiveFiles: [
    { scope: 'org', path: 'CLAUDE.md', content: 'Org directives...' },
  ],
});

The Node import resolves to dist/ through the package exports map. Do not import src/index.ts from a Node host.

Behavior

  • Startup/resource discovery loads directive roots around the current cwd and derives all supported skill directories.
  • before_agent_start appends directive file content that Pi has not already loaded through its normal context-file system, deduplicating identical trimmed content across paths and directive groups.
  • Read-like tool results (read, grep, find, ls) are allowed, then annotated with a <system-notice> when they enter a directory governed by newly discovered directives.
  • Write-like tool calls (write, edit) are blocked until newly applicable directive files are surfaced to the model.
  • Mid-session discoveries are persisted with pi.appendEntry() so reloaded sessions can reconstruct the loaded directive paths.

Publish flow

Commit the package version bump to main, then push its release tag:

git tag directive-roots-v0.1.1
git push origin directive-roots-v0.1.1

The monorepo's publish-npm.yml workflow verifies the live tag, package version, and main ancestry before testing, building, packing, and publishing through npm Trusted Publishing. The npm package must authorize repository fractaal/pi-extensions, workflow publish-npm.yml, and environment npm-publish; that GitHub environment and matching release tags must be protected before the first release. No local npm login, token, OTP, or npm publish command is part of the release path.

prepack builds dist/ for the npm tarball. dist/ is ignored by git and should not be committed.