Skip to content
71 changes: 71 additions & 0 deletions .claude/skills/docs-guide-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
name: docs-guide-review
description: Run a Temporal guide (a docs.temporal.io/guides tutorial) through the full review pipeline in order — structure, then technical accuracy, then developmental edit, then copyedit — by delegating to the stage skills and consolidating their output into one report. Use this skill when someone wants a complete, end-to-end review of a new or revised guide before it ships: "review this guide", "take this guide through the whole pipeline", "run the full guide review", "structure/test/dev-edit/copyedit this guide", or "is this guide ready to publish". For a single concern, invoke that stage's skill directly instead: docs-guide-revision (structure), docs-guide-test (does the code run), docs-guide-develop (does it teach well), or Vale (copyedit). This skill owns only the sequencing, the gating between stages, and the consolidated report; it makes no edits or judgments of its own.
---

# Review a guide end to end

You take one guide and run it through all four review stages in order, delegating each stage to the skill (or tool) that owns it, threading the guide from one stage to the next, and returning a single consolidated report. You don't re-implement any stage and you don't make structural, accuracy, developmental, or style judgments yourself — each belongs to its stage.

## The pipeline

| # | Stage | Owned by | What it does | Modifies the guide? |
| --- | --- | --- | --- | --- |
| 1 | Structure | `docs-guide-revision` | Applies the template: intro, prerequisites, `Step N` sections, Code Sandwich, transitions, Outcomes. | Yes — produces a revised draft |
| 2 | Accuracy | `docs-guide-test` | Reconstructs the project from the code blocks and runs it against a local Temporal server; runs the static checks; checks the prose's claims about what the code does against the code and the run output. | No — a check |
| 3 | Developmental | `docs-guide-develop` | Judges whether it teaches well (verbs not nouns, verb choice, step completeness/order, lead with the action, Code Sandwich quality, audience fit including global-audience readability). | Prose only, on request |
| 4 | Copyedit | `AGENTS.md` Tone pass + Vale | A no-context tone review of the final prose, then mechanical style and terminology. | Prose only, on request (Tone pass findings); Vale is a check |

## Order, and why it's this order

Run the stages in sequence; each depends on the one before it:

- **Structure first** so every later stage edits or checks stable content instead of a moving target.
- **Accuracy on the revised draft.** The structural pass preserves code exactly but reorganizes it into the Code Sandwich (one file across a header block plus header-less continuation blocks). `docs-guide-test` defaults to `concat-header` extraction, which reconstructs exactly that shape — so test the stage-1 output, not the original.
- **Developmental after accuracy** so you're improving prose over code that actually works, inside a settled structure.
- **Copyedit last** so the Tone pass and Vale run over the final prose, after structural and developmental edits have landed. `docs-guide-revision` runs the Tone pass as its own last step when used alone. In this pipeline, skip it there and run it once in stage 4, so prose that stage 3 changes still gets a tone review.

