From universe
Traces evolution of files or functions through git history to identify structural commits adding complexity. Helps assess necessity for refactoring.
npx claudepluginhub mbwsims/claude-universe --plugin universeThis skill is limited to using the following tools:
Trace the evolution of a file from simple to complex. Identify the moments where complexity
Retrieves historical file versions via git and timewarp tools, annotates top changes with commit details, classifications (design decisions, bug fixes), and explanations of why they occurred.
Analyzes git history using git log, blame, shortlog to trace code evolution, map contributors, and identify commit patterns for repo archaeology.
Traces latest changes to file ranges or code snippets via git blame and deduplicated entire explain lookups to explain code provenance.
Share bugs, ideas, or general feedback.
Trace the evolution of a file from simple to complex. Identify the moments where complexity was added, understand WHY it was added, and assess whether each layer is still necessary. Essential for refactoring: you need to understand the history before you can safely simplify.
timewarp_trends (if available) to find the file with
the steepest complexity growth. If MCP is unavailable, find the largest source file
(by line count, excluding generated/vendor files) and dissect that.Read the file now. Assess:
Function-level tracking: If a specific function was requested, isolate its evolution:
git log -L :{function_name}:{file} to get the function's commit historyFind the structural commits — the ones that significantly changed the file's shape:
If timewarp_history is available, call it first to get the commit frequency, author mix,
and most-changed-file context before diving into raw git output.
# All commits touching this file, with stats
git log --oneline --stat --follow -- {file}
Filter for commits that changed the file significantly (added >20 lines, changed function count, restructured). Ignore cosmetic commits (formatting, renames, import reordering).
For the 5-8 most significant structural commits, read the file at each point:
git show {commit}:{file}
History bound: If the file has more than 50 structural commits, focus on the 5 most recent plus the initial creation. Note: "Full archaeology would require deeper analysis — focused on the most recent evolution." For files older than 2 years, consider narrowing the analysis window to the last 12 months unless the user specifically wants full history.
See references/complexity-archaeology.md for methodology on identifying structural vs
cosmetic commits.
For each structural commit, document:
Look for:
Read .timewarp/ for existing drift or forecast data on this file. If drift data shows
this file has shifted purpose, that context helps explain the complexity — it may be complex
because it's doing things it wasn't designed for.
Report format:
## Bisect — {file}
**Current state:** {lines} lines, {functions} functions, max nesting depth {n}
**Created:** {date} at {lines} lines
### Evolution Timeline
| Date | Commit | Change | Why | Still needed? |
|------|--------|--------|-----|---------------|
| {date} | {hash} | Created with {n} lines, {purpose} | Initial implementation | Yes |
| {date} | {hash} | Added {feature}, +{n} lines | {commit message context} | Yes |
| {date} | {hash} | Added error handling for {case} | Bug fix #{n} | Probably |
| {date} | {hash} | Added {compatibility layer} | {reason} | No — {reason obsolete} |
| {date} | {hash} | Refactored {section} | Performance | Yes |
### Complexity Assessment
**Justified complexity:** {what complexity exists for good reasons}
**Potentially vestigial:**
- {complexity layer} added in {commit} for {reason} — reason may no longer apply because {evidence}
- ...
### Refactoring Opportunities
1. **{specific opportunity}** — {what to simplify and why it's safe}
Estimated reduction: ~{n} lines
2. ...
Save results to .timewarp/dissect-{sanitized-file}-{date}.json.
.timewarp/directory: Create the directory if it doesn't exist. Results older than 30 days are stale — prefer re-running the analysis over consuming old data. Other Timewarp skills may read these files to cross-reference findings (e.g.,/forecastchecks for drift data on trending files).
Path sanitization for cache filenames: Replace / with -- and remove leading dots.
Example: src/services/auth-service.ts becomes src--services--auth-service.ts.
This prevents accidentally creating nested directories in the cache.
/drift — Understand if the file's purpose has shifted (explains WHY it got complex)/rewind — See a specific historical version in detail/explain — Explain the current code and its constraints in detailreferences/complexity-archaeology.md — Identifying structural commits, reading
commit context, assessing whether complexity is load-bearing