Skip to content

Studio Code: treat shop/store/sell requests as ecommerce deterministically - #3875

Merged
youknowriad merged 3 commits into
trunkfrom
make-shop-requests-ecommerce
Jun 18, 2026
Merged

Studio Code: treat shop/store/sell requests as ecommerce deterministically#3875
youknowriad merged 3 commits into
trunkfrom
make-shop-requests-ecommerce

Conversation

@youknowriad

@youknowriad youknowriad commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

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

  • Related to the woocommerce-shop-setup eval case in scripts/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-recommendations skill 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:

  1. Misclassification. Requests carrying scope/style qualifiers like "small", "just a couple of pages", or "for inspiration" were sometimes treated as informational content sites, so WooCommerce was skipped entirely.
  2. 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.

This keeps the guidance where the WooCommerce logic already lives — the plugin-recommendations skill — without touching the core system prompt:

  • The skill's trigger and description now make it unambiguous that selling anything ("I want to sell X", a shop, store, storefront, or ecommerce site, or any design implying products/prices/a catalog/a Shop page) is always an ecommerce request that requires WooCommerce and products — and that size/style qualifiers never downgrade it.
  • The skill now tells the agent to front-load WooCommerce setup and product creation: install, configure, and populate the catalog before the slower theme-design and polish phase, and never let image sourcing block products from being created. The catalog is the core of the site, not a finishing touch.

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

  • From scripts/eval, run the regression case (Node ≥22 / npm ≥11):
    npx promptfoo@0.121.4 eval -c promptfoo.config.yaml --filter-pattern "WooCommerce" --no-cache
    
    The woocommerce-shop-setup case asserts WooCommerce is installed and ≥1 product is created.
  • Verified on 3 consecutive promptfoo runs (all passed) with the final skill; each run installed WooCommerce and created 6 products, with product creation occurring before the design/polish phase. (An earlier skill-only attempt without front-loading flaked 1-in-3 by timing out after categories but before products — the front-loading change fixes that failure mode.)
  • npm run typecheck passes.

Pre-merge Checklist

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

🤖 Generated with Claude Code

…cally

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing cef2c42 vs trunk

app-size

Metric trunk cef2c42 Diff Change
App Size (Mac) 2355.89 MB 2355.89 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk cef2c42 Diff Change
load 1717 ms 1802 ms +85 ms 🔴 5.0%

site-startup

Metric trunk cef2c42 Diff Change
siteCreation 8510 ms 8504 ms 6 ms ⚪ 0.0%
siteStartup 3907 ms 3879 ms 28 ms ⚪ 0.0%

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>
@youknowriad
youknowriad requested a review from jverneaut June 17, 2026 20:26
Comment thread apps/cli/ai/skills/plugin-recommendations/SKILL.md Outdated

@katinthehatsite katinthehatsite 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.

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>
@youknowriad
youknowriad merged commit ee074dd into trunk Jun 18, 2026
13 checks passed
@youknowriad
youknowriad deleted the make-shop-requests-ecommerce branch June 18, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 participants