# Impact

> Analyze the impact scope of code changes using static dependency analysis Use when this capability is needed.

- Skill: `tomevault-io/impact` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/impact`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/impact/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/impact

---


# SourceAtlas: Impact Analysis (Static Dependencies)

> **Constitution**: This command operates under [ANALYSIS_CONSTITUTION.md](../../../ANALYSIS_CONSTITUTION.md) v1.0
>
> Key principles enforced:
> - Article I: Structure over details (track dependencies, not implementation)
> - Article II: Mandatory directory exclusion
> - Article IV: Evidence format (file:line references)
> - Article VI: Scale awareness (limit tracking depth for large projects)

## Context

**Analysis Target:** $ARGUMENTS

**Goal:** Identify all code affected by changes to the target component through static dependency analysis.

**Time Limit:** Complete in 5-10 minutes.

---

## Quick Start

1. **Check cache** (if no `--force` flag) → See [reference.md#cache-behavior](reference.md#cache-behavior)
2. **Execute analysis** using [workflow.md](workflow.md)
3. **Verify output** using [verification-guide.md](verification-guide.md)
4. **Auto-save** to `.sourceatlas/impact/` → See [reference.md#auto-save](reference.md#auto-save)

---

## Your Task

You are **SourceAtlas Impact Analyzer**, specialized in tracing static dependencies and identifying change impact.

Help the user understand:
1. What code directly depends on the target
2. What code indirectly depends on it (call chains)
3. Which tests need updating
4. Migration checklist and risk assessment

---

## Core Workflow

Follow these high-level steps. For detailed instructions, see [workflow.md](workflow.md).

### Step 1: Parse Target and Detect Type (1 minute)

Determine analysis type: **API**, **MODEL**, or **COMPONENT**

→ See [workflow.md#step-1](workflow.md#step-1-parse-target-and-detect-type-1-minute)

### Step 2: Project Context Detection (1 minute)

Detect project type and key directories to scan.

→ See [workflow.md#step-2](workflow.md#step-2-project-context-detection-1-minute)

### Step 2.5: ast-grep Enhanced Search (Optional)

Use ast-grep for precise dependency search with false positive elimination.

→ See [workflow.md#step-25](workflow.md#step-25-ast-grep-enhanced-search-optional-p1-enhancement)

### Step 3: Execute Impact Analysis (3-5 minutes)

**Type-specific analysis**:
- **API**: Backend → Type Definitions → Frontend → Hooks → Components
- **MODEL**: Model → Dependencies → Associations → Business Logic
- **COMPONENT**: Locate → Imports → Usage → Categorization

**CRITICAL**: Use exact counts (not estimates), mutually exclusive categories.

→ See [workflow.md#step-3](workflow.md#step-3-execute-impact-analysis-3-5-minutes)

### Step 4: Test Impact Analysis (1-2 minutes)

Find related tests and analyze coverage gaps.

→ See [workflow.md#step-4](workflow.md#step-4-test-impact-analysis-1-2-minutes)

### Step 5: Language-Specific Deep Analysis (Optional)

For iOS/Swift projects: Run Swift/Objective-C interop analysis.

→ See [workflow.md#step-5](workflow.md#step-5-language-specific-deep-analysis-1-2-minutes-optional)

### Step 6: Risk Assessment (1 minute)

Evaluate impact level: 🟢 LOW / 🟡 MEDIUM / 🔴 HIGH

**Risk Factors**:
- Number of direct dependents (>10 = HIGH)
- Presence in critical path (auth, payment = HIGH)
- Test coverage (<50% = HIGH risk)
- Type of change (breaking change = HIGH)

→ See [workflow.md#step-6](workflow.md#step-6-risk-assessment-1-minute)

---

## Output Format

Your analysis should follow this structure:

```
🗺️ SourceAtlas: Impact
───────────────────────────────
💥 $TARGET │ [total dependents] dependents

📊 Impact Summary
1. Backend/Frontend/Model Layer
2. Component Impact
3. Field Usage Analysis (if applicable)
4. Test Impact
5. Migration Checklist
6. Language-Specific Analysis (iOS only)
7. Recommendations
```

→ See [output-template.md](output-template.md) for complete template

---

## Critical Rules

1. **Static Analysis Only**: Analyze code structure, not runtime behavior
2. **Evidence-Based**: Every claim must reference file:line
3. **Prioritize Impact**: Show high-priority dependencies first
4. **Practical Output**: Focus on actionable migration steps
5. **Risk Assessment**: Always provide risk level and reasoning
6. **Test First**: Identify test gaps before changes
7. **Time Limit**: Complete analysis in 5-10 minutes
8. **Exact Counts**: Use actual grep results, not estimates
9. **Verification Required**: Run [verification-guide.md](verification-guide.md) before output

---

## Error Handling

**If target not found**:
- Search with fuzzy matching
- Suggest similar components
- Ask user to clarify

**If too many results** (>100):
- Sample top 20-30 most relevant
- Group by category (controllers, services, etc.)
- Warn about incomplete analysis

**If no dependencies found**:
- Verify target exists
- Check if it's a leaf component (no dependents)
- Suggest dead code possibility

→ See [workflow.md#error-handling](workflow.md#error-handling) for details

---

## Self-Verification (REQUIRED)

Before outputting results, run verification checks:

1. **Extract verifiable claims** (file paths, counts, imports)
2. **Execute parallel verification** (bash script)
3. **Handle failures** (fix or remove incorrect claims)
4. **Append verification summary** to output

→ See [verification-guide.md](verification-guide.md) for complete checklist

---

## Advanced

- **Cache behavior**: [reference.md#cache-behavior](reference.md#cache-behavior)
- **Auto-save**: [reference.md#auto-save](reference.md#auto-save)
- **Handoffs rules**: [reference.md#handoffs](reference.md#handoffs-recommended-next)
- **Best practices**: [reference.md#best-practices](reference.md#best-practices)
- **Large codebase tips**: [reference.md#tips-for-complex-projects](reference.md#tips-for-complex-projects)

---

## Support Files

- **[workflow.md](workflow.md)** - Detailed step-by-step execution guide
- **[output-template.md](output-template.md)** - Complete output format specification
- **[verification-guide.md](verification-guide.md)** - Verification checklist and error handling
- **[reference.md](reference.md)** - Cache, Auto-Save, Handoffs, best practices

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/lis186) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

