Skip to content

Commit 542f65e

Browse files
committed
feat: add Git History Analyst Agent to init-ultrathink
Adds fifth agent to analyze repository evolution: - Tracks project milestones and technology migrations - Identifies commit patterns and code ownership - Documents architectural evolution and failed experiments - Maps common issues and bug patterns from history - Integrates findings throughout CLAUDE.md template
1 parent 685d43b commit 542f65e

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

roles/claude/files/commands/init-ultrathink.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ You are the Coordinator Agent orchestrating specialized sub-agents to create a c
2323
2. **Context Gatherer Agent** - Identifies key abstractions, workflows, and conventions
2424
3. **Documentation Agent** - Extracts insights from existing docs and comments
2525
4. **Testing Agent** - Analyzes test patterns and quality standards
26+
5. **Git History Analyst Agent** - Examines repository evolution and historical patterns
2627

2728
## Process
2829

@@ -139,6 +140,44 @@ You are the Coordinator Agent orchestrating specialized sub-agents to create a c
139140
- Performance budgets and benchmarks
140141
- Documentation requirements
141142

143+
### Phase 5: Git History Analysis (Git History Analyst Agent)
144+
145+
1. **Repository Evolution**
146+
- Initial commit and project inception
147+
- Major milestones and version releases
148+
- Growth patterns (files, commits, contributors)
149+
- Technology migrations and upgrades
150+
- Refactoring patterns and code cleanups
151+
- Feature development timelines
152+
- Deprecated features and removal patterns
153+
154+
2. **Commit Patterns**
155+
- Commit message conventions and evolution
156+
- Commit frequency and size patterns
157+
- Author contributions and expertise areas
158+
- Code ownership and maintenance patterns
159+
- Hot spots (frequently changed files)
160+
- Stable vs volatile code areas
161+
- Branching and merging strategies
162+
163+
3. **Architectural Evolution**
164+
- Major architectural changes over time
165+
- Design pattern adoptions and removals
166+
- Technology stack changes and reasons
167+
- Performance optimization history
168+
- Security improvement timeline
169+
- Breaking changes and migration paths
170+
- Failed experiments and lessons learned
171+
172+
4. **Issue and Bug Patterns**
173+
- Common bug fix patterns
174+
- Recurring issues and solutions
175+
- Performance problem areas
176+
- Security vulnerability fixes
177+
- Regression patterns
178+
- Feature request trends
179+
- Emergency fixes and hotfixes
180+
142181
## Ultrathink Reflection Phase
143182

144183
Synthesize all gathered information to create a comprehensive CLAUDE.md that includes ALL sections from the template. Each agent should contribute:
@@ -167,6 +206,13 @@ Synthesize all gathered information to create a comprehensive CLAUDE.md that inc
167206
- Code review process
168207
- Debugging tools and approaches
169208

209+
**Git History Analyst Agent:**
210+
- Historical context and evolution
211+
- Migration paths and deprecations
212+
- Common issues and their fixes
213+
- Code ownership and hot spots
214+
- Failed approaches to avoid
215+
170216
**Additional Considerations:**
171217
- Quick start guide with prerequisites
172218
- Comprehensive command reference
@@ -344,7 +390,15 @@ project/
344390
[Detailed explanation of something that might trip up newcomers]
345391

346392
### Historical Decisions
347-
[Key architectural decisions and their rationale]
393+
[Key architectural decisions and their rationale - from git history]
394+
- [Decision]: [Context, alternatives considered, outcome]
395+
- [Migration]: [What changed, why, and lessons learned]
396+
397+
### Code Evolution Patterns
398+
[How the codebase has evolved - from git history analysis]
399+
- Major refactorings: [what, when, why]
400+
- Technology migrations: [from → to, reasons]
401+
- Deprecated patterns: [what to avoid and why]
348402

349403
### Performance Considerations
350404
- [Bottleneck area]: [mitigation strategy]
@@ -392,11 +446,13 @@ project/
392446
- Symptoms: [what you'll see]
393447
- Cause: [root cause]
394448
- Solution: [how to fix]
449+
- History: [how often this occurs - from git history]
395450

396451
2. **[Another issue]**
397452
- Symptoms: [description]
398453
- Cause: [explanation]
399454
- Solution: [fix]
455+
- Prevention: [how to avoid - learned from history]
400456

401457
### Debugging Tools
402458
- [Tool name]: [usage]
@@ -482,6 +538,11 @@ project/
482538
### Team Contacts
483539
[If applicable, who to contact for different areas]
484540

541+
### Code Ownership
542+
[From git history - who maintains what]
543+
- [Component/Area]: [Primary maintainer(s)]
544+
- [Another area]: [Expert(s) based on commit history]
545+
485546
## Maintenance Tasks
486547

487548
### Regular Maintenance

0 commit comments

Comments
 (0)