Take the scoring run's values from seat-prompts.md where the working rules hold none
CI / tests (pull_request) Successful in 4m17s
CI / tests (pull_request) Successful in 4m17s
This commit is contained in:
@@ -61,9 +61,13 @@ def score_bullets(skill: str) -> tuple[list[str], list[str]] | Failure:
|
||||
return anchors, [line.replace("**", "") for _, line in dimensions]
|
||||
|
||||
|
||||
# The heading of the section that holds a project's values: `Scoring run`, numbered or not, or `<name>'s values`.
|
||||
VALUES_HEADING = r"(\d+\.\s+)?Scoring run|.+'s values"
|
||||
|
||||
|
||||
def project_values(text: str, source: str) -> dict[str, str] | Failure:
|
||||
"""Each value seat-prompts.md fills from the project, from the section of text, read from source, headed `Scoring run` or `<name>'s values`."""
|
||||
lines = section(text, r"(\d+\.\s+)?Scoring run|.+'s values")
|
||||
lines = section(text, VALUES_HEADING)
|
||||
if lines is None:
|
||||
return Failure(f"{source} has no \"Scoring run\" section to fill the seats' prompts from; add one with {listed([f'{{{name}}}' for name in VALUE_NAMES], 'and')}")
|
||||
values = {}
|
||||
@@ -137,13 +141,15 @@ def prepare_scoring(worktree: str, home: pathlib.Path, run: Git = git) -> str |
|
||||
config = located(worktree, home, run)
|
||||
if isinstance(config, Failure):
|
||||
return config
|
||||
# Where AGENTS.md is missing, this repo keeps the values in seat-prompts.md: .claude/rules/this-repo-keeps-no-agents-md.md.
|
||||
source = config.paths["working-rules"]
|
||||
if not source.is_file() and (own := pathlib.Path(worktree) / "skills" / "comprehension-panel" / "seat-prompts.md").is_file():
|
||||
source = own
|
||||
rules = read(source) if source.is_file() else ""
|
||||
if isinstance(rules, Failure):
|
||||
return rules
|
||||
# Where the working rules hold no values, this repo keeps them in seat-prompts.md: .claude/rules/this-repo-keeps-no-agents-md.md.
|
||||
if section(rules, VALUES_HEADING) is None and (own := pathlib.Path(worktree) / "skills" / "comprehension-panel" / "seat-prompts.md").is_file():
|
||||
source, rules = own, read(own)
|
||||
if isinstance(rules, Failure):
|
||||
return rules
|
||||
skill = read(PANEL / "SKILL.md")
|
||||
if isinstance(skill, Failure):
|
||||
return skill
|
||||
|
||||
@@ -165,6 +165,28 @@ class PrepareScoring(unittest.TestCase):
|
||||
assert isinstance(ran, str), ran
|
||||
self.assertIn("every non-test tracked file: `bin/**` and `README.md`. Do NOT open any record of a past panel, nor any review output.", pathlib.Path(ran.splitlines()[2]).read_text())
|
||||
|
||||
def test_takes_the_values_from_the_checkouts_seat_prompts_where_the_working_rules_hold_none(self):
|
||||
own = self.checkout / "skills" / "comprehension-panel" / "seat-prompts.md"
|
||||
own.parent.mkdir(parents=True)
|
||||
own.write_text("# Seats\n\n## proj's values\n\n- Language: Go\n- Kind: a CLI\n- Domain: parsing\n- Domain docs: the spec\n- 3am question: the parse hangs\n")
|
||||
for rules in ("# Working rules, with no values\n", None):
|
||||
with self.subTest(rules=rules):
|
||||
(self.checkout / "AGENTS.md").unlink(missing_ok=True)
|
||||
self.commit(rules)
|
||||
ran = self.prepare()
|
||||
assert isinstance(ran, str), ran
|
||||
self.assertIn("Your background: ~2 years in Go, first codebase of this kind (a CLI)", pathlib.Path(ran.splitlines()[2]).read_text())
|
||||
self.assertIsNone(removed_setup(str(self.checkout), self.root, functools.partial(git, env=self.env)))
|
||||
|
||||
def test_keeps_the_working_rules_values_where_the_checkout_has_seat_prompts_too(self):
|
||||
own = self.checkout / "skills" / "comprehension-panel" / "seat-prompts.md"
|
||||
own.parent.mkdir(parents=True)
|
||||
own.write_text("## proj's values\n\n- Language: Go\n- Kind: a CLI\n- Domain: parsing\n- Domain docs: the spec\n- 3am question: the parse hangs\n")
|
||||
self.commit("## Scoring run\n\n- Language: Python\n- Kind: a CLI\n- Domain: parsing\n- Domain docs: the spec\n- 3am question: the parse hangs\n")
|
||||
ran = self.prepare()
|
||||
assert isinstance(ran, str), ran
|
||||
self.assertIn("Your background: ~2 years in Python,", pathlib.Path(ran.splitlines()[2]).read_text())
|
||||
|
||||
def test_refuses_writing_nothing_where_the_project_gives_no_values(self):
|
||||
self.commit()
|
||||
ran = self.run_tool("prepare-scoring")
|
||||
|
||||
@@ -6,13 +6,14 @@
|
||||
|
||||
`Bar = 0.1`
|
||||
|
||||
`Next ID = 461`
|
||||
`Next ID = 462`
|
||||
|
||||
## Items
|
||||
|
||||
| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |
|
||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||
| 460 | 0.14.0 | | | **Review the judge's fix for quoting the worker's task as evidence with every larv-review pass it fires, and adjust it to their findings.** | 2 | 2 | 3 | 5 | 2 | code health by 3, 1.1 by 5 | 7.2 |
|
||||
| 461 | 0.14.0 | | defect | **Take the scoring run's project values from `seat-prompts.md` where the working-rules file holds no "Scoring run" section, so `larv-review prepare-scoring` runs in claude-config again.** | 1 | 1 | 2 | 2 | 1 | code health by 3 | 5.5 |
|
||||
| 452 | 0.14.0 | | | **Make do-epic's view of the Jira workflow settings: the statuses at which an issue unblocks the issues it blocks, and the moves the team's own automation makes, so do-epic makes none of those.** | 3 | 2 | 2 | 5 | 5 | 1.6 by 7, 1.5 by 3 | 2.1 |
|
||||
| 449 | 0.14.0 | | | **Record do-epic's repo picks and sub-task summaries in the team's own spelling, such as `core-4` and `core-4: Bygg …`, as its config sets them.** | 2 | 2 | 2 | 4 | 3 | 1.6 by 6 | 2.0 |
|
||||
| 458 | 0.14.0 | | | **Resume a chunk whose pull request awaits a person's merge once it no longer merges cleanly into the default branch, so the worker brings it level again.** | 3 | 2 | 2 | 5 | 4 | 1.6 by 4, 1.5 by 3 | 1.9 |
|
||||
@@ -91,6 +92,15 @@ Touches:
|
||||
- `bin/agent_cycle/test_judge.py`
|
||||
- `bin/judge_replay/test_judge_replay.py`
|
||||
|
||||
### 461. Take the scoring run's project values from `seat-prompts.md` where the working-rules file holds no "Scoring run" section, so `larv-review prepare-scoring` runs in claude-config again.
|
||||
|
||||
`prepare-scoring` falls back to `skills/comprehension-panel/seat-prompts.md` → "claude-config's values" only where the working-rules file is missing. Since claude-config's project config names `docs/decisions.md` as its working rules, that file exists, holds no "Scoring run" section, and `prepare-scoring` exits 1. No chunk can then record the scoring run its merge owes.
|
||||
|
||||
Touches:
|
||||
|
||||
- `bin/larv_review/scoring_setup.py`: `prepare_scoring` (small)
|
||||
- `bin/larv_review/test_scoring_setup.py`
|
||||
|
||||
### 452. Make do-epic's view of the Jira workflow settings: the statuses at which an issue unblocks the issues it blocks, and the moves the team's own automation makes, so do-epic makes none of those.
|
||||
|
||||
do-epic counts an issue as done only where Jira's status category is done, and moves a finished chunk's issue to done itself, by `jira-finish-transition`. On a team whose CI moves issues through the workflow, both are wrong. On TW, CI moves an issue to Code Review when its pull request opens, to Release Ready when it merges, and to Done when it is deployed. So do-epic would move an issue to Done before it is deployed, and would hold every blocked issue until the blocker is deployed, though the team wants blocked work to start once the blocker's pull request merges.
|
||||
|
||||
Reference in New Issue
Block a user