LaTeX: native section splitting (preserves raw LaTeX, no pandoc)
HTML/docx/PDF: markdown conversion
Sentence splitting (one sentence per line, preserving math blocks)
Symbol table extraction (via edsl, or regex fallback)
Step 4: Create review structure
mkdir -p .review/chunks .review/holistic
Verify that .review/issue_spotters/ was created by the r2 CLI launcher. If not, check the system prompt for the issue spotters path and copy them manually.
List the available issue spotters and tell the user they can customize them before running /broad-sweep:
ls .review/issue_spotters/
Create a .gitignore that excludes .env:
echo".env" > .gitignore
Step 5: Write overview.json
Write .review/overview.json summarizing what was found:
{"manuscript_format":"<format>","sections_parsed": <N>,"symbols_extracted": <N>,"has_code":true|false,"has_data":true|false,"issue_spotters":["<list of spotter names>"]}
Step 6: Commit
git add -A
git commit -m "review: setup for <repo>@<sha>"
Report what was found: manuscript format, whether code/data exist, number of sections parsed, number of symbols extracted, and the list of issue spotters available.