- Inherit global Codex communication and reporting rules from
~/.codex/AGENTS.override.mdand~/.codex/policies/communication/BigPictureReportingV1.md. - Repo-specific instructions below add project constraints only; do not restate global voice or status-reporting rules here.
bridge-db is a SQLite-backed MCP server for cross-system state sharing between Claude.ai, Claude Code, Codex, Notion OS, and personal-ops. Keep it scoped to cross-system state coordination, lexical recall, and observability.
README.mdfor project overview and setup.CLAUDE.mdfor current project state, command list, and scope boundaries.integration-spec.mdbefore changing ownership, caller, or cross-client behavior.docs/internal/bridge-db-semantic-memory-IMPLEMENTATION-PLAN-v2.1.mdbefore touching recall or semantic-memory-adjacent scope.
- Do not expand bridge-db into a general knowledge store.
- Keep stdout reserved for MCP JSON-RPC; logging belongs on stderr.
- Preserve caller ownership rules and source/system mapping.
- Preserve FTS5 consistency for every write path that touches indexed tables.
- Activity retention exempts rows tagged
SHIPPEDorLEDGER(case-insensitive) from the 50-per-source prune — BD-INV-1: retention never deletes a protected row, its receipt, or its disposition. - Prefer maintenance-only changes unless a new coordination surface is explicitly requested.
Focus Codex review on schema and migration integrity, caller ownership, canonical-key compatibility, stale-read or stale-write behavior, FTS5 consistency, MCP JSON-RPC stdout safety, audit/query-log side effects, and cross-client recovery paths. Treat nullable keys, orphanable sidecars, silent upgrade failures, and misleading health/status output as merge-relevant.
For docs-only PRs, comment only when docs describe a bridge contract, migration, tool result, recovery path, or current state that the code or schema does not support.
- Use Codex App Projects for repo-specific implementation, review, and verification in this checkout.
- Use a Worktree when changing schema, migrations, MCP tool contracts, caller ownership, recall behavior, audit behavior, or export/sync paths.
- Use connectors/MCP read-first for live bridge state only when the task needs cross-system truth.
- Use artifacts for integration notes, verification summaries, migration plans, and handoff docs.
- Use thread automations for short follow-ups tied to a specific bridge health check or consumer retest.
- Avoid browser or computer use unless debugging an external client integration that cannot be verified through CLI, tests, or MCP.
- Use
.codex/verify.commandsas the canonical verifier for routine Codex work. - Current canonical verifier:
uv run pytestuv run pyrightuv run ruff check
- Treat runtime checks such as
uv run python -m bridge_db --doctoranduv run python -m bridge_db --statusas task-specific add-ons when live bridge state matters. - If a command is missing, unclear, or unsafe to run, stop and report the blocker instead of guessing.
- The requested change is implemented.
- Relevant tests or checks were run, or the exact reason they were not run is stated.
- Docs are updated when tool contracts, schema, ownership rules, or operating workflows change.
- Assumptions, risks, and next steps are summarized before closeout.