Xapiand AGENTS.md

Repository instructions for working on Xapiand, including how to distinguish the project’s own code from bundled third-party libraries and how to build and verify changes.

In plain words
What is it for?
Use it when navigating the Xapiand codebase, choosing where to search, changing build options, or checking documentation and end-to-end results.
Why use it?
It helps developers avoid editing vendored dependencies and follow the project’s expected workflow when investigating bugs or adding features.

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/kronuz/xapiand/agents-md
Clone the repo
git clone --depth 1 https://github.com/Kronuz/Xapiand

Made for: Codex, OpenCode.

Per session 2,843 This file is loaded in full into every session.
When invoked 2,843 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.02843 $0.02843
Opus 5 $0.01422 $0.01422
Sonnet 5 $0.00569 $0.00569
Haiku 4.5 $0.00284 $0.00284

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

Security

Grade A, and why

Xapiand 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 3d 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 · 188 lines

How it starts

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

AGENTS.md — working in the Xapiand codebase

Orientation for anyone (human or AI) making changes here. Read ARCHITECTURE.md first for the what; this file is the how.

First, the big split: own code vs. vendored

src/ mixes Xapiand's own code with bundled third-party libraries. Do not "fix" or refactor vendored code — treat these as read-only dependencies:

src/xapian/      Xapian fork (GPL) — the search core. Large; integration point only.
src/msgpack/     msgpack-c                 src/fmt/        {fmt}
src/rapidjson/   RapidJSON                 src/lz4/        LZ4
src/ev/          libev                     src/tclap/      CLI parsing
src/yaml/        libyaml
src/cppcodec/    base-N codecs            src/chaiscript/ ChaiScript

Everything else under src/ is Xapiand's own. When grepping for a bug or a feature, scope to the own-code subsystems unless you're tracing a call into Xapian.

docs/discussions/ is a vendored copy of the complete Kronuz Discussions package. Its tracked files must remain byte-identical with ~/code/KronuzBlog/Kronuz.github.io/discussions and ~/code/KronuzBlog/gmendezb-pages/discussions. It includes an Astro component, browser widget, Cloudflare Worker, D1 migrations, tests, and generic documentation. Xapiand does not currently mount the comments component. Make package changes in one source tree, synchronize the complete directory, and verify all three copies before committing.

src/xapian/ is special: it's a fork (pristine upstream snapshot + a small stack of our patches), not a plain read-only bundle. Before upgrading the vendored Xapian, reconciling our patches, or touching anything under it, read XAPIAN_FORK.md — the fork model, why each patch exists, and the upgrade procedure.

Where things live

You're touching… Start in
On-disk format, durability, volumes src/storage.h, src/database/{wal,data,shard}.{cc,h}
Schema handling, field types src/database/schema*.{cc,h}, src/reserved/
HTTP API / request handling src/server/http*.{cc,h}, src/url_parser.*
The event loop / client lifecycle src/worker.{cc,h}, src/server/base_{client,server}.*
Clustering, discovery, replication src/server/discovery.*, src/server/replication_protocol*, src/manager.*, src/node.*
Query languages src/query_dsl.* (JSON/MsgPack), src/booleanParser/ (string)
Aggregations src/aggregations/
Geospatial src/geospatial/, src/multivalue/geospatialrange.*
Value encoding src/sortable_serialise.*, src/serialise*.{cc,h}, src/length.*
Logging src/logger.*, src/log.h (category switches)
Small utilities top-level src/*.hh / *.h (see the table in ARCHITECTURE.md)

Read the full file on GitHub · 188 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. 3d ago First seen · 188 lines · 2,843 tokens per session scan A 61adcef57a38

Subscribe to this mod's changes

Xapiand AGENTS.md is an instructions file published in the GitHub repository Kronuz/Xapiand (362 stars, last pushed 21d ago), licensed MIT. It adds 2,843 tokens to every session, about $0.0142 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.