Code review ·
Every layer should earn its file
A layer stays only with a second caller or a likely change. Angular's style guide on features over types, applied to agent-written code.
Ask an agent for a "clean architecture" CRUD screen and you can get a facade, a repository, a mapper and an interface with one implementation, all to save one form.
What the style guide says
Angular's style guide leans the other way. It says to organize your project into subdirectories based on the features of your application, to avoid subdirectories based on the type of code in them, and to avoid overly generic file names like helpers.ts, utils.ts or common.ts.
The rule I use in review
A layer stays when it has a second caller or hides something likely to change. Otherwise it goes, whoever wrote it. That rule is my own opinion, not part of the style guide.
Sources
I post short notes like this on LinkedIn.
