Reference

TOGAF ADM Phase Breakdown

AIB schema application of the TOGAF 10 Architecture Development Method (ADM). Maps each ADM phase to the concrete deliverables produced and the schema sections that implement each phase's architectural decisions.

Schema: 387 tables (V1–V11 + migrations 0003–0014), Cloudflare D1 / SQLite 3.37+
Jurisdiction: Liechtenstein (FMA), EEA regulatory scope
Platform: Paperclip agent organisation (27 live agents, 17 with in-repo spec cards; 7 domain skills)


Phase 0: Preliminary

Purpose: Establish architecture capability, governance, and principles.

Deliverables produced:

  • Architecture principles (documented in TOGAF_ADM_BANKING_REFERENCE.md §2)
  • Tailoring of TOGAF for a single-institution regulated bank
  • Identification of 7 architecture domains (Legal Entity, Client, Account, Trading, Payments, GL, Risk)

Principles:

  1. Regulation-first: every column traces to an enacted law or binding GL
  2. Single source of truth: one schema.sql file, no migration divergence
  3. Additive-only: no breaking changes across V1–V10
  4. Tip-off prohibition enforced at DB layer (not application layer)
  5. VIRTUAL over STORED for all compliance ratios (D1 constraint + auditability)

Phase A: Architecture Vision

Purpose: Define scope, stakeholders, and high-level architecture vision.

Scope: Full lifecycle for an FMA-licensed private bank — from client onboarding to regulatory reporting, covering all EEA/Liechtenstein regulations in force through 2026.

Key stakeholder groups:

StakeholderConcern
FMA (Liechtenstein)Regulatory compliance; examination readiness
SPG/AML compliance officerSTR filing, sanctions, KYC retention
DORA ICT risk functionIncident reporting, ICT third-party register
Investment managementSuitability, mandate, SFDR classification
OperationsSettlement, nostro, payments, fee billing
Internal auditImmutable audit log, control evidence
27 Paperclip agentsSchema as persistence layer for all agent actions

Architecture vision statement: A regulatory-complete, single-file persistence schema that enables a 27-agent AI operating stack to service a Liechtenstein private bank across the full client lifecycle, with every compliance obligation encoded at the schema layer where SQLite permits.


Phase B: Business Architecture

Purpose: Define the business model, capabilities, and process flows.

Business domains:

DomainBIAN EquivalentTables
Client & KYCCustomer KYCclient, ubo, pep_record, sanctions_screen, document, kyc_review, onboarding_workflow
Account & MandateCustomer Account Management + Investment Portfolio Planningaccount, suitability_assessment, mandate, product_agreement
Trading & SettlementSecurities Trading + Securities Settlementorder_, trade, settlement, emir_trade_report
Payments & AMLPayment Initiation + AML/Financial Crimebank_transaction, aml_alert, str, aml_investigation_case
General LedgerFinancial Accountingchart_of_accounts, journal_entry, journal_line, trial_balance_snapshot
Regulatory ReportingCompliance Reportingstr, stor_report, fatca_account_report, crs_account_report, regulatory_filing
Risk ManagementCredit Risk + Operational Risk + Market Riskrcsa_risk_event, kri_reading, icaap_snapshot, credit_assessment
Credit LifecycleCredit Risk Assessmentloan_facility, loan_drawdown, loan_repayment_schedule, loan_covenant

Key business processes encoded in schema:

  • Client onboarding (SPG Art. 3–8): onboarding_workflow tracks 8-step SPG completion with SLA deadlines
  • STR filing (SPG Art. 17): aml_investigation_case → str with tipped_off = 0 enforced
  • MiFID II pre-trade gate: 4 checks before order_ approval (suitability + appropriateness + mandate compliance + approved instrument)
  • CSDR settlement discipline: settlement carries T+ISD, T+ISD+3 escalation, and buy-in flags
  • DORA incident 3-stage reporting: ict_incident → fma_dora_incident_report (4h/72h/1month)

Phase C: Information Systems Architecture

C1: Data Architecture (Information Architecture)

Four-layer information model:

LayerDescriptionTable CountExamples
Master DataLong-lived reference entities20+client, legal_entity, instrument, ref_country, chart_of_accounts
Transactional DataBusiness events and lifecycle states80+order_, trade, settlement, bank_transaction, aml_alert
Analytical/RegulatoryComputed positions, ratios, aggregates30+icaap_snapshot, lcr_hqla_item, nsfr_asf_item, pillar3_disclosure
Regulatory ReportingStructured submissions to authorities145+corep_credit_risk_submission, fatca_account_report, dora_register_submission, str

Data quality framework (BCBS 239, 13/13):

PrincipleImplementation
P1 Governancerisk_data_quality.accuracy_flag, risk_data_lineage
P2 Data architectureSingle-file DDL; FK constraints; typed columns
P3 Accuracy/Integrity550+ CHECK constraints; tipped_off = 0; enum-restricted TEXT columns
P4 Completenesscapital_ratio_daily for CET1/T1/TC time-series (daily granularity)
P5 Timelinessretain_until, deadline, SLA flag columns throughout
P6 AdaptabilityForeign keys to ref_country, ref_currency for multi-jurisdiction extension
P7 Accuracy (risk data)VIRTUAL ratio columns recompute from current inputs on every read
P8 Completeness (risk data)risk_data_quality.completeness_pct per metric
P9 Timeliness (risk data)risk_report_distribution with data-cut SLA and breach counter
P10 Aggregationtrial_balance_snapshot, corep_finrep_bridge reconciliation
P11 Distributionrisk_report_distribution recipient registry
P12 Reviewkri_reading.escalated, model_risk_register.open_critical_findings
P13 Remediationaudit_finding with remediation deadline; srep_outcome remediation actions

