"Evidence first. Answer second."
MERIDAS is an enterprise-grade Operational Evidence Intelligence System designed for high-consequence operational, security, infrastructure, and administrative knowledge.
Unlike traditional conversational RAG assistants that optimize for generating an answer at all costs, MERIDAS optimizes for whether an answer deserves to be given.
This is a private operational system, not a public subscription product. The circuit that distinguishes it:
- Ingest writes the evidence graph. A document becomes a source, a version, passages, and claims. A later revision of the same document stays active beside the previous one and opens a conflict.
- The chat reads that graph. Retrieval drops passages whose version is
SUPERSEDED. If evidence is missing or the active versions contradict, the answer is refused. - Adjudication changes the next answer. On the conflict desk a person declares which claim stays. The other version is marked
SUPERSEDED, and the following question no longer retrieves it.
When an operator, systems engineer, or compliance officer queries MERIDAS:
- Evidence Verification Precedes Generation: The system retrieves authoritative directives, extracts candidate atomic claims, and evaluates each claim through Natural Language Inference (NLI) before synthesizing an answer.
- Deterministic Tri-State Decision Gating: Responses are explicitly classified into
SUPPORTED,CONDITIONAL, orCANNOT_ESTABLISH. If evidence is missing, outdated, or conflicting, the system refuses to extrapolate and flags the gap. - Proactive Conflict Detection: Contradictions between active standard operating procedures (SOPs) and legacy/superseded directives are surfaced automatically to a human-in-the-loop Conflict Investigation Desk (
/dashboard/conflicts). - Cryptographic Auditability: Every human adjudication, policy override, and directive resolution is immutably sealed with a SHA-256 cryptographic audit receipt.
- Zero-Leakage Perimeter Security: Internal network metadata (RFC 1918 private IPs, hardware MAC addresses, credentials, and tokens) are scrubbed before payload dispatch to external LLMs.
flowchart TD
subgraph Ingestion["1. Operational Ingestion"]
SOP["Authoritative SOPs & Directives"] --> Chunking["Semantic Passage Chunking"]
Chunking --> Extraction["Atomic Claim Extraction"]
Extraction --> Versioning["Version Control & Perimeter Tagging"]
end
subgraph Verification["2. Dual-Engine Verification"]
UserQ["Operator Query"] --> Perimeter["Perimeter Filter (Site + System)"]
Perimeter --> HybridSearch["Pinecone Vector + Relational Retrieval"]
HybridSearch --> Passages["Authoritative Passages"]
Passages --> Cohere["Cohere Command R+ (Native Grounding)"]
Passages --> NLI["Claim-Level NLI Verification Engine"]
NLI --> Contradiction{"Contradiction Detected?"}
end
subgraph Decision["3. Tri-State Decision Gating"]
Contradiction -- "Yes" --> CannotEstablish["CANNOT_ESTABLISH (Flagged to Conflict Desk)"]
Contradiction -- "No (Score >= 0.85)" --> Supported["SUPPORTED (Authoritative & Verified)"]
Contradiction -- "No (Boundary Limited)" --> Conditional["CONDITIONAL (Scope Limited)"]
end
subgraph Governance["4. Human Adjudication & Audit"]
CannotEstablish --> ConflictDesk["Conflict Investigation Desk"]
ConflictDesk --> HumanDecision["Human Review & Policy Override"]
HumanDecision --> SHA["SHA-256 Cryptographic Audit Ledger"]
end
| Decision State | Meaning | System Behavior |
|---|---|---|
SUPPORTED |
100% of candidate claims are strictly entailed by active, non-superseded documentation with |
Certified answer delivered with precise document citations and atomic claim badges. |
CONDITIONAL |
Claims are valid only under specific physical sites, environments, or temporal windows. | Answer issued with prominent boundary restriction warnings and perimeter disclosures. |
CANNOT_ESTABLISH |
Knowledge gap detected, evidence is absent, or conflicting directives exist across versions. | Complete refusal to speculate. Prompts the operator with the specific missing evidence gap and routes the inquiry to custodians. |
- Automatically compares claims across document versions (e.g. VPN Gateway v2.4 vs VPN Gateway v3.0).
- Displays side-by-side claim contradictions, source metadata, and severity levels.
- Enables operational custodians to adjudicate conflicts:
OVERRIDE_AUTHORITY: Designates one source version as the binding operational truth.MARK_FALSE_POSITIVE: Reconciles semantic nuances or distinct perimeter scopes.REQUEST_DOC_UPDATE: Dispatches a remediation ticket to the document owner.
Inquiries can be filtered by:
- Physical Site:
HQ,Regional East,Regional West,Datacenter,Remote. - Target System:
Zero-Trust / VPN,Hardware Custody,Server Decommissioning,Identity & Access.
- Palette: Charcoal (
#151417), Deep Crimson (#9E1B32), Accent Gold (#C9A227), and Warm Ivory (#F7F3EA). - Surface Elevation: Continuous squircles (
border-radius: 12px-24px), zero harsh borders, specular inset highlights (inset 0 1px 0 0 rgba(255,255,255,0.08)), and ambient depth shadows. - Typography: Negative letter-spacing tracking (
-0.03em) on headers with high-legibility tabular figures for operational metrics.
The database tier is designed around a fine-grained, auditable evidence graph:
erDiagram
TENANT ||--o{ SOURCE : owns
SOURCE ||--o{ SOURCE_VERSION : versions
SOURCE_VERSION ||--o{ PASSAGE : segments
PASSAGE ||--o{ CLAIM : generates
CLAIM ||--o{ EVIDENCE_LINK : evaluates
ASSESSMENT ||--o{ EVIDENCE_LINK : contains
QUESTION ||--o{ ASSESSMENT : receives
CLAIM ||--o{ CONFLICT : claim_a
CLAIM ||--o{ CONFLICT : claim_b
CONFLICT ||--o{ REVIEW_DECISION : adjudicates
TENANT ||--o{ AUDIT_EVENT : logs
Source: Operational directive container (e.g. GlobalProtect VPN SOP), carrying domain classification, authority rank, owner email, and perimeter tags (scopeSite,scopeSystem).SourceVersion: Revision tracking with immutablefileHash,effectiveDate,expirationDate, status (ACTIVE,SUPERSEDED,QUARANTINED,DRAFT), and supersession pointers.Passage: Discrete text units with character offsets, section headings, and vector indexing metadata.Claim: Atomic factual assertions extracted from passages with scoped validity keys.Conflict: Detected contradictions between claims, tagged by type (DIRECT_CONTRADICTION,TEMPORAL_SUPERSEDED,SCOPE_OVERLAP) and severity (LOW,MEDIUM,HIGH).ReviewDecision: Formal human-in-the-loop resolutions with rationale and scope overrides.AuditEvent: Cryptographically sealed log with SHA-256 payload checksums.
| Tier | Technologies |
|---|---|
| Frontend | Next.js 16 (Turbopack, App Router), React 19, Tailwind CSS v4, Lucide Icons, Framer Motion |
| Backend | NestJS 11, TypeScript 5, Express, Helmet, RxJS, Node.js 22 |
| Primary RAG / NLI | Cohere Client V2 (cohere-ai v8.1.0) with Command R+ (command-a-plus-05-2026) |
| Fallback LLMs | Groq (llama-3.3-70b-versatile), Google Gemini (gemini-2.0-flash), OpenAI (gpt-4o) |
| Vector Engine | Pinecone Vector Store (768-dimensional cosine index) |
| Database & ORM | PostgreSQL (Neon AWS Serverless) with Prisma ORM |
| Authentication | Clerk (JWT token verification with zero-trust tenant resolution) |
| Communications | Brevo (Transactional email & notifications), ElevenLabs (Voice synthesis) |
- Node.js:
v20.xorv22.x(LTS recommended) - Package Manager:
npm(v10+) - PostgreSQL: Neon cloud database or local PostgreSQL 16+
- Cohere API Key: Production or trial key from Cohere Dashboard
- Clerk Account: For application authentication
git clone https://github.com/Johanvasquezdev/supportmind-ai.git meridas
cd meridas
# Install root dependencies
npm install
# Install backend dependencies
cd backend && npm install
# Install frontend dependencies
cd ../frontend && npm installCreate backend/.env with the following configuration:
# Database (Neon PostgreSQL)
DATABASE_URL="postgresql://user:password@ep-sample.us-east-1.aws.neon.tech/supportmind?sslmode=require"
# Server Ports & CORS
PORT=3001
FRONTEND_URL="http://localhost:3000"
NODE_ENV="development"
# Clerk Authentication
CLERK_SECRET_KEY="sk_test_..."
JWT_SECRET="generate-a-strong-32-byte-secret"
JWT_EXPIRES_IN="7d"
# Primary RAG Engine: Cohere Command R+
COHERE_API_KEY="your-cohere-api-key"
COHERE_CHAT_MODEL="command-a-plus-05-2026"
# Secondary / Fallback Providers
GEMINI_API_KEY="your-gemini-key"
GEMINI_CHAT_MODEL="gemini-2.0-flash"
GROQ_API_KEY="your-groq-key"
GROQ_CHAT_MODEL="llama-3.3-70b-versatile"
# Vector Store (Pinecone)
PINECONE_API_KEY="your-pinecone-key"
PINECONE_INDEX_NAME="supportmind"
EMBEDDING_MODEL="gemini-embedding-001"
EMBEDDING_DIMENSIONS=768
# Communications
BREVO_API_KEY="xkeysib-..."Create frontend/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_APP_NAME=Meridas
NEXT_PUBLIC_APP_VERSION=1.0.0
# Clerk Keys
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard/chat
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard/chatSynchronize the relational schema with PostgreSQL:
cd backend
npx prisma db push
npx prisma generateIngest the 5 normative operational pilot directives, generate source versions, extract atomic claims, and seed the active contradiction:
npx ts-node seeds/seed-operational-pilot.tsIngested Pilot Corpus:
VPN-GlobalProtect-v3.0-Active-HQ.md(ACTIVE— Port 8443, Duo Mobile Push MFA)VPN-GlobalProtect-v2.4-Superseded.md(SUPERSEDED— Port 443, SMS OTP)Hardware-Custody-15-Day-Policy.md(ACTIVE— 15-day maximum retention, warehouse check-in)Emergency-Server-Decommissioning.md(ACTIVE— Mandatory dual-authorization)Zero-Trust-Access-Regional-Pilot.md(ACTIVE— Regional pilot boundaries)
cd backend
npm run start:devcd frontend
npm run devOpen http://localhost:3000 in your browser.
You can test the system directly in the UI at http://localhost:3000/dashboard/chat or via the direct evaluation CLI:
cd backend
npx ts-node --transpile-only scripts/run-pilot-direct.ts- Question: "What is the active port and MFA method for GlobalProtect VPN?"
-
Perimeter: Site =
HQ, System =VPN -
Expected Outcome:
SUPPORTED-
Claim 1: Active port is 8443 (Score:
$98%$ , citing VPN v3.0 Active HQ). -
Claim 2: Mandatory MFA is Duo Mobile Hardware Push (Score:
$97%$ , citing VPN v3.0 Active HQ).
-
Claim 1: Active port is 8443 (Score:
- Question: "Can an engineer retain a lab laptop for 3 weeks without warehouse check-in?"
- Perimeter: Site =
Lab, System =Hardware - Expected Outcome:
SUPPORTED(Negative Rule Entailment)- Cites Section 1.1: Maximum physical retention is strictly 15 calendar days.
- Requires physical presentation to Johan Vasquez at the warehouse upon day 15.
- Question: "What authorization is required for an emergency server decommissioning?"
- Perimeter: Site =
Datacenter, System =Compute - Expected Outcome:
SUPPORTED- Explicit written dual-authorization required.
- Signatory 1: Johan Vasquez (Lead Systems Custodian).
- Signatory 2: Director of Infrastructure Operations or CISO.
Navigate to http://localhost:3000/dashboard/conflicts:
- Review Inconsistencies: The dashboard displays the live detected contradiction between VPN v2.4 (Superseded) and VPN v3.0 (Active HQ) regarding Gateway Port (443 vs 8443) and MFA (SMS vs Duo Push).
- Launch Adjudication: Click "Adjudicate Conflict".
- Choose Resolution Action:
OVERRIDE_AUTHORITY: Confirms v3.0 supersedes v2.4 permanently.MARK_FALSE_POSITIVE: Confirms valid temporal coexistence.REQUEST_DOC_UPDATE: Triggers custodian notification.
- Log Immutable Audit: Enter the operational rationale and submit. The system generates a cryptographic SHA-256 receipt:
{ "conflictId": "d6ad7f00-c56c-4757-b75d-2ddccd390c5b", "action": "OVERRIDE_AUTHORITY", "actor": "johan.vasquez@bluehawk.tech", "checksumSha256": "8f3b...e71a", "timestamp": "2026-09-28T01:10:44Z" }
All protected endpoints require a Clerk Bearer Token in the Authorization header.
POST /chat
Content-Type: application/json
Authorization: Bearer <clerk-session-token>
{
"message": "What is the active port for GlobalProtect VPN?",
"conversationId": "optional-uuid",
"mode": "answer"
}POST /chat/stream
Content-Type: application/json
Authorization: Bearer <clerk-session-token>
# Emits text/event-stream chunks:
# data: {"type":"token","content":"Active"}
# data: {"type":"done","decisionState":"SUPPORTED","evaluations":[...]}GET /conflicts?status=DETECTED
Authorization: Bearer <clerk-session-token>POST /conflicts/:id/resolve
Content-Type: application/json
Authorization: Bearer <clerk-session-token>
{
"decision": "OVERRIDE_AUTHORITY",
"rationale": "SOP v3.0 has officially replaced v2.4 across all HQ ingress gateways."
}Compliant with docs/POLITICS.md and docs/SECURITY_GENERAL.md:
- Zero Client Trust: Tenant IDs, user permissions, and rate limits are resolved exclusively from cryptographic server tokens.
- Zero-Leakage Sanitization: Automatic regex scrubbing for:
- Private IPv4 addresses:
10.x.x.x,172.16-31.x.x,192.168.x.x - Hardware MAC addresses:
XX:XX:XX:XX:XX:XX - Bearer tokens and API keys
- Private IPv4 addresses:
- Dedicated Legal Endpoints:
- Terms of Use: http://localhost:3000/terms
- Privacy Policy: http://localhost:3000/privacy
MERIDAS enforces continuous testing across unit, integration, and security layers:
# Run backend test suites (102 tests green)
cd backend
npm test -- --runInBand
# Compile backend TypeScript
npm run build
# Compile Next.js frontend (0 lint / type errors)
cd ../frontend
npm run build- Johan Vasquez — Lead Architect & Systems Custodian
- Operational Systems Security Directorate — Infrastructure & Governance Oversight
Proprietary software. All rights reserved. See LICENSE.
The source is not open source. You may not copy, modify, distribute, sublicense, or run it except with written permission from the copyright holder. Paying for the hosted service does not grant a right to the source code. Third-party dependencies remain under their own licenses.
