Perspective · Software engineering

Teaching agents an existing application

An agent new to a large, long-lived codebase makes the same mistakes as a new starter, only faster. What it needs to know before it changes anything.

Syntegra · 25 September 2026

Evidence as of 2026-09-24

On this page
  1. Existing applications
  2. Repeated mistakes
  3. Context for agents
  4. Safeguards in use
  5. Context upkeep
  6. Your first step

Existing applications

Most demonstrations of AI coding begin with an empty project, while your organisation begins with an application built on years of decisions. It contains generated files that must never be edited by hand, business rules that exist only in how the system behaves, and customer installations that each differ slightly. An agent that knows none of this makes changes that look right, and things break.

Repeated mistakes

The mistakes are small, and they repeat at the speed of an agent. A generated file is edited by hand, and the change silently disappears the next time the file is generated. A calculation is fixed in one module and left wrong in its copy in another. An agent tidying up deletes records that a customer relies on. An experienced engineer would avoid all three.

Context for agents

We give our agents the same context an experienced engineer has, in a form the agent can read, and we enforce the few rules that must never be broken.

  • Written knowledge the agent reads first. Catalogues of the data model, business rules, code and services are kept up to date automatically. Past decisions and lessons are recorded in a shared memory. In its guidance on Claude Code, Anthropic recommends giving the agent this kind of project context.
  • A clear source of truth. The application configuration is generated from specifications, and the source of each generated file is recorded in it. When something is wrong, the fix is made in the generator.
  • Safeguards where the agent acts. Direct database changes, hand edits to generated files and unapproved deletions are all blocked, and the agent is told which tool to use instead.
  • Existing code brought under the same rules. Established modules were taken on with their specifications and tests and kept as they were, so the harness protects them with the same checks as new work.

Safeguards in use

The harness has recorded more than 30,000 refused agent actions on a single workstation, most of them attempts to change the database directly or to edit generated files by hand.

Context upkeep

Context has to be kept current, because written knowledge goes out of date. On one occasion a catalogue rebuilt from an incomplete copy of the system held only about half the tables it should have, and someone caught it only by comparing the counts. Context is useful only for as long as it is kept current and checked.

Your first step

Before you let an agent change an existing application, list what a new engineer would need to be told in their first month. Write the answers down where the agent will read them, then turn the two or three rules that must never be broken into checks, so that the harness blocks the action. See our architecture handbook for how we organise that knowledge.

Getting started

Start with one process that matters to your business. Engagements are contracted through Syntegra Solutions.

Discuss an engagement Email craig@predictiv.dev