# Implicit Contract

> A defect in which a boundary's assumptions, including the shape and meaning of the data it passes, live in behavior, naming or ordering rather than in a declared contract.

Record: `architecture:implicit-contract`
Kind: anti-pattern
Layer: [Enforcement Core](https://banes-lab.com/records/layer/enforcement-core.md)
Severity: discouraged
Scope: contract_compatibility, causality_ordering
Aliases: Implicit Payloads
Canonical: https://banes-lab.com/ontology#architecture-implicit-contract

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Schema Drift](https://banes-lab.com/records/architecture/schema-drift.md) and before [Hardcoded Configuration](https://banes-lab.com/records/architecture/hardcoded-configuration.md).

## Repair

- Refactored by: add_explicit_contract, define_preconditions, define_postconditions, add_schema, add_contract_tests
- Detected by: public_API_without_schema, undocumented_side_effect, dynamic_map_boundary, tests_depend_on_internal_behavior, tribal_knowledge_required
- Violated by: Encode assumptions in code behavior, naming, ordering, timing, side effects, or undocumented payload shapes instead of declaring them as explicit contracts.
- Measured by: public operations without a declared schema
- Enforced by: contract tests, schema validation at public boundaries

## 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

- [Causality ordering](https://banes-lab.com/records/force/causality-ordering.md)
- [Contract compatibility](https://banes-lab.com/records/force/contract-compatibility.md)

## Negated by

- [Explicit Contracts](https://banes-lab.com/records/architecture/explicit-contracts.md)

## Linked from

- [What PAG is](https://banes-lab.com/pag/introduction/what-is-pag.md)
- [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)
- [Contracts / Interfaces / Compatibility](https://banes-lab.com/ontology/principles/architecture-category-contracts-interfaces-compatibility.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The forces](https://banes-lab.com/ontology/schema/the-forces.md)
