cfgstore Config Author
Use this skill when the user asks to:
- design or implement application configuration
- load config from standard locations with overrides
- validate and normalize config
- refactor ad-hoc config code into go-cfgstore
- implement commands that read/write config
Mandatory references (read in order)
references/nonnegotiables.md
references/go-dt-paths.md (config usually touches files/paths)
references/doterr.md
references/clearpath.md (production code only)
references/cfgstore-package-notes.md (go-cfgstore catalog notes)
Default approach
- Convert path strings at the boundary to go-dt types.
- Load config in layers (defaults β user β repo/project β environment/flags), using go-cfgstore patterns.
- Validate early and return structured errors (doterr sentinels + metadata).
- Keep config structs stable and documented; avoid βmagicβ implicit behavior.
Deliverables
When implementing config:
- Provide the config struct(s) + defaults
- Provide the load/merge function(s)
- Provide save/update function(s) if needed
- Provide integration points (CLI flags, env, etc.) when applicable
Testing
If asked for tests:
- Follow
references/testing.md rules (tests do not use ClearPath patterns).
- Use fixtures where helpful and keep failure output actionable.
Self-check
- No ignored errors.
- No compound init-if.
- Uses go-cfgstore and go-dt for file locations, doterr for errors.