Coding agents ship the feature. They miss the policy.
We gave a coding agent 85 realistic tickets on two open-source codebases. Each change was governed by written company policy that the ticket never mentioned. Left alone, the agent almost never followed it. With AVCEL, it followed it most of the time, and for less.
What is a company policy?
A company policy is a business rule the company's software must obey. It is written by compliance, risk, operations or legal, not by engineers, and it lives in handbooks, circulars and memos, not in the code or the ticket.
Two examples from the bank in our study. Each shows the policy in the document's own words, and what it means for the code.
No user, of any role (including administrators and system or super users), may approve their own action or skip approval.
A fee or penalty waiver made under an active hardship plan needs no checker, but it must reference the plan.
Policy also changes, and documents disagree. After an amendment, the bank's no-checker limit drops from 100 to 50, and the insurer's deadline for late claims from 60 to 45 days. The old limit still governs older loans and claims, so the right answer depends on the date. A desk memo that says a team lead alone may approve short payment pauses contradicts the handbook, and the handbook wins.
The bank and insurer are fictional, and their policy was written for this study the way real policy is written. Each company has 12 documents.
The problem: policy lives outside the ticket
A ticket says what to build. It almost never says which policy applies. A developer who hasn't read the policy can write a change that works, passes review, and still breaks it. A coding agent is that developer, on every ticket.
One ticket, two runs
A real ticket from our insurance task set: "Let reviewers fix the justification of a claim line." The ticket says nothing about policy. The insurer's internal controls do:
"An override of approved quantity or price must carry a non-empty justification … This applies to every user, of any role, including administrators."Internal controls, Kestrel Mutual Health Fund (fictional insurer)
ICS-4.1ICS-4.3
Same agent (Claude Code, Sonnet 5.5), same ticket, same codebase. Tests were hidden from the agent. Both repeats of each setup ended the same way.
Both runs said "done". Only one is safe to merge, and nothing in the feature tests tells them apart.
How AVCEL works
AVCEL turns a company's policy into something a coding agent can act on, without a developer having to find it, read it or paste it in.
- Build once. AVCEL reads the company's documents and the codebase and builds a Blueprint: every policy, linked to the code it governs. Policy owners review and approve it, so the agent works from what the company signed off, not from a guess.
- Deliver per change. When a developer gives a coding agent a task, AVCEL hands the agent only the policies that apply to that change, including the exceptions, the old version that still governs older records, and which document wins when two disagree.
- Check before saving. Where a policy can be checked in code, AVCEL also checks each edit before it is written and tells the agent what to fix.
The Blueprint is built once per codebase and used on the developer's machine. AVCEL's server does not need to receive the developer's task, conversation or code. It works with the coding agent the team already uses. The results below measure the delivery step alone.
How we tested
- Two real codebases. Apache Fineract, an open-source core-banking system (848,000 lines of Java), and openIMIS, an open-source health-insurance system (Python, Django).
- A full policy library for each. Twelve documents per company, written the way real ones are: the current handbook, the old version that still governs older loans and claims, an amendment that tightens limits, a desk memo that contradicts the handbook and must lose, and eight other company policies.
- 85 tickets that never mention the policy. Each is a realistic request from someone in the business. Most put a policy at stake; some test an exception that must still be allowed; some have no policy at stake at all.
- Hidden tests. Every ticket has feature tests and policy tests the agent never sees. A change counts as compliant only if it passes every one of both.
We compared three setups, all with Claude Code on Sonnet 5.5 in a fresh, offline sandbox:
| Setup | What the agent gets |
|---|---|
| No help | The policy documents are available, but nobody points the agent to them. |
| Instruction file | What a careful team does today: the repository's CLAUDE.md and AGENTS.md tell the agent where the policy is and to follow it. |
| AVCEL | The policies that apply to this change, from the AVCEL Blueprint, in the agent's first message. |
In total: 85 tasks, sealed by hash after an independent review, and more than 3,800 agent runs. 49 of the tasks were built after AVCEL was frozen and never used to shape it.
Results
The policy sat one folder away from the code. With no pointer, the agent opened it in 3 of 225 runs.
Agents do what the ticket asks. If the policy isn't in front of them, it doesn't exist. Supplying it moves compliance from 13% to 72%.
+12 points overall (95% CI +4 to +20). Features still worked in 97% of AVCEL runs and 93% of instruction-file runs. Every exception and no-policy task stayed correct with AVCEL.
This is the comparison that matters. "No help" is a low bar; a team that has written an instruction file is not. On tasks it had never seen, AVCEL still produced more compliant changes than the best manual setup, in both banking and insurance.
The reason is what each one gives the agent. An instruction file points to the whole policy folder, the same way for every change, and leaves the agent to work out which parts apply. AVCEL gives it only the policies that govern this change, with their exceptions and the version in force.
Model cost at list price. AVCEL was never more expensive per compliant change than any other setup.
A cheap run that breaks policy is wasted spend. An agent that gets the right policy up front also skips searching through the whole policy folder: 9.2 turns per run with AVCEL against 12.1 with the instruction file on the banking codebase.
Enforcing too much is its own failure. The bank's handbook says: "A fee or penalty waiver made under an active hardship plan needs no checker, but it must reference the plan." Told to follow the whole handbook, the agent sent those waivers to a checker anyway in 7 of 12 runs. AVCEL delivers each policy with its exceptions, so the agent blocked allowed work only once.
Limits and what's next
- Scope. Two codebases, one coding agent and fictional policy libraries written for this study. We plan to repeat it on more codebases and agents, with policy reviewed by domain experts.
- Where the file still wins. On our original insurance tasks, which we used while building AVCEL, the instruction file scored higher (78% vs 53%). On new insurance tasks built afterwards, AVCEL led (77% vs 65%). We are working on delivering the definitions and related policies a policy depends on, which is where those misses came from.
- The goal. Every change a coding agent makes follows company policy the first time, at a lower cost than any manual setup.
Method details
| Task set | Tasks | Policy at stake | Exception | No policy |
|---|---|---|---|---|
| Banking, original | 18 | 13 | 1 | 4 |
| Insurance, original | 18 | 12 | 2 | 4 |
| Banking, new | 21 | 12 | 3 | 6 |
| Insurance, new | 28 | 16 | 4 | 8 |
| Total | 85 | 53 | 10 | 22 |
- Agent: Claude Code, headless, Sonnet 5.5. Fresh container per run, no internet except the model API. Limit of 100 turns and 60 minutes per run.
- Scoring: a run is compliant only if it passes every hidden feature test and every hidden policy test. Crashes and time-outs count as failures.
- Tasks: each ships with a reference patch that passes everything and a violating patch, the change a careful developer would write without the handbook, which passes every feature test and fails at least one policy test. Every task was checked by an independent reviewer and sealed by hash.
- Intervals: 95% confidence intervals are bootstrapped over tasks.
- Codebases: Apache Fineract 1.15.0 (Java 21) and openIMIS v1.11.0 claims module (Python 3.11, Django 4.2), at pinned versions.