On this page
Measure & evaluate
Find code that is expensive to understand.
Use structural signals to guide investigation, then validate a change with the project's own checks.
Read the report as a diagnostic
lean-ctx health .
The report uses structural signals such as complexity, naming and navigability. A high-cost hotspot can be worth investigating; it is not proof of a defect.
Trace the underlying source
Use the location from a report to inspect signatures, dependencies and implementation. Check whether a finding is relevant to your language, conventions and task.
Static analysis can miss dynamic relationships and can flag deliberate complexity.
Treat token tax as an estimate
A reported token or cost estimate describes the analysis model, not a measured provider bill. The amount an agent actually reads depends on its task and retrieval path.
Improve and verify
Choose a focused change, preserve behavior and run the appropriate tests. Re-run the report under the same source scope to inspect the structural difference.
Do not optimize a score at the expense of correctness or maintainability. See search and code intelligence for related tools.
Sources & versions
- mod.rsrust/src/core/code_health/mod.rsGitHub
- health_cmd.rsrust/src/cli/health_cmd.rsGitHub
- 22-code-health.mddocs/reference/22-code-health.mdReviewed checkout
- Core checkout
0ce2207ee4- Installed runtime
- 3.10.2
- SDK release
- 1.1.0
Separate baselines for source, CLI/configuration and SDK contracts. Review does not certify every platform or integration.
Versions & compatibility