xspec impact can tell you not just that something changed but how it changed and why. Understanding the hash model helps you interpret impact reports and reason about when reviews or re-verifications are warranted.
The Four Hashes
metadataHash and ownHash are independent. Changing a d prop updates metadataHash but not ownHash. Editing prose updates ownHash but not metadataHash. This separation lets xspec impact report the nature of a change precisely.Embedding Behavior
When you use{text(X)} to embed another node’s prose into a requirement, xspec hashes that expression as a reference to X, not as X’s expanded text. This is called embedding insulation:
- Editing the embedded node X does not change the embedder’s
ownHash. - The change propagates through
effectiveHashinstead, because X is now a dependency target.
Canonical Identity and the Journal
xspec maintains a journal of requirement ID changes. When you rename a requirement ID through the journal (usingxspec rename or equivalent), xspec records the old-to-new mapping and updates all references atomically. Because the rename is journaled, no hash changes anywhere in the graph — the node retains its identity and all pointers are rewritten consistently.
By contrast, if you hand-edit an id attribute in an MDX file without going through the journal, xspec treats the old ID as deleted and the new ID as a freshly added node. This is a delete-plus-add, not a rename, and it breaks every reference that pointed to the old ID.
Change Categories in xspec impact
xspec impact classifies every affected node into one of four categories based on which hashes changed:
Code locations follow the same distinction: a code location is directly impacted when its
subtreeHash changed, and transitively impacted when only its effectiveHash changed (meaning an upstream requirement it references has changed content but the code location itself is unmodified).
These categories let you triage impact reports efficiently. A descendant-changed node may need its sub-requirements re-reviewed, while an upstream-changed node flags that an external dependency has shifted and the relationship should be validated.