Skip to content

Agents: show the copied prompt in Describe, and let the trail jump to any step - #910

Merged
epeicher merged 1 commit into
trunkfrom
epeicher/review-agents-creation
Sep 25, 2026
Merged

epeicher merged 1 commit into
trunkfrom
epeicher/review-agents-creation

Conversation

@epeicher

@epeicher epeicher commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

What it does

Two fixes to the agent creation wizard in WP Explorer, plus a hover state for <os-step>.

The system prompt was invisible for copied and drafted agents. "Start from someone" copied the source's instructions into the hidden instructions field and landed on Meet, so the Describe textarea labelled "What should this agent do? (system prompt)" was empty. The copied prompt only surfaced on the Launch summary card, with nowhere to edit it. "Draft it for me" had the same gap: the AI rewrite never came back into the textarea.

The trail only went backwards. Steps ahead of the current one were inert. From Meet, Powers / Summon / Launch looked like tabs and did nothing.

Rationale

This is not a regression. The Describe textarea has been the system prompt since the guided flow replaced the expert form (#635), and editing an existing agent still has its own Instructions field in the Define pane. The bug was that the copy and draft paths bypassed the one place the wizard lets you see and edit the prompt.

The trail change mirrors what #882 did for the Workspaces wizard.

Implementation

  • The brief is the system prompt field end to end: agent-start with a source seeds it with the source's instructions; the PHP agent-draft action writes its rewrite back into it; the agent-step local carries it into instructions on any exit from Describe, so a trail jump does exactly what Continue does. The view's own seedFromBrief is gone in favour of the reducer.
  • Every step except the current one is interactive. Launch's create still bounces to Meet when the name is missing.
  • <os-step interactive> lifts its title (and an outlined chip) to full contrast on hover, through a new --os-ui-step-title-hover-color token falling back to the foreground colour. Filled chips have no border to recolour and keep their fill. The cursor stays the shell's arrow: the no-pointer policy in desktop.css is deliberate and left alone.
  • The "No instructions yet" hint now points to Describe as well as Define.

Testing instructions

  1. Enable Agents in OpenStation Preferences → Features and open WP Explorer → Agents with at least one agent.
  2. Click Cast a new agent, then pick an existing agent under Start from someone. You land on Meet.
  3. Click Describe in the trail: the textarea shows the copied prompt. Edit it, then click Launch in the trail. The summary card shows your edit.
  4. Hover Powers, Summon or Launch from any other step: the label brightens, and clicking jumps there.
  5. With an AI connector configured: type a brief, click Draft it for me, then go back to Describe. The textarea shows the drafted instructions.

Tests: the wizard locals and Describe render in apps/my-wordpress/parts/agents.test.ts, and the draft-action test in tests/phpunit/tests/myWordPressAppAgents.php.

Open WordPress Playground Preview

… any step

Starting from an existing agent copied its instructions into the hidden
field and landed on Meet, so the Describe textarea labelled "system
prompt" was empty and the copied prompt only surfaced on the Launch
summary card, with nowhere to edit it. The same happened after "Draft
it for me": the AI rewrite never came back into the textarea.

The brief is the system prompt field now, end to end: a copy seeds it
with the source's instructions, the draft action writes its rewrite back
into it, and the agent-step local carries it into the instructions on
any exit from Describe, so a trail jump does what Continue does.

Every step in the wizard trail is a jump target, forward too, the way
the Workspaces wizard already works. Launch still bounces to Meet when
the name is missing. An interactive os-step lifts its title and outlined
chip to full contrast on hover so it reads as clickable; the cursor stays
the shell's arrow by policy.
@epeicher
epeicher enabled auto-merge (squash) September 25, 2026 14:46
@epeicher
epeicher merged commit 0693135 into trunk Sep 25, 2026
7 checks passed
@epeicher
epeicher deleted the epeicher/review-agents-creation branch September 25, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant