Repository navigation
refactor: keep Pi's Ardia guide to what every task needs - #34
Merged
Merged
Conversation
The browser guide went into every request at about 20k characters. Keep what nearly every task needs (tabs, look and act, reading, simple loops, finishing, notes, the common failures and dialogs) and move the rest into topical references that mirror the CLI's own skill: script.md, flows.md, troubleshooting.md and browse.md. The guide names each by its absolute path with the situation to read it in, and the distribution test checks that every path a prompt section names ships with the build.
Name here/tab active where open opens its own tab, warn that read-urls uses the user's tab when the chat has none, point recording and replaying flows at flows.md, restore query's row limit, the scope line's condition, selectors and the script evaluate rule, generalize where remedies run, and make the distribution test fail when the guide's references resolve to the wrong directory.
A CAPTCHA no longer blocks a task: the agent solves it in the page, using a screenshot it reads to see the challenge. Logins and verification such as one-time codes still go to the user.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Ardia browser guide went into every request at about 20k characters. This keeps what nearly every task needs in the guide, and moves the rest into reference files the agent reads only when a task calls for them. Upstream's skill works the same way: a short SKILL.md plus references.
Guide (
guide.ts), now about 10.6k charactersform, change reports, refs that fix themselves), reading (read,read-urls,query,--scroll, scope lines, output caps), a simple loop, the Finish rules, site notes, and the common failures (remedies, unknown outcomes, dialogs, Stop).guide.tsresolves the paths at bundle depth, so source anddist/agree.References (
agent/references/)script.md: the fullpage.*API, frames, recipes, saving and resuming withstate, timeouts, a site's public API.flows.md: request flows, and flows that replay page actions (record --save,--replay --yes,flow heal).troubleshooting.md: input and element errors, refs, tabs and sessions, older-Ardia refusals, sites the ad blocker blocks.browse.md(rewritten): selectors and lines, grid cells, drag, one-time codes, viewport size, read options,eval --isolatedandcdp, the page's own tools, signing in, debugging a page.CAPTCHAs:
system-prompt.mdand the guide now have the agent solve a CAPTCHA itself, using a screenshot it reads, instead of stopping. Logins and one-time codes still go to the user.index.ts:ardia_exec's description no longer namesbrowse.md; the guide names all browse references.ardia-app.mdstays in the description.Testing
bun run lint,bun test --randomizeandbun run buildpass.--helpand fixed.