From 64eb8fc7d75a38179dcc5340bcb455697743aee0 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Fri, 13 Nov 2026 02:49:07 +0100 Subject: [PATCH] Name the text-file helpers for what they hold, and keep what counts as a quote beside the judge --- .gitignore | 4 ++-- README.md | 2 +- bin/branch_chunks/cut.py | 2 +- bin/chunk_preflight/facts.py | 2 +- bin/claude_code/test_claude_code.py | 8 -------- bin/claude_code/transcript.py | 11 ----------- bin/command_patterns/main.py | 2 +- bin/deploy_release/deploy.py | 2 +- bin/larv_review/history_commands.py | 2 +- bin/larv_review/scoring_setup.py | 2 +- bin/loop_claude/cycle/chunk_items.py | 2 +- bin/loop_claude/cycle/judge.py | 3 ++- bin/loop_claude/cycle/prompts.py | 2 +- bin/loop_claude/escalation_mark.py | 3 ++- bin/loop_claude/loop/routing_check.py | 2 +- bin/loop_claude/project/model_choice.py | 2 +- bin/loop_claude/quotes.py | 12 ++++++++++++ bin/loop_claude/test_loop_claude.py | 2 +- bin/loop_claude/test_quotes.py | 15 +++++++++++++++ bin/loop_state/running_loops.py | 2 +- bin/loop_state/session_lock.py | 2 +- bin/loop_state/waiting/answers.py | 2 +- bin/loop_state/waiting/ask.py | 2 +- bin/loop_state/waiting/listing.py | 2 +- bin/reading_cost/figures.py | 4 ++-- bin/reading_cost/main.py | 4 ++-- bin/release_plan/goals_file.py | 2 +- bin/release_plan/plan_file.py | 2 +- bin/release_plan/ranking.py | 2 +- bin/release_plan/release_standing.py | 2 +- bin/release_plan/todo_table.py | 2 +- bin/review_rules/comprehension_history.py | 4 ++-- bin/review_rules/reviewer_context.py | 2 +- bin/routing_figures/archive.py | 2 +- bin/routing_figures/state.py | 4 ++-- bin/rule_hook/override_log.py | 2 +- bin/score_outcomes/main.py | 2 +- bin/score_outcomes/results.py | 2 +- bin/{records => text_files}/__init__.py | 0 bin/{records => text_files}/file_writes.py | 0 bin/{records => text_files}/markdown_text.py | 0 bin/{records => text_files}/test_file_writes.py | 2 +- bin/{records => text_files}/test_markdown_text.py | 2 +- bin/{records => text_files}/utc_stamp.py | 0 bin/transcript_archive/outcomes.py | 4 ++-- bin/transcript_archive/test_transcript_archive.py | 2 +- bin/transcript_archive/write.py | 4 ++-- todo.md | 2 +- 48 files changed, 76 insertions(+), 66 deletions(-) create mode 100644 bin/loop_claude/quotes.py create mode 100644 bin/loop_claude/test_quotes.py rename bin/{records => text_files}/__init__.py (100%) rename bin/{records => text_files}/file_writes.py (100%) rename bin/{records => text_files}/markdown_text.py (100%) rename bin/{records => text_files}/test_file_writes.py (94%) rename bin/{records => text_files}/test_markdown_text.py (98%) rename bin/{records => text_files}/utc_stamp.py (100%) diff --git a/.gitignore b/.gitignore index 29ffa9d5..fcfa7f7e 100644 --- a/.gitignore +++ b/.gitignore @@ -82,8 +82,6 @@ !bin/reading-cost !bin/reading_cost/ !bin/reading_cost/*.py -!bin/records/ -!bin/records/*.py !bin/release_plan/ !bin/release_plan/*.py !bin/repo_checks/ @@ -118,6 +116,8 @@ !bin/subagent_rung/ !bin/subagent_rung/*.py !bin/test_*.py +!bin/text_files/ +!bin/text_files/*.py !bin/todo-item !bin/todo_item/ !bin/todo_item/*.py diff --git a/README.md b/README.md index 4bbeac0c..db1ad7c1 100644 --- a/README.md +++ b/README.md @@ -172,7 +172,7 @@ Install puts only `loop-claude` and `loop-inbox` on `PATH`; call the others by t - `mattermost_dm/` sends the human a Mattermost DM, for `mattermost-dm` and for loop-claude through `loop_effects`. - `model_routing/` holds the routing ladder, which loop-claude, `rule_hook`, both replay tools and `subagent-rung` read, and the list prices, which `routing_figures` and `transcript_archive` read. - `rank_todo.py`, `settings_filter.py` and `statusline.py` are tools of one file each, tested beside them. -- `records/` reads a Markdown file's `##` sections, quotes a passage and joins names into a list, stamps times in UTC, and replaces a file in one step, private where it is new. +- `text_files/` reads a Markdown file's `##` sections, quotes a passage and joins names into a list, stamps times in UTC, and replaces a file in one step, private where it is new. - `release_plan/` reads `todo.md`'s items table and release versions, says which release is next and whether it is ready to cut (`release_standing.py`), and ranks the plan (`ranking.py`, with its score formula in `formula.py` and its blocker order in `blockers.py`). `goals_file.py` reads the goals file's sections, goals and goal weights, for the ranking and for `loop_claude`'s premises, and `citations.py` holds `todo.md` and `docs/decisions.md` to each other. `plan_file.py` reads, ranks, checks and writes a `todo.md`, for `larv_review`, `rank_todo.py`, `rule_hook` and `todo_item`. - `repo_checks/` tests the repo itself. - `review_rules/` holds the larv-review rules that several tools apply: its passes, its review folder, its round commit titles and the comprehension history's format. diff --git a/bin/branch_chunks/cut.py b/bin/branch_chunks/cut.py index 78c0ab27..8da5dc6f 100644 --- a/bin/branch_chunks/cut.py +++ b/bin/branch_chunks/cut.py @@ -6,7 +6,7 @@ from failure import Failure from review_rules.comprehension_history import HISTORY from release_plan.todo_table import Item, items from reading_cost.figures import RECORD -from records.utc_stamp import utc +from text_files.utc_stamp import utc # The plan, and the records tools append to: none of their lines are the chunk's work. NOT_WORK = ("todo.md", HISTORY, RECORD) diff --git a/bin/chunk_preflight/facts.py b/bin/chunk_preflight/facts.py index 3b6e2b6f..5a80a988 100644 --- a/bin/chunk_preflight/facts.py +++ b/bin/chunk_preflight/facts.py @@ -4,7 +4,7 @@ from chunk_preflight.choices import cut_name, PULLS_LIST from release_plan.release_standing import dated_cut, LastCut, unreleased_entries, UNSEEN_RELEASES from failure import Failure from chunk_preflight.gathered import Forge, Gathered, ItemFacts, NamedPath, NoItem, Plan, Ran -from records.markdown_text import listed, quoted +from text_files.markdown_text import listed, quoted from release_plan.release import version diff --git a/bin/claude_code/test_claude_code.py b/bin/claude_code/test_claude_code.py index 470ded3e..6e67a355 100644 --- a/bin/claude_code/test_claude_code.py +++ b/bin/claude_code/test_claude_code.py @@ -43,14 +43,6 @@ class Render(unittest.TestCase): self.assertEqual(said, '[human] do it\n\nStarting.\n\n[tool Bash] {"command": "ls"}\n\n[human] yes, merge it\n\n[human] B, while you work\n\n[loop] Continue the task; the previous run stopped before it was finished.\n\n[loop] Your question: A or B?\n\n[human] use B') -class Verbatim(unittest.TestCase): - def test_a_quote_holds_only_word_for_word_less_emphasis_and_whitespace(self): - self.assertTrue(transcript.verbatim("Merge **ff-only**.", "Merge ff-only.\nNever squash.")) - self.assertTrue(transcript.verbatim("Merge _ff-only_.", "Merge ff-only.\nNever squash.")) - self.assertFalse(transcript.verbatim("Merge ... squash.", "Merge ff-only.\nNever squash.")) - self.assertFalse(transcript.verbatim("", "Merge ff-only.")) - - class FirstTimestampedLine(unittest.TestCase): def test_skips_the_lines_every_chunk_shares_and_else_takes_the_first(self): self.assertEqual(transcript.first_timestamped_line(b'{"type": "custom-title"}\nnot JSON\n{"timestamp": "t"}\n{"timestamp": "u"}\n'), b'{"timestamp": "t"}') diff --git a/bin/claude_code/transcript.py b/bin/claude_code/transcript.py index a6e05e69..7b89712b 100644 --- a/bin/claude_code/transcript.py +++ b/bin/claude_code/transcript.py @@ -80,14 +80,3 @@ def part_line(part: Text | ToolCall, tool_input_chars: int) -> str: if isinstance(part, ToolCall): return f"[tool {part.name}] {json.dumps(part.input, ensure_ascii=False)[:tool_input_chars]}" return part.text if part.text.strip() else "" - - -def verbatim(quote: str, text: str) -> bool: - """Whether text holds the judge's quote word for word, once plain strips emphasis and reflows whitespace in both.""" - quoted = plain(quote) - return quoted != "" and quoted in plain(text) - - -def plain(text: str) -> str: - # The judge drops markdown emphasis and reflows whitespace when it quotes. - return " ".join(text.replace("*", "").replace("_", "").split()) diff --git a/bin/command_patterns/main.py b/bin/command_patterns/main.py index b90e5c7a..e7f29d69 100644 --- a/bin/command_patterns/main.py +++ b/bin/command_patterns/main.py @@ -38,7 +38,7 @@ from transcript_archive.read import finished_chunks, read_threads from git_cli.git_repo import git from transcript_archive.location import project_archive from command_patterns.tally import records, table, tally -from records.utc_stamp import seconds +from text_files.utc_stamp import seconds USAGE = "usage: command-patterns [] [--calls ]" diff --git a/bin/deploy_release/deploy.py b/bin/deploy_release/deploy.py index 77610c1f..faaaf756 100644 --- a/bin/deploy_release/deploy.py +++ b/bin/deploy_release/deploy.py @@ -2,7 +2,7 @@ from failure import Failure from git_cli.git_repo import git from release_plan.release import newest_tag, parsed, tagged -from records.markdown_text import sections +from text_files.markdown_text import sections def deploy(checkout: str) -> str | Failure: diff --git a/bin/larv_review/history_commands.py b/bin/larv_review/history_commands.py index f1e8f136..f3d02a74 100644 --- a/bin/larv_review/history_commands.py +++ b/bin/larv_review/history_commands.py @@ -13,7 +13,7 @@ from larv_review.scoring import floor_step, means, under_floor from release_plan import plan_file from project_config.main import project from larv_review.scoring_setup import removed_setup -from records.file_writes import replace_file +from text_files.file_writes import replace_file def record_ruling(votes_file: pathlib.Path) -> Failure | None: diff --git a/bin/larv_review/scoring_setup.py b/bin/larv_review/scoring_setup.py index b776aea6..47260852 100644 --- a/bin/larv_review/scoring_setup.py +++ b/bin/larv_review/scoring_setup.py @@ -6,7 +6,7 @@ import shutil from review_rules.comprehension_history import DIMENSIONS from failure import Failure -from records.markdown_text import FENCE, listed, section +from text_files.markdown_text import FENCE, listed, section from git_cli.git_repo import git from project_config.main import located from review_rules.review_folder import made_review_folder, review_folder diff --git a/bin/loop_claude/cycle/chunk_items.py b/bin/loop_claude/cycle/chunk_items.py index 939bb138..e6032e6d 100644 --- a/bin/loop_claude/cycle/chunk_items.py +++ b/bin/loop_claude/cycle/chunk_items.py @@ -4,7 +4,7 @@ import re from claude_code.entries import AssistantTurn, Entry, Text from failure import Failure from release_plan.todo_table import items -from claude_code.transcript import plain +from loop_claude.quotes import plain from loop_claude.verdicts import TakenIn # The label opening the line; prompts.NAME_THE_ITEMS asks the worker for it. diff --git a/bin/loop_claude/cycle/judge.py b/bin/loop_claude/cycle/judge.py index cb398406..6637a3cb 100644 --- a/bin/loop_claude/cycle/judge.py +++ b/bin/loop_claude/cycle/judge.py @@ -10,7 +10,8 @@ from claude_code.entries import Entry, structured_output from loop_claude import escalation_mark from failure import Failure from loop_claude.verdicts import Finished, Interrupt, Judged, QuotedAnswer, Unfinished, Verdict -from claude_code.transcript import human_answers, plain, verbatim +from claude_code.transcript import human_answers +from loop_claude.quotes import plain, verbatim from loop_claude.cycle.retry import retried from model_routing.ladder import Rung from loop_claude.stop import Stop diff --git a/bin/loop_claude/cycle/prompts.py b/bin/loop_claude/cycle/prompts.py index 6fa70630..fc2121f1 100644 --- a/bin/loop_claude/cycle/prompts.py +++ b/bin/loop_claude/cycle/prompts.py @@ -6,7 +6,7 @@ from model_routing.route import ESCALATION_MARKER, Route from loop_claude.routing import escalation_rungs from loop_claude.project.records import HUMAN_RULE_NAMES, RECORD_FILES from review_rules.review_passes import INSTRUCTION_FILES, INSTRUCTION_FOLDERS -from records.markdown_text import listed, quoted +from text_files.markdown_text import listed, quoted from claude_code.transcript import Typed # Where the judge may quote an answer from, named as the human and the worker see them; of the goals file the judge sees only the premises. diff --git a/bin/loop_claude/escalation_mark.py b/bin/loop_claude/escalation_mark.py index 165d07d4..0df8597a 100644 --- a/bin/loop_claude/escalation_mark.py +++ b/bin/loop_claude/escalation_mark.py @@ -10,9 +10,10 @@ A worker whose run ends asking loop-claude for a higher rung cites the trigger t import dataclasses import typing -from claude_code.transcript import assistant_lines, render, Typed, verbatim +from claude_code.transcript import assistant_lines, render, Typed from claude_code.entries import AssistantTurn, Entry from loop_claude.verdicts import Escalating, Verdict +from loop_claude.quotes import verbatim # Only the judge reads the step line, so it is not a [loop] line. STEP_TAG = "[step]" diff --git a/bin/loop_claude/loop/routing_check.py b/bin/loop_claude/loop/routing_check.py index b842244a..b7ef0cf3 100644 --- a/bin/loop_claude/loop/routing_check.py +++ b/bin/loop_claude/loop/routing_check.py @@ -15,7 +15,7 @@ from model_routing.ladder import Rung from routing_figures import state from loop_claude.stop import Stop from loop_claude.direct_message import tell -from records.utc_stamp import utc +from text_files.utc_stamp import utc def check_routing(root: pathlib.Path, rung: Rung, loop: Loop) -> Stop | None: diff --git a/bin/loop_claude/project/model_choice.py b/bin/loop_claude/project/model_choice.py index 79a11801..df10216c 100644 --- a/bin/loop_claude/project/model_choice.py +++ b/bin/loop_claude/project/model_choice.py @@ -9,7 +9,7 @@ from loop_effects.effects import Effects, say from failure import Failure from loop_claude.stop import needs_human, needs_terminal, Stop from loop_state.paths import Paths -from records.file_writes import replace_json +from text_files.file_writes import replace_json @dataclasses.dataclass(frozen=True) diff --git a/bin/loop_claude/quotes.py b/bin/loop_claude/quotes.py new file mode 100644 index 00000000..d89680a7 --- /dev/null +++ b/bin/loop_claude/quotes.py @@ -0,0 +1,12 @@ +"""What counts as a quote, for every check of a passage the judge or the worker quotes: of the transcript, the premises, the records or a human's line.""" + + +def verbatim(quote: str, text: str) -> bool: + """Whether text holds the judge's quote word for word, once plain strips emphasis and reflows whitespace in both.""" + quoted = plain(quote) + return quoted != "" and quoted in plain(text) + + +def plain(text: str) -> str: + # The judge drops markdown emphasis and reflows whitespace when it quotes. + return " ".join(text.replace("*", "").replace("_", "").split()) diff --git a/bin/loop_claude/test_loop_claude.py b/bin/loop_claude/test_loop_claude.py index 2cd14dd4..8a681a8e 100644 --- a/bin/loop_claude/test_loop_claude.py +++ b/bin/loop_claude/test_loop_claude.py @@ -45,7 +45,7 @@ from loop_claude import routing from loop_claude.stop import Stop from loop_state.running_loops import Taken from claude_code.tokens import Tokens, tokens_of -from records.utc_stamp import utc +from text_files.utc_stamp import utc from loop_claude.cycle.judge import verdict_from from loop_state.waiting.listing import waiting diff --git a/bin/loop_claude/test_quotes.py b/bin/loop_claude/test_quotes.py new file mode 100644 index 00000000..09f98009 --- /dev/null +++ b/bin/loop_claude/test_quotes.py @@ -0,0 +1,15 @@ +import pathlib +import sys +import unittest + +sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) + +from loop_claude import quotes + + +class Verbatim(unittest.TestCase): + def test_a_quote_holds_only_word_for_word_less_emphasis_and_whitespace(self): + self.assertTrue(quotes.verbatim("Merge **ff-only**.", "Merge ff-only.\nNever squash.")) + self.assertTrue(quotes.verbatim("Merge _ff-only_.", "Merge ff-only.\nNever squash.")) + self.assertFalse(quotes.verbatim("Merge ... squash.", "Merge ff-only.\nNever squash.")) + self.assertFalse(quotes.verbatim("", "Merge ff-only.")) diff --git a/bin/loop_state/running_loops.py b/bin/loop_state/running_loops.py index 169f0198..98660a53 100644 --- a/bin/loop_state/running_loops.py +++ b/bin/loop_state/running_loops.py @@ -18,7 +18,7 @@ from loop_effects.effects import Effects, say from loop_state.session_lock import ended, held, running from failure import Failure from release_plan.todo_table import items -from records.file_writes import replace_json +from text_files.file_writes import replace_json # How many times, 0.1 s apart, a loop tries to take its lock: loop-inbox takes it for a moment each time it checks whether the loop has ended. LOCK_TRIES = 10 diff --git a/bin/loop_state/session_lock.py b/bin/loop_state/session_lock.py index e603d8aa..38d735a2 100644 --- a/bin/loop_state/session_lock.py +++ b/bin/loop_state/session_lock.py @@ -9,7 +9,7 @@ import pathlib import typing from failure import Failure -from records.file_writes import make_private +from text_files.file_writes import make_private def lock_file(folder: pathlib.Path, session: str) -> pathlib.Path: diff --git a/bin/loop_state/waiting/answers.py b/bin/loop_state/waiting/answers.py index 000dbf81..d4f9417e 100644 --- a/bin/loop_state/waiting/answers.py +++ b/bin/loop_state/waiting/answers.py @@ -7,7 +7,7 @@ import pathlib from loop_state.waiting.ask import Ask, tagged from failure import Failure -from records.file_writes import replace_json +from text_files.file_writes import replace_json @dataclasses.dataclass(frozen=True) diff --git a/bin/loop_state/waiting/ask.py b/bin/loop_state/waiting/ask.py index 628f8ce2..12b33c19 100644 --- a/bin/loop_state/waiting/ask.py +++ b/bin/loop_state/waiting/ask.py @@ -7,7 +7,7 @@ import pathlib import typing from loop_state.hand_over import ClaudeCommand -from records.utc_stamp import seconds, utc +from text_files.utc_stamp import seconds, utc if typing.TYPE_CHECKING: from _typeshed import DataclassInstance diff --git a/bin/loop_state/waiting/listing.py b/bin/loop_state/waiting/listing.py index 8d65c370..7e6368e3 100644 --- a/bin/loop_state/waiting/listing.py +++ b/bin/loop_state/waiting/listing.py @@ -8,7 +8,7 @@ from loop_state.waiting.ask import Ask, ask_fields, read_ask from loop_effects.effects import Effects, say from loop_state.session_lock import ended, running from failure import Failure -from records.file_writes import make_private, replace_json +from text_files.file_writes import make_private, replace_json def ask_file(folder: pathlib.Path, session: str) -> pathlib.Path: diff --git a/bin/reading_cost/figures.py b/bin/reading_cost/figures.py index 3710b62c..c7b32bdb 100644 --- a/bin/reading_cost/figures.py +++ b/bin/reading_cost/figures.py @@ -5,8 +5,8 @@ import statistics from failure import Failure from transcript_archive.read import FinishedChunk from reading_cost.measure import Reading -from records.markdown_text import sections -from records.utc_stamp import STAMPED +from text_files.markdown_text import sections +from text_files.utc_stamp import STAMPED FIGURE = re.compile(rf"^Reading cost, chunk (\w+), finished ({STAMPED})$") FIGURE_FILE = re.compile(r"^- `(.+)` (\d+)$") diff --git a/bin/reading_cost/main.py b/bin/reading_cost/main.py index b4255db9..96a9a34a 100644 --- a/bin/reading_cost/main.py +++ b/bin/reading_cost/main.py @@ -35,8 +35,8 @@ from transcript_archive.read import finished_chunks, read_threads from git_cli.git_repo import git from project_config.main import project from transcript_archive.location import project_archive -from records.file_writes import replace_file -from records.utc_stamp import utc +from text_files.file_writes import replace_file +from text_files.utc_stamp import utc @dataclasses.dataclass(frozen=True) class Updated: diff --git a/bin/release_plan/goals_file.py b/bin/release_plan/goals_file.py index 9ca09ae6..16dac49e 100644 --- a/bin/release_plan/goals_file.py +++ b/bin/release_plan/goals_file.py @@ -7,7 +7,7 @@ import typing from release_plan.todo_table import CODE_HEALTH from failure import Failure from review_rules.comprehension_history import FLOOR -from records.markdown_text import sections +from text_files.markdown_text import sections # What each achieve goal weighs of the one above it; docs/decisions.md records the choice. GOAL_STEP = 0.97 diff --git a/bin/release_plan/plan_file.py b/bin/release_plan/plan_file.py index ba6dc7ef..b0f4c663 100644 --- a/bin/release_plan/plan_file.py +++ b/bin/release_plan/plan_file.py @@ -5,7 +5,7 @@ import sys from failure import Failure from project_config.settings import ProjectConfig from release_plan.ranking import rank, Ranked -from records.file_writes import replace_file +from text_files.file_writes import replace_file def rank_file(todo: pathlib.Path, config: ProjectConfig) -> Ranked | Failure: diff --git a/bin/release_plan/ranking.py b/bin/release_plan/ranking.py index c9604c67..dd27e32d 100644 --- a/bin/release_plan/ranking.py +++ b/bin/release_plan/ranking.py @@ -13,7 +13,7 @@ from release_plan.formula import evaluate, parse_formula from failure import Failure from release_plan.goals_file import goal_weights, Mark, ranked_goals from review_rules.comprehension_history import latest_overall -from records.markdown_text import listed +from text_files.markdown_text import listed from release_plan.release import version # What a point of an item's move on a maintain goal is worth. A defect that restores the goal weighs it at least this much per point. docs/decisions.md records the choice and its data. diff --git a/bin/release_plan/release_standing.py b/bin/release_plan/release_standing.py index b816b3f8..986ae070 100644 --- a/bin/release_plan/release_standing.py +++ b/bin/release_plan/release_standing.py @@ -7,7 +7,7 @@ from release_plan.release import dated, dated_heading_pattern, newest_tag, parse from failure import Failure from release_plan.todo_table import Item, items, next_item, renames from project_config.settings import Place -from records.markdown_text import sections +from text_files.markdown_text import sections # The version a branch with no v* tag and no dated CHANGELOG.md heading counts as cut: below every release, 0.0.0 included, so that every release todo.md names comes after it. BEFORE_FIRST_RELEASE = (-1, 0, 0) diff --git a/bin/release_plan/todo_table.py b/bin/release_plan/todo_table.py index 0e5ddde5..b5c524c9 100644 --- a/bin/release_plan/todo_table.py +++ b/bin/release_plan/todo_table.py @@ -3,7 +3,7 @@ import re import typing from failure import Failure -from records.markdown_text import FENCE, sections +from text_files.markdown_text import FENCE, sections from release_plan.release import parsed, Release, release_of, VERSION # Each score a Shape names, and each goal's move, runs from 1 to TOP_SCORE, but for the levels L, E and I, which run from 1 to their LEVELS: ~/.claude/rules/todo-items.md defines each level. diff --git a/bin/review_rules/comprehension_history.py b/bin/review_rules/comprehension_history.py index e6990312..04d31d68 100644 --- a/bin/review_rules/comprehension_history.py +++ b/bin/review_rules/comprehension_history.py @@ -3,8 +3,8 @@ import decimal import re from failure import Failure -from records.markdown_text import sections -from records.utc_stamp import utc +from text_files.markdown_text import sections +from text_files.utc_stamp import utc ARCHITECT = "Inherited architect" DECIDED_BY = "decided by" diff --git a/bin/review_rules/reviewer_context.py b/bin/review_rules/reviewer_context.py index fab9f94a..07b6dfc0 100644 --- a/bin/review_rules/reviewer_context.py +++ b/bin/review_rules/reviewer_context.py @@ -5,7 +5,7 @@ import re from failure import Failure from review_rules.review_passes import REVIEWERS -from records.markdown_text import section +from text_files.markdown_text import section # The sections of ~/.claude/CLAUDE.md a reviewer needs, in the file's order: the code-health goal the agents cite, the bar its own prose meets, and the words its reports use. SECTIONS = ("Shared goal", "Prose", "Vocabulary") diff --git a/bin/routing_figures/archive.py b/bin/routing_figures/archive.py index bd4efe15..907f70b5 100644 --- a/bin/routing_figures/archive.py +++ b/bin/routing_figures/archive.py @@ -15,7 +15,7 @@ from routing_figures.chunk import Chunk, chunk_figures, ChunkFigures, Subagent from git_cli.git_repo import default_ref, Git from claude_code.entries import Entry, parse_entry from failure import Failure -from records.file_writes import replace_file +from text_files.file_writes import replace_file from transcript_archive.outcomes import VERDICT_AT FIGURES = "routing-figures.md" diff --git a/bin/routing_figures/state.py b/bin/routing_figures/state.py index aa10f7e7..5db0255d 100644 --- a/bin/routing_figures/state.py +++ b/bin/routing_figures/state.py @@ -8,8 +8,8 @@ import re from routing_figures.calls import Call, SENTENCES from failure import Failure -from records.file_writes import replace_file, replace_json -from records.utc_stamp import STAMPED +from text_files.file_writes import replace_file, replace_json +from text_files.utc_stamp import STAMPED CYCLES_PER_CHECK = 20 RAISED = "routing-calls-raised.md" diff --git a/bin/rule_hook/override_log.py b/bin/rule_hook/override_log.py index 5e2371e4..0fb1f0b4 100644 --- a/bin/rule_hook/override_log.py +++ b/bin/rule_hook/override_log.py @@ -9,7 +9,7 @@ from rule_hook.rules import Breach from git_cli.git_repo import default_ref from rule_hook.git import existing, guarded_git from failure import Failure -from records.utc_stamp import utc +from text_files.utc_stamp import utc LOG = "rule-overrides.tsv" diff --git a/bin/score_outcomes/main.py b/bin/score_outcomes/main.py index 69190c39..16aae77c 100644 --- a/bin/score_outcomes/main.py +++ b/bin/score_outcomes/main.py @@ -99,7 +99,7 @@ from git_cli.git_repo import default_branch, full_history, git, top from failure import Failure from score_outcomes.results import file_lines, fixed_later, item_text, misreads, nearest, render, report, Result, results_of from release_plan.todo_table import item_details, LEVELS, risk, TOP_SCORE -from records.markdown_text import listed +from text_files.markdown_text import listed from release_plan.named_code import named_files from project_config.main import project from transcript_archive.location import project_archive diff --git a/bin/score_outcomes/results.py b/bin/score_outcomes/results.py index b526f07e..05b725e5 100644 --- a/bin/score_outcomes/results.py +++ b/bin/score_outcomes/results.py @@ -5,7 +5,7 @@ import typing from branch_chunks.cut import BranchChunk, Landing, NOT_WORK from review_rules.round_titles import Findings, round_findings, rounds_past_first from release_plan.todo_table import Item -from records.markdown_text import listed +from text_files.markdown_text import listed from release_plan.named_code import named_files # Fewest single-item chunks a score needs before its medians print: the 10 figures the reading-cost trend waits for; no published standard sets either. diff --git a/bin/records/__init__.py b/bin/text_files/__init__.py similarity index 100% rename from bin/records/__init__.py rename to bin/text_files/__init__.py diff --git a/bin/records/file_writes.py b/bin/text_files/file_writes.py similarity index 100% rename from bin/records/file_writes.py rename to bin/text_files/file_writes.py diff --git a/bin/records/markdown_text.py b/bin/text_files/markdown_text.py similarity index 100% rename from bin/records/markdown_text.py rename to bin/text_files/markdown_text.py diff --git a/bin/records/test_file_writes.py b/bin/text_files/test_file_writes.py similarity index 94% rename from bin/records/test_file_writes.py rename to bin/text_files/test_file_writes.py index 9f87de33..63024418 100644 --- a/bin/records/test_file_writes.py +++ b/bin/text_files/test_file_writes.py @@ -7,7 +7,7 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) from failure import Failure -from records import file_writes +from text_files import file_writes class ReplaceFile(unittest.TestCase): diff --git a/bin/records/test_markdown_text.py b/bin/text_files/test_markdown_text.py similarity index 98% rename from bin/records/test_markdown_text.py rename to bin/text_files/test_markdown_text.py index d401a2be..eed6bcb9 100644 --- a/bin/records/test_markdown_text.py +++ b/bin/text_files/test_markdown_text.py @@ -4,7 +4,7 @@ import unittest sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1])) -from records import markdown_text +from text_files import markdown_text class Sections(unittest.TestCase): diff --git a/bin/records/utc_stamp.py b/bin/text_files/utc_stamp.py similarity index 100% rename from bin/records/utc_stamp.py rename to bin/text_files/utc_stamp.py diff --git a/bin/transcript_archive/outcomes.py b/bin/transcript_archive/outcomes.py index 3afce2e5..8081e5b6 100644 --- a/bin/transcript_archive/outcomes.py +++ b/bin/transcript_archive/outcomes.py @@ -2,8 +2,8 @@ import re import typing from model_routing.prices import PRICES -from records.markdown_text import quoted -from records.utc_stamp import STAMPED +from text_files.markdown_text import quoted +from text_files.utc_stamp import STAMPED from claude_code.tokens import Tokens from model_routing.route import WorkerLine diff --git a/bin/transcript_archive/test_transcript_archive.py b/bin/transcript_archive/test_transcript_archive.py index ee21ac05..cf7f1490 100644 --- a/bin/transcript_archive/test_transcript_archive.py +++ b/bin/transcript_archive/test_transcript_archive.py @@ -12,7 +12,7 @@ from transcript_archive.project_key import checkout_of, project_key from failure import Failure from transcript_archive import outcomes, read, write from transcript_archive.location import project_archive -from records.utc_stamp import utc +from text_files.utc_stamp import utc NOW = 1790000000 diff --git a/bin/transcript_archive/write.py b/bin/transcript_archive/write.py index cfa42183..7034466a 100644 --- a/bin/transcript_archive/write.py +++ b/bin/transcript_archive/write.py @@ -5,10 +5,10 @@ import typing from transcript_archive.location import chunk_folder, outcomes_of from failure import Failure -from records.file_writes import make_private, replace_file +from text_files.file_writes import make_private, replace_file from claude_code.session import session_files from transcript_archive.outcomes import TASK -from records.utc_stamp import utc +from text_files.utc_stamp import utc def archive(project_archive: pathlib.Path, path: str, task: str, outcome: str, at: float, note: typing.Callable[[str], None] = lambda text: None) -> Failure | None: diff --git a/todo.md b/todo.md index 1b9cc729..ba70d096 100644 --- a/todo.md +++ b/todo.md @@ -366,7 +366,7 @@ Places the seats named, hardest first (`larv-review places`): - Self-sufficiency: `bin/rule_hook/round_cap.py:26` `earlier_titles`: fails open on the unattended path where git cannot list the branch's titles, and the cap's wording is spelt in SKILL.md, `rules.py:61` and `round_titles.py`. - Locality, Shape: `bin/chunk_preflight/choices.py:80` `forge_of`: forge identity and forge calls live in two tool packages, so a second forge lands in three. - Navigation, Shape: `README.md:131` `bin/`: about 63 entries at one level, the shared libraries told apart only by README prose. -- Navigation: `bin/records/__init__.py:1` `records`: utility code named like the judge's records, and quote semantics in `claude_code/transcript.py:85` `verbatim`. +- Navigation: `bin/text_files/__init__.py:1` `records`: utility code named like the judge's records, and quote semantics in `claude_code/transcript.py:85` `verbatim`. - Shape: `bin/rule_hook/committed_files.py:14` `committed_file_breaches`: a double-reverse dedupe whose choice of copy no comment explains. - Shape: `bin/model_routing/route.py:28` `levels_fit`, with `route_of`: two rules in one boolean, and type checks packed into one long line. - Shape: `bin/loop_claude/loop/reload.py:220` `decoded_route`: one dense guard, and renaming a `LoopRun` field stops a running loop.