Code reference detail
store.rs
crates/reqlan-index/src/store.rs
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| file_search | done | Rank indexed `.rq` files and comment-bearing code files by basename, stem, and path using the same separator-insensitive matching as [fuzzy_search] / [fuzzy_search_whitespace]. Hits use kind `file`; id is the indexed file URI; name is the basename; line start is 0. Empty query does not dump the file catalog. Mixed into [fuzzy_search] so one list ranks ideas and files together. Code files are those persisted by ["../indexer/indexer.rq".index_code_files]. Surfaces: native `fuzzy_search` via [native_workspace_index], ["../extension/local-context/activitybar-panels/search.rq".search_pane_file_hits]. ["../cli/click.rq".click_input] uses this mix when click has no exact match. | 0.244 | |
| search | Search over the requirement graph — find ideas by name, body, tags, and related signals. Surfaces: [fuzzy_search], [file_search], [contextual_search], [semantic_search], [katz_search]. Consumed by CLI `reqlan search`, MCP / chat tools, Ideas Summary, and the activity-bar search pane. Rust ranking engine: ["./rust_port.rq".search_rust]. | 0.046 | ||
| definition | The indexer should live in the [core_analysis] module. On-disk schema: [sqlite_schema.ideas_index_sqlite] and [diagnostics_schema.diagnostics_sqlite]. Layout and WAL sidecars: [sidecars.reqlan_directory_layout]. Consumers: [consumers.index_consumers] ( extends [consumption] ). Sequencing and triggers: [sequencing.index_sequencing] ( extends [triggers] ). Cache reuse opportunities: [cache_reuse.index_cache_reuse]. | 0.040 | ||
| index_code_files | done | Index non- `.rq` source files that contain [comment_reference] ( `rq:[idea]` / `rq:["path".idea]` ). The same directory scan records allowlisted text paths ( respecting `.rqignore`, [app_memory_doc.binary_ignore], [app_memory_doc.commentless_file_ignore], and nested child bases ). Content reads use that list. They are not a second directory walk. [app_memory_doc.text_prefix_skip] skips non-text before a full read. Binary files stay out unless a negation such as `!*.bin` opts them in. The walk cheap-filters on `rq:`, and persists matching files as documents plus `comment_link` edges. Edge shape: source = referenced idea, `target_file` = code file URI, kind `comment_link` ( no synthetic file ideas ). Reindex of a `.rq` file updates kept ideas in place, so their comment links stay. Deletion of a removed idea cascades to its links. Code documents are re-linked only when the set of idea names in that `.rq` file changes, because links resolve on names only. A body edit must not read the code files again. Watcher + idle stale check cover code documents as well as `.rq` files ( [triggers], [nonblocking_index] ). Consumers: [graph_analysers.file_related_requirements], ["../core_analysis/search.rq".file_search], ["../core_analysis/html_export.rq".html_export_code_reference_pages], Ideas Summary comment-reference rows, local graph ( idea → external file node ), ["../cli/click.rq".click_code_file]. See [index_comment_reference_inclusion], ["../ontology.rq".referenced_files]. | 0.394 | |
| ideas_index_sqlite | done | The ideas graph for one [base_ownership] lives at `<base>/.reqlan/ideas-index.sqlite` under [application_memory]. Schema version is in ( `SCHEMA_VERSION` in [schema_ts] and [schema_rust] ). Runtime migrate runs in Rust ( [store_rust] ); TypeScript opens the store and calls native migrate ( [sqlite_store] ). Keep [schema_ts] aligned with [schema_rust]. Related: [index], [indexer_rust], [ownership], [sidecars.sqlite_wal_sidecars], [diagnostics_schema.diagnostics_sqlite], [consumers.index_consumers]. | 0.226 | |
| schema_migrations | Base tables use `CREATE … IF NOT EXISTS` ( [schema_ts] `BASE_MIGRATIONS` / [schema_rust] ). Versioned upgrades run `(current+1)..=SCHEMA_VERSION`: - v2 — edge `source_line`, `snippet`, `is_resolved` - v3 — document `mtime_ms` - v4 — idea `git_change_count` Duplicate-column errors on ALTER are ignored so re-open is safe. Fresh databases create full v4 columns, then set `schema_version` to 4. Open pragmas: `foreign_keys=ON`, `journal_mode=WAL` ( [sidecars.sqlite_wal_sidecars] ). [ideas_index_sqlite] | 0.058 |
Reference labels
"../../crates/reqlan-index/src/store.rs", ../../crates/reqlan-index/src/store.rs