Fix the content warnings a write sends back

ContentIntermediate~10 min

Before you start

Plugin version 1.10.0 or newer, which adds the block type reads, Replace block and the newer warning codes. Each ability is off until you switch it on in the Abilities tab; Replace block is a write, so enable it for the fix. The agent needs edit access to the page.

A write that saves is not always a write that looks right. The agent put a style element in the markup and it was stripped out, or it used a block name your site does not have, or it filled an ACF block with keys ACF does not know. The plugin’s post, page and block writes tell the agent about all of this in a content_warnings list on the response, and most of the time nobody reads it.

This prompt makes reading it part of the job. The agent explains each warning, looks up what the block should have been, and fixes the affected blocks one at a time.

The prompt
You just saved [the Landing page, id 88]. Look at the content warnings in
that write's response. If there are none, say so and stop.
For each warning, tell me in plain words which block it is about, what
the code means, and whether a visitor or editor would see something wrong
because of it.
Where a warning says a block is not registered, check the block types on
this site and suggest the closest real one. Where it says ACF ignored some
keys, open that block type and match my values to its real field names.
Read the page as raw block markup, then show me the fixed markup for each
affected block next to the current one. Do not save until I approve. When
I do, replace each block on its own, checking the block name at each
position, and confirm the warnings are gone.

Why this is safe to run

Reading the warnings, the page and the block type definitions changes nothing. Each warning names the block it is about, carries a stable code, and has a message written for the agent to act on, so the explanation is grounded in what the plugin returned, not in a guess.

The fixes are single Replace block calls, each against one block you approved, each checked against the block name expected at that position. Replace block is off until you enable it, it runs as the user you bound the agent to and needs edit access to the page, and every call lands in the Activity Log. If revisions are on, the page’s history holds each earlier version.

The best way to get fewer warnings is to check first: find the block types you can use before building, and read an ACF block’s fields before filling one.

Already connected? You do not have to paste this. Ask your agent for the “fix the content warnings a write sends back” recipe right after a write, and it runs the same review on your own site.

How it works

  1. After a write, read the content_warnings list in the response, one entry per problem with the block name, a code and a message.
  2. Explain each warning in plain words and say whether the page will look wrong because of it.
  3. For an unknown block or ACF field, check the registered block types and the block's real field names.
  4. Propose the fixed markup for each affected block and wait for your approval.
  5. Replace each fixed block, then confirm the warnings are gone from the response.

Questions

Does a warning mean the write failed?
No. The content was saved, and the warning tells the agent what to fix next time. Only with Strict block validation on in the Settings tab are some writes refused, and that covers only the styling mismatches that make the editor flag a block as invalid.
Which warnings were added in 1.10.0?
Five: removed_element, when a style or script element was removed with its contents; unregistered_block, when no block of that name exists on the site; unknown_acf_field, when ACF block data uses keys that match none of its fields; invalid_block_attributes, when a block's attribute JSON is broken so WordPress ignores all of it; and block_gap_dropped, when WordPress ignores a block gap value. They never refuse a write, even in strict mode.
Why does a one-block change warn about another block?
Content warnings from Replace block cover the whole page that results, not only the new block, so an old problem elsewhere on the page shows up too.