A library’s public entry point is a contract with future readers, and the agent is the most frequent future reader.
Keep it small and deliberate. Export the components, types, and functions that are meant to be used, with names that explain themselves, and nothing else. When the agent adds something to a library, the review question is whether it belongs in the entry point. Usually the answer is no, and the lint rule makes that the default.
File size matters for the same reason. Models read whole files into the window. A file of two hundred lines is read in full and understood; a file of two thousand lines is read in part and misunderstood in the parts it skipped. Prefer one concept per file, named for the concept, and the Angular convention of a component with its template, styles, and test side by side. When a file grows past what you could review in a single sitting, split it, and split it before asking an agent to extend it. An agent asked to add a feature to an oversized file will add to the end of it.
Names carry information the agent uses for retrieval. It will search the repository with ordinary tools: it lists directories, searches for strings, and opens files whose names look relevant. A file called utils.ts is never the right result of a search for anything. A file called price-format.ts is. Descriptive names are a retrieval index you maintain for free.
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.
