Generate weekly work summary from git activity
Generates weekly work summaries from git commit history with categorized accomplishments and productivity metrics.
/plugin marketplace add gopherguides/gopher-ai/plugin install productivity@gopher-ai[weeks-back]haikugit config user.name 2>/dev/null || echo "unknown"AUTHOR=\git config user.name 2>/dev/null`; git log --author="$AUTHOR" --since="last monday" --format="%h %s" --all 2>/dev/null | head -15 || echo "No commits found"`date -v-monday +%Y-%m-%d 2>/dev/null || date -d "last monday" +%Y-%m-%d 2>/dev/null || echo "Monday"If $ARGUMENTS is empty or not provided:
Generate a summary of this week's git activity.
Usage: /weekly-summary [weeks-back]
Examples:
/weekly-summary - Current week (since Monday)/weekly-summary 1 - Last week/weekly-summary 2 - Two weeks agoWorkflow:
Proceed with current week's summary.
If $ARGUMENTS is provided:
Generate a weekly work summary for the specified week.
$ARGUMENTS (0 = current week, 1 = last week, etc.)git config user.name)Calculate Date Range
# Get start of week (Monday)
# For current week: this Monday
# For weeks back: subtract 7*N days from this Monday
git log --since="2024-01-15" --until="2024-01-22" --author="<user>"
Gather Commits Across Repos (Parallel)
If in a multi-repo directory, execute all repo queries simultaneously:
# First, find all repos
repos=$(find . -name ".git" -type d -exec dirname {} \;)
Then for EACH repo, run these commands in parallel:
git log for commitsgit shortlog for summaryFor each repo, collect:
Categorize Work
Group commits by:
feat: commits or new functionalityfix: commits or correctionschore:, refactor:, docs:, test:Also group by:
Calculate Metrics
Commits: 23
PRs Merged: 4
Lines Added: 1,245
Lines Removed: 387
Net Change: +858 lines
Files Touched: 34
Identify Key Accomplishments
Find significant work:
Generate Weekly Summary
# Weekly Summary
**Week of**: January 15 - 21, 2024
**Author**: Jane Developer
## Highlights
- Shipped user authentication feature (#123)
- Fixed critical payment processing bug (#456)
- Completed API rate limiting implementation
## By Category
### Features (8 commits)
- User authentication with JWT tokens
- Password reset flow
- Session management
### Bug Fixes (5 commits)
- Payment processing edge case (#456)
- Memory leak in connection pool
- Race condition in cache
### Maintenance (10 commits)
- Refactored validation utilities
- Updated dependencies
- Added integration tests
## Metrics
| Metric | Value |
|--------|-------|
| Commits | 23 |
| PRs Merged | 4 |
| Lines Added | 1,245 |
| Lines Removed | 387 |
| Files Changed | 34 |
## PRs Merged
- #123: Add user authentication
- #125: Implement rate limiting
- #128: Fix payment bug
- #130: Update dependencies
Format for Different Audiences
The summary can be used for: