agentleFS
maeseokmaeseok/agent-operating-discipline/skills/falsifier-design/SKILL.md

falsifier-design

Skill0 starsChanged 4 months agoMITView on GitHub

Use before shipping any change behind a "we'll roll back if metric X regresses" promise — verifies the rollback metric can actually move in response to this change, before it becomes the safety net you trust

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check every one before you rely on it.

    line 33
  2. Distinctive:

    When does this value actually recompute?

    line 44
  3. Distinctive:

    If the metric refreshes on a daily cron and you judge at the next hourly tick, you are reading a pre-change value and calling it "no …

    line 46
  4. Distinctive:

    Before shipping, for each declared falsifier, answer in writing:

    line 68
  5. Distinctive:

    When the declared falsifiers fail, look for a counter that:

    line 86
  6. Distinctive:

    Look before you build. The payload usually has more in it than you've read.

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Falsifier design

A falsifier that cannot fire is not a safety net. It is reassurance — and it is more dangerous than having no falsifier at all, because you stop watching.

The failure

I enabled a flag that relaxed a duplicate-blocking gate. It was a user-visible change, so I did the responsible thing: I declared three metrics that would trigger a rollback if they got worse, recorded their baselines, and shipped.

Later I ran an adversarial check on my own safety net. All three were inert:

FalsifierWhy it could not fire
Duplicate-exposure rateThe monitoring layer had it gated out entirely — a sample-size guard ran before the threshold check, so the threshold was unreachable. The value had already crossed the ceiling and nothing fired.
Over-merge rateStructurally unrelated. That metric scored cluster membership; the flag only affected publish-time blocking. A comment in the source said so outright: "does nothing for clustering quality."
Audit false-positive rateIts denominator was "pairs that were blocked." The flag's whole job was to block fewer pairs — so the denominator shrank with the numerator and the ratio barely moved.

I had shipped a user-visible change with no working safety device, while believing I had three.

The one metric that could detect the damage already existed in the payload. I had never looked for it, because I thought I was covered.

The four ways a falsifier is inert

Check every one before you rely on it.

1. Population mismatch

Does the metric's sample overlap what you changed?

A metric built from English-language editorial pairs cannot detect duplicate Korean articles, no matter how good it is. Trace the sample all the way to its source. "It measures duplicates and I'm changing duplicate handling" is not enough — which duplicates?

2. Update latency exceeds your decision window

When does this value actually recompute?

If the metric refreshes on a daily cron and you judge at the next hourly tick, you are reading a pre-change value and calling it "no regression." Write the refresh cadence next to the baseline. If you can't state it, you don't have a falsifier.

3. The floor is already breached

Can you distinguish "worse" from "already bad"?

At 3× the acceptable threshold with a confidence interval wider than the effect you're looking for, the metric can only tell you what you already know. Check statistical power explicitly: with this n and this variance, what size change is detectable? If the answer is "larger than any plausible effect," it's not a falsifier.

4. The denominator moves with the numerator

Does your change alter what gets counted, not just what gets counted as bad?

Any rate whose denominator is "things the gate caught" will be numb to a change that makes the gate catch fewer things. Both terms shrink. Write out the algebra before trusting the ratio.

The procedure

Before shipping, for each declared falsifier, answer in writing:

  1. Population — what sample does it draw from, and does that sample contain the thing I'm changing? Trace to source, don't infer from the name.
  2. Cadence — when does it recompute, and is that before my judgment point?
  3. Power — with the current n, what effect size is detectable? Is the expected damage larger than that?
  4. Algebra — does my change move the denominator? Write the ratio both ways.
  5. Directionality — is there a mechanism connecting my change to this metric, or just a topical resemblance? Grep the metric's computation for the thing you changed. If it doesn't appear, there's no causal path.

If you cannot answer all five, write down: "shipping without a working falsifier." That sentence is the deliverable. It's fine to ship anyway — what's not fine is shipping while believing you're covered.

Finding a real one

When the declared falsifiers fail, look for a counter that:

  • draws from the same population your change touches,
  • updates at least as fast as your decision loop,
  • is not already saturated, and
  • would move only if your change caused harm.

Often it already exists. The best one I found was a shadow counter for a different subsystem that happened to re-check the same population without applying the feature I'd enabled — so it directly counted "cases where the new behavior would have been wrong." Nothing to build.

Look before you build. The payload usually has more in it than you've read.

Related

  • verify-before-judging — the same skepticism applied to reading a metric
  • blast-radius — the same discipline applied before the change, not after

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.