Skip to content

Latest commit

 

History

History
110 lines (82 loc) · 4.43 KB

README.md

File metadata and controls

110 lines (82 loc) · 4.43 KB

GitKB for Codex

GitKB gives Codex local code intelligence first: symbols, callers, callees, impact analysis, dead-code detection, semantic search over KB documents, and service-edge queries through the git-kb CLI and MCP tools. Full GitKB setup adds the persistent knowledge graph for tasks, specs, decisions, architecture, and team sync.

First Value

Install the plugin, open a Git repo, and ask Codex about the code:

  • "What calls authenticate()?"
  • "What's the blast radius of changing src/auth.rs?"
  • "Find likely dead code in this project."
  • "Index this repo with GitKB and summarize language support."

Codex should prefer local commands such as:

git-kb code doctor --json
git-kb code index
git-kb code symbols --json
git-kb code callers "<symbol>" --json
git-kb code callees "<symbol>" --json
git-kb code impact path/to/file --json
git-kb code dead --json
git-kb semantic search "query" --json   # committed KB documents, not source code

Raw text search remains appropriate for exact strings, logs, config, docs, generated output, snapshots, and one-off file checks.

Prerequisites

Install GitKB:

brew install gitkb/tap/gitkb
# or
curl -fsSL https://get.gitkb.com/install.sh | bash

The plugin needs git-kb on PATH: it runs every hook and the core MCP server.

MCP servers. The code and semantic MCP servers need GitKB 1.0.0 or later with its git-kb code and git-kb semantic extensions (the git-kb-code and git-kb-semantic programs). From 1.0.0 the install script adds both. With an install of git-kb alone, put them on PATH beside it from the release's gitkb-code-<platform>.tar.gz and gitkb-semantic-<platform>.tar.gz. A missing extension's MCP server does not start; the core gitkb server still does, and Codex can still guide installation from the bundled skill.

Hooks. Every hook runs git-kb hook codex. What the code-search guidance events (SessionStart, UserPromptSubmit, PostToolUse) do depends on the installed core:

  • GitKB 0.2.19: git-kb hook codex still has its own built-in guidance.
  • GitKB 1.0.0: these three events are silent and never block.
  • A release with gitkb/gitkb-core#1767, plus git-kb-code: the guidance comes from the extension. Without the extension these events are silent and never block.
  • No git-kb on PATH: every hook command fails to start, and Codex reports the failure. Install git-kb first.

Optional Full KB Setup

When you want persistent tasks, project knowledge, sync, or the full repo-local Codex assets, initialize GitKB in the repo:

git-kb init
git-kb init codex

git-kb init codex remains the source of truth for canonical repo-local GitKB Codex assets. This marketplace plugin is a thin wrapper that delegates hooks to git-kb hook codex.

What This Plugin Ships

  • one focused code-intelligence skill;
  • Codex lifecycle hooks that call git-kb hook codex: safety checks on PreToolUse and PermissionRequest, and code-search guidance on SessionStart, UserPromptSubmit and PostToolUse, which core forwards to git-kb-code;
  • MCP configuration for git-kb mcp, git-kb-code mcp and git-kb-semantic mcp;
  • inherited session activity context for the MCP process;
  • no vendored copy of the full canonical git-kb init codex skill set.

ATC Session Activity

When Codex runs through an ATC shim, the plugin forwards the parent's six SESSION_ACTIVITY_* settings to git-kb mcp. It also forwards ATC_ROOT and ATC_CONFIG when set, so the activity sink uses the same registry as the shim. Codex filters the MCP environment; installing a newer git-kb or atc binary alone does not update this plugin launch configuration.

Install the updated plugin (0.1.3) from your marketplace and restart or resume Codex through the ATC shim to start a new MCP process. Existing MCP processes keep the environment with which they started. Previously omitted activity records are not backfilled by this update.

The configuration forwards variable names rather than fixed session values. Without parent activity context, GitKB keeps its normal behavior. The plugin does not forward API credentials, generic provider thread IDs, or a global ATC session ID as a substitute for the activity contract.

Documentation

License

MIT