microsoft / tokeneconomizer
Code health
Hotspots average 5.0, the place fixes pay off most.
Explore this codebase
- Code health map25hotspots across 237 files
- Ownership52sole-owned files: one author, no second reader
- Architecture6modules, 2 entry points
- Decisions29recorded, of which 0 in force and 29 background
- Refactoring54open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 5
5 things worth doing in the week to Nov 17, the last indexed commit.
Worth planning
Start breaking up update (CCN 124, 212 lines): first lift lines 397-422
tokeneconomizer/microskills/envfacts.py:397
update has many paths; easier to read and change once split; function changed in 5 commits; its file is imported by 8 files, changed 8 times in 90 days.
- gain
- up to +1.8 health on this file(inferred)
- finding
- Complex method
- size
- CCN 124, 212 lines, nests 4 deep
- severity
- high
Medium effort, worth a checkTidy the code shape this week's commits left: 8 findings in 6 files
7 commits in the last 7 days added or worsened long, complex or deeply nested code, still open. Start with
tokeneconomizer/microskills/distiller.py(2 findings): tidying it while the change is fresh costs less than after the next one.- code-shape findings
- 8
- files
- 6
- commits
- 7
Medium effortStart breaking up observe_task (CCN 74, 90 lines): first lift lines 699-709
tokeneconomizer/microskills/observe.py:699
observe_task has many paths; easier to read and change once split; function changed in 4 commits; its file is imported by 9 files, changed 12 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 74, 90 lines, nests 5 deep
- severity
- high
Medium effort, worth a checkReview why fixes keep landing in
tokeneconomizer/microskills/distiller.py: tests reach itChanged 17 times in 90 days, and 4 of those commits were bug fixes.
- commits in 90 days
- 17
- bug-fix commits
- 4
- line coverage
- Unknown, no report
- tests that reach it
- 7 test files, call graph(inferred)
Large effort, worth a checkStart breaking up _merge_host (CCN 53, 76 lines): first lift lines 367-375
tokeneconomizer/plugin/repos.py:367
_merge_host has many paths; easier to read and change once split; function changed in 2 commits; its file is imported by 7 files, changed 8 times in 90 days.
- gain
- up to +0.2 health on this file(inferred)
- finding
- Complex method
- size
- CCN 53, 76 lines
- severity
- high
Medium effort, worth a check
Everything we found
5 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health867 open findingsCriticalComplex method · tokeneconomizer/microskills/observe.py37 findings · 9.3 deducted
- Refactoring54 open opportunitiesMediummain+2.4 health, M effort · experiments/scripts/compare_arms.py
- Doc drift4Mediumdocs/PLUGIN.mdDocument names .github/copilot/settings.local.json, which no longer exists.
- Decisions0 drifting from the codeMediumtests/test_live_core.pyHigh-churn file with no governing decision
- Ownership52 sole-owned filesMediumtests/test_opencode_plugin.pyOne author, no second reader