.agents/skills/minimizing-ty-ecosystem-changes/SKILL.md
Use this skill when asked to reproduce a ty ecosystem change, investigate a behavior difference in a primer project, or minimize a reproducer from a ty ecosystem project.
From the repository root, clone the project and install its dependencies into .venv:
uv run scripts/setup_primer_project.py <project-name> <some-temp-dir>
Confirm the behavior difference reproduces before minimizing or explaining it.
When asked to minimize an ecosystem change, start from the reproduced project. Reduce the Python code until only the smallest code needed to demonstrate the behavior difference remains. Even if the cause looks obvious, do not skip ahead to an explanation or a hand-written reproducer. Use a rigorous, systematic process and verify after each reduction that the behavior difference still reproduces.
An ideal minimized reproducer:
numpy over one from pandas.typing, abc, enum, types, or typing_extensions).Protocol from typing_extensions, but the behavior difference still reproduces without it, remove the Protocol.Use a systematic loop. You do not need to apply every tool in every iteration, but keep looping until none of the available minimization tools can reduce the reproducer further while preserving the behavior difference.
Available minimization tools include:
After applying a minimization tool, re-run the comparison between the feature branch and main.
Keep a reduction only when the behavior difference still reproduces.
Stop looping only when no further reductions could be applied without making the behavior difference disappear.