Code health of cosmicstack-labs/mercury-agent
Repowise scores cosmicstack-labs/mercury-agent at 6.5 out of 10 for code health, which reads as fair, alongside maintainability 6.2 and static performance 9.6 on the same scale. There are 2,078 open findings across the three pillars, and the lowest-scoring file is telegram.ts at 1.7. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.
Findings by severity
235 critical, 367 high, 841 medium, 593 low.
Hotspots
48 files are flagged as hotspots. The top 5:
- src/core/agent.ts: 62 commits in the last 90 days from 3 contributors with 35 recent bug fixes
- src/ui/App.tsx: 34 commits in the last 90 days from 1 contributor with 10 recent bug fixes
- src/channels/cli.ts: 34 commits in the last 90 days from 3 contributors with 16 recent bug fixes
- src/index.ts: 40 commits in the last 90 days from 8 contributors with 23 recent bug fixes
- src/bots/bot-manager.ts: 34 commits in the last 90 days from 1 contributor with 13 recent bug fixes
Lowest-scoring files
- src/channels/telegram.ts: 1.7 out of 10 with 5 bug fixes in the last 180 days
- src/index.ts: 2.0 out of 10 with 23 bug fixes in the last 180 days
- src/channels/cli.ts: 2.0 out of 10 with 16 bug fixes in the last 180 days
- src/core/agent.ts: 2.0 out of 10 with 35 bug fixes in the last 180 days
- src/cli/service.ts: 2.0 out of 10 with 8 bug fixes in the last 180 days
Checked against bug fixes
Of the 20 files Repowise scores lowest, 17 had a bug fix in the last 180 days. Across all 600 scored files, 13.3% had a bug fix in that window.
Dead code and refactoring
Repowise found 34 unused exports. 54 refactoring targets across 54 files would raise the score.
More on mercury-agent: summary and FAQ, codebase overview, architecture.
Related guide: Best dead code detection tools by language