@lidangzzz: I've said it many times over the years: to make an AI Agent write good code, all the secrets are in the textbooks from the 1990s: - Write tests diligently, write more tests, push test coverage as high as possible - Do CI/CD properly, avoid messing up at all costs - For a new proj…
Summary
The author emphasizes that the key to making AI agents write good code lies in following classic software engineering practices from 1990s textbooks: writing tests, doing CI/CD properly, top-down design, and modular decoupling.
View Cached Full Text
Cached at: 07/02/26, 10:20 AM
I’ve said it many times over the years—the secret to getting AI agents to write good code is all in the textbooks from the 1990s:
- Write tests thoroughly, write more tests, and make the test coverage as high as possible
- Do CI/CD properly, and do everything you can to avoid messing things up
- For a new project, do top-down design (specs-driven): start with features and requirements, then design the architecture and interface, layer by layer
- For a fast-growing project, first split files, then split modules, then divide into a bunch of services or executables—decouple early
- For a category of features, do your homework on design patterns in advance to reduce duplication and increase reuse
- If the codebase is large enough, either fix incrementally while raising test coverage, or keep the specs, tests, and interface solid and just rewrite from scratch—rewrite whenever you can, keep rewriting, rewrite rewrite rewrite
What humans have been doing in the past two years is essentially re-practicing all of the above.
Similar Articles
@yibie: Every programmer should hand-write an agent. It only takes about 50 lines of code, it's fun, and it will surprise you. But to get the most out of it, do these two things: First, write it from scratch. Open a blank text file and type every line yourself. Don't use any AI, not even autocomplete. Second, rely only on the standard library documentation…
This article encourages programmers to manually write a simple AI agent (around 50 lines of code) to deepen their understanding of how agents work, and suggests writing it from scratch while relying only on standard library and API documentation.
@FakeMaidenMaker: The scariest thing about using an AI agent to write code is losing control: the agent runs wild, quality is inconsistent, you don’t know what stage it’s in, and it messes things up halfway through. AWS just open-sourced a set of development lifecycle workflow rules specifically designed for AI coding agents — AI-DLC — that make the agent…
AWS has open-sourced AI-DLC (AI-Driven Development Life Cycle), a set of development lifecycle workflow rules designed for AI coding agents to help developers control agent behavior and ensure quality. It supports multiple platforms including Claude Code, Cursor, and GitHub Copilot.
@Xudong07452910: This paper is a must-read for heavy users of Claude Code, Codex, or other AI Agents. It doesn't study how Agents fail on benchmarks, but a more real problem: In real development, what exactly are AI coding agents doing...
This paper analyzes 20,574 real-world coding-agent sessions to identify how AI agents misalign with developer intent, finding that constraint violations and inaccurate self-reporting are the most common failure modes, imposing trust and effort costs rather than irreversible damage.
@Ryrenz: Most people using coding AI just say “help me fix this bug,” then spend half an hour wrestling with it. Change the phrasing and it gets it right the first time. 1. Have it look before acting “Don't write code yet. Read the relevant files and tell me how this feature currently works; I'll confirm before you change it.” 2. Stuck bug “Don't guess. Add log…
A practical tip on how to use coding AI more effectively. It lists 12 concrete prompt examples—such as having the AI read the code before modifying it, changing only the necessary parts, and writing rules into AGENTS.md—to reduce back-and-forth and make the rules stick long-term.
@yibie: Recommend this article that gave me chills. A developer recalls a professor 25 years ago saying "Lisp is the language of AI," and then he wrote a complete agent in 100 lines of Common Lisp—8 lines of recursive agent loop, one tool being e…
A developer built an AI agent in 100 lines of Common Lisp, with the only tool being eval. The model executes code through a recursive agent loop and restores skills via a persisted transcript, showcasing Lisp's unique advantage as an AI language.