code-change-impact

A code-review procedure that traces what parts of a project may be affected by a change. It follows imports, function calls, shared data structures, API responses, configuration, database changes, and other connections.

In plain words
What is it for?
Use it after a fix and before a commit, pull request, or push to check affected routes, commands, jobs, APIs, modules, and other runnable parts of the project.
Why use it?
A change that fixes one feature can quietly break another. This helps identify those knock-on effects and checks the project’s own build, test, type-check, and lint commands.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/mghareeb/code-change-impact/code-change-impact
Clone the repo
git clone --depth 1 https://github.com/mghareeb/code-change-impact
Per session 122 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 900 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00122 $0.00900
Opus 5 $0.00061 $0.00450
Sonnet 5 $0.00024 $0.00180
Haiku 4.5 $0.00012 $0.00090

Measured yesterday against content hash 2132d66cb26c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-change-impact scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

adapters/code-change-impact.mdc · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Change Impact (Cursor rule)

A fix is "done" only when you know what it touched besides the target. Find the ripples, then prove nothing else broke. Run against the VCS diff.

Procedure

0. Discover. Establish the repo root + diff; languages (from manifests); the project's own typecheck/build/test/lint commands (read scripts/Makefile/CI, don't guess); and the import style + path aliases. A repo may mix stacks.

1. Epicenter. git diff HEAD (or git diff <base>...HEAD); read the hunks. Classify each changed file: shared/core · public/exported symbol · type/interface/ schema · serialized contract (REST/GraphQL/DTO/proto) · config/registry · DB schema/migration · global config/styles · build/deps · generated/duplicated twin · or a local leaf.

2. Reverse dependencies. For each changed symbol, grep who imports the module and who calls the symbol (this language's import form). Build directly-impacted + transitively-impacted, then map to runnable surfaces (route/endpoint/command/job).

3. Behavioral impact. Per site: shape/signature/default/side-effect/invariant change, or internal/safe? Split build-caught ripples (typed langs) from silent ripples — cache/memo keys, changed default/sort, serialization/enum drift, global/persisted state, concurrency & transactions, locale/format, regex/ validation, flag defaults, theme/i18n. Check mirror/twin files: regenerate generated code, sync cross-language duplicated constants. One side edited without the other is an impact finding even if it compiles.

4. Verify. Run discovered commands cheapest-first, scaled to reach: typecheck → build → tests (prefer targeted) → lint. Then exercise the impacted surfaces and watch logs/errors. Green local ≠ deployed.

5. Report with the template below.

Report template (always)

# Code Change Impact: <one-line description>
## Verdict: SAFE | SAFE WITH CAVEATS | IMPACT FOUND
## Epicenter
- <file:line> — <coupling class> — <what changed>
## Blast radius
### Directly impacted
- <file / surface> — <route/endpoint/command> — <why> — risk: High|Med|Low
### Transitively impacted — <…> (or none)
## Mirror / twin files — <file to sync, in sync? yes/NO> (or none)
## Silent-risk callouts (build won't catch) — <…> (or none)
## Verification
- typecheck/build/tests: PASS/FAIL
- surfaces exercised: <list> → clean? errors?
## Residual risk & manual checklist
- [ ] <not auto-verifiable>

Read the full file on GitHub · 73 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 73 lines · 122 tokens per session scan A 2132d66cb26c

Subscribe to this mod's changes

code-change-impact is a cursor rule published in the GitHub repository mghareeb/code-change-impact (2 stars, last pushed 2mo ago), licensed MIT. It adds 122 tokens to every session and 900 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.