← All work
Open Source2026 / 01

Ravel

A CRAN-published RStudio copilot used by 2,000+ people that understands the active analysis and keeps every proposed code or file action visible and reviewable.

RRStudioOpenAI APIQuarto
Source & deliverables
CRANaccepted package
2,000+package users
MCPremote declarations
Safestaged actions
01 / Context

The question
behind the work.

Generic AI chat tools do not understand the active RStudio session, and tools that can modify code create a second problem: an analyst must be able to inspect and control every proposed action.

My role

I designed, implemented, documented, tested, submitted, and now maintain the R package. That includes RStudio addins, context collection, provider integrations, model interpretation, staged actions, project-root safety, Quarto support, pkgdown documentation, and CRAN release work.

02 / Implementation

What I built.

Ravel collects explicit project context, supports model interpretation and Quarto drafting, and stages changes for approval rather than quietly modifying an analyst's work.

  • Collected active editor code, selections, loaded objects, console output, plots, project files, package metadata, and git state through explicit RStudio-aware helpers.
  • Added official API and CLI integrations for multiple providers, including OpenAI Responses API support and remote MCP declarations.
  • Built preview-first code and file actions with approval history and default blocking of writes outside the detected project root.
  • Added interpretation helpers for lm and glm workflows plus Quarto drafting for methods, results, diagnostics, and interpretation.
  • Published an installable package, reference site, articles, release assets, and cross-platform checks.
03 / In detail

Built inside the analyst's workspace

Ravel lives in the place where statistical work already happens. It can collect selected code, active editor content, loaded objects, console output, plots, project files, package metadata, and git state through explicit RStudio-aware helpers.

That context supports code explanation, debugging, model interpretation, modeling comparisons, and Quarto drafting without making an analyst reconstruct the project in a separate chat window.

Actions stay reviewable

I built preview-first code and file actions so an analyst can inspect a proposed change before it is applied. Ravel records approval history and blocks writes outside the detected project root unless the user explicitly allows them.

The package also includes helpers for lm and glm interpretation, Quarto methods and results drafting, provider configuration, and remote MCP declarations. The useful parts of AI assistance stay close to reproducible analysis work.

A published CRAN release

Ravel is published on CRAN, has reached 2,000+ users, and installs through install.packages('ravel'). I prepared the documentation, test suite, examples, release assets, pkgdown site, GitHub Actions matrix, and submission materials as part of the package itself.

Version 0.1.2 added OpenAI Responses API support, remote MCP declarations, refreshed provider defaults, and stronger file-action controls. The release passed checks across Windows, macOS, Ubuntu release, and Ubuntu devel.

04 / Engineering judgment

The decisions
that shaped it.

  1. Used explicit context collection rather than quietly sending an entire project to a provider.
  2. Staged every mutating action for review and avoided .GlobalEnv execution unless a user requests it.
  3. Kept network-backed providers out of examples and tests to meet CRAN expectations and maintain deterministic checks.
  4. Added MCP capability without a new required dependency, preserving a light installation path.

Evaluation & results

Ravel is published on CRAN, has reached 2,000+ users, and installs through install.packages('ravel'). Version 0.1.2 passed the GitHub Actions matrix on Windows, macOS, Ubuntu release, and Ubuntu devel. The submitted package checks reported zero errors, zero warnings, and one note.

05 / Working outputs

See it for yourself.

Select an image to view it at full size.

06 / Artifacts

Take a closer look.

01CRAN package02Package website03GitHub repository04Reference documentation
Next projectConstrained Compiler