Detect AI slop markers
Go to file
Dandaedre 30445d7983
Rust CI JohnSlop failed CI.
Gitea/john_slop/pipeline/head There was a failure building this commit Details
feat: default to colored miette diagnostics
2026-09-29 20:02:14 +02:00
assets feat: harden replacement engine 2026-09-29 16:41:22 +02:00
badges test: enforce ninety percent coverage floor 2026-09-29 18:18:43 +02:00
benches perf: add scaling benchmark suite 2026-09-29 17:36:49 +02:00
docs feat: default to colored miette diagnostics 2026-09-29 20:02:14 +02:00
examples docs: publish release-ready usage and config samples 2026-09-29 17:26:47 +02:00
fuzz build: reduce archive features and document dependency audit 2026-09-29 17:39:17 +02:00
scripts build: add reproducible release packaging 2026-09-29 17:44:06 +02:00
src feat: default to colored miette diagnostics 2026-09-29 20:02:14 +02:00
tests feat: default to colored miette diagnostics 2026-09-29 20:02:14 +02:00
.gitignore build: add reproducible release packaging 2026-09-29 17:44:06 +02:00
.run_status.toml feat: default to colored miette diagnostics 2026-09-29 20:02:14 +02:00
AGENTS.md test: complete configuration layer matrix 2026-09-29 13:33:20 +02:00
CHANGELOG.md build: add reproducible release packaging 2026-09-29 17:44:06 +02:00
CODE_OF_CONDUCT.md build: add reproducible release packaging 2026-09-29 17:44:06 +02:00
CONTRIBUTING.md build: add reproducible release packaging 2026-09-29 17:44:06 +02:00
Cargo.lock test: enforce heuristic false-positive sign-off 2026-09-29 17:47:13 +02:00
Cargo.toml test: enforce heuristic false-positive sign-off 2026-09-29 17:47:13 +02:00
Jenkinsfile ci: fix release stage Groovy parsing 2026-09-29 19:06:06 +02:00
LICENSE
…
README.md feat: default to colored miette diagnostics 2026-09-29 20:02:14 +02:00
SECURITY.md build: add reproducible release packaging 2026-09-29 17:44:06 +02:00
deny.toml build: reduce archive features and document dependency audit 2026-09-29 17:39:17 +02:00
tarpaulin.toml test: enforce ninety percent coverage floor 2026-09-29 18:18:43 +02:00
tasks.md feat: default to colored miette diagnostics 2026-09-29 20:02:14 +02:00

README.md

John Slop

version tests test coverage

John Slop is an early-stage, local-first linter for concrete signs of low-effort or insufficiently reviewed text and source code. It reports explainable heuristics for human review; it does not prove AI authorship or identify a model.

Today, the detector reads UTF-8 files, directories, ZIP archives, and common ZIP-based office documents. Eleven conservative, configurable rules cover copied assistant scaffolding, generic style residue, source-code placeholders, tutorial narration, and configured non-ASCII characters. Rules retain exact source spans, apply path/content scopes, and feed a bounded, explainable confidence score. The detector renders plain or graphical Miette diagnostics, concise records, or versioned JSON Lines. The formatter applies only configured Unicode-to-ASCII replacements, supports check/diff modes, and requires explicit opt-in for atomic file writes. The stdio LSP publishes those same replacement findings and versioned quick fixes in editors without writing files.

Install and quick start

Rust 1.98.1 or newer is required.

cargo install --git https://git.dandaedre.com/idle-org/john_slop \
  --locked --all-features

cargo run --bin john-slop -- path/to/document path/to/source-directory
cargo run --bin john-slop-fmt -- path/to/document
cargo run --bin john-slop-fmt -- --check path/to/document
cargo run --bin john-slop-lsp

Use --fail-confidence 0..100 to make the detector exit with status 1 when a document reaches a chosen evidence threshold. Confidence measures configured signals, not the probability that AI wrote the content.

Formatter file mode prints transformed text without modifying the source. Use --write explicitly for atomic in-place replacement, or pipe editor buffers through john-slop-fmt over stdin/stdout.

The detector defaults to colored graphical Miette diagnostics. Select --output human, --output concise, or --output json for uncolored plain or machine-readable output.

Editors start john-slop-lsp over stdio. It tracks open snapshots with full document synchronization, reports configured ASCII replacements, and offers quick fixes whose result matches the formatter. See the editor guide for Helix and Vim setup.

What it reports

John Slop looks for configured, reviewable evidence such as copied assistant scaffolding, knowledge-cutoff disclaimers, stock filler, unfinished source-code placeholders, tutorial narration, and Unicode punctuation covered by the ASCII replacement catalog. Every result includes the matching source span, rule ID, severity, message, and remediation help.

The confidence score aggregates those configured signals. It is not an AI-authorship probability, and a clean result does not prove human authorship or good quality. Legitimate transcripts, tutorials, multilingual text, and typographic punctuation can match. Review the source context before acting.

Configuration and operation

Configuration precedence is embedded defaults, platform user config.toml, an optional named <name>.toml, explicit --config, then CLI flags. Replacement and heuristic tables merge by stable ID. Commented base and named sample configs demonstrate disabling entries and overriding rules.

The detector accepts files, directories, stdin, ZIPs, and ZIP-based office documents. Its stable exit statuses are 0 below the selected threshold, 1 at or above it, and 2 for usage, configuration, or input failure. The formatter is read-only unless --write is explicit; the LSP never writes files.

Analysis is local, deterministic, and makes no network request or telemetry submission. Input text appears only in process memory and requested output. Archive limits, strict UTF-8 handling, and non-followed symlinks constrain untrusted inputs, but John Slop is not a sandbox or malware scanner.

Documentation

The ordered implementation plan lives in tasks.md, and contribution rules live in AGENTS.md.

John Slop is distributed under the MIT license.