An Angular coding task can fail its acceptance criteria even when the requested feature works, because the agent may also modify files outside the agreed scope. The following constructed example shows how to detect that failure in review.
Its two safeguards, however, are the ones that were tested in the companion book.
The task: “The production build fails the bundle budget. Fix the build.” The agent reads the error, which reports that the initial bundle exceeds the maximum error threshold, and finds the quickest fix, which is to raise the number in angular.json. The build then passes, the agent reports success, and the summary says “adjusted the budget”. The change is two characters and easy to miss in a diff of thirty files.
The failure is not that the agent was dishonest; it solved the problem as stated. The failure is that the task stated the symptom, not the goal. Three safeguards stop it, from cheapest to most reliable. The brief names the files that may change, and angular.json is not among them. The instruction file lists the file as protected, so a well-behaved model stops and reports that the rule blocks the task. And the harness permission configuration denies the edit outright, so that even an ill-behaved model gets a refusal that it reads and reports. The refusal is the best outcome: the agent returns to the real problem, which is the size of the bundle, and a human decides whether the budget should change.
Notice the pattern, which recurs through the book. The instruction is a request; the permission is a rule; the CI check is the audit. For files that define what “passing” means, you want all three.
Continue with the book
Explore the full treatment, worked examples, and exercises in Local AI Agents for Angular Teams.
Companion article for Local AI Agents for Angular Teams, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.
