breach-encapsulation-naming

Installation
SKILL.md

Breach Encapsulation Naming

Make unavoidable state exposure loud. Domain objects should express behavior first; when an accessor is required for persistence, serialization, debugging, or tests, name it as an explicit encapsulation breach.

Workflow

  1. Classify every requested accessor by consumer: domain behavior, persistence, serialization, tests, framework glue, or presentation.

  2. Replace domain-behavior access with Tell Don't Ask methods on the object that owns the data.

  3. For unavoidable exposure, use breachEncapsulationOfX() or the idiomatic local equivalent such as breach_encapsulation_of_x.

  4. Keep exposed values immutable or defensively copied.

  5. Add a review note explaining why the breach is tolerated and which callers may use it.

Review Checks

  • Ordinary getters on entities and aggregates need justification.
Installs
14
Repository
j5ik2o/ai-tools
GitHub Stars
27
First Seen
May 3, 2026
breach-encapsulation-naming — j5ik2o/ai-tools