Skip to content

Releases

LEKS 3.1

Choose a tag to compare

@jacobemanuel jacobemanuel released this 14 Nov 02:50

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: and Date: 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 neighbours tool and leks neighbours PATH list 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, and leks revisit lists them all.
  • Edit contracts. leks check holds notes to rules per path glob: write-once, frozen and living notes, required fields, and a named successor for every superseded note.
  • A decision log. The leks-decide skill writes a decision with the recommendation first and the strongest counterargument next, and supersede-decision replaces 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.md and 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/hosts sends 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 models extra 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.

LEKS 3.0

Choose a tag to compare

@jacobemanuel jacobemanuel released this 11 Nov 01:09

LEKS 3.0 rebuilds the search. It finds passages in notes, PDFs, .docx files and code by words and by meaning, reranks them with a small local model and knows when a newer note replaces an older one. The index and both models run on your machine; the models are downloaded once from Hugging Face.

Results

Measured on my own research knowledge base, a real and private record I have worked in every day since February 2026. The full report with every table is in docs/report-3.0.md.

  • How the models were chosen: 30 model stacks in a tournament fixed in advance, then eight finalists on 158 held-out questions. The shipped pair, mDenseOn with mLateOn, puts the right note in the top 5 for 85.4%, against 61.4% for 2.0 and 74.7% for the tournament pick (+10.8 points, Holm p 0.0034).
  • Fresh questions: 120 questions written after 3.0 went live, from documents drawn at random: 83.3% in the top 5 against 46.7% for 2.0 (46 questions against 2, Holm p < 0.0001).
  • PDFs: 95.0% in the top 5 when the answer sits on a PDF page. 2.0 reads no PDFs.
  • German and Polish: asked in German 84.2% (2.0: 32.5%), in Polish 70.0% (2.0: 7.5%).
  • The agent at work: three scripted working days of questions and dev tasks, 89 of 100 answers right with LEKS against 75 of 100 without (Holm p 0.0043), 14 of 14 tasks passed against 12 of 14, at 0.85 of the bill. With a small model as the only model, search lifted it from 17 to 23 of 35 right at half its cost per correct answer.
  • Scale: 7,294 documents (4.6 GB of text) searched in full and 172,775 files (249 GB) by name. 2.0's own test searched 91 wiki pages.
  • Next to tool servers: in ten sessions per tool an agent took a spec from the notes through LEKS and built it in Blender through the Blender Lab MCP server, or in Unity through MCP for Unity. A check script the agent never saw passed all 20 sessions.

What's new

  • Search by words and by meaning: a local embedder (mDenseOn) and a local reranker (mLateOn) run in a helper process, on macOS in a sandbox with no network. Newer notes rank above the ones they replace.
  • Readers for PDFs (OCR for scanned pages and images on macOS), .docx files and code symbols; every file is also found by name.
  • One project template for Claude Code and GitHub Copilot: six MCP tools, a short brief and an index update at session start, and a notes check after each turn.
  • bench/ measures the search on a synthetic corpus, and bench/integrations/ reruns the Blender and Unity test.

Where it runs

Built and measured on macOS with Apple silicon, where the models run in a sandbox and scanned pages go through OCR. CI runs the full test suite and the benchmark harness on macOS and Linux with Python 3.10 and 3.13. The template serves Claude Code and GitHub Copilot; the measured sessions ran in Claude Code.

Install: docs/install.md.

LEKS 2.0

Choose a tag to compare

@jacobemanuel jacobemanuel released this 14 Nov 02:50

LEKS 2.0 kept the search results of 1.0 and rebuilt the engine underneath so it keeps up as a project record grows.

  • A persistent word index (R1) that updates page by page, with rankings identical to 1.0. In the shared performance harness p99 went from 409 ms to 40 ms.
  • An evidence store with exact, hash-addressed copies of every source file and a restore path, a hash-chained journal and persistent incidents.
  • Claims anchored to hashed excerpts, typed facts with valid and record time, contradiction and freshness rules.
  • An MCP server, doctor and an idempotent setup.
  • Optional engines, measured on a frozen benchmark of 320 questions: the hybrid R4 (an embedding model next to the words) put the right page in the top five for 86.4% of questions against 79.3% for R1. It stayed opt-in because it needs a model, a helper process and more memory.
  • The engine code under the MIT licence, with 124 tests in CI.

This tag joins the 2.0 line back into the repository history. What changed between versions and why the history looks the way it does: docs/history.md.