@chris1807/claude-kit 2.2.2 → 2.2.3
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.
- package/package.json +1 -1
- package/templates/commands/add-to-release.md +1 -1
- package/templates/commands/cherry-pick.md +1 -1
- package/templates/commands/close-orphan-tasks.md +5 -5
- package/templates/commands/create-release.md +2 -2
- package/templates/commands/create-work-item.md +4 -4
- package/templates/commands/deploy-release.md +2 -2
- package/templates/commands/edit-work-item.md +2 -2
- package/templates/commands/implement.md +9 -7
- package/templates/commands/plan-backlog.md +4 -4
- package/templates/commands/plan-sprint.md +4 -4
- package/templates/commands/quote-backlog.md +6 -6
- package/templates/commands/quote.md +3 -3
- package/templates/commands/rework.md +20 -7
- package/templates/commands/track.md +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chris1807/claude-kit",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "Claude Code starter kit for Azure DevOps teams — agents, hooks, MCP servers, slash commands, and end-to-end work item → PR → release → deploy workflow automation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@ Wait for confirmation.
|
|
|
38
38
|
|
|
39
39
|
## Step 4: Assign and Tag
|
|
40
40
|
|
|
41
|
-
Use `
|
|
41
|
+
Use `wit_work_item_write` (action `update_batch`) to:
|
|
42
42
|
1. Set the Iteration Path to `{project}\Release #{N}` on each new work item
|
|
43
43
|
2. Append `release-{N}` to each work item's tags
|
|
44
44
|
|
|
@@ -123,7 +123,7 @@ Cherry-picking:
|
|
|
123
123
|
- **targetRefName**: `refs/heads/<target-environment-branch>`
|
|
124
124
|
- **title**: `Cherry-pick AB#1234, AB#1235 → {Environment}`
|
|
125
125
|
- **description**: List all work items with IDs and titles, and — under a `Scripts to run` heading — any deployment scripts found in Step 1b, so whoever merges sees them without opening the work items
|
|
126
|
-
3. Link all work items to the PR via `
|
|
126
|
+
3. Link all work items to the PR via `wit_work_item_link_write` (action `link_to_pull_request`)
|
|
127
127
|
|
|
128
128
|
## Step 6: Pick Who Verifies Each Group (before the merge)
|
|
129
129
|
|
|
@@ -16,7 +16,7 @@ All work items live in the **CSI Development** Azure DevOps project (see CLAUDE.
|
|
|
16
16
|
|
|
17
17
|
## Step 1: Find Orphaned Tasks
|
|
18
18
|
|
|
19
|
-
Use the Azure DevOps MCP `
|
|
19
|
+
Use the Azure DevOps MCP `wit_query` (action `wiql`) with a hierarchy link query. The Source is the parent, the Target is the child Task:
|
|
20
20
|
|
|
21
21
|
```sql
|
|
22
22
|
SELECT [System.Id]
|
|
@@ -31,11 +31,11 @@ MODE (MustContain)
|
|
|
31
31
|
|
|
32
32
|
If a **scope** was given, add the matching constraint to the `[Target]` clause (e.g. `AND [Target].[System.AreaPath] UNDER 'CSI Development\\Compass'`, or `AND [Target].[System.Title] CONTAINS 'PAY'`).
|
|
33
33
|
|
|
34
|
-
> **Note on state names:** Process templates vary. Some projects close tasks to `Done` instead of `Closed`, or use `Resolved`. If the query returns nothing or errors on an unknown state, first confirm the valid states for the Task type via `
|
|
34
|
+
> **Note on state names:** Process templates vary. Some projects close tasks to `Done` instead of `Closed`, or use `Resolved`. If the query returns nothing or errors on an unknown state, first confirm the valid states for the Task type via `wit_work_item` (action `get_type`), then adjust the `NOT IN` list and the close target in Step 3 accordingly.
|
|
35
35
|
|
|
36
36
|
If the link query is unsupported or returns no usable pairs, fall back to: query all open Tasks in scope with a flat WIQL, fetch each task's parent via `relations`, and keep only those whose parent state is in the three target states.
|
|
37
37
|
|
|
38
|
-
Fetch the matched tasks (and their parents) in a batch via `
|
|
38
|
+
Fetch the matched tasks (and their parents) in a batch via `wit_work_item` (action `get_batch`) to get titles, states, assignees, and parent context.
|
|
39
39
|
|
|
40
40
|
## Step 2: Present the Candidates
|
|
41
41
|
|
|
@@ -59,11 +59,11 @@ Otherwise, wait for explicit confirmation before proceeding. Never close tasks w
|
|
|
59
59
|
|
|
60
60
|
## Step 3: Close the Tasks
|
|
61
61
|
|
|
62
|
-
For each confirmed task, use `
|
|
62
|
+
For each confirmed task, use `wit_work_item_write` (action `update_batch`):
|
|
63
63
|
- **path**: `/fields/System.State`
|
|
64
64
|
- **value**: `Closed` (or the project's terminal Task state confirmed in Step 1)
|
|
65
65
|
|
|
66
|
-
Then add a comment on each via `
|
|
66
|
+
Then add a comment on each via `wit_work_item_comment_write` (action `add`) so the auto-close is traceable:
|
|
67
67
|
|
|
68
68
|
> Auto-closed by `/close-orphan-tasks` — parent AB#{parentId} is in state "{parentState}".
|
|
69
69
|
|
|
@@ -38,13 +38,13 @@ Create a new iteration in Azure DevOps via `work_create_iterations`:
|
|
|
38
38
|
|
|
39
39
|
## Step 4: Assign Work Items to the Release
|
|
40
40
|
|
|
41
|
-
Use `
|
|
41
|
+
Use `wit_work_item_write` (action `update_batch`) to set the Iteration Path on each work item to the new release iteration:
|
|
42
42
|
- **path**: `/fields/System.IterationPath`
|
|
43
43
|
- **value**: `{project}\Release #{N}`
|
|
44
44
|
|
|
45
45
|
## Step 5: Tag Work Items
|
|
46
46
|
|
|
47
|
-
Use `
|
|
47
|
+
Use `wit_work_item_write` (action `update_batch`) to add a release tag to each work item:
|
|
48
48
|
- **path**: `/fields/System.Tags`
|
|
49
49
|
- **value**: append `release-{N}` to existing tags
|
|
50
50
|
|
|
@@ -404,7 +404,7 @@ This applies to **User Story**. It does **not** apply to Bug or Hot Fix: neither
|
|
|
404
404
|
|
|
405
405
|
### Call the create API
|
|
406
406
|
|
|
407
|
-
Call `mcp__azure-
|
|
407
|
+
Call `mcp__azure-devops__wit_work_item_write` (action `create`) with:
|
|
408
408
|
|
|
409
409
|
- **project**: the chosen project
|
|
410
410
|
- **workItemType**: `Feature`, `Bug`, `User Story`, or `Hot Fix` (two words, exact casing)
|
|
@@ -431,7 +431,7 @@ If the `Open Questions` section is non-empty, append it as a clearly-labeled HTM
|
|
|
431
431
|
|
|
432
432
|
### Move to Dev Ready (pointed items only)
|
|
433
433
|
|
|
434
|
-
If story points were agreed in Step 4, set `System.State` to `Dev Ready` via `mcp__azure-
|
|
434
|
+
If story points were agreed in Step 4, set `System.State` to `Dev Ready` via `mcp__azure-devops__wit_work_item_write` (action `update`) **after** the item is created (a separate call — new items start in `New`, and some process templates reject a non-initial state in the create call). If the state transition is rejected, report the error and leave the state as-is — don't silently retry through intermediate states. Items created without points stay in `New`.
|
|
435
435
|
|
|
436
436
|
**Features are never moved.** A Feature stays in `New` and advances only as its child stories are verified and closed — the same rule `/implement` follows.
|
|
437
437
|
|
|
@@ -462,7 +462,7 @@ On `yes`:
|
|
|
462
462
|
```
|
|
463
463
|
|
|
464
464
|
**Wait for the user.** Revise and re-present until approved. Do not create anything before approval.
|
|
465
|
-
5. On approval, create each story with `mcp__azure-
|
|
465
|
+
5. On approval, create each story with `mcp__azure-devops__wit_work_item_write` (action `create`) in the same project, setting:
|
|
466
466
|
- `System.Description` and `Microsoft.VSTS.Common.AcceptanceCriteria` — rendered to HTML per the Step 8 rules
|
|
467
467
|
- `Custom.Order` — the wave number
|
|
468
468
|
- `Microsoft.VSTS.Scheduling.StoryPoints` — the agreed points
|
|
@@ -489,7 +489,7 @@ For a **Bug**, fetch `Microsoft.VSTS.TCM.ReproSteps` and `Microsoft.VSTS.TCM.Sys
|
|
|
489
489
|
|
|
490
490
|
For a **Hot Fix**, fetch `System.Description` and `Microsoft.VSTS.TCM.ReproSteps`, and confirm the narrative is in the former and the reproduction detail in the latter.
|
|
491
491
|
|
|
492
|
-
If a check fails the write didn't take — fix it with `
|
|
492
|
+
If a check fails the write didn't take — fix it with `wit_work_item_write` (action `update`) before reporting success. Don't report a created item you haven't read back.
|
|
493
493
|
|
|
494
494
|
After creation, report:
|
|
495
495
|
|
|
@@ -20,7 +20,7 @@ Resolve branch names from the project's `CLAUDE.md` **Pipeline Configuration** t
|
|
|
20
20
|
|
|
21
21
|
## Step 1: Read the Release
|
|
22
22
|
|
|
23
|
-
Query Azure DevOps for all work items tagged with `release-{N}` or assigned to the `Release #{N}` iteration using `search_workitem` or `
|
|
23
|
+
Query Azure DevOps for all work items tagged with `release-{N}` or assigned to the `Release #{N}` iteration using `search_workitem` or `wit_work_item` (action `list_for_iteration`).
|
|
24
24
|
|
|
25
25
|
Present the release contents:
|
|
26
26
|
|
|
@@ -179,7 +179,7 @@ Cherry-picking commits for Release #{N}:
|
|
|
179
179
|
- **targetRefName**: `refs/heads/<target-environment-branch>`
|
|
180
180
|
- **title**: `Release #{N} → {Environment}`
|
|
181
181
|
- **description**: List all work items included with their IDs and titles, and — under a `Scripts to run` heading — any deployment scripts found in Step 3b, so whoever merges sees them without opening the work items
|
|
182
|
-
3. Link all work items to the PR via `
|
|
182
|
+
3. Link all work items to the PR via `wit_work_item_link_write` (action `link_to_pull_request`)
|
|
183
183
|
|
|
184
184
|
## Step 8: Pick Who Verifies Each Group (before the merge)
|
|
185
185
|
|
|
@@ -230,9 +230,9 @@ Render every Markdown section to HTML first — Azure DevOps description and acc
|
|
|
230
230
|
|
|
231
231
|
Apply writes in this order, so a failure partway through leaves the most useful state behind:
|
|
232
232
|
|
|
233
|
-
1. **Update the parent item** — one `mcp__azure-
|
|
233
|
+
1. **Update the parent item** — one `mcp__azure-devops__wit_work_item_write` (action `update`) call with every changed field. Never include `System.State` for a Feature.
|
|
234
234
|
2. **Update existing children** (verdict `Update`) — one call per story, points and `Custom.Order` in the same call as the text changes. If points were set on a story still at or before `Dev Ready`, set `System.State` = `Dev Ready` in that same call.
|
|
235
|
-
3. **Create added children** — `mcp__azure-
|
|
235
|
+
3. **Create added children** — `mcp__azure-devops__wit_work_item_write` (action `create`) with description, acceptance criteria, `Custom.Order`, agreed `Microsoft.VSTS.Scheduling.StoryPoints`, and `System.AssignedTo` copied from the Feature if it has an assignee. Then link each to the Feature as a child via `mcp__azure-devops__wit_work_item_link_write` (`System.LinkTypes.Hierarchy-Reverse`), then move pointed ones to `Dev Ready` in a follow-up call.
|
|
236
236
|
4. **Re-order** any story whose only change is `Custom.Order` — one call each, touching that field alone.
|
|
237
237
|
5. **Retire** stories the user approved — set `System.State` = `Removed`, or remove the parent link, whichever the user chose. **Never delete a work item.**
|
|
238
238
|
6. **Post comments** (if the user said yes) via `mcp__azure-devops__wit_work_item_comment_write` — one short comment per edited item saying what changed and why, and naming the Feature edit that drove it (e.g. `Scope updated via edit of AB#6240: acceptance criteria 2 reworded to cover SSO; re-ordered from wave 3 to wave 2.`).
|
|
@@ -32,7 +32,7 @@ The description and acceptance criteria fields may contain embedded images (scre
|
|
|
32
32
|
|
|
33
33
|
### Comments
|
|
34
34
|
|
|
35
|
-
Read the work item comments via `
|
|
35
|
+
Read the work item comments via `wit_work_item` (action `list_comments`). Comments often contain clarifications, scope changes, or additional requirements added after the work item was created. Incorporate any relevant information from comments into your understanding of the work item.
|
|
36
36
|
|
|
37
37
|
## Step 2: Summarize and Confirm
|
|
38
38
|
|
|
@@ -188,12 +188,14 @@ Remember the `BASE_BRANCH` — you will need it for the PR step.
|
|
|
188
188
|
|
|
189
189
|
### Move the Work Item to Active
|
|
190
190
|
|
|
191
|
-
Once the branch is created, move the work item (User Story, Bug, Hot Fix, or other single work item — never a Feature) to `Active` via `
|
|
191
|
+
Once the branch is created, move the work item (User Story, Bug, Hot Fix, or other single work item — never a Feature) to `Active` via `wit_work_item_write` (action `update`):
|
|
192
192
|
- **path**: `/fields/System.State`
|
|
193
193
|
- **value**: `Active`
|
|
194
194
|
|
|
195
195
|
If the work item is already `Active`, skip the update. If the project's process template does not have an `Active` state (the update call returns an invalid-state error), fall back in this order: `In Progress` → `Doing` → leave the current state and warn the user that the state could not be advanced automatically. Do not silently swallow the error.
|
|
196
196
|
|
|
197
|
+
After the update, **read the work item back** (`wit_work_item`, action `get`) and confirm `System.State` actually changed. If it didn't, say so explicitly — do not proceed reporting the item as in progress when the board still shows it otherwise.
|
|
198
|
+
|
|
197
199
|
### Ensure an Open Child Task Exists
|
|
198
200
|
|
|
199
201
|
The child **Task** is where hours live: Step 10 closes it and logs the hours worked when the PR goes up. So an implementation run must never proceed without one — if there's nothing to close, nothing gets logged.
|
|
@@ -264,7 +266,7 @@ Create it? (yes / edit / skip)
|
|
|
264
266
|
- `edit` → ask what to change (title or hours), revise, re-show, ask again
|
|
265
267
|
- `skip` → continue without a Task, and **warn** that Step 10 will have no Task to close and no hours will be logged for this story
|
|
266
268
|
|
|
267
|
-
On `yes`, create it with `mcp__azure-
|
|
269
|
+
On `yes`, create it with `mcp__azure-devops__wit_work_item_write` (action `create`):
|
|
268
270
|
|
|
269
271
|
- **workItemType**: `Task`
|
|
270
272
|
- **title**: `{PREFIX} - Implement: {short summary of the story}` — reuse the parent's product prefix (`COM`, `PAY`, `CDA`, …), extracted from the parent's title
|
|
@@ -275,7 +277,7 @@ On `yes`, create it with `mcp__azure-devops__wit_create_work_item`:
|
|
|
275
277
|
- `System.AssignedTo` — copy from the parent (pass the parent's `uniqueName` / email if the value is an identity object). If the parent is unassigned, leave it unset rather than failing.
|
|
276
278
|
- `System.State` — `Active`, since implementation is starting right now (fall back to the template's in-progress equivalent, or leave it at the default and note it)
|
|
277
279
|
|
|
278
|
-
Then link it as a child of the work item with `mcp__azure-
|
|
280
|
+
Then link it as a child of the work item with `mcp__azure-devops__wit_work_item_write` (action `add_child`) (or `wit_work_item_link_write` (action `link`) with `System.LinkTypes.Hierarchy-Forward`, parent → task).
|
|
279
281
|
|
|
280
282
|
If the create or link call fails, report it and ask whether to implement without a Task or stop. Don't silently continue — the user needs to know hours won't be tracked.
|
|
281
283
|
|
|
@@ -387,9 +389,9 @@ Wait for the user's response before proceeding. Do NOT create a PR until confirm
|
|
|
387
389
|
- **targetRefName**: `refs/heads/{BASE_BRANCH}` (the branch captured in Step 4)
|
|
388
390
|
- **title**: `AB#{id}: {work item title}`
|
|
389
391
|
- **labels**: `["hotfix"]` if the work item type is Hot Fix
|
|
390
|
-
3. Link the PR to the work item via `
|
|
392
|
+
3. Link the PR to the work item via `wit_work_item_link_write` (action `link_to_pull_request`)
|
|
391
393
|
4. **Close related Tasks and log hours** — see "Closing Related Tasks" below.
|
|
392
|
-
5. **Move the work item to `Code Review`** via `
|
|
394
|
+
5. **Move the work item to `Code Review`** via `wit_work_item_write` (action `update`):
|
|
393
395
|
- **path**: `/fields/System.State`
|
|
394
396
|
- **value**: `Code Review`
|
|
395
397
|
|
|
@@ -452,7 +454,7 @@ For each task being processed, prompt for completed hours:
|
|
|
452
454
|
|
|
453
455
|
**Wait for the user's response on every task.** Accept the suggested/current value (enter), a new numeric value, or `skip` to leave that one untouched.
|
|
454
456
|
|
|
455
|
-
Once the user has answered, update each task in a **single** `
|
|
457
|
+
Once the user has answered, update each task in a **single** `wit_work_item_write` (action `update`) call per task:
|
|
456
458
|
- `Microsoft.VSTS.Scheduling.CompletedWork` → the agreed value
|
|
457
459
|
- `Microsoft.VSTS.Scheduling.RemainingWork` → `0`
|
|
458
460
|
- `Microsoft.VSTS.Scheduling.OriginalEstimate` → only if it is still empty; set it to the agreed completed hours so the Task isn't left with no estimate at all. Never overwrite an estimate that's already there — the gap between estimate and actual is the useful signal.
|
|
@@ -27,7 +27,7 @@ If the user types `list`, call `mcp__azure-devops__core_list_projects` and prese
|
|
|
27
27
|
|
|
28
28
|
## Step 2: Query the Backlog
|
|
29
29
|
|
|
30
|
-
Run a WIQL query via `mcp__azure-
|
|
30
|
+
Run a WIQL query via `mcp__azure-devops__wit_query` (action `wiql`) to find candidate stories. "Backlog" means items at the **root iteration path** (not assigned to any sprint).
|
|
31
31
|
|
|
32
32
|
```sql
|
|
33
33
|
SELECT [System.Id], [System.Title], [System.State],
|
|
@@ -55,7 +55,7 @@ and stop.
|
|
|
55
55
|
|
|
56
56
|
## Step 3: Filter Out Stories That Already Have Child Tasks
|
|
57
57
|
|
|
58
|
-
For each candidate from Step 2, fetch the work item with `mcp__azure-
|
|
58
|
+
For each candidate from Step 2, fetch the work item with `mcp__azure-devops__wit_work_item` (action `get`) expanding `relations`. If the item has any `System.LinkTypes.Hierarchy-Forward` relation pointing at a `Task`, mark it as **already broken down** and skip it.
|
|
59
59
|
|
|
60
60
|
Present a one-line summary of what was skipped:
|
|
61
61
|
|
|
@@ -175,7 +175,7 @@ Approve? (yes / edit / skip / cancel-all)
|
|
|
175
175
|
|
|
176
176
|
### 5e. Create the child task
|
|
177
177
|
|
|
178
|
-
Create the approved task with `mcp__azure-
|
|
178
|
+
Create the approved task with `mcp__azure-devops__wit_work_item_write` (action `create`):
|
|
179
179
|
|
|
180
180
|
- **project**: the chosen project
|
|
181
181
|
- **workItemType**: `Task`
|
|
@@ -187,7 +187,7 @@ Create the approved task with `mcp__azure-devops__wit_create_work_item`:
|
|
|
187
187
|
- `System.AreaPath` — copy from the parent
|
|
188
188
|
- `System.AssignedTo` — copy from the parent (pass the parent's `uniqueName` / email if its `System.AssignedTo` value is an identity object). If the parent is unassigned, leave this field unset rather than failing.
|
|
189
189
|
|
|
190
|
-
Then link the new task as a child of the parent with `mcp__azure-
|
|
190
|
+
Then link the new task as a child of the parent with `mcp__azure-devops__wit_work_item_write` (action `add_child`) (or fall back to `wit_work_item_link_write` (action `link`) with link type `System.LinkTypes.Hierarchy-Forward` from parent → task).
|
|
191
191
|
|
|
192
192
|
If the create or link call fails, report the failure and ask the user whether to continue with the next story or abort the loop.
|
|
193
193
|
|
|
@@ -44,7 +44,7 @@ and stop.
|
|
|
44
44
|
|
|
45
45
|
## Step 3: Query the Sprint
|
|
46
46
|
|
|
47
|
-
Run a WIQL query via `mcp__azure-
|
|
47
|
+
Run a WIQL query via `mcp__azure-devops__wit_query` (action `wiql`) using the **literal iteration path** from Step 2:
|
|
48
48
|
|
|
49
49
|
```sql
|
|
50
50
|
SELECT [System.Id], [System.Title], [System.State],
|
|
@@ -73,7 +73,7 @@ and stop.
|
|
|
73
73
|
|
|
74
74
|
## Step 4: Filter Out Items That Already Have Child Tasks
|
|
75
75
|
|
|
76
|
-
For each candidate from Step 3, fetch the work item with `mcp__azure-
|
|
76
|
+
For each candidate from Step 3, fetch the work item with `mcp__azure-devops__wit_work_item` (action `get`) expanding `relations`. If the item has any `System.LinkTypes.Hierarchy-Forward` relation pointing at a `Task`, mark it as **already broken down** and skip it.
|
|
77
77
|
|
|
78
78
|
Present a one-line summary of what was skipped:
|
|
79
79
|
|
|
@@ -196,7 +196,7 @@ For unpointed items, the header line reads `(no points — estimated from descri
|
|
|
196
196
|
|
|
197
197
|
### 6e. Create the child task
|
|
198
198
|
|
|
199
|
-
Create the approved task with `mcp__azure-
|
|
199
|
+
Create the approved task with `mcp__azure-devops__wit_work_item_write` (action `create`):
|
|
200
200
|
|
|
201
201
|
- **project**: the chosen project
|
|
202
202
|
- **workItemType**: `Task`
|
|
@@ -208,7 +208,7 @@ Create the approved task with `mcp__azure-devops__wit_create_work_item`:
|
|
|
208
208
|
- `System.AreaPath` — copy from the parent
|
|
209
209
|
- `System.AssignedTo` — copy from the parent (pass the parent's `uniqueName` / email if its `System.AssignedTo` value is an identity object). If the parent is unassigned, leave this field unset rather than failing.
|
|
210
210
|
|
|
211
|
-
Then link the new task as a child of the parent with `mcp__azure-
|
|
211
|
+
Then link the new task as a child of the parent with `mcp__azure-devops__wit_work_item_write` (action `add_child`) (or fall back to `wit_work_item_link_write` (action `link`) with link type `System.LinkTypes.Hierarchy-Forward` from parent → task).
|
|
212
212
|
|
|
213
213
|
If the create or link call fails, report the failure and ask the user whether to continue with the next item or abort the loop.
|
|
214
214
|
|
|
@@ -91,7 +91,7 @@ If the user types `list`, call `mcp__azure-devops__core_list_projects` and prese
|
|
|
91
91
|
|
|
92
92
|
## Step 2: Query the Backlog
|
|
93
93
|
|
|
94
|
-
Run a WIQL query via `mcp__azure-
|
|
94
|
+
Run a WIQL query via `mcp__azure-devops__wit_query` (action `wiql`) to find candidate items. "Backlog" means items at the **root iteration path** (not assigned to any sprint).
|
|
95
95
|
|
|
96
96
|
```sql
|
|
97
97
|
SELECT [System.Id], [System.Title], [System.State],
|
|
@@ -203,7 +203,7 @@ For each item in the batch, do all of 3a–3e before presenting anything. Collec
|
|
|
203
203
|
|
|
204
204
|
### 3a. Fetch the full work item
|
|
205
205
|
|
|
206
|
-
Fetch with `mcp__azure-
|
|
206
|
+
Fetch with `mcp__azure-devops__wit_work_item` (action `get`) expanding `relations`. Capture: title, type, description, acceptance criteria, tags, `System.CreatedBy` (display name + unique name — needed for the comment draft), child items, and any linked PRs, commits, or branches.
|
|
207
207
|
|
|
208
208
|
### 3b. Completeness review
|
|
209
209
|
|
|
@@ -368,8 +368,8 @@ Approve? (all / numbers e.g. "1,2,4" / edit N / skip N / apply rewrite N / cance
|
|
|
368
368
|
|
|
369
369
|
Only for approved items, in batch order:
|
|
370
370
|
|
|
371
|
-
1. **Set Story Points and move to Dev Ready** (items with a proposed number): in one `mcp__azure-
|
|
372
|
-
2. **Send unquotable User Stories back to Design Review** (approved `User Story` items with **no** proposed points, where the blocker is missing information): set `System.State` = `Design Review` via `mcp__azure-
|
|
371
|
+
1. **Set Story Points and move to Dev Ready** (items with a proposed number): in one `mcp__azure-devops__wit_work_item_write` (action `update`) call, set `Microsoft.VSTS.Scheduling.StoryPoints` **and** `System.State` = `Dev Ready`. The state change applies only to `User Story`, `Bug`, and `Hot Fix` types, and never moves an item backward — if an item is somehow already past Dev Ready, set the points only and note it. Touch no other field — assignee, iteration, and tags stay as they are.
|
|
372
|
+
2. **Send unquotable User Stories back to Design Review** (approved `User Story` items with **no** proposed points, where the blocker is missing information): set `System.State` = `Design Review` via `mcp__azure-devops__wit_work_item_write` (action `update`). Do this **before** posting the comment in step 4, so the creator's notification arrives with the item already back in their queue. Rules:
|
|
373
373
|
|
|
374
374
|
- **`User Story` only.** Do not attempt this on a `Bug` or a `Hot Fix` — those types have no `Design Review` state, so the update fails at runtime in the middle of the batch. They take step 3 instead.
|
|
375
375
|
- Only from `Design Approved` — **never move an item backward past the design stage.** An item at `Dev Ready`, or anything at `Active` or later (`Active`, `Code Review`, `Ready for Testing`, `Testing`, `Ready for Staging`, `Staging`, `Ready to Deploy`, …), keeps its state; note it in the summary instead.
|
|
@@ -387,8 +387,8 @@ Only for approved items, in batch order:
|
|
|
387
387
|
- Skip items whose only finding is **needs to be split** — nothing is missing, so no tag.
|
|
388
388
|
- Touch no other field — points stay empty; assignee, iteration, and state stay as they are.
|
|
389
389
|
|
|
390
|
-
4. **Post the comment** (items with an approved draft): add it with `mcp__azure-
|
|
391
|
-
5. **Apply the rewrite** (only items the user marked `apply rewrite N`): update `System.Description` (and `System.Title` if the rewrite included one) via `
|
|
390
|
+
4. **Post the comment** (items with an approved draft): add it with `mcp__azure-devops__wit_work_item_comment_write` (action `add`) (or the server's work-item comment tool). Use the mention syntax the server supports so the creator is notified; otherwise lead with their display name as drafted. For a story that just moved to Design Review, the comment must say so — the creator needs to know why it left their Design Approved column. For a bug that just got the `needs-info` tag, the comment must say that too, and say that removing the tag re-queues it.
|
|
391
|
+
5. **Apply the rewrite** (only items the user marked `apply rewrite N`): update `System.Description` (and `System.Title` if the rewrite included one) via `wit_work_item_write` (action `update`), and adjust the comment to say the rewrite was applied ("rewrote the description/AC per the above — please review") rather than suggesting it. Never apply a rewrite the user didn't explicitly mark.
|
|
392
392
|
|
|
393
393
|
**Guard on `Microsoft.VSTS.Common.AcceptanceCriteria`:** write it only if the item's AC field was **non-empty** when fetched in 3a. Re-check the fetched value at write time — if it was blank, drop AC from the update payload and write the other fields. Blank means no criteria at all: empty string, whitespace, an empty HTML shell like `<div></div>` or `<p><br></p>`, **or the process template's placeholder tip text** (`💡 Tip: Add "@serena rewrite" to Description for AI suggestions Define acceptance criteria: - [ ] - [ ] - [ ]`). The placeholder is the one that bites — it is a stored, non-empty field value that means the exact opposite of what its length suggests.
|
|
394
394
|
|
|
@@ -111,7 +111,7 @@ After displaying the estimate, ask the user: *"Want me to set Story Points = {n}
|
|
|
111
111
|
|
|
112
112
|
Only update the work item if the user explicitly says yes. Do not modify anything otherwise.
|
|
113
113
|
|
|
114
|
-
When the user agrees, in the **same** `
|
|
114
|
+
When the user agrees, in the **same** `wit_work_item_write` (action `update`) call:
|
|
115
115
|
|
|
116
116
|
1. Set `Microsoft.VSTS.Scheduling.StoryPoints` to the agreed value (the user's number wins if they adjusted it).
|
|
117
117
|
2. Set `System.State` to `Dev Ready` — **but only if** the work item type is `User Story`, `Bug`, or `Hot Fix` **and** the item is not already past Dev Ready in the workflow (e.g. `Active`, `Code Review`, `Testing`, `Staging`, `Ready to Deploy`). Never move an item backward — if it's already past Dev Ready, set the points only and mention the state was left alone.
|
|
@@ -134,7 +134,7 @@ In the CSI Development process template, `Bug` and `Hot Fix` have **no design st
|
|
|
134
134
|
|
|
135
135
|
> *"I can't size this until {what's missing}. Want me to move AB#{id} back to Design Review so it's out of the next `/quote-backlog` sweep until the creator responds?"*
|
|
136
136
|
|
|
137
|
-
**Wait for the user.** Only update the work item if they say yes. Then set `System.State` = `Design Review` with `mcp__azure-
|
|
137
|
+
**Wait for the user.** Only update the work item if they say yes. Then set `System.State` = `Design Review` with `mcp__azure-devops__wit_work_item_write` (action `update`). Rules:
|
|
138
138
|
|
|
139
139
|
- **`User Story` only** — never a Bug, Hot Fix, Feature, or Task. A Bug takes 5b; the update would fail on it anyway.
|
|
140
140
|
- **Never move an item backward past the design stage.** Only from `Design Approved`; if it's already `Dev Ready` or anything at `Active` or later (`Active`, `Code Review`, `Ready for Testing`, `Testing`, `Ready for Staging`, `Staging`, `Ready to Deploy`, …), leave the state alone and say so — someone is already working on it, and a state bounce there does real damage.
|
|
@@ -146,7 +146,7 @@ In the CSI Development process template, `Bug` and `Hot Fix` have **no design st
|
|
|
146
146
|
|
|
147
147
|
> *"I can't size this until {what's missing} — and a Bug has no design state to send it back to. Want me to tag AB#{id} `needs-info` so it drops out of the next `/quote-backlog` sweep? Removing the tag is what re-queues it — a reply alone leaves it excluded, though `/quote-backlog`'s stale-tag audit will surface it."*
|
|
148
148
|
|
|
149
|
-
**Wait for the user.** Only update the work item if they say yes. Then add the tag with `mcp__azure-
|
|
149
|
+
**Wait for the user.** Only update the work item if they say yes. Then add the tag with `mcp__azure-devops__wit_work_item_write` (action `update`). Rules:
|
|
150
150
|
|
|
151
151
|
- **Append to `System.Tags`, never replace it.** Take the current tag list captured in Step 1, append `needs-info`, and write the whole semicolon-separated list back. Writing the field bare wipes tags someone else set — `release-{N}`, triage labels, scope hints.
|
|
152
152
|
- Already tagged `needs-info` → no-op; say it's already there.
|
|
@@ -36,13 +36,13 @@ Save the PR's `creationDate` as `LAST_PR_DATE` — everything after this timesta
|
|
|
36
36
|
|
|
37
37
|
### New Comments
|
|
38
38
|
|
|
39
|
-
Read the work item comments via `
|
|
39
|
+
Read the work item comments via `wit_work_item` (action `list_comments`). Filter to only comments created **after** `LAST_PR_DATE`. These contain the rework feedback.
|
|
40
40
|
|
|
41
41
|
For each new comment, check for embedded images (`<img>` tags with `src` URLs pointing to Azure DevOps attachments). **Download and view every embedded image** using WebFetch — they often contain screenshots of bugs, visual issues, or annotated UI showing what needs to change.
|
|
42
42
|
|
|
43
43
|
### Description & Acceptance Criteria Changes
|
|
44
44
|
|
|
45
|
-
Read the work item revisions via `
|
|
45
|
+
Read the work item revisions via `wit_work_item` (action `list_revisions`). Check if the **description** or **acceptance criteria** fields were modified **after** `LAST_PR_DATE`.
|
|
46
46
|
|
|
47
47
|
- If changed: extract the **current** description and acceptance criteria, and note what was added or modified
|
|
48
48
|
- If unchanged: still read the current description and acceptance criteria — a comment may reference something that was in the original requirements but missing from the implementation
|
|
@@ -236,7 +236,7 @@ Enter the estimated hours for this task (press enter to accept {n}):
|
|
|
236
236
|
|
|
237
237
|
If the user provided hours (suggested or overridden):
|
|
238
238
|
|
|
239
|
-
1. Call `mcp__azure-
|
|
239
|
+
1. Call `mcp__azure-devops__wit_work_item_write` (action `create`):
|
|
240
240
|
- **workItemType**: `Task`
|
|
241
241
|
- **title**: `Rework AB#{id} — round {N}`
|
|
242
242
|
- **fields**: JSON Patch document setting:
|
|
@@ -262,8 +262,9 @@ If the user provided hours (suggested or overridden):
|
|
|
262
262
|
- `System.AreaPath` — same as the parent
|
|
263
263
|
- `System.IterationPath` — same as the parent
|
|
264
264
|
- `System.AssignedTo` — same as the parent (copy the parent's `System.AssignedTo` value; pass the `uniqueName` / email if the parent's value is an identity object). If the parent is unassigned, leave this field unset rather than failing.
|
|
265
|
+
- `System.State` — `Active`, since the rework starts right now (fall back to the template's in-progress equivalent, or leave it at the default and note it). A rework Task left at `New` while the work is underway misreports the board.
|
|
265
266
|
|
|
266
|
-
2. Link the new Task as a child of the parent work item via `
|
|
267
|
+
2. Link the new Task as a child of the parent work item via `wit_work_item_link_write` (action `link`):
|
|
267
268
|
- **type**: `Child` (the parent → child link from the parent's perspective; equivalent to `Parent` from the task's perspective)
|
|
268
269
|
- **source**: parent work item ID
|
|
269
270
|
- **target**: new task ID
|
|
@@ -282,6 +283,18 @@ The work item already has a branch from the previous PR. Switch to it:
|
|
|
282
283
|
|
|
283
284
|
If the PR was completed/merged and the branch was deleted, create a new branch from the PR's target branch following the same naming convention as `/implement` Step 4.
|
|
284
285
|
|
|
286
|
+
### Move the Work Item to Active
|
|
287
|
+
|
|
288
|
+
Once you are on the branch, move the work item (User Story, Bug, Hot Fix, or other single work item — **never** a Feature) to `Active` via `wit_work_item_write` (action `update`):
|
|
289
|
+
- **path**: `/fields/System.State`
|
|
290
|
+
- **value**: `Active`
|
|
291
|
+
|
|
292
|
+
Rework restarts implementation, so the item must leave `Code Review` / `Rework` and go back to in-progress for the duration of this round — Step 12 hands it back to `Code Review` when the fixes are pushed. Without this the item sits in a review state while it is actively being worked, and the board lies.
|
|
293
|
+
|
|
294
|
+
If the work item is already `Active`, skip the update. If the project's process template does not have an `Active` state (the update call returns an invalid-state error), fall back in this order: `In Progress` → `Doing` → leave the current state and warn the user that the state could not be advanced automatically. Do not silently swallow the error.
|
|
295
|
+
|
|
296
|
+
After the update, **read the work item back** (`wit_work_item`, action `get`) and confirm `System.State` actually changed. If it didn't, say so explicitly — do not proceed reporting the item as in progress when the board still shows it otherwise.
|
|
297
|
+
|
|
285
298
|
## Step 7: Implement
|
|
286
299
|
|
|
287
300
|
1. **Implement** the rework using backend and/or frontend agents according to the approved plan
|
|
@@ -375,9 +388,9 @@ Wait for the user's response before proceeding. Do NOT push until confirmed.
|
|
|
375
388
|
## Step 12: Push and Update
|
|
376
389
|
|
|
377
390
|
1. Push the changes: `git push`
|
|
378
|
-
2. **Do not post a rework summary comment.** Do not add a summary of what changed to the work item Discussion (`
|
|
391
|
+
2. **Do not post a rework summary comment.** Do not add a summary of what changed to the work item Discussion (`wit_work_item_comment_write` (action `add`)) or as a PR thread. The pushed commits and the PR diff are the record of what changed — a prose summary duplicates them and clutters the work item. If the reviewer left specific PR comment threads, reply on those threads directly (that is what `/resolve-feedback` and `/fix-review` do); otherwise post nothing.
|
|
379
392
|
3. **Close related Tasks and log hours** — see "Closing Related Tasks" below. This includes the rework Task created in Step 5 as well as any other child Tasks that became `Completed` as a result of this rework round.
|
|
380
|
-
4. **Move the work item back to `Code Review`** via `
|
|
393
|
+
4. **Move the work item back to `Code Review`** via `wit_work_item_write` (action `update`):
|
|
381
394
|
- **path**: `/fields/System.State`
|
|
382
395
|
- **value**: `Code Review`
|
|
383
396
|
|
|
@@ -440,7 +453,7 @@ For each task being processed, prompt for completed hours:
|
|
|
440
453
|
|
|
441
454
|
**Wait for the user's response on every task.** Accept the suggested/current value (enter), a new numeric value, or `skip` to leave that one untouched.
|
|
442
455
|
|
|
443
|
-
Once the user has answered, update each task via `
|
|
456
|
+
Once the user has answered, update each task via `wit_work_item_write` (action `update`):
|
|
444
457
|
- `Microsoft.VSTS.Scheduling.CompletedWork` → the agreed value
|
|
445
458
|
- `Microsoft.VSTS.Scheduling.RemainingWork` → `0`
|
|
446
459
|
- `System.State` → `Closed` (fall back to `Done` if the project's task template uses Agile; warn if neither is valid)
|
|
@@ -49,7 +49,7 @@ Deployed to:
|
|
|
49
49
|
Catch these up? (yes/no)
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
If the user says yes, set `System.State` on each lagging item to the expected state via `
|
|
52
|
+
If the user says yes, set `System.State` on each lagging item to the expected state via `wit_work_item_write` (action `update`) — never backward, never on a Feature or Task — and report `Was → Now`.
|
|
53
53
|
|
|
54
54
|
## If Pipeline (e.g., `/track pipeline` or `/track build`):
|
|
55
55
|
|