| name | dependency-analysis |
| description | Analyzes script dependencies and cascading impact using the build system XML files. Use this skill when modifying shared functions, reviewing changes to Shared/ code, writing tests for scripts with dependencies, or assessing the blast radius of any code change.
|
Dependency Analysis
CSS-Exchange scripts dot-source shared functions. Changes to a shared function
cascade through multiple levels of dependents. The build system generates two
XML files that are the authoritative source (when generated fresh by .build/Build.ps1):
dist/dependencyHashtable.xml — What each script imports (parent to child)
dist/dependentHashtable.xml — What depends on each script (child to parent)
Generate fresh XML by running .build/Build.ps1 first.
When to Use This
- Before modifying any file in
Shared/ — understand what breaks
- During code review — verify callers handle changed shared function contracts
- When writing tests — identify which scripts need test coverage for a change
- When assessing risk — map the full blast radius of a proposed change
Analysis Process
- Identify the changed file(s)
- Query the dependency XML to find direct callers
- Walk the full cascade chain (all levels, not just direct callers)
- Identify root/released scripts (entry points with no dependents)
- Report the full impact scope
Querying Dependencies
Find direct callers of a script
$dependentHashtable = Import-Clixml -Path "dist\dependentHashtable.xml"
$targetPath = (Resolve-Path "Shared\FunctionName.ps1").Path
$directCallers = $dependentHashtable[$targetPath]
Find cascading dependents (all levels)
Use the script in this skill's directory, or
run the BFS traversal inline: