All challengesCHALLENGE 19 OF 25

Fix Generated API Client Workflow

Update generated clients through their source workflow.

Advanced

Goal

Make sure agents update generated API clients through their authoritative schema and generation workflow rather than patching generated output.

Repository Context

This application consumes an external Payments API.

Code exampleMarkdown
checkout-app/
├── src/
│   ├── payments/
│   └── generated/
│       └── payments-client/
├── schemas/
│   └── payments-openapi.yaml
├── package.json
└── AGENTS.md

The authoritative API contract is:

Code exampleMarkdown
schemas/payments-openapi.yaml

The generated client is written to:

Code exampleMarkdown
src/generated/payments-client/

Generate the client with:

Code exampleMarkdown
pnpm generate:payments-client

Generated output may be replaced whenever generation runs.

Current AGENTS.md

Code exampleMarkdown
# Project Instructions

## Payments

- The Payments API client is stored in `src/generated/payments-client/`.
- Small fixes may be made directly in generated client files if regenerating the client takes longer.
- If the generated client does not match the API, keep the manual fix and update the schema later.

## Validation

- Run `pnpm test` after changing payment behavior.

Your Task

Repair the generated-client workflow.

Make the API schema the source of truth, prevent manual fixes to generated output, and require regeneration through the repository's generation command.

YOUR AGENTS.mdEdit the Current AGENTS.md shown in the challenge
AGENTS.mdMarkdown
Loading editor…

Sign in to save progress across devices.

Your answer is checked locally against the challenge rules. No AI is used for evaluation.