chore(orchestrator): bootstrap MS20 Site Stabilization mission

PRD updated with FR-020 (site stabilization scope) and 6 new assumptions.
Mission manifest, scratchpad, and TASKS.md created with 13 tasks across
workspace context, orchestrator connectivity, missing APIs, and UI gaps.
Milestone MS20-SiteStabilization created. Issue #534 tracks the epic.

Estimated total: ~215K tokens across 4 execution waves.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 04:09:05 -06:00
parent 11f22a7e96
commit 44062e6882
4 changed files with 223 additions and 112 deletions

View File

@@ -1,51 +1,53 @@
# Mission Manifest — MS19 Chat & Terminal System
# Mission Manifest — MS20 Site Stabilization
> Persistent document tracking full mission scope, status, and session history.
> Updated by the orchestrator at each phase transition and milestone completion.
## Mission
**ID:** ms19-chat-terminal-20260225
**Statement:** Implement MS19 (Chat & Terminal System) — real terminal with PTY backend, chat streaming, master chat polish, project-level orchestrator chat, and agent output integration
**Phase:** Completion
**Current Milestone:** MS19-ChatTerminal
**Progress:** 1 / 1 milestones
**Status:** completed
**Last Updated:** 2026-02-26T04:20Z
**ID:** ms20-site-stabilization-20260227
**Statement:** Fix runtime bugs, missing API endpoints, orchestrator connectivity, and feature gaps discovered during live site testing at mosaic.woltje.com
**Phase:** Planning
**Current Milestone:** MS20-SiteStabilization
**Progress:** 0 / 1 milestones
**Status:** active
**Last Updated:** 2026-02-27T05:30Z
## Success Criteria
1. Terminal panel has real xterm.js with PTY backend via WebSocket — **DONE** (PR #518)
2. Terminal supports multiple named sessions (create/close/rename tabs) — **DONE** (PR #520)
3. Terminal sessions persist in PostgreSQL and recover on reconnect — **DONE** (PR #517)
4. Chat streaming renders tokens in real-time via SSE — **DONE** (PR #516)
5. Master chat sidebar accessible from any page (Cmd+Shift+J / Cmd+K) — **DONE** (PR #519)
6. Master chat supports model selection, temperature, conversation management — **DONE** (PR #519)
7. Project-level chat can trigger orchestrator actions (/spawn, /status, /jobs) — **DONE** (PR #521)
8. Agent output from orchestrator viewable in terminal tabs — **DONE** (PR #522)
9. All features support all 5 themes (Dark, Light, Nord, Dracula, Solarized) — **DONE** (CSS variables)
10. Lint, typecheck, and tests pass — **DONE** (1441 web + 3303 API = 4744 tests)
11. Deployed and smoke-tested at mosaic.woltje.com — **DONE** (CI #635 green, web image sha:7165e7a deployed)
1. Domains page: can create and list domains without workspace errors
2. Projects page: can create new projects without workspace errors
3. Personalities page: full CRUD works with proper dark mode theming
4. User preferences endpoint (`/users/me/preferences`) returns data
5. Credentials page: can add, view credentials (not just disabled stub)
6. Orchestrator proxy endpoints return real data (no 502)
7. Orchestrator WebSocket connects successfully
8. Dashboard Agent Status, Task Progress, Orchestrator Events widgets work
9. Terminal has dedicated `/terminal` page route
10. favicon.ico serves correctly (no 404)
11. `useWorkspaceId` warning resolved — workspace ID persists in localStorage
12. All 5 themes render correctly on all affected pages
13. Lint, typecheck, and tests pass
14. Deployed and verified at mosaic.woltje.com
## Existing Infrastructure
Key components already built that MS19 builds upon:
Key components already built that MS20 builds upon:
| Component | Status | Location |
| --------------------------------- | ------------------- | ------------------------------------ |
| ChatOverlay + ConversationSidebar | ~95% complete | `apps/web/src/components/chat/` |
| LLM Controller with SSE | Working | `apps/api/src/llm/` |
| WebSocket Gateway | Production | `apps/api/src/websocket/` |
| TerminalPanel UI (mock) | UI-only, no backend | `apps/web/src/components/terminal/` |
| Orchestrator proxy routes | Working | `apps/web/src/app/api/orchestrator/` |
| Speech Gateway (pattern ref) | Production | `apps/api/src/speech/` |
| Ideas API (chat persistence) | Working | `apps/api/src/ideas/` |
| Component | Status | Location |
| ------------------------- | --------------- | ----------------------------------------------- |
| WorkspaceGuard | Working | `apps/api/src/common/guards/workspace.guard.ts` |
| Auto-detect workspace ID | Working (reads) | `apps/web/src/lib/api/client.ts` |
| Credentials API backend | Built (M7) | `apps/api/src/credentials/` |
| Orchestrator proxy routes | Built (MS19) | `apps/web/src/app/api/orchestrator/` |
| Terminal components | Built (MS19) | `apps/web/src/components/terminal/` |
| Theme system | Working (MS18) | `apps/web/src/lib/themes/` |
## Milestones
| # | ID | Name | Status | Branch | Issue | Started | Completed |
| --- | ---- | ---------------------- | --------- | ------------------------- | ------------------------ | ---------- | ---------- |
| 1 | MS19 | Chat & Terminal System | completed | per-task feature branches | #508,#509,#510,#511,#512 | 2026-02-25 | 2026-02-25 |
| # | ID | Name | Status | Branch | Issue | Started | Completed |
| --- | ---- | ------------------ | ----------- | ------------------------- | ----- | ---------- | --------- |
| 1 | MS20 | Site Stabilization | not-started | per-task feature branches | TBD | 2026-02-27 | |
## Deployment
@@ -57,32 +59,16 @@ Key components already built that MS19 builds upon:
| Metric | Value |
| ------ | ----------------- |
| Budget | ~300K (estimated) |
| Used | ~220K |
| Budget | ~400K (estimated) |
| Used | 0 |
| Mode | normal |
## Session History
| Session | Runtime | Started | Duration | Ended Reason | Last Task |
| ------- | --------------- | ----------------- | -------- | ------------ | ------------------------------------------------- |
| S1 | Claude Opus 4.6 | 2026-02-25T20:00Z | ~1h | context | Planning (PLAN-001) |
| S2 | Claude Opus 4.6 | 2026-02-25T21:00Z | ~2h | context | Wave 1+2 (5 tasks, PRs #515-518) |
| S3 | Claude Opus 4.6 | 2026-02-25T23:00Z | ~1.5h | context | Wave 3+4 (TERM-004, CHAT-002, ORCH-001, ORCH-002) |
| S4 | Claude Opus 4.6 | 2026-02-26T04:00Z | ~30m | completed | VER-001, DOC-001, VER-002 — mission complete |
## PRs Merged
| PR | Commit | Task | Description |
| ---- | ------- | -------- | ---------------------------------------- |
| #515 | 6290fc3 | TERM-001 | Terminal WebSocket gateway & PTY service |
| #516 | 7de0e73 | CHAT-001 | SSE chat streaming |
| #517 | 8128eb7 | TERM-002 | Terminal session persistence |
| #518 | 417c6ab | TERM-003 | xterm.js integration |
| #519 | 13aa52a | CHAT-002 | Master chat polish |
| #520 | 859dcfc | TERM-004 | Terminal tab management |
| #521 | b110c46 | ORCH-001 | Orchestrator command system |
| #522 | 9b2520c | ORCH-002 | Agent output terminal tabs |
| Session | Runtime | Started | Duration | Ended Reason | Last Task |
| ------- | --------------- | ----------------- | -------- | ------------ | --------- |
| S1 | Claude Opus 4.6 | 2026-02-27T05:30Z | | | Planning |
## Scratchpad
Path: `docs/scratchpads/ms19-chat-terminal-20260225.md`
Path: `docs/scratchpads/ms20-site-stabilization-20260227.md`