The Style Graph
The style graph is the core of Replixa's review engine. It encodes the patterns, conventions, and structural norms of your codebase — not as rules you write, but as signals extracted from your commit history.
What the Graph Captures
The graph builds a weighted semantic model across four signal categories:
- Naming conventions: function/variable/class naming patterns by file context, prefix/suffix conventions, capitalization norms per type
- Abstraction boundaries: which layers call which layers, where domain objects live, how services are scoped
- Error handling patterns: how exceptions are caught and re-raised, which error types are colocated, retry patterns
- Revision signals: what senior engineers consistently fix in follow-up commits — these are high-weight nodes in the graph
Graph Structure
The graph is a weighted directed graph. Node types:
- Pattern node: a recurring code structure (e.g., "service method naming follows
verbNounin camelCase") - Context node: a file path or module boundary
- Violation node: a deviation pattern observed in commits that were later amended by senior reviewers
Edges encode the relationship strength (weight = frequency × seniority of confirming commits).
Graph Diagram — Node Types
How to Tune the Graph
The graph self-calibrates. But you can guide weighting via your .replixa.yml config:
style_graph:
weight_senior_commits: 2.5 # senior reviewers' fixes get higher signal weight
suppress_paths:
- src/generated/** # exclude generated code from pattern extraction
- migrations/**
focus_categories:
- naming
- abstraction-boundaries
min_pattern_frequency: 15 # ignore patterns appearing fewer than N times
Viewing Graph Metadata
See your graph's current state via CLI or API:
replixa graph inspect --repo org/repo --top-patterns 10
# Top 10 patterns by weight:
1. service-naming/verb-noun (weight: 847)
2. repository-pattern/find-methods (weight: 692)
3. dto-suffix-convention (weight: 534)
4. error-boundary/service-layer (weight: 421)
5. import-order/stdlib-first (weight: 318)