diff --git a/CHANGELOG.md b/CHANGELOG.md index fb2e9387..f4ebbe44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## Unreleased -- A project's config may set `tooling-on-host = true`, so the loop runs a legacy project's runtime, package manager and tests on the host, and `readability-floor`, the comprehension score under which code health is very important, 7.0 where left out. +- A project's config may set `tooling-on-host = true`, so the loop runs a legacy project's language runtime, package manager, tests and task runner directly on the host. +- A project's config may set `readability-floor` to a number from 1 to 10: the comprehension score under which code health is very important. It is 7.0 where left out. - A project whose plan is a Jira epic can keep its goals and audience in an epic's description too: set `goals-and-audience = "jira:https:///browse/"`. The loop only reads it, and `project-record open goals-and-audience` prints a file holding its text. - A project with a Jira plan can name each chunk's branch, worktree, commits and pull request by the issue key, as in `ABC-123` and `ABC-123 - …`. The README shows the three templates to set. - A read of a plan in a Jira epic converts every issue description in one `adf_codec` container run, however many issues the epic holds. The codec builds its image inside one of the machine's heavy slots that `run-heavy` shares, so sessions reading at once build it once. diff --git a/README.md b/README.md index 7ed717aa..a1f26959 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ A project may also set `env-file`, the file of `KEY=value` credentials its tools A project's config may set four more things, each optional, as `project-config --help` describes. `language` names the language its owners write in, where that isn't English: the worker writes the project's prose in it, and the prose reviewer judges the prose in it. `commit-title`, `pull-request-title` and `branch` are templates for a project that titles and names these in another way than `CLAUDE.md` → "Git, commits, and PRs" says. `chunk-preflight` names the branch and the worktree by the `branch` template. On a branch that fits it, rule-hook refuses a commit, and `chunk-pr` a pull request, whose title doesn't fit its template; on any other branch, such as a release review's, a title is the summary alone. A tool that reads a commit title, such as a round's `Answer round :`, reads the template's `{summary}`: it tries `commit-title`, then `pull-request-title`, since a squash merge titles the commit as the pull request, then takes the title whole. While a project's config holds a fault, rule-hook refuses every commit there, and the tools that read its titles fail naming the fault. -A legacy project with no container setup sets `tooling-on-host = true`, so the loop runs its runtime, package manager and tests directly on the host. One whose code the comprehension panel scores low may lower `readability-floor` from 7.0: under it, the ranking weighs code health 4 times as much, and a scoring run asks for a floor item. +A legacy project with no container setup sets `tooling-on-host = true`, so the loop runs its language runtime, package manager, tests and task runner directly on the host. One whose code the comprehension panel scores low may lower `readability-floor` from 7.0: under it, the ranking weighs code health 4 times as much, and a scoring run asks for a floor item. A project whose pull requests need a human's approval sets `wait-for-approval = true` in its config. `chunk-pr merge` then waits, once the checks have passed, until GitHub reports the pull request approved as its branch protection requires, and merges it. It refuses on Gitea, where a reviewer requested changes and where the protection requires no review. It gives up after 90 minutes without an approval; run it again once the pull request is approved. Left out, the setting is false. diff --git a/bin/larv_review/main.py b/bin/larv_review/main.py index 90f22301..46c070ad 100644 --- a/bin/larv_review/main.py +++ b/bin/larv_review/main.py @@ -101,8 +101,8 @@ record-scoring never removed is still there, it removes it first and says so. record-scoring takes the scores file of a run needs-scoring-run calls, whose first line names no `, against`, and the same item IDs, and exits 1 when they call no run. It appends the seats' scores and their means, rounded half up to two decimals, prints the means and, when a mean is under the -project's readability floor, which its config sets and which is {floor} where it doesn't, a line -opening `Floor:` naming each one. A line opening `Next:` follows it. It +project's readability floor, a line opening `Floor:` naming each one and the floor. The config sets +the floor as `readability-floor`, {floor} where left out. A line opening `Next:` follows it. It says to file a floor item aimed at the lowest of the four dimensions, and names the tagline's opening `Reach the comprehension floor:`. Where the project's todo.md holds such an item other than those given, it says to refresh that item instead. Then it ranks the project's todo.md as rank_todo.py does, since the diff --git a/bin/project_config/main.py b/bin/project_config/main.py index a4be9024..df446863 100644 --- a/bin/project_config/main.py +++ b/bin/project_config/main.py @@ -45,10 +45,10 @@ it is true. runtime, package manager, tests and task runner directly on the host, for a project with no container setup. Left out, it is false, and they run through the project's container setup. -`readability-floor` is an optional setting, a number from 1 to 10: the comprehension panel's overall -score under which code health weighs 4 times as much in the plan's ranking, and the scores under which -a scoring run asks for a floor item. A legacy project, whose code scores low, may lower it. Left out, -it is 7.0. +`readability-floor` is an optional setting, a number from 1 to 10: the comprehension score a project +aims for. While the panel's overall score is under it, code health weighs 4 times as much in the plan's +ranking, and a scoring run with a mean under it asks for a floor item. A legacy project, whose code +scores low, may lower it. Left out, it is 7.0. `project-config tooling-on-host` and `project-config readability-floor` print their values; the full listing shows each only where the config changes it from what it is when left out. diff --git a/bin/rank_todo.py b/bin/rank_todo.py index 84e9874b..a4b1ac05 100755 --- a/bin/rank_todo.py +++ b/bin/rank_todo.py @@ -45,9 +45,9 @@ A valid todo.md; ## Details and each item's detail are optional: before, and the weights sum to 1. With 5 achieve goals the first weighs 0.212 and the last 0.188. With 15 they weigh 0.082 and 0.053. The overall is the mean of the overall means of every scoring run on docs/comprehension-history.md's newest scored commit. While it is under the project's - readability floor, which its config sets and which is 7.0 where it doesn't, or the history - holds no scoring run, code health weighs 4 times its weight by position, and the other goals keep - theirs. A line `**Void:** code health, since .` in the goals file's ## Goals drops code + readability floor, or the history holds no scoring run, code health weighs 4 times its weight by + position, and the other goals keep theirs. The config sets the floor as `readability-floor`, 7.0 + where left out. A line `**Void:** code health, since .` in the goals file's ## Goals drops code health, and an item may not name it. A project must void it where its docs/decisions.md has a `## review opt-out:` title naming the comprehension check. An item that adds a test, a gate leg or a probe that fails where a maintain goal breaks may name that goal, by how much diff --git a/bin/release_plan/goals_file.py b/bin/release_plan/goals_file.py index 101fa2b6..47d95c32 100644 --- a/bin/release_plan/goals_file.py +++ b/bin/release_plan/goals_file.py @@ -72,7 +72,7 @@ def numbered(body: str) -> list[tuple[str, Mark]] | Failure: def goal_weights(goals: list[tuple[str, Mark]], overall: decimal.Decimal | None, floor: decimal.Decimal) -> dict[str, float] | Failure: - """Each achieve goal's weight: the one ranked k of n weighs GOAL_STEP ** (k - 1) / (1 + GOAL_STEP + ... + GOAL_STEP ** (n - 1)), so the weights sum to 1. Code health, where goals holds it, then weighs UNDER_FLOOR times that while the overall is under floor, the project's readability floor, or None, and the other goals keep their weights. Every weight is 0 where goals holds no achieve goal, as where the goals file voids code health and marks no goal **Achieve:**; an item then scores V 0 unless it names a maintain goal, and only an exempt one passes the bar. A maintain goal has no weight here: weight_of weighs it per item.""" + """Each achieve goal's weight: the one ranked k of n weighs GOAL_STEP ** (k - 1) / (1 + GOAL_STEP + ... + GOAL_STEP ** (n - 1)), so the weights sum to 1. Code health, where goals holds it, then weighs UNDER_FLOOR times that while the overall is None or under floor, the project's readability floor, and the other goals keep their weights. Every weight is 0 where goals holds no achieve goal, as where the goals file voids code health and marks no goal **Achieve:**; an item then scores V 0 unless it names a maintain goal, and only an exempt one passes the bar. A maintain goal has no weight here: weight_of weighs it per item.""" if unmarked := [number for number, mark in goals if mark is None]: return Failure(f"the goals file's goal {unmarked[0]} is marked neither **Maintain:** nor **Achieve:**; mark it, as ~/.claude/rules/goals-and-audience.md says, so rank_todo.py knows which goals score") achieve = [number for number, mark in goals if mark == "Achieve"] diff --git a/bin/test_rank_todo.py b/bin/test_rank_todo.py index 472d9ce2..c7cb23c2 100644 --- a/bin/test_rank_todo.py +++ b/bin/test_rank_todo.py @@ -117,7 +117,7 @@ class Main(unittest.TestCase): def test_shows_a_valid_file_in_help_and_names_arguments_it_cannot_read(self): self.assertEqual(self.run_main("--help")[0], 0) skeleton = "\n".join(line[4:] for line in rank_todo.__doc__.split("\n") if line.startswith(" ")) - ranked = ranking.rank(skeleton, "## Goals\n\n1. **Achieve:** Work.\n", "", "") + ranked = ranking.rank(skeleton, "## Goals\n\n1. **Achieve:** Work.\n", "", "", DEFAULT_FLOOR) self.assertIsInstance(ranked, ranking.Ranked) self.assertEqual((ranked.under_bar, ranked.notes), ([], [])) self.assertEqual(self.run_main("--fix"), (1, "rank_todo.py: cannot read the arguments --fix; usage: rank_todo.py [--check] [todo.md]\n")) @@ -125,4 +125,4 @@ class Main(unittest.TestCase): def test_states_the_goal_weights_the_ranking_computes(self): for figure in (goals_file.GOAL_STEP, 0.212, 0.188, 0.082, 0.053): self.assertIn(str(figure), rank_todo.__doc__) - self.assertIn(f"While it is under the project's readability floor, which its config sets and which is {DEFAULT_FLOOR} where it doesn't, or the history holds no scoring run, code health weighs {goals_file.UNDER_FLOOR} times its weight by position, and the other goals keep theirs.", " ".join(rank_todo.__doc__.split())) + self.assertIn(f"While it is under the project's readability floor, or the history holds no scoring run, code health weighs {goals_file.UNDER_FLOOR} times its weight by position, and the other goals keep theirs. The config sets the floor as `readability-floor`, {DEFAULT_FLOOR} where left out.", " ".join(rank_todo.__doc__.split())) diff --git a/docs/decisions.md b/docs/decisions.md index 098eef5f..00084186 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -23,7 +23,7 @@ Each project principle states one rule that the decisions below apply; their ent - project config: a tool that reads a file's commits says where it does not support that file, and the work goes on - project config: `language` names the prose's language by its English name, and `commit-title`, `pull-request-title` and `branch` are brace templates over `{id}` and `{summary}` - project config: `plan` may name a Jira Cloud epic as `jira:` and its address, the plan is its open child issues in backlog order, and an issue's number is the item's ID -- project config: `tooling-on-host = true` lets a project with no container setup run its runtime, package manager and tests on the host +- project config: `tooling-on-host = true` lets a project with no container setup run its language runtime, package manager, tests and task runner on the host - review: a release review fixes its findings in the release it reviews, and files under that release only a finding that needs a human answer, adds a feature or outlasts its five rounds - review: a reviewer or comprehension seat that rules the work below standard may ask to rerun once, one rung up, in the same round; the ruling that stands is an escalation trigger for the worker unless the fix changes only prose, and never for the judge - review: a reviewer under `agents/` marks a 🔴 or 🟡 `[misread]` where the implementer misread code that had already shipped, each round title counts the marked findings, and `score-outcomes` lists them per chunk @@ -84,7 +84,7 @@ The cap is 5, `bin/release_plan/todo_table.py`'s `BUNDLE_MAX_R`, from the same c ## comprehension floor: every dimension and the overall at the project's readability floor or above is the target, and no score blocks a merge or release -2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 1. 2026-10-13, lilleman: the floor doesn't block anything, and `review: the comprehension check records …` says why. Valid while the scoring run keeps its four seats. 2026-11-12, lilleman, through todo item 358: a project's config sets the floor as `readability-floor`, since legacy code scores low; it is 7.0 where left out, as in every config under `~/code`, and the signal stays that the score rises. +2026-09-27, lilleman, restating the 2026-09-24 target and extending it to the overall. Serves goal 1. 2026-10-13, lilleman: the floor doesn't block anything, and `review: the comprehension check records …` says why. Valid while the scoring run keeps its four seats. 2026-11-12, lilleman, through todo item 358: a project's config sets this floor as `readability-floor`, its readability floor, since legacy code scores low. It is 7.0 where left out, and the signal stays that the score rises. Readers seated as the person who writes the config picked the key, 2 of 3. ## deploy: `~/.claude` holds only a release, which `deploy-release` moves it to; this repo is developed in `~/code/claude-config`, where loop-claude runs its chunks like any project's @@ -303,7 +303,7 @@ Messages keep each file's usual name, such as `todo.md`, as its label, since the - **The release is the earliest Fix Version named as a semver version**, and an issue with none fails the read, naming it, until todo.md's item 359 ties releases to something else. - **The store only reads**, until todo.md's item 352 writes. `rank_todo.py` refuses to rank a plan in Jira, and its `--check` passes, since Jira's backlog ranks it; rule-hook's rank check skips it. Each read first asks Jira for the epic itself, since a search under an epic the account cannot see answers no issues, as a finished plan does. -## project config: `tooling-on-host = true` lets a project with no container setup run its runtime, package manager and tests on the host +## project config: `tooling-on-host = true` lets a project with no container setup run its language runtime, package manager, tests and task runner on the host 2026-11-12, lilleman, through todo item 358. Serves goal 1.6: a legacy product may have no container setup, and the loop works in it without its owners adding one. `CLAUDE.md`'s container rule and the stability reviewer follow the setting. rule-hook checks only how a container starts, its memory limits and its image's pin, never where a runtime runs, so it needs no change. A decision may still put one tool on the host where the project has containers, as this repo's `bin/` decision does. Readers seated as the person who writes the config picked the key, 2 of 3. Valid while the loop runs on the machine that holds the checkout. diff --git a/skills/larv-review/SKILL.md b/skills/larv-review/SKILL.md index 0c2d654e..c7f277cd 100644 --- a/skills/larv-review/SKILL.md +++ b/skills/larv-review/SKILL.md @@ -156,7 +156,7 @@ The comprehension check records how hard the project is for its contributor to r **Scoring run**, when `~/.claude/bin/larv-review needs-scoring-run ` prints `Scoring run due:`. Run `needs-scoring-run` before removing the chunk's items from `todo.md`. `chunk-pr merge` refuses until the branch's committed history records every run the plan calls, which `larv-review scoring-run-owed` counts at merge time from the merge base; an earlier due line is only a snapshot. - **Seats.** Junior A, Mid A, the maintainability senior and the inherited architect each score the project at the head from 1 to 10 overall and on four dimensions: Navigation, Locality, Shape and Self-sufficiency. Run `~/.claude/bin/larv-review prepare-scoring`, adding `--preloaded ` only where its default list of pre-loaded files is wrong. It makes the worktree the seats read and prints each seat's prompt file; launch each seat with its file's text as its prompt. Write their lines into a scores file and run `~/.claude/bin/larv-review record-scoring `, which appends the run to the history and prints the four seats' means. -- **Floor item.** Where `record-scoring` prints `Floor:`, a `Next:` line follows: file one floor item, or refresh the open one. A floor item is a plan item meant to bring every mean to the project's readability floor, which `record-scoring`'s `Next:` line names. File it as one ambitious refactor, not touch-ups. It restructures the area behind the places `larv-review places` prints for this run, chosen where they bear on the lowest dimension, sized to bring every mean to that floor, and quotes those places. Its tagline opens with `Reach the comprehension floor:`, so its own chunk runs a scoring run; while a mean stays under the floor, that run's `Next:` line asks for the next floor item. Mark it `owner`, since the human asked that such a project always hold one, so no score deletes it. Put it in the earliest release the plan names after the one the chunk ships into, or else in the next version after that one that `~/.claude/rules/todo-items.md` allows, so the floor doesn't hold up any release. While one is open, refresh its places and aim from the newest run instead of filing another; the item the chunk ships doesn't count as open. Commit it with the run, as "Record" says. +- **Floor item.** Where `record-scoring` prints `Floor:`, a `Next:` line follows: file one floor item, or refresh the open one. A floor item is a plan item meant to bring every mean to the project's readability floor, which `record-scoring`'s `Floor:` line names. File it as one ambitious refactor, not touch-ups. It restructures the area behind the places `larv-review places` prints for this run, chosen where they bear on the lowest dimension, sized to bring every mean to that floor, and quotes those places. Its tagline opens with `Reach the comprehension floor:`, so its own chunk runs a scoring run; while a mean stays under the floor, that run's `Next:` line asks for the next floor item. Mark it `owner`, since the human asked that such a project always hold one, so no score deletes it. Put it in the earliest release the plan names after the one the chunk ships into, or else in the next version after that one that `~/.claude/rules/todo-items.md` allows, so the floor doesn't hold up any release. While one is open, refresh its places and aim from the newest run instead of filing another; the item the chunk ships doesn't count as open. Commit it with the run, as "Record" says. - **Second run.** Where `needs-scoring-run` printed that the chunk `leaves release … with no plan item`, run `prepare-scoring` again and launch the same four seats afresh on the same head. Their scores file's first line is ` rerun at `. Record it with the same `record-scoring` command. - **Agreement.** After the second run, run `~/.claude/bin/larv-review agreement` and put its counts in the summary. On `Assumption fails:`, ask the user whether to keep the paired ruling or change the decision `review: the comprehension check records …`. Record the answer as a decision in the repo whose history was counted, with the counts that led to the ask. A later run asks again only when the rulings' rate falls, or the runs' rate rises, against the recorded counts.