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

oops-framework

v1.4.0

Published

OOPS Framework - TDD enforcement for LLM-driven development via Claude Code Hooks

Downloads

920

Readme

🙊 OOPS Framework

No more "Oops, I broke it again!" 💥

You asked your LLM to write some code. It jumped straight into implementation without writing a single test. You ran it. It broke.

"Oops...😅"

Sound familiar?

OOPS Framework physically enforces TDD discipline on LLMs (Claude Code). Instead of politely asking "please write tests first 🙏", it blocks implementation files until tests exist. Not a request — an enforcement 🔒

🇯🇵 日本語版 README


🔧 How It Works

Uses Claude Code Hooks to block file edits based on the current TDD phase.

  🔴 RED Phase           🟢 GREEN Phase         🔄 REFACTOR Phase
  ┌─────────────┐    ┌──────────────┐    ┌────────────────┐
  │ Test files   │    │ Impl files   │    │ Both files     │
  │ ✅ ALLOWED   │    │ ✅ ALLOWED   │    │ ✅ ALLOWED     │
  │              │    │              │    │                │
  │ Impl files   │    │ Test files   │    │ (tests must    │
  │ 🚫 BLOCKED  │    │ 🚫 BLOCKED  │    │  stay passing) │
  └─────────────┘    └──────────────┘    └────────────────┘

When the LLM thinks "let me just sneak in some implementation... 😏":

  🤖 Claude: Edit src/calculator.js
  🚨 Hook: Phase: RED - Only test files allowed. Cannot modify: src/calculator.js

Oops! 🙊 Blocked! Write those tests first!


🚀 Quick Start

# Install 📦
npm install -g oops-framework

# Initialize in your project
cd your-project
oops init

# Start feature development (auto-enters RED phase 🔴)
oops feature start add-login

# Write tests ✍️ (RED phase: only test files editable)
# ... write your tests ...

# Transition to GREEN phase 🟢 (only implementation files editable)
oops phase green

# Write minimal implementation 💻
# ... write implementation ...

# Transition to REFACTOR phase 🔄 (both editable)
oops phase refactor

# Refactor ✨ (keep tests passing)
# ... refactor ...

# Feature complete! 🎉
oops feature complete

📊 The "Oops" Counter

Every time the LLM tries to edit a file that violates the current phase, the Oops counter goes up 😱

$ oops stats

📊 OOPS Framework Statistics
===================================
  Phase:     GREEN 🟢
  Oops Count: 3  💀💀💀
  Last Oops:  2026-03-05T01:23:45.000Z

Complete a feature with zero Oops and... 🏆

$ oops feature complete

  ✅ Feature completed: add-login
  🙊 Oops prevented: 0

  🎉 Perfect TDD cycle! No oops!

Nailed it! ✨


🧩 Task Decomposition

Got a big task like "build an inventory management system"? No problem 💪

OOPS automatically breaks it into subtasks, each protected by its own TDD cycle!

# Break down the task 📋
oops plan create \
  --goal "Inventory Management System" \
  --subtask "Product Model: Product type and validation" \
  --subtask "Product CRUD: API endpoints" \
  --subtask "Stock Management: inventory logic"

# Work through subtasks one by one 🏃‍♂️
oops plan next    # → Product Model (RED 🔴 phase)
# ... RED → GREEN → REFACTOR ...
oops plan done    # → Done! Next up ✅

oops plan next    # → Product CRUD (RED 🔴 phase)
# ...
oops plan done    # ✅

oops plan next    # → Stock Management (RED 🔴 phase)
# ...
oops plan done    # ✅

oops plan complete  # 🎉 All done!

Every subtask is locked down by the OOPS cycle 🛡️


📖 Commands

| Command | Description | |---------|-------------| | oops init | 🏗️ Initialize the framework | | oops phase | 👀 Show current phase | | oops phase red\|green\|refactor\|none | 🔀 Transition phase | | oops feature start <name> | 🚀 Start feature development (→ RED 🔴) | | oops feature start --no-tdd <name> | 📝 Start without TDD (docs, config, etc.) | | oops feature complete | 🎉 Complete the feature (auto-syncs plan subtask) | | oops gate | 🚦 Gate check (verify transition conditions) | | oops stats | 📊 Show statistics | | oops plan create | 📋 Create a task decomposition plan | | oops plan show | 🗺️ Show the plan | | oops plan next | ▶️ Start the next subtask | | oops plan done | ✅ Complete the current subtask | | oops plan complete | 🏆 Complete the entire plan |


🤖 Claude Code Integration

OOPS Framework runs on Claude Code Hooks. Humans do what they always do — just tell Claude Code "build X"! OOPS handles drilling TDD discipline into Claude Code 🥋

Hooks 🪝

  • PreToolUse — Intercepts Edit/Write/NotebookEdit. Instant block on phase violations 🚫
  • PostToolUse — Auto-runs tests after file changes 🧪 (optional)

Skills 📚

Three skills are included in .claude/skills/:

  • oops-orchestrator 🎭 — Conducts the entire TDD session
  • oops-test-writer ✍️ — Guides test creation during RED phase
  • oops-implementation 💻 — Guides minimal implementation during GREEN phase

🤔 Why "OOPS"?

Orchestrated Obligatory Process System

Fancy name, but what it really means:

🙊 A framework that stops LLMs from ever having to say "Oops."

Hooks prevent the "Oops" of writing code without tests and breaking things. And if the LLM still tries to break the rules? The counter's watching 👀

Aim for Oops 0! 🏆


📄 License

MIT