Binder AGENTS.md

Project instructions for Binder, a local-first knowledge base that synchronizes Markdown files in both directions and includes an editor connection, command-line tool, and server interfaces. It documents Binder's TypeScript, Bun, SQLite, and monorepo setup; a monorepo is one repository containing multiple related packages.

In plain words
What is it for?
Use it when developing Binder, navigating its packages, running tests or builds, changing database code, or working on its editor and command-line features.
Why use it?
It gives coding agents the project structure, tools, testing expectations, and development rules needed to work safely in Binder.

Instructions file for CodexOpenCode

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/mpazik/binder/agents-md
Clone the repo
git clone --depth 1 https://github.com/mpazik/Binder

Made for: Codex, OpenCode.

Per session 655 This file is loaded in full into every session.
When invoked 655 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.00655 $0.00655
Opus 5 $0.00328 $0.00328
Sonnet 5 $0.00131 $0.00131
Haiku 4.5 $0.00065 $0.00065

Measured 2d ago against content hash 0467468672cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Binder 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 2d 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 · 52 lines

How it starts

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

Binder

Binder is a Local-first knowledge base with bidirectional Markdown sync, editor integration (LSP), MCP server, and CLI.

Status: Early development — APIs and data formats may change. Breaking changes are allowed.

Tech Stack

  • TypeScript everywhere for type safety and better developer tooling
  • Bun for development, testing, building, and package management
  • Node.js 22+ as the production runtime (built CLI runs via node)
  • SQLite as a database for both local and production (bun:sqlite in dev, better-sqlite3 in production)
  • Drizzle ORM for type-safe database operations and migrations
  • Zod for runtime schema validation
  • VS Code Language Server Protocol for editor integration and diagnostics
  • Yargs for CLI argument parsing

Monorepo Structure

Bun workspaces monorepo with three packages under packages/:

  • @binder.do/cli — Main entry point. Contains the CLI, LSP server, MCP server, Markdown document sync/diffing, schema loading, validation logic, and LLM integration (via @mariozechner/pi-ai).
  • @binder/repo — Knowledge graph engine. Entity/relationship storage, transaction processing, changeset computation, filtering. The @binder/repo/local sub-entry provides workspace bootstrap: config loading, path resolution, and init/open for using binder as a library.
  • @binder/utils — Shared utilities. Pure helpers for arrays, strings, encoding, error handling etc.

Testing

  • Unit testsbun test runs unit tests under each package's src/ directory.
  • E2E testsbun test:e2e runs end-to-end smoke tests under packages/cli/tests/. These spin up temporary workspaces, seed data, and exercise CLI, LSP, and MCP workflows against a real runtime.

Development

Dev Instance

Two binder instances exist in the project. Use the right one:

  • bun run dev -- dev instance (.binder-dev/ data). Use for experimentation, testing, inspecting data.
  • The binder tool / CLI -- production instance. For reading docs and updating task records.

Read the full file on GitHub · 52 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. 2d ago First seen · 52 lines · 655 tokens per session scan A 0467468672cc

Subscribe to this mod's changes

Binder AGENTS.md is an instructions file published in the GitHub repository mpazik/Binder (40 stars, last pushed 10d ago), licensed MIT. It adds 655 tokens to every session, about $0.0033 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-30.

Related

Other instructions, from other repositories