Where Used
where_usedFind every parent component that consumes a given item by traversing the lockfile dependency graph. Use it to assess the blast radius before changing an item, so you know exactly which components must be rebuilt or re-dispatched.
Instructions
Where-used / impact analysis (issue #142, C3; MULTI_AGENT.md §9): traverse the
lockfile depends_on graph and report every parent that CONSUMES an item — the
blast radius, so exactly those parents re-dispatch when the item changes. The
lockfile records edges consumer -> consumed (lid depends_on housing); where-used
is the reverse reachability of the item (everything that reaches it).
lockfile: path to the lockfile (the JSON assembly_lock wrote). item: the item / component id to query. direct: if true, also surface only the immediate mates separately.
Returns {item, where_used (the full transitive blast radius), direct (the §9 immediate-neighbour layer)} — an unknown item fails loudly, never a silent empty set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | Yes | ||
| direct | No | ||
| lockfile | Yes |