singularity-forge/src/resources/extensions
Mikael Hugo 3b6cbcd79f feat(prefs): schema versioning with forward-migration registry
Adds the framework for evolving the prefs schema without silently breaking
projects pinned to older versions. Each PREFERENCES.md declares `version: N`;
sf declares CURRENT_PREFERENCES_SCHEMA_VERSION in code. On load:

- prefs.version === current → no-op
- prefs.version < current → run registered migrations in chain (forward only,
  pure functions). Missing migration in the chain throws — bumping the
  schema version requires a matching Migration entry, by construction.
- prefs.version > current → warn "prefs from a newer sf, fields may be
  ignored", preserve the value so a later upgrade reads correctly.
- prefs.version undefined → assume v1 (legacy file pre-versioning) and
  warn so the user adds an explicit pin.

Migration registry is empty for now (current schema version stays at 1) —
the framework is in place so the first real schema bump is a one-line
addition, not a refactor. Drift detection (`checkPreferencesDrift`) is also
the natural surface for future deprecated-key / missing-required-field
checks when CLAUDE.md / template comparisons are added.

Wired into validatePreferences() so every load path gets the new behavior
automatically — no caller changes needed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 14:38:43 +02:00
..
async-jobs batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
aws-auth batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
bg-shell batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
browser-tools batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
claude-code-cli batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
cmux batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
context7 batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
genai-proxy batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
github-sync batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
google-search batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
guardrails batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
mac-tools batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
mcp-client batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
ollama batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
remote-questions batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
search-the-web feat(search): add MiniMax web search provider 2026-04-29 13:55:04 +02:00
sf feat(prefs): schema versioning with forward-migration registry 2026-04-29 14:38:43 +02:00
sf-notify batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
sf-permissions batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
sf-tui batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
sf-usage-bar batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
shared batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
slash-commands batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
subagent batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
ttsr batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
universal-config batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
voice batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
ask-user-questions.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
get-secrets-from-user.ts batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00
package.json batch: snapshot of in-flight v2 work 2026-04-29 12:42:31 +02:00