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

@ailoom/tdd

v0.1.0

Published

Test-driven development framework for AI coding assistants

Downloads

43

Readme

Test-Driven Development : TDD

Get your AI to write tests first. A small CLI and set of slash commands that wire Red/Green/Refactor into your existing AI assistant (Cursor, Claude Code, Copilot, and others).


The problem

Assistants are great at writing code and weak at writing tests. They tend to implement first and test later or skip tests. This framework keeps the cycle explicit: plan tests → write failing tests → implement → refactor, with one change per folder and coverage tracked in the repo.


Install and run

Node.js 20+ required.

npm install -g @ailoom/tdd
cd your-project
tdd init

Pick your tools when prompted (or use tdd init --tools cursor,claude). Then in chat: **/tdd:new add-thing** to start a change.


What you get

Each change lives in tdd/changes/<name>/ with:

| File | Role | | -------------- | ------------------------------------------------- | | intent.md | Why we’re doing this, scope, impact | | test-plan.md | Scenarios to implement as tests (Given/When/Then) | | design.md | How we’ll build it (optional) | | tasks.md | Checklist: RED → GREEN → REFACTOR |

The flow:

  1. Plan/tdd:ff (or /tdd:continue) fills intent → test-plan → design → tasks.
  2. RED/tdd:red: AI writes only tests from the plan; they must fail.
  3. GREEN/tdd:green: AI writes the smallest code that makes those tests pass.
  4. REFACTOR/tdd:refactor: AI cleans up; you re-run tests after each step.
  5. Done/tdd:archive moves the change to the archive and updates tdd/coverage/.

So the contract is the test plan; the loop is always Red → Green → Refactor.


Slash commands (in your AI chat)

| Command | Use it to | | --------------- | ------------------------------------------ | | /tdd:new | Start a new change | | /tdd:ff | Generate all planning docs in one go | | /tdd:continue | Generate the next doc step-by-step | | /tdd:red | Write failing tests (no implementation) | | /tdd:green | Implement until tests pass | | /tdd:refactor | Refactor while keeping tests green | | /tdd:verify | Check implementation vs plan and run tests | | /tdd:archive | Archive the change and update coverage |

There are also /tdd:explore (before committing to a change) and /tdd:sync (merge coverage without archiving). Full list and behavior are in Commands.


Terminal commands

tdd init [--tools ...] [--schema test-driven]
tdd change new <name>
tdd list | tdd show <name> | tdd status | tdd view
tdd validate <name>
tdd archive <name> [--no-sync]
tdd schema list | init | fork | validate
tdd update [--tools ...]

Details: CLI reference. Tool list and install paths: Supported tools.


Why this exists

  • Tests first — The plan is “what tests to write”; the AI is constrained to that before writing production code.
  • Red then green — RED phase is tests-only; GREEN is minimal implementation. No “implement and test later.”
  • Refactor with guardrails — REFACTOR runs with “tests must stay green” built into the instructions.
  • One change, one folder — Same idea as “one change, one folder” in spec-driven tools, but the content is test-plan + tasks, and the apply step is split into red/green/refactor.
  • Coverage as docstdd/coverage/ (and per-change deltas) record what’s tested; archiving merges that into the main coverage docs.

Docs


Development

npm install
npm run build
npm test

MIT