feat: retrieval ladder v0.5.0 (SQLite FTS5 + ripgrep) - #49
Merged
Conversation
Replace JSON knowledge/.index/ with PKC's disposable ladder: index present → rg prefilter → Python scan. Git + Markdown stays source of truth. Search scores match a full scan unless --engine fts. Pack lineage is undirected for every node; extra non-lineage links stay on the focus. rg is optional and never installed from a hook. knowledge/.dekc/index.sqlite is gitignored and self-heals via mtime+size.
This was referenced Aug 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the JSON
knowledge/.index/inverted index (committed by accident in 0.4.x) with PKC's disposable retrieval ladder. Git + Markdown stays source of truth.What landed
knowledge/.dekc/index.sqlite(gitignored). Search and pack self-heal via mtime+size.buildremains an alias forrefresh --forceso CI and existing skills keep working.DEKC_RG_PATH/PKC_RG_PATH/OKF_RG_PATH). Optional. Never installed from a hook.title×10 / desc×5 / tags×4 / min(body,8)) ranks candidates. LIKE on the stored haystack is the default;--engine ftsis the FTS5 MATCH opt-in (not score-identical).links[]still attach to the focus only. Pack always parses the current file for outbound SQL —rg -lF <path>cannot see a file that does not mention itself.originso incremental delete does not leak table-to-table edges..opencode/plugin/dekc.jsonandpublic/data/catalog.jsonwere still 0.4.2).sample-knowledge/.index/JSON.Design:
docs/designs/retrieval-ladder.md.Tests
tests/test_retrieval_ladder.py— rg identity, sqlite refresh/noop/touch/delete/drop, no JSON written, doctor path, samplerevenuehitstests/test_dekc.py(incl. version lockstep +plugin.json)scripts/dekc_*.pyand asserts searchengineplus indexfts5/nodesLeftovers (accepted)
dekc_pack.py --mermaidstill callsbuild_graph(full scan).dekc/directory —.dekc/config.example.ymlis committed