Referenced by19
Labels50

Referencing ideas

IdeaStatusTagsSummaryKatz
checkdone`reqlan check` should run perform the following checks: - ensure all rq [reference] point to real nodes, unless rq ignored with [comment_reference_ignore]. - this tests rqcomments point to real parts of the namespace, that code references exist, and that rq references exists. - report unresolved imports: [check_unresolved_imports]. - report a comment reference with invalid syntax: [code_comment_syntax_errors]. - report a qualified reference whose file is not on disk: [check_qualified_missing_file]. - report a qualified reference whose `.rq` file does not declare the idea: [check_qualified_missing_idea]. - it should really just be a wrapper of the [index] and return the issues ( as a pipe, terminal output, or json ). Issue order: [check_order_by_target]. Sparse wildcards: [check_wildcard_sparse] via flags [check_wildcard_zero] and [check_wildcard_one]. Path globs: [check_glob_patterns]. Skip missing targets: [check_skip_targets] [check_skip_gitignored_targets]. CLI: ["../cli/cli_package.rq".commands]. MCP: ["../extension/agent/skills-and-mcp.rq".mcp_check]. CI: [check_meta_implementation]. Site demo: ["../site/site.rq".broken_links_showcase].1.000
check_qualified_missing_ideadoneA qualified [reference] names a file and an idea. Example: `["../extension/index-host/graph-analysers.rq".not_an_idea]`. The same rule applies to a namespace alias: `[alias.idea]` ( [import_namespace] ). [check] reports an error when that file is an `.rq` file, the file does not declare the idea, and the file does not bind that name as an import alias. The issue kind is `references`. The label is the missing idea name. A path with no extension means `.rq` first ( [implicit_file_extension] ). A qualified reference to an idea that the `.rq` file declares is not this error. A qualified reference to an import alias bound in that file is not this error. A namespace import binds its `as` name. A from-import or qualified import binds its `as` name, or the idea name when `as` is absent. A from-import of an import alias stays [check_unresolved_imports]. The alias is not an idea. A qualified reference to a code file is not this error. That form uses [check_qualified_missing_file]. A missing file stays [check_qualified_missing_file]. [check] does not also report a missing idea for that file. [comment_reference_ignore] suppresses this error. Related: [check] [check_qualified_missing_file] ["../language/syntax.rq".reference_qualified]0.278
configuration_import_roots`importRoots` is an optional array of alias-to-directory mappings in `.reqlan/config.json`. Each mapping has: - `alias` ( required non-empty string ): prefix before `/` in aliased import paths. - `root` ( optional non-empty string ): directory for that alias. A relative `root` resolves against the base root ( the parent of `.reqlan` ), not against the `.reqlan` directory. An absolute path or `file://` URI is used as that alias' import-root directory directly. When `root` is omitted for a mapping, that alias uses the workspace folder that contains the `.rq` file. When `importRoots` is omitted, empty, or has no valid entries, the default is one mapping with alias `importRootAlias` from ["../../../packages/analytical/src/core/defaults.json"] and no explicit root. When several aliases could match a path, the longest alias wins. Invalid or unreadable JSON, and a non-array `importRoots` value, fall back to defaults ( or no loaded config for discovery, then defaults at resolve time ). Language path forms and `@/` shorthand: ["../../language/imports.rq".import_paths] and ["../../language/imports.rq".configuration_import_root_alias]. Comment references in source files use the same mappings: ["../language/comment-references/functional-code-comment-references.rq".comment_reference_import_root_alias]. Schema: [configuration_schema_file]. Applying file discovery: [configuration_location]. Editor completion of aliased import paths: ["../language/syntax/features-syntax.rq".code_completion].0.167
configuration_locationAn optional `.reqlan/config.json` may appear under a base's `.reqlan` directory. For a given `.rq` file, the applying base is the nearest ancestor directory that owns a `.reqlan` folder. The applying config is that base's `.reqlan/config.json` when present. If the owning base has no `config.json`, or no owning base is found, defaults from [configuration_import_roots] apply. A child base does not inherit a parent base's config.0.190
file_reference_errorsdoneIf a [file_reference] is not found, is broken, or cannot be resolved, the language server must show an underline. Do not show the underline when [comment_reference_ignore] ( `//rq-ignore-error` ) is on the line before. Missing files: error underline, no document link. Do not underline examples inside [inline_code] or ["../../../language/syntax.rq".code_snippets]. Empty files and files with parse errors: warning underline; the document link stays. Import-root aliases such as `@/` resolve the same way as ["../../../core_analysis/check.rq".check] and ["../../../language/imports.rq".configuration_import_root_alias]. Related: [general_errors], [comment_reference_resolution_error], [inline_code], ["./features-imports.rq".import_does_not_exist_error], ["../syntax/features-syntax.rq".file_references].0.092
general_errorserror messages should be deliberate and developer friendly. recommendations should be offerred where appropriate.0.083
language_server_rustin-progressA Rust binary replaces the Langium language-server process. The extension launches `reqlan-lsp` over stdio. Open `.rq` buffers parse with [parser_rust]. The open sequence is ["open-file-sequencing.rq".open_file_algorithm]. Workspace names and rename targets come from the ideas index under [application_memory]. Inbound hints wait for the host snapshot of that index. The inbound inlay hover is markdown. It lists each referencer as a file link. An idea hover shows styled idea content when ["../syntax/features-syntax.rq".idea_content_tooltip] is on. A closed file has no retained syntax tree. Go-to-definition cost is ["../syntax/features-syntax-highlighting.rq".reference_goto_definition_speed]. When the engine is `rust`, the server also serves `rq:[…]` document links, go-to-definition, and missing-idea diagnostics in non- `.rq` comments. One resolution supplies the link, the definition target, and the underline. The host strips file document links; Ctrl + click uses definition ( ["../syntax/features-syntax-highlighting.rq".editor_reference_activation] ). The host serves those links when the engine is `node`. Host commands prefer LSP custom requests, napi extract, and the ideas index. Move / delete planners still use Langium until index-backed planners land. The setting `reqlan.languageServer.engine` selects the binary. The default is `rust`. `node` remains only when the setting says so, or when the binary is not on disk yet. A local extension build compiles this binary with the napi addon ( [extension_host_native_stage] ). The extension launches `bin/reqlan-lsp`, else that release build. It never launches a debug build, because a debug build is slow and the extension build does not refresh it. Code actions match ["../vsc-primitives.rq".code_actions]: ignore, create below, import fixes, search or wrap, idea move and delete, and barrel page. Attribute and name catalogs drive completion. Rename and find-references use open buffers plus the ideas index. Inlay hints honour `reqlan.referencesInlayHints.enabled` and the host inbound snapshot. An import link uses the parser token span ( [import_from] ). The path links to the file. An imported idea name and its alias each link to that declaration. A namespace reference links the alias and the idea as separate names. A missing leaf reports an unresolved idea on that name. Related: [language_server], [grammar_and_parser], [analytical_rust_port], [vsix_export].0.580
lazy_features_after_outbounddoneAfter the hot path is on screen, show the rest when its data is ready. This pass must not delay [open_file_algorithm] steps 1 – 5. Related: [language_server], [unify_inbound_indexes], [background_startup], [inlay_hints], [codelens]. Work: - Confirm each qualified reference. Read that target file once, at depth 1. Then paint the idea line or the missing-idea error ( [missing_reference_colour_sequence] ). - Inbound backlinks: inlay hints and the file-top CodeLens, from the host snapshot ( [unify_inbound_indexes] ). - Attribute and name catalogs for completion and quick fixes. - Unqualified comment matches from that snapshot ( [comment_backlink_sequence] ). Until the first ready snapshot arrives, inlay hints and the file CodeLens stay empty. Those handlers do not open SQLite and do not call `list_all_ideas`. Later updates are incremental ready-state events ( ["../../../indexer/cache-reuse.rq".inbound_snapshot_events] ); last-good stays until replaced. When a ready snapshot arrives, refresh the visible editors.0.283
missing_reference_colour_sequencedonePaint links and errors in two steps. The hot path paints same-file names and import targets ( [outbound_one_hop] ). The background pass paints qualified-reference idea lines ( [lazy_features_after_outbound] ). Related: [unresolved_reference_diagnostics], [reference_rendering], [file_reference_errors], [import_does_not_exist_error]. Hot path: - URL references: document link, no error. - Wildcard references: document link, no error underline for zero matches. - Import path missing: error underline, no document link. - Imported idea present: document link to that idea line. - Imported idea missing: error underline, no document link. - Same-file idea missing: error underline, no document link. - Qualified reference: document link to the file from the path token. Do not underline a missing idea yet. Background pass: - Qualified idea present: document link to that idea line. - Qualified idea missing: error underline, and remove the document link. - Drop a false missing-idea error only for the range that this pass confirms. Keep a different missing name on the same line.0.153
open_file_algorithmdoneWhen the editor opens or changes a `.rq` buffer, `reqlan-lsp` runs this sequence. Do not wait for the ideas index. Do not wait for a workspace crawl. Detail: [open_file_sequence_diagram]. Related: [open_file_reference_sequencing], [language_server_rust], [ast_lifecycle], [outbound_one_hop], [open_file_hot_path], [token_colour_sequence], [missing_reference_colour_sequence], [lazy_features_after_outbound]. The hot path finishes before the first diagnostics publish. 1. Parse this buffer once ( [ast_lifecycle] ). 2. Colour tokens from that parse ( [token_colour_sequence] ). 3. Emit same-file links and same-file missing-idea errors from that parse. 4. Parse each imported file once, at depth 1, for idea names and lines ( [outbound_one_hop] ). Link an imported name that exists. Underline an imported name that does not ( [missing_reference_colour_sequence] ). 5. Return. A qualified reference may link to its file from the path token. Do not read that file on this path. After that publish, a background pass fills the rest ( [lazy_features_after_outbound] ). That pass must not delay steps 1 – 5. The server sends the hot publish before it starts that pass. It runs that pass only while no client message waits. A hover or a definition request goes first. A change reuses the import roots loaded at open. It does not read the config again. The node engine keeps [node_engine_open_path].0.330
open_file_hot_pathin-progressOpen-file work stays on the one parse of this buffer plus one parse per imported file. Reuse that model for document links, go-to-definition, hover, and diagnostics until the text or the import-root mapping changes. Keep that model, and the import name lists, only for open editors ( [native_cache_retention] ). Look up an open import by URI. Do not match on file basename. Do not read SQLite. Do not call `list_all_ideas`. At parse time, publish lex and parse diagnostics with same-file and import errors. The editor must not wait for a workspace link phase to see a broken parse. Handlers on this path read the open model. They do not build a workspace link graph. Related: [open_file_algorithm], [outbound_one_hop], [ast_lifecycle], [comment_backlink_sequence].0.186
outbound_one_hopdoneThe hot path parses imported files only. For each import in the open buffer, parse that file once, then stop. Read idea names, idea lines, and import aliases. Do not parse files that the import references. Do not read SQLite. Prefer the open buffer text when that import is already open and dirty. Cache each parse by path plus file stamp ( modified time and size ) ( [lsp_session] ). A current stamp is one `stat`. Read and parse the file only when the stamp changed. Cache the open buffer by URI plus text fingerprint ( [open_file_hot_path] ). [local_symbolic_analysis] stays file-local. This hop is outside that extract. An extensionless import path prefers `.rq`, then the path as written ( [implicit_file_extension] ). A qualified reference that is not an import waits for [lazy_features_after_outbound]. Related: [open_file_algorithm], [non_web_reference_navigation].0.246
complementary_information_renderingThe extension should render computed information inline in the editor as complementary text. Complementary rendering should include resolved references and optionally indirect references behind a toggle. Complementary rendering should not mutate source files unless the user explicitly applies a change.0.040
traceable_inlay_hintsdoneA click on one inbound referencer opens that idea via `reqlan.openInboundReferencer` → host openIndexFile ( same path as activity-bar / index opens ). The inlay label part must not use raw LSP Location for the click gesture — Cursor rejects detached file: / / opens that Location would trigger. A click on the remainder opens the inbound summary for that idea. The backlink tooltip uses the shared document-link file URI builder ( encoded path, `#L` fragment ). The Rust server emits the same markdown tooltip and open command ( ["../support/language-server-rust.rq".language_server_rust] ). A file path with a space opens that file from the inlay click and from the tooltip. A directory segment " reqlan rq " opens that file. Implemented by ["../../../../packages/language/src/reqlan-inbound-reference-inlay-label.ts"], ["../../../../packages/language/src/reqlan-inlay-hint-provider.ts"], ["../../../../packages/language/src/reqlan-inlay-hint-settings.ts"], ["../../../../packages/extension/src/extension/register-reference-inlay-hints.ts"], ["../../../../packages/language/src/reqlan-file-link-resolver.ts"], ["../../../../packages/language/src/reqlan-path-resolve.ts"], and ["../../../../crates/reqlan-lsp/src/analysis.rs"].0.052
view_references_as_inlay_hintsdoneReferences should be shown as inlay hints in the editor. This should be a toggleable setting, which should be available in the command palette. N-lines ( configurable setting ) of hints should be shown below the idea. Inbound lookup must stay interactive on large graphs via [inbound_inlay_index_performance]. The Rust server honours `reqlan.referencesInlayHints.enabled` and the host inbound snapshot ( `byIdeaName` + `fileReferencers` ). Implemented by ["../../../../packages/language/src/reqlan-inlay-hint-provider.ts"], ["../../../../packages/language/src/reqlan-inbound-reference-inlay-label.ts"], ["../../../../packages/language/src/reqlan-inlay-hint-settings.ts"], ["../../../../packages/extension/src/extension/register-reference-inlay-hints.ts"], and ["../../../../crates/reqlan-lsp/src/session.rs"].0.093
configuration_import_root_aliasAn import path may start with an alias string, then `/`, then a relative path under that alias's import-root directory. Default alias string: `@`, written as `@/` plus a path relative to the import root. Default import-root directory: the workspace folder that contains the `.rq` file ( not the document directory ). The path after `/` is joined to that alias's import-root directory; the alias itself must be followed by `/` ( e. g. `@reqs` is not aliased ). Alias strings and import-root directories are configured as [configuration.configuration_import_roots] in the applying `.reqlan/config.json` from [configuration.configuration_location]. A configured relative `root` resolves against the base root ( parent of `.reqlan` ); an omitted `root` keeps the workspace-folder default. When several configured aliases could match a path, the longest alias wins. Related path forms: [import_paths], ["../extension/language/comment-references/functional-code-comment-references.rq".comment_reference_import_root_alias]. Completion: ["../extension/language/syntax/features-syntax.rq".code_completion]. File references and the language server use the same locate rule as ["../core_analysis/check.rq".check]: load `importRoots` from the applying `.reqlan/config.json` for the source file ( [configuration.configuration_location] ), then `resolve_rq_path` and join the workspace when the result is relative — including paths with spaces such as `["@/my file.ts"]`.0.296
import_fromFrom-import syntax uses from, a quoted path, import, and an idea name. From-import may list more than one idea. Separate the names with commas. From-import may include an alias using as. The parser records a span for the path, each idea name, and each alias. Each of those tokens is its own document link. The path links to the file. An idea name links to that declaration. An alias links to the same declaration. When the alias contains the imported idea name, Ctrl + click on a bracket reference still treats the whole alias as one link. See ["../extension/language/syntax/features-syntax-highlighting.rq".aliased_from_import_ctrl_click]. The language server uses the parser spans: ["../extension/language/support/language-server-rust.rq".language_server_rust].0.220
import_keywordsThe keywords import, from, and as are reserved for import statements. Import keywords may also appear as ordinary words in idea body text when not at statement start.0.047
import_namespaceNamespace import syntax uses import and a quoted path. Namespace import may include an alias using as. A bracket reference to the alias alone — for example `[context_model]` — opens the imported file and links only the alias name, like an ideaset namespace. Qualified references through the alias — for example `[context_model.builder]` — resolve ideas from the imported module. A qualified reference may also name an import alias bound in that module. Example: `[core_arch.analysis_runtime]` when `analysis_runtime` is an import alias in the imported file. That name is not an idea. Check does not report it as a missing idea ( ["../core_analysis/check.rq".check_qualified_missing_idea] ). A from-import of that alias is still a missing idea.0.179

Reference labels

"../../../../crates/reqlan-lsp/tests/parity.rs:anonymous_import_path_does_not_report_an_unresolved_import", "../../../../crates/reqlan-lsp/tests/parity.rs:anonymous_qualified_idea_resolves_without_an_import_statement", "../../../../crates/reqlan-lsp/tests/parity.rs:backlink_inlay_command_and_tooltip_encode_spaces_like_gotos", "../../../../crates/reqlan-lsp/tests/parity.rs:extensionless_path_confirms_the_neighbor_idea", "../../../../crates/reqlan-lsp/tests/parity.rs:formats_inbound_referencers_as_an_inlayed_attribute", "../../../../crates/reqlan-lsp/tests/parity.rs:from_import_binds_a_local_reference", "../../../../crates/reqlan-lsp/tests/parity.rs:from_import_tokens_link_independently", "../../../../crates/reqlan-lsp/tests/parity.rs:import_document_link_covers_the_path_string", "../../../../crates/reqlan-lsp/tests/parity.rs:import_root_alias_file_refs_match_check", "../../../../crates/reqlan-lsp/tests/parity.rs:import_root_config_file_refs_match_check", "../../../../crates/reqlan-lsp/tests/parity.rs:missing_file_references_do_not_produce_document_links", "../../../../crates/reqlan-lsp/tests/parity.rs:namespace_alias_is_a_file_link", "../../../../crates/reqlan-lsp/tests/parity.rs:namespace_drill_links_each_segment", "../../../../crates/reqlan-lsp/tests/parity.rs:namespace_drill_missing_leaf_is_unresolved", "../../../../crates/reqlan-lsp/tests/parity.rs:omits_the_inlay_when_there_are_no_inbound_referencers", "../../../../crates/reqlan-lsp/tests/parity.rs:quoted_path_reaches_an_idea_that_is_not_from_imported", "../../../../crates/reqlan-lsp/tests/parity.rs:reports_an_error_when_an_import_path_file_does_not_exist", "../../../../crates/reqlan-lsp/tests/parity.rs:reports_an_error_when_an_imported_idea_does_not_exist", "../../../../crates/reqlan-lsp/tests/parity.rs:same_file_idea_references_produce_document_links", "../../../../crates/reqlan-lsp/tests/parity.rs:truncates_long_referencer_lists_with_a_remainder_suffix", "../../../crates/reqlan-lsp/tests/parity.rs:import_root_config_file_refs_match_check", "../../crates/reqlan-lsp/tests/parity.rs:from_import_tokens_link_independently", "../../crates/reqlan-lsp/tests/parity.rs:golden_corpus_import_alias_is_not_an_unresolved_idea", "../../crates/reqlan-lsp/tests/parity.rs:import_root_alias_file_refs_match_check", "../../crates/reqlan-lsp/tests/parity.rs:import_root_config_file_refs_match_check", ../../../../crates/reqlan-lsp/tests/parity.rs:anonymous_import_path_does_not_report_an_unresolved_import, ../../../../crates/reqlan-lsp/tests/parity.rs:anonymous_qualified_idea_resolves_without_an_import_statement, ../../../../crates/reqlan-lsp/tests/parity.rs:backlink_inlay_command_and_tooltip_encode_spaces_like_gotos, ../../../../crates/reqlan-lsp/tests/parity.rs:extensionless_path_confirms_the_neighbor_idea, ../../../../crates/reqlan-lsp/tests/parity.rs:formats_inbound_referencers_as_an_inlayed_attribute, ../../../../crates/reqlan-lsp/tests/parity.rs:from_import_binds_a_local_reference, ../../../../crates/reqlan-lsp/tests/parity.rs:from_import_tokens_link_independently, ../../../../crates/reqlan-lsp/tests/parity.rs:import_document_link_covers_the_path_string, ../../../../crates/reqlan-lsp/tests/parity.rs:import_root_alias_file_refs_match_check, ../../../../crates/reqlan-lsp/tests/parity.rs:import_root_config_file_refs_match_check, ../../../../crates/reqlan-lsp/tests/parity.rs:missing_file_references_do_not_produce_document_links, ../../../../crates/reqlan-lsp/tests/parity.rs:namespace_alias_is_a_file_link, ../../../../crates/reqlan-lsp/tests/parity.rs:namespace_drill_links_each_segment, ../../../../crates/reqlan-lsp/tests/parity.rs:namespace_drill_missing_leaf_is_unresolved, ../../../../crates/reqlan-lsp/tests/parity.rs:omits_the_inlay_when_there_are_no_inbound_referencers, ../../../../crates/reqlan-lsp/tests/parity.rs:quoted_path_reaches_an_idea_that_is_not_from_imported, ../../../../crates/reqlan-lsp/tests/parity.rs:reports_an_error_when_an_import_path_file_does_not_exist, ../../../../crates/reqlan-lsp/tests/parity.rs:reports_an_error_when_an_imported_idea_does_not_exist, ../../../../crates/reqlan-lsp/tests/parity.rs:same_file_idea_references_produce_document_links, ../../../../crates/reqlan-lsp/tests/parity.rs:truncates_long_referencer_lists_with_a_remainder_suffix, ../../../crates/reqlan-lsp/tests/parity.rs:import_root_config_file_refs_match_check, ../../crates/reqlan-lsp/tests/parity.rs:from_import_tokens_link_independently, ../../crates/reqlan-lsp/tests/parity.rs:golden_corpus_import_alias_is_not_an_unresolved_idea, ../../crates/reqlan-lsp/tests/parity.rs:import_root_alias_file_refs_match_check, ../../crates/reqlan-lsp/tests/parity.rs:import_root_config_file_refs_match_check