Dispatch
Fabien Sanglard published the agent.md he tuned until LLM output matched his hand-written code
Fabien Sanglard posted his working agent.md, which hit the Hacker News front page on 2026-08-23, aimed at four specific failure modes he sees in generated code: magic numbers, arrow-pattern nesting, verbose names, and layer-boundary violations. Concrete rules include extracting recurring values into descriptive constants, using early return and continue to cut indentation, keeping function names under 30 characters, and strictly adhering to the layered boundary hierarchy. He reports output very close to what he would have written by hand after iterative refinement, while still insisting LLMs constantly hallucinate and cannot be trusted without verification.
↳ Follow the thread