Dependency Analysis Prompt — What It Needs, What Needs It
Before touching a shared module: what it depends on, what depends on it, and which of those dependencies are risky — direction mapped, cycles flagged.
Overview
The cost of changing shared code is set by its dependencies — and dependency knowledge is usually tribal. This prompt uses the architecture mode focused on one module's position: what it depends on (and how hard), what depends on it (and how visibly), dependency direction made explicit with cycles and inversions flagged, and the risk assessment a senior audience actually wants: which of these dependencies are fragile, version-locked, or carrying contracts that mostly exist by convention. The strategy's data-flow lens shows what information crosses each dependency edge — which is where breaking changes actually break.
Workflow
-
Map both directions
Dependencies and dependents — the module's real position, not its folder.
-
Follow the data across edges
What information crosses each dependency line — where breaking changes actually break.
-
Rank the risk
Fragile, version-locked, convention-only contracts named — the dependencies to fear, ordered.
Why This Works
- Both-directions mapping is what folder structure and imports alone cannot show
- Data-flow edges locate breakage more precisely than module names
- A ranked risk list converts analysis into a pre-change checklist
Best for
- Shared modules consumed by multiple systems
- Pre-change impact assessment
- Architecture cleanup planning
Not for
- Breaking the cycles it finds — that's the Refactor Prompt Builder's Architecture Cleanup goal
- Generating tests for the consumers — that's the Test Case Prompt Generator
Use cases
- Assessing blast radius before changing a shared module
- Finding the dependency cycle everyone suspects
- Naming the consumers a "small change" would surprise