fallow checks architecture and dead code before every commit
Two fallow commands in the pre-commit hook catch layer violations and dead code the agent leaves behind, before I review anything.
Reported by @juliandierker · Verified 2026-11-18
- Agent
- Claude Code
- Model
- claude-opus-5-5
- Stack
- TypeScript, Remix 3
- Skill version
- 1.4.143
Problem
Agents import across layers when it is the shortest path, and they leave unused exports behind after a refactor. Both look fine in a diff.
Setup
fallow CLI 3.43.2 as a dev dependency, plus the
fallowskill so the agent knows which command fits which moment.Layers declared once in
.fallowrc.jsonas zones with allowed imports, for exampledomainmay import nothing anddeliverymay importdomainonly for types.The pre-commit hook runs:
npx fallow audit --base HEAD
npx fallow architectureWhat happened
A boundary break or a dead export fails the commit, so the agent fixes it
before I see the diff. Before editing a file the agent can run
fallow guard <file> to see which rules apply to it.
Reproduce
npm i -D fallowDeclare your zones and rules under
boundariesin.fallowrc.json.Add the two commands to your pre-commit hook.
Let the agent import infra code from the domain layer and try to commit.