cyberneticlibrary

Adversarially review Lean proofs

Lean review harnessworkflowsetup L336
mostlyharmfuleconometrics/lean-hansen-econometrics
What it does

Multi-phase adversarial review of Lean code across 4 dimensions with mechanical fix drafting

Best for

Systematic code review covering redundancy, hygiene, faithfulness, and proof-quality with adversarial false-positive killing.

Inputs
  • · Lean file paths
Outputs
  • · findings (id, file, line, decl, dimension, severity, rule, claim, evidence, fix, mechanical, confidence)
  • · dedup report
  • · draft fixes
Requires
  • · uv (Python runner)
  • · rg (ripgrep)
  • · lake (Lean)
  • · review/rubric.md
  • · finding-schema.json
Preconditions

Lean files present; review assets in place; uv + lake installed; worklist.py available

Failure modes
  • · Reviewer emits >100 findings → dedup by (id, highest severity, latest phase)
  • · Verifier refutes false positives via evidence check
  • · Mechanical fix flag guides fixer safety
Trust signals
  • · Findings tied to specific line numbers and declarations
  • · Cross-family verifier (refutation-focused)
  • · Mechanical fixes isolated and diff-friendly