minimize-repro-for-diagnostic-test
Input
Ask a user for some details, whether it's some YouTrack issue or some locally built user project. For a local user project, ask for details like where an error had happened, what is the context around, if it's opened in the IDE.
Ask a user whether they need a separate test data file with an initial test version.
Gather context the context
If a case depends on some dependencies, be it other sources or some libraries, if needed, use their API description on the web.
For a local user project if it's open in the IDE, use JetBrains MCP resolution to determine the context, e.g., by getting symbols info.
Initial version
Using information from tests description, make a first version of the test which contains some wide context needed to reproduce the issue, like all necessary/referenced declarations dumped (including Java files and dependencies in separate file).
Make sure that the problem is reproduced by running a test, and if it's not, add some more context, if you fail for a couple of times, then stop.