ScopeProof
AI coding agents start focused, then drift. ScopeProof keeps their changes inside your project's scope.
It checks agent-generated diffs for needless modules, duplicate abstractions, scope escape, orphan files, changed-file growth, parse errors, and public API growth.
No LLM required. No cloud. No vendor lock-in.
Problem
Small requested changes can quietly become new service layers, duplicate classes, unrelated file edits, or public APIs that were never part of the task. ScopeProof is a deterministic CLI guardrail for catching those signals before merge.
What ScopeProof Checks
scope_escape: changed files outside task paths or inside forbidden pathsmodule_sprawl: too many new files or suspicious new moduleschanged_file_growth: too many changed files for one taskparse_error: changed Python files that cannot be parsedduplicate_symbol: new public symbols that resemble existing symbolsorphan_new_file: new production Python files that are not imported or testedpublic_api_growth: excessive public class/function growth for one task
Installation
Install from PyPI (Python 3.11+):
pip install scopeproof
To try the latest unreleased changes from GitHub:
pip install git+https://github.com/SomeTimeDev/scopeproof.git
For local development:
pip install -e ".[dev]"
Quickstart
scopeproof init
scopeproof prompt "Add CSV export support"
scopeproof check --base HEAD
To check exactly what is staged for the next commit:
git add .
scopeproof check --staged
For stricter projects, start with fail-on defaults for every drift check:
scopeproof init --strict
Local working-tree checks include untracked files by default. A new untracked Python module is
treated as an added file, so scopeproof check --base HEAD catches drift before you remember to
run git add. Use --staged when you want to ignore unstaged/untracked experiments and check only
the Git index.
For pull requests:
scopeproof check --base origin/main --head HEAD
Example scopeproof.yml
version: 1
project:
name: "demo"
mission: "CLI for exporting structured data."
rules:
max_changed_files_per_task: 8
max_new_files_per_task: 1
duplicate_symbol_similarity: 0.82
fail_on_module_sprawl: true
fail_on_changed_file_growth: false
extension_points:
- name: "Exporters"
keywords: ["export", "csv"]
prefer_existing_paths:
- "src/**/exporters/**"
allow_new_files_under:
- "src/**/exporters/**"
- "tests/**"
Example .scopeproof/task.yml
goal: "Add CSV export support"
allowed_paths:
- "src/**/exporters/**"
- "tests/**"
forbidden_paths:
- "src/**/services/**"
prefer_modify:
- "src/demo/exporters/base.py"
expected_behavior:
- "Use the existing exporter interface."
verification:
- "pytest -q"
Example Report
ScopeProof Report
Project: demo
Task: Add CSV export support
Diff: HEAD -> working tree
FAIL scope_escape
src/demo/services/csv_export_service.py: Changed file matches a forbidden task path.
FAIL module_sprawl
src/demo/services/csv_export_service.py: New file was added outside matched extension point paths.
Overall: FAIL
GitHub Actions
name: ScopeProof
on:
pull_request:
jobs:
scopeproof:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install scopeproof
- run: scopeproof check --base origin/main --head HEAD --format markdown --output scopeproof-report.md
ScopeProof does not post PR comments yet.
Philosophy And Limitations
ScopeProof does not prove semantic correctness. It catches deterministic drift signals:
- changed files outside allowed paths
- too many files changed for one task
- Python syntax errors in changed files
- suspicious new modules
- duplicated-looking symbols
- orphan new files
- unexpected public API growth
It currently indexes Python with the standard library ast module. Non-Python files can be checked
for path scope, but not for symbol-level behavior.
Roadmap
- TypeScript/JavaScript indexing
- GitHub PR comments
- Layer/import violation checks
- Optional hook examples
License
MIT
Metadata
Release files for scopeproof 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scopeproof-0.1.5.tar.gz | 27.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scopeproof-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.4 kB
Release files / scopeproof-0.1.5.tar.gz
| Download URL | scopeproof-0.1.5.tar.gz |
|---|---|
| Size | 27.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b8169c6190240f39282d611f83431ed378628ee7bd2bfe939c951ae1464fd7e
|
|
BLAKE2b-256 checksum How to use checksums |
296db527f3773d80eedc6a27c88cb70b42336a20d1a8b632102603302d598005
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.
Transparency logRelease files / scopeproof-0.1.5-py3-none-any.whl
| Download URL | scopeproof-0.1.5-py3-none-any.whl |
|---|---|
| Size | 30.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
968beb079acfd1d3db0cde553cccb21ca57216dc8021d66c6a664d6ce8b0c8f5
|
|
BLAKE2b-256 checksum How to use checksums |
9ae363662e99cd54ed8f667df62443d0e37db83d2f6ef4740dd76206ddafd1a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.
Transparency log