A Python tool for analyzing Jira workflow metrics and identifying bottlenecks using AI-powered insights. Jira Flow Lens processes exported Jira data to compute flow metrics (cycle time, WIP, status distribution) and generates actionable improvement recommendations.
Jira Flow Lens helps project managers, scrum masters, and development team leads understand their team's workflow efficiency by:
- Computing key flow metrics from Jira exports (median/p90 cycle time, status distribution, assignee workload)
- Analyzing bottlenecks and work-in-progress (WIP) patterns
- Generating AI-powered, actionable improvement recommendations
This tool currently only works with Ollama as the LLM provider. You must have Ollama installed and running locally on your machine. Support for additional LLM providers (OpenAI, Anthropic, etc.) is planned for future releases.
- Python 3.13 or higher
- Ollama - Install from ollama.ai
- Ollama Model - Pull one of the supported models:
# Option 1: GPT-OSS 20B (default in code) ollama pull gpt-oss:20b # Option 2: Llama 3.2 (alternative) ollama pull llama3.2
- uv (Python package manager) - Install from astral.sh/uv
-
Clone the repository:
git clone <repository-url> cd jira-flow-lens
-
Install dependencies using uv:
uv sync
To use this tool, you need to export your Jira issues as a CSV file:
- In Jira, navigate to Issues → Search for Issues
- Apply filters to select the issues you want to analyze (e.g., specific project, time range)
- Click Export → Export CSV (All fields)
- Save the exported file as
jira-export.csvin thecsv/directory of this project
Important columns: The tool works best when your export includes these columns:
Created- Issue creation dateResolvedorResolution Date- Issue resolution dateStatus- Current statusAssignee- Person assigned to the issueUpdated- Last update date (optional)
-
Ensure Ollama is running:
ollama serve
-
Place your Jira CSV export in the
csv/directory asjira-export.csv -
Run the analysis:
uv run python main.py
The tool will:
- Load and preview your CSV data
- Parse date columns automatically
- Compute flow metrics (cycle time, status distribution, assignee workload)
- Generate AI-powered improvement recommendations
The tool provides:
- CSV Preview - Sample of loaded data and column information
- Deterministic Metrics:
- Median and P90 cycle time (in days)
- Issue distribution by status
- Top 10 assignees with open issues
- AI-Generated Summary - Bullet-point analysis with 3-5 specific improvement actions focused on WIP limits, bottlenecks, and cycle time optimization
All configuration settings are centralized in config.py to make customization easy without editing the main script.
Change the Ollama model (edit config.py:24-29):
OLLAMA_CONFIG = {
"model": "llama3.2", # Change from "gpt-oss:20b" to "llama3.2"
"validate_model_on_init": True,
"temperature": 0.1,
"num_predict": 1536,
"num_ctx": 4096,
}Adjust temperature for creativity vs. determinism (in OLLAMA_CONFIG):
- Lower values (0.0-0.3): More deterministic, follows format strictly
- Higher values (0.7-1.0): More creative, may diverge from format
Customize Jira column names (edit config.py:7-16) if your export uses different names:
JIRA_COLUMNS = {
"created": "Created Date", # Or whatever your export calls it
"status": "Issue Status",
"assignee": "Assigned To",
# ... etc
}Adjust status classification (edit config.py:18-26) to match your Jira workflow:
DONE_STATUS_VALUES = {
"done",
"resolved",
"closed",
# Add your custom completed statuses here
}Change number of top assignees (edit config.py:45-48):
METRICS_CONFIG = {
"top_assignees_count": 15, # Changed from 10 to 15
}See config.py for the complete list of settings:
CSV_FILE_PATH- Location of your Jira exportJIRA_COLUMNS- Column name mappings for different Jira exportsDONE_STATUS_VALUES- Status values considered "completed"OLLAMA_CONFIG- Ollama model and inference parametersLLM_PROMPT- The prompt template for AI analysisMETRICS_CONFIG- Metrics computation settings
jira-flow-lens/
├── csv/
│ └── jira-export.csv # Place your Jira export here
├── config.py # Configuration settings
├── main.py # Main analysis script
├── pyproject.toml # Project dependencies
└── README.md # This file
- Support for additional LLM providers (OpenAI, Anthropic, Google)
- Interactive web dashboard
- Historical trend analysis
- Configurable metric definitions
- Custom report templates
CSV file not found: Ensure your export is saved as csv/jira-export.csv
Ollama connection error: Make sure Ollama is running (ollama serve)
Model not found: Pull the required model using ollama pull <model-name>
Date parsing issues: The tool attempts to parse common Jira date column names. If your export uses different names, dates might not be parsed correctly. Customize JIRA_COLUMNS in config.py to match your export.
[Add your license here]
[Add contribution guidelines here]