C2: Application Architecture (Systems Architecture)

Agent skill → schema domain mapping:

Cross-cutting write rules:

  • audit_log is append-only — no agent may UPDATE or DELETE rows
  • str.tipped_off and stor_report.tipped_off are DB-layer enforced to 0 — no agent override path
  • bank_transaction stays in awaiting_dual_auth until aib-compliance + one other skill record separate authorisations

Phase D: Technology Architecture

Technology stack:

ComponentChoiceRationale
DatabaseCloudflare D1 (SQLite 3.37+)Native Workers bindings; zero connection pooling; portable DDL
RuntimeCloudflare WorkersCo-location with D1; low-latency agent reads
Agent runtimePaperclipAgent org management; issue ↔ entity bridge via workflow_issue
LLM inferenceOpenRouterDecoupled from specific model provider
Schema formatSingle schema.sqlCI-validatable; one-command D1 deploy; TOGAF artifact

Deployment:

wrangler d1 execute aib-mock --file=schema.sql # Expected: 387 tables, 0 syntax errors

Technology constraints:

  • D1 does not support STORED generated columns → all computed columns VIRTUAL
  • D1 PRAGMA foreign_keys = ON is not persistent across connections — enforced at Wrangler binding level
  • D1 max database size: 10 GB (sufficient for a single-institution operating schema)
  • No native JSON type — JSON payloads stored as TEXT, structure validated at application layer

Indexes:

  • 493 total indexes
  • Naming: idx_{table_prefix}_{column(s)}
  • All foreign key columns indexed for join performance
  • Compound indexes on reporting dimensions (entity × date, client × period)

Phase E: Opportunities and Solutions

Implementation waves:

WaveSchema VersionsTheme
Wave 1V1–V2Foundation: client lifecycle, GL, BCBS 239, DORA
Wave 2V3–V42024–2026 regulatory gap closure: MiCA, SFDR, FRTB, IRRBB, SA-CCR
Wave 3V5–V6Operational depth: remuneration, IRB, GIPS, collateral, FINREP
Wave 4V7–V8BCBS 239 completion, COREP, LCR/NSFR full decomposition, GDPR RoPA
Wave 5 (target)V9–V10Credit lifecycle, hedge accounting, agent integration depth
Wave 6 (planned)V11+CSRD full enforcement, AI Act high-risk activation, AMLA direct supervision

Phase F: Migration Planning

Migration approach: Schema is additive-only. Each version appends to schema.sql:

  1. New CREATE TABLE blocks (with section header comment)
  2. New CREATE INDEX blocks
  3. ALTER TABLE ADD COLUMN for field extensions to existing tables (last, after all CREATE blocks)
  4. Retention schedule addendum

No breaking changes policy: No existing column removed or renamed. No existing CHECK constraint modified. New constraints may be added as new columns with DEFAULT values.

Rollback: Re-deploy prior version of schema.sql via wrangler d1 execute --file=schema_vN.sql (D1 requires database re-creation for rollback — no incremental rollback).


Phase G: Implementation Governance

Validation gates (every version):

# 1. SQLite syntax + FK check sqlite3 :memory: < schema.sql sqlite3 :memory: "PRAGMA foreign_key_check;" # 2. Table count sqlite3 :memory: "SELECT COUNT(*) FROM sqlite_master WHERE type='table';" # Expected: 387 (V11 + migrations 0003–0014) # 3. No orphaned objects sqlite3 :memory: "SELECT name FROM sqlite_master WHERE type='table' AND sql IS NULL;" # Expected: 0 rows # 4. Tip-off prohibition sqlite3 :memory: "SELECT sql FROM sqlite_master WHERE name IN ('str','stor_report');" | grep "tipped_off = 0" # Both must match

Schema change checklist:

  • New table name unique — check against sqlite_master
  • All FK columns reference correct PK: ref_country(iso2), not ref_country(code)
  • Index prefix matches table name (first 4–5 chars)
  • VIRTUAL columns reference base columns only — no chained VIRTUAL refs
  • retain_until column present on all tables with retention obligations
  • Scaffold tables marked with -- SCAFFOLD: regulation pending / enforcement YYYY
  • Retention schedule addendum updated in schema.sql
  • README badge and deploy count updated

Phase H: Architecture Change Management

Trigger conditions for new schema version:

  • New regulation enacted (law published in EEA Official Journal or FL LGBl)
  • FMA examination finding requiring structural schema change
  • SREP outcome identifying unaddressed regulatory gap
  • Agent operating pattern requiring new persistence domain

Version review cadence:

  • Annual: regulatory horizon scan (new EBA GLs, CRR amendments, MiCA RTS)
  • Event-driven: major ICT incidents revealing schema gaps; DORA/DORA Register updates
  • SREP cycle: post-SREP gap analysis drives next version scope

Cross-Phase: TOGAF Architecture Layers Applied to AIB

TOGAF LayerAIB ManifestationPrimary Schema Domains
Business ArchitectureLiechtenstein FMA-licensed private bank; 7 business domains; 27-agent operating stack (17 with in-repo spec cards)Client, Account, Trading, Payments, Reporting
Information Architecture387-table DDL; 4 data layers (master/transactional/analytical/regulatory); BCBS 239 13/13Risk data quality, lineage, all regulatory tables
Systems Architecture9 Paperclip domain skills with defined schema write authority; workflow_issue integration bridgeAll 387 tables via aib-* skill mapping
Technology ArchitectureCloudflare D1/Workers + OpenRouter inference; single-file SQLite DDL; VIRTUAL-only computed columnsict_asset, ict_incident, dora_contractual_arrangement, deployment DDL