整理开源项目可复现缺陷报告
核实问题是否来自上游依赖,缩减并验证独立复现案例,再按项目模板整理可供维护者处理的缺陷报告。
完整提示词
<context>
Maintainers can fix what they can reproduce. Bug reports that sit unanswered usually paste a stack trace from a large private app, give a vague version ("latest"), describe the problem only through the reporter's own code, or are really a misuse, a configuration issue or a bug in a different package. The most useful thing a reporter can do is reduce the problem to a standalone reproduction: a fresh project with only the failing dependency, the fewest lines that show the bug, and exact versions of the library, runtime, OS and any plugin. Checking the latest release and the main branch often shows it is already fixed. Searching closed issues, the changelog and discussions avoids a duplicate. The report itself should follow the project's template, separate expected from actual behaviour, and keep any private code, credentials or customer data out.
{{> guardrails/investigate-before-answering}}
Problem:
<problem>
{{problem}}
</problem>
{{#issue_template}}
<issue_template>
{{issue_template}}
</issue_template>
{{/issue_template}}
</context>
<task>
1. Is it upstream: read the relevant code in this project and the dependency's version in the lockfile. Rule out misuse, configuration and a different package (a wrapper, a plugin, a transitive dependency) before blaming the library. Say how confident you are.
2. Duplicate check: list the search terms to use on the project's issues (open and closed), changelog and discussions, and what to do if an issue exists (add the reproduction or a reaction, not "+1").
3. Minimal reproduction: in a scratch folder outside the project, create the smallest standalone project that shows the bug with only the needed dependencies, pinned to exact versions. Run it and confirm it fails. Then try the latest release, and say whether it still fails.
4. Issue draft: title that states the behaviour, versions table, reproduction steps or code, expected versus actual, what you already ruled out, and whether you can help with a fix. Follow the template given if any.
5. Workaround meanwhile: a safe way to keep working (pin, guard, patch file) without hiding the bug.
6. Report what you actually ran and the results.
</task>
<constraints>
- Do not post the issue yourself; give the draft to the user to submit.
- Remove private code, internal names, tokens, hostnames and customer data from everything in the draft and the reproduction.
- If you cannot reproduce it standalone, say so plainly and draft the issue as "cannot reduce yet" with the evidence, rather than claiming a cause.
- If the problem looks like a security vulnerability, do not draft a public issue; tell the user to use the project's private security reporting route.
- Do not modify the user's project except for a clearly marked, reversible workaround they approve.
{{> guardrails/verify-before-done}}
</constraints>
<output_format>
Use the contract's section headings in order. Put the reproduction files and the issue draft in fenced blocks. Verified lists the commands run and their real results, or "not run" with the reason.
</output_format>可替换内容
- {{> guardrails/investigate-before-answering}}
- {{problem}}
- {{#issue_template}}
- {{issue_template}}
- {{/issue_template}}
- {{> guardrails/verify-before-done}}
分类与标签
编程开发、开源协作、缺陷报告、最小复现、依赖排查