dev-environment

Manages dev instance lifecycle and E2E testing for a Tauri desktop app.

Updated May 18, 2026
One-click install
npx skills add https://github.com/FredoAi/fredo --skill dev-environment-fredoai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dev-environment
Source: https://github.com/FredoAi/fredo/tree/main/.opencode/skills/dev-environment
Command: npx skills add https://github.com/FredoAi/fredo --skill dev-environment-fredoai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Coordinating a live Tauri dev instance (Vite on port 5174, MCP bridge on 9223) for automated end-to-end testing is error-prone: orphaned processes hold ports, the SQLite database accumulates stale state, and agents cannot set environment variables or delete files outside their sandbox. This Skill provides sanctioned PowerShell scripts and a rigorous DOM-plus-screenshot testing methodology so QA agents can reliably start, reset, diagnose, and verify the app. ## Core Features & Use Cases - Lifecycle management: Single dev-env.ps1 script handles Up, Down, Status, Restart, Logs, and baseline serving at a specific commit (-At), with port-based state detection and env-var injection for gated app seams. - Environment reset and hygiene: clean-fredo-db.ps1 wipes the live SQLite DB for fresh-slate tests, and process-hygiene.ps1 lists or kills orphaned opencode/node processes that block new runs. - E2E testing methodology: Nine DOM test patterns, mandatory dual DOM-plus-screenshot verification per acceptance criterion, a regression smoke checklist, and diagnostics for known failure signatures (wedged MCP bridge, stale driver session). - Use Case: A QA agent dispatched against spec branch spec/2762 runs dev-env.ps1 -Action Up -Spec 2762, connects via tauri_driver_session start, tests each user-observable acceptance criterion with screenshots, and reports a structured pass/fail table. ## Quick Start Start the dev instance by running the dev-env script with Action Up, then connect with tauri_driver_session start and begin testing acceptance criteria with paired DOM snapshots and screenshots.

Frequently Asked Questions about dev-environment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I start and stop a Tauri dev instance for automated testing?▼

Run the dev-env.ps1 script with -Action Up to auto-start the instance and poll ports 5174 and 9223 until responsive, and -Action Down to kill the process tree by port. Status, Restart, and Logs actions are also supported.

How do I run E2E tests on a Tauri app through an MCP bridge?▼

After the dev instance reports ready, connect with tauri_driver_session start, then test each acceptance criterion using tauri_webview_interact, tauri_webview_dom_snapshot, and tauri_webview_screenshot. Every criterion requires both DOM verification and visual screenshot confirmation to pass.

How do I reset the app SQLite database before E2E tests?▼

Run clean-fredo-db.ps1, which stops the dev instance, deletes fredo.db plus its WAL and SHM files from the app data directory, and verifies deletion. Add -Restart to bring the instance back up with a fresh schema recreated on launch.

Why does the MCP bridge stop responding to all commands?▼

A wedged WebSocket server blocks every MCP command path while static checks still pass, shown by a 'Handshake not finished' error in logs. Recover with a full Down then Up cycle and verify the clean 'WebSocket server listening' log line before retesting.

Why do webview element interactions fail with resolveRef errors?▼

The window.__MCP__ helper namespace is injected once per driver session and is wiped by Vite HMR reloads or app restarts. Stop and start the driver session to re-inject it; escalate to a full Down/Up cycle only if a fresh session does not fix it.

How do I test a baseline before a performance fix was applied?▼

Use dev-env.ps1 -Action Up -Spec <N> -At <pre-fix-sha> to serve the pre-fix product code from the spec branch tip without checking out main or hand-rolling a dev server. A standard Up afterward restores the tip code for the after-fix measurements.