Referenced by 4
Labels 2

Referencing ideas

IdeaStatusTagsSummary
index_ideas Each ["../bases/base.rq".base] maintains an index of its ideas for fast lookup and navigation ( ["../indexer/indexer.rq".index] ). The index should update incrementally as. rq files change within that base ( nested child bases excluded ). Persistence lives in [application_memory] per base, shared with CLI and MCP — not VS Code extension storage. Engine ownership: [workspace_index] in `@reqlan/analytical`; multi-base via BaseRegistry; editor watches via [editor_index_adapter].
indexing_trigger_auto done When the editor host is idle, run a * * background staleness check * * — not a reindex and not a soft full sync UI pass. Philosophy: computationally cheap. Load document mtimes in * * one * * SQLite read, compare each file's FS mtime in memory, and only then index mismatched or new files; drop deleted docs in one batched delete. A single MAX ( mtime ) watermark is not sufficient ( one file can get newer while another gets older ). If nothing is stale: no state transition, no progress UI, no parse. If some files are stale: index * * only those files * * under ["../indexer/indexer.rq".nonblocking_index]. Schedule after a quiet period with no index activity; prefer running when the window is unfocused; defer or cancel if the user becomes active again. Extension host only ( [editor_index_adapter] ); CLI / MCP have no idle loop ( they sync on activate / command ).
index The ideas graph indexer: parse `.rq` with `@reqlan/language`, extract ideas / edges, persist to sql. js SQLite. Owned by [ownership]; consumed per [consumption].
nonblocking_index done Index sync must stay non-blocking for the host UI ( notably [activity_bar_doc.activity_bar] and [workspace_pane_doc.workspace_loading] ). Editor startup is gated by ["../extension/activation.rq".first_paint_startup]; discovering a base must not construct Langium services, which are initialized lazily on the first parse. While syncing, surface progress — state, processed / total, and the current file — in [workspace_pane_doc.workspace_pane] and [ideas_summary_doc.index_panel]. In-flight sync must be cancellable from those surfaces; cancel keeps already-indexed rows and returns the index to ready. Incremental behaviour ( see also [graph_analysers.indexing_incrementality] ): - Single-file create / change / delete via watchers indexes only that file — never a full base walk. - Soft full sync ( `syncWorkspace` / Refresh ) skips parse + persist when the file's mtime matches the value stored on the documents row. - Hard refresh ( `clearAndRebuildIndex` / Clear & rebuild ) wipes the store and reindexes every file. Implemented by [workspace_index]; editor adapter [editor_index_adapter].

Reference labels

../../packages/analytical/test/workspace-index.test.ts, workspace_index_tests