Why this matters
Improves testability and reuse; controllers become thin.
Move domain-specific processing (validation, normalization, mapping) into cohesive services instead of scattering it across controllers/handlers.
Improves testability and reuse; controllers become thin.
Side-by-side examples engineers can pattern-match during review.
controller.save() { validate(); map(); calculate(); repo.insert() }service.processAndSave(contract)
// service encapsulates validate/map/calccontroller does all business logicservice layer encapsulates rulesFrom 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.