Refining Modules with AI
Once a module has been built, the AI Builder box switches to the AI Refinement chat. Use it to ask for changes in plain English, one at a time.
Making a change
- Open the module in Module Builder → All Modules.
- In the AI Refinement box, type your change into Ask AI to refine.... For example: "Make the cards stack on tablet as well as phone" or "Add a yes/no setting to hide the date".
- Choose a provider if you want a different one, then click Send.
The AI reads the module as it is right now in the editor, including any edits you've made by hand, and returns only the parts that need to change. Fields you didn't mention are kept.
Refinements save themselves
After the AI replies, the plugin applies the change and saves the module for you, showing "Saving module…" while it works.
- For a published module, the save regenerates the module's files. You'll see "Module updated!" when it's done.
- For a draft, the change is saved and you'll see "Changes saved. The module is not published yet."
Each refinement creates a revision with a short note describing the change, so you can always step back.
The exception is the very first build of a new module, which waits for you to review and click Publish. See Building Your First Module.
Tips for good refinements
- One change at a time. Small, specific requests are easier to check and easier to roll back.
- Describe the symptom. "The slider keeps playing even when I hover over it" works as well as a technical instruction.
- Name the setting or element. "The card title", "the Columns setting", "the badge on the popular plan".
- Check the result in the Visual Builder before asking for the next change.
The AI sees your recent conversation for context, but the module's current code is always what it works from.
If the module changed while the AI was working
If you edit the module, or it's saved elsewhere, while a refinement is in progress, you'll see "The module changed while the AI was working. Apply this result anyway or discard it."
- Apply anyway uses the AI's result.
- Discard keeps your module as it is.
If saving was blocked
If WordPress couldn't start the save, you'll see "WordPress could not start the save. Please use the Update button." Click Update (or Save Draft) yourself to keep the change.
Libraries suggested by the AI
If a refinement adds a new external library URL, the change is saved but the library waits for your approval. You'll see "Approve the pending libraries in the Libraries box to publish these changes." The previous version of the module stays live until you approve.
Editing by hand
You can always change fields and code yourself and click Update. Hand edits and AI refinements work together: the next refinement starts from whatever is in the editor.