open-index/open-npm huggingface dataset:
npm package: @prateeks91/monorepo-doctor
Description: Deterministic change impact analysis for monorepos
Author: Prateek Srivastava
Latest version: 0.0.4

# Change Intelligence for Monorepos

> **Understand the real impact of a change before it breaks production.**

Most monorepo tools tell you **what changed**.  
This tool tells you **what that change *means*.**

---

## The Problem

In large monorepos:

- A tiny change can break multiple apps
- Teams over-test “just in case”
- CI pipelines grow slower every month
- Engineers argue about:
  - “Do we need full regression?”
  - “Is this change risky?”
  - “Who should review this?”

Today’s tools answer:
- *Which files changed?*
- *Which packages depend on this?*

They **don’t answer**:
> “How risky is this change — and why?”

---

## The Idea

This project introduces **Change Intelligence**:

> A deterministic, explainable way to classify changes by **surface**, **blast radius**, and **risk**.

It doesn’t guess.  
It doesn’t hallucinate.  
It explains.

---

## What This Tool Does

Given a monorepo and a set of changed files, it:

1. Detects the **owning package**
2. Classifies the **change surface**
3. Computes **impact propagation**
4. Calculates **risk**
5. Recommends **actions**

All in **pure data**, no UI assumptions.

---

## Change Surfaces (Core Concept)

Every file change maps to a **surface**:

| Surface | Meaning |
|------|--------|
| `BUILD_ONLY` | Lint, TS config, tooling |
| `CONFIG` | Env, feature flags, runtime config |
| `RUNTIME_SHARED` | Shared libs used by multiple apps |
| `APP_LOGIC` | App-specific business logic |

> Not all changes are equal.  
> We stop pretending they are.

---

## Risk Is Contextual

Risk is derived from:
- Change surface
- Number of impacted packages
- App vs library semantics

Example logic:
- Runtime shared change + many apps → **HIGH**
- Build tooling change → **LOW**
- App-only logic → **Scoped**

This is **deterministic**, not ML magic.

---

## Example Output

```json
[
  {
    "package": "packages/ui",
    "surface": "RUNTIME_SHARED",
    "risk": "HIGH",
    "impacted": [
      "apps/web",
      "apps/docs"
    ],
    "actions": [
      "RUN_FULL_REGRESSION",
      "REQUIRE_PLATFORM_REVIEW"
    ]
  }
]