Answer architecture round 1: 0 🔴, 2 🟡; fail on a mark over a live release, pin the second run's reason wording, state the target is for the reader

This commit is contained in:
2026-10-18 09:35:44 +02:00
parent ac33c733c7
commit 28a3f9c5e9
6 changed files with 17 additions and 5 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ def scoring_run_due(before: list[Item], after: list[Item], ships: list[int], lan
next_release = min((item.release for item in before), default=None)
for release in emptied(before, after, shipped, renamed):
if any(item.release == release for item in shipped) or (release == next_release and landed):
# SKILL.md → "Second run" keys on this wording.
# SKILL.md → "Second run" keys on this wording; a test pins both.
reasons.append(f"leaves release {'.'.join(map(str, release))} with no plan item")
return reasons
+6
View File
@@ -293,6 +293,12 @@ class ScoringRunDue(unittest.TestCase):
before = [item(1, (0, 2, 1)), item(2, (0, 3, 0))]
self.assertEqual(scoring_run_due(before, [item(1, (0, 3, 0)), item(2, (0, 3, 0))], [], True, set()), ["leaves release 0.2.1 with no plan item"])
def test_words_the_emptied_release_reason_as_skill_md_s_second_run_quotes_it(self):
skill = (pathlib.Path(__file__).resolve().parents[2] / "skills" / "larv-review" / "SKILL.md").read_text()
self.assertIn("`leaves release … with no plan item`", skill)
reasons = scoring_run_due([item(1, (0, 1, 0))], [], [], True, set())
self.assertRegex(reasons[0], r"^leaves release [0-9.]+ with no plan item$")
def test_is_not_due_when_a_later_release_loses_its_last_item_unshipped(self):
before = [item(1, (0, 1, 0)), item(3, (0, 2, 0))]
self.assertEqual(scoring_run_due(before, before[:1], [], True, set()), [])
+6 -2
View File
@@ -60,8 +60,9 @@ A valid todo.md; ## Details and each item's detail are optional:
or deleted, and is dropped.
- ## Items holds the table and nothing else: an order goes in the scores or the Blocked by column.
- ## Renamed is optional: one line `- 0.2.1 renamed to 0.3.0` per release the plan renamed. The tools
skip a marked release when they pick the next one, and call no scoring run for it. A release whose
items all moved to other releases without a mark reads as finished, so the human cuts it.
skip a marked release when they pick the next one, and call no scoring run for it; they read only
the old release, the new one is for the reader. No item may sit under a marked release. A release
whose items all moved to other releases without a mark reads as finished, so the human cuts it.
- The table holds the columns above. One missing L, E or I fails, and so does one with a column this
version does not know, since writing it would drop that column.
- A table in the old shape, with C, A, G and Goals columns in place of L, E, I and Moves, still
@@ -206,6 +207,9 @@ def rank(text: str, readme: str, decisions: str) -> Ranked | Failure:
return uncited
if isinstance(marked := renames(text), Failure):
return marked
if live := next((item for item in items if item.release in marked), None):
release = ".".join(map(str, live.release))
return Failure(f"todo.md marks release {release} renamed but files item {live.id} under it; drop the mark or move the item")
scored = ordered(items, scoring)
if isinstance(scored, Failure):
return scored
+2
View File
@@ -486,6 +486,8 @@ class Standing(unittest.TestCase):
self.assertIsInstance(failed, Failure)
self.assertIn("## Renamed", failed.reason)
self.assertIsInstance(rank_todo.rank(TODO + "\n## Renamed\n\n- 0.2.1 renamed to 0.3.0\n", README, DECISIONS), rank_todo.Ranked)
live = rank_todo.rank(TODO + "\n## Renamed\n\n- 0.2.0 renamed to 0.3.0\n", README, DECISIONS)
self.assertEqual(live, Failure("todo.md marks release 0.2.0 renamed but files item 1 under it; drop the mark or move the item"))
class Main(unittest.TestCase):
+1 -1
View File
@@ -217,7 +217,7 @@ def named_releases(todos: list[str] | Failure) -> set[tuple[int, int, int]] | Fa
def renames(todo: str) -> set[tuple[int, int, int]] | Failure:
"""Each release todo.md's ## Renamed section says was renamed, as `- 0.2.1 renamed to 0.3.0`, so never finished. Without such a line, a release whose items all moved to other releases reads as finished or deferred, and the human cuts it."""
"""Each release todo.md's ## Renamed section says was renamed, as `- 0.2.1 renamed to 0.3.0`, so never finished; the new release is for the reader. Without such a line, a release whose items all moved to other releases reads as finished or deferred, and the human cuts it, so a forgotten mark costs one interrupt, never a silent skip. A panel of three readers seated as lilleman picked the spelling 3-0 over `- 0.2.1 → 0.3.0` and a `Renamed 0.2.1 = 0.3.0` line under ## Scoring."""
marked: set[tuple[int, int, int]] = set()
for body in sections(todo).get("Renamed", []):
for line in body.splitlines():
+1 -1
View File
@@ -5,7 +5,7 @@ paths:
# Todo items (`todo.md`)
- **`todo.md` is mandatory in every project, in the shape `rank_todo.py --help` shows**, which `~/.claude/bin/rank_todo.py` checks and ranks; its `--help` shows a valid file. `## Scoring` holds the formula and the bar; `## Items` is one table of every item; `## Details` holds each item's detail under its ID. `## Renamed`, when a release was renamed, holds one line `- 0.2.1 renamed to 0.3.0` per rename; a release whose items all moved elsewhere without that line reads as finished, ready to cut. Cite an item by its ID. The formula and bar are the project's own to tune.
- **`todo.md` is mandatory in every project, in the shape `rank_todo.py --help` shows**, which `~/.claude/bin/rank_todo.py` checks and ranks; its `--help` shows a valid file. `## Scoring` holds the formula and the bar; `## Items` is one table of every item; `## Details` holds each item's detail under its ID. `## Renamed`, when a release was renamed, holds one line `- 0.2.1 renamed to 0.3.0` per rename, and no item under a marked release; a release whose items all moved elsewhere without that line reads as finished, ready to cut. Cite an item by its ID. The formula and bar are the project's own to tune.
- **Order items only by score and the Blocked by column.** An item's Blocked by cell lists the IDs of the items that must be done before it starts, such as `12, 14`; `rank_todo.py --help` says how it ranks them. No text in `todo.md` outside the table orders items: where an item must go first, score it so, and say why in its detail.
- **Plan only on the project's rung or above.** loop-claude's prompt tells you when you run below it. Below it, never score or re-score an item, move it between releases, split a milestone into items, delete an item under the bar, rewrite a filed item's tagline or detail, or choose or replace an item in `docs/score-anchors.md`. Draft each new item, each change to a filed item, and each change to the anchors, instead. Before your next commit, launch one subagent to apply the drafts, score them and set their release. Launch it on the rung `CLAUDE.md`'s delegation rule gives a subagent that files or scores items. Keep the scores and releases it writes. For a security finding, launch it at once. Any rung may remove a finished item's row and detail, and score a delegated task's L. A subagent launched for another task leaves `todo.md` alone.
- **An item's release allows the bump that semver read strictly asks for.** An item that changes what exists needs a major, or before 1.0.0 a minor. One that only adds needs a minor, and a fix a patch.