azdo-daily 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- azdo_daily-1.0.0/LICENSE +21 -0
- azdo_daily-1.0.0/PKG-INFO +276 -0
- azdo_daily-1.0.0/README.md +249 -0
- azdo_daily-1.0.0/azdo_daily/__init__.py +9 -0
- azdo_daily-1.0.0/azdo_daily/ai.py +43 -0
- azdo_daily-1.0.0/azdo_daily/azdo.py +230 -0
- azdo_daily-1.0.0/azdo_daily/commands.py +475 -0
- azdo_daily-1.0.0/azdo_daily/config.py +45 -0
- azdo_daily-1.0.0/azdo_daily/main.py +63 -0
- azdo_daily-1.0.0/azdo_daily/state.py +32 -0
- azdo_daily-1.0.0/azdo_daily/ui.py +119 -0
- azdo_daily-1.0.0/azdo_daily.egg-info/PKG-INFO +276 -0
- azdo_daily-1.0.0/azdo_daily.egg-info/SOURCES.txt +18 -0
- azdo_daily-1.0.0/azdo_daily.egg-info/dependency_links.txt +1 -0
- azdo_daily-1.0.0/azdo_daily.egg-info/entry_points.txt +2 -0
- azdo_daily-1.0.0/azdo_daily.egg-info/requires.txt +6 -0
- azdo_daily-1.0.0/azdo_daily.egg-info/top_level.txt +1 -0
- azdo_daily-1.0.0/pyproject.toml +41 -0
- azdo_daily-1.0.0/setup.cfg +4 -0
- azdo_daily-1.0.0/setup.py +8 -0
azdo_daily-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shakila
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: azdo-daily
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Azure DevOps daily task automation with AI task breakdown
|
|
5
|
+
Author-email: Shakila <shadikari012@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/yourusername/azdo-daily
|
|
8
|
+
Project-URL: Issues, https://github.com/yourusername/azdo-daily/issues
|
|
9
|
+
Keywords: azure-devops,task-automation,ai,claude
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: requests>=2.28.0
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
24
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
25
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# Azure DevOps Daily Task Automation
|
|
29
|
+
|
|
30
|
+
🤖 Automate daily task creation, activation, and completion logging in Azure DevOps with AI-powered task breakdown via Claude.
|
|
31
|
+
|
|
32
|
+
- **AI Task Breakdown** — Claude reads user stories and generates concrete development tasks
|
|
33
|
+
- **Interactive Workflow** — `create` → `start` → `update` → `end` pipeline
|
|
34
|
+
- **Auto-linking** — Tasks linked to parent stories, related across multiple stories
|
|
35
|
+
- **Progress Tracking** — Log hours, remaining estimates, completion notes
|
|
36
|
+
- **Global CLI** — Install once, use anywhere: `azdo-daily configure`
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
Install globally from this repository:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
pip install .
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Or install in development mode:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install -e .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Then use from anywhere:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
azdo-daily configure
|
|
56
|
+
azdo-daily status
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Configuration
|
|
60
|
+
|
|
61
|
+
On first run, configure your settings:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
azdo-daily configure
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Configuration stored in `.config/settings.json` (project-local, excluded from git).
|
|
68
|
+
|
|
69
|
+
Interactive prompts for:
|
|
70
|
+
| Field | Description |
|
|
71
|
+
|---|---|
|
|
72
|
+
| `org` | Your Azure DevOps organisation name |
|
|
73
|
+
| `project` | Project name |
|
|
74
|
+
| `pat` | Personal Access Token — needs **Work Items (Read & Write)** scope |
|
|
75
|
+
| `anthropic_api_key` | From console.anthropic.com — for AI task breakdown |
|
|
76
|
+
| `assigned_to` | Your email/display name — used to filter stories |
|
|
77
|
+
| `close_state` | `Done` / `Closed` / `Resolved` (depends on your process template) |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Project Structure
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
azdo_daily/
|
|
85
|
+
├── main.py — Entry point: argument parsing + command dispatch
|
|
86
|
+
├── config.py — Configuration: load/save/validate settings
|
|
87
|
+
├── state.py — Daily state: load/save work items per day
|
|
88
|
+
├── ui.py — Terminal UI: colors, prompts, formatters, selection helpers
|
|
89
|
+
├── azdo.py — Azure DevOps API client: work item operations
|
|
90
|
+
├── ai.py — Claude AI: task breakdown from stories
|
|
91
|
+
└── commands.py — Command handlers: configure, create, start, update, end, status
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Key Modules
|
|
95
|
+
|
|
96
|
+
**`azdo.py`** — Azure DevOps API client
|
|
97
|
+
- `session()` — authenticated HTTP session
|
|
98
|
+
- `wit_base()` — Work Item Tracking API base URL
|
|
99
|
+
- `get_my_stories()` — fetch assigned stories via WIQL
|
|
100
|
+
- `create_task()` — create new task linked to stories
|
|
101
|
+
- `set_workitem_state()` — change work item state
|
|
102
|
+
- `resolve_task()` — mark task complete with hours + comment
|
|
103
|
+
- `partial_task()` — log progress, keep task open
|
|
104
|
+
- `_patch_workitem()` — internal: apply JSON Patch operations
|
|
105
|
+
- `add_comment()` — internal: append work item comment
|
|
106
|
+
|
|
107
|
+
**`commands.py`** — CLI command handlers
|
|
108
|
+
- `cmd_configure()` — interactive setup
|
|
109
|
+
- `cmd_create()` — select stories → generate tasks → create in Azure DevOps
|
|
110
|
+
- `cmd_start()` — activate tasks (mark In Progress)
|
|
111
|
+
- `cmd_update()` — log progress on tasks
|
|
112
|
+
- `cmd_end()` — mark tasks done + auto-resolve stories
|
|
113
|
+
- `cmd_status()` — show today's stories and tasks
|
|
114
|
+
|
|
115
|
+
**`ui.py`** — Terminal UI helpers
|
|
116
|
+
- Color constants: `R`, `B`, `DIM`, `GR`, `YL`, `BL`, `CY`, `RD`, `MG`
|
|
117
|
+
- Output: `ok()`, `err()`, `info()`, `warn()`, `hdr()`, `sep()`
|
|
118
|
+
- Input: `ask()` (prompt with optional default)
|
|
119
|
+
- Formatters: `print_stories()`, `print_tasks()`
|
|
120
|
+
- Selection: `parse_selection()`, `select_from_list()` (handles "all")
|
|
121
|
+
- Conversion: `float_or_none()`
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Daily Workflow
|
|
126
|
+
|
|
127
|
+
### Setup (once)
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
azdo-daily configure
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Morning — Create tasks
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
azdo-daily create
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
1. Fetches all active User Stories assigned to you
|
|
140
|
+
2. You select stories to work on (e.g. `1` or `1,3` or `2-4`)
|
|
141
|
+
3. Choose task creation method:
|
|
142
|
+
- **AI auto-breakdown** — Claude reads story and generates tasks
|
|
143
|
+
- **Manual entry** — type tasks yourself
|
|
144
|
+
- **Both** — AI suggests, you review/add/remove
|
|
145
|
+
4. If multiple stories: tasks created once, linked to all (child of #1, related to rest)
|
|
146
|
+
5. Tasks appear in Azure DevOps immediately
|
|
147
|
+
|
|
148
|
+
### Activate tasks
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
azdo-daily start
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Marks selected new tasks as "In Progress" and auto-activates linked stories.
|
|
155
|
+
|
|
156
|
+
### Anytime — Check status
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
azdo-daily status
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Shows active stories and all tasks with open/resolved counts.
|
|
163
|
+
|
|
164
|
+
### Throughout day — Log progress (optional)
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
azdo-daily update
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Log hours spent and remaining estimates on open tasks (keeps them "In Progress").
|
|
171
|
+
|
|
172
|
+
### Evening — Mark complete
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
azdo-daily end
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
1. Lists all open tasks for today
|
|
179
|
+
2. You select which to complete (e.g. `1,3` or `all`)
|
|
180
|
+
3. For each: enter hours spent + optional closing note
|
|
181
|
+
4. Task marked done + hours logged
|
|
182
|
+
5. If all tasks for a story are done → story auto-resolved
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## State Files
|
|
187
|
+
|
|
188
|
+
Each day's data in `state/YYYY-MM-DD.json`:
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"stories": [
|
|
193
|
+
{"id": 42, "title": "Implement auth"}
|
|
194
|
+
],
|
|
195
|
+
"tasks": [
|
|
196
|
+
{
|
|
197
|
+
"id": 101,
|
|
198
|
+
"title": "Add login endpoint",
|
|
199
|
+
"url": "https://...",
|
|
200
|
+
"active": true,
|
|
201
|
+
"closed": false,
|
|
202
|
+
"completed_hours": 2.5,
|
|
203
|
+
"remaining_hours": 1.0,
|
|
204
|
+
"story_ids": [42]
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Cron (optional)
|
|
213
|
+
|
|
214
|
+
Status reminder at 9 AM weekdays:
|
|
215
|
+
|
|
216
|
+
```cron
|
|
217
|
+
0 9 * * 1-5 azdo-daily status
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
> `start`, `update`, and `end` commands are interactive — use cron for `status` only.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Troubleshooting
|
|
225
|
+
|
|
226
|
+
### "Work item X does not exist"
|
|
227
|
+
|
|
228
|
+
Task IDs in state file no longer exist in Azure DevOps. Reset today's state:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
rm ~/.config/azdo_daily/state/2026-04-29.json # or today's date
|
|
232
|
+
azdo-daily create
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### "anthropic_api_key not set"
|
|
236
|
+
|
|
237
|
+
Run configure and enter Anthropic API key from [console.anthropic.com](https://console.anthropic.com):
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
azdo-daily configure
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### "Personal Access Token (PAT) invalid"
|
|
244
|
+
|
|
245
|
+
Regenerate PAT in Azure DevOps → User Settings → Personal Access Tokens.
|
|
246
|
+
Must have **Work Items (Read & Write)** scope.
|
|
247
|
+
|
|
248
|
+
### ModuleNotFoundError after install
|
|
249
|
+
|
|
250
|
+
Reinstall in development mode:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
pip install -e .
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Development
|
|
259
|
+
|
|
260
|
+
Install with dev tools:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
pip install -e ".[dev]"
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Format code:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
black azdo_daily/
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## License
|
|
275
|
+
|
|
276
|
+
MIT — see [LICENSE](LICENSE)
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
# Azure DevOps Daily Task Automation
|
|
2
|
+
|
|
3
|
+
🤖 Automate daily task creation, activation, and completion logging in Azure DevOps with AI-powered task breakdown via Claude.
|
|
4
|
+
|
|
5
|
+
- **AI Task Breakdown** — Claude reads user stories and generates concrete development tasks
|
|
6
|
+
- **Interactive Workflow** — `create` → `start` → `update` → `end` pipeline
|
|
7
|
+
- **Auto-linking** — Tasks linked to parent stories, related across multiple stories
|
|
8
|
+
- **Progress Tracking** — Log hours, remaining estimates, completion notes
|
|
9
|
+
- **Global CLI** — Install once, use anywhere: `azdo-daily configure`
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
Install globally from this repository:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install .
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or install in development mode:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install -e .
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then use from anywhere:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
azdo-daily configure
|
|
29
|
+
azdo-daily status
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Configuration
|
|
33
|
+
|
|
34
|
+
On first run, configure your settings:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
azdo-daily configure
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Configuration stored in `.config/settings.json` (project-local, excluded from git).
|
|
41
|
+
|
|
42
|
+
Interactive prompts for:
|
|
43
|
+
| Field | Description |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `org` | Your Azure DevOps organisation name |
|
|
46
|
+
| `project` | Project name |
|
|
47
|
+
| `pat` | Personal Access Token — needs **Work Items (Read & Write)** scope |
|
|
48
|
+
| `anthropic_api_key` | From console.anthropic.com — for AI task breakdown |
|
|
49
|
+
| `assigned_to` | Your email/display name — used to filter stories |
|
|
50
|
+
| `close_state` | `Done` / `Closed` / `Resolved` (depends on your process template) |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Project Structure
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
azdo_daily/
|
|
58
|
+
├── main.py — Entry point: argument parsing + command dispatch
|
|
59
|
+
├── config.py — Configuration: load/save/validate settings
|
|
60
|
+
├── state.py — Daily state: load/save work items per day
|
|
61
|
+
├── ui.py — Terminal UI: colors, prompts, formatters, selection helpers
|
|
62
|
+
├── azdo.py — Azure DevOps API client: work item operations
|
|
63
|
+
├── ai.py — Claude AI: task breakdown from stories
|
|
64
|
+
└── commands.py — Command handlers: configure, create, start, update, end, status
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Key Modules
|
|
68
|
+
|
|
69
|
+
**`azdo.py`** — Azure DevOps API client
|
|
70
|
+
- `session()` — authenticated HTTP session
|
|
71
|
+
- `wit_base()` — Work Item Tracking API base URL
|
|
72
|
+
- `get_my_stories()` — fetch assigned stories via WIQL
|
|
73
|
+
- `create_task()` — create new task linked to stories
|
|
74
|
+
- `set_workitem_state()` — change work item state
|
|
75
|
+
- `resolve_task()` — mark task complete with hours + comment
|
|
76
|
+
- `partial_task()` — log progress, keep task open
|
|
77
|
+
- `_patch_workitem()` — internal: apply JSON Patch operations
|
|
78
|
+
- `add_comment()` — internal: append work item comment
|
|
79
|
+
|
|
80
|
+
**`commands.py`** — CLI command handlers
|
|
81
|
+
- `cmd_configure()` — interactive setup
|
|
82
|
+
- `cmd_create()` — select stories → generate tasks → create in Azure DevOps
|
|
83
|
+
- `cmd_start()` — activate tasks (mark In Progress)
|
|
84
|
+
- `cmd_update()` — log progress on tasks
|
|
85
|
+
- `cmd_end()` — mark tasks done + auto-resolve stories
|
|
86
|
+
- `cmd_status()` — show today's stories and tasks
|
|
87
|
+
|
|
88
|
+
**`ui.py`** — Terminal UI helpers
|
|
89
|
+
- Color constants: `R`, `B`, `DIM`, `GR`, `YL`, `BL`, `CY`, `RD`, `MG`
|
|
90
|
+
- Output: `ok()`, `err()`, `info()`, `warn()`, `hdr()`, `sep()`
|
|
91
|
+
- Input: `ask()` (prompt with optional default)
|
|
92
|
+
- Formatters: `print_stories()`, `print_tasks()`
|
|
93
|
+
- Selection: `parse_selection()`, `select_from_list()` (handles "all")
|
|
94
|
+
- Conversion: `float_or_none()`
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Daily Workflow
|
|
99
|
+
|
|
100
|
+
### Setup (once)
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
azdo-daily configure
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Morning — Create tasks
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
azdo-daily create
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
1. Fetches all active User Stories assigned to you
|
|
113
|
+
2. You select stories to work on (e.g. `1` or `1,3` or `2-4`)
|
|
114
|
+
3. Choose task creation method:
|
|
115
|
+
- **AI auto-breakdown** — Claude reads story and generates tasks
|
|
116
|
+
- **Manual entry** — type tasks yourself
|
|
117
|
+
- **Both** — AI suggests, you review/add/remove
|
|
118
|
+
4. If multiple stories: tasks created once, linked to all (child of #1, related to rest)
|
|
119
|
+
5. Tasks appear in Azure DevOps immediately
|
|
120
|
+
|
|
121
|
+
### Activate tasks
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
azdo-daily start
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Marks selected new tasks as "In Progress" and auto-activates linked stories.
|
|
128
|
+
|
|
129
|
+
### Anytime — Check status
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
azdo-daily status
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Shows active stories and all tasks with open/resolved counts.
|
|
136
|
+
|
|
137
|
+
### Throughout day — Log progress (optional)
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
azdo-daily update
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Log hours spent and remaining estimates on open tasks (keeps them "In Progress").
|
|
144
|
+
|
|
145
|
+
### Evening — Mark complete
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
azdo-daily end
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
1. Lists all open tasks for today
|
|
152
|
+
2. You select which to complete (e.g. `1,3` or `all`)
|
|
153
|
+
3. For each: enter hours spent + optional closing note
|
|
154
|
+
4. Task marked done + hours logged
|
|
155
|
+
5. If all tasks for a story are done → story auto-resolved
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## State Files
|
|
160
|
+
|
|
161
|
+
Each day's data in `state/YYYY-MM-DD.json`:
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"stories": [
|
|
166
|
+
{"id": 42, "title": "Implement auth"}
|
|
167
|
+
],
|
|
168
|
+
"tasks": [
|
|
169
|
+
{
|
|
170
|
+
"id": 101,
|
|
171
|
+
"title": "Add login endpoint",
|
|
172
|
+
"url": "https://...",
|
|
173
|
+
"active": true,
|
|
174
|
+
"closed": false,
|
|
175
|
+
"completed_hours": 2.5,
|
|
176
|
+
"remaining_hours": 1.0,
|
|
177
|
+
"story_ids": [42]
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Cron (optional)
|
|
186
|
+
|
|
187
|
+
Status reminder at 9 AM weekdays:
|
|
188
|
+
|
|
189
|
+
```cron
|
|
190
|
+
0 9 * * 1-5 azdo-daily status
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
> `start`, `update`, and `end` commands are interactive — use cron for `status` only.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Troubleshooting
|
|
198
|
+
|
|
199
|
+
### "Work item X does not exist"
|
|
200
|
+
|
|
201
|
+
Task IDs in state file no longer exist in Azure DevOps. Reset today's state:
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
rm ~/.config/azdo_daily/state/2026-04-29.json # or today's date
|
|
205
|
+
azdo-daily create
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### "anthropic_api_key not set"
|
|
209
|
+
|
|
210
|
+
Run configure and enter Anthropic API key from [console.anthropic.com](https://console.anthropic.com):
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
azdo-daily configure
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### "Personal Access Token (PAT) invalid"
|
|
217
|
+
|
|
218
|
+
Regenerate PAT in Azure DevOps → User Settings → Personal Access Tokens.
|
|
219
|
+
Must have **Work Items (Read & Write)** scope.
|
|
220
|
+
|
|
221
|
+
### ModuleNotFoundError after install
|
|
222
|
+
|
|
223
|
+
Reinstall in development mode:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
pip install -e .
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Development
|
|
232
|
+
|
|
233
|
+
Install with dev tools:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
pip install -e ".[dev]"
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
Format code:
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
black azdo_daily/
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## License
|
|
248
|
+
|
|
249
|
+
MIT — see [LICENSE](LICENSE)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Claude AI task breakdown for user stories."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import re
|
|
5
|
+
|
|
6
|
+
import requests
|
|
7
|
+
|
|
8
|
+
SYSTEM_PROMPT = """You are a senior agile software engineer.
|
|
9
|
+
Given a user story, decompose it into concrete development tasks.
|
|
10
|
+
|
|
11
|
+
Return ONLY a valid JSON array — no markdown, no explanation.
|
|
12
|
+
Each element:
|
|
13
|
+
"title" — short imperative phrase (e.g. "Add login endpoint")
|
|
14
|
+
"description" — 1-2 sentences on what to implement or verify
|
|
15
|
+
"priority" — 1=Critical 2=High 3=Medium 4=Low
|
|
16
|
+
"effort" — estimated hours (number)
|
|
17
|
+
"tags" — semicolon-separated (e.g. "backend;api")
|
|
18
|
+
|
|
19
|
+
Cover: backend, frontend, DB, tests, docs, DevOps as appropriate.
|
|
20
|
+
Aim for 4–8 focused tasks."""
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def ai_breakdown(story_text: str, api_key: str) -> list[dict]:
|
|
24
|
+
"""Call Claude to break down story into tasks."""
|
|
25
|
+
r = requests.post(
|
|
26
|
+
"https://api.anthropic.com/v1/messages",
|
|
27
|
+
headers={
|
|
28
|
+
"x-api-key": api_key,
|
|
29
|
+
"anthropic-version": "2023-06-01",
|
|
30
|
+
"content-type": "application/json",
|
|
31
|
+
},
|
|
32
|
+
json={
|
|
33
|
+
"model": "claude-sonnet-4-20250514",
|
|
34
|
+
"max_tokens": 2048,
|
|
35
|
+
"system": SYSTEM_PROMPT,
|
|
36
|
+
"messages": [{"role": "user", "content": f"User story:\n\n{story_text}"}],
|
|
37
|
+
},
|
|
38
|
+
timeout=60,
|
|
39
|
+
)
|
|
40
|
+
r.raise_for_status()
|
|
41
|
+
raw = r.json()["content"][0]["text"].strip()
|
|
42
|
+
raw = re.sub(r"^```(?:json)?", "", raw).rstrip("`").strip()
|
|
43
|
+
return json.loads(raw)
|