aborek
6 hours ago
GitHub: https://github.com/Infinibay/ken ```bash uv tool install ken-rank cd your-project ken install --codex . --embed ``` I developed and presented ken-rank a couple of months ago in other communities, but many things changed and now, I think ken-rank is pretty mature and gives REALLY good results. What ken does is giving smart tools to improve context usage by looking for relevant information without consuming tokens. In this way, the model does not waste time and tokens digging around in the code or many markdown files manually, this improves time and tokens (this is money).
Two of the most important tools are one that looks for relevant code based on a query liken "where the authentication lives?". The second is one that manage "findings" that are like notes. This tool is pretty useful for long horizon tasks. Check my session right now while I'm writing this (image on the post). It never lost or deviate of the task because the findings uses smart algorithms to find relevant findings (notes) whenever the model ask for.
## How it works:
It generates an smart embed (and keep updating in the background) to find relevant content. It builds several local signals and ranks files by combining them: * Structural code index: each file is hashed and parsed when possible. The AST parser extracts symbols, line ranges, imports, module docstrings, and symbol docstrings. Files that cannot be parsed are still tracked by path, mtime, and lightweight text intent when useful. * Semantic index: ken embeds files, symbols, and explicit purpose text. File embeddings are based on language, filename, and top symbol names. Symbol embeddings include kind, name, and docstring. Docstrings are also stored as separate intent sources, so a prompt can find code by what it is for, not only by what it is named. * Live task memory: hooks record local interactions in the project SQLite DB: prompts, reads, edits, writes, dismissals, and the files touched in each turn. Recent interactions are weighted more heavily, and useful patterns such as read-then-edit score higher than repeated reads with no follow-through. * Predictive memory: at the end of a session, ken snapshots which files were productive for that task. Later, when a new prompt is semantically similar to a previous one, those files get a predictive boost. * Relationship boosts: after the main channels rank candidates, ken applies conservative boosts for things like recently modified files, symbols pointing to their containing file, source/test counterparts, imports, and files that often co-occurred in past similar sessions.
The result is closer to a local project memory than a plain search tool. Raw text search can find exact strings. Embeddings can find semantic neighbors. AST indexing can find named symbols. ken combines all of that with how the assistant actually used the project over time. That is why results are often better after a few real sessions: the database accumulates project-specific evidence about which files matter for which kinds of tasks.
I really think ken is useful. I'm not promising magic, but it's really useful. I only want feedback.