CoverCraft Architecture: From Naive GenAI to Evidence-Grounded Application Intelligence
An architectural deep dive into technical honesty, zero-hallucination trust boundaries, deterministic application-layer scoring, real-time web grounding, and Model Context Protocol (MCP) orchestration.
The High-Level Architectural Vision
Standard generative AI tools treat job applications as creative writing exercises. When a candidate uploads their resume and a target job description, conventional tools pass them as raw prompt text to an LLM with instructions like "Write an impressive cover letter highlighting why I am a 95% match."
In reality, hiring managers, senior engineering reviewers, and automated screening systems evaluate applications through the lens of verifiable evidence. CoverCraft was designed from the ground up to replace creative text generation with an Evidence-Backed Application Intelligence Topology.
Strict Context Pipeline with Quarantined Ingestion
The Naive AI Wrapper Fallacy vs. Enterprise Evidence Architecture
When software engineers evaluate generative AI products, the primary question is: "Is this an ungrounded prompt wrapper around an OpenAI or Gemini endpoint, or is there an authentic software and verification architecture?"
| Architecture Dimension | Typical Naive AI Wrapper | CoverCraft Enterprise Architecture |
|---|---|---|
| Match Scoring | LLM asked to guess a percentage ("Match: 92%"). Non-deterministic, unrepeatable, hallucinates high scores. | Deterministic formula computed in application layer. LLM only categorizes evidence; math is calculated in code. |
| Candidate Claims | Model invents accomplishments ("Led team of 25", "Built scalable Kubernetes infra") not present in resume. | Strict <user_resume> quarantine. Every claim must have a verbatim quote. Unsupported claims are flagged as HIGH RISK. |
| Company Intel | Generic flattery ("I admire your innovative culture and passion for excellence"). Stale training data cutoff. | Real-time Tavily search engine integration. 4 structured cards with clickable [1], [2] citation pills to original web sources. |
| ATS Audit | Claims proprietary ATS score (e.g., "94/100 ATS Score"), which is deceptive since no ATS exposes private scoring algorithms. | Deterministic 6-point heuristic check (keyword density, format parseability, contact presence) with explicit technical disclaimer. |
| Tool Transparency | Black box opaque spinner. No visibility into system prompts, tool calls, or failure fallbacks. | Model Context Protocol (MCP) stream terminal. 6 registered tools logging execution events with expandable JSON schema payloads. |
Context Isolation, Sanitization & Prompt Security
CoverCraft decouples prompt logic into isolated policy files stored in src/prompts/. The architecture enforces three distinct context layers:
System Instructions
Passed strictly into the LLM's systemInstruction parameter. Developer rules: Anti-flattery, strict evidence requirement, JSON schema enforcement.
XML Boundary Quarantine
Raw candidate resumes and job descriptions are treated as untrusted inputs. They are wrapped in explicit boundary tags: <user_resume> and <job_description>.
Structured Output Enforcement
Enforces responseMimeType: "application/json". Raw unparseable text is rejected, preventing prompt injection bypasses.
🛡️ Document Ingestion & Sanitization Engine (/api/parse-resume)
Before parsing reaches the AI engine, uploaded files pass through a multi-stage security pipeline:
- Strict 5 MB Size Gate: Files exceeding 5,242,880 bytes are rejected immediately at the HTTP boundary.
- Multi-Format Parser: Native PDF extraction using
pdf-parseonUint8Arraybuffers; DOCX extraction usingmammoth; raw UTF-8 text decoding for TXT. - Null-Byte & Control Character Stripping: Eradicates null bytes (