Submatter/.convoys/worker-closeout-docwriter/brief-3-doc-writer-examples.md
Randall Stillwell 86155455a7 feat(worker): close Epic 7 — draft PR + operator notes + doc-writer
- Draft PR via forge (apps/worker/src/git/pr.ts) push branch + createPullRequest draft with echodo-convoy marker, expose prUrl in Mission Control (convoy-service, convoys router, detail panel)
- Operator notes mid-build: convoy_operator_messages (0016), tRPC post/list, worker poll between tool rounds (queued) and before generateText (direct), detail panel thread for in_progress
- Doc-writer: harness doc-writer examples (docs/examples/research-pipeline.md), SOP template (docs/templates/doc-sop.md), role-doc-writer wiring

Convoy: .convoys/worker-closeout-docwriter

Co-authored-by: orchestrator
2026-08-25 16:56:02 -05:00

2.4 KiB

brief convoy role title status priority slice_dependencies recommended_model model_tier
3 worker-closeout-docwriter role-doc-writer Doc-writer examples + routing for second brain (book/course/research SOPs) ready P1
qwen-coder local

Brief 3 — role-doc-writer for second brain (book / course / SOPs)

Goal

Prove non-code second brain: role-doc-writer routed via harness doc-writer (needsWorktree:false, allowedCommands:[] apps/worker/src/harness.ts:1) writes publishable docs without pnpm or worktree, via doc_review→published packages/shared/src/convoy-lifecycle/state-machine.ts:9.

Files

  • docs/examples/research-pipeline.md NEW — one page: "Heavy research pipeline" example (source → claim → outline → publish), calls doc_review→published flow; used as doc harness e2e fixture.
  • docs/templates/doc-sop.md NEW — copy from docs/templates/Task-*.md but for SOPs: kind: doc-sop, slug, title, status: draft→doc_review→published, body.
  • packages/shared/src/model-routing / harness seeds — add doc role wiring note: role-doc-writer → qwen-coder-mlx + doc-writer suggested alias map docs/adr-model-routing.md:234.
  • docs/worker.md — extend doc harness section (already has optional worktree note from v0.1) with role-doc-writer example invocation.
  • apps/web/server/routers/harnesses.ts:1 — ensure harnessType: minimal with alias: doc-writer preset is seedable (if not, document manual creation).

Acceptance

  • role-doc-writer job docs/examples/research-pipeline.md completes via write_file only (no run_command, no worktree under /tmp/echodo-worker-worktrees) and transitions in_progress → doc_review (role-doc-writer or automation), then doc-approver doc_review→published visible in Mission control.
  • SOP template renders in docs/templates/ list.
  • pnpm lint && pnpm type-check pass.

Prompt

You are role-doc-writer brief 3. Read docs/decisions/2026-08-25-second-brain-os-pivot.md, docs/adr-model-routing.md:234, docs/convoy-lifecycle.md, packages/shared/src/convoy-lifecycle/schemas.ts:5. Write docs that a future agent will read as context — keep them small, no narration comments.

Depends

None — can run parallel with 1,2.

  • plans/Plan-automation-foundation/Plan-automation-foundation.md v0.1 pivot
  • apps/worker/src/harness.ts:1 doc-writer harness