Let a project's config allow its tooling on the host and set its readability floor
CI / tests (pull_request) Successful in 3m3s
CI / tests (pull_request) Successful in 3m3s
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
## 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 whose plan is a Jira epic can keep its goals and audience in an epic's description too: set `goals-and-audience = "jira:https://<site>/browse/<KEY>"`. 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.
|
||||
|
||||
@@ -27,7 +27,7 @@ How work proceeds in any repo, unless the repo's `AGENTS.md` says otherwise. The
|
||||
Every project pursues the achieve goal below, ranked above every achieve goal its goals file states. A project whose code nobody will maintain voids it with one line under `## Goals`, before the numbered goals: `**Void:** code health, since <reason>.` So does a project that opts out of the comprehension check, since the goal then has no signal. An item's Moves cell names it as in `code health by 6`, and `rank_todo.py --help` says how much it weighs.
|
||||
|
||||
**Achieve:** Code health: the code stays easy to read, change safely and debug, tomorrow and after seven years of development.
|
||||
- Signal: the comprehension panel's overall score rises, always. Under 7.0 it is very important.
|
||||
- Signal: the comprehension panel's overall score rises, always. Under the project's readability floor it is very important: 7.0, unless the project's config sets `readability-floor` lower for legacy code.
|
||||
- Counter-signal: defects keep reappearing in functionality that already shipped, or reviewers raise blockers because the implementer misunderstood the current system.
|
||||
- Why: a score that rises while changes still misread the code measures the wrong thing.
|
||||
|
||||
@@ -65,7 +65,7 @@ The rules only reviewers apply, for quality, comments, READMEs and prose, live i
|
||||
## Working with the codebase
|
||||
- Always start a new git worktree when doing something in a codebase, and clean it up when done. Unless told otherwise, branch it off a freshly-updated default branch (`git fetch origin`, then base on `origin/main`), not whatever happens to be checked out.
|
||||
- Keep the project's main checkout (e.g. `~/code/log`, never a worktree) current: when it is behind `origin` — a merge landed, or a fetch shows it — run `git pull --ff-only` there instead of reporting the lag, never with `--autostash`: a dirty checkout is a finding to report, not to carry along.
|
||||
- Run a project's language runtime, package manager, and task runner through its container/tooling setup, never directly on the host unless a decision puts them there. Example: `docker compose run --rm app <tool> …`.
|
||||
- Run a project's language runtime, package manager, and task runner through its container/tooling setup, never directly on the host, unless the project's config sets `tooling-on-host = true` or a decision puts them there. Example: `docker compose run --rm app <tool> …`.
|
||||
- Tear down test containers after a run.
|
||||
- Give every container you start a memory limit and a swap limit, as large as its work needs: `--memory 4g --memory-swap 4g` on `docker run`, or `mem_limit` and `memswap_limit` in a compose file, scripts included. rule-hook checks only the `docker run` and `docker create` in your Bash commands.
|
||||
- A heavy command loads the machine for minutes: a full gate, mutation tests, an e2e run, a `docker build`. Run each one under `~/.claude/bin/run-heavy`, as in `~/.claude/bin/run-heavy ./ci.sh`. run-heavy waits for one of the heavy slots that every session on the machine shares. It also caps each container the command makes at the slot's share of memory, where the container sets no limits; give a container that needs more its own. Run the command in the background, since run-heavy's wait can outlast the Bash tool's timeout; `~/.claude/bin/wait-for <file> [<pattern>]` waits for a line in a log the command writes.
|
||||
|
||||
@@ -98,6 +98,8 @@ 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 <pass> round <n>:`, 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 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.
|
||||
|
||||
For a client's project, use one sandbox VM per client, so that one client's code, transcripts and credentials never share a machine with another's. What the client's repo should not hold lives in the config's folder, at paths written as `folder:<path>`, as `project-config --help` shows: the plan, the working rules in an `AGENTS.md` I write for the agents, the records, and the goals and audience, as `goals-and-audience = "folder:goals.md"`. Name that file `goals.md`, so the rules for goals and audience load when an agent writes it. A file outside the checkout has no commits in the checkout's history, so four things are not supported for it yet. `score-outcomes` and loop-claude's routing figures count a project's chunks only where `todo.md`, `docs/comprehension-history.md` and `docs/reading-cost.md` are at those paths in the checkout; otherwise each says so, and the loop goes on. For a plan or a comprehension history outside the checkout, `larv-review` says it cannot tell whether a scoring run is owed, and for such a history it cannot find a paired ruling's base. For a plan outside the checkout, chunk-preflight and loop-claude don't see a release whose last item has shipped, and say that its release review and its cut are yours to call. And rule-hook checks a plan outside the checkout on every call, not only when it changed.
|
||||
|
||||
@@ -13,7 +13,7 @@ You are an elite stability-focused code reviewer with deep expertise in defensiv
|
||||
1. **Scope the change.** You review every PR; a fresh invocation has no prior context, so determine the diff yourself. Diff the PR branch against its base (`gh pr diff`, or `git merge-base <base> HEAD` then `git diff`), and review the changed lines **plus enough surrounding code and callers** to judge correctness — read the whole changed file when practical; a diff alone hides whether a caller breaks. Read the PR description and, when the project uses an issue tracker (project-specific — check its docs) and the change references a ticket, that ticket: the diff is judged against its stated intent, and a scope mismatch in either direction is a finding — claimed-but-unimplemented, and implemented-but-unasked (#2).
|
||||
2. **Read every file in the folder your prompt's `Technical principles:` line names**, and `~/.claude/skills/larv-review/standards/quality.md`. These are mandatory guidelines; all code MUST comply with each that applies. A file's `Applies to` line says what it covers; one without the line covers every change. Re-read each time — they change. Flag violations prominently. Where your prompt has no such line, without one, open your report by saying so.
|
||||
3. **Read README.md, AGENTS.md and `docs/decisions.md`** in the current project for project-specific conventions, build instructions, tooling, and the accepted trade-offs a reviewer should honor rather than re-flag. Note the documented test, lint, and static-analysis commands — you run them unless your prompt hands you a passing run on the head (step 4).
|
||||
4. **Verify, don't just read.** Where your prompt hands you the commit on which the worker's run of the test suite and static analysis last passed, and it is the head, don't run them again, and say so in Coverage & Verification. Otherwise run the test suite and static analysis/linters through the project's container tooling, unless a decision puts them on the host; tear down test containers afterwards. Run the full suite under `~/.claude/bin/run-heavy`. Run it in the background or with the Bash tool's longest timeout: that timeout includes the wait for a slot. A full-suite run catches broken callers that diff-reading misses. When a suspected bug is cheap to confirm, reproduce it — a scratch script, a targeted test run — before reporting it. Make scratch work with Bash, since Write is for your report alone. Put it in a directory you create for this run, and delete it when done; don't delete anything else, since a directory the prompt names may hold other agents' files. Leave the working tree exactly as you found it. Anything you could not run goes in Coverage & Verification, never silently skipped.
|
||||
4. **Verify, don't just read.** Where your prompt hands you the commit on which the worker's run of the test suite and static analysis last passed, and it is the head, don't run them again, and say so in Coverage & Verification. Otherwise run the test suite and static analysis/linters through the project's container tooling, unless `~/.claude/bin/project-config tooling-on-host` prints true or a decision puts them on the host; tear down test containers afterwards. Run the full suite under `~/.claude/bin/run-heavy`. Run it in the background or with the Bash tool's longest timeout: that timeout includes the wait for a slot. A full-suite run catches broken callers that diff-reading misses. When a suspected bug is cheap to confirm, reproduce it — a scratch script, a targeted test run — before reporting it. Make scratch work with Bash, since Write is for your report alone. Put it in a directory you create for this run, and delete it when done; don't delete anything else, since a directory the prompt names may hold other agents' files. Leave the working tree exactly as you found it. Anything you could not run goes in Coverage & Verification, never silently skipped.
|
||||
5. **Judge the surviving mutants.** Your prompt hands you what the project's mutation command printed on the change, with the commit it ran on: the mutants of changed lines that no test kills, or the message of a run that failed. Ignore a surviving mutant that leaves behaviour unchanged, or changes only message or log text no caller or user depends on. Report one 🟡 per test to add or strengthen, naming the surviving mutants it would catch. Where the prompt doesn't hand you any output, or names a commit other than the head, run the command yourself in the change's checkout, through run-heavy as in step 4: the one the project's README documents, else `~/.claude/bin/run-heavy ~/.claude/bin/mutate-changes --prefix '<how the project runs its tools>'`. `~/.claude/bin/mutate-changes --help` says which tool it runs for each language, how to set `--jobs`, and what it prints. Mutation-test the changed code that no run mutated, in a language mutate-changes doesn't cover or where a run failed, with a widely deployed mutation tool limited to the changed lines, else with mutants you make by hand. Report the wall time and mutant count in Coverage & Verification, or why nothing was mutated.
|
||||
6. **Two passes minimum, then hunt absences.**
|
||||
- *Breadth:* every hunk in every changed file, no skimming. Track which files you have covered; batch large diffs, never truncate the review.
|
||||
|
||||
@@ -2,7 +2,7 @@ import pathlib
|
||||
import typing
|
||||
|
||||
from larv_review.agreement import agreement_report
|
||||
from review_rules.comprehension_history import appended, DIMENSIONS, FLOOR, heading, Heading, latest_places, recorded, ruling_entry, scoring_entry, ScoringRun, vote_text
|
||||
from review_rules.comprehension_history import appended, DIMENSIONS, heading, Heading, latest_places, recorded, ruling_entry, scoring_entry, ScoringRun, vote_text
|
||||
from larv_review.plan import checkout_plan, plan_reasons
|
||||
from git_cli.git_repo import commit_exists
|
||||
from larv_review.ruling import counted, overall, ruling, split, surplus, votes
|
||||
@@ -66,9 +66,9 @@ def record_scoring(default: str, scores_file: pathlib.Path, ids: list[int], home
|
||||
return appended_to
|
||||
say(appended_to)
|
||||
say(f"Means: {', '.join(f'{name} {value}' for name, value in zip(DIMENSIONS, scoring.means))}.")
|
||||
if under := under_floor(scoring.means):
|
||||
say(f"Floor: {', '.join(under)} under the floor of {FLOOR}.")
|
||||
if step := floor_step(scoring.means, plan, ids):
|
||||
if under := under_floor(scoring.means, config.readability_floor):
|
||||
say(f"Floor: {', '.join(under)} under the floor of {config.readability_floor}.")
|
||||
if step := floor_step(scoring.means, plan, ids, config.readability_floor):
|
||||
say(step)
|
||||
reranked = rerank(home, warn)
|
||||
removed = removed_setup(checkout, home)
|
||||
|
||||
@@ -101,7 +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
|
||||
floor of {floor}, a line opening `Floor:` naming each one. A line opening `Next:` follows it. It
|
||||
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
|
||||
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
|
||||
@@ -161,8 +162,8 @@ import typing
|
||||
|
||||
from git_cli.git_repo import branch_titles, default_branch, git, top
|
||||
from review_rules.round_titles import cap, CAP, RELEASE_REVIEW_CAP, round_counts
|
||||
from project_config.settings import DEFAULT_FLOOR
|
||||
from failure import Failure
|
||||
from review_rules.comprehension_history import FLOOR
|
||||
from larv_review.history_changes import history_changes
|
||||
from review_rules.reviewer_context import hook_reply
|
||||
from review_rules.review_folder import made_review_folder
|
||||
@@ -237,7 +238,7 @@ USAGE = f"usage: larv-review {SHAPES}"
|
||||
|
||||
def main(argv: list[str]) -> int:
|
||||
if argv in (["-h"], ["--help"]):
|
||||
print(__doc__.strip().format(commands=SHAPES, cap=CAP, release_cap=RELEASE_REVIEW_CAP, floor=FLOOR, pairs=MIN_PAIRS))
|
||||
print(__doc__.strip().format(commands=SHAPES, cap=CAP, release_cap=RELEASE_REVIEW_CAP, floor=DEFAULT_FLOOR, pairs=MIN_PAIRS))
|
||||
return 0
|
||||
if not argv:
|
||||
print(USAGE, file=sys.stderr)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import decimal
|
||||
|
||||
from review_rules.comprehension_history import DIMENSIONS, FLOOR
|
||||
from review_rules.comprehension_history import DIMENSIONS
|
||||
from release_plan.todo_table import Item
|
||||
|
||||
# A floor item's tagline opens with this phrase, which a tagline quoting or mentioning the floor never does; a floor item's chunk runs a scoring run.
|
||||
@@ -21,16 +21,17 @@ def mean(values: list[decimal.Decimal]) -> decimal.Decimal:
|
||||
return (sum(values, decimal.Decimal(0)) / len(values)).quantize(decimal.Decimal("0.01"), decimal.ROUND_HALF_UP)
|
||||
|
||||
|
||||
def under_floor(found: list[decimal.Decimal]) -> list[str]:
|
||||
return [f"{name} {value}" for name, value in zip(DIMENSIONS, found) if value < FLOOR]
|
||||
def under_floor(found: list[decimal.Decimal], floor: decimal.Decimal) -> list[str]:
|
||||
"""Each mean in found under floor, the project's readability floor, with its dimension's name."""
|
||||
return [f"{name} {value}" for name, value in zip(DIMENSIONS, found) if value < floor]
|
||||
|
||||
|
||||
def floor_step(found: list[decimal.Decimal], plan: list[Item], ships: list[int]) -> str | None:
|
||||
def floor_step(found: list[decimal.Decimal], plan: list[Item], ships: list[int], floor: decimal.Decimal) -> str | None:
|
||||
"""The `Next:` line of a scoring run with a mean under the floor, None when no mean is under it (SKILL.md → "Floor item").
|
||||
|
||||
The line aims at the lowest of the four dimensions, or at each where they tie, since the lowest caps the overall. A floor item in plan is open unless ships holds its ID, so a chunk that ships one still files the next.
|
||||
"""
|
||||
if not under_floor(found):
|
||||
if not under_floor(found, floor):
|
||||
return None
|
||||
dimensions = dict(zip(DIMENSIONS[:-1], found))
|
||||
lowest = [name for name, value in dimensions.items() if value == min(dimensions.values())]
|
||||
@@ -39,4 +40,4 @@ def floor_step(found: list[decimal.Decimal], plan: list[Item], ships: list[int])
|
||||
rule = 'as larv-review §3 → "Floor item" says.'
|
||||
if open_items := [item for item in plan if is_floor_item(item) and item.id not in ships]:
|
||||
return f"Next: refresh floor item {open_items[0].id} to lift {aim}, with this run's places, and file no other, {rule}"
|
||||
return f"Next: file one floor item, a refactor lifting {aim}, with a tagline that opens with `{FLOOR_ITEM}`, until every mean reaches {FLOOR}, {rule}"
|
||||
return f"Next: file one floor item, a refactor lifting {aim}, with a tagline that opens with `{FLOOR_ITEM}`, until every mean reaches {floor}, {rule}"
|
||||
|
||||
@@ -20,6 +20,7 @@ from review_rules import comprehension_history
|
||||
from project_config.test_project_config import configured
|
||||
from larv_review.ruling import counted, ruling, split, surplus, votes
|
||||
from larv_review.history_commands import decided, rerank
|
||||
from project_config.settings import DEFAULT_FLOOR
|
||||
from failure import Failure
|
||||
from plan_store.stores import FilePlan
|
||||
from record_store.stores import FileStore
|
||||
@@ -119,35 +120,42 @@ class Seats(unittest.TestCase):
|
||||
def test_rounds_each_mean_half_up_and_names_each_under_the_floor(self):
|
||||
found = means([["7.5", "6.5", "7", "7", "7"], ["7.5", "7", "7", "6.5", "7"], ["7", "6.5", "7", "6.5", "6.5"], ["7.5", "6.5", "7", "6.5", "7"]])
|
||||
self.assertEqual([str(mean) for mean in found], ["7.38", "6.63", "7.00", "6.63", "6.88"])
|
||||
self.assertEqual(under_floor(found), ["Locality 6.63", "Self-sufficiency 6.63", "Overall 6.88"])
|
||||
self.assertEqual(under_floor([decimal.Decimal("7.00")] * 5), [])
|
||||
self.assertEqual(under_floor(found, DEFAULT_FLOOR), ["Locality 6.63", "Self-sufficiency 6.63", "Overall 6.88"])
|
||||
self.assertEqual(under_floor([decimal.Decimal("7.00")] * 5, DEFAULT_FLOOR), [])
|
||||
|
||||
def test_names_only_the_means_under_the_floor_it_is_given_and_aims_the_next_item_at_it(self):
|
||||
found = [decimal.Decimal(mean) for mean in ("6.50", "5.75", "6.00", "5.50", "5.94")]
|
||||
self.assertEqual(under_floor(found, decimal.Decimal("6")), ["Locality 5.75", "Self-sufficiency 5.50", "Overall 5.94"])
|
||||
self.assertEqual(under_floor(found, decimal.Decimal("5.5")), [])
|
||||
self.assertIsNone(floor_step(found, [], [], decimal.Decimal("5.5")))
|
||||
self.assertIn("until every mean reaches 6, ", floor_step(found, [], [], decimal.Decimal("6")))
|
||||
|
||||
def test_floor_step_files_one_item_at_the_lowest_dimension_unless_one_is_open(self):
|
||||
found = [decimal.Decimal(mean) for mean in ("7.38", "6.63", "7.00", "6.50", "6.88")]
|
||||
floor_item = item(5, (0, 2, 0), "**Reach the comprehension floor: restructure the reload, lifting Locality.**")
|
||||
with self.subTest("none open"):
|
||||
step = floor_step(found, [item(1, (0, 1, 0))], [])
|
||||
step = floor_step(found, [item(1, (0, 1, 0))], [], DEFAULT_FLOOR)
|
||||
self.assertTrue(step.startswith("Next: file one floor item"), step)
|
||||
self.assertIn("with a tagline that opens with `Reach the comprehension floor:`,", step)
|
||||
self.assertIn(" Self-sufficiency, the lowest dimension,", step)
|
||||
self.assertIn('"Floor item"', step)
|
||||
with self.subTest("one open"):
|
||||
step = floor_step(found, [item(1, (0, 1, 0)), floor_item], [])
|
||||
step = floor_step(found, [item(1, (0, 1, 0)), floor_item], [], DEFAULT_FLOOR)
|
||||
self.assertTrue(step.startswith("Next: refresh floor item 5 "), step)
|
||||
self.assertIn(" Self-sufficiency, the lowest dimension,", step)
|
||||
self.assertIn("file no other", step)
|
||||
with self.subTest("the shipped one is not open"):
|
||||
self.assertTrue(floor_step(found, [floor_item], [5]).startswith("Next: file one floor item"))
|
||||
self.assertTrue(floor_step(found, [floor_item], [5], DEFAULT_FLOOR).startswith("Next: file one floor item"))
|
||||
with self.subTest("a tie names both"):
|
||||
tied = [decimal.Decimal(mean) for mean in ("7.38", "6.50", "7.00", "6.50", "6.88")]
|
||||
self.assertIn(" Locality and Self-sufficiency, the lowest dimensions,", floor_step(tied, [], []))
|
||||
self.assertIn(" Locality and Self-sufficiency, the lowest dimensions,", floor_step(tied, [], [], DEFAULT_FLOOR))
|
||||
with self.subTest("a tagline that only mentions the floor is no floor item"):
|
||||
quoting = item(6, (0, 2, 0), "**Rename the decision `comprehension floor: …` in the log.**")
|
||||
self.assertTrue(floor_step(found, [quoting], []).startswith("Next: file one floor item"))
|
||||
self.assertTrue(floor_step(found, [quoting], [], DEFAULT_FLOOR).startswith("Next: file one floor item"))
|
||||
with self.subTest("none under the floor"):
|
||||
self.assertIsNone(floor_step([decimal.Decimal("7.00")] * 5, [floor_item], []))
|
||||
self.assertIsNone(floor_step([decimal.Decimal("7.00")] * 5, [floor_item], [], DEFAULT_FLOOR))
|
||||
with self.subTest("only the overall under the floor"):
|
||||
step = floor_step([decimal.Decimal("7.00")] * 4 + [decimal.Decimal("6.75")], [], [])
|
||||
step = floor_step([decimal.Decimal("7.00")] * 4 + [decimal.Decimal("6.75")], [], [], DEFAULT_FLOOR)
|
||||
self.assertIn(" Navigation, Locality, Shape and Self-sufficiency, the lowest dimensions,", step)
|
||||
self.assertIn("until every mean reaches 7.0", step)
|
||||
|
||||
@@ -827,6 +835,16 @@ class LarvReviewTool(unittest.TestCase):
|
||||
self.assertIn(f"cannot read {history}: not UTF-8 on line 2", ran.stderr)
|
||||
self.assertEqual(history.read_bytes(), b"# Comprehension history\n\xff\n")
|
||||
|
||||
def test_holds_a_scoring_run_to_the_readability_floor_the_config_sets(self):
|
||||
line = "Navigation 7, Locality 6.5, Shape 7, Self-sufficiency 6.5, Overall 7"
|
||||
seats = "".join(f"\n{seat}: {line}\n\n- `bin/a.py:3` `f`: long\n" for seat in ("Junior A", "Mid A", "Maintainability senior", "Inherited architect"))
|
||||
self.plan()
|
||||
self.config.write_text(PROJECT_CONFIG + "readability-floor = 6.5\n")
|
||||
ran = self.run_tool("record-scoring", self.seats_file(f"PR #2 at {self.start}\n" + seats), "1")
|
||||
self.assertEqual(ran.returncode, 0, ran.stderr)
|
||||
self.assertIn("\nMeans: ", ran.stdout)
|
||||
self.assertNotIn("Floor:", ran.stdout)
|
||||
|
||||
def test_records_a_scoring_run_with_its_means(self):
|
||||
line = "Navigation 7, Locality 6.5, Shape 7, Self-sufficiency 6.5, Overall 7"
|
||||
seats = "".join(f"\n{seat}: {line}\n\n- `bin/a.py:3` `f`: long\n" for seat in ("Junior A", "Mid A", "Maintainability senior", "Inherited architect"))
|
||||
|
||||
@@ -4,15 +4,16 @@ The config's `plan` setting names the backend. A path names a markdown file, tod
|
||||
|
||||
A tool that reads what a past commit held, such as `score-outcomes`, still parses that commit's todo.md itself, with `release_plan.todo_table`: only the markdown backend has commits, and todo.md's items 365, 366 and 368 port those tools to the other backends."""
|
||||
import dataclasses
|
||||
import decimal
|
||||
import pathlib
|
||||
import typing
|
||||
|
||||
from release_plan.todo_table import BLOCKED_BY, Item, item_details, items, MOVES, NoItemsTable, renames
|
||||
from project_config.settings import DEFAULT_FLOOR, ProjectConfig
|
||||
from failure import Failure
|
||||
from git_cli.git_repo import file_at, git, Git
|
||||
from record_store.stores import goals_store, store as record_store, RecordStore
|
||||
from plan_store import markdown_edits
|
||||
from project_config.settings import ProjectConfig
|
||||
from release_plan import ranking
|
||||
from release_plan.release import Release
|
||||
from text_files.file_writes import replace_file
|
||||
@@ -77,6 +78,8 @@ class FilePlan:
|
||||
goals: RecordStore
|
||||
decisions: RecordStore
|
||||
history: RecordStore
|
||||
# The project's readability floor, at which ranking weighs code health.
|
||||
floor: decimal.Decimal = DEFAULT_FLOOR
|
||||
|
||||
@property
|
||||
def label(self) -> str:
|
||||
@@ -104,7 +107,7 @@ class FilePlan:
|
||||
|
||||
def kept(self, id_: int, text: str, texts: tuple[str, str, str, str]) -> Written | Failure:
|
||||
"""Ranks text, the file with item id_ filed or edited, and writes it where the item scores at the bar or above."""
|
||||
ranked = ranking.rank(text, *texts[1:])
|
||||
ranked = ranking.rank(text, *texts[1:], self.floor)
|
||||
if isinstance(ranked, Failure):
|
||||
return ranked
|
||||
# The write may lower another item under the bar, which the notes then say; the write is refused only where the written item itself scores under the bar.
|
||||
@@ -119,7 +122,7 @@ class FilePlan:
|
||||
text = markdown_edits.finished(texts[0], id_, self.label)
|
||||
if isinstance(text, Failure):
|
||||
return text
|
||||
ranked = ranking.rank(text, *texts[1:])
|
||||
ranked = ranking.rank(text, *texts[1:], self.floor)
|
||||
return ranked if isinstance(ranked, Failure) else self.written(id_, ranked)
|
||||
|
||||
def written(self, id_: int, ranked: ranking.Ranked) -> Written | Failure:
|
||||
@@ -159,7 +162,7 @@ def store(config: ProjectConfig) -> PlanStore:
|
||||
|
||||
def file_plan(config: ProjectConfig, path: pathlib.Path | None = None) -> FilePlan:
|
||||
"""The markdown file config names as its plan, for a tool that works on the file itself, as ranking does. path stands in for the configured one where given."""
|
||||
return FilePlan(path or config.paths["plan"], config.tracked("plan"), goals_store(config), record_store(config, "decisions"), record_store(config, "comprehension-history"))
|
||||
return FilePlan(path or config.paths["plan"], config.tracked("plan"), goals_store(config), record_store(config, "decisions"), record_store(config, "comprehension-history"), config.readability_floor)
|
||||
|
||||
|
||||
def held_at(revision: str, plan: PlanStore, cwd: str, run: Git = git) -> Plan | Failure:
|
||||
|
||||
@@ -41,6 +41,18 @@ approval of the pull request, as its branch protection requires on GitHub, befor
|
||||
false. `project-config wait-for-approval` prints true or false; the full listing shows the setting only where
|
||||
it is true.
|
||||
|
||||
`tooling-on-host` is an optional setting, true or false: whether the loop may run the project's language
|
||||
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.
|
||||
|
||||
`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.
|
||||
|
||||
Four optional settings say how the project writes, for a project whose owners don't write as
|
||||
~/.claude/CLAUDE.md does:
|
||||
|
||||
@@ -72,13 +84,14 @@ The chunk for the issue ABC-123 is then on the branch ABC-123, in the worktree <
|
||||
and its commits and pull request are titled "ABC-123 - …".
|
||||
|
||||
Exit 1, naming each fault on stderr, where no config names the checkout, or its config leaves out a
|
||||
setting, names an unknown one, misspells a path, a language or a template, or sets `wait-for-approval` to anything but true or
|
||||
false, and where `env-file` is asked for and not set. No path setting has a default.
|
||||
setting, names an unknown one, misspells a path, a language or a template, sets `wait-for-approval` or
|
||||
`tooling-on-host` to anything but true or false, or sets `readability-floor` to anything but a number
|
||||
from 1 to 10, and where `env-file` is asked for and not set. No path setting has a default.
|
||||
"""
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
from project_config.settings import CONFIG, ENV_FILE, load, OPTIONAL, ProjectConfig, SETTINGS, Unnamed, WAIT_FOR_APPROVAL
|
||||
from project_config.settings import CONFIG, DEFAULT_FLOOR, ENV_FILE, load, OPTIONAL, ProjectConfig, READABILITY_FLOOR, SETTINGS, TOOLING_ON_HOST, Unnamed, WAIT_FOR_APPROVAL
|
||||
from failure import Failure
|
||||
from git_cli.git_repo import git, Git
|
||||
from project_config import templates
|
||||
@@ -95,8 +108,12 @@ def main(argv: list[str]) -> int:
|
||||
if isinstance(config, Failure):
|
||||
print(config.reason, file=sys.stderr)
|
||||
return 1
|
||||
if argv == [WAIT_FOR_APPROVAL]:
|
||||
print("true" if config.wait_for_approval else "false")
|
||||
switches = {WAIT_FOR_APPROVAL: config.wait_for_approval, TOOLING_ON_HOST: config.tooling_on_host}
|
||||
if argv and argv[0] in switches:
|
||||
print("true" if switches[argv[0]] else "false")
|
||||
return 0
|
||||
if argv == [READABILITY_FLOOR]:
|
||||
print(config.readability_floor)
|
||||
return 0
|
||||
if argv and argv[0] in config.texts:
|
||||
print(config.texts[argv[0]])
|
||||
@@ -106,7 +123,7 @@ def main(argv: list[str]) -> int:
|
||||
print(f"{config.folder / CONFIG} sets no `{ENV_FILE}`", file=sys.stderr)
|
||||
return 1
|
||||
defaults = ProjectConfig(config.key, config.folder, config.top, {}).texts
|
||||
listed = [f"{name}: {path}" for name, path in paths.items()] + ([f"{WAIT_FOR_APPROVAL}: true"] if config.wait_for_approval else []) + [f"{name}: {text}" for name, text in config.texts.items() if text != defaults[name]]
|
||||
listed = [f"{name}: {path}" for name, path in paths.items()] + [f"{name}: true" for name, on in switches.items() if on] + ([f"{READABILITY_FLOOR}: {config.readability_floor}"] if config.readability_floor != DEFAULT_FLOOR else []) + [f"{name}: {text}" for name, text in config.texts.items() if text != defaults[name]]
|
||||
print(paths[argv[0]] if argv else "\n".join(listed))
|
||||
return 0
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
No path setting has a default, so that a client's project never runs on another project's files: a missing config or setting is a Failure that names it."""
|
||||
import dataclasses
|
||||
import decimal
|
||||
import math
|
||||
import pathlib
|
||||
import re
|
||||
import tomllib
|
||||
@@ -19,12 +21,18 @@ SPELLING = '"checkout:<path>" for a path in the checkout, "folder:<path>" for on
|
||||
ENV_FILE = "env-file"
|
||||
# The optional boolean setting: whether `chunk-pr merge` waits for a human's approval of the pull request. False where left out.
|
||||
WAIT_FOR_APPROVAL = "wait-for-approval"
|
||||
# The optional boolean setting that lets the loop run the project's language runtime, package manager and task runner on the host, for a project with no container setup. False where left out.
|
||||
TOOLING_ON_HOST = "tooling-on-host"
|
||||
# The optional number setting: the comprehension panel's overall score under which code health is very important, since legacy code scores low. Readers seated as the human who writes the config picked both names, 2 of 3 each.
|
||||
READABILITY_FLOOR = "readability-floor"
|
||||
# The floor where the config leaves it out, which every dimension and the overall should reach; docs/decisions.md → "comprehension floor" says it doesn't block anything.
|
||||
DEFAULT_FLOOR = decimal.Decimal("7.0")
|
||||
# The optional text settings. `language` is the language the project's prose is written in, by its English name. The others are templates, as `templates` says.
|
||||
LANGUAGE = "language"
|
||||
COMMIT_TITLE = "commit-title"
|
||||
PULL_REQUEST_TITLE = "pull-request-title"
|
||||
BRANCH = "branch"
|
||||
OPTIONAL = (BRANCH, COMMIT_TITLE, ENV_FILE, LANGUAGE, PULL_REQUEST_TITLE, WAIT_FOR_APPROVAL)
|
||||
OPTIONAL = (BRANCH, COMMIT_TITLE, ENV_FILE, LANGUAGE, PULL_REQUEST_TITLE, READABILITY_FLOOR, TOOLING_ON_HOST, WAIT_FOR_APPROVAL)
|
||||
# What opens a setting that names a Jira Cloud epic in place of a path: `jira:`, then the epic's address as the browser shows it. The settings below may name an epic; each reads its own part of it.
|
||||
JIRA = "jira:"
|
||||
EPIC_SPELLINGS = {
|
||||
@@ -61,6 +69,8 @@ class ProjectConfig:
|
||||
# The config's `env-file`, or None where it sets none.
|
||||
env_file: pathlib.Path | None = None
|
||||
wait_for_approval: bool = False
|
||||
tooling_on_host: bool = False
|
||||
readability_floor: decimal.Decimal = DEFAULT_FLOOR
|
||||
language: str = "English"
|
||||
commit_title: str = templates.TITLE
|
||||
pull_request_title: str = templates.TITLE
|
||||
@@ -126,6 +136,8 @@ def load(top: pathlib.Path, main: pathlib.Path, home: pathlib.Path) -> ProjectCo
|
||||
env_file = anywhere(values.get(ENV_FILE), home)
|
||||
misplaced = ENV_FILE in values and (env_file is None or lies_in(env_file, top, main, file.parent))
|
||||
waits = values.get(WAIT_FOR_APPROVAL, False)
|
||||
on_host = values.get(TOOLING_ON_HOST, False)
|
||||
floor = floor_of(values[READABILITY_FLOOR]) if READABILITY_FLOOR in values else DEFAULT_FLOOR
|
||||
checks = {LANGUAGE: language_fault, COMMIT_TITLE: templates.title_fault, PULL_REQUEST_TITLE: templates.title_fault, BRANCH: templates.branch_fault}
|
||||
faults = [
|
||||
*(f"`{name}` is missing" for name in SETTINGS if name not in values),
|
||||
@@ -136,12 +148,15 @@ def load(top: pathlib.Path, main: pathlib.Path, home: pathlib.Path) -> ProjectCo
|
||||
# rule-hook ranks a plan kept as a file before tool calls, inside the hook's time limit, which a read from Jira mustn't hold up.
|
||||
*(["`goals-and-audience` names a Jira epic, so `plan` must name one too"] if epics["goals-and-audience"] and not epics["plan"] else []),
|
||||
*([f"`{ENV_FILE}` is {values[ENV_FILE]!r}, not {OUTSIDE}"] if misplaced else []),
|
||||
*([f"`{WAIT_FOR_APPROVAL}` is {waits!r}, not true or false"] if not isinstance(waits, bool) else []),
|
||||
*(f"`{name}` is {value!r}, not true or false" for name, value in ((WAIT_FOR_APPROVAL, waits), (TOOLING_ON_HOST, on_host)) if not isinstance(value, bool)),
|
||||
*([f"`{READABILITY_FLOOR}` is {values[READABILITY_FLOOR]!r}, not a number from 1 to 10, such as 7.0"] if floor is None else []),
|
||||
*(f"`{name}` is {values[name]!r}, {fault}" for name, check in checks.items() if name in values and (fault := check(values[name]))),
|
||||
]
|
||||
if faults:
|
||||
return Failure(f"{file}: {'; '.join(faults)}. The settings are {', '.join(SETTINGS)}, and optionally {', '.join(OPTIONAL[:-1])} and {OPTIONAL[-1]}.")
|
||||
return ProjectConfig(file.parent.name, file.parent, top, {name: path for name, path in paths.items() if path}, env_file, waits is True, **{name.replace("-", "_"): str(values[name]) for name in checks if name in values}, epic=epics["plan"], goals_epic=epics["goals-and-audience"])
|
||||
# faults names a floor the config misspells.
|
||||
assert floor is not None
|
||||
return ProjectConfig(file.parent.name, file.parent, top, {name: path for name, path in paths.items() if path}, env_file, waits is True, on_host is True, floor, **{name.replace("-", "_"): str(values[name]) for name in checks if name in values}, epic=epics["plan"], goals_epic=epics["goals-and-audience"])
|
||||
|
||||
|
||||
def epic_of(value: object) -> Epic | None:
|
||||
@@ -150,6 +165,14 @@ def epic_of(value: object) -> Epic | None:
|
||||
return Epic(spelt.group(1), spelt.group(2)) if spelt else None
|
||||
|
||||
|
||||
def floor_of(value: object) -> decimal.Decimal | None:
|
||||
"""The floor value spells, an integer or a float from 1 to 10; None where it spells none. Not a string, nor a boolean, which Python counts as an integer, nor TOML's nan or inf."""
|
||||
if isinstance(value, bool) or not isinstance(value, int | float) or not math.isfinite(value):
|
||||
return None
|
||||
floor = decimal.Decimal(str(value))
|
||||
return floor if 1 <= floor <= 10 else None
|
||||
|
||||
|
||||
def language_fault(value: object) -> str | None:
|
||||
"""Why value names no language; None where it does. Only words, since the name is quoted to every worker and reviewer as an instruction."""
|
||||
named = isinstance(value, str) and re.fullmatch(r"[^\W\d_]+(?:[ -][^\W\d_]+)*", value)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import decimal
|
||||
import os
|
||||
import pathlib
|
||||
import subprocess
|
||||
@@ -281,6 +282,44 @@ class LoadTest(ConfigCase):
|
||||
assert isinstance(found, Failure), found
|
||||
self.assertIn(f"`wait-for-approval` is {eval(spelled)!r}, not true or false", found.reason)
|
||||
|
||||
def test_tooling_on_host_is_an_optional_boolean_that_is_false_where_left_out(self) -> None:
|
||||
folder = self.write("acme", CLIENT)
|
||||
left_out = load(self.checkout, self.checkout, self.home)
|
||||
assert isinstance(left_out, ProjectConfig), left_out
|
||||
self.assertFalse(left_out.tooling_on_host)
|
||||
for spelled, expected in (("true", True), ("false", False)):
|
||||
with self.subTest(spelled):
|
||||
(folder / "config.toml").write_text(CLIENT + f"tooling-on-host = {spelled}\n")
|
||||
found = load(self.checkout, self.checkout, self.home)
|
||||
assert isinstance(found, ProjectConfig), found
|
||||
self.assertEqual(found.tooling_on_host, expected)
|
||||
(folder / "config.toml").write_text(CLIENT + 'tooling-on-host = "yes"\n')
|
||||
found = load(self.checkout, self.checkout, self.home)
|
||||
assert isinstance(found, Failure), found
|
||||
self.assertIn("`tooling-on-host` is 'yes', not true or false", found.reason)
|
||||
|
||||
def test_the_readability_floor_is_an_optional_number_from_1_to_10_that_is_7_where_left_out(self) -> None:
|
||||
folder = self.write("acme", CLIENT)
|
||||
left_out = load(self.checkout, self.checkout, self.home)
|
||||
assert isinstance(left_out, ProjectConfig), left_out
|
||||
self.assertEqual(left_out.readability_floor, decimal.Decimal("7.0"))
|
||||
for spelled, expected in (("5", "5"), ("6.5", "6.5"), ("1", "1"), ("10.0", "10.0")):
|
||||
with self.subTest(spelled):
|
||||
(folder / "config.toml").write_text(CLIENT + f"readability-floor = {spelled}\n")
|
||||
found = load(self.checkout, self.checkout, self.home)
|
||||
assert isinstance(found, ProjectConfig), found
|
||||
self.assertEqual(found.readability_floor, decimal.Decimal(expected))
|
||||
|
||||
def test_a_readability_floor_that_is_no_number_from_1_to_10_fails_naming_it(self) -> None:
|
||||
folder = self.write("acme", CLIENT)
|
||||
for spelled in ('"7.0"', "0.5", "11", "true", "nan", "inf"):
|
||||
with self.subTest(spelled):
|
||||
(folder / "config.toml").write_text(CLIENT + f"readability-floor = {spelled}\n")
|
||||
found = load(self.checkout, self.checkout, self.home)
|
||||
assert isinstance(found, Failure), found
|
||||
self.assertIn("`readability-floor` is ", found.reason)
|
||||
self.assertIn(", not a number from 1 to 10, such as 7.0", found.reason)
|
||||
|
||||
def test_the_language_and_the_templates_are_optional_and_default_to_english_bare_summaries_and_item_branches(self) -> None:
|
||||
folder = self.write("acme", CLIENT)
|
||||
left_out = load(self.checkout, self.checkout, self.home)
|
||||
@@ -316,7 +355,7 @@ class LoadTest(ConfigCase):
|
||||
|
||||
def test_the_failure_for_a_misplaced_env_file_and_a_missing_setting_names_both_and_lists_every_setting(self) -> None:
|
||||
folder = self.write("acme", "".join(line + "\n" for line in CLIENT.splitlines() if not line.startswith("plan")) + 'env-file = "checkout:.env"\n')
|
||||
self.assertEqual(self.failure(), f"{folder / 'config.toml'}: `plan` is missing; `env-file` is 'checkout:.env', not {OUTSIDE}. The settings are {', '.join(SETTINGS)}, and optionally branch, commit-title, env-file, language, pull-request-title and wait-for-approval.")
|
||||
self.assertEqual(self.failure(), f"{folder / 'config.toml'}: `plan` is missing; `env-file` is 'checkout:.env', not {OUTSIDE}. The settings are {', '.join(SETTINGS)}, and optionally branch, commit-title, env-file, language, pull-request-title, readability-floor, tooling-on-host and wait-for-approval.")
|
||||
|
||||
def test_two_configs_naming_one_checkout_fail_naming_both(self) -> None:
|
||||
self.write("acme", CLIENT)
|
||||
@@ -435,6 +474,17 @@ class ToolTest(ConfigCase):
|
||||
self.assertEqual(self.run_tool("wait-for-approval").stdout, "true\n")
|
||||
self.assertEqual(self.run_tool().stdout.splitlines()[-1], "wait-for-approval: true")
|
||||
|
||||
def test_prints_tooling_on_host_and_the_readability_floor_and_lists_them_only_where_the_config_changes_them(self) -> None:
|
||||
folder = self.write("acme", CLIENT)
|
||||
for setting, value in (("tooling-on-host", "false"), ("readability-floor", "7.0")):
|
||||
with self.subTest(setting):
|
||||
left_out = self.run_tool(setting)
|
||||
self.assertEqual((left_out.returncode, left_out.stdout, left_out.stderr), (0, f"{value}\n", ""))
|
||||
self.assertNotIn(setting, self.run_tool().stdout)
|
||||
(folder / "config.toml").write_text(CLIENT + "tooling-on-host = true\nreadability-floor = 5\n")
|
||||
self.assertEqual((self.run_tool("tooling-on-host").stdout, self.run_tool("readability-floor").stdout), ("true\n", "5\n"))
|
||||
self.assertEqual(self.run_tool().stdout.splitlines()[-2:], ["tooling-on-host: true", "readability-floor: 5"])
|
||||
|
||||
def test_prints_the_language_and_each_template_and_lists_them_only_where_the_config_sets_them(self) -> None:
|
||||
folder = self.write("acme", CLIENT)
|
||||
defaults = {"language": "English", "commit-title": "{summary}", "pull-request-title": "{summary}", "branch": "item-{id}"}
|
||||
|
||||
+2
-1
@@ -44,7 +44,8 @@ A valid todo.md; ## Details and each item's detail are optional:
|
||||
file's achieve goals follow in reading order, a sub-goal such as 1.1 included. Each weighs 0.97 times the one
|
||||
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 7.0, or the history
|
||||
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 <reason>.` 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
|
||||
|
||||
@@ -6,12 +6,11 @@ import typing
|
||||
|
||||
from release_plan.todo_table import CODE_HEALTH
|
||||
from failure import Failure
|
||||
from review_rules.comprehension_history import FLOOR
|
||||
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
|
||||
# Code health weighs this many times its weight by position while the comprehension panel's overall is under FLOOR, or unmeasured; lilleman's choice, which docs/decisions.md records.
|
||||
# Code health weighs this many times its weight by position while the comprehension panel's overall is under the project's readability floor, or unmeasured; lilleman's choice, which docs/decisions.md records.
|
||||
UNDER_FLOOR = 4
|
||||
# Any **Void:** line of the goals file's ## Goals; ranked_goals accepts only `**Void:** code health, since <reason>.`, as ~/.claude/CLAUDE.md → "Shared goal" spells it.
|
||||
VOID = re.compile(r"^\*\*Void:\*\* (.*)$", re.M)
|
||||
@@ -72,13 +71,13 @@ def numbered(body: str) -> list[tuple[str, Mark]] | Failure:
|
||||
return goals
|
||||
|
||||
|
||||
def goal_weights(goals: list[tuple[str, Mark]], overall: decimal.Decimal | None) -> 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 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."""
|
||||
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."""
|
||||
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"]
|
||||
total = sum(GOAL_STEP**rank for rank in range(len(achieve)))
|
||||
weights = {number: GOAL_STEP**rank / total for rank, number in enumerate(achieve)}
|
||||
if CODE_HEALTH in weights and (overall is None or overall < FLOOR):
|
||||
if CODE_HEALTH in weights and (overall is None or overall < floor):
|
||||
weights[CODE_HEALTH] *= UNDER_FLOOR
|
||||
return weights
|
||||
|
||||
@@ -13,7 +13,7 @@ def rank_file(todo: pathlib.Path, config: ProjectConfig) -> Ranked | Failure:
|
||||
texts = file_plan(config, todo).texts()
|
||||
if isinstance(texts, Failure):
|
||||
return texts
|
||||
ranked = rank(*texts)
|
||||
ranked = rank(*texts, config.readability_floor)
|
||||
if isinstance(ranked, Failure):
|
||||
return ranked
|
||||
if ranked.text != texts[0] and (unwritten := write(todo, ranked.text)):
|
||||
@@ -31,7 +31,7 @@ def check_failures(todo: pathlib.Path, config: ProjectConfig) -> list[str]:
|
||||
texts = file_plan(config, todo).texts()
|
||||
if isinstance(texts, Failure):
|
||||
return [texts.reason]
|
||||
ranked = rank(*texts)
|
||||
ranked = rank(*texts, config.readability_floor)
|
||||
if isinstance(ranked, Failure):
|
||||
return [ranked.reason]
|
||||
unranked = [] if ranked.text == texts[0] else [f"{todo}: not ranked; run rank_todo.py on it"]
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"""
|
||||
import ast
|
||||
import dataclasses
|
||||
import decimal
|
||||
import math
|
||||
import re
|
||||
import typing
|
||||
@@ -9,6 +10,7 @@ import typing
|
||||
from release_plan.todo_table import BLOCKED_BY, cells, CODE_HEALTH, DETAILS, Exempt, HEADER_START, Item, item_details, items_table, MOVES, OLD_SHAPE, parse_row, renames, risk, Shape, SHAPE, shape_of, Table, table_rows
|
||||
from release_plan.blockers import blocked_through, blockers_first
|
||||
from release_plan.citations import check_citations
|
||||
from project_config.settings import DEFAULT_FLOOR
|
||||
from release_plan.formula import evaluate, parse_formula
|
||||
from failure import Failure
|
||||
from release_plan.goals_file import goal_weights, Mark, ranked_goals
|
||||
@@ -44,13 +46,14 @@ class Ranked:
|
||||
notes: list[str]
|
||||
|
||||
|
||||
def rank(text: str, goals_text: str, decisions: str, history: str) -> Ranked | Failure:
|
||||
def rank(text: str, goals_text: str, decisions: str, history: str, floor: decimal.Decimal = DEFAULT_FLOOR) -> Ranked | Failure:
|
||||
"""floor is the project's readability floor, which its config sets."""
|
||||
lines = text.split("\n")
|
||||
table = read_table(lines)
|
||||
if isinstance(table, Failure):
|
||||
return table
|
||||
shape = shape_of(table.columns)
|
||||
scoring = read_scoring(text, lines, goals_text, decisions, history, shape)
|
||||
scoring = read_scoring(text, lines, goals_text, decisions, history, shape, floor)
|
||||
if isinstance(scoring, Failure):
|
||||
return scoring
|
||||
items = read_items(table, scoring)
|
||||
@@ -112,7 +115,7 @@ def under_the_bar(item: Item, value: float, bar: float, items: list[Item]) -> st
|
||||
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], goals_text: str, decisions: str, history: str, shape: Shape) -> Scoring | Failure:
|
||||
def read_scoring(text: str, lines: list[str], goals_text: str, decisions: str, history: str, shape: Shape, floor: decimal.Decimal) -> Scoring | Failure:
|
||||
goals = ranked_goals(goals_text, decisions)
|
||||
if isinstance(goals, Failure):
|
||||
return goals
|
||||
@@ -125,13 +128,13 @@ def read_scoring(text: str, lines: list[str], goals_text: str, decisions: str, h
|
||||
next_id = stated(text, "Next ID")
|
||||
if isinstance(next_id, Failure) or not re.fullmatch(r"[0-9]+", next_id):
|
||||
return next_id if isinstance(next_id, Failure) else Failure(f"Next ID {next_id!r} is not a whole number")
|
||||
weights = weigh(lines, history, goals, shape)
|
||||
weights = weigh(lines, history, goals, shape, floor)
|
||||
if isinstance(weights, Failure):
|
||||
return weights
|
||||
return Scoring(shape, formula, bar, int(next_id), dict(goals), weights)
|
||||
|
||||
|
||||
def weigh(lines: list[str], history: str, goals: list[tuple[str, Mark]], shape: Shape) -> dict[str, float] | Failure:
|
||||
def weigh(lines: list[str], history: str, goals: list[tuple[str, Mark]], shape: Shape, floor: decimal.Decimal) -> dict[str, float] | Failure:
|
||||
"""Each goal's weight. In OLD_SHAPE, the goals file's goals weigh what todo.md states, and code health has no weight, so no item may name it. Otherwise goal_weights gives each its weight, at the overall latest_overall reads where the goals hold code health."""
|
||||
if shape is OLD_SHAPE:
|
||||
return parse_weights(lines, [number for number, _ in goals if number != CODE_HEALTH])
|
||||
@@ -140,7 +143,7 @@ def weigh(lines: list[str], history: str, goals: list[tuple[str, Mark]], shape:
|
||||
overall = latest_overall(history) if CODE_HEALTH in dict(goals) else None
|
||||
if isinstance(overall, Failure):
|
||||
return overall
|
||||
return goal_weights(goals, overall)
|
||||
return goal_weights(goals, overall, floor)
|
||||
|
||||
|
||||
def read_table(lines: list[str]) -> Table | Failure:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import contextlib
|
||||
import decimal
|
||||
import io
|
||||
import pathlib
|
||||
import re
|
||||
@@ -9,6 +10,7 @@ import unittest
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from project_config.test_project_config import configured
|
||||
from project_config.settings import DEFAULT_FLOOR
|
||||
from failure import Failure
|
||||
from release_plan import goals_file, plan_file, ranking
|
||||
from project_config.main import located
|
||||
@@ -128,13 +130,13 @@ class Rank(unittest.TestCase):
|
||||
|
||||
def test_weighs_each_achieve_goal_97_percent_of_the_one_above_and_no_maintain_goal(self):
|
||||
readme = "## Goals\n\n1. **Achieve:** A.\n 1. **Maintain:** B.\n 2. **Achieve:** C.\n2. **Achieve:** D.\n"
|
||||
self.assertEqual({goal: round(weight, 4) for goal, weight in goals_file.goal_weights(numbered_goals(readme), None).items()}, {"1": 0.3435, "1.2": 0.3332, "2": 0.3232})
|
||||
self.assertEqual({goal: round(weight, 4) for goal, weight in goals_file.goal_weights(numbered_goals(readme), None, DEFAULT_FLOOR).items()}, {"1": 0.3435, "1.2": 0.3332, "2": 0.3232})
|
||||
|
||||
def test_weighs_5_achieve_goals_from_0212_to_0188_and_15_from_0082_to_0053(self):
|
||||
for count, first, last in ((5, 0.212, 0.188), (15, 0.082, 0.053)):
|
||||
with self.subTest(count=count):
|
||||
goals = numbered_goals("## Goals\n\n" + "".join(f"{number}. **Achieve:** G.\n" for number in range(1, count + 1)))
|
||||
weights = list(goals_file.goal_weights(goals, None).values())
|
||||
weights = list(goals_file.goal_weights(goals, None, DEFAULT_FLOOR).values())
|
||||
self.assertEqual((round(weights[0], 3), round(weights[-1], 3), round(sum(weights), 6)), (first, last, 1))
|
||||
|
||||
def test_scores_an_item_by_the_weights_of_the_goals_it_moves(self):
|
||||
@@ -278,6 +280,13 @@ class CodeHealth(unittest.TestCase):
|
||||
with self.subTest(history=history):
|
||||
self.assertEqual(self.scores(history), {"| 1": "101.5", "| 2": "24.6"})
|
||||
|
||||
def test_weighs_code_health_four_times_as_much_only_under_the_floor_it_is_given(self):
|
||||
for floor, value in (("6.0", "25.4"), ("6.5", "101.5")):
|
||||
with self.subTest(floor=floor):
|
||||
ranked = ranking.rank(self.todo, self.readme, "", SCORED.format(overall="6.25"), decimal.Decimal(floor))
|
||||
assert isinstance(ranked, ranking.Ranked), ranked
|
||||
self.assertIn(f"| **Read easier.** | 1 | 1 | 1 | 1 | 1 | code health by 1 | {value} |", ranked.text)
|
||||
|
||||
def test_weighs_by_the_newest_scored_commit_wherever_the_file_holds_it(self):
|
||||
older = self.entry("6.50")
|
||||
newer = self.entry("7.25", "2026-10-10T12", "PR #1 at bbbbbbb")
|
||||
|
||||
@@ -9,8 +9,6 @@ from text_files.utc_stamp import utc
|
||||
ARCHITECT = "Inherited architect"
|
||||
DECIDED_BY = "decided by"
|
||||
DIMENSIONS = ("Navigation", "Locality", "Shape", "Self-sufficiency", "Overall")
|
||||
# The comprehension floor, which every dimension and the overall should reach; docs/decisions.md → "comprehension floor" says it doesn't block anything.
|
||||
FLOOR = decimal.Decimal("7.0")
|
||||
HARDEST_FIRST = "hardest first"
|
||||
HEADING = re.compile(r"^([^,]+), (.+) at ([0-9a-f]{7,40})(?:, against ([0-9a-f]{7,40}))?$")
|
||||
HISTORY = "docs/comprehension-history.md"
|
||||
|
||||
@@ -9,6 +9,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
|
||||
|
||||
from project_config.test_project_config import configured
|
||||
from release_plan.test_ranking import DECISIONS, OLD_SHAPE, README, TODO
|
||||
from project_config.settings import DEFAULT_FLOOR
|
||||
from release_plan import goals_file, ranking
|
||||
import rank_todo
|
||||
|
||||
@@ -124,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 {goals_file.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.", " ".join(rank_todo.__doc__.split()))
|
||||
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()))
|
||||
|
||||
+9
-4
@@ -23,6 +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
|
||||
- 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
|
||||
@@ -37,7 +38,7 @@ Each project principle states one rule that the decisions below apply; their ent
|
||||
- routing: the worker changes rung only as a chunk starts, after every second unfinished verdict, when it names a chunk item that picks a higher rung, or when it cites an escalation trigger the judge finds
|
||||
- tests: each test earns its keep as the technical principles' test bullet says, and the worker takes a test's expected values from its item, never from the code
|
||||
- the repo may name bender, bender-infra and ai-sandbox
|
||||
- todo.md: one table of items, scored by the formula it states, held to its bar and ranked by `bin/rank_todo.py`, which ranks each blocker above the items it blocks; each achieve goal weighs by its position, code health first and four times as heavy while the comprehension panel's overall is under 7.0 or unmeasured, then the goals file's goals, and a maintain goal weighs 0.5 per point of the confidence an item's test, gate leg or probe adds to it; the table's order is the plan's only order
|
||||
- todo.md: one table of items, scored by the formula it states, held to its bar and ranked by `bin/rank_todo.py`, which ranks each blocker above the items it blocks; each achieve goal weighs by its position, code health first and four times as heavy while the comprehension panel's overall is under the project's readability floor or unmeasured, then the goals file's goals, and a maintain goal weighs 0.5 per point of the confidence an item's test, gate leg or probe adds to it; the table's order is the plan's only order
|
||||
- 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
|
||||
- todo.md: tools and agents read and change the plan as it stands only through `bin/plan_store` and `todo-item`; a tool that reads what a past commit held, ranks the file or checks its rank still parses `todo.md`
|
||||
- worker: a chunk's worker writes the simplest change that solves its item, test first wherever a test can check the change, and reads a technical principle only where the item, a finding or its own record names it; larv-review's reviewers hold the change to the principles and to the standards in `skills/larv-review/standards/`
|
||||
@@ -81,9 +82,9 @@ Valid while the archive's file names, the Vocabulary and the panel keep these wo
|
||||
|
||||
The cap is 5, `bin/release_plan/todo_table.py`'s `BUNDLE_MAX_R`, from the same chunks: by the highest R among a chunk's items, the median was 0.9M to 1.5M tokens at R 1 to 5, and 2.7M at R 6, where the 90th percentile was 8.8M. A risky item that runs long re-runs review over every item bundled with it. R 5 is also the least R an I 4 item gets, so an item that could take everything down shares a chunk only where its L + E is 3 or less, and an irreversible I 5 item, at R 7 or more, never does. Valid while a review's cost is mostly fixed per chunk; revisit once 30 chunks have shipped bundles under it.
|
||||
|
||||
## comprehension floor: every dimension and the overall at 7.0 or above is the target, and no score blocks a merge or release
|
||||
## 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-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.
|
||||
|
||||
## 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
|
||||
|
||||
@@ -302,6 +303,10 @@ 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
|
||||
|
||||
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.
|
||||
|
||||
## 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
|
||||
|
||||
2026-10-30, lilleman through todo item 258. Serves goal 1.1. fejkdata.dev's release review of 0.1.0 filed the architect's findings as items 28 to 36, in releases after 0.1.0, so the release the human was about to cut still held the drift the review had found. A release review's branch opens with an empty commit, so under `larv-review` §3 → "Findings" → "Outside the chunk" every finding lay outside its change and was filed. The review's whole point is to leave the release without the drift the release's small changes made, so the whole project is its chunk and the passes fix within their five rounds. Three kinds of finding are still filed, each under the release being reviewed, or under the earliest release `rules/todo-items.md` allows where that release's semver bump forbids it, such as a feature in a patch release: one whose fix needs a human answer, marked `question`; one whose fix adds a feature; and one whose fix the five rounds cannot finish. The release isn't ready to cut while one is open, so `CLAUDE.md` → "Working loop" calls a release finished only once its review has merged and it holds no item. Valid while a release review's rounds can fix what they find.
|
||||
@@ -647,7 +652,7 @@ Valid while the worker writes the tests that larv-review's reviewers hold to the
|
||||
|
||||
2026-10-04, lilleman, answering the principles audit of PR #215. Serves goal 4, which keeps credentials, transcripts and memory files off the remote; the names of the host, its infrastructure project and the sandbox VM are none of those. Valid while the repo names them without their addresses or credentials.
|
||||
|
||||
## todo.md: one table of items, scored by the formula it states, held to its bar and ranked by `bin/rank_todo.py`, which ranks each blocker above the items it blocks; each achieve goal weighs by its position, code health first and four times as heavy while the comprehension panel's overall is under 7.0 or unmeasured, then the goals file's goals, and a maintain goal weighs 0.5 per point of the confidence an item's test, gate leg or probe adds to it; the table's order is the plan's only order
|
||||
## todo.md: one table of items, scored by the formula it states, held to its bar and ranked by `bin/rank_todo.py`, which ranks each blocker above the items it blocks; each achieve goal weighs by its position, code health first and four times as heavy while the comprehension panel's overall is under the project's readability floor or unmeasured, then the goals file's goals, and a maintain goal weighs 0.5 per point of the confidence an item's test, gate leg or probe adds to it; the table's order is the plan's only order
|
||||
|
||||
2026-10-02, lilleman. Serves goal 1: findings were filed faster than chunks closed them, so the plan grew without telling what mattered. Each item is scored as `~/.claude/rules/todo-items.md` says; this repo's formula counts value highest and size least. The format is mandatory in every project, as the premises are (goal 1.3); the formula and bar are each project's own. A script ranks the table so a re-rank after each addition or edit is deterministic and cheap. Valid while one human sets the bar and reads the ranking, and while the items marked `principle` stay few enough to rank.
|
||||
|
||||
|
||||
@@ -2101,3 +2101,20 @@ Read most (opens and searches):
|
||||
- `ci.sh` 1
|
||||
- `docs/decisions.md` 1
|
||||
- `todo.md` 1
|
||||
|
||||
## Reading cost, chunk c1c3ab1d8e14, finished 2026-11-14T20:33:37Z
|
||||
|
||||
135080 new input tokens before the first commit.
|
||||
|
||||
Read most (opens and searches):
|
||||
|
||||
- `bin/plan_store/stores.py` 4
|
||||
- `bin/project_config/settings.py` 4
|
||||
- `bin/project_config/test_project_config.py` 4
|
||||
- `bin/larv_review/reviewer_header.py` 3
|
||||
- `bin/plan_store/jira_epic.py` 3
|
||||
- `bin/project_config/main.py` 3
|
||||
- `bin/release_plan/goals_file.py` 2
|
||||
- `skills/larv-review/SKILL.md` 2
|
||||
- `bin/adf_codec/convert.py` 1
|
||||
- `bin/loop_claude/loop/usage.py` 1
|
||||
|
||||
@@ -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 <the IDs of the items the chunk ships, if any>` 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 <text>` 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 <scores file> <the same item IDs>`, 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 7.0. 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 7.0, 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 7.0, 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 `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 7.0, 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 7.0, 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 `<PR or branch> rerun at <commit>`. 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.
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 358 | 0.11.0 | | | **Let a project's config allow its runtime and tests on the host, and set the comprehension score under which code health is very important.** | 2 | 2 | 3 | 5 | 3 | 1.6 by 4 | 1.3 |
|
||||
| 362 | 0.11.0 | | | **Send loop-claude's notices through the notifier a project's config names, with Mattermost as the first backend.** | 2 | 1 | 2 | 3 | 3 | 1.6 by 3 | 1.0 |
|
||||
| 363 | 0.11.0 | 362 | | **Add a Slack backend to the notifier, sending each notice as a DM from a bot.** | 2 | 1 | 2 | 3 | 3 | 1.6 by 4 | 1.3 |
|
||||
| 377 | 0.11.0 | | | **Hand a reviewer without a shell the plan as a listing `larv-review` writes into the review folder, whatever store holds the plan.** | 2 | 2 | 3 | 5 | 3 | 1.6 by 4 | 1.3 |
|
||||
@@ -83,10 +82,6 @@
|
||||
|
||||
## Details
|
||||
|
||||
### 358. Let a project's config allow its runtime and tests on the host, and set the comprehension score under which code health is very important.
|
||||
|
||||
lilleman's calls, 2026-11-12. Legacy products may have no container setup, so the config may allow host tooling; `CLAUDE.md`'s container rule and rule-hook then follow it. In 0.10.0 a decision in the project's records can put tooling on the host instead. The comprehension panel will score legacy code low, and today code health under 7.0 is very important. The config sets that floor, 7.0 in the configs of the projects under `~/code`; the signal stays that the score rises.
|
||||
|
||||
### 362. Send loop-claude's notices through the notifier a project's config names, with Mattermost as the first backend.
|
||||
|
||||
lilleman's call, 2026-11-12: each project names its notifier, server and recipient, so client notices can go to a client's workspace. Today `bin/mattermost-dm` reads one server from `~/.claude/.env` for every project.
|
||||
|
||||
Reference in New Issue
Block a user