Skip to content

Add a CodeDB-first Codex setup for global and per-repository use #680

Description

@justrach

Problem

Codex can use CodeDB effectively once it is prompted to do so, but each task/repository currently needs repeated instructions. There is no obvious CodeDB-owned, installable way to make structural CodeDB tools the default navigation layer across Codex sessions.

For day-to-day repository work, the desired routing is:

  1. codedb_context for first-touch task orientation.
  2. codedb_symbol, codedb_callers, codedb_outline, and codedb_deps for definitions and relationships.
  3. codedb_search only when the symbol is unknown.
  4. Native file editing tools for changes.
  5. Shell rg/file reads only as a fallback when the index is missing, stale, or cannot answer the question.

Proposed outcome

Provide a supported “CodeDB-first for Codex” setup that can be enabled globally and optionally reinforced per repository. This could be a CodeDB plugin/skill plus a generated AGENTS.md policy, installed by a command such as:

codedb codex install --global
codedb codex install --repo .

The exact interface is open; the important part is that the setup is CodeDB-owned, versioned, and easy to refresh.

Requirements

  • Detect whether the current project has a usable codedb.snapshot.
  • Prefer structural CodeDB tools before broad shell search/read commands.
  • Fall back cleanly when the MCP server or index is unavailable.
  • Surface stale-index state and the recommended re-index command.
  • Document global Codex configuration versus repository-local instructions.
  • Avoid replacing Codex's native editor; CodeDB remains the intelligence/navigation layer.
  • Include a small verification command or diagnostic showing that the MCP and policy are active.
  • Keep generated instructions concise enough that users can reasonably apply them to every session.

Why this belongs in CodeDB

Codex cannot guarantee tool choice from an MCP server alone, but CodeDB can package the strongest practical integration: MCP configuration, a maintained skill/instruction policy, repository detection, diagnostics, and installation/refresh tooling. That would remove the current manual prompt burden and make behavior consistent as CodeDB evolves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions