# Tasks — MS21 Multi-Tenant RBAC Data Migration

> Single-writer: orchestrator (Jarvis/OpenClaw) only. Workers read but never modify.
> Schema: id | status | milestone | description | issue | repo | branch | depends_on | blocks | agent | started_at | completed_at | estimate | used | notes

| id             | status      | milestone | description                                                                       | issue    | repo  | branch                         | depends_on                                                  | blocks                     | agent           | started_at | completed_at | estimate | used | notes                                                                                                                 |
| -------------- | ----------- | --------- | --------------------------------------------------------------------------------- | -------- | ----- | ------------------------------ | ----------------------------------------------------------- | -------------------------- | --------------- | ---------- | ------------ | -------- | ---- | --------------------------------------------------------------------------------------------------------------------- |
| MS21-PLAN-001  | done        | phase-1   | Write PRD, init mission, populate TASKS.md                                        | TASKS:P1 | stack | chore/ms21-init                | —                                                           | MS21-DB-001                | orchestrator    | 2026-02-28 | 2026-02-28   | 10K      | 12K  | PR #552, CI green                                                                                                     |
| MS21-DB-001    | done        | phase-1   | Prisma migration: add user fields                                                 | TASKS:P1 | api   | feat/ms21-schema               | MS21-PLAN-001                                               | MS21-API-001               | claude-worker-1 | 2026-02-28 | 2026-02-28   | 10K      | 9K   | PR #553, CI green                                                                                                     |
| MS21-API-001   | done        | phase-1   | AdminModule with user/workspace admin endpoints                                   | TASKS:P1 | api   | feat/ms21-admin-api            | MS21-DB-001                                                 | MS21-TEST-001              | claude-worker-2 | 2026-02-28 | 2026-02-28   | 20K      | 18K  | PR #555, CI green                                                                                                     |
| MS21-API-002   | done        | phase-1   | Admin user endpoints (list, invite, update, deactivate)                           | TASKS:P1 | api   | feat/ms21-admin-api            | MS21-DB-001                                                 | MS21-TEST-001              | claude-worker-2 | 2026-02-28 | 2026-02-28   | —        | —    | Combined with API-001                                                                                                 |
| MS21-API-003   | done        | phase-1   | Workspace member management endpoints                                             | TASKS:P1 | api   | feat/ms21-workspace-members    | MS21-DB-001                                                 | —                          | codex-worker-1  | 2026-02-28 | 2026-02-28   | 15K      | 14K  | PR #556, CI green                                                                                                     |
| MS21-API-004   | done        | phase-1   | Team management module                                                            | TASKS:P1 | api   | feat/ms21-teams                | MS21-DB-001                                                 | —                          | codex-worker-2  | 2026-02-28 | 2026-02-28   | 15K      | 13K  | PR #564, CI green                                                                                                     |
| MS21-API-005   | done        | phase-1   | Admin workspace endpoints                                                         | TASKS:P1 | api   | feat/ms21-admin-api            | MS21-DB-001                                                 | —                          | claude-worker-2 | 2026-02-28 | 2026-02-28   | —        | —    | Combined with API-001                                                                                                 |
| MS21-TEST-001  | done        | phase-1   | Unit tests for AdminService and AdminController                                   | TASKS:P1 | api   | feat/ms21-admin-api            | MS21-API-001                                                | —                          | claude-worker-2 | 2026-02-28 | 2026-02-28   | 15K      | —    | PR #555, 26 tests                                                                                                     |
| MS21-FIX-001   | done        | phase-1   | Fix flaky CI tests (rate limit timeout + log sanitizer)                           | TASKS:P1 | api   | fix/ms21-flaky-ci              | MS21-API-001                                                | —                          | codex-worker-3  | 2026-02-28 | 2026-02-28   | 8K       | 7K   | PR #562, CI green                                                                                                     |
| MS21-AUTH-001  | done        | phase-2   | LocalAuthModule: break-glass auth                                                 | TASKS:P2 | api   | feat/ms21-local-auth           | MS21-DB-001                                                 | MS21-TEST-002              | claude-worker-3 | 2026-02-28 | 2026-02-28   | 20K      | 19K  | PR #559, CI green                                                                                                     |
| MS21-AUTH-002  | done        | phase-2   | Break-glass setup endpoint                                                        | TASKS:P2 | api   | feat/ms21-local-auth           | MS21-AUTH-001                                               | —                          | claude-worker-3 | 2026-02-28 | 2026-02-28   | —        | —    | Combined with AUTH-001                                                                                                |
| MS21-AUTH-003  | done        | phase-2   | Break-glass login endpoint                                                        | TASKS:P2 | api   | feat/ms21-local-auth           | MS21-AUTH-001                                               | —                          | claude-worker-3 | 2026-02-28 | 2026-02-28   | —        | —    | Combined with AUTH-001                                                                                                |
| MS21-AUTH-004  | not-started | phase-2   | Deactivation session invalidation                                                 | TASKS:P2 | api   | feat/ms21-session-invalidation | MS21-AUTH-001                                               | —                          | —               | —          | —            | 10K      | —    | Deferred; do after Phase 4                                                                                            |
| MS21-TEST-002  | done        | phase-2   | Unit tests for LocalAuth                                                          | TASKS:P2 | api   | feat/ms21-local-auth           | MS21-AUTH-001                                               | —                          | claude-worker-3 | 2026-02-28 | 2026-02-28   | 15K      | —    | PR #559, 27 tests                                                                                                     |
| MS21-MIG-001   | done        | phase-3   | Migration script: scripts/migrate-brain.ts                                        | #568     | api   | feat/ms21-migration            | MS21-DB-001                                                 | MS21-MIG-002,MS21-TEST-003 | codex-worker-1  | 2026-02-28 | 2026-02-28   | 25K      | 22K  | PR #554                                                                                                               |
| MS21-MIG-002   | done        | phase-3   | Migration mapping: status/priority/domain                                         | #568     | api   | feat/ms21-migration            | MS21-MIG-001                                                | —                          | codex-worker-1  | 2026-02-28 | 2026-02-28   | —        | —    | Included in MIG-001                                                                                                   |
| MS21-TEST-003  | done        | phase-3   | Migration script unit tests (9/9 passing)                                         | #568     | api   | test/ms21-migration-tests      | MS21-MIG-001                                                | —                          | codex           | 2026-02-28 | 2026-02-28   | 20K      | 17K  | PR #566 merged, CI green. Review: 0 blockers, 2 should-fix (brittle harness), 0 sec issues.                           |
| MS21-MIG-003   | not-started | phase-3   | Run migration on production database                                              | #568     | api   | —                              | MS21-MIG-001,MS21-TEST-003                                  | MS21-VER-001               | —               | —          | —            | 5K       | —    | Needs deploy coordination; not automatable                                                                            |
| MS21-MIG-004   | done        | phase-3   | Import API endpoints (6/6 tests)                                                  | #568     | api   | feat/ms21-import-api           | MS21-DB-001                                                 | —                          | codex           | 2026-02-28 | 2026-02-28   | 20K      | 24K  | PR #567 merged, CI green. Review: 0 blockers, 4 should-fix, 1 medium sec (no audit log).                              |
| MS21-UI-001    | done        | phase-4   | Settings/users page                                                               | #569     | web   | feat/ms21-ui-users             | MS21-API-001,MS21-API-002                                   | —                          | codex           | 2026-02-28 | 2026-02-28   | 20K      | ~30K | PR #573 merged. Review: 0 blockers, 4 should-fix → MS21-UI-001-QA                                                     |
| MS21-UI-001-QA | done        | phase-4   | QA: fix 4 review findings (pagination, error state, self-deactivate guard, tests) | #569     | web   | fix/ms21-ui-001-qa             | MS21-UI-001                                                 | —                          | —               | —          | —            | 15K      | —    | 0 blockers; merged per framework. Should-fix: pagination cap, error/empty collision, self-deactivate guard, no tests. |
| MS21-UI-002    | done        | phase-4   | User detail/edit and invite dialogs                                               | #569     | web   | feat/ms21-ui-users             | MS21-UI-001                                                 | —                          | —               | —          | —            | 15K      | —    |                                                                                                                       |
| MS21-UI-003    | done        | phase-4   | Settings/workspaces page (wire to real API)                                       | #569     | web   | feat/ms21-ui-workspaces        | MS21-API-003                                                | —                          | codex           | 2026-02-28 | 2026-02-28   | 15K      | ~25K | PR #574 merged. Review: 0 critical, 1 low (raw errors in UI)                                                          |
| MS21-UI-004    | done        | phase-4   | Workspace member management UI                                                    | #569     | web   | feat/ms21-ui-workspaces        | MS21-UI-003,MS21-API-003                                    | —                          | —               | —          | —            | 15K      | —    | Components exist                                                                                                      |
| MS21-UI-005    | done        | phase-4   | Settings/teams page                                                               | #569     | web   | feat/ms21-ui-teams             | MS21-API-004                                                | —                          | —               | —          | —            | 15K      | —    |                                                                                                                       |
| MS21-TEST-004  | done        | phase-4   | Frontend component tests                                                          | #569     | web   | test/ms21-ui                   | MS21-UI-001,MS21-UI-002,MS21-UI-003,MS21-UI-004,MS21-UI-005 | —                          | —               | —          | —            | 20K      | —    |                                                                                                                       |
| MS21-RBAC-001  | done        | phase-5   | Sidebar navigation role gating                                                    | #570     | web   | feat/ms21-rbac                 | MS21-UI-001                                                 | —                          | —               | —          | —            | 10K      | —    |                                                                                                                       |
| MS21-RBAC-002  | done        | phase-5   | Settings page access restriction                                                  | #570     | web   | feat/ms21-rbac                 | MS21-RBAC-001                                               | —                          | —               | —          | —            | 8K       | —    |                                                                                                                       |
| MS21-RBAC-003  | done        | phase-5   | Action button permission gating                                                   | #570     | web   | feat/ms21-rbac                 | MS21-RBAC-001                                               | —                          | —               | —          | —            | 8K       | —    |                                                                                                                       |
| MS21-RBAC-004  | done        | phase-5   | User profile role display                                                         | #570     | web   | feat/ms21-rbac                 | MS21-RBAC-001                                               | —                          | —               | —          | —            | 5K       | —    |                                                                                                                       |
| MS21-VER-001   | done        | phase-6   | Full quality gate pass                                                            | #571     | stack | —                              | MS21-TEST-004,MS21-RBAC-004,MS21-MIG-003                    | MS21-VER-002               | —               | —          | —            | 5K       | —    |                                                                                                                       |
| MS21-VER-002   | done        | phase-6   | Deploy and smoke test                                                             | #571     | stack | —                              | MS21-VER-001                                                | MS21-VER-003               | —               | —          | —            | 5K       | —    |                                                                                                                       |
| MS21-VER-003   | done        | phase-6   | Tag v0.0.21                                                                       | #571     | stack | —                              | MS21-VER-002                                                | —                          | —               | —          | —            | 2K       | —    |                                                                                                                       |

