specbridge spec affected (and spec verify --changed) resolve which specs
a change set touches. The mapping is deterministic and read-only — no
verification rules run, no commands execute.
A spec is affected when at least one changed file:
- lives under
.kiro/specs/<name>/(spec files), - is the spec's sidecar state file
(
.specbridge/state/specs/<name>.json), - is the spec's verification policy
(
.specbridge/policies/<name>.json), - matches one of the policy's declared impact areas,
- appears in accepted task evidence for the spec (
verifiedormanually-acceptedrecords; freshness is judged later by the rules), or - is a file
design.mdexplicitly references (backtick path or Markdown link — see requirement-task-traceability.md).
Every match records which signal produced it:
Affected specs
notification-preferences
matched:
src/notifications/preferences.ts
via impact area src/notifications/**
- A changed source or test file that no spec claims is unmapped. In
--changed/--allverification it produces SBV014 (warning by default, policy-configurable to error). It is never silently ignored. Workflow/VCS infrastructure (.kiro/**,.specbridge/**,.git/**) is exempt from the unmapped check — the protected-path and approval rules govern those paths instead. - A file claimed by more than one spec is ambiguous: every matching spec is verified, and SBV022 reports the overlap with the matching patterns per spec.
Ordering is deterministic: specs sort by name, files by path.
| Command | Selection |
|---|---|
spec verify <name> |
exactly that spec |
spec verify --changed |
affected specs (signals above) |
spec verify --all |
every spec in the workspace |
spec affected |
mapping report only |
In --changed mode, each spec's report records why it was selected
(matchedBy).