jdbg: Instructions file for Codex

AGENTS.md

jdbg AGENTS.md is an instructions file for Codex, OpenCode from PieceOfFall/jdbg. It costs 3,638 tokens per session, scanned B, original, Apache-2.0.

Repository instructions for AI agents working on jdbg, a Rust command-line tool for interactively debugging Java programs through Java debugging backends.

In plain words
What is it for?
Following the repository’s coding constraints, understanding where design details live, and making safe changes to the jdbg CLI or its agent integrations.
Why use it?
It tells agents which project rules and implementation boundaries they must follow, including how its MCP server and debugging sidecar are handled.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions Claude Code; reads ~/.codex paths.

This is PieceOfFall/jdbg's own configuration. It tells Codex and OpenCode how to work on jdbg 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 jdbg configures →

Reuse

Borrowing it

Nothing to install: this file belongs to PieceOfFall/jdbg. 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/PieceOfFall/jdbg/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/PieceOfFall/jdbg

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 jdbg AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/pieceoffall/jdbg/agents-md/github.svg)](https://agentmods.dev/instructions/pieceoffall/jdbg/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/pieceoffall/jdbg/agents-md"><img src="https://agentmods.dev/badge/instructions/pieceoffall/jdbg/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 jdbg AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/pieceoffall/jdbg/agents-md"><img src="https://agentmods.dev/badge/instructions/pieceoffall/jdbg/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,638 This file is loaded in full into every session.
When invoked 3,638 The same file — it is already loaded in full.
Security scan B 1 finding. 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.03638 $0.03638
Opus 5.5 $0.01455 $0.01455
Sonnet 5.5 $0.00728 $0.00728
Haiku 4.5 $0.00364 $0.00364

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

Security

Grade B, and why

jdbg AGENTS.md scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`~/.claude/settings.json`, and the embedded MCP skill to `~/.claude/skills/jdbg/SKILL.md`.
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 191 lines

How it starts

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

AGENTS.md — java-agent-debugger (jdbg)

Coding charter for AI agents working in this repo. Rules and constraints only. For architecture, module layout, command/tool surface, output schema, dependencies, and status, read DESIGN.md (the factual design-and-implementation reference). This file does NOT duplicate it.

What this project is (one paragraph)

jdbg is a cross-platform Rust CLI (binary jdbg, crate java-agent-debugger, edition 2024) that lets an AI agent debug Java interactively through the JDK's jdb compatibility backend plus an optional Java JDI sidecar backend — prompt-aware (never sleep-based), stateful (a background daemon keeps sessions alive across calls), Windows-first. It is consumed two ways: the CLI and an MCP server (jdbg __mcp, native tool calls for Claude Code, Codex, and OpenCode). Full detail in DESIGN.md.

Binding constraints (do not violate without asking)

These are settled decisions. Changing them needs explicit user sign-off.

  • Keep blocking boundaries where they are settled. The existing jdb engine, daemon registry, daemon IPC, and per-session command locking remain std::thread + channels + blocking IO unless explicitly redesigned. tokio is allowed for rmcp MCP serving and the JDI sidecar transport/lifecycle subsystem.
  • No temp files, no shell, no sleeps. Commands are written straight to jdb's stdin. Readiness is detected by reading until the prompt, never by sleeping. There is no shell involved anywhere (no injection surface).
  • Minimal dependencies. Do not add a crate when std suffices. rmcp is allowed only for MCP protocol/tool serving, not daemon IPC or debugger backend RPC. Deliberately excluded: once_cell, nix, daemonize, portable-pty/conpty, any broad TCP/RPC framework, any windows/winapi crate (use std raw FFI for the few Win32 calls). Use std::sync::LazyLock for one-time regex compilation and std::os::* for platform bits.
  • Keep Java sidecar dependencies isolated. Java-only expression/evaluation dependencies belong in sidecar/jdi and are packaged into the Gradle fat jar jdbg-jdi-sidecar.jar. Do not add a Rust RPC framework or Rust JDWP stack for sidecar work unless the user explicitly approves that redesign.
  • One daemon per user; one in-flight command per session. The per-session command Mutex is held across write+wait — jdb is line-oriented and cannot interleave commands. Different sessions run in parallel.
  • The daemon is the single writer of the on-disk registry (atomic temp-in-same-dir + rename). The CLI only reads it (offline fallback). The in-memory session map is the source of truth while the daemon is alive.
  • Keep modules small and single-purpose. If a file grows large it is doing too much — split it.
  • Use English for code comments and commit messages. Source/test comments, Rustdoc, git commit messages, and PR/review comments written for the project history should be in English.

Read the full file on GitHub · 191 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 · 191 lines · 3,638 tokens per session scan B c938a990e193

Subscribe to this mod's changes

jdbg AGENTS.md is an instructions file published in the GitHub repository PieceOfFall/jdbg (11 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 3,638 tokens to every session, about $0.0146 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

jdbg AGENTS.md compared with instructions from other repositories

jdbg AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
jdbg AGENTS.mdPieceOfFall/jdbgInstructions file113mo agoApache-2.0B3,638Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot