Phase 0-2 all done. P2-007 closed via PR #79. Mission advances to Phase 3. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
105 lines
7.4 KiB
Markdown
105 lines
7.4 KiB
Markdown
# Mission Scratchpad — MVP
|
||
|
||
> Append-only log. NEVER delete entries. NEVER overwrite sections.
|
||
> This is the orchestrator's working memory across sessions.
|
||
|
||
## Original Mission Prompt
|
||
|
||
```
|
||
Active mission detected: MVP. Read the mission state files and report status.
|
||
User confirmed: start the planning gate.
|
||
```
|
||
|
||
## Planning Decisions
|
||
|
||
### 2026-03-13 — Milestone and task breakdown
|
||
|
||
- PRD defines 8 phases (Phase 0–7), mapped 1:1 to Gitea milestones
|
||
- 59 issues created on git.mosaicstack.dev/mosaic/mosaic-stack (#1–#59)
|
||
- Each phase has a verification task as the final issue
|
||
- Task IDs use P{phase}-{seq} format (P0-001 through P7-008)
|
||
- Repo created as `mosaic/mosaic-stack` (private) on Gitea
|
||
- Milestones: ms-157 (Phase 0) through ms-164 (Phase 7)
|
||
- Total: 59 tasks across 8 milestones
|
||
|
||
### Phase structure
|
||
|
||
| Phase | Version | Tasks | Focus |
|
||
| ----- | ------- | ----- | ---------------------------------------------------------- |
|
||
| 0 | v0.0.1 | 9 | Foundation — monorepo, types, db, auth, OTEL, Docker, CI |
|
||
| 1 | v0.0.2 | 9 | Core API — gateway, brain, queue, routes, WebSocket |
|
||
| 2 | v0.0.3 | 7 | Agent Layer — Pi SDK, multi-provider, routing, coord |
|
||
| 3 | v0.0.4 | 8 | Web Dashboard — Next.js, chat, tasks, projects, admin |
|
||
| 4 | v0.0.5 | 7 | Memory & Intelligence — memory, log, summarization, skills |
|
||
| 5 | v0.0.6 | 5 | Remote Control — Discord, Telegram, SSO |
|
||
| 6 | v0.0.7 | 6 | CLI & Tools — CLI, prdy, quality-rails, installer, TUI |
|
||
| 7 | v0.1.0 | 8 | Polish & Beta — MCP, providers, E2E, docs, release |
|
||
|
||
## Session Log
|
||
|
||
| Session | Date | Milestone | Tasks Done | Outcome |
|
||
| ------- | ---------- | -------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||
| 1 | 2026-03-13 | Planning | Planning gate | Milestones created, 59 issues created, TASKS.md populated, manifest updated |
|
||
| 2 | 2026-03-13 | Vertical slice | P1-001, P1-007, P1-008, P2-001, P5-002, P6-005 | Communication spine built and merged (PR #61). Gateway + TUI + Discord. 3-agent gatekeeper review, 10/16 issues remediated, 4 deferred. |
|
||
| 3 | 2026-03-13 | Foundation | P0-002, P0-005, P0-006 | Foundation layer merged (PR #65). Docker Compose (PG+pgvector, Valkey, OTEL Collector, Jaeger), OTEL auto-instrumentation in gateway, @mosaic/types with DTOs + Socket.IO typed event maps. |
|
||
|
||
### Session 4 — Docker Compose fix
|
||
|
||
| Session | Date | Milestone | Tasks Done | Outcome |
|
||
| ------- | ---------- | ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------- |
|
||
| 4 | 2026-03-12 | Foundation | (fix) | Fixed Jaeger tag (2→2.6.0), remapped PG/Valkey ports (5433/6380) to avoid host conflicts. PR #66 merged to main. |
|
||
|
||
**Verification evidence:**
|
||
|
||
- All 4 containers healthy (PG, Valkey, OTEL Collector, Jaeger)
|
||
- OTEL pipeline proven: `mosaic-gateway` service visible in Jaeger UI
|
||
- Gateway traces flow through Collector → Jaeger
|
||
|
||
### Session 5 — Phase 0-1 completion
|
||
|
||
| Session | Date | Milestone | Tasks Done | Outcome |
|
||
| ------- | ---------- | ---------------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
|
||
| 5 | 2026-03-12 | Phase 0, Phase 1 | P0-003, P0-004, P0-007, P0-008, P0-009, P1-002–P1-006, P1-009 | Foundation + Core API complete. DB, auth, CI, brain, queue, CRUD routes all merged and green. |
|
||
|
||
### Session 6 — Phase 2 agent layer
|
||
|
||
| Session | Date | Milestone | Tasks Done | Outcome |
|
||
| ------- | ---------- | --------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||
| 6 | 2026-03-12 | Phase 2 | P2-002, P2-003, P2-004, P2-005, P2-006, FIX-01 | Multi-provider routing, tool registration, coord migration, session management, dispose() fix. PRs #74–#78. |
|
||
|
||
### Session 7-8 — Phase 2 verification + completion
|
||
|
||
| Session | Date | Milestone | Tasks Done | Outcome |
|
||
| ------- | ---------- | --------- | ---------- | ----------------------------------------------------------------------------------- |
|
||
| 7-8 | 2026-03-12 | Phase 2 | P2-007 | 19 unit tests (routing + coord). PR #79 merged, issue #25 closed. Phase 2 complete. |
|
||
|
||
## Open Questions
|
||
|
||
(none at this time)
|
||
|
||
## Corrections
|
||
|
||
### 2026-03-13 — Vertical slice reorder (Jason directed)
|
||
|
||
**Original plan:** Linear Phase 0 → 1 → 2 → ... execution.
|
||
|
||
**Correction:** Vertical slice first. Scaffold monorepo, then build the Pi TUI → Gateway → Discord communication spine end-to-end before backfilling auth, brain, memory, CRUD, etc.
|
||
|
||
**Why:** Validate the architecture's core message flow before investing in horizontal layers. If the communication channels don't work, nothing else matters.
|
||
|
||
**Revised execution sequence:**
|
||
|
||
| Step | Tasks (cross-phase) | What it proves |
|
||
| ---- | -------------------------------------------------------------------- | ------------------------ |
|
||
| 1 | P0-001: Scaffold monorepo | Build system works |
|
||
| 2 | P0-005: Docker Compose (PG + Valkey) | Infrastructure runs |
|
||
| 3 | P0-002: @mosaic/types (minimal — gateway, agent, chat types) | Shared contracts |
|
||
| 4 | P1-001: Gateway scaffold (minimal NestJS + Fastify) | API surface boots |
|
||
| 5 | P1-007: WebSocket server (chat streaming) | Real-time channel works |
|
||
| 6 | P1-008: Basic agent dispatch (single provider) | LLM responds |
|
||
| 7 | P2-001: @mosaic/agent — Pi SDK integration (minimal) | Pi sessions work |
|
||
| 8 | P6-005: Pi TUI integration (mosaic tui → gateway) | TUI ↔ Gateway proven |
|
||
| 9 | P5-001: Plugin host (channel plugin interface) | Plugin arch works |
|
||
| 10 | P5-002: Discord plugin (bot + channel) | Discord ↔ Gateway proven |
|
||
| — | Then backfill: auth, brain, db, queue, OTEL, CI, web dashboard, etc. |
|