Skip to main content

Version-Correct AI Context

Understand what version-correct AI context means, why pinning docs and code structure to your lockfile prevents AI hallucinations, and how Vibgrate AI Context serves it offline.

Vibgrate Docs

Vibgrate Help

AI assistants are only as good as the context they're given. Version-correct AI context means feeding them documentation and code structure that match the exact versions your project uses — not whatever the model happened to learn during training. This article explains the concept and how Vibgrate AI Context delivers it, for developers using AI assistants.

Overview

Large language models are trained on a snapshot of the world and don't know your lockfile. Ask one about a library and it may answer for a different version, inventing APIs that don't exist in yours or missing ones that do. Version-correct context fixes this by grounding the assistant in facts pinned to your project's actual dependency versions and real code structure.

Three sources of grounded context

Vibgrate AI Context — the local, offline MCP server — serves three things to any AI assistant:

  • Version-correct library docs pinned to your lockfile, from the hosted catalog or local ingestion. This is the Free Dev Docs Library, available via vg lib.
  • Your code map — the structural code graph, so the assistant understands your actual symbols and relationships.
  • Offline drift — so the assistant is aware of how current your dependencies are.

It is not docs-only; it combines library docs, code map, and drift.

Serving it to your assistant

Start the local server from your project root:

vg serve

It runs offline, requires no account, and uploads nothing. To wire it into your assistant — installing the skill, MCP configuration, and an advisory nudge — use:

vg install

This supports assistants including Claude, Cursor, Windsurf, VS Code, Codex, and Gemini, and is idempotent and repo-local.

Why it matters

Grounding an assistant in version-correct context reduces hallucinated APIs and version-mismatched advice, so suggestions actually apply to your codebase. Because it's local and offline, sensitive code stays on your machine. The library docs are also available publicly as the Free Dev Docs Library at /library.

Related

  • See The code graph concept for the code map it serves.
  • See the vg lib, vg serve, and vg install command docs.