/mqslim:develfrom mqslim
Slim shadow of mathlib-quality's /develop. Plan a mathematical development — search mathlib, design the API, decompose the proof from the source, write a ticket board. Planning-only; workers run via /bstmode. Source-faithful: every leaf must be discharged from a verbatim source quote OR an explicit API gap. Trusts the model to do the literature work without per-step prescriptions.
Ships in mqslim. Installing the plugin adds it to Claude Code.
Plan a development. Workers don't run here; once the ticket board is
approved, /bstmode (or /beastmode for the verbose version) picks up the
next available ticket and works it.
/devel # auto-detect: new, resume, or takeover
/devel --continue # audit existing tickets against the code; propose updates
/devel --status # show the current ticket board
/devel --decompose # run only the methodical decomposition pre-work; no tickets yet
The single most expensive failure this command exists to prevent is a decomposition that drifts from the source's actual proof. When the plan's leaves are invented (chosen because they "look provable in Lean") rather than transcribed from the reference's own argument, the tree reliably bottoms out at a lemma the source never proves — and that lemma is then substantial mathlib-lacking infrastructure or outright false. Every recurrence has the same root cause: leaving the source.
The discipline:
Gather context — what does the user want proved? What's the source (paper, book, blueprint)? What's the scope?
Read the references in full. The user-provided sources are the authoritative target; everything in the plan grounds back to them. If the source isn't on disk, ask for it before planning.
Search mathlib exhaustively for existing definitions and lemmas
you'd want to reuse. Use Lean-Finder, Loogle, LeanSearch, grep, and
lean_local_search. Note both exact matches and more-general
versions.
Design the API. What new definitions? What typeclasses? What namespace conventions? Lean toward Bourbaki 2.0 — abstract typeclass hierarchies, bundled structures, modern formulations. Mathlib doesn't want a vector-space wrapper around module API; don't plan one.
Decomposition pre-work (binding when --decompose is set; mandatory
for any planning that produces tickets).
For each top-level result:
:= by sorry. The
resulting skeleton must lake build clean — if it doesn't, the
statements are wrong, not the proofs.Adversarial attack (mandatory for --decompose). For every leaf,
try ≥3 distinct attacks across these categories:
For every internal node, attack on composition.
Confidence gate before writing tickets. Each leaf must have:
(a) a Lean declaration with := by sorry,
(b) a verbatim source quote,
(c) a citation verified against mathlib / project code / API-gap
sub-decomposition,
(d) survived ≥3 attacks,
(e) the source's structure mirrored (not invented), and
(f) a LOC estimate citing the source's line count.
Gate fails on any miss. Re-do the leaf.
Source-gap fallback. If the source is opaque on a sub-result,
cross-reference other references, then search the literature; as a
last resort, file a numbered question via /exprvw. Affected leaves
enter REVIEW-PENDING and the confidence gate does not pass for them
until the reviewer's answer is integrated.
Save decomposition.md with the full pre-work artifact.
Write the ticket board — .mathlib-quality/tickets.md. Each ticket
self-contained: exact Lean statement, numbered proof sketch citing
sources, the mathlib lemmas needed at each step, the source page +
line for each step, generality decision.
(Optional) Validate with ChatGPT MCP — ask for soundness check on the plan + the API design.
User approval. Print the ticket board summary; wait.
/bstmode./clnup./mthlbl.If a sub-result needs external review (the source is opaque, you're not
sure the leaf is provable), surface via /exprvw and pause that leaf's
ticket — don't speculate.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub cbirkbeck/mqslim --plugin mqslim5 commands in this plugin
/bstmodeSlim shadow of mathlib-quality's /beastmode. Marathon work session — pick a ticket, finish the goal, stop at nothing. Spawn sub-tickets for missing infrastructure; replan via /devel --continue when the sketch is wrong; mandatory /clnup on every completed proof before mark-done. Trusts the model on the marathon discipline; specifies only the genuine stop conditions and the post-proof cleanup contract./clnupSlim shadow of mathlib-quality's /cleanup. Audit + golf + style + mathlib-replacement on a Lean file (or single declaration). Trusts the model to apply the conventions in skills/mqslim/SKILL.md and to use `lean_diagnostic_messages` / `lean_loogle` / `lean_leansearch` / `lean_local_search` for the audit work. Four hard gates the worker MUST verify before reporting done; everything else is judgement./decoproofSlim shadow of mathlib-quality's /decompose-proof. Break long Lean proofs (>50 lines) into focused helper lemmas. Two passes: analysis (identify candidates + write decomposition plans) → decompose (extract helpers, golf them, update the main proof). Five-item helper-hygiene curation per extracted helper before any PR. Trusts the model on the decomposition mathematics; specifies the hygiene rails reviewers catch./mthlblSlim shadow of mathlib-quality's /mathlibable. Decide whether a Lean declaration belongs in mathlib. Runs the exhaustive literature + mathlib + composition check, then produces one of five verdict buckets with evidence. Trusts the model to do the search work without per-row required-artifact tables. Use on a single declaration; for files, run sequentially.