System Architecture
DevContext.AI (Klarity) is built on a heavily optimized AWS Serverless architecture, leveraging Amazon Bedrock for multi-model AI routing, DynamoDB for state management, and a progressive streaming pipeline to deliver initial analysis results in under 30 seconds.
Topology Overview
Component Breakdown
01 // The Ingestion Engine (Stage 0)
The pipeline begins with the Repository Ingestion Lambda. It handles the cloning, parsing, and normalization of the GitHub repository. To ensure we don't hallucinate context, we generate a highly structured Context Map. This map isolates user-written code from standard boilerplate (e.g., node_modules, framework defaults), creating an AST-like representation of the repository's semantic structure. This map is cached in S3 for rapid retrieval by subsequent stages.
02 // Parallel Agent Synthesis (Stage 1 & 2)
To achieve our latency SLA of 30 seconds for the initial review, we orchestrate parallel Lambda agents. Each agent assumes a specific persona (Architecture, Risk, Tech Foundation) and queries the AI models concurrently. The results are fed into a Synthesis Agent that acts as a MapReduce reducer, compiling conflicting signals into a cohesive JSON report stored in DynamoDB. Stage 2 repeats this pattern for the deep-dive intelligence report but runs asynchronously in the background.
03 // Real-Time WebSocket Interview (Stage 3)
The interview system utilizes AWS API Gateway WebSockets linked to a stateful DynamoDB session tracker. It runs a dynamic loop: extracting topics from the Stage 2 report, generating grounded questions, evaluating candidate answers in real-time, and updating signals. The use of fast-inference models for the evaluation loop ensures conversational latency remains low.