feat(KB-620): add multi-project first-run migration flow

- Add first-run migration detection and registration helpers for central project setup
- Wire CLI and dashboard setup routes to auto-migrate existing projects and complete setup
- Harden path resolution, overlap checks, and backward-compat project selection behavior
- Add regression tests for migration, nested project detection, and single-project compatibility
This commit is contained in:
gsxdsm
2026-04-01 14:18:57 -07:00
parent d943616cb3
commit a463670852
11 changed files with 653 additions and 306 deletions

View File

@@ -1,19 +1,13 @@
---
"@fusion/core": minor
"@fusion/engine": minor
"@gsxdsm/fusion": minor
---
Add migration and first-run experience for multi-project support
- Auto-detect and register existing kb projects on first run
- MigrationOrchestrator with filesystem scanning and safety checks
- FirstRunExperience with setup wizard state management
- Backward-compatible single-project mode (TaskStore.getOrCreateForProject)
- `--project` flag support for CLI multi-project targeting
- `KB_SKIP_MIGRATION` environment variable for recovery
- Graceful fallback when central database unavailable
- Auto-detect and register existing projects on first run after upgrade
- New `fn init` command to initialize kb projects
- Maintain backward compatibility for single-project workflows
- Interactive first-run setup wizard API in dashboard
- Idempotent migration — safe to re-run
- Rollback procedure documented in AGENTS.md