close
Skip to content

Filter Guidelines service queries by content guideline type #529

Closed

Description

@henryperkins

Summary

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

  1. Install Gutenberg 23.1.x and AI plugin 0.9.0.
  2. Create one wp_guideline assigned wp_guideline_type=artifact.
  3. Create one wp_guideline assigned wp_guideline_type=content.
  4. Make the artifact guideline newer than the content guideline.
  5. Invoke the AI plugin Guidelines formatting service for content prompt assembly.
  6. Observe that the newest artifact guideline can be selected.

Activity

  1. gziolo commented on May 9, 2026

    @gziolo
    Member

    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.

  2. jeffpaul commented on May 14, 2026

    @jeffpaul
    Member

    @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.

  3. moved this from Triage to To do in WordPress AI Roadmapon May 18, 2026
  4. added theissue type on May 18, 2026
  5. added this to the 1.1.0 milestone on May 18, 2026
  6. moved this from To do to In progress in WordPress AI Roadmapon May 20, 2026
  7. gziolo commented on May 20, 2026

    @gziolo
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions