amosblomqvist / learnharness
Code health
Hotspots average 6.6, the place fixes pay off most.
Explore this codebase
- Code health map116hotspots across 1,169 files
- Ownership868sole-owned files: one author, no second reader
- Architecture12modules, 6 entry points
- Decisions18recorded, of which 0 in force and 18 background
- Refactoring61open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 9
10 things worth doing in the week to Nov 12, the last indexed commit, 1 of them now.
Worth planning
Break up handleChatInput (CCN 202, 525 lines)
src/server/chat-handler.ts:265
handleChatInput has many paths; easier to read and change once split, which also removes a duplicate; function changed in 52 commits; its file is imported by 19 files, changed 72 times in 90 days.
- gain
- up to +1.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 202, 525 lines
- severity
- high
Medium effort, worth a checkBreak up QuestionDockForm (CCN 147, 525 lines)
components/question-dock.tsx:299
QuestionDockForm has many paths; easier to read and change once split, which also removes a duplicate; function changed in 44 commits; its file is imported by 14 files, changed 53 times in 90 days.
- gain
- up to +0.8 health on this file(inferred)
- finding
- Complex method
- size
- CCN 147, 525 lines
- severity
- high
Medium effort, worth a checkTidy the code shape this week's commits left: 35 findings in 23 files
18 commits in the last 7 days added or worsened long, complex or deeply nested code, still open. Start with
src/core/content-reader.ts(3 findings): tidying it while the change is fresh costs less than after the next one.- code-shape findings
- 35
- files
- 23
- commits
- 18
Large effortSimplify
GraphViewincomponents/graph-view.tsx: tests reach it, and fixes keep landingChanged 110 times in 90 days, and 15 of those commits were bug fixes.
- commits in 90 days
- 110
- bug-fix commits
- 15
- line coverage
- Unknown, no report
- tests that reach it
- 8 test files, call graph(inferred)
Large effort, worth a checkSimplify
sendincomponents/session-core.ts: tests reach it, and fixes keep landingChanged 38 times in 90 days, and 15 of those commits were bug fixes.
- commits in 90 days
- 38
- bug-fix commits
- 15
- line coverage
- Unknown, no report
- tests that reach it
- 22 test files, call graph(inferred)
Large 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 health1,884 open findingsCriticalFunction hotspot · components/session-core.ts33 findings · 12.1 deducted
- Refactoring61 open opportunitiesMediummain+1.0 health, M effort · scripts/smoke-server.mjs
- Doc drift13Mediumdocs/archive/pi-engine-swap.mdDocument names src/server/ui-stream-bridge.ts, which no longer exists.
- Decisions0 drifting from the codeMediumcomponents/chat.tsxHigh-churn file with no governing decision
- Ownership868 sole-owned filesMediumcomponents/chat.tsxOne author, no second reader