agentleFS
cenconq25cenconq25/claude-code-app-studio/.claude/skills/regression-suite/SKILL.md

regression-suite

Skill40 starsChanged 7 months agoMITView on GitHub

Map test coverage to PRD critical paths, identify fixed bugs without regression tests, flag coverage drift from new features, and maintain tests/regression-suite.md. Run after a bug fix or before a release gate.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use vertical-slice.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • hongyuancSkill

    vertical-slice

    Build and evaluate a production-quality vertical slice before advancing from Pre-Production to Production.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All PRDs under design/prd/ — extract every Acceptance Criteria block marked critical or revenue-affecting.

    line 34
  2. Very specific:

    If tests/regression/ does not exist, propose creating it.

    line 42
  3. Distinctive:

    Use AskUserQuestion to batch decisions:

    line 97

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Regression Suite

A regression suite is the set of tests that must keep passing forever. This skill maintains the explicit list, traces it back to PRD critical paths and known-bug history, and surfaces gaps before release.


Phase 1: Modes

Parse the argument:

  • --audit (default): re-evaluate the whole suite, identify gaps, suggest fixes.
  • --add-bug=BUG-ID: add a regression test entry for a specific bug.
  • --add-path=<name>: add a regression entry for a critical-path PRD flow.

Phase 2: Load the Sources of Truth

Read in parallel:

  • All PRDs under design/prd/ — extract every Acceptance Criteria block marked critical or revenue-affecting.
  • production/qa/bugs/ — every closed bug with severity S1 or S2.
  • tests/regression/ directory — existing regression test files.
  • tests/regression-suite.md if present — the registry.
  • production/milestones/ — current milestone scope to know which paths are in active scope.

If tests/regression/ does not exist, propose creating it.


Phase 3: Build the Coverage Matrix

Construct a table mapping each entry to a test file:

SourceReferenceRequiredTest fileStatus
PRDonboarding-flow.prd.md AC-3YEStests/regression/onboarding/sign_up_test.tscovered
PRDpaywall.prd.md AC-7YES(none)MISSING
BugBUG-042 (force logout)YEStests/regression/auth/refresh_token_test.tscovered
BugBUG-051 (paywall double-charge)YES(none)MISSING

Detection rules:

  • A PRD AC is critical if the AC is tagged Critical:, P0:, or its parent flow is on the launch checklist.
  • A bug requires a regression test if its severity was S1 or S2 AND its closing comment did not explicitly waive a test.
  • A test "covers" an entry only if it actually asserts the failing scenario (not just runs the code path). Confirm by reading the test.

Phase 4: Identify Gaps

Three buckets:

  1. PRD critical paths without a regression test — the highest-priority gap. Usually means a launch-blocking flow has no permanent guard.
  2. Closed S1/S2 bugs without a regression test — the bug is fixed but the fix is not pinned, so it can re-emerge.
  3. Drift — tests that reference removed code, fixtures from deleted features, or assertions about replaced UI strings.

For each drift entry, propose deletion or update.


Phase 5: Recommend or Create Regression Tests

For each gap, render a recommendation:

### MISSING: BUG-051 — paywall double-charge
Source: production/qa/bugs/BUG-051-paywall-double-charge.md
Suggested test path: tests/regression/paywall/double_charge_test.ts
Assertion sketch:
  - Trigger purchase event twice within the debounce window.
  - Expect: exactly one billing API call.
Owner: assign to the engineer who closed the bug.

Use AskUserQuestion to batch decisions:

  • [A] Generate test stubs for all gaps
  • [B] Generate stubs for top N
  • [C] Open follow-up stories instead of writing stubs now
  • [D] Skip — I'll handle it

For [A] or [B], spawn a per-test plan: file path, function names, fixture needs. Ask before each Write.


Phase 6: Maintain tests/regression-suite.md

Render the registry:

# Regression Suite

Last reviewed: [date]
Coverage: [P]% of PRD critical paths, [Q]% of closed S1/S2 bugs.

## PRD Critical Paths

| Path | PRD ref | Test |
|------|---------|------|
| Sign-up + email verify | onboarding-flow.prd.md AC-3 | tests/regression/onboarding/sign_up_test.ts |
| First paywall view | paywall.prd.md AC-7 | tests/regression/paywall/first_view_test.ts |

## Bug Regressions

| Bug | Title | Severity | Test |
|-----|-------|----------|------|
| BUG-042 | Force logout on token refresh fail | S1 | tests/regression/auth/refresh_token_test.ts |

## Drift / Stale
[list anything that needs deletion]

## How to add an entry
- After fixing an S1/S2 bug, run `/regression-suite --add-bug=BUG-NNN`.
- After approving a new PRD critical path, run `/regression-suite --add-path=<name>`.

Ask before writing.


Phase 7: Output

Render:

## Regression Suite Audit — [date]

Coverage:
- PRD critical paths covered: [P]/[total]
- Closed S1/S2 bugs covered: [Q]/[total]

Gaps requiring action: [N]
- [list, each with suggested file path]

Drift: [M] entries to remove/update

Verdict: [HEALTHY | NEEDS WORK | BLOCKING — release would lose coverage]

Quality Gates / PASS-FAIL

  • HEALTHY — every PRD critical path and every closed S1/S2 bug has a regression test that actually asserts the failing scenario.
  • NEEDS WORK — gaps exist but none are launch-blocking.
  • BLOCKING — at least one PRD critical path on the current launch checklist has no regression test.

Examples

Example 1 — Pre-release audit: Finds 2 missing entries (1 paywall path, 1 bug). User accepts stub generation; both files are created with TODO bodies. Two follow-up stories are opened.

Example 2 — Add a single bug: /regression-suite --add-bug=BUG-051 generates a single stub at tests/regression/paywall/double_charge_test.ts and adds a row to the registry.


Next Steps

  • For each generated stub, run /dev-story against the follow-up story to flesh it out.
  • Re-run --audit before every release as part of /release-checklist.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.