This commit is contained in:
@@ -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 ""
|
||||
|
||||
Reference in New Issue
Block a user