diff --git a/bin/loop_claude/claude_runs/__init__.py b/bin/loop_claude/cycle/__init__.py similarity index 100% rename from bin/loop_claude/claude_runs/__init__.py rename to bin/loop_claude/cycle/__init__.py diff --git a/bin/loop_claude/archive.py b/bin/loop_claude/cycle/archive.py similarity index 100% rename from bin/loop_claude/archive.py rename to bin/loop_claude/cycle/archive.py diff --git a/bin/loop_claude/claude_runs/interrupt.py b/bin/loop_claude/cycle/interrupt.py similarity index 100% rename from bin/loop_claude/claude_runs/interrupt.py rename to bin/loop_claude/cycle/interrupt.py diff --git a/bin/loop_claude/claude_runs/judge.py b/bin/loop_claude/cycle/judge.py similarity index 99% rename from bin/loop_claude/claude_runs/judge.py rename to bin/loop_claude/cycle/judge.py index a9a9052d..655a715b 100644 --- a/bin/loop_claude/claude_runs/judge.py +++ b/bin/loop_claude/cycle/judge.py @@ -4,8 +4,8 @@ import subprocess import typing from loop_claude.claude_code.formats import structured_output +from loop_claude.cycle.retry import retried from loop_claude.outcome import Failure -from loop_claude.retry import retried JUDGE_RULES = ( "Decide whether the human must now be interrupted. interrupt=true when any of these appear:\n" diff --git a/bin/loop_claude/retry.py b/bin/loop_claude/cycle/retry.py similarity index 100% rename from bin/loop_claude/retry.py rename to bin/loop_claude/cycle/retry.py diff --git a/bin/loop_claude/cycle.py b/bin/loop_claude/cycle/run.py similarity index 87% rename from bin/loop_claude/cycle.py rename to bin/loop_claude/cycle/run.py index 997f0e65..6106448d 100644 --- a/bin/loop_claude/cycle.py +++ b/bin/loop_claude/cycle/run.py @@ -1,15 +1,15 @@ import dataclasses -from loop_claude.archive import archive from loop_claude.claude_code.session import Session, delete_session, transcript_file from loop_claude.claude_code.transcript import read, render -from loop_claude.claude_runs.interrupt import interrupt -from loop_claude.claude_runs.judge import judge -from loop_claude.claude_runs.worker import run_worker, worker_args +from loop_claude.cycle.archive import archive +from loop_claude.cycle.interrupt import interrupt +from loop_claude.cycle.judge import judge +from loop_claude.cycle.retry import retried +from loop_claude.cycle.worker import run_worker, worker_args from loop_claude.outcome import Failure, Stop from loop_claude.paths import Paths from loop_claude.project.models import Models -from loop_claude.retry import retried @dataclasses.dataclass(frozen=True) diff --git a/bin/loop_claude/claude_runs/worker.py b/bin/loop_claude/cycle/worker.py similarity index 100% rename from bin/loop_claude/claude_runs/worker.py rename to bin/loop_claude/cycle/worker.py diff --git a/bin/loop_claude/main.py b/bin/loop_claude/main.py index e791e300..85cc8328 100644 --- a/bin/loop_claude/main.py +++ b/bin/loop_claude/main.py @@ -37,7 +37,7 @@ import dataclasses import sys from loop_claude.claude_code.session import session_for -from loop_claude.cycle import Cycle, run_cycle +from loop_claude.cycle.run import Cycle, run_cycle from loop_claude.outcome import Stop from loop_claude.project.checkout import checkout_root, project_name from loop_claude.project.models import project_models diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 52004cc1..fa0a4475 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -10,7 +10,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) from loop_claude import file_writes, main, reload from loop_claude.claude_code import formats, transcript -from loop_claude.claude_runs import judge +from loop_claude.cycle import judge from loop_claude.outcome import Failure, Stop from loop_claude.project import premises diff --git a/todo.md b/todo.md index 79f50f58..30ae1786 100644 --- a/todo.md +++ b/todo.md @@ -8,7 +8,6 @@ The rebuild lifts every dimension, one chunk per item, until the last item opens The places the panel on `rebuild` at 2f9ab2f named (`docs/decisions.md`), capping dimension first: -- **Group `bin/loop_claude/`'s top-level modules, and name `claude_runs` apart from `claude_code`.** Two seats: eleven modules of mixed altitude side by side. - **Say at `written_by_human` why a `<` prefix marks Claude Code's own entry, and at `trust` why a failure only warns.** Three seats found either only in `CHANGELOG.md`. - **Say in the README why the tests run on the host and need `uv`.** Two seats: `CLAUDE.md` says never run a runtime on the host, and only `test_python_floor.py` says what `uv` is for. - **Score `rebuild` with the four-seat panel at 7.0 or above on every dimension and the overall, none below the last run, and open its PR into main for the human.** ⚠️ Leave that PR ready and unmerged: only the human merges it, after approving the whole rebuild. A dimension under the floor gets its places filed above this item.