Give the judge what the project records and ten times more of the chunk's transcript
This commit is contained in:
@@ -4,7 +4,9 @@ usage: loop-claude <task>
|
||||
|
||||
Run it anywhere inside a project checkout whose README.md has ## Goals and ## Audience, the
|
||||
premises; the task runs at the checkout root. Each cycle a worker runs the task; a judge then reads
|
||||
the transcript against the premises and rules whether the chunk, the work of one PR, is finished.
|
||||
the transcript's last 400,000 characters against the premises and the project's records, AGENTS.md,
|
||||
docs/decisions.md and docs/decisions/*.md where they exist, and rules whether the chunk, the work of
|
||||
one PR, is finished. A choice the premises or the records settle is not asked again.
|
||||
A question only the human can answer, or a release ready to cut, is an interrupt: `claude --resume`
|
||||
on the terminal, every worktree first marked trusted in ~/.claude.json. An unfinished chunk resumes
|
||||
its session next cycle; the next chunk starts a fresh session.
|
||||
@@ -34,6 +36,7 @@ Exit 1, saying why, when:
|
||||
- no task is given
|
||||
- git cannot start or finds no checkout
|
||||
- README.md holds no premises
|
||||
- AGENTS.md or a decision file cannot be read, or is not UTF-8
|
||||
- the models file cannot be read or written
|
||||
- claude leaves no transcript
|
||||
- a transcript cannot be read or archived
|
||||
@@ -71,6 +74,7 @@ from loop_claude.paths import Paths
|
||||
from loop_claude.project.checkout import checkout_root, project_key
|
||||
from loop_claude.project.model_choice import get_or_ask_models
|
||||
from loop_claude.project.premises import read_premises
|
||||
from loop_claude.project.records import read_records
|
||||
from loop_claude.stop import Stop
|
||||
|
||||
|
||||
@@ -98,11 +102,14 @@ def run_loop(argv: list[str], env: typing.Mapping[str, str], paths: Paths, launc
|
||||
premises = read_premises(loop_run.root)
|
||||
if isinstance(premises, Stop):
|
||||
return premises
|
||||
records = read_records(loop_run.root)
|
||||
if isinstance(records, Stop):
|
||||
return records
|
||||
models = get_or_ask_models(key, paths, env, effects)
|
||||
if isinstance(models, Stop):
|
||||
return models
|
||||
print(f"\n=== cycle {loop_run.cycle_number} ===", flush=True)
|
||||
if stop := run_cycle(Cycle(effects=effects, models=models, paths=paths, premises=premises, project_key=key, root=loop_run.root, session=session, task=loop_run.task)):
|
||||
if stop := run_cycle(Cycle(effects=effects, models=models, paths=paths, premises=premises, project_key=key, records=records, root=loop_run.root, session=session, task=loop_run.task)):
|
||||
return stop
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user