agentleFS
r-irber-irbe/proof-skills/skills/lean-axiom-closure/SKILL.md

lean-axiom-closure

Skill3 starsChanged 25 days agoApache-2.0View on GitHub

USE FOR: enforcing a project-wide axiom lockdown: verifying that EVERY declaration's transitive axiom closure restricts. DO NOT USE FOR: writing or fixing a proof (@lean-proof). TRIGGERS: axiom closure, axiom lockdown, FinalCheck, print axioms.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create the consumer file (FinalCheckAll.lean.tmpl): import the audit module + the project root, then #guard_msgs (drop info) in #eval …

    line 23
  2. Very specific:

    Keep the consumer file INSIDE the library's source globs so the project's normal build runs it.

    line 26
  3. Very specific:

    If Audit.axiomClosureAudit reports sorryAx, trace the offending declaration via #print axioms and hand off to @lean-proof to close the open …

    line 34
  4. Very specific:

    If Lean.ofReduceBool appears, replace native_decide with kernel-checked decide / omega or obtain explicit owner sign-off before widening …

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Axiom-Closure Audit (the FinalCheck discipline)

Operational dispatch contract for @lean-axiom-closure.

Routing

  • USE FOR: tasks routed to @lean-axiom-closure.
  • DO NOT USE FOR: out-of-scope tasks (delegate via @lean-gateway).

Workflow

  1. Vendor AxiomClosure.lean.tmpl into the project (e.g. <root>/Audit/AxiomClosure.lean), adjusting only the module path of the example.
  2. Create the consumer file (FinalCheckAll.lean.tmpl): import the audit module + the project root, then #guard_msgs (drop info) in #eval Audit.axiomClosureAudit <root> #[...allowlist].
  3. Keep the consumer file INSIDE the library's source globs so the project's normal build runs it. #guard_msgs (drop info) drops the summary info line; any violation error - and only a violation error - fails the build.
  4. The allowlist is the project's DECLARED trust base. Default: #[propext, Quot.sound, Classical.choice]`. Tighten it to exactly the axioms the project is willing to assume; every extra entry must

Recovery & STOP

  • If Audit.axiomClosureAudit reports sorryAx, trace the offending declaration via #print axioms and hand off to @lean-proof to close the open subgoal.
  • If Lean.ofReduceBool appears, replace native_decide with kernel-checked decide / omega or obtain explicit owner sign-off before widening the allowlist.

Handoffs

  • Predecessors: @lean-replay-verification (R2 cadence), @lean-deep-audit (P1 trust-base lockdown).
  • Successors: @lean-proof-review (single-module audit), @lean-enforcement (CI gate execution).

Detailed reference

Full encyclopedic reference, decision trees, and lookup tables live in references/lean-axiom-closure-handbook.md .

See also

  • ../../references/lean-axiom-closure-handbook.md -- Complete lean-axiom-closure Handbook
  • ../lean-gateway/SKILL.md -- Top-level skill router

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.