Breach Encapsulation Naming

•
79
•

Enforces a strict naming convention for getters to discourage encapsulation breakage and uphold the 'Tell Don't Ask' principle.

This skill implements a specialized naming convention for domain models where required getters are prefixed with 'breachEncapsulationOf'. By explicitly labeling these methods, it signals to developers that encapsulation is being bypassed—typically for persistence, serialization, or testing—thereby preventing the accidental leak of business logic into external layers and encouraging robust object-oriented design patterns across multiple programming languages.

Key Features

01Detects anti-patterns like logic leaks and Law of Demeter violations
0279 GitHub stars
03Supports Java, Kotlin, Scala, TypeScript, Python, Go, and Rust
04Provides clear implementation patterns for infrastructure and persistence layers
05Standardizes getter naming with the 'breachEncapsulationOf' prefix
06Distinguishes between Value Objects and Entities for appropriate accessor use

Use Cases

01Establishing team-wide coding standards for Domain-Driven Design (DDD) projects
02Designing clean persistence layers (ORMs) while maintaining domain purity
03Refactoring legacy codebases to improve domain model encapsulation