@jesdi/skills 0.0.68 → 0.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jesdi/skills",
3
- "version": "0.0.68",
3
+ "version": "0.0.69",
4
4
  "description": "jesdi's agent skills (content package consumed by @jesdi/skills-cli)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -133,18 +133,18 @@ and do not know about the run, except `driver_run.py`, which the three deciding
133
133
  an agent is reaped, the run stops. No group gets a signal after its leader is reaped.
134
134
  - A role gets one rerun. The rerun prompt is the first prompt, the rejection, then the same ending again.
135
135
  A timeout doubles the time of the rerun.
136
- - Fix rounds stop at 4, and round 3 goes to the next implementer entry. The correctness pass never runs on the
136
+ - Fix rounds stop at 2, and round 2 goes to the next implementer entry. The correctness pass never runs on the
137
137
  provider of the implementer.
138
138
  - A red gate on the implementer's or a fixer's commit is a finding of the next round (`driver_fixloop._gate`), so
139
- it blocks only after round 4. A red gate on a test-writer correction blocks.
139
+ it blocks after round 2. A red gate on a test-writer correction blocks.
140
140
  - The implementer and each fixer get the `--gate` command and run it before they report. The gate of the driver
141
141
  stays the source of truth: an agent's run of the gate counts for nothing.
142
142
  - A finding that a correction reports in `not_addressed` goes to the fixer of the same round as kind `code`
143
143
  (`driver_fixloop._correct` rewrites it in the findings file): the test needs a production change first, so a
144
144
  second correction could not close it.
145
- - No test-writer correction runs after round 4 (`driver_fixloop._act_on`): its findings become `finding` questions
146
- with the others. A correction there would add red locked tests that no fix round makes green, and `accept` could
147
- not merge the ticket.
145
+ - No test-writer correction runs after round 2 (`driver_fixloop._act_on`): a red gate or an unmet criterion blocks
146
+ the ticket. Other open findings go to the final must-fix list when the gate is green. A correction at the cap
147
+ would add locked tests that no fix round could make green.
148
148
  - A correction that does not close its findings (the next review finds one again, or the driver rejects its
149
149
  report) asks a `locked-test-again` question. `correct-again` and `accept` send the ticket back to `review`, and
150
150
  `driver_decisions.corrections` reads the answers from `state.json`: the count of `correct-again` stops bounds the
@@ -101,6 +101,8 @@ A ticket is ready when each ticket in its **Blocked by** line is merged and no r
101
101
  2. **implementer** (`prompts/implementer.md`). It starts from that commit and makes the locked tests green. It makes the gate (`--gate`) green on its final commit before it reports DONE or DONE_WITH_CONCERNS.
102
102
  3. **Gate.** The driver runs `--gate` on the ticket tip.
103
103
  4. **Review.** The driver compares each locked file of the ticket with the test-writer commit. A file that differs is a critical finding `locked file changed: <path>`. A locked file of a merged ticket that the ticket changed since its merge base with the PR branch is a critical `fixture` finding `the ticket changed the locked file of a merged ticket: <path>`, so it goes to a correction (see **Before a correction**). Then the **reviewer** (`prompts/reviewer.md`) runs, and for a ticket with a **Risk** line the **correctness** pass (`prompts/correctness.md`) runs at the same time in the same slot. A read-only role (reviewer, correctness, final-reviewer, pr-writer) leaves its slot and the git config as it found them: all worktrees share one config, and one key written there, such as a `core.worktree` on a temp directory, breaks git in each of them. To run a check off the slot, a reviewer reads the driver's gate record or makes its own `git worktree add --detach` copy and removes it. After read-only roles, the driver checks the slot and the keys of the shared config (`git rev-parse --git-common-dir`, then `config`) against what they were before. One change does not count: a new `branch.<name>` section with only `remote` on a configured remote and `merge` on `refs/heads/...`, which another session's `git worktree add -b` writes while a review runs. When the slot or another key changed, the driver restores the slot and only the changed keys, so other sessions' writes stay; when git cannot write them back (a held `config.lock`, a valueless key), the whole file goes back, and when that fails too the ticket is blocked, writes `a read-only role broke its rule: ...` to the ledger, and runs the review one more time; a second change blocks the ticket.
104
+
105
+ The ticket reviewers put unmet criteria and merged-ticket regressions in `findings`; other observations go to final review. A re-review repeats its own open findings and can add regressions caused by the fix. Newly noticed issues outside that scope are deferred. The driver stores deferred observations in `observations-<round>.json` and gives them to the final reviewer.
104
106
  5. **Merge.** The driver merges the reviewed tip into the PR branch with git plumbing, then deletes the ticket branch. A conflict goes to the **conflict** agent (`prompts/conflict.md`) once. Its resolution may change no locked file of the ticket. A second conflict blocks the ticket.
105
107
  **The landing check.** Merges are serial. Before the PR branch moves, the driver compares the tree that is about to land (the ticket tip of a fast-forward, or the merge commit) with the PR tip: each locked file of each merged ticket must be the same tree entry in both: the same blob with the same mode, so a file that became a symlink is a difference. A file that only one of them has is a difference. A file that the landing ticket lists in its own `locked` is not checked: the test-writer of a later ticket can add a test to a file that an earlier ticket locked, and must list that file. A test-writer report that changes such a file and does not list it is rejected, with the usual one rerun. The review finds such a change first; the landing check catches a change that no review saw, for example of a ticket that merged after the last review. A difference refuses the landing: the ticket is BLOCKED with `locked file changed: <path>` in the ledger and a `merged-locked-file` question for each path, the PR branch does not move, and no fix round runs. `restore` puts the file back to the version of the PR branch in a commit of the driver on the ticket branch, and `adopt` adds the file to the ticket's `locked`; then the landing runs again with its gate. When that gate is red, the driver takes the restore commit back and asks again without the option that was tried. The PR branch moves only from the tip that the check read; when another hand moved the branch in between, the driver makes the merge, the check and the gate again, one time. Only that case starts the landing again: a refused landing and a red merge gate block the ticket. The second try runs no conflict agent, so a conflict there blocks the ticket, and so does a branch that moved again.
106
108
  **Before a correction.** A test-writer that corrects locked tests (after `overrule-test`, or for a `fixture` finding or a `test` finding on a locked file) starts from the locked versions: the driver puts back each locked file of the ticket and each locked file of a merged ticket that the ticket changed, commits them in one commit of its own, and the ledger names each file. A file of a merged ticket goes back to the version of the PR branch. The commit keeps the tree of the next fixer and of the gate clean, whatever files the correction commits. The correction's prompt names the restored files: when a test in one of them fails only because the ticket changed an interface that the test uses, the correction updates the file to the new interface, keeps what each test asserts, and lists the file in `locked`. Each correction also gets `prompts/corrected.md`: when it adds a requirement, it updates each shared fake or fixture that other locked tests use, runs each whole locked file and each locked test of merged tickets, and names each red test in `concerns`.
