# Layer

A layer is a bounded responsibility with a contract. Layers compose a system without entangling it.

## Definition

A layer owns one responsibility and exposes it through a declared contract. Its internals are replaceable; its contract is not.

## Purpose

- Contain complexity behind clear boundaries.
- Let each layer change without breaking the others.
- Make dependencies explicit and directional.

## Principles

- `single-responsibility` — one job per layer: ui, business, data, platform.
- `contract-bound` — layers communicate through declared interfaces.
- `directional` — depend on abstractions, not concretions.
- `isolated` — a change stays inside its layer.

## Anti-patterns

- Cross-layer calls that skip the contract.
- Shared mutable state across boundaries.
- Cyclic dependencies between layers.
- A layer that owns more than one responsibility.

## Output Standard

Each layer declares its responsibility, contract, and dependencies — replaceable without touching its neighbors.

## Related

Built on [entry](/entry) access, ranked by [value](/value), governed by [std](/std).

## Contact

For architecture review or partnership, write to [hi@layer.md](mailto:hi@layer.md).