Code reference detail
code_file_index.rs
crates/reqlan-index/tests/code_file_index.rs
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| file_related_requirements | The extension should provide a view or command to get requirements relating to the currently open file. File-related lookup should follow both explicit file references and comment rq: links in that file. Comment links are read from indexed `comment_link` edges ( [indexer.index_code_files] ), not only the open buffer. ["../../cli/click.rq".click_code_file] uses the same indexed backlinks and comment links when the click target is a code file. | 0.124 | ||
| indexing_trigger_filesave | indexing should be triggered by. rq file create / change / delete via watchers, and by allowlisted source files that may contain comment references. | 0.106 | ||
| application_memory | done | Base-local application memory for reqlan tools lives under `<base>/.reqlan/`. The presence of `.reqlan` **marks** a directory as a ["../../bases/base.rq".base]; each base owns its own store. Shared by the VS Code extension, ["../../cli/cli_package.rq".cli_package], and MCP ( [mcp_server] ) — not VS Code `globalStorageUri` / extension-private storage. The ideas graph index ( [indexer.index_ideas] and [indexer.index_technology] ) persists as `ideas-index.sqlite` inside that directory. Schema: ["../../indexer/sqlite-schema.rq".ideas_index_sqlite]. Index timing diagnostics persist separately as `index-diagnostics.sqlite` ( [index_diagnostics_store] / ["./index-diagnostics.rq".index_diagnostics] ) so rebuilds of the ideas index do not wipe history. Click session state persists as `click-sessions.sqlite` ( ["../../cli/click.rq".click_session] ) so agent / CLI click cursors survive ideas-index rebuilds. Diagnostics schema: ["../../indexer/diagnostics-schema.rq".diagnostics_sqlite]. WAL sidecars and JSON siblings: ["../../indexer/sidecars.rq".reqlan_directory_layout]. Export form defaults ( all formats via ["../export/export.rq".export_webview], including HTML options in ["../export/html-export.rq".html_export_form] ) persist as `export_settings.json` in the same directory ( active base ). Path ignore rules live as `.rqignore` in the same directory ( [rqignore] / [configuration.configuration_rqignore] ). Git ignore for SQLite stores lives as `.gitignore` in the same directory ( ["../../bases/base.rq".base_initialisation_ignore] ). Path resolution is owned by [application_memory_impl] ( `resolveApplicationMemoryPath` ); consumers must use it ( or `REQLAN_INDEX_PATH` override for a single store ) so tools read and write the same store for a given base. Multi-base discovery / registry: ["../../bases/base.rq".multi_base_environment]. Index engine ownership: ["../../indexer/indexer.rq".ownership]. Extension wiring: [analytical_submodule]. Aligns with ["../../cli/cli_package.rq".function_parity]: shared analytical memory, not host-only state. | 0.494 | |
| binary_ignore | done | Discovery, coverage, and index walks skip binary files by default. Built-in [rqignore] patterns include a broad set of binary globs ( images, archives, packages, native objects, fonts, media, and office files ). Opt in with a gitignore negation in `.reqlan/.rqignore`. Example: `!*.bin` includes files with a `.bin` extension. Opted-in files can receive ["../../indexer/indexer.rq".index_code_files] comment indexing. They are not parsed as `.rq` sources. The editor source watcher stays on allowlisted text extensions. A soft sync indexes opted-in binary paths from the scan list. Idle stats stored paths and does not walk. Same filter as [configuration.configuration_rqignore]. | 0.201 | |
| 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 | |
| idea | done | A reqlan core unit is an idea. Syntax: ["./language/syntax.rq".simple_idea], ["./language/syntax.rq".block_idea]. Grammar: [reqlan_grammar] `Idea` / `OneLinerIdea`; index records: [analytical_types] `IdeaRecord`. Extract: [idea_extractor], [rust_extract]; AST: [rust_ast]. Product surface: [ideas_summary_tabs] Ideas tab per ["./extension/workspace-summary/ideas_summary/webview.rq".ontology_aligned_tabs]. | 0.110 | |
| referenced_files | done | Non- `.rq` files that ideas reference, or that reference ideas. These may be shared. They should be captured in the ["./indexer/indexer.rq".index]. Outbound file refs: ["./language/syntax.rq".reference_file], [file_reference_resolve], edge kind `file_reference` in [analytical_types]. Inbound comment refs: ["./extension/language/comment-references/functional-code-comment-references.rq".references_in_functional_code_comments] via [comment_resolver] / [comment_grammar]. Full non- `.rq` file indexing of comment-bearing sources: ["./indexer/indexer.rq".index_code_files]. Click treats those files as centres: ["./cli/click.rq".click_code_file]. | 0.169 | |
| comment_reference | done | Inbound ["./ontology.rq".reference] from comments in non- `.rq` source: `rq:[idea]` / `rq:["path".idea]`. Qualified paths may use import-root aliases ( `rq:["@/path".idea]` ) per ["./language/imports.rq".configuration_import_root_alias] and ["./extension/language/comment-references/functional-code-comment-references.rq".comment_reference_import_root_alias]. Spec: ["./extension/language/comment-references/functional-code-comment-references.rq".references_in_functional_code_comments] Syntax note: ["./language/syntax.rq".comment_reference]. Resolve: [comment_resolver]. Unresolved: ["./language/syntax.rq".comment_reference_resolution_error]. Index edge kind `comment_link`. Related capture of those files: ["./ontology.rq".referenced_files]. Indexer: ["./indexer/indexer.rq".index_code_files]. | 0.119 | |
| idea_reference | done | Idea-to-idea ["./ontology.rq".reference]: bracket `[name]` / `[ideaset.name]` targets a local, imported, or same-file idea. Syntax: ["./language/syntax.rq".reference_brackets], ["./language/syntax.rq".same_file_reference], ["./language/syntax.rq".reference_qualified], ["./language/syntax.rq".reference_embedding], ["./language/syntax.rq".references_to_subidea]. Index edge kind `references` on [analytical_types] / [rust_index_types]. Extract: [idea_extractor], [rust_extract]. A `[ideaset.member]` form records the edge on the member leaf, not on the ideaset container. An attribute uses the same brackets. See ["./language/syntax.rq".attribute_namespacing]. Wikilink surface for the same edge kind: [link_reference]. Fan-out across files: [wildcard_reference]. | 0.125 |
Reference labels
"../../../crates/reqlan-index/tests/code_file_index.rs:indexes_comment_references_from_non_rq_files", "../../../crates/reqlan-index/tests/code_file_index.rs:skips_binary_comment_files_unless_rqignore_negation", "../../crates/reqlan-index/tests/code_file_index.rs:index_one_file_drops_an_rqignored_rq_file", "../../crates/reqlan-index/tests/code_file_index.rs:indexes_comment_references_from_non_rq_files", "../../crates/reqlan-index/tests/code_file_index.rs:rq_reindex_relinks_code_files_only_when_idea_names_change", "../../crates/reqlan-index/tests/code_file_index.rs:rq_reindex_restores_comment_links", "../../crates/reqlan-index/tests/code_file_index.rs:skips_binary_comment_files_unless_rqignore_negation", "../../crates/reqlan-index/tests/code_file_index.rs:unqualified_comment_ref_matches_catalog_idea_name", "../crates/reqlan-index/tests/code_file_index.rs:indexes_comment_references_from_non_rq_files", ../../../crates/reqlan-index/tests/code_file_index.rs:indexes_comment_references_from_non_rq_files, ../../../crates/reqlan-index/tests/code_file_index.rs:skips_binary_comment_files_unless_rqignore_negation, ../../crates/reqlan-index/tests/code_file_index.rs:index_one_file_drops_an_rqignored_rq_file, ../../crates/reqlan-index/tests/code_file_index.rs:indexes_comment_references_from_non_rq_files, ../../crates/reqlan-index/tests/code_file_index.rs:rq_reindex_relinks_code_files_only_when_idea_names_change, ../../crates/reqlan-index/tests/code_file_index.rs:rq_reindex_restores_comment_links, ../../crates/reqlan-index/tests/code_file_index.rs:skips_binary_comment_files_unless_rqignore_negation, ../../crates/reqlan-index/tests/code_file_index.rs:unqualified_comment_ref_matches_catalog_idea_name, ../crates/reqlan-index/tests/code_file_index.rs:indexes_comment_references_from_non_rq_files