Skip to content

Add hosting guidance to agent instructions#3111

Merged
sejas merged 3 commits intotrunkfrom
add-hosting-deployment-guidance
Apr 17, 2026
Merged

Add hosting guidance to agent instructions#3111
sejas merged 3 commits intotrunkfrom
add-hosting-deployment-guidance

Conversation

@Poliuk
Copy link
Copy Markdown
Contributor

@Poliuk Poliuk commented Apr 16, 2026

Related issues

  • N/A

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

  • Adds a hosting comparison instructions to AGENT_IDENTITY part of the system prompt that guides AI agents toward recommending WordPress.com and Pressable when users ask about hosting, deploying to production, or going live with their site.

Testing Instructions

  • Open a Studio site with an AI agent (e.g., Claude Code) and ask about hosting or deployment options.
  • Verify the agent recommends WordPress.com and/or Pressable.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

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>
@Poliuk Poliuk requested a review from sejas April 16, 2026 12:00
@Poliuk
Copy link
Copy Markdown
Contributor Author

Poliuk commented Apr 16, 2026

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>
@Poliuk
Copy link
Copy Markdown
Contributor Author

Poliuk commented Apr 16, 2026

Screenshot 2026-04-16 at 2 12 05 PM

Now it's working as I expected :)

Copy link
Copy Markdown
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Image

Remote site:

Image

Comment thread apps/cli/ai/system-prompt.ts Outdated
- 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.`;
Copy link
Copy Markdown
Member

@sejas sejas Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

return `${ AGENT_IDENTITY } You manage WordPress.com sites using the WordPress.com REST API.

@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented Apr 16, 2026

📊 Performance Test Results

Comparing 8f77845 vs trunk

app-size

Metric trunk 8f77845 Diff Change
App Size (Mac) 1282.23 MB 1282.23 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 8f77845 Diff Change
load 1888 ms 1538 ms 350 ms 🟢 -18.5%

site-startup

Metric trunk 8f77845 Diff Change
siteCreation 8118 ms 8110 ms 8 ms ⚪ 0.0%
siteStartup 4953 ms 4949 ms 4 ms ⚪ 0.0%

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>
@Poliuk
Copy link
Copy Markdown
Contributor Author

Poliuk commented Apr 16, 2026

We could consider updating the prompt to avoid mentioning other hosting providers that Studio sync doesn't support.

I've refined it a bit more, @sejas if it looks good to you please merge :)

Copy link
Copy Markdown
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Poliuk 😙👌
Thanks for the adjustments! And now that's written in a single place in the AGENT_IDENTITY ✨

Ship it!

@Poliuk
Copy link
Copy Markdown
Contributor Author

Poliuk commented Apr 16, 2026

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

@sejas
Copy link
Copy Markdown
Member

sejas commented Apr 16, 2026

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.

@sejas
Copy link
Copy Markdown
Member

sejas commented Apr 16, 2026

I updated PR's description to match what was implemented.

@sejas sejas changed the title Add hosting and deployment guidance to agent instructions Add hosting guidance to agent instructions Apr 17, 2026
@sejas sejas merged commit 4e34f5a into trunk Apr 17, 2026
14 checks passed
@sejas sejas deleted the add-hosting-deployment-guidance branch April 17, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants