Keep Backend Adapters At Edge
BOUNDARY-KEEP-BACKEND-ADAPTERS-AT-EDGE
Summary
Keep provider-specific terminal, storage, network, and runtime APIs in adapter layers at the boundary. Core logic stays stable and testable while real backend differences remain modeled instead of hidden behind a false common API.
Rule
Keep backend adapters at the edge.
Why
Backend-specific APIs for terminals, storage, network providers, or runtimes spread quickly if they enter core logic. Keeping adapters at the edge lets the core model stay stable while each backend handles its own translation and limits.
Helps
- Reduces coupling to specific providers and makes alternate backends easier to test or add.
Limits
Do not hide meaningful backend differences behind a fake common API. Model shared core behavior separately from backend-specific capabilities.
Agent Instruction
Keep backend adapters at the edge because backend-specific APIs for terminals, storage, network
providers, or runtimes spread quickly if they enter core logic.Mechanisms
Supported by adapter modules, feature-gated integrations, core domain types, backend fixtures, and tests that exercise translation at the edge.