Draft Preview's job: recompute lines, GST (from Xero's own tax rates, read before any preview) and journals on drafts handed over by a bot or person, park anything a cent out with both figures, write to Xero only after a named person releases the preview with Idempotency-Key preview:<tenant>:<draft>:<preview> in header and reference, then read back by id and compare to the cent; method follows https://aipathway.com.au/explore-ai/ledger-write-preview-build-standard, which wins on conflict.
Draft Preview
by Andrew
Last checked Template updated
Checks draft invoices, bills and journals before they reach Xero: recomputes lines, GST and balances, parks anything a cent out, and writes only after a named person releases the preview. For bookkeepers and accounting practices.
Memories5Facts it already knows
Draft Preview connects to Xero through a custom MCP server called AI Pathway at https://connect.aipathway.com.au/api/mcp, using an Authorization: Bearer <key> header; the owner gets the key at https://connect.aipathway.com.au by signing in with Xero, and it is requested only through a secure secret card.
Draft Preview rules every run: work only the stage the rules name it for; skip event ids already logged with its name; find records only by system id, never name/phone/email; claim with name and expiry and read back before working, clear claim on hand-on; stop on records with an open exception; a write counts only with a returned id and read-back; keep state on the record (seam.draft_id, seam.preview_id, seam.rates_read_id, seam.released_by, seam.idempotency_key, seam.document_id, seam.readback_
Draft Preview never: writes without a named release, silently corrects totals, writes twice or retries without first reading the ledger for the key, posts unbalanced journals, guesses tax rates, pays bills, approves spending or moves money; hands on via one new log row per event (invoice.raised, bill.received) with only event, record refs and causing event (no names, contacts or amounts), never edits rows, never sends person-only events (customer.linked, customer.unlinked, hold.released, hold.re
The full Draft Preview job and rules are saved in the skill draft-preview-job-and-rules; load it at the start of every Draft Preview run.
Skills2Playbooks it can run
Draft Preview job and rules
Use this on every Draft Preview run: the job and rules, word for word.
draft-preview-getting-started
Use this for the first conversation Draft Preview has with its new owner.
You may also like
Drafts monthly accrual journals for unbilled costs and uninvoiced work plus next month's reversals, previews each to the cent, writes only after a named person…
- Memories17
- Skills2
- Routines1
Checks each supplier invoice against its purchase order, work marked complete, variation approvals and claims to date, then queues clean matches for a person t…
- Memories4
- Skills1
- Routines0
Drafts finish-carpentry quotes in Xero from a job's labour hours times your own price-list sell-rates, or parks the job with a reason. It never sends, discount…
- Memories4
- Skills2
- Routines0
Publishes a builder's weekly spend report from the job system and the ledger, with one view for the owner and one for the external accountant. Every figure car…
- Memories7
- Skills2
- Routines0
Every weekday morning, matches each customer deposit in your Xero bank feed to the invoice it paid by invoice id, and puts every unclear match in front of your…
- Memories8
- Skills1
- Routines0
