docs(plans): expand automation foundation for owner cockpit vision

Add epics 10–12 (plans UI, completion artifacts, ops copilot), worker
draft-PR and live E2E verify tasks, and phase A–E execution order after
A1 gap review.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Randall Stillwell 2026-08-12 14:11:20 -05:00
parent 35def387ae
commit d1b2b9695e
18 changed files with 868 additions and 44 deletions

View file

@ -7,7 +7,7 @@ status: in_progress
priority: P1
tenant_id: global
cursor_epic_id: null
updated_at: "2026-08-03"
updated_at: "2026-08-12"
---
# Epic objective
@ -18,6 +18,12 @@ Role prompt = `.cursor/agents/role-*.md` + brief path. Model endpoint points at
**Parallel implementers:** When orchestrator dispatches N implementers to the same Mac inference host, prefer a batching-capable MLX server (**mlx-openai-server**) over `mlx_lm.server` alone. Document chosen server + port in workspace provider alias (`qwen-coder-mlx`).
## Status note (2026-08-12)
- Tool loop + checkpoints are **implemented in code**; task files marked done.
- **Gap:** worker does **not** yet open draft PRs via forge adapter (blocks clean Epic 8 dogfood).
- **A1 live E2E** (Go → unattended job on real Redis/Coolify) needs explicit operator verify: [Task-worker-live-e2e-dogfood](./Task-worker-live-e2e-dogfood.md).
## In scope / out of scope
**In scope**
@ -26,6 +32,7 @@ Role prompt = `.cursor/agents/role-*.md` + brief path. Model endpoint points at
- `pnpm lint && pnpm test` in allowlisted commands.
- Branch + PR draft output (forge adapter from Epic 3).
- Checkpoint/resume and operator mid-build notes (Autensa benchmark — see tasks below).
- Live deploy dogfood checklist.
**Out of scope**
@ -39,18 +46,21 @@ Role prompt = `.cursor/agents/role-*.md` + brief path. Model endpoint points at
## Blocks
- Epic 8 (meaningful PR webhook dogfood).
- Epic 8 (meaningful PR webhook dogfood) until draft PR task lands.
## Acceptance criteria
- [ ] One brief from `.convoys/` completes unattended on connected repo.
- [ ] `complete_task` includes model alias + token totals.
- [ ] Crashed worker can resume from checkpoint (follow-on task).
- [ ] One brief from `.convoys/` completes unattended on connected repo (see live E2E task).
- [x] Checkpoint resume after kill (code + task done).
- [ ] Draft PR opened on implementer success.
- [ ] `complete_task` includes model alias + token totals on live run.
## Tasks
| Task | Link | Status |
|------|------|--------|
| Minimal tool loop + worktree | [Task-worker-minimal-tool-loop](./Task-worker-minimal-tool-loop.md) | ready |
| Checkpoint & crash recovery | [Task-worker-checkpoint-resume](./Task-worker-checkpoint-resume.md) | draft |
| Minimal tool loop + worktree | [Task-worker-minimal-tool-loop](./Task-worker-minimal-tool-loop.md) | done (code; confirm live via E2E task) |
| Checkpoint & crash recovery | [Task-worker-checkpoint-resume](./Task-worker-checkpoint-resume.md) | done |
| Draft PR via forge | [Task-worker-draft-pr](./Task-worker-draft-pr.md) | **ready** |
| Live E2E dogfood (A1 verify) | [Task-worker-live-e2e-dogfood](./Task-worker-live-e2e-dogfood.md) | **ready** |
| Operator notes mid-build | [Task-worker-operator-notes](./Task-worker-operator-notes.md) | draft |

View file

@ -0,0 +1,65 @@
---
kind: task
slug: worker-draft-pr
title: Worker opens draft PR via forge adapter on implementer success
plan_slug: automation-foundation
epic_slug: apps-worker-v1
status: ready
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
agent_prompt: |
Epic 7 gap: apps/worker never calls the forge adapter to open a PR.
Wire createPullRequest (or equivalent) after a successful implementer
session. Use connected repo from convoy/workspace. Branch naming must
match Epic 8 conventions. claim_task / complete_task this task; run
pnpm lint && pnpm type-check && pnpm test.
---
# Task summary
When an implementer `role_dispatch` job succeeds, open a **draft PR** on the connected forge (GitHub/Forgejo) from the worktree branch, and store PR URL/metadata on the convoy for Mission Control and Epic 8 webhooks.
## Description
Gap check (2026-08-12): `Task-worker-minimal-tool-loop` was marked `done` and checkpoints shipped, but `apps/worker` has **no** forge PR call. Epic 7 acceptance (“branch + PR draft output”) and Epic 8 dogfood both require this.
### Behavior
- After successful implementer session (and before worktree teardown): push branch if needed, call forge adapter `createPullRequest` (draft).
- PR body includes convoy slug, brief id, echodo marker for webhooks (`echodo-convoy: <uuid>`).
- Persist PR url / number on convoy content or `convoy_events` metadata.
- Non-implementer roles skip PR creation.
- Failures: log + mark run notes; do not silently claim success if PR was required.
### Dependencies
- Epic 3 forge adapters
- Worktree + branch from worker tool loop
## Subtasks
- [ ] Resolve `repo_links` for convoy workspace
- [ ] Push worktree branch with stored credentials pattern
- [ ] `createPullRequest` draft via adapter
- [ ] Write PR metadata for Mission Control detail panel
- [ ] Document branch + marker convention in `docs/worker.md`
## Estimation
M
## Acceptance criteria
- [ ] Successful implementer job produces a draft PR URL on a connected test repo
- [ ] PR body contains convoy marker consumable by Epic 8
- [ ] Planning-only roles do not open PRs
- [ ] Mission control detail can show PR link when present
## Links
- Epic: `./Epic-apps-worker-v1.md`
- Blocks: Epic 8 webhook dogfood
- Related: [Task-worker-minimal-tool-loop](./Task-worker-minimal-tool-loop.md)

