- An agent runs tools in a loop to achieve a goal.
- Agents are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks.
- Agents help decouple programming, the craft of physically typing code, from engineering, the architecture of your system, the goals, the “why” of what you’re building.
- Using LLMs for coding is unintuitive, requiring significant effort to master.
- Treat programming with agents as theory building. Maintain your own mental model of the system and evaluate agent output against it. Productivity comes from informed steering and rejection, not accepting more generated code.
- Before coding, make a plan with the model.
- You can use the same or a different model to critique the plan and iterate. If you are unsure, ask to “give a few options before making changes”.
- Progressive, iterative prototyping. Code is cheap. Redoing work is extremely cheap. Prioritize exploration over execution (at first). Iterate towards precision during the brainstorming phase. Start fresh once you know what and how to build it.
- The act of writing code (or doing something) surfaces decisions you hadn’t considered. When code is cheap, implement to learn.
- Failed attempts are cheap. If the plan fails and the result is bad, just delete everything and try again.
- You can have the agent interview you and challenge assumptions before coding!
- Low fidelity prototypes are better than walls of specs
- Divide the problem into smaller problems (functions, classes, …) and solve them one by one. Keep sessions short.
- Code is cheap, but maintenance, support, and security aren’t!
- Use all programming languages and technologies instead of just the ones you’re already familiar with.
- Software is still hard. It gets harder if you trick yourself into thinking the agents can take on the hard parts.
- Teach and tell the agents to use the same tool you’d use to run and debug code.
- You need quick and clear feedback loops (fast tool responses, clean logs, …).
- Give them the ability to interactively test the code they are writing too.
- Ask what passing checks prove and what they miss
- A test can repeat the same mistake as the implementation
- Use deterministic tools whenever you can. Linters, type checkers, auto-formatters, commit hooks, …
- Use quiet-success, loud-failure conventions for tool feedback.
- Build “partial autonomy” products where humans stay in the loop to verify output, rather than fully autonomous agents.
- Tools come in three flavors: context retrieval (finding information), feedback loops (verifying actions), and planning (structuring work over longer horizons).
- Choose tool interfaces with model training in mind.
- The way you wrap, feed, and observe a powerful model often matters more than fancy prompt tricks or extra bells and whistles on the model itself.
- Decomposing your agent into discrete steps improves reliability and efficiency. If there is a bit of work that happens often and is easier to eval than your entire task, that’s a good thing to break out and optimize.
- Project setup is the single most important human time investment you can make.
- Make your project build, test, and lint with a single command.
- Print minimal, actionable error messages.
- If a human gets lost onboarding to your codebase, an LLM is definitely going to be lost.
- Fix your fundamentals first: data quality, documentation, backups, testing, permissions, and operational culture. An LLM is not a psychic.
- Design small, isolated systems. You can check a static website looks great easily. You can check a small API design works well. Compose black boxes into larger systems. Individual boxes can be rewritten in other languages, removed, replaced easily. You can measure them individually.
- Focus on building a rich environment with good and fast tests, documentation, consistent patterns, and clear feature definitions - this helps both humans and AI work better.
- Write legible (text based) relevant content and link it with anything else (code, diagrams, …).
- Applying software engineering best practices is key. LLMs actively reward existing top tier software engineering practices:
- Automated testing.
- Red/green TDD.
- Planning in advance.
- Comprehensive documentation (exportable/accessible in markdown).
- Good version control habits.
- Having effective automation in place.
- A culture of code review.
- Modular, reusable code.
- Strong research skills.
- The ability to ship to a preview environment.
- An instinct for what can be outsourced (to AI vs what needs human attention).
- A good (updated) sense of estimation.
- Unix philosophy beats vertical integration. The most powerful coding agents follow Unix principles, simple, composable tools that do one thing well.
- Design architecture for very quick iteration and change.
- Focus on figuring out what does “the box” actually do and what are the invariants that must be satisfied. With those boundaries established, the implementation inside can vary freely.
- Good component boundaries (Modularity) let you change the internals quickly without affecting other services or infrastructure.
- Agents don’t navigate software so much as intuit and compose it. They don’t see your GUI, but consume your API spec. Move away from visual interfaces and toward headless, API-first environments. An agent needs a CLI or a robust API, not a button on a web page.
- The best product for an agent is just the best product for a developer. Think like a developer-tools company: ship small, boring, composable primitives with explicit inputs, outputs, constraints, and errors that can be invoked and chained reliably.
- Provide structured error hints. If a request fails, the system should provide a reason that allows an agent to self-correct and retry without human intervention.
- A good test for how agentic-friendly your codebase is: “Can you get away with just asking for the What without describing the How?”
- Coding agents primarily navigate repositories through string and filename search, so identifiers and paths should be good search terms.
- Prefer distinctive, concept-specific function, method, type, directory, and file names over generic names such as create, Data, or Config.
- Prefer functions with clear, descriptive, unique, and longer than usual function names over classes. Avoid inheritance and overly clever hacks.
- Care about the failure modes. It’s very easy to make things that work well if you don’t care how they fail. AI-generated code can be designed to work while not being designed to fail gracefully.
- Automate everything that’s easy. To spend more time on the hard stuff, minimize the time you spend on easy things. Distill learnings into skills, build loops, automate code reviews, and let your tools compound.
- If it doesn’t land, make a SKILL.
- Write skills for your product so agents know how to use it properly. Distribute them.
- Good skills optimize predictability.
- Write checkable steps with explicit completion criteria, front-load the trigger words that should invoke them, and use progressive disclosure for reference material.
- Prune duplication, no-ops, and stale sediment so each meaning has a single source of truth.