# Migrate one endpoint group from the legacy handler pattern

Endpoints written before the current conventions, moved onto them without changing their responses.

Category: API surface and contracts
Source: https://letsship.ai/use-cases/migrate-an-endpoint-group-to-the-current-pattern
Published: 2026-08-25

## Goal

Move one endpoint group onto the project's current handler pattern.

## Acceptance criteria

- Responses are identical, asserted by the existing contract tests
- Validation, error handling, and logging follow the current pattern
- No behaviour change is introduced
- The remaining legacy endpoints are counted in the description

## What lands as proof

The existing contract tests passing unchanged, which proves this was a refactor and not a rewrite.

## 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: Move {group} to the current handler pattern

Description: Move one endpoint group onto the project's current handler pattern.

Acceptance criteria:
- Responses are identical, asserted by the existing contract tests
- Validation, error handling, and logging follow the current pattern
- No behaviour change is introduced
- The remaining legacy endpoints are counted in the description

Before you create the issue, find endpoints in this repository still using an older handler pattern and replace {group} with a coherent set.
```

## Questions

### What does the agent actually change?

The ticket is scoped to one outcome: move one endpoint group onto the project's current handler pattern. 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 identical responses, asserted by the existing contract tests, so a reviewer can confirm the result without reproducing the work locally.

### How much oversight does this need?

The run stops once the plan is written. Somebody reads the approach and approves it before any code exists, which is the cheapest moment to redirect the work.
