feat(FN-1667): merge fusion/fn-1667 (auto-resolved)

- test(FN-1667): complete Step 4 — verify roadmap model
- feat(FN-1667): complete Step 3 — document roadmap model
- feat(FN-1667): complete Step 2 — add roadmap ordering helpers
- feat(FN-1667): complete Step 1 — define roadmap contracts
This commit is contained in:
gsxdsm
2026-04-13 08:57:48 -07:00
parent 251af54580
commit 8874c0d73a
7 changed files with 930 additions and 1 deletions

View File

@@ -127,6 +127,10 @@ Concrete references:
- SQLite (`node:sqlite`) with WAL mode + foreign keys
- JSON helpers: `toJson`, `toJsonNullable`, `fromJson`
- Tables: `tasks`, `config`, `activityLog`, `archivedTasks`, `automations`, `agents`, `agentHeartbeats`, mission hierarchy tables, `__meta`
- **Standalone roadmap contracts**: `packages/core/src/roadmap-types.ts`, `roadmap-ordering.ts`
- Roadmap-first entity types (`Roadmap`, `RoadmapMilestone`, `RoadmapFeature`)
- Pure ordering helpers for contiguous 0-based milestone/feature order and deterministic cross-milestone feature moves
- Exported from `@fusion/core` for downstream persistence/API/UI work
- **CentralCore**: `packages/core/src/central-core.ts`
- Global project registry, health, central activity feed, global concurrency
- Backed by `packages/core/src/central-db.ts` (`~/.pi/fusion/fusion-central.db`)
@@ -135,6 +139,24 @@ Concrete references:
- `MissionStore` (`mission-store.ts`) — mission/milestone/slice/feature hierarchy
- `AutomationStore` (`automation-store.ts`) — scheduled jobs
- `MessageStore` (`message-store.ts`) — mailbox/inbox/outbox messaging
- No `RoadmapStore` yet — roadmap work currently starts with shared domain contracts, with persistence/API tasks landing later
### Standalone roadmap model
Fusion now has two planning models in core:
- **Roadmap hierarchy** — `Roadmap → RoadmapMilestone → RoadmapFeature`
- **Mission hierarchy** — `Mission → Milestone → Slice → Feature → Task`
The roadmap model is intentionally lightweight and independent from `MissionStore`/mission lifecycle semantics. It is meant for standalone planning, ordering, drag-and-drop moves, and future conversion flows into missions or tasks without coupling roadmap data to slice activation, autopilot, or mission status rollups.
Key roadmap invariants:
- milestone ordering is scoped to a single roadmap and must remain contiguous + 0-based
- feature ordering is scoped to a single milestone and must remain contiguous + 0-based
- repair/normalization uses deterministic tie-breakers: `orderIndex ASC`, `createdAt ASC`, `id ASC`
- cross-milestone feature moves must renumber both the source and destination milestone deterministically
At this stage the roadmap work in `@fusion/core` is contract-first: types, DTOs, handoff payloads, and pure ordering helpers are available from the public index, while persistence/API/dashboard tasks follow in the FN-1668+ roadmap chain.
### Shared utilities
From `packages/core/src/index.ts` exports: