CLI command
baseline
Write the current snapshot to a baseline file so future runs can measure drift instead of relying on memory.
Command contract
baseline sets the comparison contract. Once you capture it, diff can tell you whether the solution got better, worse, or simply changed.
Sprint boundaries, approved refactoring checkpoints, and the moment a team decides to protect current gains in CI.
Yes. Writes <solution-directory>/.simplicity-baseline.json and overwrites any existing file.
Returns 0 on success. Returns 1 for usage errors or write failures.
Usage
Start with the exact command shape the CLI supports today.
dotnet simplicity baseline path/to/YourSolution.sln Create the first gate
Run once locally when the team agrees the current shape is the floor to protect.
dotnet simplicity baseline YourSolution.sln
git add .simplicity-baseline.json What it prints or produces
baseline prints the same snapshot summary as analyze, then confirms where the baseline file was written.
- Indented camelCase JSON representing the current SimplicitySnapshot.
- A confirmation line that points to the exact baseline file path.
- No separate approval flow; rerunning the command intentionally replaces the baseline.
- The saved file is what diff reads later in local runs and CI.
Simplicity Snapshot (2026-05-01)
----------------------------------------
Projects: 2
Total files: 23
Primary path files: 5
Abstraction layers: 1
Single-impl interfaces: 0
External deps: 0 (0 unused)
Avg complexity: 1.4
Est. onboarding: 0h
Baseline written to /path/to/.simplicity-baseline.json Operational notes
These behaviors matter when you move from a local run to team automation.
- Commit the generated baseline if you expect CI to enforce diff --fail-on-regression.
- The file always lives beside the solution, not in the current working directory unless that is also the solution directory.
- Treat baseline updates like contract changes: review them explicitly instead of letting them drift in with unrelated work.
Related pages
Use the surrounding docs when you need setup, filter interpretation, or CI context.