一键导入
reviewer-distillation-judge
Spawn an isolated judge subagent to evaluate reviewer predictions against real human reviews
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Spawn an isolated judge subagent to evaluate reviewer predictions against real human reviews
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Make Codex CLI behave more like Claude Code for Kookr by preserving the known fork, branch, build, deploy, daily upstream sync, and live-verification workflow for Claude-compatible skills, agents, settings, hooks, and related UX.
Kookr-internal extension to rfc-iterative-review that captures append-only critic traces for later meta-analysis of RFC reviewer subagents.
Analyze an open question by casting 3-5 deliberately conflicting expert roles, running them in parallel and blind to each other, sharpening them in a debate round, attacking their consensus with a devil's advocate, then synthesizing a verdict that preserves disagreement instead of averaging it. Use for decisions, strategy, idea generation, hypothesis triage, experiment post-mortems, or any question where a single lens would return "it depends".
Iterative RFC drafting workflow — draft in worktree, run parallel critic subagents, incorporate feedback over N rounds, present to user before any action
How to create, structure, and launch Kookr playbook tasks — reusable agent task templates with dynamic sources and project identity
Build a Ralph-like sequential Kookr task chain where each task completes one independent unit, records durable state, and spawns the next task with the same continuation contract. Use for issue batches, queue drains, staged migrations, or other long runs that should proceed one task at a time without relying on conversation memory.
| name | reviewer-distillation-judge |
| description | Spawn an isolated judge subagent to evaluate reviewer predictions against real human reviews |
| keywords | ["reviewer","distillation","judge","evaluate","score"] |
| related | ["reviewer-distillation-predict","reviewer-distillation-mutate"] |
Called by the orchestrator for each PR after PREDICT and after real reviews have been fetched. Spawns a fresh agent process that compares predictions against ground truth.
You are a review evaluation judge. Compare an AI reviewer's predictions against
real human reviews.
Read these 3 files:
1. {stateDir}/context/pr-{N}.md
2. {stateDir}/predictions/pr-{N}.md
3. {stateDir}/reviews/pr-{N}.md
### Step 1: Classify each human review comment
For each human comment, classify as:
- **addressable**: References an issue visible in the current diff
- **resolved**: References an issue that appears to have been fixed
(the diff doesn't show the problem described)
- **contextual**: A question, praise, process comment, or discussion
— not an actionable code issue
### Step 2: Match agent findings to addressable human comments
For each addressable human comment, find the agent finding that addresses
the same concern (if any).
Rules:
- One-to-one matching: each finding and comment in at most one pair
- If two agent findings compete for one comment, pick the closer semantic match
- If no agent finding addresses the concern, mark the comment as "missed"
### Step 3: Assess unmatched agent findings
For each agent finding not matched to a human comment:
- **justified**: Identifies a concrete, verifiable issue visible in the diff.
You can point to exact lines that demonstrate the problem.
- **plausible**: Describes a reasonable concern but can't be definitively
verified from the diff alone.
- **wrong**: Factually incorrect, references wrong lines/code, or describes
a non-existent problem.
When in doubt between justified and plausible, choose plausible.
When in doubt between plausible and wrong, choose plausible.
### Step 4: Ground Evidence Citations
For every specific human review comment or agent finding that affects your
classification, match, or rating, cite the exact source lines you used.
Use this machine-verifiable Markdown shape:
```markdown
Evidence: **reviews/pr-{N}.md#L12-L14**
> exact quoted text copied from that file
Allowed citation paths are only the three input files under {stateDir}:
context/pr-{N}.md, predictions/pr-{N}.md, and reviews/pr-{N}.md.
Use repo-relative paths from {stateDir}, not absolute paths. Before writing
the evaluation, inspect files with line numbers (for example, nl -ba) so the
#L anchors are accurate. The blockquote must be copied exactly enough for the
deterministic citation verifier to find it after whitespace normalization.
Write your full evaluation with reasoning, then end with EXACTLY this machine-readable JSON block (fill in real numbers):
{
"human_comments": { "addressable": 0, "resolved": 0, "contextual": 0 },
"matches": [
{ "agent_finding": 1, "human_comment": 1, "category": "correctness" }
],
"unmatched_agent": [
{ "finding": 2, "rating": "plausible", "category": "style" }
],
"unmatched_human": [
{ "comment": 3, "category": "testing" }
]
}
Write your evaluation to: {stateDir}/scores/pr-{N}-judge.md
After writing the evaluation, run the citation gate before finishing:
if [ "${SKIP_CITATION_GATE:-}" = "true" ]; then
echo "SKIP_CITATION_GATE=true; citation gate skipped for pr-{N}."
else
GATE_OUTPUT=$(node "${CLAUDE_SKILL_DIR}/scripts/verify-citations.mjs" \
--input "{stateDir}/scores/pr-{N}-judge.md" \
--source-root "{stateDir}" \
--format markdown \
--allow-prefix "context/pr-{N}.md" \
--allow-prefix "predictions/pr-{N}.md" \
--allow-prefix "reviews/pr-{N}.md" 2>&1)
GATE_STATUS=$?
printf '%s\n' "$GATE_OUTPUT"
if [ "$GATE_STATUS" -ne 0 ]; then
mkdir -p "{stateDir}/scores/rejected"
mv "{stateDir}/scores/pr-{N}-judge.md" \
"{stateDir}/scores/rejected/pr-{N}-judge-unverifiable.md"
echo "Citation gate rejected pr-{N}; moved output to scores/rejected so it is excluded from ranking."
exit 1
fi
fi
Non-zero verifier exit means the judge output is unverifiable. Print the JSON verifier result in-session, move the output out of the normal score path, and exit non-zero so the orchestrator cannot rank it silently.
Do NOT access GitHub or any external resources. Work only with provided files.
## Score Computation (done by orchestrator, NOT the judge)
The orchestrator parses the JSON block and computes:
```python
matched = len(matches)
justified = count(unmatched_agent where rating == "justified")
plausible = count(unmatched_agent where rating == "plausible")
wrong = count(unmatched_agent where rating == "wrong")
addressable = human_comments["addressable"]
total_findings = matched + justified + plausible + wrong
precision = matched / max(1, matched + plausible + wrong)
recall = matched / max(1, addressable)
f1 = 2 * precision * recall / max(0.001, precision + recall)
value_rate = (matched + justified) / max(1, total_findings)
Save to {stateDir}/scores/pr-{N}.json.