{
  "schema": "cain42.e165.preregistration.v1",
  "evolution": "E165",
  "title": "The self-improver breakthrough: source-level research improvement, semantic generalization and capability retention",
  "status": "AGI: NOT ESTABLISHED · RSI: EXPERIMENTAL",
  "frozen_before_sealed_evaluation": true,
  "central_question": "Can CAIN-42 modify its own research machinery, produce a better researcher, and demonstrate that the improvement generalizes under independent evaluation?",
  "design": {
    "domains": {"REPAIR": "choose the edit that repairs a program (software engineering)", "MATH": "choose the rule that explains a hidden binary function (mathematics)", "CAUSAL": "choose the DAG that best explains a linear-Gaussian SEM (causal reasoning)"},
    "representations": {"original": "the canonical view", "paraphrase": "candidate order and family names changed; same hidden task", "permuted": "candidate and feature order changed; same hidden task", "structure": "a different generator/scale (new task structure)"},
    "seeds": 5,
    "dev_per_domain": 2,
    "sealed_per_domain": 2,
    "budget": 120,
    "mde": 0.02,
    "arms": ["P0", "P1", "P_rand", "P_mut", "P_search", "G2"],
    "P1_rule": "diagnosis-guided source patch: run P0 on dev, diagnose coverage/regret/family-gap, evaluate the diagnosis-consistent source patches, accept the best only if it beats P0 by more than 0.01; otherwise P1 = P0",
    "controls": {"P_rand": "random source patch, 6 candidates, same compute", "P_mut": "a syntactic source mutation of P0 (not diagnosis-guided)", "P_search": "P0 with 2x budget, no source change", "G2": "second-generation source patch from P1's diagnosis"},
    "source_level": "a candidate is a full replacement of allocate/select in a Python module, loaded through the E158 AST guard; comments, formatting and configuration-only changes are rejected"
  },
  "hypotheses": {
    "H1": {"claim": "P1 improves under meaning-preserving paraphrase", "primary": "paired P1-P0 quality on paraphrase, averaged over seeds", "mde": 0.02, "test": "one-sided paired t + Holm; also report the original->paraphrase drop for P1 and P0"},
    "H2": {"claim": "P1 improves on structurally new tasks", "primary": "paired P1-P0 quality on the structure representation", "mde": 0.02, "test": "one-sided paired t + Holm"},
    "H3": {"claim": "the improvement transfers across at least three domains", "primary": "count of domains with positive P1-P0 and p < 0.05/3", "test": "three per-domain tests"},
    "H4": {"claim": "P1 generates better research than P0 at equal compute", "primary": "paired P1-P0 quality on original+paraphrase+permuted", "mde": 0.02, "test": "one-sided paired t + Holm; controls P_search and P_mut"},
    "H5": {"claim": "G2 is a better successor than G1", "primary": "paired G2-P1 quality", "mde": 0.02, "test": "one-sided paired t + Holm"},
    "H6": {"claim": "the primary improvement replicates on a fresh salt", "primary": "same estimator on a new master", "test": "direction + 95% CI; same code, same host"},
    "H7": {"claim": "the accepted source change causes the behavioral improvement", "primary": "behavioral source rate >= 0.8 and P1 beats P_mut and P_search", "test": "logical gate + controls"},
    "H8": {"claim": "G2 retains G1's capabilities", "primary": "paired G2-G1 on the original representation", "mde": 0.02, "test": "no drop below -0.02"},
    "H9": {"claim": "verified memory improves sealed performance", "primary": "M2/M3 - M0 selected-source sealed quality", "mde": 0.02, "test": "effect-size gate"},
    "H10": {"claim": "a collective beats the strongest individual at equal compute", "primary": "C1/C2 - C0 selected-source sealed quality, 6 candidates total", "mde": 0.02, "test": "effect-size gate"},
    "H11": {"claim": "diagnosis-guided repair beats a random source patch", "primary": "paired P1-P_rand quality", "mde": 0.02, "test": "one-sided paired t + Holm"},
    "H12": {"claim": "P1 produces more verified discoveries per unit compute", "primary": "discoveries per 1000 evaluations (P1 > P0 and > P_rand)", "test": "rate comparison; a discovery must beat P0 by 0.02 on two engine seeds"},
    "H13": {"claim": "the improvement survives observation noise", "primary": "paired P1-P0 on the noisy paraphrase batch", "mde": 0.02, "test": "one-sided paired t + Holm"},
    "H14": {"claim": "an independent evaluator reproduces the primary result", "primary": "permutation recomputation + sealed re-execution", "test": "binary"},
    "H15": {"claim": "every research action remains inside the governance boundary", "primary": "MCPGate + AST + bwrap + OMEGA suite", "test": "binary"}
  },
  "statistics": {"unit": "sealed problem (quality averaged over seeds first)", "test": "paired one-sided t-test", "uncertainty": "domain-clustered bootstrap", "multiple_comparisons": "Holm across the eight primary hypotheses with p-values (H1,H2,H3,H4,H5,H8,H11,H13); H9/H10 are effect-size gates, H7/H12 are logical", "alpha": 0.05, "mde": 0.02, "rule": "a CI crossing zero is INCONCLUSIVE; a CI below zero is CONTRADICTED; never upgrade"},
  "promotion_gates": ["genuine behavioral source change", "complete lineage", "compute matched (P_search, P_mut)", "primary hypothesis passes", "Holm applied", "fresh-seed replication", "no capability regression", "independent evaluator confirms", "governance passes", "bundle verifies", "public reports match"],
  "stop_rules": "one preregistered pass; the sealed salt is committed before evaluation and revealed after",
  "limitations_declared_in_advance": ["constructed domains; none is an external benchmark", "the source patches come from a small designed library, not arbitrary code", "same team wrote domains, engine, patches, evaluator and verifier", "the replication is same-code/same-host", "no external third-party reproduction", "self-generated key (integrity, not identity)", "loopback governance; PBFT not used"]
}
