Migration: v3 to v3.5 (legacy numbering)
Version numbering: this page speaks in the legacy line (
1.x → 2.x → 3.x → 3.5). In 2026-06 the framework renumbered itself3.5 → 0.5(see VERSIONING.md andVERSION.md); the0.xline (now at0.6) is later than3.5. “v3.5” below means the fourth milestone of the old line.Does an operator still need this page? Rarely. The current framework already contains everything v3.5 introduced. What may still apply is the migration script: an older instance that lacks
genesis_commitorlast_sync_commitinfederation.yaml.metadata, or hasdata/packages-matrix.yamlentries withoutlifecycle_status, can have them seeded by runningscripts/migrations/v3-to-v3-5-consolidation.mjs(see below). For moving an instance onto the current framework, usenpm run doctor -- sync --dry-runand thennpm run doctor -- sync(see VERSIONING.md). The step list below is kept as the historical procedure, with the commands that no longer work as written corrected.
Status: additive only. Re-runnable. No deletions.
What v3.5 added
The v3.5 release was themed “Consolidation + Ready for Real Orgs”. See CHANGELOG.md (the [0.5.0] entry covers the renumbering) for the inventory. Highlights, taken from the old page and not re-counted:
- Lineage stamp in
federation.yaml.metadata— every instance getsgenesis_commit(immutable) +last_sync_commit(mutable). This enables federated tooling to reason about how instances relate to framework history. - Cloning engine (
scripts/clone-framework.mjs) — generate a new instance from a config file end-to-end. - Sync engine (
scripts/sync-upstream.mjs) — pull-based framework → instance synchronization with vault-safety + .sync-freeze + lineage-stamp update + receipt logging. - Reliability layer —
scripts/selftest.mjsaggregator, pre-commit hooks, CI workflows. - Skills section — operator-visible inventory (
/skills,SKILLS.md,.well-known/skills.json). - Package lifecycle —
data/packages-matrix.yamlgainslifecycle_statusfield. - Promoted skills and scripts — skills and scripts moved from instance-local to framework-canonical (see SKILL-PROMOTION.md).
- Workspace safety promoted from one hub to the framework (
scripts/vault-snapshot.mjs,vault-audit.mjs, VAULT-SAFETY.md).
What operators need to do
Per instance, to apply the v3.5 changes to an old instance:
# 1. Snapshot (it records tracked and staged files only; commit or copy aside untracked notes first)
npm run vault:snapshot -- "before v3.5 migration"
# 2. Bring in the framework changes (refuses on a dirty tree; see `npm run sync:upstream` in COMMANDS.md)
npm run sync:upstream -- --yes
# 3. Run the migration script directly (idempotent, additive)
node scripts/migrations/v3-to-v3-5-consolidation.mjs
# 4. Validate
npm run validate:structure
npm run validate:schemas
npm run selftest
# 5. If validators pass, commit the paths the script touched
git add federation.yaml data/packages-matrix.yaml memory/migrations-*.md # drop data/packages-matrix.yaml if your instance has none: git add fails on a missing path
git commit -m "chore: apply the v3.5 lineage and lifecycle migration"
Two corrections to the old procedure. git pull upstream main is replaced by npm run sync:upstream, the supported route; that script also refuses to run on a dirty tree. And the old npm run migrate -- --target v3.5 step is replaced by running the script with node, which works whatever the instance is stamped. migrate.mjs has a --target flag again since 0.6, but it selects this script (read as 3 → 3) only when the instance’s framework_version is still on the legacy numbering and the target is too; with a 0.x stamp or a 0.x target, as in sync:upstream and the doctor’s migrate stage, it selects nothing (read from scripts/migrate.mjs, not run).
What the migration does (mechanically)
scripts/migrations/v3-to-v3-5-consolidation.mjs performs:
- Seeds
federation.yaml.metadata.genesis_commitif missing — derives fromgit rev-list --max-parents=0 HEAD | tail -1of the instance. Treat as immutable after seeding. - Seeds
federation.yaml.metadata.last_sync_committonullif missing. Updated to the framework HEAD SHA on the nextsync:upstreamrun. - Adds
lifecycle_status: "dormant"to anydata/packages-matrix.yamlentries missing the field. Operator should review and adjust (active/dormant/planned/retired). - Logs everything to
memory/migrations-YYYY-MM-DD.md.
The migration does NOT:
- Change
framework_version(edit it yourself, or letnpm run doctor syncre-stamp it) - Touch
data/skills-matrix.yaml(instances own their own; framework’s is separate) - Modify any skill or package content
- Delete or rename anything
Per-instance cascade order (recommended)
If you maintain multiple instances, sequence them by blast radius:
- Smallest / lowest-risk first (e.g., bootstrap instances with no production operations)
- Hubs / coordination instances (high alignment with framework patterns)
- Active production instances (only after operator opts in)
- Time-critical instances — never sync during a critical operational window. Use the
.sync-freezelockfile to enforce:echo "DO NOT SYNC UNTIL <date>: <reason>" > .sync-freezesync-upstreamwill refuse with exit code 2 until you remove the file.
Rollback
If sync introduces a regression and you can’t fix forward:
- Find your snapshot ref:
git for-each-ref refs/snapshots/(the snapshot from step 1 above) - Restore individual files:
git cat-file -p refs/snapshots/<your-ref>:"<file>" > "<file>.recovered", then compare with the current file before replacing it. A plain> "<file>"overwrites silently. - Or restore more broadly: see the recovery runbook in VAULT-SAFETY.md
The migration is additive, so most rollbacks just need a git revert of the commit in which you recorded the sync (sync:upstream leaves its changes uncommitted, so there may be none).
After successful sync
- Re-run
/initializeto refresh the dashboard - Check
npm run check:divergence— it lists, advisorily, which of your scripts differ from the framework’s - Consider enabling pre-commit hooks:
npm run install:hooks - If you want auto-discovery of skills:
npm run generate:skillswritesSKILLS.md+.well-known/skills.json
Known issues
- Pre-existing instance scripts may diverge from framework canonical (intentional or drift).
npm run check:divergencesurfaces these advisorily. Resolution is operator-driven, not automated. - SKILL-PROMOTION.md keeps a “Known divergences” table, written at the v3.5.0 release and not re-checked.
References
- CHANGELOG.md — release history, including the
0.xre-baseline - VERSIONING.md — versioning policy, lineage stamp, version surfaces
- RELIABILITY.md — failure modes, trigger layers, recovery
- VAULT-SAFETY.md — workspace safety protocol and recovery runbook
- PACKAGE-LIFECYCLE.md — package lifecycle states and sync mechanism
- SKILL-PROMOTION.md — skill and script promotion workflow