libracoder / kiri
Code health
Hotspots average 4.9, the place fixes pay off most.
Explore this codebase
- Code health map52hotspots across 435 files
- Ownership323sole-owned files: one author, no second reader
- Architecture9modules, 10 entry points
- Decisions28recorded, of which 0 in force and 28 background
- Refactoring51open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 4
4 things worth doing in the week to Nov 20, the last indexed commit.
Worth planning
Start breaking up serve_loop (CCN 196, 596 lines): first lift lines 186-205
crates/kiri-init/src/linux/agent.rs:186
serve_loop has many paths; easier to read and change once split, which also removes a duplicate; function changed in 17 commits; its file is imported by 4 files, changed 20 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 196, 596 lines, nests 8 deep
- severity
- high
Medium effort, worth a checkStart breaking up handle (CCN 189, 733 lines): first lift lines 2166-2220
crates/kiri/src/ui/mod.rs:2166
handle has many paths; easier to read and change once split, which also removes a duplicate; function changed in 8 commits; its file is imported by 7 files, changed 14 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 189, 733 lines
- severity
- high
Medium effort, worth a checkTidy the code shape this week's commits left: 30 findings in 11 files
13 commits in the last 7 days added or worsened long, complex or deeply nested code, still open. Start with
crates/kiri/src/daemon/engine.rs(10 findings): tidying it while the change is fresh costs less than after the next one.- code-shape findings
- 30
- files
- 11
- commits
- 13
Large effortStart breaking up start_on_vm (CCN 85, 300 lines): first lift lines 2857-2873
crates/kiri/src/daemon/engine.rs:2857
start_on_vm has many paths; easier to read and change once split, which also removes a duplicate; its file is imported by 12 files, changed 34 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 85, 300 lines
- severity
- high
Medium effort, worth a check
Improve what Repowise can see
Add a test coverage report
Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.
- line coverage
- Unknown, no report
Small effort
Everything we found
5 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health1,213 open findingsCriticalDeep nesting · crates/kiri/src/ui/xterm/xterm.js200 findings · 12.0 deducted
- Refactoring51 open opportunitiesLowmain+0.5 health, S effort · scripts/i18n-check.py
- Doc drift1Mediumdocs/development.mdDocument names docs/testing-windows-arm.md, which no longer exists.
- Decisions0 drifting from the codeMediumcrates/kiri/src/daemon/api.rsHigh-churn file with no governing decision
- Ownership323 sole-owned filesMediumcrates/kiri-init/src/linux/container.rsOne author, no second reader