Ep 435 article 3:38 w/ Justy & Cody

Stop writing rules in AGENTS.md: use agent hooks and nano staged instead—Martian Chronicles, Evil Martians’ team blog

Justy and Cody riff on Evil Martians' argument that LLM guardrails belong in real pre‑commit hooks like nano‑staged rather than in AGENTS.md, weighing the speed, token savings, and practical fit for dev teams.

Script: GPT-OSS 120B Voice: OpenAI TTS

Transcript

Justy Cody, I just read this Evil Martians post about ditching AGENTS.md for nano‑staged hooks, and honestly it feels like the shortcut we’ve been dreaming about.

Cody Right.

Justy The central claim is simple: instead of stuffing LLM guardrails into an AGENTS.md file, we should embed them in real pre‑commit hooks—nano‑staged or husky—so the tooling runs automatically, cuts token usage, and speeds up the feedback loop.

Cody Exactly.

Justy They walk us through a five‑minute setup: install nano‑staged, create a .nano‑staged.json mapping file patterns to oxlint or oxfmt, add a Claude hook that calls nano‑staged on unstaged files, then wrap it with a husky pre‑commit script. The whole thing costs a couple of seconds per run.

Cody Technically that makes sense—running a local linter is orders of magnitude faster than pinging an LLM for each style check, and it avoids the token bill.

Justy The article says you can shave off up to thirty seconds per hook, which at scale becomes a BIG productivity win—FAST, CHEAP, and it avoids the SLOW token churn. They also point out that tools like Biome, oxlint, and oxfmt run five to ten times faster than ESLint and Prettier.

Cody I see.

Justy But the piece assumes every team has a Node environment and that nano‑staged can replace more complex CI checks. In polyglot repos you’d still need something like lefthook, and the hook only catches what the formatter knows.

Cody No way.

Justy Still, for most JavaScript or TypeScript teams, the speedup is real. Thirty seconds saved per hook, multiplied by a dozen hooks and a ten‑person team, translates into a BIG productivity gain.

Justy So who should actually care? I think any product team already using LLM‑assisted coding assistants and wanting a tight loop—like a startup sprinting on a deadline—will feel the difference.

Cody Sure.

Justy By the way, I finally tried that new cold brew place on Sunset; the barista spelled my name wrong, but the coffee was worth the typo.

Cody Speaking of coffee, I spent my morning debugging a flaky test because the pre‑commit hook failed on a missing semicolon—proof that a fast local guard is nicer than watching the LLM spin.

Justy Exactly.

Justy You know, I was thinking about how we keep our plants alive in the office. Turns out talking to them isn’t enough; they need actual water, not just motivational quotes.

Cody Yeah, my cactus is basically a dead meme now. Anyway, if you already have husky, adding nano‑staged is a one‑liner, giving you cheap, FAST linting without burning tokens.

Justy Right.

Justy The practical takeaway? Set up nano‑staged or lefthook for your language, move the style rules out of AGENTS.md, and let the LLM focus on higher‑level suggestions instead of basic formatting.

Cody Makes sense.

Cody Just watch out for edge cases—like generated code that needs a custom ESLint rule. The article suggests you can ask the LLM to write one, which is clever, but you’ll still need to maintain that rule.

Justy Alright, that’s a wrap for today’s deep dive—let’s grab another coffee and see what else we can automate.