## Budget Summary

| Phase                  | Tasks  | Done   | Estimate  | Used      |
| ---------------------- | ------ | ------ | --------- | --------- |
| Phase 1 (Schema + API) | 9      | 9      | ~113K     | ~93K      |
| Phase 2 (Auth)         | 4      | 3      | ~45K      | ~19K      |
| Phase 3 (Migration)    | 5      | 3      | ~70K      | ~63K      |
| Phase 4 (UI)           | 6      | 0      | ~100K     | —         |
| Phase 5 (RBAC)         | 4      | 0      | ~31K      | —         |
| Phase 6 (Verification) | 3      | 0      | ~12K      | —         |
| **Total**              | **31** | **15** | **~371K** | **~175K** |

Remaining estimate: ~143K tokens (Codex budget).

## MS22 — Fleet Evolution (Phase 0: Knowledge Layer)

| id              | status | milestone    | description                                                  | issue    | repo  | branch                         | depends_on                                                | blocks        | agent        | started_at | completed_at | estimate | used | notes                                         |
| --------------- | ------ | ------------ | ------------------------------------------------------------ | -------- | ----- | ------------------------------ | --------------------------------------------------------- | ------------- | ------------ | ---------- | ------------ | -------- | ---- | --------------------------------------------- |
| MS22-PLAN-001   | done   | p0-knowledge | PRD + mission bootstrap + TASKS.md                           | TASKS:P0 | stack | feat/ms22-knowledge-schema     | —                                                         | MS22-DB-001   | orchestrator | 2026-02-28 | 2026-02-28   | 10K      | 8K   | PRD-MS22.md, mission fleet-evolution-20260228 |
| MS22-DB-001     | done   | p0-knowledge | Findings module (pgvector, CRUD, similarity search)          | TASKS:P0 | api   | feat/ms22-findings             | MS22-PLAN-001                                             | —             | codex        | 2026-02-28 | 2026-02-28   | 20K      | ~22K | PR #585 merged, CI green                      |
| MS22-API-001    | done   | p0-knowledge | Findings API endpoints                                       | TASKS:P0 | api   | feat/ms22-findings             | MS22-DB-001                                               | —             | codex        | 2026-02-28 | 2026-02-28   | —        | —    | Combined with DB-001                          |
| MS22-DB-002     | done   | p0-knowledge | AgentMemory module (key/value store, upsert)                 | TASKS:P0 | api   | feat/ms22-agent-memory         | MS22-DB-001                                               | —             | codex        | 2026-02-28 | 2026-02-28   | 15K      | ~16K | PR #586 merged, CI green                      |
| MS22-API-002    | done   | p0-knowledge | AgentMemory API endpoints                                    | TASKS:P0 | api   | feat/ms22-agent-memory         | MS22-DB-002                                               | —             | codex        | 2026-02-28 | 2026-02-28   | —        | —    | Combined with DB-002                          |
| MS22-DB-004     | done   | p0-knowledge | ConversationArchive module (pgvector, ingest, search)        | TASKS:P0 | api   | feat/ms22-conversation-archive | MS22-DB-001                                               | —             | codex        | 2026-02-28 | 2026-02-28   | 20K      | ~18K | PR #587 merged, CI green                      |
| MS22-API-004    | done   | p0-knowledge | ConversationArchive API endpoints                            | TASKS:P0 | api   | feat/ms22-conversation-archive | MS22-DB-004                                               | —             | codex        | 2026-02-28 | 2026-02-28   | —        | —    | Combined with DB-004                          |
| MS22-API-005    | done   | p0-knowledge | EmbeddingService (reuse existing KnowledgeModule)            | TASKS:P0 | api   | —                              | —                                                         | —             | orchestrator | 2026-02-28 | 2026-02-28   | 0        | 0    | Already existed; no work needed               |
| MS22-DB-003     | done   | p0-knowledge | Task model: add assigned_agent field + migration             | TASKS:P0 | api   | feat/ms22-task-agent           | MS22-DB-001                                               | MS22-API-003  | —            | —          | —            | 8K       | —    | Small schema + migration only                 |
| MS22-API-003    | done   | p0-knowledge | Task API: expose assigned_agent in CRUD                      | TASKS:P0 | api   | feat/ms22-task-agent           | MS22-DB-003                                               | MS22-TEST-001 | —            | —          | —            | 8K       | —    | Extend existing TaskModule                    |
| MS22-TEST-001   | done   | p0-knowledge | Integration tests: Findings + AgentMemory + ConvArchive      | TASKS:P0 | api   | test/ms22-integration          | MS22-API-001,MS22-API-002,MS22-API-004                    | MS22-VER-P0   | —            | —          | —            | 20K      | —    | E2E with live postgres                        |
| MS22-SKILL-001  | done   | p0-knowledge | OpenClaw mosaic skill (agents read/write findings/memory)    | TASKS:P0 | stack | feat/ms22-openclaw-skill       | MS22-API-001,MS22-API-002                                 | MS22-VER-P0   | —            | —          | —            | 15K      | —    | Skill in ~/.agents/skills/mosaic/             |
| MS22-INGEST-001 | done   | p0-knowledge | Session log ingestion pipeline (OpenClaw logs → ConvArchive) | TASKS:P0 | stack | feat/ms22-ingest               | MS22-API-004                                              | MS22-VER-P0   | —            | —          | —            | 20K      | —    | Script to batch-ingest existing logs          |
| MS22-VER-P0     | done   | p0-knowledge | Phase 0 verification: all modules deployed + smoke tested    | TASKS:P0 | stack | —                              | MS22-TEST-001,MS22-SKILL-001,MS22-INGEST-001,MS22-API-003 | —             | —            | —          | —            | 5K       | —    |                                               |

