Article · AI coding assistants · AI agents
AI coding assistants: from editor suggestions to an agent that opens pull requests
How to work with AI on code so you gain speed without losing quality: modes of work, project context (CLAUDE.md, AGENTS.md), the explore–plan–implement–verify cycle, change review, tests, security and automated review in CI.
An AI coding assistant can write an endpoint, a test or a migration in a few minutes – and just as quickly bring into the repository a bug that slips through a careless review. The difference between a team that gains from AI and a team drowning in technical debt is not the choice of tool but the way of working: what context the assistant gets, how big the tasks it is given are, how the result is verified and where the trust boundaries lie.
- 3
- modes of work – editor suggestions, chat, an agent in the repository
- 1
- project context file – CLAUDE.md, AGENTS.md or Copilot instructions
- 100%
- of changes go through review and tests – no matter who wrote them
The problem: fast, confident and off target
The pierogi ordering platform team gets AI assistants. After a month the results are mixed. A new discounts endpoint was built in an hour – but it computed the discount on the price including delivery, although the terms say otherwise, and the tests generated alongside it checked… exactly that wrong behaviour. An agent asked to "fix a flaky test" simply added skip. Another PR brought in a dependency whose name was deceptively similar to a popular library, but which in the package registry belonged to someone else entirely. And someone pasted the .env file into the chat so the assistant could "see the configuration".
None of these problems comes from AI writing bad code. They come from the team starting to accept code it did not understand, and verifying it with tools written by the same assistant.
Three modes of work
| Mode | Examples | Best for | Risk |
|---|---|---|---|
| Editor suggestions | completions in GitHub Copilot, Cursor and other IDEs | repetitive code, boilerplate, finishing an obvious line | quietly introducing small bugs that are hard to notice |
| Chat in the IDE or browser | IDE chat, Claude, ChatGPT | explaining code, sketching a function, refactoring ideas, an error from the logs | no repository context, copying without understanding |
| An agent in the repository | Claude Code, Copilot coding agent, Codex, agent mode in IDEs | multi-file tasks: implementation with tests, migrations, analysing a bug across the codebase | large changes at once, actions with permissions (commands, network, git) |
| Suggestions | Chat | Agent | |
|---|---|---|---|
| Speed of small changes | 5 | 3 | 3 |
| Control over the code | 5 | 4 | 2 |
| Task scope | 1 | 3 | 5 |
| Repository context | 2 | 2 | 5 |
| Safety by default | 4 | 4 | 2 |
Intuition: a brilliant new colleague with no memory
Imagine a developer who knows every language and framework and writes ten times faster than you, but comes to work for the first day – every day. They do not know the team's conventions, do not know that the pierogi terms compute discounts without delivery, and do not remember what you agreed yesterday. What do you do? You give them an onboarding document, hand out tasks the size of one PR, ask for a plan before they start, and check the result with tests and a review.
That is exactly how you work with an assistant. Its "memory" is the context: the files it reads, the project instructions and what you write in the request.
Project context: CLAUDE.md, AGENTS.md and friends
Coding agents read a project instruction file at startup: Claude Code reads CLAUDE.md, many other tools use the shared AGENTS.md convention, GitHub Copilot uses .github/copilot-instructions.md. It is the cheapest investment in quality: a few dozen lines that save hours of fixes.
# Halina's Pierogi – ordering platform
## Commands
- Build and test: `dotnet test` (API), `npm test` (web). Run both before you say a task is done.
- Lint: `npm run lint` – the CI fails on warnings.
## Architecture
- api/ – ASP.NET Core, hexagonal: Domain has no references to Infrastructure.
- Prices are in grosze (int), never decimal PLN. Discounts apply to items, not to delivery.
## Rules
- New dependencies need a reason in the PR description; check the exact package name in the registry.
- Never edit migrations that are already on main – add a new one.
- Secrets live in the vault; do not read or print .env files.Good instructions are concrete (commands, paths, domain rules), short and justified. Rules that can be checked automatically – formatting, layer boundaries, forbidden imports – are better entrusted to a linter or architecture tests than to prose; the agent will run those tools anyway, and they do not forget.
The work cycle: explore, plan, implement, verify
A few practices make the biggest difference:
- Separate planning from execution. Ask for a plan and read it before a single line of code is written. Fixing a plan takes a minute; fixing an 800-line diff takes an hour.
- Tests as the judge, written or approved by a human. When the agent writes both the code and the tests, a matching bug in both is easy. Start with tests describing the rule ("discounts do not cover delivery"), and delegate the implementation afterwards.
- Small steps and frequent commits. A small diff can be reviewed with understanding; a big one invites "LGTM".
- Concrete completion criteria. "Done when
dotnet testpasses and the new endpoint has a test for an order with and without delivery" works better than "implement discounts". - A new session for a new task. A long conversation accumulates stale context; a fresh session with a good
CLAUDE.mdis often faster.
The rest of this article is for members
Create a free account or sign in to read it all. Still ahead:
- Automated review in CI
- Trust boundaries
- A short history of coding assistants
- When to delegate, and when to write it yourself
- Team checklist
- Test yourself
- What's next