View file

@ -0,0 +1,61 @@
---
kind: task
slug: worker-live-e2e-dogfood
title: Live E2E dogfood — Go to worker job without Cursor (A1 verify)
plan_slug: automation-foundation
epic_slug: apps-worker-v1
status: ready
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
---
# Task summary
Operator verification checklist: prove Mission Control **Go** → orchestrator enqueue → worker (non-dry-run) completes one implementer brief with model/token metadata — **without** a Cursor coding session for that brief.
## Description
**Phase A1** from the owner vision playbook. Code for the loop and checkpoints exists; this task is the **proof on your deploy** (Coolify / local Redis), not more scaffolding.
Mark this task `done` only when every acceptance criterion below is true in production or a documented staging environment.
### Checklist (operator)
1. `ORCHESTRATOR_DRY_RUN=0`, `WORKER_DRY_RUN=0`, `REDIS_URL` set on orchestrator + worker services
2. Workspace has model aliases + role routes for `role-implementer`
3. Connected repo (or monorepo) reachable from worker
4. Create or reconcile a convoy with an implementer brief
5. Advance to `ready` / trigger dispatch (Gate 1 approve if needed)
6. Worker logs show job pickup + `complete_task` / `role_complete`
7. Settings → Runs shows model alias + tokens for that run
8. (Preferred) Draft PR exists after [Task-worker-draft-pr](./Task-worker-draft-pr.md)
### Not this task
- Building new worker features (use sibling tasks)
- Forge webhooks (Epic 8)
## Subtasks
- [ ] Document exact Coolify/env values used (no secrets in git — names only)
- [ ] Record convoy slug + run id in task notes or convoy_events
- [ ] Confirm dry-run modes still work when Redis missing
## Estimation
S (ops)
## Acceptance criteria
- [ ] One implementer brief completed unattended (no Cursor session for that brief)
- [ ] `agent_runs` row has `model_alias` and token totals
- [ ] Convoy progressed or logged `role_complete` visible in Mission Control detail
- [ ] Orchestrator/worker were not in dry-run for the successful job
## Links
- Epic: `./Epic-apps-worker-v1.md`
- Plan: `../Plan-automation-foundation.md`

View file

