Have the worker implement the simplest change without loading the technical principles, and move the rules only reviewers apply to larv-review's standards
This commit is contained in:
@@ -5,14 +5,17 @@ from loop_claude.stop import Stop
|
||||
|
||||
# The records: these project files and the human's rules; the judge reads them beside the README's premises.
|
||||
RECORD_FILES = ("AGENTS.md", "docs/decisions.md")
|
||||
HUMAN_RULES = "~/.claude/CLAUDE.md"
|
||||
HUMAN_RULES_DIR = "~/.claude/rules/"
|
||||
# The human's rules for every project, under ~/.claude: CLAUDE.md, then each .md file in these folders.
|
||||
HUMAN_RULES = "CLAUDE.md"
|
||||
HUMAN_RULE_DIRS = ("rules", "skills/larv-review/standards")
|
||||
HUMAN_RULE_NAMES = tuple(f"~/.claude/{name}" for name in (HUMAN_RULES, *(f"{folder}/" for folder in HUMAN_RULE_DIRS)))
|
||||
|
||||
|
||||
def read_records(root: str, claude_md: pathlib.Path, rules_dir: pathlib.Path) -> str | Stop:
|
||||
def read_records(root: str, claude_dir: pathlib.Path) -> str | Stop:
|
||||
"""The project's record files, then the human's rules for every project, CLAUDE.md first, each headed by its name; a file that does not exist is left out."""
|
||||
sources = [(root, name, name) for name in RECORD_FILES] + [(str(claude_md.parent), claude_md.name, HUMAN_RULES)]
|
||||
sources += [(str(rules_dir), rule.name, HUMAN_RULES_DIR + rule.name) for rule in sorted(rules_dir.glob("*.md"))]
|
||||
rules = [claude_dir / HUMAN_RULES] + [rule for folder in HUMAN_RULE_DIRS for rule in sorted((claude_dir / folder).glob("*.md"))]
|
||||
sources = [(root, name, name) for name in RECORD_FILES]
|
||||
sources += [(str(rule.parent), rule.name, f"~/.claude/{rule.relative_to(claude_dir)}") for rule in rules]
|
||||
records = []
|
||||
for folder, name, heading in sources:
|
||||
if not pathlib.Path(folder, name).exists():
|
||||
|
||||
Reference in New Issue
Block a user