agentleFS
r-irber-irbe/proof-skills/skills/lean-corpus-audit/SKILL.md

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.

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
  1. Distinctive:

    Never batch-edit theorem statements during an audit.

    line 52

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Census & DAG Stratification -- Run lean_metrics(action: "census") and lean_module_hierarchy to stratify modules from Layer 0 foundations up to top-level corollaries.
  2. Automated Defect Sweep -- Scan for the 8 fidelity categories (FIDELITY-01..08, including Nat truncation, hypothesis echo, one-way Bool checkers, and over-concrete fixed-arity signatures) plus long-proof hotspots (scripts/lean/proof_quality.py).
  3. 7-Dimension Scoring -- Score soundness, statement faithfulness, completeness, non-vacuity, tactic modularity, kernel efficiency, and prose traceability with file-level citations.
  4. 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 build before taking a final declaration census so mid-build .olean gaps 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.