Scenarios are reproducible bundles: a Kotlin Multiplatform project, one or more version bumps to analyse, and an optional ground truth. They are the input format consumed by kmp-impact run-scenario and the recommended way to benchmark changes to the analyzer itself.
my_scenario/
├── scenario.yml
├── ground_truth.yml # optional
├── README.md
└── repo/ # optional: vendored copy of the KMP project
scenario.ymlname: pokedex_ktor_minor
description: "Bump io.ktor 2.3.8 -> 2.3.11 on Pokedex KMP."
repo:
path: ./repo # or a git URL + sha
bumps:
- dependency: io.ktor
before: 2.3.8
after: 2.3.11
analysis:
skip_dynamic: false
output_dir: output
Multiple bumps can be analysed in the same scenario; each is reported in its own phaseN/ subdirectory.
ground_truth.ymldirect_files:
- shared/src/commonMain/kotlin/com/example/api/PokedexClient.kt
- shared/src/commonMain/kotlin/com/example/data/PokemonRepository.kt
transitive_files:
- shared/src/commonMain/kotlin/com/example/ui/PokemonViewModel.kt
ui_screens:
- PokemonListScreen
- PokemonDetailScreen
The ground truth is intentionally minimal:
^import io.ktor.*).kmp-impact run-scenario \
--scenario-dir scenarios/pokedex_ktor_minor \
--output-dir output-pokedex \
--skip-dynamic
When the scenario provides a ground_truth.yml, the report includes a metrics card with Precision / Recall / F1 for files and screens.
Workflow for auditing a new repository:
kmp-impact analyze once with --skip-dynamic to collect a candidate impact list.direct_files / transitive_files under ground_truth.yml.run-scenario — every flag.evaluate — comparing a result against a ground truth offline.