Catch a removed choice in an ACF field group
One choice left the list. The pages that already used it did not.
Import your WordPress content model once, then get pass or fail for each change, with the name of every field that breaks. Recorded with the public WordPress theme of Iowa State University.
What you get
You import your ACF field groups once. After the next change, your assistant compares the new JSON with them and names each removed field, each changed type and each list that lost a choice. The answer is a pass or a fail.
| What we did | What CoreModels answered | Time |
|---|---|---|
| Imported the file of 29 August 2023 | 1 type in the model | 4 s |
| Audited the file of 30 August 2023 | fail: 1 error (a list lost a value) | 2 s |
| Audited the first file again | pass: 0 errors | 1 s |
Recorded on 4 December 2026 with the public WordPress theme of Iowa State University (repository). In August 2023 its authors replaced the choice twitter with x-twitter in the social menu and added threads. Licence: MIT.
What you need
- A CoreModels account with one project. Every plan starts with a 14-day free trial; a card is required to start.
- An assistant that can use MCP servers, for example Claude Code or Cursor.
- No WordPress login. CoreModels reads one file from a public link.
Run it
1. Connect your assistant
In Claude Code, run this command. Then sign in when it asks. This address can write to your projects, because an import creates a model.
claude mcp add --transport http coremodels https://go.coremodels.io/mcp-admin
Cursor, Claude Desktop and other clients: connect guide.
2. Import the version the site was built on
This is the content model of 29 August 2023, read from GitHub.
Create a CoreModels project named "WordPress example". Then call import_vendor_project on it with vendor "wordpress" and this link in artifactUrls (name: link):
group_62a3abd44cdac.json: https://raw.githubusercontent.com/iastate/iastate22-wordpress/0e9dba623b0adccb7a00714707627e015316628b/acf-json/group_62a3abd44cdac.json
Your assistant calls create_project, then import_vendor_project. The answer we got:
import_vendor_project (part of the answer)
{
"success": true,
"vendor": "wordpress",
"datasetsAdded": 1,
"nodesEnriched": 2,
"errors": []
}
Your model has 1 type now. Each has its fields, with the type from WordPress.
3. Audit the newer version
In August 2023 its authors replaced the choice twitter with x-twitter in the social menu and added threads.
Now call audit_vendor_project on the same project with vendor "wordpress" and the newer file in artifactUrls. Tell me the gate and list every Error:
group_62a3abd44cdac.json: https://raw.githubusercontent.com/iastate/iastate22-wordpress/f00961ea09bc387941be001df534c5f288648d32/acf-json/group_62a3abd44cdac.json
Your assistant calls audit_vendor_project. The answer we got:
audit_vendor_project (part of the answer)
{
"gate": "fail",
"errorCount": 1,
"warningCount": 1,
"findings": [
{
"severity": "Error",
"code": "enum-narrowed",
"subject": "group_62a3abd44cdac.network",
"message": "Accepted values were removed in the estate but are still governed taxonomy terms."
}
]
}
An audit only reads. The model still holds the first version.
4. Check that the gate also passes
A check that always fails is of no use. Audit the first version again.
Call audit_vendor_project again, this time with the first link. The gate must be pass.
Your assistant calls audit_vendor_project. The answer we got:
audit_vendor_project (part of the answer)
{
"gate": "pass",
"errorCount": 0,
"warningCount": 0
}
Now with your own project
The JSON files in the acf-json folder of your theme, or the file from ACF, Tools, Export. Run this, then give your assistant the prompt.
wp acf json export --dir=./acf-export
Create a CoreModels project for our WordPress content model. Import our ACF field groups in the acf-json folder (acf-json/*.json) with import_vendor_project, vendor "wordpress". Then audit the same files and show me the gate. Keep the project id: we will audit each later change against it.
In a pull request
This command gives the same answer without an assistant. It needs jq, a project id and an API key from Settings, API Keys. It ends with an error when the gate is fail, so a pull request check stops.
for f in acf-json/*.json; do [ -f "$f" ] || continue; jq -n --arg n "$f" --rawfile t "$f" '{($n): $t}'; done |
jq -s '{artifacts: add, failOn: "error"}' |
curl -sS -X POST "https://go.coremodels.io/v1/$PROJECT_ID/integrations/wordpress/audit" -H "Authorization: Bearer $COREMODELS_KEY" -H "Content-Type: application/json" -d @- |
jq -e '.data | .gate, (.findings[] | select(.severity == "Error") | .code + " " + .subject), (.gate == "pass")'
The service answers 200 also when the gate is fail. Read gate, as the command does. If the command prints null, no file was found at that path.
What it does not do
- A field that becomes required is not reported.
- A field group that is deleted is not reported. Its fields are no longer compared.
- The answer names the list that changed, not each value. Read the list in the new file.
- CoreModels reads the files you give it. It needs no login to your site.
14-day free trial. Builder $49/mo after the trial. Cancel any time.