AI Rule Editor
The AI Rule Editor lets you write a rule by describing it in plain language. You say what the rule should do ("hold every order over ten thousand that ships abroad") and an AI model writes it, using the fields, methods and actions of your source. The repository checks every rule the AI writes against the source and tells you at once whether it is valid. You can then refine it in conversation ("also exclude returning customers") or switch to the regular Rule Editor to adjust it by hand, and save it with the dialog's usual buttons.
In a saved rule version, which never changes, the same tab answers questions about the version instead: what it does, what it uses, how it was tested and what production recorded.
The AI Rule Editor is available only when your application has connected at least one AI model and you have permission to use it.
It uses these parts of the repository:
- The AI Rule Editor tab, beside the Rule Editor tab in:
- Step 2 of the New Rule and New Draft dialogs (a new rule, a new version, a clone);
- the Draft dialog;
- the Rule Version dialog, where it is read-only;
- the Test dialog, when it holds a draft.
- The conversation: your messages, the AI's replies, and a card for every rule the AI writes. A rule card starts with the rule's state, Valid, Unfinished or Invalid, then the rule as text, then each problem the repository found.
- The message box, with Send (or Stop while the AI works). Its placeholder says what to do: "Ask the AI to write or change this rule..." where you can change the rule, or "Ask about this rule version..." in a Rule Version dialog.
- The bar under the box: Detailed answers, the conversation's token count, and the list of models.
Writing a Rule with the AI
- Open the dialog where you want the rule, for example + New, then New Rule..., and complete Step 1. See Creating Rules.
- In Step 2, click the AI Rule Editor tab.
- Describe the rule in the message box and click Send. The conversation shows Working... while the AI writes.
- Read the rule card. Valid means the rule is complete and fits your source object: it is structurally sound and can be saved, and you do not need to check how it is built. Whether it does what you asked is still yours to judge, so read it, and test it before it goes live. Unfinished or Invalid comes with the problems listed under the rule; ask the AI to fix them, or fix them yourself in the next step.
- To change the rule, describe the change and send it. The AI writes a new card each time; the latest one is the rule.
- Click the Rule Editor tab. The AI's latest rule is now in the Rule Editor, where you can see it element by element and change it by hand.
- Save the rule with the dialog's own buttons, as you would any rule.
Nothing is saved by the AI. The rule is saved only when you save it.
If you change the rule in the Rule Editor tab and then go back to the AI Rule Editor, your next message is sent with the rule as you left it, so the AI continues from your version.
Asking About a Rule Version
- Open a Rule Version dialog and click the AI Rule Editor tab.
- Ask your question, for example "What does this version do differently from the live one?" or "Which tests cover the case of an empty order?".
- To change the rule, start a draft from the version: with the AI tab showing, click the dialog's New Draft.... The New Draft dialog opens with your last request already in its AI Rule Editor, so the AI can carry on from there.
Good Requests
- Use the names you see in the repository's menus for fields and actions.
- Give exact values and limits: "over 10,000", "before the end of the month".
- Ask for one change at a time once the rule exists.
- Uncheck Detailed answers if you only want the rule, without explanations.