Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

seo: content dates in the sitemap, in-body links, noindex on markdown twins (#1992)

xerj-orgdada7a1415f6
diff --git a/content/answers/ask-questions-about-a-github-repo-without-cloning.md b/content/answers/ask-questions-about-a-github-repo-without-cloning.md
index 825ce2583..d65823275 100644
--- a/content/answers/ask-questions-about-a-github-repo-without-cloning.md
+++ b/content/answers/ask-questions-about-a-github-repo-without-cloning.md
@@ -1,7 +1,7 @@
---
title: "Ask questions about a GitHub repo without cloning it"
h1: "Ask questions about a GitHub repo without cloning it"
-description: "xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, the commit and the licence. First answer 2.4 s with the download, then 30-40 ms."
+description: "xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, commit and licence. First answer 2.4 s with the download, then 30-40 ms."
slug: "ask-questions-about-a-github-repo-without-cloning"
cluster: "Answers for coding agents"
question: "How can I ask questions about a GitHub repo without cloning it?"
diff --git a/content/answers/batch-lookup-cve-ghsa-ids-offline.md b/content/answers/batch-lookup-cve-ghsa-ids-offline.md
index 16d75b159..78c597eb7 100644
--- a/content/answers/batch-lookup-cve-ghsa-ids-offline.md
+++ b/content/answers/batch-lookup-cve-ghsa-ids-offline.md
@@ -1,7 +1,7 @@
---
title: "Batch lookup of CVE and GHSA IDs offline, with sources"
h1: "Batch lookup CVE IDs and GHSA IDs offline, without GitHub API rate limits"
-description: "Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs in one offline query, with the source file per answer. 6 IDs: 15 ms, 2 abstained."
+description: "Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs offline in one query, citing the source file. 6 IDs: 15 ms, 2 abstained."
slug: "batch-lookup-cve-ghsa-ids-offline"
cluster: "Answers for coding agents"
question: "How do I batch lookup CVE and GHSA IDs offline without hitting GitHub API rate limits?"
diff --git a/content/answers/code-search-mcp-for-claude-code.md b/content/answers/code-search-mcp-for-claude-code.md
index bc8ee4ae6..62e2ce528 100644
--- a/content/answers/code-search-mcp-for-claude-code.md
+++ b/content/answers/code-search-mcp-for-claude-code.md
@@ -7,7 +7,7 @@ cluster: "Agent access and memory"
question: "I need my agent to find a passage and cite the file, not dump the whole tree. How?"
intent: "how-to"
published: "2026-08-21"
-updated: "2026-10-19"
+updated: "2026-10-20"
author: "XERJ documentation team"
reviewer: "XERJ engineering team"
schema_type: "TechArticle"
@@ -152,3 +152,5 @@ The published `openai-tools.json` and `anthropic-tools.json` still list 6 tools
## What the capture was
One single-node XERJ process and a generated 2-file code tree in Rust and Python. This run measured no large repository, and the binary was a `ci-test` build, so no timing from it is a performance figure.
+
+When the symbol is absent, the same citation path can exit 1 instead of inventing a hit: [retrieval that says not found](/answers/retrieval-that-says-not-found-with-file-line-citations).
diff --git a/content/answers/evidence-for-agent-memory-links.md b/content/answers/evidence-for-agent-memory-links.md
index 724946b62..9d6c5cc90 100644
--- a/content/answers/evidence-for-agent-memory-links.md
+++ b/content/answers/evidence-for-agent-memory-links.md
@@ -7,7 +7,7 @@ cluster: "Agent memory: provenance"
question: "Agent memory: knowledge graphs aren't enough, we need a know-how graph"
intent: "informational"
published: "2026-08-21"
-updated: "2026-10-19"
+updated: "2026-10-20"
author: "XERJ documentation team"
reviewer: "XERJ engineering team"
schema_type: "TechArticle"
@@ -71,6 +71,8 @@ Confidence is a per-detector constant, not a learned number. Our run carried 0.9
XERJ invents nothing to fill a gap. XERJ renders a real quote, a structural rationale and an asserted link as three different things.
+Code lookup follows the same rule — exit 1 and no invented hit when a symbol is missing, file:line when it answers — on [retrieval that says not found](/answers/retrieval-that-says-not-found-with-file-line-citations).
+
## An asserted link carries no evidence
A link you create by hand is honest about being a claim. The route `POST /_graph/{brain}/link` accepts `src`, `dst`, `type`, `weight` and `confidence`. It returns an edge whose detector is `manual@1`.
diff --git a/content/answers/full-text-search-over-jsonl-files-cli.md b/content/answers/full-text-search-over-jsonl-files-cli.md
index d9507c447..a34a7309c 100644
--- a/content/answers/full-text-search-over-jsonl-files-cli.md
+++ b/content/answers/full-text-search-over-jsonl-files-cli.md
@@ -1,7 +1,7 @@
---
title: "Full-text search over JSONL and CSV files from the CLI"
h1: "Full-text search over JSONL files from the CLI: index a folder and query it with BM25"
-description: "xerj autoindex reads JSONL and CSV with no schema, then answers BM25 queries per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms."
+description: "xerj autoindex reads JSONL and CSV with no schema, then answers BM25 per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms."
slug: "full-text-search-over-jsonl-files-cli"
cluster: "Answers for coding agents"
question: "How do I run full-text search over JSONL files from the CLI and query a folder with BM25?"
diff --git a/content/answers/index-monorepo-for-agent.md b/content/answers/index-monorepo-for-agent.md
index 59cab5351..02191a879 100644
--- a/content/answers/index-monorepo-for-agent.md
+++ b/content/answers/index-monorepo-for-agent.md
@@ -7,7 +7,7 @@ cluster: "Files and formats"
question: "How do I stop my agent from reading the whole repo into context?"
intent: "how-to"
published: "2026-08-21"
-updated: "2026-10-19"
+updated: "2026-10-20"
author: "XERJ documentation team"
reviewer: "XERJ engineering team"
schema_type: "TechArticle"
@@ -119,3 +119,5 @@ XERJ writes a content document for each source file. On top of that it writes on
## What the capture is and is not
The capture indexed a 3-file, 3-language repository on 1 single-node XERJ process. This run measured no large monorepo. The project's own guidance is to plan corpora of at most a few million documents.
+
+A public repository that is already a signed pack is a different case: [ask it without cloning](/answers/ask-questions-about-a-github-repo-without-cloning).
diff --git a/content/answers/index-reference-library-for-coding-agent.md b/content/answers/index-reference-library-for-coding-agent.md
index f58d35a75..5099428a8 100644
--- a/content/answers/index-reference-library-for-coding-agent.md
+++ b/content/answers/index-reference-library-for-coding-agent.md
@@ -7,7 +7,7 @@ cluster: "Coding agents: reference retrieval"
question: "How do I set up reference coding so the agent retrieves a mechanism before writing code?"
intent: "how-to"
published: "2026-08-22"
-updated: "2026-10-19"
+updated: "2026-10-20"
author: "XERJ documentation team"
reviewer: "XERJ engineering team"
schema_type: "TechArticle"
@@ -127,6 +127,8 @@ Both workflows start with `xerj autoindex`, and they answer different questions.
Indexing your own tree is about context budget: the agent stops opening every file and queries the index instead. That walkthrough, with the captured ignore accounting, is on [how to stop an agent reading the whole repo](/answers/index-monorepo-for-agent).
+A pinned public repository that already ships as a signed pack can be queried without a clone: [ask a repo without cloning](/answers/ask-questions-about-a-github-repo-without-cloning).
+
Reference coding is about knowledge the agent does not have. The tree is somebody else's library, cloned for the purpose, and the point is the passage that describes the mechanism, not the size of the context.
## The retrieval boundary
diff --git a/content/answers/local-code-search-mcp-fewer-tokens-than-grep.md b/content/answers/local-code-search-mcp-fewer-tokens-than-grep.md
index 086187bcc..d60420fa6 100644
--- a/content/answers/local-code-search-mcp-fewer-tokens-than-grep.md
+++ b/content/answers/local-code-search-mcp-fewer-tokens-than-grep.md
@@ -1,7 +1,7 @@
---
title: "Local code search MCP that uses fewer tokens than grep"
h1: "Local code search MCP for Claude Code that uses fewer tokens than grep"
-description: "xerj indexes a repo once and returns ranked passages with file:line through a CLI and an MCP server. On psf/requests one answer was 1,303 bytes; rg printed 25,150."
+description: "xerj indexes a repo once and returns ranked passages with file:line via CLI and MCP. On psf/requests one answer was 1,303 bytes; rg printed 25,150."
slug: "local-code-search-mcp-fewer-tokens-than-grep"
cluster: "Answers for coding agents"
question: "Is there a local code search MCP for Claude Code that uses fewer tokens than grep?"
diff --git a/content/answers/mcp-api-search-or-vector-search.md b/content/answers/mcp-api-search-or-vector-search.md
index c6cec9b01..e1ee3881e 100644
--- a/content/answers/mcp-api-search-or-vector-search.md
+++ b/content/answers/mcp-api-search-or-vector-search.md
@@ -7,7 +7,7 @@ cluster: "Agent access and memory"
question: "MCP/API search or vector search — which should an agent call?"
intent: "tool-selection"
published: "2026-08-21"
-updated: "2026-10-19"
+updated: "2026-10-20"
author: "XERJ documentation team"
reviewer: "XERJ engineering team"
schema_type: "TechArticle"
@@ -137,6 +137,8 @@ Call `xerj_search` first. The tool needs no embedder, no field name and no vecto
Call `xerj_semantic_search` only on a node started with `--embed-mode neural`. On the default lexical embedder it costs an extra round trip to reach a ranking built from token overlap.
+When the lookup must say that nothing matched, and cite file:line when it does answer, see [retrieval that says not found](/answers/retrieval-that-says-not-found-with-file-line-citations).
+
## What this capture is and is not
One single-node XERJ process, 20 labeled documents and 1 question through 4 tools. That corpus is far too small to rank retrieval methods. The binary was a `ci-test` build, so no timing from the run is a performance figure.
diff --git a/content/answers/retrieval-that-says-not-found-with-file-line-citations.md b/content/answers/retrieval-that-says-not-found-with-file-line-citations.md
index 006afcbaf..3acba409d 100644
--- a/content/answers/retrieval-that-says-not-found-with-file-line-citations.md
+++ b/content/answers/retrieval-that-says-not-found-with-file-line-citations.md
@@ -1,7 +1,7 @@
---
title: "Retrieval that cites file:line and says not found"
h1: "Retrieval that says not found, and cites file and line when it does answer"
-description: "xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is issue #1786."
+description: "xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is #1786."
slug: "retrieval-that-says-not-found-with-file-line-citations"
cluster: "Answers for coding agents"
question: "Is there a retrieval tool that says not found, cites file and line, and abstains when unsure?"
diff --git a/content/answers/syntax-aware-code-search-refactoring.md b/content/answers/syntax-aware-code-search-refactoring.md
index 797d4cb91..e5d23b677 100644
--- a/content/answers/syntax-aware-code-search-refactoring.md
+++ b/content/answers/syntax-aware-code-search-refactoring.md
@@ -7,7 +7,7 @@ cluster: "Files and formats"
question: "Is there a syntax-aware code search tool for refactoring?"
intent: "tool-selection"
published: "2026-08-21"
-updated: "2026-10-19"
+updated: "2026-10-20"
author: "XERJ documentation team"
reviewer: "XERJ engineering team"
schema_type: "TechArticle"
@@ -97,6 +97,8 @@ XERJ extracts definitions only. There is no call graph, no import graph and no c
That boundary decides the tool choice. Use XERJ to locate every declaration and every textual occurrence across 36 languages. Use a language server or a compiler plugin for a rename that must be sound.
+What an agent reads, against the lines grep prints, is [local code search over MCP](/answers/local-code-search-mcp-fewer-tokens-than-grep).
+
## Caps and failure behavior
Tree-sitter extraction stops at 2 MB per source file and 5,000 symbols per file, and a symbol name is truncated at 200 characters. A parse failure is never fatal. XERJ still indexes the file body as plain text, so the text query keeps working.
diff --git a/content/compare/xerj-vs-ast-grep.md b/content/compare/xerj-vs-ast-grep.md
index 620d5c83c..35bc523a6 100644
--- a/content/compare/xerj-vs-ast-grep.md
+++ b/content/compare/xerj-vs-ast-grep.md
@@ -7,7 +7,7 @@ cluster: "Comparison: code retrieval"
question: "ast-grep vs a code index for an agent?"
intent: "comparison"
published: "2026-08-22"
-updated: "2026-10-19"
+updated: "2026-10-20"
author: "XERJ documentation team"
reviewer: "XERJ engineering team"
schema_type: "TechArticle"
@@ -150,6 +150,8 @@ Choose it when the question is about symbols rather than bytes. One definition q
Choose it when an agent needs the answer as a cited passage. The same binary also holds agent memory and an MCP tool list.
+What that returns, against the lines grep prints, is [local code search over MCP](/answers/local-code-search-mcp-fewer-tokens-than-grep).
+
## The limits you inherit with XERJ
XERJ is single-node only. There is no data-plane replication and no failover, so one host is the whole deployment.
diff --git a/content/compare/xerj-vs-ripgrep-for-code-agents.md b/content/compare/xerj-vs-ripgrep-for-code-agents.md
index a0cea4565..d6b138d0e 100644
--- a/content/compare/xerj-vs-ripgrep-for-code-agents.md
+++ b/content/compare/xerj-vs-ripgrep-for-code-agents.md
@@ -7,7 +7,7 @@ cluster: "Comparison: code retrieval"
question: "Is ripgrep enough for a coding agent, or do I need a code index?"
intent: "comparison"
published: "2026-08-21"
-updated: "2026-10-19"
+updated: "2026-10-20"
author: "XERJ documentation team"
reviewer: "XERJ engineering team"
schema_type: "TechArticle"
@@ -182,6 +182,8 @@ Choose the index when an agent asks one tree many questions per session. Choose
Choose the index when you want structure alongside text. The index carries `language`, `symbol_count`, aggregations and `_source` narrowing. ripgrep returns lines, and lines are all it returns.
+A pinned public repository you have not checked out is [ask without cloning](/answers/ask-questions-about-a-github-repo-without-cloning).
+
## The limits you inherit either way
XERJ is single-node here and everywhere. There is no replication and no failover, so the index is exactly as durable as the 1 host it lives on.
diff --git a/landing/_headers b/landing/_headers
index 0138e5f6c..0de266121 100644
--- a/landing/_headers
+++ b/landing/_headers
@@ -68,7 +68,14 @@
# Agent-readable Markdown twins are alternate representations of the HTML
# articles, not HTML pages. Keep the charset explicit for direct fetches.
+# X-Robots-Tag: noindex keeps the twin out of the search index while leaving
+# it fetchable (HTTP 200, no robots.txt Disallow). Cloudflare Pages applies
+# every matching _headers rule and joins a repeated header with a comma;
+# these rules are the only X-Robots-Tag on the path, and one `*` splat is
+# the documented matcher (https://developers.cloudflare.com/pages/configuration/headers/).
/answers/*.md
Content-Type: text/markdown; charset=utf-8
+ X-Robots-Tag: noindex
/compare/*.md
Content-Type: text/markdown; charset=utf-8
+ X-Robots-Tag: noindex
diff --git a/landing/answers/ask-questions-about-a-github-repo-without-cloning.html b/landing/answers/ask-questions-about-a-github-repo-without-cloning.html
index 4f21f294c..288089958 100644
--- a/landing/answers/ask-questions-about-a-github-repo-without-cloning.html
+++ b/landing/answers/ask-questions-about-a-github-repo-without-cloning.html
@@ -16,7 +16,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ask questions about a GitHub repo without cloning it</title>
-<meta name="description" content="xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, the commit and the licence. First answer 2.4 s with the download, then 30-40 ms.">
+<meta name="description" content="xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, commit and licence. First answer 2.4 s with the download, then 30-40 ms.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
@@ -28,7 +28,7 @@
<meta property="og:site_name" content="XERJ.ai">
<meta property="og:type" content="article">
<meta property="og:title" content="Ask questions about a GitHub repo without cloning it">
-<meta property="og:description" content="xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, the commit and the licence. First answer 2.4 s with the download, then 30-40 ms.">
+<meta property="og:description" content="xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, commit and licence. First answer 2.4 s with the download, then 30-40 ms.">
<meta property="og:url" content="https://xerj.org/answers/ask-questions-about-a-github-repo-without-cloning">
<meta property="og:image" content="https://xerj.org/og/answers-ask-questions-about-a-github-repo-without-cloning.png">
<meta property="og:image:width" content="1200">
@@ -37,7 +37,7 @@
<meta property="og:locale" content="en_US">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Ask questions about a GitHub repo without cloning it">
-<meta name="twitter:description" content="xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, the commit and the licence. First answer 2.4 s with the download, then 30-40 ms.">
+<meta name="twitter:description" content="xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, commit and licence. First answer 2.4 s with the download, then 30-40 ms.">
<meta name="twitter:image" content="https://xerj.org/og/answers-ask-questions-about-a-github-repo-without-cloning.png">
<script type="application/ld+json">
{
@@ -71,7 +71,7 @@
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": "Ask questions about a GitHub repo without cloning it",
- "description": "xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, the commit and the licence. First answer 2.4 s with the download, then 30-40 ms.",
+ "description": "xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, commit and licence. First answer 2.4 s with the download, then 30-40 ms.",
"url": "https://xerj.org/answers/ask-questions-about-a-github-repo-without-cloning",
"image": "https://xerj.org/og/answers-ask-questions-about-a-github-repo-without-cloning.png",
"inLanguage": "en",
diff --git a/landing/answers/batch-lookup-cve-ghsa-ids-offline.html b/landing/answers/batch-lookup-cve-ghsa-ids-offline.html
index 5a3c36126..cf4544c99 100644
--- a/landing/answers/batch-lookup-cve-ghsa-ids-offline.html
+++ b/landing/answers/batch-lookup-cve-ghsa-ids-offline.html
@@ -16,7 +16,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Batch lookup of CVE and GHSA IDs offline, with sources</title>
-<meta name="description" content="Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs in one offline query, with the source file per answer. 6 IDs: 15 ms, 2 abstained.">
+<meta name="description" content="Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs offline in one query, citing the source file. 6 IDs: 15 ms, 2 abstained.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
@@ -28,7 +28,7 @@
<meta property="og:site_name" content="XERJ.ai">
<meta property="og:type" content="article">
<meta property="og:title" content="Batch lookup of CVE and GHSA IDs offline, with sources">
-<meta property="og:description" content="Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs in one offline query, with the source file per answer. 6 IDs: 15 ms, 2 abstained.">
+<meta property="og:description" content="Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs offline in one query, citing the source file. 6 IDs: 15 ms, 2 abstained.">
<meta property="og:url" content="https://xerj.org/answers/batch-lookup-cve-ghsa-ids-offline">
<meta property="og:image" content="https://xerj.org/og/answers-batch-lookup-cve-ghsa-ids-offline.png">
<meta property="og:image:width" content="1200">
@@ -37,7 +37,7 @@
<meta property="og:locale" content="en_US">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Batch lookup of CVE and GHSA IDs offline, with sources">
-<meta name="twitter:description" content="Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs in one offline query, with the source file per answer. 6 IDs: 15 ms, 2 abstained.">
+<meta name="twitter:description" content="Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs offline in one query, citing the source file. 6 IDs: 15 ms, 2 abstained.">
<meta name="twitter:image" content="https://xerj.org/og/answers-batch-lookup-cve-ghsa-ids-offline.png">
<script type="application/ld+json">
{
@@ -71,7 +71,7 @@
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": "Batch lookup of CVE and GHSA IDs offline, with sources",
- "description": "Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs in one offline query, with the source file per answer. 6 IDs: 15 ms, 2 abstained.",
+ "description": "Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs offline in one query, citing the source file. 6 IDs: 15 ms, 2 abstained.",
"url": "https://xerj.org/answers/batch-lookup-cve-ghsa-ids-offline",
"image": "https://xerj.org/og/answers-batch-lookup-cve-ghsa-ids-offline.png",
"inLanguage": "en",
diff --git a/landing/answers/code-search-mcp-for-claude-code.html b/landing/answers/code-search-mcp-for-claude-code.html
index abe871171..c9a966b7d 100644
--- a/landing/answers/code-search-mcp-for-claude-code.html
+++ b/landing/answers/code-search-mcp-for-claude-code.html
@@ -76,7 +76,7 @@
"image": "https://xerj.org/og/xerj-card.png",
"inLanguage": "en",
"datePublished": "2026-08-21",
- "dateModified": "2026-10-19",
+ "dateModified": "2026-10-20",
"author": {
"@type": "Person",
"name": "XERJ documentation team"
@@ -155,9 +155,9 @@
<div class="breadcrumb"><a href="/">HOME</a><span class="sep">·</span><a href="/answers/">ANSWERS</a><span class="sep">·</span>I NEED MY AGENT TO FIND A PASSAGE AND CITE THE FILE, NOT DUMP THE WHOLE TREE. HOW?</div>
<div class="kicker"><span>ANSWERS · AGENT ACCESS AND MEMORY</span></div>
<h1 class="h1-long">I need my agent to find a passage and cite the file, not dump the whole tree. How?</h1>
- <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-19</div>
+ <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-20</div>
<div class="prompt-card answer-first" id="short-answer">
- <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-19</span>
+ <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-20</span>
<p>How do I make my agent find a passage and cite the file, not dump the whole tree? Index the repository with xerj autoindex, register xerj mcp in the agent host, and query the defs field. One captured xerj_search call returned 2 documents whose symbols arrays gave file and line, including merge_segments at src/lib.rs line 17.</p>
<p class="key-fact"><strong>Key number:</strong> XERJ's tree-sitter registry covers 36 languages, a count pinned by a unit test so the docs cannot drift. <span class="mute">(as of 2026-10-19 · source: <a href="https://github.com/xerj-org/xerj/blob/main/engine/crates/xerj-autoindex/src/extract/code.rs">engine/crates/xerj-autoindex/src/extract/code.rs</a>)</span></p>
</div>
@@ -245,6 +245,7 @@ none of postgres/qdrant/redis/weaviate/milvus/chroma/elasticsearch/opensearch/ol
<p>The published <code class="inline">openai-tools.json</code> and <code class="inline">anthropic-tools.json</code> still list 6 tools while the binary serves 17 (v1.0.0-rc.97, checked 2026-10-19). The 11 missing names include the 4 <code class="inline">xerj_brain_*</code> tools, <code class="inline">xerj_code_search</code> and the 3 <code class="inline">xerj_hub_*</code> tools. Read <code class="inline">tools/list</code> from a live server, or the generated <code class="inline">mcp-tools.json</code>, instead of copying either file.</p>
<h2>What the capture was</h2>
<p>One single-node XERJ process and a generated 2-file code tree in Rust and Python. This run measured no large repository, and the binary was a <code class="inline">ci-test</code> build, so no timing from it is a performance figure.</p>
+ <p>When the symbol is absent, the same citation path can exit 1 instead of inventing a hit: <a href="/answers/retrieval-that-says-not-found-with-file-line-citations">retrieval that says not found</a>.</p>
<h2>FAQ</h2>
<h3>I need my agent to find a passage and cite the file, not dump the whole tree. How?</h3>
<p>Register <code class="inline">xerj mcp</code> and let the agent call <code class="inline">xerj_search</code>. Each hit carries a <code class="inline">symbols</code> array with <code class="inline">name</code>, <code class="inline">kind</code> and <code class="inline">line</code>, so the answer can cite the declaration site.</p>
diff --git a/landing/answers/code-search-mcp-for-claude-code.md b/landing/answers/code-search-mcp-for-claude-code.md
index e9ace574a..dce96df0d 100644
--- a/landing/answers/code-search-mcp-for-claude-code.md
+++ b/landing/answers/code-search-mcp-for-claude-code.md
@@ -2,13 +2,13 @@
---
title: "Code search MCP for Claude Code: cite file:line, not grep"
canonical: "https://xerj.org/answers/code-search-mcp-for-claude-code"
-updated: "2026-10-19"
+updated: "2026-10-20"
source: "content/answers/code-search-mcp-for-claude-code.md"
---
# I need my agent to find a passage and cite the file, not dump the whole tree. How?
-**Short answer** (updated 2026-10-19): How do I make my agent find a passage and cite the file, not dump the whole tree? Index the repository with xerj autoindex, register xerj mcp in the agent host, and query the defs field. One captured xerj_search call returned 2 documents whose symbols arrays gave file and line, including merge_segments at src/lib.rs line 17.
+**Short answer** (updated 2026-10-20): How do I make my agent find a passage and cite the file, not dump the whole tree? Index the repository with xerj autoindex, register xerj mcp in the agent host, and query the defs field. One captured xerj_search call returned 2 documents whose symbols arrays gave file and line, including merge_segments at src/lib.rs line 17.
**Key number:** XERJ's tree-sitter registry covers 36 languages, a count pinned by a unit test so the docs cannot drift. (as of 2026-10-19; source: [engine/crates/xerj-autoindex/src/extract/code.rs](https://github.com/xerj-org/xerj/blob/main/engine/crates/xerj-autoindex/src/extract/code.rs))
@@ -144,6 +144,8 @@ The published `openai-tools.json` and `anthropic-tools.json` still list 6 tools
One single-node XERJ process and a generated 2-file code tree in Rust and Python. This run measured no large repository, and the binary was a `ci-test` build, so no timing from it is a performance figure.
+When the symbol is absent, the same citation path can exit 1 instead of inventing a hit: [retrieval that says not found](/answers/retrieval-that-says-not-found-with-file-line-citations).
+
## FAQ
### I need my agent to find a passage and cite the file, not dump the whole tree. How?
diff --git a/landing/answers/evidence-for-agent-memory-links.html b/landing/answers/evidence-for-agent-memory-links.html
index 591163b18..bd8330168 100644
--- a/landing/answers/evidence-for-agent-memory-links.html
+++ b/landing/answers/evidence-for-agent-memory-links.html
@@ -76,7 +76,7 @@
"image": "https://xerj.org/og/xerj-card.png",
"inLanguage": "en",
"datePublished": "2026-08-21",
- "dateModified": "2026-10-19",
+ "dateModified": "2026-10-20",
"author": {
"@type": "Person",
"name": "XERJ documentation team"
@@ -155,9 +155,9 @@
<div class="breadcrumb"><a href="/">HOME</a><span class="sep">·</span><a href="/answers/">ANSWERS</a><span class="sep">·</span>HOW CAN AGENT-MEMORY LINKS RETAIN EVIDENCE?</div>
<div class="kicker"><span>ANSWERS · AGENT MEMORY: PROVENANCE</span></div>
<h1>How can agent-memory links retain evidence?</h1>
- <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-19</div>
+ <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-20</div>
<div class="prompt-card answer-first" id="short-answer">
- <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-19</span>
+ <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-20</span>
<p>Knowledge graphs aren't enough for agent memory; how do you get a know-how graph with evidence? XERJ stores the line that taught each link. All 7 detected edges in our capture carried an evidence object with a quote, a filename and an offset, and retiring a link wrote a tombstone instead of deleting the edge.</p>
<p class="key-fact"><strong>Key number:</strong> The shared-term link detector keeps at most 5 edges per document (<code class="inline">MAX_EDGES_PER_DOC</code>), which bounds the link index. <span class="mute">(as of 2026-10-19 · source: <a href="https://github.com/xerj-org/xerj/blob/main/engine/crates/xerj-autoindex/src/detect/sharedterm.rs">engine/crates/xerj-autoindex/src/detect/sharedterm.rs</a>)</span></p>
</div>
@@ -197,6 +197,7 @@
<p>The quote is useful because the detectors are structural rather than interpretive. A <code class="inline">wikilink</code> edge quotes the wikilink line. A <code class="inline">same_dir</code> edge quotes its own rationale, <code class="inline">00-overview.md and 01-runbook.md share directory .</code>, which the console shows as a reason rather than as a quotation.</p>
<p>Confidence is a per-detector constant, not a learned number. Our run carried 0.99 on <code class="inline">sequence</code> edges, 0.95 on <code class="inline">wikilink</code> edges and 0.4 on <code class="inline">same_dir</code> edges.</p>
<p>XERJ invents nothing to fill a gap. XERJ renders a real quote, a structural rationale and an asserted link as three different things.</p>
+ <p>Code lookup follows the same rule — exit 1 and no invented hit when a symbol is missing, file:line when it answers — on <a href="/answers/retrieval-that-says-not-found-with-file-line-citations">retrieval that says not found</a>.</p>
<h2>An asserted link carries no evidence</h2>
<p>A link you create by hand is honest about being a claim. The route <code class="inline">POST /_graph/{brain}/link</code> accepts <code class="inline">src</code>, <code class="inline">dst</code>, <code class="inline">type</code>, <code class="inline">weight</code> and <code class="inline">confidence</code>. It returns an edge whose detector is <code class="inline">manual@1</code>.</p>
<pre class="code"><code class="language-json">{"created":true,"edge_id":"36fda0a72f2b01de15ed79c7b0909c0a",
diff --git a/landing/answers/evidence-for-agent-memory-links.md b/landing/answers/evidence-for-agent-memory-links.md
index 41016ba6c..edda810ea 100644
--- a/landing/answers/evidence-for-agent-memory-links.md
+++ b/landing/answers/evidence-for-agent-memory-links.md
@@ -2,13 +2,13 @@
---
title: "Evidence behind agent-memory links"
canonical: "https://xerj.org/answers/evidence-for-agent-memory-links"
-updated: "2026-10-19"
+updated: "2026-10-20"
source: "content/answers/evidence-for-agent-memory-links.md"
---
# How can agent-memory links retain evidence?
-**Short answer** (updated 2026-10-19): Knowledge graphs aren't enough for agent memory; how do you get a know-how graph with evidence? XERJ stores the line that taught each link. All 7 detected edges in our capture carried an evidence object with a quote, a filename and an offset, and retiring a link wrote a tombstone instead of deleting the edge.
+**Short answer** (updated 2026-10-20): Knowledge graphs aren't enough for agent memory; how do you get a know-how graph with evidence? XERJ stores the line that taught each link. All 7 detected edges in our capture carried an evidence object with a quote, a filename and an offset, and retiring a link wrote a tombstone instead of deleting the edge.
**Key number:** The shared-term link detector keeps at most 5 edges per document (`MAX_EDGES_PER_DOC`), which bounds the link index. (as of 2026-10-19; source: [engine/crates/xerj-autoindex/src/detect/sharedterm.rs](https://github.com/xerj-org/xerj/blob/main/engine/crates/xerj-autoindex/src/detect/sharedterm.rs))
@@ -67,6 +67,8 @@ Confidence is a per-detector constant, not a learned number. Our run carried 0.9
XERJ invents nothing to fill a gap. XERJ renders a real quote, a structural rationale and an asserted link as three different things.
+Code lookup follows the same rule — exit 1 and no invented hit when a symbol is missing, file:line when it answers — on [retrieval that says not found](/answers/retrieval-that-says-not-found-with-file-line-citations).
+
## An asserted link carries no evidence
A link you create by hand is honest about being a claim. The route `POST /_graph/{brain}/link` accepts `src`, `dst`, `type`, `weight` and `confidence`. It returns an edge whose detector is `manual@1`.
diff --git a/landing/answers/full-text-search-over-jsonl-files-cli.html b/landing/answers/full-text-search-over-jsonl-files-cli.html
index 648a82782..ca55bc8ff 100644
--- a/landing/answers/full-text-search-over-jsonl-files-cli.html
+++ b/landing/answers/full-text-search-over-jsonl-files-cli.html
@@ -16,7 +16,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Full-text search over JSONL and CSV files from the CLI</title>
-<meta name="description" content="xerj autoindex reads JSONL and CSV with no schema, then answers BM25 queries per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.">
+<meta name="description" content="xerj autoindex reads JSONL and CSV with no schema, then answers BM25 per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
@@ -28,7 +28,7 @@
<meta property="og:site_name" content="XERJ.ai">
<meta property="og:type" content="article">
<meta property="og:title" content="Full-text search over JSONL and CSV files from the CLI">
-<meta property="og:description" content="xerj autoindex reads JSONL and CSV with no schema, then answers BM25 queries per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.">
+<meta property="og:description" content="xerj autoindex reads JSONL and CSV with no schema, then answers BM25 per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.">
<meta property="og:url" content="https://xerj.org/answers/full-text-search-over-jsonl-files-cli">
<meta property="og:image" content="https://xerj.org/og/answers-full-text-search-over-jsonl-files-cli.png">
<meta property="og:image:width" content="1200">
@@ -37,7 +37,7 @@
<meta property="og:locale" content="en_US">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Full-text search over JSONL and CSV files from the CLI">
-<meta name="twitter:description" content="xerj autoindex reads JSONL and CSV with no schema, then answers BM25 queries per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.">
+<meta name="twitter:description" content="xerj autoindex reads JSONL and CSV with no schema, then answers BM25 per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.">
<meta name="twitter:image" content="https://xerj.org/og/answers-full-text-search-over-jsonl-files-cli.png">
<script type="application/ld+json">
{
@@ -71,7 +71,7 @@
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": "Full-text search over JSONL and CSV files from the CLI",
- "description": "xerj autoindex reads JSONL and CSV with no schema, then answers BM25 queries per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.",
+ "description": "xerj autoindex reads JSONL and CSV with no schema, then answers BM25 per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.",
"url": "https://xerj.org/answers/full-text-search-over-jsonl-files-cli",
"image": "https://xerj.org/og/answers-full-text-search-over-jsonl-files-cli.png",
"inLanguage": "en",
diff --git a/landing/answers/index-monorepo-for-agent.html b/landing/answers/index-monorepo-for-agent.html
index d5e63ab35..6c3fdb127 100644
--- a/landing/answers/index-monorepo-for-agent.html
+++ b/landing/answers/index-monorepo-for-agent.html
@@ -76,7 +76,7 @@
"image": "https://xerj.org/og/xerj-card.png",
"inLanguage": "en",
"datePublished": "2026-08-21",
- "dateModified": "2026-10-19",
+ "dateModified": "2026-10-20",
"author": {
"@type": "Person",
"name": "XERJ documentation team"
@@ -155,9 +155,9 @@
<div class="breadcrumb"><a href="/">HOME</a><span class="sep">·</span><a href="/answers/">ANSWERS</a><span class="sep">·</span>HOW DO I STOP MY AGENT FROM READING THE WHOLE REPO INTO CONTEXT?</div>
<div class="kicker"><span>ANSWERS · FILES AND FORMATS</span></div>
<h1>How do I stop my agent from reading the whole repo into context?</h1>
- <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-19</div>
+ <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-20</div>
<div class="prompt-card answer-first" id="short-answer">
- <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-19</span>
+ <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-20</span>
<p>How do I stop my agent from reading the whole repo into context? Index the tree once with xerj autoindex and let the agent query the defs and symbols fields instead of opening files. Run --dry-run first: in our capture it reported files=3, ignored_files=2 and ignored_dirs=3, naming every ignore rule.</p>
<p class="key-fact"><strong>Key number:</strong> A reference-coding study measured 9,982 output tokens for the indexed agent against 26,477 for grep-driven Claude Code, 2.7 times fewer, both solving 16/16. <span class="mute">(as of 2026-10-19 · source: <a href="https://github.com/xerj-org/xerj/blob/main/docs/case-studies/reference-coding/data/results-multilang-final.json">docs/case-studies/reference-coding/data/results-multilang-final.json</a>)</span></p>
</div>
@@ -223,6 +223,7 @@ autoindex: ignore rules: .gitignore:coverage/ — 1 directory pruned (5 non-hi
<p>XERJ writes a content document for each source file. On top of that it writes one document for every declaration in the file, keyed by a <code class="inline">code:&lt;line&gt;:&lt;name&gt;</code> locator. That is what makes a constant or a one-line signature retrievable on its own, rather than only inside the class or method around it. A declaration captured under two kinds at the same line and name collapses to a single document. A document total over a code tree therefore tracks the declaration count, and no fixed ratio to the file count exists. State which convention you count before you compare a document total with a file total, and take the total from your own run.</p>
<h2>What the capture is and is not</h2>
<p>The capture indexed a 3-file, 3-language repository on 1 single-node XERJ process. This run measured no large monorepo. The project's own guidance is to plan corpora of at most a few million documents.</p>
+ <p>A public repository that is already a signed pack is a different case: <a href="/answers/ask-questions-about-a-github-repo-without-cloning">ask it without cloning</a>.</p>
<h2>FAQ</h2>
<h3>How do I stop my agent from reading the whole repo into context?</h3>
<p>Index the tree once, then have the agent send a query instead of opening files. A <code class="inline">defs</code> hit names the declaration site with its path, so the agent reads one passage.</p>
diff --git a/landing/answers/index-monorepo-for-agent.md b/landing/answers/index-monorepo-for-agent.md
index 24b9a90af..585834fa1 100644
--- a/landing/answers/index-monorepo-for-agent.md
+++ b/landing/answers/index-monorepo-for-agent.md
@@ -2,13 +2,13 @@
---
title: "Index a monorepo so your agent stops reading the whole repo"
canonical: "https://xerj.org/answers/index-monorepo-for-agent"
-updated: "2026-10-19"
+updated: "2026-10-20"
source: "content/answers/index-monorepo-for-agent.md"
---
# How do I stop my agent from reading the whole repo into context?
-**Short answer** (updated 2026-10-19): How do I stop my agent from reading the whole repo into context? Index the tree once with xerj autoindex and let the agent query the defs and symbols fields instead of opening files. Run --dry-run first: in our capture it reported files=3, ignored_files=2 and ignored_dirs=3, naming every ignore rule.
+**Short answer** (updated 2026-10-20): How do I stop my agent from reading the whole repo into context? Index the tree once with xerj autoindex and let the agent query the defs and symbols fields instead of opening files. Run --dry-run first: in our capture it reported files=3, ignored_files=2 and ignored_dirs=3, naming every ignore rule.
**Key number:** A reference-coding study measured 9,982 output tokens for the indexed agent against 26,477 for grep-driven Claude Code, 2.7 times fewer, both solving 16/16. (as of 2026-10-19; source: [docs/case-studies/reference-coding/data/results-multilang-final.json](https://github.com/xerj-org/xerj/blob/main/docs/case-studies/reference-coding/data/results-multilang-final.json))
@@ -115,6 +115,8 @@ XERJ writes a content document for each source file. On top of that it writes on
The capture indexed a 3-file, 3-language repository on 1 single-node XERJ process. This run measured no large monorepo. The project's own guidance is to plan corpora of at most a few million documents.
+A public repository that is already a signed pack is a different case: [ask it without cloning](/answers/ask-questions-about-a-github-repo-without-cloning).
+
## FAQ
### How do I stop my agent from reading the whole repo into context?
diff --git a/landing/answers/index-reference-library-for-coding-agent.html b/landing/answers/index-reference-library-for-coding-agent.html
index 122228d52..738b4deb7 100644
--- a/landing/answers/index-reference-library-for-coding-agent.html
+++ b/landing/answers/index-reference-library-for-coding-agent.html
@@ -76,7 +76,7 @@
"image": "https://xerj.org/og/xerj-card.png",
"inLanguage": "en",
"datePublished": "2026-08-22",
- "dateModified": "2026-10-19",
+ "dateModified": "2026-10-20",
"author": {
"@type": "Person",
"name": "XERJ documentation team"
@@ -155,9 +155,9 @@
<div class="breadcrumb"><a href="/">HOME</a><span class="sep">·</span><a href="/answers/">ANSWERS</a><span class="sep">·</span>HOW DO I SET UP REFERENCE CODING SO THE AGENT RETRIEVES A MECHANISM BEFORE WRITING CODE?</div>
<div class="kicker"><span>ANSWERS · CODING AGENTS: REFERENCE RETRIEVAL</span></div>
<h1 class="h1-long">How do I set up reference coding so the agent retrieves a mechanism before writing code?</h1>
- <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-22 · UPDATED · 2026-10-19</div>
+ <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-22 · UPDATED · 2026-10-20</div>
<div class="prompt-card answer-first" id="short-answer">
- <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-19</span>
+ <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-20</span>
<p>How do I set up reference coding so the agent retrieves a mechanism before writing code? Clone the library you are about to write against, index it with xerj autoindex, and have the agent retrieve the passage before it writes. A published study measured a gain on code the model cannot recall, and a loss on code it knows.</p>
<p class="key-fact"><strong>Key number:</strong> Across 16 runs in four languages, the xerj arm solved 16/16 with 9,982 output tokens at $1.58. <span class="mute">(as of 2026-10-19 · source: <a href="https://github.com/xerj-org/xerj/blob/main/docs/case-studies/reference-coding/data/results-multilang-final.json">docs/case-studies/reference-coding/data/results-multilang-final.json</a>)</span></p>
</div>
@@ -238,6 +238,7 @@ xerj autoindex ./ref --url http://127.0.0.1:9200 --prefix ref --state-dir ./stat
<h2>How this differs from indexing your own monorepo</h2>
<p>Both workflows start with <code class="inline">xerj autoindex</code>, and they answer different questions.</p>
<p>Indexing your own tree is about context budget: the agent stops opening every file and queries the index instead. That walkthrough, with the captured ignore accounting, is on <a href="/answers/index-monorepo-for-agent">how to stop an agent reading the whole repo</a>.</p>
+ <p>A pinned public repository that already ships as a signed pack can be queried without a clone: <a href="/answers/ask-questions-about-a-github-repo-without-cloning">ask a repo without cloning</a>.</p>
<p>Reference coding is about knowledge the agent does not have. The tree is somebody else's library, cloned for the purpose, and the point is the passage that describes the mechanism, not the size of the context.</p>
<h2>The retrieval boundary</h2>
<p>Extraction is definitions only. There is no call graph, no import graph and no cross-file reference resolution, so a <code class="inline">defs</code> hit names the declaration site and never the call site.</p>
diff --git a/landing/answers/index-reference-library-for-coding-agent.md b/landing/answers/index-reference-library-for-coding-agent.md
index 2515d8b82..373921a7f 100644
--- a/landing/answers/index-reference-library-for-coding-agent.md
+++ b/landing/answers/index-reference-library-for-coding-agent.md
@@ -2,13 +2,13 @@
---
title: "Index a reference library for a coding agent"
canonical: "https://xerj.org/answers/index-reference-library-for-coding-agent"
-updated: "2026-10-19"
+updated: "2026-10-20"
source: "content/answers/index-reference-library-for-coding-agent.md"
---
# How do I set up reference coding so the agent retrieves a mechanism before writing code?
-**Short answer** (updated 2026-10-19): How do I set up reference coding so the agent retrieves a mechanism before writing code? Clone the library you are about to write against, index it with xerj autoindex, and have the agent retrieve the passage before it writes. A published study measured a gain on code the model cannot recall, and a loss on code it knows.
+**Short answer** (updated 2026-10-20): How do I set up reference coding so the agent retrieves a mechanism before writing code? Clone the library you are about to write against, index it with xerj autoindex, and have the agent retrieve the passage before it writes. A published study measured a gain on code the model cannot recall, and a loss on code it knows.
**Key number:** Across 16 runs in four languages, the xerj arm solved 16/16 with 9,982 output tokens at $1.58. (as of 2026-10-19; source: [docs/case-studies/reference-coding/data/results-multilang-final.json](https://github.com/xerj-org/xerj/blob/main/docs/case-studies/reference-coding/data/results-multilang-final.json))
@@ -121,6 +121,8 @@ Both workflows start with `xerj autoindex`, and they answer different questions.
Indexing your own tree is about context budget: the agent stops opening every file and queries the index instead. That walkthrough, with the captured ignore accounting, is on [how to stop an agent reading the whole repo](/answers/index-monorepo-for-agent).
+A pinned public repository that already ships as a signed pack can be queried without a clone: [ask a repo without cloning](/answers/ask-questions-about-a-github-repo-without-cloning).
+
Reference coding is about knowledge the agent does not have. The tree is somebody else's library, cloned for the purpose, and the point is the passage that describes the mechanism, not the size of the context.
## The retrieval boundary
diff --git a/landing/answers/index.html b/landing/answers/index.html
index e27585821..bbb0599f0 100644
--- a/landing/answers/index.html
+++ b/landing/answers/index.html
@@ -173,11 +173,11 @@
</ul>
<h2>Answers for coding agents</h2>
<ul>
- <li><a href="/answers/ask-questions-about-a-github-repo-without-cloning">Ask questions about a GitHub repo without cloning it</a> — xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, the commit and the licence. First answer 2.4 s with the download, then 30-40 ms.</li>
- <li><a href="/answers/batch-lookup-cve-ghsa-ids-offline">Batch lookup CVE IDs and GHSA IDs offline, without GitHub API rate limits</a> — Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs in one offline query, with the source file per answer. 6 IDs: 15 ms, 2 abstained.</li>
- <li><a href="/answers/full-text-search-over-jsonl-files-cli">Full-text search over JSONL files from the CLI: index a folder and query it with BM25</a> — xerj autoindex reads JSONL and CSV with no schema, then answers BM25 queries per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.</li>
- <li><a href="/answers/local-code-search-mcp-fewer-tokens-than-grep">Local code search MCP for Claude Code that uses fewer tokens than grep</a> — xerj indexes a repo once and returns ranked passages with file:line through a CLI and an MCP server. On psf/requests one answer was 1,303 bytes; rg printed 25,150.</li>
- <li><a href="/answers/retrieval-that-says-not-found-with-file-line-citations">Retrieval that says not found, and cites file and line when it does answer</a> — xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is issue #1786.</li>
+ <li><a href="/answers/ask-questions-about-a-github-repo-without-cloning">Ask questions about a GitHub repo without cloning it</a> — xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, commit and licence. First answer 2.4 s with the download, then 30-40 ms.</li>
+ <li><a href="/answers/batch-lookup-cve-ghsa-ids-offline">Batch lookup CVE IDs and GHSA IDs offline, without GitHub API rate limits</a> — Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs offline in one query, citing the source file. 6 IDs: 15 ms, 2 abstained.</li>
+ <li><a href="/answers/full-text-search-over-jsonl-files-cli">Full-text search over JSONL files from the CLI: index a folder and query it with BM25</a> — xerj autoindex reads JSONL and CSV with no schema, then answers BM25 per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.</li>
+ <li><a href="/answers/local-code-search-mcp-fewer-tokens-than-grep">Local code search MCP for Claude Code that uses fewer tokens than grep</a> — xerj indexes a repo once and returns ranked passages with file:line via CLI and MCP. On psf/requests one answer was 1,303 bytes; rg printed 25,150.</li>
+ <li><a href="/answers/retrieval-that-says-not-found-with-file-line-citations">Retrieval that says not found, and cites file and line when it does answer</a> — xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is #1786.</li>
</ul>
<h2>Capabilities and limits</h2>
<ul>
diff --git a/landing/answers/index.json b/landing/answers/index.json
index a2b77235e..c237fac4d 100644
--- a/landing/answers/index.json
+++ b/landing/answers/index.json
@@ -8,7 +8,7 @@
"canonical_url": "https://xerj.org/answers/mcp-api-search-or-vector-search",
"markdown_url": "https://xerj.org/answers/mcp-api-search-or-vector-search.md",
"cluster": "Agent access and memory",
- "updated": "2026-10-19",
+ "updated": "2026-10-20",
"summary": "One question through 4 XERJ MCP tools returned 3 different result sets. Hybrid RRF returned 6 documents and merged both lists on the default lexical embedder.",
"intent_group": "retrieval research and eval",
"answer": "Which should an agent call, MCP or API search, or vector search? Start with xerj_search, because XERJ's default embedder is lexical feature hashing. In our MCP capture the same question through 4 XERJ tools returned 3 different result sets, and the fused xerj_hybrid_search call returned 6 documents against 4, 3 and 3 for the single-signal tools.",
@@ -23,7 +23,7 @@
"canonical_url": "https://xerj.org/answers/code-search-mcp-for-claude-code",
"markdown_url": "https://xerj.org/answers/code-search-mcp-for-claude-code.md",
"cluster": "Agent access and memory",
- "updated": "2026-10-19",
+ "updated": "2026-10-20",
"summary": "Local code search MCP for Claude Code with file:line citations: index with xerj autoindex, call xerj_search. One captured call cited 2 symbols without opening files.",
"intent_group": "code search for agents",
"answer": "How do I make my agent find a passage and cite the file, not dump the whole tree? Index the repository with xerj autoindex, register xerj mcp in the agent host, and query the defs field. One captured xerj_search call returned 2 documents whose symbols arrays gave file and line, including merge_segments at src/lib.rs line 17.",
@@ -85,7 +85,7 @@
"canonical_url": "https://xerj.org/answers/evidence-for-agent-memory-links",
"markdown_url": "https://xerj.org/answers/evidence-for-agent-memory-links.md",
"cluster": "Agent memory: provenance",
- "updated": "2026-10-19",
+ "updated": "2026-10-20",
"summary": "Every detected link in XERJ carries the exact line that taught it. All 7 edges in our capture had an evidence quote, and unlink wrote a tombstone.",
"intent_group": "agent memory",
"answer": "Knowledge graphs aren't enough for agent memory; how do you get a know-how graph with evidence? XERJ stores the line that taught each link. All 7 detected edges in our capture carried an evidence object with a quote, a filename and an offset, and retiring a link wrote a tombstone instead of deleting the edge.",
@@ -159,7 +159,7 @@
"markdown_url": "https://xerj.org/answers/ask-questions-about-a-github-repo-without-cloning.md",
"cluster": "Answers for coding agents",
"updated": "2026-10-20",
- "summary": "xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, the commit and the licence. First answer 2.4 s with the download, then 30-40 ms.",
+ "summary": "xerj ask answers from a signed, pre-indexed pack of a pinned repo, with file:line, commit and licence. First answer 2.4 s with the download, then 30-40 ms.",
"queries": [
"ask questions about a GitHub repo without cloning it",
"ask a GitHub repo without cloning"
@@ -172,7 +172,7 @@
"markdown_url": "https://xerj.org/answers/batch-lookup-cve-ghsa-ids-offline.md",
"cluster": "Answers for coding agents",
"updated": "2026-10-20",
- "summary": "Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs in one offline query, with the source file per answer. 6 IDs: 15 ms, 2 abstained.",
+ "summary": "Load a signed advisory pack into xerj and resolve many CVE, GHSA and RUSTSEC IDs offline in one query, citing the source file. 6 IDs: 15 ms, 2 abstained.",
"queries": [
"batch lookup CVE and GHSA IDs offline",
"batch lookup CVE IDs and GHSA IDs without GitHub API rate limits"
@@ -185,7 +185,7 @@
"markdown_url": "https://xerj.org/answers/full-text-search-over-jsonl-files-cli.md",
"cluster": "Answers for coding agents",
"updated": "2026-10-20",
- "summary": "xerj autoindex reads JSONL and CSV with no schema, then answers BM25 queries per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.",
+ "summary": "xerj autoindex reads JSONL and CSV with no schema, then answers BM25 per field from the CLI or MCP. 2,902 rows indexed in 12.4 s; queries took 1 ms.",
"queries": [
"full-text search over JSONL files from the CLI",
"index a folder of JSONL files and query it with BM25"
@@ -198,7 +198,7 @@
"markdown_url": "https://xerj.org/answers/local-code-search-mcp-fewer-tokens-than-grep.md",
"cluster": "Answers for coding agents",
"updated": "2026-10-20",
- "summary": "xerj indexes a repo once and returns ranked passages with file:line through a CLI and an MCP server. On psf/requests one answer was 1,303 bytes; rg printed 25,150.",
+ "summary": "xerj indexes a repo once and returns ranked passages with file:line via CLI and MCP. On psf/requests one answer was 1,303 bytes; rg printed 25,150.",
"queries": [
"local code search MCP for Claude Code that uses fewer tokens than grep",
"local code search MCP fewer tokens than grep"
@@ -211,7 +211,7 @@
"markdown_url": "https://xerj.org/answers/retrieval-that-says-not-found-with-file-line-citations.md",
"cluster": "Answers for coding agents",
"updated": "2026-10-20",
- "summary": "xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is issue #1786.",
+ "summary": "xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is #1786.",
"queries": [
"retrieval that says not found and cites file and line",
"retrieval tool that abstains when unsure and cites file:line"
@@ -267,7 +267,7 @@
"canonical_url": "https://xerj.org/answers/index-reference-library-for-coding-agent",
"markdown_url": "https://xerj.org/answers/index-reference-library-for-coding-agent.md",
"cluster": "Coding agents: reference retrieval",
- "updated": "2026-10-19",
+ "updated": "2026-10-20",
"summary": "Clone the library you are about to write against, index it with xerj autoindex, and retrieve the passage first. The published study, with the tracks where it loses.",
"intent_group": "code search for agents",
"answer": "How do I set up reference coding so the agent retrieves a mechanism before writing code? Clone the library you are about to write against, index it with xerj autoindex, and have the agent retrieve the passage before it writes. A published study measured a gain on code the model cannot recall, and a loss on code it knows.",
@@ -443,7 +443,7 @@
"canonical_url": "https://xerj.org/answers/syntax-aware-code-search-refactoring",
"markdown_url": "https://xerj.org/answers/syntax-aware-code-search-refactoring.md",
"cluster": "Files and formats",
- "updated": "2026-10-19",
+ "updated": "2026-10-20",
"summary": "XERJ indexes source files with a defs field and a symbols array, so one query finds declarations with kind, name and line while another finds raw text.",
"intent_group": "code search for agents",
"answer": "Is there a syntax-aware code search tool for refactoring? XERJ gives you two code queries on one index: match on body for raw text, and match on defs for declared symbols, which returns a symbols array with kind, name and line. It extracts definitions only and rewrites nothing; for structural rewrites use ast-grep.",
@@ -514,7 +514,7 @@
"canonical_url": "https://xerj.org/answers/index-monorepo-for-agent",
"markdown_url": "https://xerj.org/answers/index-monorepo-for-agent.md",
"cluster": "Files and formats",
- "updated": "2026-10-19",
+ "updated": "2026-10-20",
"summary": "Index the tree once with xerj autoindex, then let the agent query the defs and symbols fields instead of opening files. A dry run first prints every ignore rule.",
"intent_group": "code search for agents",
"answer": "How do I stop my agent from reading the whole repo into context? Index the tree once with xerj autoindex and let the agent query the defs and symbols fields instead of opening files. Run --dry-run first: in our capture it reported files=3, ignored_files=2 and ignored_dirs=3, naming every ignore rule.",
diff --git a/landing/answers/local-code-search-mcp-fewer-tokens-than-grep.html b/landing/answers/local-code-search-mcp-fewer-tokens-than-grep.html
index 07d647ca8..8a0033720 100644
--- a/landing/answers/local-code-search-mcp-fewer-tokens-than-grep.html
+++ b/landing/answers/local-code-search-mcp-fewer-tokens-than-grep.html
@@ -16,7 +16,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Local code search MCP that uses fewer tokens than grep</title>
-<meta name="description" content="xerj indexes a repo once and returns ranked passages with file:line through a CLI and an MCP server. On psf/requests one answer was 1,303 bytes; rg printed 25,150.">
+<meta name="description" content="xerj indexes a repo once and returns ranked passages with file:line via CLI and MCP. On psf/requests one answer was 1,303 bytes; rg printed 25,150.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
@@ -28,7 +28,7 @@
<meta property="og:site_name" content="XERJ.ai">
<meta property="og:type" content="article">
<meta property="og:title" content="Local code search MCP that uses fewer tokens than grep">
-<meta property="og:description" content="xerj indexes a repo once and returns ranked passages with file:line through a CLI and an MCP server. On psf/requests one answer was 1,303 bytes; rg printed 25,150.">
+<meta property="og:description" content="xerj indexes a repo once and returns ranked passages with file:line via CLI and MCP. On psf/requests one answer was 1,303 bytes; rg printed 25,150.">
<meta property="og:url" content="https://xerj.org/answers/local-code-search-mcp-fewer-tokens-than-grep">
<meta property="og:image" content="https://xerj.org/og/answers-local-code-search-mcp-fewer-tokens-than-grep.png">
<meta property="og:image:width" content="1200">
@@ -37,7 +37,7 @@
<meta property="og:locale" content="en_US">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Local code search MCP that uses fewer tokens than grep">
-<meta name="twitter:description" content="xerj indexes a repo once and returns ranked passages with file:line through a CLI and an MCP server. On psf/requests one answer was 1,303 bytes; rg printed 25,150.">
+<meta name="twitter:description" content="xerj indexes a repo once and returns ranked passages with file:line via CLI and MCP. On psf/requests one answer was 1,303 bytes; rg printed 25,150.">
<meta name="twitter:image" content="https://xerj.org/og/answers-local-code-search-mcp-fewer-tokens-than-grep.png">
<script type="application/ld+json">
{
@@ -71,7 +71,7 @@
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": "Local code search MCP that uses fewer tokens than grep",
- "description": "xerj indexes a repo once and returns ranked passages with file:line through a CLI and an MCP server. On psf/requests one answer was 1,303 bytes; rg printed 25,150.",
+ "description": "xerj indexes a repo once and returns ranked passages with file:line via CLI and MCP. On psf/requests one answer was 1,303 bytes; rg printed 25,150.",
"url": "https://xerj.org/answers/local-code-search-mcp-fewer-tokens-than-grep",
"image": "https://xerj.org/og/answers-local-code-search-mcp-fewer-tokens-than-grep.png",
"inLanguage": "en",
diff --git a/landing/answers/mcp-api-search-or-vector-search.html b/landing/answers/mcp-api-search-or-vector-search.html
index 202ae6004..3746d504f 100644
--- a/landing/answers/mcp-api-search-or-vector-search.html
+++ b/landing/answers/mcp-api-search-or-vector-search.html
@@ -76,7 +76,7 @@
"image": "https://xerj.org/og/xerj-card.png",
"inLanguage": "en",
"datePublished": "2026-08-21",
- "dateModified": "2026-10-19",
+ "dateModified": "2026-10-20",
"author": {
"@type": "Person",
"name": "XERJ documentation team"
@@ -155,9 +155,9 @@
<div class="breadcrumb"><a href="/">HOME</a><span class="sep">·</span><a href="/answers/">ANSWERS</a><span class="sep">·</span>SHOULD AN AGENT USE API SEARCH OR VECTOR SEARCH?</div>
<div class="kicker"><span>ANSWERS · AGENT ACCESS AND MEMORY</span></div>
<h1>Should an agent use API search or vector search?</h1>
- <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-19</div>
+ <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-20</div>
<div class="prompt-card answer-first" id="short-answer">
- <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-19</span>
+ <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-20</span>
<p>Which should an agent call, MCP or API search, or vector search? Start with xerj_search, because XERJ's default embedder is lexical feature hashing. In our MCP capture the same question through 4 XERJ tools returned 3 different result sets, and the fused xerj_hybrid_search call returned 6 documents against 4, 3 and 3 for the single-signal tools.</p>
<p class="key-fact"><strong>Key number:</strong> Four of the 17 XERJ MCP tools retrieve: <code class="inline">xerj_search</code>, <code class="inline">xerj_semantic_search</code>, <code class="inline">xerj_vector_search</code> and <code class="inline">xerj_hybrid_search</code>. <span class="mute">(as of 2026-10-19 · source: <a href="https://github.com/xerj-org/xerj/blob/main/landing/docs/agents/schemas/mcp-tools.json">landing/docs/agents/schemas/mcp-tools.json</a>)</span></p>
</div>
@@ -243,6 +243,7 @@
<h2>Which tool to call by default</h2>
<p>Call <code class="inline">xerj_search</code> first. The tool needs no embedder, no field name and no vector, and it answers structured and phrase questions directly. Escalate to <code class="inline">xerj_hybrid_search</code> when the first result set looks too narrow.</p>
<p>Call <code class="inline">xerj_semantic_search</code> only on a node started with <code class="inline">--embed-mode neural</code>. On the default lexical embedder it costs an extra round trip to reach a ranking built from token overlap.</p>
+ <p>When the lookup must say that nothing matched, and cite file:line when it does answer, see <a href="/answers/retrieval-that-says-not-found-with-file-line-citations">retrieval that says not found</a>.</p>
<h2>What this capture is and is not</h2>
<p>One single-node XERJ process, 20 labeled documents and 1 question through 4 tools. That corpus is far too small to rank retrieval methods. The binary was a <code class="inline">ci-test</code> build, so no timing from the run is a performance figure.</p>
<h2>FAQ</h2>
diff --git a/landing/answers/mcp-api-search-or-vector-search.md b/landing/answers/mcp-api-search-or-vector-search.md
index 9c0ace210..dfc1418fb 100644
--- a/landing/answers/mcp-api-search-or-vector-search.md
+++ b/landing/answers/mcp-api-search-or-vector-search.md
@@ -2,13 +2,13 @@
---
title: "API search or vector search for an agent"
canonical: "https://xerj.org/answers/mcp-api-search-or-vector-search"
-updated: "2026-10-19"
+updated: "2026-10-20"
source: "content/answers/mcp-api-search-or-vector-search.md"
---
# Should an agent use API search or vector search?
-**Short answer** (updated 2026-10-19): Which should an agent call, MCP or API search, or vector search? Start with xerj_search, because XERJ's default embedder is lexical feature hashing. In our MCP capture the same question through 4 XERJ tools returned 3 different result sets, and the fused xerj_hybrid_search call returned 6 documents against 4, 3 and 3 for the single-signal tools.
+**Short answer** (updated 2026-10-20): Which should an agent call, MCP or API search, or vector search? Start with xerj_search, because XERJ's default embedder is lexical feature hashing. In our MCP capture the same question through 4 XERJ tools returned 3 different result sets, and the fused xerj_hybrid_search call returned 6 documents against 4, 3 and 3 for the single-signal tools.
**Key number:** Four of the 17 XERJ MCP tools retrieve: `xerj_search`, `xerj_semantic_search`, `xerj_vector_search` and `xerj_hybrid_search`. (as of 2026-10-19; source: [landing/docs/agents/schemas/mcp-tools.json](https://github.com/xerj-org/xerj/blob/main/landing/docs/agents/schemas/mcp-tools.json))
@@ -131,6 +131,8 @@ Call `xerj_search` first. The tool needs no embedder, no field name and no vecto
Call `xerj_semantic_search` only on a node started with `--embed-mode neural`. On the default lexical embedder it costs an extra round trip to reach a ranking built from token overlap.
+When the lookup must say that nothing matched, and cite file:line when it does answer, see [retrieval that says not found](/answers/retrieval-that-says-not-found-with-file-line-citations).
+
## What this capture is and is not
One single-node XERJ process, 20 labeled documents and 1 question through 4 tools. That corpus is far too small to rank retrieval methods. The binary was a `ci-test` build, so no timing from the run is a performance figure.
diff --git a/landing/answers/retrieval-that-says-not-found-with-file-line-citations.html b/landing/answers/retrieval-that-says-not-found-with-file-line-citations.html
index 66036d3a7..30a77c0a3 100644
--- a/landing/answers/retrieval-that-says-not-found-with-file-line-citations.html
+++ b/landing/answers/retrieval-that-says-not-found-with-file-line-citations.html
@@ -16,7 +16,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Retrieval that cites file:line and says not found</title>
-<meta name="description" content="xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is issue #1786.">
+<meta name="description" content="xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is #1786.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
@@ -28,7 +28,7 @@
<meta property="og:site_name" content="XERJ.ai">
<meta property="og:type" content="article">
<meta property="og:title" content="Retrieval that cites file:line and says not found">
-<meta property="og:description" content="xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is issue #1786.">
+<meta property="og:description" content="xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is #1786.">
<meta property="og:url" content="https://xerj.org/answers/retrieval-that-says-not-found-with-file-line-citations">
<meta property="og:image" content="https://xerj.org/og/answers-retrieval-that-says-not-found-with-file-line-citations.png">
<meta property="og:image:width" content="1200">
@@ -37,7 +37,7 @@
<meta property="og:locale" content="en_US">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Retrieval that cites file:line and says not found">
-<meta name="twitter:description" content="xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is issue #1786.">
+<meta name="twitter:description" content="xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is #1786.">
<meta name="twitter:image" content="https://xerj.org/og/answers-retrieval-that-says-not-found-with-file-line-citations.png">
<script type="application/ld+json">
{
@@ -71,7 +71,7 @@
"@context": "https://schema.org",
"@type": "TechArticle",
"headline": "Retrieval that cites file:line and says not found",
- "description": "xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is issue #1786.",
+ "description": "xerj answers with file:line and exits 1 with no match when a symbol or corpus is missing. Free-text questions still return passages; confidence is #1786.",
"url": "https://xerj.org/answers/retrieval-that-says-not-found-with-file-line-citations",
"image": "https://xerj.org/og/answers-retrieval-that-says-not-found-with-file-line-citations.png",
"inLanguage": "en",
diff --git a/landing/answers/syntax-aware-code-search-refactoring.html b/landing/answers/syntax-aware-code-search-refactoring.html
index 53b4f759b..ca5de2062 100644
--- a/landing/answers/syntax-aware-code-search-refactoring.html
+++ b/landing/answers/syntax-aware-code-search-refactoring.html
@@ -76,7 +76,7 @@
"image": "https://xerj.org/og/xerj-card.png",
"inLanguage": "en",
"datePublished": "2026-08-21",
- "dateModified": "2026-10-19",
+ "dateModified": "2026-10-20",
"author": {
"@type": "Person",
"name": "XERJ documentation team"
@@ -155,9 +155,9 @@
<div class="breadcrumb"><a href="/">HOME</a><span class="sep">·</span><a href="/answers/">ANSWERS</a><span class="sep">·</span>HOW DO I RUN SYNTAX-AWARE CODE SEARCH?</div>
<div class="kicker"><span>ANSWERS · FILES AND FORMATS</span></div>
<h1>How do I run syntax-aware code search?</h1>
- <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-19</div>
+ <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-20</div>
<div class="prompt-card answer-first" id="short-answer">
- <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-19</span>
+ <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-20</span>
<p>Is there a syntax-aware code search tool for refactoring? XERJ gives you two code queries on one index: match on body for raw text, and match on defs for declared symbols, which returns a symbols array with kind, name and line. It extracts definitions only and rewrites nothing; for structural rewrites use ast-grep.</p>
<p class="key-fact"><strong>Key number:</strong> XERJ's tree-sitter registry covers 36 languages, pinned by a unit test. <span class="mute">(as of 2026-10-19 · source: <a href="https://github.com/xerj-org/xerj/blob/main/engine/crates/xerj-autoindex/src/extract/code.rs">engine/crates/xerj-autoindex/src/extract/code.rs</a>)</span></p>
</div>
@@ -214,6 +214,7 @@
<h2>The boundary for refactoring work</h2>
<p>XERJ extracts definitions only. There is no call graph, no import graph and no cross-file reference resolution, so XERJ does not find callers of a symbol.</p>
<p>That boundary decides the tool choice. Use XERJ to locate every declaration and every textual occurrence across 36 languages. Use a language server or a compiler plugin for a rename that must be sound.</p>
+ <p>What an agent reads, against the lines grep prints, is <a href="/answers/local-code-search-mcp-fewer-tokens-than-grep">local code search over MCP</a>.</p>
<h2>Caps and failure behavior</h2>
<p>Tree-sitter extraction stops at 2 MB per source file and 5,000 symbols per file, and a symbol name is truncated at 200 characters. A parse failure is never fatal. XERJ still indexes the file body as plain text, so the text query keeps working.</p>
<p>The capture ran on 1 single-node XERJ process over 3 source files in 3 languages. This run measured no large repository.</p>
diff --git a/landing/answers/syntax-aware-code-search-refactoring.md b/landing/answers/syntax-aware-code-search-refactoring.md
index 2847720eb..65e7762b4 100644
--- a/landing/answers/syntax-aware-code-search-refactoring.md
+++ b/landing/answers/syntax-aware-code-search-refactoring.md
@@ -2,13 +2,13 @@
---
title: "How do I run syntax-aware code search?"
canonical: "https://xerj.org/answers/syntax-aware-code-search-refactoring"
-updated: "2026-10-19"
+updated: "2026-10-20"
source: "content/answers/syntax-aware-code-search-refactoring.md"
---
# How do I run syntax-aware code search?
-**Short answer** (updated 2026-10-19): Is there a syntax-aware code search tool for refactoring? XERJ gives you two code queries on one index: match on body for raw text, and match on defs for declared symbols, which returns a symbols array with kind, name and line. It extracts definitions only and rewrites nothing; for structural rewrites use ast-grep.
+**Short answer** (updated 2026-10-20): Is there a syntax-aware code search tool for refactoring? XERJ gives you two code queries on one index: match on body for raw text, and match on defs for declared symbols, which returns a symbols array with kind, name and line. It extracts definitions only and rewrites nothing; for structural rewrites use ast-grep.
**Key number:** XERJ's tree-sitter registry covers 36 languages, pinned by a unit test. (as of 2026-10-19; source: [engine/crates/xerj-autoindex/src/extract/code.rs](https://github.com/xerj-org/xerj/blob/main/engine/crates/xerj-autoindex/src/extract/code.rs))
@@ -93,6 +93,8 @@ XERJ extracts definitions only. There is no call graph, no import graph and no c
That boundary decides the tool choice. Use XERJ to locate every declaration and every textual occurrence across 36 languages. Use a language server or a compiler plugin for a rename that must be sound.
+What an agent reads, against the lines grep prints, is [local code search over MCP](/answers/local-code-search-mcp-fewer-tokens-than-grep).
+
## Caps and failure behavior
Tree-sitter extraction stops at 2 MB per source file and 5,000 symbols per file, and a symbol name is truncated at 200 characters. A parse failure is never fatal. XERJ still indexes the file body as plain text, so the text query keeps working.
diff --git a/landing/benchmarks/index.html b/landing/benchmarks/index.html
index 3c2b75b7b..99a9a5c60 100644
--- a/landing/benchmarks/index.html
+++ b/landing/benchmarks/index.html
@@ -585,6 +585,8 @@
</ul>
</div>
</div>
+ <p class="src">The same idea on one repository, as bytes returned to the agent rather than a task matrix:
+ <a href="/answers/local-code-search-mcp-fewer-tokens-than-grep">local code search over MCP, versus grep</a>.</p>
</section>
<!-- ============================ ZTA ============================ -->
diff --git a/landing/blog/one-vulnerability-three-names.html b/landing/blog/one-vulnerability-three-names.html
index 49b0121a3..95e0c1f97 100644
--- a/landing/blog/one-vulnerability-three-names.html
+++ b/landing/blog/one-vulnerability-three-names.html
@@ -74,7 +74,7 @@
"image": "https://xerj.org/og/blog-one-vulnerability-three-names.png",
"inLanguage": "en",
"datePublished": "2026-09-27",
- "dateModified": "2026-09-27",
+ "dateModified": "2026-10-20",
"author": {
"@id": "https://xerj.org/#organization"
},
@@ -365,6 +365,9 @@ canonical_source_order = ["rustsec", "osv"]</pre>
your own machine than our key; that is a supported path, not a workaround. If your agent works
with Rust dependencies, point it at the pack and ask it the question a raw export cannot
answer: <em>which function is the vulnerable one?</em></p>
+
+ <p>Resolving a list of those CVE, GHSA and RUSTSEC ids against the signed pack, offline, is
+ <a href="/answers/batch-lookup-cve-ghsa-ids-offline">batch lookup of advisory ids</a>.</p>
</section>
</main>
diff --git a/landing/blog/the-corpus-hub.html b/landing/blog/the-corpus-hub.html
index de0dd7b32..7664e19a8 100644
--- a/landing/blog/the-corpus-hub.html
+++ b/landing/blog/the-corpus-hub.html
@@ -74,7 +74,7 @@
"image": "https://xerj.org/og/blog-the-corpus-hub.png",
"inLanguage": "en",
"datePublished": "2026-10-01",
- "dateModified": "2026-10-06",
+ "dateModified": "2026-10-20",
"author": {
"@id": "https://xerj.org/#organization"
},
@@ -345,6 +345,9 @@
half — a corpus you mount instead of indexing, so a consumer's CPU is not the price of entry.
Both tracked in the open. If you have a domain worth retrieving from — engine internals,
protocol specs, incident postmortems, hardware errata — the branch is open.</p>
+
+ <p>Asking one question of a pinned repository pack, without cloning it, is
+ <a href="/answers/ask-questions-about-a-github-repo-without-cloning">ask a GitHub repo without cloning</a>.</p>
</section>
</main>
<!-- seo:footer-begin — generated by scripts/seo/fix_links.py · do not hand-edit -->
diff --git a/landing/blog/the-exploit-hub.html b/landing/blog/the-exploit-hub.html
index 3ad4a4096..2c3aa898b 100644
--- a/landing/blog/the-exploit-hub.html
+++ b/landing/blog/the-exploit-hub.html
@@ -74,7 +74,7 @@
"image": "https://xerj.org/og/blog-the-exploit-hub.png",
"inLanguage": "en",
"datePublished": "2026-10-08",
- "dateModified": "2026-10-08",
+ "dateModified": "2026-10-20",
"author": {
"@id": "https://xerj.org/#organization"
},
@@ -325,6 +325,9 @@ gadget family: process.env, require.extensions, child_process
one line: Exploit-DB is GPL and PoC repositories carry their own terms, so the whole group is
<strong>approach-only</strong>, indexed for retrieval, never copied into XERJ and never
redistributed as a pack. Query it, cite it, write your own code.</p>
+
+ <p>Resolving many CVE and GHSA ids in one offline query, with the source on each hit, is a
+ separate walkthrough: <a href="/answers/batch-lookup-cve-ghsa-ids-offline">batch lookup of advisory ids</a>.</p>
</section>
<section class="scene-section">
diff --git a/landing/compare/index.html b/landing/compare/index.html
index d076d83f1..b6bc7bcf7 100644
--- a/landing/compare/index.html
+++ b/landing/compare/index.html
@@ -74,7 +74,7 @@
"url": "https://xerj.org/compare/",
"image": "https://xerj.org/og/xerj-card.png",
"inLanguage": "en",
- "dateModified": "2026-10-19",
+ "dateModified": "2026-10-20",
"isPartOf": {
"@id": "https://xerj.org/#website"
},
diff --git a/landing/compare/index.json b/landing/compare/index.json
index c675de27b..8534843a5 100644
--- a/landing/compare/index.json
+++ b/landing/compare/index.json
@@ -59,7 +59,7 @@
"canonical_url": "https://xerj.org/compare/xerj-vs-ripgrep-for-code-agents",
"markdown_url": "https://xerj.org/compare/xerj-vs-ripgrep-for-code-agents.md",
"cluster": "Comparison: code retrieval",
- "updated": "2026-10-19",
+ "updated": "2026-10-20",
"summary": "30 disclosed tasks on one 331-file code tree. The two tools agree on 18. ripgrep wins 5 named tasks outright, including a substring inside an identifier.",
"intent_group": "code search for agents",
"answer": "Is ripgrep enough for a coding agent, or do I need a code index? Keep ripgrep for one-off questions and add an index when an agent asks one tree many questions. On one 331-file tree the two named the same files on 18 of 30 disclosed tasks, and ripgrep 14.1.1 won 5 outright.",
@@ -75,7 +75,7 @@
"canonical_url": "https://xerj.org/compare/xerj-vs-ast-grep",
"markdown_url": "https://xerj.org/compare/xerj-vs-ast-grep.md",
"cluster": "Comparison: code retrieval",
- "updated": "2026-10-19",
+ "updated": "2026-10-20",
"summary": "ast-grep wins structural rewriting and XERJ does none of it. For an agent the honest recommendation is to install both and give each the job it was built for.",
"intent_group": "code search for agents",
"answer": "Should an agent use ast-grep or a code index? Use both. ast-grep matches and rewrites code by syntax pattern, and XERJ rewrites nothing. XERJ answers where a symbol is defined and what its contract says across a tree it already indexed. No head-to-head was run, and none is needed to split these jobs.",
diff --git a/landing/compare/xerj-vs-ast-grep.html b/landing/compare/xerj-vs-ast-grep.html
index 38ce4ab54..89084313e 100644
--- a/landing/compare/xerj-vs-ast-grep.html
+++ b/landing/compare/xerj-vs-ast-grep.html
@@ -76,7 +76,7 @@
"image": "https://xerj.org/og/xerj-card.png",
"inLanguage": "en",
"datePublished": "2026-08-22",
- "dateModified": "2026-10-19",
+ "dateModified": "2026-10-20",
"author": {
"@type": "Person",
"name": "XERJ documentation team"
@@ -155,9 +155,9 @@
<div class="breadcrumb"><a href="/">HOME</a><span class="sep">·</span><a href="/compare/">COMPARISONS</a><span class="sep">·</span>AST-GREP VS A CODE INDEX FOR AN AGENT?</div>
<div class="kicker"><span>COMPARE · COMPARISON: CODE RETRIEVAL</span></div>
<h1>ast-grep vs a code index for an agent?</h1>
- <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-22 · UPDATED · 2026-10-19</div>
+ <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-22 · UPDATED · 2026-10-20</div>
<div class="prompt-card answer-first" id="short-answer">
- <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-19</span>
+ <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-20</span>
<p>Should an agent use ast-grep or a code index? Use both. ast-grep matches and rewrites code by syntax pattern, and XERJ rewrites nothing. XERJ answers where a symbol is defined and what its contract says across a tree it already indexed. No head-to-head was run, and none is needed to split these jobs.</p>
<p class="key-fact"><strong>Key number:</strong> ast-grep has 16,288 GitHub stars and released 0.51.0 on 2026-10-15. <span class="mute">(as of 2026-10-19 · source: <a href="https://github.com/ast-grep/ast-grep">github.com/ast-grep/ast-grep</a>)</span></p>
</div>
@@ -226,6 +226,7 @@
<p>Choose the index when one tree answers many questions in a session. The build cost amortises and the per-query cost does not.</p>
<p>Choose it when the question is about symbols rather than bytes. One definition query then replaces a regular expression per language.</p>
<p>Choose it when an agent needs the answer as a cited passage. The same binary also holds agent memory and an MCP tool list.</p>
+ <p>What that returns, against the lines grep prints, is <a href="/answers/local-code-search-mcp-fewer-tokens-than-grep">local code search over MCP</a>.</p>
<h2>The limits you inherit with XERJ</h2>
<p>XERJ is single-node only. There is no data-plane replication and no failover, so one host is the whole deployment.</p>
<p>The server retains heap for every document it indexes, which is an open tracked defect. Indexing several large repositories into one long-lived node is the shape that grows it.</p>
diff --git a/landing/compare/xerj-vs-ast-grep.md b/landing/compare/xerj-vs-ast-grep.md
index bc61f9c26..07dab8165 100644
--- a/landing/compare/xerj-vs-ast-grep.md
+++ b/landing/compare/xerj-vs-ast-grep.md
@@ -2,13 +2,13 @@
---
title: "XERJ vs ast-grep — syntax search and an index"
canonical: "https://xerj.org/compare/xerj-vs-ast-grep"
-updated: "2026-10-19"
+updated: "2026-10-20"
source: "content/compare/xerj-vs-ast-grep.md"
---
# ast-grep vs a code index for an agent?
-**Short answer** (updated 2026-10-19): Should an agent use ast-grep or a code index? Use both. ast-grep matches and rewrites code by syntax pattern, and XERJ rewrites nothing. XERJ answers where a symbol is defined and what its contract says across a tree it already indexed. No head-to-head was run, and none is needed to split these jobs.
+**Short answer** (updated 2026-10-20): Should an agent use ast-grep or a code index? Use both. ast-grep matches and rewrites code by syntax pattern, and XERJ rewrites nothing. XERJ answers where a symbol is defined and what its contract says across a tree it already indexed. No head-to-head was run, and none is needed to split these jobs.
**Key number:** ast-grep has 16,288 GitHub stars and released 0.51.0 on 2026-10-15. (as of 2026-10-19; source: [github.com/ast-grep/ast-grep](https://github.com/ast-grep/ast-grep))
@@ -128,6 +128,8 @@ Choose it when the question is about symbols rather than bytes. One definition q
Choose it when an agent needs the answer as a cited passage. The same binary also holds agent memory and an MCP tool list.
+What that returns, against the lines grep prints, is [local code search over MCP](/answers/local-code-search-mcp-fewer-tokens-than-grep).
+
## The limits you inherit with XERJ
XERJ is single-node only. There is no data-plane replication and no failover, so one host is the whole deployment.
diff --git a/landing/compare/xerj-vs-ripgrep-for-code-agents.html b/landing/compare/xerj-vs-ripgrep-for-code-agents.html
index 5aa7af376..9e8a537bd 100644
--- a/landing/compare/xerj-vs-ripgrep-for-code-agents.html
+++ b/landing/compare/xerj-vs-ripgrep-for-code-agents.html
@@ -76,7 +76,7 @@
"image": "https://xerj.org/og/xerj-card.png",
"inLanguage": "en",
"datePublished": "2026-08-21",
- "dateModified": "2026-10-19",
+ "dateModified": "2026-10-20",
"author": {
"@type": "Person",
"name": "XERJ documentation team"
@@ -155,9 +155,9 @@
<div class="breadcrumb"><a href="/">HOME</a><span class="sep">·</span><a href="/compare/">COMPARISONS</a><span class="sep">·</span>IS RIPGREP ENOUGH FOR A CODING AGENT, OR DO I NEED A CODE INDEX?</div>
<div class="kicker"><span>COMPARE · COMPARISON: CODE RETRIEVAL</span></div>
<h1>Is ripgrep enough for a coding agent, or do I need a code index?</h1>
- <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-19</div>
+ <div class="source-note">AUTHOR · XERJ documentation team · REVIEWED BY · XERJ engineering team · PUBLISHED · 2026-08-21 · UPDATED · 2026-10-20</div>
<div class="prompt-card answer-first" id="short-answer">
- <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-19</span>
+ <span class="prompt-label">SHORT ANSWER · UPDATED 2026-10-20</span>
<p>Is ripgrep enough for a coding agent, or do I need a code index? Keep ripgrep for one-off questions and add an index when an agent asks one tree many questions. On one 331-file tree the two named the same files on 18 of 30 disclosed tasks, and ripgrep 14.1.1 won 5 outright.</p>
<p class="key-fact"><strong>Key number:</strong> ripgrep has 69,257 GitHub stars and its latest release is 15.2.0 (2026-07-15); the 30-task run used 14.1.1. <span class="mute">(as of 2026-10-19 · source: <a href="https://github.com/BurntSushi/ripgrep">github.com/BurntSushi/ripgrep</a>)</span></p>
</div>
@@ -271,6 +271,7 @@ T28 ripgrep-only: xerj-api/tests/sq8_codes_follow_document_updates.rs, xerj-comm
<h2>When the index is worth its cost</h2>
<p>Choose the index when an agent asks one tree many questions per session. Choose it when the questions are about symbols rather than bytes. One <code class="inline">defs</code> query replaces a per-language regular expression and covers 36 languages.</p>
<p>Choose the index when you want structure alongside text. The index carries <code class="inline">language</code>, <code class="inline">symbol_count</code>, aggregations and <code class="inline">_source</code> narrowing. ripgrep returns lines, and lines are all it returns.</p>
+ <p>A pinned public repository you have not checked out is <a href="/answers/ask-questions-about-a-github-repo-without-cloning">ask without cloning</a>.</p>
<h2>The limits you inherit either way</h2>
<p>XERJ is single-node here and everywhere. There is no replication and no failover, so the index is exactly as durable as the 1 host it lives on.</p>
<p>Extraction is definitions only, with no call graph and no cross-file reference resolution. XERJ never reports who calls a function, and neither does ripgrep.</p>
diff --git a/landing/compare/xerj-vs-ripgrep-for-code-agents.md b/landing/compare/xerj-vs-ripgrep-for-code-agents.md
index fe7d430f1..c937f8a71 100644
--- a/landing/compare/xerj-vs-ripgrep-for-code-agents.md
+++ b/landing/compare/xerj-vs-ripgrep-for-code-agents.md
@@ -2,13 +2,13 @@
---
title: "ripgrep vs a code index for coding agents: 30 tasks"
canonical: "https://xerj.org/compare/xerj-vs-ripgrep-for-code-agents"
-updated: "2026-10-19"
+updated: "2026-10-20"
source: "content/compare/xerj-vs-ripgrep-for-code-agents.md"
---
# Is ripgrep enough for a coding agent, or do I need a code index?
-**Short answer** (updated 2026-10-19): Is ripgrep enough for a coding agent, or do I need a code index? Keep ripgrep for one-off questions and add an index when an agent asks one tree many questions. On one 331-file tree the two named the same files on 18 of 30 disclosed tasks, and ripgrep 14.1.1 won 5 outright.
+**Short answer** (updated 2026-10-20): Is ripgrep enough for a coding agent, or do I need a code index? Keep ripgrep for one-off questions and add an index when an agent asks one tree many questions. On one 331-file tree the two named the same files on 18 of 30 disclosed tasks, and ripgrep 14.1.1 won 5 outright.
**Key number:** ripgrep has 69,257 GitHub stars and its latest release is 15.2.0 (2026-07-15); the 30-task run used 14.1.1. (as of 2026-10-19; source: [github.com/BurntSushi/ripgrep](https://github.com/BurntSushi/ripgrep))
@@ -171,6 +171,8 @@ Choose the index when an agent asks one tree many questions per session. Choose
Choose the index when you want structure alongside text. The index carries `language`, `symbol_count`, aggregations and `_source` narrowing. ripgrep returns lines, and lines are all it returns.
+A pinned public repository you have not checked out is [ask without cloning](/answers/ask-questions-about-a-github-repo-without-cloning).
+
## The limits you inherit either way
XERJ is single-node here and everywhere. There is no replication and no failover, so the index is exactly as durable as the 1 host it lives on.
diff --git a/landing/sitemap.xml b/landing/sitemap.xml
index 145aa5717..88aeb851c 100644
--- a/landing/sitemap.xml
+++ b/landing/sitemap.xml
@@ -6,11 +6,11 @@
</url>
<url>
<loc>https://xerj.org/agent-search/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-18</lastmod>
</url>
<url>
<loc>https://xerj.org/aise-demo</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-23</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/</loc>
@@ -18,7 +18,7 @@
</url>
<url>
<loc>https://xerj.org/answers/agent-memory-without-postgres-qdrant</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/ask-questions-about-a-github-repo-without-cloning</loc>
@@ -26,23 +26,23 @@
</url>
<url>
<loc>https://xerj.org/answers/audit-php-codebase-with-an-index</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/autoindex-dataset-refused-by-server</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/autoindex-exit-codes</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/autoindex-says-extract-the-archive-first</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/autoindex-server-back-pressure-429</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/batch-lookup-cve-ghsa-ids-offline</loc>
@@ -50,19 +50,19 @@
</url>
<url>
<loc>https://xerj.org/answers/catalog-files-with-autoindex-map</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/cheap-low-volume-log-search</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/check-codebase-index-is-complete</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/classify-text-from-labelled-history-without-llm</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/code-search-mcp-for-claude-code</loc>
@@ -70,19 +70,19 @@
</url>
<url>
<loc>https://xerj.org/answers/coding-agent-memory-across-sessions</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/do-search-embeddings-help</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/does-xerj-support-s3-alerting-plugins</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/estimate-autoindex-time-before-running</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/evidence-for-agent-memory-links</loc>
@@ -90,11 +90,11 @@
</url>
<url>
<loc>https://xerj.org/answers/filter-knn-exact-scan-caveat</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/full-text-search-browser-history</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/full-text-search-over-jsonl-files-cli</loc>
@@ -102,35 +102,35 @@
</url>
<url>
<loc>https://xerj.org/answers/full-text-search-sqlite-database</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/give-chatgpt-claude-local-file-access</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/how-xerj-autoindexes-a-folder</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/how-xerj-combines-search</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/hybrid-search-quality-measured-ndcg</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/improve-basic-faiss-rag-pipeline</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/index-csv-with-many-columns</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/index-markdown-into-elasticsearch-api</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/index-monorepo-for-agent</loc>
@@ -138,7 +138,7 @@
</url>
<url>
<loc>https://xerj.org/answers/index-multiple-csv-files</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/index-reference-library-for-coding-agent</loc>
@@ -146,19 +146,19 @@
</url>
<url>
<loc>https://xerj.org/answers/is-pdf-indexing-efficient</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/keep-index-current-as-files-change</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/keep-s3-bucket-index-current</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/knowledge-graphs-for-agent-memory</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/local-code-search-mcp-fewer-tokens-than-grep</loc>
@@ -166,7 +166,7 @@
</url>
<url>
<loc>https://xerj.org/answers/local-embeddings-without-openai-api</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/mcp-api-search-or-vector-search</loc>
@@ -174,47 +174,47 @@
</url>
<url>
<loc>https://xerj.org/answers/notion-export-duplicate-search-results</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/private-agent-memory-namespaces</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/rag-without-vector-database</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/read-autoindex-progress</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/read-indexed-email-and-pdf-folder</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/rebuild-reference-corpus-index</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/reciprocal-rank-fusion-when-to-use</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/reduce-embedding-api-cost</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/reindex-taking-forever</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/rerank-search-results-calibrated-judge</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/resume-interrupted-autoindex-run</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/retrieval-that-says-not-found-with-file-line-citations</loc>
@@ -222,51 +222,51 @@
</url>
<url>
<loc>https://xerj.org/answers/search-all-pdfs-in-a-folder</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-bvh-motion-capture-files</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-confluence-html-export</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-engine-without-docker</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-file-contents-in-a-folder</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-files-in-an-s3-bucket</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-gmail-takeout-mbox-locally</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-gzip-logs-without-zgrep</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-gzipped-csv-or-json</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-html-export</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-21</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-json-and-jsonl-logs</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-jupyter-notebook-cells</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-kubernetes-pod-logs-on-disk</loc>
@@ -274,11 +274,11 @@
</url>
<url>
<loc>https://xerj.org/answers/search-obsidian-pdf-docx-attachments</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-openapi-spec-for-agent</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-slack-json-export</loc>
@@ -286,19 +286,19 @@
</url>
<url>
<loc>https://xerj.org/answers/search-sql-dump-file</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-unity-project-assets</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-word-documents-in-a-folder</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-yaml-xml-config-repository</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/search-zendesk-ticket-json-export</loc>
@@ -306,19 +306,19 @@
</url>
<url>
<loc>https://xerj.org/answers/set-mcp-memory-storage-path</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/share-folder-read-only-search-without-uploading</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/share-local-search-index-through-a-tunnel</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/store-agent-memory-without-llm-call</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/syntax-aware-code-search-refactoring</loc>
@@ -326,23 +326,23 @@
</url>
<url>
<loc>https://xerj.org/answers/vector-database-vs-full-text-search</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/what-a-share-link-guest-can-reach</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/what-is-xerj</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/answers/why-autoindex-skipped-files</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/architecture/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/benchmarks/</loc>
@@ -350,31 +350,31 @@
</url>
<url>
<loc>https://xerj.org/benchmarks/elasticsearch</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/blog/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-30</lastmod>
</url>
<url>
<loc>https://xerj.org/blog/corpus-hub-v2</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/blog/cutting-the-index-28-percent</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-27</lastmod>
</url>
<url>
<loc>https://xerj.org/blog/does-xerj-beat-jev</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-27</lastmod>
</url>
<url>
<loc>https://xerj.org/blog/eval-scars-from-agent-memory</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-11</lastmod>
</url>
<url>
<loc>https://xerj.org/blog/jev-vs-a-bm25-vote</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-27</lastmod>
</url>
<url>
<loc>https://xerj.org/blog/one-vulnerability-three-names</loc>
@@ -390,35 +390,35 @@
</url>
<url>
<loc>https://xerj.org/blog/the-rc80-gates</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-30</lastmod>
</url>
<url>
<loc>https://xerj.org/brand</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/case-studies</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/case-studies/calltree-analytics</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/case-studies/daily-dev-postgres-cdc</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/case-studies/reference-coding</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/case-studies/wordpress-security-audit</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/case-studies/xerj-self-audit</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/</loc>
@@ -446,43 +446,43 @@
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-docfetcher</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-elasticsearch-local</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-houdahspot</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-khoj</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-localsynapse</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-meilisearch</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-obsidian-omnisearch</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-pagefind</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-recoll</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-ripgrep-all</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-ripgrep-for-code-agents</loc>
@@ -490,294 +490,294 @@
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-spotlight</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-typesense</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-vector-database</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/compare/xerj-vs-web-agent-search</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-23</lastmod>
</url>
<url>
<loc>https://xerj.org/demo/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-17</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/agents/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/agents/endpoints</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/agents/quickstart</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/aggregations</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/analyzers</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/api-es-compat</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-19</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/api-native</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/backup-restore</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/cli</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/clustering</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/compression</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/config</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-19</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/corpus-hub</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-01</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/env</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-18</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/ingest</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/install</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/metrics</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-18</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/migration-from-es</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/operations</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/playbooks/full-text</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/playbooks/log-analytics</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/playbooks/observability</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/playbooks/siem</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/playbooks/vector-search</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/queries</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/quickstart</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/agentic-memory</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/air-gapped-deployment</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-19</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/anomaly-detection</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/continuous-anomaly-datafeeds</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/document-folder-index</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/hybrid-search</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/log-analytics</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/migrate-from-elasticsearch</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/passage-retrieval</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/semantic-search-rag</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/vector-quantization</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/vector-search-knn</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/recipes/zero-config-autoindex</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/security</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/storage</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/troubleshooting</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/upgrades</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/docs/vectors</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-09-08</lastmod>
</url>
<url>
<loc>https://xerj.org/for-agents</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-10-19</lastmod>
</url>
<url>
<loc>https://xerj.org/industries/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/industries/finserv</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/industries/healthcare</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/industries/public-sector</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/industries/retail</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/playground</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/pricing/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/product</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/resources/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/security/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/solutions/</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/use-cases</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/use-cases/ai-search-retrieval</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/use-cases/code-security-audit</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/use-cases/elasticsearch-replacement</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/use-cases/operational-intelligence</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/use-cases/second-brain</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/use-cases/security-analytics</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/use-cases/semantic-analytics</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/use-cases/unified-observability</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
<url>
<loc>https://xerj.org/use-cases/zero-token-ai-search</loc>
- <lastmod>2026-10-20</lastmod>
+ <lastmod>2026-08-30</lastmod>
</url>
</urlset>
diff --git a/scripts/seo/README.md b/scripts/seo/README.md
index 3bfdba6ee..a4375ec47 100644
--- a/scripts/seo/README.md
+++ b/scripts/seo/README.md
@@ -468,7 +468,13 @@ The file is a **derivation**, not a document:
minus any article whose frontmatter sets `noindex: true`;
* `<loc>` = `urlmap.deployed_url(file)` — absolute, https, extensionless,
byte-identical to that page's canonical and `og:url`;
-* `<lastmod>` = `git log -1 --format=%cs -- <file>`;
+* `<lastmod>` = the page's content date (`DateSource.page_lastmod`): article
+ `updated:` front matter, else JSON-LD `dateModified`, else a `pagedata.py`
+ `updated`, else — on a full clone — the last commit that changed more than
+ shared chrome (`<head>`, the primary nav, the generated footer). A shallow
+ checkout keeps the `<lastmod>` already committed for that URL, and only a
+ URL missing from the file falls back to mtime. `git log -1` of the HTML
+ file is not the date: a sitewide head commit would stamp every URL today;
* **no `<priority>`, no `<changefreq>`.** Google ignores both; Bing stated in
July 2025 that both are ignored and influence nothing. Emitting them is noise;
* **no non-HTML assets.** A `.txt` or `.json` URL produces no search result.
@@ -481,16 +487,19 @@ The file is a **derivation**, not a document:
2. `<lastmod>` is the reason. Google uses `lastmod` only "if it's consistently
and verifiably accurate", and the judgement is **sitewide**: one page whose
`lastmod` drifts from reality teaches the crawler to ignore the field for
- every page. Deriving it from `git log` makes it verifiable by construction.
- The predecessor of this file was hand-maintained — 24 entries for an 80-page
- site, 18 of which were URLs that 308-redirected rather than pages, four of
- which were non-HTML assets, and all 24 carrying a `lastmod` that disagreed
- with git. That is the failure this script exists to prevent.
-
-When git cannot answer (uncommitted file, shallow clone, no git), the tool falls
-back to the filesystem mtime and prints `WARNING: <lastmod> fell back to
-filesystem mtime` on stderr. In CI that warning means the checkout is wrong —
-see trap 3.
+ every page. The date is the content date above, which is checkable from the
+ source front matter, the page's own `dateModified`, or `git log` of a
+ content change. The predecessor of this file was hand-maintained — 24
+ entries for an 80-page site, 18 of which were URLs that 308-redirected
+ rather than pages, four of which were non-HTML assets, and all 24 carrying
+ a `lastmod` that disagreed with git. That is the failure this script exists
+ to prevent.
+
+When none of the content dates apply and git cannot answer (uncommitted file,
+shallow clone, no git), the tool keeps the `<lastmod>` already committed for
+that URL. Only a URL that is not in the file yet falls back to the filesystem
+mtime, and that prints `WARNING: <lastmod> fell back to filesystem mtime` on
+stderr. A shallow checkout no longer restamps the whole sitemap to today.
---
@@ -623,37 +632,34 @@ to it.
### 2. `dateModified` comes from git, so the first commit is never the last one
Since #974 an article's `dateModified` comes from its **required `updated:`
-frontmatter field** — author-controlled data, immune to the loop below. What
-still comes from `git log -1 --format=%cs -- <file>` (`urlmap.DateSource`) is
-the sitemap's `<lastmod>`, which dates the *generated* HTML file itself. That
-is deliberate: it is the condition Google states for trusting the field. It
-also means:
-
-```
-edit source -> build (date = today's mtime fallback) -> commit
- -> the source's git date is now the commit date
- -> build again: the generated output changes
- -> commit again -> now it converges
-```
-
-**It converges in exactly one extra round.** The loop is: commit your work, then
-immediately re-run `build_articles.py --write` and `gen_sitemap.py --write`, and
-`--amend` (or add) the resulting diff. After that, re-running the generators
-produces a zero diff, because the second commit does not change the *source*
-file's date — only the generated file's, and the generated file's own date is
-not an input.
-
-The stderr warning `WARNING: <lastmod> fell back to filesystem mtime` is the
-signal that a file is not committed yet. It is expected locally on new work and
-is a bug in CI.
+frontmatter field** — author-controlled data, immune to the loop below. The
+sitemap's `<lastmod>` uses that same field for a generated article (then the
+page's JSON-LD `dateModified`, then a pinned `pagedata.py` date). It does
+**not** use `git log -1` of the generated HTML: a sitewide head commit, and a
+shallow checkout whose files all share today's mtime, stamped every URL with
+one day. `git log` is only the fallback for a hand-written page that publishes
+no date, and only for a commit that changed more than shared chrome. That
+also means a hand-written page with no pinned date still moves `<lastmod>`
+when you commit a body edit, because that commit is now the content change.
+Re-run `gen_sitemap.py --write` after the commit (and amend, or add a
+follow-up commit) so `--check` sees the same day. A generated article does
+not: its date is `updated:`, and regenerating the HTML does not change it.
+
+The stderr warning `WARNING: <lastmod> fell back to filesystem mtime` means a
+URL had no in-file date, no usable git history, and no committed sitemap
+entry. It is expected for a brand-new untracked page and is a bug in CI if it
+fires for a page that is already in `sitemap.xml`.
### 3. CI needs `fetch-depth: 0`
-`actions/checkout` defaults to a shallow clone with no tags. On a shallow clone
-`git log -1 -- <file>` returns nothing for most files, every date degrades to the
-filesystem mtime, generated output no longer matches the committed output, and
-`fix_heads.py --check` fails — with an error that looks like a content problem
-and is not. `landing-constants-guard.sh` fails differently on the same cause: it
+`actions/checkout` defaults to a shallow clone with no tags. Sitemap
+`<lastmod>` does not require that full history for a page that carries
+`updated:` or `dateModified`: those dates are in the checkout. A page with
+neither keeps the `<lastmod>` already committed, so a shallow
+`gen_sitemap.py --check` does not restamp the file to today.
+`fix_heads.py` can still move a date that is computed from `git log` when the
+page has no pinned date and no JSON-LD date to keep, and
+`landing-constants-guard.sh` fails differently on the same cause: it
resolves "newest released tag" through `git tag --list`, which a shallow checkout
does not fetch. Both `seo.yml` and the `landing-constants-guard` job in `ci.yml`
already set `fetch-depth: 0`. Any new workflow that touches this toolchain must
diff --git a/scripts/seo/audit.py b/scripts/seo/audit.py
index 49bcda439..5ce0c10c3 100755
--- a/scripts/seo/audit.py
+++ b/scripts/seo/audit.py
@@ -27,7 +27,7 @@ markup is the source of truth):
and the "partial set" case (worse than none)
4. structured — JSON-LD presence, JSON validity, @context/@type
5. sitemap — disk-vs-sitemap both ways, URL form mismatches,
- <lastmod> vs the file's real last-change date
+ <lastmod> vs the page's content date
6. headings — missing/multiple H1, skipped levels, empty headings
7. links — broken internal links, orphan pages, click depth from
the homepage, .html links that shadow a directory index
@@ -43,10 +43,10 @@ Design notes
------------
* Stdlib only (html.parser, urllib.parse, xml.etree, json, subprocess). No
network access: every check is answerable from the working tree.
-* `git log -1 --format=%cs -- <file>` supplies the real last-change date for
- the <lastmod> comparison. Some checkouts in this workspace have broken git
- metadata; when git fails the script falls back to filesystem mtime and says
- so, in the report and in the JSON (`meta.date_source`).
+* `<lastmod>` is compared to `urlmap.DateSource.page_lastmod` (article
+ `updated`, JSON-LD `dateModified`, a pinned `pagedata` date, then a
+ chrome-stripped git date). A shallow checkout keeps the committed sitemap
+ value instead of the filesystem mtime. `meta.date_source` is `content-date`.
* Nothing is written to the site. This tool measures; it never fixes.
"""
@@ -124,7 +124,7 @@ CHECKS: dict[str, tuple[str, str]] = {
"sitemap.dead_url": ("critical", "sitemap.xml URL resolves to no file on disk"),
"sitemap.markdown": ("critical", "sitemap.xml advertises an alternate Markdown twin"),
"sitemap.form_mismatch": ("medium", "sitemap URL form differs from the canonical deployed form"),
- "sitemap.stale_lastmod": ("low", "<lastmod> disagrees with the file's real last-change date"),
+ "sitemap.stale_lastmod": ("low", "<lastmod> disagrees with the page's content date"),
"h1.missing": ("high", "page has no <h1>"),
"h1.multiple": ("medium", "more than one <h1>"),
"heading.skip": ("medium", "heading level skipped (e.g. h2 → h4)"),
@@ -553,34 +553,19 @@ class Audit:
# -- git / mtime dates
def last_change_date(self, page_path: str) -> str | None:
- if self.date_source == "git":
- try:
- out = subprocess.run(
- ["git", "log", "-1", "--format=%cs", "--", page_path],
- cwd=self.root, capture_output=True, text=True, timeout=20,
- )
- if out.returncode == 0:
- val = out.stdout.strip()
- if val:
- return val
- return None # file exists but is untracked/uncommitted
- self.date_source = "mtime"
- self.notes.append(
- "git is unusable in this checkout ("
- + (out.stderr.strip().splitlines() or ["no stderr"])[0]
- + "); <lastmod> is compared against filesystem mtime instead"
- )
- except (OSError, subprocess.SubprocessError) as exc:
- self.date_source = "mtime"
- self.notes.append(
- f"git is unusable in this checkout ({exc}); "
- "<lastmod> is compared against filesystem mtime instead"
- )
- import datetime
- p = self.root / page_path
- if not p.exists():
+ # Same content date gen_sitemap writes, so a sitewide head commit
+ # does not look like every page changed today.
+ if getattr(self, "_content_dates", None) is None:
+ import urlmap
+ self._content_dates = urlmap.DateSource(urlmap.repo_root())
+ self._content_prior = self._content_dates.committed_lastmods(
+ self.root / "sitemap.xml")
+ self.date_source = "content-date"
+ try:
+ return self._content_dates.page_lastmod(
+ page_path, self.root / page_path, self._content_prior)
+ except OSError:
return None
- return datetime.date.fromtimestamp(p.stat().st_mtime).isoformat()
# ── checks ──────────────────────────────────────────────────────────
def run(self):
diff --git a/scripts/seo/gen_sitemap.py b/scripts/seo/gen_sitemap.py
index 4d7bc353d..79c69bd8a 100755
--- a/scripts/seo/gen_sitemap.py
+++ b/scripts/seo/gen_sitemap.py
@@ -11,12 +11,17 @@ This script replaces that with a derivation:
* one `<url>` per HTML file under `landing/`, minus `urlmap.SITEMAP_EXCLUDE`;
* `<loc>` = `urlmap.deployed_url(file)` — absolute, https, extensionless,
byte-identical to that page's `<link rel="canonical">` and `og:url`;
- * `<lastmod>` = `git log -1 --format=%cs -- <file>`, i.e. the file's real
- last commit date, so the value is verifiable by construction. Google only
- uses lastmod "if it's consistently and verifiably ... accurate"; a wrong
- lastmod is worse than none because it burns the field's credibility
- sitewide. When git cannot answer, the filesystem mtime is used and the
- substitution is printed loudly on stderr.
+ * `<lastmod>` is the page's content date, not `git log -1` of the HTML.
+ A sitewide head or nav commit (the GA4 tag is one) otherwise stamps every
+ URL with one day, and a shallow checkout does the same via mtime. Google
+ only uses lastmod "if it's consistently and verifiably ... accurate"; a
+ wrong lastmod is worse than none because it burns the field's credibility
+ sitewide. Order, in `urlmap.DateSource.page_lastmod`: article `updated:`
+ front matter, then JSON-LD `dateModified`, then a `pagedata.py` `updated`,
+ then (full history only) the last commit that changed more than shared
+ chrome, then the `<lastmod>` already committed for that URL, then mtime.
+ The committed-sitemap step is what keeps a shallow regen from rewriting
+ every undated URL to today. Substitutions are printed on stderr.
* **no `<priority>`, no `<changefreq>`.** Google: "Google ignores
<priority> and <changefreq> values." Bing (July 2025): both "are ignored
by Bing and do not influence how your content is crawled or ranked."
@@ -49,11 +54,13 @@ MAX_BYTES = 50_000_000
def build(root: pathlib.Path, dates: urlmap.DateSource) -> str:
+ prior = dates.committed_lastmods(root / "sitemap.xml")
rows: list[tuple[str, str]] = []
for rel in urlmap.iter_pages(root):
if not urlmap.in_sitemap(rel):
continue
- rows.append((urlmap.deployed_url(rel), dates.last_modified(root / rel)))
+ rows.append((urlmap.deployed_url(rel),
+ dates.page_lastmod(rel, root / rel, prior)))
rows.sort()
# UTC, like the dates themselves: dt.date.today() is the runner's local
@@ -109,12 +116,20 @@ def main(argv: list[str] | None = None) -> int:
dates = urlmap.DateSource(urlmap.repo_root())
if not dates.git_ok:
print("WARNING: git history is unavailable or shallow — "
- "every <lastmod> below falls back "
- "to the filesystem mtime, which Google will not be able to verify",
+ "pages with no in-file content date keep the committed "
+ "<lastmod>, and only URLs missing from that file fall back "
+ "to the filesystem mtime",
file=sys.stderr)
xml = build(root, dates)
+ if dates.prior_used:
+ print(f"NOTE: <lastmod> kept the committed sitemap value for "
+ f"{len(dates.prior_used)} URL(s) with no in-file content date "
+ f"and no full git history", file=sys.stderr)
+ for p in dates.prior_used:
+ print(f" committed-sitemap {p}", file=sys.stderr)
+
if dates.fallbacks:
print(f"WARNING: <lastmod> fell back to filesystem mtime for "
f"{len(dates.fallbacks)} file(s):", file=sys.stderr)
diff --git a/scripts/seo/pagedata.py b/scripts/seo/pagedata.py
index 60482fbd0..86cd0f485 100755
--- a/scripts/seo/pagedata.py
+++ b/scripts/seo/pagedata.py
@@ -140,7 +140,9 @@ PAGES: dict[str, dict[str, str]] = {
label="One vulnerability, three names", kind="article",
title="One vulnerability, three names — and a pack we sign",
description="The same Rust vulnerability arrives as RUSTSEC, GHSA and CVE. We collapsed 4,107 advisories to 1,950 identity-resolved records, packed them, and signed the pack — because no vulnerability database we surveyed does.",
- published="2026-09-27", updated="2026-09-27",
+ published="2026-09-27",
+ # 2026-10-20: one in-body link to the offline advisory-id lookup.
+ updated="2026-10-20",
og_image="og/blog-one-vulnerability-three-names.png",
og_image_alt="Cover: “One vulnerability, three names” in display type beside the post’s square-matrix art, labelled with its figures. The art: three outlined boxes trailing lines of small squares that converge on one square-matrix disc with a yellow seal at its centre",
),
@@ -165,7 +167,9 @@ PAGES: dict[str, dict[str, str]] = {
label="The Corpus Hub", kind="article",
title="The Corpus Hub: pinned, licenced, signed, contributed by PR",
description="A public registry of corpora for AI agents: reference code pinned to SHAs, record packs ed25519-signed, every source licence-reviewed by a human. The measured use case (2.7× fewer output tokens), the tie we published anyway, and how to contribute yours by PR.",
- published="2026-10-01", updated="2026-10-01",
+ published="2026-10-01",
+ # 2026-10-20: one in-body link to asking a pinned repo without cloning.
+ updated="2026-10-20",
og_image="og/blog-the-corpus-hub.png",
og_image_alt="Cover: “The Corpus Hub” in display type beside the post’s square-matrix art, labelled with its figures. The art: a 10 by 10 wall of square-matrix pack tiles in shades of ink, the first four solid yellow and the fifth framed",
),
@@ -196,7 +200,9 @@ PAGES: dict[str, dict[str, str]] = {
label="The exploit hub", kind="article",
title="The exploit hub, tested on three fresh CVEs",
description="We ran the exploit corpus against three CVEs it had never seen: one query named the exact route and field for one, an in-corpus 2026 exploit named the exact denylist segments the vendor shipped for another, and the third proved the corpus adds nothing when its stratum is empty. Losses included.",
- published="2026-10-08", updated="2026-10-08",
+ published="2026-10-08",
+ # 2026-10-20: one in-body link to offline CVE/GHSA id lookup.
+ updated="2026-10-20",
og_image="og/blog-the-exploit-hub.png",
og_image_alt="Cover: “The exploit hub, tested on three fresh CVEs” in display type beside the post’s square-matrix art, labelled with its figures. The art: a network of small square nodes; a yellow hub linked to 36 yellow nodes, an ink node with one link, and an empty square frame with none",
),
diff --git a/scripts/seo/test_urlmap.py b/scripts/seo/test_urlmap.py
index 2abd2d620..45bcb6541 100644
--- a/scripts/seo/test_urlmap.py
+++ b/scripts/seo/test_urlmap.py
@@ -70,6 +70,73 @@ class DateSourceTests(unittest.TestCase):
self.assertEqual(dates.last_modified(self.page), dates._mtime_date(self.page))
self.assertEqual(dates.fallbacks, [str(self.page)])
+ def test_head_only_commit_does_not_move_content_date(self):
+ self.page.write_text(
+ "<html><head><title>a</title></head><body><p>alpha</p></body></html>",
+ encoding="utf-8")
+ self.commit("body", "2020-05-05T12:00:00+00:00")
+ self.page.write_text(
+ "<html><head><title>a</title><script>ga4</script></head>"
+ "<body><p>alpha</p></body></html>",
+ encoding="utf-8")
+ self.commit("head only", "2021-07-08T12:00:00+00:00")
+ dates = urlmap.DateSource(self.repo)
+ self.assertEqual(
+ dates.page_lastmod("page.html", self.page, {"https://xerj.org/page": "1999-01-01"}),
+ "2020-05-05")
+ self.assertEqual(dates.prior_used, [])
+
+ def test_source_updated_beats_later_html_commit(self):
+ html = self.repo / "answers" / "demo.html"
+ html.parent.mkdir()
+ html.write_text("<html><body><p>page</p></body></html>", encoding="utf-8")
+ self.commit("html", "2020-01-02T12:00:00+00:00")
+ source = self.repo / "content" / "answers" / "demo.md"
+ source.parent.mkdir(parents=True)
+ source.write_text('updated: "2016-04-05"\n', encoding="utf-8")
+ dates = urlmap.DateSource(self.repo)
+ self.assertEqual(dates.page_lastmod("answers/demo.html", html, {}), "2016-04-05")
+
+ def test_jsonld_date_survives_shallow_clone(self):
+ self.page.write_text(
+ '<html><head></head><body>'
+ '<script type="application/ld+json">{"dateModified": "2018-02-03"}</script>'
+ "<p>alpha</p></body></html>",
+ encoding="utf-8")
+ self.commit("jsonld", "2021-03-04T12:00:00+00:00")
+ shallow = self.root / "shallow-jsonld"
+ self.git("clone", "--depth", "1", self.repo.as_uri(), str(shallow))
+ page = shallow / "page.html"
+ dates = urlmap.DateSource(shallow)
+ self.assertFalse(dates.git_ok)
+ self.assertEqual(dates.page_lastmod("page.html", page, {}), "2018-02-03")
+ self.assertEqual(dates.fallbacks, [])
+
+ def test_shallow_keeps_committed_sitemap_lastmod(self):
+ shallow = self.root / "shallow-prior"
+ self.git("clone", "--depth", "1", self.repo.as_uri(), str(shallow))
+ page = shallow / "page.html"
+ stamp = dt.datetime(2022, 5, 6, 12, tzinfo=dt.timezone.utc).timestamp()
+ os.utime(page, (stamp, stamp))
+ loc = urlmap.deployed_url("page.html")
+ sitemap = shallow / "sitemap.xml"
+ sitemap.write_text(
+ '<?xml version="1.0" encoding="UTF-8"?>\n'
+ '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n'
+ " <url>\n"
+ f" <loc>{loc}</loc>\n"
+ " <lastmod>2017-11-11</lastmod>\n"
+ " </url>\n"
+ "</urlset>\n",
+ encoding="utf-8")
+ dates = urlmap.DateSource(shallow)
+ prior = dates.committed_lastmods(sitemap)
+ self.assertEqual(dates.page_lastmod("page.html", page, prior), "2017-11-11")
+ self.assertEqual(dates.prior_used, ["page.html"])
+ self.assertEqual(dates.fallbacks, [])
+ built = ET.fromstring(gen_sitemap.build(shallow, dates))
+ self.assertEqual(built.findtext(".//{*}lastmod"), "2017-11-11")
+
if __name__ == "__main__":
unittest.main()
diff --git a/scripts/seo/urlmap.py b/scripts/seo/urlmap.py
index 0675d6316..f8869a454 100755
--- a/scripts/seo/urlmap.py
+++ b/scripts/seo/urlmap.py
@@ -274,20 +274,60 @@ def is_noindex(rel: str) -> bool:
# ── git-derived dates ───────────────────────────────────────────────────────
+# Chrome that a sitewide commit rewrites without changing the page's content.
+# Stripped before a git date is treated as a content change: the GA4 tag lives
+# in <head>, the hub/social icons live in the primary nav, and fix_links owns
+# the footer block. A lastmod taken from `git log -1` on the HTML file moves
+# every URL on the day any of those land.
+_CHROME_RES = (
+ re.compile(r"<head\b[^>]*>.*?</head>", re.I | re.S),
+ re.compile(r'<nav\b[^>]*\baria-label="Primary"[^>]*>.*?</nav>', re.I | re.S),
+ re.compile(r"<!-- seo:footer-begin.*?<!-- seo:footer-end -->", re.S),
+)
+_ISO_DATE_RE = re.compile(r"^\d{4}-\d{2}-\d{2}$")
+_UPDATED_RE = re.compile(r'(?m)^updated:\s*"?(\d{4}-\d{2}-\d{2})"?\s*$')
+_JSONLD_MODIFIED_RE = re.compile(
+ r'"dateModified"\s*:\s*"(\d{4}-\d{2}-\d{2})"')
+_SITEMAP_LASTMOD_RE = re.compile(
+ r"<loc>(.*?)</loc>\s*<lastmod>(\d{4}-\d{2}-\d{2})</lastmod>", re.S)
+
+
+def content_bytes(html: str) -> str:
+ """Page bytes that are not shared chrome."""
+ for pattern in _CHROME_RES:
+ html = pattern.sub("", html)
+ return html
+
+
class DateSource:
"""Per-file last/first change dates, from git where possible.
- `git log -1 --format=%cs -- <file>` is the authoritative answer: it is
- verifiable by construction, which is exactly the condition Google states
- for trusting <lastmod>. When git cannot answer (shallow clone, file not
- yet committed, no git at all) we fall back to the filesystem mtime and
- record it in `self.fallbacks` so the caller can log it loudly.
+ `git log -1 --format=%cs -- <file>` is still what `last_modified` returns,
+ and `fix_heads` keeps using it for pages that have no pinned date.
+ Sitemap `<lastmod>` does not. A sitewide head or nav commit, or a shallow
+ checkout whose mtimes are all "today", would otherwise stamp every URL
+ with one date, and Google stops trusting lastmod sitewide once it is
+ wrong. `page_lastmod` therefore prefers a content date that survives
+ those checkouts:
+
+ 1. `updated:` in the article source (`content/<section>/<slug>.md`);
+ 2. `dateModified` already published in the page's JSON-LD;
+ 3. `updated` pinned in `pagedata.py`;
+ 4. on a full clone, the last commit that changed the page outside
+ shared chrome;
+ 5. the `<lastmod>` already committed in `sitemap.xml` for that URL;
+ 6. the filesystem mtime, recorded in `self.fallbacks`.
+
+ Steps 1–3 are in the files a shallow checkout still has. Step 5 is how a
+ shallow regen avoids rewriting every remaining URL to today.
"""
def __init__(self, repo_root: pathlib.Path):
self.repo_root = repo_root
self.fallbacks: list[str] = []
+ self.prior_used: list[str] = []
self.git_ok = self._probe()
+ self._prior_cache: dict[str, dict[str, str]] = {}
def _probe(self) -> bool:
try:
@@ -347,6 +387,123 @@ class DateSource:
return d
return self.last_modified(path)
+ def committed_lastmods(self, sitemap: pathlib.Path) -> dict[str, str]:
+ """`<loc>` → `<lastmod>` already written in a sitemap, if it parses."""
+ key = str(sitemap)
+ cached = self._prior_cache.get(key)
+ if cached is not None:
+ return cached
+ out: dict[str, str] = {}
+ try:
+ text = sitemap.read_text(encoding="utf-8")
+ except OSError:
+ text = ""
+ for loc, lastmod in _SITEMAP_LASTMOD_RE.findall(text):
+ if _ISO_DATE_RE.fullmatch(lastmod):
+ out[loc] = lastmod
+ self._prior_cache[key] = out
+ return out
+
+ def page_lastmod(self, rel: str, html_path: pathlib.Path,
+ prior: dict[str, str] | None = None) -> str:
+ """Content lastmod for one sitemap URL. See the class docstring."""
+ pinned = self._source_updated(rel)
+ if pinned:
+ return pinned
+ if html_path.is_file():
+ try:
+ html = html_path.read_text(encoding="utf-8")
+ except OSError:
+ html = ""
+ published = _JSONLD_MODIFIED_RE.search(html)
+ if published:
+ return published.group(1)
+ pinned = self._pagedata_updated(rel)
+ if pinned:
+ return pinned
+ if self.git_ok:
+ changed = self._content_git_date(html_path)
+ if changed:
+ return changed
+ loc = deployed_url(rel)
+ if prior and loc in prior:
+ self.prior_used.append(rel)
+ return prior[loc]
+ self.fallbacks.append(str(html_path))
+ return self._mtime_date(html_path)
+
+ def _source_updated(self, rel: str) -> str | None:
+ try:
+ from article_data import source_for_rel
+ except ImportError:
+ return None
+ source = source_for_rel(self.repo_root, rel)
+ if source is None or not source.is_file():
+ return None
+ try:
+ text = source.read_text(encoding="utf-8")
+ except OSError:
+ return None
+ match = _UPDATED_RE.search(text)
+ return match.group(1) if match else None
+
+ @staticmethod
+ def _pagedata_updated(rel: str) -> str | None:
+ try:
+ import pagedata
+ meta = pagedata.entry(rel)
+ except (ImportError, KeyError, OSError):
+ return None
+ updated = meta.get("updated") if isinstance(meta, dict) else None
+ if isinstance(updated, str) and _ISO_DATE_RE.fullmatch(updated):
+ return updated
+ return None
+
+ def _repo_rel(self, path: pathlib.Path) -> str | None:
+ try:
+ return path.resolve().relative_to(self.repo_root.resolve()).as_posix()
+ except ValueError:
+ return None
+
+ def _content_git_date(self, path: pathlib.Path) -> str | None:
+ """Last commit whose diff changes more than shared chrome."""
+ rel = self._repo_rel(path)
+ if rel is None:
+ return None
+ env = {**os.environ, "TZ": "UTC"}
+ try:
+ log = subprocess.run(
+ ["git", "-C", str(self.repo_root), "log",
+ "--date=format-local:%Y-%m-%d", "--format=%H %cd", "--", rel],
+ capture_output=True, text=True, timeout=60, env=env)
+ except (OSError, subprocess.SubprocessError):
+ return None
+ if log.returncode != 0:
+ return None
+ commits = [ln.split() for ln in log.stdout.splitlines() if ln.strip()]
+ if not commits:
+ return None
+
+ def blob(rev: str) -> str | None:
+ try:
+ shown = subprocess.run(
+ ["git", "-C", str(self.repo_root), "show", f"{rev}:{rel}"],
+ capture_output=True, timeout=30)
+ except (OSError, subprocess.SubprocessError):
+ return None
+ if shown.returncode != 0:
+ return None
+ return content_bytes(shown.stdout.decode("utf-8", "replace"))
+
+ for index, (rev, day) in enumerate(commits):
+ current = blob(rev)
+ if index + 1 >= len(commits):
+ return day
+ previous = blob(commits[index + 1][0])
+ if current != previous:
+ return day
+ return commits[0][1]
+
def repo_root(start: pathlib.Path | None = None) -> pathlib.Path:
"""Walk up from this file to the repository root (the dir holding landing/)."""