Never generate request code from changelog or migration examples: they show the old format on purpose, to illustrate what changed. Build the payload from the current endpoint reference instead, then re-test every field that 400d against the new schema. The 400s stop as soon as the client sends the current shape.

```text
agent generated code against the docs' changelog example  -  it described the old request format and every call 400d
```

## Steps

1. Confirm the failing fields: compare the 400 response body against the current endpoint reference and list which fields the API now rejects or requires differently.
   Expected: You have a list of fields where the client's format and the current reference disagree.

2. Trace where the agent sourced the format: changelog entry, migration guide, or blog post. Mark that source as off-limits for request templates - it documents the delta, not the current shape.
   Expected: The stale source is identified and excluded from future generation context.

3. Rewrite the request payload field by field from the current endpoint reference, not by patching the old payload. Check required fields, renamed fields, and changed types.
   Expected: The payload is rebuilt from the current reference with every field accounted for.

4. Re-run the calls and confirm 200s, then verify response parsing still matches - a format change on the way in sometimes comes with one on the way out.
   Expected: All calls return 200 with the current request format and no changelog-sourced fields remain.

## Use this when

- every call 400s right after a docs update or version bump
- the agent read a changelog, migration guide, or release notes as if it were the current spec
- the 400 body complains about fields that used to be valid

## Not for this skill when

- the reference docs themselves are stale and the live API moved on - that is drift, a different fix
- calls fail with 401 - that is an auth flow problem, not a request shape problem
- only some calls 400 - look for per-endpoint differences before blaming the changelog

## Variant phrasings

### 400 after docs update
### changelog example request format outdated
### request validation failed new format
### migration guide old request shape

## Why it happens

A changelog's job is to show the delta, so its code examples are old-format by definition: here is what you used to send. An agent treating every code block as current generates exactly the format the API just retired. It feels diligent - it read the latest docs page - but the latest page about a change is the worst template for current behavior.

## Edge cases

- Migration guides sometimes show old and new formats side by side - check which block is labeled current
- A cached copy of the docs compounds this: the changelog may itself be outdated
- Some providers keep the old format working during a deprecation window, so 400s can start months after the change
- After fixing the request shape, check webhooks too - providers often change event payloads in the same release

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_K-Sff4pLBW5_tNonz4Rf-Q
