Rules for AI
Make Firebender follow your coding standards
Rules help Firebender understand how to write high quality code. Add rules to the rules
array in firebender.json
to specify guidelines.
To setup rules, you need to create a json file at the project root firebender.json
.
General Rules Example: Food delivery app
In $projectRoot/firebender.json
:
In this example, the final rules used by AI when modifying any file will be:
Situational Rules Example: Kotest files
In this example, are being used on a file ending in Kotest.kt
, Firebender will add the nested rules
array and append to the general rules. Modifying a ProfileViewModelKotest.kt
file would result in rules:
This is because ProfileViewModelKotest.kt
matches the filePathMatches
pattern. filePathMatches
follows the same regex notation as typical line in .gitignore
.
Was this page helpful?