xspec impact surfaces all of that in a single report by comparing your current workspace against a baseline at any git ref.
0 regardless of what it finds. Use --json to get machine-readable output suitable for CI annotations or downstream tooling.
Change categories
The report groups impacted specification nodes into four categories:
Every non-root category entry includes an attributed to field that traces the change back to the originating node in one hop, so you never have to chase a chain of cascades manually.
Impacted code
Beyond specification nodes, the report identifies code locations affected by the change:- Directly impacted — the code location has an edge to a node whose
subtreeHashchanged. The text it points at is genuinely different. - Transitively impacted — the code location has an edge to a node whose
effectiveHashchanged but whosesubtreeHashis unchanged. The node reads the same, but one of its dependencies moved or changed beneath it.
Reading a human report
JSON output shape
Pass--json to get a structured payload you can pipe into other tools:
deleted flag on each requirement entry distinguishes removed nodes (where no current state exists) from nodes that still exist but changed.
Baselines and refactoring
Journaled renames and moves are invisible to impact. If you renameauth.lockout to auth.throttling using xspec rename, the journal records the mapping and xspec impact produces an empty report — the identity is preserved across the baseline boundary.
If the baseline commit cannot be reconstructed (e.g., the commit is unreachable), xspec impact exits with code 2 rather than producing a partial or misleading report.
Use cases
Pre-merge PR annotation Run impact against the main branch in CI and feed the JSON output into your PR tooling to annotate which requirements and code locations are affected:--base flag on xspec review create runs the same analysis and populates a session with items for every affected node:
upstream-changed or descendant-changed entry tells you exactly which content edit triggered it.