Studio: Tweak system prompt for push and pull operations - #3868
Conversation
There was a problem hiding this comment.
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.
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>
📊 Performance Test ResultsComparing 9ef58f2 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) |
sejas
left a comment
There was a problem hiding this comment.
@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!
| 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. |
There was a problem hiding this comment.
Is this information available to the Agent?
Co-authored-by: Antonio Sejas <antonio.sejas@automattic.com>
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 |
sejas
left a comment
There was a problem hiding this comment.
Thanks Kat! I left one more suggestion.
Co-authored-by: Antonio Sejas <antonio.sejas@automattic.com>
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
pullandpushoperations 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:Testing Instructions
Pre-merge Checklist