# Master Execution Plan

Status: Draft
Parent: `docs/ROADMAP.md`
Companion: `docs/PRD.md`

## Workstream Metadata

- **Primary Owner**
  - product lead / coordinating agent

- **Blocked By**
  - final product identity decisions
  - final mobile path confirmation

- **Unblocks**
  - all downstream workstream roadmaps
  - merge sequencing and cross-track coordination

- **High-Collision Files**
  - `docs/ROADMAP.md`
  - `docs/PRD.md`
  - top-level product config files

- **Definition of Done**
  - master execution order is clear
  - all workstream docs have aligned scope
  - phase exits and handoffs are explicit

# Purpose

This document is the execution-level master plan for coordinating all workstreams.

Use it for:

- dependency sequencing,
- cross-track handoffs,
- phase exit checks,
- agent assignment,
- merge-order decisions.

# Phase Sequence

## Phase 0 — Foundations and Decisions

### Tasks

- [ ] Finalize product name
- [ ] Finalize `productId`
- [ ] Assign backend port
- [ ] Define domain / bundle identifiers
- [ ] Reserve token namespace
- [ ] Confirm React Native MVP path
- [ ] Finalize top-level repo structure
- [ ] Finalize initial domain object inventory
- [ ] Finalize initial container strategy
- [ ] Finalize operator vs shared-admin boundary
- [ ] Align `PRD.md`, `ROADMAP.md`, and all workstream docs

### Handoffs

- Backend can begin after API/domain boundaries are stable
- Web can begin after route/page inventory is stable
- Mobile can begin after auth + API shapes are stable
- MCP can begin after note/workspace object definitions are stable
- Platform integrations can begin after dependency list is stable

## Phase 1 — Core Skeleton

### Tasks

- [ ] Scaffold backend service
- [ ] Scaffold web app
- [ ] Scaffold mobile app
- [ ] Wire shared platform clients
- [ ] Implement `notes` and `workspaces` end-to-end
- [ ] Establish auth on all chosen surfaces
- [ ] Establish telemetry baseline

### Exit Checks

- [ ] Web boots with authenticated shell
- [ ] Backend boots with health + first modules
- [ ] Mobile boots with auth + navigation shell
- [ ] Notes/workspaces vertical slice works end-to-end

## Phase 2 — Notes MVP

### Tasks

- [ ] Add note relationships
- [ ] Add tasks from notes
- [ ] Add artifacts/attachments
- [ ] Add better web authoring and knowledge UX
- [ ] Add mobile quick capture and lightweight editing
- [ ] Add auditable important write paths

### Exit Checks

- [ ] Human MVP is usable on web
- [ ] Mobile MVP is useful for capture/retrieval
- [ ] Artifacts/tasks/relationships work
- [ ] Auditability exists for key writes

## Phase 3 — Agentic Layer

### Tasks

- [ ] Add product MCP tools
- [ ] Add approval workflow
- [ ] Add agent action log and review UI
- [ ] Add A2A-safe orchestration patterns
- [ ] Add fallback-safe enrichment flows

### Exit Checks

- [ ] MCP core tools work end-to-end
- [ ] Approval flow works
- [ ] Agent review UX works
- [ ] Extraction-backed flows degrade safely

## Phase 4 — Search and Retrieval Acceleration

### Tasks

- [ ] Improve retrieval quality and speed
- [ ] Improve relationship-aware navigation
- [ ] Improve search filters/views
- [ ] Add explainable search/retrieval metadata where useful

### Exit Checks

- [ ] Search is measurably useful
- [ ] Retrieval is scoped and explainable
- [ ] Dense knowledge workflows are smooth on web

## Phase 5 — Production Readiness

### Tasks

- [ ] Finalize build/test/release commands
- [ ] Finalize smoke checks
- [ ] Finalize runbooks and docs
- [ ] Finalize deferred list
- [ ] Finalize roadmap status

### Exit Checks

- [ ] Production readiness checklist passes
- [ ] Release flow is documented and repeatable
- [ ] All workstream docs are updated with final state

# Agent Assignment Template

- [ ] Agent A — Backend
- [ ] Agent B — Web
- [ ] Agent C — Mobile
- [ ] Agent D — MCP / Agent tooling
- [ ] Agent E — Platform integrations
- [ ] Agent F — QA / Release / Docs

# Merge Order

- [ ] Foundations
- [ ] Backend core modules
- [ ] Web shell and CRUD
- [ ] Mobile shell and core flows
- [ ] MCP core tools
- [ ] Integrations and enrichments
- [ ] QA and release hardening
