task: #3621876 Restructure the Views Agent system prompt and remove list_sample_view
Closes #3621876
Summary
Restructures the shipped Views Agent's system_prompt with explicit
sections - Safety Rules, Key Concepts, Handler Types, and Option Value
Formats - so the model has concrete, verified JSON shapes for every
display_option/handler it can set (pager, access, cache, style/row,
CSS class, "more" link, boolean/bundle filters, sort order) instead of
having to infer them. Adds per-workflow sections and worked Common
Workflow examples (content listing page, adding fields, exposed filters,
a block display, pager/access/cache/style, CSS class and "more" link).
Also removes ai_agents_views:list_sample_view from the agent's tool
set (the plugin itself is untouched, just no longer part of this
agent), and drops the stray uuid and the no-longer-applicable node
module dependency from the shipped config.
Changes
config/install/ai_agents.ai_agent.views_agent.yml: rewrittensystem_prompt;list_sample_viewremoved fromtools,tool_settings, andtool_usage_limits;uuidand thenodedependency removed.tests/src/Kernel/Integration/ViewsAgentTest.php: removed the step that exercisedai_agents_views:list_sample_viewas its own tool, and renumbered the step after it.testAgentToolsResolve()needed no change - it iterates$agent->get('tools')dynamically rather than asserting specific tool IDs.
Test plan
- Full kernel + integration suite for ai_agents_views passes with this change: 62/62 tests, 614 assertions, no failures (1 pre-existing unrelated skip).
- Every worked example in the new Option Value Formats section was
verified against the real
update_view_plugins/create_view_handlertools before being written into the prompt, not assumed.
Closes #3621876
AI-Generated: Yes (Used Claude Code to draft and verify the worked examples for the Views Agent's prompt against the real tools, restructure the prompt, remove the list_sample_view tool reference, and update the integration test.)