@@ -118,18 +120,16 @@ Rules for each agent:
118
120
 
119
121
  | Finding | What the driver does |
120
122
  |---|---|
121
- | kind `fixture`, any severity; kind `test`, `critical` or `important`, on a locked file of the ticket; or any kind, `critical` or `important`, on a locked file of a merged ticket | One test-writer correction, outside the fix rounds. The fixer may not edit a locked file, so a fix round cannot close a `test` finding there. Only a correction may change a locked file of a merged ticket, and it lists the file in `locked`: a ticket whose Touches line names such a file gets its change this way, where a fixer's change would be put back (issue #116). The corrected files are the new locked versions, and the next review is a full review. A finding that the correction reports in `not_addressed` (it needs a production change first) becomes a finding of kind `code`, with the reason as its evidence, and goes to a fix round at once; the ledger says it was not corrected. A finding of this kind that is open in the review after the correction, or a correction that the driver rejects, blocks the ticket with a `locked-test-again` question. No correction runs after round 4. |
123
+ | kind `fixture`, any severity; kind `test`, `critical` or `important`, on a locked file of the ticket; or any kind, `critical` or `important`, on a locked file of a merged ticket | One test-writer correction, outside the fix rounds. The fixer may not edit a locked file, so a fix round cannot close a `test` finding there. Only a correction may change a locked file of a merged ticket, and it lists the file in `locked`: a ticket whose Touches line names such a file gets its change this way, where a fixer's change would be put back (issue #116). The corrected files are the new locked versions, and the next review is a full review. A finding that the correction reports in `not_addressed` (it needs a production change first) becomes a finding of kind `code`, with the reason as its evidence, and goes to a fix round at once; the ledger says it was not corrected. A finding of this kind that is open in the review after the correction, or a correction that the driver rejects, blocks the ticket with a `locked-test-again` question. No correction runs after round 2. |
122
124
  | `critical` or `important` | One fix round. |
123
125
  | `minor` | It stays in the ledger and in the findings file. The final reviewer gets the list. |
124
126
 
125
127
  A fix round has three steps: the **fixer** (`prompts/fixer.md`) makes the gate green on its final commit, as the implementer does; the driver runs the gate on the new tip; a re-review reads the range of the fix. A mutation proof is repeated only when the fix changed its production line. A fixer whose findings need no change, for example because a test-writer correction before it already resolved them, makes no commit and gives in `concerns` a reason for each finding; the round still counts, and the re-review of the same tip checks each reason.
126
128
 
127
- A red gate on the commit of the implementer or of a fixer is a critical finding with source `gate`. Its file is the gate record, and the record holds the output. No review runs on that tip, and the next round starts: a red gate on the commit of the implementer starts round 1. The review after that round covers each fix since the last review and repeats each proof that one of them made due. Two red gates block the ticket: one after round 4, and one on the commit of a test-writer correction, because the correction is outside the fix rounds and a fixer may not edit the locked files.
129
+ A red gate on the commit of the implementer or of a fixer is a critical finding with source `gate`. Its file is the gate record, and the record holds the output. No review runs on that tip, and the next round starts: a red gate on the commit of the implementer starts round 1. The review after that round covers each fix since the last review and repeats each proof that one of them made due. A red gate after round 2 or on a test-writer correction blocks the ticket.
128
130
 
129
- - Rounds 1 and 2 run on the first entry of the implementer list.
130
- - Rounds 3 and 4 run on the second entry of the implementer list. When the list has one entry, they stay on it and the ledger says so.
131
- - There is no ruling at round 2.
132
- - Findings that are open after round 4 make the ticket BLOCKED. The run ends with exit 1, and the driver writes one question of kind `finding` for each. A finding that would get a test-writer correction is one of them: no correction runs after round 4, because its new locked tests would have no fix round to make them green and the merge gate would be red. So `accept` on each question merges the reviewed tip. A tip that still changes a locked file of a merged ticket gets a `merged-locked-file` question at its landing.
131
+ - Round 1 runs on the first entry of the implementer list; round 2 runs on the second. Both entries are required.
132
+ - After round 2, a red gate or an unmet ticket criterion blocks the ticket and its dependents. Independent tickets continue. When the gate is green and criteria are met, other open findings move to the final must-fix list; the ticket can merge. A tip that changes a locked file of a merged ticket still gets a `merged-locked-file` question at its landing.
133
133
 
134
134
  ### End of run
135
135
 
@@ -137,9 +137,9 @@ The end of run starts only when every ticket is merged and every slot is idle. I
137
137
 
138
138
  1. **Tidy.** The driver saves the PR tip in `refs/implement-spec/<key>/recovery`. It then makes one commit for each ticket, in merge order, named `feat(NN): <title>`. Each commit holds the tests, the implementation and the fixes of its ticket. The tree of the new tip must equal the tree of the old tip, or the branch stays as it was.
139
139
  2. **Rebase** onto the fetched tip of the default branch of `origin`. A conflict goes to the conflict agent (`prompts/rebase-conflict.md`) once, and the rebased tip is gated.
140
- 3. **Gate**, then the **final-reviewer** (`prompts/final-reviewer.md`) on the whole range, with the method of the `review-diff` skill. It gets the minor findings of the tickets and the rulings of the operator.
141
- 4. **Fix batch.** Critical and important findings go to one fixer (`prompts/final-fixer.md`). The driver names each of its commits `fix(NN): …` from the ticket in the report. Then the gate, then one scoped review of those commits.
142
- 5. Findings that are open after the second review become questions of kind `final-finding`. There is no third review.
140
+ 3. **Gate**, then the **final-reviewer** (`prompts/final-reviewer.md`) on the whole range, with the method of the `review-diff` skill. It gets ticket observations, minor findings, the must-fix list and the rulings of the operator.
141
+ 4. **Fix batch.** Critical and important findings, including every must-fix item, go to one fixer (`prompts/final-fixer.md`). The driver names each of its commits `fix(NN): …` from the ticket in the report. Then the gate, then one scoped review of those commits.
142
+ 5. Other findings open after the second review become questions of kind `final-finding`; unresolved must-fix items keep the run blocked. There is no third review.
143
143
  6. **Push.** With `--push` or `--unattended`, the driver pushes the reviewed tip once, with no force, and opens the PR with `gh`, ready for review. The **pr-writer** (`prompts/pr-writer.md`) writes the body with the method of the `pr` skill; the driver puts the facts of the run after it: the ticket-to-commit map, the fix commits, the rulings and the review coverage (`prompts/pr-body.md`). The body carries the merge-risk block of the `pr-risk` skill under `## Merge Danger`, above the facts; the driver validates it, runs the pr-writer once more with the errors when it is invalid, and blocks the run, opening no PR, when the second body is invalid too. A push stops before any agent when no `pr` skill or no `pr-risk` skill is next to this skill, in `${CLAUDE_CONFIG_DIR:-~/.claude}/skills` or in `~/.agents/skills`. Without them it prints the two tips and the command to run again with `--push`.
