diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f840b26..39c05c75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased - larv-review runs `/security-review` in a subagent, so the run goes on to the next pass without you prompting it. +- larv-review asks once before the full security scan: it states the evidence and its recommendation, and `claude-security`'s cost prompt is the ask. - `loop-claude` accepts the judge's quote of the transcript when it elides with an ellipsis and the transcript holds each fragment in order. The transcript the judge reads, and the worker's printed output, show tool input with its non-ASCII characters as written, so the judge can quote it. - Unless another Exempt reason fits, larv-review marks a `todo.md` item filed from a 🟡 finding against `~/.claude/principles/` with `principle`, an Exempt reason that keeps it whatever its score. - `loop-claude`'s judge reads the project's `AGENTS.md` and `docs/decisions.md` beside the README's goals and audience, and does not interrupt for a choice they settle. When the worker asks a question that the README or those files answer, the worker resumes with the judge's quote of the answer, which `loop-claude` prints. A quote they do not hold word for word is dropped, and the question goes to you. So does a question asked again after its answer. The fourth question they answer in one cycle goes to you too, with the quote. The judge reads as much of the transcript's end as fits a 400,000-character prompt, up from the last 40,000 characters. `loop-claude` exits 1 when `AGENTS.md` or `docs/decisions.md` cannot be read or is not UTF-8. diff --git a/bin/loop_claude/cycle/archive.py b/bin/loop_claude/cycle/archive.py index 987fa3a1..03f1b4a7 100644 --- a/bin/loop_claude/cycle/archive.py +++ b/bin/loop_claude/cycle/archive.py @@ -3,11 +3,11 @@ import os import pathlib import sys -from loop_claude.claude_code.session import session_files -from loop_claude.claude_code.transcript import first_timestamped_line from loop_claude.failure import Failure +from loop_claude.claude_code.transcript import first_timestamped_line from loop_claude.file_writes import make_private, replace_file from loop_claude.paths import Paths +from loop_claude.claude_code.session import session_files def archive(project_key: str, path: str, task: str, outcome: str, paths: Paths) -> Failure | None: diff --git a/bin/loop_claude/cycle/interrupt.py b/bin/loop_claude/cycle/interrupt.py index 12279394..d36ee638 100644 --- a/bin/loop_claude/cycle/interrupt.py +++ b/bin/loop_claude/cycle/interrupt.py @@ -1,13 +1,13 @@ import sys import uuid -from loop_claude.claude_code.transcript import human_turns, read_transcript -from loop_claude.claude_code.trust import trust from loop_claude.effects import Effects from loop_claude.failure import Failure +from loop_claude.claude_code.transcript import human_turns, read_transcript +from loop_claude.stop import needs_human, needs_terminal, Stop from loop_claude.paths import Paths +from loop_claude.claude_code.trust import trust from loop_claude.project.checkout import worktrees -from loop_claude.stop import Stop, needs_human, needs_terminal ANSWER_QUESTION = "answer the question above" diff --git a/bin/loop_claude/cycle/judge.py b/bin/loop_claude/cycle/judge.py index bf7fd6c5..7d7d5062 100644 --- a/bin/loop_claude/cycle/judge.py +++ b/bin/loop_claude/cycle/judge.py @@ -3,12 +3,12 @@ import json import re import typing +from loop_claude.effects import Effects +from loop_claude.failure import Failure +from loop_claude.cycle.verdicts import Finished, Interrupt, QuotedAnswer, Unfinished, Verdict from loop_claude.claude_code.entries import hit_limit, limit_said, parse_entry, structured_output from loop_claude.cycle.limited import Limited from loop_claude.cycle.retry import retried -from loop_claude.cycle.verdicts import Finished, Interrupt, QuotedAnswer, Unfinished, Verdict -from loop_claude.effects import Effects -from loop_claude.failure import Failure from loop_claude.stop import Stop # At 3 to 4 characters a token, 100,000 to 133,000 tokens, which leaves a 200,000-token context room for the reply; the largest session rendered here was 364,000 characters on 2026-10-03. @@ -21,9 +21,9 @@ JUDGE_RULES = ( "- it carried on under an assumption that decides the deliverable, that the human could " "reasonably reject and that neither README.md nor the project's records settle; a caveat about " "transient state it then handled is not one\n" - "- it is blocked on something only the human can supply: a credential, a version bump, a release " - "ready to cut, a choice outside the repo\n" - "- it flags that the goals, the plan or the task itself is unclear, missing or in need of change\n" + "- it is blocked on something only the human can supply: a credential, a version bump, a choice " + "outside the repo, or a release ready to cut, which only the human may publish\n" + "- it flags that the goals, the plan in todo.md or the task itself is unclear, missing or in need of change\n" "- it chose between alternatives that neither README.md nor the project's records discriminate " "between - neither rules the rejected one out - and the choice materially changes the deliverable\n" "interrupt=false otherwise. Bookkeeping the agent settled silently - what to document, wording, " @@ -36,6 +36,7 @@ JUDGE_RULES = ( "Where README.md or the project's records answer the agent's own question and no [loop] line has " "quoted that answer yet, set interrupt=false, put that question in question and quote the passage that answers it in answer, verbatim; the agent is " "then given that passage in place of the human's reply.\n" + "The chunk is the piece of work the agent is on, shipped as one pull request. " "finished=true when the chunk is complete: merged, or nothing remains that the agent could do on " "its own. finished=false when work remains that a further run can continue: an open PR, a review " "not yet run, CI not yet reported." @@ -60,6 +61,7 @@ JUDGE_SCHEMA = { def judge(root: str, task: str, premises: str, records: str, rendered_transcript: str, model: str, effects: Effects) -> Verdict | Stop: + # --json-schema has claude check its reply against the schema and return it as the json result's structured_output. # No tools, so the verdict rests on the transcript grounded() checks it against; no persistence, so its runs stay out of the session picker. args = [ "-p", diff --git a/bin/loop_claude/cycle/retry.py b/bin/loop_claude/cycle/retry.py index f4be7406..c6a52464 100644 --- a/bin/loop_claude/cycle/retry.py +++ b/bin/loop_claude/cycle/retry.py @@ -1,9 +1,9 @@ import sys import typing -from loop_claude.cycle.limited import Limited from loop_claude.effects import Effects from loop_claude.failure import Failure +from loop_claude.cycle.limited import Limited from loop_claude.stop import Stop T = typing.TypeVar("T") diff --git a/bin/loop_claude/cycle/run.py b/bin/loop_claude/cycle/run.py index 413a04c8..898f168a 100644 --- a/bin/loop_claude/cycle/run.py +++ b/bin/loop_claude/cycle/run.py @@ -1,20 +1,20 @@ import dataclasses import typing -from loop_claude.claude_code.session import Session, delete_session, session_open, transcript_file -from loop_claude.claude_code.transcript import read_transcript, render +from loop_claude.cycle.states import Active, Archived, Closing, Ended, Event, HumanAnswered, Interrupting, Judging, Ruled, State, transition, WorkerRan, Working 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.states import Active, Archived, Closing, Ended, Event, HumanAnswered, Interrupting, Judging, Ruled, State, WorkerRan, Working, transition -from loop_claude.cycle.verdicts import Finished, QuotedAnswer, Unfinished -from loop_claude.cycle.worker import run_worker, worker_args +from loop_claude.claude_code.session import delete_session, Session, session_open, transcript_file from loop_claude.effects import Effects from loop_claude.failure import Failure -from loop_claude.paths import Paths +from loop_claude.cycle.verdicts import Finished, QuotedAnswer, Unfinished +from loop_claude.cycle.interrupt import interrupt +from loop_claude.cycle.judge import judge from loop_claude.project.model_choice import Models +from loop_claude.paths import Paths from loop_claude.project.records import QUOTE_SOURCES +from loop_claude.claude_code.transcript import read_transcript, render +from loop_claude.cycle.retry import retried +from loop_claude.cycle.worker import run_worker, worker_args from loop_claude.stop import Stop diff --git a/bin/loop_claude/cycle/worker.py b/bin/loop_claude/cycle/worker.py index a268e800..fd6013c4 100644 --- a/bin/loop_claude/cycle/worker.py +++ b/bin/loop_claude/cycle/worker.py @@ -1,11 +1,11 @@ from loop_claude.claude_code.entries import assistant_parts, ends_stream, hit_limit, limit_said, parse_entry, rejected_until -from loop_claude.claude_code.session import Session -from loop_claude.claude_code.transcript import part_line -from loop_claude.cycle.limited import Limited -from loop_claude.cycle.verdicts import QuotedAnswer from loop_claude.effects import Effects from loop_claude.failure import Failure +from loop_claude.cycle.limited import Limited +from loop_claude.claude_code.transcript import part_line from loop_claude.project.records import QUOTE_SOURCES +from loop_claude.cycle.verdicts import QuotedAnswer +from loop_claude.claude_code.session import Session PRINTED_TOOL_INPUT = 160 @@ -45,7 +45,9 @@ def worker_args(task: str, session: Session, model: str, resuming: bool, answere elif resuming: start = ["-p", "Continue the task; the previous run stopped before it was finished.", "--resume", str(session.id)] else: + # --session-id creates the session under the id loop-claude keeps; --resume continues that session. start = ["-p", f"{task}\n\nContinue any open draft PR or worktree for the chunk before creating a new one.", "--name", session.name, "--session-id", str(session.id)] + # -p fails without --verbose under stream-json. return [ *start, "--output-format", "stream-json", diff --git a/bin/loop_claude/loop/main.py b/bin/loop_claude/loop/main.py index 2bed2325..489b76f8 100644 --- a/bin/loop_claude/loop/main.py +++ b/bin/loop_claude/loop/main.py @@ -71,15 +71,15 @@ import pathlib import sys import typing -from loop_claude.claude_code.session import session_for -from loop_claude.cycle.run import Cycle, run_cycle -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.cycle.run import Cycle, run_cycle +from loop_claude.loop.reload import decode_handed, exec_if_edited, fingerprint, LoopRun, RELOAD_FLAG +from loop_claude.effects import Effects from loop_claude.project.model_choice import get_or_ask_models +from loop_claude.paths import Paths from loop_claude.project.premises import read_premises from loop_claude.project.records import read_records +from loop_claude.claude_code.session import session_for from loop_claude.stop import Stop diff --git a/bin/loop_claude/project/model_choice.py b/bin/loop_claude/project/model_choice.py index c7b36882..53868918 100644 --- a/bin/loop_claude/project/model_choice.py +++ b/bin/loop_claude/project/model_choice.py @@ -7,9 +7,9 @@ import typing from loop_claude.claude_code.model_catalog import catalog_models from loop_claude.effects import Effects from loop_claude.failure import Failure -from loop_claude.file_writes import replace_json +from loop_claude.stop import needs_human, needs_terminal, Stop from loop_claude.paths import Paths -from loop_claude.stop import Stop, needs_human, needs_terminal +from loop_claude.file_writes import replace_json @dataclasses.dataclass(frozen=True) diff --git a/bin/loop_claude/project/premises.py b/bin/loop_claude/project/premises.py index 45b080f4..5f3f02c7 100644 --- a/bin/loop_claude/project/premises.py +++ b/bin/loop_claude/project/premises.py @@ -1,5 +1,5 @@ -from loop_claude.markdown_sections import sections from loop_claude.project.checkout import read_checkout_file +from loop_claude.markdown_sections import sections from loop_claude.stop import Stop diff --git a/bin/rank_todo.py b/bin/rank_todo.py index f6dfdb92..8b9d0848 100755 --- a/bin/rank_todo.py +++ b/bin/rank_todo.py @@ -59,8 +59,8 @@ import sys # Kept inside loop_claude/ so reload's fingerprint covers them. from loop_claude.failure import Failure -from loop_claude.file_writes import replace_file from loop_claude.markdown_sections import FENCE, sections +from loop_claude.file_writes import replace_file EXEMPTIONS = ("", "decision", "defect", "principle", "question", "security") ITEMS_HEADER = "| ID | Release | Exempt | Item | R | S | A | G | Goals | Score |" diff --git a/bin/test_import_order.py b/bin/test_import_order.py new file mode 100644 index 00000000..5226d508 --- /dev/null +++ b/bin/test_import_order.py @@ -0,0 +1,29 @@ +import ast +import subprocess +import unittest + +from test_python_floor import ROOT + + +def bound(node: ast.Import | ast.ImportFrom) -> list[str]: + return [alias.asname or alias.name for alias in node.names] + + +def unsorted_imports(source: str) -> list[int]: + """The line numbers of imports whose names are out of order, or whose first name sorts before the first name of the import on the line above, ignoring case.""" + imports = [node for node in ast.parse(source).body if isinstance(node, ast.Import | ast.ImportFrom)] + names_out = [node.lineno for node in imports if bound(node) != sorted(bound(node), key=str.casefold)] + lines_out = [node.lineno for above, node in zip(imports, imports[1:]) if node.lineno == above.end_lineno + 1 and bound(node)[0].casefold() < bound(above)[0].casefold()] + return sorted(set(names_out + lines_out)) + + +class ImportOrder(unittest.TestCase): + def test_each_python_file_sorts_its_imports_by_their_first_binding(self): + listed = subprocess.run(["git", "ls-files", "*.py", "bin/loop-claude"], capture_output=True, check=True, cwd=ROOT, text=True).stdout.split() + self.assertIn("bin/loop-claude", listed) + for name in listed: + with self.subTest(name): + self.assertEqual(unsorted_imports((ROOT / name).read_text(encoding="utf-8")), []) + + def test_a_case_insensitive_name_out_of_order_is_found(self): + self.assertEqual(unsorted_imports("import B\nimport a\n\nfrom x import C, b\n"), [2, 4]) diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 9c9e6442..32e38ace 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -16,15 +16,15 @@ import uuid sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) -from loop_claude import file_writes, markdown_sections, paths -from loop_claude.claude_code import entries, session, transcript, trust from loop_claude.cycle import archive, interrupt, judge, retry, run, states, worker -from loop_claude.cycle.limited import Limited -from loop_claude.cycle.verdicts import Finished, Interrupt, QuotedAnswer, Unfinished -from loop_claude.effects import Effects -from loop_claude.failure import Failure -from loop_claude.loop import main, reload from loop_claude.project import checkout, model_choice, records +from loop_claude.effects import Effects +from loop_claude.claude_code import entries, session, transcript, trust +from loop_claude.failure import Failure +from loop_claude import file_writes, markdown_sections, paths +from loop_claude.cycle.verdicts import Finished, Interrupt, QuotedAnswer, Unfinished +from loop_claude.cycle.limited import Limited +from loop_claude.loop import main, reload from loop_claude.stop import Stop CWD = pathlib.Path("/c") diff --git a/bin/test_rank_todo.py b/bin/test_rank_todo.py index 2dde07f0..c7430f75 100644 --- a/bin/test_rank_todo.py +++ b/bin/test_rank_todo.py @@ -7,8 +7,8 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) -import rank_todo from loop_claude.failure import Failure +import rank_todo from test_python_floor import ROOT README = "# P\n\n## Goals\n\n1. Fast.\n2. Correct.\n 1. Tested.\n\n## Audience\n\nMe.\n" diff --git a/bin/test_statusline.py b/bin/test_statusline.py index 6460f565..79e59a4f 100644 --- a/bin/test_statusline.py +++ b/bin/test_statusline.py @@ -9,8 +9,8 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) -import statusline from statusline import CYAN, DIM, GREEN, RED, RESET, YELLOW +import statusline NOW = datetime.datetime(2026, 10, 2, 12, 0, tzinfo=datetime.timezone.utc) EPOCH = int(NOW.timestamp()) diff --git a/bin/test_types.py b/bin/test_types.py index ccb3160f..e071bb85 100644 --- a/bin/test_types.py +++ b/bin/test_types.py @@ -2,7 +2,7 @@ import shutil import subprocess import unittest -from test_python_floor import ROOT, readme_floor +from test_python_floor import readme_floor, ROOT class Types(unittest.TestCase): diff --git a/docs/decisions.md b/docs/decisions.md index 626cd016..0fdf8f01 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -32,9 +32,9 @@ ## comprehension floor: every dimension and the overall at 7.0 or above, and 0.1.0 waits on it -2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 4. The 2026-09-28 run, Junior A, Mid A, the maintainability senior and the inherited architect at depth 1 over every non-test file, blind to `todo.md` and this log, scored Navigation 7.25, Locality 6.0, Shape 6.5, Self-sufficiency 6.25, overall 6.25; on 2026-09-26 they were 7.75, 6.25, 7.0, 6.75, 6.75. Every seat scored Locality 6, and three of four named `run_cycle`'s three-way return and larv-review's re-entry rules, split across the passes on 2026-09-28. The same seats on `rebuild` scored 7.5, 6.63, 6.88, 6.5, 7.0 at 37edc9a, later that day, 7.5, 6.75, 6.88, 6.75, 7.0 at 7f9de5c, 7.38, 6.25, 6.88, 6.75, 6.88 at 2f9ab2f on 2026-09-29, Locality lowest again and every seat naming the reload state and the two retry counters, and 7.5, 7.0, 7.25, 6.75, 7.13 at 2c74bbc later that day, Self-sufficiency lowest and every seat naming the round's definition split across larv-review's two files, and 7.38, 6.75, 7.25, 6.5, 6.88 at 8585257 on 2026-10-01, lowering every dimension but Shape, and the overall, Self-sufficiency lowest and every seat naming larv-review §3's round rules; the places it named under Self-sufficiency and Locality are filed in `todo.md` under 0.1.0, and a later scoring run may not score any dimension or the overall below its best run on `rebuild`, 2026-10-01, lilleman. `rebuild` merged into main under the floor at 8585257's scores, 2026-10-01, lilleman. The 2026-10-01 run on PR #182 (the loop state machine) scored 7.5, 6.5, 6.88, 6.25, 6.38; lilleman shipped that PR under the floor and below `rebuild`'s best run the same day, its places filed in `todo.md` under 0.1.0. The 2026-10-02 run on PR #187 (`loop_claude`'s names, the exit contract) scored 7.75, 7.25, 7.38, 6.88, 7.25 at 70362d0, every seat naming larv-review §3 under Self-sufficiency, and 7.63, 7.13, 7.38, 7.0, 7.13 at 1971dba later that day, the first run at the floor, with no dimension or the overall below its best run on `rebuild`. The 2026-10-02 runs on PR #191 (the status line in Python) scored 7.5, 7.0, 7.13, 6.88, 7.13; 7.25, 6.75, 7.25, 6.88, 7.0; 7.63, 6.88, 7.38, 7.0, 7.13; and 7.63, 7.0, 7.25, 6.75, 7.25. Every seat rated the status line easy. The places they named under Locality and Self-sufficiency are filed in `todo.md` under 0.1.0, except `entries.py`'s heuristics over Claude Code's transcript format, which the seats scored as the problem's own difficulty. lilleman decided the same day to ship that PR under the floor. The 2026-10-02 runs on PR #194 (each cycle's transcript archived) scored 8.0, 7.25, 7.38, 7.13, 7.5 at 6ccd5b1 and 7.75, 7.13, 7.25, 7.0, 7.25 at d104ea0, both at the floor, every seat naming `archive` as the unit it would least want to modify. On 2026-10-02, applying `todo.md`'s bar deleted every place these scoring runs filed except `todo.md` items 13 and 17. The 2026-10-02 runs on PR #196 (`todo.md` as one scored table) scored 7.63, 6.88, 7.25, 6.88, 7.13 at c0dba66; 7.5, 6.88, 7.13, 6.75, 7.0 at 798dfd7; and 7.5, 7.0, 7.0, 6.75, 7.0 at b712076. Under Self-sufficiency, every seat named larv-review §3 and the agents, which a reader follows only with `CLAUDE.md` open. lilleman decided the same day to ship that PR under the floor; the place filed is `todo.md` item 13. The 2026-10-02 run on PR #198 (a usage limit waited out) scored 7.63, 6.88, 7.38, 6.75, 7.13 at 8e85033. Under Self-sufficiency, every seat named larv-review §3, which `todo.md` item 13 covers; under Locality, they named `archive`'s invariants spread over `session.py` and `run.py`, `rank_todo.py` reaching into `premises.sections`, and `stopped` comparing reason strings, each under `todo.md`'s bar and not filed. lilleman decided the same day to ship that PR under the floor. +2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 4. The 2026-09-28 run, Junior A, Mid A, the maintainability senior and the inherited architect at depth 1 over every non-test file, blind to `todo.md` and this log, scored Navigation 7.25, Locality 6.0, Shape 6.5, Self-sufficiency 6.25, overall 6.25; on 2026-09-26 they were 7.75, 6.25, 7.0, 6.75, 6.75. Every seat scored Locality 6, and three of four named `run_cycle`'s three-way return and larv-review's re-entry rules, split across the passes on 2026-09-28. The same seats on `rebuild` scored 7.5, 6.63, 6.88, 6.5, 7.0 at 37edc9a, later that day, 7.5, 6.75, 6.88, 6.75, 7.0 at 7f9de5c, 7.38, 6.25, 6.88, 6.75, 6.88 at 2f9ab2f on 2026-09-29, Locality lowest again and every seat naming the reload state and the two retry counters, and 7.5, 7.0, 7.25, 6.75, 7.13 at 2c74bbc later that day, Self-sufficiency lowest and every seat naming the round's definition split across larv-review's two files, and 7.38, 6.75, 7.25, 6.5, 6.88 at 8585257 on 2026-10-01, lowering every dimension but Shape, and the overall, Self-sufficiency lowest and every seat naming larv-review §3's round rules; the places it named under Self-sufficiency and Locality are filed in `todo.md` under 0.1.0, and a later scoring run may not score any dimension or the overall below its best run on `rebuild`, 2026-10-01, lilleman. `rebuild` merged into main under the floor at 8585257's scores, 2026-10-01, lilleman. The 2026-10-01 run on PR #182 (the loop state machine) scored 7.5, 6.5, 6.88, 6.25, 6.38; lilleman shipped that PR under the floor and below `rebuild`'s best run the same day, its places filed in `todo.md` under 0.1.0. The 2026-10-02 run on PR #187 (`loop_claude`'s names, the exit contract) scored 7.75, 7.25, 7.38, 6.88, 7.25 at 70362d0, every seat naming larv-review §3 under Self-sufficiency, and 7.63, 7.13, 7.38, 7.0, 7.13 at 1971dba later that day, the first run at the floor, with no dimension or the overall below its best run on `rebuild`. The 2026-10-02 runs on PR #191 (the status line in Python) scored 7.5, 7.0, 7.13, 6.88, 7.13; 7.25, 6.75, 7.25, 6.88, 7.0; 7.63, 6.88, 7.38, 7.0, 7.13; and 7.63, 7.0, 7.25, 6.75, 7.25. Every seat rated the status line easy. The places they named under Locality and Self-sufficiency are filed in `todo.md` under 0.1.0, except `entries.py`'s heuristics over Claude Code's transcript format, which the seats scored as the problem's own difficulty. lilleman decided the same day to ship that PR under the floor. The 2026-10-02 runs on PR #194 (each cycle's transcript archived) scored 8.0, 7.25, 7.38, 7.13, 7.5 at 6ccd5b1 and 7.75, 7.13, 7.25, 7.0, 7.25 at d104ea0, both at the floor, every seat naming `archive` as the unit it would least want to modify. On 2026-10-02, applying `todo.md`'s bar deleted every place these scoring runs filed except `todo.md` item 13 and the Claude Code flags no comment explained. The 2026-10-02 runs on PR #196 (`todo.md` as one scored table) scored 7.63, 6.88, 7.25, 6.88, 7.13 at c0dba66; 7.5, 6.88, 7.13, 6.75, 7.0 at 798dfd7; and 7.5, 7.0, 7.0, 6.75, 7.0 at b712076. Under Self-sufficiency, every seat named larv-review §3 and the agents, which a reader follows only with `CLAUDE.md` open. lilleman decided the same day to ship that PR under the floor; the place filed is `todo.md` item 13. The 2026-10-02 run on PR #198 (a usage limit waited out) scored 7.63, 6.88, 7.38, 6.75, 7.13 at 8e85033. Under Self-sufficiency, every seat named larv-review §3, which `todo.md` item 13 covers; under Locality, they named `archive`'s invariants spread over `session.py` and `run.py`, `rank_todo.py` reaching into `premises.sections`, and `stopped` comparing reason strings, each under `todo.md`'s bar and not filed. lilleman decided the same day to ship that PR under the floor. -The 2026-10-03 runs on PR #202 (the judge reads the project's records) scored 7.75, 7.13, 7.25, 7.0, 7.25 in the first round and 7.5, 7.0, 7.0, 6.75, 7.0 in the eighth; between them a dimension moved by up to 0.4 on near-identical code. Under Self-sufficiency every seat named larv-review §3 and the agents leaning on `CLAUDE.md`, the Claude Code flags left unexplained, and the judge's contract spread over its prompt, schema, parser and `--help`; under Shape, that "record", "verdict" and "judge" each name two things, and that `loop_claude/` holds modules `rank_todo.py` also uses. lilleman decided the same day to ship that PR under the floor and to fix those places next: `todo.md` items 13, 17, 42, 43 and 44, ranked after item 41. Valid until the next scoring run, which uses the same four seats. +The 2026-10-03 runs on PR #202 (the judge reads the project's records) scored 7.75, 7.13, 7.25, 7.0, 7.25 in the first round and 7.5, 7.0, 7.0, 6.75, 7.0 in the eighth; between them a dimension moved by up to 0.4 on near-identical code. Under Self-sufficiency every seat named larv-review §3 and the agents leaning on `CLAUDE.md`, the Claude Code flags left unexplained, and the judge's contract spread over its prompt, schema, parser and `--help`; under Shape, that "record", "verdict" and "judge" each name two things, and that `loop_claude/` holds modules `rank_todo.py` also uses. lilleman decided the same day to ship that PR under the floor and to fix those places next: `todo.md` items 13, 42, 43 and 44. The flags, and the words the judge's prompt left undefined (chunk, plan, a release ready to cut), were explained on 2026-10-03. Valid until the next scoring run, which uses the same four seats. ## loop-claude: each project's model lives in `~/.claude/loop-claude-models.json`, which only loop-claude writes diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 89b0ea1d..70532a55 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -43,7 +43,7 @@ Give a reviewer without Bash the branch diff and `git ls-files`'s output in its 1. A record is a decision-log entry, or a planning item crediting the pass, that the repo held before the chunk began. Where one holds the decision this change executes, skip the pass and cite the record. 2. A change that departs from the record is unreviewed, however thorough the record is. -3. Fired and not skipped → ask the user whether to run it, with the evidence and your recommendation; no user reachable → run it. +3. Fired and not skipped → ask the user whether to run it, with the evidence and your recommendation; no user reachable → run it. For the full scan, give the evidence and your recommendation, then launch it: the plugin asks the user to confirm its cost, and that prompt is the ask. 4. A record or the user's no skips only the architect, never the principles audit or the scoring run: no record older than the chunk checked the code it writes. **Round cap.** @@ -88,7 +88,7 @@ Then the comprehension floor: the `comprehension-panel` skill's scoring run (`~/ A verified HIGH inside this chunk's blast radius is fixed here, outside it on its own branch and PR with this chunk waiting behind it. Say which. -`claude-security` asks the user to confirm a scan's cost, and only the user may answer. `/security-review` or `claude-security` unavailable, the plugin's cost prompt unanswered, or no file scanned → say so in the summary; never substitute a hand-rolled pass. +Only the user may answer `claude-security`'s cost prompt. `/security-review` or `claude-security` unavailable, the plugin's cost prompt unanswered, or no file scanned → say so in the summary; never substitute a hand-rolled pass. **Do not over-read a clean result.** `/security-review` is single-repo and static: it does not trace authorization across services, does not run the application, and deliberately excludes dependency CVEs in third-party libraries — Renovate/Dependabot owns those, per `~/.claude/CLAUDE.md` → "Working with the codebase". Never point an automated reviewer or scan at an untrusted fork's PR content; a PR body is untrusted input to it (CVE-2025-59536, CVE-2026-21852). diff --git a/todo.md b/todo.md index a30a8f5e..44eafb3a 100644 --- a/todo.md +++ b/todo.md @@ -24,7 +24,6 @@ | ID | Release | Exempt | Item | R | S | A | G | Goals | Score | |---|---|---|---|---|---|---|---|---|---| -| 17 | 0.1.0 | decision | **Make `JUDGE_RULES` and the Claude Code flags `loop-claude` passes readable without `CLAUDE.md` or Claude Code's docs open.** | 1 | 2 | 10 | 9 | 4, 4.1 | 30.6 | | 13 | 0.1.0 | decision | **Make larv-review §3 applicable on its own, cite its rules by name, and say where a pass's round count is recorded.** | 3 | 5 | 10 | 10 | 4, 4.1 | 29.1 | | 1 | 0.1.0 | question | **Say in README → Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 3 | 5 | 8 | 9 | 2, 3 | 27.8 | | 42 | 0.1.0 | decision | **Give the judge's contract one home, so its prompt, reply schema, parser and `--help` cannot drift apart.** | 3 | 4 | 9 | 9 | 4, 4.1 | 26.1 | @@ -32,20 +31,14 @@ | 43 | 0.1.0 | decision | **Give "record", "verdict" and "judge" one meaning each across loop-claude, larv-review and workflow-bench.** | 2 | 3 | 8 | 8 | 4, 4.1 | 24.0 | | 23 | 0.1.0 | | **Launch a principles auditor only for a principles file the project shows applies, and rerun only the reviewer whose finding a fix answers.** | 3 | 4 | 7 | 8 | 4.4 | 13.5 | | 21 | 0.1.0 | | **Give `settings.json`'s model one writer, and sort its keys.** | 3 | 3 | 6 | 7 | 4.3 | 12.9 | -| 36 | 0.1.0 | | **Ask the user once before a full security scan, folding larv-review's ask into the plugin's cost prompt.** | 2 | 2 | 5 | 5 | 4.2 | 11.9 | | 12 | 0.1.0 | | **Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough.** | 2 | 4 | 4 | 6 | 4.1 | 11.7 | | 5 | 0.1.0 | decision | **Key a project on its checkout's full path, and refuse to start while another session uses that key.** | 5 | 5 | 5 | 6 | 4.1 | 10.5 | | 4 | 0.1.0 | | **Name each chunk's archive folder by the chunk's start time, so `/` lists chunks in the order they ran.** | 3 | 2 | 4 | 3 | 2 | 9.8 | | 29 | 0.1.0 | | **Make the contributor a standing member of every project's audience, unless its `## Audience` says maintainability does not matter.** | 2 | 2 | 3 | 5 | 4.1, 4.4 | 9.1 | | 6 | 0.1.0 | decision | **Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay.** | 5 | 5 | 4 | 5 | 4.1 | 7.4 | -| 45 | 0.1.0 | principle | **Sort each Python file's imports by the first name each binds.** | 2 | 3 | 3 | 3 | 4.1 | 6.6 | ## Details -### 17. Make `JUDGE_RULES` and the Claude Code flags `loop-claude` passes readable without `CLAUDE.md` or Claude Code's docs open. - -The 2026-10-02 scoring runs on PR #191 named both under Self-sufficiency: the judge's rules use "chunk" and "a release ready to cut" from `CLAUDE.md` with no link, and `--resume`, `--session-id`, `--no-session-persistence`, `--json-schema` and stream-json's result event go unexplained in `worker.py` and `judge.py`. - ### 13. Make larv-review §3 applicable on its own, cite its rules by name, and say where a pass's round count is recorded. Applying one rule of "Round cap", "Re-entry" or "Findings" takes `review-findings.md`, `CLAUDE.md` → "Vocabulary" and the decision log open beside it. The rules cite each other by number ("Round cap" rule 6), so a renumbering breaks a citation silently. Nothing says where a pass's round count is recorded, so a resumed or compacted session loses it. @@ -78,10 +71,6 @@ Claude Code rewrites `"model"` in this tracked file whenever a model is picked, Every write Claude Code makes to the file rewrites `"model"`, `claude plugin install` included: Claude Code 2.1.288 turned `"opus"` into `"opus[1m]"`. Each write also puts the keys back in Claude Code's own order, so a sorted file stays sorted only until the next write. -### 36. Ask the user once before a full security scan, folding larv-review's ask into the plugin's cost prompt. - -When the full scan fires, "Record, then ask" rule 3 asks whether to run it, and `claude-security` then asks the user to confirm its cost. - ### 12. Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough. The repo has no CI, so larv-review's gate is the local run, and larv-review's Gate skips even that when the last stability round left the suite green: an unattended chunk can merge on the worker's own word. @@ -101,7 +90,3 @@ State that in `CLAUDE.md`'s goals-and-audience rule, and have larv-review's comp ### 6. Move what `loop-claude` writes out of `~/.claude.json`, and ask the human about each write that must stay. Claude Code owns that file and writes it. `trust` reads it, changes it and writes it back, so a write that lands in between is lost. - -### 45. Sort each Python file's imports by the first name each binds. - -The principle "Deterministic order wherever order carries no meaning" sorts imports on their first binding; `bin/loop_claude/` and `bin/rank_todo.py` sort `from loop_claude…` imports by module path, as in `loop/main.py` and `cycle/run.py`, so moving a module reorders imports in every file that uses it. Filed by the 2026-10-03 principles audit on PR #202.