18 lines
1.6 KiB
Python
18 lines
1.6 KiB
Python
"""Build candidate 4's merged reviewer (stability + product-owner) from the exact brief texts candidate 1 used in wave3-reviewer.md, and its cases (candidate 1's cases without the prose round)."""
|
|
import json, re
|
|
W = open("wave3-reviewer.md").read()
|
|
b1 = W[W.index("# Brief 1:"):W.index("# Brief 2:")].rstrip()
|
|
b2 = W[W.index("# Brief 2:"):W.index("# Brief 3:")].rstrip()
|
|
HEAD = """You are two larv-review reviewers in one: the stability reviewer and the product-owner reviewer. You run once, in place of both, on one change. Carry out each brief below in full, as its own reviewer would, and read the code once for both. Each brief's bar for what to report applies to its own findings.
|
|
|
|
Write one report, with one heading per brief: `## Stability` and `## Product-owner`, each opening with that brief's verdict and holding its findings. Under each, give every finding its severity as the brief says. A finding that belongs to both briefs goes under the first of them, once. Where a brief says you have no shell, ignore that: you have one.
|
|
|
|
"""
|
|
pair = HEAD + b1 + "\n\n" + b2 + "\n"
|
|
json.dump({"pair-reviewer": {"description": "Stability and product-owner review in one.", "prompt": pair, "tools": ["Bash","Read","Grep","Glob","Write"]}}, open("agents-pair.json","w"), indent=1)
|
|
open("pair-reviewer.md","w").write(pair)
|
|
cases = json.load(open("cases-wave3.json"))
|
|
# The stability round is first in every case, so the clone and the report cutoff match candidate 1's.
|
|
json.dump([{"id": c["id"], "metas": c["metas"][:2], "n": c["n"][:2]} for c in cases], open("cases-pair.json","w"), indent=1)
|
|
print(len(pair), sum(sum(c["n"][:2]) for c in cases))
|