agentleFS
DogaOztuzunDogaOztuzun/branchdeck/.claude/skills/sat-run/SKILL.md

sat-run

Skill17 starsChanged 8 months agoMITView on GitHub

Execute SAT test scenarios against the real Branchdeck app via WebDriver. Reads scenarios from sat/scenarios/, runs each against a debug binary using tauri-driver + WebdriverIO, captures screenshots and trajectory data. Use when user says "run sat scenarios", "sat run", "execute scenarios", or "test the app with sat".

  • Installs packages

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before running, verify these are in place:

    line 17
  2. Distinctive:

    Create the output directory:

    line 42
  3. Distinctive:

    Run the scenario via the SAT WebdriverIO bridge:

    line 52
  4. Very specific:

    Wait for the app to load ("Branchdeck" title)

    line 62
  5. Very specific:

    Write trajectory-{scenario-id}.json to the run directory

    line 68
  6. Distinctive:

    If the WebdriverIO run exits non-zero, check the trajectory file — partial results are still written

    line 72
  7. Distinctive:

    If no trajectory file was created, log the error and continue to the next scenario

    line 73
  8. Very specific:

    After all scenarios complete, read each trajectory-*.json file from the run directory and compile a summary.

    line 78
  9. Distinctive:

    Read performance data from each trajectory and report:

    line 105

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SAT Scenario Runner

You execute SAT test scenarios against the real Branchdeck application using WebDriver automation. Each scenario's natural-language steps are translated into browser actions, with before/after screenshots and performance metrics captured per step.

Prerequisites

Before running, verify these are in place:

  1. Debug binary exists — Check if src-tauri/target/debug/branchdeck exists. If not, tell the user: "Debug binary not found. Building now..." and run:
    bunx tauri build --debug --no-bundle
  2. tauri-driver installed — Check if ~/.cargo/bin/tauri-driver exists. If not: "tauri-driver not found. Install with: cargo install tauri-driver --locked"
  3. WebKitWebDriver available — Check if WebKitWebDriver is in PATH. If not: "WebKitWebDriver not found. Install with: sudo apt install webkit2gtk-driver"
  4. Scenarios exist — Check if sat/scenarios/*.md files exist (exclude .gitkeep and .sat-state.yaml). If none: "No scenarios found. Run /sat-generate first."

Arguments

The user may provide:

  • scenario — path to a single scenario file to run (default: run all scenarios)
  • limit — max number of scenarios to run (default: all)

Step 1: Setup Run Directory

Create the output directory:

RUN_DIR="sat/runs/run-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$RUN_DIR/screenshots"

Step 2: Execute Scenarios

For each scenario file (or the single specified one):

Run the scenario via the SAT WebdriverIO bridge:

SAT_SCENARIO_FILE="<scenario-path>" SAT_RUN_DIR="<run-dir>" \
  xvfb-run bunx wdio run sat/scripts/wdio.sat.conf.ts 2>&1

This will:

  1. Start tauri-driver
  2. Launch the debug binary in the WebKitGTK webview
  3. Wait for the app to load ("Branchdeck" title)
  4. Execute each scenario step:
    • Take before screenshot
    • Interpret the natural-language step and execute via WebDriver
    • Take after screenshot
    • Record result in trajectory
  5. Write trajectory-{scenario-id}.json to the run directory
  6. Kill the session

Error handling per scenario:

  • If the WebdriverIO run exits non-zero, check the trajectory file — partial results are still written
  • If no trajectory file was created, log the error and continue to the next scenario
  • Each scenario gets its own WebDriver session (app restarts fresh)

Step 3: Review Results

After all scenarios complete, read each trajectory-*.json file from the run directory and compile a summary.

For each trajectory, report:

  • Scenario ID and title
  • Status (completed / execution_failed)
  • Steps passed vs failed
  • Total duration
  • Any failure reasons

Aggregate metrics:

  • Total scenarios run
  • Pass rate (completed scenarios / total)
  • Average step success rate
  • Total screenshots captured
  • Total run duration
  • Memory usage

Present as a table:

| Scenario | Status | Steps | Passed | Failed | Duration |
|----------|--------|-------|--------|--------|----------|
| ...      | ...    | ...   | ...    | ...    | ...      |

Step 4: Performance Report

Read performance data from each trajectory and report:

  • Per-step timing — average, min, max across all steps
  • Per-scenario timing — total duration per scenario
  • Memory usage — heap MB at end of each scenario
  • Screenshot count — total before + after screenshots

Common Issues

"Cannot find module 'run-scenario.ts'"

The SAT scripts need the project's WebdriverIO types. Run bun install first.

"Debug binary not found"

The onPrepare hook checks for the binary. Build with:

bunx tauri build --debug --no-bundle

"Connection refused on port 4444"

tauri-driver failed to start. Check if it's installed:

which tauri-driver

Session dies mid-scenario

The app may have crashed. Check src-tauri/target/debug/branchdeck is a recent build. The trajectory file will still be written with partial results — remaining steps are marked as failed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.