anti-corruption
Installation
SKILL.md
Integration and Anti-Corruption Patterns
Sources: Eric Evans — Domain-Driven Design (2003); Martin Fowler — PoEAA (2002), Refactoring (1999)
Pain Signals — You Are in This Branch When:
- External API types, field names, or error codes appear directly in domain or service code
- Changing from one third-party provider to another requires touching many internal files
- Domain vocabulary conflicts with an external system's vocabulary for the same concept
- A legacy system must keep running while a replacement is built
- Translation logic (converting external formats to internal ones) is scattered across the codebase
- Tests that cover business logic break when an external API changes its response shape
Core Principle
External systems have their own models, terminology, and constraints. Without an explicit translation layer, external concepts leak into your domain — corrupting it with foreign vocabulary, shapes, and assumptions. These patterns prevent that leakage.