task: #3621949 Document how to build a valid RSS feed display
Summary
A feed display added through ai_agents_views_create_view_display was not
usable until its row style was fully configured - no prompt guidance
existed for it at all. Worse, the generic "rss_fields" row style produces
config that passes View::validate() while still not being valid RSS
(HTML markup leaking into <title>/<link>, a non-RFC-2822 <pubDate>)
unless every mapped field is exactly the right shape.
Not a code defect - both row types are individually valid
display_options. Documents Drupal core's own working pattern: the
dedicated "node_rss" row plugin (used by core's own frontpage.yml),
which needs no field mapping at all, as the primary path in the system
prompt, with "rss_fields" kept only as a documented, carefully-caveated
fallback for entity types with no dedicated row plugin. Also explicitly
warns against substituting "entity:node" for "node_rss" - a real
substitution a live LLM made when told the correct plugin's name, which
produces an even more broken feed than the rss_fields mistake.
Changes
config/install/ai_agents.ai_agent.views_agent.yml: adds a "Common Workflow: Add A Feed Display" system prompt section, verified against the realupdate_view_pluginstool and against Drupal core's ownviews.view.frontpage.yml.tests/src/Kernel/Integration/ConfigureFeedDisplayTest.php(new): addedtestNodeRssRowStyleProducesValidFeed(), which builds a feed through the real tool chain and reads the actual rendered RSS XML - the only way this class of problem is caught, sincevalidate()cannot tell a correctly-configured feed from a plausible-looking broken one.
Test plan
- Confirmed the row-style guidance recommendation live against the
real
update_view_pluginstool before writing it into the prompt. - Confirmed the
entity:nodesubstitution mistake reproduces on the live agent without the explicit warning, and does not reproduce with it. - Full suite passes on this branch in isolation: 1/1 test, 21 assertions, no failures.
-
phpcs --standard=Drupal,DrupalPracticeandphpstan analyse(module config, level 1) clean on the new test file.
Closes #3621949
AI-Generated: Yes (Used Claude Code to identify the gap while testing feed-display prompts against the shipped Views Agent, diagnose the correct pattern from Drupal core's own working RSS feed, verify the fix against the live agent across two further rounds of testing, and write the Integration test.)