CLI · Python · no dependencies

The scanner.

scan.py is the deterministic regex scanner that powers the verdict. It catches the mechanical patterns; reading is required for the qualitative ones.

What it does

  • +Detects 40+ patterns mechanically. The rest in patterns.md are qualitative-only.
  • +Counts every vocabulary tell with severity (H/M/L).
  • +Computes density per 500 words and returns a verdict (PASS / LOW / MEDIUM / HIGH / CRITICAL).
  • +Reports burstiness, contraction ratio, detected genre, likely model fingerprint.
  • +Flags compound triggers, the uncanny-valley pattern, sanded-prose signatures.
  • +Pure Python. No deps. ~50KB script.

Run it locally

terminal
# Grab the script
curl -O https://raw.githubusercontent.com/MahmoudHalat/slop-cop/main/scripts/scan.py

# Run on a file
python3 scan.py path/to/draft.md

# JSON output (programmatic use)
python3 scan.py --json path/to/draft.md

# One-screen output (for embedding)
python3 scan.py --quick path/to/draft.md

# Override genre detection
python3 scan.py --genre academic path/to/draft.md
python3 scan.py --genre marketing path/to/draft.md

# Strict em-dash mode (Mahmoud's voice rule)
python3 scan.py --strict-em-dash path/to/draft.md

# Pipe text directly
echo "your draft" | python3 scan.py

Why no in-browser scanner?

This Lovable project deploys to Cloudflare Workers, which can't execute Python. The scanner stays a CLI tool. Clone it and run it locally, or read the source to understand the logic.

Read the source