# Write a one-off backfill script with a dry-run mode

A one-off data fix delivered as a reviewed script with a dry run, with execution left to a person.

Category: Data layer and migrations
Source: https://letsship.ai/use-cases/write-a-backfill-script-with-a-dry-run
Published: 2026-08-25

## Goal

Write a backfill script with a dry-run mode and attach its output.

## Acceptance criteria

- A dry-run mode reports what would change without changing it
- Dry-run output is attached to the pull request
- It processes in batches and can resume after interruption
- Execution stays with a person, not with this ticket

## What lands as proof

Dry-run output showing the exact rows and values that would change, reviewed before anything runs.

## 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: Write the {backfill} backfill script

Description: Write a backfill script with a dry-run mode and attach its output.

Acceptance criteria:
- A dry-run mode reports what would change without changing it
- Dry-run output is attached to the pull request
- It processes in batches and can resume after interruption
- Execution stays with a person, not with this ticket

Before you create the issue, describe the data problem and replace {backfill} with it. State that execution stays with a human.
```

## Questions

### What does the agent actually change?

The ticket is scoped to one outcome: write a backfill script with a dry-run mode and attach its output. 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 dry-run output attached, the execution stays with the team, so a reviewer can confirm the result without reproducing the work locally.

### How much oversight does this need?

The run stops for the plan, and the review bar is raised afterwards so that smaller suggestions block the merge too, not only serious findings.
