# File Change Impact Assessor MCP for AI Agents AI Agent Connect

> File Change Impact Assessor quantifies the blast radius of code modifications. It uses deterministic dependency tracing to map out exactly which files will be affected when you rename, delete, or change a module, helping you prevent regressions before they hit production.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_OGxlWIXoggwPNcW9nEesBtEbgmW7g02txdbcnMkr/ai-agent-connect
- **Tags:** dependency-tracing, blast-radius, regression-prevention, devops, impact-analysis

## Description

Changing a core file in a large codebase is nerve-wracking. You know that one small tweak to a utility function or a shared component can trigger a cascade of breaking changes in parts of the system you haven't even looked at yet. This MCP changes that by giving your AI client a way to see the invisible connections between your files. Instead of guessing which tests to run or hoping you didn't break the build, your agent can now trace the entire dependency graph. It looks at every import statement to calculate the exact blast radius of a change. This means when you're refactoring or cleaning up technical debt, your agent can tell you exactly which downstream files are at risk and which specific tests you need to execute to stay safe. By connecting this to your workflow through Vinkius, you turn your AI from a simple code generator into a sophisticated architect that understands the structural integrity of your entire project.

## Tools

### identify_test_coverage
Finds the exact test files that validate the logic of your target file. This ensures you aren't running unnecessary tests or missing critical ones.

### analyze_impact
Calculates the risk level and the total number of files affected by a change. It gives you a clear view of the blast radius before you commit.

### get_dependency_graph
Retrieves a structural map of how your files are linked via imports. It helps you visualize the hierarchy and connections in your project.

## Prompt Examples

**Prompt:** 
```
What happens if I change the logic in src/auth/session.ts?
```

**Response:** 
```
Modifying `src/auth/session.ts` has a **HIGH** impact. 

**Impact Summary:**
- **Affected Files:** 8 files (including `src/middleware/auth.ts` and `src/api/login.ts`)
- **Risk Level:** High
- **Required Tests:** You should run `tests/auth/session.test.ts` and `tests/middleware/auth.test.ts` to ensure no regressions.
```

**Prompt:** 
```
Show me how the user module is connected to the rest of the app.
```

**Response:** 
```
The `src/modules/user` directory is a central hub. Here is the dependency structure:

| Dependency Type | Target Files |
| :--- | :--- |
| **Direct Importers** | `src/api/user.ts`, `src/services/profile.ts` |
| **Transitive Importers** | `src/ui/components/Avatar.tsx`, `src/store/userStore.ts` |
| **Downstream Consumers** | `src/app.ts` |
```

**Prompt:** 
```
I'm about to delete the legacy-utils.js file. Is it safe?
```

**Response:** 
```
It is **not safe** to delete `legacy-utils.js` without checking dependencies first. 

**Dependency Check:**
- **Active Imports Found:** 3 files are still importing functions from this file:
  1. `src/old-logic/processor.js`
  2. `src/utils/compat-layer.js`
  3. `src/main.js` 

I recommend checking these files to migrate the logic before deletion.
```

## Capabilities

### Map code dependencies
Builds a structural map of how files connect through imports.

### Calculate change risk
Determines the scope of impact for any file modification.

### Locate required tests
Finds the specific test files that cover the logic of a target file.

### Trace transitive effects
Identifies files affected by a change even if they don't import the target directly.

## Use Cases

### Refactoring a core utility
An engineer wants to rewrite a shared helper function. They ask their agent to check the impact, and the agent identifies 15 downstream files that need attention.

### Cleaning up dead code
A developer wants to delete an old module. The agent uses the dependency graph to confirm that no other active files are importing it, making the deletion safe.

### Optimizing CI/CD pipelines
A DevOps engineer uses the impact analysis to trigger only the specific tests related to a changed file, significantly speeding up build times.

### Onboarding to a new repo
A new hire asks their agent to show the dependency connections for a specific folder to understand how the architecture is structured.

## Benefits

- Stop breaking distant modules by knowing the exact blast radius of every edit.
- Run only the necessary tests instead of the entire suite by using identify_test_coverage.
- Visualize complex file relationships with a clear view from get_dependency_graph.
- Reduce deployment anxiety by quantifying risk levels with analyze_impact.
- Catch transitive dependency issues that manual code reviews often miss.

## How It Works

The bottom line is you stop guessing which files will break when you edit code.

1. Connect your project directory to the MCP via your preferred AI client.
2. Point your agent toward the file or module you intend to modify.
3. Receive a detailed report on affected files and the necessary test suites.

## Frequently Asked Questions

**How does the File Change Impact Assessor prevent broken builds?**
It identifies every file that relies on the code you are changing. By knowing the exact blast radius, you can run the specific tests needed to catch errors before they are committed.

**Can I use File Change Impact Assessor with Cursor or VS Code?**
Yes. This MCP works with any MCP-compatible client, including Cursor, VS Code, and Windsurf, allowing your agent to analyze your local files directly.

**Does File Change Impact Assessor work with TypeScript and JavaScript?**
Yes, it parses import statements to build dependency graphs, making it effective for both TypeScript and JavaScript projects.

**How does File Change Impact Assessor help with testing?**
It maps your code logic to your test files. Instead of running your entire test suite, you can use the tool to find and run only the tests that cover the specific code you modified.

**Is the dependency tracing in File Change Impact Assessor accurate?**
Yes. It uses deterministic tracing of import statements to build a real structural map of your project, rather than relying on fuzzy pattern matching.

**How is the impact radius calculated?**
The impact radius is calculated by counting the unique files in the transitive dependency tree that import the target file or its importers.

**What is the difference between MODIFY, DELETE, and RENAME?**
MODIFY updates content, DELETE removes the file, and RENAME changes the filename. All three trigger dependency checks to ensure importers are updated or accounted for.

**Can I use this to find which tests to run?**
Yes, you can use the `identify_test_coverage` tool to find the specific test files that exercise the logic of your target file.