You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Work must align with the existing codebase (see assessment in parent conversation / technical design §2):
Server: Bun + TypeScript, bun:sqlite, single long-lived apps/server/src/index.ts HTTP router, WebSocket on /stream.
Client: Vue 3 (Composition API only — no Pinia, no Vue Router), Vite, Tailwind, theme via CSS variables (--theme-*) and useThemes.
Primary data path today: Claude Code hooks → POST /events → SQLite events → WSinitial + event → timeline UI.
Orchestration path (product extension): REST under /api/orchestration/* + WS message type orchestration_state + optional synthetic rows in events with source_app = orchestration.
This PRD does not prescribe new frameworks; it extends what exists.
2. Product vision
Provide a control plane to define teams and tasks, coordinate orchestrator ↔ agent messaging, run parallel agent workloads behind an execution-environment abstraction, and observe status transitions, messages, and metrics in real time—integrated with the existing hook-event observability surface.
3. Target users
Persona
Outcome
Platform / reliability engineer
Healthy runs, metrics, failures visible in timeline + orchestration views
Agents: create per team, list, patch; track current_task_id when assigned.
FR-3
Tasks: create, list by team (optional status filter), get, patch; statuses include at least backlog, queued, running, done, failed, blocked.
FR-4
Messages: create with direction (orchestrator_to_agent, agent_to_orchestrator, broadcast), list by team, ordered by time.
FR-5
Metrics: append samples per team (and optionally per agent); list recent samples.
FR-6
Engine: start/stop per team; assign queued work to idle agents; emit lifecycle signals (persisted + broadcast).
FR-7
Execution environment: pluggable interface; simulated implementation acceptable for MVP; must not block future real runner.
FR-8
Observability: WebSocket delivers orchestration_state after connect and after state-changing operations; orchestration may emit HookEvent rows for source_app = orchestration.
FR-9
Demo: HTTP action creates two teams × four agents + representative tasks.
6. Non-functional requirements
ID
Requirement
NFR-1
Modularity: orchestration logic lives in apps/server/src/orchestration/; avoid growing index.ts without bound; client composables per concern.
NFR-2
Reuse: New UI uses existing theme tokens and patterns (header, cards, spacing) — no parallel design system.
NFR-3
No throwaway UI: Orchestration screens must read/write real APIs and reflect WebSocket state (no static demo pages).
NFR-4
Realtime: Orchestration mutations visible without full page reload under normal localhost conditions.
NFR-5
Security (MVP): No auth; document production need for authn/z and tenant isolation.