68 lines
3.4 KiB
Markdown
68 lines
3.4 KiB
Markdown
---
|
|
name: owner-cockpit-v02
|
|
classification: server-only
|
|
success_metric: Fleet webhooks close PR loop (merged), completion gallery shows summaries+screenshots, ops copilot answers "what needs me?" with links — all from web without dumping plans/
|
|
skip:
|
|
- ia
|
|
- design
|
|
- a11y
|
|
- visual
|
|
- smoke
|
|
status: merged
|
|
created: 2026-08-25
|
|
model_policy:
|
|
roles:
|
|
role-conductor: claude-planning
|
|
role-architect: claude-planning
|
|
role-implementer: qwen-coder
|
|
role-doc-writer: qwen-coder
|
|
role-reviewer: qwen-coder
|
|
escalate_to: claude-planning
|
|
---
|
|
|
|
# Owner cockpit v02 — forge webhooks + artifacts + copilot (post-v0.1)
|
|
|
|
## Why
|
|
|
|
v0.1 made second brain publishable (MCP create, harness-agnostic, Plans tree, Fleet). Worker closeout closed Epic 7 with doc_review→published + draft PR + operator notes + doc-writer. Remaining owner vision per `plans/Plan-automation-foundation/Plan-automation-foundation.md:222` — "fleet → Plans → Start → Go → PR → gates → completion + copilot" — still misses PR loop close (Epic 8), owner review pack (Epic 11), and ops chat (Epic 12). This convoy finishes the cockpit so a solo can land in Fleet, triage, and ask copilot without grepping.
|
|
|
|
Decision: `docs/decisions/2026-08-25-second-brain-os-pivot.md`.
|
|
|
|
## Scope
|
|
|
|
1. **Forge webhooks** `Epic-forge-webhooks` — `POST /api/webhooks/forge` (GitHub/Forgejo) verifies `X-Hub-Signature`/`X-Forgejo-Signature` via `FORGE_WEBHOOK_SECRET`, finds `echodo-convoy: <uuid>` marker in PR body, transitions `pr_review→merged` (`human-gate-2` automation path) and writes `convoy_events`.
|
|
2. **PR checks recovery panel** `Task-pr-checks-recovery-panel.md` — Mission control detail shows PR checks + retry.
|
|
3. **Completion artifacts** `Epic-owner-completion-artifacts` — `completion_summary` on `published/merged→released` (markdown summary + optional screenshot placeholder), gallery list, tRPC `listArtifacts`.
|
|
4. **Ops copilot** `Epic-ops-copilot` — `ops-copilot-context-tools` (fleet + convoy + backlog queries scoped to workspace) + `ops-copilot-ui` chat panel + `draft-work` from chat (create Task via MCP).
|
|
5. Doc-writer: SOP for webhook secret rotation + copilot prompt.
|
|
|
|
Out of scope: LiteLLM gateway, SQLite single-tenant, preference learning.
|
|
|
|
## Roles invoked
|
|
|
|
Conductor → Architect (4 briefs) → Implementer per brief (disjoint: webhooks, artifacts, copilot) → Doc-writer (SOP) → Reviewer.
|
|
|
|
## Todos
|
|
|
|
- [ ] Brief 1 forge webhook receiver
|
|
- [ ] Brief 2 completion gallery + summaries
|
|
- [ ] Brief 3 ops copilot (context tools + UI)
|
|
- [ ] Brief 4 doc-writer SOPs
|
|
|
|
## IA
|
|
|
|
Skipped (`ia` skip set — server-only, no new top-level entities beyond `completion_artifacts` optional table; reuse `convoy_events metadata.prUrl` + `objects content`).
|
|
|
|
## UX
|
|
|
|
Partial — `ux` not skipped for copilot: chat panel reuses `components/ui/*`.
|
|
|
|
## Architecture
|
|
|
|
- Webhooks: `apps/web/app/api/webhooks/forge/route.ts` HMAC verify, `reconcile` via `transitionConvoy` `packages/shared/src/convoy-lifecycle/state-machine.ts:90` `pr_review→merged`.
|
|
- Artifacts: optional `completion_artifacts` table or reuse `objects content.completionSummary` + `convoy_events metadata.completionScreenshot`.
|
|
- Copilot: `apps/web/server/routers/copilot.ts` with `resolveModel(gate-copilot)` + context tools `fleet, convoys.list, backlog.listTree` scoped to `workspace_id`; UI `components/copilot/ops-copilot-panel.tsx`.
|
|
|
|
## Dependencies
|
|
|
|
- v0.1 + worker-closeout (harness, doc_review, prUrl)
|