rules
array in firebender.json
to specify guidelines.
Rules apply to all features of Firebender such as autocomplete, chat, and inline AI changes
Firebender supports both project-specific rules and personal rules that apply across all projects.
See Configuration Files for details on setting up personal rules.
firebender.json
.
General Rules Example: Food delivery app
In$projectRoot/firebender.json
:
firebender.json
Situational Rules Example: Test files
Here’s an example situational rule:firebender.json
ProfileViewModelKotest.kt
, AI will follow the rule Use Kotest framework/BDD for tests
. If you modify MainActivity.kt
, AI will not be provided the irrelevant rule.
filePathMatches
follows the same regex notation as typical line in .gitignore
.Full file rules
For complex or extensive rules, you can use external markdown files instead of embedding all rules infirebender.json
. This solves several problems:
- JSON has limitations for long strings
- Projects often already have documentation (like
README.md
orARCHITECTURE.md
) that can be reused - Keeps rules organized and easier to maintain
firebender.json
docs/architecture.md
file:
docs/architecture.md
Reading Errors
Rules will use the latest file saved immediately. If there are parsing errors it will tell you which fields were incorrect:
rules[0].filePathMatches
is supposed to be a string
and not an array
.
For a complete reference of the rules syntax including advanced patterns and configuration options, see the Rules Syntax Documentation.
Support for .cursor/rules
Firebender has preview support for .cursor/rules
project rules files. This allows you to use existing Cursor project configurations with Firebender.
This is a preview feature. Only
alwaysApply
and globs
MDC headers are currently supported for attaching rules.