Stellarion
Tools

stellarion_mine_git_history_for_file [Pro]

Mine git history for a specific file to learn its evolution patterns
This is a Pro tool. Requires a Stellarion Pro license. A 180-day free trial starts automatically.

Mines the git commit history for a specific file to extract patterns about how it has evolved. Learns what kinds of changes are typically made, which other files change alongside it, common fix patterns, and how its complexity has trended over time.

When to Use

  • Before modifying a critical file to understand its history and quirks
  • To learn what typically breaks when a specific file is changed
  • To discover which files are "companions" — always changed together with this one
  • To understand the evolution and intent behind the current design of a file

Parameters

ParameterTypeRequiredDefaultDescription
uristringYesAbsolute path to the file to analyze
maxCommitsnumberNo100Maximum number of commits to analyze for this file
minConfidencenumberNo0.7Minimum confidence threshold for extracted patterns (0.0 to 1.0)

Examples

Learn about a critical file

Mine the git history for src/core/engine.rs — what patterns can you find?

Analyzes up to 100 commits touching that file and extracts patterns.

Deep dive into a file's history

Analyze the full history of src/services/payment.ts — go back 500 commits.

Sets maxCommits: 500 for a thorough analysis.

Understand companion files

What files usually change together with src/models/user.ts?

The co-change patterns reveal companion files.

Output Format

Returns patterns specific to the file:

  • Commits analyzed — how many commits touched this file
  • Change frequency — how often this file is modified relative to the project
  • Co-change companions — files that are almost always modified alongside this one
  • Common change types — the kinds of modifications typically made (bug fixes, feature additions, refactors)
  • Fix patterns — recurring issues and their fixes
  • Memories created — new memories stored for this file

Tips

  • The co-change companions list is critical for safe modifications — if file A always changes with file B, modifying A without updating B is likely a bug
  • Use this before stellarion_assess_change_risk for the most informed risk assessment
  • High change frequency combined with high complexity is a red flag — the file is both hard to change and changes often
  • Patterns are stored in Stellarion's memory and automatically inform future queries about this file
  • For project-wide history mining, use stellarion_mine_git_history instead