144
144
 
145
145
  History rules:
@@ -165,7 +165,7 @@ A repository with no `origin` remote skips only step 2 and step 6. The tidied co
165
165
  | `anthropic` | `claude -p` | low, medium, high, xhigh, max |
166
166
  | `openai` | `codex exec` | minimal, low, medium, high, xhigh |
167
167
 
168
- The driver uses the first entry of a role. The fixer of a ticket runs on the `implementer` list; the `fixer` list is only for the fix batch of the final review. The driver uses a later entry in two cases only: fix rounds 3 and 4 (the implementer list), and the correctness pass, which takes the first correctness entry of another provider than the first implementer entry. The reviewer never does the correctness pass: when the list has no such entry, or the CLI of that entry is not on PATH, the run ends with exit 3 before any agent. The `explorer` list is read and checked, but the driver starts no explorer.
168
+ The driver uses the first entry of a role. The fixer of a ticket runs on the `implementer` list; the `fixer` list is only for the fix batch of the final review. Round 2 uses the second implementer entry, which the model list must supply. The correctness pass takes the first correctness entry of another provider than the first implementer entry. The reviewer never does the correctness pass: when the list has no such entry, or the CLI of that entry is not on PATH, the run ends with exit 3 before any agent. The `explorer` list is read and checked, but the driver starts no explorer.
169
169
 
170
170
  The defaults need both `claude` and `codex` on PATH. The `openai` defaults name the full Codex model names (`gpt-6-astra`, `gpt-6.1-sol`), because a Codex CLI that is signed in with a ChatGPT account does not accept the short aliases. Read "Known limits" before you use them as they are.
171
171
 
@@ -196,7 +196,7 @@ A question is a bounded choice for the operator. `driver_decisions.py` `KINDS` h
196
196
  | Kind | Question id | Asked when | Run exit | Options |
197
197
  |---|---|---|---|---|
198
198
  | `locked-test` | `<NN>-locked-test-<n>` | An implementer or a fixer reports BLOCKED with a concern that starts with `locked test contradicts spec:`. Asked again on the same test, from the same report, when the driver refuses the report of the correction after `overrule-test` and its rerun, or the correction reports BLOCKED. | 2 | `overrule-test`: the test-writer corrects the test from that report, then the implementer runs again, and the fix rounds count from 0: the corrected tests are a new contract. `overrule-implementer` (recommended): the implementer runs again. |
199
- | `finding` | `<NN>-finding-<n>` | A finding is open after fix round 4. One question for each finding. | 1 | `accept`: close the finding; the ticket merges when each of its findings is accepted. `split` (recommended) and `redesign`: the ticket stays BLOCKED, with the ruling in the ledger. |
199
+ | `finding` | `<NN>-finding-<n>` | Existing runs created under the earlier four-round policy can still contain this question; the two-round policy creates no new ones. | 1 | `accept`: close the finding. `split` (recommended) and `redesign`: keep the ticket BLOCKED. |
200
200
  | `locked-test-again` | `<NN>-locked-test-again-<n>` | A finding for a test-writer correction is open in the review right after a correction, or the driver rejects the correction's report (for example, it changes a file that it does not list in `locked`). One question for each finding. | 2 | `correct-again` (recommended): the ticket resumes from the review, and that review's findings get one more correction. `accept`: no more correction runs for the ticket, its locked tests stay as they are, and the ticket goes on to its fix rounds with its other findings; a changed locked file is still restored. `redesign`: the ticket stays BLOCKED, with the ruling in the ledger. After two `correct-again` stops on a ticket, its next question offers only `accept` (recommended) and `redesign`, so a test-writer and a reviewer that never agree cannot loop. |
201
201
  | `review-stopped` | `<NN>-review-stopped-<n>` | The reviewer or the correctness pass reports `BLOCKED` or `NEEDS_CONTEXT`. One question for each agent that stopped. | 2 | `retry` (recommended): the ticket resumes from the review, and each agent of the review runs again. `accept`: the same, and for the rest of the ticket a `BLOCKED` or `NEEDS_CONTEXT` report of that agent does not stop it: the review goes on with that report's findings and those of the other reports. `redesign`: the ticket stays BLOCKED, with the ruling in the ledger. |
202
202
  | `review-rejected` | `<NN>-review-rejected-<n>` | The driver rejects the report of the reviewer or the correctness pass, and the report of its rerun too (for example, no mutation proof for a locked test file). One question for each agent. | 2 | `retry` (recommended): the ticket resumes from the review, each agent of the review runs again, and the first prompt of the rejected agent says why the driver rejected it. `redesign`: the ticket stays BLOCKED, with the ruling in the ledger. |
@@ -223,7 +223,7 @@ The driver enforces the mutation proof for each locked test file, not for each l
223
223
 
224
224
  ## Known limits
225
225
 
226
- - **A `codex` agent cannot commit.** A role that commits (test-writer, implementer, fixer, conflict) on an `openai` entry runs with `--sandbox workspace-write`, and that sandbox cannot run `git commit`. In the default `models.json` this is the second implementer entry, so fix rounds 3 and 4 fail. What to do: give a `--models` file with no `openai` entry in the `implementer`, `test-writer`, `fixer` and `conflict` lists.
226
+ - **A `codex` agent cannot commit.** A role that commits (test-writer, implementer, fixer, conflict) on an `openai` entry runs with `--sandbox workspace-write`, and that sandbox cannot run `git commit`. If a custom `--models` file assigns such an entry to a committing role, replace it with an entry whose CLI can commit in the ticket worktree.
227
227
  - **A `codex` reviewer cannot make a mutation proof.** A reviewer on an `openai` entry runs with `--sandbox read-only` and cannot make the temporary edit. The default `models.json` has such an entry first for the reviewer, and each full review needs the proofs. What to do: give a `--models` file whose reviewer list starts with an `anthropic` entry.
228
228
  - **The correctness pass reads a tree that the reviewer changes.** The two agents share one slot, and the reviewer makes temporary edits. `prompts/correctness.md` tells the pass to read from git at the reviewed commit and to run no tests. It reads only the spec, the ticket and the findings file from the working tree, because git can lack them: `.agent/` is ignored. That rule is the only guard: the driver cannot enforce it, so a pass that ignores it can report a false finding and start a fix round. What to do: when a correctness finding looks wrong, compare it with `git show <reviewed commit>:<file>` before you rule on it.
