# Configuration Externalization

> A design rule that environment-specific values are read from validated external configuration at startup.

Record: `architecture:configuration-externalization`
Kind: principle
Layer: [Resource Core](https://banes-lab.com/records/layer/resource-core.md)
Severity: mandatory
Scope: application, deployment, runtime
Canonical: https://banes-lab.com/ontology#architecture-configuration-externalization

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Protocol Independence](https://banes-lab.com/records/architecture/protocol-independence.md) and before [Immutable Infrastructure](https://banes-lab.com/records/architecture/immutable-infrastructure.md).

## Repair

- Refactored by: Move to Config, Add Validation
- Detected by: hardcoded URLs/secrets/paths
- Violated by: environment values hardcoded in code
- Measured by: externalized config coverage
- Enforced by: secret/config scans

## Requires

- [Config Schema](https://banes-lab.com/records/lexicon/config-schema.md)
- [Secure Config Handling](https://banes-lab.com/records/lexicon/secure-config-handling.md)

## Reinforces

- [Portability](https://banes-lab.com/records/architecture/portability.md)
- [Environment Parity](https://banes-lab.com/records/architecture/environment-parity.md)

## Enables

- [Environment-Specific Deployment](https://banes-lab.com/records/lexicon/environment-specific-deployment.md)

## Conflicts with

- [Hardcoded Configuration](https://banes-lab.com/records/architecture/hardcoded-configuration.md)

## In tension with

- [Config Sprawl](https://banes-lab.com/records/lexicon/config-sprawl.md)

## Tensions

- [Configuration Externalization / Config Sprawl](https://banes-lab.com/records/tension/config-sprawl-configuration-externalization.md)

## Severity

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

## Category

- [Portability / Infrastructure / Deployment](https://banes-lab.com/records/architecture-category/portability-infrastructure-deployment.md)

## Enforced by

- [rules/eslint/no-port-literal.eslint.rule.ts](https://banes-lab.com/source/governance/rules/eslint/no-port-literal.eslint.rule.ts.md)

## Linked from

- [Semantic operations](https://banes-lab.com/pag/guide/tool-invocation.md)
- [The behavior document](https://banes-lab.com/disciplined-methodology/start/the-behavior-document.md)
- [The drop-in](https://banes-lab.com/disciplined-methodology/start/onboarding.md)
- [One home](https://banes-lab.com/disciplined-methodology/build/one-home.md)
- [Computation and resource](https://banes-lab.com/software-architecture/principles/computation-and-resource.md)
- [Anti-patterns](https://banes-lab.com/ontology/principles/architecture-category-anti-patterns.md)
- [Portability / Infrastructure / Deployment](https://banes-lab.com/ontology/principles/architecture-category-portability-infrastructure-deployment.md)
- [Portability / Infrastructure / Deployment](https://banes-lab.com/ontology/lexicon/lexicon-category-portability-infrastructure-deployment.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The resolutions](https://banes-lab.com/ontology/schema/the-resolutions.md)

## Evidence in the code

- [rules/eslint/no-port-literal.eslint.rule.ts](https://banes-lab.com/source/governance/rules/eslint/no-port-literal.eslint.rule.ts.md)
