# github/scientist

:microscope: A Ruby library for carefully refactoring critical paths.

Repository: https://github.com/github/scientist
Canonical: https://ross.abutalabs.com/products/scientist
Language: Ruby
License: MIT
License Family: permissive
Topics: refactoring, ruby, scientist, rubygem
Last push: 2025-11-24T02:03:19+00:00

## Health v2 (maintenance only)
Score: 47/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 53, release rhythm 8, longevity 100
- inputs: {"age_days": 4592, "days_push": 283, "days_rel": 625, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7754, forks 503 (observed 2026-08-28T04:10:04.801938+00:00)

## What it is
Scientist is a Ruby library for carefully refactoring critical code paths by running old and new implementations side by side in production. It always returns the control (old) behavior's result while measuring, comparing, and publishing the candidate's behavior and timings.

## Use cases
- refactor a critical code path and verify the new implementation behaves identically under real traffic
- compare old and new permission-check logic in a live web app
- measure performance differences between two implementations in production
- safely roll out a rewritten algorithm while always returning the current behavior
- detect exceptions raised by new code without affecting users

## When to choose
- you're refactoring high-risk code and want to validate the rewrite against real production data
- you need behavioral parity checks between an old and new implementation
- you want timing and exception data for candidate code paths before switching over

## When to avoid
- you need feature flags or A/B testing for user-facing experiments rather than internal behavior comparison
- your code path is cheap to test with unit tests alone and doesn't run in production
- you're not working in Ruby

## Facets
- artifact type: library
- maturity: stable
- function: testing, benchmarking, middleware
- domain: developer-tools
- platform: ruby, jvm
- tags: refactoring, experimentation, a-b-testing, behavior-comparison, rubygem, ruby

## Member repositories
- github/scientist (main) score 47

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:04.801938+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:35:08.757817+00:00, confidence not recorded.
  - readme: https://github.com/github/scientist (fetched 2026-08-28T04:10:04.801938+00:00, sha fc482eaa193c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
