A lot of “bug reports” are really feelings:
- “Sometimes it crashes.”
- “Login is broken.”
- “It’s slow.”
Humans can often debug those anyway (by asking follow-up questions in chat). But if you want fast, reliable help from a teammate, an on-call rotation, or a coding assistant, you need something closer to a reproducible experiment than a complaint.
In this post I’ll show you an issue template that produces bug reports your future self can actually work with. It’s optimized for clarity, reproduction, and safe sharing.
The three failure modes of bad bug reports
Most low-quality issues fail in one of these ways:
- Ambiguous contract: it’s unclear what “correct” behavior is.
- Non-reproducible: no steps, no data, no environment.
- Missing boundaries: the report includes everything except what matters (or it contains secrets you can’t share).
A good template fixes all three by forcing the reporter to answer a small set of questions up front.
The goal: reduce uncertainty, not add text
A common misconception is that “good bug reports are long.”
Good bug reports are precise.
They can be short if they include the right variables:
- what you expected
- what happened instead
- how to reproduce
- in which environment
- with what inputs
Think of each field as a knob you’re setting so someone else can recreate your world.
Copy/paste: an AI-friendly (and human-friendly) bug report template
Drop this into GitHub Issues (or your tracker of choice) and adjust as needed.
## Summary
<!-- One sentence. What’s broken? -->
## Expected vs Actual
**Expected:**
**Actual:**
## Reproduction steps
1.
2.
3.
### Minimal repro (optional but ideal)
<!-- Link a repo, gist, or a short code snippet. -->
## Environment
- App version / commit:
- Runtime: (Node 20, Python 3.12, JVM 21, etc.)
- OS: (macOS 14.3, Ubuntu 22.04, Windows 11)
- Deployment: (local / staging / prod)
- Browser (if relevant):
## Inputs / data
<!-- Smallest input that triggers the bug. Redact secrets. -->
## Logs / screenshots
<!-- Paste relevant logs (surround with ```
), or attach screenshots. -->
## Impact
- Frequency: (always / often / rare)
- Severity: (blocks release / major / minor)
- Workaround (if any):
## Notes / hypotheses (optional)
<!-- What changed recently? Any suspicion? -->
Why this works:
- Expected vs Actual prevents “it’s broken” issues.
- Reproduction steps makes it an experiment.
- Environment avoids debugging the wrong version.
- Inputs forces the report to become concrete.
- Impact helps triage without a meeting.
Example: “Login is broken” rewritten into something actionable
Vague report
Login is broken in staging.
Template-filled report
Summary
Login fails for users with 2FA enabled in staging.
Expected: After entering correct username/password and TOTP, user lands on /dashboard.
Actual: After submitting TOTP, user is redirected back to /login with Invalid session.
Reproduction steps
- Go to
https://staging.example.com/login - Log in with a 2FA-enabled account
- Enter any valid TOTP
Environment
- App version / commit:
3c1b7a2 - Runtime: Node 20.11
- OS: Ubuntu 22.04 (staging)
- Browser: Chrome 121
Logs
text
AuthService: verifyTotp ok userId=...
SessionService: createSession failed reason=REDIS_TIMEOUT
In one page, you’ve narrowed the search space from “anything in auth” to “session persistence under staging load.”
The “minimum reproducible input” trick
If you only adopt one habit, make it this: shrink inputs until the bug still happens.
Examples:
- A failing JSON payload → remove fields until it still fails.
- A flaky test → isolate a single test file and a single seed.
- A UI bug → reduce to one route and one user state.
This single move turns debugging from detective work into science.
A practical phrasing you can embed in your template:
md
Provide the smallest input/config that still reproduces the issue.
If you can’t shrink it, explain why.
Make it safe to share (so people will actually fill it)
Templates fail when they demand information people can’t provide.
Add explicit safe-sharing guidance:
- “Redact tokens, cookies, and PII.”
- “If logs contain secrets, paste only the relevant lines and replace values with
<REDACTED>.” - “If you can’t share data, describe the shape of the data.”
Example:
md
Input shape: ~500KB JSON, contains 2 arrays (`items`, `discounts`), item count ~2,000.
Bug reproduces only when `discounts[].type = "tiered"`.
You’ll be surprised how often “data shape” is enough to unlock a fix.
Optional upgrade: add a “clarifying questions first” workflow
When issues are still too fuzzy, don’t jump to solutions. Add a simple rule for triage:
- Maintainer (or assistant) asks 5–10 targeted questions.
- Reporter answers.
- Only then do you propose a fix or a PR.
This prevents the classic failure mode: implementing a patch for an imagined problem.
Shipping this in a real repo (quick checklist)
- Keep the template to one screen (people don’t scroll).
- Mark most sections as “optional but recommended.”
- Make Expected vs Actual required.
- Include one filled-in example in your CONTRIBUTING.md.
- If you have multiple products, create separate templates (UI bug vs API bug vs performance issue).
When your bug reports improve, everything else improves with them:
- faster fixes
- better collaboration
- fewer “can you reproduce?” comments
- more reliable help from tools and teammates
If you want, take the template above, paste it into your tracker today, and adjust it after the first five issues. That feedback loop is where the real win is.
Top comments (0)