Group loop_claude's modules into claude_code, claude_runs and project, and move the findings document beside larv-review

This commit is contained in:
2026-09-28 21:28:41 +02:00
parent 6a1a1d9027
commit 998cc3ac85
26 changed files with 39 additions and 35 deletions
+22
View File
@@ -0,0 +1,22 @@
import subprocess
from loop_claude.outcome import Stop
def checkout_root(cwd):
found = subprocess.run(["git", "rev-parse", "--show-toplevel"], capture_output=True, cwd=cwd, text=True)
if found.returncode != 0:
return Stop(1, found.stderr.strip())
return found.stdout.strip()
def checkouts(root):
found = [root]
listing = subprocess.run(["git", "worktree", "list", "--porcelain"], capture_output=True, cwd=root, text=True)
if listing.returncode == 0:
found += [line.split(" ", 1)[1] for line in listing.stdout.splitlines() if line.startswith("worktree ")]
return sorted(set(found))
def project_name(root, code):
return root.removeprefix(f"{code}/").lstrip("/")