math-research
Answer a methodology question about a mathematical or algorithmic choice with a
cited, tradeoff-explicit findings brief. Research-only - this skill never edits
code, and the subagent is instructed not to. Know the limit of that guarantee:
it is enforced by instruction, not mechanically, whenever the subagent has
write tools. Step 2 covers what to do when that is not good enough.
The question: $ARGUMENTS
1. Locate the specialization - do not assume it
The branch of applied math is a finding, not an input. Before dispatching,
spend a few cheap reads establishing:
- The numeric stack. Grep the manifest and imports for what the project
actually computes with -
numpy/scipy/scikit-learn/statsmodels,
nalgebra/faer/ndarray, Eigen/BLAS/LAPACK, torch/jax, R packages.
The stack constrains which recommendations are implementable.
- The call site. The specific function, module, or pipeline stage the
question is about. If the user named one, start there; otherwise find it.
- The problem class. Name it explicitly - optimization, dimensionality
reduction, linear-system solving, eigenproblems, graph algorithms,
probabilistic inference, time-series estimation, quadrature, signal
processing. State the specialization in your dispatch so the subagent
researches as a specialist in that, not as a generalist.
- The problem scale. Rough data size (n, dimensionality, sparsity) and any
latency or throughput constraint, taken from config, tests, fixtures, or
sample data. Step 4 asks whether an alternative is practically better at
the sizes this project actually sees - without a number here, that judgment
is a guess. If no scale is discoverable, say so explicitly rather than
assuming one.
If the question is purely theoretical with no implementation to inspect, say
so and skip to step 2 - but do not invent a call site that is not there.
2. Dispatch one research subagent
Use the Task tool with general-purpose, and spawn one - do not fan
out. It is the type built for open-ended research across code and the web,
which is this skill's whole job.
Do not substitute a read-only agent type to get a write guarantee. Plan is
scoped to designing implementation plans and closes with a critical-files
list; Explore is scoped to locating code, not analyzing it. Both would be
working against their own instructions here, and the findings contract in step
4 is what loses. Where a mechanical guarantee is genuinely required, define an
agent whose tools: frontmatter grants read and web access only - a real
restriction from a purpose-built persona, rather than a borrowed one.
State in the dispatch:
- The question, the specialization and problem scale from step 1, and the
concrete call site.
- The numeric stack, so implementation notes are written in the host language
rather than an unusable one.
- The read-only mandate. It reads code and searches the literature. It
never edits, creates, or reformats a file. A researcher that can write is a
researcher that starts implementing.
- Read the implementation before recommending anything. Never reason from
file or function names alone - what the code does and what it is called
routinely diverge, and a recommendation aimed at the wrong current behavior
is worse than none.
3. Hold the subagent to source discipline
This is what separates methodology review from confident recall. Require that
every recommendation trace to one of:
- Peer-reviewed literature - a journal or established conference, or an
arXiv preprint carrying real citation weight (roughly 50+ citations, or
independently corroborated by a source in one of the tiers below). "It
sounds authoritative" is not a tier.
- Established numerical libraries - LAPACK, scipy, scikit-learn, MATLAB
algorithm documentation, and the equivalents for the host stack.
- Official library documentation for the stack in use.
- Textbooks, cited by author and title.
Blogs, tutorials, and forum answers may be read to discover leads and must
never appear as the justification for a change - trace back to a primary
source first, or drop the claim. An uncited recommendation is a finding that
did not survive.
4. Fix the return contract
Require findings in this shape, one block per topic:
- Current approach - what the code does now, cited as
path/file.ext:line.
- Proposed alternative - the method recommended, or an explicit "keep the
current approach" with the reason.
- Citation - authors, title, venue, year, or a documentation URL.
- Tradeoffs - benefits, drawbacks, scaling behavior as the problem size
grows (with concrete time and space bounds), and numerical stability or
conditioning concerns.
- Implementation notes - which library or from-scratch approach in the
host stack, the integration points, and a rough complexity estimate. Verify
any recommended library actually exists and is still maintained.
- Compatibility - what this changes for downstream consumers of the
output.
Require one explicit judgment per finding: is the alternative practically
better here, or only theoretically superior? Say which. Most methods that win
on paper lose on problem sizes this project actually sees.
5. Relay
Return the brief with citations intact - they are the deliverable, not
decoration. Keep your own commentary minimal.
State plainly when the literature does not settle the question, when the
current approach is already the right one, or when a recommendation rests on
an assumption about problem size or data distribution that nobody has
verified. A brief that recommends a change in every case is not a review.
1---2name: math-research3description: Review a mathematical or algorithmic choice against the literature - delegate it to a research-only subagent that reads the actual implementation, identifies which branch of applied math the question sits in, and returns a cited findings brief with complexity bounds, numerical-stability analysis, and tradeoffs. Use whenever the user asks whether an algorithm is the right one, wants the state of the art for a numerical method, questions convergence, conditioning, or stability, asks for a paper or textbook citation to justify an approach, wants alternatives to a solver, estimator, decomposition, or embedding compared, or says "math research", "is this the right method", or "what does the literature say". The dividing line against a quick sidebar lookup is citation - use this whenever the answer must trace to a primary source rather than to recall, however plausible the recall sounds.4---56# math-research78Answer a methodology question about a mathematical or algorithmic choice with a9cited, tradeoff-explicit findings brief. Research-only - this skill never edits10code, and the subagent is instructed not to. Know the limit of that guarantee:11it is enforced by instruction, not mechanically, whenever the subagent has12write tools. Step 2 covers what to do when that is not good enough.1314The question: $ARGUMENTS1516## 1. Locate the specialization - do not assume it1718The branch of applied math is a finding, not an input. Before dispatching,19spend a few cheap reads establishing:2021- **The numeric stack.** Grep the manifest and imports for what the project22 actually computes with - `numpy`/`scipy`/`scikit-learn`/`statsmodels`,23 `nalgebra`/`faer`/`ndarray`, Eigen/BLAS/LAPACK, `torch`/`jax`, R packages.24 The stack constrains which recommendations are implementable.25- **The call site.** The specific function, module, or pipeline stage the26 question is about. If the user named one, start there; otherwise find it.27- **The problem class.** Name it explicitly - optimization, dimensionality28 reduction, linear-system solving, eigenproblems, graph algorithms,29 probabilistic inference, time-series estimation, quadrature, signal30 processing. State the specialization in your dispatch so the subagent31 researches as a specialist in *that*, not as a generalist.32- **The problem scale.** Rough data size (n, dimensionality, sparsity) and any33 latency or throughput constraint, taken from config, tests, fixtures, or34 sample data. Step 4 asks whether an alternative is *practically* better at35 the sizes this project actually sees - without a number here, that judgment36 is a guess. If no scale is discoverable, say so explicitly rather than37 assuming one.3839If the question is purely theoretical with no implementation to inspect, say40so and skip to step 2 - but do not invent a call site that is not there.4142## 2. Dispatch one research subagent4344Use the Task tool with **`general-purpose`**, and spawn **one** - do not fan45out. It is the type built for open-ended research across code and the web,46which is this skill's whole job.4748Do not substitute a read-only agent type to get a write guarantee. `Plan` is49scoped to designing implementation plans and closes with a critical-files50list; `Explore` is scoped to locating code, not analyzing it. Both would be51working against their own instructions here, and the findings contract in step524 is what loses. Where a mechanical guarantee is genuinely required, define an53agent whose `tools:` frontmatter grants read and web access only - a real54restriction from a purpose-built persona, rather than a borrowed one.5556State in the dispatch:5758- The question, the specialization and problem scale from step 1, and the59 concrete call site.60- The numeric stack, so implementation notes are written in the host language61 rather than an unusable one.62- **The read-only mandate.** It reads code and searches the literature. It63 never edits, creates, or reformats a file. A researcher that can write is a64 researcher that starts implementing.65- **Read the implementation before recommending anything.** Never reason from66 file or function names alone - what the code does and what it is called67 routinely diverge, and a recommendation aimed at the wrong current behavior68 is worse than none.6970## 3. Hold the subagent to source discipline7172This is what separates methodology review from confident recall. Require that73every recommendation trace to one of:74751. **Peer-reviewed literature** - a journal or established conference, or an76 arXiv preprint carrying real citation weight (roughly 50+ citations, or77 independently corroborated by a source in one of the tiers below). "It78 sounds authoritative" is not a tier.792. **Established numerical libraries** - LAPACK, scipy, scikit-learn, MATLAB80 algorithm documentation, and the equivalents for the host stack.813. **Official library documentation** for the stack in use.824. **Textbooks**, cited by author and title.8384Blogs, tutorials, and forum answers may be read to *discover leads* and must85never appear as the justification for a change - trace back to a primary86source first, or drop the claim. An uncited recommendation is a finding that87did not survive.8889## 4. Fix the return contract9091Require findings in this shape, one block per topic:9293- **Current approach** - what the code does now, cited as `path/file.ext:line`.94- **Proposed alternative** - the method recommended, or an explicit "keep the95 current approach" with the reason.96- **Citation** - authors, title, venue, year, or a documentation URL.97- **Tradeoffs** - benefits, drawbacks, scaling behavior as the problem size98 grows (with concrete time and space bounds), and numerical stability or99 conditioning concerns.100- **Implementation notes** - which library or from-scratch approach in the101 host stack, the integration points, and a rough complexity estimate. Verify102 any recommended library actually exists and is still maintained.103- **Compatibility** - what this changes for downstream consumers of the104 output.105106Require one explicit judgment per finding: is the alternative *practically*107better here, or only theoretically superior? Say which. Most methods that win108on paper lose on problem sizes this project actually sees.109110## 5. Relay111112Return the brief with citations intact - they are the deliverable, not113decoration. Keep your own commentary minimal.114115State plainly when the literature does not settle the question, when the116current approach is already the right one, or when a recommendation rests on117an assumption about problem size or data distribution that nobody has118verified. A brief that recommends a change in every case is not a review.