Read a project's goals and audience from the file its config names, in place of README.md
CI / tests (pull_request) Successful in 2m17s

This commit is contained in:
2026-11-13 00:06:11 +01:00
parent b439cd82e1
commit eb61043c12
37 changed files with 243 additions and 147 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ EXEMPTIONS: tuple[Exempt, ...] = typing.get_args(Exempt)
BLOCKED_BY = "Blocked by"
# The column naming each achieve goal an item moves and how far, such as `1.1 by 8, 1.2 by 5`.
MOVES = "Moves"
# The achieve goal every project shares, which ~/.claude/CLAUDE.md → "Shared goal" states, and a Moves cell names by these words, since it has no number in any README.
# The achieve goal every project shares, which ~/.claude/CLAUDE.md → "Shared goal" states, and a Moves cell names by these words, since it has no number in any goals file.
CODE_HEALTH = "code health"
# How the items table's header opens, which tells it from any other table in todo.md.
HEADER_START = "| ID | Release |"
@@ -60,7 +60,7 @@ class Shape:
def parse_moves(id_: str, cell: str) -> Moves | Failure:
"""A Moves cell: empty, or each goal the item moves, named once, and how far. ranking.py's cited_goals_failure holds the rules that need README.md."""
"""A Moves cell: empty, or each goal the item moves, named once, and how far. ranking.py's cited_goals_failure holds the rules that need the goals file."""
matches = [re.fullmatch(rf"([0-9]+(?:\.[0-9]+)*|{CODE_HEALTH}) by ([0-9]+)", move) for move in cell.split(", ")] if cell else []
moves = tuple((match.group(1), int(match.group(2))) for match in matches if match)
if len(moves) < len(matches) or any(not 1 <= by <= TOP_SCORE for _, by in moves):
@@ -260,7 +260,7 @@ def cells(row: str, count: int) -> list[str] | Failure:
def parse_row(row: str, table: Table) -> Item | Failure:
"""An item row of table, every cell checked but whether README.md numbers and weighs the goals it names."""
"""An item row of table, every cell checked but whether the goals file numbers and weighs the goals it names."""
found = cells(row, len(table.columns))
if isinstance(found, Failure):
return found