You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Filter Guidelines service queries by content guideline type #529
AI plugin 0.9.0's internal Guidelines service can read the latest wp_guideline without filtering by wp_guideline_type=content. Gutenberg 23.1 made Guidelines type-aware and default artifact guidelines can exist alongside content guidelines, so an artifact guideline can shadow the content guideline in prompt assembly.
Observed behavior
The service queries the latest wp_guideline row without a tax_query. In a site with both artifact and content guideline terms, the newest artifact guideline can be selected for content prompt grounding.
Expected behavior
When the wp_guideline_type taxonomy exists, the content prompt Guidelines service should query wp_guideline_type=content.
Reproduction
Install Gutenberg 23.1.x and AI plugin 0.9.0.
Create one wp_guideline assigned wp_guideline_type=artifact.
Create one wp_guideline assigned wp_guideline_type=content.
Make the artifact guideline newer than the content guideline.
Invoke the AI plugin Guidelines formatting service for content prompt assembly.
Observe that the newest artifact guideline can be selected.
Good catch. I should file such issue earlier when landing the refactoring in the Gutenberg plugin. We might need some intermediate function that plugins can use to fetch individual guidelines as the logic is quite complex and might evolve before it gets out of experimental phase.
@gziolo that something that requires an update within Gutenberg and/or the AI plugin? Trying to ensure we tackle anything within the AI plugin as needed.
Activity
gziolo commentedon May 9, 2026
Good catch. I should file such issue earlier when landing the refactoring in the Gutenberg plugin. We might need some intermediate function that plugins can use to fetch individual guidelines as the logic is quite complex and might evolve before it gets out of experimental phase.
jeffpaul commentedon May 14, 2026
@gziolo that something that requires an update within Gutenberg and/or the AI plugin? Trying to ensure we tackle anything within the AI plugin as needed.
gziolo commentedon May 20, 2026
I have PR ready with a potential fix: