Run Claude Code in a fix-break loop until your codebase is clean
Project description
███████╗████████╗ ██████╗██╗ ██╗
██╔════╝╚══██╔══╝██╔════╝██║ ██║
█████╗ ██║ ██║ ███████║
██╔══╝ ██║ ██║ ██╔══██║
███████╗ ██║ ╚██████╗██║ ██║
╚══════╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ loop
Run Claude Code in a scan-fix-break loop until your codebase is clean.
┌─ etch loop v0.2.0 . ───────────────────────────────────────────────┐
│ │
│ - iteration 1 │
│ + scanner issues found src/auth.py:42 — no empty token check │
│ + fixer committed fix(edge): guard empty token in auth │
│ x breaker issues unguarded access still reachable │
│ │
│ - iteration 2 │
│ + scanner issues found src/auth.py:61 — missing None check │
│ + fixer committed fix(edge): null guard on session obj │
│ > breaker running ░░░░░░▓▒ ░░░░░░░░░░░░░░░░░░░░░░░░░░ │
│ │
├──────────────────────────────────────────────────────────────────────┤
│ iterations 2 fixes 2 breaker issues 1 1m 48s elapsed │
└──────────────────────────────────────────────────────────────────────┘
install
uv tool install etch-loop
usage
etch init # analyze codebase with Claude, write prompt files
etch run # start the loop
etch run "the auth module" # focus on a specific area
etch run -n 5 # max 5 iterations
etch run --dry-run # preview prompt, don't run
etch run --verbose # show full Claude output
how it works
Each iteration has three phases: scan → fix → break.
- Scanner reads the codebase and outputs a specific list of issues — file paths, line numbers, descriptions
- If the scanner finds nothing, the loop stops
- Fixer receives the scanner's list and fixes those exact issues, then commits
- Breaker adversarially reviews the full codebase, looking for anything missed or newly introduced
- If the breaker finds nothing, the loop stops — clean pass
- If the breaker finds something, it's fed back to the next iteration's fixer
┌─ done ───────────────────────────────────────────────────┐
│ │
│ iterations 3 │
│ fixes 3 │
│ breaker issues 1 │
│ elapsed 2m 44s │
│ │
└──────────────────────────────────────────────────────────┘
etch init
etch init runs Claude against your codebase before writing any files. It reads your source, detects the languages and structure, and generates three prompt files tailored to your project — no placeholders to edit.
┌─ etch init v0.2.0 ───────────────────────────────────────┐
│ > analyzing ░░░░░▓▒ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
│ + analyzed codebase │
│ + SCAN.md │
│ + ETCH.md │
│ + BREAK.md │
└──────────────────────────────────────────────────────────┘
SCAN.md — tells the scanner what to look for and how to report findings.
ETCH.md — tells the fixer how to fix things: surgical, no refactoring, one fix per commit.
BREAK.md — tells the breaker to scan the full codebase adversarially and report anything that could go wrong.
All three files are editable. Use etch run "focus description" to narrow the scope without editing files.
requirements
- Python 3.11+
claudeCLI installed and authenticated- A git repository (etch-loop commits each fix automatically)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file etch_loop-0.4.2.tar.gz.
File metadata
- Download URL: etch_loop-0.4.2.tar.gz
- Upload date:
- Size: 23.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6feb634023817fb3d990eac75a95c1a0247e5369a2ea653897106c4ee094c627
|
|
| MD5 |
af10ea00ac67bc3ad549f7d65c75fd0d
|
|
| BLAKE2b-256 |
76e105d33dd6bb33fcd0d25bf05a201eb204c08cd5381a1844388002a7cf143f
|
Provenance
The following attestation bundles were made for etch_loop-0.4.2.tar.gz:
Publisher:
workflow.yml on lauenborg/etch-loop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
etch_loop-0.4.2.tar.gz -
Subject digest:
6feb634023817fb3d990eac75a95c1a0247e5369a2ea653897106c4ee094c627 - Sigstore transparency entry: 1074823979
- Sigstore integration time:
-
Permalink:
lauenborg/etch-loop@c5e4fb0bb500b3b80a439df0054efb9391bea14f -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/lauenborg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@c5e4fb0bb500b3b80a439df0054efb9391bea14f -
Trigger Event:
push
-
Statement type:
File details
Details for the file etch_loop-0.4.2-py3-none-any.whl.
File metadata
- Download URL: etch_loop-0.4.2-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b8d418fa5f0394b9b282dad2f4bced3fa67f175e32790d1664bab6f14e95020
|
|
| MD5 |
c1cf5860055601e8414b01a9c37b9d9d
|
|
| BLAKE2b-256 |
c24974d60a60d71158341c32b9c88ac4c50bd0d6f3577d4610dacff0b5586454
|
Provenance
The following attestation bundles were made for etch_loop-0.4.2-py3-none-any.whl:
Publisher:
workflow.yml on lauenborg/etch-loop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
etch_loop-0.4.2-py3-none-any.whl -
Subject digest:
7b8d418fa5f0394b9b282dad2f4bced3fa67f175e32790d1664bab6f14e95020 - Sigstore transparency entry: 1074824022
- Sigstore integration time:
-
Permalink:
lauenborg/etch-loop@c5e4fb0bb500b3b80a439df0054efb9391bea14f -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/lauenborg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@c5e4fb0bb500b3b80a439df0054efb9391bea14f -
Trigger Event:
push
-
Statement type: