AGENTS.md is a request, ArchUnit is a check: enforce agent rules in the build
therealdanvega · x · 2026-11-21
The author contrasts two ways to constrain AI coding agents: a rule like "controllers never talk to repositories" in AGENTS.md is just a request the agent follows most of the time; encoding it as an ArchUnit @ArchTest rule — e.g. classes in ..web.. must not depend on ..repository.. — makes the build fail instead. Rules in prose for the agent, rules in tests for the build. Includes a ready-to-use ArchUnit snippet.
More from coding & agent
- Open source forum mod: people vibe coding projects they have no business building — kscottz · 2026-11-21
- Pydantic launches Agent Sandboxes in Logfire: millisecond cold starts, snapshot-resumable REPLs — samuelcolvin · 2026-11-21
- Building one customer-facing AI agent in-house costs $245K-$365K in year one — pritisinghhhh · 2026-11-21
- MEGA AI Engineering Course Wraps First Cohort with 2,000+ Developers Enrolled — johnlindquist · 2026-11-21
- Prompting deep research tools to deliver tables, not 15-page reports you re-type — bar_raiser333 · 2026-11-21
- OuterSSH open-sourced: SSH tunneling to run graphical agent apps from your phone — savvyRL · 2026-11-21