Create Bug Report
Overview
Create a comprehensive, actionable bug report with all the information needed for a developer to reproduce, understand, and fix the issue. Every bug report must include reproduction steps, environment details, and a clear distinction between expected and actual behavior.
Workflow
Read project context — Check .chalk/docs/ for:
- Architecture docs (to identify the affected component)
- Previous bug reports (to match format and conventions)
- Any known issues or recent changes that might be related
- Version information from
package.json, pyproject.toml, etc.
Gather bug details — From $ARGUMENTS and conversation context, extract:
- What the user observed (the actual behavior)
- What the user expected to happen
- When the bug was first noticed
- How consistently the bug occurs (always, sometimes, once)
- Any error messages, logs, or stack traces
- If details are missing, ask the user targeted questions (see Required Information below)
Determine environment — Identify or ask for:
- Application version or commit hash
- Operating system and version
- Browser and version (for web apps)
- Device type (for mobile apps)
- Relevant configuration (feature flags, user role, locale)
- Environment (production, staging, local)
Write reproduction steps — Convert the user's description into numbered, specific steps:
- Start from a known state (e.g., "logged in as a standard user")
- Each step is a single, observable action
- Include specific data used (e.g., "enter 'test@example.com' in the email field" not "enter an email")
- Note the exact point where the bug manifests
- If the bug is intermittent, note the approximate reproduction rate
Assign severity — Using the severity matrix:
- Critical: Data loss, security vulnerability, complete feature outage, no workaround
- High: Major feature broken, significant impact, difficult workaround
- Medium: Feature degraded, workaround exists, moderate impact
- Low: Cosmetic issue, minor inconvenience, easy workaround
Identify bisect hint — If possible, determine:
- When did this last work correctly? (version, date, or commit)
- What changed between "working" and "broken"? (deployment, config change, data migration)
- This narrows the investigation scope dramatically
Check for related issues — Search .chalk/docs/engineering/ for:
- Similar bug reports (to avoid duplicates)
- Related bugs that might share a root cause
- Relevant architecture or design decisions that provide context
Determine the next file number — List files in .chalk/docs/engineering/ matching *_bug_*. Find the highest number and increment by 1.
Write the bug report — Save to .chalk/docs/engineering/<n>_bug_<slug>.md or format for GitHub issue as requested.
Confirm — Present the bug report to the user. Highlight any missing information that would improve the report.
Filename Convention
<number>_bug_<snake_case_slug>.md
Examples:
6_bug_login_timeout_on_slow_connections.md
13_bug_duplicate_orders_on_retry.md
Bug Report Format
# Bug: <Descriptive Title>
**Reported**: <YYYY-MM-DD>
**Severity**: Critical | High | Medium | Low
**Status**: Open
**Component**: <affected component or module>
**Reporter**: <name or identifier>
## Environment
| Field | Value |
|-------|-------|
| App Version | <version or commit hash> |
| OS | <OS name and version> |
| Browser | <browser and version, if applicable> |
| Device | <device type, if applicable> |
| Environment | Production / Staging / Local |
| User Role | <role or permissions level> |
| Feature Flags | <any relevant flags enabled/disabled> |
## Summary
<1-2 sentence description of the bug. What is broken and what is the user impact.>
## Steps to Reproduce
**Preconditions**: <Starting state, e.g., "Logged in as a user with admin role, on the dashboard page">
1. <Specific action with specific data>
2. <Next specific action>
3. <Action where the bug manifests>
**Reproduction rate**: Always | ~X% of attempts | Intermittent (seen X times out of Y attempts)
## Expected Behavior
<What should happen when following the steps above.>
## Actual Behavior
<What actually happens. Be specific: include error messages, incorrect values, visual glitches.>
## Error Output
<Stack trace, console errors, server logs, or error messages. Use code blocks.>
Screenshots / Recordings
Bisect Hint
| Field |
Value |
| Last Known Working |
<version, date, or "unknown"> |
| First Known Broken |
<version, date, or "current"> |
| Suspected Cause |
<recent deployment, config change, data migration, or "unknown"> |
Impact Assessment
| Dimension |
Assessment |
| Users Affected |
All / Most / Some / Few |
| Frequency |
Every time / Often / Sometimes / Rarely |
| Workaround |
None / |
| Data Impact |
Data loss / Data corruption / No data impact |
| Revenue Impact |
|
Related Issues
Additional Context
<Any other information that might help: recent changes, similar bugs in the past, relevant configuration, user reports.>
## Required Information Checklist
Before submitting, ensure these fields are populated:
| Field | Required | Why |
|-------|----------|-----|
| Descriptive title | Yes | "Login broken" is not actionable; "Login fails with 500 error when password contains special characters" is |
| Environment details | Yes | Bugs are often environment-specific. Without this, developers waste time on "works for me" |
| Steps to reproduce | Yes | The single most important section. Without this, developers cannot verify the fix |
| Expected behavior | Yes | Clarifies whether the bug is a misunderstanding or a real defect |
| Actual behavior | Yes | Must be specific: error messages, incorrect values, not just "it does not work" |
| Severity | Yes | Drives prioritization. Use the matrix, not gut feeling |
| Error output | If available | Stack traces and error messages cut investigation time dramatically |
| Bisect hint | If known | Narrows investigation from "the entire codebase" to "changes in the last week" |
If any required field is missing, ask the user for it before finalizing the report.
## Title Guidelines
A good bug title answers: **What is broken** and **under what condition**.
| Bad Title | Good Title |
|-----------|------------|
| Login broken | Login returns 500 when password contains special characters |
| Slow page | Dashboard takes 30s to load with 1000+ items |
| Error on save | Document save fails silently when title exceeds 255 characters |
| UI issue | Dropdown menu overlaps submit button on mobile viewport |
| It does not work | CSV export produces empty file when date range exceeds 90 days |
## Anti-patterns
- **"It does not work"** — A bug report without specific symptoms is not actionable. What exactly does not work? What error appears? What data is affected? Vague descriptions lead to back-and-forth that delays fixes.
- **No reproduction steps** — "I clicked around and it broke" forces the developer to guess. Numbered, specific steps from a known starting state are mandatory. If the bug cannot be reproduced, say so explicitly and describe the circumstances where it was observed.
- **Wrong severity** — A misaligned button is not Critical. A data loss bug is not Low. Use the severity matrix consistently. Mis-categorized severity causes either panic over minor issues or delayed response to real emergencies.
- **No environment information** — "It broke on my machine" without OS, browser, version, and configuration details wastes debugging time. Environment-specific bugs are common, and developers need this information to reproduce them.
- **Mixing multiple bugs in one report** — Each bug report should describe exactly one defect. If two things are broken, file two reports. Combined reports are hard to track, hard to assign, and hard to mark as resolved.
- **Blaming instead of describing** — "The backend team broke login" is not a bug report. Describe the observable behavior without assigning blame. Root cause analysis happens during investigation, not during filing.
- **No bisect hint when one is available** — If the user knows it worked last week and broke after Tuesday's deploy, that information is gold. Always ask "when did this last work?" — it can narrow investigation from days to hours.
- **Screenshots without context** — A screenshot of an error message is helpful. A screenshot without explanation of what the user was doing or what they expected is not. Always pair visual evidence with textual description.
1---2name: create-bug-report3description: Create a structured bug report when the user reports a bug, wants to file an issue, document a defect, or needs help writing a bug report with proper reproduction steps4---5
6# Create Bug Report
7
8## Overview
9
10Create a comprehensive, actionable bug report with all the information needed for a developer to reproduce, understand, and fix the issue. Every bug report must include reproduction steps, environment details, and a clear distinction between expected and actual behavior.
11
12## Workflow
13
141. **Read project context** — Check `.chalk/docs/` for:
15 - Architecture docs (to identify the affected component)
16 - Previous bug reports (to match format and conventions)
17 - Any known issues or recent changes that might be related
18 - Version information from `package.json`, `pyproject.toml`, etc.
19
202. **Gather bug details** — From `$ARGUMENTS` and conversation context, extract:
21 - What the user observed (the actual behavior)
22 - What the user expected to happen
23 - When the bug was first noticed
24 - How consistently the bug occurs (always, sometimes, once)
25 - Any error messages, logs, or stack traces
26 - If details are missing, ask the user targeted questions (see Required Information below)
27
283. **Determine environment** — Identify or ask for:
29 - Application version or commit hash
30 - Operating system and version
31 - Browser and version (for web apps)
32 - Device type (for mobile apps)
33 - Relevant configuration (feature flags, user role, locale)
34 - Environment (production, staging, local)
35
364. **Write reproduction steps** — Convert the user's description into numbered, specific steps:
37 - Start from a known state (e.g., "logged in as a standard user")
38 - Each step is a single, observable action
39 - Include specific data used (e.g., "enter 'test@example.com' in the email field" not "enter an email")
40 - Note the exact point where the bug manifests
41 - If the bug is intermittent, note the approximate reproduction rate
42
435. **Assign severity** — Using the severity matrix:
44 - **Critical**: Data loss, security vulnerability, complete feature outage, no workaround
45 - **High**: Major feature broken, significant impact, difficult workaround
46 - **Medium**: Feature degraded, workaround exists, moderate impact
47 - **Low**: Cosmetic issue, minor inconvenience, easy workaround
48
496. **Identify bisect hint** — If possible, determine:
50 - When did this last work correctly? (version, date, or commit)
51 - What changed between "working" and "broken"? (deployment, config change, data migration)
52 - This narrows the investigation scope dramatically
53
547. **Check for related issues** — Search `.chalk/docs/engineering/` for:
55 - Similar bug reports (to avoid duplicates)
56 - Related bugs that might share a root cause
57 - Relevant architecture or design decisions that provide context
58
598. **Determine the next file number** — List files in `.chalk/docs/engineering/` matching `*_bug_*`. Find the highest number and increment by 1.
60
619. **Write the bug report** — Save to `.chalk/docs/engineering/<n>_bug_<slug>.md` or format for GitHub issue as requested.
62
6310. **Confirm** — Present the bug report to the user. Highlight any missing information that would improve the report.
64
65## Filename Convention
66
67```
68<number>_bug_<snake_case_slug>.md
69```
70
71Examples:
72- `6_bug_login_timeout_on_slow_connections.md`
73- `13_bug_duplicate_orders_on_retry.md`
74
75## Bug Report Format
76
77```markdown
78# Bug: <Descriptive Title>
79
80**Reported**: <YYYY-MM-DD>
81**Severity**: Critical | High | Medium | Low
82**Status**: Open
83**Component**: <affected component or module>
84**Reporter**: <name or identifier>
85
86## Environment
87
88| Field | Value |
89|-------|-------|
90| App Version | <version or commit hash> |
91| OS | <OS name and version> |
92| Browser | <browser and version, if applicable> |
93| Device | <device type, if applicable> |
94| Environment | Production / Staging / Local |
95| User Role | <role or permissions level> |
96| Feature Flags | <any relevant flags enabled/disabled> |
97
98## Summary
99
100<1-2 sentence description of the bug. What is broken and what is the user impact.>
101
102## Steps to Reproduce
103
104**Preconditions**: <Starting state, e.g., "Logged in as a user with admin role, on the dashboard page">
105
1061. <Specific action with specific data>
1072. <Next specific action>
1083. <Action where the bug manifests>
109
110**Reproduction rate**: Always | ~X% of attempts | Intermittent (seen X times out of Y attempts)
111
112## Expected Behavior
113
114<What should happen when following the steps above.>
115
116## Actual Behavior
117
118<What actually happens. Be specific: include error messages, incorrect values, visual glitches.>
119
120## Error Output
121
122<Stack trace, console errors, server logs, or error messages. Use code blocks.>
123
124```
125<paste error output here>
126```
127
128## Screenshots / Recordings
129
130<Describe what the screenshot or recording would show. Reference attached files if available.>
131
132## Bisect Hint
133
134| Field | Value |
135|-------|-------|
136| Last Known Working | <version, date, or "unknown"> |
137| First Known Broken | <version, date, or "current"> |
138| Suspected Cause | <recent deployment, config change, data migration, or "unknown"> |
139
140## Impact Assessment
141
142| Dimension | Assessment |
143|-----------|-----------|
144| Users Affected | All / Most / Some / Few |
145| Frequency | Every time / Often / Sometimes / Rarely |
146| Workaround | None / <describe workaround> |
147| Data Impact | Data loss / Data corruption / No data impact |
148| Revenue Impact | <if applicable> |
149
150## Related Issues
151
152- <Link or reference to related bugs, PRs, or architecture decisions>
153
154## Additional Context
155
156<Any other information that might help: recent changes, similar bugs in the past, relevant configuration, user reports.>
157```
158
159## Required Information Checklist
160
161Before submitting, ensure these fields are populated:
162
163| Field | Required | Why |
164|-------|----------|-----|
165| Descriptive title | Yes | "Login broken" is not actionable; "Login fails with 500 error when password contains special characters" is |
166| Environment details | Yes | Bugs are often environment-specific. Without this, developers waste time on "works for me" |
167| Steps to reproduce | Yes | The single most important section. Without this, developers cannot verify the fix |
168| Expected behavior | Yes | Clarifies whether the bug is a misunderstanding or a real defect |
169| Actual behavior | Yes | Must be specific: error messages, incorrect values, not just "it does not work" |
170| Severity | Yes | Drives prioritization. Use the matrix, not gut feeling |
171| Error output | If available | Stack traces and error messages cut investigation time dramatically |
172| Bisect hint | If known | Narrows investigation from "the entire codebase" to "changes in the last week" |
173
174If any required field is missing, ask the user for it before finalizing the report.
175
176## Title Guidelines
177
178A good bug title answers: **What is broken** and **under what condition**.
179
180| Bad Title | Good Title |
181|-----------|------------|
182| Login broken | Login returns 500 when password contains special characters |
183| Slow page | Dashboard takes 30s to load with 1000+ items |
184| Error on save | Document save fails silently when title exceeds 255 characters |
185| UI issue | Dropdown menu overlaps submit button on mobile viewport |
186| It does not work | CSV export produces empty file when date range exceeds 90 days |
187
188## Anti-patterns
189
190- **"It does not work"** — A bug report without specific symptoms is not actionable. What exactly does not work? What error appears? What data is affected? Vague descriptions lead to back-and-forth that delays fixes.
191- **No reproduction steps** — "I clicked around and it broke" forces the developer to guess. Numbered, specific steps from a known starting state are mandatory. If the bug cannot be reproduced, say so explicitly and describe the circumstances where it was observed.
192- **Wrong severity** — A misaligned button is not Critical. A data loss bug is not Low. Use the severity matrix consistently. Mis-categorized severity causes either panic over minor issues or delayed response to real emergencies.
193- **No environment information** — "It broke on my machine" without OS, browser, version, and configuration details wastes debugging time. Environment-specific bugs are common, and developers need this information to reproduce them.
194- **Mixing multiple bugs in one report** — Each bug report should describe exactly one defect. If two things are broken, file two reports. Combined reports are hard to track, hard to assign, and hard to mark as resolved.
195- **Blaming instead of describing** — "The backend team broke login" is not a bug report. Describe the observable behavior without assigning blame. Root cause analysis happens during investigation, not during filing.
196- **No bisect hint when one is available** — If the user knows it worked last week and broke after Tuesday's deploy, that information is gold. Always ask "when did this last work?" — it can narrow investigation from days to hours.
197- **Screenshots without context** — A screenshot of an error message is helpful. A screenshot without explanation of what the user was doing or what they expected is not. Always pair visual evidence with textual description.