configuration-single-source-of-truthlisted
Install: claude install-skill pedro-angel/agent-methodology
# One Canonical Config Source, Everything Derives
Every fact lives in exactly one place; everyone else reads or derives it. A value that appears in two files is a future bug — the two copies will drift, and the drift will be silent.
## When to use
Reach for this the moment a single value needs to be known by more than one consumer — build scripts, runtime code, docs, CI, and humans.
Red-flag thoughts that mean STOP and apply this skill:
- "I'll just paste the project id / model name into the README example too."
- "I'll hardcode the threshold here for now and remember to change both."
- "The docs table is a bit stale but close enough."
- "These two enums happen to match, so it's fine."
- "I'll pass `PROJECT=<id>` on the command line every time."
- "It's only tuning — I'll bury it in the code as a constant."
- "I'll re-list those dependencies in this extra / that requirements file — same versions anyway."
## The rule
1. **Name one canonical location per fact.** Decide where the truth lives — an env var, a single YAML key, one constant module. Write it down. Everything else points at it.
2. **Make consumers derive, never re-declare.** Build scripts, code, and CI read the canonical value (parse the file, import the constant, read the env var). No second hand-typed copy anywhere.
3. **Guard with fail-fast.** When the canonical value is unset or still a placeholder, exit non-zero with an actionable message ("CLOUD_PROJECT is unset; set it in .env"). A missing value should s