---
title: "Capability Layers"
slug: globus-layers
section: Globus Core
status: stable
description: "Globus is the Sponsor Core (ERP) — a modular, layered architecture"
last-updated: 2026-10-07
---

# Capability Layers

Globus is the Sponsor Core (ERP) — a modular, layered architecture

> **Modular by Design**
>
> Globus is designed as a modular capability stack so we can add programs, seasons, partners, compliance, and future modules (finance, analytics) without rebuilding the system each year.

confirmed\" to \"reserved\". Refresh the placement and try again. / details / placementId / from / confirmed / to / reserved / Cancelled / RESERVATION_POSITION_TAKEN / This position has already been reserved. Please pick another open position on this job order. / jobOrderId / positionsTotal / positionsReserved / positionsPlaced / placement / s role at that moment, not their current role — preserves an accurate historical view even if the user / s initial creation. |
| newStatus | string | Status after the transition. Drawn from the placement status enum. |
| reason | string (machine code) | Required. Drawn from the standard reason-code catalog (Task #163). Free-text rationale belongs in note, not here. |
| note | string? | Optional free-text annotation supplied by the actor. Subject to PII redaction (see RBAC below). |
| correlationId | string | Matches the originating event / corrected / s standard pagination convention. |
| GET /api/admin/placements/:id/history?format=csv | CSV (oldest-first, full history) | Content-Type: text/csv; Content-Disposition: attachment; filename="placement-&lt;id&gt;-history.csv". CSV is a query parameter — there is no `.csv` path variant. |
## AI Integration

Globus integrates AI capabilities as a cross-cutting service layer available to any module. AI features are registered in a capability registry, managed through an admin UI, and consumed through generic service endpoints. A model-provider abstraction layer (the `provider` field on `ai_capabilities`) routes each capability to the correct backend: sensitive document processing — passport OCR and language detection — runs on the private GCP provider (PRIVATE_GCP), while non-PII text tasks use the shared general-purpose provider. The abstraction gives consistent configuration, rate limiting, and cost tracking across all AI-powered features. See Private OCR (GCP Document AI).

### Capability Registry

Every AI capability in Globus is registered in a central capability registry that controls availability, versioning, and feature flags:

| Capability | Description | Status | Consumer |
| --- | --- | --- | --- |
| Document Extraction | Extract structured data from uploaded documents (passports, certificates, forms). Passport OCR runs on the private GCP provider (internal Document AI OCR service, `OCR_SERVICE_BASE_URL`) — no public OCR API. | | Document review, applicant onboarding |
| Text Review | AI-assisted review of free-text fields for completeness, grammar, and compliance language | | Application review, job order descriptions |
| Translation Assist | Contextual translation of applicant-submitted content for staff review | | Review queue, compliance notes |
| Anomaly Detection | Flag statistically unusual patterns in application data for manual review | | Compliance, fraud detection |

### Admin UI

The AI admin interface allows authorized staff to manage AI capabilities:

Enable or disable individual AI capabilities via feature flags (no code deployment required) / View usage metrics per capability: request count, average latency, error rate, token consumption / Configure capability-specific settings (e.g., confidence thresholds, model version, max tokens) / Review AI invocation log showing every AI invocation with its input and output payloads, token counts, duration and status / Set rate limits per capability to control costs and prevent runaway usage

Storage and provider settings: `ai_invocation_logs` holds one row per invocation (`capabilityKey`, `model`, `status`, `errorMessage`, prompt and completion token counts, `durationMs`, `userId` and, when supplied, `applicationId`). The logged prompt text is cut to 2,000 characters and the result text to 4,000, image base64 is replaced by its length, and the write is best-effort, so a logging failure never fails the AI call. `ai_provider_settings` holds one row per provider (`providerKey` unique, `displayName`, `apiKey`, `baseUrl`, `isActive`, `defaultModel`). It is managed with `GET /api/ai/providers` (key masked, `hasApiKey` flag), `PUT` and `DELETE /api/ai/providers/:providerKey` and `POST /api/ai/providers/test` (runs a small `text_enhancement` call), all requiring `programs.manage`; a write or delete resets the cached OpenAI client, and an empty or masked `apiKey` on `PUT` keeps the stored key.
### Generic AI Extraction Service

The extraction service provides a generic interface for extracting structured data from unstructured content (documents, images, free text). It dispatches through the model-provider abstraction: passport and identity-document extraction is routed to the private GCP provider (Document AI), while general text extraction uses the shared provider — consistent configuration across all extraction tasks.

### Text Review Endpoints

Text review endpoints allow any Globus module to submit free-text content for AI-assisted quality review. The service checks completeness, grammar, tone, and compliance language without modifying the original text.

// Text review request

POST /api/integrations/applicant-portal/ai/text-review

"text": "...",

"context": "camp counselor application essay",

"skillName", "fieldName" and "hobbyName" are optional context strings

// Response

`{ "success": true, "data": { "success": true, "data": { "feedback": "..." } } }`

Rate limited to 30 requests per minute; text is limited to 50,000 characters. Requires an API key with the `integrations.portal` scope and an `X-Applicant-User-Id` header.

### Form Component Integration

AI capabilities are integrated directly into Globus form components, providing inline assistance during data entry without requiring users to navigate to separate AI tools.

Smart field suggestions — AI pre-fills form fields from uploaded documents (e.g., passport scan populates name, nationality, DOB) / Inline text review — free-text fields show real-time quality indicators and improvement suggestions / Document type detection — uploaded files are automatically classified (passport, background check, medical clearance) based on content / Duplicate detection — AI flags potential duplicate applicant records based on biographical similarity scoring
> **AI assists — it does not decide.**
>
> All AI-generated outputs are advisory. No AI capability in Globus makes autonomous decisions that affect applicant lifecycle, compliance status, or placement outcomes. Staff always reviews and confirms AI suggestions before they are applied. This is a deliberate architectural constraint.

## Enforcement Layer

The Enforcement Layer is a hard control surface that spans multiple capability layers. It blocks illegal actions at the system level — invisible to users, non-negotiable by portals.

Cannot issue DS-2019 if placement is not confirmed / Cannot reserve a job order position beyond quota / Cannot advance a workflow phase if a rule fails / Cannot create an application if the season is closed / Cannot access data outside RBAC scope
> **System-Level Guardrail**
>
> Enforcement is not a user-facing feature. It is a system-level guarantee that prevents non-compliant state transitions regardless of which portal or API triggers the action.

## Event Outbox

The Event Outbox is Globus’s event-driven integration mechanism. When authoritative state changes occur, Globus writes structured events to the outbox. External systems (n8n, portals, HubSpot) consume these events to stay synchronized without polling or direct coupling.

Notify portals of status changes / Trigger n8n automation workflows / Sync milestone data to HubSpot / Send alerts and compliance reminders
## Audit Logging

Every change in Globus produces an immutable audit record. This is critical for sponsor compliance, legal defense, and government audits.

Who changed it / Old value / New value / Timestamp + source
## Architecture Checklist

Globus provides a purpose-built architecture for J-1 sponsor operations:

> **Principle**
>
> Each layer can evolve independently. Changing how job orders work (Layer 6) doesn’t require rebuilding the application model (Layer 3). This is by design.
