Guide: How to Use AI Coding Agents

Published on

Cognition, the company behind the famous Devin (the “AI software engineer agent”), just released a guide with best practices for using coding agents.

The article reinforces an idea I’ve been seeing a lot in practice: the biggest productivity leap doesn’t come from treating AI as an assistant that completes your code, but as a teammate (a junior dev, maybe?) to whom you delegate entire tasks. Instead of an assistance mindset, it becomes a management one.

I picked out some of the insights from their guide that I found the most interesting:

  • Instead of just saying “what” you want (“create unit tests”), detail “how” you want it done (“test function X, focusing on edge cases Y and Z, and mocking service W”). Giving the architecture and the logic upfront saves a huge amount of review and refactoring time.
  • Create a robust feedback environment. The “magic” of agents lies in their ability to iterate and fix their own mistakes. That’s why it’s essential to give them access to everything that generates feedback: linters, automated tests, type checking (TypeScript > JavaScript, according to them), etc. Without that, it’s like asking a dev to code without access to Google, Stack Overflow or AIs (😅).
  • The biggest time savings come from delegating bigger tasks (1 to 6 hours). The tip here is not to expect the AI to deliver everything at once. Ask it to do the first draft, but set clear checkpoints. E.g.: “First, create the database structure and let me know so I can review it.” -> “Ok, now implement the backend routes.” -> “Great, now the frontend.” This keeps the agent from going down the wrong path for too long.
  • Know when to give up and start over. This was the part I liked the most for its tone of realism. If an agent is being too “stubborn”, ignoring your instructions or stuck at the same point, the best solution is often not to insist with more prompts, but to start a new conversation from scratch, with clear instructions from the beginning. An agent’s ability to fix an environment or a codebase that’s already a mess is much lower than its ability to create something new the right way.

The guide also covers current limitations (like difficulty debugging complex scenarios or not-so-sharp visual reasoning) and gives security tips.

In the end, the message is clear: engineers won’t disappear, but the work is changing. The ability to parallelize tasks and manage “teams” of AI agents is going to become an essential skill.

Here’s the link to the full guide (in English).