GitHub Next Home

Projections

Review code changes (without reviewing code)

Exploring how to comprehend the ever-changing systems in our repos, without reading every line of code
Prototype Open source

At this point, there’s too much code being generated to read it line-by-line… perhaps too much to read it at all. But if we’re responsible for software systems, understanding them might still be a good idea. So how can we understand our ever-changing codebases without really reading them?

Projections explores ways to comprehend the systems in our repos, both as they change and as they are at any given point in time. Each projection extracts a structured representation of a codebase, compares it against another state (e.g. a commit), and renders the result into a rich, interactive visualization. The easiest way to get a sense is to see them in action:

Under the hood, every projection has three components. All of these have built-in options, or can be swapped out with something entirely custom.

  1. Extractor: A small program (e.g. a script) that processes your codebase to create an extraction, which is the structured representation of some aspect of the system. This component runs on compute you control (e.g. CI servers or dev boxes), meaning you can use any language, dependencies, or tools you like. You’re not limited to static analysis; you can exercise actual product code.
  2. Comparator: An engine that compares two extractions to determine what changed and what the changes mean. Custom rules can be implemented using Common Expression Language. For visualizing a codebase at a specific point in time (rather than a diff), this component is skipped.
  3. Renderer: A front-end layer that displays the comparison (or a single extraction) as a rich, interactive visualization. Can be written in any web technology, such as React.

Repository

Extractor

Extractions

orders cart 3f9c2a1
orders cart payments b7e41d0

Comparator

Comparison

  1. + payments
  2. + orders → payments

Renderer

Visualization

orders cart payments

Crucially, your projection configurations and customizations become part of your codebase. You can run them again and again, for every commit and every pull request, providing a stable, repeatable way to review changes to your codebase. You can also evolve them over time, as the nature of your codebase changes.

Projections is currently available as a research prototype, which you can run locally. The easiest way to get started is to have your agent follow the setup instructions:

Set up Projections by following https://github.com/githubnext/projections/blob/main/SETUP.md, configure/implement a few projections specifically for my codebase, and show them to me in the viewer.

You can also check out the repo on GitHub. We’d love for you to give it a try and let us know what you think via Discussions or X!