Use deterministic, normalized identifiers everywhere.
Apply two rules: 1) Single source of truth: derive canonical identifiers from one stable place (e.g., directory name), and don’t trust optional/conflicting metadata fields. 2) Normalize at the boundary: normalize identifier keys (especially casing) immediately when assigning/receiving config so downstream lookups are consistent.
Example patterns:
// 1) Deterministic canonicalId from directory name only
const canonicalId = path.basename(dir); // ignore any manifest-provided canonicalId
// 2) Normalize IDE keys at assignment time
const ideKey = ide.toLowerCase();
config.ides = config.ides.map((ide) => ide.toLowerCase());
Also add guardrails:
canonicalId when the canonical value must come from the directory name).