{"id":50503194,"url":"https://github.com/JordanGunn/agent-slop-lint","last_synced_at":"2026-06-19T07:00:37.255Z","repository":{"id":350576232,"uuid":"1207439429","full_name":"JordanGunn/agent-slop-lint","owner":"JordanGunn","description":"Language-agnostic code quality linter for the agentic era. Catches structural, lexical, and information based rot before it becomes architectural.","archived":false,"fork":false,"pushed_at":"2026-05-30T07:23:09.000Z","size":1743,"stargazers_count":31,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-30T10:22:41.046Z","etag":null,"topics":["agents","ai-slop","antipatterns","ast","complexity","fd","linter","precommit-hook","ripgrep","skill","slop","tree-sitter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JordanGunn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATIONS.md","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-11T00:16:24.000Z","updated_at":"2026-05-27T11:49:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"986656da-8f4e-4fc2-8e91-23f2b564fe68","html_url":"https://github.com/JordanGunn/agent-slop-lint","commit_stats":null,"previous_names":["jordangunn/agent-slop-lint"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/JordanGunn/agent-slop-lint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JordanGunn%2Fagent-slop-lint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JordanGunn%2Fagent-slop-lint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JordanGunn%2Fagent-slop-lint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JordanGunn%2Fagent-slop-lint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JordanGunn","download_url":"https://codeload.github.com/JordanGunn/agent-slop-lint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JordanGunn%2Fagent-slop-lint/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34520432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","ai-slop","antipatterns","ast","complexity","fd","linter","precommit-hook","ripgrep","skill","slop","tree-sitter"],"created_at":"2026-06-02T13:30:32.505Z","updated_at":"2026-06-19T07:00:37.239Z","avatar_url":"https://github.com/JordanGunn.png","language":"Python","funding_links":[],"categories":["Starter Stacks"],"sub_categories":["Code / PR / Team Governance"],"readme":"# slop\n\nA code quality linter for codebases where AI agents are writing most of the diffs.\n\n[![PyPI](https://img.shields.io/pypi/v/agent-slop-lint)](https://pypi.org/project/agent-slop-lint/)\n[![Python](https://img.shields.io/pypi/pyversions/agent-slop-lint)](https://pypi.org/project/agent-slop-lint/)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)\n\nStatic-analysis defaults were calibrated for codebases where a productive human wrote ~100 lines on a busy day and another human reviewed every one. An agent can drop that much into a single file before emitting its first status message, and the damage — deep coupling, WMC-heavy classes, duplicated handlers, files that grow 500 LOC in a week, identifier soup that bloats every downstream prompt — lands inside one session rather than over quarters. `slop` runs well-cited metrics across three substrates — structural (McCabe, Chidamber \u0026 Kemerer, Nejmeh, Martin, Tornhill, Campbell), information-theoretic (Halstead), and lexical (identifier vocabulary) — at thresholds tuned for that pace.\n\n## Example\n\n```\n$ slop lint\n\nslop 1.0.0 — scanning .\n\nstructural.complexity\n  cyclomatic\n    ✗ src/pipeline/ingest.py:44 process_batch — CCX 18 exceeds 10\n    ✗ src/pipeline/ingest.py:112 _normalize_rows — CCX 14 exceeds 10\n  cognitive\n    ✗ src/pipeline/ingest.py:44 process_batch — CogC 26 exceeds 15\n  3 violations, 142 checked\n\nstructural.hotspots (14 days ago, 87 commits)\n  ✗ src/pipeline/transformation.py — CCX=45, growth +367 LOC\n  ✗ src/lifecycle/tasks/write.py — CCX=41, growth +556 LOC\n  2 violations\n\nstructural.duplication\n  ⚠ . — clone density 7.2% exceeds threshold 5.0% (12 cloned functions across 4 clusters)\n  ⚠ src/api/handlers/users.py:88 update_user — function 'update_user' is a Type-2 clone (fingerprint a3b1c4d2f001) — also at: src/api/handlers/orgs.py:74, src/api/handlers/teams.py:81\n  2 violations\n\ninformation.volume\n  ✗ src/pipeline/ingest.py:44 process_batch — Volume 2147 exceeds 1500\n  1 violation, 412 checked\n\ninformation.magic_literals\n  ⚠ src/billing/discount.py:31 apply_promo — 'apply_promo' contains 5 distinct magic numeric literals (threshold: 3): 7, 14, 30, 86400, 0.15\n  1 violation\n\nlexical.stutter\n  ⚠ src/services/user_service.py:47 user_update_user_profile — identifier 'user_update_user_profile' repeats tokens ['user'] from enclosing class 'UserService'\n  ⚠ src/services/user_service.py:91 get_user_user_id — identifier 'get_user_user_id' repeats tokens ['user'] from enclosing class 'UserService'\n  2 violations, 412 checked\n\n────────────────────────────────────────\n6 violations | 5 advisories | 22 rules checked | FAIL\n```\n\nExit `0` clean, `1` on violations, `2` on error. Works in CI, pre-commit, and interactively.\n\n## Install\n\n```bash\npip install agent-slop-lint\n```\n\nslop shells out to `rg`, `fd`, and `git`. Install via your system package manager (`apt install ripgrep fd-find git`, `brew install ripgrep fd git`, or equivalent) and run `slop doctor` to verify. Full per-platform steps, CI recipes, and pre-commit wiring are in the [setup guide](./docs/SETUP.md).\n\n## Rules\n\nslop ships 25 rules across three suites:\n\n- **`structural.*`** — control-flow complexity, CK class metrics, hotspots, package distance, dependency cycles, duplication, god modules, type-discipline rules.\n- **`information.*`** — Halstead volume and difficulty, magic literals, section-divider comments.\n- **`lexical.*`** — identifier verbosity, tersity, and stutter against the enclosing scope.\n\nThe full rule index with default thresholds, citations, and per-rule pages lives in [`docs/rules/`](./docs/rules/README.md). For threshold tuning and the `default` / `lax` / `strict` profiles, see the [configuration reference](./docs/CONFIG.md).\n\n## Languages\n\n| Language | Complexity | Hotspots | Packages | Deps | Class |\n|---|---|---|---|---|---|\n| Python, JavaScript, TypeScript, Go, Java, C# | yes | yes | yes | yes | yes |\n| Rust | yes | yes | yes | — | yes |\n| Julia | yes | yes | yes | yes | — |\n| C | yes | yes | yes (warn) | yes (best-effort) | — |\n| C++ | yes | yes | yes | yes (best-effort) | yes |\n| Ruby | yes | yes | yes (warn) | yes (best-effort) | yes |\n\nLanguage-specific caveats (JavaScript packages, Rust deps, Julia CK metrics, C class metrics, C/C++ `-I`-path resolution and out-of-line method attribution, Ruby type-discipline rules silent-skip and open-class WMC aggregation) are documented in [docs/C.md](./docs/C.md), [docs/CPP.md](./docs/CPP.md), [docs/JULIA.md](./docs/JULIA.md), [docs/RUBY.md](./docs/RUBY.md), and the relevant rule pages.\n\n## CLI\n\n```\nslop lint                         Run all enabled rules\nslop check \u003ccategory|rule\u003e        Run one category or rule\nslop init [default|lax|strict]    Generate .slop.toml\nslop doctor                       Check fd, rg, git are installed\nslop hook                         Install a git pre-commit hook\nslop skill \u003cdir\u003e                  Install the bundled agent skill\nslop rules                        List rules with thresholds\nslop schema                       Config schema as JSON\n```\n\nOutput formats are `--output human` (default), `--output json` (CI and agents), and `--output quiet`. Run `slop --help` for the full flag list.\n\n## Configuration\n\nslop walks upward from CWD looking for `.slop.toml` first, then `pyproject.toml` with a `[tool.slop]` table — the same discovery ruff and mypy use. `root` resolves relative to the config file's directory. `--config` and `--root` on the CLI override both.\n\n```bash\nslop init          # balanced defaults\nslop init lax      # legacy or gradual adoption\nslop init strict   # greenfield or quality-focused\n```\n\nEvery threshold, profile, and waiver mechanism is documented in the [configuration reference](./docs/CONFIG.md).\n\n## Architecture\n\nslop ships its own discovery primitives and metric kernels. Each rule is a thin wrapper that loads config, calls a deterministic kernel, and emits `Violation` objects for threshold breaches. Primitives are organised by substrate — `_fs` (fd), `_text` (ripgrep), `_ast` (tree-sitter) — with cross-tool primitives in `_compose` and metric kernels in `_structural` and `_lexical`. One `pip install` gives you the whole thing; no companion runtime.\n\n## Acknowledgments\n\nslop implements metrics from McCabe, Halstead, Chidamber \u0026 Kemerer, Nejmeh, Martin, Lakos, Tornhill, and Campbell. Full bibliography in [NOTICE](NOTICE). AI assistance and contributor credits in [CITATIONS.md](CITATIONS.md).\n\n## Further reading\n\n- [Configuration reference](./docs/CONFIG.md) — thresholds, profiles, waivers.\n- [Setup guide](./docs/SETUP.md) — install, CI, pre-commit, agent skill.\n- [Rule index](./docs/rules/README.md) — every rule, every page.\n- [Design philosophy](./docs/philosophy/) — why these metrics, why external.\n- [Changelog](./CHANGELOG.md)\n\n## License\n\nApache 2.0. See [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJordanGunn%2Fagent-slop-lint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJordanGunn%2Fagent-slop-lint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJordanGunn%2Fagent-slop-lint/lists"}