Generate regression tests when bugs are discovered during /debug or continuous checks. Auto-detects test framework, creates Arrange-Act-Assert tests, and links to error-log.md entries. (project)
<quick_start> Generate regression test for a bug:
tests/regression/ and update error-log.mdKey principle: Tests should FAIL before the fix is applied (proves bug exists). </quick_start>
<prerequisites> Before generating regression test: - Bug has been identified with symptoms and reproduction steps - Root cause determined (from 5 Whys or debugging) - Component/file affected is known - Error ID assigned (ERR-XXXX) or will be assignedCheck error-log.md to avoid duplicate tests for same error. </prerequisites>
<workflow> <step number="1"> **Collect bug details**Extract from debug context:
StudentProgressService.fetchExternalData)Example:
error_id: ERR-0042