diff --git a/.gitignore b/.gitignore index 10bd194b..a368caed 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,9 @@ !bin/ !bin/branch_chunks/ !bin/branch_chunks/*.py +!bin/chunk-pr +!bin/chunk_pr/ +!bin/chunk_pr/*.py !bin/chunk-preflight !bin/chunk_preflight/ !bin/chunk_preflight/*.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 794b6cc0..c06717f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- `chunk-pr open|ready|merge` opens a chunk's pull request as a draft, marks it ready and merges it, with `gh` or `tea` as the remote needs, and merges only when told the gate passed. `larv-review` and `CLAUDE.md` now use it. - `score-outcomes` now gives, where most of the chunks it counts for L hold no ๐Ÿ”ด, the share of chunks with a ๐Ÿ”ด at each L in place of L's rank correlation by ๐Ÿ”ด findings. - `todo-item add` now files an item in `todo.md` with one command. It takes `Next ID` as the item's ID, raises `Next ID`, writes the row and the detail it reads from stdin, and ranks the file. - `todo-item finish ` now removes a finished item's row and detail from `todo.md`. With `--changelog `, it also adds that bullet first under `CHANGELOG.md` โ†’ `## Unreleased`. Where a `CHANGELOG.md` exists, it refuses to run without `--changelog ` or `--no-changelog`, so no bullet is left out by mistake. diff --git a/CLAUDE.md b/CLAUDE.md index 90db7dbd..db3b0ea9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -95,6 +95,7 @@ The rules only reviewers apply, for quality, comments, READMEs and prose, live i - Branch for a ticket: exactly the ticket ID, nothing more. `ABC-123`, never `ABC-123-some-description`. - Branch for a `todo.md` item without a ticket: `item-`, in the worktree `-item-` beside the checkout, as `chunk-preflight` makes them. - Use `gh` on GitHub remotes and `tea` on Gitea remotes (e.g. `gitea.larvit.se`) โ€” same command shape: `tea pr list|create`, `tea issue`, `tea release`, `tea api`. Everything in this section applies to both. +- Open a chunk's pull request as a draft, mark it ready and merge it with `~/.claude/bin/chunk-pr`, which picks `gh` or `tea` from the remote; `chunk-pr --help` says how. ## Handoffs - Write no handoff document. The repo holds everything the next session needs: the plan, the decisions, and every script, sketch or measurement those depend on. A file outside the repo is unreachable from another machine's checkout. diff --git a/README.md b/README.md index 7a7e11b2..c6ba7fba 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ It renames `## Unreleased` in `CHANGELOG.md` to the version and merges that thro Install puts only `loop-claude` and `loop-inbox` on `PATH`; call the others by their path, such as `~/.claude/bin/metric-bench`, from the project's checkout. Those under `~/.claude` are the release's; test a change to one from `~/code/claude-config/bin`. - `chunk-preflight` finds the mechanical facts a chunk starts from, and with `--worktree` makes its worktree; `loop-claude` runs it with `--worktree` before it routes each chunk, and `chunk-preflight --help` lists the facts. +- `chunk-pr open|ready|merge` opens a chunk's pull request as a draft, marks it ready and merges it, with `gh` on a GitHub origin and `tea` elsewhere; `chunk-pr --help` states the steps. - `deploy-release [--cut] []` moves `~/.claude`, or the checkout named, to the newest release, as Update says; with `--cut`, run in the development clone, it first cuts the next release, as Release says. - `judge-replay ` replays loop-claude's judge on archived verdicts of the projects run on the model, and prints the lowest rung that, like each rung above it, returns them; `judge-replay --help` states the replay. - `larv-review ` holds larv-review's mechanical rules: the chunk's review folder, the paired ruling's base and vote count, each pass's round count, the scoring run's trigger, and the comprehension history's format and latest places, and its count of how often seats agree; `larv-review --help` states them. @@ -129,6 +130,7 @@ Then, in the copy: `uvx --with pytest==9.2.0 'mutmut>=3,<4' run && uvx --with py `bin/` is the import root: each launcher puts it on `sys.path`, so a module imports another by its path under `bin/`, such as `from claude_code.entries import parse_entry`. Each tool's package holds its tests. Beside the packages, `bin/`'s root holds only the launchers, the tools of one file with their tests, `test_env.py` and `failure.py`. `failure.py`'s `Failure`, which modules across `bin/` return for a failed step, belongs to no single package. `branch_chunks/`, `claude_code/`, `command_lines/`, `git_cli/`, `machine_load/`, `model_routing/`, `records/`, `release_plan/`, `review_rules/`, `rung_replay/` and `transcript_archive/` serve more than one tool. - `branch_chunks/` cuts a default branch into chunks and finds, for each, the items it shipped and the later chunks that fixed its code, for `score_outcomes` and `routing_figures`. It imports `reading_cost`'s record path. +- `chunk_pr` imports `deploy_release`'s forge calls and `chunk_preflight`'s `forge_of`. - `command_lines/` reads a shell command: its simple commands, and a docker call's subcommand and memory limits, for `reading_cost`, `routing_figures`, `rule_hook` and `run_heavy`. - `deploy_release` imports `chunk_preflight`'s `forge_of`, which tells a GitHub origin from a Gitea one, and `release_plan`'s `release_standing`. - `git_cli/` runs git for every tool (`git_repo.py`), and reads the git calls in a shell command (`git_command.py`). diff --git a/bin/chunk-pr b/bin/chunk-pr new file mode 100755 index 00000000..c863c5f3 --- /dev/null +++ b/bin/chunk-pr @@ -0,0 +1,9 @@ +#!/usr/bin/env python3 +import pathlib +import sys + +sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent)) + +from chunk_pr import main + +sys.exit(main.main(sys.argv[1:])) diff --git a/bin/chunk_pr/__init__.py b/bin/chunk_pr/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/bin/chunk_pr/main.py b/bin/chunk_pr/main.py new file mode 100644 index 00000000..9264586d --- /dev/null +++ b/bin/chunk_pr/main.py @@ -0,0 +1,129 @@ +"""Open the chunk's pull request as a draft, mark it ready, or merge it, with gh where origin is on GitHub and tea elsewhere. + +usage: chunk-pr open [<body>] + chunk-pr ready + chunk-pr merge --gate-passed + +Run it in the chunk's worktree, on the chunk's branch. Each step acts on the open pull request from +origin's own branch of that name whose head is the commit checked out, so push before ready and merge. + +open pushes the branch, setting its upstream, then opens a draft pull request into origin's + default branch, titled <title>: one line, as ~/.claude/CLAUDE.md โ†’ "Git, commits, and PRs" + says. Where that pull request is open already, it opens no other. +ready marks the pull request ready for review. Gitea has no draft state, so there it drops the + title's `WIP: ` prefix, which Gitea reads as a draft. +merge merges the pull request with a merge commit, and only while its head is still the commit + checked out, so a push after the gate is never merged. --gate-passed says the merge gate + passed on that commit; without it, chunk-pr refuses. A repo whose AGENTS.md names another + merge method merges through its forge instead. + +It prints the pull request's number, exit 0. A failure prints git's or the forge's reason, exit 1. +""" +import os +import sys + +from chunk_preflight.choices import forge_of +from chunk_preflight.gathered import Forge +from deploy_release.forge import gitea, open_pull, Run, runner +from failure import Failure + +USAGE = "usage: chunk-pr open <title> [<body>] | chunk-pr ready | chunk-pr merge --gate-passed" + + +def main(argv: list[str]) -> int: + if argv[:1] in (["-h"], ["--help"]): + print(__doc__.strip()) + return 0 + done = step(argv, runner(os.getcwd())) + if isinstance(done, Failure): + print(f"chunk-pr: {done.reason}", file=sys.stderr) + return 1 + print(done) + return 0 + + +def step(argv: list[str], run: Run) -> str | Failure: + """Run the step argv names: the line to print, or a Failure. A malformed argv runs nothing.""" + match argv: + case ["open", title, *body] if len(body) <= 1: + if not title.strip() or "\n" in title: + return Failure("the title is one line of text") + return opened(title, body[0] if body else "", run) + case ["ready"]: + return marked_ready(run) + case ["merge", "--gate-passed"]: + return merged(run) + case ["merge"]: + return Failure("merge only once the gate has passed, and say so with --gate-passed") + return Failure(USAGE) + + +def checkout(run: Run) -> tuple[Forge, str, str] | Failure: + """The forge, the branch checked out and its head commit.""" + answers = [run(["git", *args]) for args in (["remote", "get-url", "origin"], ["symbolic-ref", "--short", "HEAD"], ["rev-parse", "HEAD"])] + failed = next((answer for answer in answers if isinstance(answer, Failure)), None) + if failed is not None: + return failed + origin, branch, head = (str(answer).strip() for answer in answers) + return forge_of(origin), branch, head + + +def pull(run: Run) -> tuple[Forge, str, str] | Failure: + """The forge, the number of the branch's open pull request at its head, and that head.""" + found = checkout(run) + if isinstance(found, Failure): + return found + forge, branch, head = found + number = open_pull(forge, branch, head, run) + if number is None: + return Failure(f"no pull request from origin's {branch} is open at {head[:12]}; push the branch, or open one with chunk-pr open") + return number if isinstance(number, Failure) else (forge, number, head) + + +def opened(title: str, body: str, run: Run) -> str | Failure: + found = checkout(run) + if isinstance(found, Failure): + return found + forge, branch, head = found + default = run(["git", "symbolic-ref", "--short", "refs/remotes/origin/HEAD"]) + if isinstance(default, Failure): + return Failure(f"origin records no default branch; set it with `git remote set-head origin --auto`: {default.reason}") + base = default.strip().removeprefix("origin/") + pushed = run(["git", "push", "--quiet", "--set-upstream", "origin", branch]) + if isinstance(pushed, Failure): + return pushed + number = open_pull(forge, branch, head, run) + if isinstance(number, str): + return f"Pull request #{number} is open already." + if isinstance(number, Failure): + return number + command = ["gh", "pr", "create"] if forge == "gh" else ["tea", "pulls", "create"] + created = run([*command, "--draft", "--head", branch, "--base", base, "--title", title, "--body" if forge == "gh" else "--description", body]) + if isinstance(created, Failure): + return created + number = open_pull(forge, branch, head, run) + if number is None: + return Failure(f"{command[0]} created the pull request, but no pull request from origin's {branch} is listed open at {head[:12]}") + return number if isinstance(number, Failure) else f"Opened draft pull request #{number}." + + +def marked_ready(run: Run) -> str | Failure: + found = pull(run) + if isinstance(found, Failure): + return found + forge, number, _ = found + ready = run(["gh", "pr", "ready", number] if forge == "gh" else ["tea", "pulls", "edit", number, "--ready"]) + return ready if isinstance(ready, Failure) else f"Marked pull request #{number} ready." + + +def merged(run: Run) -> str | Failure: + found = pull(run) + if isinstance(found, Failure): + return found + forge, number, head = found + # The forge refuses where the pull request's head has moved off head. + if forge == "gh": + done = run(["gh", "pr", "merge", number, "--merge", "--match-head-commit", head]) + else: + done = gitea(run, f"repos/{{owner}}/{{repo}}/pulls/{number}/merge", "Do=merge", f"head_commit_id={head}") + return done if isinstance(done, Failure) else f"Merged pull request #{number}." diff --git a/bin/chunk_pr/test_chunk_pr.py b/bin/chunk_pr/test_chunk_pr.py new file mode 100644 index 00000000..e735bbcd --- /dev/null +++ b/bin/chunk_pr/test_chunk_pr.py @@ -0,0 +1,125 @@ +import json +import pathlib +import subprocess +import sys +import unittest + +sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) + +from chunk_pr.main import step +from failure import Failure +from test_env import isolated_env + +TOOL = pathlib.Path(__file__).resolve().parents[1] / "chunk-pr" +GITHUB = "git@github.com:me/project.git" +GITEA = "ssh://git@gitea.example.org:22/me/project.git" +HEAD = "c0ffee" +GH_LIST = ["gh", "pr", "list", "--head", "item-7", "--json", "number,headRefOid,isCrossRepository", "--template", "{{range .}}{{.number}}\t{{.headRefOid}}\t{{.isCrossRepository}}\n{{end}}"] +TEA_LIST = ["tea", "api", "repos/{owner}/{repo}/pulls?state=open&limit=50"] + + +class Forge: + """A checkout on branch item-7 at HEAD, whose origin is origin and whose default branch is main. Pull request #12 from item-7 is open at HEAD where open says so, and once a create has run. It records every command run.""" + + def __init__(self, origin: str, open: bool): + self.open = open + self.ran: list[list[str]] = [] + self.answers: dict[tuple[str, ...], str | Failure] = { + ("git", "remote", "get-url", "origin"): f"{origin}\n", + ("git", "symbolic-ref", "--short", "HEAD"): "item-7\n", + ("git", "rev-parse", "HEAD"): f"{HEAD}\n", + ("git", "symbolic-ref", "--short", "refs/remotes/origin/HEAD"): "origin/main\n", + } + + def __call__(self, command: list[str]) -> str | Failure: + self.ran.append(command) + if command[2:3] == ["create"]: + self.open = True + if command == GH_LIST: + return f"12\t{HEAD}\tfalse\n" if self.open else "" + if command == TEA_LIST: + return json.dumps([{"number": 12, "head": {"ref": "item-7", "sha": HEAD, "repo": {"full_name": "me/project"}}, "base": {"repo": {"full_name": "me/project"}}}] if self.open else []) + return self.answers.get(tuple(command), "") + + def forge_calls(self) -> list[list[str]]: + """What it ran beyond reading the checkout and listing pull requests.""" + return [command for command in self.ran if tuple(command) not in self.answers and command not in (GH_LIST, TEA_LIST)] + + +class Open(unittest.TestCase): + def test_github_pushes_and_opens_a_draft_into_the_default_branch(self): + forge = Forge(GITHUB, open=False) + opened = step(["open", "ABC-1 - Do it", "The body."], forge) + self.assertEqual(forge.forge_calls(), [ + ["git", "push", "--quiet", "--set-upstream", "origin", "item-7"], + ["gh", "pr", "create", "--draft", "--head", "item-7", "--base", "main", "--title", "ABC-1 - Do it", "--body", "The body."], + ]) + self.assertEqual(opened, "Opened draft pull request #12.") + + def test_gitea_opens_a_draft_with_tea(self): + forge = Forge(GITEA, open=False) + step(["open", "Do it"], forge) + self.assertEqual(forge.forge_calls()[1], ["tea", "pulls", "create", "--draft", "--head", "item-7", "--base", "main", "--title", "Do it", "--description", ""]) + + def test_an_open_pull_request_is_kept(self): + forge = Forge(GITEA, open=True) + self.assertEqual(step(["open", "Do it"], forge), "Pull request #12 is open already.") + self.assertEqual(forge.forge_calls(), [["git", "push", "--quiet", "--set-upstream", "origin", "item-7"]]) + + def test_a_title_of_more_than_one_line_is_refused_before_anything_runs(self): + forge = Forge(GITHUB, open=False) + self.assertIsInstance(step(["open", "Do it\nand more"], forge), Failure) + self.assertEqual(forge.ran, []) + + +class Ready(unittest.TestCase): + def test_github_marks_it_ready(self): + forge = Forge(GITHUB, open=True) + self.assertEqual(step(["ready"], forge), "Marked pull request #12 ready.") + self.assertEqual(forge.forge_calls(), [["gh", "pr", "ready", "12"]]) + + def test_gitea_drops_the_wip_prefix_with_tea(self): + forge = Forge(GITEA, open=True) + step(["ready"], forge) + self.assertEqual(forge.forge_calls(), [["tea", "pulls", "edit", "12", "--ready"]]) + + def test_without_an_open_pull_request_at_the_head_it_fails_naming_the_branch(self): + forge = Forge(GITHUB, open=False) + ready = step(["ready"], forge) + self.assertIsInstance(ready, Failure) + self.assertIn("item-7", ready.reason) + self.assertEqual(forge.forge_calls(), []) + + +class Merge(unittest.TestCase): + def test_without_the_gate_passed_it_refuses_before_anything_runs(self): + forge = Forge(GITHUB, open=True) + self.assertIsInstance(step(["merge"], forge), Failure) + self.assertEqual(forge.ran, []) + + def test_github_merges_pinned_to_the_head(self): + forge = Forge(GITHUB, open=True) + self.assertEqual(step(["merge", "--gate-passed"], forge), "Merged pull request #12.") + self.assertEqual(forge.forge_calls(), [["gh", "pr", "merge", "12", "--merge", "--match-head-commit", HEAD]]) + + def test_gitea_merges_pinned_to_the_head(self): + forge = Forge(GITEA, open=True) + step(["merge", "--gate-passed"], forge) + self.assertEqual(forge.forge_calls(), [["tea", "api", "--method", "POST", "--field", "Do=merge", "--field", f"head_commit_id={HEAD}", "repos/{owner}/{repo}/pulls/12/merge"]]) + + def test_a_forge_failure_is_returned(self): + forge = Forge(GITHUB, open=True) + forge.answers[("gh", "pr", "merge", "12", "--merge", "--match-head-commit", HEAD)] = Failure("gh pr merge: head moved") + self.assertEqual(step(["merge", "--gate-passed"], forge), Failure("gh pr merge: head moved")) + + +class Launcher(unittest.TestCase): + def test_help_exits_0_and_a_wrong_step_exits_1(self): + self.assertEqual(subprocess.run([str(TOOL), "--help"], capture_output=True, env=isolated_env()).returncode, 0) + wrong = subprocess.run([str(TOOL), "close"], capture_output=True, encoding="utf-8", env=isolated_env()) + self.assertEqual((wrong.returncode, wrong.stdout), (1, "")) + self.assertIn("usage", wrong.stderr) + + +if __name__ == "__main__": + unittest.main() diff --git a/bin/deploy_release/forge.py b/bin/deploy_release/forge.py index cd117aa9..22f3cd1b 100644 --- a/bin/deploy_release/forge.py +++ b/bin/deploy_release/forge.py @@ -1,4 +1,4 @@ -"""The pull request steps of a cut. They run gh where origin is on GitHub and tea elsewhere, as chunk_preflight tells the two apart. +"""The pull request steps of a cut, whose runner, gitea and open_pull chunk_pr shares. They run gh where origin is on GitHub and tea elsewhere, as chunk_preflight tells the two apart. Each step is pinned to head, the commit origin's release branch points at: the cut takes only a pull request from origin itself whose head is that commit, and the forge merges it only while its head is still that commit. So a fork's pull request from a branch of the same name, or a push to the branch after its checks passed, is never merged. """ diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 1f53cd65..f57e4686 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -7,7 +7,7 @@ description: Ship a work chunk through review to a merged PR; decisions land in You orchestrate, fix, and ship; reviewers only report. Run every reviewer in the foreground (`run_in_background: false`), each wave's reviewers in one message (ยง3 โ†’ "Waves"), and watch CI in the foreground: a headless run exits when the turn ends, and a background watcher dies with it. Never schedule a wakeup: a pending one keeps a headless run from exiting, so loop-claude neither runs its judge nor asks the human. The turn runs on until ยง6. -**Forge-neutral.** Five PR operations recur below: read a PR's diff, open a draft PR, read check status, mark ready, merge. Resolve the tooling from the remote per `~/.claude/CLAUDE.md` โ†’ "Git, commits, and PRs"; on any other forge, achieve the same intents through its CLI or API โ€” discover how rather than assuming. A forge without a native draft state gets the closest equivalent (a `WIP:`/`Draft:` title prefix); note any approximation in the summary. +**Forge-neutral.** Five PR operations recur below: read a PR's diff, open a draft PR, read check status, mark ready, merge. On GitHub and Gitea, `~/.claude/bin/chunk-pr` opens the draft, marks it ready and merges, and the remote picks the tooling for the other two, per `~/.claude/CLAUDE.md` โ†’ "Git, commits, and PRs". On any other forge, achieve all five through its CLI or API โ€” discover how rather than assuming. A forge without a native draft state gets the closest equivalent (a `WIP:`/`Draft:` title prefix); note any approximation in the summary. The bar a chunk is reviewed to: ~/.claude/skills/larv-review/standards/quality.md. Words: `~/.claude/CLAUDE.md` โ†’ "Vocabulary". What a reviewer reports: ~/.claude/skills/larv-review/review-findings.md; how you resolve it: ยง3 โ†’ "Findings". @@ -22,7 +22,7 @@ The bar a chunk is reviewed to: ~/.claude/skills/larv-review/standards/quality.m ## 2. Ship the branch (idempotent โ€” skip whatever already exists) -Follow `~/.claude/CLAUDE.md` โ†’ "Git, commits, and PRs". Never commit to the default branch. Commit, push with upstream set, and open a **draft** PR so CI cycles while the review runs. No remote โ†’ review locally and say so in the summary. +Follow `~/.claude/CLAUDE.md` โ†’ "Git, commits, and PRs". Never commit to the default branch. Commit, then run `~/.claude/bin/chunk-pr open '<title>'`: it pushes with upstream set and opens a **draft** PR, so CI cycles while the review runs. No remote โ†’ review locally and say so in the summary. **Work in the worktree.** Enter the chunk's worktree with the `EnterWorktree` tool, `path` set to it, unless the session already works there. A reviewer, a seat and the security pass's skill read the diff of the session's working directory, and a subagent starts there; from the checkout root they find the branch's diff empty. @@ -186,14 +186,14 @@ Launch prose-reviewer with what the diff touched and every section this review c 3. Run the project's test suite locally unless the last stability round, or a later run, left the head verified green. 4. Watch the forge's checks until every one passes. A red check is a finding. 5. No CI configured โ†’ the gate is local tests only; note it in the summary. -6. Everything green โ†’ mark the PR ready, dropping any `WIP:`/`Draft:` title prefix. +6. Everything green โ†’ mark the PR ready with `~/.claude/bin/chunk-pr ready`. 7. **External auto-reviewer**, when the repo has one โ€” its config file (`.coderabbit.yaml` and the like), or its comments on earlier PRs; none โ†’ skip it, say so. Marking the PR ready is what summons it. Wait up to **10 minutes** for its first review, checking about once a minute; nothing by then โ†’ note it in the summary and carry on, never waiting twice. Its rounds, ยง3 โ†’ "Round cap". Once it has reviewed, each later return here before its cap, after a fix re-entered per ยง3, waits up to **5 minutes** for its re-review of the new commit. ## 5. Goal alignment, then merge 1. Read the finished PR against the README goals and code health, unless the README voids it: does anything in it work against one? It breaks a maintain goal โ†’ do not merge; redesign the change or drop its item. It works against an achieve goal โ†’ do not merge; ask the human, stating the conflict. 2. Run the comprehension check (ยง3) where it runs; it runs once. When `origin/<default branch>` moves after that, return to ยง4, and keep the ruling and scoring run already recorded. -3. Aligned, every pass done and everything green โ†’ **merge**. Follow the repo's merge method (`AGENTS.md`; ff-only where that is the convention). A repo withholds this in its `AGENTS.md` โ†’ leave the PR ready and unmerged, and say which line withheld it. +3. Aligned, every pass done and everything green โ†’ **merge** with `~/.claude/bin/chunk-pr merge --gate-passed`. A repo whose `AGENTS.md` names another merge method, such as ff-only, merges that way through its forge instead. A repo withholds this in its `AGENTS.md` โ†’ leave the PR ready and unmerged, and say which line withheld it. 4. Merged โ†’ remove the chunk's items from `todo.md` per `~/.claude/CLAUDE.md` โ†’ "Working loop". 5. Stop. The next chunk gets a fresh session. diff --git a/todo.md b/todo.md index 83e14490..b02f9165 100644 --- a/todo.md +++ b/todo.md @@ -14,7 +14,6 @@ |---|---|---|---|---|---|---|---|---|---|---|---| | 277 | 0.7.0 | | question | **Map the size of the code an item names onto S, on a scale the human picks, and have `score-outcomes` print that S for the item being scored and for each finished item it lists.** | 3 | 2 | 2 | 5 | 4 | 1.1 by 4, 1.4 by 3 | 2.4 | | 1 | 0.7.0 | | question | **Say in README โ†’ Install how the transcript archive is backed up, once bender-infra backs up ai-sandbox's data volume.** | 1 | 2 | 1 | 2 | 1 | | 0.0 | -| 280 | 0.7.0 | | | **Open the chunk's pull request as a draft, mark it ready and merge it with one command per step that picks `tea` or `gh` from the remote, so no worker looks up `tea`'s or `gh`'s flags.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 4, 1.5 by 3 | 2.3 | | 282 | 0.7.0 | | | **Write the branch diff and what `larv-review places` prints into the chunk's review folder, and print each reviewer's prompt header, with one `larv-review` command.** | 3 | 2 | 3 | 6 | 4 | 1.4 by 4, 1.5 by 3 | 2.3 | | 12 | 0.7.0 | | | **Run the test suite in CI on every PR, or record in `docs/decisions.md` why the local run is enough.** | 3 | 2 | 1 | 4 | 4 | 1.1 by 6 | 2.1 | | 285 | 0.7.0 | | | **Cut a worker's opens and searches of `todo.md` from the median 7 per chunk to at most 3, by finding in the last five chunks' archived transcripts what each read was for and removing its cause.** | 2 | 2 | 3 | 5 | 3 | 1.4 by 4 | 1.6 | @@ -76,10 +75,6 @@ It lives under `~/.claude`, which `.gitignore` keeps from the remote, so a lost The README line covers the bench's transcripts in `workflow-bench/logs/` too (goal 3). -### 280. Open the chunk's pull request as a draft, mark it ready and merge it with one command per step that picks `tea` or `gh` from the remote, so no worker looks up `tea`'s or `gh`'s flags. - -Audit of release 0.2.0's chunks (item 162): 37 chunks ran `tea pr` or `gh pr` create, ready, edit or merge, 106 calls, about 12.6k command tokens and 13.9k result tokens. 20 chunks spent 49 calls on `--help` lookups of those flags. The title follows `CLAUDE.md` โ†’ "Git, commits, and PRs"; the merge runs only where the caller says the gate passed. - ### 282. Write the branch diff and what `larv-review places` prints into the chunk's review folder, and print each reviewer's prompt header, with one `larv-review` command. Audit of release 0.2.0's chunks (item 162): 32 chunks wrote by hand the branch diff and what `larv-review places` prints, 92 calls, about 9.8k command tokens and 18k result tokens. 26 chunks launched 264 reviewers whose prompts were written by hand, 127k tokens in all, of which at least 10k are paths. The header names the pass, the round, the PR, the worktree, the branch, the base, and the paths of the reviewer's report, the diff and the places; the model adds the change summary.