Checklist for adding a new configuration field while preserving precedence, migration expectations, and documentation parity.
Add one field with a clear source of truth and keep config behavior explainable.
lib/config.tsdocs/configuration.mddocs/development/CONFIG_FIELDS.mddocs/development/CONFIG_FLOW.mdtest/config.test.tstest/plugin-config.test.tstest/documentation.test.ts
- Add the field in
lib/config.tswith an explicit default. - Decide whether it is:
- stable user-facing
- advanced
- internal only
- Keep precedence explicit:
- config file source
- fallback config source when applicable
- environment override layer
- Add tests for:
- default resolution
- config file resolution
- environment override behavior
- invalid value handling when relevant
- Update
docs/configuration.mdwith user-facing guidance. - Update
docs/development/CONFIG_FIELDS.mdwith field inventory details. - Update
docs/development/CONFIG_FLOW.mdwhen source selection or precedence changes. - Extend
test/documentation.test.tsif docs parity should remain locked.
npm run lint
npm run typecheck
npm test -- test/config.test.ts test/plugin-config.test.ts test/documentation.test.ts
npm run build- field has one documented default
- precedence is documented and tested
- environment variable naming is consistent
- user docs and maintainer docs agree
- no hidden migration behavior was introduced