Skip to main content

Detect AI writing patterns (slop) in your codebase

Project description

dslop

Detect AI writing patterns (slop) in your codebase.

dslop is a fast CLI linter for prose. It flags telltale LLM writing patterns (em-dashes, double-hyphen dashes, "it's not X, it's Y" constructions) and statistical tells (uniform sentence rhythm, flat word-frequency distributions) that human writing rarely produces.

Install

pip install dslop
# or
uvx dslop .

Use

dslop                       # check current directory
dslop README.md docs/       # check specific paths
dslop --config dslop.toml   # use a specific config

# Read from stdin:
echo "It's not a tool — it's a platform." | dslop -
pbpaste | dslop                                         # clipboard
git show HEAD:README.md | dslop                         # a past revision

Exits non-zero on violations, so it drops into CI or pre-commit unchanged.

Pre-commit

repos:
  - repo: https://github.com/prefectlabs/dslop
    rev: v0.1.0
    hooks:
      - id: dslop

Configure

Create dslop.toml at your repo root:

[patterns]
em-dash = true
double-hyphen = true
contrastive = true

[metrics]
sentence-length-cv = 0.3
sentence-length-kurtosis = 1.5

[metrics.word-freq-dispersion]
threshold = 0.6
chunk-size = 200
top-n = 20

Each metric accepts a threshold (f64) or false to disable.

License

Apache-2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dslop-0.1.1.tar.gz (176.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dslop-0.1.1-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

dslop-0.1.1-py3-none-musllinux_1_2_x86_64.whl (1.3 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

dslop-0.1.1-py3-none-musllinux_1_2_aarch64.whl (1.2 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

dslop-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

dslop-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

dslop-0.1.1-py3-none-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

dslop-0.1.1-py3-none-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file dslop-0.1.1.tar.gz.

File metadata

  • Download URL: dslop-0.1.1.tar.gz
  • Upload date:
  • Size: 176.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for dslop-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6a6caa4788a777676f401c827733726061877d7601767cb28ae7690074a9746f
MD5 4495ffa0d1f1bd784653984fa857c348
BLAKE2b-256 185c8807b1e5229e8f8719aa12164f1e0035adcba00a6693e3d0c2798dce563f

See more details on using hashes here.

File details

Details for the file dslop-0.1.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: dslop-0.1.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for dslop-0.1.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 824efb27b8c5cc35db9175fb664d0195b7e86972abe6d96bf3945a33a89837e9
MD5 6984fe2cc0eb594ea6daccce4f659c90
BLAKE2b-256 1949dcf167c395b6558ed72f369253351e6f5fd906bacfb86c65e3f6a2c24cc7

See more details on using hashes here.

File details

Details for the file dslop-0.1.1-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for dslop-0.1.1-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5ff095df137aef48256b6b5fdc5261839827fe81ddd40f15441c6d1b01bce0e1
MD5 27ce9319b71935560ede1bdab3987408
BLAKE2b-256 c4021e1e28484d7bb297b23b4810a84b50f840d247a3f46a0714049edac5321a

See more details on using hashes here.

File details

Details for the file dslop-0.1.1-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for dslop-0.1.1-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 48f53258e550749ea6a43b258087610b1c8e94f5fb46bafd441acdde2d0a551c
MD5 c35760f16b6c97e05d3891e69f16c49d
BLAKE2b-256 ede25117dfa4382c2f09e32bc41d24f0583309ed213d03dcded77f825ba9aaa3

See more details on using hashes here.

File details

Details for the file dslop-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dslop-0.1.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1dd37feceffa32db13d68311e88dacd07a1d705256b4b2e0c5315c2523e1d0a3
MD5 11df76344ab121be2942dc2fd76201fb
BLAKE2b-256 c84aeb70fe1c449bb56fb507828cc0bfe12edca9b9c08fa4d1e7a7bd13278242

See more details on using hashes here.

File details

Details for the file dslop-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dslop-0.1.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2684e2ee3d6317f663a72a41518b78b8d78517b56c4a6dcd90e717a0a0ee5117
MD5 358b7bca9d160937237acf3d83a3dc76
BLAKE2b-256 7c06b2731a963b0dd9033444906cb98b3255276d25ba002037a471a8da79097c

See more details on using hashes here.

File details

Details for the file dslop-0.1.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dslop-0.1.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e7ba8c0bdb04def0d3ae6e51b0c999ab8e041fea5d17e441b040510364385e84
MD5 4721aa25e26ca65935bd34e1d85d4021
BLAKE2b-256 cfb88b3e416efc6670ef0dc902b72e24bab29ffdd9842686682390206194d84e

See more details on using hashes here.

File details

Details for the file dslop-0.1.1-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for dslop-0.1.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 91a3a5473b458cf14f487906af621748dd838d09ee624ea1d846b5a044a987d7
MD5 bdccfe8353ced321000d06e245ecd030
BLAKE2b-256 59d141fdf12506d59fb3880067166647d1fd35ad9cc2d3f45a16d777da3ea24e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page