Skip to content

Commit d450963

Browse files
nickclaude
andcommitted
refactor: improve agent instructions and IR recording
- Update plan-agent prompt to clarify include step handling - Add IR recording for wait tool in browser-tools-mcp 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3920704 commit d450963

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/agent/browser-tools-mcp.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,19 @@ export function createBrowserToolsMcpServer(options: CreateBrowserToolsMcpServer
978978

979979
logToolResult('wait', startTime, result as any, stepIndex, { ...meta, snapshot: snapshotMeta })
980980

981+
if (result.ok && irRecorder.isEnabled()) {
982+
await irRecorder.recordAction(
983+
{
984+
page: options.page,
985+
toolName: 'wait' as IRToolName,
986+
toolInput: { seconds: args.seconds },
987+
stepIndex,
988+
},
989+
{ ok: true },
990+
null, // wait doesn't need element locator
991+
)
992+
}
993+
981994
const content: ContentBlock[] = []
982995
if (meta.error) content.push({ type: 'text', text: `SCREENSHOT_FAILED: ${meta.error}` })
983996
if (snapshotMeta.error) content.push({ type: 'text', text: `SNAPSHOT_FAILED: ${snapshotMeta.error}` })

src/plan/plan-agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ The generated test cases MUST be executable by the AutoQA runner. Follow these r
212212
- For each test case, you MUST include a boolean field "requiresLogin" in the JSON output.
213213
- Set "requiresLogin": true when the primary page(s) or actions under test require the user to be logged in or authenticated.
214214
- Set "requiresLogin": false when the test case can be executed while logged out or as an anonymous user.
215-
- This flag controls whether the markdown generator will automatically insert an include step (for example: "include: login" or "include: <plan.loginStepsSpec>") at the beginning of the Steps section.
215+
- DO NOT manually add "include: login" or any include step to the steps array - the markdown generator will automatically insert it based on this flag.
216216
217217
## 4. Output Format
218218

0 commit comments

Comments
 (0)