Code reference detail
click.rs
reqlan rq/cli/crates/reqlan-analytical/tests/click.rs
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| click | done | The [click_ontology] function returns compact local context for one target. Input: an idea name, a `path#idea` ref, a `.rq` file path, or an indexed code file ( [click_input], [click_code_file] ). Resolution uses [click_ambiguity]: no match uses search; more than one match is ranked; one match uses [click_output]. Optional [click_max_detail] flags cap how many names and bodies are listed. Optional `sessionKey` continues a [click_session]. A second click on a centre already clicked in that session returns the connected content ( [click_session] ). Surfaces: CLI `reqlan click` ( [click_cli] ), MCP `click` ( [mcp_server] ), and [native_analysis_api] `click`. MCP search and retrieval use this tool only ( ["../extension/agent/skills-and-mcp.rq".mcp_click_retrieval] ). Engine: [click_rust] on ["./cli_package.rq".architecture] / ["../core_analysis/rust_port.rq".analytical_rust_port]. Related: [function_parity], [commands], [agent_advisory], [click_session], [click_input], [click_max_detail], [click_output]. | 0.200 | |
| click_ambiguity | done | Engine function that classifies a name or target as none, unique, or ambiguous. A name is ambiguous when more than one indexed idea or indexed file shares that exact name. Names are unique inside one file ( [idea_name] ); ambiguity is across files. `path#idea` and a full indexed path are unique when that record exists. Click uses this function to choose the [click_input] path and to decide when [click_output] prints a file path next to a name. Outbound [wildcard_reference] targets are ambiguous: print their matching paths. Surfaces: AnalysisApi `checkNameAmbiguity` ( engine ). Click must call it. CLI / MCP exposure is not required. | 0.103 | |
| click_code_file | done | An indexed code file is a first-class click target ( [index_code_files], [referenced_files] ). Click accepts the same path forms as [file_search] ( relative path, basename when unique ). Unique output for a code file: - the file path ( no idea body ) - count and names of backlinks: ideas with a [file_reference] to this file; print the idea file when the name is ambiguous - count and names of [comment_reference] targets ( `comment_link` from this file ); print the idea file when the name is ambiguous - siblings do not apply Data is the same indexed edges as [file_related_requirements]. | 0.195 | |
| click_input | done | Accept any of: - idea name ( trimmed optional surrounding brackets `[name]` ) - `path#idea` ( indexed file URI + idea name ) — this form is unique - `.rq` file path — the file is one centre, not every idea in the file - indexed code file path ( [click_code_file] ) Resolution uses [click_ambiguity] after the same ref normalisation as ( ["../core_analysis/search.rq".contextual_search] / `resolve_search_context_refs` ). When no centre matches, click uses [fuzzy_search] ( and [file_search] ) with the target as the query and returns those hits. Do not return an empty slice. When more than one centre matches, and the [click_session] already has ideas, rank the matches by undirected hop distance from those ideas ( [idea_graph_distance] / [contextual_search] ). Nearer ranks first. Put the hop count on each candidate. When there is no session key, or the session has no ideas yet, do not calculate hop distance. Do not print hops. Rank by name and file path. On the search path, rank by [fuzzy_search] score only. When exactly one centre matches, return [click_output]. Always return or create a [click_session] key. | 0.156 | |
| click_max_detail | done | Flags that cap how many names and bodies click lists. Invalid or missing values use the default. Values less than 1 use 1. Defaults live in `.reqlan/config.json` under `click` ( [configuration_location], [configuration_schema_file] ). CLI and MCP flags override config. - `maxBacklinks` / `--max-backlinks` / `click.maxBacklinks` — first n backlink names in [click_output], then " + m more ". - `maxSiblings` / `--max-siblings` / `click.maxSiblings` — first n sibling names, then " + m more ". - `maxOutbound` / `--max-outbound` / `click.maxOutbound` — first n outbound names or paths, then " + m more ". - `maxCandidates` / `--max-candidates` / `click.maxCandidates` — search hits and ranked ambiguous matches. The default for each list is `click.listLimit` in ["../../packages/analytical/src/core/defaults.json"]. `maxDetail` / `--max-detail` is the old hop-depth for a neighbourhood dump. Unique [click_output] does not use hop depth. The flag is still accepted and ignored on the unique path. | 0.122 | |
| click_output | done | The result always includes `sessionKey` ( [agent_advisory] ). The result does not include an `edges` list. Links are implied by the lists below. Shape depends on [click_input]: Unique ( one centre ): - the idea ( or file ) and its content ( indexed unmarked body / summary ) - count of outbound links from that content only: idea refs and [file_reference] that occur in the unmarked body. Do not list refs that occur only in `@tests`, `@implementation`, or `@todo`. Do not list [comment_reference] code files as outbound. List names. When [click_ambiguity] says the name is ambiguous, print the file path with the name. File names are unquoted basenames. - count of backlinks and the first n names ( [click_max_detail] ); print the file when the name is ambiguous or shared; then " + m more " for the remainder - count of siblings ( same [ideaset] / file ), not the ideas named in the content, and the first n names, with file when the name is ambiguous or shared - for a code-file centre, see [click_code_file] Ambiguous ( more than one match ): ranked candidate names with file paths. Include hop distance only when the session has prior ideas. No idea bodies. Cap with `maxCandidates`. Search ( no exact match ): [fuzzy_search] / [file_search] hits. Cap with `maxCandidates`. Revisit: see [click_session]. Show content of the connected nodes, not the centre body again. | 0.117 | |
| click_session | done | Click sessions live in SQLite under [application_memory] as `click-sessions.sqlite` ( sibling of `ideas-index.sqlite`; not deleted by ideas-index rebuild ). Each session has a stable `sessionKey`. Sessions are keyed against ideas. Each surfaced idea stores a fingerprint of its name, summary, status, and tags. When that fingerprint changes, the idea may resurface on the next click. Record clicked centres ( unique or revisit targets ) separately from names that were only listed. When the target is a centre already clicked in this session, return the content of the connected nodes ( outbound, backlinks, and siblings that the first click listed ), capped by [click_max_detail]. Do not repeat the centre body. Do not return an empty suppressed slice. Skip a connected body that this session already showed as content, unless its fingerprint changed. Session cache size is [click_session_limit]. Eviction uses last-touched order: when the store exceeds the limit, drop the least recently touched sessions first. Touch the active session on every successful click. Path helper: ["../../packages/analytical/src/core/application-memory.ts"] / [click_sessions_rust]. Layout: ["../indexer/sidecars.rq".reqlan_directory_layout]. | 0.225 | |
| click_session_limit | done | Maximum stored click sessions per base is `click.maxSessions` in ["../../packages/analytical/src/core/defaults.json"]. Configure with `click.maxSessions` in `.reqlan/config.json` ( [configuration_location], [configuration_schema_file] ). Invalid or missing values use that default. Values below `click.minimum` use `click.minimum`. Eviction is by session count and last-touched time ( [click_session] ). Count caps for one click result are [click_max_detail], not this limit. | 0.070 |
Reference labels
click, click_ambiguity, click_code_file, click_input, click_max_detail, click_output, click_session, click_session_limit