CLI command

budget

Render a four-dimension scorecard that compares the current snapshot to the thresholds in simplicity.json.

Command contract

budget gives teams a shared target. Instead of debating raw metrics, they can see which dimension is closest to or beyond the agreed limit.

Best for

Sprint planning, architecture reviews, and coaching conversations about whether a codebase is still inside acceptable operating limits.

Writes files

No. It prints an ASCII scorecard to stdout.

Exit behavior

Returns 0 on success. Returns 1 for usage errors or analysis failures.

Usage

Start with the exact command shape the CLI supports today.

Command
dotnet simplicity budget path/to/YourSolution.sln

Planning conversation

Check the budget before approving a feature that adds new projects or layers.

dotnet simplicity budget YourSolution.sln

What it prints or produces

The scorecard translates several metrics into four dimensions that teams can reason about quickly.

  • Status line showing how many of the four dimensions are within budget.
  • ASCII bars that visualize how much of each budget has been used.
  • Actual values and configured targets for Cognitive Load, Operational Surface, Change Safety, and Discoverability.
  • A Next move line that points at the most constrained or over-budget dimension.
Sample output
Complexity Budget
-----------------
Status: 3/4 dimension(s) within budget.
Bars show configured budget used. Values above 100% are over budget.

Cognitive Load      [----------]     0%  WITHIN BUDGET
  Onboarding time: 0.0h (target <= 40.0h)
Operational Surface [----------]     0%  WITHIN BUDGET
  Premature abstraction ratio: 0.00 (target <= 0.25)
Change Safety       [###-------]    27%  WITHIN BUDGET
  Average method complexity: 1.35 (target <= 5.00)
Discoverability     [##########]   276%  OVER BUDGET
  Primary path ratio: 0.22 (target >= 0.60)

Operational notes

These behaviors matter when you move from a local run to team automation.

  • The four dimensions map directly to configuration keys: maxOnboardingHours, prematureAbstractionRatioTarget, maxMethodComplexity, and primaryPathRatioTarget.
  • The current collector still emits 0h onboarding time in normal CLI collection, so Cognitive Load often reads 0.0h unless you provide another snapshot source in your own code.
  • budget is most effective when the team treats threshold changes as an explicit decision, not as a way to silence bad output.

Related pages

Use the surrounding docs when you need setup, filter interpretation, or CI context.