xero-ai-review-gateway
A fixed-policy, zero-network ledger-review boundary for AI, not an AI that operates Xero.
The repository name is the public project identity; the elizabeth-anne-alexander distribution, import package and command remain compatibility identifiers.
xero-ai-review-gateway consumes validated Xero-shaped trial-balance exports and produces a bounded, redacted variance-review result alongside separate local human-reviewer evidence. It deliberately features no network calls, no cloud telemetry, no LLM API clients, and zero accounting-system write operations.
Zero-Network Architecture
%%{init: {"themeVariables": {"lineColor": "#B1AFAD"}}}%%
flowchart TD
subgraph ClientPerimeter ["Local Client Perimeter (Zero-Network)"]
Raw["Validated Xero Trial Balance Export"] --> Validate["Context & Hash Integrity Gate"]
Validate --> Engine["Decimal Variance Review Engine<br/><i>(Fixed Policy v1)</i>"]
end
subgraph ArtifactSplit ["Deterministic Artifact Generation"]
Engine --> Split{"Split Boundary"}
Split --> Model["model-result.json<br/><i>(Redacted Bounded Values for AI)</i>"]
Split --> Evidence["reviewer-evidence.json<br/><i>(Local Human Display Evidence)</i>"]
Split --> Receipt["receipt.json<br/><i>(Cryptographic SHA-256 Sealing)</i>"]
end
subgraph Governance ["Human-in-the-Loop Signoff"]
Model --> LLM["AI Advisory Assessment"]
Evidence & Receipt & LLM --> Reviewer["Human Accountant Signoff Gate"]
Reviewer --> Decision{"Decision Status"}
Decision -->|ACKNOWLEDGED| Done["Signed Working Paper"]
Decision -->|NEEDS_EVIDENCE / ESCALATED| Action["Further Investigation"]
end
style ClientPerimeter fill:#140E24,stroke:#4F485E,stroke-width:2px,color:#FFFFFF
style ArtifactSplit fill:#1E1236,stroke:#5C2D91,stroke-width:2px,color:#FFFFFF
style Governance fill:#2D184E,stroke:#8A4AC7,stroke-width:2px,color:#FFFFFF
Quick Demo
# Install package in editable development mode
pip install -e ".[dev]"
# Run deterministic evaluation
elizabeth-anne-alexander evaluate \
--context samples/contexts/sample-monthly-variance.context.json \
--request samples/requests/sample-revenue-variance.request.json \
--policy policy/demo-policy-v1.json \
--out build/demo
Validate Human Review Signoff
elizabeth-anne-alexander validate-review \
--evidence build/demo/reviewer-evidence.json \
--receipt build/demo/receipt.json \
--decision samples/decisions/sample-review-decision.json
Control boundary
- The canonical source contract has exactly ten columns:
ReportDate,Tenant,Section,AccountID,AccountName,AccountCode,Debit,Credit,YTDDebit,YTDCredit. - CSV schema, duplicate account IDs, reporting dates, balance pairs, source hashes, entity, basis, currency, tracking filters, and draft setting are all checked before review.
- Monetary values use
Decimal, never binary floating point. percent_changein the model result is expressed in percent and quantized to four decimal places ("18.3333"means 18.3333%). It isnullwhen there is no prior balance to compare against.- The model result states its own
currencyandsign_convention. Amounts are debit-positive (ytd_net = YTDDebit - YTDCredit), so a revenue, liability, or equity balance is negative and a revenue increase shows as a negativedelta. - Current and prior reports must sit in the same Australian financial year, or be the same day and month in different years. YTD columns reset on 1 July, so a comparison across the reset would report a whole prior-year balance as a movement.
- Current/prior trial balances are joined by stable
AccountID, not account display name or code. - An account changing section between periods fails closed instead of disappearing from, or being silently reclassified within, a section-scoped comparison.
- The model result never contains a tenant name, account name, account code, source file path, token, raw error, or free text copied from source data.
- Artefact timestamps (
export.generated_at,reviewed_at) are accepted asYYYY-MM-DD, thenT,t, or a space, thenHH:MMwith optional:SSand optional.plus one to six fractional digits, thenZ,z, or+/-HH:MMwith optional:SS. The gateway fixes that grammar itself rather than inheritingdatetime.fromisoformat, whose accepted forms widened in Python 3.11: a bare+10offset, a week date, a basic-format20260809T000000+0000, and a fraction longer than six digits are refused on every interpreter, as is a separator character other thanT,t, or a space. - The three run artefacts are staged beside their destinations and moved into place only once all three are written, receipt last. The moves are not one atomic step, so an interrupted run can still leave one new file beside two old ones;
validate-reviewrefuses that pack, because the receipt seals both the reviewer evidence and the model result sitting beside it. - The package contains no network imports or mutation adapter. A future live connection must remain an authorised, read-only export handoff rather than an AI-controlled broad Xero tool set.
Scope and limitation
Every source manifest, review context, model result, reviewer evidence, and receipt is marked mode: synthetic. The policy, request, and human-decision files carry no mode key: each is validated against an exact key set, so adding one is rejected. The validate-review output carries no mode key either; it reports the decision status for a run whose artefacts were already checked. It is a local design demonstration, not a client-data processor, production security system, accounting service, or professional opinion. The reviewer evidence/model-result file split demonstrates disclosure minimisation only; it is not an access-control mechanism by itself.
Documentation & Governance
DATA-FLOW.md– Formal data-flow and zero-network security specification.CITATION.cff– Academic and industry citation metadata.LICENSE– MIT License.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elizabeth_anne_alexander-0.2.1.tar.gz.
File metadata
- Download URL: elizabeth_anne_alexander-0.2.1.tar.gz
- Upload date:
- Size: 45.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff514722753759750a4c8ae2bb621cebb68ec563d9495f5e0797484a8771c141
|
|
| MD5 |
6403e63be64156064783c278cba6f940
|
|
| BLAKE2b-256 |
17e5129202cda9957a37ea22d9c7a1550572c39918c244bd9144a6849bc152c2
|
Provenance
The following attestation bundles were made for elizabeth_anne_alexander-0.2.1.tar.gz:
Publisher:
release.yml on ryanduguid/xero-ai-review-gateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
elizabeth_anne_alexander-0.2.1.tar.gz -
Subject digest:
ff514722753759750a4c8ae2bb621cebb68ec563d9495f5e0797484a8771c141 - Sigstore transparency entry: 2579713924
- Sigstore integration time:
-
Permalink:
ryanduguid/xero-ai-review-gateway@4027824e0a24bbc20aef313219a7f78718a8e7c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ryanduguid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4027824e0a24bbc20aef313219a7f78718a8e7c1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file elizabeth_anne_alexander-0.2.1-py3-none-any.whl.
File metadata
- Download URL: elizabeth_anne_alexander-0.2.1-py3-none-any.whl
- Upload date:
- Size: 25.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5d3fe7910f7d23d510b2a2fb4b7f3dd1a6f84e3e16cdaa94f6507997d0074d9
|
|
| MD5 |
051a35c549ef541a6238fdf67fea08e7
|
|
| BLAKE2b-256 |
51ef674602f37db8c59e97d8dfc12e231c58ce924d6d0ecf236778eb45c6762a
|
Provenance
The following attestation bundles were made for elizabeth_anne_alexander-0.2.1-py3-none-any.whl:
Publisher:
release.yml on ryanduguid/xero-ai-review-gateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
elizabeth_anne_alexander-0.2.1-py3-none-any.whl -
Subject digest:
f5d3fe7910f7d23d510b2a2fb4b7f3dd1a6f84e3e16cdaa94f6507997d0074d9 - Sigstore transparency entry: 2579713931
- Sigstore integration time:
-
Permalink:
ryanduguid/xero-ai-review-gateway@4027824e0a24bbc20aef313219a7f78718a8e7c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ryanduguid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4027824e0a24bbc20aef313219a7f78718a8e7c1 -
Trigger Event:
workflow_dispatch
-
Statement type: