agentscope-ai / agentscope
Code health
Hotspots average 6.8, the place fixes pay off most.
Explore this codebase
- Code health map65hotspots across 1,304 files
- Ownership285sole-owned files: one author, no second reader
- Architecture5modules, 10 entry points
- Decisions3recorded, of which 0 in force and 3 background
- Refactoring138open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 9 · 1 setup step
9 things worth doing in the week to Nov 23, the last indexed commit · 1 setup step.
Worth planning
Start breaking up _run_impl (CCN 92, 577 lines): first lift lines 1364-1392
src/agentscope/app/_service/_chat.py:1364
_run_impl has many paths; easier to read and change once split, which also removes a duplicate; function changed in 13 commits; its file is imported by 2 files, changed 13 times in 90 days.
- gain
- up to +0.2 health on this file(inferred)
- finding
- Complex method
- size
- CCN 92, 577 lines, nests 5 deep
- severity
- high
Medium effort, worth a checkTidy the code shape this week's commits left: 10 findings in 7 files
7 commits in the last 7 days added or worsened long, complex or deeply nested code, still open. Start with
examples/web_ui/frontend/src/pages/voice-profile/index.tsx(2 findings): tidying it while the change is fresh costs less than after the next one.- code-shape findings
- 10
- files
- 7
- commits
- 7
Medium effortReview why fixes keep landing in
src/agentscope/rag/_parser/_word.py: tests reach itChanged 15 times in 90 days, and 14 of those commits were bug fixes.
- commits in 90 days
- 15
- bug-fix commits
- 14
- line coverage
- Unknown, no report
- tests that reach it
- 1 test file, call graph(inferred)
Medium effort, worth a checkReview why fixes keep landing in
src/agentscope/formatter/_gemini_formatter.py: tests reach itChanged 12 times in 90 days, and 11 of those commits were bug fixes.
- commits in 90 days
- 12
- bug-fix commits
- 11
- line coverage
- Unknown, no report
- tests that reach it
- 2 test files, call graph(inferred)
Medium effort, worth a checkBreak up check_sed_constraints (CCN 65, 134 lines)
src/agentscope/tool/_builtin/_bash_parser.py:807
check_sed_constraints has many paths; easier to read and change once split, which also removes a duplicate; function changed in 5 commits; its file is imported by 2 files, changed 8 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 65, 134 lines, nests 5 deep
- severity
- high
Medium effort, worth a check
Everything we found
4 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health1,722 open findingsCriticalChange entropy · src/agentscope/agent/_agent.py69 findings · 13.7 deducted
- Refactoring138 open opportunitiesMediumcall+2.0 health, M effort · src/agentscope/tool/_builtin/_grep.py
- Decisions0 drifting from the codeMediumtests/rag_parser_test.pyHigh-churn file with no governing decision
- Ownership285 sole-owned filesMediumexamples/web_ui/frontend/src/components/chat/ChatContent.tsxOne author, no second reader