# CAIN HERMES — Governance SBOM

`cain/hermes/sbom.py`.

Inventories governance-relevant objects and connects them into a dependency graph:

node kinds: agent, model, skill, tool, mcp_server, a2a_peer, api, credential, permission, delegation, policy,
enforcement_point, data_store, external_effect, physical_device, runtime, dependency, evidence_source.

`GovernanceSBOM.add(node, kind, version=, ...)`, `.relate(src, dst, relation)`, `.dependency_graph()`,
`.reachable_from(start)`, `.digest()`.

## Change → impact

`diff_sboms(old, new)` → added/removed/changed nodes. `impact_sets(changes, sbom)` produces:

- **AUTHORITY_IMPACT** (new permission/credential/delegation/policy; a new tool reachable from an agent)
- **GOVERNANCE_IMPACT** (new tool/api/mcp_server/a2a_peer/skill/model/runtime/dependency; changed model/runtime/skill/policy)
- **COVERAGE_IMPACT** (new or lost enforcement point)
- **EVIDENCE_IMPACT** (new or lost evidence source / data store)
- **EFFECT_IMPACT** (new external effect / physical device)

## Distinction from existing work

`platform-gateway/cain_governance_attestation.py` fingerprints code/policy **components**. HERMES models the
**governance dependency graph** and turns a change into explicit impact sets.

## Status

IMPLEMENTED, TESTED.
