Every piece of work in Ghostly is organized around two core concepts: Projects and Runs. A Project is a named container that groups related runs together — think of it as a test suite, a micro-service, or a feature area. A Run is a single execution of a browser flow against a specific URL, containing every step taken, every screenshot captured, and the final pass/fail verdict. Understanding how these two entities relate is the foundation for navigating Ghostly’s dashboard, querying the API, and structuring your CI pipelines.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Meza-dev/Ghostly/llms.txt
Use this file to discover all available pages before exploring further.
Projects
A Project is the top-level container for organizing test runs. Each project belongs to a single user and is identified by itsid slug when submitting runs.
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier / slug used in run submissions |
label | string | Human-readable display name |
color | string | Hex color for dashboard display (e.g. #6366f1) |
createdAt | DateTime | ISO timestamp of project creation |
A run’s
project field must reference an existing project slug that belongs to the authenticated user. Submitting a run with an unknown project slug returns a 400 validation error.Runs
A Run represents one complete execution of a browser flow — from navigating tobaseUrl through every step, to the final pass or fail verdict.
Step Types
Ghostly supports six primitive step actions, derived fromstepSchema in packages/runner/src/schema.ts:
goto
Navigate to a URL relative to
baseUrl, waiting for domcontentloaded.click
Click a DOM element by CSS selector, with smart fallback expansion.
fill
Type a value into an input or textarea by selector.
press
Simulate a keyboard key press (e.g.
Enter, Tab).waitForSelector
Pause until an element is visible; optional
timeoutMs override.snapshot
Capture the page’s accessibility tree without performing any action.
Run Status Lifecycle
A run always starts in"running" and transitions to exactly one terminal state:
status field is updated atomically when the run finishes. The durationMs field reflects the total wall-clock time of the browser session.
The contextId Field
Use contextId to correlate runs with your CI system. Passing a git commit SHA makes it easy to group all runs triggered by the same pull request:
Assisted Runs
When a run is driven by AI (assisted mode), theassisted field on RunRecord is populated with metadata about the LLM invocation, and the full event stream is available as events: AssistEvent[].
Assist Event Stream
For assisted runs, the full internal event log is stored as an ordered sequence ofAssistEvent objects. These power the live dashboard view and are available via GET /v1/runs/:id.
| Event type | When it fires |
|---|---|
recon | Initial page snapshot before any planning |
plan_chunk | Strategist produced a new batch of steps |
loop_state | Horizon loop changed state (planning, executing, stopped) |
horizon_start | A new planning horizon began |
horizon_end | A planning horizon completed |
victory_check | Victory conditions were evaluated |
memory_hit | Seed steps were loaded from assist memory |
memory_miss | No memory found for this goal/project/URL |
step_start | A step is about to execute |
step_success | A step completed successfully |
step_failure | A step threw an error |
heal_start | Self-healing initiated for a failed step |
heal_action | Healer proposed and applied a replacement step |
heal_success | Self-healing recovered the failed step |
heal_failure | Self-healing could not recover |
run_end | Run finished; includes final plan and progress summary |
Run Artifacts
Ghostly captures several types of artifacts during a run, depending on configuration:Screenshots (screenshotPath)
Screenshots (screenshotPath)
When
captureScreenshotAfterEachStep: true, a PNG screenshot is saved after each step. The path is stored in StepOutcome.screenshotPath. On failure, a screenshot is always attempted regardless of the per-step setting.Video (videoPath)
Video (videoPath)
When
recordVideoOnFailure: true, Playwright records the browser session. The video is only kept if the run fails — successful runs have their video deleted to save disk space. The path is stored in RunRecord.videoPath.Accessibility Snapshots (a11y)
Accessibility Snapshots (a11y)
When
captureA11yAfterEachStep: true, or when a snapshot step is encountered, Ghostly captures the page’s accessibility tree using Playwright’s ariaSnapshot({ mode: "ai" }). The result is stored in StepOutcome.a11y and used by the AI pipeline for planning.