Skip to main content

Azure DevOps daily task automation with AI task breakdown

Project description

Azure DevOps Daily Task Automation

Python 3.9+ MIT License PyPI

Python CLI for automating daily task creation, activation, and completion logging in Azure DevOps with AI-powered task breakdown via Claude.

  • AI Task Breakdown — Claude reads user stories and generates concrete development tasks
  • Interactive Workflowcreatestartupdateend pipeline
  • Auto-linking — Tasks linked to parent stories, related across multiple stories
  • Progress Tracking — Log hours, remaining estimates, completion notes
  • Global CLI — Install once, use anywhere: azdo-daily configure

Installation

From PyPI (recommended)

pip install azdo-daily
azdo-daily configure

From source

Clone repository:

git clone https://github.com/MrShakila/Azdo-Daily.git
cd Azdo-Daily
pip install .

Or install in development mode:

pip install -e ".[dev]"

Requirements

  • Python 3.9+
  • requests library (auto-installed)
  • Anthropic API key (for AI task breakdown)
  • Azure DevOps Personal Access Token (PAT)

Use from anywhere:

azdo-daily configure
azdo-daily status

Configuration

On first run, configure your settings:

azdo-daily configure

Configuration stored in .config/settings.json (project-local, excluded from git).

Interactive prompts for:

Field Description
org Your Azure DevOps organisation name
project Project name
pat Personal Access Token — needs Work Items (Read & Write) scope
anthropic_api_key From console.anthropic.com — for AI task breakdown
assigned_to Your email/display name — used to filter stories
close_state Done / Closed / Resolved (depends on your process template)

Project Structure

azdo_daily/
├── main.py       — Entry point: argument parsing + command dispatch
├── config.py     — Configuration: load/save/validate settings
├── state.py      — Daily state: load/save work items per day
├── ui.py         — Terminal UI: colors, prompts, formatters, selection helpers
├── azdo.py       — Azure DevOps API client: work item operations
├── ai.py         — Claude AI: task breakdown from stories
└── commands.py   — Command handlers: configure, create, start, update, end, status

Key Modules

azdo.py — Azure DevOps API client

  • session() — authenticated HTTP session
  • wit_base() — Work Item Tracking API base URL
  • get_my_stories() — fetch assigned stories via WIQL
  • create_task() — create new task linked to stories
  • set_workitem_state() — change work item state
  • resolve_task() — mark task complete with hours + comment
  • partial_task() — log progress, keep task open
  • _patch_workitem() — internal: apply JSON Patch operations
  • add_comment() — internal: append work item comment

commands.py — CLI command handlers

  • cmd_configure() — interactive setup
  • cmd_create() — select stories → generate tasks → create in Azure DevOps
  • cmd_start() — activate tasks (mark In Progress)
  • cmd_update() — log progress on tasks
  • cmd_end() — mark tasks done + auto-resolve stories
  • cmd_status() — show today's stories and tasks

ui.py — Terminal UI helpers

  • Color constants: R, B, DIM, GR, YL, BL, CY, RD, MG
  • Output: ok(), err(), info(), warn(), hdr(), sep()
  • Input: ask() (prompt with optional default)
  • Formatters: print_stories(), print_tasks()
  • Selection: parse_selection(), select_from_list() (handles "all")
  • Conversion: float_or_none()

Daily Workflow

Setup (once)

azdo-daily configure

Morning — Create tasks

azdo-daily create
  1. Fetches all active User Stories assigned to you
  2. You select stories to work on (e.g. 1 or 1,3 or 2-4)
  3. Choose task creation method:
    • AI auto-breakdown — Claude reads story and generates tasks
    • Manual entry — type tasks yourself
    • Both — AI suggests, you review/add/remove
  4. If multiple stories: tasks created once, linked to all (child of #1, related to rest)
  5. Tasks appear in Azure DevOps immediately

Activate tasks

azdo-daily start

Marks selected new tasks as "In Progress" and auto-activates linked stories.

Anytime — Check status

azdo-daily status

Shows active stories and all tasks with open/resolved counts.

Throughout day — Log progress (optional)

azdo-daily update

Log hours spent and remaining estimates on open tasks (keeps them "In Progress").

Evening — Mark complete

azdo-daily end
  1. Lists all open tasks for today
  2. You select which to complete (e.g. 1,3 or all)
  3. For each: enter hours spent + optional closing note
  4. Task marked done + hours logged
  5. If all tasks for a story are done → story auto-resolved

State Files

Each day's data in state/YYYY-MM-DD.json:

{
  "stories": [
    {"id": 42, "title": "Implement auth"}
  ],
  "tasks": [
    {
      "id": 101,
      "title": "Add login endpoint",
      "url": "https://...",
      "active": true,
      "closed": false,
      "completed_hours": 2.5,
      "remaining_hours": 1.0,
      "story_ids": [42]
    }
  ]
}

Cron (optional)

Status reminder at 9 AM weekdays:

0 9 * * 1-5 azdo-daily status

start, update, and end commands are interactive — use cron for status only.


Troubleshooting

"Work item X does not exist"

Task IDs in state file no longer exist in Azure DevOps. Reset today's state:

rm ~/.config/azdo_daily/state/2026-04-29.json  # or today's date
azdo-daily create

"anthropic_api_key not set"

Run configure and enter Anthropic API key from console.anthropic.com:

azdo-daily configure

"Personal Access Token (PAT) invalid"

Regenerate PAT in Azure DevOps → User Settings → Personal Access Tokens. Must have Work Items (Read & Write) scope.

ModuleNotFoundError after install

Reinstall in development mode:

pip install -e .

Development

Install with dev tools:

pip install -e ".[dev]"

Install pre-commit hooks:

pip install pre-commit
pre-commit install

Format code (auto-runs on commit via pre-commit):

black azdo_daily/

Lint code:

flake8 azdo_daily/

See CONTRIBUTING.md for full development guide.


License

MIT — see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

azdo_daily-1.0.2.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

azdo_daily-1.0.2-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file azdo_daily-1.0.2.tar.gz.

File metadata

  • Download URL: azdo_daily-1.0.2.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for azdo_daily-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ae5c1d31b8c557723f54536c24279d604c3238c7ff8210976de1d76c9fda6861
MD5 6c4be8bfeb71ad20e76e513638dd2008
BLAKE2b-256 59a87e1af465a97efee343ffeac853085c75c994d43b0c927f03f57b111d00f8

See more details on using hashes here.

File details

Details for the file azdo_daily-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: azdo_daily-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for azdo_daily-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b0381eac657c6d11a048807e08802fbbc54bb8e0bb68facbf5bac3ce933f1e21
MD5 37cc388cb15741a441a5845fa168729f
BLAKE2b-256 5459fb576025e4ee7eadbc1ec9f3243bd4aebbb09c6ea1fec768a8710eacedc1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page