diff --git a/CHANGELOG.md b/CHANGELOG.md index f7a4697f..cfa7c1e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - `loop-claude` exits 1 when the judge fails three times running; a verdict missing a field or quoting nothing in the transcript is a failure. - `loop-claude` exits 2 when an interrupt gets no answer, saying why: stdin or stdout is not a terminal, or nothing was typed. Rerunning resumes the session. - `loop-claude --help` names the Claude Code version its transcript, session and trust handling were observed on; check it first when an upgrade breaks a cycle. +- `loop-claude` reads a `## Goals` or `## Audience` section of `README.md` whole, `###` sub-headings included. - `loop-claude` runs the model each project's settings pick; `WORKER_MODEL` and `JUDGE_MODEL` override it. This repo runs on Fable 5.1. - Reviewers share one protocol for verdicts, severities, rounds and declines: `agents/review-protocol.md`. - Skills and agents cite `CLAUDE.md` by heading; the comment and documentation bar lives there alone. diff --git a/bin/loop-claude b/bin/loop-claude index d75b8f1c..c2ea8cbc 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) diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index 78210f4e..7f9e1016 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\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", "Audience": "me"}) class Render(unittest.TestCase): diff --git a/todo.md b/todo.md index d81f43b9..e21535d5 100644 --- a/todo.md +++ b/todo.md @@ -4,7 +4,6 @@ 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.