lean-corpus-audit
Skill3 starsChanged 13 days agoApache-2.0View on GitHub
USE FOR: whole-corpus Lean 4 audits, 7-dimension QA scoring, milestone health, and retroactive onboarding. DO NOT USE FOR: single-file review (@lean-proof-review) or CI axiom gates (@lean-verification-gate). TRIGGERS: corpus audit, quality engine, deep audit, retroactive audit, QA gate, project health.
In this repository43 other files it gives its agents.
- AGENTS.mdAGENTS.md
- counterexample-first-provingSkill
- hol-metamath-adapterSkill
- isabelle-isar-adapterSkill
- itp-cross-portingSkill
- lean-ai-formalizationSkill
- lean-asymptotic-algorithmsSkill
- lean-bisectSkill
- lean-blueprintSkill
- lean-buildSkill
- lean-computational-reflectionSkill
- lean-core-onlySkill
- lean-dependency-managementSkill
- lean-doc-syncSkill
- lean-egraph-cpsat-superoptSkill
- lean-gatewaySkill
- lean-kernel-optimizationSkill
- lean-knowledge-formalizationSkill
- lean-math-analysisSkill
- lean-math-discreteSkill
- lean-math-dynamicalSkill
- lean-math-foundationsSkill
- lean-math-optimizationSkill
- lean-math-stochasticSkill
- lean-mweSkill
- lean-pedagogical-expositionSkill
- lean-proof-refactorSkill
- lean-proof-repairSkill
- lean-proof-reviewSkill
- lean-proofSkill
- lean-researchSkill
- lean-retro-methodologySkill
- lean-review-councilSkill
- lean-security-formalizationSkill
- lean-setupSkill
- lean-specificationSkill
- lean-tautology-triageSkill
- lean-unboxed-limbs-swarSkill
- lean-upstream-prSkill
- lean-verification-gateSkill
- lean-worker-wrapper-cpsSkill
- research-councilSkill
- rocq-proof-adapterSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 52
Never batch-edit theorem statements during an audit.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Lean 4 Whole-Corpus Quality & Audit Engine
Assess an entire Lean 4 formalization across seven dimensions (soundness, faithfulness, non-vacuity, abstraction hygiene, proof modularity, DAG health, and documentation parity), whether at milestone gates or when onboarding an existing codebase.
Routing
- USE FOR: multi-module quality sweeps, 7-dimension QA scorecards, wave-stratified corpus audits, and retroactive council onboarding.
- DO NOT USE FOR: reviewing a single theorem (
@lean-proof-review) or running a 5-member council vote on one batch (@lean-review-council).
Workflow
- Census & DAG Stratification -- Run
lean_metrics(action: "census")andlean_module_hierarchyto stratify modules from Layer 0 foundations up to top-level corollaries. - Automated Defect Sweep -- Scan for the 8 fidelity categories (
FIDELITY-01..08, includingNattruncation, hypothesis echo, one-way Bool checkers, and over-concrete fixed-arity signatures) plus long-proof hotspots (scripts/lean/proof_quality.py). - 7-Dimension Scoring -- Score soundness, statement faithfulness, completeness, non-vacuity, tactic modularity, kernel efficiency, and prose traceability with file-level citations.
- Remediation Dispatch -- Route vacuous/truncated theorems to
@lean-tautology-triage, long/repetitive proofs to@lean-proof-refactor, and systemic patterns to@lean-retro-methodology.
Recovery & STOP
- Never batch-edit theorem statements during an audit; audits are read-only diagnostics that emit prioritized remediation backlogs.
- Re-run
lake buildbefore taking a final declaration census so mid-build.oleangaps do not undercount modules.
Handoffs
- Predecessors:
lean-verification-gate,lean-blueprint. - Successors:
lean-proof-refactor,lean-tautology-triage,lean-retro-methodology.
Detailed reference
- Layer-1 Fast Lookup Card (read first):
references/cards/lean-corpus-audit-tables.md - Full handbook:
../../references/handbooks/lean-corpus-audit-handbook.md
See also
../lean-review-council/SKILL.md-- 5-member Review Council orchestration../lean-tautology-triage/SKILL.md-- Vacuity and tautology triage
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

