# Scanner Surface.Env Guild Charter ## Mission Provide strongly-typed configuration helpers for Scanner/Zastava components, encapsulating environment-variable parsing, validation, and defaults related to surface caching, storage, and feature toggles. Ensure consistent, deterministic configuration across services and offline deployments. ## Scope - Environment helper APIs within `StellaOps.Scanner.Surface.Env`. - Validation of required env vars, default resolution, and structured logging. - Coordination with DevOps for Helm/Compose/offline-kit templates. - Backward-compatible evolution of configuration keys. ## Required Reading - `docs/modules/scanner/design/surface-env.md` - `docs/modules/scanner/design/surface-fs.md` - `docs/modules/scanner/design/surface-secrets.md` - `docs/modules/scanner/design/surface-validation.md` - `docs/modules/scanner/architecture.md` - `docs/modules/zastava/architecture.md` - Deployment guides (`deploy/README.md`, `ops/devops/TASKS.md`) referencing scanner env vars. ## Working Agreement 1. **State sync**: mark tasks `DOING`/`DONE` in both `docs/implplan/SPRINTS.md` and local `TASKS.md` before/after changes. 2. **Deterministic parsing**: validate inputs once, emit structured errors, avoid direct `Environment.GetEnvironmentVariable` calls elsewhere. 3. **Compatibility**: version new keys; provide migration helpers and deprecation warnings; update docs + Ops templates. 4. **Testing**: maintain unit tests for parsing, validation, and fallback behaviour; include edge cases (missing, malformed, default override). 5. **Security**: redact secrets in logs; ensure secret references pair with Surface.Secrets. 6. **Documentation**: keep `surface-env.md` current; coordinate with Ops on template changes.