## MS22 Phase 1: DB-Centric Agent Fleet (reworked)

Design doc: `docs/design/MS22-DB-CENTRIC-ARCHITECTURE.md`

| Task ID  | Status | Phase    | Description                                                                                                           | Issue | Scope   | Branch                       | Depends On | Blocks          | Assigned Worker | Started | Completed | Est Tokens | Act Tokens | Notes |
| -------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------- | ----- | ------- | ---------------------------- | ---------- | --------------- | --------------- | ------- | --------- | ---------- | ---------- | ----- |
| MS22-P1a | done   | phase-1a | Prisma schema: SystemConfig, BreakglassUser, LlmProvider, UserContainer, SystemContainer, UserAgentConfig + migration | —     | api     | feat/ms22-p1a-schema         | —          | P1b,P1c,P1d,P1e | —               | —       | —         | 20K        | —          |       |
| MS22-P1b | done   | phase-1b | Encryption service (AES-256-GCM) for API keys and tokens                                                              | —     | api     | feat/ms22-p1b-crypto         | —          | P1c,P1e,P1g     | —               | —       | —         | 15K        | —          |       |
| MS22-P1c | done   | phase-1c | Internal config endpoint: assemble openclaw.json from DB                                                              | —     | api     | feat/ms22-p1c-config-api     | P1a,P1b    | P1i,P1j         | —               | —       | —         | 20K        | —          |       |
| MS22-P1d | done   | phase-1d | ContainerLifecycleService: Docker API (dockerode) start/stop/health/reap                                              | —     | api     | feat/ms22-p1d-container-mgr  | P1a        | P1i,P1k         | —               | —       | —         | 25K        | —          |       |
| MS22-P1e | done   | phase-1e | Onboarding API: breakglass, OIDC, provider, agents, complete                                                          | —     | api     | feat/ms22-p1e-onboarding-api | P1a,P1b    | P1f             | —               | —       | —         | 20K        | —          |       |
| MS22-P1f | done   | phase-1f | Onboarding wizard WebUI (multi-step form)                                                                             | —     | web     | feat/ms22-p1f-onboarding-ui  | P1e        | —               | —               | —       | —         | 25K        | —          |       |
| MS22-P1g | done   | phase-1g | Settings API: CRUD providers, agent config, OIDC, breakglass                                                          | —     | api     | feat/ms22-p1g-settings-api   | P1a,P1b    | P1h             | —               | —       | —         | 20K        | —          |       |
| MS22-P1h | done   | phase-1h | Settings UI: Providers, Agent Config, Auth pages                                                                      | —     | web     | feat/ms22-p1h-settings-ui    | P1g        | —               | —               | —       | —         | 25K        | —          |       |
| MS22-P1i | done   | phase-1i | Chat proxy: route WebUI chat to user's OpenClaw container (SSE)                                                       | —     | api+web | feat/ms22-p1i-chat-proxy     | P1c,P1d    | —               | —               | —       | —         | 20K        | —          |       |
| MS22-P1j | done   | phase-1j | Docker entrypoint + health checks + core compose                                                                      | —     | docker  | feat/ms22-p1j-docker         | P1c        | —               | —               | —       | —         | 10K        | —          |       |
| MS22-P1k | done   | phase-1k | Idle reaper cron: stop inactive user containers                                                                       | —     | api     | feat/ms22-p1k-idle-reaper    | P1d        | —               | —               | —       | —         | 10K        | —          |       |

