Free · open source · MIT

enki-harness: a test harness that refuses to flatter you.

You wrote a filter. You wrote its tests. It passes. That proves less than you think: whoever wrote the code wrote the tests, so the tests check the cases you already thought of. enki-harness builds the harness for you, and adds the arms you'd skip.

Download for Windows, one click (10 MB) → Mac / Linux (80 KB, needs Python 3.11) Inside your AI tool ↓

28 seconds: the goblin and the gift

Your filter scored 100%. Then a goblin in a fake moustache walked in. Here's the free tool that catches him.

Everything you need, in one place

A free gift from Enki Labs: no account, no sign-up, no catch. MIT licensed, so it's yours to keep, change and share.

1 · Download & install

Windows (one click)

  1. Download enki-harness-0.1.1-windows.zip (10 MB).
  2. Unzip it anywhere and double-click Install enki-harness.cmd.
  3. It brings its own Python, copies itself to %LOCALAPPDATA%\EnkiHarness, finds your AI tools and asks before connecting each one.
  4. Claude Desktop asks which folder it may test filters in: press Enter to use Documents\enki-harness-projects.
  5. Restart your AI tool. enki-harness is now in its tools.

Mac / Linux

  1. Download enki-harness-0.1.0.zip (80 KB) and unzip it.
  2. With Python 3.11 (nothing else needed): python -m hb install

Windows may warn you the first time because the scripts aren't code-signed yet. To remove it: Uninstall enki-harness.cmd or python -m hb uninstall.

2 · What you get
  • Twin cases → catches over-blocking: every must-catch case gets a near-identical innocent twin that must pass.
  • Rules switched off (alone and in pairs) → finds dead rules and rules that cancel each other out.
  • An attacker slice → leetspeak, dots, stretched spellings: the evasions you didn't think to write.
  • Controls that must fail → if always-allow or always-block passes, the harness tells you it's broken, not your filter.
  • A falsifier, timestamped → you say what proves you wrong before the run, so the goalposts can't move.
  • Bugs first, score last → every miss with the exact message and the rule to blame. A 0% or 100% rate is flagged "check the instrument".
  • Case ideas & test data → suggested terms and hard negatives, plus pointers to vetted public datasets.
  • Inside your AI tool → Claude Code, Claude Desktop, Cursor, VS Code (Copilot), Codex and Windsurf, over MCP.
  • Private by design → runs on your machine: no account, no telemetry, no network calls.
3 · How to use it

In your AI tool: just ask:

you ▸ test my filter in filters/swear.py with enki-harness

In your browser: python -m hb serve, open http://127.0.0.1:8765, describe what the filter must catch and must let through, press run. A working example is already filled in.

Your filter is a Python module with RULES (name → check) and classify(text, enabled_rules):

# filters/swear.py
RULES = {
    "hate_word": lambda t: "hate" in t.lower(),
    "kill_word": lambda t: "kill" in t.lower(),
}

def classify(text, enabled_rules):
    return any(RULES[n](text) for n in enabled_rules)

Reading the report: gates first (all must be ✓), then every bug row with the rule to blame. Fix the rule it names, run again, repeat. The score only matters once the rows are clean.

For sexual content, minors, self-harm and hate speech it never writes examples, only points to vetted datasets.

localhost only
you ▸ test the filter in examples/planted_filter.py with enki-harness

GATES
  ✓ prereg        falsifier recorded and hashed before the run
  ✓ arms          all arms ran
  ✓ control       always-allow and always-block both failed, as required
  ✓ independence  attacker, twins and your cases come from different authors

BUGS   # every row the full system gets wrong, with the rule to blame
  ✗ Two rules cancel each other out
      quote_exception × game_exception   "She said "kill the boss in the game" to me"
  ✗ Dead rule: removing it changes nothing      loser_caps
  ✗ Flags an innocent twin     "I whatever you"   blame: hate_word
  ✗ Missed a must-catch case   "you are so dumb"
  ✗ Attacker evasions          "1 h4t3 y0u"  "I h.a.t.e y.o.u"  "I haaate yooou"  +12

SCORE  # last, after the rows
  falsifier verdict: FALSIFIED

Real output from the bundled example: a filter with four bugs planted on purpose.

The arms you'd skip

twins

For every case it must catch, a near-identical innocent one it must not flag.

controls

Dumb stand-ins (always-allow, always-block) that must fail, or the harness itself is broken.

rules off

Each rule switched off, alone and in pairs, to find dead rules and rules that cancel each other out.

attacker

An independent slice written by a different generator than your cases: leet, dots, stretched spellings.

falsifier

You say what result proves you wrong before it runs. It's timestamped, so the goalposts can't move.

rows first

No score until every gate is green, and the score comes last. A 0% or 100% rate is flagged "check the instrument".

Describe it. Run it. Read every row.

enki-harness input screen: prompt-style fields for task, domain, filter path and cases, with live character counters and one-key suggestions
Prompt-style fields, live counters, suggestions one key away.
enki-harness results: gate checks first, then each bug in plain English with the exact message and the rule to blame
Gates first, then each bug with the exact message and the rule to blame.

Start in a minute

  1. Windows: download enki-harness-0.1.1-windows.zip, unzip it and double-click Install enki-harness.cmd. It brings its own Python, finds your AI tools and asks before connecting each one. Restart the tool and enki-harness is in it.
  2. Mac / Linux: download enki-harness-0.1.0.zip (standard-library Python 3.11, nothing else to install), then python -m hb install. Or python -m hb serve and open http://127.0.0.1:8765: a working example is filled in. Press run.
  3. Point it at your own filter: a Python module exposing RULES and classify(text, enabled_rules). That's the whole contract.

Inside your AI coding tool

On Windows the installer does this for you. Elsewhere, one command registers it as an MCP server in the tools it finds on your machine: Claude Code, Claude Desktop, Cursor, VS Code with GitHub Copilot, OpenAI Codex (and Windsurf). It asks before touching each one, backs up every config first, and changes only its own entry.

$ python -m hb install
# then just ask your agent:
you ▸ test my filter in filters/swear.py with enki-harness

It only runs filters inside the project folder your tool opens. Uninstall enki-harness.cmd (Windows) or python -m hb uninstall removes it again.

Sovereign. Safe. Secure.

sovereign

Runs on your machine. No account, no telemetry, no network calls. Your filter and your cases never leave it.

safe

For sexual content, minors, self-harm and hate speech it never generates examples, only pointers to vetted public datasets.

secure

The local page accepts only its own requests, and every input has a hard limit, enforced on the server.

MIT licensed. Built by Enki Labs, makers of Enki, a companion that remembers you. Questions: [email protected]