Answer architecture round 1: 3 🔴, 7 🟡; read the items table by column name, let an item wait while its blocker is held in any order, fill this plan's blockers, file the judge's bundled rung as item 153
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- `todo.md`'s items table has a Blocked by column, right after Release, listing the IDs of the items that must be done before an item starts, such as `12, 14`. `rank_todo.py` moves each blocker just above the first item it blocks, drops an ID once that item leaves the table, and adds the column to a table without it; a project's plan takes the column the next time `rank_todo.py` runs on it. `rank_todo.py` now fails on text beside the table under `## Items`, such as a line naming items to take first: put an order in the scores or the column. `loop-claude` routes a chunk on the next release's first item that waits on nothing, which is the item the worker takes, so the first cycle runs on that item's rung.
|
||||
- `todo.md`'s items table has a Blocked by column, right after Release, listing the IDs of the items that must be done before an item starts, such as `12, 14`. `rank_todo.py` moves each blocker just above the first item it blocks, drops an ID once that item leaves the table, and adds the column to a table without it; a project's plan takes the column the next time `rank_todo.py` runs on it. `rank_todo.py` now fails on text beside the table under `## Items`, such as a line naming items to take first: put an order in the scores or the column. `loop-claude` routes a chunk on the next release's first item that waits on nothing, which is the item the worker takes, so the first cycle runs on that item's rung. The tools now read the table's cells by column name, and `rank_todo.py` fails on a column it does not know rather than drop it. Move every machine to this release before any of them ranks a plan another machine shares: an older release reads the new table as no plan. `rank_todo.py` does not turn a line such as "Needs 12" in an item's detail into a Blocked by cell; move each into the column by hand.
|
||||
- The new `bin/stability-replay <model>` replays archived stability reviews of the projects run on the model, each on the code it reviewed, first on the project's rung and then on each rung below, and prints the lowest rung that, like each rung above it, finds every 🔴 and 🟡 finding the project's rung finds. It shares its search with `judge-replay`, which now tries rungs from the project's rung down, where it tried them from the cheapest up. Its first run, on Opus 5.5 projects, found none: Sonnet 5.5 at high missed 13 of the 29 findings the project's rung found again. So the stability reviewer stays on the project's rung while the worker runs below it.
|
||||
- A `todo.md` item you tell a session to keep is marked `owner` in its Exempt cell, and stays whatever its score.
|
||||
- A `loop-claude` worker hands a task that proves too hard for its rung to a subagent one rung up, edits included, when a trigger fires: a re-score of the item on the project's rung or above picks a higher rung, the same failing test or finding survives two fix attempts, or a review pass reports a 🔴 in round 2 or later. Each further trigger climbs one more rung, to at most two rungs above the rung the chunk's `todo.md` item picks, unless you agree. `CLAUDE.md` states the rule, and `loop-claude`'s prompt names the rungs a trigger opens. The worker opens the subagent's prompt with `Escalation trigger <n>:`, and `routing-figures.md` counts the escalations by trigger. Expect a chunk that gets stuck to spend more on the stuck part, and fewer unfinished verdicts.
|
||||
|
||||
@@ -11,7 +11,7 @@ How work proceeds in any repo, unless the repo's `AGENTS.md` says otherwise. The
|
||||
- **Open every chunk with one line:** the last version cut, how many changes are unreleased (the entries under `CHANGELOG.md` → `## Unreleased`, or else the commits since the last tag), and the release this chunk ships into. A repo that publishes nothing says so once.
|
||||
- **Read the README's `## Goals` and `## Audience` before starting a chunk, unless your prompt quotes them.** The chunk's items set its scope. The goals choose between ways to deliver those items, and never add to them.
|
||||
- **Read the plan and the decisions only as far as the chunk needs.** Run `grep -n '^## Details' todo.md`, then read `todo.md` with the Read tool up to the line it prints, or whole when it prints none. Then read the details of only the items the chunk takes. `AGENTS.md` lists every decision's title. Read the entry under a title in `docs/decisions.md` only where the title leaves open what the chunk or the review needs.
|
||||
- **Work one chunk at a time, and make it as large as one purpose allows.** Every review has a fixed cost, so a chunk takes the next plan item plus every other item for which three things hold: one PR title states what they achieve together, without listing them; they name one release; and they fire the same review passes (`larv-review` §3). Tiny items, a few lines of change each, need neither a shared purpose nor the same passes: bundle up to ten that name one release into one chunk. Split a milestone into items in `todo.md` before starting it. Fix a finding in the chunk's own change within the chunk. File a finding about anything else in `todo.md`. An item marked `question` waits for the human, and so does each item it blocks; take the next item.
|
||||
- **Work one chunk at a time, and make it as large as one purpose allows.** Every review has a fixed cost, so a chunk takes the next plan item plus every other item for which four things hold: one PR title states what they achieve together, without listing them; they name one release; they fire the same review passes (`larv-review` §3); and no item outside the chunk blocks one of them. Tiny items, a few lines of change each, need neither a shared purpose nor the same passes: bundle up to ten that name one release, and that no item outside the chunk blocks, into one chunk. Split a milestone into items in `todo.md` before starting it. Fix a finding in the chunk's own change within the chunk. File a finding about anything else in `todo.md`. An item waits while it is marked `question`, which waits for the human, or while an item that blocks it is still in the plan; take the next item that does not wait.
|
||||
- **Ask, don't guess.** First check whether the goals already answer the question. If they nearly do, propose a change to the goals and show how it answers this case: an answer settles one question, a goal settles every question like it. Write every answer once, where it belongs, never only in chat: a goal in `README.md`, a working rule in `AGENTS.md`, a standing choice in a comment at the one place it governs, or in `docs/decisions.md` once made in more than one place. When an answer holds a goal and a choice, write the goal in the README, and record as a choice only what the goal leaves open.
|
||||
- **Bench a syntax with the people who write it.** Before a new or changed spelling of something users read or write ships — markdown, HTML, a config key, a CLI flag — a panel of fresh-context readers, seated as those users from the README's `## Audience`, picks it.
|
||||
- **Implement the simplest change that solves the item, and ship it with `/larv-review`.** Whenever a test can check the change, write that test first and see it fail. larv-review's reviewers hold the change to the technical principles, and a finding against one names it. Read a file under `~/.claude/principles/` only when the item changes it, a finding or a record you write names it, or you decline a finding.
|
||||
|
||||
@@ -34,7 +34,7 @@ def said(overall: str, locality: str = "same") -> str:
|
||||
|
||||
|
||||
def item(id_: int, release: tuple[int, int, int], tagline: str = "**Do it.**") -> Item:
|
||||
return Item(id_, release, "", tagline, {"R": 1, "S": 1, "C": 3, "A": 1, "G": 1}, ("1",))
|
||||
return Item(id_, release, "", tagline, {"R": 1, "S": 1, "C": 3, "A": 1, "G": 1}, ("1",), ())
|
||||
|
||||
|
||||
def todo(*rows: str) -> str:
|
||||
|
||||
@@ -43,8 +43,8 @@ for the worker and the interrupt; with both set, nothing is asked.
|
||||
|
||||
Where that model is on the routing ladder (bin/model_routing/ladder.py), the worker and the
|
||||
interrupt run on one of the ladder's rungs: a model at an effort. As a chunk starts, the R + C of
|
||||
todo.md's top item in the next release that waits on nothing picks the rung: an item waits when
|
||||
marked question, or when an item that waits blocks it. It
|
||||
todo.md's top item in the next release that does not wait picks the rung: an item waits while it is
|
||||
marked question, or while an item that blocks it is still in the table. It
|
||||
counts from the model's cheapest rung, and an R + C of 8 or less picks a rung below it; without
|
||||
such an item, or with a C missing, the chunk runs on the model's cheapest rung. The worker's first
|
||||
prompt names the rung and the item, and asks the worker to name each item the chunk takes, with its
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Which ladder rung a chunk's worker and judge run on: docs/decisions.md → `routing:`."""
|
||||
import dataclasses
|
||||
|
||||
from model_routing.ladder import climbed, floored, highest, LADDER, picked, position, project_rung, Rung, stepped_up
|
||||
from model_routing.ladder import climbed, highest, LADDER, picked, position, project_rung, Rung, stepped_up
|
||||
from failure import Failure
|
||||
from todo_table import Item, items
|
||||
from todo_table import Item, items, waiting
|
||||
from model_routing.route import Route
|
||||
|
||||
UNFINISHED_PER_STEP = 2
|
||||
@@ -14,21 +14,14 @@ JUDGE_REPLAYED = ("claude-opus-5-5",)
|
||||
|
||||
|
||||
def routed_item(todo: str) -> Item | Failure | None:
|
||||
"""The next release's first row that waits on nothing, in the table's order, which rank_todo.py keeps with each blocker above the items it blocks; None when there is none, or it has no C.
|
||||
|
||||
An item waits on a question it is marked with, or on a blocker that waits.
|
||||
"""
|
||||
"""The next release's first row that waits on nothing, as todo_table.waiting says, in the table's order; None when there is none, or it has no C."""
|
||||
found = items(todo)
|
||||
if isinstance(found, Failure) or not found:
|
||||
return found if isinstance(found, Failure) else None
|
||||
next_release = min(item.release for item in found)
|
||||
waiting: set[int] = set()
|
||||
for item in found:
|
||||
if item.exempt == "question" or waiting.intersection(item.blocked_by):
|
||||
waiting.add(item.id)
|
||||
elif item.release == next_release:
|
||||
return item if item.risk_and_complexity else None
|
||||
return None
|
||||
waits = waiting(found)
|
||||
takes = next((item for item in found if item.release == next_release and item.id not in waits), None)
|
||||
return takes if takes and takes.risk_and_complexity else None
|
||||
|
||||
|
||||
def first_route(anchor: Rung, item: Item | None) -> Route:
|
||||
@@ -89,13 +82,13 @@ def taken_in(anchor: Rung, route: Route, bundled: int) -> Rung:
|
||||
|
||||
|
||||
def judge_rung(judge_model: str, route: Route) -> Rung:
|
||||
"""The rung the route's item picks from the judge model's cheapest rung, never below that rung, whatever rung the worker stepped to.
|
||||
"""item_rung counted from the judge model's cheapest rung, never below that rung, whatever rung the worker stepped to.
|
||||
|
||||
An item the worker takes in besides moves the worker's rung but not the judge's.
|
||||
An item the judge reports bundled lifts the worker, through taken_in, but not the judge, until todo.md item 153 has the judge follow it.
|
||||
|
||||
A model off the ladder, or not in JUDGE_REPLAYED, gets no effort flag, so claude runs it at the effort its settings give.
|
||||
"""
|
||||
anchor = project_rung(judge_model)
|
||||
if anchor is None or judge_model not in JUDGE_REPLAYED:
|
||||
return Rung(judge_model)
|
||||
return floored(anchor, route.risk_and_complexity) if route.item else anchor
|
||||
return highest(anchor, item_rung(anchor, route))
|
||||
|
||||
@@ -512,6 +512,8 @@ class Routing(unittest.TestCase):
|
||||
todo = "## Items\n\n| ID | Release | Blocked by | Exempt | Item | R | S | C | A | G | Goals | Score |\n|---|---|---|---|---|---|---|---|---|---|---|---|\n| 7 | 0.2.0 | | question | **Ask first.** | 9 | 1 | 9 | 9 | 9 | 1 | 30 |\n| 8 | 0.2.0 | 7 | | **Use the answer.** | 1 | 1 | 1 | 9 | 9 | 1 | 30 |\n| 9 | 0.2.0 | 8 | | **Build on it.** | 1 | 1 | 1 | 9 | 9 | 1 | 30 |\n| 3 | 0.2.0 | | | **Do the next thing.** | 5 | 3 | 6 | 8 | 9 | 1 | 25 |\n"
|
||||
self.assertEqual(routing.routed_item(todo).id, 3)
|
||||
self.assertEqual(routing.routed_item(todo.replace("| question |", "| |")).id, 7)
|
||||
unranked = todo.replace("| 7 | 0.2.0 | | question | **Ask first.** | 9 | 1 | 9 | 9 | 9 | 1 | 30 |\n", "") + "| 7 | 0.2.0 | | question | **Ask first.** | 9 | 1 | 9 | 9 | 9 | 1 | 30 |\n"
|
||||
self.assertEqual(routing.routed_item(unranked).id, 3)
|
||||
|
||||
def test_starts_a_chunk_on_the_rung_its_items_r_plus_c_picks_below_the_projects_too(self):
|
||||
self.assertEqual(routing.first_route(self.OPUS, routing.routed_item(TODO)), Route(self.HIGH, 3, 11))
|
||||
|
||||
+63
-43
@@ -53,6 +53,8 @@ A valid todo.md; ## Details and each item's detail are optional:
|
||||
loop. An ID at or above Next ID fails; one below it that the table no longer holds was finished
|
||||
or deleted, and is dropped.
|
||||
- ## Items holds the table and nothing else: an order goes in the scores or the Blocked by column.
|
||||
- The table holds the columns above, a table from before Blocked by or C joined read by column name;
|
||||
a column this version does not know fails, rather than be dropped.
|
||||
|
||||
Exit 1, saying why, on bad arguments, a file that cannot be read or written, a todo.md, README.md or
|
||||
docs/decisions.md that breaks the rules above, an item that is not exempt scoring under the bar, or
|
||||
@@ -65,7 +67,7 @@ import pathlib
|
||||
import re
|
||||
import sys
|
||||
|
||||
from todo_table import BLOCKED_BY, cells, Item, ITEMS_HEADER, parse_row, table_rows, WITHOUT_BLOCKERS, WITHOUT_C
|
||||
from todo_table import BLOCKED_BY, cells, COLUMNS, DIVIDER, HEADER_START, Item, ITEMS_HEADER, items_table, parse_row, Table, table_rows
|
||||
from failure import Failure
|
||||
from markdown_text import FENCE, sections
|
||||
from file_writes import replace_file
|
||||
@@ -173,9 +175,24 @@ def rank(text: str, readme: str, decisions: str) -> Ranked | Failure:
|
||||
table = read_items(lines, scoring)
|
||||
if isinstance(table, Failure):
|
||||
return table
|
||||
items, start = table
|
||||
items, found = table
|
||||
if uncited := check_citations(items, decisions):
|
||||
return uncited
|
||||
scored = ordered(items, scoring)
|
||||
if isinstance(scored, Failure):
|
||||
return scored
|
||||
# Every table gets the header of COLUMNS, so one from before BLOCKED_BY joined gains the column.
|
||||
lines[found.header:found.start] = [ITEMS_HEADER, DIVIDER]
|
||||
lines[found.start:found.start + len(scored)] = [render_item(item, value) for item, value in scored]
|
||||
ranked = rank_details("\n".join(lines), [item for item, _ in scored])
|
||||
if isinstance(ranked, Failure):
|
||||
return ranked
|
||||
under_bar = [under_the_bar(item, value, scoring.bar, items) for item, value in scored if not item.exempt and round(value, 1) < scoring.bar]
|
||||
return Ranked(ranked, under_bar)
|
||||
|
||||
|
||||
def ordered(items: list[Item], scoring: Scoring) -> list[tuple[Item, float]] | Failure:
|
||||
"""Each item with its score, by release, then security first, then by score from highest, then by ID; then each blocker just above the first item it blocks."""
|
||||
by_score = []
|
||||
for item in items:
|
||||
value = score(scoring.formula, item, scoring.weights)
|
||||
@@ -183,25 +200,18 @@ def rank(text: str, readme: str, decisions: str) -> Ranked | Failure:
|
||||
return value
|
||||
by_score.append((item, value))
|
||||
by_score.sort(key=lambda pair: (pair[0].release, pair[0].exempt != "security", -pair[1], pair[0].id))
|
||||
scored = blockers_first(by_score, scoring.next_id)
|
||||
if isinstance(scored, Failure):
|
||||
return scored
|
||||
# A table without BLOCKED_BY gets it here.
|
||||
lines[start - 2:start] = [ITEMS_HEADER, "|" + "---|" * ITEMS_HEADER.count(" | ") + "---|"]
|
||||
lines[start:start + len(scored)] = [render_item(item, value) for item, value in scored]
|
||||
ranked = rank_details("\n".join(lines), [item for item, _ in scored])
|
||||
if isinstance(ranked, Failure):
|
||||
return ranked
|
||||
under_bar = [f"item {item.id} scores {value:.1f}, under the bar {scoring.bar:g}; delete it and any item that needs it, or mark it with a reason the bar does not apply" for item, value in scored if not item.exempt and round(value, 1) < scoring.bar]
|
||||
return Ranked(ranked, under_bar)
|
||||
return blockers_first(by_score)
|
||||
|
||||
|
||||
def under_the_bar(item: Item, value: float, bar: float, items: list[Item]) -> str:
|
||||
blocks = [str(other.id) for other in items if item.id in other.blocked_by]
|
||||
blocked = f" and the items it blocks, {', '.join(blocks)}" if blocks else ""
|
||||
return f"item {item.id} scores {value:.1f}, under the bar {bar:g}; delete it{blocked}, or mark it with a reason the bar does not apply"
|
||||
|
||||
|
||||
def read_scoring(text: str, lines: list[str], readme: str) -> Scoring | Failure:
|
||||
if ITEMS_HEADER not in lines and WITHOUT_BLOCKERS not in lines and "## Items" not in lines:
|
||||
if "## Items" not in lines and items_table(lines) is None:
|
||||
return Failure("todo.md is not in the scored-table format; rank_todo.py --help shows a valid one")
|
||||
# A table without C fails, so no chunk starts on an unscored item.
|
||||
if WITHOUT_C in lines:
|
||||
return Failure("todo.md's items table has no C column; add one after S, and score each item's C from 1 to 10 per rank_todo.py --help")
|
||||
goals = readme_goals(readme)
|
||||
if isinstance(goals, Failure):
|
||||
return goals
|
||||
@@ -220,17 +230,24 @@ def read_scoring(text: str, lines: list[str], readme: str) -> Scoring | Failure:
|
||||
return Scoring(formula, bar, int(next_id), weights)
|
||||
|
||||
|
||||
def read_items(lines: list[str], scoring: Scoring) -> tuple[list[Item], int] | Failure:
|
||||
"""The items, and the index of the first row in lines."""
|
||||
header = WITHOUT_BLOCKERS if WITHOUT_BLOCKERS in lines and ITEMS_HEADER not in lines else ITEMS_HEADER
|
||||
table = table_rows(lines, header)
|
||||
def read_items(lines: list[str], scoring: Scoring) -> tuple[list[Item], Table] | Failure:
|
||||
"""The items, and the table they were read from."""
|
||||
table = items_table(lines)
|
||||
if table is None:
|
||||
return Failure(f"## Items holds no table whose header opens {HEADER_START}; rank_todo.py --help shows a valid one")
|
||||
if isinstance(table, Failure):
|
||||
return table
|
||||
if beside_table(lines, table.start - 2, table.start + len(table.rows)):
|
||||
# A table without C fails, so no chunk starts on an unscored item.
|
||||
if "C" not in table.columns:
|
||||
return Failure("todo.md's items table has no C column; add one after S, and score each item's C from 1 to 10 per rank_todo.py --help")
|
||||
# Ranking writes COLUMNS, so it would drop a column it does not know.
|
||||
if unknown := [column for column in table.columns if column not in COLUMNS]:
|
||||
return Failure(f"todo.md's items table has the column {', '.join(unknown)}, which this rank_todo.py does not know; move this machine to the release that added it")
|
||||
if beside_table(lines, table.header, table.start + len(table.rows)):
|
||||
return Failure(f"## Items holds text beside its table; an order goes in the scores or the {BLOCKED_BY} column, and a note in the item's detail")
|
||||
items = []
|
||||
for row in table.rows:
|
||||
item = parse_item(row, scoring.weights, header)
|
||||
item = parse_item(row, scoring.weights, table.columns)
|
||||
if isinstance(item, Failure):
|
||||
return item
|
||||
items.append(item)
|
||||
@@ -239,7 +256,10 @@ def read_items(lines: list[str], scoring: Scoring) -> tuple[list[Item], int] | F
|
||||
return Failure("two items share an ID")
|
||||
if ids and max(ids) >= scoring.next_id:
|
||||
return Failure(f"item {max(ids)} is not under Next ID {scoring.next_id}; raise Next ID past every ID")
|
||||
return items, table.start
|
||||
for item in items:
|
||||
if unheld := [blocker for blocker in item.blocked_by if blocker >= scoring.next_id]:
|
||||
return Failure(f"item {item.id} is blocked by item {unheld[0]}, which is not under Next ID {scoring.next_id}; name an item the table holds or held")
|
||||
return items, table
|
||||
|
||||
|
||||
def beside_table(lines: list[str], header: int, end: int) -> bool:
|
||||
@@ -250,40 +270,40 @@ def beside_table(lines: list[str], header: int, end: int) -> bool:
|
||||
return any(line.strip() for line in lines[heading + 1:header] + section)
|
||||
|
||||
|
||||
def blockers_first(scored: list[tuple[Item, float]], next_id: int) -> list[tuple[Item, float]] | Failure:
|
||||
def blockers_first(scored: list[tuple[Item, float]]) -> list[tuple[Item, float]] | Failure:
|
||||
"""scored, each blocker moved up to just above the first item it blocks; a blocker the table no longer holds was finished or deleted, and is dropped."""
|
||||
held = {item.id: (item, value) for item, value in scored}
|
||||
position = {item.id: index for index, (item, _) in enumerate(scored)}
|
||||
for item, _ in scored:
|
||||
for blocker in item.blocked_by:
|
||||
if blocker >= next_id:
|
||||
return Failure(f"item {item.id} is blocked by item {blocker}, which is not under Next ID {next_id}; name an item the table holds or held")
|
||||
if blocker == item.id:
|
||||
return Failure(f"item {item.id} is blocked by itself; drop {item.id} from its {BLOCKED_BY}")
|
||||
if blocker in held and held[blocker][0].release > item.release:
|
||||
later, earlier = release_name(held[blocker][0]), release_name(item)
|
||||
return Failure(f"item {item.id} is blocked by item {blocker}, which release {later} ships after release {earlier}; move item {blocker} to release {earlier} or earlier, or item {item.id} to release {later} or later")
|
||||
ordered: list[tuple[Item, float]] = []
|
||||
result: list[tuple[Item, float]] = []
|
||||
for item, _ in scored:
|
||||
if looped := place(item.id, held, position, ordered, []):
|
||||
return looped
|
||||
return ordered
|
||||
placed = place(item.id, held, position, {placed.id for placed, _ in result}, [])
|
||||
if isinstance(placed, Failure):
|
||||
return placed
|
||||
result += placed
|
||||
return result
|
||||
|
||||
|
||||
def place(id_: int, held: dict[int, tuple[Item, float]], position: dict[int, int], ordered: list[tuple[Item, float]], path: list[int]) -> Failure | None:
|
||||
"""Appends to ordered the item id_ after its blockers, each in score order; path holds the items waiting on this one, to find a loop."""
|
||||
def place(id_: int, held: dict[int, tuple[Item, float]], position: dict[int, int], placed: set[int], path: list[int]) -> list[tuple[Item, float]] | Failure:
|
||||
"""The item id_ preceded by those of its blockers not yet placed, each in score order, and theirs before them; path holds the items waiting on this one, to find a loop."""
|
||||
if id_ in path:
|
||||
loop = sorted(path[path.index(id_):])
|
||||
return Failure(f"items {', '.join(map(str, loop[:-1]))} and {loop[-1]} block each other in a loop; drop one of the blockers")
|
||||
if any(placed.id == id_ for placed, _ in ordered):
|
||||
return None
|
||||
if id_ in placed:
|
||||
return []
|
||||
item, value = held[id_]
|
||||
blockers = sorted((blocker for blocker in set(item.blocked_by) if blocker in held), key=position.__getitem__)
|
||||
added: list[tuple[Item, float]] = []
|
||||
for blocker in blockers:
|
||||
if looped := place(blocker, held, position, ordered, [*path, id_]):
|
||||
return looped
|
||||
ordered.append((dataclasses.replace(item, blocked_by=tuple(sorted(blockers))), value))
|
||||
return None
|
||||
before = place(blocker, held, position, placed | {entry.id for entry, _ in added}, [*path, id_])
|
||||
if isinstance(before, Failure):
|
||||
return before
|
||||
added += before
|
||||
return [*added, (dataclasses.replace(item, blocked_by=tuple(sorted(blockers))), value)]
|
||||
|
||||
|
||||
def release_name(item: Item) -> str:
|
||||
@@ -415,8 +435,8 @@ def parse_weights(lines: list[str], goals: list[str]) -> dict[str, float] | Fail
|
||||
return weights
|
||||
|
||||
|
||||
def parse_item(row: str, weights: dict[str, float], header: str) -> Item | Failure:
|
||||
item = parse_row(row, header)
|
||||
def parse_item(row: str, weights: dict[str, float], columns: tuple[str, ...]) -> Item | Failure:
|
||||
item = parse_row(row, columns)
|
||||
if isinstance(item, Failure):
|
||||
return item
|
||||
if unknown := [goal for goal in item.goals if goal not in weights]:
|
||||
|
||||
@@ -23,7 +23,7 @@ def todo(*rows: str, header: str = HEADER) -> str:
|
||||
|
||||
|
||||
def item(id_: int, scores: dict[str, int]) -> Item:
|
||||
return Item(id_, (0, 1, 0), "", f"**Item {id_}.**", scores, ("1",))
|
||||
return Item(id_, (0, 1, 0), "", f"**Item {id_}.**", scores, ("1",), ())
|
||||
|
||||
|
||||
def outcome(id_: int, r: int, s: int, c: int | None, lines: int = 10, rounds: int = 1, findings: tuple[int, int] | None = (0, 0), merged: str = "2026-10-13T10:00:00Z", shipped_with: tuple[int, ...] = ()) -> Outcome:
|
||||
|
||||
+12
-1
@@ -11,6 +11,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
|
||||
from failure import Failure
|
||||
import rank_todo
|
||||
from repo_checks.test_python_floor import ROOT
|
||||
import todo_table
|
||||
|
||||
README = "# P\n\n## Goals\n\n1. Fast.\n2. Correct.\n 1. Tested.\n\n## Audience\n\nMe.\n"
|
||||
|
||||
@@ -81,7 +82,9 @@ class Rank(unittest.TestCase):
|
||||
|
||||
def test_names_each_item_under_the_bar_that_is_not_exempt(self):
|
||||
ranked = self.ranked(TODO.replace("`Bar = 9`", "`Bar = 11`"))
|
||||
self.assertEqual(ranked.under_bar, ["item 2 scores 10.3, under the bar 11; delete it and any item that needs it, or mark it with a reason the bar does not apply"])
|
||||
self.assertEqual(ranked.under_bar, ["item 2 scores 10.3, under the bar 11; delete it, or mark it with a reason the bar does not apply"])
|
||||
blocking = self.ranked(TODO.replace("`Bar = 9`", "`Bar = 11`").replace("| 3 | 0.1.0 | |", "| 3 | 0.1.0 | 2 |"))
|
||||
self.assertEqual(blocking.under_bar, ["item 2 scores 10.3, under the bar 11; delete it and the items it blocks, 3, or mark it with a reason the bar does not apply"])
|
||||
self.assertEqual(self.ranked(ranked.text.replace("| 2 | 0.1.0 | | |", "| 2 | 0.1.0 | | principle |")).under_bar, [])
|
||||
self.assertEqual(self.ranked(ranked.text.replace("| 2 | 0.1.0 | | |", "| 2 | 0.1.0 | | owner |")).under_bar, [])
|
||||
|
||||
@@ -167,6 +170,14 @@ class Blockers(unittest.TestCase):
|
||||
without = re.sub(r"\| (\d) \| (0\.[12]\.0) \| \| ", r"| \1 | \2 | ", without)
|
||||
self.assertEqual(self.ranked(without), self.ranked(TODO))
|
||||
|
||||
def test_refuses_a_column_it_does_not_know_rather_than_drop_it_and_asks_for_c_beside_blocked_by(self):
|
||||
extra = TODO.replace("| Goals | Score |\n|---|", "| Goals | Score | Later |\n|---|---|").replace(" | 0 |\n", " | 0 | x |\n")
|
||||
self.assertEqual(self.ranked(extra), Failure("todo.md's items table has the column Later, which this rank_todo.py does not know; move this machine to the release that added it"))
|
||||
self.assertEqual([item.id for item in todo_table.items(extra)], [1, 2, 3, 4, 5])
|
||||
without_c = TODO.replace("| R | S | C |", "| R | S |").replace("|---|---|---|---|---|---|---|---|---|---|---|---|", "|---|---|---|---|---|---|---|---|---|---|---|")
|
||||
without_c = re.sub(r"(\*\* \| \d+ \| \d+) \| \d+ \|", r"\1 |", without_c)
|
||||
self.assertEqual(self.ranked(without_c).reason, "todo.md's items table has no C column; add one after S, and score each item's C from 1 to 10 per rank_todo.py --help")
|
||||
|
||||
def test_refuses_text_under_items_beside_the_table(self):
|
||||
for text in ("Release 0.1.0 takes item 5 first.\n\n", ""):
|
||||
ordered = TODO.replace("## Items\n\n", f"## Items\n\n{text}") if text else TODO.replace("| 1 | 0.2.0 | | | **Ship the later thing.** | 1 | 1 | 3 | 9 | 9 | 1 | 0 |\n", "| 1 | 0.2.0 | | | **Ship the later thing.** | 1 | 1 | 3 | 9 | 9 | 1 | 0 |\n\nTake item 5 first.\n")
|
||||
|
||||
+55
-26
@@ -8,13 +8,14 @@ TOP_SCORE = 10
|
||||
EXEMPTIONS = ("", "decision", "defect", "owner", "principle", "question", "security")
|
||||
# The column naming the items that block an item: each must be done before the item starts.
|
||||
BLOCKED_BY = "Blocked by"
|
||||
# The columns rank_todo writes, in order. A reader takes cells by column name, so it reads a table from before BLOCKED_BY or C joined, or with a column a later release adds.
|
||||
COLUMNS = ("ID", "Release", BLOCKED_BY, "Exempt", "Item", "R", "S", "C", "A", "G", "Goals", "Score")
|
||||
ITEMS_HEADER = "| " + " | ".join(COLUMNS) + " |"
|
||||
# A table from before BLOCKED_BY joined lacks it; items() parses it as blocked by nothing, and rank_todo adds the column.
|
||||
WITHOUT_BLOCKERS = "| " + " | ".join(column for column in COLUMNS if column != BLOCKED_BY) + " |"
|
||||
# Tables in git history from before C joined lack it too; items() still parses them, though rank_todo refuses one in a checkout.
|
||||
WITHOUT_C = "| " + " | ".join(column for column in COLUMNS if column not in (BLOCKED_BY, "C")) + " |"
|
||||
HEADERS = (ITEMS_HEADER, WITHOUT_BLOCKERS, WITHOUT_C)
|
||||
DIVIDER = "|" + "---|" * len(COLUMNS)
|
||||
# The columns without which no row can be read; a missing BLOCKED_BY reads as blocked by nothing, a missing C as no C.
|
||||
NEEDED = ("ID", "Release", "Exempt", "Item", "R", "S", "A", "G", "Goals")
|
||||
# How the items table's header opens, which tells it from the goal weights table.
|
||||
HEADER_START = "| ID | Release |"
|
||||
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
@@ -26,7 +27,7 @@ class Item:
|
||||
scores: dict[str, int]
|
||||
goals: tuple[str, ...]
|
||||
# The IDs of the items that block it.
|
||||
blocked_by: tuple[int, ...] = ()
|
||||
blocked_by: tuple[int, ...]
|
||||
|
||||
@property
|
||||
def risk_and_complexity(self) -> int:
|
||||
@@ -36,39 +37,65 @@ class Item:
|
||||
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Table:
|
||||
"""Body rows of a markdown table, and the index of the first row in the file's lines."""
|
||||
start: int
|
||||
"""A markdown table: the index of its header in the file's lines, its column names, and its body rows."""
|
||||
header: int
|
||||
columns: tuple[str, ...]
|
||||
rows: list[str]
|
||||
|
||||
@property
|
||||
def start(self) -> int:
|
||||
"""The index of the first body row, below the header and the divider."""
|
||||
return self.header + 2
|
||||
|
||||
|
||||
def items(todo: str) -> list[Item] | None | Failure:
|
||||
"""Each row of a todo.md's items table, with or without BLOCKED_BY and C; None where todo.md holds no items table."""
|
||||
lines = todo.splitlines()
|
||||
headers = [header for header in HEADERS if header in lines]
|
||||
if not headers:
|
||||
return None
|
||||
table = table_rows(lines, headers[0])
|
||||
if isinstance(table, Failure):
|
||||
"""Each row of a todo.md's items table; None where todo.md holds no items table."""
|
||||
table = items_table(todo.splitlines())
|
||||
if table is None or isinstance(table, Failure):
|
||||
return table
|
||||
found = []
|
||||
for row in table.rows:
|
||||
item = parse_row(row, headers[0])
|
||||
item = parse_row(row, table.columns)
|
||||
if isinstance(item, Failure):
|
||||
return item
|
||||
found.append(item)
|
||||
return found
|
||||
|
||||
|
||||
def items_table(lines: list[str]) -> Table | None | Failure:
|
||||
"""The table whose header opens with HEADER_START; None where there is none."""
|
||||
headers = [line for line in lines if line.startswith(HEADER_START)]
|
||||
if not headers:
|
||||
return None
|
||||
if len(headers) > 1:
|
||||
return Failure(f"todo.md holds {len(headers)} tables whose header opens {HEADER_START}; keep one items table")
|
||||
table = table_rows(lines, headers[0])
|
||||
if isinstance(table, Failure):
|
||||
return table
|
||||
if missing := [column for column in NEEDED if column not in table.columns]:
|
||||
return Failure(f"todo.md's items table has no {', '.join(missing)} column; rank_todo.py --help shows a valid one")
|
||||
return table
|
||||
|
||||
|
||||
def waiting(found: list[Item]) -> set[int]:
|
||||
"""The IDs of the items that wait: each marked question, or blocked by an item the table still holds. It holds in any order of the rows."""
|
||||
held = {item.id for item in found}
|
||||
return {item.id for item in found if item.exempt == "question" or held.intersection(item.blocked_by)}
|
||||
|
||||
|
||||
def table_rows(lines: list[str], header: str) -> Table | Failure:
|
||||
if lines.count(header) != 1:
|
||||
return Failure(f"todo.md needs the table header {header} once")
|
||||
start = lines.index(header) + 2
|
||||
if start > len(lines) or not re.fullmatch(r"\|(-+\|)+", lines[start - 1].replace(" ", "")):
|
||||
at = lines.index(header)
|
||||
if at + 2 > len(lines) or not re.fullmatch(r"\|(-+\|)+", lines[at + 1].replace(" ", "")):
|
||||
return Failure(f"the table under {header} has no |---| divider line")
|
||||
end = start
|
||||
end = at + 2
|
||||
while end < len(lines) and lines[end].startswith("|"):
|
||||
end += 1
|
||||
return Table(start, lines[start:end])
|
||||
columns = cells(header, header.count("|") - 1)
|
||||
if isinstance(columns, Failure):
|
||||
return columns
|
||||
return Table(at, tuple(columns), lines[at + 2:end])
|
||||
|
||||
|
||||
def cells(row: str, count: int) -> list[str] | Failure:
|
||||
@@ -76,13 +103,12 @@ def cells(row: str, count: int) -> list[str] | Failure:
|
||||
return found if len(found) == count else Failure(f"this row needs {count} cells: {row}")
|
||||
|
||||
|
||||
def parse_row(row: str, header: str = ITEMS_HEADER) -> Item | Failure:
|
||||
"""An item row under header, every cell checked but the goals it cites."""
|
||||
names = header.strip("| ").split(" | ")
|
||||
found = cells(row, len(names))
|
||||
def parse_row(row: str, columns: tuple[str, ...] = COLUMNS) -> Item | Failure:
|
||||
"""An item row under columns, every cell checked but the goals it cites."""
|
||||
found = cells(row, len(columns))
|
||||
if isinstance(found, Failure):
|
||||
return found
|
||||
named = dict(zip(names, found))
|
||||
named = dict(zip(columns, found))
|
||||
id_, release, exempt, tagline = named["ID"], named["Release"], named["Exempt"], named["Item"]
|
||||
if not re.fullmatch(r"[0-9]+", id_) or int(id_) < 1:
|
||||
return Failure(f"the ID {id_!r} is not a positive whole number: {row}")
|
||||
@@ -102,6 +128,9 @@ def parse_row(row: str, header: str = ITEMS_HEADER) -> Item | Failure:
|
||||
blockers = named.get(BLOCKED_BY, "")
|
||||
if not re.fullmatch(r"([0-9]+(, [0-9]+)*)?", blockers):
|
||||
return Failure(f"item {id_}'s {BLOCKED_BY} {blockers!r} is not empty or IDs separated by \", \"")
|
||||
blocked_by = tuple(int(blocker) for blocker in blockers.split(", ") if blocker)
|
||||
if int(id_) in blocked_by:
|
||||
return Failure(f"item {id_} is blocked by itself; drop {id_} from its {BLOCKED_BY}")
|
||||
cited = tuple(goal.strip() for goal in named["Goals"].split(","))
|
||||
major, minor, patch = (int(part) for part in release.split("."))
|
||||
return Item(int(id_), (major, minor, patch), exempt, tagline, scores, cited, tuple(int(blocker) for blocker in blockers.split(", ") if blocker))
|
||||
return Item(int(id_), (major, minor, patch), exempt, tagline, scores, cited, blocked_by)
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
|
||||
2026-09-20, lilleman. Serves goal 1. Across six projects scored with the four seats, Locality or Self-sufficiency was the lowest dimension at every seat and Navigation at none, so a layout fix would not lift a project under the floor. Valid while the scoring run keeps those four seats.
|
||||
|
||||
2026-10-15, lilleman: an item that lifts the lowest dimension scores G 9. The lowest dimension caps the overall, so lifting it is worth the most to the floor, and the score ranks such an item first in its release. A line in `todo.md` used to put these items first whatever their scores; `todo.md` holds no order but its table's now (`todo.md: one table`). PR #257's scoring run found Shape lowest, at 6.25; the Shape items are `todo.md` items 114, 124 and 125, in release 0.3.0 with the other readability items.
|
||||
2026-10-15, lilleman: an item that lifts the lowest dimension ranks first in its release, since the lowest dimension caps the overall and lifting it is worth the most to the floor. Its score does it: such an item scores G 9, which ranks it first in release 0.3.0 today. When `todo.md` item 148 replaces G, the chunk that ships it carries this rule into the new score. A line in `todo.md` used to put these items first whatever their scores; `todo.md` holds no order but its table's now (`todo.md: one table`). PR #257's scoring run found Shape lowest, at 6.25; the Shape items are `todo.md` items 114, 124 and 125, in release 0.3.0 with the other readability items.
|
||||
|
||||
## loop-claude: a judge decides each interrupt and each quoted answer from the transcript, the README's premises, `AGENTS.md`, `docs/decisions.md`, `~/.claude/CLAUDE.md`, `~/.claude/rules/` and larv-review's standards, and holds a chunk open while an answer the human typed in it is recorded nowhere; the worker's own account of which goal settles a choice decides nothing
|
||||
|
||||
@@ -126,7 +126,7 @@ Valid while the ladder orders its rungs by competence.
|
||||
|
||||
2026-10-15, lilleman: the scores get a researched method, which `todo.md` items 146, 148, 149, 150, 151 and 152 build; the evidence is in `docs/scoring-and-goals-research.md`. R becomes L + E + I − 2: the chance the change holds a defect, set first by its size; the chance the defect escapes tests, review and monitoring; and the worst impact dimension, each about ×10 per level. I5, irreversible, holds R at 7 or more, and I4 at 5 or more, since a severe enough consequence outranks how unlikely it is. C goes from every table and tool: what it scored beyond size, spread and novelty, which L already holds, is complexity, which adds almost nothing once size is accounted for. A task's R alone then picks its rung. Items rank by V / C, value per cost: C is 2^S, and V sums each cited achieve goal's sum-reciprocal weight times how far the item moves it. A goes, and the Audience says whose value the goals serve. R stays out of the ranking and sets how carefully an item is done; an item that lowers risk scores it as value. Each release fills by priority up to a capacity it states, in place of the bar. Each README goal is `maintain`, which vetoes an item that breaks it, or `achieve`, with a signal, a counter-signal and a one-line reason, and each project keeps settled decisions to test its goals against. Until these items ship, the formula and bar above hold.
|
||||
|
||||
2026-10-15, lilleman. Serves goals 1.3 and 1.4: the first row that waits on nothing is the item a chunk takes, so loop-claude routes the first cycle on the right item (`routing: one ladder`). An item names the items that must be done before it starts in a Blocked by column, and `rank_todo.py` moves each blocker just above the first item it blocks. An item blocked by one that waits on a question waits too. A blocker in a later release, a loop and an ID at or above Next ID fail; a blocker the table no longer holds was finished or deleted, and is dropped, so the cell shows what still blocks. The table's order is `todo.md`'s only order: `rank_todo.py` fails on text beside the table under `## Items`. A prose order there, "Release 0.3.0 takes items 125, 114 and 124 first", contradicted the table and loop-claude could not read it; a decision that wants an order sets the scores instead. A panel of three readers seated as lilleman picked the spelling: two ranked "Blocked by" first, since a blocker that ships leaves the cell, and all three chose bare IDs such as `12, 14` in a column right after Release, read before the tagline and kept apart from the scores. `rank_todo.py` adds the column to a table without it, so each project takes it at its next ranking.
|
||||
2026-10-15, lilleman. Serves goals 1.3 and 1.4: the first row that waits on nothing is the item a chunk takes, so loop-claude routes the first cycle on the right item (`routing: one ladder`). An item names the items that must be done before it starts in a Blocked by column, and `rank_todo.py` moves each blocker just above the first item it blocks. An item waits while it is marked `question` or a blocker of it is still in the table, whatever the rows' order, and loop-claude routes on the next release's first item that does not wait. A blocker in a later release, a loop and an ID at or above Next ID fail; a blocker the table no longer holds was finished or deleted, and is dropped, so the cell shows what still blocks. The table's order is `todo.md`'s only order: `rank_todo.py` fails on text beside the table under `## Items`. A prose order there, "Release 0.3.0 takes items 125, 114 and 124 first", contradicted the table and loop-claude could not read it; a decision that wants an order sets the scores instead. A panel of three readers seated as lilleman picked the spelling: two ranked "Blocked by" first, since a blocker that ships leaves the cell, and all three chose bare IDs such as `12, 14` in a column right after Release, read before the tagline and kept apart from the scores. `rank_todo.py` adds the column to a table without it, so each project takes it at its next ranking. The tools read the table's cells by column name, so a later column leaves a reader on an older release working; `rank_todo.py`, which writes every column, fails on one it does not know rather than drop it.
|
||||
|
||||
## todo.md: only a session or subagent on the project's rung or above scores or reshapes the plan; one below it drafts new items and changes to filed ones for a subagent at or above that rung to apply and score, and removes finished ones
|
||||
|
||||
@@ -238,7 +238,7 @@ On a model listed in `JUDGE_REPLAYED` in `bin/loop_claude/routing.py`, the judge
|
||||
|
||||
On 2026-10-15, `bin/judge-replay claude-opus-5-5` replayed the latest 15 archived verdicts of each kind from the Opus 5.5 projects, 39 in all. The reference judge, Opus 5.5 at the xhigh effort `settings.json` gave every judge before, reproduced 31 of them. The other 8 may rest on records or judge rules that have changed since; either way no rung is held to them. On the 31, Haiku 5.5 missed 7 at xhigh and 8 at max. That run tried each judge once. 4 of Haiku's misses, 1 at xhigh and 3 at max, misquoted the transcript, which the loop and `judge-replay` now retry; without them it missed 6 and 5. Sonnet 5.5 at high returned another kind on 3 interrupts, and Opus 5.5 at medium missed none. A missed interrupt lets the worker settle a decision that is lilleman's (goal 1.2), so the judge never runs below the project's rung.
|
||||
|
||||
Only Opus 5.5 was replayed, so the judge of a project on another model keeps the effort its settings give until `judge-replay` covers that model (goal 1.1). Every routed chunk on record had an item of R + C 9, so the replay could not show that the project's rung suffices for harder items, and the judge climbs with the routed item as the worker does. For R + C 11 to 14 it still runs at or below xhigh (goal 1.4); from 15, `routing: one ladder` records that lilleman wants the highest quality at any price. An item the worker takes in besides lifts the worker, not the judge.
|
||||
Only Opus 5.5 was replayed, so the judge of a project on another model keeps the effort its settings give until `judge-replay` covers that model (goal 1.1). Every routed chunk on record had an item of R + C 9, so the replay could not show that the project's rung suffices for harder items, and the judge climbs with the routed item as the worker does. For R + C 11 to 14 it still runs at or below xhigh (goal 1.4); from 15, `routing: one ladder` records that lilleman wants the highest quality at any price. An item the worker takes in besides lifts the worker, not the judge, until `todo.md` item 153 has the judge follow it.
|
||||
|
||||
Valid while the archived verdicts show what a judge should return, and until a new model joins the ladder: replay then.
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
`Bar = 9`
|
||||
|
||||
`Next ID = 153`
|
||||
`Next ID = 154`
|
||||
|
||||
| Goal | W |
|
||||
|---|---|
|
||||
@@ -25,16 +25,17 @@
|
||||
| ID | Release | Blocked by | Exempt | Item | R | S | C | A | G | Goals | Score |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 150 | 0.2.0 | | decision | **Make each README goal `maintain` or `achieve`, give each achieve goal a signal, a counter-signal and a one-line reason, and have a maintain goal veto an item that breaks it.** | 3 | 3 | 4 | 7 | 8 | 1.2 | 25.9 |
|
||||
| 148 | 0.2.0 | | decision | **Rank items by V / C, where C is 2^S and V sums each cited achieve goal's sum-reciprocal weight times how far the item moves it, and drop A.** | 5 | 5 | 6 | 7 | 8 | 1.1, 1.2 | 23.6 |
|
||||
| 152 | 0.2.0 | | decision | **Anchor each score level in `rules/todo-items.md` with words, and each project's with two or three items it shipped, and have a scorer compare a new item against them.** | 2 | 4 | 3 | 6 | 7 | 1.1, 1.3 | 22.9 |
|
||||
| 149 | 0.2.0 | | decision | **Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.** | 3 | 3 | 3 | 6 | 7 | 1.1 | 22.1 |
|
||||
| 148 | 0.2.0 | 150 | decision | **Rank items by V / C, where C is 2^S and V sums each cited achieve goal's sum-reciprocal weight times how far the item moves it, and drop A.** | 5 | 5 | 6 | 7 | 8 | 1.1, 1.2 | 23.6 |
|
||||
| 146 | 0.2.0 | | decision | **Score R as L + E + I − 2 from anchored levels, at least 7 at I5 and 5 at I4, with L, E and I in their own columns and `rank_todo.py` computing R, drop C, and route a task's model and effort on its R alone.** | 6 | 7 | 7 | 7 | 8 | 1.1, 1.2, 1.4 | 22.1 |
|
||||
| 151 | 0.2.0 | | decision | **Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.** | 3 | 5 | 5 | 6 | 7 | 1.2 | 21.5 |
|
||||
| 152 | 0.2.0 | 146, 148 | decision | **Anchor each score level in `rules/todo-items.md` with words, and each project's with two or three items it shipped, and have a scorer compare a new item against them.** | 2 | 4 | 3 | 6 | 7 | 1.1, 1.3 | 22.9 |
|
||||
| 149 | 0.2.0 | 148 | decision | **Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.** | 3 | 3 | 3 | 6 | 7 | 1.1 | 22.1 |
|
||||
| 151 | 0.2.0 | 150 | decision | **Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.** | 3 | 5 | 5 | 6 | 7 | 1.2 | 21.5 |
|
||||
| 105 | 0.2.0 | | decision | **Compare review rounds per pass and reading cost for the five chunks before and after the `worker:` decision moved the principles out of the worker's context, and file an item if either rose.** | 1 | 2 | 3 | 5 | 6 | 1.4 | 20.0 |
|
||||
| 112 | 0.2.0 | | | **Count an item as shipped only where its chunk built it, so an item a chunk dropped from the plan gets no outcome.** | 2 | 3 | 5 | 5 | 6 | 1.1 | 19.1 |
|
||||
| 110 | 0.2.0 | | | **Count, for each finished chunk, the later changes that fixed code it wrote, and show them beside its guessed E.** | 2 | 4 | 6 | 5 | 6 | 1.1, 1.4 | 18.9 |
|
||||
| 115 | 0.2.0 | | question | **Confirm or set how many finished chunks that each shipped one item `score-outcomes` waits for before it shows a score's medians, today 10.** | 1 | 1 | 2 | 4 | 5 | 1.2 | 16.6 |
|
||||
| 116 | 0.2.0 | | | **Report L by the share of chunks with a 🔴, once 10 chunks that each shipped one item record finding counts and most record no 🔴.** | 1 | 2 | 2 | 4 | 5 | 1.1 | 16.4 |
|
||||
| 153 | 0.2.0 | | decision | **Run the judge on the rung the highest R + C in its chunk picks, an item the worker takes in included, not only the routed item's.** | 2 | 3 | 4 | 4 | 5 | 1.2 | 15.1 |
|
||||
| 111 | 0.2.0 | | | **Measure the chunks of a project that merges by squash or fast-forward, which `score-outcomes` skips today.** | 3 | 3 | 5 | 4 | 5 | 1.3 | 13.9 |
|
||||
| 113 | 0.2.0 | | | **Compute an item's S from the code it names, where it names any, and show it beside the finished items `score-outcomes` lists.** | 3 | 4 | 6 | 4 | 5 | 1.1, 1.4 | 13.9 |
|
||||
| 125 | 0.3.0 | | decision | **Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds.** | 2 | 5 | 3 | 3 | 9 | 1.1 | 20.6 |
|
||||
@@ -92,15 +93,7 @@
|
||||
|
||||
### 148. Rank items by V / C, where C is 2^S and V sums each cited achieve goal's sum-reciprocal weight times how far the item moves it, and drop A.
|
||||
|
||||
Needs 150. A goal ranked k of n weighs (1/k) / (1 + 1/2 + … + 1/n). An item that moves a goal by M, 1 to 10, adds weight × M to V. S stays 1 to 10, each step about ×2.5 in lines changed, which `docs/scoring-and-goals-research.md` → "This repo's own measurements" found. R stays out of the ranking. The Goal weights table goes from `todo.md`, since the rule derives them.
|
||||
|
||||
### 152. Anchor each score level in `rules/todo-items.md` with words, and each project's with two or three items it shipped, and have a scorer compare a new item against them.
|
||||
|
||||
Needs 146 and 148. LLM ratings drift to the middle of an unanchored scale, and worked examples cut estimation error. A project's anchors are shipped items, cited by ID and commit, chosen from what `score-outcomes` measured for them.
|
||||
|
||||
### 149. Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.
|
||||
|
||||
Needs 148. A release's capacity is a sum of its items' C. Each project states its own; the human sets the first value per project. Nothing is deleted by score.
|
||||
A goal ranked k of n weighs (1/k) / (1 + 1/2 + … + 1/n). An item that moves a goal by M, 1 to 10, adds weight × M to V. S stays 1 to 10, each step about ×2.5 in lines changed, which `docs/scoring-and-goals-research.md` → "This repo's own measurements" found. R stays out of the ranking. The Goal weights table goes from `todo.md`, since the rule derives them.
|
||||
|
||||
### 146. Score R as L + E + I − 2 from anchored levels, at least 7 at I5 and 5 at I4, with L, E and I in their own columns and `rank_todo.py` computing R, drop C, and route a task's model and effort on its R alone.
|
||||
|
||||
@@ -118,9 +111,17 @@ Each level is about ×10 of a real quantity; `docs/decisions.md` → `todo.md:
|
||||
|
||||
C goes in the same chunk, so no reshaped table meets bands built for R + C: R alone runs 1 to 10, and the R + C bands would step most tasks well down the ladder. The bands (`docs/decisions.md` → `routing: one ladder…`) become bands over R, spread across the R values the rescored plans hold. The bands are the human's call, so the chunk proposes them and waits, and puts one option beside them: the worker routed on L and its reviewers on E + I, since impact makes a task riskier, not harder. `CLAUDE.md`'s delegation rule, `subagent-rung` and its `--plan`, loop-claude's chunk routing and prompts, the judge's rung, escalation trigger 1 and `score-outcomes` drop C. The routing decision's "S never moves a rung" no longer holds, since size sets L, so the chunk revises it. Once it merges, append a `Reset` to `routing-calls-raised.md`, as `AGENTS.md` says of a band change, so the routing figures count only chunks routed on R.
|
||||
|
||||
### 152. Anchor each score level in `rules/todo-items.md` with words, and each project's with two or three items it shipped, and have a scorer compare a new item against them.
|
||||
|
||||
LLM ratings drift to the middle of an unanchored scale, and worked examples cut estimation error. A project's anchors are shipped items, cited by ID and commit, chosen from what `score-outcomes` measured for them.
|
||||
|
||||
### 149. Fill each release by priority up to a capacity it states, in place of the bar, and move what does not fit to a later release.
|
||||
|
||||
A release's capacity is a sum of its items' C. Each project states its own; the human sets the first value per project. Nothing is deleted by score.
|
||||
|
||||
### 151. Keep 10 to 20 settled decisions per project as its goals' test set, and rerun them after a goal changes.
|
||||
|
||||
Needs 150. Each case is a question the project settled and the answer it chose. A fresh-context agent given only the README's premises answers each case; a case it answers differently says the goals no longer decide it. Written guidance can fail to change behaviour, which is why the goals get a test.
|
||||
Each case is a question the project settled and the answer it chose. A fresh-context agent given only the README's premises answers each case; a case it answers differently says the goals no longer decide it. Written guidance can fail to change behaviour, which is why the goals get a test.
|
||||
|
||||
### 105. Compare review rounds per pass and reading cost for the five chunks before and after the `worker:` decision moved the principles out of the worker's context, and file an item if either rose.
|
||||
|
||||
@@ -142,6 +143,10 @@ The `worker:` decision is valid while review rounds per pass do not rise. Count
|
||||
|
||||
`score-outcomes` reports risk as the median 🔴 count at each guessed R; with item 146 it is L a 🔴 tests. Where most chunks have no 🔴, every median reads 0 and tells a scorer nothing. No round title held counts before PR #254, so how often a chunk has a 🔴 is not yet known.
|
||||
|
||||
### 153. Run the judge on the rung the highest R + C in its chunk picks, an item the worker takes in included, not only the routed item's.
|
||||
|
||||
The judge reports the R + C of an item the worker takes in, and `routing.stepped` lifts the worker to the rung it picks, but `judge_rung` reads only the routed item's R + C, which the archived route line holds. A harder item taken in so leaves the judge on a lower rung than the work, where a missed interrupt lets the worker settle a decision that is lilleman's (goal 1.2). The route must carry the highest R + C taken in, archived so a rerun keeps it.
|
||||
|
||||
### 111. Measure the chunks of a project that merges by squash or fast-forward, which `score-outcomes` skips today.
|
||||
|
||||
`score-outcomes` reads a chunk from a merge commit: its branch's round titles, and its change against the first parent. Two of the projects under `~/code` merge without merge commits, so their scorers see no finished item.
|
||||
@@ -152,19 +157,19 @@ The `worker:` decision is valid while review rounds per pass do not rise. Count
|
||||
|
||||
### 125. Give "record", "outcome" and "places" one meaning each across `bin/`, and rename `bin/larv_review/git.py` by what it holds.
|
||||
|
||||
Shape is the lowest dimension, so this item goes before 0.3.0's other items, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`.
|
||||
Shape is the lowest dimension, so this item scores G 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`.
|
||||
|
||||
The inherited architect of PR #257's scoring run named `bin/reading_cost/measure.py:16` `Reading` and `bin/larv_review/git.py:6` `history_changes`, and found each word used for several concepts. "Record": the history writer `larv_review/record.py`, the judge's `loop_claude/project/records.py`, and `reading_cost/figures.py`'s `RECORD`. "Outcome": `transcript_archive/outcomes.py`, `score_outcomes/outcomes.py` `Outcome` and `rule_hook/rules.py` `Outcome`. "Places": `comprehension_history.Place` and `Reading.places`. `larv_review/git.py` holds history logic, not a git runner. Make `Reading` and `history_changes` easier to read.
|
||||
|
||||
### 114. Run git through `git_repo.py` in `rule_hook`, `metric_bench`, `reading_cost`, `stability_replay` and `loop_claude`, keeping rule-hook's guards as an option, so one module owns how a tool runs git.
|
||||
|
||||
Shape is the lowest dimension, so this item goes before 0.3.0's other items, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`.
|
||||
Shape is the lowest dimension, so this item scores G 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`.
|
||||
|
||||
The comprehension seats on PR #254 found five git runners with different contracts: `git_repo.git`, `rule_hook/git.py`'s guarded one, `metric_bench/main.py`'s, `reading_cost/main.py`'s `located` and `loop_claude/effects.py`'s. PR #276 added a sixth, `stability_replay/main.py`'s `git`. The inherited architect of PR #257's scoring run named `bin/git_repo.py:8` `git` again. Make `git_repo.git` easier to read.
|
||||
|
||||
### 124. Group the shared modules at `bin/`'s root into packages named by purpose, so the root holds only launchers and stand-alone tools.
|
||||
|
||||
Shape is the lowest dimension, so this item goes before 0.3.0's other items, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`.
|
||||
Shape is the lowest dimension, so this item scores G 9, per `docs/decisions.md` → `larv-review: a project lifting itself to the comprehension floor starts at the lowest dimension`.
|
||||
|
||||
PR #257's scoring run put Shape at 6.25, the lowest dimension. `bin/` holds about 30 entries: 6 launchers, 6 tool packages, 3 shared packages and 13 root modules. Two root modules are tools (`rank_todo.py`, `statusline.py`) and 11 are shared libraries, and nothing in the layout tells them apart; only README's import-root paragraph maps them. Candidate packages: git running and parsing, the todo table, and the comprehension history with round titles. The `.gitignore` allowlist and README follow the move.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user