## MS22 Phase 2: Named Agent Fleet

PRD: `docs/PRD-MS22-P2-AGENT-FLEET.md`

| Task ID     | Status | Phase    | Description                                  | Issue    | Scope | Branch                      | Depends On    | Blocks        | Assigned Worker | Started    | Completed  | Est Tokens | Act Tokens | Notes           |
| ----------- | ------ | -------- | -------------------------------------------- | -------- | ----- | --------------------------- | ------------- | ------------- | --------------- | ---------- | ---------- | ---------- | ---------- | --------------- |
| MS22-P2-001 | done   | p2-fleet | Prisma schema: AgentTemplate, UserAgent      | TASKS:P2 | api   | feat/ms22-p2-agent-schema   | MS22-P1a      | P2-002,P2-003 | orchestrator    | 2026-03-04 | 2026-03-04 | 10K        | 3K         | PR #675 merged  |
| MS22-P2-002 | done   | p2-fleet | Seed default agents (jarvis, builder, medic) | TASKS:P2 | api   | feat/ms22-p2-agent-seed     | P2-001        | P2-004        | orchestrator    | 2026-03-04 | 2026-03-04 | 5K         | 2K         | PR #677 merged  |
| MS22-P2-003 | done   | p2-fleet | Agent template CRUD endpoints (admin)        | TASKS:P2 | api   | feat/ms22-p2-agent-crud     | P2-001        | P2-005        | orchestrator    | 2026-03-04 | 2026-03-04 | 15K        | 5K         | PR #678 merged  |
| MS22-P2-004 | done   | p2-fleet | User agent CRUD endpoints                    | TASKS:P2 | api   | feat/ms22-p2-user-agents    | P2-002,P2-003 | P2-006        | orchestrator    | 2026-03-04 | 2026-03-04 | 15K        | 8K         | PR #682 merged  |
| MS22-P2-005 | done   | p2-fleet | Agent status endpoints                       | TASKS:P2 | api   | feat/ms22-p2-agent-routing  | P2-003        | P2-008        | orchestrator    | 2026-03-04 | 2026-03-04 | 10K        | 5K         | PR #684 merged  |
| MS22-P2-006 | done   | p2-fleet | Agent chat routing (select agent by name)    | TASKS:P2 | api   | feat/ms22-p2-agent-routing  | P2-004        | P2-007        | orchestrator    | 2026-03-04 | 2026-03-04 | 15K        | 5K         | PR #684 merged  |
| MS22-P2-007 | done   | p2-fleet | Discord channel → agent routing              | TASKS:P2 | api   | feat/ms22-p2-discord-router | P2-006        | P2-010        | orchestrator    | 2026-03-05 | 2026-03-05 | 15K        | 8K         | PR #688         |
| MS22-P2-008 | done   | p2-fleet | Agent list/selector UI in WebUI              | TASKS:P2 | web   | feat/ms22-p2-agent-ui       | P2-005        | —             | orchestrator    | 2026-03-04 | 2026-03-04 | 15K        | 8K         | PR #685 merged  |
| MS22-P2-009 | done   | p2-fleet | Unit tests for agent services                | TASKS:P2 | api   | test/ms22-p2-agent-tests    | P2-006        | P2-010        | orchestrator    | 2026-03-04 | 2026-03-05 | 15K        | 8K         | PR #687 merged  |
| MS22-P2-010 | done   | p2-fleet | E2E verification: Discord → agent → response | TASKS:P2 | stack | —                           | P2-009        | —             | orchestrator    | 2026-03-05 | 2026-03-05 | 10K        | 5K         | All gates green |

