Engraving of a patient restrained in a strait-waistcoat
Insane patient in a strait-waistcoat. Wellcome Collection (L0011301), CC BY 4.0.

Straitjacket

A secret scanner, but for slop.

Straitjacket is a fast, deterministic scanner that flags the weird code and text LLMs tend to generate. It sweeps your files against a set of snobby-but-configurable rules and flags anything it finds — one static Rust binary, no runtime, so it drops into any repo's CI regardless of language or stack.

curl -fsSL https://raw.githubusercontent.com/zmaril/straitjacket/main/install.sh | sh
Like Straitjacket? Try out PowderMonkey — a (straitjacketed) agent orchestration harness for aspiring slop cannons.View on GitHub →

What it catches

Everything is on by default — Straitjacket runs at its max, and you ratchet down with --skip. Each rule only looks at the file types where it makes sense.

Emoji & AI tells

Emoji glyphs in code, comments, strings, and Markdown — one of the most reliable giveaways that a machine wrote it.

Hardcoded colors

Raw hex and CSS color functions (rgb, hsl, oklch, …) that should be a theme token, not sprinkled inline.

Oversized files

The 1,500-line monsters that pass review one screen at a time and sneak up on you. Tunable, off with a flag.

Slop prose

The linguistic tells of AI-written Markdown — stock phrases, negative parallelisms, machine artifacts — scored by density.

Copy-paste

Clone-and-tweak duplication across the whole tree, detected in-process. A structure may appear only once.

React smells

Pure prop-drilling, stray effects, and more-than-one-component files — AST-based, inert outside React.

One command. Every rule.

Run straitjacket at the root of any project. It honors your .gitignore, prints one line per finding as path:line:col [rule] matched, and exits non-zero on any error — so CI fails the moment slop lands.

No config to write, no toolchain to install. Suppress a false positive on one line with straitjacket-allow, or a whole file with straitjacket-allow-file.

$ straitjacket

src/theme.ts:42:7 [color] #1e1e1e
src/Dashboard.tsx:88:3 [effect-in-component] useEffect
src/panes/GoalGroup.tsx:31:5 [prop-drilling] selection
CHANGELOG.md:14:4 [slop-prose] (warn) density 0.100
src/utils.ts:5:1 [duplication] 9 lines, 71 tokens

straitjacket: 4 error(s), 1 warning(s) across 128 file(s)

Put your slop in a Straitjacket.

Encode your taste as deterministic checks and run them across everything an LLM writes — so you never have to go "Yuck!" by hand again.