A Python CLI tool that connects to Azure DevOps, prioritizes your daily workload, reviews PRs with AI agents, and generates reports for team meetings.
- Daily Task List -- Fetches all work items from your ADO board, scores them by priority/state/assignment/staleness, and produces a ranked focus list
- PR Review Report -- Pulls active PRs from configured repos, categorizes them (needs review, mine, stale), ready for weekly meetings
- AI Agent PR Reviews -- Three AI specialist personas (Code Reviewer, Cisco NSO Expert, Debugging Specialist) review unapproved PRs and generate comment files
- Epic Breakdown -- Shows work items grouped by parent Epic with state summaries
- Backlog View -- Filterable backlog dump by state and assignee
ADO_Ticket_Analyzer/
├── config.yaml # Your orgs, PATs, settings (gitignored)
├── config.example.yaml # Template
├── requirements.txt
├── cron_agent_review.sh # Cron wrapper for AI reviews
├── ado_analyzer/
│ ├── cli.py # Click CLI (daily, pr-review, agent-review, epics, backlog, config)
│ ├── config.py # YAML + env var PAT resolution
│ ├── ado_client.py # ADO REST API client (multi-org, configurable API version)
│ ├── work_items.py # WIQL queries, work item normalization
│ ├── prioritizer.py # Scoring engine (priority, state, assignment, staleness, tags, points)
│ ├── pull_requests.py # PR fetch, normalize, categorize
│ ├── pr_reviewer.py # AI agent review (3 personas via Claude API)
│ ├── epics.py # Epic + child resolution via parent links
│ └── reporter.py # Terminal table + markdown formatters
├── output/
│ └── pr_reviews/ # AI review results (JSON + markdown)
└── tests/
├── test_prioritizer.py
├── test_work_items.py
└── test_pull_requests.py
git clone https://github.com/prime001/ADO_Ticket_Analyzer.git
cd ADO_Ticket_Analyzer
python3 -m venv venv
./venv/bin/pip install -r requirements.txtCopy the example config and edit:
cp config.example.yaml config.yamlEdit config.yaml:
- Set your organization URLs, project names, and team
- Set your
my_identityemail (e.g.,[email protected]) - Adjust
daily.topandpr_review.stale_daysas needed
Add to ~/.zshrc or ~/.bashrc:
# ADO Personal Access Tokens
export ADO_PAT_BOARDS="your-pat-for-boards-org"
export ADO_PAT_LEGACY="your-pat-for-legacy-server"
# Anthropic API key (for AI agent reviews)
export ANTHROPIC_API_KEY="sk-ant-..."PAT scopes required:
- Boards org: Work Items (Read)
- Repos org: Code (Read), Pull Requests (Read/Write for posting comments)
./venv/bin/python -m ado_analyzer config --test./venv/bin/python -m ado_analyzer daily
./venv/bin/python -m ado_analyzer daily --top 10
./venv/bin/python -m ado_analyzer daily --format markdown --output output/today.mdScoring weights:
| Factor | Weight | Logic |
|---|---|---|
| ADO Priority (P1-P4) | 40% | P1=100, P2=75, P3=50, P4=25 |
| State | 20% | Active=100, New=50, Resolved=25 |
| Assigned to me | 15% | Mine=100, Unassigned=50, Others=0 |
| Staleness | 10% | Days since last update (capped at 100) |
| Tag match | 10% | Boost for focus-area tags |
| Story points | 5% | Smaller items get slight boost |
./venv/bin/python -m ado_analyzer pr-review
./venv/bin/python -m ado_analyzer pr-review --format markdown --output output/pr_review.mdGroups PRs into:
- Needs my review (I'm a reviewer, haven't voted)
- My PRs (waiting on others)
- Stale (>7 days, configurable)
# Review unapproved PRs and save results to output/pr_reviews/
./venv/bin/python -m ado_analyzer agent-review
# Review AND post comments directly to ADO PRs
./venv/bin/python -m ado_analyzer agent-review --postThree AI personas review each unapproved PR:
| Persona | Focus |
|---|---|
| PR-Review | Code quality, DRY, naming, test coverage, git hygiene |
| Cisco-NSO-Expert | YANG models, Python callbacks, templates, NED compatibility, MAAPI patterns |
| Debugging-Specialist | Edge cases, error handling, resource leaks, security, backward compatibility |
Each review produces:
output/pr_reviews/pr_<id>_<repo>_comment.md-- Markdown ready to post to ADOoutput/pr_reviews/pr_<id>_<repo>_review.json-- Full structured data
# All team epics
./venv/bin/python -m ado_analyzer epics
# Only my items, grouped by epic
./venv/bin/python -m ado_analyzer epics --assigned-to me
# Include closed epics
./venv/bin/python -m ado_analyzer epics --assigned-to me --show-closed./venv/bin/python -m ado_analyzer backlog
./venv/bin/python -m ado_analyzer backlog --state Active --assigned-to me
./venv/bin/python -m ado_analyzer backlog --state Resolved --assigned-to meThe tool supports multiple ADO organizations simultaneously — useful when boards and repos live in different places (e.g., cloud vs on-prem).
Each org gets its own PAT and API version in config.yaml. See config.example.yaml for the full template.
crontab -e# Daily task list at 7am
0 7 * * * cd "$HOME/Scripts/ADO_Ticket_Analyzer" && ./venv/bin/python -m ado_analyzer daily --format markdown --output output/daily_$(date +\%Y\%m\%d).md >> output/daily.log 2>&1
# Friday PR review at 9am (before team meeting)
0 9 * * 5 cd "$HOME/Scripts/ADO_Ticket_Analyzer" && ./venv/bin/python -m ado_analyzer pr-review --format markdown --output output/pr_review_$(date +\%Y\%m\%d).md >> output/pr_review.log 2>&1
# Thursday 8pm -- AI agent reviews (gives time to process before Friday)
0 20 * * 4 "$HOME/Scripts/ADO_Ticket_Analyzer/cron_agent_review.sh" >> "$HOME/Scripts/ADO_Ticket_Analyzer/output/agent_review.log" 2>&1./venv/bin/python -m pytest tests/ -v- PATs are stored in environment variables, never in config files
config.yaml,.env, andoutput/are gitignored- The Anthropic API key is also env-var only
- AI agent reviews can be run locally without
--postto inspect before publishing
MIT