# Sweep one named defect class through one module

One kind of defect, named precisely, cleared across one module and blocked from returning.

Category: Bug backlog and defect hunting
Source: https://letsship.ai/use-cases/sweep-one-named-defect-class
Published: 2026-08-25

## Goal

Find and fix every instance of one named defect class within one module.

## Acceptance criteria

- Every instance in the module is fixed
- Each fix has a test
- A lint rule blocks the class from returning
- The search that found them is recorded so it can be re-run

## What lands as proof

The recorded search returning nothing, plus a rule that fails on a seeded instance.

## Prompt

Copy this to an agent to open the ticket:

```text
Create a Linear issue in my team and assign it to the SHIP agent.

Title: Sweep {class} defects out of {module}

Description: Find and fix every instance of one named defect class within one module.

Acceptance criteria:
- Every instance in the module is fixed
- Each fix has a test
- A lint rule blocks the class from returning
- The search that found them is recorded so it can be re-run

Before you create the issue, pick a defect class this repository actually suffers from, such as unchecked nulls or unhandled rejections, and a module to scope it to. Replace {class} and {module}.
```

## Questions

### What does the agent actually change?

The ticket is scoped to one outcome: find and fix every instance of one named defect class within one module. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.

### How do I know the work is done?

The pull request carries the evidence, not only the diff. Here that means a test per site plus a rule that stops the class returning, so a reviewer can confirm the result without reproducing the work locally.

### How much oversight does this need?

None is required before the run starts. Every claim this ticket makes can be checked by machine, so the agent works straight through and a person reviews the finished pull request like any other.
