Skip to content

MongLong0214/frontier-simplify / skills/frontier-simplify-review

frontier-simplify-review

Unverified

Review a change for concrete defects, check them with a refuter and a reproducer, then check repairs and their regressions against the preserved review. Use for substantial PR reviews or repeated review rounds. Stops automatic review after at most three attempts per PR and names the calling agent's next action; does not guarantee safe merge convergence.

scripts/lib/extract.py

View on GitHub
#!/usr/bin/env python3
"""Pull the reviewer's final artifact out of a codex/claude event stream.

Only the LAST agent message counts. An earlier message that happens to contain a
heading is a draft, and a draft that gets scored is a stored artifact approving
itself in miniature.

  extract.py EVENTS.jsonl "# Round 1 review inventory"   -> the artifact on stdout
"""
import json, sys

marker = sys.argv[2] if len(sys.argv) > 2 else "# Round 1 review inventory"
texts = []
for line in open(sys.argv[1], encoding="utf-8", errors="replace"):
    line = line.strip()
    if not line:
        continue
    try:
        o = json.loads(line)
    except ValueError:
        continue
    item = o.get("item") or {}
    # codex: {"type":"item.completed","item":{"type":"agent_message","text":...}}
    if o.get("type") == "item.completed" and item.get("type") == "agent_message":
        texts.append(item.get("text", ""))
    # claude stream-json: {"type":"assistant","message":{"content":[{"type":"text",...}]}}
    if o.get("type") == "assistant":
        message = [c.get("text", "") for c in (o.get("message") or {}).get("content", [])
                   if c.get("type") == "text"]
        if message:
            texts.append("\n".join(message))
    if o.get("type") == "result" and isinstance(o.get("result"), str):
        texts.append(o["result"])

# New reviews preserve the final message verbatim, including its Markdown and limitations.
# Marker extraction remains only to verify the exact bytes of historical receipts.
if marker == "--final":
    if not texts or not texts[-1].strip():
        sys.exit("extract: no nonempty final reviewer message")
    sys.stdout.write(texts[-1])
    sys.exit(0)

# A reviewer that emits the inventory and then appends a correction has amended its own artifact.
# Taking the earlier message would seal something its author has already revised -- worse than
# refusing, because the seal would bind a version the reviewer withdrew. So the artifact must be the
# final message, and this names which of the two happened instead of leaving the caller an empty
# file and a shape error listing every missing section.
if texts and marker not in texts[-1] and any(marker in t for t in texts):
    print("extract: the artifact was emitted and then amended by a later message. The protocol asks "
          "for it once, complete, as the final message; nothing was extracted, because sealing the "
          "earlier one would bind a version its author has revised.", file=sys.stderr)
    sys.exit(2)

for t in texts[-1:]:
    i = t.find(marker)
    if i >= 0:
        # A fenced answer is still the answer; strip a trailing fence if the model wrapped it.
        body = t[i:]
        if body.rstrip().endswith("```"):
            body = body.rstrip()[: body.rstrip().rfind("```")]
        sys.stdout.write(body)
        sys.exit(0)
sys.exit(1)
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 470kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall