Documentation Index
Fetch the complete documentation index at: https://docs.stably.ai/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
STABLY.md is a markdown file you place in your project root to give the Stably AI agent project-specific instructions. Rules defined here apply across all agent modes (create, fix, build, init) and all surfaces (local CLI and server-side CI/ECS test generation).
Think of it like CLAUDE.md for Claude Code — but for Stably. It’s a great way to customize the agent to match your team’s workflow — your conventions, your selector strategy, your project context — while still getting the full benefit of Stably’s built-in browser management, test debugging tooling (e.g. Playwright Trace Viewer), and intelligent test generation under the hood.
Quick Start
File Location and Naming
| Requirement | Details |
|---|---|
| Location | Project root directory (same level as package.json) |
| Filename | Must be uppercase STABLY.md |
| Source control | Must be committed to git |
STABLY.md must be committed to your repository. If it’s .gitignore’d, the CLI will still read it locally, but the server-side agent (CI/ECS) won’t be able to find it — meaning your rules won’t apply during PR-triggered or scheduled test generation.File Format
STABLY.md uses freeform markdown. There’s no required structure — write whatever instructions you want the agent to follow. The content is appended directly to the agent’s system prompt.
Maximum length: 10,000 characters (~2,500 tokens). Files exceeding this limit are automatically truncated with a CLI warning.
Template
When you runstably init, the following template is created:
STABLY.md
Example
Here’s a real-world example for a Next.js e-commerce app:STABLY.md
Relationship to Other Config Files
Stably has three mechanisms for customizing agent behavior. Each serves a different purpose:| File | Scope | Modes | Description |
|---|---|---|---|
STABLY.md | Project-wide rules | All modes (create, fix, build, init) | General instructions — project context, selector strategy, do’s and don’ts |
STABLY-CREATE.md | Test generation rules | create and build only | Test-specific conventions — file naming, folder structure, test patterns |
STABLY-FIX.md | Fix rules | fix only | Fix-specific conventions — selector strategy, timeout handling, test integrity |
stably.yaml → agent.fix.rules | Fix agent rules | fix | Structured config for the fix agent (max turns, parallel tests, rules) |
Best Practices
| Do | Avoid |
|---|---|
Commit STABLY.md to source control so CI and teammates share the same rules. | Adding STABLY.md to .gitignore — the server-side agent won’t find it. |
| Keep rules concise and actionable. | Writing novel-length instructions that exceed the 10,000 character limit. |
Use STABLY.md for project-wide concerns (context, selectors, conventions). | Duplicating rules that already exist in STABLY-CREATE.md or stably.yaml. |
Use the uppercase filename STABLY.md. | Using lowercase stably.md — it will fail silently on Linux CI servers. |
Review STABLY.md changes in PRs like any other config file. | Putting sensitive information (API keys, passwords) in the file. |