From agent-workflows
Maps blast radius of proposed changes (diffs, migrations, upgrades, configs) by spawning independent agents to trace first-, second-, and third-order effects via call graphs, data flows, tests, and more.
npx claudepluginhub sjarmak/agent-workflowsThis skill uses the workspace's default tool permissions.
Blast Radius Impact Mapping. Takes a proposed change (diff, migration, dependency upgrade, config change) and spawns N independent agents, each tracing impact through a different propagation path. No agent sees others' findings. Synthesizes into a combined blast radius map showing first-order, second-order, and third-order effects radiating outward from the change point.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Blast Radius Impact Mapping. Takes a proposed change (diff, migration, dependency upgrade, config change) and spawns N independent agents, each tracing impact through a different propagation path. No agent sees others' findings. Synthesizes into a combined blast radius map showing first-order, second-order, and third-order effects radiating outward from the change point.
$ARGUMENTS — format: [N] [path/to/diff or file or inline change description] where N is optional (default: 5, min 3, max 7)
Extract:
If the target is missing or unclear, ask the user to clarify before proceeding.
Determine the target type and build a precise understanding of what is changing:
git diff)git diff main...<branch> (or the appropriate base) to extract the full changesetPrepare a change summary covering:
Present the change summary to the user and confirm before proceeding. Adjust if the user gives feedback.
Launch all N agents in parallel using the Agent tool. Each agent gets the change summary plus a unique propagation path selected from this list (assign sequentially, wrapping if N < 7):
Trace the call graph outward from the change point. What functions/methods call the changed code? What does the changed code call? Follow the chain in both directions. For each hop, note whether the caller's assumptions still hold after the change, whether return types or error conditions have shifted, and whether any caller is unprepared for the new behavior.
Trace how data moves through the changed code. Where does input data originate? What transformations does it pass through? Where is it stored, cached, serialized, or sent to external systems? Identify any place where the shape, type, range, encoding, or nullability of data is altered by the change and follow that altered data to every consumer.
Map which tests cover the changed code and its immediate callers. Identify code paths near the change that have no test coverage. Flag tests that assert on behavior that may shift. Identify integration and E2E tests that exercise the changed path. Highlight areas where a regression could hide because no test would catch it.
Trace the change through the build and release process. Does it affect build configuration, CI steps, environment variables, feature flags, database migrations, or rollback procedures? Would this change require a coordinated deploy across services? Could it cause a failed deploy, a broken rollback, or a state mismatch between old and new versions during a rolling update?
Trace the change to every user-visible surface. Does it alter API responses, UI rendering, error messages, performance characteristics, or accessibility? Consider all user types: end users, API consumers, admin users, automated clients. Identify behavioral changes that are intentional vs. unintentional side effects.
Trace the change through configuration surfaces. Does it add, remove, or change the meaning of environment variables, feature flags, config files, or secrets? Does it alter defaults? Could it behave differently across environments (dev, staging, production)? Identify any config that must be updated in sync with the code change.
Trace upstream and downstream dependency effects. If a dependency is being added, removed, or upgraded: what transitive dependencies change? Are there known vulnerabilities or breaking changes? If the changed code is consumed by other packages or services: do their version constraints still hold? Could this change force a cascade of downstream upgrades?
Each agent MUST:
subagent_type: "general-purpose" (needs file access for reading actual code and tracing references)Do NOT include other agents' findings or path assignments in any agent's prompt.
Agent prompt template (customize the propagation path per agent):
You are a change-impact analyst tracing the blast radius of a proposed change.
## Change Summary
{change_summary}
## Your Propagation Path: {path_name}
{path_description}
## Instructions
Trace the impact of this change through your assigned propagation path. Start at the change point and work outward. Be specific and evidence-based — vague speculation is useless.
For each affected component you find:
1. **Component** — what is affected (file, function, service, config key, test, UI element)
2. **Connection** — how it connects to the change (direct call, data consumer, config dependency, etc.)
3. **Impact** — what could break, change, or degrade
4. **Order** — First (direct), Second (one hop), Third (two hops)
5. **Confidence** — High (read the code and verified), Medium (inferred from structure), Low (possible but not confirmed)
6. **Risk** — Critical (breaks functionality), High (degrades behavior), Medium (cosmetic or minor), Low (negligible)
READ the actual code. Reference specific files, functions, and line numbers. Trace imports, function calls, data flows, and config references concretely. If you cannot access a file or verify a connection, say so explicitly and mark confidence as Low.
Stop at third-order effects — do not trace further. If a path dead-ends before third order, note that the blast radius is contained in that direction.
## Output Format
### Propagation Path: {path_name}
#### First-Order Effects (Direct)
| Component | Connection | Impact | Risk | Confidence |
|-----------|-----------|--------|------|------------|
| ... | ... | ... | ... | ... |
[Narrative explanation of direct effects]
#### Second-Order Effects (One Hop)
| Component | Connection | Impact | Risk | Confidence |
|-----------|-----------|--------|------|------------|
| ... | ... | ... | ... | ... |
[Narrative explanation of second-order effects]
#### Third-Order Effects (Two Hops)
| Component | Connection | Impact | Risk | Confidence |
|-----------|-----------|--------|------|------------|
| ... | ... | ... | ... | ... |
[Narrative explanation of third-order effects]
#### Path Summary
- Components affected: N (first: N, second: N, third: N)
- Highest risk: [Critical/High/Medium/Low]
- Containment assessment: [Is the blast radius bounded or does it keep expanding?]
After ALL agents return, produce a unified analysis with five sections:
All affected components across all propagation paths, deduplicated and sorted by order then risk:
| # | Component | Order | Risk | Propagation Paths | Impact Summary |
|---|
For components found by multiple agents, merge their findings and note which paths surfaced them.
Which components appear across multiple propagation paths? These are the highest-risk areas because they are affected through multiple independent channels.
For each hot component:
Components appearing in 3+ paths are critical review targets. Components appearing in 2 paths deserve careful attention. Components in only 1 path are lower priority.
Areas of the codebase that no agent found to be affected. These are tentatively outside the blast radius. Note that absence of findings is not proof of safety, especially for:
Is this change well-contained or does it ripple widely?
A prioritized checklist of what to review and test before shipping this change, derived from the findings:
Save the full report to the working directory as diffuse_{slugified_topic}.md.
Present the blast radius map and review checklist to the user. Ask:
/stress-test on the hot components in the heat map?/premortem if the containment assessment shows wide blast radius?Sits before implementation or deployment as a change-impact gate. Use after a change is proposed but before it ships:
proposed change → /diffuse (impact map) → review / test / ship
Also complements /stress-test and /premortem:
/diffuse answers "what does this change touch?" (forward-tracing from a specific change)/stress-test answers "how can this design break?" (adversarial probing of a design)/premortem answers "how could this project fail?" (prospective failure narratives)