A Jira CLI tool that analyzes epic completion patterns to predict team epic throughput for quarterly planning.
When planning quarterly releases, teams need to know: "How many epics can we realistically deliver?"
This tool analyzes your historical epic data to give you data-driven predictions based on:
- Average epic size (items, stories, story points)
- Historical epic closure rate
- Team velocity and capacity
# 1. Make executable
chmod +x epic-analyzer.sh
# 2. Run for your project
./epic-analyzer.sh YOUR_PROJECT_KEY
# 3. Analyze last 6 months
./epic-analyzer.sh MYPROJECT 6━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 EPIC CLOSURE ANALYSIS RESULTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total Epics Analyzed: 18
Average Items per Epic: 8.7
Average Points per Epic: 25.0
Average Stories per Epic: 7.4
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 EPIC CLOSURE PREDICTIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Historical Epic Closure Rate:
1.5 epics per sprint (based on 12 sprints)
Capacity-Based Prediction:
Team velocity: 80 points/sprint
Avg epic size: 25.0 points
Capacity rate: 2.7 epics/sprint (85% epic-focused)
Recommended Planning Assumptions:
📊 Conservative: 1.4 epics/sprint
📊 Expected: 1.5 epics/sprint
📊 Optimistic: 1.7 epics/sprint
Quarterly Projection (6 sprints):
📊 Conservative: 8 epics/quarter
📊 Expected: 9 epics/quarter
📊 Optimistic: 10 epics/quarter
- Queries Jira for all completed epics (Status = Closed, Resolution = Done)
- Analyzes each epic:
- Child issue count (stories, tasks, bugs)
- Story points (if configured)
- Story count
- Calculates averages across all epics
- Generates predictions:
- Historical rate (actual epic closures / sprints)
- Capacity-based rate (velocity / avg epic size)
- Conservative/Expected/Optimistic scenarios
- Exports JSON with detailed data for further analysis
- Jira CLI installed and configured
- bc (basic calculator) - pre-installed on macOS/Linux
- Access to Jira project with Epic issue type
# macOS
brew install ankitpokhrel/jira-cli/jira-cli
# Linux
# See: https://github.com/ankitpokhrel/jira-cli#installation
# Configure
jira initEdit these variables in the script (lines 15-21):
PROJECT="${1:-YOUR_PROJECT}" # Your default project key
LOOKBACK_MONTHS="${2:-12}" # How far back to analyze
SPRINT_LENGTH_WEEKS=2 # Your sprint length
SPRINT_VELOCITY=80 # Your team's average velocityIf story points show as 0, you need to configure the custom field:
# Line 92: Update to your story point field ID
POINTS=$(jira issue view "$EPIC_KEY" --template '{{.fields.customfield_XXXXX}}' ...)To find your field ID:
jira issue view EPIC-123 --template '{{.}}' | grep -i "story\|point"Common field IDs:
customfield_10016- Jira Cloud defaultcustomfield_10002- Some Jira Server instances
If your Jira uses a different epic link field name (line 85):
CHILD_JQL="'Your Epic Link Field' = $EPIC_KEY OR parent = $EPIC_KEY"Human-readable summary with predictions (see example above)
{PROJECT}_epic_analysis_YYYYMMDD.json
{
"analysis_date": "2026-04-09",
"project": "MYPROJECT",
"total_epics_closed": 18,
"epics": [
{
"key": "PROJ-123",
"child_count": 8,
"story_count": 6,
"points": 24
}
],
"summary": {
"total_items": 156,
"total_points": 450,
"total_stories": 132,
"avg_items_per_epic": 8.7,
"avg_points_per_epic": 25.0,
"avg_stories_per_epic": 7.3
}
}Question: "How many epics can we commit to in Q2?"
Run analysis before quarterly planning:
./epic-analyzer.sh MYPROJ 6Use Conservative prediction for committed deliverables, Expected for roadmap planning.
Question: "Are our epics too large?"
Guideline:
- Small epic: 5-8 items, 15-25 points (1-2 sprints)
- Medium epic: 8-15 items, 25-45 points (2-4 sprints)
- Large epic: >15 items → Consider splitting
If your average is >10 items, your epics may be over-scoped.
Question: "Is our epic throughput improving?"
Run monthly and compare results:
./epic-analyzer.sh MYPROJ 3 > results_$(date +%Y%m).txtUse data-driven delivery predictions:
"Based on our last 6 months of data, we close an average of 2.5 epics per sprint. For Q2 (6 sprints), we can commit to 12 epics (conservative) with a stretch goal of 15 epics (expected)."
- Before quarterly planning (6-12 month lookback)
- Monthly to track trends (3 month lookback)
- After major changes (epic scoping, team size, process changes)
Signs your epics are over-scoped:
- Average >10 items per epic
- Epics in progress for >4 sprints
- Historical closure rate < capacity prediction
How to fix:
- Scope epics to ONLY committed work
- Move lower-priority work to separate epics
- Target: 5-8 items, 15-25 points per epic
If Historical < Capacity:
- Epics may be over-scoped
- Action: Scope epics tighter, focus on completing 2-3 per sprint
If Historical ≈ Capacity:
- Good alignment! Use historical rate for planning
If Historical > Capacity:
- Epics may be under-scoped, or velocity assumption too low
- Action: Review velocity setting in script
# Check epics exist
jira issue list --jql 'project = MYPROJ AND type = Epic' --plain
# Check status and resolution values
jira issue list --jql 'project = MYPROJ AND type = Epic' --columns status,resolution --plainUpdate JQL on line 40 to match your workflow.
# Re-initialize Jira CLI
jira initSee Configuration section to update custom field.
Suggestions and improvements welcome! Open an issue or pull request.
MIT License - Free to use and modify
By @dramseur:
- Sprint Health Analyzer - Track sprint metrics
- Backlog Analyzer - Analyze backlog health
Together, these tools provide complete visibility into agile team performance.