# 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`.