Skip to content

Commit a5b57c7

Browse files
committed
docs: update README with comprehensive usage examples
- Add natural language query examples for all tools - Include use case scenarios (sprint retros, performance reviews, etc) - Add tips for getting the most value from the MCP - Expand tool documentation with example queries
1 parent 9a96954 commit a5b57c7

File tree

1 file changed

+254
-26
lines changed

1 file changed

+254
-26
lines changed

README.md

Lines changed: 254 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ This server provides tools to extract meaningful metrics from git repositories,
1212
- **Author Metrics**: Per-developer performance breakdown
1313
- **File Churn Analysis**: Identify frequently modified files (quality indicators)
1414
- **Team Summaries**: Comprehensive team performance reports
15+
- **Commit Patterns**: Analyze when people commit (burnout detection)
16+
- **Code Ownership**: Bus factor and knowledge distribution analysis
17+
- **Velocity Trends**: Week/month productivity tracking
18+
- **Collaboration Metrics**: Team interaction patterns
19+
- **Quality Metrics**: Commit size, reverts, and fix rates
20+
- **Technical Debt**: Stale files and complexity hotspots
1521

1622
## Installation
1723

@@ -70,6 +76,100 @@ Add to `~/.kiro/settings/mcp.json`:
7076
}
7177
```
7278

79+
## Usage with Kiro CLI
80+
81+
Start Kiro CLI:
82+
```bash
83+
kiro-cli chat
84+
```
85+
86+
Then ask natural language questions about your repositories:
87+
88+
### Basic Metrics
89+
90+
**Get overall stats:**
91+
```
92+
Get commit stats for /home/user/myproject since 2025-11-01
93+
```
94+
95+
**Team breakdown:**
96+
```
97+
Show me author metrics for this repo since last month
98+
```
99+
100+
**Find problematic files:**
101+
```
102+
What files have the most churn in /home/user/myproject since October?
103+
```
104+
105+
### Team Performance
106+
107+
**Sprint retrospective:**
108+
```
109+
Generate a team summary for /home/user/project since 2025-11-01
110+
```
111+
112+
**Individual performance:**
113+
```
114+
Get commit stats for /home/user/project since 2025-11-01 for author john@example.com
115+
```
116+
117+
**Velocity tracking:**
118+
```
119+
Show me velocity trends by week for this repo since November
120+
```
121+
122+
### Code Quality & Health
123+
124+
**Burnout detection:**
125+
```
126+
Show me commit patterns for /home/user/project since last month
127+
Are people committing late at night or on weekends?
128+
```
129+
130+
**Quality indicators:**
131+
```
132+
What are the quality metrics for this repo since last sprint?
133+
How many reverts and fixes do we have?
134+
```
135+
136+
**Technical debt:**
137+
```
138+
Identify technical debt in /home/user/project
139+
Show me stale files and complexity hotspots
140+
```
141+
142+
### Team Collaboration
143+
144+
**Bus factor analysis:**
145+
```
146+
What's our bus factor for /home/user/project?
147+
Who owns critical code areas?
148+
```
149+
150+
**Collaboration patterns:**
151+
```
152+
Show me collaboration metrics for this repo
153+
Who works together most often?
154+
```
155+
156+
### Advanced Queries
157+
158+
**Compare time periods:**
159+
```
160+
Compare velocity trends for this repo: last month vs this month
161+
```
162+
163+
**Multi-metric analysis:**
164+
```
165+
Analyze /home/user/project: show me quality metrics, technical debt, and bus factor
166+
```
167+
168+
**Custom date ranges:**
169+
```
170+
Get team summary for /home/user/project from 2025-10-01 to 2025-10-31
171+
```
172+
73173
## Available Tools
74174

75175
### get_commit_stats
@@ -82,11 +182,6 @@ Get overall commit statistics for a time period.
82182
- `until` (optional): End date (YYYY-MM-DD)
83183
- `author` (optional): Filter by author
84184

85-
**Example:**
86-
```
87-
Get commit stats for /home/user/myproject since 2025-11-01
88-
```
89-
90185
**Returns:**
91186
```json
92187
{
@@ -159,44 +254,177 @@ Comprehensive team performance report.
159254
}
160255
```
161256

162-
## Example Queries
257+
### get_commit_patterns
163258

164-
**Sprint Review:**
259+
Analyze when people commit (burnout detection).
260+
261+
**Parameters:**
262+
- `repo_path` (required): Path to git repository
263+
- `since` (required): Start date (YYYY-MM-DD)
264+
- `until` (optional): End date (YYYY-MM-DD)
265+
266+
**Returns:**
267+
```json
268+
{
269+
"byDay": { "Mon": 45, "Tue": 38, ... },
270+
"byHour": { "09": 12, "14": 18, ... },
271+
"patterns": {
272+
"weekendPercentage": "15.2%",
273+
"lateNightPercentage": "8.3%"
274+
}
275+
}
165276
```
166-
Generate a team summary for /home/user/project since 2025-11-01
277+
278+
### get_code_ownership
279+
280+
Bus factor and knowledge distribution.
281+
282+
**Parameters:**
283+
- `repo_path` (required): Path to git repository
284+
- `since` (required): Start date (YYYY-MM-DD)
285+
286+
**Returns:**
287+
```json
288+
{
289+
"totalFiles": 150,
290+
"sharedFiles": 80,
291+
"soloFiles": 70,
292+
"busFactor": [
293+
{ "author": "John <john@example.com>", "exclusiveFiles": 25 }
294+
]
295+
}
167296
```
168297

169-
**Individual Performance:**
298+
### get_velocity_trends
299+
300+
Track velocity over time.
301+
302+
**Parameters:**
303+
- `repo_path` (required): Path to git repository
304+
- `since` (required): Start date (YYYY-MM-DD)
305+
- `interval` (optional): "week" or "month", default "week"
306+
307+
**Returns:**
308+
```json
309+
{
310+
"interval": "week",
311+
"trends": [
312+
{ "period": "2025-11-01", "commits": 45, "additions": 1250, "deletions": 380 }
313+
]
314+
}
170315
```
171-
Get commit stats for /home/user/project since 2025-11-01 for author john@example.com
316+
317+
### get_collaboration_metrics
318+
319+
Team interaction patterns.
320+
321+
**Parameters:**
322+
- `repo_path` (required): Path to git repository
323+
- `since` (required): Start date (YYYY-MM-DD)
324+
325+
**Returns:**
326+
```json
327+
{
328+
"collaborativeFiles": 80,
329+
"topCollaborations": [
330+
{ "pair": "John <-> Jane", "sharedFiles": 25 }
331+
]
332+
}
333+
```
334+
335+
### get_quality_metrics
336+
337+
Code quality indicators.
338+
339+
**Parameters:**
340+
- `repo_path` (required): Path to git repository
341+
- `since` (required): Start date (YYYY-MM-DD)
342+
343+
**Returns:**
344+
```json
345+
{
346+
"averageCommitSize": 125,
347+
"medianCommitSize": 85,
348+
"revertRate": "2.3%",
349+
"fixRate": "18.5%"
350+
}
351+
```
352+
353+
### get_technical_debt
354+
355+
Identify technical debt.
356+
357+
**Parameters:**
358+
- `repo_path` (required): Path to git repository
359+
- `stale_days` (optional): Days to consider stale, default 90
360+
361+
**Returns:**
362+
```json
363+
{
364+
"staleFiles": [
365+
{ "file": "old-module.js", "daysSinceLastChange": 180 }
366+
],
367+
"largeFiles": [
368+
{ "file": "big-file.js", "sizeBytes": 50000, "churn": 25 }
369+
],
370+
"complexityHotspots": [ ... ]
371+
}
172372
```
173373

174-
**Code Quality Check:**
374+
## Use Cases
375+
376+
### Sprint Retrospectives
175377
```
176-
Show me file churn for /home/user/project since 2025-10-01 limit 20
378+
Show me team summary and velocity trends for the last 2 weeks
379+
What's our commit pattern? Are we burning out?
177380
```
178381

179-
**Weekly Standup:**
382+
### Performance Reviews
180383
```
181-
Get author metrics for /home/user/project since 2025-11-15
384+
Get author metrics for john@example.com since last quarter
385+
Compare their velocity to team average
182386
```
183387

184-
## Use Cases
388+
### Code Quality Reviews
389+
```
390+
Show me quality metrics and technical debt
391+
What files have high churn and need refactoring?
392+
```
393+
394+
### Team Health Checks
395+
```
396+
What's our bus factor? Who are single points of failure?
397+
Show me collaboration metrics - is the team working together?
398+
```
185399

186-
- **Sprint Retrospectives**: Review team velocity and contribution patterns
187-
- **Performance Reviews**: Data-driven developer assessments
188-
- **Code Quality**: Identify problematic files with high churn
189-
- **Team Balance**: Ensure even workload distribution
190-
- **Onboarding**: Track new developer ramp-up
400+
### Onboarding Tracking
401+
```
402+
Get commit stats for new-dev@example.com since their start date
403+
Show their velocity trend over the first 3 months
404+
```
191405

192406
## KPIs You Can Track
193407

194-
- Commits per developer per week/sprint
195-
- Code volume (lines added/deleted)
196-
- File change frequency
197-
- Code churn (quality indicator)
198-
- Contribution balance across team
199-
- Commit patterns and consistency
408+
- **Velocity**: Commits per developer per week/sprint
409+
- **Code Volume**: Lines added/deleted
410+
- **Activity**: Files changed
411+
- **Churn**: Files changed repeatedly (quality indicator)
412+
- **Contribution Balance**: Even distribution across team
413+
- **Commit Frequency**: Daily/weekly patterns
414+
- **Burnout Indicators**: Weekend/late-night commits
415+
- **Bus Factor**: Knowledge concentration risk
416+
- **Collaboration**: Team interaction frequency
417+
- **Quality**: Commit size, revert rate, fix rate
418+
- **Technical Debt**: Stale files, large files, complexity
419+
420+
## Tips for Best Results
421+
422+
1. **Use natural language**: Kiro understands context, so ask questions naturally
423+
2. **Combine metrics**: Ask for multiple analyses in one query
424+
3. **Compare periods**: Track trends over time
425+
4. **Be specific with dates**: Use "since 2025-11-01" or "last month"
426+
5. **Filter by author**: Focus on individual or team performance
427+
6. **Regular reviews**: Run weekly/monthly to track trends
200428

201429
## Development
202430

0 commit comments

Comments
 (0)