---

## MS23 — Mission Control Dashboard & Agent Provider Interface

PRD: `docs/PRD-MS23-mission-control.md`
Milestone: `0.0.23`
Target version: `v0.0.23`

> Single-writer: orchestrator (Jarvis/OpenClaw) only. Workers read but never modify.

### Phase 0 — Backend Core (Foundation)

| id          | status      | milestone     | description                                                                                      | issue | repo         | branch                 | depends_on                                      | blocks                                                      | agent | started_at | completed_at | estimate | used | notes                                         |
| ----------- | ----------- | ------------- | ------------------------------------------------------------------------------------------------ | ----- | ------------ | ---------------------- | ----------------------------------------------- | ----------------------------------------------------------- | ----- | ---------- | ------------ | -------- | ---- | --------------------------------------------- |
| MS23-P0-001 | done        | p0-foundation | Prisma schema: AgentConversationMessage, AgentSessionTree, AgentProviderConfig, OperatorAuditLog | #693  | api          | feat/ms23-p0-schema    | —                                               | MS23-P0-002,MS23-P0-003,MS23-P0-004,MS23-P0-005,MS23-P1-001 | codex | 2026-03-06 | 2026-03-06   | 15K      | —    | taskSource field per mosaic-queue note in PRD |
| MS23-P0-002 | done        | p0-foundation | Agent message ingestion: wire spawner/lifecycle to write messages to DB                          | #693  | orchestrator | feat/ms23-p0-ingestion | MS23-P0-001                                     | MS23-P0-006                                                 | codex | 2026-03-06 | 2026-03-07      | 20K      | —    |                                               |
| MS23-P0-003 | done        | p0-foundation | Orchestrator API: GET /agents/:id/messages + SSE stream endpoint                                 | #693  | orchestrator | feat/ms23-p0-stream    | MS23-P0-001                                     | MS23-P0-006                                                 | codex | 2026-03-06 | 2026-03-07      | 20K      | —    |                                               |
| MS23-P0-004 | done        | p0-foundation | Orchestrator API: POST /agents/:id/inject + pause/resume endpoints                               | #693  | orchestrator | feat/ms23-p0-controls  | MS23-P0-001                                     | MS23-P0-006                                                 | codex | 2026-03-07 | 2026-03-07 | 15K      | —    |                                               |
| MS23-P0-005 | done        | p0-foundation | Subagent tree: parentAgentId on spawn registration + GET /agents/tree                            | #693  | orchestrator | feat/ms23-p0-tree      | MS23-P0-001                                     | MS23-P0-006                                                 | —     | —          | —            | 15K      | —    |                                               |
| MS23-P0-006 | done        | p0-foundation | Unit + integration tests for all P0 orchestrator endpoints                                       | #693  | orchestrator | test/ms23-p0           | MS23-P0-002,MS23-P0-003,MS23-P0-004,MS23-P0-005 | MS23-P1-001                                                 | codex | 2026-03-07 | 2026-03-07 | 20K      | —    | Phase 0 gate: SSE stream verified via curl    |

