agentleFS
danielvm-gitdanielvm-git/bigpowers/.cursor/rules/assess-impact.mdc

bigpowers / rules

Cursor rule252 starsChanged 3 months agoMITView on GitHub

Analyze the blast radius of a proposed change before any code is written. Maps dependents, affected stories, and test coverage. Produces specs/IMPACT_LATEST.md. Use before plan-work on any non-trivial change, when touching a shared module, or when the user asks \"what does this break?\".

The file

We split this assess-impact.mdc into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Default: full impact analysis (dependents + affected stories + test coverage mapping)

    line 14
  2. Very specific:

    Read specs/release-plan.yaml + epic capsule directories (if it exists).

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
assess-impact.mdc
---
description: "Analyze the blast radius of a proposed change before any code is written. Maps dependents, affected stories, and test coverage. Produces specs/IMPACT_LATEST.md. Use before plan-work on any non-trivial change, when touching a shared module, or when the user asks \"what does this break?\"."
alwaysApply: false
---

# Assess Impact

> **HARD GATE** — Run this skill before `plan-work` whenever a change touches an existing module, symbol, or file used by more than one caller. Skip only for net-new code with no existing dependents.

Find the blast radius of the proposed change before a single line is written.

## Modes

- Default: full impact analysis (dependents + affected stories + test coverage mapping)
- --lightweight: Fast fan-in/fan-out only (<10s). Maps callers and imports without test coverage mapping. Used by build-epic step 2 as a pre-plan gate. Risk score > 7 triggers a mandatory grill-me session before proceeding.

## Process

### 1. Identify the target

Name the symbol, module, or file being changed. If the user hasn't specified, ask one question: "What exactly are you changing?"

### 2. Find dependents

```
grep -rn "[symbol-name]" . --include="*.ts" | grep -v node_modules
git log --oneline -10 -- [file-path]
```

→ verify: `test -f specs/IMPACT_LATEST.md || test -d specs/bugs`

### 3. Map to release plan stories

Read `specs/release-plan.yaml + epic capsule directories` (if it exists). For each dependent found in Step 2, identify which story owns that module. List stories that will be affected by the change.

→ verify: `test -f specs/release-plan.yaml && grep -ci "stor" specs/release-plan.yaml`

### 4. List test coverage

Find tests that exercise the target:

```
grep -rn "[symbol-name]" . --include="*.test.*" --include="*.spec.*"
```

→ verify: `test -d specs/epics || test -d skills`

### 5. Classify risk

| Level | Condition |
|-------|-----------|
| Low   | ≤ 2 callers, all covered by tests |
| Medium | 3–10 callers, partial test coverage |
| High  | > 10 callers, or shared API/interface, or no tests |

### 6. Write specs/IMPACT_LATEST.md

```
## Target
[symbol or file being changed]

## Dependents ([count])
- [file]: [caller or usage]

## Affected Stories
- Story [X.Y]: [title]

## Test Coverage
- [test file]: covers [scenario]
- Gap: [untested behavior]

## Risk: Low / Medium / High
[One-sentence rationale]

## Recommended action
[Proceed / Add tests first / Discuss design]
```

→ verify: `grep "Risk:" specs/IMPACT_LATEST.md`

Suggest `plan-work` once risk is understood and any test gaps are noted.

## Risk score gating

In `--lightweight` mode (used by build-epic step 2), assign a numeric risk score (1–10):
- Fan-in (how many callers): 0–4 points
- Fan-out (how many dependencies the module itself uses): 0–3 points  
- Recent churn (git log --oneline -5 count): 0–3 points

**Risk score > 7**: Gate — require a `grill-me` session before proceeding to implementation. Document the grill-me result in the impact report at `specs/IMPACT-<epic>-<story>.md`.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.