Add an Allocait check to the AGENTS.md of your trading bot
Paste this block into the AGENTS.md of a trading bot so its coding agent calls the Allocait check before every order, with prices from your own source.
The block
Copy it into the AGENTS.md at the root of your bot, then edit it for your own setup.
## Allocait check before every order
Allocait checks which of the owner's own written rules a proposed order would put outside range, or leave further outside, and states the result as facts.
### Rules that do not bend
- Check before every order. No code path places or records an order without calling `check_trades` first (MCP) or `POST /trades/check` (REST).
- Prices come from the owner's own source. Pass a price for every traded symbol and every holding. Never invent a price, take one from memory or from a model, or add a default price. A missing price is an error.
- Record the fill afterward, at the quantity and price that filled. Leave an order that is still open flagged, never guessed at.
- Never place a live order without an explicit human yes. Paper and dry run are the defaults. Add no flag, environment variable or schedule that places unattended.
- Send the key nowhere but Allocait and the broker. Keys come from the environment, stay out of git, and never appear in code, tests, logs or commits.
- When a check reports a rule outside range, say which rule and by how much, then wait for the owner. Example reply: "Buying more ALFA would leave ALFA above its size range maximum. Nothing ordered; waiting for your decision."
- Write no trading advice. Report what the check states and let the owner decide.
### Where the check plugs in
- A bot you are writing now: put the owner's logic in the function that proposes trades, and keep it free of keys. The code that calls Allocait adds the prices and the key.
- An existing bot: leave its logic alone and call the check before each order.
- A price source: one function that takes symbols and returns a price for each. Leave out what it cannot price.What the agent does with the block
A coding agent reads AGENTS.md at the start of a task. The block tells it to call the Allocait check before any order, to take prices from your own source, and to leave live orders to a person.
When the check reports a rule outside range, the agent says which rule and by how much, states that nothing was ordered, and waits for you. It does not retry with other numbers or look for another way to place the order.
Prices come from your own source because Allocait supplies none, and a price the agent made up would make the result describe a portfolio that does not exist.
What it does not do
The check states facts about your own rules. The agent still decides whether to call it, so the instruction has to be in the file.
- It supplies no prices. The bot passes them from your source.
- Claude trading bot rules: the same check from Claude and Claude Code.