AI Setup: Teaching Your Assistant Angular 22 In short: Your assistant learned Angular from years of blog posts, and most of them are wrong now. Three pieces of setup — a rules file, the Angular MCP server, and two lint rules — fix the majority of it before you write a line of code. Ask any coding assistant for an Angular component today and you will very likely get this: Every line of that was correct advice at some point between 2018 and 2024. None of it is correct in Angular 22. The model is not broken — it is averaging over a decade of training data in which the old way vastly outnumbers the new way. This lesson is about making the current way win. Why this matters more for a component platform In an application, bad AI output costs you a review comment. In a shared library , it costs you a public API you have to support for years. If an agent adds a fifteenth to your card component because a prompt asked for "a variant with an icon", that input ships, twenty consumer apps bind to it, and removing it is now a major version bump. The cost of a hallucination scales with how many teams depend on the file it landed in. So the guardrails go in before the productivity does. Step 1: The rules file Every assistant reads a project instructions file. The file name differs by tool, the content does not: Tool File --- --- Claude Code, JetBrains, most agents GitHub Copilot Antigravity / Gemini Cursor Cursor rules file VS Code Copilot Angular publishes an official one you should start from, at . Download it rather than paraphrasing it — it is maintained alongside the framework: That file already says the important things: never write , never set explicitly, use and , use the object instead of , use bindings instead of , prefer Signal Forms, use . Then append the rules that are specific to your platform. This is the part nobody can write for you: Notice the shape of these. They are not "write good code". They are specific, checkable, and mostly negative — the things a model would otherwise do by default. Step 2: The Angular MCP server A rules file tells the model what to do. The Angular CLI MCP server lets it look things up and run things instead of guessing. Start it: And register it with your editor. The config is the same shape everywhere; only the path changes — , , or : What you get: Tool What it is for --- --- Searches angular.dev. This is the one that stops version drift. Pulls the official best-practices guide into context. Lists apps and libraries in the workspace. Runs a configured target — build, test, lint, e2e. / Starts and stops in the background. Returns the latest build log — the agent can read its own errors. Analyses code and plans an OnPush / zoneless migration. An interactive Angular tutor. The two that change day-to-day behaviour most are and . matters because the failure mode is confident staleness. A model does not know it is out of date; it has no signal telling it that stopped being the recommended path. Giving it a way to check the current docs turns a guess into a lookup. matters because it closes the loop. Without it, an agent writes code, tells you it is done, and you find out it does not compile. With it, the agent reads the compiler error and fixes it before handing anything over. Two flags worth knowing Use when you want an assistant that can explain and search your workspace but not act on it — code review, onboarding, exploring an unfamiliar library. Use on an air-gapped or restricted network. Step 3: Guardrails that fail the build A rules file is a request. A lint rule is a fact. For anything that genuinely must not happen, write the check. Two rules catch most Angular 22 drift: Then check your . Angular 22 already defaults and to — the job here is making sure nobody turned them off to get an old build green, and adding the TypeScript flags that are not on by default: is the single highest-value setting on this page for AI-assisted work. A model that invents an input name, passes a where a union was expected, or binds to a property that does not exist gets a compile error rather than a runtime surprise. It turns the type system into the reviewer. extends that to the object — which matters because that is exactly where we told the model to put host bindings in the previous lesson. Without it, a typo in fails silently at runtime. One template rule is worth adding specifically for AI-generated code: Models love putting method calls in templates. This rule flags them, which is the automated version of the argument from the templates lesson. Step 4: The CI check Everything above runs on the developer's machine, which means it runs when the developer remembers. One job makes it non-negotiable: This is deliberately boring. The point is not the pipeline — it is that the rules file, the lint config, and the compiler all agree, and one of them runs on every pull request whether a human or an agent opened it. "But I thought a better prompt would fix this" Prompt quality genuinely matters, and it…