Count lines of code per language, find duplicate code, rank files by code complexity, estimate the token count of a repository for AI agents, find stale comments, and decide which files are worth refactoring. Change coupling, agent-risk ratings, JSON output, CI exit codes, PR diff mode and an MCP server. A modern cloc alternative.
8 tools with consistent naming (verb_noun pattern: clines_*) and clear, domain-specific descriptions (avg 150 chars). All tools share identical input schemas with 4 parameters (dir, all, top, diff), each with descriptions. However, schemas lack required field declarations, type constraints on numeric params (top has no min/max), and output schemas are entirely undocumented. No error handling guidance, no parameter interdependencies documented, and no indication of which tools require git history vs read-only filesystem access. Tool descriptions are good but could better explain when to use each tool vs alternatives.
Rate how safe each file is for an AI coding agent to modify unattended, from complexity density, size and duplication. Use this to decide where to read the diff carefully.
Find comments the code beneath them has drifted away from, using git blame. Needs git history.
Count lines of code, comments and blanks per language, with the size distribution of the codebase.
Find files that keep changing together in git history, which reveals logical dependencies static analysis cannot see. Use this to explain why a file is expensive rather than merely busy. Needs git history.
Estimate how many tokens this codebase costs a language model to read, per file and per top-level directory. Use this to judge whether a repository fits a context window.
Rank files by decision-point complexity, with complexity per 100 lines so size and difficulty are separable.
Output schemas completely undocumented. LLMs cannot predict response structure, field types, or pagination behavior. Each tool returns different shapes (some with 'files', some with 'dirs', some with 'ranked') but no schema is published.
Input parameter 'top' (numeric) lacks min/max constraints. No validation shown; LLMs could pass negative, zero, or absurdly large values. Rubric baseline: numeric params must specify range (e.g. 1 - 100).
No error handling guidance. If git history is unavailable (clines_refactor, clines_coupling, clines_comments), the tool returns {unavailable: 'no-git'} but does not guide the LLM on recovery. Should suggest fallback tools or explain prerequisites.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | 2026-07-28+ | v2 |
Find duplicated code blocks and rank them by how many lines deduplicating would remove.
Decide which files are worth refactoring by weighing complexity against how often each file changes. Needs git history.
Parameter 'diff' (git ref) lacks format documentation. LLMs may pass invalid git refs. Should specify: 'A git ref (branch, tag, or commit SHA). E.g. main, v1.0.0, abc123def.'
Tool names do not clearly distinguish between analysis types. 'clines_cx' is cryptic (complexity?). Consider 'clines_complexity_rank' or 'clines_analyze_complexity' for clarity. Rubric baseline: names should be self-documenting.