Feature: Config Files Refactor
IMPLEMENTATION RULES: Before implementing this plan, read and follow:
- WORKFLOW.md - The implementation process
- PLANS.md - Plan structure and best practices
Status: Backlog​
Goal: Separate user/contributor local configuration from project defaults so contributors can install tools locally without accidentally committing personal config.
Last Updated: 2026-01-16
Prerequisites: None Blocks: PLAN-003 (contributors need this to install dev-imagetools locally) Priority: High
Problem​
Currently .devcontainer.extend/*.conf files are:
- Committed to git (project defaults)
- Updated when contributors install tools locally
- Risk of accidentally committing personal tool installations
Example scenario:
- Contributor installs
dev-imagetoolsto test logo processing locally tools.confis updated withdev-imagetools- Contributor commits and pushes
- Now ALL users get
dev-imagetoolsinstalled by default (unintended)
Solution​
Separate local config from project defaults:
.devcontainer.extend/
├── tools.conf.defaults # Project defaults (committed)
├── tools.conf # User's local config (gitignored)
├── ports.conf.defaults # Project defaults (committed)
├── ports.conf # User's local config (gitignored)
└── ...
Behavior:
.conf.defaultsfiles are committed (project-wide settings).conffiles are gitignored (user's local overrides)- On first run, scripts copy
.defaultsto.confif.confdoesn't exist - Scripts read from
.conf(which includes defaults + local changes)
Phase 1: Update Scripts to Support Two-Tier Config​
Tasks​
-
1.1 Identify all scripts that read/write
.conffiles:dev-setup.shinstall-*.shscripts- Any other manage scripts
-
1.2 Create helper function in library for config handling:
# Ensures .conf exists, copying from .defaults if needed
ensure_config() {
local conf_file="$1"
local defaults_file="${conf_file}.defaults"
if [ ! -f "$conf_file" ] && [ -f "$defaults_file" ]; then
cp "$defaults_file" "$conf_file"
fi
} -
1.3 Update all scripts to use the helper function before reading config
Validation​
Scripts work correctly with both new and existing setups.
Phase 2: Rename Existing Config Files​
Tasks​
-
2.1 Rename committed
.conffiles to.conf.defaults:tools.conf→tools.conf.defaultsports.conf→ports.conf.defaultssecrets.conf→secrets.conf.defaults- Any other
.conffiles
-
2.2 Add
.conffiles to.gitignore:# User's local config (not committed)
.devcontainer.extend/*.conf
!.devcontainer.extend/*.conf.defaults -
2.3 Remove
.conffiles from git tracking:git rm --cached .devcontainer.extend/*.conf
Validation​
.conf.defaultsfiles are committed.conffiles are gitignored- Existing functionality still works
Phase 3: Update Documentation​
Tasks​
-
3.1 Update contributor documentation explaining:
.conf.defaults= project defaults (commit changes here).conf= local overrides (never committed)
-
3.2 Update
CREATING-SCRIPTS.mdwith new config pattern -
3.3 Add note to README about config file structure
Validation​
Documentation is clear and complete.
Phase 4: Test and Deploy​
Tasks​
- 4.1 Test fresh clone - verify
.conffiles are created from.defaults - 4.2 Test existing setup - verify migration works smoothly
- 4.3 Test tool installation - verify
.confupdates are local only - 4.4 Commit and push
- 4.5 Verify in Chrome on deployed site
Validation​
- Fresh clones work correctly
- Existing users aren't broken
- Contributors can install tools without committing config
Acceptance Criteria​
-
.conf.defaultsfiles contain project defaults (committed) -
.conffiles are gitignored (local only) - Scripts auto-create
.conffrom.defaultson first run - Contributors can install tools locally without config pollution
- Existing users experience smooth migration
- Documentation updated
Files to Modify​
Config files:
.devcontainer.extend/*.conf→ rename to.conf.defaults
Git:
.gitignore(add.confexclusion)
Scripts:
.devcontainer/manage/dev-setup.sh.devcontainer/additions/install-*.sh(all install scripts).devcontainer/additions/lib-commonfunctions.sh(add helper)
Documentation:
website/docs/contributors/(update relevant docs)website/docs/ai-developer/CREATING-SCRIPTS.md
Migration Notes​
For existing users:
- Their current
.conffiles will be untracked aftergit pull - Files remain on disk, continue working
- No action needed from users
For new users:
- Clone repo (no
.conffiles) - Run
dev-setup→.confcreated from.defaults - Works seamlessly
For contributors:
- Install tools locally → updates
.conf(not committed) - To add project defaults → edit
.conf.defaultsand commit