Skip to main content
impact compares your current workspace against a previous git baseline to show you which requirements changed and which code units are directly or transitively affected. It is always informational — it exits 0 whether or not impacted nodes are found — so you can use it freely in scripts without worrying about false failures.

Synopsis

--base is required. Provide any valid git ref: a commit SHA, a branch name, a tag, or a relative ref like HEAD~1.

Flags

git-ref
required
The git reference to use as the comparison baseline. xspec checks out the graph data at that ref and maps identities forward through the journal before diffing.
flag
Emit the impact report as a single JSON document on stdout.

How it works

xspec reads the graph data recorded at the baseline ref and maps node identities forward through the journal (which records renames and moves). It then diffs the baseline graph against the current workspace graph and classifies every changed requirement into a change category.

Change categories

Each changed node includes attribution: the file, line range, and identity where the change originates.

Impacted code

For every changed requirement, impact traces outgoing edges to find all code and test nodes that reference or embed the requirement, both directly and transitively. Each impacted code entry includes a witness path showing the shortest route from the code node to the changed requirement. Ties in path length are broken byte-lexicographically.

Reading the human report

JSON output shape

With --json the report contains a top-level changes array. Each entry has:
  • node — the requirement identity
  • category — the change category string
  • direct — array of directly impacted code nodes, each with a path array
  • transitive — array of transitively impacted code nodes, each with a path array

Baseline error conditions