Replay a recorded session trajectory against the same URL or a mutated variant; uses browser-selectors embedding similarity to recover from DOM drift
Install
npx skills add https://github.com/ruvnet/ruflo --skill browser-replaySKILL.md
Browser Replay
Re-drive a recorded session trajectory. Used for regression testing, deterministic re-runs, and as the verification path that browser-record plus browser-selectors actually produces something replayable.
This skill is the load-bearing assumption of the v0.2.0 architecture. ADR-0001 Verification §4 requires ≥80% replay success across 10 distinct sites of varying drift profiles before the proposal moves from
Proposed→Accepted. If you find replay unreliable, capture the failure modes infindings.mdand report them up the ADR.
When to use
- Regression-testing a UI flow after a deploy.
- Reproducing a bug captured in a prior session.
- Comparing two runs of the same flow for
browser-screenshot-diff. - Forking a session (
/ruflo-browser fork) and replaying the parent before mutating.
Steps
- Locate the source session:
npx -y ruvector@0.2.25 rvf status <session-id>.rvf - Load the trajectory:
Each line isRead .../trajectory.ndjson{ts, action, args, selector, result}. - Open a fresh browser via
mcp__plugin_ruflo-core_ruflo__browser_open(target URL = original or--urloverride). - For each trajectory step, dispatch the matching MCP tool (
browser_click,browser_fill,browser_eval, etc.) with the recorded args. - On selector miss, do not fail immediately — query the
browser-selectorsnamespace for an embedding-similar selector for the same<host>:<intent>and retry once:npx -y @claude-flow/cli@latest memory search --namespace browser-selectors \ --query "<host> <intent>" --limit 5 - Record a new trajectory for the replay run (allocate a fresh RVF container, lineage-tracked via
rvf derive). - Verdict: tally matched-step / total-step ratio. Default tolerance threshold is 0.85 (configurable via
--tolerance). Verdict goes intofindings.md.
Caveats
- Browserbase explicitly does not offer replay (rrweb session replay was deprecated). We're betting on selector-embedding recovery; expect noise on heavily drifted sites.
- Network nondeterminism (timing, content variation) can produce false-fail verdicts. Use
--mutateto inject expected variation or pin to a fixture. - For visual diff, chain into
browser-screenshot-diffagainst the parent session id. - If selector recovery requires more than one retry per step, log it. That's the signal that the site needs a re-record, not a replay.
Related skills
agent-browservercel-labs967KBrowser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use fojust-scrapescrapegraphai245KSearch, scrape, crawl, extract structured data, and monitor web pages via the ScrapeGraph AI CLI. Use when the user asks to search the web, scrape a webpage, grab content from a URL, extract JSON from a site, crawl documentation or site sections, monitor a page for changes, inspect request history, check ScrapeGraph credits, or validate API setup.browser-actbrowser-act108Kagent-browser101-skills104KBrowser automation for AI agents via inference.sh. Navigate web pages, interact with elements using @e refs, take screenshots, record video. Capabilities: web scraping, form filling, clicking, typing, drag-drop, file upload, JavaScript execution. Use for: web automation, data extraction, testing, agent browsing, research. Triggers: browser, web automation, scrape, navigate, click, fill form, screenshot, browse web, playwright, headless browser, web agent, surf internet, record video