Differentiate preview sites from connected WordPress.com remote sites - #3677
Conversation
…fferentiate-preview-sites-from-wordpresscom-remote-sites # Conflicts: # scripts/eval/README.md
…te-preview-sites-from-wordpresscom-remote-sites
…ordpresscom-remote-sites
📊 Performance Test ResultsComparing 18b3566 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) |
…e-preview-sites-from-wordpresscom-remote-sites
…ites-from-wordpresscom-remote-sites' into stu-1775-differentiate-preview-sites-from-wordpresscom-remote-sites
| 'preview_create', | ||
| 'Creates a WordPress.com preview site from a local Studio site. Requires WordPress.com authentication. This can take a few minutes, so tell the user to wait after starting it.', | ||
| 'Creates a preview site from a local Studio site. A "temporary site", "temporal site", or "share link" all mean a preview site — use this tool for those requests. When a local site is already selected and the user asks to create a temporary/temporal/preview site, create a preview of the selected site rather than a new local site. Requires WordPress.com authentication. This can take a few minutes, so tell the user to wait after starting it.', | ||
| { |
There was a problem hiding this comment.
I think it is a good idea to remove the WordPress.com reference from there as this can be quite confusing for the agents. I am wondering if we should mention where the preview sites are hosted or it might not be necessary. What do you think?
There was a problem hiding this comment.
Although, on a second thought, it might not be necessary for an agent to have that information since it does not really impact user's workflow
There was a problem hiding this comment.
Additionally, the synonym disambiguation ("temporary site", "temporal site", "share link") is repeated in both the tool description and the system prompt. Would it make sense to keep the tool description short and defer to the system prompt for synonym mapping?
There was a problem hiding this comment.
I preferred to remove the duplication from the system prompt in favor of the tool description.
1e8543a
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…te-preview-sites-from-wordpresscom-remote-sites # Conflicts: # scripts/eval/README.md
There was a problem hiding this comment.
Only one thing - should we add mentioning Pressbale (as Wordpress.com/Pressable), for example, here removed site_connected_remote_sites and in other places where we mention wordpress.com? During my testing, the AI didn't mention Pressable, however, on the screenshots in the "Testing instructions", you had mentioned Pressable, that's why I started wondering - should we mention it directly everywhere, so that the AI always mentions it too in responses?
…te-preview-sites-from-wordpresscom-remote-sites
|
Thank you both for reviewing the PR, and your suggestions.
That's a good point. I'll create an issue to update skills and docs to take Pressable into consideration. |




Related issues
How AI was used in this PR
Used an AI coding assistant to find the root cause, implement the fix, and write a regression eval. All changes reviewed manually.
Proposed Changes
Studio Code (the AI agent) was calling a temporary preview site a connected WordPress.com site when telling users what a local site is linked to.
These are two different things:
*-studio.wp.build).The agent had no reliable way to tell them apart, so it guessed from the URL/name and got it wrong.
The fix: each listing now tags every entry with a
typefield (wpcom-remoteorpreview), and the preview listing adds anisExpiredflag. The agent reads the tag instead of guessing, and the tool descriptions no longer call previews "WordPress.com" sites.User impact: when you ask Studio Code what a site is connected to, preview sites and connected WordPress.com sites are now reported correctly, each under its own category.
A regression eval (
scripts/eval/) seeds both kinds of site and asserts the agent keeps them distinct. The human-facingstudio preview listoutput is unchanged.Testing Instructions
npm run cli:build && node apps/cli/dist/cli/main.mjs codenpm run eval -- --filter-pattern "preview sites"and confirm the new eval passes correctly.Pre-merge Checklist