Polski

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.

By · · 14 min read

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

ModeExamplesBest forRisk
Editor suggestionscompletions in GitHub Copilot, Cursor and other IDEsrepetitive code, boilerplate, finishing an obvious linequietly introducing small bugs that are hard to notice
Chat in the IDE or browserIDE chat, Claude, ChatGPTexplaining code, sketching a function, refactoring ideas, an error from the logsno repository context, copying without understanding
An agent in the repositoryClaude Code, Copilot coding agent, Codex, agent mode in IDEsmulti-file tasks: implementation with tests, migrations, analysing a bug across the codebaselarge changes at once, actions with permissions (commands, network, git)
Strengths and weaknesses of the modes of working with an assistant – An editorial assessment on a 1–5 scale (higher = better), not a measurement. Safety by default means how little harm can be done without extra safeguards.
SuggestionsChatAgent
Speed of small changes533
Control over the code542
Task scope135
Repository context225
Safety by default442

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.

CLAUDE.md
# 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

Diagram: Working with an agent: a human approves the plan and the result, tests decide correctness

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 test passes 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.md is 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

Create a free account · Sign in