rai impact

Analyze changed files between two git refs and recommend advisory validation gates. Uses the knowledge graph to trace module ownership and cross-component dependencies, so it can surface non-obvious gate requirements (e.g., a schema change that requires running the migration gate even if no migration files changed).

Flag Short Description
--from Git ref to diff from (required)
--to Git ref to diff to. Default: HEAD
--format -f Output format: human, json. Default: human
--project -p Project path. Default: current directory
--no-graph Skip graph-based dependency tracing (faster, less accurate)
# Analyze changes since branching from main
rai impact --from origin/main

# Diff between two specific commits
rai impact --from abc1234 --to def5678

# JSON output for CI integration
rai impact --from origin/main --format json

# Skip graph tracing for a quick scan
rai impact --from origin/main --no-graph

The output lists affected modules, inferred component boundaries crossed, and the advisory gates recommended for each crossing. Gates are advisory — they do not block — but CI pipelines can use the JSON output to conditionally run heavier gate suites only when relevant modules are touched.

See also: rai gate, rai graph