"""The chunk's review folder, where each reviewer writes its report: skills/larv-review/SKILL.md → "Reports".""" import os # Under the home folder: outside every checkout, so no project sees a report; kept across a reboot, so a resumed chunk still reads its rounds. A fixed path, since a headless session has no scratchpad. REPORTS = ".local/state/larv-review" def review_folder(home: str, worktree: str) -> str: """The review folder of the chunk whose worktree is at worktree: its path relative to home, or to / outside it, under REPORTS.""" inside = worktree.startswith(home.rstrip("/") + "/") return os.path.join(home, REPORTS, os.path.relpath(worktree, home) if inside else worktree.lstrip("/"))