bd-explore: Instructions file for Codex

AGENTS.md

bd-explore AGENTS.md is an instructions file for Codex, OpenCode from halaprix/bd-explore. It costs 520 tokens per session, scanned A, original, MIT.

A project guide for AI agents working on bd-explore, a command-line tool and MCP server for searching Beads issue stores.

In plain words
What is it for?
Understanding the repository, finding relevant code, and running its Python unit tests.
Why use it?
It gives agents the project rules, architecture, test commands, and code locations they need before making changes.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md; mentions Codex.

This is halaprix/bd-explore's own configuration. It tells Codex and OpenCode how to work on bd-explore itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything bd-explore configures →

Reuse

Borrowing it

Nothing to install: this file belongs to halaprix/bd-explore. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/halaprix/bd-explore/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/halaprix/bd-explore

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bd-explore AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/halaprix/bd-explore/agents-md/github.svg)](https://agentmods.dev/instructions/halaprix/bd-explore/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/halaprix/bd-explore/agents-md"><img src="https://agentmods.dev/badge/instructions/halaprix/bd-explore/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bd-explore AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/halaprix/bd-explore/agents-md"><img src="https://agentmods.dev/badge/instructions/halaprix/bd-explore/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 520 This file is loaded in full into every session.
When invoked 520 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00520 $0.00520
Opus 5.5 $0.00208 $0.00208
Sonnet 5.5 $0.00104 $0.00104
Haiku 4.5 $0.00052 $0.00052

Measured 2mo ago against content hash 1537e02bca71, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bd-explore AGENTS.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 2mo ago.

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.

AGENTS.md · 40 lines

How it starts

The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md - Agent Guide for bd-explore

Project Overview

bd-explore is a zero-dependency CLI tool and MCP server that provides fast, deep full-text and relational search across beads issue stores. It surfaces complete issue prose (descriptions, designs, notes, comments, close reasons, memories) and relational graphs (blocks, parent-child, mentions, GitHub issues).

Agent Guidelines & Rules

Testing Commands

All unit tests run via Python stdlib unittest:

# Run all tests
PYTHONPATH=src python3 -m unittest discover tests -v

# Run individual test files
PYTHONPATH=src python3 -m unittest tests/test_index.py
PYTHONPATH=src python3 -m unittest tests/test_search.py
PYTHONPATH=src python3 -m unittest tests/test_mcp.py
PYTHONPATH=src python3 -m unittest tests/test_installer.py
PYTHONPATH=src python3 -m unittest tests/test_cli.py

Architecture & Code Map

  • src/bd_explore/constants.py: Constants (VERSION, DEFAULT_BUDGET_CHARS, DEFAULT_SEEDS, DEP_KINDS, FILTER_KEYS).
  • src/bd_explore/index.py: Store resolution, SQLite FTS5 database management, mention mining, GitHub #NNN ref extraction, bd memories indexing, cache invalidation.
  • src/bd_explore/search.py: Query parser (filters + free text), BM25 ranking, 1-hop relationship neighborhoods, transitive blast radius calculations, character budget formatting.
  • src/bd_explore/mcp.py: Stdio JSON-RPC 2.0 MCP server exposing bd_explore.
  • src/bd_explore/cli.py: CLI dispatcher for search, serve, install, uninstall, print-config.
  • src/bd_explore/installer/: Multi-target platform configuration engine (Claude Code, Gemini CLI, Antigravity IDE, Codex, Cursor, AGENTS.md) and beads persistent memory injection.

Code Style Requirements

  • Zero runtime dependencies outside Python 3.10+ standard library.
  • Type annotations across all public functions and methods.
  • Atomic file writes for all configuration files.
  • Fenced marker tags (<!-- BD_EXPLORE_START --> / <!-- BD_EXPLORE_END -->) for agent rule injections.

Read the full file on GitHub · 40 lines

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. 2mo ago First seen · 40 lines · 520 tokens per session scan A 1537e02bca71

Subscribe to this mod's changes

bd-explore AGENTS.md is an instructions file published in the GitHub repository halaprix/bd-explore (0 stars, last pushed 2mo ago), licensed MIT. It adds 520 tokens to every session, about $0.0021 per session on Opus 5.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.

Related

bd-explore AGENTS.md compared with instructions from other repositories

bd-explore AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
bd-explore AGENTS.mdhalaprix/bd-exploreInstructions file02mo agoMITA520Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode