Six binding decisions — each encoding a constraint that shaped the system's structure. Written at design time, stored in version control, referenced by every agent that touches financial data. Not post-hoc documentation. The architecture is the argument.
Every SAP BAPI or OData write that modifies the intercompany ledger must carry a committed approval record ID as a mandatory parameter. The gate validates this ID against the HITL audit table in BigQuery before executing. An absent, expired, or already-consumed ID causes the write to be rejected at the gate — no exception path exists. The approval record is written to BigQuery and considered committed only after a named controller has approved the specific correction payload. The record ID is single-use: a second write attempt with the same ID is rejected.
Deploy an ensemble of Isolation Forest (unsupervised anomaly scoring — no labelled data required at initialisation) and XGBoost classifier (supervised refinement trained on HITL override labels as they accumulate). Scores are fused via a weighted combiner. Any fused score above the 0.72 threshold triggers SHAP TreeExplainer — deterministic, not stochastic — which is applied to the XGBoost component only. Isolation Forest anomaly scores are surfaced as raw input features to the XGBoost layer, not independently explained via SHAP. The XGBoost SHAP output, which encodes the contribution of all features including the Isolation Forest score, constitutes the explanation payload stored in the HITL audit trail and presented to the controller. This scoping ensures SHAP determinism is preserved and that the Art. 13 explanation reflects the decision-making component, not the unsupervised scoring layer where SHAP stability guarantees do not hold.
Deploy a Prophet + LightGBM stacking ensemble. Prophet handles calendar seasonality explicitly through its native regressor interface — payroll dates, quarter-end, public holiday calendars per jurisdiction are registered as regressors, not inferred from the time series. LightGBM handles structural features: FX rates, IC sweep history, AP aging, credit line data. A meta-learner trained on holdout data determines the MAPE-weighted blend ratio per forecast horizon. Output is a 13-week rolling forecast with P10/P50/P90 uncertainty bands per entity and consolidated.
Deploy three separate Cloud Run services — one per agent domain — each with independent autoscaling configuration, independent HITL SLA, independent deployment pipeline, and independent failure boundary. Services share the HITL service, SAP connector, and audit log as separately deployed infrastructure. Pub/Sub topics route events to the correct agent service. No cross-service dependencies at the application layer.
Separate Canadian entity data into a dedicated BigQuery dataset (af_ca_pipeda) deployed in the northamerica1 multi-region. Dataset-level IAM policy restricts access to the Canadian-entity service account only and encodes purpose limitation as a dataset label. A PIPEDA auditor can verify data residency from the dataset's location metadata and purpose limitation from the IAM policy — neither requires inspecting query logs. Cross-dataset joins between af_ca_pipeda and other datasets are blocked by IAM boundary — enforced structurally, not by application logic.
Implement ISO 20022 Open Banking as the single bank connectivity standard. All four banking relationships support ISO 20022 post-2025 (the EU mandated migration deadline). A single adapter handles camt.052 (intraday position), camt.053 (end-of-day statement), pain.001 (payment initiation), and pacs.008 (credit transfer). One integration pattern covers all four banks. Message schema validation is enforced at the adapter layer before any data reaches the agent.
Regulatory encoding across all six ADRs: ADR-AF-01 encodes EU AI Act Art. 14 human oversight structurally via the SAP write gate. ADR-AF-02 encodes Art. 13 transparency via SHAP determinism (scoped to the XGBoost component; see ADR for scope note). ADR-AF-03 satisfies Art. 13 for treasury decisions via LightGBM SHAP attribution with P10/P50/P90 forecast bands. ADR-AF-04 enables independent HITL SLA management per agent domain — a prerequisite for Art. 14 compliance at scale. ADR-AF-05 (Under Review) — PIPEDA purpose limitation and data residency encoding is the intended outcome pending written confirmation from Canadian privacy counsel; regulatory status is not yet finalised. ADR-AF-06 ensures bank-to-corporate connectivity via ISO 20022, the mandated standard for EU high-value and domestic payment messaging post-2025 (ECB TARGET2/T2 migration). None of these decisions are retrofitted — each is a load-bearing constraint that shaped the architecture from first principles.