229
229
  - **A ticket that is not merged stops the end of run.** While one ticket is BLOCKED, there is no tidy and no final review of the merged tickets.
@@ -12,7 +12,7 @@ this session; this file only starts the driver. The method text is in the prompt
12
12
  templates (prompts/*.md) and in README.md. The driver keeps what this fork added
13
13
  to upstream: a model list per role; a context-isolated test-writer that commits
14
14
  locked acceptance tests at the ticket's Seam; a review before each merge with a
15
- mutation proof per locked test file; at most 4 fix rounds with escalation at round 3;
15
+ mutation proof per locked test file; at most 2 fix rounds with escalation at round 2;
16
16
  a correctness pass on another provider for a ticket with a Risk line; one gate
17
17
  record per trusted commit, run by the driver; tickets that touch the same function
18
18
  run in sequence; a gate on each merge commit; one commit per ticket before the
@@ -65,6 +65,8 @@ def load_models(path: str | None) -> tuple[dict[str, list[str]], list[str]]:
65
65
  # The entry of each role whose CLI must be on PATH; entries[0]: an empty list is an error.
66
66
  first = {**{role: entries[0] for role, entries in models.items()}, "correctness": correctness_entry(models)}
67
67
  found = [_entry_error(role, entry, entry == first[role]) for role, entries in models.items() for entry in entries]
68
+ if len(models["implementer"]) < 2:
69
+ found.append("implementer: a second implementer model entry is required for fix round 2")
68
70
  if not first["correctness"]:
69
71
  found.append(f"correctness: no entry of its list ({', '.join(models['correctness'])}) is on another "
70
72
  f"provider than the implementer's first entry {models['implementer'][0]}; the correctness "
@@ -76,7 +78,7 @@ def load_models(path: str | None) -> tuple[dict[str, list[str]], list[str]]:
76
78
 
77
79
  def used_entries(models: dict[str, list[str]]) -> list[str]:
78
80
  """Each entry the driver can start an agent on: the first of each role but the explorer, the correctness entry
79
- and the second implementer entry (fix rounds 3 and 4)."""
81
+ and the second implementer entry (fix round 2)."""
80
82
  entries = [entries[0] for role, entries in models.items() if role not in ("explorer", "correctness")]
81
83
  entries += [correctness_entry(models), *models["implementer"][1:2]]
82
84
  return sorted(set(entries))
@@ -300,12 +300,14 @@ def _rewrite_once(run: Run, tickets: list[Ticket]) -> None:
300
300
 
301
301
  # ---------------------------------------------------------------- the final review and the fix batch
302
302
 
303
- def _minor_findings() -> str:
304
- """One line per minor finding that a ticket review left for the final review, with its findings file."""
303
+ def _carried_findings() -> str:
304
+ """Ticket observations and minor findings for the final review, with their evidence files."""
305
305
  lines = []
306
306
  for path in sorted(OUT.glob("[0-9]*/findings-*.json")):
307
307
  lines += [f"- {path}: {_title(finding)}" for finding in json.loads(path.read_text())
308
308
  if finding["severity"] == "minor"]
309
+ for path in sorted(OUT.glob("[0-9]*/observations-*.json")):
310
+ lines += [f"- {path}: {_title(finding)}" for finding in json.loads(path.read_text())]
309
311
  return "\n".join(dict.fromkeys(lines))
310
312
 
311
313
 
@@ -321,12 +323,15 @@ def _check_review_is_due(run: Run, final: dict, tip: str) -> None:
321
323
 
322
324
 
323
325
  def _record_review(state: dict, tip: str, to_fix: list[dict], evidence: list[str]) -> None:
324
- """The open findings of the first round start the fix batch; those of the second become one question each."""
326
+ """The first review starts the batch; unresolved must-fix items cannot become accept questions."""
325
327
  record, final = state["run"], state["run"]["final"]
326
328
  first_round = final["round"] == 0
327
- final.update(reviewed=tip, round=final["round"] + 1, open=to_fix if first_round else [])
329
+ final.update(reviewed=tip, round=final["round"] + 1,
330
+ open=to_fix if first_round else [finding for finding in to_fix if finding.get("must_fix")])
328
331
  if not first_round:
329
- driver_decisions.stop(record, KIND, "", [_title(finding) for finding in to_fix], evidence)
332
+ other = [finding for finding in to_fix if not finding.get("must_fix")]
333
+ if other:
334
+ driver_decisions.stop(record, KIND, "", [_title(finding) for finding in other], evidence)
330
335
 
331
336
 
332
337
  def _settle_review(run: Run, done: int, tip: str, covered: str, found: list[dict]) -> None:
@@ -344,8 +349,14 @@ def _settle_review(run: Run, done: int, tip: str, covered: str, found: list[dict
344
349
  ledger(f"Final review round {done + 1}: the range {covered} is reviewed, the reviewed tip is {tip[:7]}, and "
345
350
  f"{len(to_fix)} critical or important finding{'s are' if len(to_fix) != 1 else ' is'} open.")
346
351
  if to_fix and done:
347
- ledger(f"End of run: {driver_decisions.decides(KIND, len(to_fix))} in {OUT / 'decisions.json'}: a third "
348
- "review round is never started.")
352
+ questions = len([finding for finding in to_fix if not finding.get("must_fix")])
353
+ if questions:
354
+ ledger(f"End of run: {driver_decisions.decides(KIND, questions)} in {OUT / 'decisions.json'}: a third "
355
+ "review round is never started.")
356
+ required = len(to_fix) - questions
357
+ if required:
358
+ ledger(f"End of run: {required} required must-fix finding{'s remain' if required != 1 else ' remains'} "
359
+ "open after the final fix batch; the run is blocked.")
349
360
 
350
361
 
351
362
  def _review(run: Run, final: dict, tip: str) -> None:
@@ -353,7 +364,8 @@ def _review(run: Run, final: dict, tip: str) -> None:
353
364
  done, folder = final["round"], OUT / FINAL
354
365
  values = {**_prompt_values(run), "start_sha": tip, "range": f"{final['reviewed'] or final['onto']}..{tip}",
355
366
  "gate": str(driver_gate.record_path(folder, tip)), "review_diff": str(REVIEW_DIFF),
356
- "ledger": str(OUT / "ledger.md"), "minors": _minor_findings(), "reviewed": str(final["reviewed"]),
367
+ "ledger": str(OUT / "ledger.md"), "carried": _carried_findings(), "reviewed": str(final["reviewed"]),
368
+ "must_fix_list": "\n".join(f"- {_title(finding)}" for finding in final["must_fix"]),
357
369
  "rulings": "\n".join(driver_decisions.rulings(run.state.read()["run"]["questions"])),
358
370
  "findings": str(folder / f"findings-{done - 1}.json")}
359
371
  # A locked file that differs from the tidied tip is a critical finding. The driver made that tip, and since
@@ -362,7 +374,18 @@ def _review(run: Run, final: dict, tip: str) -> None:
362
374
  with during("the final review"):
363
375
  report = run.read_only(FINAL, ".", run.pr, tip, lambda: run.agent(
364
376
  "final-reviewer", FINAL, ".", values, notes=["final-scoped"] if done else [], fix_round=done))
365
- _settle_review(run, done, tip, values["range"], found + report["findings"])
377
+ if not done:
378
+ carried = final["must_fix"]
379
+ else:
380
+ resolved = set(report.get("resolved_must_fix", []))
381
+ carried = [finding for finding in final["must_fix"] if _title(finding) not in resolved]
382
+ must_by_key = {(finding["file"], finding["title"]): finding for finding in final["must_fix"]}
383
+ reported = [{**finding, "must_fix": True, "ticket": must_by_key[key]["ticket"]} if
384
+ (key := (finding["file"], finding["title"])) in must_by_key else finding
385
+ for finding in found + report["findings"]]
386
+ identity = {(finding["file"], finding["title"]) for finding in reported}
387
+ _settle_review(run, done, tip, values["range"], reported + [finding for finding in carried
388
+ if (finding["file"], finding["title"]) not in identity])
366
389
 
367
390
 
368
391
  def _fix_commit_message(commit: str, report: dict) -> str:
@@ -393,10 +416,12 @@ def _run_fixer(run: Run, tickets: list[Ticket], final: dict, tip: str) -> dict:
393
416
  folder = OUT / FINAL
394
417
  values = {**_prompt_values(run), "start_sha": tip, "findings": str(folder / f"findings-{final['round'] - 1}.json"),
395
418
  "locked": " ".join(_locked_files(run)),
419
+ "must_fix_list": "\n".join(f"- {_title(finding)}" for finding in final["must_fix"]),
396
420
  "findings_list": "\n".join(f"- {finding['severity']}: {_title(finding)}" for finding in final["open"])}
397
421
  try:
398
422
  return run.agent("fixer", FINAL, ".", values, template="final-fixer", fix_round=final["round"],
399
- check={"owners": [ticket.number for ticket in tickets]})
423
+ check={"owners": [ticket.number for ticket in tickets],
424
+ "must_fix": [_title(finding) for finding in final["must_fix"]]})
400
425
  except Blocked as blocked:
401
426
  raise Blocked(f"{blocked}{_undo_rejected_batch(run, tip)}") from None
402
427
  except Halted as halted:
@@ -431,6 +456,9 @@ def _review_until_reviewed(run: Run, tickets: list[Ticket]) -> None:
431
456
  run.gate(FINAL, ".", tip)
432
457
  _review(run, final, tip)
433
458
  elif final["open"]:
459
+ if final["round"] >= ROUNDS:
460
+ raise Blocked("the final review still has unresolved must-fix findings: " +
461
+ "; ".join(_title(finding) for finding in final["open"]))
434
462
  _fix_batch(run, tickets, final, tip)
435
463
  else:
436
464
  return
@@ -19,7 +19,7 @@ import driver_slots
19
19
  from driver_run import OUT, Blocked, Run, Stopped, during, ledger
20
20
  from driver_tickets import Ticket
21
21
 
22
- ROUNDS = 4
22
+ ROUNDS = 2
23
23
 
24
24
 
25
25
  @dataclass
@@ -54,9 +54,9 @@ def tested(entry: dict) -> list[str]:
54
54
 
55
55
 
56
56
  def entry(models: dict[str, list[str]], round: int) -> str:
57
- """The implementer entry of a fix round: the second one from round 3, when the list has one."""
57
+ """The implementer entry of a fix round: the second one for round 2."""
58
58
  entries = models["implementer"]
59
- return entries[1] if round > 2 and len(entries) > 1 else entries[0]
59
+ return entries[1] if round >= 2 else entries[0]
60
60
 
61
61
 
62
62
  def _log_findings(job: Job, findings: list[dict]) -> list[dict]:
@@ -120,6 +120,52 @@ def _run_reviewers(job: Job, cast: list[tuple[str, str]], locked: list[str]) ->
120
120
  return reports
121
121
 
122
122
 
123
+ def _prior_open(job: Job) -> dict[tuple[str, str, str], str | None]:
124
+ """The source, file, title and basis of findings that this re-review may revisit."""
125
+ if not job.previous:
126
+ return {}
127
+ number = job.ticket.number
128
+ previous = json.loads((OUT / number / f"findings-{job.round - 1}.json").read_text()) if job.previous else []
129
+ return {(finding["source"], finding["file"], finding["title"]): finding.get("basis")
130
+ for finding in previous if finding["severity"] in driver_review.OPEN}
131
+
132
+
133
+ def _partition_findings(role: str, report: dict, prior: dict, scoped: bool) -> tuple[list[dict], list[dict]]:
134
+ """On a re-review, only the role's previously open findings stay in ticket scope."""
135
+ active, deferred = [], []
136
+ for raw in report["findings"]:
137
+ finding = {**raw, "source": role}
138
+ key = (role, finding["file"], finding["title"])
139
+ if scoped and key not in prior:
140
+ deferred.append(finding)
141
+ continue
142
+ if "basis" not in finding and prior.get(key):
143
+ finding["basis"] = prior[key]
144
+ active.append(finding)
145
+ return active, deferred
146
+
147
+
148
+ def _reviewer_results(job: Job, cast: list[tuple[str, str]], reports: list[dict]) -> tuple[list[dict], list[dict]]:
149
+ """Collect ticket findings, deferred observations, and mutation proofs from both reviewer roles."""
150
+ prior, found, observations = _prior_open(job), [], []
151
+ for (role, _), report in zip(cast, reports):
152
+ active, deferred = _partition_findings(role, report, prior, bool(job.previous))
153
+ found += active + [{**finding, "source": role, "basis": finding.get("basis", "regression")}
154
+ for finding in report.get("regressions", [])]
155
+ observations += deferred + [{**finding, "source": role} for finding in report.get("observations", [])]
156
+ job.proofs |= {(proof["file"], proof["line"]) for proof in report.get("mutations", [])}
157
+ return found, observations
158
+
159
+
160
+ def _store_observations(job: Job, observations: list[dict]) -> None:
161
+ """Keep deferred evidence for the final reviewer without spending a ticket fix round."""
162
+ if observations:
163
+ (OUT / job.ticket.number / f"observations-{job.round}.json").write_text(json.dumps(observations, indent=1) + "\n")
164
+ for observation in observations:
165
+ ledger(f"Ticket {job.ticket.number}: deferred {observation['severity']} observation from {observation['source']} "
166
+ f"at {observation['file']}:{observation['line']}: {observation['title']}.")
167
+
168
+
123
169
  def _review(job: Job) -> list[dict]:
124
170
  """Review `job.tip`. Returns the findings of the driver and of each reviewer."""
125
171
  run, number = job.run, job.ticket.number
@@ -133,9 +179,9 @@ def _review(job: Job) -> list[dict]:
133
179
  lambda: _run_reviewers(job, cast, tested(state)))
134
180
  if state["rejected"]:
135
181
  run.state.ticket(number, rejected={}) # the rejection is answered: no later review repeats it
136
- for (role, _), report in zip(cast, reports):
137
- found += _log_findings(job, [{**finding, "source": role} for finding in report["findings"]])
138
- job.proofs |= {(proof["file"], proof["line"]) for proof in report.get("mutations", [])}
182
+ reviewed, observations = _reviewer_results(job, cast, reports)
183
+ found += _log_findings(job, reviewed)
184
+ _store_observations(job, observations)
139
185
  (OUT / number / f"findings-{job.round}.json").write_text(json.dumps(found, indent=1) + "\n")
140
186
  return found
141
187
 
@@ -205,10 +251,8 @@ def _fix(job: Job, findings: list[dict]) -> None:
205
251
  job.round += 1
206
252
  on = entry(run.models, job.round)
207
253
  run.state.ticket(number, phase="fix", round=job.round)
208
- if job.round == 3 and on != run.models["implementer"][0]:
209
- ledger(f"Ticket {number} round 3: escalated to {on}.")
210
- elif job.round == 3:
211
- ledger(f"Ticket {number} round 3: the implementer has no next entry, so the round stays on {on}.")
254
+ if job.round == 2:
255
+ ledger(f"Ticket {number} round 2: escalated to {on}.")
212
256
  with during(f"fix round {job.round}"):
213
257
  run.agent("fixer", number, job.slot, job.pointers(job.round - 1), entry=on, fix_round=job.round,
214
258
  check={"fix": [finding["title"] for finding in findings], "red": job.red})
@@ -238,6 +282,39 @@ def _unaccepted(job: Job, state: dict, to_correct: list[dict]) -> list[dict]:
238
282
  return [finding for finding in to_correct if finding["source"] == "driver"]
239
283
 
240
284
 
285
+ def _save_must_fix(state: dict, number: str, findings: list[dict]) -> None:
286
+ """Record each carried finding once, even when a ticket resumes at its cap."""
287
+ saved = state["run"]["final"]["must_fix"]
288
+ existing = {(item["ticket"], item["file"], item["title"]) for item in saved}
289
+ for finding in findings:
290
+ key = (number, finding["file"], finding["title"])
291
+ if key not in existing:
292
+ saved.append({**finding, "ticket": number, "must_fix": True})
293
+ existing.add(key)
294
+
295
+
296
+ def _settled_at_landing(finding: dict) -> bool:
297
+ """The landing has its own restore/adopt question for a merged ticket's locked file."""
298
+ return (finding["source"] == "driver" and
299
+ finding["title"].startswith("the ticket changed the locked file of a merged ticket:"))
300
+
301
+
302
+ def _at_cap(job: Job, findings: list[dict]) -> bool:
303
+ """Block unmet criteria; carry other open findings to the required final fix batch."""
304
+ blocking = [finding for finding in findings if finding.get("basis") != "regression"]
305
+ if blocking:
306
+ titles = [f"{finding['title']} ({finding['file']}:{finding['line']})" for finding in blocking]
307
+ raise Blocked(f"the review: after round {ROUNDS} these findings are open: {'; '.join(titles)}")
308
+ # A changed locked file of a merged ticket is settled by the landing's restore/adopt ruling.
309
+ # The final fixer cannot edit that file while it remains protected.
310
+ carry = [finding for finding in findings if not _settled_at_landing(finding)]
311
+ if carry:
312
+ job.run.state.update(lambda state: _save_must_fix(state, job.ticket.number, carry))
313
+ ledger(f"Ticket {job.ticket.number}: the green gate and met criteria allow merge after round {ROUNDS}; "
314
+ f"{len(carry)} finding{'s' if len(carry) != 1 else ''} go to the final must-fix list.")
315
+ return True
316
+
317
+
241
318
  def _act_on(job: Job, found: list[dict]) -> bool:
242
319
  """Do what the findings of a review ask for: a correction, a fix round, or a stop. True: none is open."""
243
320
  state = job.run.state.read()
@@ -245,7 +322,7 @@ def _act_on(job: Job, found: list[dict]) -> bool:
245
322
  driver_merge.protected(state["tickets"], job.ticket.number))
246
323
  to_correct = _unaccepted(job, state, to_correct)
247
324
  if job.round == ROUNDS:
248
- # No correction after round 4: no fix round could make its new locked tests green, so `accept` could not merge.
325
+ # No correction at the cap: no fix round could make its new locked tests green.
249
326
  to_correct, to_fix = [], [finding for finding in found if finding in to_correct + to_fix]
250
327
  # A changed locked file is fixed first: a correction on top of it would make the changed file the reference.
251
328
  locked_file_changed = any(finding["source"] == "driver" for finding in to_fix)
@@ -256,17 +333,14 @@ def _act_on(job: Job, found: list[dict]) -> bool:
256
333
  if not to_fix:
257
334
  return True
258
335
  if job.round == ROUNDS:
259
- titles = [f"{finding['title']} ({finding['file']}:{finding['line']})" for finding in to_fix]
260
- evidence = OUT / job.ticket.number / f"findings-{ROUNDS}.json"
261
- job.run.ask(job.ticket.number, "finding", titles, str(evidence))
262
- raise Blocked(f"the review: after round {ROUNDS} these findings are open: {'; '.join(titles)}")
336
+ return _at_cap(job, to_fix)
263
337
  _fix(job, to_fix)
264
338
  return False
265
339
 
266
340
 
267
341
  def _gate(job: Job) -> list[dict]:
268
- """Gate the tip. A red gate on the implementer's commit or a fixer's commit before round 4 is a finding for the
269
- next round; a red gate after round 4 or on a test-writer correction blocks. Returns the findings: the red gate,
342
+ """Gate the tip. A red gate before round 2 is a finding for the next round;
343
+ a red gate after round 2 or on a test-writer correction blocks. Returns the findings: the red gate,
270
344
  or none."""
271
345
  run, number = job.run, job.ticket.number
272
346
  job.red = False
@@ -58,6 +58,14 @@ def _owner_errors(report: dict, context: dict) -> list[str]:
58
58
  for commit in report["commits"] if commit["ticket"] not in context["owners"]]
59
59
 
60
60
 
61
+ def _must_fix_errors(report: dict, context: dict) -> list[str]:
62
+ """A final fixer must account for every finding carried from a capped ticket."""
63
+ if report["status"] not in ("DONE", "DONE_WITH_CONCERNS"):
64
+ return []
65
+ return [f"addressed_must_fix: missing {title}" for title in context.get("must_fix", [])
66
+ if title not in report.get("addressed_must_fix", [])]
67
+
68
+
61
69
  def _present(repo: str, commit: str, paths: list[str]) -> list[str]:
62
70
  """The `paths` that are files at `commit`."""
63
71
  return _git(repo, "ls-tree", "-r", "--name-only", "-z", commit, "--", *paths, end="\0") if paths else []
@@ -182,7 +190,7 @@ def validate(role: str, path: str, context: dict) -> list[str]:
182
190
  report = {name: value for name, value in report.items() if name in rules["properties"]}
183
191
  if "locked" in report:
184
192
  report["locked"] = locked_files(report["locked"])
185
- return (_commit_errors(report, context) + _owner_errors(report, context)
193
+ return (_commit_errors(report, context) + _owner_errors(report, context) + _must_fix_errors(report, context)
186
194
  + _unchanged_errors(role, report, context) + _correction_errors(report, context)
187
195
  + _merged_errors(report, context) + _proof_errors(report, context) + _locked_errors(report, context)
188
196
  + _fixture_errors(report))
@@ -53,6 +53,7 @@ def merged_changes(paths: list[str]) -> list[dict]:
53
53
  """One critical `fixture` finding per locked file of a merged ticket that the ticket changed. A fixture finding
