agentleFS
D-SheyD-Shey/autoharness/.agents/skills/leann-vector/SKILL.md

leann-vector

Skill10 starsChanged todayMITView on GitHub

Compact selective-recomputation vector indexing for codebases and memory

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when semantic search across code or project memory requires vector similarity without the disk/memory overhead of traditional vector …

    line 9
  2. Distinctive:

    Test semantic similarity: queries with synonym or paraphrased intent (e.g.

    line 22
  3. Distinctive:

    Test vector normalization: verify dot product of identical vectors equals 1.0, orthogonal vectors equals 0.0.

    line 23
  4. Distinctive:

    Test storage footprint: verify database size remains compact (< 100 KB for typical projects).

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

leann-vector

When to use

Use when semantic search across code or project memory requires vector similarity without the disk/memory overhead of traditional vector databases (Chroma, Pinecone) or external daemon requirements.

Steps

  1. Parse text into semantic documents with metadata (source file, doc kind, symbols, updated timestamp).
  2. Tokenize and extract subword character n-grams and normalized terms to capture morphological variations.
  3. Compute compact sparse term-frequency vectors or hashing embeddings:
    • Zero runtime dependencies: pure standard library Python vectorizer with hash-trick projection into compact dimensionality (e.g. 256 or 512 dimensions).
    • L2 normalization for fast cosine similarity via dot product: dot(v1, v2) / (|v1| * |v2|).
  4. Store compact vectors in .autoharness/vector.db (SQLite) or alongside .autoharness/memory.db.
  5. Implement selective recomputation: store lightweight text references and compute vectors on-the-fly or cache compact quantized hashes, saving up to 97% storage compared to dense float matrices.
  6. Provide fast top-K nearest neighbor search by cosine distance.

How to verify

  1. Test semantic similarity: queries with synonym or paraphrased intent (e.g. "remove cycles from task graph") must rank topological sorter documents highly even without exact keyword matches.
  2. Test vector normalization: verify dot product of identical vectors equals 1.0, orthogonal vectors equals 0.0.
  3. Test storage footprint: verify database size remains compact (< 100 KB for typical projects).

Facts found here

  • LEANN architecture (MLsys 2026 Best Paper: arxiv.org/abs/2506.08276) achieves 97% savings by storing graph representations and selective recomputation rather than dense uncompressed matrices.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.