gitwtfhub

wtf is iffable?

openwong2kim/iffable — explained in plain English

Analysis updated 2026-05-18

3PythonAudience · developerLicenseSetup · moderate

TL;DR

A guardrail for Claude Code that pushes routine work to cheaper AI models automatically, protecting a limited weekly quota on the most capable model.

Mindmap

mindmap
  root((repo))
    What it does
      Protects model quota
      Blocks cheap helper model
      Requires requirements ledger
    Tech stack
      Python
      Bash install script
      Claude Code hooks
    Use cases
      Quota preservation
      Enforce planning
      Model tier routing
    Audience
      Claude Code users
      Developers
    Setup
      Manual hook wiring
      Env var overrides
      Fails open on error

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Automatically block a cheap AI model from being used as a delegation helper.

REASON 2

Require a written requirements list before letting the AI start a large unplanned task.

REASON 3

Prevent an AI session from ending while planned work items are still unfinished.

REASON 4

Route different kinds of coding work to the model tier best suited for the task.

What's in the stack?

PythonBashClaude Code

How it stacks up

openwong2kim/iffable0marildo/imago0xdfi/glm-5.2-1m-4x-dgx-spark
Stars333
LanguagePythonPythonPython
Setup difficultymoderateeasyhard
Complexity2/55/5
Audiencedevelopergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires manually merging the printed hook configuration into your Claude Code settings file.

Wtf does this do

Iffable is a guardrail tool for Claude Code, the AI coding assistant, aimed at people on a subscription plan where the most capable model has a limited weekly usage cap. That top model, referred to in the README as Claude Fable 5, drains its quota quickly if it is left to handle every small task, so iffable tries to push simple work toward cheaper models automatically. The tool only turns itself on when a session was started using the Fable model. If a session starts on any other model, it stays inactive except for one rule that always applies: it blocks a certain cheap model from being spawned as a helper at all, no matter which main model is running. When active, iffable adds three checks. It blocks spawning that lowest tier helper model entirely. It also blocks a large, unplanned piece of delegated work from starting unless a written requirements list, called a ledger, already exists in the project. And it blocks the AI from ending its turn while that ledger still has unfinished items checked off as open. If every check fails to parse correctly or hits an internal error, the tool is designed to step aside quietly rather than block anything, so a bug in iffable itself can never lock up a session. When armed, iffable also injects a written policy describing which model tier should handle which kind of work: the top model for judgment calls and debugging, a strong second tier model for heavy reasoning tasks, a simple tier for routine work like formatting or renaming, and the cheapest tier banned outright. Installation is done by running a shell script that copies the tool's files into a folder in the user's home directory, after which the user manually wires it into their Claude Code configuration. A handful of environment variables let you override its automatic behavior. It is released under the Apache 2.0 license.

Yoink these prompts

Prompt 1
Install iffable and wire its hooks into my Claude Code settings.local.json file.
Prompt 2
Explain the three guards iffable enforces and when each one fires.
Prompt 3
Show me the requirements ledger format iffable expects at .workflow/LEDGER.md.
Prompt 4
Help me set the IFFABLE_SPAWN_LIMIT environment variable for my project.

Frequently asked questions

wtf is iffable?

A guardrail for Claude Code that pushes routine work to cheaper AI models automatically, protecting a limited weekly quota on the most capable model.

What language is iffable written in?

Mainly Python. The stack also includes Python, Bash, Claude Code.

How hard is iffable to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is iffable for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.