Skip to contents

rrlmgraph (development version)

Documentation

  • compute_relevance(): added a @note paragraph explaining that the MCP server’s TypeScript BFS uses a depth-penalty signal in place of the co-change signal because CO_CHANGES edge weights are not stored in the exported SQLite schema. Closes mcp#41.
  • vignettes/mcp-integration.Rmd: replaced the Available MCP tools table with the complete, correctly-named 8-tool set; previous table listed 4 wrong names (get_node, list_nodes, get_neighbours, graph_stats) and omitted find_callees, search_nodes, add_task_trace, and rebuild_graph. Closes #91.
  • vignettes/benchmark-results.Rmd: fixed stale strategy-name literals "rrlmgraph" / "rrlmgraph_mcp" in both plot chunks; correct names are "graph_rag_tfidf" / "graph_rag_mcp", so all data points were rendering grey. Closes #92.
  • vignettes/benchmark-results.Rmd: corrected column names in the summary-table, score-plot, and pairwise code chunks to match the actual output of rrlmgraphbench::compute_benchmark_statistics(): ci_lowerci_lo_95, ci_upperci_hi_95, mean_tokensmean_total_tokens, n_obsn, strategy_a / strategy_bstrategy_1 / strategy_2. Added inline derivation of a significant column (absent from the function’s return value). Fixed prose reference detect_hallucination()count_hallucinations(). Closes #93.
  • vignettes/mcp-integration.Rmd: corrected CLI flag --db--db-path, file extension graph.dbgraph.sqlite throughout (architecture diagram, npx example, VS Code JSON config), and added the required db_path argument to both export_to_sqlite() calls. Closes #94.

CI / Security

  • All GitHub Actions workflows are now pinned to full commit SHA digests instead of mutable @v4/@v2 tags, eliminating the supply-chain risk described in OWASP A06. Closes #90.

rrlmgraph 0.1.3

Bug fixes

  • export_to_sqlite(): .upsert_nodes() was reading the non-existent vertex attribute task_weight instead of the actual task_trace_weight attribute written by log_task_trace(). Every exported task_weight value was NA, silently breaking the feedback loop that re-ranks nodes after task completion (#89).
  • task_trace_weight cold-start default changed from 0.5 to 0.0 (#78). Previously the very first BFS when task_trace_weight was uninitialized boosted all neighbours equally (0.5), causing spoke nodes to score above min_relevance even when unrelated to the query, inflating context size. The new default keeps spoke influence at zero until an explicit weight is provided.

rrlmgraph 0.1.2

New vignettes

  • LLM Chat with Context (vignettes/llm-chat.Rmd): shows real model responses loaded from a pre-captured RDS — no API key required to read the vignette.
  • Benchmark Results (vignettes/benchmark-results.Rmd): compares the eight context-retrieval strategies from rrlmgraph-bench with summary tables and a score plot.
  • MCP Server Integration (vignettes/mcp-integration.Rmd): narrative guide and VS Code configuration for the rrlmgraph-mcp companion.

Infrastructure

  • Added .github/workflows/precompute-vignettes.yml (workflow_dispatch): calls GitHub Models once, serialises LLM responses and benchmark statistics to vignettes/precomputed/, then triggers a pkgdown site rebuild.

rrlmgraph 0.1.1

Bug fixes

  • extract_function_nodes() / .make_node(): node IDs now include the parent directory name as a prefix (e.g. "R/utils::fn" instead of "utils::fn"), matching the seed-node format used by the benchmark task definitions. Previously, query_context() would abort with “seed_node not in graph” for any benchmark task, leaving retrieved_n = 0 for the rrlmgraph_tfidf strategy on every trial (#78).

rrlmgraph 0.1.0

First release.

Improvements

  • plot.rrlm_graph(): replaced the static igraph::plot.igraph() backend with an interactive Graphviz widget via DiagrammeR::grViz(). Nodes are grouped into dashed sub-graph boxes by source file, coloured by node type, and sized by PageRank. The widget renders in the RStudio Viewer or any browser with full pan-and-zoom support (scroll to zoom centred on cursor, drag to pan, pinch on touch devices, double-click to reset) via injected vanilla JS – no CDN or plugin required. A new layout parameter selects the Graphviz engine ("dot" hierarchical, "neato", "fdp", "sfdp", "circo"); a new file parameter saves to .html (via htmlwidgets) or to .png/.pdf/.svg (via webshot2).
  • Vignette figure size increased to 10 × 8 inches.

Original first-release notes

  • R CMD check --as-cran: zero errors, zero warnings verified across ubuntu/windows/macos x R release/oldrel/devel (#25).
  • DESCRIPTION: added BugReports URL and spelling to Suggests.
  • inst/WORDLIST: package-specific technical terms registered to pass spelling::spell_check_package() cleanly.
  • CI: added spelling check step after devtools::document() (#25).

Breaking changes

  • chat_with_context(): the model parameter is now NULL by default (was "gpt-4o-mini"). A per-provider sensible default is applied automatically. Code that passed model explicitly is unaffected.

Improvements

  • chat_with_context() gains a provider argument ("openai", "ollama", "github", "anthropic"). When ellmer is installed the appropriate ellmer::chat_*() backend is used; the httr2 fallback is retained for provider = "openai" when ellmer is absent (#41).
  • ollama_available() no longer requires the ollamar package. It now pings the Ollama REST API directly via httr2 (GET /api/tags). Set OLLAMA_BASE_URL to override the default http://localhost:11434 (#40).
  • Ollama embedding calls (embed_nodes(), embed_query()) now hit POST /api/embed directly via httr2, removing the ollamar dependency entirely (#40).

Bug fixes

  • R/parse_ast.R: as.character(expr[[1L]]) now guarded with an extra [[1L]] so that namespace-qualified calls (pkg::fn) no longer produce a length-3 character vector, which previously caused a “condition has length > 1” crash when building the graph. Same guard added in .collect_nse_symbols() and .find_qualified_calls(). R6Class detection changed to use %in% rather than == for robustness against multi-element vectors.
  • R/graph_build.R: build_test_edges() now skips unresolvable bare names instead of throwing “subscript out of bounds” when a called symbol does not appear in the function-node index.
  • NAMESPACE: restored S3method() registrations for plot.rrlm_graph, print.rrlm_graph, summary.rrlm_graph, print.rrlm_context, and summary.rrlm_context. Previously the file listed plain export() entries, which broke S3 dispatch so igraph methods were called instead. A new R/imports.R carrying all @importFrom roxygen tags ensures devtools::document() regenerates the full importFrom() block.
  • print.rrlm_graph(), summary.rrlm_graph(): replaced cli::cli_*() calls with cat() so output is captured by capture.output() in tests and pipe operators work correctly.
  • inst/WORDLIST: added centres, cex, Kamada, Kawai to silence spelling::spell_check_package() failures in CI.
  • tests/testthat/test-parse-ast.R: fixed write_r_file() helper so the temporary file outlives the helper call (was deleted immediately by withr::local_tempfile(); now uses tempfile() + withr::defer(..., envir = parent.frame())).
  • tests/testthat/test-s3-methods.R: replaced igraph::V(g)$attr <- NULL with igraph::delete_vertex_attr() / igraph::delete_edge_attr() to match the igraph 2.x API.

New features

Graph construction

Querying and context assembly

Embedding

LLM interface

  • chat_with_context() – chat with an LLM using graph-derived context; uses ellmer when installed, falls back to httr2.

Task learning

Cache and export

Project detection

Instructions

S3 methods