CLA Intelligence Architecture

CLA AI Hub

Intelligence Architecture

Decision Operating System · v233 · April 2026

Partner-facing how-to is now at /manual/ — this page keeps the architectural doctrine (audiences: BI team, CLA Global, investors, future maintainers). The Manual keeps the day-to-day "what does this tool do, how do I use it". Both stay in sync at deploy time.

0. System Definition

The CLA AI Hub is a Decision Operating System.

It does not surface data.
It does not generate generic insights.

It detects risk, structures decisions, explains evidence, orchestrates action, and learns from outcomes.

Every output in the system is governed, traceable, and continuously improving.
Contents
1. Architecture Overview 2. Layer 1 — Live Data Aggregation (Reality) 3. Layer 2 — Predictive Patterns (Behavior) 4. Layer 3 — Cross-Practice Detection (System) 5. Layer 4 — AI Intelligence (Reasoning) 6. Layer 5 — Decision Operating System (Execution) 7. Layer 6 — Trust Architecture (Governance) 7b. Layer 7 — Counterfactual Simulation 7c. Layer 8 — Economic Impact Engine 7d. Layer 9 — Autonomous Escalation 7e. Layer 10 — Confidence Calibration 8. Decision Flow (System Loop) 9. Priority Score Engine (Decision Gravity) 10. Data Pipeline (Operational Flow) 11. System Doctrine (Non-Negotiables) 12. Strategic Positioning 13. Final Definition 14. System Surfaces 15. Roadmap
April 2026 additions
16. Shared Module Ecosystem 17. Cross-Tool Handoff Mesh 18. Anticipatory Layer 19. Self-Improvement Loop → Partner Manual (/manual/) → Next-Level Evolution

1. Architecture Overview

The system operates across six core intelligence layers, extended by four operational layers, each designed to operate independently, degrade gracefully, and contribute to a unified decision flow.

End-to-end flow

Sense
Detect
Connect
Reason
Decide
Trust
Simulate
Learn
Escalate
Calibrate
LayerRoleNatureLatency
L1Sense realityRule-basedReal-time
L2Detect patternsStatistical~1s
L3Connect the firmRule-basedReal-time
L4ReasonAI (Claude)~2s (cached)
L5Structure decisionsSystem logic~200ms
L6Govern trustMetadataN/A
L7Simulate decisionsAI + Rule-based~3s
L8Price decisionsRule-based~200ms
L9Escalate automaticallyRule-basedCron (daily)
L10Calibrate confidenceStatisticalWeekly

2. Layer 1 — Live Data Aggregation

Reality Layer
Establish a real-time, unified operational baseline.

The system continuously reads across all practice tools and constructs a single firm-wide state model. Immediate visibility into overdue work, blocked workflows, review queues, and active execution.

"What is happening right now?"
Design principle: Zero abstraction. No inference. No delay. Pure operational truth.

3. Layer 2 — Predictive Patterns

Behavior Layer
Understand how users actually operate.

Analyzes 30-day behavioral history to detect day-of-week workflows, tool usage sequences, and session continuation patterns. Enables personalized workflow anticipation, context-aware shortcuts, and behavioral continuity.

"What is this user likely trying to do?"

4. Layer 3 — Cross-Practice Detection

System Layer
Break silos and reveal firm-level risk.

The only layer that sees all practices simultaneously. Detects when a client appears across multiple practices with issues, aggregates risk at client level, and creates coordination context.

"Where is the firm exposed across boundaries?"
This is structurally impossible in siloed systems.

5. Layer 4 — AI Intelligence

Reasoning Layer
Convert system state into actionable intelligence.

Uses Claude to prioritize signals, generate explanations, recommend actions, and detect anomalies. Produces one Next Best Move, 3-4 high-signal insights, anomaly detection, and narrative synthesis across all practices.

"What matters most — and why?"
Constraint: AI never writes directly to UI. It must generate structured objects (signals or cases).

6. Layer 5 — Decision Operating System

Execution Layer
Convert intelligence into structured, executable decisions.

This is the core system. It transforms signals → decisions → actions → outcomes → learning.

ObjectRole
SignalDetected pattern or anomaly
Decision CaseStructured situation requiring action
EvidenceFacts and inferences supporting the case
RecommendationSequenced action plan
ActionUser execution record
OutcomeResult and resolution
LearningCompounded intelligence
"What exactly should be done — by whom — and in what order?"

7. Layer 6 — Trust Architecture

Governance Layer
Ensure the system is auditable, explainable, and reliable.

