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, ...
banned-negation = true         # "not" / "n't"
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.1.tar.gz (181.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.2.1-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3musllinux: musl 1.2+ x86-64

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

Uploaded Python 3musllinux: musl 1.2+ ARM64

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

Uploaded Python 3manylinux: glibc 2.17+ ARM64

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

Uploaded Python 3macOS 11.0+ ARM64

dslop-0.2.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.2.1.tar.gz.

File metadata

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

File hashes

Hashes for dslop-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2c7a22e4eec5ccce0e5bd027a7d7283a410e0e44d5d1f67ae01d8cbf65eba5ea
MD5 f0e77775ce62d711931b031590314bf6
BLAKE2b-256 4abb177478d2b8a1060a7b1a62a9dc78ee6d0d9164c375ab5c8be3392248e5be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dslop-0.2.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.2.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ab0cba4f6f54dd2288e4076f7deb7b4d6a9315949634e7a9ceaa1d9f614529d0
MD5 1b317fc2299e75c5af79880ed395ac7a
BLAKE2b-256 033b6a2ca7f89bc147fc9d7b54ddac35b0c9bdc9fd15ff637ebf0ad3677266cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.1-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 994a175fd4bb05132b74738c09bdb0da5a98fc3a578eff373476559a7f92fd6d
MD5 5ac5cef6f48751c226d6c46f60a7e8fd
BLAKE2b-256 fdce702b9b145d1561c928c6d179998e665562197cf4e2b79336d3cfa59e99ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.1-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 aab4eca171e43580e655f1279b88c0cccfabd7593e1d48be4be6e5170abfafac
MD5 b0a140c2a7d075dcf9ac7f011860cb2d
BLAKE2b-256 399b6b205386e43cfc601623fed8225909fa51ae8ae25f1eb104e319d41bddb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 170bba2425bb7c6b2a6bbeaa74bb6cb281a3d419f60e4599f6765a426aa39875
MD5 7797c68a9495a1cbf92a09d4cc32cae2
BLAKE2b-256 846d2362730b70cdedfa0f8a8104a930974c98db10b099e04f8351a1261e6c61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a57a857560b8526e2b44524e5cbe956a0ac06e33386426b55bfc2992d581e544
MD5 54fe0fd924566297f4952c88c27c0697
BLAKE2b-256 6a56c84ade55eeb65eaaac67ff64112ce254576ce34a5286de9fd2b4b06ed367

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c482a12f69a322444f7c126e66762888e2af428c85d49289be06564fe10d07e4
MD5 8961d3a8ad81d9a1d16b4c929761a2a7
BLAKE2b-256 7da48281b26565179583cfef994827abd6534f816f6d723726696847b70d8710

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dslop-0.2.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 56f65d980a31bf4235c6e9168a63e0025fc03171bf3c7702ac46c251d9baddba
MD5 ff9b1da72bb3755da9e5e52f1a9b6a32
BLAKE2b-256 2a351cac2eb0b6923889a54ec277838de377af34bcf1d9fc179e65cab46ec6aa

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