# Update code examples that no longer compile

Examples written for an older version of the API, updated and then compiled automatically so they cannot become wrong again.

Category: Documentation and knowledge
Source: https://letsship.ai/use-cases/update-non-compiling-code-examples
Published: 2026-08-25

## Goal

Update documentation code examples and make them compile in the pipeline.

## Acceptance criteria

- Every example compiles against the current API
- Examples are extracted and compiled in the pipeline
- A deliberately broken example fails the build
- Examples use the current recommended approach, not merely a working one

## What lands as proof

A seeded broken example failing the build, which converts the examples from prose into tested code.

## 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: Fix the code examples in {docs}

Description: Update documentation code examples and make them compile in the pipeline.

Acceptance criteria:
- Every example compiles against the current API
- Examples are extracted and compiled in the pipeline
- A deliberately broken example fails the build
- Examples use the current recommended approach, not merely a working one

Before you create the issue, try compiling the code examples in this repository's documentation and replace {docs} with the worst file.
```

## Questions

### What does the agent actually change?

The ticket is scoped to one outcome: update documentation code examples and make them compile in the pipeline. 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 examples compiled in CI so they cannot rot again, 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.