Every output is governed by evidence traceability, confidence scoring, fact vs inference separation, source attribution, timestamping, and a full audit trail.

"Can this decision be trusted?"

7b. Layer 7 — Counterfactual Simulation

Simulation Layer
Price every decision before it is made.

Generates 3 scenarios per case (recommended, delay, escalate) with success probability, resolution time, and cost estimates. Economic factor library includes ANAF penalties, delay costs, and client tier baselines.

"What happens if we act now vs later vs escalate?"
Every recommendation should show the cost of inaction.

7c. Layer 8 — Economic Impact Engine

Economics Layer
Express everything in CFO language.

Per case: penalty risk, revenue exposure, delay cost per day. Aggregated across the firm as total economic exposure. Drives priority scoring and partner-level visibility.

"What is the financial consequence of this decision?"

7d. Layer 9 — Autonomous Escalation

Enforcement Layer
Operational enforcement when humans don't act.

Cases exceeding time thresholds auto-escalate: CRITICAL 4h, HIGH 24h, MEDIUM 72h, LOW 7 days. Records AUTO_ESCALATE action, updates case status, creates audit trail. Runs daily at 06:20 UTC.

"What happens when no one acts?"
The system does not wait. Inaction has consequences.

7e. Layer 10 — Confidence Calibration

Calibration Layer
Track whether the system's confidence is actually correct.

Compares predicted outcomes vs actual results. Builds calibration curves. Computes model trust scores. Identifies which signals are reliable and which are noise. Feeds back into signal weighting.

"Is the system getting smarter or drifting?"

8. Decision Flow

The system operates as a closed loop:

Data → Signal → Case → Action → Outcome → Learning → Better Signal

This creates compounding intelligence, improving recommendations, and institutional memory.

Extended loop (Wave 2-4)

Case → Scenario Simulation → Economic Pricing → Decision
                                                    ↓
                                              Action → Outcome
                                                    ↓
                                              Learning → Calibration → Better Signal
                                                    ↓
                                              (No action?) → Auto-Escalation

The system does not reset. It learns continuously.

9. Priority Score Engine

Every decision is ranked using a multi-factor scoring model. This defines urgency and drives triage.

ScoreLaneMeaning
≥ 80Decide NowRequires judgment now
60–79Fix TodayUrgent execution
40–59WatchEmerging risk
< 40LearnSystemic pattern

The score converts complexity into clarity.

10. Data Pipeline

Practice data ingested
    ↓
Signals generated
    ↓
Decision cases created
    ↓
Intelligence assembled
    ↓
User acts
    ↓
Outcomes recorded
    ↓
Learning updated

This ensures: no black boxes, no orphan insights, no lost decisions.

11. System Doctrine

No alert without context.
No recommendation without evidence.
No action without ownership.
No case without outcome learning.

And critically:

No fake data. No hardcoding.
No AI output without traceability.
No UI element without system backing.

Every visible insight must trace to:
event → signal → case → evidence → action → outcome

Pending Work & Trust Layer

No priority without reasoning. Every surfaced item explains why it outranks others.
No pending item without change marker. Users see what's NEW, ESCALATED, OVERDUE, or STILL PENDING.
No blocked item in the actionable lane. Separate what's stuck from what can be acted on.
No insight without trust metadata. Source, confidence, owner, and detection timestamp on every item.

12. Strategic Positioning

This architecture establishes CLA AI Hub as:

Not a dashboard. Not an analytics tool. Not a workflow manager.

A firm-wide decision infrastructure layer.

It sits above systems of record and systems of execution, and governs: risk detection, decision structuring, action orchestration, and institutional learning.

13. Final Definition

The CLA AI Hub is a system that converts operational reality into structured decisions, ensures those decisions are executed, and learns from every outcome to continuously improve future decisions.

14. System Surfaces

SurfaceURLPurpose
Hub Homepage/Role-aware triage + next best move + signals
Decision Queue/decision-queue/All cases ranked by priority score
Case Detail/case-view/Evidence + recommendations + outcome tracking
Case Room/case-room/Cross-practice client coordination
Learnings/learnings/Decision memory + compounding insights
Reporting Hub/reporting-hub/Firm-wide control room
Activity Monitor/activity/Usage + adoption intelligence
This Document/docs/Architecture reference
Daily Pulse/pulse/Morning decision briefing with health score + triage
Decision Graph/case-view/ (Network tab)Relational context: connected signals, clients, practices
Escalation Engine/api/auto-escalateAuto-escalation enforcement (cron)
Confidence Dashboard/api/confidence-calibrationSignal fitness + prediction accuracy
Controlling/controlling/Financial controlling + reporting
Audit Planner/planner/Engagement management + daily log
Deadline Calendar/calendar/Tax, VAT, payroll filing deadlines
Feedback Hub/feedback/Bug reports + feature suggestions
Tutorials/tutorials/Interactive getting-started guides
Knowledge Base/knowledge/Practice knowledge articles
Permissions Console/access/User roles + access management

