v0.1.0 CLI · Context Store for AI-DLC · AST CodeGraph · Shadow Graph

Context Store & Knowledge Graph for AI Agents

Cortex Context

The Context Store backbone for the AI Development Lifecycle (AI-DLC). Eliminate context drift, resolve blast-radius in 1 hop, and power GitHub Copilot, Claude & Antigravity with a hybrid Graph + Vector RAG memory.

Get v0.1.0 Release ↗ Explore the Architecture

npx @cortex-context/cli init

Terminal — Blast Radius & CodeGraph Ingestion
$ cortex-context blast-radius --symbol processPayment --domain payments

🕸️ AST Graph Traversal: Symbol "processPayment" [Function]
├─ Declared in: src/services/payment.ts:42
├─ Direct Callers (3):
│ • CheckoutController.submitOrder (src/controllers/checkout.ts:108)
│ • SubscriptionWorker.renew (src/workers/sub.ts:54)
│ • WebhookHandler.retry (src/api/webhook.ts:89)
├─ Impacted Specs: spec-042 (Instant Checkout Flow), spec-089 (Idempotent Webhooks)
└─ Connected Services: PaymentGateway, AuditLog

✓ Retrieved in 4.2ms via 1 Neo4j Graph traversal (Replaced 8 file searches & 14k tokens)
80 / 20
Deterministic vs Cognitive
1 Query
Full AST Call Hierarchy
10 MCP
Tools (Blast Radius, Shadow Graph)
100%
Local & Multi-Tenant Isolated

The Context Store Paradigm

Maintaining knowledge for AI agents should not depend on fragile manual prompts. Cortex Context follows an 80% Deterministic / 20% Cognitive architecture to ensure high-fidelity context at zero maintenance cost.

80% Deterministic Engine

Automated AST & Metadata Ingestion

AST parsers analyze code structure on every commit. Backstage service catalogs, ADR manifests, and git diffs are deterministically ingested without AI hallucination.

  • Tree-sitter / Babel AST call & dependency graphs
  • Backstage catalog-info.yaml service ingestion
  • Automated post-commit hooks & branch tracking
  • Zero token cost during codebase mapping
20% Cognitive Intelligence

Semantic Synthesis & Shadow Graph

AI agents focus exclusively on high-value cognitive tasks: synthesizing architectural intent, speculative draft exploration, and domain term clarification.

  • Shadow Graph for speculative branch experiments
  • Ubiquitous language glossary (:CONCEPT dimension)
  • Hybrid Vector + Graph semantic retrieval
  • Automated spec creation & validation rules

Instant Call Graphs & Blast Radius

Instead of having LLMs read 10 files sequentially to deduce callers and dependencies, Cortex queries the AST graph in 1 lightweight request.

AST CodeGraph Traversal

Deterministic parsing creates [:CALLS], [:IMPORTS], [:EXTENDS], and [:DEFINES] relationships directly in Neo4j.

MCP Tool: blast-radius
mcp.blast-radius({
  symbol: "AuthService.validateSession",
  domain_id: "security",
  hops: 2
})
🌘 Shadow Graph & Speculative Drafts

Test refactors and feature branches in an isolated shadow state. Querying with your branch parameter returns a merged view of canonical main + speculative draft overrides.

CLI: Speculative Sync
$ cortex-context sync \
  --branch feature/spec-092-async-audit \
  --draft
# ✅ Shadow nodes created with 0 canonical mutation

The Complete AI-DLC Knowledge Model

Every piece of product, architecture, and code knowledge maps into an interconnected multi-dimensional graph.

🎯
Pillar 1
Intent & Concepts
The "Why" & Glossary
Product specs, user stories, and ubiquitous enterprise terminology (:CONCEPT).
:Spec :UserStory :Concept
🏗️
Pillar 2
System & Catalogs
The "How" & Architecture
Services, Backstage catalog entities, ADRs and APIs forming the system skeleton.
:Service :ADR :API
⚙️
Pillar 3
Implementation & AST
The "What" & Code
Classes, functions, modules, workflows and AST call hierarchies.
:Function :Module :Commit
📡
Pillar 4
Runtime & History
The "Real World"
Deployments, alerts, incidents and historical evolution trails (:IMPLEMENTATION_HISTORY).
:Deployment :Incident :History

One command. Full setup.

A TypeScript CLI that wires your workspace to the knowledge graph in three phases: local Docker stack, MCP server configuration, and branch-aware post-commit git hooks.

$ npx @cortex-context/cli init Release v0.1.0 ↗
cortex-context init Complete 3-phase setup: Docker stack, MCP server for Copilot/Claude/Antigravity, and automated git hooks.
cortex-context sync [--branch] [--draft] Extracts AST symbols, diffs, and spec refs. Supports branch-isolated speculative draft ingestion into the Shadow Graph.
cortex-context blast-radius --symbol <name> Performs multi-hop AST graph traversal to determine exactly which files, functions, and specs are impacted by a change.
cortex-context doctor Validates Neo4j connectivity, vector embedder, MCP health, and multi-tenant domain isolation.
MCP Superpowers in Action
# In your AI Chat (Copilot / Claude / Cursor):

> "What is the blast radius if I change BillingService.chargeCustomer?"

→ Calling MCP Tool: blast-radius
Found 4 direct callers, 2 background workers, and 3 ADRs.

> "Clarify the business term 'GracePeriod' in our billing domain"

→ Calling MCP Tool: clarify_business_term
Retrieved Concept 'GracePeriod' linked to Spec-084 & InvoiceWorkflow.

Engineered for Autonomous AI Teams

🕸️
AST-Powered CodeGraph
Deterministic AST symbol mapping captures function calls, class inheritances, and imports into high-speed graph traversals.
🏢
Enterprise Multi-Tenancy
Strict domain isolation with mandatory domain_id filtering across semantic vector and graph search.
🔌
MCP-Native Architecture
Zero-setup integration for GitHub Copilot, Claude Desktop, Antigravity, and Cursor via standard Model Context Protocol.
📦
Backstage Deterministic Parser
Automatically parses catalog-info.yaml files to build unified service and system catalogs.
🔒
100% On-Premise & Local
Runs on your local workstation or private Proxmox LXC/Kubernetes cluster. Source code never leaves your infrastructure.
⏱️
Bitemporal & History Trails
Every node carries ingested and valid timestamps, enabling time-travel queries across your system's architectural evolution.

Seamlessly Connected

Plug Cortex into your developer toolchain and AI coding assistants.

🤖 GitHub Copilot
🧠 Claude Desktop
Google Antigravity
💻 VS Code / Cursor
🕸️ Neo4j
🐍 FastAPI
🐳 Docker & LXC
📑 Backstage Catalogs
🔍 blast-radius MCP
📖 clarify_business_term
📦 npm

Up and running in 3 steps

Start querying your codebase knowledge in minutes.

1Initialize Workspace
npx @cortex-context/cli init
# Ejects config, MCP & Docker stack
2Start Cortex Stack
docker compose up -d
# Starts Neo4j + Cortex Context API
3Sync & Explore
cortex-context sync --repo .
cortex-context doctor

Your codebase has
a memory now.

Stop pasting repetitive context into chat. Build a live, queryable Context Store your AI agents can rely on.