Files
stack/docs/archive/missions/storage-abstraction/TASKS.md
Jarvis f7b5f187c5
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
docs: archive stale mission state, scaffold CLI unification mission
Prior sessions left three different missions spread across the docs:
- docs/MISSION-MANIFEST.md: Harness Foundation (complete)
- docs/TASKS.md: Storage Abstraction Retrofit (P1-P4 done, P5 pending)
- docs/scratchpads/mvp-20260312.md: MVP mission (stale)

Reset the working state to a single clean mission focused on what
actually needs to happen next: unify the mosaic CLI, add first-class
commands for every sub-package, fix the gateway bootstrap token
recovery dead-end, and stitch the install UX end-to-end.

Changes:
- Move Harness Foundation manifest + PRD to docs/archive/missions/harness-20260321/
- Move Storage Abstraction TASKS.md to docs/archive/missions/storage-abstraction/
- Scaffold new docs/MISSION-MANIFEST.md for cli-unification-20260404
  with 8 milestones (M1 done via PR #398, M2 in-progress via this PR)
- Scaffold new docs/TASKS.md with per-milestone task breakdown,
  dependencies, agent assignments, and token estimates
- Scaffold docs/scratchpads/cli-unification-20260404.md with full
  planning decisions, gateway bootstrap bug root cause analysis,
  telemetry architecture notes, and open risks

Left intact:
- docs/PRD.md (v0.1.0, 1005 lines) — still the long-term target
- docs/PRD-TUI_Improvements.md — active TUI work
- docs/scratchpads/* historical task scratchpads — append-only breadcrumbs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 23:43:42 -05:00

31 lines
2.9 KiB
Markdown

# Tasks — Storage Abstraction Retrofit
> Single-writer: orchestrator only. Workers read but never modify.
>
> **Mission:** Decouple gateway from hardcoded Postgres/Valkey backends. Introduce interface-driven middleware so the gateway is backend-agnostic. Default to local tier (SQLite + JSON) for zero-dependency installs.
>
> **`agent` column values:** `codex` | `sonnet` | `haiku` | `glm-5` | `opus` | `—` (auto/default)
| id | status | agent | description | tokens |
| --------- | ----------- | ------ | ---------------------------------------------------------------- | ------ |
| SA-P1-001 | done | sonnet | Define QueueAdapter interface in packages/queue/src/types.ts | 3K |
| SA-P1-002 | done | sonnet | Define StorageAdapter interface in packages/storage/src/types.ts | 3K |
| SA-P1-003 | done | sonnet | Define MemoryAdapter interface in packages/memory/src/types.ts | 3K |
| SA-P1-004 | done | sonnet | Create adapter factory pattern + config types | 3K |
| SA-P2-001 | done | sonnet | Refactor @mosaicstack/queue: wrap ioredis as BullMQ adapter | 3K |
| SA-P2-002 | done | sonnet | Create @mosaicstack/storage: wrap Drizzle as Postgres adapter | 6K |
| SA-P2-003 | done | sonnet | Refactor @mosaicstack/memory: extract pgvector adapter | 4K |
| SA-P2-004 | done | sonnet | Update gateway modules to use factories + DI tokens | 5K |
| SA-P2-005 | done | opus | Verify Phase 2: all tests pass, typecheck clean | — |
| SA-P3-001 | done | sonnet | Implement local queue adapter: JSON file persistence | 5K |
| SA-P3-002 | done | sonnet | Implement SQLite storage adapter with better-sqlite3 | 8K |
| SA-P3-003 | done | sonnet | Implement keyword memory adapter — no vector dependency | 4K |
| SA-P3-004 | done | opus | Verify Phase 3: 42 new tests, 347 total passing | — |
| SA-P4-001 | done | sonnet | MosaicConfig schema + loader with tier auto-detection | 6K |
| SA-P4-002 | done | sonnet | CLI: mosaic gateway init — interactive wizard | 4K |
| SA-P4-003 | done | sonnet | CLI: mosaic gateway start/stop/status lifecycle | 5K |
| SA-P4-004 | done | opus | Verify Phase 4: 381 tests passing, 40/40 tasks clean | — |
| SA-P5-001 | not-started | codex | Migration tooling: mosaic storage export/import | — |
| SA-P5-002 | not-started | codex | Docker Compose profiles: local vs team | — |
| SA-P5-003 | not-started | codex | Final verification + docs: README, architecture diagram | — |