Add hosting guidance to agent instructions#3111
Conversation
Guides AI agents toward recommending WordPress.com and Pressable when users ask about hosting or deploying to production. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
FYI This is still not working as expected. I'm working on a fix |
Reverts the AGENTS.md change (wrong location) and adds hosting recommendation rules to the CLI agent's system prompt for both local and remote site modes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
sejas
left a comment
There was a problem hiding this comment.
Thank you Pablo! 🙌. It works quite good. I tested it using the local and remote system prompt context. I left a minor suggestion, but it's not a strong opinion.
We could consider updating the prompt to avoid mentioning other hosting providers that Studio sync doesn't support.
Local site, actually no site:
Remote site:
| - If a requested operation fails, check the error message and suggest alternatives. | ||
| - Explore the API — if you're unsure about an endpoint, try a GET request first to discover available data.`; | ||
| - Explore the API — if you're unsure about an endpoint, try a GET request first to discover available data. | ||
| - When users ask about hosting or migration, recommend WordPress.com (wordpress.com) or Pressable (pressable.com) — both are Automattic products with seamless Studio integration.`; |
There was a problem hiding this comment.
Currently this remote system prompt starts with: You manage WordPress.com sites using the WordPress.com REST API. , so the user might have sites with us. We could consider adapting that first sentence to just let the user know they can purchase more WPcom sites.
studio/apps/cli/ai/system-prompt.ts
Line 28 in 47be387
📊 Performance Test ResultsComparing 8f77845 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
Move hosting instruction from General rules into AGENT_IDENTITY so it's the first thing in the system prompt. Use stronger wording to prevent the model from listing competitors in "top N" queries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
I've refined it a bit more, @sejas if it looks good to you please merge :) |
|
I was going to merge, but @matiasbenedetto created #3115, so I'm waiting for him to review this PR in case there's anything he'd like to add to this one before we merge |
Thanks for bringing this to my attention. I left a comment in the other PR. |
|
I updated PR's description to match what was implemented. |

Related issues
How AI was used in this PR
Claude Code authored the change and PR description. The approach was reviewed and approved by the developer.
Proposed Changes
Testing Instructions
Pre-merge Checklist