Skip to content

Commit bc43021

Browse files
committed
add path and little fix
1 parent b80e931 commit bc43021

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

docs/aitrace.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -212,26 +212,7 @@ helpers: {
212212

213213
## Using with AI Agents
214214

215-
The trace format is optimized for AI agents like Claude Code. When debugging a failing test:
216-
217-
1. Open the generated `trace.md` file
218-
2. Copy its contents along with relevant artifact files (ARIA snapshots, console logs, etc.)
219-
3. Provide to the AI agent with context about the failure
220-
221-
Example prompt:
222-
```
223-
I have a failing test. Here's the AI trace:
224-
225-
[paste trace.md contents]
226-
227-
[paste relevant ARIA snapshots]
228-
229-
[paste console logs]
230-
231-
Analyze this and explain why the test failed and how to fix it.
232-
```
233-
234-
The AI agent can analyze all artifacts together - screenshots, HTML structure, console errors, and network requests - to provide comprehensive debugging insights.
215+
The trace format is optimized for AI agents like Claude Code. When debugging a failing test, just point the AI agent to the `trace.md` file - it will read the file and all linked artifacts automatically to analyze the failure.
235216

236217
## Troubleshooting
237218

lib/plugin/aiTrace.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import recorder from '../recorder.js'
99
import event from '../event.js'
1010
import output from '../output.js'
1111
import { deleteDir } from '../utils.js'
12+
import colors from 'chalk'
1213

1314
const supportedHelpers = Container.STANDARD_ACTING_HELPERS
1415

@@ -274,7 +275,7 @@ export default function (config) {
274275

275276
if (stepData.artifacts.console) {
276277
const count = stepData.meta.consoleCount || 0
277-
markdown += ` > [Browser Logs](${stepData.artifacts.console}) (${count} entries)\n`
278+
markdown += ` > [Browser Logs](./${stepData.artifacts.console}) (${count} entries)\n`
278279
}
279280

280281
if (config.captureHTTP) {
@@ -308,4 +309,3 @@ export default function (config) {
308309
}
309310
}
310311

311-
import colors from 'chalk'

0 commit comments

Comments
 (0)