### Phase 1 — Provider Interface (Plugin Architecture)

| id          | status      | milestone   | description                                                                         | issue | repo   | branch                         | depends_on                          | blocks                  | agent | started_at | completed_at | estimate | used | notes                                                              |
| ----------- | ----------- | ----------- | ----------------------------------------------------------------------------------- | ----- | ------ | ------------------------------ | ----------------------------------- | ----------------------- | ----- | ---------- | ------------ | -------- | ---- | ------------------------------------------------------------------ |
| MS23-P1-001 | not-started | p1-provider | IAgentProvider interface + AgentSession/AgentMessage types in packages/shared       | #694  | shared | feat/ms23-p1-interface         | MS23-P0-001,MS23-P0-006             | MS23-P1-002,MS23-P1-003 | —     | —          | —            | 10K      | —    |                                                                    |
| MS23-P1-002 | not-started | p1-provider | InternalAgentProvider: wrap existing orchestrator services behind IAgentProvider    | #694  | api    | feat/ms23-p1-internal-provider | MS23-P1-001                         | MS23-P1-003,MS23-P1-006 | —     | —          | —            | 20K      | —    |                                                                    |
| MS23-P1-003 | not-started | p1-provider | AgentProviderRegistry: register/retrieve providers, aggregate listSessions          | #694  | api    | feat/ms23-p1-registry          | MS23-P1-001,MS23-P1-002             | MS23-P1-004,MS23-P1-005 | —     | —          | —            | 15K      | —    |                                                                    |
| MS23-P1-004 | not-started | p1-provider | AgentProviderConfig CRUD API (/api/agent-providers)                                 | #694  | api    | feat/ms23-p1-provider-api      | MS23-P1-003                         | MS23-P1-006             | —     | —          | —            | 15K      | —    |                                                                    |
| MS23-P1-005 | not-started | p1-provider | Mission Control proxy API (/api/mission-control/\*): SSE proxying, audit log writes | #694  | api    | feat/ms23-p1-proxy             | MS23-P1-003                         | MS23-P1-006,MS23-P2-001 | —     | —          | —            | 30K      | —    | Aggregates all providers; most complex P1 task                     |
| MS23-P1-006 | not-started | p1-provider | Unit tests: registry, proxy service, internal provider                              | #694  | api    | test/ms23-p1                   | MS23-P1-002,MS23-P1-004,MS23-P1-005 | MS23-P2-001             | —     | —          | —            | 20K      | —    | Phase 1 gate: unified /sessions returns internal provider sessions |

### Phase 2 — Mission Control UI

| id          | status      | milestone | description                                                                         | issue | repo | branch                | depends_on                                                              | blocks                  | agent | started_at | completed_at | estimate | used | notes                                 |
| ----------- | ----------- | --------- | ----------------------------------------------------------------------------------- | ----- | ---- | --------------------- | ----------------------------------------------------------------------- | ----------------------- | ----- | ---------- | ------------ | -------- | ---- | ------------------------------------- |
| MS23-P2-001 | not-started | p2-ui     | /mission-control page route + layout shell (sidebar + panel grid)                   | #695  | web  | feat/ms23-p2-page     | MS23-P1-005,MS23-P1-006                                                 | MS23-P2-002,MS23-P2-005 | —     | —          | —            | 10K      | —    |                                       |
| MS23-P2-002 | not-started | p2-ui     | OrchestratorPanel component: SSE message stream, chat display, role-tagged messages | #695  | web  | feat/ms23-p2-panel    | MS23-P2-001                                                             | MS23-P2-003,MS23-P2-004 | —     | —          | —            | 25K      | —    |                                       |
| MS23-P2-003 | not-started | p2-ui     | BargeInInput component: inject message, pause-before-send checkbox                  | #695  | web  | feat/ms23-p2-barge    | MS23-P2-002                                                             | MS23-P2-009             | —     | —          | —            | 15K      | —    |                                       |
| MS23-P2-004 | not-started | p2-ui     | Panel operator controls: pause, resume, graceful kill, hard kill buttons            | #695  | web  | feat/ms23-p2-controls | MS23-P2-002                                                             | MS23-P2-009             | —     | —          | —            | 15K      | —    |                                       |
| MS23-P2-005 | not-started | p2-ui     | GlobalAgentRoster sidebar: tree view, per-agent kill buttons                        | #695  | web  | feat/ms23-p2-roster   | MS23-P2-001                                                             | MS23-P2-006,MS23-P2-009 | —     | —          | —            | 20K      | —    |                                       |
| MS23-P2-006 | not-started | p2-ui     | KillAllDialog: confirmation modal with scope selector (internal / all providers)    | #695  | web  | feat/ms23-p2-killall  | MS23-P2-005                                                             | MS23-P2-009             | —     | —          | —            | 10K      | —    | Requires typing "KILL ALL" to confirm |
| MS23-P2-007 | not-started | p2-ui     | AuditLogDrawer: paginated audit history slide-in drawer                             | #695  | web  | feat/ms23-p2-audit    | MS23-P2-001                                                             | MS23-P2-009             | —     | —          | —            | 15K      | —    |                                       |
| MS23-P2-008 | not-started | p2-ui     | Panel grid: responsive layout, add/remove panels, full-screen expand                | #695  | web  | feat/ms23-p2-grid     | MS23-P2-002                                                             | MS23-P2-009             | —     | —          | —            | 20K      | —    |                                       |
| MS23-P2-009 | not-started | p2-ui     | Frontend tests: vitest unit + Playwright E2E for mission control page               | #695  | web  | test/ms23-p2          | MS23-P2-003,MS23-P2-004,MS23-P2-005,MS23-P2-006,MS23-P2-007,MS23-P2-008 | MS23-P3-001             | —     | —          | —            | 25K      | —    | Phase 2 gate                          |

