Superseded by 0146:
package configuration is TypeScript, with layered overrides and secret references.
Context
Packages need defaults that a product can see, copy and override without forking. 0025 already says a package’sconfig/ directory sits outside src and is exported as ./config, but not what a config file
contains or how an app or service overrides it.
Decision
- A package’s defaults live in
packages/<category>/<pkg>/config/<pkg>.config.ts, outsidesrc/, exporting a typed default object, and are published via the./configexport of 0025. - An app or service overrides by publishing:
stackracopies the file to the member’s own config folder (path: TODO); the member’s copy wins. Unpublished packages run on their defaults. - Overrides are merged over defaults (TODO: merge depth), and the result is validated against the package’s schema at start-up.
- Config holds names and settings, never secret values; secrets are read by name from the secret store (0009).
- Config is delivered through the container (0042) as a token the package exports.
- A package with nothing configurable has no
config/directory.
Consequences
- Defaults are readable and diffable in one place per package.
- A publish command and a loader are new work (TODO: owning package).
- Upgrades must tell products when a default they copied has changed.
Enforcement
Planned — avalidate-repository.mjs check that config/<pkg>.config.ts exists whenever ./config is exported; start-up schema validation in the loader.
Supersedes and sources
Supersedes: none. Builds on 0025 (./config export). Sources: owner decision in chat, 2026-10-19.