doc-review
Document Review
Review requirements or plan documents through multi-persona analysis. Dispatches specialized reviewer agents in parallel, auto-applies safe_auto fixes, and routes remaining findings through a four-option interaction (per-finding walk-through, auto-resolve with best judgment, Append-to-Open-Questions, Report-only) for user decision.
The primary input is a tunan artifact — durable requirements live in the body of a tunan:req feature issue, while that feature's plan and solution live as marker comments (<!-- tunan:plan --> / <!-- tunan:solution -->) on the same issue, with the issue accruing the matching tunan:plan / tunan:solution label; tunan:idea and tunan:pulse artifacts are their own issues. None are local files. Reviewing an arbitrary local markdown file (a doc that is not a tunan artifact) is also supported. In both cases the review reads markdown, runs the persona analysis, and applies agreed findings back to the source — the issue body or marker comment for an artifact, the file on disk for a local doc.
Source resolution
A single concept threads through the whole skill: the working file — a local markdown path that all edit-tool mechanics (safe_auto apply, the Apply-set batch edit, Open-Questions appends) operate on. How the working file maps to the source depends on the argument:
- Issue ref (body source) — an argument of the form
#<N>, a bare integer<N>, or a GitHub issue URL whose artifact lives in the issue body (tunan:req/tunan:idea/tunan:pulse, or any non-plan/solution issue). Run GH PREFLIGHT (below), read the issue body viagh issue view, and write the body markdown to a transient working file in the OS temp dir. This is the primary path for body-source tunan artifacts. After review edits land on the working file, push it BACK to the issue body viagh issue edit <N> --body-file <working-file>(the SYNC-BACK step in Phase 4/walkthrough). - Issue ref (comment source — plan / solution) — when the target is a plan or solution, the artifact is a marker comment on the feature issue (
<!-- tunan:plan -->/<!-- tunan:solution -->), not the issue body (the body is the requirement). The caller (e.g.,plan's doc-review step) names which stage. Resolve that comment, write its body to the working file, and SYNC-BACK by PATCHing the same comment — not the issue body. See "Comment-source read/sync-back" below. - Local path — an argument that is a filesystem path to a markdown file that is not a tunan artifact. The working file IS that path; edits write in place, with no SYNC-BACK step.
GH PREFLIGHT (issue source only)
Before any issue read or write, verify the GitHub CLI is usable. Run each check as a single simple command (no chaining, no error suppression) and abort with guidance if any fails — never fall back to writing a local file: