bd-explore GEMINI.md

Gemini CLI instructions for bd-explore, a command-line tool and MCP server for searching Beads issue stores. They cover the project context, source layout, and commands for running its Python tests.

In plain words
What is it for?
Understanding bd-explore’s search, indexing, MCP, and installer code, then running its test suite or individual test modules.
Why use it?
They give coding agents the project rules and verification commands needed to change bd-explore safely.

Instructions file for Gemini CLI

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/halaprix/bd-explore/gemini-md
Clone the repo
git clone --depth 1 https://github.com/halaprix/bd-explore

Made for: Gemini CLI.

Per session 345 This file is loaded in full into every session.
When invoked 345 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00345 $0.00345
Opus 5 $0.00172 $0.00172
Sonnet 5 $0.00069 $0.00069
Haiku 4.5 $0.00034 $0.00034

Measured today against content hash f9db669ef4f3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bd-explore GEMINI.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

GEMINI.md · 35 lines

What it actually says

GEMINI.md - Gemini / Antigravity Guide for bd-explore

Overview

bd-explore is a zero-dependency CLI tool and MCP server enabling fast queries across beads issue stores. It acts like codegraph explore for issues: retrieving verbatim prose, author comments, close reasons, and relationship neighborhood graphs.

Context & Guidelines

Running Verification Tests

Run the full test suite with Python's built-in unittest:

PYTHONPATH=src python3 -m unittest discover tests -v

To run individual test modules:

PYTHONPATH=src python3 -m unittest tests.test_index
PYTHONPATH=src python3 -m unittest tests.test_search
PYTHONPATH=src python3 -m unittest tests.test_mcp
PYTHONPATH=src python3 -m unittest tests.test_installer
PYTHONPATH=src python3 -m unittest tests.test_cli

Structure

  • src/bd_explore/constants.py: Constants & defaults.
  • src/bd_explore/index.py: Store resolution, SQLite FTS5 indexing, mention graph extraction, cache management.
  • src/bd_explore/search.py: Query parsing, BM25 ranking, 1-hop neighborhood, transitive blast radius, output budget enforcement.
  • src/bd_explore/mcp.py: Stdio JSON-RPC 2.0 MCP server.
  • src/bd_explore/installer/: Multi-target platform configuration and beads memory injection.
  • src/bd_explore/cli.py: Command routing and entrypoint.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 35 lines · 345 tokens per session scan A f9db669ef4f3

Subscribe to this mod's changes

bd-explore GEMINI.md is an instructions file published in the GitHub repository halaprix/bd-explore (0 stars, last pushed 13d ago), licensed MIT. It adds 345 tokens to every session, about $0.0017 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.