package crs

  1. Overview
  2. Docs
A tool for managing code review comments embedded in source code

Install

Dune Dependency

Authors

Maintainers

Sources

crs-0.0.20250620.tbz
sha256=c9639ddde0d9126acf847a7b27a84db161b2bfbb7d3c69bba88a4fcfe1d3db21
sha512=34cfa8d001b5f8a87bdf3b78c15150f338c99cb575e8c85e6c398381f953727e0a0267c564d757330e28a57a5eedc27cb72681f82833197b17fa8d1c28a2df05

Description

The [crs] package provides libraries and a CLI to help manage code review comments embedded directly in source code using a specialized syntax.

With [crs] you can locate, parse, and manipulate these comments easily, and perform tasks such as systematically updating comments across multiple files, changing their priority, marking them as resolved, modifying reporter or assignee information, and more.

This tool can be used during development or integrated into your CI pipeline. For example, you can use [crs] to ensure no unresolved comments remain before merging a pull request or releasing a new version of your software.

Beyond its standalone functionality, [crs] is intended to serve as a sharable building block for more comprehensive code review systems and collaborative workflows.

The [crs] projects builds upon ideas from iron, a code review system built by Jane Street and released as open source in 2016-2017. We deeply appreciate Jane Street’s willingness to share iron, which has provided a valuable starting point for exploring and advancing these ideas.

Tags

code-review

Published: 22 Jun 2025

README

crs

CI Status" Coverage Status" Deploy Doc Status" OCaml-CI Build Status"

Introduction

Welcome to crs, a project that provides libraries and a command-line interface to help manage code review comments embedded directly in source code using a specialized syntax.

A Quick Example of a Code Review Comment (CR)

Code review comments, or CRs (pronounced "C"-"R"-z), are a way to embed actionable feedback directly into source code. A CR starts with the letters CR, followed by the name of the reporting user, a colon, and the comment text. For example, here’s a CR left by alice:

CR alice: Add a quick example of a CR comment in the project's home page!

CRs can also be assigned to a specific user. To do this, include the for keyword followed by the assignee's name. For example:

CR alice for bob: Add a quick example of a CR comment in the project's home page!

Once the assignee, bob, addresses the comment, it can be marked as resolved by converting it into an XCR (resolved CR). Typically, a resolution note is added as part of the update:

XCR alice for bob: Add a quick example of a CR comment in the project's home page!

bob: Great idea! Done - see my changes to `README.md`.

After the CR is resolved, it’s reassigned back to the original reporter, alice, who can decide whether to remove the comment entirely or revert it back to a CR to continue the discussion.

This simple syntax makes it easy to track, assign, and resolve code review comments directly within your codebase.

CRs are embedded into the source code using the comment syntax of the language in which they appear. For example, in OCaml, a complete CR would look like this:

(* $CR alice: Add a quick example of a CR comment in the project's home page! *)

Project Goals

The primary goal of crs is to make it easy to locate, parse, and manipulate these comments. It offers ergonomic tools for tasks such as systematically updating comments across multiple files, changing their priority, marking them as resolved, modifying reporter or assignee information, and more.

This tool is designed to be flexible and can be used during development or integrated into your CI pipeline. For example, you can use crs to ensure no unresolved comments remain before merging a pull request or releasing a new version of your software.

Beyond its standalone functionality, crs is intended to serve as a sharable building block for more comprehensive code review systems and collaborative workflows.

Documentation

Published here.

Current State

It's currently in the early stages of development.

Get Involved

If you're interested in this project and would like to engage in discussions or provide feedback, please feel free to open an issue or start a discussion in the GitHub space of the project.

Thank you for your interest in crs!

Acknowledgements

Iron and Jane Street

We would like to express our gratitude to Jane Street for releasing their internal code review system, Iron, as open source in 2016-2017. Iron introduced an innovative approach to embedding code review comments directly into source code, which has inspired the development of the crs project.

The crs project builds upon ideas from Iron, particularly its syntax for embedded code review comments. Our work is based on an older version of Iron (v0.9.114.44+47, revision dfb106cb82abf5d16e548d4ee4f419d0994d3644), and we have adapted this concept to suit a potentially broad range of use cases and audiences.

In addition to drawing inspiration from Iron, we have been able to re-use some of the code released with Iron as a starting point for the crs project, in accordance with the terms of the Apache 2.0 License. This provided a valuable boost to get started, and we are thankful for the value this contribution has brought to our work.

It is also important to note that crs and Iron are independent projects with no specific ties. Iron may have evolved significantly since the version we referenced, and we make no guarantees or claims about its current state or future direction. On the other hand, crs is designed to expand on foundational ideas from Iron to make them accessible and usable in a wide variety of contexts, beyond the scope of the original project.

We deeply appreciate Jane Street’s contribution to the open source community and their willingness to share Iron, which has provided a valuable starting point for exploring and advancing these ideas.

Other

  • We would like to acknowledge the Diátaxis framework for technical documentation, which we use as inspiration to structure our doc.

Dependencies (27)

  1. volgo-hg-unix >= "0.0.18"
  2. volgo-git-unix >= "0.0.18"
  3. volgo-base >= "0.0.18"
  4. volgo >= "0.0.18"
  5. stdio >= "v0.17"
  6. spawn >= "v0.17"
  7. re >= "1.12.0"
  8. printbox-text >= "0.12"
  9. printbox >= "0.12"
  10. ppxlib >= "0.33"
  11. ppx_sexp_value >= "v0.17"
  12. ppx_sexp_conv >= "v0.17"
  13. ppx_here >= "v0.17"
  14. ppx_hash >= "v0.17"
  15. ppx_enumerate >= "v0.17"
  16. ppx_compare >= "v0.17"
  17. pplumbing >= "0.0.14"
  18. pp >= "2.0.0"
  19. pageantty >= "0.0.2"
  20. loc >= "0.2.2"
  21. fpath-base >= "0.3.1"
  22. fpath >= "0.7.3"
  23. file-rewriter >= "0.0.3"
  24. cmdlang >= "0.0.9"
  25. base >= "v0.17"
  26. ocaml >= "5.2" & < "5.4~"
  27. dune >= "3.17"

Dev Dependencies (1)

  1. odoc with-doc

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.