Book Review
Review part of the book specified by $ARGUMENTS, using the project's book
review policies.
Step 1: Figure Out What to Review
The user's $ARGUMENTS could be anything. Interpret them:
| Arguments |
What to do |
| (empty) |
Run git diff -- book/src/ and git diff --cached -- book/src/. Review the uncommitted changes. If no changes, say so and stop. |
| A file path |
Read that file. Review the whole chapter. |
A file path with lines (foo.md:50-80) |
Read that file. Focus the review on those lines (but read the full file for context). |
| Multiple file paths |
Read all of them. Review each, and also look for consistency across them. |
| A section heading or topic name |
Use Grep/Glob to find where that topic is discussed in book/src/. Read those sections. Review them. |
| A conceptual description ("how we explain X", "the transition between Y and Z") |
Search the book to find the relevant passages. Read them with surrounding context. Review them as a unit. |
| A mix of the above |
Handle each part, then review the union. |
If you're unsure what the user means, ask before launching reviewers.
Step 2: Discover and Launch Reviewers
Use Glob to find all .claude/book-review/*.md files.
Read .claude/book-review/standards.md (master standards shared by all
reviewers).
For EACH policy file except standards.md, launch a general-purpose
Task agent (use model sonnet). Give each agent a prompt constructed from
this template — adapt it based on what you're reviewing:
You are reviewing part of "The Ragu Book," a technical book about a
recursive proof system (proof-carrying data framework).
Read these files:
.claude/book-review/standards.md (master standards that always apply)
.claude/book-review/{focus}.md (your specific review policy)
.claude/review-shared/surface-placement.md (book vs. rustdoc placement rules)
What to review: {describe the specific content — file paths, line
ranges, the topic, whatever the user specified. If reviewing a diff,
include the diff text and list the full file paths for context.}
{If the scope is a diff or a narrow range, add: "Focus on the specified
content. Flag issues in surrounding text ONLY if the specified content
introduced an inconsistency with it."}
{If the scope spans multiple files or a concept, add: "Pay attention to
consistency across the passages. Flag contradictions, redundancies, or
gaps in the explanation as it spans these locations."}
If the policy references other files (like book/macros.txt or
book/src/appendix/terminology.md), read those too.
For each finding:
- Location: file path and quoted text (or line number)
- Issue: what's wrong, specifically
- Suggestion: a concrete rewrite, not just "improve this"
- Severity:
must-fix (clearly wrong/confusing) or suggestion
Stay within your policy's scope. Be specific. If you find no real issues,
say so — don't manufacture problems.
Tool usage rules:
- Use the Grep tool for searching file contents — do NOT run
grep or rg
as a Bash command.
- Use the Read tool to read files — do NOT use
cat, head, or tail.
- Use the Glob tool to find files — do NOT use
find or ls.
- When you do use Bash, the command must be a clean shell command with NO
comment lines (
#) prepended. Put your reasoning in the description
parameter, not in the command itself.
Additionally, read book/FIXME.md and extract the ###-level headings
under ## Deferred Issues. Include them in each reviewer's prompt as a
bullet list with the instruction:
The following issues are already tracked and deferred. Do NOT raise
findings that duplicate or overlap with these items. If your finding
is essentially the same issue, omit it.
{bullet list of ### headings from book/FIXME.md}
However, if while reviewing you notice that a deferred issue appears to
have been resolved by existing content or is now easily resolvable
given changes in the surrounding text, mention it as a separate
observation (not a finding). Format:
- Resolvable FIXME: "{FIXME heading}" — {brief explanation of why
it appears resolved or how to resolve it now}
Launch ALL agents in parallel (multiple Task calls in one message).
Step 3: Run Automated Link Checks
In parallel with the reviewer agents (launched in Step 2), run the automated
QA scripts to detect broken links and dead pages:
- Run
python3 qa/book/broken_links.py — finds broken internal links and
invalid anchors (requires mdbook to be installed).
- Run
python3 qa/book/dead_pages.py — finds markdown files not listed in
SUMMARY.md.
- Run
python3 qa/book/line_width.py — finds lines exceeding the
80-character width limit (excludes code blocks, math blocks, and other
exempt content).
If either script fails to run (e.g., mdbook is not installed), note the
failure in your output but do not block the review. Include any findings from
these scripts alongside the reviewer agents' results in the synthesis step.
Step 4: Synthesize
Once all agents return, organize findings by location (earliest in the book
first). If multiple reviewers flagged overlapping concerns, merge them. Present:
- Must-fix issues first
- Suggestions second
- For each finding, note which reviewer(s) identified it
If the review scope was cross-file or conceptual, add a short section at the end
about cross-cutting observations (consistency, narrative coherence, etc.).
Before presenting findings, read book/FIXME.md and remove any finding that
substantially overlaps with an already-deferred issue (match against the ###
headings). If you remove findings this way, do not mention them at all.
If any reviewer flagged a resolvable FIXME, collect them in a Potentially
Resolvable FIXMEs section after the main findings. The user can then use
/book-fixme to address them.
Step 5: Validate Proposed Changes
After synthesizing findings, but before presenting them to the user:
Collect all proposed changes (the "suggestion" field from each finding) into
a single numbered list — the proposed plan.
For EACH policy file (same set as Step 2 — every .claude/book-review/*.md
except standards.md), launch a general-purpose Task agent (model
sonnet) with this prompt:
You are validating a set of proposed book edits against review policies.
Read these files:
.claude/book-review/standards.md (master standards)
.claude/book-review/{focus}.md (your policy)
.claude/review-shared/surface-placement.md (book vs. rustdoc placement rules)
.claude/review-shared/writing.md (shared writing rules)
.claude/review-shared/math.md (shared math rules)
Here is the proposed plan of changes:
{numbered list of proposed changes with locations and suggested rewrites}
For each proposed change, check whether applying it would introduce a
violation of any rule in your policy or the master standards. Only flag
real conflicts — do not restate rules that are already satisfied.
For each conflict found:
- Change #: which proposed change
- Rule violated: quote the relevant policy text
- Conflict: explain specifically how the suggestion violates the rule
- Resolution: suggest how to fix the suggestion to comply
Tool usage rules:
- Use the Grep tool for searching file contents — do NOT run
grep or rg
as a Bash command.
- Use the Read tool to read files — do NOT use
cat, head, or tail.
- Use the Glob tool to find files — do NOT use
find or ls.
- When you do use Bash, the command must be a clean shell command with NO
comment lines (
#) prepended. Put your reasoning in the description
parameter, not in the command itself.
If no proposed changes conflict with your policy, say so.
Launch ALL agents in parallel.
Merge validation feedback into the findings. For each conflict:
- If the validator provides a compliant alternative, replace the original
suggestion with the corrected version.
- If the conflict has no clear resolution, annotate the finding with the
conflict so the user can decide during triage.
If any suggestions were corrected, briefly note it in the synthesis output
(e.g., "Grammar validator caught that suggestion #3 would violate the
lowercase-technical-terms rule; corrected.").
Step 6: Triage
After presenting findings, use AskUserQuestion to let the user decide the
disposition of each finding (or group of closely related findings). For each,
offer:
- Fix — apply the suggested fix now
- Skip — drop this finding; do not record it anywhere
- Defer — record this finding in
book/FIXME.md for future attention
If there are many findings, you may batch them into logical groups and ask
about each group rather than each individual finding.
Step 7: Apply Fixes
For each finding the user chose to fix:
- Read the target file to get the current content.
- Apply the suggested change using the Edit tool. If the finding is a group
(e.g., "add slugs to these 15 headings"), apply all changes in the group.
- After applying all fixes, run any relevant QA scripts to verify the changes
don't introduce new issues:
- If formatting changes were made:
python3 qa/book/line_width.py
- If links or headings were changed:
python3 qa/book/broken_links.py
- Briefly report what was changed and any QA results.
Step 8: Record Deferred Issues
For each finding the user chose to defer:
- Read
book/FIXME.md.
- Check whether a substantially similar issue is already listed. First scan
the
### headings for a potential match; if a heading looks similar, read
the paragraph beneath it to confirm it describes the same issue. Only skip
if both the heading and description match — do not treat a heading match
alone as a duplicate.
- If the issue is new, append it as a new
###-level subsection under
## Deferred Issues, following the existing format: a short descriptive
heading, then a concise paragraph explaining the issue and its location.
- Write the updated file.
After recording, confirm what was deferred and remind the user they can use
/book-refine to turn feedback into policy improvements.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: book-review3description: Review any part of the book using parallel specialist agents Use when this capability is needed.4---56# Book Review78Review part of the book specified by `$ARGUMENTS`, using the project's book9review policies.1011## Step 1: Figure Out What to Review1213The user's `$ARGUMENTS` could be anything. Interpret them:1415| Arguments | What to do |16|-----------|-----------|17| *(empty)* | Run `git diff -- book/src/` and `git diff --cached -- book/src/`. Review the uncommitted changes. If no changes, say so and stop. |18| A file path | Read that file. Review the whole chapter. |19| A file path with lines (`foo.md:50-80`) | Read that file. Focus the review on those lines (but read the full file for context). |20| Multiple file paths | Read all of them. Review each, and also look for consistency across them. |21| A section heading or topic name | Use Grep/Glob to find where that topic is discussed in `book/src/`. Read those sections. Review them. |22| A conceptual description ("how we explain X", "the transition between Y and Z") | Search the book to find the relevant passages. Read them with surrounding context. Review them as a unit. |23| A mix of the above | Handle each part, then review the union. |2425If you're unsure what the user means, ask before launching reviewers.2627## Step 2: Discover and Launch Reviewers28291. Use Glob to find all `.claude/book-review/*.md` files.302. Read `.claude/book-review/standards.md` (master standards shared by all31 reviewers).323. For EACH policy file **except `standards.md`**, launch a `general-purpose`33 Task agent (use model `sonnet`). Give each agent a prompt constructed from34 this template — adapt it based on what you're reviewing:3536 > You are reviewing part of "The Ragu Book," a technical book about a37 > recursive proof system (proof-carrying data framework).38 >39 > Read these files:40 > - `.claude/book-review/standards.md` (master standards that always apply)41 > - `.claude/book-review/{focus}.md` (your specific review policy)42 > - `.claude/review-shared/surface-placement.md` (book vs. rustdoc placement rules)43 >44 > **What to review:** {describe the specific content — file paths, line45 > ranges, the topic, whatever the user specified. If reviewing a diff,46 > include the diff text and list the full file paths for context.}47 >48 > {If the scope is a diff or a narrow range, add: "Focus on the specified49 > content. Flag issues in surrounding text ONLY if the specified content50 > introduced an inconsistency with it."}51 >52 > {If the scope spans multiple files or a concept, add: "Pay attention to53 > consistency across the passages. Flag contradictions, redundancies, or54 > gaps in the explanation as it spans these locations."}55 >56 > If the policy references other files (like `book/macros.txt` or57 > `book/src/appendix/terminology.md`), read those too.58 >59 > For each finding:60 > - **Location**: file path and quoted text (or line number)61 > - **Issue**: what's wrong, specifically62 > - **Suggestion**: a concrete rewrite, not just "improve this"63 > - **Severity**: `must-fix` (clearly wrong/confusing) or `suggestion`64 >65 > Stay within your policy's scope. Be specific. If you find no real issues,66 > say so — don't manufacture problems.67 >68 > **Tool usage rules:**69 > - Use the Grep tool for searching file contents — do NOT run `grep` or `rg`70 > as a Bash command.71 > - Use the Read tool to read files — do NOT use `cat`, `head`, or `tail`.72 > - Use the Glob tool to find files — do NOT use `find` or `ls`.73 > - When you do use Bash, the command must be a clean shell command with NO74 > comment lines (`#`) prepended. Put your reasoning in the `description`75 > parameter, not in the command itself.7677 Additionally, read `book/FIXME.md` and extract the `###`-level headings78 under `## Deferred Issues`. Include them in each reviewer's prompt as a79 bullet list with the instruction:80 > The following issues are already tracked and deferred. Do NOT raise81 > findings that duplicate or overlap with these items. If your finding82 > is essentially the same issue, omit it.83 >84 > {bullet list of ### headings from book/FIXME.md}85 >86 > However, if while reviewing you notice that a deferred issue appears to87 > have been **resolved** by existing content or is now easily resolvable88 > given changes in the surrounding text, mention it as a separate89 > observation (not a finding). Format:90 > - **Resolvable FIXME**: "{FIXME heading}" — {brief explanation of why91 > it appears resolved or how to resolve it now}9293 Launch ALL agents in parallel (multiple Task calls in one message).9495## Step 3: Run Automated Link Checks9697In parallel with the reviewer agents (launched in Step 2), run the automated98QA scripts to detect broken links and dead pages:991001. Run `python3 qa/book/broken_links.py` — finds broken internal links and101 invalid anchors (requires `mdbook` to be installed).1022. Run `python3 qa/book/dead_pages.py` — finds markdown files not listed in103 `SUMMARY.md`.1043. Run `python3 qa/book/line_width.py` — finds lines exceeding the105 80-character width limit (excludes code blocks, math blocks, and other106 exempt content).107108If either script fails to run (e.g., `mdbook` is not installed), note the109failure in your output but do not block the review. Include any findings from110these scripts alongside the reviewer agents' results in the synthesis step.111112## Step 4: Synthesize113114Once all agents return, organize findings by location (earliest in the book115first). If multiple reviewers flagged overlapping concerns, merge them. Present:116117- **Must-fix** issues first118- **Suggestions** second119- For each finding, note which reviewer(s) identified it120121If the review scope was cross-file or conceptual, add a short section at the end122about cross-cutting observations (consistency, narrative coherence, etc.).123124Before presenting findings, read `book/FIXME.md` and remove any finding that125substantially overlaps with an already-deferred issue (match against the `###`126headings). If you remove findings this way, do not mention them at all.127128If any reviewer flagged a resolvable FIXME, collect them in a **Potentially129Resolvable FIXMEs** section after the main findings. The user can then use130`/book-fixme` to address them.131132## Step 5: Validate Proposed Changes133134After synthesizing findings, but before presenting them to the user:1351361. Collect all proposed changes (the "suggestion" field from each finding) into137 a single numbered list — the **proposed plan**.1382. For EACH policy file (same set as Step 2 — every `.claude/book-review/*.md`139 except `standards.md`), launch a `general-purpose` Task agent (model140 `sonnet`) with this prompt:141142 > You are validating a set of proposed book edits against review policies.143 >144 > Read these files:145 > - `.claude/book-review/standards.md` (master standards)146 > - `.claude/book-review/{focus}.md` (your policy)147 > - `.claude/review-shared/surface-placement.md` (book vs. rustdoc placement rules)148 > - `.claude/review-shared/writing.md` (shared writing rules)149 > - `.claude/review-shared/math.md` (shared math rules)150 >151 > Here is the proposed plan of changes:152 > {numbered list of proposed changes with locations and suggested rewrites}153 >154 > For each proposed change, check whether applying it would **introduce** a155 > violation of any rule in your policy or the master standards. Only flag156 > real conflicts — do not restate rules that are already satisfied.157 >158 > For each conflict found:159 > - **Change #**: which proposed change160 > - **Rule violated**: quote the relevant policy text161 > - **Conflict**: explain specifically how the suggestion violates the rule162 > - **Resolution**: suggest how to fix the suggestion to comply163 >164 > **Tool usage rules:**165 > - Use the Grep tool for searching file contents — do NOT run `grep` or `rg`166 > as a Bash command.167 > - Use the Read tool to read files — do NOT use `cat`, `head`, or `tail`.168 > - Use the Glob tool to find files — do NOT use `find` or `ls`.169 > - When you do use Bash, the command must be a clean shell command with NO170 > comment lines (`#`) prepended. Put your reasoning in the `description`171 > parameter, not in the command itself.172 >173 > If no proposed changes conflict with your policy, say so.174175 Launch ALL agents in parallel.1761773. Merge validation feedback into the findings. For each conflict:178 - If the validator provides a compliant alternative, replace the original179 suggestion with the corrected version.180 - If the conflict has no clear resolution, annotate the finding with the181 conflict so the user can decide during triage.1821834. If any suggestions were corrected, briefly note it in the synthesis output184 (e.g., "Grammar validator caught that suggestion #3 would violate the185 lowercase-technical-terms rule; corrected.").186187## Step 6: Triage188189After presenting findings, use AskUserQuestion to let the user decide the190disposition of each finding (or group of closely related findings). For each,191offer:192193- **Fix** — apply the suggested fix now194- **Skip** — drop this finding; do not record it anywhere195- **Defer** — record this finding in `book/FIXME.md` for future attention196197If there are many findings, you may batch them into logical groups and ask198about each group rather than each individual finding.199200## Step 7: Apply Fixes201202For each finding the user chose to **fix**:2032041. Read the target file to get the current content.2052. Apply the suggested change using the Edit tool. If the finding is a group206 (e.g., "add slugs to these 15 headings"), apply all changes in the group.2073. After applying all fixes, run any relevant QA scripts to verify the changes208 don't introduce new issues:209 - If formatting changes were made: `python3 qa/book/line_width.py`210 - If links or headings were changed: `python3 qa/book/broken_links.py`2114. Briefly report what was changed and any QA results.212213## Step 8: Record Deferred Issues214215For each finding the user chose to **defer**:2162171. Read `book/FIXME.md`.2182. Check whether a substantially similar issue is already listed. First scan219 the `###` headings for a potential match; if a heading looks similar, read220 the paragraph beneath it to confirm it describes the same issue. Only skip221 if both the heading and description match — do not treat a heading match222 alone as a duplicate.2233. If the issue is new, append it as a new `###`-level subsection under224 `## Deferred Issues`, following the existing format: a short descriptive225 heading, then a concise paragraph explaining the issue and its location.2264. Write the updated file.227228After recording, confirm what was deferred and remind the user they can use229`/book-refine` to turn feedback into policy improvements.230231---232> Converted and distributed by [TomeVault](https://tomevault.io/claim/tachyon-zcash) — claim your Tome and manage your conversions.233<!-- tomevault:4.0:skill_md:2026-04-11 -->