de-AI gate: a deterministic AI-tell gate for your build
de-AI gate is a small, read-only check you run before you ship. It scans your served pages and your content records for the tells of machine-written prose, the em dash (U+2014), the curly quote, invisible unicode, and a tuned set of high-precision phrase tells, and it exits with a hard pass or fail code. It runs on deterministic regex over local files. No network, no credentials, no guesswork.
Three things it does that AI detectors do not
Most AI detectors are probabilistic. They score how likely a passage reads as machine-written, which means real human writing gets flagged by mistake. de-AI gate does not score anything. It matches a fixed catalog of literal tells, so a flag is a fact about the text, a specific character or phrase that is present, and not a probability that might be wrong.
It is a gate, not a web cleaner. You wire it into a pre-commit hook or a CI job, and a violation fails the build before the content ever ships. The exit code is the contract: 0 means clean, 1 means one or more hard violations. Use --warn-only for a non-blocking baseline pass while you clean up.
It is safe to install by construction, and it proves it in code. The gate is read-only, has no auto-run hook, stores no credentials, and makes no network calls. A publish-safety test asserts exactly those properties against the source, so the claim is checkable rather than merely stated.
Install and run
Clone it and point it at your files. The JavaScript engine needs Node 18 or newer, or Bun. The Python surface needs only the standard library.
- git clone https://github.com/BryanBenner/de-ai-gate.git
- node cli.mjs --html ./path/to/site/public (scan served HTML and prose)
- node cli.mjs --records ./path/to/data (scan authored records for smuggled curly quotes)
- python gate.py --html ./site --records ./data (Python surface, standard library only)
What it catches
The catalog is deterministic and shared. A single catalog file feeds both the JavaScript and the Python engine, so the definitions never fork.
It flags typographic tells: the em dash (U+2014), the en dash (U+2013), the ellipsis character (U+2026), and invisible unicode such as a no-break or zero-width space. In your authored records it also flags smuggled curly quotes (U+201C and U+2019). And it flags a tuned, high-precision set of phrase tells, the filler that reliably signals machine drafting, while deliberately leaving softer density-based patterns alone so the gate stays quiet enough to trust.
Proven, not asserted
The safety and the accuracy are both backed by tests. The suite runs 22 JavaScript tests, covering the engine, the command line, the catalog self-gate, and publish safety, plus 8 Python tests for cross-engine parity and publish safety. The gate even runs against its own catalog, so its own documentation cannot smuggle a tell.
This page is one more instance of that discipline. It argues about AI tells by name, it names the em dash and the curly quote and the rest, and it still passes the de-AI gate in this site's own build. The deterministic claim is demonstrated, not merely described.
Keep reading, then get the source.
- Run it as a CI or pre-commit gate
- Deterministic vs perplexity detectors
- Why it is safe to install
- Sister gate: no-fabricate gate, for machine-invented facts
- View the source on GitHub
de-AI gate is open source under the MIT license. Read the code, run the tests, and wire it into your build.
Get de-AI gate on GitHubFAQ
Does de-AI gate send my content anywhere?
No. It runs deterministic regex over local files and makes no network calls. A publish-safety test asserts that the source contains no network or credential surface, so you can verify the property yourself instead of taking it on trust.
Is it a probabilistic AI detector?
No. It does not score how likely text is machine-written. It matches a fixed catalog of literal typographic and phrase tells, so a flag is a specific character or phrase that is present in the text, not a probability that could be a false positive.
How do I wire it into CI?
Run it as a step in your pipeline or as a pre-commit hook. The exit code is the contract: 0 passes, 1 fails the build on a hard violation. Use --warn-only for a non-blocking baseline while you clean up existing content.
What does it cost, and what does it need?
Nothing. It is open source under the MIT license. The JavaScript engine needs Node 18 or newer, or Bun, and the Python surface needs only the standard library, so there are no third-party dependencies to install.