Submatter/docs/examples/research-pipeline.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

22 lines
1.3 KiB
Markdown

# Heavy research pipeline — source → claim → outline → publish
E2E fixture for `role-doc-writer` via harness `doc-writer` (`apps/worker/src/harness.ts:13`, `packages/shared/src/convoy-lifecycle/state-machine.ts:9`).
## Flow
1. **Source** — capture references or question under `docs/research/` or convoy brief.
2. **Claim** — `claim_task` assigns `role-doc-writer`; worker resolves model `qwen-coder-mlx` + harness `doc-writer`.
3. **Outline** — map claims to evidence, draft outline with `read_file`/`grep`.
4. **Publish** — write `docs/` or SOP file with `write_file` only, then `in_progress → doc_review` (automation or `role-doc-writer`), then `doc_review → published` via `human-gate-2` / `doc-approver`; finally `published → released` if promoted.
## Harness constraints
- `needsWorktree: false` — writes directly to `monorepoRoot`, no branch or `/tmp/echodo-worker-worktrees` worktree.
- `allowedCommands: []` — no `run_command`; fixture fails if the tool trace contains `run_command` or `pnpm`.
- Mirrors `pr_review → merged` for code: `doc_review → published` is the docs-only gate.
## Verify
- Worker trace shows only `read_file`, `grep`, `write_file`.
- Convoy event `role_complete` with `published: true` and Mission control shows `doc_review → published` by `doc-approver`.
- Counterpart template: `docs/templates/doc-sop.md`.