15. Roadmap

PhaseWhatStatus
Phase 1Decision Case object + evidence + priority score + triage lanes✅ Complete
Phase 2Case detail view + recommendation sequences (/case-view/)✅ Complete
Phase 3Cross-practice case room (/case-room/)✅ Complete
Phase 4Decision memory + learnings (/learnings/)✅ Complete
Phase 5Automated cron — daily signals + cases (Vercel Cron)✅ Complete
Wave 1Counterfactual simulation + economic impact engine✅ Complete
Wave 2Decision graph + system health score + confidence calibration✅ Complete
Wave 3Autonomous escalation + daily pulse + graph network context✅ Complete
Wave 4Pending work aggregator + micro-actions + priority reasoning + change markers✅ Complete
Phase 6ANAF + Outlook Calendar + Power BI integrations⏳ Waiting on IT

16. Shared Module Ecosystem

Eighteen client-side modules in /shared/. Each is a drop-in capability any tool can import via a single <script> tag. This is the layer that lets us add features across the fleet with one commit instead of thirty.

ModulePublic APIRole
tools-manifest.jsClaTools.all / byGroup / byId / byPathSingle source of truth for the tool inventory. Every listing surface reads from here.
user-filter.jsClaUserFilter.isRealUser / excludeSelfAndBotsCanonical "skip current user + service accounts" filter for every adoption view.
data-freshness.jsClaFreshness.read / write / badgeUnified cla_sync_ts_* convention — every dashboard reports the same "synced X ago".
loading-safety.jsClaLoading.guard(id, ms, fallback)Safety timeout so shimmer skeletons never hang forever if an API dies silently.
client-360.jsClaClient360.lookup / mount / factSentenceCross-tool client search across every practice cache + recent email mentions + past briefs.
client-actions-bar.jsClaClientActions.mount"Pick client → Brief / Email / Draft / 360°" widget for practice-management tools.
mode-cards.jsClaModes.render(host, MODES)Standardised mode selector with scaffold-insertion into the destination textarea.
history-panel.jsClaHistory.save / load / renderPanelPer-tool history with filter-by-field support.
output-actions.jsClaOutput.copy / sendToModule / pushToOutlook / downloadText / downloadHtml / mountActionBarEvery AI-output surface gets the same Copy / →module / Outlook / .doc gestures.
dual-ref.jsClaDualRef.render / excelObjective / excelRiskCanonical-ID ↔ source-reference bridge (e.g. ISQM QO-C2-3a vs Excel "3a").
pii-guard.jsClaPiiGuard.scan / promptIfNeededPre-flight Romanian PII detection (CNP, IBAN, card, mobile) with Redact / Send-as-is / Cancel modal.
paste-intent.jsClaPasteIntent.classify / attachSix classifiers (contract / financial table / regulation / CV / email / meeting notes) that nudge to specialised tools.
last-session.jsClaLastSession.mount"Continue: <title> — 14h ago" resume bar for any tool that keeps history.
regulatory-ribbon.jsClaRegulatoryRibbon.mount({practices})Practice-filtered curated Romanian regulatory updates. Feed edited in /api/regulatory-feed.js.
activity-counter.jsClaActivity.log / autotrack / aggregateThisWeek / renderHomeCardPer-client tool-chain telemetry — infrastructure for the Global Workforce Decision Dataset pattern.
cross-sell.jsClaCrossSell.analyse / forClient / renderHomeCardClients below peer median practice count + most-plausible gap.
friday-report.jsClaFridayReport.mountFri 14:00 → Sat 10:00 hero card that aggregates the week into a Cowork draft prompt.
learnings.jsClaLearnings.get / topToolsOrdered / isEmerging / rankAmongClient reader for /api/learnings — the daily adaptation signal.
Design rule. A shared module must be safe to import blindly: it mounts no UI until a tool explicitly calls it, it has no side effects on load beyond exposing a namespace, and every function degrades to a no-op if its dependencies are missing.

17. Cross-Tool Handoff Mesh

The Hub is not a menu. It is a mesh. Every tool knows how to pass a client, a draft, an action, a decision into the next tool without a copy-paste. Two conventions carry the traffic:

