# Framework Leakage

> A defect in which framework or infrastructure types, annotations or lifecycles enter core domain logic, so business rules depend on technical specifics.

Record: `architecture:framework-leakage`
Kind: anti-pattern
Layer: [Enforcement Core](https://banes-lab.com/records/layer/enforcement-core.md)
Severity: discouraged
Scope: domain_boundary
Aliases: Infrastructure-Centric Design
Canonical: https://banes-lab.com/ontology#architecture-framework-leakage

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Utility Dump](https://banes-lab.com/records/architecture/utility-dump.md) and before [Vendor Lock-In Leakage](https://banes-lab.com/records/architecture/vendor-lock-in-leakage.md).

## Repair

- Refactored by: add_adapter, map_to_domain_model, introduce_port, move_framework_outward
- Detected by: request_object_in_domain, ORM_entity_as_domain, framework_annotation_in_core, container_lookup_in_business_logic
- Violated by: Let framework classes, decorators, lifecycle assumptions, request objects, ORM entities, or infrastructure annotations enter core domain logic.
- Measured by: framework imports in core modules
- Enforced by: import rules that keep framework packages out of the core

## Severity

- [discouraged](https://banes-lab.com/records/vocabulary/severity-discouraged.md)

## Category

- [Anti-patterns](https://banes-lab.com/records/architecture-category/anti-patterns.md)

## Force

- [Domain boundary](https://banes-lab.com/records/force/domain-boundary.md)

## Negated by

- [Ports and Adapters Architecture](https://banes-lab.com/records/architecture/ports-and-adapters-architecture.md)

## Linked from

- [Seven controls, seven classes](https://banes-lab.com/software-architecture/decay/seven-controls-seven-classes.md)
- [Anti-patterns](https://banes-lab.com/ontology/principles/architecture-category-anti-patterns.md)
- [Codebase / System Architecture Styles](https://banes-lab.com/ontology/principles/architecture-category-codebase-system-architecture-styles.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The forces](https://banes-lab.com/ontology/schema/the-forces.md)
