Appearance
0016: Guarded Xero writes from chat, mirroring bank lines only
Context
ADR 0013 kept the reconciliation check read-only and said creating missing Xero records would need approval outside chat, as ADR 0005 does for filing. The reason: bank references are free text that anyone paying the company writes, so a crafted reference could steer a language model into writing to the ledger. On 2026-09-28 the owner chose to enter missing lines from chat, with guards, rather than wait for an approval page (days of work) or keep entering them by hand.
Decision
One MCP tool, bank_entries_preview, may create Xero spend or receive money records, and bank transfers between the entity's own bank accounts (added 2026-09-28 for card repayments; refused when the other account already holds that transfer within 3 days, so it is never entered twice). It supersedes point 4 of ADR 0013 for this purpose only.
- It only creates a record for a bank line that the reconciliation check, re-run in the same call, classifies as missing from Xero. Nothing else can be entered, and a line entered once is no longer missing.
- Amount, date and direction come from the bank line, never from the call. The call supplies only the account, tax rate, contact name and an optional description, and the account and tax rate must exist and be active in the entity's Xero.
- Every entry in a call is validated before any is written. Since audit M4 the tool only previews: it stores the plan and returns a preview ID, and
bank_entries_confirmwrites it, taking only that ID, once, within 15 minutes, by the person who made it, after re-running the check. - Records are created unreconciled. The owner still presses OK in Xero's Reconcile screen (ADR 0013): no API can.
- Create only: no edits, deletes, payments against invoices, or anything touching VAT returns. Every write is logged in
ledger_writeunder row-level security. - Filing stays as ADR 0005 and CLAUDE.md rule 5 require: no MCP tool submits or approves a filing.
Consequences
- The Xero app requests
accounting.banktransactions(write) instead of.read; each entity reconnects once. - Worst case, a manipulated call codes a real bank line to the wrong account or tax rate. That is visible in the log and reversible in Xero.
- Before GetMy Books serves other companies, revisit: other owners may want approval outside chat, and the ADR 0005 approval page may be the default.