Resolve the setup's folders in one module
CI / tests (pull_request) Successful in 4m39s

This commit is contained in:
2026-12-03 11:19:04 +01:00
parent 45eeef846d
commit 08afc3df85
31 changed files with 115 additions and 35 deletions
+2 -1
View File
@@ -4,9 +4,10 @@ import pathlib
from failure import Failure
from review_rules.round_titles import Findings, reported
from loop_state.paths import STATE_FOLDER
# Why here: docs/decisions.md → `review: each reviewer under agents/ writes its full report into the chunk's review folder`.
REPORTS = ".local/state/larv-review"
REPORTS = f"{STATE_FOLDER}/larv-review"
def review_folder(home: str, worktree: str) -> str:
+3 -2
View File
@@ -3,6 +3,7 @@ import json
import pathlib
import re
from loop_state.paths import CLAUDE_HOME
from failure import Failure
from review_rules.review_passes import REVIEWERS
from text_files.markdown_text import section
@@ -13,7 +14,7 @@ SECTIONS = ("Shared goal", "Prose", "Vocabulary")
def reviewer_context(home: pathlib.Path) -> str | Failure:
"""SECTIONS of the CLAUDE.md under home, as a reviewer is told them; a Failure where the file or a section is missing."""
path = home / ".claude" / "CLAUDE.md"
path = home / CLAUDE_HOME / "CLAUDE.md"
try:
text = path.read_text(encoding="utf-8")
except (OSError, UnicodeDecodeError) as failure:
@@ -29,7 +30,7 @@ def starts_bare(agent: str, home: pathlib.Path) -> bool:
if agent not in REVIEWERS.values():
return False
try:
text = (home / ".claude" / "agents" / f"{agent}.md").read_text(encoding="utf-8")
text = (home / CLAUDE_HOME / "agents" / f"{agent}.md").read_text(encoding="utf-8")
except (OSError, UnicodeDecodeError):
return False
frontmatter = text.split("---\n")[1] if text.startswith("---\n") else ""