ContextGuard by Jag

Keep every AI assistant's memory clean, current, and enforceable.

ContextGuard by Jag is a local-first desktop and CLI app that audits, cleans, visualizes, and keeps consistent the persistent memory of every AI coding agent you run. Claude Code, Codex, Cursor, Cline, Aider, Grok, repo-local rule files. Free. Built by Jag Journey, LLC.

Memory is the new attack surface for AI agents. Audit it before they act on it.

Every coding agent on your machine remembers things across sessions. Stale rules. Duplicated rules. Contradicting rules. Leaked secrets in plain text. ContextGuard finds the rot before the next session loads it.

The leak you cannot see

The night before this product was named, an AI assistant leaked an internal hostname into a public CHANGELOG. The rule that should have stopped it was already in memory: “regex sweep before commit”. The rule was loaded. The agent ignored it.

That pattern is universal. A rule exists in memory, the agent ignores it, a human has to catch it. There is no tool today that sees memory across multiple AI assistants as one corpus, detects when rules go stale, surfaces duplicates and contradictions, or mechanically enforces high-signal rules via git hooks instead of trusting agent discipline. ContextGuard does all four.

What "memory" actually means

Nine things that quietly break agent behavior

Every detector ships as a clear finding with file, line, evidence, severity, and a remediation step.

Duplicates

Same rule written three different ways across three files. Fuzzy-matched by description and body. Surface a "merge into canonical entry" suggestion.

Contradictions

One memory says "always X", another says "never X". Hard signal worth alerting on before an assistant picks one at random.

Staleness

Entries that reference removed code, dead hostnames, superseded versions, or whose origin session is months old. Severity scaled by what they touch.

Oversized memory

Some agents silently truncate the memory index past a cap. ContextGuard warns at the soft limit and alerts before the hard cut-off.

Rules without enforcement

Memory says "run X before commit" but no git hook exists. Offers to install a pre-commit hook for rules that should be mechanical, not memorized.

Leaked secrets in public docs

Regex sweep against every memory file and recently-committed public docs. Catches passwords, tokens, hostnames, and infra paths that should never have left private memory.

Consolidate

Merge five "always use D: drive" entries into one canonical entry without losing the why or the context behind each one.

Promote and demote

Surface high-value rules higher in the index. Archive low-value ones. Keep the entries the agent actually loads on every session lean and relevant.

Cross-LLM sync

Optional. Make the same rule visible to Claude, Codex, and Grok in the format each one expects. One source of truth, three formats.

Four steps. Zero uploads.

Everything runs on your machine. Memory never leaves your disk unless you copy it yourself.

01

Detect every agent

ContextGuard finds installed memory stores for every AI CLI you have. Claude, Codex, Cursor, Cline, Aider, Grok, and any repo-local rule files.

02

Scan, parse, index

Parses every MEMORY.md, every linked memory entry, every rule file. Builds a corpus you can search across model, project, severity, and rule type.

03

Review findings

Severity icons. Exact file and line. Redacted evidence so you can review even sensitive findings safely. One-click open in your editor.

04

Fix, enforce, or ignore

Approve a fix and ContextGuard rewrites the memory entry with a backup. Or install a git hook so the rule becomes mechanical. Or mark the finding accepted.

Local-first. Human-reviewed. Transparent.

Memory often contains client names, server passwords, IP addresses, project codenames, and workflow shortcuts that should never leak. ContextGuard is local-first by default, conservative about writes, and explicit about every edit. Long-lived memory stays under human review.

What is in the box

ContextGuard is free

Built in a giving spirit by Jag Journey, LLC. No subscription. No license server. No telemetry. No network calls except to your forge if you wire one up yourself. The engine and GUI stay free. Paid features will be optional, opt-in, and separate.

Donations fund cross-LLM adapters, faster cleanup, more rule packs, signed installers on every platform, and a small AI-context safety community that we are building.

Pick any amount from $5 to $9,999. One-time today. Recurring options on request.

Part of the Jag Journey developer toolkit

ContextGuard is one of several free local-first tools we build to make working with AI agents safer and saner. Every product credits the others.

ContextGuard by Jag

AI memory hygiene. Audit, clean, enforce.

Let's Git It

Multi-repo Git GUI for Windows, macOS, Linux.

Conduit for PS

MCP bridge for Photoshop. Let assistants drive Photoshop directly.

We have your back

Source on GitHub

Public repo with README, MCP setup, help docs, and release assets. Star it if it helps.

Need help?

Reach Jag Journey, LLC directly. We answer.

(c) 2026 Jag Journey, LLC. All rights reserved. ContextGuard by Jag is a free product. Donations fund continued development.

Jag Journey  ·  GitHub  ·  Let’s Git It  ·  Donate  ·  Contact