In src/storage/config.ts, the parseConfig function contains a hardcoded array of known preset IDs used for validation warnings: ["essential-safety", "ai-agent-guardrails", "production-ready", "team-collaboration"]. This duplicates the preset IDs already defined in src/presets.ts via the PRESET_BUNDLES array. If a new preset is added to presets.ts, the config warning list will silently become stale. Extract the known preset IDs from PRESET_BUNDLES and use that as the single source of truth in both places.
Relevant files:
src/storage/config.ts — replace the hardcoded known array (line ~66) with a reference to the shared constant
src/presets.ts — export a PRESET_IDS constant (e.g., PRESET_BUNDLES.map(b => b.id)) or export PRESET_BUNDLES (already exported) and derive IDs in config.ts
Acceptance criteria:
- The hardcoded preset ID list in
config.ts is replaced with a derived list from presets.ts
npm run lint and npm test pass
- No change in runtime behavior (same warning message for unknown presets)
In
src/storage/config.ts, theparseConfigfunction contains a hardcoded array of known preset IDs used for validation warnings:["essential-safety", "ai-agent-guardrails", "production-ready", "team-collaboration"]. This duplicates the preset IDs already defined insrc/presets.tsvia thePRESET_BUNDLESarray. If a new preset is added topresets.ts, the config warning list will silently become stale. Extract the known preset IDs fromPRESET_BUNDLESand use that as the single source of truth in both places.Relevant files:
src/storage/config.ts— replace the hardcodedknownarray (line ~66) with a reference to the shared constantsrc/presets.ts— export aPRESET_IDSconstant (e.g.,PRESET_BUNDLES.map(b => b.id)) or exportPRESET_BUNDLES(already exported) and derive IDs in config.tsAcceptance criteria:
config.tsis replaced with a derived list frompresets.tsnpm run lintandnpm testpass