원클릭으로
doc-audit
Audit documentation surface placement (book vs. rustdoc) and refine the policy
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Audit documentation surface placement (book vs. rustdoc) and refine the policy
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Explicitly invoked only. Authoritative reference for the Ragu formal-verification project — Clean DSL semantics (Circuit monad, Expression, Operation, ProvableType, FormalCircuit) and Ragu-side concepts (extraction driver, formal instances, input/output serialization, assumptions, CI). Routes to the live in-tree FV docs; the docs are the spec, not opinion. Pair with /fv-review for opinion / pattern-matching guidance. Invoke when the user types `/fv-docs` or asks for the canonical definition of a Clean / Ragu-FV concept.
Explicitly invoked only. Lessons learned from porting Ragu Rust circuits to Clean Lean formal verification reimpls — when not to formalize an empty circuit, picking FormalCircuit vs FormalAssertion vs GeneralFormalCircuit, mirroring Rust delegation, length polymorphism, naming conventions, and reading proof failures (stuck goals, hypotheses you're forced to add) as under-constraint / undocumented-precondition bug signals. Distilled from PR review feedback (mitschabaude et al.) and refined over time. Do NOT auto-trigger on general formal verification, Lean, or Ragu questions; only invoke when the user explicitly types `/fv-review` or asks by name.
Explicitly invoked only. Loads context for the Verified-zkEVM `clean` codebase — an embedded Lean DSL for formally verified zk circuits (AIR/PLONK/R1CS) with Circuit monad, ProvableType/ProvableStruct, FormalCircuit (soundness/completeness), and gadget composition. Do NOT auto-trigger on general Lean, ZK, or circuit questions; only invoke when the user explicitly types `/clean-circuits` or asks by name to use this skill.
Review any part of the book using parallel specialist agents
Review code using parallel specialist agents
Show help for the book review pipeline
| name | doc-audit |
| description | Audit documentation surface placement (book vs. rustdoc) and refine the policy |
| user-invocable | true |
Audit documentation for surface placement violations — content that lives in the wrong place (book vs. rustdoc) per the project's surface placement policy. For each violation, the user decides whether to fix the content, refine the policy, or defer.
The user's $ARGUMENTS determine scope. Interpret them:
| Arguments | What to do |
|---|---|
| (empty) | Run git diff -- '*.rs' book/src/ and git diff --cached -- '*.rs' book/src/. Audit uncommitted documentation changes. If no changes, say so and stop. |
| A Rust file or module path | Read the rustdoc for that file/module. Find the corresponding book chapter(s) by following links or searching book/src/. Audit both sides. |
| A book chapter path | Read that chapter. Find the corresponding rustdoc by following links or searching for referenced types/traits. Audit both sides. |
| A concept or trait name (e.g., "Driver", "Gadget") | Search both rustdoc and book for all mentions. Audit the full documentation surface for that concept. |
| Multiple paths or concepts | Handle each, then audit for cross-cutting consistency. |
| A PR number or URL | Fetch the PR diff with gh pr diff. Audit documentation changes in the diff. |
If you're unsure what the user means, ask before launching agents.
.claude/review-shared/surface-placement.md (the policy).book/src/ and Rust source files.book/FIXME.md and extract the ###-level headings under
## Deferred Issues. These will be injected into agent prompts to prevent
re-raising known issues.Launch three general-purpose Task agents in parallel (model sonnet), each
with a different focus. Also run automated checks in parallel (see below).
You are auditing rustdoc (Rust doc comments) in the ragu project against its surface placement policy.
Read these files:
.claude/review-shared/surface-placement.md(the placement policy).claude/code-review/standards.md(master code review standards — for severity calibration and reviewer restraint)What to audit: {describe the rustdoc content — file paths, the diff, specific items}
{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 files. Flag contradictions, redundancies, or inconsistencies as they span these locations."}
Look for:
- Content in rustdoc that belongs in the book per the policy (math-heavy exposition, design rationale, cross-cutting composition guidance)
- Missing content that the policy requires in rustdoc (preconditions, postconditions, invariants, safety contracts, feature behavior)
- Missing links to book chapters where the policy requires them
Do NOT flag:
- Pre-existing issues on unmodified lines (unless the change introduced an inconsistency)
- Things that linters or compilers already catch
- Pedantic nitpicks not backed by the surface placement policy
- Code-local algorithm docs with math — the policy explicitly allows these
The following issues are already tracked and deferred. Do NOT raise findings that duplicate or overlap with these items: {bullet list of ### headings from book/FIXME.md}
For each finding:
- Location: file path and line number (or item name)
- Rule: which policy rule is violated (quote it)
- Issue: what's wrong, specifically
- Suggestion: a concrete fix — what to move, add, or remove
- Severity:
must-fixorsuggestionTool usage rules:
- Use the Grep tool for searching — do NOT run
greporrgvia Bash.- Use the Read tool to read files — do NOT use
cat,head, ortail.- Use the Glob tool to find files — do NOT use
findorls.- When you do use Bash, the command must be a clean shell command with NO comment lines (
#) prepended. Put your reasoning in thedescriptionparameter, not in the command itself.If you find no violations, say so — don't manufacture problems.
You are auditing book content in the ragu project against its surface placement policy.
Read these files:
.claude/review-shared/surface-placement.md(the placement policy).claude/book-review/standards.md(master book review standards — for severity calibration and reviewer restraint)What to audit: {describe the book content — file paths, the diff, specific sections}
{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 as they span these locations."}
Look for:
- Content in the book that belongs in rustdoc per the policy (precise API constraints stated only in the book, safety contracts, exact pre/postconditions)
- Content that duplicates rustdoc at the same register (same-register duplication, not informal restatement)
- Missing links to rustdoc items where the policy requires them
- Volatile, implementation-coupled details that belong in code docs
Do NOT flag:
- Pre-existing issues on unmodified lines (unless the change introduced an inconsistency)
- Informal restatements of API requirements that aid understanding — the policy explicitly allows these
- Pedantic nitpicks not backed by the surface placement policy
The following issues are already tracked and deferred. Do NOT raise findings that duplicate or overlap with these items: {bullet list of ### headings from book/FIXME.md}
For each finding:
- Location: file path and line number (or quoted text)
- Rule: which policy rule is violated (quote it)
- Issue: what's wrong, specifically
- Suggestion: a concrete fix — what to move, add, or remove
- Severity:
must-fixorsuggestionTool usage rules:
- Use the Grep tool for searching — do NOT run
greporrgvia Bash.- Use the Read tool to read files — do NOT use
cat,head, ortail.- Use the Glob tool to find files — do NOT use
findorls.- When you do use Bash, the command must be a clean shell command with NO comment lines (
#) prepended. Put your reasoning in thedescriptionparameter, not in the command itself.If you find no violations, say so — don't manufacture problems.
You are auditing cross-references between the book and rustdoc in the ragu project against its surface placement policy.
Read these files:
.claude/review-shared/surface-placement.md(the placement policy).claude/book-review/standards.md(for link integrity rules).claude/code-review/standards.md(for severity calibration)What to audit: {describe the scope — which files/concepts on both sides}
{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."}
Look for:
- Non-trivial claims with parallel full descriptions on both surfaces instead of canonical home + summary + link
- Duplicated fragments that are NOT tiny/drift-resistant
- Inconsistent notation or terminology between book and rustdoc for the same concept
- Rustdoc-to-book links that lack resilient summaries (the fragile direction — broken links should degrade gracefully)
Do NOT flag:
- Pre-existing issues on unmodified lines (unless the change introduced an inconsistency)
- Tiny, drift-resistant duplications (one-line definitions, single formulas, short warnings) — the policy explicitly allows these
The following issues are already tracked and deferred. Do NOT raise findings that duplicate or overlap with these items: {bullet list of ### headings from book/FIXME.md}
For each finding:
- Location: both sides — the book location and the rustdoc location
- Rule: which policy rule is violated (quote it)
- Issue: what's wrong, specifically
- Suggestion: a concrete fix
- Severity:
must-fixorsuggestionTool usage rules:
- Use the Grep tool for searching — do NOT run
greporrgvia Bash.- Use the Read tool to read files — do NOT use
cat,head, ortail.- Use the Glob tool to find files — do NOT use
findorls.- When you do use Bash, the command must be a clean shell command with NO comment lines (
#) prepended. Put your reasoning in thedescriptionparameter, not in the command itself.If you find no violations, say so — don't manufacture problems.
Launch ALL three agents in parallel.
In parallel with the agents, run:
python3 qa/book/broken_links.py — catches broken cross-surface linksRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all --document-private-items
— catches broken intra-doc linksIf either fails to run, note the failure but do not block the review. Include any findings alongside agent results in synthesis.
Once all agents return, organize findings by location. If multiple agents
flagged overlapping concerns, merge them. Before presenting, read
book/FIXME.md and remove any finding that substantially overlaps with an
already-deferred issue. Present:
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.
Launch validation agents. Fixes may touch rustdoc or book content, so validate against both review systems:
.claude/code-review/*.md file except standards.md, launch
a general-purpose Task agent (model sonnet)..claude/book-review/*.md file except standards.md, launch
a general-purpose Task agent (model sonnet).Give each agent this prompt:
You are validating a set of proposed documentation changes against review policies.
Read these files:
.claude/{code-review or book-review}/standards.md(master standards).claude/{code-review or book-review}/{focus}.md(your policy).claude/review-shared/surface-placement.md(placement policy) {if focus is "documentation" (code-review) or any book-review policy, also include:}.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, the master standards, or the surface placement policy. 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
greporrgas a Bash command.- Use the Read tool to read files — do NOT use
cat,head, ortail.- Use the Glob tool to find files — do NOT use
findorls.- When you do use Bash, the command must be a clean shell command with NO comment lines (
#) prepended. Put your reasoning in thedescriptionparameter, 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 any suggestions were corrected, briefly note it in the synthesis output.
Two modes based on how the audit was invoked:
Use AskUserQuestion to let the user decide the disposition of each finding (or group of related findings). For each, offer:
/book-refine or /code-refine passbook/FIXME.md for future attentionIf there are many findings, batch them into logical groups.
#123 or PR URL)Use AskUserQuestion to let the user decide whether to post a synthesis comment
on the PR via gh pr comment. Format findings as a numbered list with code
links using the full commit SHA and line ranges (L[start]-L[end]).
For each finding the user chose to fix:
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all --document-private-items
(if rustdoc was modified)python3 qa/book/broken_links.py (if book was modified)For each finding the user chose to defer:
book/FIXME.md.### 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.###-level subsection under
## Deferred Issues, following the existing format: a short descriptive
heading, then a concise paragraph explaining the issue and its location.For each finding the user chose to refine:
Collect the findings and the user's reasoning (why the rule is wrong or too
strict). Then tell the user to run /book-refine or /code-refine with that
context — surface-placement.md lives in review-shared/, so either refine
skill can update it. Provide the specific findings and reasoning so the user
can paste them as arguments.
Do NOT modify .claude/review-shared/surface-placement.md directly. Policy
changes have wide blast radius (both review systems read the file) and require
the plan-mode, generalization, and system-wide audit steps that the dedicated
refine skills provide.
The goal is to iteratively tighten the policy: each audit round either fixes violations or trims rules that don't hold up, converging toward a small, enforceable set.
Tell the user:
book/FIXME.md/book-refine or /code-refine invocation