Skip to main content

Azure DevOps daily task automation with AI task breakdown

Project description

Azure DevOps Daily Task Automation

๐Ÿค– Automate 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 Workflow โ€” create โ†’ start โ†’ update โ†’ end 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

Install globally from this repository:

pip install .

Or install in development mode:

pip install -e .

Then 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]"

Format code:

black azdo_daily/

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.1.tar.gz (16.4 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.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: azdo_daily-1.0.1.tar.gz
  • Upload date:
  • Size: 16.4 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.1.tar.gz
Algorithm Hash digest
SHA256 127d38d88e2b430f11bcae2f4964b5c2e8b00f5343240c002189bd1f58c6c3a4
MD5 25c77235d41054eae268130bb5785327
BLAKE2b-256 e9fe268c36ac7372add5369e1d2a5eb461e62fc8ee1bfc28345ae76ec92270cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: azdo_daily-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e2d4e57a2db7bad7081a1b3c5460b0242aaa5e65c6e75e24700b68e4bbe7020
MD5 8c24374e6e7b4055ca1d3c9d8ddb762d
BLAKE2b-256 04658ba65c74679fe15f83243500a87482332a153f1099e7d78cd7b68a007c05

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