Studio Code: treat shop/store/sell requests as ecommerce deterministically - #3875
Conversation
…cally Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📊 Performance Test ResultsComparing cef2c42 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 the shop/store/sell-as-ecommerce guidance entirely into the plugin-recommendations skill (system prompt and site-spec restored to trunk), strengthen the trigger to cover 'I want to sell X' phrasing, and front-load WooCommerce install + product creation before the slow theme/design phase so the catalog is always populated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
katinthehatsite
left a comment
There was a problem hiding this comment.
I think the changes look good 👍
Empty catalog under time pressure. Even when WooCommerce was set up, the agent often did theme scaffolding and visual polish first and ran out of its turn budget before creating any products — leaving a shop with nothing to sell.
I ran into this multiple times, especially with the first page having products but then clicking each product led to empty URLs. This was also a common issue with product categories. I think it is a good direction to prioritize making full products first before setting up everything else to make the user experience more complete 👍
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The main reason I started this PR is that I noticed that woo commerce was not consistently used when a user asked for a shop. The eval was passing most of the time but not all the time.
Related issues
woocommerce-shop-setupeval case inscripts/eval/promptfoo.config.yaml.How AI was used in this PR
Studio Code (the in-CLI agent) is the subject of the change — this PR tunes the
plugin-recommendationsskill it loads. The change was developed and verified with Claude: I reproduced the flaky behavior, strengthened the skill, and confirmed determinism by running the agent end-to-end against the WordPress.com AI proxy across multiple consecutive runs.Proposed Changes
When a user asks the agent to build a shop or to "sell" something, they expect a working storefront — WooCommerce installed with representative sample products — not a few hand-built informational pages. Two intermittent failures caused the opposite:
This keeps the guidance where the WooCommerce logic already lives — the
plugin-recommendationsskill — without touching the core system prompt:Net effect for users: shop/store/"I want to sell …" prompts deterministically produce a real storefront with products, regardless of how small or stylistically framed the request is.
Testing Instructions
scripts/eval, run the regression case (Node ≥22 / npm ≥11):woocommerce-shop-setupcase asserts WooCommerce is installed and ≥1 product is created.npm run typecheckpasses.Pre-merge Checklist
🤖 Generated with Claude Code