Repository navigation
LEKS is local search and note keeping for coding agents. An agent asks in plain words and gets the few passages that answer, each cited by file and line or by page, from notes, decisions, PDFs, Word files and code, with a replaced note ranked below the note that replaced it.
LEKS 3.1 keeps the search of 3.0, its lanes and its two local models, and adds the parts that hold a growing record true. It reads status lines, lists the notes to bring in line after an edit, names notes past a freshness budget or a revisit date, and holds notes to edit contracts. It serves Claude Code, GitHub Copilot and Codex from one template, and it comes with a benchmark on the Python PEPs that anyone can rerun.
What's new
- Status lines count.
Status:andDate:lines under a note's title, and ids such as D-07 in them, now mark a note as replaced. The replaced note ranks below its successor and points to it. In the Blender and Unity sessions measured on 3.0 (docs/integrations.md), the replaced decision came first in all 20 first searches; a test now runs those searches on the same notes, fails on 3.0 and passes on 3.1. - Neighbours. The
neighbourstool andleks neighbours PATHlist the notes to bring in line after an edit, each with its reason. - Freshness budgets and revisit dates. The session brief names notes past their budget and decisions whose
Revisit:date has come, andleks revisitlists them all. - Edit contracts.
leks checkholds notes to rules per path glob:write-once,frozenandlivingnotes, required fields, and a named successor for every superseded note. - A decision log. The
leks-decideskill writes a decision with the recommendation first and the strongest counterargument next, andsupersede-decisionreplaces one while the old one stays readable. - Codex. The template serves Codex next to Claude Code and GitHub Copilot, with its MCP config, its hooks,
AGENTS.mdand the skills. - Skills and an agent team. 26 skills for recurring work, and an optional team of an orchestrator and nine role agents for all three hosts.
- Cost harness.
bench/hostssends the same questions to Claude Code, Copilot CLI and Codex with and without LEKS and keeps what each session cost.
Public benchmark
The Python PEPs at a pinned commit: 695 questions that ask for one PEP by its title, and 41 pairs where a newer PEP replaces an older one, each asked as it is and with "current" in the question. All three systems run on words.
| measure | bm25 | LEKS 3.0 | LEKS 3.1 |
|---|---|---|---|
| the asked PEP first, 695 questions | 80.6% | 90.1% | 89.4% |
| the asked PEP in the top 5 | 96.7% | 98.4% | 98.4% |
| newer PEP above the replaced one, 41 pairs | 5 | 25 | 30 |
| the same, with "current" in the question | 5 | 25 | 32 |
| replaced PEP points to the newer one | none | 25 of 40 | 33 of 40 |
3.1 loses no replacement pair that 3.0 wins, and the pointer gain holds after the Holm correction (p 0.047); the ranking gains alone do not (Holm p 0.19 and 0.0625). Method, intervals and every test: docs/benchmark.md.
Next to other local search tools
The same 695 PEPs, now asked the way a developer would describe the need, in their own words. This held-out set was frozen, with its analysis hashed, before any tool saw it. With its two models LEKS puts the right PEP in the top 5 for 93.4%, against 86.5% for qmd query, 83.3% for knowledge-rag and 81.2% for MemPalace, each gap with Holm p 1.2e-6 or lower. On words alone it reaches 76.3% in about 6 ms per question. Every run, the adapters and a blinded audit of the misses: docs/comparison.md.
Tests and security
- CI ran on this release's commit, and passed, before it went to main: the suite of 1,030 tests on macOS, Linux and Windows with Python 3.10 to 3.13, and a job that loads the real models on Linux, on CPU, and runs the bench with them.
- The tests run again on every push to main and every pull request, the models job on every push to main and once a week.
- Further jobs check the hook payloads and config files of all three hosts, MCP conformance and packaging, and scan with gitleaks, CodeQL, bandit and pip-audit. docs/testing.md lists every job and what it proves.
- The
modelsextra asks for filelock 4.2.1 or newer, the first release with the fixes for the published advisories against 4.1.0, and so needs Python 3.11 or newer. Words, code symbols and file names still run on Python 3.10 with the standard library alone. - On Windows the model helper is reached over a local TCP port with a token. SECURITY.md describes what stays on your machine and what the host agent sends to its provider.
Where it runs
Built and measured on macOS with Apple silicon. 3.1 changes no model and no search lane, so the numbers of the 3.0 report, measured on my own private record, still describe its search. The measured agent sessions ran in Claude Code; the Copilot and Codex files follow those hosts' documented formats, and the tests check them against those formats.
On Windows, leks build and leks embed refresh the index and the vectors while a server holds them open, and the server answers from the new ones at its next call. Notes with Windows line ends read like any other, leks check prints note paths with / on every system, and leks read takes a C:\ path.
The note-keeping ideas follow Modular Context, an MIT-licensed Obsidian plugin. The code and texts here are written for LEKS.
Install: docs/install.md. Earlier versions: docs/history.md.