---
name: browser-replay-327c8bf6260d
description: Replay a recorded session trajectory against the same URL or a mutated variant; uses browser-selectors embedding similarity to recover from DOM drift
argument-hint: "<session-id> [--url <new-url>] [--mutate <json>] [--tolerance <0..1>]"
allowed-tools: mcp__claude-flow__browser_open mcp__claude-flow__browser_close mcp__claude-flow__browser_click mcp__claude-flow__browser_fill mcp__claude-flow__browser_type mcp__claude-flow__browser_press mcp__claude-flow__browser_select mcp__claude-flow__browser_check mcp__claude-flow__browser_uncheck mcp__claude-flow__browser_hover mcp__claude-flow__browser_wait mcp__claude-flow__browser_screenshot mcp__claude-flow__browser_snapshot mcp__claude-flow__browser_eval Bash Read
---

# 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 in `findings.md` and 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

1. **Locate the source session**:
   ```bash
   npx -y ruvector@0.2.25 rvf status <session-id>.rvf
   ```
2. **Load the trajectory**:
   ```bash
   Read .../trajectory.ndjson
   ```
   Each line is `{ts, action, args, selector, result}`.
3. **Open a fresh browser** via `mcp__claude-flow__browser_open` (target URL = original or `--url` override).
4. **For each trajectory step**, dispatch the matching MCP tool (`browser_click`, `browser_fill`, `browser_eval`, etc.) with the recorded args.
5. **On selector miss**, do *not* fail immediately — query the `browser-selectors` namespace for an embedding-similar selector for the same `<host>:<intent>` and retry once:
   ```bash
   npx -y @claude-flow/cli@latest memory search --namespace browser-selectors \
     --query "<host> <intent>" --limit 5
   ```
6. **Record a new trajectory** for the replay run (allocate a fresh RVF container, lineage-tracked via `rvf derive`).
7. **Verdict**: tally matched-step / total-step ratio. Default tolerance threshold is 0.85 (configurable via `--tolerance`). Verdict goes into `findings.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 `--mutate` to inject expected variation or pin to a fixture.
- For visual diff, chain into `browser-screenshot-diff` against 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.


---
Source attribution: digitalcrest01
Original project: https://github.com/digitalcrest01/ruflow/blob/8f78f238e1775aedf7faa6026b5f20c9aa8cbd12/plugins/ruflo-browser/skills/browser-replay/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2024-2026 ruvnet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: digitalcrest01
Original project: https://github.com/digitalcrest01/ruflow/blob/8f78f238e1775aedf7faa6026b5f20c9aa8cbd12/plugins/ruflo-browser/skills/browser-replay/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management
Roles: Frontend Developer, Product Manager, QA / Test Engineer
Specialties: Testing
Tools: Mcp__Claude Flow__Browser_Check, Mcp__Claude Flow__Browser_Click, Mcp__Claude Flow__Browser_Close, Mcp__Claude Flow__Browser_Eval, Mcp__Claude Flow__Browser_Fill, Mcp__Claude Flow__Browser_Hover, Mcp__Claude Flow__Browser_Open, Mcp__Claude Flow__Browser_Press, Mcp__Claude Flow__Browser_Screenshot, Mcp__Claude Flow__Browser_Select, Mcp__Claude Flow__Browser_Snapshot, Mcp__Claude Flow__Browser_Type, Mcp__Claude Flow__Browser_Uncheck, Mcp__Claude Flow__Browser_Wait
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 665e508b5515e9555d3d6e247926a265b19dfa911076ab3870debf5ca4b071ed
