lean-enforcement
Skill3 starsChanged 24 days agoApache-2.0View on GitHub
USE FOR: running programmatic CI / pre-review / post-review gates for a Lean 4 project: axiom audit, council precheck. DO NOT USE FOR: semantic / judgement review (@lean-proof-review). TRIGGERS: enforcement, CI gate, axiom audit, council_precheck.
In this repository65 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-guard-judge-evalSkill
- applied-data-information-securitySkill
- applied-engineering-disciplinesSkill
- applied-legal-reasoningSkill
- epistemic-discovery-engineSkill
- epistemic-mappingSkill
- hol-metamath-adapterSkill
- isabelle-isar-adapterSkill
- itp-cross-portingSkill
- lean-ai-formalizationSkill
- lean-applied-reasoningSkill
- lean-axiom-closureSkill
- lean-bigraph-modelingSkill
- lean-bisectSkill
- lean-blueprintSkill
- lean-buildSkill
- lean-causal-reasoningSkill
- lean-competitive-mathSkill
- lean-convergence-verificationSkill
- lean-core-onlySkill
- lean-dag-visualizerSkill
- lean-deep-auditSkill
- lean-doc-feedbackSkill
- lean-doc-improvementSkill
- lean-doc-requirementsSkill
- lean-formalization-breakdownSkill
- lean-gatewaySkill
- lean-integration-protocolSkill
- lean-knowledge-formalizationSkill
- lean-math-analysisSkill
- lean-math-discreteSkill
- lean-math-dynamicalSkill
- lean-math-foundationsSkill
- lean-math-optimizationSkill
- lean-math-stochasticSkill
- lean-mweSkill
- lean-nested-learningSkill
- lean-package-researchSkill
- lean-pedagogical-expositionSkill
- lean-proof-refactorSkill
- lean-proof-repairSkill
- lean-proof-reviewSkill
- lean-proofSkill
- lean-prSkill
- lean-quality-engineSkill
- lean-replay-verificationSkill
- lean-reportSkill
- lean-researchSkill
- lean-retroactive-auditSkill
- lean-retro-methodologySkill
- lean-review-councilSkill
- lean-security-formalizationSkill
- lean-setupSkill
- lean-specificationSkill
- lean-tautology-triageSkill
- lean-upstream-portingSkill
- lean-vendor-substrateSkill
- lean-zettelkastenSkill
- math-product-managementSkill
- The first 60 shown.
The file
Files
lean-enforcement
⚠️ MANDATORY (hot-tier): blocking scripts (
council_precheck.sh,axiom_audit.pyonsorryAx,workflow_gate.pyon mandatory gates) are hard gates — a failure HALTS the calling workflow. Skipping Persist = incomplete.
Routing
- USE FOR: running an individual enforcement script or the full
enforce_all.shpipeline; checking a build is clean before review; auditing axioms after a refactor; validating cross-module bridges; gating a workflow step. - DO NOT USE FOR: deciding whether a proof is correct (delegate to
@lean-proof-review); scoring repository quality (delegate to@lean-quality-engine); routing across skills (delegate to@lean-gateway). - TRIGGERS: enforcement, CI gate, axiom audit, council_precheck, workflow_gate, ecosystem_health, sorry check.
Workflow
- Discover [discover] — identify the target gate (single script, group,
enforce_all.sh,lean_diagnosticsstatic abstract interpretation certificates [NatSubTruncation,NatDivModByZero, Zone DBMdecreasing_bysynthesis, Octagon conservation±x_i ± x_j <= c, Bourdoncle WTO loop widening, trace partitioning],lean_counterexample_searchwith Galois-guided hypothesis domain pruning [analyzeHeaderHypothesisDomains/pruneHeaderNatDomain], the 22-rulelean-rulescatalog vianode tools/lean-lsp-mcp/bin/lean-rules.jsas sub-second structural pre-checks beforelake build, orpi-harness-bridgepolicy/unicode gates); read the repository'slakefile.lean
- recent commit log.
Recovery & STOP
axiom_audit.pyfindssorryAx→ immediate STOP; escalate to proof author; do NOT mark the workflow green.council_precheck.shfails → STOP; fix build / sorry / convention / git state before retrying.workflow_gate.pyblocks a mandatory gate → STOP; complete the prerequisite gate, then retry.- Any blocking script crashes ×3 → STOP; file a bug against this skill.
- Confidence < 90 % about which script to invoke → STOP, ask.
Handoffs
- Predecessors / successors: see FM
handoffs(grammar from ADR-0080). - Source spec:
specs/lean/enforcement/requirements.md— every G-rule traces to an AC there. - Related ADRs: ADR-0076, ADR-0080.
- Reference: see
references/lean-enforcement-handbook.mdfor the full script inventory, integration matrix, anti-patterns, and the workflow-gate enforcement model (original v1 content, preserved verbatim).
Detailed reference
Full encyclopedic reference, decision trees, and lookup tables live in
references/lean-enforcement-handbook.md .
See also
../../references/lean-enforcement-handbook.md-- Completelean-enforcementHandbook../lean-gateway/SKILL.md-- Top-level skill router
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.

