Answer stability round 1: 1 🔴, 12 🟡 (0 misread); wait-for waits out a half-written line, prepare-scoring honours claudeMdExcludes, and a merge by another method waits for the checks
CI / tests (pull_request) Successful in 2m38s

This commit is contained in:
2026-11-12 09:13:37 +01:00
parent 37f19d1677
commit 58133e69fe
8 changed files with 90 additions and 23 deletions
+17 -2
View File
@@ -1,4 +1,5 @@
"""Set up a scoring run: the worktree its seats read and each seat's prompt, filled from skills/comprehension-panel/seat-prompts.md."""
import json
import pathlib
import re
import shutil
@@ -96,16 +97,30 @@ def file_globs(paths: list[str]) -> str:
def preloaded_files(main: pathlib.Path, home: pathlib.Path) -> str:
"""The files Claude Code loads into a seat started in main before its first tool call: each CLAUDE.md, the files it imports, and each rule file without `paths:`."""
"""The files Claude Code loads into a seat started in main before its first tool call: each CLAUDE.md that main's settings don't exclude, the files it imports, and each rule file without `paths:`."""
excludes = claude_md_excludes(main)
found = []
for shown, claude_md, rules in (("~/.claude/", home / ".claude" / CLAUDE_MD, home / ".claude" / "rules"), ("", main / CLAUDE_MD, main / ".claude" / "rules")):
if claude_md.is_file():
if claude_md.is_file() and not any(claude_md.full_match(pattern) for pattern in excludes):
found.append(f"`{shown}{CLAUDE_MD}`")
found += [f"`{shown}{name}`, which it imports" for name in re.findall(r"^@(\S+)", claude_md.read_text(), re.M)]
found += [f"`{shown}{rule.relative_to(claude_md.parent)}`" for rule in sorted(rules.glob("*.md")) if not re.search(r"^paths:", rule.read_text(), re.M)]
return listed(found, "and") if found else "none"
def claude_md_excludes(main: pathlib.Path) -> list[str]:
"""The `claudeMdExcludes` globs of main's .claude/settings.json and settings.local.json, which keep a matching CLAUDE.md out of a session."""
globs = []
for name in ("settings.json", "settings.local.json"):
try:
settings = json.loads((main / ".claude" / name).read_text())
except (OSError, ValueError):
continue
excludes = settings.get("claudeMdExcludes") if isinstance(settings, dict) else None
globs += [glob for glob in excludes if isinstance(glob, str)] if isinstance(excludes, list) else []
return globs
def prompt_parts() -> dict[str, str] | Failure:
"""seat-prompts.md's opening, shared brief and each report as their fenced text, and each seat's background, keyed by heading or label."""
path = PANEL / "seat-prompts.md"