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
In addition toSTABLY.md (which applies to all agent modes), you can create mode-specific rules files that are only loaded for a particular command. This is a great way to customize the agent to match your team’s workflow — your conventions, your folder structure, your assertion style — 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.
| File | Loaded by | Purpose |
|---|---|---|
STABLY-CREATE.md | stably create | How tests should be written — file structure, patterns, assertions |
STABLY-FIX.md | stably fix | How tests should be repaired — selector strategy, timeout handling, test integrity |
Quick Start
- STABLY-CREATE.md
- STABLY-FIX.md
File Location and Naming
Both files follow the same conventions:| Requirement | Details |
|---|---|
| Location | Project root directory (same level as package.json) |
| Filenames | Must be uppercase: STABLY-CREATE.md, STABLY-FIX.md |
| Source control | Should be committed to git |
Commit these files to your repository so your entire team shares the same conventions. This is especially important when commands run in CI pipelines or are invoked by background agents.
File Format
Both files use 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) per file. Files exceeding this limit are automatically truncated with a CLI warning.When to Use Each File
STABLY-CREATE.md
Use for rules specific to test generation:- Test file naming conventions and folder structure
- Test patterns and frameworks (Page Object Model, fixtures, etc.)
- Assertion strategies and test data patterns
- Tags and annotations (
@smoke,@regression) - Which Stably SDK methods to prefer (
agent.act(),aiAssert(), etc.)
STABLY-FIX.md
Use for rules specific to test fixing:- Selector replacement strategies (e.g., prefer
data-testidover CSS classes) - How to handle flaky tests vs genuinely broken tests
- Timeout and retry policies
- Which files or directories the agent should or shouldn’t modify
- Comment and documentation requirements for changes
- When to flag a test for human review instead of auto-fixing
Examples
- STABLY-CREATE.md
- STABLY-FIX.md
STABLY-CREATE.md
STABLY-FIX.md vs agent.fix.rules in stably.yaml
You can also define fix rules in stably.yaml under agent.fix.rules:
stably.yaml
STABLY-FIX.md and agent.fix.rules are present, they are concatenated — agent.fix.rules is loaded first, then STABLY-FIX.md. They are complementary, not competing.
| Mechanism | Best for |
|---|---|
STABLY-FIX.md | Longer, detailed fix rules in freeform markdown — easy to review in PRs |
agent.fix.rules | Short, structured rules that live alongside other stably.yaml config |
Relationship to Other Config Files
| File | Scope | Modes | Description |
|---|---|---|---|
STABLY.md | Project-wide rules | All modes (create, fix, init) | General instructions — project context, selector strategy, do’s and don’ts |
STABLY-CREATE.md | Test generation rules | create 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 both files to source control so CI and teammates share the same conventions. | Adding them to .gitignore — CI agents won’t find them. |
| Keep rules focused on their respective mode (generation vs fixing). | Putting general project context here — use STABLY.md for that. |
| Use concise, actionable rules the agent can follow. | Writing novel-length instructions that exceed the 10,000 character limit. |
Use uppercase filenames: STABLY-CREATE.md, STABLY-FIX.md. | Using lowercase — it will fail silently on Linux CI servers. |
| Review changes in PRs like any other config file. | Duplicating rules that already exist in STABLY.md or stably.yaml. |