54
54
  goes to a test-writer correction: the driver puts the file back before it and gates that commit."""
55
55
  return [{"severity": "critical", "file": path, "line": 1, "kind": "fixture", "source": "driver",
56
+ "basis": "regression",
56
57
  "title": f"the ticket changed the locked file of a merged ticket: {path}",
57
58
  "evidence": f"git diff <merge base with the PR branch> -- {path}"} for path in paths]
58
59
 
@@ -29,7 +29,7 @@ def _ticket() -> dict:
29
29
  def _final() -> dict:
30
30
  """The end-of-run record before it starts. Every key is here, so a reader uses [] and a wrong name fails."""
31
31
  return {"skipped": "", "recovery": None, "tidied": None, "onto": None, "base": None, "commits": {},
32
- "reviewed": None, "round": 0, "open": [], "batch": None, "green_gates": [], "pushed": None, "body": None,
32
+ "reviewed": None, "round": 0, "open": [], "must_fix": [], "batch": None, "green_gates": [], "pushed": None, "body": None,
33
33
  "pr": None}
34
34
 
35
35
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "explorer": ["claude-sonnet-5-5@medium"],
3
3
  "test-writer": ["claude-sonnet-5-5@medium", "openai/gpt-6.1-sol@medium"],
4
- "implementer": ["claude-sonnet-5-5@medium", "openai/gpt-6.1-sol@medium"],
4
+ "implementer": ["claude-sonnet-5-5@medium", "claude-opus-5-5@medium"],
5
5
  "reviewer": ["openai/gpt-6-astra@medium", "claude-opus-5-5@medium"],
6
6
  "correctness": ["openai/gpt-6-astra@medium", "claude-opus-5-5@medium"],
7
7
  "fixer": ["claude-opus-5-5@medium"],
@@ -15,7 +15,7 @@ The output section of the checks does not apply here: your findings go into the
15
15
 
16
16
  Read file content from git at {start_sha} (`git diff`, `git show {start_sha}:<path>`), never from the working tree, and run no tests: another agent makes temporary edits in this worktree while you work.
17
17
  The one exception is the input of the driver, which git can lack because `.agent/` is ignored: read the spec, the ticket and the findings file from the working tree. The other agent does not edit them.
18
- Report only a defect that you can show with a concrete sequence of events. `mutations` is optional for this pass.
18
+ Report only a defect that you can show with a concrete sequence of events. Put an unmet ticket criterion or regression of merged-ticket behavior in `findings`; put every other defect in `observations` for final review. Set `basis` on each finding to `criterion` or `regression` accordingly. `mutations` is optional for this pass.
19
19
  Give each finding a severity (critical, important or minor), the file and line, a title, the evidence, and a kind: `fixture` when a locked test encodes a stale path, format or setup detail; `test` when a test is weak or missing, as a locked test that stays green when you break the line it protects; `code` for anything else. The test-writer corrects each `fixture` finding and each critical or important `test` finding on a locked file, and the fixer gets the rest.
20
20
  Do not commit and do not dispatch subagents. Leave the tree as you found it.
21
21
 
@@ -29,7 +29,9 @@ Write one JSON report at {report}. When your sandbox is read-only, give the JSON
29
29
  "status": {"enum": ["DONE", "DONE_WITH_CONCERNS", "NEEDS_CONTEXT", "BLOCKED"]},
30
30
  "files": {"type": "array", "items": {"type": "string"}},
31
31
  "concerns": {"type": "array", "items": {"type": "string"}},
32
- "findings": {"type": "array", "items": {"type": "object", "required": ["severity", "file", "line", "title", "evidence", "kind"], "properties": {"severity": {"enum": ["critical", "important", "minor"]}, "file": {"type": "string"}, "line": {"type": "integer"}, "title": {"type": "string", "minLength": 1}, "evidence": {"type": "string", "minLength": 1}, "kind": {"enum": ["code", "fixture", "test"]}}}},
32
+ "findings": {"type": "array", "items": {"type": "object", "required": ["severity", "file", "line", "title", "evidence", "kind"], "properties": {"severity": {"enum": ["critical", "important", "minor"]}, "file": {"type": "string"}, "line": {"type": "integer"}, "title": {"type": "string", "minLength": 1}, "evidence": {"type": "string", "minLength": 1}, "kind": {"enum": ["code", "fixture", "test"]}, "basis": {"enum": ["criterion", "regression"]}}}},
33
+ "observations": {"type": "array", "items": {"type": "object", "required": ["severity", "file", "line", "title", "evidence", "kind"], "properties": {"severity": {"enum": ["critical", "important", "minor"]}, "file": {"type": "string"}, "line": {"type": "integer"}, "title": {"type": "string", "minLength": 1}, "evidence": {"type": "string", "minLength": 1}, "kind": {"enum": ["code", "fixture", "test"]}}}},
34
+ "regressions": {"description": "After a fix: new regressions introduced by that fix. Set basis to criterion when a ticket criterion fails, or regression when merged-ticket behavior fails.", "type": "array", "items": {"type": "object", "required": ["severity", "file", "line", "title", "evidence", "kind"], "properties": {"severity": {"enum": ["critical", "important", "minor"]}, "file": {"type": "string"}, "line": {"type": "integer"}, "title": {"type": "string", "minLength": 1}, "evidence": {"type": "string", "minLength": 1}, "kind": {"enum": ["code", "fixture", "test"]}, "basis": {"enum": ["criterion", "regression"]}}}},
33
35
  "mutations": {"description": "Optional for this pass.", "type": "array", "items": {"type": "object", "required": ["test", "file", "line", "red"], "properties": {"test": {"type": "string", "minLength": 1}, "file": {"type": "string", "minLength": 1}, "line": {"type": "integer"}, "red": {"type": "string", "minLength": 1}}}}
34
36
  }
35
37
  }
@@ -7,8 +7,10 @@ Locked files: {locked}
7
7
  Findings file of the final review: {findings}
8
8
  Findings to fix:
9
9
  {findings_list}
10
+ Must-fix findings carried from ticket reviews:
11
+ {must_fix_list}
10
12
 
11
- Fix each finding in the list as one batch, in one commit or in several. Leave the minor findings of the findings file.
13
+ Fix each finding in the list as one batch, in one commit or in several. List every must-fix item you addressed in `addressed_must_fix` exactly as shown in the must-fix list, including its file and line; an omitted item rejects the batch. Leave the minor findings of the findings file.
12
14
  Each commit belongs to one ticket: the ticket whose criterion or code the commit changes. A fix for two tickets is two commits.
13
15
  Never edit a locked file: each one stays as it is at {start_sha}, and a locked file that differs is a critical finding of the next review.
14
16
  Use targeted tests while you work.
@@ -27,6 +29,7 @@ Write one JSON report at {report} that matches this schema:
27
29
  "commits": {"type": "array", "items": {"type": "object", "required": ["sha", "ticket"], "properties": {"sha": {"type": "string", "pattern": "^[0-9a-f]{7,40}$"}, "ticket": {"type": "string", "pattern": "^[0-9]+$"}}}},
28
30
  "files": {"type": "array", "items": {"type": "string"}},
29
31
  "concerns": {"type": "array", "items": {"type": "string"}},
32
+ "addressed_must_fix": {"type": "array", "items": {"type": "string"}},
30
33
  "green": {"type": "array", "items": {"type": "string"}}
31
34
  },
32
35
  "if": {"properties": {"status": {"enum": ["DONE", "DONE_WITH_CONCERNS"]}}},
@@ -7,13 +7,15 @@ Range: {range}
7
7
  Gate record of the driver for {start_sha}: {gate}
8
8
  Review method: {review_diff}
9
9
  Ledger of the run, one sentence per event: {ledger}
10
- Minor findings that the ticket reviews left for this review, each with its findings file:
11
- {minors}
10
+ Deferred observations and minor findings from ticket reviews, each with its evidence file:
11
+ {carried}
12
+ Must-fix findings carried from tickets that merged at the cap:
13
+ {must_fix_list}
12
14
  Rulings of the operator:
13
15
  {rulings}
14
16
 
15
17
  Review the range with the method of the review-diff skill in the file above, with the spec as its spec path. The gate of that method is done: check that the gate record names {start_sha}, a clean status and exit 0, and run the gate yourself, in a copy as below, only when it does not.
16
- Decide for each minor finding in the list whether it is still true at {start_sha}; report each one that is, with the severity it has now. A ruling is settled: do not report what a ruling accepted.
18
+ Decide for each carried observation whether it is still true at {start_sha}; report each one that is, with the severity it has now. Every must-fix finding stays open until the fix batch addresses it and the scoped review verifies it. A ruling does not settle a must-fix finding. In the scoped review, list each item you verified closed in `resolved_must_fix` exactly as shown in the must-fix list, including its file and line; report each unresolved one in `findings`.
17
19
  Give each finding a severity (critical, important or minor), the file and line, a title, the evidence, and a kind: `code`, `test`, or `fixture`.
18
20
  Do not commit. Leave the branch and the tree as you found them.
19
21
 
@@ -27,7 +29,8 @@ Write one JSON report at {report} that matches this schema:
27
29
  "status": {"enum": ["DONE", "DONE_WITH_CONCERNS", "NEEDS_CONTEXT", "BLOCKED"]},
28
30
  "files": {"type": "array", "items": {"type": "string"}},
29
31
  "concerns": {"type": "array", "items": {"type": "string"}},
30
- "findings": {"type": "array", "items": {"type": "object", "required": ["severity", "file", "line", "title", "evidence", "kind"], "properties": {"severity": {"enum": ["critical", "important", "minor"]}, "file": {"type": "string"}, "line": {"type": "integer"}, "title": {"type": "string", "minLength": 1}, "evidence": {"type": "string", "minLength": 1}, "kind": {"enum": ["code", "fixture", "test"]}}}}
32
+ "findings": {"type": "array", "items": {"type": "object", "required": ["severity", "file", "line", "title", "evidence", "kind"], "properties": {"severity": {"enum": ["critical", "important", "minor"]}, "file": {"type": "string"}, "line": {"type": "integer"}, "title": {"type": "string", "minLength": 1}, "evidence": {"type": "string", "minLength": 1}, "kind": {"enum": ["code", "fixture", "test"]}}}},
33
+ "resolved_must_fix": {"type": "array", "items": {"type": "string"}}
31
34
  }
32
35
  }
33
36
  ```
@@ -1 +1 @@
1
- This is the scoped review after the fix batch: the range holds only the `fix(NN)` commits, and the commits up to {reviewed} have their review. Check that each critical or important finding in {findings} is fixed and that the fix commits break nothing else.
1
+ This is the scoped review after the fix batch: the range holds only the `fix(NN)` commits, and the commits up to {reviewed} have their review. Check that each critical or important finding in {findings} is fixed, including every must-fix finding, and that the fix commits break nothing else. Put each verified must-fix title in `resolved_must_fix`.
@@ -1,3 +1,3 @@
1
1
 
2
- This is the re-review after fix round {round}. The fix is {from_sha}..{start_sha}: review only the lines it changed, and check that it resolves each critical or important finding in {findings}.
2
+ This is the re-review after fix round {round}. The fix is {from_sha}..{start_sha}: check only whether your own critical or important findings in {findings} are closed. Repeat an open finding in `findings`. Put a new regression introduced by this fix in `regressions`, with evidence tying it to the fix. Set its `basis` to `criterion` when a ticket criterion fails or `regression` when merged-ticket behavior fails. Put every other newly noticed issue in `observations`.
3
3
  Repeat the mutation proof for these production lines only, numbered as they are at {start_sha} (an empty list means that no proof is due): {proofs}