## Что это
## Контекст
user-data-migration R1-R9: detectPriority (\~/.rox-agent/ → \~/.rox/),
migrateUserDataIfNeeded() в config/, copy non-destructive (legacy
preserved), marker file \~/.rox/.migrated-from-rox.
## Модель данных
* MigrationResult { decision: 'noLegacy'|'legacyOnly'|'bothExist'|'alreadyMigrated'; copiedBytes?: number; warnings: string\[\] }
* MigrationLogger contract { info, warn, error }
## Критерии приёмки
- [ ] 4 state-machine cases работают: no-legacy, legacy-only, both-exist, already-migrated
- [ ] Already-migrated branch checked first (idempotent)
- [ ] Conflict (both exist) → warn no-copy no-marker
- [ ] fs.cpSync с verbatimSymlinks
- [ ] Marker file пишется атомарно
- [ ] Node 22+ vs older graceful
## Риски
* Disk-space double usage during copy → проверять free space
* Windows long-paths → enable longPath support
## Статус
Это задача из текущего backlog'а ROX.ONE (Linear). Текущий статус в Linear: `Triage`. Метки: `История` / `Story`, `Фича` / `Feature`.
## 🔗 Linear
- [PZD-128](https://linear.app/kuhjie/issue/PZD-128/istoriya-user-data-migration-shim-detectpriority-branches) — backing ticket
- Parent epic: [PZD-122](https://linear.app/kuhjie/issue/PZD-122)