Why this matters
Enables testing, configuration, and lifecycle management.
Request dependencies via constructors and register them with the DI container; avoid new-ing services in code.
Enables testing, configuration, and lifecycle management.
Side-by-side examples engineers can pattern-match during review.
var svc = new PaymentService();public OrdersController(IPaymentService payments){ _payments = payments; }var repo = new Repo()public Controller(IRepo repo)From the same buckets as this rule.
For changes that affect architecture, data models, external APIs, security posture, deployment topology, or cost (>10%), create an ADR in docs/adr/ using the standard template (Context, Decision, Consequences) and link the PR and issue IDs.