Thread the artifact through: stage 1 produces a revised draft; stages 2–4 operate on that draft (and on stage 3's edits, if applied), never the original.

## Workflow

1. **Establish the working copy.** Take the guide as a file (a draft, or a published page fetched to a local `.mdx`/`.md`). Keep it as a file so the stages can revise and check it.
2. **Stage 1 — structure.** Invoke `docs-guide-revision`, and tell it to skip its Tone pass step; stage 4 runs it. Keep its revised draft (saved to a file) and its editor's notes.
3. **Stage 2 — accuracy.** Invoke `docs-guide-test` against the revised draft: run the guide's manifest with `--guide <revised draft> --mode concat-header`. The manifest supplies dependencies, setup, driver, and assertions, and the code comes from the draft, which stage 1 laid out as a Code Sandwich. If no manifest or claims ledger exists for this guide, follow that skill's "Adding a new guide" steps to write them first. If the manifest skips the run (an external-dependency or cloud-bound guide), record the skip reason in place of a run result; the harness still runs the static checks and the claims it can check without a server. Keep the run result (or skip reason), the static-check findings, and the claims results from the run's CLAIMS section: true, false, can't verify, stale, and not run. Expect some stale claims here: stage 1 rewords prose, so some quoted sentences no longer appear in the draft. Report them as stale rather than re-judging them here; re-reading them belongs to `docs-guide-test`.
4. **Stage 3 — developmental.** Invoke `docs-guide-develop` on the revised draft. Keep its developmental review; apply its edits into the draft only if the author asked for an applied revision.
5. **Stage 4 — copyedit.** Run the [Tone pass](../../../AGENTS.md#tone-pass) from `AGENTS.md` on the final draft, giving the reviewing agent the draft's file path. Keep its findings as suggestions. This differs from the Tone pass's own step 2, which applies them. Apply them only if the author asked for an applied revision, and never change code or a technical claim to fix tone. Then run the CI-scoped Vale over the draft:
```bash
vale --config .vale-ci.ini <path-to-revised-guide>
```
Keep the results. (This is the bar PRs must hit; see `AGENTS.md`. Don't run the full style set to judge done-ness.)
6. **Consolidate.** Produce the single report described in Output.

## Gating

- **Run every stage in one pass** so the author gets the whole picture at once — don't stop at the first stage that finds problems. The two exceptions:
- If stage 1 finds the document isn't a tutorial-style guide at all, or is too incomplete to restructure, stop and say so; the later stages have nothing to work on.
- If stage 2 can't stand up a server or reconstruct the project (a harness problem, not a guide problem), report it as a harness problem, not a guide failure, and mark the guide's code as untested. Continue with stages 3 and 4; they read the draft, not the reconstructed project.
- **Severity, carried into the report:**
- Code that doesn't assemble or run (stage 2) is **blocking for publish**.
- A prose claim the code contradicts (stage 2) is **blocking for publish**. It misleads the reader as much as broken code does. Claims stage 2 couldn't verify, stale claims, and claims the run didn't reach are **advisory**.
- Vale findings under `.vale-ci.ini` (stage 4) are **blocking for merge** — they gate PRs.
- Static-check findings (stage 2, including those from a skipped run), developmental findings (stage 3), and Tone pass findings (stage 4) are **advisory** — real notes for the author, but they don't block.
- Structural choices the guidance was silent on (stage 1) are **author decisions**.
- **Respect each stage's own deferrals.** If a stage skips or defers (test skip for cloud/external, develop deferring a structural point back to stage 1, or a claim that doesn't match the code back to stage 2), record the reason rather than redoing it here.

## Boundaries

This skill owns sequencing, gating, and the consolidated report — nothing else.

- **Don't re-implement or second-guess a stage.** Report what the stage skill produced. If you disagree with a stage's output, that's feedback for that skill, not a judgment to make here.
- **Don't change code or technical claims** at any point; the stages that touch the guide (1, 3, and the stage 4 Tone pass) already forbid it, and this skill forbids it too.
- **Don't merge stages.** Each finding keeps its stage's identity in the report, so the author knows which concern it is and which skill to re-run.

## Output

A single consolidated report:

1. **Readiness line** up top: `Ready to publish`, `Needs author decisions`, or `Blocked` — with the one-line reason (for `Blocked`, the broken code, the false claim, or the Vale gate).
2. **One section per stage**, each summarizing that stage's result and pointing to its detail: stage 1 → revised draft path + count of editor's notes; stage 2 → PASS/FAIL/SKIP (with the skip reason, or "untested" for a harness problem), the static-check count, and the claims counts (true, false, can't verify, stale, not run), or "no claims ledger"; stage 3 → the developmental findings; stage 4 → the Tone pass findings and the Vale results.
3. **Consolidated action list**, prioritized across all stages: blocking items first (broken code, false claims, Vale gate), then author decisions, then advisory findings. Each item keeps its stage label.
4. **The revised guide** (file path), plus a note of whether stage 3's developmental edits and stage 4's Tone pass findings were applied or left as suggestions.
Loading