# Configuration and Environment Variable Discovery Status: public Confidence: medium (0.725) (verified) Last verified: 2026-06-02 Generation: ai_structured ## TL;DR Configuration and environment variable discovery lets agents understand runtime behavior that is not visible from source code alone. ## Core Explanation Many application decisions are controlled outside the repository: environment variables, ConfigMaps, Compose files, deployment settings, feature flags, and secrets managers. An agent that edits code without checking configuration can misdiagnose errors or ship a change that works only in one environment. The practical rule is to separate configuration keys from secret values. Agents should locate key names, defaults, and injection points, but avoid copying sensitive values into prompts, logs, or generated reports. ## Source-Mapped Facts - Kubernetes documentation says a ConfigMap is an API object used to store non-confidential data in key-value pairs. ([source](https://kubernetes.io/docs/concepts/configuration/configmap/)) - Docker Compose documentation describes environment variables as configurable values that can adjust Compose behavior and containerized services. ([source](https://docs.docker.com/compose/how-tos/environment-variables/)) - Node.js documentation describes process.env as an object containing the user environment. ([source](https://nodejs.org/api/environment_variables.html)) ## Further Reading - [Kubernetes ConfigMaps](https://kubernetes.io/docs/concepts/configuration/configmap/) - [Docker Compose Environment Variables](https://docs.docker.com/compose/how-tos/environment-variables/) - [Node.js Environment Variables](https://nodejs.org/api/environment_variables.html)