Use when a task that changed backend code is finishing, before reporting it done. Symptoms — a migration was added, a request or response shape changed, a new route exists, a cache key was added, something could not be verified, a problem was found and…
Use when adding or changing a protected route, a guard, a role check, or any query that reads or writes records belonging to a user or tenant. Symptoms — a findById that takes only an id, a route with no guard, a role checked in the controller but not the…
Use when choosing which exception to throw, shaping an error response, or deciding what to log. Symptoms — a caught error that returns 200, a try/catch that swallows the cause, a 500 where the client should see 400, an error message exposing a stack trace or…
Use when a list endpoint, heavy read, or cache is added, or when something is reported slow. Symptoms — a query inside a loop, a list without pagination, filtering or sorting on an unindexed column, request timeout, an external call per row, a response…
Use when writing or reviewing an endpoint that touches protected data, accepts external input, or writes to the database. Symptoms — a new route, a changed guard, an entity returned from a controller, an ID taken from the request, dynamic orderBy, a file…
Use when writing or reviewing a NestJS controller, service, module, or DTO. Symptoms — business logic creeping into a controller, a service touching multiple tables, an endpoint returning an entity, a new provider, circular module imports, unvalidated query…
Use before writing implementation code for any feature or bug fix. Symptoms — a plan to add tests after the code, a bug fix with no failing test, a test that only asserts a mock was called, an endpoint with no validation or authorization test, acceptance…
Use when creating or changing an entity, writing a migration, or building a QueryBuilder query. Symptoms — a new table or column, a migration with no down step, dynamic orderBy, a list query without skip and take, a loop that queries per row, a write touching…