-
Notifications
You must be signed in to change notification settings - Fork 1
features repository indexing
Bryan edited this page Jun 13, 2026
·
1 revision
Active contributors: Bryan
Repository indexing is the first step for every Lode workflow. It scans supported source files, creates graph facts, writes them to SQLite, removes stale facts, and resolves cross-file relationships.
The feature answers "what code exists here?" by turning files into nodes and edges. It is implemented mainly in src/lode/indexer.py with persistence in src/lode/storage.py.
src/lode/indexer.py # scanners and parsers
src/lode/storage.py # fact persistence
src/lode/model.py # node and edge records
-
index_repo()insrc/lode/indexer.pyresolves the root path and creates a repository record. -
iter_source_files()filters source files and skips generated/cache paths. -
parse_file()dispatches to Python, TS/JS, Markdown, or config parsers. -
replace_file_index()insrc/lode/storage.pyreplaces file-local facts. -
resolve_graph()insrc/lode/graph.pyadds cross-file resolved edges.
| File | Purpose |
|---|---|
src/lode/indexer.py |
File discovery and parsing. |
src/lode/storage.py |
File-index persistence. |
src/lode/model.py |
Fact dataclasses. |
tests/test_lode.py |
Repository indexing tests. |
Extend parsing in src/lode/indexer.py and test the result with temporary repositories in tests/test_lode.py. If the new facts affect traversal, add resolver tests in tests/test_graph.py.