diff --git a/bin/loop-claude b/bin/loop-claude index d75b8f1c..4c23eaa5 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -87,7 +87,7 @@ def sections(text): if not fenced and line.startswith("## "): current = line.strip()[3:] found[current] = [] - elif not fenced and line.startswith("#"): + elif not fenced and line.startswith("# "): current = None elif current and line.strip(): found[current].append(line) @@ -266,7 +266,7 @@ def run_worker(args): def judge_prompt(task, premises, transcript): return ( - f"README.md, verbatim:\n{premises}\n\n" + f"From README.md:\n{premises}\n\n" f"The task an agent was given:\n{task}\n\n" f"What the agent then did and said, latest last:\n{transcript[-40000:]}\n\n" f"{JUDGE_RULES}" diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 78210f4e..9c22643f 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -27,8 +27,8 @@ def human(content): class Sections(unittest.TestCase): def test_keeps_only_headed_sections_with_a_body(self): - text = "# Title\n\nintro\n\n## Goals\n\n1. one\n```sh\n# not a heading\n```\n2. two\n\n## Empty\n\n## Audience\nme\n# Appendix\nnot audience\n" - self.assertEqual(loop.sections(text), {"Goals": "1. one\n```sh\n# not a heading\n```\n2. two", "Audience": "me"}) + text = "# Title\n\nintro\n\n## Goals\n\n1. one\n```sh\n# not a heading\n```\n### Later\n2. two\n#1 priority\n\n## Empty\n\n## Audience\nme\n# Appendix\nnot audience\n" + self.assertEqual(loop.sections(text), {"Goals": "1. one\n```sh\n# not a heading\n```\n### Later\n2. two\n#1 priority", "Audience": "me"}) class Render(unittest.TestCase): diff --git a/todo.md b/todo.md index d81f43b9..0e82289f 100644 --- a/todo.md +++ b/todo.md @@ -4,13 +4,14 @@ Ordered by how many seats of the 2026-09-24 scoring panel (`docs/decisions.md`) named the place; each is one chunk. -- Keep `###` sub-headings inside their `##` section in `sections`, pinned by a test; today a sub-heading under `## Goals` silently drops the rest of the goals. - Merge `project` and `project_path` into one name and one shape for the project's path. - Name the session, the archive folder and its env var `loop-claude`; today they say `auto-mode`. - Pin every `CLAUDE.md` heading the agents and skills cite with a test that resolves each citation. - Define chunk, plan and release inside `JUDGE_RULES`; the judge reads nothing else. - Name the `set -u` empty-array idiom and the `@sh` eval in `statusline.sh`, one line each. - Make `CLAUDE.md`'s comment rules say an invariant earns a line only where the code cannot show it, state the one-line rule once, and scope the docstring exemption to what a tool consumes; today a reviewer finds two sentences saying keep and one saying delete. +- Open `CLAUDE.md` → "Negation and history" with its scope, comments and docs beside code, and cut its two restatements of the section bar; today a reviewer cites it against a `CHANGELOG.md` line, which the next paragraph governs. - Give the comprehension floor in `larv-review` its own heading and move its six-project calibration sentence to `docs/decisions.md`; today it sits under §2 "Trigger". - Cut what `review-protocol.md` → "Documenting decisions" restates from `CLAUDE.md`: the decision kinds, the create-or-fix line and the record-nothing default. +- Make the missing-premises exit name what is missing: `README.md` itself, a `## Goals` or `## Audience` heading, or a body under one; today all three print the same line. - Re-run the four-seat scoring panel and record the score in `docs/decisions.md`; the target is every dimension at 7.0 or above.