### Phase 3 — OpenClaw Provider Adapter

| id          | status      | milestone   | description                                                                      | issue | repo    | branch                         | depends_on  | blocks      | agent | started_at | completed_at | estimate | used | notes                                               |
| ----------- | ----------- | ----------- | -------------------------------------------------------------------------------- | ----- | ------- | ------------------------------ | ----------- | ----------- | ----- | ---------- | ------------ | -------- | ---- | --------------------------------------------------- |
| MS23-P3-001 | not-started | p3-openclaw | OpenClawProvider: implement IAgentProvider against OpenClaw REST API             | #696  | api     | feat/ms23-p3-openclaw-provider | MS23-P2-009 | MS23-P3-002 | —     | —          | —            | 25K      | —    | Verify barge-in protocol (see PRD open question #3) |
| MS23-P3-002 | not-started | p3-openclaw | OpenClaw session polling / SSE bridge: translate OpenClaw events to AgentMessage | #696  | api     | feat/ms23-p3-openclaw-bridge   | MS23-P3-001 | MS23-P3-003 | —     | —          | —            | 20K      | —    |                                                     |
| MS23-P3-003 | not-started | p3-openclaw | Provider config UI: register OpenClaw gateway (URL + API token) in Settings      | #696  | web     | feat/ms23-p3-config-ui         | MS23-P3-002 | MS23-P3-004 | —     | —          | —            | 15K      | —    |                                                     |
| MS23-P3-004 | not-started | p3-openclaw | E2E test: OpenClaw provider registered → sessions appear in Mission Control      | #696  | api+web | test/ms23-p3                   | MS23-P3-003 | MS23-P4-001 | —     | —          | —            | 20K      | —    | Phase 3 gate                                        |

### Phase 4 — Verification & Release

| id          | status      | milestone  | description                                                                             | issue | repo  | branch | depends_on  | blocks      | agent | started_at | completed_at | estimate | used | notes |
| ----------- | ----------- | ---------- | --------------------------------------------------------------------------------------- | ----- | ----- | ------ | ----------- | ----------- | ----- | ---------- | ------------ | -------- | ---- | ----- |
| MS23-P4-001 | not-started | p4-release | Full QA: pnpm turbo lint typecheck test — all green                                     | #697  | stack | —      | MS23-P3-004 | MS23-P4-002 | —     | —          | —            | 10K      | —    |       |
| MS23-P4-002 | not-started | p4-release | Security review: auth on all new endpoints, audit log integrity, barge-in rate limiting | #697  | api   | —      | MS23-P4-001 | MS23-P4-003 | —     | —          | —            | 10K      | —    |       |
| MS23-P4-003 | not-started | p4-release | Deploy to production (mosaic.woltje.com), smoke test with live agents                   | #697  | stack | —      | MS23-P4-002 | MS23-P4-004 | —     | —          | —            | 5K       | —    |       |
| MS23-P4-004 | not-started | p4-release | Update ROADMAP.md + CHANGELOG.md, tag v0.0.23                                           | #697  | stack | —      | MS23-P4-003 | —           | —     | —          | —            | 3K       | —    |       |

### MS23 Budget Summary

| Phase                        | Tasks  | Estimate  |
| ---------------------------- | ------ | --------- |
| Phase 0 — Backend Core       | 6      | ~105K     |
| Phase 1 — Provider Interface | 6      | ~110K     |
| Phase 2 — Mission Control UI | 9      | ~155K     |
| Phase 3 — OpenClaw Adapter   | 4      | ~80K      |
| Phase 4 — Verification       | 4      | ~28K      |
| **Total**                    | **29** | **~478K** |

Recommended dispatch: Codex for Phase 2 UI + routine API tasks; Sonnet for complex streaming logic (P0-003, P1-005, P3-002).
