Why this matters
Reduces coupling and prevents accidental misuse.
Default to private visibility; expose the minimal surface and prefer val with private set when mutation is needed.
Reduces coupling and prevents accidental misuse.
Side-by-side examples engineers can pattern-match during review.
class Svc { var client: Client? = null }class Svc(private val client: Client) { val state: State get() = _state }var items = mutableListOf<Int>() // publicprivate val items = mutableListOf<Int>()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.