mentedb copilot-instructions.md

Repository-specific development instructions for MenteDB, a Rust database engine designed to store and retrieve information for AI-agent memory. They describe its project layout, build process, tests and important subsystems.

In plain words
What is it for?
Use them when developing MenteDB, navigating its Rust workspace, working on storage, search, queries or memory features, and running the project’s checks.
Why use it?
They give coding agents the context needed to work safely in an unfamiliar codebase. This helps them follow the repository’s conventions when changing or testing code.

Instructions file for GitHub Copilot

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/nambok/mentedb/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/nambok/mentedb

Made for: GitHub Copilot.

Per session 997 This file is loaded in full into every session.
When invoked 997 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.00997 $0.00997
Opus 5 $0.00498 $0.00498
Sonnet 5 $0.00199 $0.00199
Haiku 4.5 $0.00100 $0.00100

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

Security

Grade A, and why

mentedb copilot-instructions.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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.github/copilot-instructions.md · 85 lines

How it starts

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

MenteDB Development Instructions

Project overview

MenteDB is a purpose built Rust database engine for AI agent memory. It includes custom storage (WAL, buffer pool, pages), HNSW vector indexing, CSR/CSC graph, a custom query language (MQL), context assembly with U curve attention layout, and 7 unique cognitive features (stream cognition, write time inference, trajectory tracking, phantom memories, interference detection, pain signals, speculative pre assembly).

Workspace structure

crates/
  mentedb-core/       Core types, config, error, MVCC, multi agent
  mentedb-storage/    Page manager, WAL, buffer pool, backup/restore
  mentedb-index/      HNSW vector index, bitmap, temporal, salience
  mentedb-graph/      CSR/CSC graph, traversal, belief propagation
  mentedb-query/      MQL lexer, parser, planner
  mentedb-context/    U curve attention layout, delta tracker, serializers
  mentedb-cognitive/  Stream cognition, write inference, trajectory, phantoms, interference, pain, speculative
  mentedb-consolidation/ Decay, archival, extraction, compression, GDPR forget
  mentedb-embedding/  Provider trait, hash/HTTP providers, LRU cache
  mentedb-server/     Axum REST API, JWT auth, rate limiting, WebSocket
  mentedb/            Unified facade (MenteDb struct)
sdks/
  python/             PyO3 bindings + pure Python client
  typescript/         napi-rs bindings + TypeScript client
  python/integrations/langchain/  LangChain memory, retriever, chat history
  python/integrations/crewai/     CrewAI memory and tool adapter

The SDKs are excluded from the Cargo workspace and build independently.

Build, test, and lint

Always run these before committing:

cargo fmt --all
cargo clippy --workspace -- -D warnings
cargo test --workspace

The server binary is mentedb-server and runs on axum with JWT auth, rate limiting, and WebSocket support.

Key types

  • MemoryNode: The fundamental storage unit (id, content, memory_type, embedding, metadata, timestamps)
  • MemoryEdge: Typed relationship between memories (caused, contradicts, relates_to, obsoletes, etc.)
  • MenteDb: The unified facade that coordinates all subsystems
  • MenteConfig: Top level config with sub configs for every subsystem
  • MenteError / MenteResult<T>: Error handling throughout

Read the full file on GitHub · 85 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 · 85 lines · 997 tokens per session scan A 11d901aa133e

Subscribe to this mod's changes

mentedb copilot-instructions.md is an instructions file published in the GitHub repository nambok/mentedb (116 stars, last pushed 7d ago), licensed Apache-2.0. It adds 997 tokens to every session, about $0.0050 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

bitterbot-desktop AGENTS.md

AGENTS.md instructions for Bitterbot-AI/bitterbot-desktop, covering bitterbot — repository guidelines, what is bitterbot?, what makes bitterbot different, 1. memory system (src/memory/) and 2. dream engine (src/memory/dream-engine.ts).

Bitterbot-AI/bitterbot-desktop · 2,569 tokens

prism-coder GEMINI.md

Gemini CLI instructions for dcostenco/prism-coder: See the Synalux engineering standards doc for the full protocol. This file inherits those standards. Additional Prism-specific rules.

dcostenco/prism-coder · 101 tokens

neurodivergent-memory copilot-instructions.md

Instructions for jmeyer1980/neurodivergent-memory, covering neurodivergent-memory — agent bootstrap instructions, what this server is, canonical tag schema, districts and available mcp tools (quick reference).

jmeyer1980/neurodivergent-memory · 1,325 tokens

agidb CLAUDE.md

Instructions for rohansx/agidb, covering agidb — claude code instructions, naming, before changing anything, agent skills and issue tracker.

rohansx/agidb · 1,008 tokens

leptin AGENTS.md

AGENTS.md instructions for lionellau/leptin, covering leptin — for the agent, when to install yourself, install yourself (one block, unattended), how to use it (every session) and what to tell your human.

lionellau/leptin · 713 tokens

cognee AGENTS.md

AGENTS.md instructions for topoteretes/cognee, covering repository guidelines, project structure & module organization, build, test, and development commands, runtime flags worth knowing and multi-tenancy support by backend.

topoteretes/cognee · 1,909 tokens