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

@windyroad/tdd

v0.5.0

Published

TDD state machine enforcement (Red-Green-Refactor cycle)

Downloads

10,600

Readme

@windyroad/tdd

TDD state machine enforcement for Claude Code. Forces the Red-Green-Refactor cycle so your AI agent writes tests before implementation -- every time. Maturity: Experimental.

Part of Windy Road Agent Plugins.

What It Does

AI agents love to jump straight to implementation. This plugin stops that. It enforces a strict TDD state machine:

IDLE ──> RED ──> GREEN ──> RED (next test)
                   │
                   └──> Refactor (staying GREEN)
  • IDLE -- No test written yet. Implementation file edits are blocked.
  • RED -- A failing test exists. Implementation edits are allowed.
  • GREEN -- Tests pass. You can refactor or write a new failing test.
  • BLOCKED -- Test runner error or timeout. Fix the setup before continuing.

The agent must write a failing test first. There are no shortcuts.

Install

npx @windyroad/tdd

Restart Claude Code after installing.

Usage

The plugin activates automatically. On first use in a project without a test framework, it directs you to set one up:

/wr-tdd:setup-tests

This examines your codebase, recommends a test runner, configures package.json, and creates an example test.

Once active, the workflow is enforced on every edit:

  1. Write a test file (*.test.ts, *.spec.ts, etc.) that describes the desired behaviour
  2. The test must fail (RED state) -- proving the test is meaningful
  3. Write the minimum implementation to make it pass (GREEN state)
  4. Refactor while keeping tests green
  5. Repeat

Test files and config/doc files are always writable regardless of state.

Supported test layouts

The hook associates an implementation file with its tracked test by matching one of the following path shapes (per P201):

| Shape | Impl path | Test path | |---|---|---| | Same-directory | src/foo.js | src/foo.test.js or src/foo.spec.js | | __tests__/-adjacent | src/foo.js | src/__tests__/foo.test.js | | Parent __tests__/ | src/components/Hero.tsx | src/__tests__/Hero.test.tsx | | test/-mirror (Vitest default; many Jest setups) | src/foo.js, src/a/b/foo.js, packages/<pkg>/src/foo.js | test/foo.test.js, test/a/b/foo.test.js, packages/<pkg>/test/foo.test.js | | Cucumber step-definitions | features/step_definitions/checkout.steps.js | features/checkout.feature |

The test/-mirror rule replaces the last src path segment with test, so it works at any nesting depth and for monorepo workspace layouts.

How It Works

| Hook | Trigger | What it does | |------|---------|-------------| | tdd-inject.sh | Every prompt | Injects the current TDD state into the prompt | | tdd-enforce-edit.sh | Edit or Write | Blocks implementation edits in IDLE or BLOCKED state | | tdd-post-write.sh | After edit | Runs tests and transitions the state machine | | tdd-review-test.sh | After edit | Classifies new test files as STRUCTURAL (asserts source content) or BEHAVIOURAL (exercises the target) and surfaces structural-test regressions per ADR-052 | | tdd-setup-marker.sh | Skill completes | Marks test setup as done | | tdd-reset.sh | Session end | Resets the TDD state |

Updating and Uninstalling

npx @windyroad/tdd --update
npx @windyroad/tdd --uninstall

Licence

MIT