Straitjacket

Straitjacket

Engraving of a patient restrained in a strait-waistcoatAn 1838 engraving of a strait-waistcoat. Wellcome Collection, Public Domain Mark.

A secret scanner, but for slop.

Get started · Read the docs · Browse the rules · GitHub

Straitjacket is a fast, deterministic scanner that flags the weird code and text LLMs produce. 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/PowderworksCode/straitjacket/main/install.sh | sh

Or build from source with cargo install straitjacket.

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.

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/icons/Logo.tsx:12:5  [inline-svg]  <svg
docs/setup.md:3:1  [emoji]  🚀
src/api/handlers.ts:1:1  [file-size]  2214 lines
src/worker.ts:88:31  [deep-nesting]  nesting depth 9

straitjacket: 5 error(s), 0 warning(s) across 128 file(s); 0 suppressed

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