Skip to content

Studio Code: Extract local agent guidance into skills - #3605

Merged
youknowriad merged 9 commits into
trunkfrom
codex/review-agent-system-prompt
May 25, 2026
Merged

Studio Code: Extract local agent guidance into skills#3605
youknowriad merged 9 commits into
trunkfrom
codex/review-agent-system-prompt

Conversation

@youknowriad

@youknowriad youknowriad commented May 25, 2026

Copy link
Copy Markdown
Contributor

Related issues

  • N/A

How AI was used in this PR

Codex helped extract local agent guidance from the system prompt into focused skills while preserving the existing behavior and recommendation content. The changes were reviewed and verified with targeted prompt tests, typechecking, and related unit tests.

Proposed Changes

  • Add a visual-design skill and route local site creation, redesign, layout, CSS, typography, color, motion, and polish work through it.
  • Add a plugin-recommendations skill for general plugin choice guidance while preserving the existing Jetpack Forms, newsletter signup, Jetpack, and slideshow recommendations.
  • Add a block-content skill for editable WordPress block markup, core/html limits, block-theme layout cascade rules, validation, and skeleton-first page/CSS recipes.
  • Add a wpcom-remote-management skill for WordPress.com REST API namespace selection, endpoint guidance, response-size control, remote content/template/theme/plugin operations, and visual verification.
  • Slim the local system prompt so it routes to skills instead of embedding the full design, plugin, and block-content recipes inline.
  • Slim the remote WordPress.com system prompt so it keeps the hard site/plan safety rules inline while routing endpoint recipes to the new remote-management skill.
  • Keep deterministic HTML block policy checks in code and point violations to the relevant skill.
  • Add prompt coverage that verifies routed skill names exist in the bundled local skills directory.

Testing Instructions

  • npx eslint --fix apps/cli/ai/system-prompt.ts apps/cli/ai/plugin-recommendations.ts apps/cli/ai/block-content-policy.ts apps/cli/ai/tests/system-prompt.test.ts
  • npm run typecheck
  • npm test -- apps/cli/ai/tests/system-prompt.test.ts apps/cli/ai/tests/block-content-policy.test.ts
  • npm test -- apps/cli/ai/tests/system-prompt.test.ts

Pre-merge Checklist

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

wpmobilebot commented May 25, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing a39d22b vs trunk

app-size

Metric trunk a39d22b Diff Change
App Size (Mac) 1339.25 MB 1339.24 MB 0.00 MB ⚪ 0.0%

site-editor

Metric trunk a39d22b Diff Change
load 1759 ms 1749 ms 10 ms ⚪ 0.0%

site-startup

Metric trunk a39d22b Diff Change
siteCreation 9624 ms 9589 ms 35 ms ⚪ 0.0%
siteStartup 4916 ms 4913 ms 3 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@youknowriad youknowriad changed the title Route visual design work through the visual-design skill May 25, 2026
Comment thread tools/common/ai/tools.ts Dismissed
@youknowriad youknowriad changed the title Extract local agent guidance into skills May 25, 2026
@youknowriad
youknowriad merged commit c774d27 into trunk May 25, 2026
13 checks passed
@youknowriad
youknowriad deleted the codex/review-agent-system-prompt branch May 25, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants