mirror of
https://github.com/badlogic/pi-skills.git
synced 2026-04-27 04:55:58 +03:00
[PR #16] Add Playwright's ariaSnapshotForAI for improved LLM page understanding #18
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pi-skills#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/badlogic/pi-skills/pull/16
State: open
Merged: No
This PR extracts Playwright's
ariaSnapshotForAIfunctionality into a bundled dependency and integrates it intobrowser-page-structure.js.Problem: LLMs were losing context on complex pages due to insufficient structural information from the basic page exploration script.
Solution:
ariaSnapshotForAIsource code intoaria-snapshot-bundle.js(isolated from Playwright's full dependency tree)browser-page-structure.jsto use Playwright's ARIA snapshot generationpatch-from-playwright.tsscript for semi-automated updates from the official Playwright repoThe new ARIA snapshot provides richer structural context including:
This significantly improves LLM comprehension of page structure and available actions on complex web applications.
I know this is a step up in complexity, but the gain in LLM accuracy is a major win for complex apps. I've added a patch script to keep maintenance low. If you decide this is more code than you want to take on right now, no worries—feel free to close the PR and we can look for a middle ground.