Code reference detail
context-model.ts
packages/analytical/src/core/context-model.ts
| Idea | Status | Tags | Summary |
|---|---|---|---|
| current_file_pane | Primary contextual pane when a. rq file is active. Sub-sections may collapse independently. [scope_pane] [reference_lists_pane] [parent_nodes_pane] | ||
| git_history_lens | done | Expanded git dimension in [scope_pane]: focus-centric development history, not a Source Control duplicate. Layout: - Header: branch name, HEAD short hash, muted summary ( e. g. " main · 3 commits · 2 authors " ). - Focus history ( primary ): up to ~ 8 commits touching the focus file / idea line range — relative time, short hash, subject, author. Prefer `git log -L` for `.rq` ideas; fall back to path log. Non-. rq uses path `--follow`. - Authors: compact chip row of top authors from that log window. - Working tree ( secondary, collapsed by default ): dirty staged / unstaged paths for caution / footprint only. Focus hero: history cue ( last commit age / branch ), not `git: staged|unstaged`. Fingerprint Git axis and drilldown list commits / authors ( dirty paths secondary ) per [fingerprint_axis_drilldown] and [tooltip_detail]. Aligns with ["../context-scope.rq".git_context] and [context_scope_v2.development_history_signals]. Implemented by [ScopePane] [ContextFingerprint]. | |
| context_model_layers | done | Canonical v2 layers. Implementation builds on [context_scope_v1.reqlan_context_model]; consumers must not reconstruct project understanding independently. | |
| context_scope_v2 | in-progress | context, ui, knowledge, v2 | Evolves [context_scope_v1.context_scope] from a * * source-oriented * * model ( " where did this context come from? " ) to a * * decision-oriented * * model ( " what information helps a human or AI make the next decision? " ). v1 [context_scope_v1.context_dimensions] remain valid * producers * ( workspace, current file, open files, file history, edit history, manual, git ). v2 separates those producers from extracted signals, synthesized knowledge, presentation views, and consumers — so new analyses can be added without inventing new dimensions each time. Primary UI principle: [ui.show_dont_tell] — make project health, momentum, relationships, and intent legible at a glance. Host fact chips ( " 17 modified files " ) remain useful; widgets below are the preferred default for conveying meaning. Surfaces: extend [activitybar.scope_pane] / [context_scope_v1.scope_pane_design], Ideas Summary ( [ideas_summary_doc.ideas_summary] ), and graph overlays ( [graphical_graph_doc.graphical_graph] ) — same signals, different projections. |
| context_scope | Reqlan sidebar and AI workflows reason about a composed [reqlan_context_model], not a single " current file " blob. Context applies to * * any workspace file * *, not only `.rq` sources — see [any_file_scope]. Context is built from orthogonal [context_dimensions] that the user can enable, pin, or collapse. The activity bar [activitybar.scope_pane] is the primary surface for inspecting and steering context; [activitybar.context_tray] holds the [manual_context] dimension. Token discipline per [features_ai.ai_integration]: show summaries and counts by default; expand a dimension only on intent. Parses per ["../../../reqlan rq/language/syntax.rq".reference_wikilink]. Decision-oriented v2 ( sources → signals → synthesis → views → consumers ) and show-don ' t-tell widgets: [context_scope_v2.context_scope_v2]. | ||
| reqlan_context_model | Canonical composed context per [analytical_context_model]. Implementation: [context_model]. - [context_focus] is the single anchor ( idea, file, selection, or none ). - [context_dimensions] each contribute [context_contribution] records with counts and summary lines. - [context_footprint] merges enabled dimensions into deduped idea / file sets and an [effective_center_id] for graph / refs panes. - [current_file_slice] is the projection used when the current-file lens is expanded. Includes `isRqFile`, `referencingIdeas`, `commentLinkedIdeas`, `folderReferencingIdeas`, and optional `gitChange`. - [context_selection] when the user highlights a non-empty range spanning one or more `.rq` ideas ( [activitybar.selection_pane] ). - [global_hop_depth] and [dimension_hop_control] overrides on the model. Host increments `revision` when any dimension or hop depth changes; webview ignores stale posts by revision. |
Reference labels
../../../../packages/analytical/src/core/context-model.ts, ../../../packages/analytical/src/core/context-model.ts, analytical_context_model