17.1 The ?client=<name> URL protocol

Any link that navigates to a tool and carries a ?client= parameter lands with that client pre-filled. Receiving pages hydrate from URLSearchParams on load and trigger whatever downstream behaviour needs the name (Client 360 refresh, prior-brief lookup, placeholder update, etc.).

Currently hydrated: /briefing/, /command/, /drafter/. The pattern is one four-line block per page — any tool can adopt it.

17.2 The cla_output_handoff localStorage payload

When a tool wants to pass generated content (not just a name), it writes a structured payload to localStorage.cla_output_handoff and redirects. The destination reads and clears the payload on load.

FieldMeaning
kinddraft / reply / actions / risks / brief / memo / formula / metric / feedback
payloadText or JSON-serialised content the destination will process
metaOptional context — client name, subject, source action
fromOriginating path
tsWrite timestamp

17.3 Kind → destination routing

Encoded in ClaOutput.ROUTES:

kindDestinationTypical producer
draft/drafter/Email triage "Draft reply" action, Cowork reply
reply/command/Meeting follow-up draft, Cowork message
actions/planner/Meeting decisions, email action extraction
risks/feedback/Email risk flags, audit observations
brief/briefing/Post-meeting briefing generation
memo/cowork/Excel analysis → memo drafting, Friday report draft
formula/excel/Calculator result → spreadsheet
metric/controlling/Financial metric promotion
feedback/feedback/Any "this could be better" surface
Invariant. The receiver reads the handoff exactly once and clears it. No handoff is ever replayed. This keeps the protocol stateless and prevents stale payloads from haunting a later session.

18. Anticipatory Layer

Behaviours that surface content the partner will need, before they think to ask. Ten mechanisms currently live — each one either saves a click or saves a memory.

BehaviourTriggerSource data
Up Next TodayPartner opens homepageAll practice caches (cla_*_mgmt, cla_audit_planner_v2) + cla_meeting_reminders
Prior brief suggestionPartner types a known client in Briefingcla_briefing_history (<90d)
Cross-sell radarPartner opens homepagePractice caches, firm median computed on-the-fly
Regulatory ribbonPartner opens a practice tool/api/regulatory-feed filtered by tool's practice tag
Post-meeting reminderMeeting Intelligence produces outputWrites to cla_meeting_reminders → consumed by Up Next
PII guardrailBefore any AI call in Command / CoworkClient-side regex on the textarea content
Smart-paste intentPaste event on an AI inputSix pattern classifiers
Last-session resumePartner opens a tool with historyTool's own history store (<48h)
Friday partner reportFri 14:00 – Sat 10:00Activity counter + briefing history + command history
Cross-tool activity counterPartner opens homepagecla_tool_activity rolling 7-day window
Architectural principle. Anticipatory surfaces read existing telemetry. They never create new data collection. That boundary is intentional — it keeps the privacy posture auditable (what we surface, we already have) and it keeps the layer cheap to extend (new anticipation = new query, not new schema).

19. Self-Improvement Loop

The Hub observes its own use daily and adapts. One loop, four phases:

 OBSERVE                AGGREGATE              DISTRIBUTE              ADAPT
 ─────────              ─────────              ──────────              ─────
 login-track       →    /api/learnings    →    /shared/learnings.js  →   tools reorder
 tool-data                (7-day window)       (30-min sessionCache)      defaults,
 cla_tool_activity       JSON snapshot                                    surface rank,
 cla_sync_ts_*                                                            mode priority
 feedback-hub

19.1 Contract — /api/learnings

Returns a JSON snapshot that any tool can consume. Shape is append-only — consumers can ignore fields they don't know about.

{
  ok: true,
  generated_at: ISO,
  window_days: 7,
  tools:   { <tool_id>: { visits, unique_users, last_used_at, percentile } },
  firm:    { active_today, active_week, tool_count_used },
  top_tools: [ { id, visits, unique_users, last_used_at } ],
  quick_prompts: { top_picked: [...], least_picked: [...] },    // future
  friction: [],                                                   // future
  regulatory_pending: N
}

19.2 Current consumers

19.3 Design boundaries

The long play. The self-improvement loop is also the foundation for the Global Workforce Decision Dataset pattern — every tool-chain ending in a decision (brief generated → email sent → action logged → outcome recorded) is a training row. Tonight's shipment wires the observation layer; next steps add the outcome capture.
CLA AI Hub · Decision Operating System · Internal architecture reference · v233
Back to Hub · Partner Manual · Evolution roadmap