{"data":{"slug":"github-donchitos-claude-code-game-studios-claude-skills-regression-suite-b3af1a50f58b","title":"Regression Suite Audit and Coverage Mapping","summary":"Generate a regression test suite for bug fixes, audit test coverage against GDD critical paths, and report on test status and coverage gaps. If `qa.level: minimal`, the regression suite is not generated \u2014 report 'Regression suite not generated at qa.level minimal' and stop.","url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-regression-suite-b3af1a50f58b","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/github-donchitos-claude-code-game-studios-claude-skills-regression-suite-b3af1a50f58b","markdown_url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-regression-suite-b3af1a50f58b.md","download_url":"https:\/\/skillshunter.net\/skills\/github-donchitos-claude-code-game-studios-claude-skills-regression-suite-b3af1a50f58b\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Before running, ensure `qa.level` is set appropriately. At `qa.level: minimal`, the regression suite is not generated \u2014 report 'Regression suite not generated at qa.level minimal' and stop. Confirm with the user before creating or updating the manifest.","instructions":"---\nname: regression-suite\ndescription: \"Map test coverage to GDD critical paths, find fixed bugs lacking regression tests, flag drift from new features.\"\nargument-hint: \"[update | audit | report]\"\nuser-invocable: true\nallowed-tools: Read, Glob, Grep, Write, Edit, AskUserQuestion, Bash(bash \"*\/.claude\/skills\/regression-suite\/..\/..\/hooks\/yaml-helper.sh\" resolve_config *)\nmodel: sonnet\n---\n\n!`bash \"${CLAUDE_SKILL_DIR}\/..\/..\/hooks\/yaml-helper.sh\" resolve_config --keys automation,workflow,qa.level,system_overrides`\n\nResolved above \u2014 use as-is. No block \u2192 defaults in\n`.claude\/docs\/config-resolution.md`.\n\n\n# Regression Suite\n\nThis skill ensures that every bug fix is backed by a test that would have\ncaught the original bug \u2014 and that the regression suite stays current as the\ngame evolves. It also detects when new features have been added without\ncorresponding regression coverage.\n\nA regression suite is not a new test category \u2014 it is a **curated list of\ntests already in `tests\/`** that collectively cover the game's critical paths\nand known failure points. This skill maintains that list.\n\n**Output:** `tests\/regression-suite.md`\n\n**When to run:**\n- After fixing a bug (confirm a regression test was written or identify gap)\n- Before a phase gate \u2014 at `qa.level: full`, `\/gate-check` requires a regression suite\n- As part of sprint close to detect coverage drift\n\n---\n\nEvery `AskUserQuestion` call follows `.claude\/docs\/automation-modes.md`\n(collaborative asks always \u00b7 guided major-only \u00b7 autonomous logs and proceeds;\n`automation_always_ask` categories always prompt).\n\n**Workflow tier**: `modes.workflow` as resolved above \u2014 supplied by `modes.rigor`\nunless set explicitly \u2014 per `.claude\/docs\/workflow-modes.md`; in `audit` mode consider\n`workflow_overrides.system_overrides.<system>` per system as each GDD is read. It\nsets whether GDD critical paths are mapped or coverage is smoke-only \u2014 see Step 2c.\n\n**`qa.level`**: controls whether the suite is generated at\nall. At `minimal`, the regression suite is **not generated** (report that and\nstop); at `standard`, generate it at Polish-stage entry; at `full`, at\nProduction-stage entry. Distinct axis from `workflow`.\n\n## 1. Parse Arguments\n\n**Early `qa.level` guard (resolved above):** if `qa.level: minimal`, the\nregression suite is **not generated** \u2014 report \"Regression suite not generated at\nqa.level minimal\" and **STOP here, before any scan**, in every mode\n(`update` \/ `audit` \/ `report`). This is the `qa.level` axis; it is distinct from\nthe `workflow`-tier `minimal` branch in Step 2c (which only changes the\ncritical-path *source*, not *whether* the suite runs). Do not enter Step 2c's\n`minimal` branch on account of `qa.level`. This stop's verdict is\n**NOT ASSESSED** (Section 7) \u2014 tests are not required at this level, and nothing\nwas scanned.\n\n**Modes:**\n- `\/regression-suite update` \u2014 scan new bug fixes this sprint and check\n  for regression test presence; add new tests to the suite manifest\n- `\/regression-suite audit` \u2014 full audit of all GDD critical paths vs.\n  existing test coverage; flag paths with no regression test\n- `\/regression-suite report` \u2014 read-only status report (no writes); suitable\n  for sprint reviews\n- No argument \u2014 if a sprint is clearly active (sprint plan exists with in-progress stories), run `update`. If ambiguous or no active sprint is detected, use `AskUserQuestion`:\n  - Prompt: \"No subcommand specified. Which mode do you want to run?\"\n  - Options:\n    - `[A] update \u2014 scan new bug fixes this sprint and add missing regression tests`\n    - `[B] audit \u2014 full audit of all GDD critical paths vs. existing test coverage`\n    - `[C] report \u2014 read-only status report (no writes)`\n\n---\n\n## 2. Load Context\n\n### Step 2a \u2014 Load existing regression suite\n\nRead `tests\/regression-suite.md` if it exists. Extract:\n- Total registered regression tests\n- Last updated date\n- Any tests flagged as `STALE` or `QUARANTINED`\n\nIf it does not exist: note \"No regression suite found \u2014 will create one.\"\n\n### Step 2b \u2014 Load test inventory\n\nGlob all test files:\n```\ntests\/unit\/**\/*_test.*\ntests\/integration\/**\/*_test.*\ntests\/regression\/**\/*\n```\n\nFor each file, note the system (from directory path) and file name.\nDo not read test file contents unless needed for name-to-test mapping.\n\n### Step 2c \u2014 Load GDD critical paths\n\nFor `audit` mode: read `design\/gdd\/systems-index.md` to get all systems, then\nscope the scan by each system's workflow tier (resolved above):\n- **`full`** \u2014 read the GDD and map critical paths from all sections.\n- **`standard`** \u2014 same, from the required sections (Acceptance Criteria, Edge\n  Cases, and Formulas where the system defines numeric rules).\n  A system pinned higher via `system_overrides` is mapped at its higher tier.\n- **`minimal`** \u2014 **skip the GDD critical-path scan**. Instead read the latest\n  smoke-check report in `production\/qa\/smoke-*.md` and take the critical paths it\n  exercises as the regression scope (Step 3 maps coverage against those, not GDD\n  acceptance criteria). If no smoke report exists, stop with Verdict: **NOT\n  ASSESSED \u2014 no smoke report to take critical paths from** \u2014 there is no\n  critical-path source at minimal without one; run `\/smoke-check` first.\n\n(Tier affects `audit` mode only; `update` and `report` modes are tier-independent.)\n\nRead each GDD by section: find the headings you need with the Grep tool (pattern\n`^#`, content mode) and Read those ranges with offset and limit. At `full` that\nis every section, read in ranges, since a whole-file Read over 40 KB is refused.\n\nFor each in-scope MVP-tier system's GDD, extract:\n- Acceptance Criteria (these define the critical paths)\n- Formulas section (formulas must have regression tests)\n- Edge Cases section (known edge cases should have regression tests)\n\nFor `update` mode: skip full GDD scan. Instead read the current sprint plan\nand story files to find stories with Status: Complete this sprint.\n\n### Step 2d \u2014 Load closed bugs\n\nGlob `production\/qa\/bugs\/*.md` and filter for bugs with a `Status: Closed`\nor `Status: Fixed` field. Note:\n- Which story or system the bug was in\n- Whether a regression test was mentioned in the fix description\n\n---\n\n## 3. Map Coverage \u2014 Critical Paths\n\nFor `audit` mode only. (At `minimal` the critical paths come from the smoke-check\nreport identified in Step 2c, not from GDD acceptance criteria \u2014 map coverage\nagainst those smoke paths and skip the GDD-criterion loop below.)\n\nFor each GDD acceptance criterion, determine whether a test exists:\n\n1. Grep `tests\/unit\/[system]\/` and `tests\/integration\/[system]\/` for file names\n   and function names related to the criterion's key noun\/verb\n2. Assign coverage:\n\n| Status | Meaning |\n|--------|---------|\n| **COVERED** | A test file exists that targets this criterion's logic |\n| **PARTIAL** | A test exists but doesn't cover all cases (e.g. happy path only) |\n| **MISSING** | No test found for this critical path |\n| **EXEMPT** | Visual\/Feel or UI criterion \u2014 not automatable by design |\n\n3. Elevate MISSING items that correspond to formulas or state machines to\n   **HIGH PRIORITY** gap \u2014 these are the most likely regression sources.\n\n---\n\n## 4. Map Coverage \u2014 Fixed Bugs\n\nFor each closed bug:\n\n1. Extract the system slug from the bug's metadata\n2. Grep `tests\/unit\/[system]\/` and `tests\/integration\/[system]\/` for a test\n   that references the bug ID or the specific failure scenario\n3. Assign:\n   - **HAS REGRESSION TEST** \u2014 a test was found that would catch this bug\n   - **MISSING REGRESSION TEST** \u2014 bug was fixed but no test guards against recurrence\n\nFor MISSING REGRESSION TEST items:\n- Flag them as regression gaps\n- Suggest the test file path: `tests\/unit\/[system]\/[bug-slug]_regression_test.[ext]`\n- Note: \"Without this test, this bug can silently return in a future sprint.\"\n\n---\n\n## 5. Detect Coverage Drift\n\nCoverage drift occurs when the game grows but the regression suite doesn't.\n\nCheck for drift indicators:\n- Stories completed this sprint with no corresponding test files in `tests\/`\n- New systems added to `systems-index.md` since the last regression-suite update\n- GDD sections added or revised since the regression suite was last updated\n  (use Grep on GDD file modification hints if available, or ask the user)\n- `tests\/regression-suite.md` last-updated date vs. current date \u2014 if gap >\n  2 sprints, flag as likely stale\n\n---\n\n## 6. Generate Report and Suite Manifest\n\n### Report format (in conversation)\n\n```\n## Regression Suite Status\n\n**Mode**: [update | audit | report]\n**Existing registered tests**: [N]\n**Test files scanned**: [N]\n\n### Critical Path Coverage (audit mode only)\n| System | Total ACs | Covered | Partial | Missing | Exempt |\n|--------|-----------|---------|---------|---------|--------|\n| [name] | [N] | [N] | [N] | [N] | [N] |\n\n**Coverage rate (non-exempt)**: [N]%\n\n### Bug Regression Coverage\n| Bug ID | System | Severity | Has Regression Test? |\n|--------|--------|----------|----------------------|\n| BUG-NNNN | [system] | S[N] | YES \/ NO \u26a0 |\n\n**Bugs without regression tests**: [N]\n\n### Coverage Drift Indicators\n[List new systems or stories with no test coverage, or \"None detected.\"]\n\n### Recommended New Regression Tests\n| Priority | System | Suggested Test File | Covers |\n|----------|--------|---------------------|--------|\n| HIGH | [system] | `tests\/unit\/[system]\/[slug]_regression_test.[ext]` | BUG-NNNN \/ AC-[N] |\n| MEDIUM | [system] | `tests\/unit\/[system]\/[slug]_test.[ext]` | [criterion] |\n```\n\n### Suite manifest format (`tests\/regression-suite.md`)\n\n> **Before computing coverage, check the denominator.** If the GDD\n> glob returns **zero critical paths**, or the test globs return **zero test\n> files**, do not emit a percentage \u2014 report\n> `Coverage: NOT ASSESSED \u2014 [no GDDs found | no test files found]` and name which\n> side was empty and the skill that produces it (`\/map-systems` and\n> `\/design-system` for GDDs, `\/test-setup` for the test scaffold).\n>\n> A percentage computed from an empty denominator is not a low score; it is not a\n> number. `0%` reads as \"measured and terrible\" and `100%` as \"measured and\n> perfect\" \u2014 both are claims about a comparison that never happened. This is the\n> same defect `\/scope-check` carries a Phase 4 guard against, in the same words:\n> *\"a percentage computed from no baseline items is not a small number; it is not\n> a number.\"*\n\nThe manifest is a curated index \u2014 not the tests themselves, but a registry\nof which tests should always pass before a release:\n\n```markdown\n# Regression Suite Manifest\n\n> Last Updated: [date]\n> Total registered tests: [N]\n> Coverage: [N]% of GDD critical paths\n\n## How to run\n\n[Engine-specific command to run all regression tests]\n\n## Registered Regression Tests\n\n### [System Name]\n\n| Test File | Test Function (if known) | Covers | Added |\n|-----------|--------------------------|--------|-------|\n| `tests\/unit\/[system]\/[file]_test.[ext]` | `test_[scenario]` | AC-N \/ BUG-NNNN | [date] |\n\n## Known Gaps\n\nTests that should exist but don't yet:\n\n| Priority | System | Suggested Path | Covers | Reason Not Yet Written |\n|----------|--------|----------------|--------|------------------------|\n| HIGH | [system] | `tests\/unit\/[system]\/[path]` | BUG-NNNN | Bug fixed without test |\n\n## Quarantined Tests\n\nTests that are flaky or disabled (do not run in CI):\n\n| Test File | Function | Reason | Quarantined Since |\n|-----------|----------|--------|-------------------|\n| (none) | | | |\n```\n\n---\n\n## 7. Write Output\n\nIn `update` or `audit` mode, ask: \"May I write\/update `tests\/regression-suite.md` with the current\nregression suite manifest?\"\n\nFor `update` mode: append new entries; never remove existing entries\n(use `Edit` with targeted insertions).\nFor `audit` mode: rewrite the full manifest with updated coverage data.\nFor `report` mode: do not write anything.\n\nAfter writing (if approved):\n\n- For each HIGH priority gap: \"Consider creating the missing regression test\n  before the next sprint. Run `\/test-helpers` to scaffold the test file.\"\n- If bug regression gaps > 0: \"These bugs can silently return without regression\n  tests. The next sprint should include a story to write the missing tests.\"\n- If coverage drift detected: \"Regression suite may be drifting. Consider\n  running `\/regression-suite audit` at the next sprint boundary.\"\n\nAt `workflow: minimal`, which has no sprints, say \"next story\" for \"next sprint\" in the three lines above.\n\nVerdict, first match wins:\n- **NOT ASSESSED** \u2014 the Section 1 stop at `qa.level: minimal`: \"Regression\n  suite not generated at qa.level minimal\". Tests are not required at this\n  level; nothing was scanned or written.\n- **NOT ASSESSED** \u2014 the `minimal` stop above: no smoke report to take critical\n  paths from; name `\/smoke-check` as the fix.\n- **NOT ASSESSED** \u2014 coverage came back `Coverage: NOT ASSESSED \u2014 [reason]` (no GDDs or\n  no test files); name the reason. Never report COMPLETE over a coverage figure\n  that was not computed.\n- **BLOCKED** \u2014 `update` or `audit` mode and the user declined the write.\n- **COMPLETE** \u2014 `update` \/ `audit`: regression suite updated; `report`: coverage\n  report shown (report mode writes nothing).\n\n---\n\n## Collaborative Protocol\n\n**Applies in `collaborative` mode (the default).** For `guided` and\n`autonomous` modes, see `.claude\/docs\/automation-modes.md` \u2014 the rules below\ndescribe what collaborative mode requires, not universal behavior.\n\n- **Never remove existing regression tests from the manifest** without\n  explicit user approval \u2014 removing a test that was deliberately written is a\n  regression risk itself\n- **Gaps are advisory, not blocking** \u2014 surface them clearly but do not prevent\n  other work from proceeding (except at `qa.level: full`, where phase gates require the regression suite)\n- **Quarantine is not deletion** \u2014 tests with intermittent failures should be\n  quarantined (noted in manifest) but not removed; they should be fixed by\n  `\/test-flakiness`\n- **Ask before writing** \u2014 always confirm before creating or updating the manifest\n","use_cases":["Audit regression test coverage against GDD critical paths","Identify missing regression tests for fixed bugs","Generate a report on regression test status and coverage gaps"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/Donchitos\/Claude-Code-Game-Studios\/blob\/abc0de79d6ceb0b5d7aa693945849b3937afbe6a\/.claude\/skills\/regression-suite\/SKILL.md","source_commit":"abc0de79d6ceb0b5d7aa693945849b3937afbe6a","license":null,"version":null,"listing_approved_at":"2026-11-18","created_at":"2026-11-17T19:02:26.000000Z","updated_at":"2026-11-18T12:52:01.000000Z","seo_title":"Regression Suite Audit and Coverage Mapping","seo_description":"Generate a regression test suite for bug fixes, audit test coverage against GDD critical paths, and report on test status and coverage gaps. If `qa.level: minimal`, the\u56de\u5f52","seo_keywords":["regression test audit","bug fix test coverage","GDD critical path coverage","regression suite status","test coverage report"]}}