one-commitone change per commitnode tools/one-commit.mjs
ask-first3+ files need a yesnode tools/ask-first.mjs
This table is a file called claims.tsv, one line per rule. You write the check, or you ask Claude Code: "write a check for this rule". Anything that can answer yes or no works.
6
One check runs
Yes, the rule holds. No, the rule is red. Nothing in between.
namethe rule, plain wordsthe check
answer-firstthe answer is line onenode tools/answer-first.mjs
answer-firstthe answer is line onenode tools/answer-first.mjs
A new line in the table, with its own check. From now on the timer checks it 48 times a day, and the light shows whether the mistake comes back.
10
Nothing stays red
A rule red for more than a day stops Claude Code from ending its reply, until someone decides.
RED for 26 h tests-green the test suite passes Two ways out, and both are decisions. Silence is not one of them.
Fixed it
node red-debt.mjs fixed "tests-green"
Not fixing it now, and why
node red-debt.mjs debt "tests-green" "the test needs a fix from another team on Monday"
That note lasts 24 hours. Then it asks again. Nothing stays red by accident.
11
The map
Every rule sits on the step where it applies. One look tells you where the work breaks.
ask
plan
build
test
commit
Drawn from the table of rules, fresh every 30 minutes. Red is the rule failing right now. Grey is a rule with no check yet.
12
Proof
Ten rules broken on purpose. Ten caught. Zero false alarms.
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
A test computer with nothing else on it. Ten rules, each broken on purpose: one at a time.
10 of 10 caught
0false alarms in 20 runs with nothing broken
12 September 2026. The records are on GitHub, in the repo.
13
Install
One line to install. It asks nothing.
$ npx metacognition
installed: the checks, 3 hooks, the table of rules, a timer every 30 min
3 hooks added to settings.json (your other hooks are kept, a backup is written first)
running the checks once ...
metacognition GREEN: 11 of 11 rules held
Paste it into the terminal where you run Claude Code. Mac or Linux. Thirty seconds later you see your first verdict: one line, GREEN or RED, and which rule.
14
Try first, undo
Try it first. Uninstall keeps your data.
$ npx metacognition --dry-run
would: copy the checks and the hooks to ~/.claude/metacognition/
would: add 3 hooks to settings.json (backup first)
would: write the 30-minute timer
dry run: nothing was changed.
$ npx metacognition --uninstall
removed the 3 hooks, the timer and the code. Your records and your table of rules stay.
15
You might ask
Five questions people ask first.
Who writes the check?
You do, or you ask Claude Code: "write a check for this rule". Anything that can answer yes or no works.
What if a rule has no check?
It stays a note: grey on the map, still visible, never pretending to be checked.
Does it send anything anywhere?
No. No internet, no account. It reads your files and writes one line and one record on your Mac.
Does it slow Claude Code down?
No. One line at the start of a session. The checks run on the timer, not inside your chat.
What does it cost?
Nothing. Free and open, MIT licence. github.com/jazzs-thoughts/metacognition