- Forge webhook POST /api/webhooks/forge HMAC sha256 verify, marker echodo-convoy → pr_review→merged as automation - Completion artifacts table 0017, deterministic summary template, gallery /artifacts - Ops copilot tRPC copilot + context tools (fleet, convoy, backlog) + panel + Draft Task → backlog.createTask - Doc-writer SOPs: webhook rotation, copilot prompt, published flow examples - Allow pr_review→merged as automation for webhook Convoy: .convoys/owner-cockpit-v02 Co-authored-by: orchestrator
3.4 KiB
SOP published flow — Task-write-sop → doc_review → published → artifact gallery e2e
Fixture for role-doc-writer via harness doc-writer (apps/worker/src/harness.ts, packages/shared/src/convoy-lifecycle/state-machine.ts:9).
Objective
Standard path for a doc-only SOP: write markdown under docs/, pass doc_review, publish, and verify artifact gallery.
Prerequisites
- Convoy in
readyorin_progresswith a doc brief (role-doc-writer). - Workspace has
harness_providers alias: doc-writer(minimal,needsWorktree: false,allowedCommands: []) androle_model_routes role-doc-writer → qwen-coder(local). MARKDOWN_BACKLOG_WORKSPACE_IDset if backlog import needed.
Steps
-
Claim — orchestrator assigns
role-doc-writer; worker resolvesdoc-writerharness (needsWorktree: false— no worktree under/tmp/echodo-worker-worktrees). -
Write — worker tool loop uses only
read_file,grep,write_file(norun_command). Write target isdocs/...or SOP file:write_file({ path: "docs/operations/webhook-secret-rotation.md", content: "..." }) -
Gate:
in_progress → doc_review— automation orrole-doc-writertransitions viatransitionConvoy(packages/shared/src/convoy-lifecycle/state-machine.ts:104). Mission Control showsdoc_review. -
Gate:
doc_review → published—human-gate-2/doc-approverapproves (docs/convoy-lifecycle.md:27,state-machine.ts:104). Eventstatus_changewithactor: human-gate-2ordoc-approver. -
Gallery:
published → released+ artifact —convoys.complete(apps/web/server/routers/convoys.ts:467) transitionspublished → releasedviahuman-gate-3, createscompletionArtifactsrow (summaryMd+ optionalscreenshotUrl). Listed byconvoys.listArtifacts.
Verification
- Worker trace shows only
read_file,grep,write_file; norun_command/pnpm. convoy_eventscontainsdoc_review → publishedbyhuman-gate-2/doc-approver.- File exists at
docs/...with expected frontmatter/content. convoys.listArtifactsreturns row withsummaryMdandscreenshotUrl(placeholder ok) and timeline events.
Screenshots (placeholder)
Replace placeholders before marking published → released demo complete.
docs/examples/screenshots/sop-doc-review-gate.png— Mission Control detail showingdoc_reviewgate with Approve / Request changes.docs/examples/screenshots/sop-published-badge.png— Convoy kanban / detail showingpublishedstatus.docs/examples/screenshots/sop-artifact-gallery.png— Gallery (convoys.listArtifacts) showing summary + screenshot.
Capture via app at
/[workspaceSlug]/mission-controland/[workspaceSlug]/.../artifactsor equivalent gallery route. Store originals atdocs/examples/screenshots/(git-ignored if binary-heavy; link anyway).
Counterparts
- Code flow mirror:
in_progress → pr_review → merged → releasedvia Forge webhookPOST /api/webhooks/forge(apps/web/app/api/webhooks/forge/route.ts,docs/operations/webhook-secret-rotation.md). - Template:
docs/templates/doc-sop.md. - Research fixture:
docs/examples/research-pipeline.md.
References
- Lifecycle:
docs/convoy-lifecycle.md,packages/shared/src/convoy-lifecycle/state-machine.ts - Worker doc harness:
docs/worker.md,apps/worker/src/harness.ts - Artifacts tRPC:
apps/web/server/routers/convoys.ts:complete,convoys.ts:listArtifacts