Skip to content

Studio: Tweak system prompt for push and pull operations - #3868

Merged
katinthehatsite merged 13 commits into
trunkfrom
fix/tweak-system-prompt-for-pull
Jun 18, 2026
Merged

Studio: Tweak system prompt for push and pull operations#3868
katinthehatsite merged 13 commits into
trunkfrom
fix/tweak-system-prompt-for-pull

Conversation

@katinthehatsite

Copy link
Copy Markdown
Contributor

Related issues

Related to STU-1627

How AI was used in this PR

N/A

Proposed Changes

This PR adds clarification for the Studio Code agent for the pull and push operations to the system prompt. I was testing pulling and pushing sites today and had this interaction with the agent regarding pulling remote sites where it was not clear on requirements and eligibility:

Screenshot 2026-06-17 at 10 42 08 AM Screenshot 2026-06-17 at 10 42 15 AM Screenshot 2026-06-17 at 10 42 25 AM

Testing Instructions

  • Try pulling a site that is not eligible for a pull, for example, through Studio Code and confirm that the agent has some context about the eligibility of sites for pull

Pre-merge Checklist

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the Studio Code agent’s CLI system prompt to provide clearer guidance for site_push and site_pull operations (syncing local sites with WordPress.com/Pressable), aiming to reduce confusion around sync eligibility and workflows.

Changes:

  • Consolidates push guidance under a new “Pull & Push” section and adds eligibility/connection notes.
  • Adds pull workflow guidance and a brief troubleshooting section for common sync errors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/cli/ai/system-prompt.ts Outdated
Comment thread apps/cli/ai/system-prompt.ts Outdated
katinthehatsite and others added 3 commits June 17, 2026 11:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@wpmobilebot

wpmobilebot commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 9ef58f2 vs trunk

app-size

Metric trunk 9ef58f2 Diff Change
App Size (Mac) 2357.79 MB 2357.79 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 9ef58f2 Diff Change
load 1720 ms 1732 ms +12 ms ⚪ 0.0%

site-startup

Metric trunk 9ef58f2 Diff Change
siteCreation 8572 ms 8498 ms 74 ms 🟢 -0.9%
siteStartup 3917 ms 3870 ms 47 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@sejas sejas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@katinthehatsite , thanks for improving the Pull/Push. I think adding the Pull workflow is a great addition.

I'm not totally sure about the "Troubleshooting" section though. I think it can be useful but we should be careful what we add there and how we measure it helps to the user. Ultimately, I think it should be in a specific skill and not in the system prompt. I suggest removing this section or moving it to a separate skill.

The rest looks good. Thank you!

Comment thread apps/cli/ai/system-prompt.ts Outdated
When the user asks to pull a remote site, ensure a local site exists first (create one with \`site_create\` if needed). Then call \`site_pull\` with the local site and the remote site URL or ID. If the local site is running, it will be stopped during the pull and restarted afterward.

### Troubleshooting
- **"A sync operation is already in progress"** — Another push or pull is running on the same remote site. Wait for it to finish.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this information available to the Agent?

Comment thread apps/cli/ai/system-prompt.ts Outdated
Comment thread apps/cli/ai/system-prompt.ts
Co-authored-by: Antonio Sejas <antonio.sejas@automattic.com>
@katinthehatsite

Copy link
Copy Markdown
Contributor Author

I'm not totally sure about the "Troubleshooting" section though. I think it can be useful but we should be careful what we add there and how we measure it helps to the user. Ultimately, I think it should be in a specific skill and not in the system prompt. I suggest removing this section or moving it to a separate skill.

Sounds good to me 👍 I don't have a strong preference for this, just mostly was looking to make the whole push / pull experience smoother for users. I will remove it for now

@katinthehatsite
katinthehatsite requested a review from sejas June 17, 2026 13:02

@sejas sejas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks Kat! I left one more suggestion.

Comment thread apps/cli/ai/system-prompt.ts Outdated
@katinthehatsite
katinthehatsite merged commit c347156 into trunk Jun 18, 2026
11 checks passed
@katinthehatsite
katinthehatsite deleted the fix/tweak-system-prompt-for-pull branch June 18, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants