Cluster detail
reqlan rq/cli
Ideas located under folder reqlan rq/cli.
folder
21 ideas
3 files
| Idea | File | Status | Summary | Katz |
|---|---|---|---|---|
| architecture | reqlan rq/cli/cli_package.rq | done | The cli should be a thin wrapper around `@reqlan/analytical/core` ( Rust engine ). `search` / `analyse` / `export` / `init` / `parse` must not load `@reqlan/language`. `barrel` may dynamically import the Langium barrel helper because page splits stay JS text edits ( ["../core_analysis/rust_port.rq".native_bridge] ). | 0.088 |
| cli_package | reqlan rq/cli/cli_package.rq | `packages/cli` ( `@reqlan/cli` ) is the Clipanion CLI published to npm as the `reqlan` ( and `rq` ) binary. Headless commands go through the core analytical engine ( `@reqlan/analytical/core` / `reqlan-napi` ), not Langium. Entry: ["../../packages/cli/src/main.ts"] via ["../../packages/cli/bin/cli.js"] ( [windows_esm_entry] ). Analysis commands reuse [application_memory] ( `<base>/.reqlan` ) and the analytical ["../indexer/indexer.rq".index] so the CLI shares the ideas index with the extension and MCP. | 0.214 | |
| commands | reqlan rq/cli/cli_package.rq | Minimal commands: - `parse <file>` — parse one `.rq` file via the core engine `parseReqlanSource` ( Rust `reqlan-parse` ); print diagnostics or an AST summary ( `--json` for machine output ). - `analyse` / `analyze` — file ( `--file` ), idea ( `--idea` ), workspace completion ( default ), local symbolic ( `--local-symbolic <file>`: outbound + same-file inbound, no index — ["../indexer/indexer.rq".local_symbolic_analysis] ), or broken references ( `--broken-refs` ) via `AnalysisApi`. `--glob` limits `--broken-refs` to a path subset of the base. `--include-comments` adds unresolved ["../language/syntax.rq".comment_reference] sites ( ["../core_analysis/core.rq".test_references] ). - `search <query>` — semantic search via `AnalysisApi.searchRequirements`. Repeatable `--context <path|path#idea|name>` biases ranking by graph hop distance ( ["../core_analysis/search.rq".contextual_search] ). - `click <target>` — compact local context for an idea, `.rq` file, or indexed code file via `AnalysisApi.click` ( ["./click.rq".click] ). No match uses search; more than one match is ranked by session distance. Optional `--session` continues a click session. `--max-backlinks` / `--max-siblings` / `--max-outbound` / `--max-candidates` cap lists. - `export` / `export html` — multi-file HTML site via `NativeAnalysisApi.exportHtml` ( [html_export.html_export] ). `--exclude-secret` omits `*.secret.rq`. `--exclude-ignored` omits paths matched by `.reqlan/.rqignore`. `--url-base` mounts root-relative hrefs per [html_export.html_export_url_base]. `--header-href` / `--header-label` set the topbar home link per [html_export.html_export_header_link]. - `init [directory]` — create a new [base] marker ( `.reqlan` ) at the given path or cwd ( [init] ). - `check` — CI wrapper around ["../core_analysis/core.rq".index] unresolved references ( ["../core_analysis/check.rq".check] ). Reports broken idea, comment, file, and import references ( ["../core_analysis/check.rq".check_unresolved_imports] ). Skips lines after ["../language/syntax.rq".comment_reference_ignore]. Repeatable `--glob <pattern>` limits the recursive scan to files that match any pattern ( ["../core_analysis/check.rq".check_glob_patterns] ). One `--glob` selects the same files as one path glob. A positional file outside those patterns is checked as that file. A positional directory outside those patterns is not walked. `--json` / `--pipe` select machine output. Exit status is 1 when the command finds issues. Issue order groups shared missing targets ( ["../core_analysis/check.rq".check_order_by_target] ). `--wildcard-zero` / `--wildcard-one` are `warn` ( default ), `error`, or `off` ( ["../core_analysis/check.rq".check_wildcard_zero], ["../core_analysis/check.rq".check_wildcard_one] ). Repeatable `--skip-target <glob>` omits issues whose missing target matches the glob ( ["../core_analysis/check.rq".check_skip_targets] ). `--skip-gitignored-targets` omits file-reference issues whose missing target is gitignored ( ["../core_analysis/check.rq".check_skip_gitignored_targets] ). - `barrel <file>` — split a large `.rq` page into one file per idea and a container import page ( ["../extension/host/features-commands.rq".barrel_page] ). - `diff [<from>] [<to>]` — compare ideas between two git revisions ( ["./diff.rq".diff] ). No arguments compare pending `.rq` edits with `HEAD`, or `HEAD~1` with `HEAD` when those edits are absent. `--verbosity` is `summary` ( default ), `references`, or `text`. `--json` prints the same rows as MCP. Extra args from `pnpm run`: [pnpm_extra_args]. | 0.760 | |
| function_parity | reqlan rq/cli/cli_package.rq | done | CLI shares headless function definitions with MCP and other tools through `@reqlan/analytical` `AnalysisApi`, not VS Code host APIs from [extension]. On-disk index storage follows [application_memory] ( same `.reqlan` path as the extension ); optional override via `REQLAN_INDEX_PATH`. | 0.154 |
| init | reqlan rq/cli/cli_package.rq | done | The cli should be able to initialise a new [base]. Creates `<path>/.reqlan/` ( empty directory is a valid marker ), matching [create_base_onboarding]. Headless helper lives in `@reqlan/analytical` so CLI and extension share one create-base path. | 0.162 |
| pnpm_extra_args | reqlan rq/cli/cli_package.rq | done | `pnpm run <script> -- <flags>` inserts a lone `--` between the script body and the extra flags. Clipanion treats `--` as end of options, so `reqlan check -- --skip-target glob` reads `--skip-target` as a command and fails. The CLI drops lone `--` tokens from argv before Clipanion runs, so package-manager extra args stay flags. Related: [commands] ["../core_analysis/check.rq".check_meta_implementation] | 0.142 |
| watch | reqlan rq/cli/cli_package.rq | The cli should be able to watch a base and maintain the index as files change. | 0.040 | |
| windows_esm_entry | reqlan rq/cli/cli_package.rq | done | Node's ESM loader on Windows requires `file://` URLs for absolute dynamic `import()`. A native path such as `C:\...\out\main.js` is read as protocol `c:` and crashes every command, including `init`. `bin/cli.js` converts the compiled entry with `fsPathToEsmSpecifier` ( `pathToFileURL` ). The MCP stdio entry ["../../packages/mcp/bin/mcp.js"] uses the same `pathToFileURL` conversion. | 0.083 |
| agent_advisory | reqlan rq/cli/click.rq | done | Agents must pass the [click_session] ID ( `sessionKey` ) to the next click action. This keeps one agent thread on the same session so a revisit can expand connected content and so ranking can use session distance. MCP tool text states this rule and the unique / ambiguous / search paths clearly ( [mcp_server] `click` ). | 0.101 |
| click | reqlan rq/cli/click.rq | 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 | reqlan rq/cli/click.rq | 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 | reqlan rq/cli/click.rq | 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 | reqlan rq/cli/click.rq | 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 | reqlan rq/cli/click.rq | 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 | reqlan rq/cli/click.rq | 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 | reqlan rq/cli/click.rq | 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 | reqlan rq/cli/click.rq | 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 |
| diff | reqlan rq/cli/diff.rq | done | Compare ideas in two git snapshots. The key is the file path plus the [idea_name]. The command reads `.rq` files from git and parses each snapshot. It does not read or write the ideas index. Line position does not count. The same body and attributes at a different line are unchanged. Content is the idea body plus its attributes. Change kinds: - created — the key exists only on the right snapshot - deleted — the key exists only on the left snapshot - modified — the key exists on both snapshots and the content differs - moved — the name exists in exactly one file on each side, the paths differ, and the content is the same The same name in more than one file on one side stays on the path-plus-name key. A renamed idea is deleted plus created. Unchanged ideas are omitted. A reference-only edit stays modified. No arguments: if any `.rq` path is staged, unstaged, or untracked and not gitignored, the left side is `HEAD` and the right side is that pending snapshot. Otherwise the left side is `HEAD~1` and the right side is `HEAD`. A non- `.rq` change does not select the pending snapshot. One argument: that revision against `HEAD`. Two arguments: the first revision against the second. A target is a branch, a commit, `HEAD`, `~N` ( `HEAD~N` ), or `<rev>~N`. The pending snapshot uses the working-tree file for an unstaged edit, the index blob when the working tree matches `HEAD`, and the working-tree file when a path is both staged and unstaged. An untracked `.rq` file that git does not ignore is included. If `HEAD` has no parent, the left snapshot is empty and every idea on `HEAD` is created. A missing revision or a directory that is not a git repository is an error. Exit status is 2. A successful diff exits 0, including an empty diff. When a side is filled by a default, the human CLI and [diff_webview] print a header `Comparing <from> -> <to>` before the rows. Explicit two-argument runs omit that header. `--json` and MCP stay a row array only. Surfaces: CLI `reqlan diff` ( [commands] ), MCP [skills_and_mcp.mcp_diff], and [diff_webview]. Engine: ["../../crates/reqlan-analytical/src/diff.rs"]. Git spawns stay hidden ( [consumption_silence] ). Related: [architecture] [function_parity] [idea] [idea_reference] [diff_verbosity] [diff_cli_color] | 0.163 |
| diff_cli_color | reqlan rq/cli/diff.rq | done | Color the human text when stdout is a terminal and `NO_COLOR` is unset. `--color` forces color. `--no-color` forces plain text. `--json` is never colored. Created and added lines are green. Deleted and removed lines are red. Modified is yellow. Moved is cyan. | 0.061 |
| diff_verbosity | reqlan rq/cli/diff.rq | done | Three levels. The default is summary. CLI: `--verbosity summary|references|text`, or `-v` / `-vv`. MCP and [diff_webview] use the same three values. - summary — change kind, idea name, and file. `fromFile` only for moved. - references — summary, plus [idea_reference] targets added on the right and removed from the left. Order each list by name. Omit a target that is on both sides. - text — summary, plus the body and attributes before and after. Created shows the right side. Deleted shows the left side. Modified shows both. Moved has no text change. Do not list reference names at this level. Attributes stay inside modified. The references level does not print attribute text. The text level prints body lines, then attribute lines as `@name` / `@name value`. `--json` omits `references` and `text` at summary. It adds `references` at references only. It adds `text` at text only. | 0.071 |
| diff_webview | reqlan rq/cli/diff.rq | done | Command palette title Diff Ideas, category reqlan, id `reqlan.diffIdeas` ( [features_commands.command_palette] ). The panel takes the same two targets and the same verbosity as [diff]. Controls sit in a sticky themed strip: From, To, Detail, Diff. Inputs and the primary button use editor input and button theme tokens. Enter in a control runs Diff. The panel runs once on open with empty targets. Each row uses the editor git decoration colors for created, deleted, and modified, and a distinct color for moved. A row shows kind, idea name, and path as separate fields. Moved shows both paths. The references level lists added and removed reference names. The text level shows monospaced before and after body blocks; modified uses a two-column layout when width allows. Empty results say there are no idea changes. Errors use validation theme colors. Diffing disables the Diff control and shows a loading status. The panel calls the shared engine. It does not parse git output. When a side uses a default, the panel shows the same `Comparing <from> -> <to>` header as the CLI under the strip. | 0.083 |
Cluster graph
Initialising graph…