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

doctrina-cli

v0.17.0

Published

Doctrina CLI — spec-driven, AGENTS.md-native framework for multi-agent AI development.

Readme

doctrina-cli

CLI for the Doctrina framework. The package is published as doctrina-cli; the executable it installs is doctrina.

Status: v0.17.0 — current release. Zero runtime dependencies (Node.js standard library only).

Install

npm install -g doctrina-cli
# or run on demand
npx doctrina-cli init

Requires Node.js 20.12 or later.

Commands

Start with doctrina init in your repository, then tell your AI agent to read AGENTS.md and run doctrina next — it drives the rest. The surface, by the moment you reach for it:

Bootstrap   init · intake · adapter list|add|remove
Orient      prime · next · status · context · show · search · why · handoff
Change      triage · work · spec new|list|set · change new|apply|archive|check|tick|abandon
            contract new|list|check · decision new|accept|land|supersede|list|scope
            skill new|list|suggest · intent add|list
Gate        clarify · validate · coverage · trace · review · verify · close · doctor
Maintain    upgrade · index rebuild · hooks install · watch · metrics · completion · ci · templates list

doctrina --help prints the same grouping with one line per command, and doctrina <command> --help the flags of each. Every command, flag and exit code is in the CLI reference.

init flags

| Flag | Purpose | |------|---------| | --project-name <name> | Override the project name (defaults to cwd basename) | | --project-description <text> | One-sentence description, with no intake. Without it on a terminal, init asks you to describe the project once and keeps the answer as the intake | | --agent <name> | Install the adapter for one of the twelve supported agents (claude, codex, cursor, copilot, gemini, aider, windsurf, continue, amp, devin, factory, jules) or all | | --date <YYYY-MM-DD> | Override the system date in artifacts | | --force | Overwrite existing files | | --non-interactive | Fail instead of prompting for missing required values |

Adapter behaviour

  • --agent claude writes a CLAUDE.md at the project root that @-imports AGENTS.md. Claude Code picks it up automatically.
  • --agent cursor writes .cursor/rules/00-doctrina.mdc with alwaysApply: true pointing at AGENTS.md. copilot, gemini, aider, windsurf, and continue follow the same thin-pointer pattern at each agent's native path.
  • --agent codex (and amp, devin, factory, jules) installs nothing: these agents read AGENTS.md natively.
  • --agent all installs every adapter.

All adapter files are kept under 30 lines to avoid per-turn token tax and to make drift from AGENTS.md mechanically impossible.

change apply semantics

For each spec delta found under .doctrina/changes/<id>/specs/:

  • ADDED: writes the delta body to the target spec; refuses if the target already exists.
  • REMOVED: deletes the target spec.
  • MODIFIED: when the delta carries a fenced ```ops block (set-header / bump-version / set-criterion / replace-criterion / append-criterion / append-requirement / replace-requirement), applies it mechanically to the target spec — all ops or none — and regenerates the index (ADR 0007). Without an ops block it prints a manual-merge pointer and does not write: auto-merging arbitrary prose is the kind of implicit decision Doctrina avoids.

On any spec write, the index is rebuilt from the tree so it never drifts from the applied spec. doctrina change abandon <id> is the inverse of change new: it deletes an open change and its index entry and ledgers the abandonment. doctrina close <id> runs apply together with verify, coverage, archive and validate in one attested pass — the definition of done.

validate checks

Structure, schema, EARS grammar, index drift, size caps, links, skills, ADR anchoring and more — the full, numbered list with the reason for each check is in the CLI reference. A second copy here fell behind it once; there is now one list.

Exit code: 0 if no errors (warnings allowed), 1 otherwise. --fix regenerates index.json from the tree before validating.

Two related read-only reports gate separately: doctrina coverage (each acceptance criterion cites a real test; a criterion proven only by a skipped suite is conditional and fails --strict) and doctrina trace (each product intent has a capability, each capability traces to an intent). Both exit 1 under --strict for CI. doctrina verify --clean statically lints for clean-checkout footguns (a build-dir entry point with no prepare; a Prisma dep with no generate on install).

Tests

npm test

Runs the suite via the built-in Node test runner. The integration tests spawn the CLI as a subprocess and exercise the full surface against a temporary project directory.

License

MIT.