Menu

1 / 4

Your Coding Agent Skips Your Lint. lefthook Makes Every Commit Run It Anyway

DEV Community: php·Gabriel Anhaia·18 days ago
#9X0jyY1m
#devto#dev#commit#agent#lefthook
Reading 0:00
15s threshold

Book: Decoupled PHP — Clean and Hexagonal Architecture for Applications That Outlive the Framework

Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go

My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools

Me: xgabriel.com | GitHub

git log shows the agent's commit: feat: refund endpoint . Inside it are tabs where your code style wants spaces, a method PHPStan would reject at level 8, and a domain class that now imports an Eloquent model.

None of that is the agent being careless. PHP-CS-Fixer , PHPStan and your layer rules exist, but they run when you remember to run them, or in CI after the push. Nothing ran them at the moment the agent typed git commit . So nothing stopped it.

A git hook does run at that moment, for the agent the same as for you.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.