Lean blueprint
USE FOR: generating Lean blueprint, annotating theorems with @[blueprint], scaffolding blueprint directory, building blueprint LaTeX, rendering blueprint web. DO NOT USE FOR: writing Lean proofs (use @lean-proof), opening Lean/Mathlib PRs (use @lean-pr). TRIGGERS: blueprint, leanblueprint, LeanArchitect, dependency-graph.From its SKILL.md
npx -y skills add r-irbe/proof-skills --skill lean-blueprintAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 3 commands, including `lake build :blueprint` and 2 more.
SKILL.md
3.8 KB, 875 tokens by cl100k_base, as published. Nobody here has run it
lean-blueprint
⚠️ MANDATORY (hot-tier): the gates in §Behavioural rules and the Persist step in §Workflow are CI-enforced. Skipping Persist = incomplete, regardless of artefact quality (FSIA-R-11-09).
Routing
- USE FOR: generating a navigable formal blueprint from a Lean 4 codebase; annotating definitions and theorems with
@[blueprint]; scaffoldingblueprint/withleanblueprint new; building blueprint LaTeX vialake build :blueprint; rendering the dependency graph and web view. - DO NOT USE FOR: authoring new Lean proofs (use
@lean-proof); opening Lean/Mathlib PRs (use@lean-pr); editing prose docs (use@lean-doc-improvement). - TRIGGERS: blueprint, leanblueprint, LeanArchitect, dependency-graph.
Behavioural rules (G-*)
- G-1 (MUST): The blueprint pipeline MUST run the five stages in order (analyze → annotate → scaffold → extract → render). [Trace: AC-01]
- G-2 (MUST): Every
@[blueprint]annotation MUST carry a matching LaTeX statement incontent.tex. [Trace: AC-02] - G-3 (MUST NOT): The skill MUST NOT mutate files outside
blueprint/and the annotated.leanmodules. [Trace: AC-03] - G-4 (SHOULD): The skill SHOULD fan out per-module annotators when ≥6 modules are in scope. [Trace: AC-04]
- G-5 (MUST):
lake build :blueprintMUST succeed before render. [Trace: AC-05] - G-6 (MUST):
leanblueprint pdfandleanblueprint webMUST both produce artefacts underblueprint/. [Trace: AC-06] - G-7 (SHOULD NOT): The skill SHOULD NOT re-annotate modules already carrying complete
@[blueprint]coverage. [Trace: AC-07] - G-8 (MUST): On any guard failure the skill MUST escalate per §Recovery & STOP. [Trace: AC-08]
Workflow
- Discover [discover] — read inputs, list Lean modules, locate
lakefile.leanand priorblueprint/. - Plan [discover] — propose per-module annotator fan-out; STOP if confidence < 80 %.
- Annotate [execute] — apply
@[blueprint]annotations and LaTeX statements inside owned scope. - Build [execute] — run
lake build :blueprint. - Verify [validate] — confirm artefacts exist; max 3 retries then escalate.
- Render [execute] — run
leanblueprint pdfandleanblueprint web. - Persist [persist] (MANDATORY, FSIA-R-11-09) — commit changes, update state tracker, tick
tasks.md. Skipping Persist = incomplete.
Recovery & STOP
lake build :blueprintfails ×3 → STOP, escalate to human.- Scope drift (touch outside
blueprint/or annotated.leanfiles) → immediate STOP, re-anchor. - Confidence < 80 % on annotation strategy → STOP, ask.
- Context degradation signals (≥2 from AGENTS.md) → recommend fresh session.
Handoffs
- Predecessors / successors: see FM
handoffs(grammar from ADR-0080). - Source spec:
specs/lean/blueprint/requirements.md— every G-rule traces to an AC there. - Related ADRs: ADR-0076, ADR-0080.
Common failure modes
AI agents commonly: skip the Persist step; over-annotate stable modules; re-run
lake buildinstead of escalating on third failure. Full registry: GUARDRAILS.md §Agent failure taxonomy.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most operations skills give in 875 tokens
Counted across 483 of the 484 authors here whose files we hold, read 2026-08-07
- Collect monitoring data throughout the simulationin 14 of 483, across 6 files
- Set the random seed for reproducibilityin 14 of 483, across 6 files
- Validate simulations against analytical solutionsin 12 of 483, across 4 files
- Clarify goals, constraints, and inputsin 11 of 483, across 2 files
- Implement contract tests for integration pointsin 11 of 483, across 2 files
- Implement strangler fig infrastructure with API gatewayin 11 of 483, across 2 files
- Audit modernized components for security vulnerabilitiesin 11 of 483, across 2 files
- Avoid Python blocking calls in processesin 10 of 483, across 3 files
- Use resource context managers for automatic cleanupin 9 of 483, across 2 files
- Maintain consistent time unitsin 9 of 483, across 2 files
- Validate outcomes against success criteriain 8 of 483, across 1 file
- Analyze the legacy codebase for technical debtin 8 of 483, across 1 file
Said here and by no other author read
- run pipeline stages in order
- match annotation with latex statement
- build blueprint before render
- produce both pdf and web artifacts
- escalate on guard failure
- stop if confidence is low
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.