code wiki / _hdl_build / nx_peer_review.nx
nx_peer_review.nx source
↩ module page · 44 lines · 2873 B
1// nx_peer_review.nx -- who watches the watchers. The evaluators must themselves be checked, or the
2// honest-S-class verdict is just one organ's opinion (operator). Three mechanisms:
3// DUAL GRADE -- the Examiner AND Claude grade the same thing; AGREE = trustworthy, DIVERGE = a
4// tie-break flag (Claude or the operator breaks it). Divergences map the Examiner's
5// growth: a divergence usually means the Examiner LACKED a SOTA baseline (the
6// RESEARCHER's job to supply) or the EVIDENCE/citations (the LIBRARIAN's job) -- so
7// the Examiner is built up IN CONJUNCTION with the Researcher + Librarian.
8// MUTUAL JUDGE -- the CRITIC judges the Examiner's grading (is it triangulated + red-teamed +
9// counter-free = sound?), and the Examiner grades the Critic (does it clear the
10// teammate bar?). Checks & balances on the judges themselves.
11// TIE-BREAK -- when two graders disagree, a human/Critic verdict resolves it; agreement stands.
12// license_tier: ORIGINAL Refs: separation of powers; peer review.
13
14import "nx_sclass_grader.nx" // SG_* tiers
15import "nx_critic.nx" // crit_status2 -- judge the Examiner's grading soundness
16import "nx_team_scorecard.nx" // tsc_passes -- grade the Critic
17
18const PR_AGREE: i64 = 0
19const PR_DIVERGE: i64 = 1
20// divergence causes = the Examiner's growth needs, tied to other organs
21const PR_OK: i64 = 0
22const PR_NEED_SOTA: i64 = 1 // RESEARCHER must supply the SOTA baseline
23const PR_NEED_EVIDENCE: i64 = 2 // LIBRARIAN must supply the evidence/citations
24
25func pr_agreement(grade_a: i64, grade_b: i64) -> i64 { if grade_a == grade_b { return PR_AGREE } return PR_DIVERGE }
26
27// resolve two graders: their agreed grade, or the tie-break verdict when they diverge.
28func pr_resolve(grade_a: i64, grade_b: i64, tiebreak: i64) -> i64 { if grade_a == grade_b { return grade_a } return tiebreak }
29
30// when graders diverge, name the missing input (the Examiner's growth, built with Researcher/Librarian).
31func pr_divergence_cause(has_sota_baseline: i64, has_evidence: i64) -> i64 {
32 if has_sota_baseline == 0 { return PR_NEED_SOTA }
33 if has_evidence == 0 { return PR_NEED_EVIDENCE }
34 return PR_OK
35}
36
37// the CRITIC judges the EXAMINER: is the Examiner's grading process SOUND (reproduced + red-teamed +
38// no surviving counter)? returns the Critic's verdict on the grader.
39func pr_critic_judges_examiner(grading_reproductions: i64, grading_counter_strength: i64, grading_redteamed: i64) -> i64 {
40 return crit_status2(grading_reproductions, grading_counter_strength, grading_redteamed)
41}
42
43// the EXAMINER grades the CRITIC: does the Critic clear the teammate bar?
44func pr_examiner_grades_critic(critic_score: i64) -> i64 { return tsc_passes(critic_score, TSC_BENCHMARK) }