Three user-centered measures define the performance of a page.
Largest Contentful Paint is how long the biggest visible element takes to appear. Interaction to Next Paint is how quickly the page responds to input. Cumulative Layout Shift is how much the page jumps around as it loads. The first is influenced by rendering mode, image handling, and the size of the initial bundle; the second by how much JavaScript runs on interaction; the third by whether content has reserved space. That is why the deferred block in the companion book has a placeholder of fixed height.
Turn the budget into automation in layers. The build already enforces bundle size, with a warning at 500 kilobytes and an error at 1 megabyte of initial JavaScript, and a style budget per component. Add a lab measurement with a tool such as Lighthouse in the pipeline, with thresholds the page must meet, and keep the thresholds in a file the agent cannot edit. This book did not run a Lighthouse audit on Harbor, and prints no scores; the page is a few kilobytes of markup, and a number for it would say little. Run the measurement on your own pages, record it in the version register, and compare before and after each agent task. A task that makes the score drop is a task whose diff you read twice.
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.
