···8899## 1) Goal
10101111-This note explains where configuration defaults come from today, why there are two defaulting entrypoints, and where each one is used.
1111+This note explains where configuration defaults come from today, why there are two defaulting entrypoints, where each one is used, and which one should become the shared authority.
12121313This is intentionally documented outside the current PowerShell PR scope.
1414···3636## 3) `internal/configdefaults.Apply`
37373838This is the main program default source for the global CLI/runtime `viper`.
3939+4040+It should be treated as the repo-wide authority for shared defaults.
39414042Primary uses:
4143···63656466This is used when code creates a fresh temporary `viper` instance and wants a self-contained config reader.
65676868+It is better understood as a construction helper for isolated readers, not as an independent authority.
6969+6670Primary uses:
67716872- `integration` runtime snapshot loading
···100104The current issue is not that there are two call paths.
101105The current issue is that both paths each define defaults directly.
102106107107+This is already causing real drift, not just theoretical duplication.
108108+109109+Examples:
110110+111111+- `internal/configdefaults.Apply` contains keys that are absent from `integration.ApplyViperDefaults`, such as:
112112+ - `tasks.*`
113113+ - `multimodal.image.sources`
114114+ - `console.*`
115115+ - `line.*`
116116+ - `lark.*`
117117+ - `telegram.serve_listen`
118118+ - `slack.serve_listen`
119119+- `integration.ApplyViperDefaults` contains `logging.*`, while `internal/configdefaults.Apply` does not
120120+- at least one shared key already disagrees:
121121+ - `telegram.addressing_interject_threshold`
122122+ - `internal/configdefaults.Apply` sets `0.6`
123123+ - `integration.ApplyViperDefaults` sets `0.3`
124124+103125That means whenever a new config key is added, especially under `tools.*`, there is a risk of:
104126105127- updating one defaults function but not the other
···120142- `internal/configdefaults.Apply` remains the shared source of truth
121143- `integration.ApplyViperDefaults` calls into it first
122144- `integration.ApplyViperDefaults` only adds integration-specific defaults if it truly owns any
145145+- shared `logging.*` defaults should also be moved under the same authority instead of living only in the isolated-reader path
123146124147This keeps the useful construction split without duplicating the actual default values.
125148