Automated Architectural Guardrail for AI-Native Development

Move fast with AI without silently breaking your architecture

cxgrd is a lightweight developer CLI that maps codebase dependencies, computes downstream blast radius before sweeping AI edits, and checks generated diffs for structural and logic risks before commit.

Get started

$ npm install -g cxgrd
$ cxgrd scan
$ cxgrd check --ci
Read the docs →

See it in action

See CXGRD in action with this quick walkthrough.

Not another agent guardrail

Cursor, Claude Code and other tools guard what the AI does in your editor — permissions, hooks, rules, one session at a time. CXGRD guards what actually merges — dependency-graph-aware, enforced org-wide, regardless of which tool or person wrote the code.

cursor/claude code: session → editor → local machine vs cxgrd: PR → merge gate → whole org

Why teams are interested

AI coding tools are fast, but they are often stateless and context-limited. CXGRD adds architectural memory and dependency-aware safety checks so velocity does not come at the cost of production stability.

Persistent dependency memory

CXGRD writes structural intelligence to a local .cg/ folder so your architecture context survives across AI sessions.

.cg/graph.json · symbols.json · arch.json · history.json

Blast radius before edits

Before prompting AI to change code, CXGRD shows what modules, schemas, and APIs will be impacted downstream.

Unlike session-level AI guardrails, blast radius analysis persists across tools and sessions

Prompt enrichment for coding agents

Generate architecture-aware prompts with the right file context instead of relying on temporary agent memory.

Improves AI output quality on large codebases

Compiler-backed guardrails

Check AI-generated diffs for logic gaps, missing imports, and dependency breakage before shipping to production.

Designed for safe, high-velocity AI-native workflows

How CXGRD works

A command-first flow that fits naturally into modern AI-assisted coding loops.

scan

Crawls the repo and builds dependency + symbol graphs.

Creates and updates .cg/ graph memory.

input

Analyzes a planned change and computes blast radius.

Returns impacted files and architectural dependencies.

prompt

Builds an architecture-aware prompt for your AI assistant.

Produces enriched prompt context for safer code generation.

check

Verifies implementation quality with compiler-backed checks.

Flags structural issues before merge or commit.

Architecture

A lightweight TypeScript CLI paired with a cloud backend — no native dependencies, works anywhere Node runs.

TypeScript CLI

  • Dependency graph construction from static import analysis
  • Blast radius computation across the full file graph
  • Compiler-backed checks via tsc, pyright, and cargo

Cloud backend

  • Shared team graph storage and health snapshots
  • GitHub App integration for PR commit status enforcement
  • Merge policy evaluation, audit log, and team dashboard