Inputs
Start with canonical CSVs written by the Xero trial balance exporter. The example uses these inputs:
- Current and prior trial balances, required: one organisation and one report date in each file. Both must name the same organisation, with the prior date earlier than the current date.
- Account mapping, optional: a CSV assigning accounts to review groups. With a supplied file, missing mappings are flagged for review. Omit it and the mapping control is not run.
- Subledger balances, optional: supplied balances to compare with the trial balance. Omit them and subledger reconciliation is not run.
- Review note, optional: a human acknowledgement. It does not clear exceptions or approve the close.
Set the absolute and percentage materiality thresholds and reconciliation tolerance for the review. Choose an output directory outside version control. The pinned source documentation defines the accepted files and controls.
Outputs and status
close-summary.md: overall status, thresholds, source hashes and the exception table.exceptions.csv: account-level differences, reasons and suggested reviewer actions for Excel or Power BI.client-queries.csv: draft questions for exceptions a client can help resolve. A preparer must review them before sending anything.close-review-pack.json: structured results and evidence for the run, including any supplied review acknowledgement.
PASS means the configured checks passed on the supplied files. REVIEW or BLOCKED requires attention and returns exit code 2. Malformed inputs, invalid configuration or an output path the tool refuses return exit code 1. A human decides whether the close is acceptable.
Worked example: balanced trial balance, unfinished review
The fictional example compares 31 July 2026 with 30 June 2026. With thresholds of $10,000 and 10%, and a reconciliation tolerance of $0.01, the result is REVIEW: 8 exceptions, none blocked, and 6 draft client queries.
| Exception | Result | Reviewer action |
|---|---|---|
| Creditors reconciliation | Trial balance less supplied subledger: −$250. | Trace the reconciling items and document their cause. |
| Account mapping | Operating Expenses, account 6000, has no supplied mapping. | Confirm the account’s review group. |
| Financial year reset | The comparison crosses 1 July. | Resolve the reset before treating profit and loss YTD differences as ordinary monthly movements. |
Five threshold movements make up the remaining exceptions. The 8 exceptions are not 8 accounting errors. The review acknowledgement leaves the result at REVIEW.
The captured manager case study explains the selected exceptions. The command below reproduces the 4-file output at that same commit. All inputs are fictional.
Run the example
Needs Git and Python 3.10 or later. The pinned source command uses Python’s standard library. It needs no Xero account, API access or client files.
git clone https://github.com/ryanduguid/accounting-review-pipeline.git
cd accounting-review-pipeline
git checkout ae88966fc416f6f2ad618652779c50d0e348949d
cd packages/monthly-close-control-plane
python -m closecontrol.cli review --current examples/current_trial_balance.csv --prior examples/prior_trial_balance.csv --mapping examples/account_mapping.csv --subledger examples/subledger_balances.csv --absolute-threshold 10000 --percentage-threshold 0.10 --reconciliation-tolerance 0.01 --review-note examples/review_note.json --output ../../../close-control-demo
Expect exit code 2 and REVIEW; 8 exception(s); 6 client query(ies) drafted. The output directory is beside the checkout. Keep review packs outside version control; the command refuses an output directory inside a checkout.
Software issue using fictional data? Open an issue.
Reproduce a refusal: output inside the checkout
From the same component directory at source commit ae88966, repeat the fictional example with only --output changed to ./close-control-demo:
python -m closecontrol.cli review --current examples/current_trial_balance.csv --prior examples/prior_trial_balance.csv --mapping examples/account_mapping.csv --subledger examples/subledger_balances.csv --absolute-threshold 10000 --percentage-threshold 0.10 --reconciliation-tolerance 0.01 --review-note examples/review_note.json --output ./close-control-demo
Expect exit code 1 and an output error saying the directory is inside the version-control checkout. The command creates no pack. This guard runs before reading the input files, because review packs can contain client accounts and balances.
Use a new access-controlled directory outside version control for an actual review. The example proves this output-path refusal; it does not test every malformed input or establish that a close is acceptable.
Limits
A balanced trial balance can still contain omissions, misclassifications or unsupported transactions. These checks use the files, mappings and thresholds you supply. They do not establish that the source records are complete or that an accounting treatment is correct.
The tool cannot post journals, make payments, lodge returns, lock a period or approve a close. It does not send the draft client queries. A reviewer must investigate the exceptions and record the decision through the firm’s workpaper process.
Common questions
Does Monthly Close Controls connect to Xero?
No. It reads local CSV files in the canonical Xero trial balance export format. Use the Xero trial balance exporter separately to obtain those files.
Can I open the exception report in Excel?
Yes. Import exceptions.csv to filter the account-level findings, differences and reviewer actions. The tool also writes a Markdown summary and a JSON evidence pack.
Does PASS approve the month-end close?
No. PASS means the configured checks passed on the supplied inputs. A human still reviews completeness, accounting treatment and the evidence before approving a close.