Skip to main content
Rules text holds the rules for one scenario and nothing else. Each asset class gets an allocation band (how much of the portfolio the class may take), a size range for one long holding, a size range for one short, or any mix. In the app, Allocait reads the text, shows you what would change, and applies it only after you approve. An agent that calls apply_rules, or the REST API with dry_run false, writes when it makes the call. Allocait does not require a preview first. You or an agent can edit the text outside the app and import it back. Write your rules walks through the steps, and Rules text format lists every key. The full spec is the text agents read.

Example

Illustrative example. The figures are hypothetical, not a recommendation.
The text is one frontmatter block of rules, then notes. Rules text format explains each key, the defaults and the class names.

Importing

Import replaces all of the scenario’s rules with what’s in the text. Classes named in the text get rules; any class not named loses its rule. Import never renames, reorders, or deletes an asset class. Restoring an import’s restore point can remove a custom class that import created, if nothing uses it. In the app, before anything is written, Allocait shows a preview: every class that would change, be added, or be removed, old value next to new. In the app, nothing applies until you approve it. Before an import writes anything, Allocait saves a restore point of the scenario’s current rules. An agent’s save_class_rule call saves one too. Restoring one puts the scenario’s rules back as they were at that point and undoes any later changes. It also removes a custom class that the import created, if nothing uses that class. A restore saves a new restore point, so it can be undone the same way. Allocait keeps the newest 20 restore points per account. Restore points are for undoing the whole scenario. Separately, the Rules tab lists the recent past values of each class rule, newest first; an agent reads them as rule_changes on get_rules. Allocait keeps no reasoning with either.
A scenario with no rules yet has no rules text to show. Allocait says so plainly instead of showing an empty text.

Next steps