@ -4,43 +4,48 @@ slug: fleet-dashboard
title: Fleet dashboard — all connected repos and convoys
plan_slug: automation-foundation
status: draft
priority: P2
priority: P1
tenant_id: global
cursor_epic_id: null
updated_at: "2026-08-03"
updated_at: "2026-08-12"
---
# Epic objective
Top-level **fleet** view: all `convoys-<repo>` workspaces (or connected repos) in one screen. Roll up convoys by status, gate inbox count, active `agent_runs`, recent spend by model alias.
Top-level **fleet** home: all workspaces / connected repos in one screen. Roll up gates needing attention, active convoys and `agent_runs`, recent releases, and (when Epic 11 lands) completion thumbnails.
Live **activity feed** (SSE) from `convoy_events` — Autensa benchmark for operator situational awareness.
This is Phase B of the owner cockpit vision — “what’s happening across my projects since I was last here?”
Answers: “What needs me across all projects?” and “What just happened?”
Live **activity feed** (SSE) from `convoy_events`.
## In scope / out of scope
**In scope**
- Route `/fleet` or home dashboard for operator account.
- Route `/fleet` or authenticated landing dashboard.
- Cross-workspace tRPC (membership-scoped).
- Links into per-repo mission control (Epic 5).
- Cards per workspace/repo: gate count, running convoys, recent `released` / merged.
- Links into per-repo mission control and (later) Plans.
- SSE activity stream (workspace + fleet scope).
- Placeholder slots for completion summaries (Epic 11) without blocking v1.
**Out of scope**
- Multi-tenant fleet across unrelated customers (operator's own repos only for v1).
- Autopilot research/ideation feeds.
- Full Plans tree (Epic 10).
## Dependencies
- Epic 4 (queryable convoy status).
- Epic 5 (gate semantics).
- Epic 7 live dogfood preferred so “running” is meaningful.
## Acceptance criteria
- [ ] Operator with two connected repos sees combined “3 awaiting approval” badge.
- [ ] Operator with two connected repos sees combined “N awaiting approval” badge.
- [ ] New convoy event appears in activity feed without page refresh.
- [ ] Card links into correct workspace mission control.
## Tasks

View file

@ -5,7 +5,7 @@ title: Fleet dashboard — cross-repo convoy rollup
plan_slug: automation-foundation
epic_slug: fleet-dashboard
status: ready
priority: P2
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null

View file

@ -0,0 +1,52 @@
---
kind: epic
slug: ops-copilot
title: Ops copilot — project-aware chat for status and triage
plan_slug: automation-foundation
status: draft
priority: P2
tenant_id: global
cursor_epic_id: null
updated_at: "2026-08-12"
---
# Epic objective
A Submatter chat surface grounded in **workspace convoys, backlog, runs, and events** so an owner can ask “what needs me?”, “what shipped last week?”, or “add a bug for X” without opening Cursor or scanning markdown.
Distinct from gate co-pilot (single-convoy approve assist) and generic `/{ws}/ai` chat.
## In scope / out of scope
**In scope**
- Ops chat route or Mission Control / Fleet panel using `resolveModel` (`ops-copilot` role alias)
- Tools/RAG-lite: query convoy kanban counts, gate inbox, recent events, backlog ready list, run outcomes
- Actions (v1 limited): draft backlog task markdown suggestion, create draft convoy stub, link to Start
- Citations: answers reference convoy slug / task slug
**Out of scope**
- Full IDE agent / code edit loop (worker remains the coder)
- Autopilot research
- Replacing Mission Control buttons for gates (chat can deep-link)
## Dependencies
- Epic 5 gate co-pilot patterns
- Epic 9 fleet data (preferred)
- Epic 10 Plans tRPC (preferred for “what’s next”)
## Acceptance criteria
- [ ] Owner asks “what needs my approval?” and gets gate inbox items with links
- [ ] Owner asks “what’s ready to start?” and gets ready backlog tasks (when Epic 10 shipped)
- [ ] Chat cannot mutate another workspace’s data
## Tasks
| Task | Link | Status |
|------|------|--------|
| Ops copilot context tools | [Task-ops-copilot-context-tools](./Task-ops-copilot-context-tools.md) | ready |
| Ops copilot UI panel | [Task-ops-copilot-ui](./Task-ops-copilot-ui.md) | draft |
| Draft work from chat | [Task-ops-copilot-draft-work](./Task-ops-copilot-draft-work.md) | draft |

View file

@ -0,0 +1,49 @@
---
kind: task
slug: ops-copilot-context-tools
title: Ops copilot — server tools over convoys, backlog, events
plan_slug: automation-foundation
epic_slug: ops-copilot
status: ready
priority: P2
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
---
# Task summary
Implement workspace-scoped tool functions the ops copilot model can call: gate inbox, convoy summary, recent events, ready backlog (if available), recent runs — all filtered by `workspace_id`.
## Description
Pattern after gate co-pilot + AI SDK tools. Register role route `ops-copilot`. No UI yet.
### Tools (v1)
- `list_gate_inbox`
- `get_convoy_summary`
- `list_recent_events`
- `list_ready_backlog` (no-op / empty if tree API missing)
- `list_recent_runs`
## Subtasks
- [ ] Shared zod tool schemas
- [ ] Server implementation with membership checks
- [ ] Seed `ops-copilot` role route
- [ ] Unit tests for workspace isolation
## Estimation
M
## Acceptance criteria
- [ ] Tools refuse cross-workspace ids
- [ ] Gate inbox tool matches Mission Control counts for a fixture workspace
## Links
- Epic: `./Epic-ops-copilot.md`

View file

@ -0,0 +1,48 @@
---
kind: task
slug: ops-copilot-draft-work
title: Ops copilot — draft bug/task or convoy stub from chat
plan_slug: automation-foundation
epic_slug: ops-copilot
status: draft
priority: P2
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
---
# Task summary
From ops chat, allow “file a bug” / “add a task” that creates a **draft** backlog suggestion or draft convoy stub for human confirm — not silent production deploys.
## Description
v1 safest path: generate markdown draft + open Plans/Start confirm UI, or create `draft` convoy with idea text for Gate 1.
Never auto-merge or skip gates.
### Dependencies
- [Task-ops-copilot-ui](./Task-ops-copilot-ui.md)
- Epic 10 Start flow preferred
## Subtasks
- [ ] Tool `draft_backlog_task` or `draft_convoy`
- [ ] Confirm step in UI before persist
- [ ] Audit log entry
## Estimation
M
## Acceptance criteria
- [ ] Draft requires explicit confirm
- [ ] Confirmed draft appears in Plans or Mission Control
- [ ] No gate skipped
## Links
- Epic: `./Epic-ops-copilot.md`

View file

@ -0,0 +1,41 @@
---
kind: task
slug: ops-copilot-ui
title: Ops copilot chat UI on fleet or mission control
plan_slug: automation-foundation
epic_slug: ops-copilot
status: draft
priority: P2
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
---
# Task summary
Chat panel for ops copilot with streaming answers and deep links to convoys / plans / gates.
## Dependencies
- [Task-ops-copilot-context-tools](./Task-ops-copilot-context-tools.md)
- Prefer Epic 9 fleet page as host; fallback Mission Control aside tab
## Subtasks
- [ ] Chat UI component
- [ ] Wire generateText/stream + tools
- [ ] Render links to mission-control / plans routes
## Estimation
M
## Acceptance criteria
- [ ] “What needs me?” returns clickable gate items
- [ ] Panel works on mobile width
## Links
- Epic: `./Epic-ops-copilot.md`

View file

@ -0,0 +1,52 @@
---
kind: epic
slug: owner-completion-artifacts
title: Owner completion packages — summaries, demos, screenshots
plan_slug: automation-foundation
status: draft
priority: P1
tenant_id: global
cursor_epic_id: null
updated_at: "2026-08-12"
---
# Epic objective
When a convoy reaches `merged` / `released` (or a brief completes), produce an **owner-facing completion package**: plain-language summary of what shipped, optional **screenshots or demo clips** for UI work, and a short backend summary when there is no UI — not a code diff.
Serves non-developer operators who need to verify “did it build what I wanted?”
## In scope / out of scope
**In scope**
- Generate summary from convoy events, PR title/body, brief acceptance, and optional agent notes (via `resolveModel` / doc-writer or gate-copilot-style role)
- Artifact storage: screenshot images / short demo URLs attached to convoy (workspace-scoped object storage or forge release assets — pick one, document)
- Mission Control / fleet “Completed” view: card with summary + media
- Heuristic: UI-touching briefs request screenshot capture (Playwright or worker tool) when feasible; backend-only → summary only
**Out of scope**
- Full design QA
- Replacing PR review for engineers
- Autensa-style marketing site research
## Dependencies
- Epic 7 worker (real completions)
- Epic 8 webhooks (merge signal) preferred
- Epic 5 Mission Control detail panel
## Acceptance criteria
- [ ] Released convoy shows owner summary without opening git
- [ ] UI convoy can attach at least one screenshot or demo URL
- [ ] Backend-only convoy shows prose summary, no empty “diff” UI
## Tasks
| Task | Link | Status |
|------|------|--------|
| Completion summary generation | [Task-completion-summary-generator](./Task-completion-summary-generator.md) | ready |
| Artifact attach + gallery UI | [Task-completion-artifact-gallery](./Task-completion-artifact-gallery.md) | draft |
| Optional UI screenshot capture | [Task-completion-screenshot-capture](./Task-completion-screenshot-capture.md) | draft |

View file

@ -0,0 +1,54 @@
---
kind: task
slug: completion-artifact-gallery
title: Attach screenshots/demo URLs to convoy completion package
plan_slug: automation-foundation
epic_slug: owner-completion-artifacts
status: draft
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
---
# Task summary
Allow uploading or linking screenshots and demo URLs on a convoy; show a simple gallery on the completion / detail panel for owner review.
## Description
### Storage
- Prefer workspace-scoped object storage or existing upload path if any; otherwise URL attachments only for v1
- Never store secrets; validate content types (image/*, video links)
### UI
- Mission control detail: “What shipped” media strip
- Fleet completed card thumbnail (optional)
### Dependencies
- [Task-completion-summary-generator](./Task-completion-summary-generator.md)
## Subtasks
- [ ] Schema for `completionArtifacts[]` on convoy content
- [ ] tRPC add/remove artifact
- [ ] Gallery UI
- [ ] Manual upload or paste URL
## Estimation
M
## Acceptance criteria
- [ ] Owner can attach a screenshot URL and see it on the convoy
- [ ] Artifacts are workspace-scoped
- [ ] Removing artifact does not break summary
## Links
- Epic: `./Epic-owner-completion-artifacts.md`

View file

@ -0,0 +1,51 @@
---
kind: task
slug: completion-screenshot-capture
title: Optional automated screenshot capture for UI convoys
plan_slug: automation-foundation
epic_slug: owner-completion-artifacts
status: draft
priority: P2
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
---
# Task summary
For UI-classified convoys, optionally capture one or more screenshots (Playwright or worker browser tool) of a configured preview URL and attach them to the completion package.
## Description
### Behavior
- Convoy/content flag or classification hints UI surface
- Preview URL from convoy metadata or connected repo deploy URL
- Capture on PR open or after merge (configurable)
- Fail soft: summary still works if capture fails
### Dependencies
- [Task-completion-artifact-gallery](./Task-completion-artifact-gallery.md)
- Worker or a small capture job runner
## Subtasks
- [ ] Capture runner (Playwright in worker job or sidecar)
- [ ] Wire attach to artifacts
- [ ] Opt-in per convoy
## Estimation
L
## Acceptance criteria
- [ ] Opt-in UI convoy gets ≥1 screenshot attached after successful capture
- [ ] Capture failure logs event and does not block `released`
- [ ] Backend-only convoys skip capture by default
## Links
- Epic: `./Epic-owner-completion-artifacts.md`

View file

@ -0,0 +1,48 @@
---
kind: task
slug: completion-summary-generator
title: Generate plain-language completion summary for a convoy
plan_slug: automation-foundation
epic_slug: owner-completion-artifacts
status: ready
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
---
# Task summary
On convoy transition to `merged` or `released` (or manual “Generate summary”), produce a short owner-facing summary stored on the convoy and shown in Mission Control — no code diff.
## Description
Use `resolveModel` with a dedicated role alias (e.g. `role-doc-writer` or `completion-summarizer`) and context: success metric, briefs, recent `convoy_events`, PR title if present.
### Output
- 3–8 sentences: what changed for the user/operator, what’s left, risks
- Persist on convoy content `completionSummary` + `completionSummaryAt`
- tRPC `convoys.getCompletion` / include in `convoys.get`
## Subtasks
- [ ] Zod fields on convoy content
- [ ] Generator service + role route seed
- [ ] Trigger on transition and manual regenerate
- [ ] Mission control detail section
## Estimation
M
## Acceptance criteria
- [ ] After merge/released, summary appears without git access
- [ ] Regenerating updates text and timestamp
- [ ] No file diffs in the owner-facing panel
## Links
- Epic: `./Epic-owner-completion-artifacts.md`

View file

@ -0,0 +1,62 @@
---
kind: epic
slug: plans-roadmap-ui
title: Plans roadmap UI — tree, status, Start → convoy
plan_slug: automation-foundation
status: draft
priority: P1
tenant_id: global
cursor_epic_id: null
updated_at: "2026-08-12"
---
# Epic objective
Owner-facing **roadmap browser** for `markdown_backlog_items` (imported from `plans/`): Plan → Epic → Task tree with status, detail, and **Start** that creates a Mission Control convoy from a ready task — without reading the git tree in the IDE.
This is the “dive into a repo and see upcoming work” slice of the owner cockpit vision. Distinct from Mission Control (convoys) and Fleet (cross-repo attention).
## In scope / out of scope
**In scope**
- Route `/{workspaceSlug}/plans` (icon-rail entry)
- tRPC list/tree/get for backlog items (workspace-scoped)
- Status filters (`ready`, `in_progress`, `done`, …)
- Task detail drawer: title, body summary, status, workflow prompt (reuse backlog tRPC)
- **Start** on `ready` tasks → `create_convoy` (or tRPC equivalent) prefilled from task
- Link out to `repo_path` / file path for power users
- Optional simple milestone strip (epics as milestones) — v1 can be hierarchical list only
**Out of scope**
- Replacing git as SoT for plan markdown (import remains)
- Autopilot ideation
- Timeline Gantt (follow-on if needed)
- Fleet cross-workspace (Epic 9)
## Dependencies
- Markdown importer + `markdown_backlog_items` (shipped)
- Epic 4 convoy create (shipped)
- Epic 5 Mission Control (shipped)
## Blocks
- Ops copilot “what’s next?” grounded answers (Epic 12)
- Owner Start-from-UI without Cursor
## Acceptance criteria
- [ ] Operator sees Plan-automation-foundation tree after import without opening git
- [ ] Filter “ready” shows only ready tasks
- [ ] Start on a ready task creates a draft convoy visible on Mission Control
- [ ] Non-members cannot read another workspace’s backlog
## Tasks
| Task | Link | Status |
|------|------|--------|
| tRPC backlog tree + list | [Task-trpc-backlog-tree](./Task-trpc-backlog-tree.md) | ready |
| Plans page UI | [Task-plans-roadmap-page](./Task-plans-roadmap-page.md) | draft |
| Start task → convoy | [Task-start-convoy-from-task](./Task-start-convoy-from-task.md) | draft |

View file

@ -0,0 +1,55 @@
---
kind: task
slug: plans-roadmap-page
title: Plans roadmap page — tree, filters, detail drawer
plan_slug: automation-foundation
epic_slug: plans-roadmap-ui
status: draft
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
---
# Task summary
Ship `/{workspaceSlug}/plans` with Plan → Epic → Task navigation, status filters, and a detail drawer (summary + workflow prompt preview).
## Description
Owner cockpit: see upcoming and ready work without opening git. Add icon-rail entry **Plans** (or Roadmap).
### UI
- Left/main: hierarchical list or accordion
- Status chips / filter bar
- Detail: title, status, priority, truncated body, effective workflow prompt (existing `getWorkflowPrompt`)
- Empty state: “Run markdown backlog import” with short docs link
- Epics can render as **milestone** labels in the tree (no full Gantt required)
### Dependencies
- [Task-trpc-backlog-tree](./Task-trpc-backlog-tree.md)
## Subtasks
- [ ] Route + icon-rail
- [ ] Tree component wired to tRPC
- [ ] Detail drawer
- [ ] Mobile-usable layout
## Estimation
L
## Acceptance criteria
- [ ] Operator can browse imported plan without git
- [ ] Selecting a task shows detail + prompt source badge
- [ ] Filter ready works end-to-end
## Links
- Epic: `./Epic-plans-roadmap-ui.md`
- Related: [Task-workflow-prompt-task-detail-ui](../../Plan-agent-coordination/Epic-task-as-runnable-unit/Task-workflow-prompt-task-detail-ui.md)

View file

@ -0,0 +1,55 @@
---
kind: task
slug: start-convoy-from-task
title: Start — create convoy from ready backlog task
plan_slug: automation-foundation
epic_slug: plans-roadmap-ui
status: draft
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
---
# Task summary
From the Plans UI, **Start** on a `ready` (or `draft` with confirm) task creates a Mission Control convoy prefilled from the task, then navigates to mission control with that convoy selected.
## Description
Bridges roadmap → execution without Cursor.
### Behavior
- Button visible on eligible tasks
- Calls tRPC wrapping `create_convoy` semantics: slug derived from task slug, idea markdown from task body, success metric from task title/AC summary
- Store link `backlogItemId` or `repo_path` on convoy content metadata
- Navigate to `/{ws}/mission-control` with convoy selected
- Idempotency: if open convoy already linked to this task, focus it instead of duplicating
### Dependencies
- [Task-plans-roadmap-page](./Task-plans-roadmap-page.md)
- Epic 4 / convoys.create
## Subtasks
- [ ] tRPC `backlog.startConvoy` or `convoys.createFromBacklogItem`
- [ ] Start button + confirm dialog
- [ ] Metadata link task ↔ convoy
- [ ] Navigation + toast
## Estimation
M
## Acceptance criteria
- [ ] Start on ready task creates draft convoy on kanban
- [ ] Second Start focuses existing linked convoy
- [ ] Non-ready tasks require explicit confirm or are disabled
## Links
- Epic: `./Epic-plans-roadmap-ui.md`

View file

@ -0,0 +1,55 @@
---
kind: task
slug: trpc-backlog-tree
title: tRPC backlog.list / tree / get for markdown_backlog_items
plan_slug: automation-foundation
epic_slug: plans-roadmap-ui
status: ready
priority: P1
tenant_id: global
owner: unassigned
cursor_todo_id: null
updated_at: "2026-08-12"
agent_prompt: |
Extend apps/web backlog router: list/tree/get for markdown_backlog_items.
Always filter by workspace_id. Zod inputs. No Plans UI yet — API only.
Reuse existing schema. claim_task / complete_task; lint + type-check + test.
---
# Task summary
Add workspace-scoped tRPC procedures to list the Plan → Epic → Task hierarchy from `markdown_backlog_items` with status filters — the data layer for the Plans roadmap UI.
## Description
Today `backlog` router only handles workflow prompts. Add:
- `backlog.tree` — nested plans → epics → tasks (or flat list + client nest by `kind` / parent)
- `backlog.list` — flat with filters: `kind`, `status`, `planSlug`, `epicSlug`
- `backlog.get` — single item by id or slug keys
All queries must filter `workspace_id` from session membership.
Document that rows come from `pnpm --filter @tasks/database import:markdown-backlog`.
## Subtasks
- [ ] Zod input schemas in shared or router-local
- [ ] Procedures on `backlog` router
- [ ] Unit/integration coverage for workspace isolation
- [ ] Empty tree when import not run (friendly empty state data)
## Estimation
M
## Acceptance criteria
- [ ] Member of workspace A cannot fetch workspace B items
- [ ] Tree returns automation-foundation plan with nested epics/tasks after import
- [ ] Status filter `ready` excludes `done`
## Links
- Epic: `./Epic-plans-roadmap-ui.md`
- Related: `apps/web/server/routers/backlog.ts`

View file

@ -6,7 +6,7 @@ status: ready
priority: P1
tenant_id: global
cursor_plan_id: null
updated_at: "2026-08-03"
updated_at: "2026-08-12"
agent_prompt: |
You are implementing Echodo's automation foundation. Read docs/adr-model-routing.md
before touching model routing code. This repo uses pnpm, Drizzle, tRPC, zod in
@ -26,9 +26,31 @@ agent_prompt: |
# Plan overview
Echodo is evolving from a multitenant task app with MCP coordination into **mission control** for an agent pipeline: fleet view, human gates, per-role model routing, and (later) a built-in orchestrator and worker. This plan delivers the **first concrete slice** — the model provider registry and role routing system defined in [docs/adr-model-routing.md](../../docs/adr-model-routing.md).
Echodo / **Submatter** is evolving from a multitenant task app with MCP coordination into an **owner cockpit** for agent-built personal projects: fleet home, roadmap + Start, mission-control gates, first-party worker (leave Cursor for convoy builds), forge PRs, completion summaries/demos, and ops copilot.
Epics 1–6 and the mission-control UI are **shipped**. Epic 7 (worker) is **in progress** — skeleton exists in `apps/worker`. Epics 8–9 remain draft with decomposed tasks. Follow-on tasks from the [Autensa benchmark](#autensa-benchmark-2026-08) are injected into epics 1, 3, 5, 6, 7, 8, and 9 (concepts only — no OpenClaw dependency).
Epics **1–6 shipped**. Epic **7 in progress** (tool loop + checkpoints in code; draft PR + live E2E verify still open). Epics **8–9** (webhooks, fleet) and **10–12** (plans UI, completion artifacts, ops copilot) carry the full owner vision. Autensa/Builderz-style ideas are benchmarks only — no OpenClaw dependency.
## Owner vision phases
| Phase | Goal | Epics |
|-------|------|-------|
| **A** Engine without Cursor | Go → worker → PR → gates | 7 → 8 (+ draft PR, live E2E) |
| **B** Fleet attention home | All projects, needs-you, activity | 9 |
| **C** Roadmap + Start | Plans tree, Start → convoy | 10 |
| **D** Owner review | Summaries, screenshots/demos | 11 |
| **E** Ops chat | Status / triage / draft work | 12 |
### A1 status check (2026-08-12)
| Claim | Reality in repo |
|-------|-----------------|
| Worker tool loop exists | Yes — `apps/worker` dequeue, session, worktree, claim/complete |
| Checkpoints | Yes — task done, `worker_checkpoints` path documented |
| Live Go → unattended job on your deploy | **Operator-verify** — [Task-worker-live-e2e-dogfood](./Epic-apps-worker-v1/Task-worker-live-e2e-dogfood.md) |
| Draft PR from worker | **Missing** — no forge PR call in worker; [Task-worker-draft-pr](./Epic-apps-worker-v1/Task-worker-draft-pr.md) |
| Minimal-tool-loop marked `done` | Code landed; several AC checkboxes in the task file still unchecked — treat live E2E + draft PR as the real close-out |
**If you “finished A1”** meaning services run and a job completed: mark criteria on the live E2E task and keep going. **If you only shipped code:** run the live E2E checklist before calling Phase A done.
## Dogfooding the agent pipeline
@ -114,9 +136,9 @@ Start with **`Task-shared-schemas-resolve-model`** — no DB migration, pure `pa
**In scope (full plan)**
- Nine epics — see [Epic roadmap](#epic-roadmap-complete) below.
- Epics 1–6 **done**; Epic 7 **in progress**; Epics 8–9 **draft** with bead-scale tasks.
- [Autensa benchmark](#autensa-benchmark-2026-08) follow-ons: reliability (checkpoints, auto-nudge), operator UX (activity feed, DAG, PR recovery), cost caps.
- Twelve epics — see [Epic roadmap](#epic-roadmap-complete) below (engine + owner cockpit).
- Epics 1–6 **done**; Epic 7 **in progress**; Epics 8–12 **draft/ready** with bead-scale tasks.
- [Autensa benchmark](#autensa-benchmark-2026-08) follow-ons remain mapped under 1, 3, 5–9.
- ADR at `docs/adr-model-routing.md`.
**Out of scope (separate future plans)**
@ -125,6 +147,7 @@ Start with **`Task-shared-schemas-resolve-model`** — no DB migration, pure `pa
- Agent-pipeline Phase 4 drift/rollup workers (replace GHA cron).
- LiteLLM deployment guide (operators use OpenAI-compatible alias).
- Symphony adoption.
- Autensa research → swipe ideation.
## Cross-team collaborators
@ -134,7 +157,7 @@ Start with **`Task-shared-schemas-resolve-model`** — no DB migration, pure `pa
## Epic roadmap (complete)
Sequential order with parallel opportunities noted. **Current focus: Epic 7** (worker end-to-end dogfood), then Epic 8 → 9. Follow-on tasks on done epics can run in parallel when they do not block the critical path.
**Current focus: close Epic 7** (draft PR + live E2E), then **Epic 8 → 9 → 10 → 11 → 12**. Follow-ons on done epics can run in parallel when they do not block the critical path.
```mermaid
flowchart LR
@ -147,6 +170,9 @@ flowchart LR
E7[7 Worker v1]
E8[8 Forge webhooks]
E9[9 Fleet dashboard]
E10[10 Plans roadmap UI]
E11[11 Completion artifacts]
E12[12 Ops copilot]
E1 --> E6
E1 --> E7
@ -159,19 +185,27 @@ flowchart LR
E7 --> E8
E5 --> E9
E4 --> E9
E4 --> E10
E5 --> E10
E8 --> E11
E9 --> E12
E10 --> E12
```
| # | Epic | Status | Delivers | Depends on |
|---|------|--------|----------|------------|
| 1 | [Model provider registry](./Epic-model-provider-registry/Epic-model-provider-registry.md) | done (+1 follow-on) | `resolveModel()`, Settings AI pages, run model logging; cost caps task | — |
| 2 | [Pipeline convoy scaffolding](./Epic-pipeline-convoy-scaffolding/Epic-pipeline-convoy-scaffolding.md) | done | `.convoys/`, `log-convoy-event.sh`, `convoy-planning.mdc` — dogfood metrics | — (parallel with 1) |
| 3 | [Connected repos](./Epic-connected-repos/Epic-connected-repos.md) | done (+1 follow-on) | `repo_links` table, paste URL, forge adapters; repo setup preflight | — |
| 4 | [Convoy lifecycle MCP](./Epic-convoy-lifecycle-mcp/Epic-convoy-lifecycle-mcp.md) | done | `create_convoy`, `transition_convoy_status`, state machine §7, `convoy_events` | 2, 3 |
| 5 | [Mission control gates UI](./Epic-mission-control-gates-ui/Epic-mission-control-gates-ui.md) | done (+2 follow-ons) | Kanban, gate inbox, co-pilot; DAG viz + automation tiers | 4 |
| 6 | [Orchestrator](./Epic-apps-orchestrator/Epic-apps-orchestrator.md) | done (+1 follow-on) | `apps/orchestrator`, Redis queue, role dispatch; auto-nudge | 1, 3, 4 |
| 7 | [Worker v1](./Epic-apps-worker-v1/Epic-apps-worker-v1.md) | **in progress** (3 tasks) | Tool loop, checkpoints, operator notes | 1, 3, 6 |
| 8 | [Forge webhooks](./Epic-forge-webhooks/Epic-forge-webhooks.md) | draft (2 tasks) | Webhooks + PR checks recovery panel | 3, 4, 7 |
| 9 | [Fleet dashboard](./Epic-fleet-dashboard/Epic-fleet-dashboard.md) | draft (2 tasks) | Cross-repo rollup + SSE activity feed | 4, 5 |
| 1 | [Model provider registry](./Epic-model-provider-registry/Epic-model-provider-registry.md) | done (+1 follow-on) | `resolveModel()`, Settings AI; cost caps task | — |
| 2 | [Pipeline convoy scaffolding](./Epic-pipeline-convoy-scaffolding/Epic-pipeline-convoy-scaffolding.md) | done | `.convoys/`, metrics, planning rule | — |
| 3 | [Connected repos](./Epic-connected-repos/Epic-connected-repos.md) | done (+1 follow-on) | `repo_links`, forge adapters; preflight | — |
| 4 | [Convoy lifecycle MCP](./Epic-convoy-lifecycle-mcp/Epic-convoy-lifecycle-mcp.md) | done | create/transition/events | 2, 3 |
| 5 | [Mission control gates UI](./Epic-mission-control-gates-ui/Epic-mission-control-gates-ui.md) | done (+2 follow-ons) | Kanban, gates, co-pilot; DAG, tiers | 4 |
| 6 | [Orchestrator](./Epic-apps-orchestrator/Epic-apps-orchestrator.md) | done (+1 follow-on) | Redis dispatch; auto-nudge | 1, 3, 4 |
| 7 | [Worker v1](./Epic-apps-worker-v1/Epic-apps-worker-v1.md) | **in progress** | Loop, checkpoints, **draft PR**, **live E2E**, notes | 1, 3, 6 |
| 8 | [Forge webhooks](./Epic-forge-webhooks/Epic-forge-webhooks.md) | draft | Webhooks + PR checks recovery | 3, 4, 7 |
| 9 | [Fleet dashboard](./Epic-fleet-dashboard/Epic-fleet-dashboard.md) | draft | Cross-repo home + SSE feed | 4, 5 |
| 10 | [Plans roadmap UI](./Epic-plans-roadmap-ui/Epic-plans-roadmap-ui.md) | draft | Tree, status, Start → convoy | 4, 5 |
| 11 | [Owner completion artifacts](./Epic-owner-completion-artifacts/Epic-owner-completion-artifacts.md) | draft | Summaries, gallery, screenshots | 7, 8 |
| 12 | [Ops copilot](./Epic-ops-copilot/Epic-ops-copilot.md) | draft | Project-aware status chat | 9, 10 |
### Overlap with existing plans
@ -184,7 +218,7 @@ flowchart LR
### End-state (what “done” looks like for the full plan)
Operator opens Echodo fleet view → starts convoy chat → hits **Go** → orchestrator runs pipeline roles with per-role models → worker executes briefs against connected repos → gates surface in inbox with AI co-pilot → approve → repeat until `released`. Live activity feed, spend rollups, and PR recovery are visible without leaving mission control.
Owner opens **fleet** → sees gates/PRs/releases across projects → opens a repo **Plans** roadmap → **Start** a ready task → Mission Control convoy → **Go** → worker (local or server models) builds without Cursor → draft PR → approve gates → **completion summary + screenshots/demos** → ask **ops copilot** what needs attention. `plans/` stays git SoT; DB + UI are how owners and agents query without dumping whole trees into context.
### Autensa benchmark (2026-08)
@ -218,6 +252,9 @@ Studied [crshdn/mission-control](https://github.com/crshdn/mission-control) (Aut
| 7 Worker v1 | `./Epic-apps-worker-v1/Epic-apps-worker-v1.md` |
| 8 Forge webhooks | `./Epic-forge-webhooks/Epic-forge-webhooks.md` |
| 9 Fleet dashboard | `./Epic-fleet-dashboard/Epic-fleet-dashboard.md` |
| 10 Plans roadmap UI | `./Epic-plans-roadmap-ui/Epic-plans-roadmap-ui.md` |
| 11 Owner completion artifacts | `./Epic-owner-completion-artifacts/Epic-owner-completion-artifacts.md` |
| 12 Ops copilot | `./Epic-ops-copilot/Epic-ops-copilot.md` |
## Metrics and milestones
@ -229,23 +266,47 @@ Studied [crshdn/mission-control](https://github.com/crshdn/mission-control) (Aut
| M3 Repos connected | 3 | Paste Forge/GitHub URL; clone succeeds from Echodo |
| M4 Convoy state | 4 | `transition_convoy_status` enforces gate actors |
| M5 Human surface | 5 | Gate inbox shows pending `convoy_review` |
| M6 Automation | 6–7 | Orchestrator dispatches one implementer brief unattended |
| M6 Automation | 6–7 | Unattended implementer brief (live E2E task) |
| M6b Draft PR | 7 | Worker opens draft PR on success |
| M7 PR loop | 8 | Merge webhook moves convoy to `merged` |
| M8 Fleet | 9 | Single view across ≥2 connected repos |
| M9 Reliability | 7 | Worker completes brief; checkpoint resume after kill |
| M9 Reliability | 7 | Checkpoint resume after kill |
| M10 Observability | 9 | Activity feed shows role_complete without refresh |
| M11 Spend control | 1 follow-on | Month-to-date spend + dispatch pause on cap |
| M12 Roadmap UI | 10 | Plans tree + Start → convoy |
| M13 Owner package | 11 | Completion summary (+ screenshot when UI) |
| M14 Ops chat | 12 | “What needs me?” answered with links |
## Recommended execution order (post-benchmark)
## Recommended execution order (owner vision)
1. **Epic 7 critical path** — [Task-worker-minimal-tool-loop](./Epic-apps-worker-v1/Task-worker-minimal-tool-loop.md) → live dogfood with orchestrator
2. **Epic 7 reliability** — checkpoint/resume, then operator notes
3. **Epic 8** — webhook receiver → PR checks panel (needs worker PR output)
4. **Epic 6 follow-on** — auto-nudge (pairs with checkpoints)
5. **Epic 3 follow-on** — repo preflight (before unattended prod dogfood)
6. **Epic 9** — fleet rollup → SSE feed
7. **Epic 5 follow-ons** — DAG viz, automation tiers (after Epic 8 for semi-auto)
8. **Epic 1 follow-on** — cost caps (after worker records token totals)
### Phase A — Engine (do now)
1. [Task-worker-live-e2e-dogfood](./Epic-apps-worker-v1/Task-worker-live-e2e-dogfood.md) — confirm A1 on Coolify/local (**ops checklist**)
2. [Task-worker-draft-pr](./Epic-apps-worker-v1/Task-worker-draft-pr.md) — **next coding chat** if PR not already working
3. [Task-forge-webhook-receiver](./Epic-forge-webhooks/Task-forge-webhook-receiver.md) → [Task-pr-checks-recovery-panel](./Epic-forge-webhooks/Task-pr-checks-recovery-panel.md)
4. *Parallel optional:* operator notes, auto-nudge, repo preflight
### Phase B — Fleet
5. [Task-fleet-rollup-dashboard](./Epic-fleet-dashboard/Task-fleet-rollup-dashboard.md) → SSE feed
### Phase C — Roadmap
6. Epic 10: backlog tree tRPC → Plans page → Start → convoy
### Phase D — Owner review
7. Epic 11: completion summary → artifact gallery → screenshot capture
### Phase E — Ops chat
8. Epic 12: context tools → UI → draft work from chat
### Polish (anytime after blockers clear)
- Epic 5: DAG viz, automation tiers (tiers after Epic 8)
- Epic 1: cost budget caps
- Epic 7: operator notes if not done in Phase A
## Risks and mitigations