← Products

CLI · Python

srclint

Traditional linters check whether a single file parses cleanly. srclint and cq check whether an entire repository is structured cleanly enough that an engineer or coding agent can find the right module on the first read.

uv tool install srclint
cqcq, run as a suite over a codebase.cq$cq srclint$
cq and srclint scanning a repository for oversized modules, circular imports, and stale ignore rules.

What makes a repository illegible

Across hundreds of recorded agent sessions, the failure mode is almost never syntax. Agents stall when a codebase accumulates parallel helpers that do the same job, unindexed files that exceed an agent’s single-read window, or stale .gitignore and prompt rules that point at deleted directories.

Check What it catches Why it matters for agents
token-budget Source files and fixtures exceeding o200k_base token thresholds Prevents a single file read from evicting architectural context
dead-context Unreferenced modules, orphan templates, and stale ignore entries Stops agents from editing dead code paths and parallel helpers
import-cycles Circular dependencies and boundary violations across packages Keeps subsystem dependency graphs shallow and predictable
doc-drift Broken path references and contradictory rules in repo Markdown Ensures instructions in AGENTS.md and docs match reality

Correlating static structure with agent transcripts

When paired with Fractal OS, srclint joins static repository checks against actual agent execution logs—highlighting the exact files where agents spend twenty turns reading without making an edit:

metadata-enforcermetadata-enforcer catching a field that drifted.metadata-enforcer$metadata-enforcer check --schema @v.schema
Enforcing frontmatter and documentation schemas alongside structural checks in CI.