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
demonstrative-is = true
filler-adverbs = true          # quietly, actually, really, simply, essentially, ...
weasel-connectives = true      # which means, in turn, the reality is, ...
banned-flourish = true         # worth noting, to be clear, at the end of the day, ...
negation-pair = true           # "not X, not Y"
symmetric-negation = true      # "fine if X, wrong if Y" / "not X but Y"
which-chain = true             # 3+ "which" in a single sentence
but-opener = true              # short sentences starting with "But"
aphorism = true                # "X does not Y." one-liners
summary-capstone = true        # paragraph-final "That is the X."
declarative-callback = true    # paragraph-final fragment callbacks
three-beat = true              # 3 consecutive short sentences in a paragraph

[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.2.0.tar.gz (181.7 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.2.0-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

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

Uploaded Python 3musllinux: musl 1.2+ ARM64

dslop-0.2.0-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.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

dslop-0.2.0-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.2.0.tar.gz.

File metadata

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

File hashes

Hashes for dslop-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9df8eace39f1e472a0937392352e819c33c64d7132e53ccdcec24dbc82c005cd
MD5 96615861434d8d4cf2a395ad8ff8d0de
BLAKE2b-256 7c250b70e6936ccfc682f984dc828749c9828d0e6b609051dec5c9fc56b0275d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dslop-0.2.0-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.2.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 3cbae23b05b8e36bd0771dc87f90e894b3f4f3c7de08b3347a82cbebe9325a96
MD5 9fe0244982fbce3358b62abeb4e3910a
BLAKE2b-256 adabf36f501fe830dc6356fa42b7a96690db18af5fbaaf9d62a8e892e84db8b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 08c846c49dfbb7c7ecc9387079926d348cf3feae6de47fca0de655f268e9e416
MD5 fe0c2c2604342ce60c6db6aa91f35d9e
BLAKE2b-256 cbe8d9f2caa502309d953c63226928ba3b177da4ce00901b954d5318b73e3bbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 6ee033e7b39e6f9ce5960298d03e506b234a913c425e48c866d5830809d0acb4
MD5 a894d7e4cfa8cd4c5b645f4c7279aed0
BLAKE2b-256 6017a8e3a7dbb47abcec261e7a1d61009ddd30d29f42625c0cc2368efa4c6289

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 191de36cccb8095a0b3ba1e823a4a20544cd47a2c44e43a82da99a28930eac42
MD5 12bf3595c3c6aad1a67b81429c0b1ee1
BLAKE2b-256 d5054bbb11193c18f605d4c9c5d1b9192f0bb435b2885acd75dda89dd1eaa827

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8c1cbdb409ce0b7006ee0a48e70a3189f4643f27151d622c63e64da7123e6653
MD5 c3ede13aa762ef253fe12a9c204e316b
BLAKE2b-256 f325d69d3ffeb7b5007c0f01450d28d0b9f2ec7839452113b7e2fe936b0f2967

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f9c382463206c9543fd4c965a5cbf0e437cc3ce5d1accff0c0c7dcefd96ddfc6
MD5 13f6837fdb29574ce89d54ddc90fd046
BLAKE2b-256 f930f4ae7d6662f1ab7ebe180b2b33d96e2a0acf5fe2224895869f353f8268ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 95ff612c0fe3e904b9e10e06d971b8c3cac126f2f0f24bafbdc62b61e9172999
MD5 9da6f16c6708518f047da9e7548dcd44
BLAKE2b-256 edab50ca9aec521cf44c10e56687e016f0739902e499a07f3030bf60956ff0c6

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