# Bugfix Prompt Templates

- **General bug investigation**
  "Investigate bug in <ComponentName>. Reproduce with prop/state combo. Inspect src/components/<name>/index.tsx and related styles/helpers. Check `reset`/`isForceUpdate` handling and event callbacks."

- **Root cause analysis**
  "Trace the failing behavior in <ComponentName>. Map input props → internal state → rendered output. Verify helper usage (formatNumber, generateMessageQuestion, etc.) and external deps. Document findings in .agent/change-log.md."

- **Safe fix with minimal regression**
  "Implement minimal change to fix <issue> in <ComponentName>. Avoid altering public prop shapes; add guards/tests if possible. Update types and styles only where necessary."

- **Query/formatting bug fix**
  "Fix data formatting or color/status mapping in src/assets/javascripts/helper.ts or function.ts. Keep return types and callers intact."

- **API (prop) bug fix**
  "Adjust prop handling for <prop> in <ComponentName>. Ensure defaults and optional props are preserved. Update typed.ts if required."

- **Frontend UI bug fix**
  "Correct UI glitch in <ComponentName> styles (src/components/<name>/styles.ts). Verify CSS variables and responsive rules. Keep DOM structure stable for consumers."
