yc-software / qm
Code health
Hotspots average 5.5, the place fixes pay off most.
Explore this codebase
- Code health map175hotspots across 2,486 files
- Ownership1,369sole-owned files: one author, no second reader
- Architecture16modules, 13 entry points
- Decisions67recorded, of which 0 in force and 67 background
- Refactoring175open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 4
8 things worth doing in the week to Nov 3, the last indexed commit, 4 of them now.
Worth planning
Break up handleTurn (CCN 1059, 3,324 lines)
src/core/orchestrator.ts:1445
handleTurn has many paths; easier to read and change once split, which also removes a duplicate; its file is imported by 52 files, changed 101 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 1059, 3,324 lines, nests 5 deep
- severity
- high
Medium effort, worth a checkStart breaking up buildApp (CCN 391, 2,502 lines): first lift lines 555-563
src/wiring.ts:555
buildApp has many paths; easier to read and change once split, which also removes a duplicate; its file is imported by 81 files, changed 102 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 391, 2,502 lines
- severity
- high
Medium effort, worth a checkTidy the code shape this week's commits left: 38 findings in 28 files
15 commits in the last 7 days added or worsened long, complex or deeply nested code, still open. Start with
src/agent/agent-run.ts(3 findings): tidying it while the change is fresh costs less than after the next one.- code-shape findings
- 38
- files
- 28
- commits
- 15
Large effortBreak up runTurn (CCN 174, 568 lines)
src/agent/agent-run.ts:1292
runTurn has many paths; easier to read and change once split; function changed in 7 commits; its file is imported by 28 files, changed 48 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 174, 568 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 health4,042 open findingsCriticalChange entropy · cli/src/backends/aws.ts168 findings · 15.3 deducted
- Refactoring175 open opportunitiesMediummain+1.5 health, M effort · src/files/upload-client.py
- Doc drift2Mediumdocs/SPEC.mdDocument names src/loops/inbox-migration.ts, which no longer exists.
- Decisions0 drifting from the codeMediumsrc/core/orchestrator.tsHigh-churn file with no governing decision
- Ownership1,369 sole-owned filesMediumsrc/sessions/postgres-session-store.tsOne author, no second reader