mechanical-preprocesslisted
Install: claude install-skill jodyjdc/ultimate-best-seller-studio
# Mechanical Preprocess
## PURPOSE
AI agents are bad at processing entire manuscripts for mechanical fixes. Context windows overflow, attention drifts, and the agent "forgets" the rules by chapter 15. This skill solves that by splitting the work:
- **Bash handles the 80%** — pattern matching, counting, safe replacements
- **AI handles the 20%** — judgment calls on ambiguous cases, reviewing diffs
This is the ONLY skill in the pipeline that uses bash scripting as its primary tool. It exists because some problems are engineering problems, not language problems.
## WHEN TO RUN
- **After:** All chapters have been through prose-craft (complete draft exists)
- **Before:** dialogue-polish, chaos-engine, or any AI-based editing pass
- **Trigger:** Orchestrator calls this once when the full manuscript draft is ready
- **Re-run:** After any major rewrite pass that may reintroduce mechanical patterns
## REQUIRED INPUTS
1. **Chapter files** — all chapter drafts in `chapters/` directory (e.g., `chapters/chapter-01.md` through `chapters/chapter-[N].md`)
2. **voice-dna.md** — for:
- Forbidden word list
- Em-dash policy (max per chapter, allowed contexts)
- Any other mechanical rules (e.g., max semicolons per chapter, banned constructions)
3. **foundation.md** — for genre context (affects which patterns are acceptable)
## PROCESS
### PHASE 1: SCAN (Pure bash -- no AI)
Run these scans against every chapter file. All commands use standard Unix tools (grep, wc, awk, sed).
*