Repository intelligence
Health Report: apollo-federation-ruby
Quick Insights
Key findings from the analysis - prioritized by impact
Code Duplication
11.5% of code is duplicated across 4 clone groups. Bugs fixed in one location may need fixing in others. Consider extracting shared functionality.
Active Development
343 commits across 46 files.
Healthy Codebase
Overall health score of 84 indicates a well-maintained codebase. Continue current practices and address issues as they arise.
Low Cohesion Classes
Classes doing too many unrelated things - candidates for splitting
| Class | File | Language | LCOM | WMC | CBO |
|---|
Architectural Smells
Structural problems that make the codebase harder to change safely
| Type | Severity | Files Involved | Suggestion |
|---|---|---|---|
| Unstable Dependency | Medium | example/graphql_server.rb, lib/apollo-federation.rb | Introduce an interface in the stable component that the unstable component implements (Dependency Inversion) |
Dependency Structure
Import graph analysis - cycles, bottlenecks, and instability
| File | Lang | PageRank | Betweenness | In | Out | Instability |
|---|
Known Issues
Problems the team has documented but not yet fixed (TODO, FIXME, HACK)
By Severity
By Category
| Severity | Category | File | Lang | Line | Comment |
|---|
Duplicated Code
Code that appears in multiple places - bugs fixed in one spot may need fixing elsewhere
Duplication Level
Technical Debt Gradient
Per-file debt scores - prioritize cleanup where it matters most
Grade Distribution
| File | Lang | Score | Grade | Structural | Semantic | Duplication | Coupling |
|---|
Historical Trends
How code quality has changed over time
Health Score Over Time
Component Trends
Change Activity
How frequently code is being modified
| File | Lang | Changes | Contributors | Churn Score |
|---|
Code Ownership
How knowledge is distributed - concentrated knowledge is a risk
Top Contributors
Score Breakdown
How the health score is calculated from individual components
Glossary
Definitions for the quality and risk terminology used in this report
Glossary of Terms
▼Health Score
A weighted composite metric (0-100) measuring overall code quality. Above 80 is good, 60-80 needs attention, below 60 is concerning.
Hotspot
A file that is both complex AND frequently changed. These are the highest-risk areas because they're hard to change safely but get changed often.
Bus Factor
The minimum number of people who would need to leave before critical knowledge is lost. Higher is better; 1 is a serious risk.
Knowledge Silo
A file that only one person has ever touched. If that person leaves, the knowledge goes with them.
Cyclomatic Complexity
The number of independent paths through code. More paths means more test cases needed and more ways things can go wrong.
Cognitive Complexity
How hard code is to understand. Accounts for nesting, breaks in flow, and things that make humans struggle to follow the logic.
LCOM (Cohesion)
How well a class's methods work together. High LCOM means methods don't share data - the class is probably doing too many unrelated things.
CBO (Coupling)
How many other classes a class depends on. High coupling means changes ripple through the codebase - everything is connected to everything.
Churn Rate
How frequently a file changes. High churn indicates instability - the code may be unclear, have bugs, or be undergoing active development.
Self-Admitted Technical Debt (SATD)
Code issues the team has documented (TODO, FIXME, HACK, XXX). These represent known shortcuts that need eventual attention.
Code Clone / Duplicate
Similar code appearing in multiple places. When a bug is fixed in one spot, it may need fixing elsewhere. Candidates for refactoring into shared functions.
Technical Debt Gradient
Per-file quality score (0-100) combining complexity, duplication, coupling, and other factors. Lower scores mean more accumulated debt.
Temporal Coupling
Files that frequently change together in the same commits. High temporal coupling suggests hidden dependencies not visible in the import graph.
Architectural Smell
A structural pattern that violates design principles: cyclic dependencies, hub-like modules, or stable code depending on unstable code.
Instability
Ratio of outgoing to total dependencies. 0 = maximally stable (many things depend on it), 1 = maximally unstable (depends on many things).
PageRank
Importance of a file in the dependency graph. Files with high PageRank are depended on by many other important files.