Bug Report
Instructions
Create a bug report document for $ARGUMENTS in docs/bugs/. $ARGUMENTS is a description
of the bug, a reference to a use case (UC-XXX) or technical task (TT-XXX) where
the bug was discovered, or a full GitHub issue URL.
Origin Detection
Determine the origin of the bug report from $ARGUMENTS:
github-issue — $ARGUMENTS contains a GitHub issue URL (e.g., https://github.com/owner/repo/issues/42). The issue already exists and is the source of truth.
human-in-the-loop — $ARGUMENTS is a description or artifact reference with no issue URL. The bug report document becomes the source of truth and a new GitHub issue will be created.
DO NOT
- Write vague reproduction steps that cannot be followed independently
- Guess the root cause unless evidence is clear — state what is observed, not what is assumed
- Combine multiple unrelated bugs in one report
- Downplay severity — classify based on actual user or system impact
- Skip searching for related bugs — check
docs/bugs/ for duplicates first
Nexa Rules Gate
Read and follow ${CLAUDE_PLUGIN_ROOT}/shared/readiness/NEXA_RULES_GATE.md.
Template
Use templates/bug-report.md as the document structure.
Example Bug Report
Bug Report: Order total ignores discount codes
Overview
|
|
| Bug ID |
BUG-003 |
| Title |
Order total ignores discount codes |
| Severity |
High |
| Status |
Open |
| Discovered In |
UC-012 (Place Order) |
| Reported By |
Evaluation of UC-012 |
| Origin |
human-in-the-loop |
| GitHub Issue |
https://github.com/acme/store/issues/47 |
Description
When a valid discount code is applied to an order, the order summary displays the
discounted line items correctly, but the final total is calculated from the original
(undiscounted) prices. The user is charged more than expected.
Steps to Reproduce
- Log in as a customer with an active account
- Add any item to the cart
- Navigate to checkout
- Enter discount code
SAVE20 (a valid 20% discount)
- Observe the line item prices (correctly discounted)
- Observe the order total
Expected Behavior
The order total equals the sum of the discounted line item prices plus tax and shipping.
Actual Behavior
The order total equals the sum of the original (undiscounted) line item prices plus tax
and shipping. The discount is visually applied to line items but not reflected in the total.
Environment
- Browser: Chrome 125
- OS: macOS 14.5
- Application version: commit
a1b2c3d
Related Artifacts
- Use Case: UC-012 (Place Order)
- Business Rule: BR-007 (Discount Application)
- Affected Files:
src/services/order-service.ts, src/components/checkout/OrderSummary.tsx
Workflow
- Check
docs/bugs/ for existing bug reports to determine the next BUG-XXX ID and avoid duplicates
- If origin is
github-issue:
a. Read the issue body using gh issue view <issue-number> --json title,body,labels
b. Extract the bug description, reproduction steps, and any context from the issue
c. Set the Origin field to the full GitHub issue URL
d. Set the GitHub Issue field to the same URL — do NOT create a new issue
- If origin is
human-in-the-loop:
a. Reproduce the bug or gather evidence from the user's description, logs, or test output
b. Set the Origin field to human-in-the-loop
- Write clear, numbered reproduction steps that another developer can follow
- Document expected vs actual behavior precisely
- Classify severity based on impact:
- Critical — System crash, data loss, security vulnerability, or complete feature failure
- High — Major feature broken, no workaround, affects many users
- Medium — Feature partially broken, workaround exists, or affects limited users
- Low — Cosmetic issue, minor inconvenience, or edge case
- Identify related artifacts (use cases, business rules, affected files)
- Set status to Open
- If origin is
human-in-the-loop:
a. Create a GitHub tracking issue by following the Before Implementation steps in ${CLAUDE_PLUGIN_ROOT}/shared/tracking/TRACKING.md
b. Update the bug report's GitHub Issue field with the issue URL
- If origin is
github-issue:
a. Follow the Before Implementation steps in ${CLAUDE_PLUGIN_ROOT}/shared/tracking/TRACKING.md — the issue already exists, so only ensure the bug .md and the issue link to each other (no new issue is created)
1---2name: report-bug3description: Creates structured bug report documents with reproduction steps, expected vs actual behavior, and severity classification. Use when the user asks to "report a bug", "file a bug", "document a defect", "log an issue", or mentions a bug, defect, regression, or unexpected behavior that needs to be tracked.4---56# Bug Report78## Instructions910Create a bug report document for $ARGUMENTS in `docs/bugs/`. $ARGUMENTS is a description11of the bug, a reference to a use case (`UC-XXX`) or technical task (`TT-XXX`) where12the bug was discovered, or a full GitHub issue URL.1314## Origin Detection1516Determine the **origin** of the bug report from $ARGUMENTS:1718- **`github-issue`** — $ARGUMENTS contains a GitHub issue URL (e.g., `https://github.com/owner/repo/issues/42`). The issue already exists and is the source of truth.19- **`human-in-the-loop`** — $ARGUMENTS is a description or artifact reference with no issue URL. The bug report document becomes the source of truth and a new GitHub issue will be created.2021## DO NOT2223- Write vague reproduction steps that cannot be followed independently24- Guess the root cause unless evidence is clear — state what is observed, not what is assumed25- Combine multiple unrelated bugs in one report26- Downplay severity — classify based on actual user or system impact27- Skip searching for related bugs — check `docs/bugs/` for duplicates first2829## Nexa Rules Gate3031Read and follow `${CLAUDE_PLUGIN_ROOT}/shared/readiness/NEXA_RULES_GATE.md`.3233## Template3435Use [templates/bug-report.md](templates/bug-report.md) as the document structure.3637## Example Bug Report3839# Bug Report: Order total ignores discount codes4041## Overview4243| | |44|---|---|45| **Bug ID** | BUG-003 |46| **Title** | Order total ignores discount codes |47| **Severity** | High |48| **Status** | Open |49| **Discovered In** | UC-012 (Place Order) |50| **Reported By** | Evaluation of UC-012 |51| **Origin** | `human-in-the-loop` |52| **GitHub Issue** | https://github.com/acme/store/issues/47 |5354## Description5556When a valid discount code is applied to an order, the order summary displays the57discounted line items correctly, but the final total is calculated from the original58(undiscounted) prices. The user is charged more than expected.5960## Steps to Reproduce61621. Log in as a customer with an active account632. Add any item to the cart643. Navigate to checkout654. Enter discount code `SAVE20` (a valid 20% discount)665. Observe the line item prices (correctly discounted)676. Observe the order total6869## Expected Behavior7071The order total equals the sum of the discounted line item prices plus tax and shipping.7273## Actual Behavior7475The order total equals the sum of the original (undiscounted) line item prices plus tax76and shipping. The discount is visually applied to line items but not reflected in the total.7778## Environment7980- Browser: Chrome 12581- OS: macOS 14.582- Application version: commit `a1b2c3d`8384## Related Artifacts8586- **Use Case:** UC-012 (Place Order)87- **Business Rule:** BR-007 (Discount Application)88- **Affected Files:** `src/services/order-service.ts`, `src/components/checkout/OrderSummary.tsx`8990## Workflow91921. Check `docs/bugs/` for existing bug reports to determine the next BUG-XXX ID and avoid duplicates932. **If origin is `github-issue`:**94 a. Read the issue body using `gh issue view <issue-number> --json title,body,labels`95 b. Extract the bug description, reproduction steps, and any context from the issue96 c. Set the **Origin** field to the full GitHub issue URL97 d. Set the **GitHub Issue** field to the same URL — do NOT create a new issue983. **If origin is `human-in-the-loop`:**99 a. Reproduce the bug or gather evidence from the user's description, logs, or test output100 b. Set the **Origin** field to `human-in-the-loop`1014. Write clear, numbered reproduction steps that another developer can follow1025. Document expected vs actual behavior precisely1036. Classify severity based on impact:104 - **Critical** — System crash, data loss, security vulnerability, or complete feature failure105 - **High** — Major feature broken, no workaround, affects many users106 - **Medium** — Feature partially broken, workaround exists, or affects limited users107 - **Low** — Cosmetic issue, minor inconvenience, or edge case1087. Identify related artifacts (use cases, business rules, affected files)1098. Set status to Open1109. **If origin is `human-in-the-loop`:**111 a. Create a GitHub tracking issue by following the **Before Implementation** steps in `${CLAUDE_PLUGIN_ROOT}/shared/tracking/TRACKING.md`112 b. Update the bug report's **GitHub Issue** field with the issue URL11310. **If origin is `github-issue`:**114 a. Follow the **Before Implementation** steps in `${CLAUDE_PLUGIN_ROOT}/shared/tracking/TRACKING.md` — the issue already exists, so only ensure the bug `.md` and the issue link to each other (no new issue is created)