Answer the architecture pass's first round
This commit is contained in:
@@ -30,12 +30,12 @@ Exit 2: the human is needed, to pick the model or answer an interrupt, and stdin
|
||||
terminal, the input ends, or the interrupt ended with nothing typed. Rerunning resumes any
|
||||
open session.
|
||||
|
||||
Each project has one session, "A <path> loop-claude", <path> being the checkout relative to ~/code,
|
||||
Each project has one session, "A <key> loop-claude", <key> being the checkout relative to ~/code,
|
||||
or to / outside it, deleted when the chunk finishes. At every interrupt and when the chunk finishes
|
||||
its transcript is copied to $LOOP_CLAUDE_TRANSCRIPTS/<path>/<sha256>.jsonl (default
|
||||
its transcript is copied to $LOOP_CLAUDE_TRANSCRIPTS/<key>/<sha256>.jsonl (default
|
||||
~/.claude/loop-claude-transcripts), the verdict beside it in <sha256>.verdict.md.
|
||||
|
||||
Every claude it starts runs the project's model, saved per <path> in ~/.claude/loop-claude-models.json
|
||||
Every claude it starts runs the project's model, saved per <key> in ~/.claude/loop-claude-models.json
|
||||
and read each cycle; a project without an entry, as on its first run, is asked for one.
|
||||
LOOP_CLAUDE_JUDGE_MODEL overrides it for the judge, LOOP_CLAUDE_WORKER_MODEL for the worker and the
|
||||
interrupt; with both set, nothing is asked.
|
||||
@@ -54,7 +54,7 @@ from loop_claude.effects import Effects
|
||||
from loop_claude.loop.reload import RELOAD_FLAG, LoopRun, decode_handed, exec_if_edited, fingerprint
|
||||
from loop_claude.paths import Paths
|
||||
from loop_claude.project.checkout import checkout_root, project_key
|
||||
from loop_claude.project.models import models_for
|
||||
from loop_claude.project.model_choice import get_or_ask_models
|
||||
from loop_claude.project.premises import read_premises
|
||||
from loop_claude.stop import Stop
|
||||
|
||||
@@ -83,7 +83,7 @@ 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
|
||||
models = models_for(key, paths, env, effects)
|
||||
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)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
"""A loop runs unattended for hours, often on its own checkout: a reload puts an edit to loop-claude to work at the next cycle without the human rerunning it."""
|
||||
import dataclasses
|
||||
import hashlib
|
||||
import json
|
||||
@@ -46,6 +45,7 @@ def fingerprint(launcher: pathlib.Path) -> str:
|
||||
return digest.hexdigest()
|
||||
|
||||
|
||||
# A loop runs unattended for hours, often on its own checkout: a reload puts an edit to loop-claude to work without the human rerunning it.
|
||||
def exec_if_edited(launcher: pathlib.Path, baseline: str, loop_run: LoopRun, effects: Effects) -> Stop | None:
|
||||
if fingerprint(launcher) == baseline:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user