S.C.R.U.B.

•
1
•

Automates code quality tasks by combining deterministic tools with local LLMs, significantly reducing cloud model token usage.

S.C.R.U.B. (Source Code Review, Uplift, and Baselining) addresses the inefficiency of cloud LLMs on high-volume, low-reasoning code quality tasks like generating docstrings, fixing linting, or adding type annotations. It offloads this work to a local, deterministic-first pipeline, leveraging 16 specialized tools. By first processing code with deterministic tools (like Ruff and pyright) and then using a local LLM (via DSPy) for remaining tasks, S.C.R.U.B. ensures consistent quality, saves cloud tokens, and frees large language models to focus on higher-level planning and review, rather than boilerplate generation.

Key Features

01Three-tier pre-filtering system to minimize LLM inference, only engaging local models for necessary tasks.
02Teacher-student optimization for local LLM prompts, compiling highly effective prompts with one-time cloud model input.
03Structural laziness enforcement, guiding cloud LLMs to orchestrate tasks through S.C.R.U.B. tools rather than generating boilerplate.
04Deterministic-first code processing with 16 specialized tools for linting, typing, security, and more.
050 GitHub stars
06Batched DSPy calls to a local LLM, optimizing performance and reducing round trips for code generation.

Use Cases

01Automating code hygiene tasks like docstring and type annotation generation across large codebases.
02Reducing cloud LLM operational costs for code quality and refactoring workflows.
03Enhancing DevSecOps by integrating static analysis, vulnerability scanning, and SBOM generation into development cycles.