@chris1807/claude-kit 2.1.5 → 2.1.9
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/README.md +17 -5
- package/bin/cli.js +1 -1
- package/package.json +6 -3
- package/templates/commands/create-work-item.md +275 -0
- package/templates/commands/implement.md +66 -1
- package/templates/commands/resolve-feedback.md +167 -0
- package/templates/commands/rework.md +136 -7
- package/templates/infrastructure/CLAUDE-WORKFLOW.md +4 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Claude Kit
|
|
2
2
|
|
|
3
|
-
> A
|
|
3
|
+
> A [Claude Code](https://claude.ai/code) starter kit **built for Azure DevOps teams** — agents, hooks, MCP servers, and slash commands that automate the full work item → branch → PR → release → deploy lifecycle. Installed into any project with a single `npx` command.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@chris1807/claude-kit)
|
|
6
6
|
|
|
@@ -8,7 +8,16 @@
|
|
|
8
8
|
|
|
9
9
|
## About
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Claude Kit installs a complete AI development infrastructure into any project that uses **Azure DevOps** for work tracking, source control (Azure Repos), and CI/CD (Azure Pipelines). It includes specialized agents that handle specific tasks (deployment, database ops, code review), security hooks that prevent mistakes automatically, MCP server connections to your tools (Azure DevOps, databases, Teams, Stripe, Azure CLI), and slash commands that automate the entire workflow from work item to pull request.
|
|
12
|
+
|
|
13
|
+
The slash commands assume Azure DevOps as the system of record:
|
|
14
|
+
|
|
15
|
+
- **Work items** — read, created, and updated via the Azure DevOps MCP server (`AB#1234` ids throughout)
|
|
16
|
+
- **Branches & pull requests** — created in Azure Repos and voted on / merged through Azure DevOps
|
|
17
|
+
- **Releases & deployments** — tracked as Azure DevOps iterations (`Release #N`) and tags; CD runs on Azure Pipelines
|
|
18
|
+
- **Wiki, test plans, advanced security alerts** — all surfaced through the same Azure DevOps MCP server
|
|
19
|
+
|
|
20
|
+
> **Not using Azure DevOps?** The Claude Code primitives (agents, hooks, memory) are still useful, but the slash commands, the `devops-tracker` agent, and the deployment workflow won't apply out of the box — you'd need to rewrite the `/implement`, `/review`, `/deploy`, `/create-release`, `/deploy-release`, `/cherry-pick`, `/promote`, `/rollback`, `/status`, `/rework`, and `/resolve-feedback` commands against GitHub / GitLab / Jira / etc.
|
|
12
21
|
|
|
13
22
|
Every session Claude learns from your feedback and gets better at helping you specifically. The infrastructure is modular — install only what your project needs.
|
|
14
23
|
|
|
@@ -19,8 +28,8 @@ Every session Claude learns from your feedback and gets better at helping you sp
|
|
|
19
28
|
| **Global Agents** | 13 | `~/.claude/agents/` (your machine, all projects) | backend, frontend, legacy (Lucee/CFML), manager, mockup, reviewer, test-runner, build-validator, lint-checker, uat-generator, azure-ops, security-auditor, api-tester |
|
|
20
29
|
| **Project Agents** | 3 | `.claude/agents/` (in the project) | deployer, db-admin, devops-tracker |
|
|
21
30
|
| **Hooks** | 9 | `.claude/hooks/` (in the project) | Secret blocker, sensitive data blocker (Bash + MCP + output), protected files, auto-format, test suggestions, UAT reminder, self-improve |
|
|
22
|
-
| **Slash Commands** | 13 | `.claude/commands/` (in the project) | `/implement`, `/review`, `/deploy`, `/create-release`, `/deploy-release`, `/add-to-release`, `/cherry-pick`, `/promote`, `/rollback`, `/status`, `/cleanup-branches`, `/quote`, `/explain` |
|
|
23
|
-
| **MCP Servers** | Up to 6 | `.mcp.json` (in the project) | Playwright, MongoDB/SQL/Postgres, Teams, Stripe, Azure CLI |
|
|
31
|
+
| **Slash Commands** | 13 | `.claude/commands/` (in the project) | `/implement`, `/review`, `/resolve-feedback`, `/deploy`, `/create-release`, `/deploy-release`, `/add-to-release`, `/cherry-pick`, `/promote`, `/rollback`, `/status`, `/cleanup-branches`, `/quote`, `/explain` |
|
|
32
|
+
| **MCP Servers** | Up to 6 | `.mcp.json` (in the project) | **Azure DevOps** (work items, repos, pipelines, wiki), Playwright, MongoDB/SQL/Postgres, Teams, Stripe, Azure CLI |
|
|
24
33
|
| **Workflow Template** | 1 | Appended to `CLAUDE.md` | Documents the full development process |
|
|
25
34
|
| **Settings** | 1 | `.claude/settings.json` (in the project) | Registers all hooks and MCP servers |
|
|
26
35
|
|
|
@@ -30,6 +39,8 @@ Every session Claude learns from your feedback and gets better at helping you sp
|
|
|
30
39
|
|
|
31
40
|
- [Claude Code CLI](https://claude.ai/code) installed
|
|
32
41
|
- [Node.js](https://nodejs.org/) 18 or later
|
|
42
|
+
- An **Azure DevOps** organization with a project for work items, an Azure Repos Git repository, and (optionally) Azure Pipelines for CD
|
|
43
|
+
- An Azure DevOps Personal Access Token (PAT) — used by the Azure DevOps MCP server. Scopes needed: Work Items (read/write), Code (read/write), Build (read/execute), Wiki (read/write)
|
|
33
44
|
|
|
34
45
|
### Verify it works
|
|
35
46
|
|
|
@@ -62,7 +73,7 @@ You'll be asked:
|
|
|
62
73
|
2. **Components** — checkboxes to pick which parts to install:
|
|
63
74
|
- ☑ Project Agents (deployer, db-admin, devops-tracker)
|
|
64
75
|
- ☑ Hooks (secret blocker, auto-format, etc.)
|
|
65
|
-
- ☑ Slash Commands (
|
|
76
|
+
- ☑ Slash Commands (/implement, /review, /resolve-feedback, /deploy, /create-release, /deploy-release, /add-to-release, /cherry-pick, /promote, /rollback, /status, /cleanup-branches, /quote, /explain)
|
|
66
77
|
- ☑ MCP Servers
|
|
67
78
|
- ☑ Settings
|
|
68
79
|
- ☑ CLAUDE.md Workflow
|
|
@@ -606,6 +617,7 @@ Claude reviews for:
|
|
|
606
617
|
|---------|-------|-------------|
|
|
607
618
|
| `/implement` | `/implement AB#1234` | Read work item → summarize → approve plan → implement → quality checks → UAT → PR |
|
|
608
619
|
| `/review` | `/review 142` | Full code review on a PR with inline comments |
|
|
620
|
+
| `/resolve-feedback` | `/resolve-feedback 142` | Address unresolved PR comment threads, push fixes, reply + resolve threads |
|
|
609
621
|
| `/deploy` | `/deploy "message"` | Commit, push, trigger pipeline if on environment branch |
|
|
610
622
|
| `/create-release` | `/create-release 23` | Group work items into Release #23 iteration with tags |
|
|
611
623
|
| `/deploy-release` | `/deploy-release 23 staging` | Cherry-pick release work items to environment via PR |
|
package/bin/cli.js
CHANGED
|
@@ -178,7 +178,7 @@ async function main() {
|
|
|
178
178
|
choices: [
|
|
179
179
|
{ name: 'Project Agents (deployer, db-admin, devops-tracker)', value: 'agents', checked: true },
|
|
180
180
|
{ name: 'Hooks (secret blocker, auto-format, test suggestions)', value: 'hooks', checked: true },
|
|
181
|
-
{ name: 'Slash Commands (
|
|
181
|
+
{ name: 'Slash Commands (implement, review, deploy, releases, cherry-pick, promote, rollback, status, cleanup, create-work-item, …)', value: 'commands', checked: true },
|
|
182
182
|
{ name: 'MCP Servers (Playwright, DB, Teams, Stripe, Azure, Azure DevOps)', value: 'mcp', checked: true },
|
|
183
183
|
{ name: 'Settings (hook registration)', value: 'settings', checked: true },
|
|
184
184
|
{ name: 'CLAUDE.md Workflow Section', value: 'workflow', checked: true },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chris1807/claude-kit",
|
|
3
|
-
"version": "2.1.
|
|
4
|
-
"description": "Claude Code starter kit — agents, hooks, MCP servers, slash commands, and workflow automation",
|
|
3
|
+
"version": "2.1.9",
|
|
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": {
|
|
7
7
|
"claude-kit": "./bin/cli.js"
|
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
"mcp",
|
|
18
18
|
"agents",
|
|
19
19
|
"hooks",
|
|
20
|
-
"starter-kit"
|
|
20
|
+
"starter-kit",
|
|
21
|
+
"azure-devops",
|
|
22
|
+
"azure-pipelines",
|
|
23
|
+
"devops-workflow"
|
|
21
24
|
],
|
|
22
25
|
"author": "Chris Waters <chriswaters@caresolutions.com>",
|
|
23
26
|
"license": "MIT",
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
Create a new Azure DevOps work item interactively. Usage: `/create-work-item`
|
|
2
|
+
|
|
3
|
+
This command walks the user through creating a Bug or User Story, develops an acceptance-criteria-ready plan, optionally embeds a UI mockup in the description, and creates the item in the chosen Azure DevOps project.
|
|
4
|
+
|
|
5
|
+
Treat `$ARGUMENTS` as an optional rough description that the user may have typed inline (e.g. `/create-work-item users should be able to export payments`). If provided, skip the initial "describe your requirements" prompt in Step 2 and use it as the starting requirements text — but still confirm with the user before proceeding.
|
|
6
|
+
|
|
7
|
+
## Step 1: Choose Work Item Type
|
|
8
|
+
|
|
9
|
+
Ask the user:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
What type of work item do you want to create?
|
|
13
|
+
|
|
14
|
+
1. Bug
|
|
15
|
+
2. User Story
|
|
16
|
+
|
|
17
|
+
Reply with 1, 2, "bug", or "user story".
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Wait for the user's response.** Map the answer to either `Bug` or `User Story`. If the user types something else, ask again — do not guess.
|
|
21
|
+
|
|
22
|
+
## Step 2: Gather Requirements
|
|
23
|
+
|
|
24
|
+
Ask the user to describe the requirements:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Describe the {bug | user story} in your own words. Include:
|
|
28
|
+
|
|
29
|
+
- What the user is trying to do (or what is broken)
|
|
30
|
+
- Why it matters / who is affected
|
|
31
|
+
- Any constraints, edge cases, or steps to reproduce (for bugs)
|
|
32
|
+
- Links to related work items, PRs, or docs if relevant
|
|
33
|
+
- You can also paste image URLs, screenshot links, or attachment URLs —
|
|
34
|
+
they will be preserved in the description
|
|
35
|
+
|
|
36
|
+
You can paste as much detail as you want — I'll structure it.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Wait for the user's response.** If the response is very short or vague, ask one targeted clarifying question (e.g. "Does this apply to all users or only admins?"). Don't interrogate — one round of clarification is enough.
|
|
40
|
+
|
|
41
|
+
### Preserve user-supplied images and links
|
|
42
|
+
|
|
43
|
+
Scan the user's response for:
|
|
44
|
+
|
|
45
|
+
- Direct image URLs (`.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.svg`)
|
|
46
|
+
- Azure DevOps attachment URLs (e.g. `https://dev.azure.com/.../_apis/wit/attachments/...`)
|
|
47
|
+
- Markdown image syntax (``)
|
|
48
|
+
- Pasted screenshot blob paths or local file paths to images
|
|
49
|
+
|
|
50
|
+
For each image found, plan to embed it in the final description as an `<img src="{url}">` tag, with the user's surrounding text preserved as context. For non-image links (docs, PRs, related work items), preserve them as `<a href="{url}">{url}</a>` in the relevant section of the draft. Do not strip these — they are often the only ground truth for the requirement.
|
|
51
|
+
|
|
52
|
+
## Step 3: Develop the Plan
|
|
53
|
+
|
|
54
|
+
Translate the user's free-form requirements into a structured work item draft. The shape depends on the type:
|
|
55
|
+
|
|
56
|
+
### For a User Story:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
## Draft: {Prefix} - {proposed title}
|
|
60
|
+
|
|
61
|
+
**Type:** User Story
|
|
62
|
+
|
|
63
|
+
### Description
|
|
64
|
+
{2–4 sentences in plain language. Explain the user-facing behavior and the
|
|
65
|
+
business or user value. Avoid implementation detail — that lives in tasks.}
|
|
66
|
+
|
|
67
|
+
### Acceptance Criteria
|
|
68
|
+
1. {Given/When/Then or numbered behavior — must be testable}
|
|
69
|
+
2. ...
|
|
70
|
+
3. ...
|
|
71
|
+
|
|
72
|
+
### Out of Scope
|
|
73
|
+
- {anything the user mentioned but that shouldn't block this story}
|
|
74
|
+
|
|
75
|
+
### Open Questions
|
|
76
|
+
- {anything ambiguous that you couldn't infer — list as questions, not assumptions}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### For a Bug:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
## Draft: {Prefix} - {proposed title}
|
|
83
|
+
|
|
84
|
+
**Type:** Bug
|
|
85
|
+
**Priority:** {1 | 2 | 3 | 4}
|
|
86
|
+
**Severity:** {1 - Critical | 2 - High | 3 - Medium | 4 - Low}
|
|
87
|
+
|
|
88
|
+
### Description
|
|
89
|
+
{1–2 sentences describing the observed problem in plain language.}
|
|
90
|
+
|
|
91
|
+
### Steps to Reproduce
|
|
92
|
+
1. ...
|
|
93
|
+
2. ...
|
|
94
|
+
3. ...
|
|
95
|
+
|
|
96
|
+
### Expected Behavior
|
|
97
|
+
{what should happen}
|
|
98
|
+
|
|
99
|
+
### Actual Behavior
|
|
100
|
+
{what does happen}
|
|
101
|
+
|
|
102
|
+
### Acceptance Criteria
|
|
103
|
+
1. {behavioral check that proves the bug is fixed — must be testable}
|
|
104
|
+
2. {regression guard if applicable}
|
|
105
|
+
|
|
106
|
+
### Environment / Scope
|
|
107
|
+
- {where the bug occurs — browser, environment, role, data condition}
|
|
108
|
+
|
|
109
|
+
### Open Questions
|
|
110
|
+
- {anything you couldn't infer}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**Inferring Priority and Severity for Bugs:**
|
|
114
|
+
|
|
115
|
+
Propose initial values based on the requirements, then let the user override during approval. Use this rubric:
|
|
116
|
+
|
|
117
|
+
| Severity | Looks like |
|
|
118
|
+
|----------|-----------|
|
|
119
|
+
| **1 - Critical** | Production is down, data loss, security breach, or blocking all users |
|
|
120
|
+
| **2 - High** | Major feature broken, no workaround, affects many users |
|
|
121
|
+
| **3 - Medium** | Feature partially broken, workaround exists, or affects some users |
|
|
122
|
+
| **4 - Low** | Cosmetic, minor inconvenience, or affects few users |
|
|
123
|
+
|
|
124
|
+
| Priority | Looks like |
|
|
125
|
+
|----------|-----------|
|
|
126
|
+
| **1** | Drop everything — fix immediately |
|
|
127
|
+
| **2** | Next sprint at the latest |
|
|
128
|
+
| **3** | Normal queue |
|
|
129
|
+
| **4** | Nice to have / fix when convenient |
|
|
130
|
+
|
|
131
|
+
Severity describes user impact; Priority describes scheduling urgency. They are independent — a Sev 2 can be Priority 3 if a workaround exists.
|
|
132
|
+
|
|
133
|
+
### Title Prefix
|
|
134
|
+
|
|
135
|
+
The title MUST start with one of the product prefixes from the project's CLAUDE.md (e.g. `COM`, `CDA`, `PAY`, `AUD`, `SER`, `PSSF`, `TPS`). If the project CLAUDE.md does not define a prefix table, ask the user which prefix to use before drafting. Format is `PREFIX - Title Here`.
|
|
136
|
+
|
|
137
|
+
### Approval
|
|
138
|
+
|
|
139
|
+
After presenting the draft, ask:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Approve this draft? (yes / suggest changes / cancel)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Wait for the user.** If they suggest changes, revise the draft and present it again — repeat until they approve or cancel. Do NOT proceed to mockup or project selection until approved.
|
|
146
|
+
|
|
147
|
+
## Step 4: Offer a Mockup (User Stories only — skip for Bugs)
|
|
148
|
+
|
|
149
|
+
If the work item type is **User Story** and the requirements appear to involve UI (a screen, a form, a button, a workflow), ask:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
Want me to generate an HTML mockup and embed it in the description? (yes / no)
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
If the work item is clearly non-UI (background job, data migration, API-only change), skip this step and note "No mockup — non-UI work."
|
|
156
|
+
|
|
157
|
+
### If the user says yes:
|
|
158
|
+
|
|
159
|
+
1. Delegate to the **mockup** agent to generate an HTML mockup based on the draft. Brief the agent with the draft description and acceptance criteria.
|
|
160
|
+
2. Save the mockup HTML to a temporary path, then render it to PNG using Playwright (`mcp__playwright__browser_navigate` to the file path, then `mcp__playwright__browser_take_screenshot`).
|
|
161
|
+
3. Upload the PNG as a work item attachment via the Azure DevOps API. Capture the returned attachment URL.
|
|
162
|
+
4. Append an `<img>` tag to the work item description pointing at the attachment URL, with a caption like `Mockup — generated {date}`.
|
|
163
|
+
|
|
164
|
+
If any step fails (mockup generation, screenshot, upload), report the failure to the user and ask whether to proceed without the mockup or abort.
|
|
165
|
+
|
|
166
|
+
### If the user says no:
|
|
167
|
+
|
|
168
|
+
Continue without a mockup.
|
|
169
|
+
|
|
170
|
+
## Step 5: Choose the Project
|
|
171
|
+
|
|
172
|
+
### Detect the default project
|
|
173
|
+
|
|
174
|
+
Before prompting, attempt to detect the default Azure DevOps project from CLAUDE.md, in this order:
|
|
175
|
+
|
|
176
|
+
1. **Project CLAUDE.md** — read `<current-repo>/CLAUDE.md`. Look for an explicit `project: <name>` declaration, a "Work items live in **<Project Name>**" sentence, or a `## Pipeline Configuration` table with project references.
|
|
177
|
+
2. **Parent CLAUDE.md** — read `<parent-dir>/CLAUDE.md` (e.g. `~/Projects/CLAUDE.md`). Look for the same patterns. The CSI parent CLAUDE.md, for example, declares: "Work items for both **COMPASS** and **CSI Pay** live in the **CSI Development** Azure DevOps project."
|
|
178
|
+
3. **Prefix mapping** — if the title prefix chosen in Step 3 is in a known mapping (e.g. `COM`, `CDA`, `PAY` → `CSI Development`), use that.
|
|
179
|
+
|
|
180
|
+
If a default is found, present it pre-selected:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
Which Azure DevOps project should this be created in?
|
|
184
|
+
|
|
185
|
+
Default: {detected project} ← press enter to accept
|
|
186
|
+
|
|
187
|
+
Or specify a different project name.
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
If no default is found, ask without a preselection and offer to list projects via `mcp__azure-devops__core_list_projects`.
|
|
191
|
+
|
|
192
|
+
**Wait for the user's response.** Validate the project name by calling `mcp__azure-devops__core_list_projects` if the response is ambiguous or doesn't match a known project.
|
|
193
|
+
|
|
194
|
+
## Step 6: Final Confirmation
|
|
195
|
+
|
|
196
|
+
Before creating anything in Azure DevOps, present a final summary and ask for one last confirmation:
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
## Ready to Create
|
|
200
|
+
|
|
201
|
+
**Title:** {Prefix} - {title}
|
|
202
|
+
**Type:** {Bug | User Story}
|
|
203
|
+
**Project:** {project}
|
|
204
|
+
{for Bugs:}
|
|
205
|
+
**Priority:** {n}
|
|
206
|
+
**Severity:** {n - Label}
|
|
207
|
+
{end for Bugs}
|
|
208
|
+
**Mockup:** {Embedded | Not requested | Skipped (non-UI)}
|
|
209
|
+
**Images:** {count} user-supplied image(s) embedded in description
|
|
210
|
+
**Open Questions:** {count}
|
|
211
|
+
|
|
212
|
+
Create this work item now? (yes / edit / cancel)
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Wait for the user.**
|
|
216
|
+
- `yes` → proceed to Step 7
|
|
217
|
+
- `edit` → ask which field to revise (title, description, AC, priority, severity, project, mockup), revise it, then re-show this summary
|
|
218
|
+
- `cancel` → abort with no work item created and confirm "Cancelled — no work item created."
|
|
219
|
+
|
|
220
|
+
## Step 7: Render to HTML and Create
|
|
221
|
+
|
|
222
|
+
### Render Markdown sections to HTML
|
|
223
|
+
|
|
224
|
+
Azure DevOps description and acceptance criteria fields are HTML — they do not render Markdown. Before submitting, convert the draft sections:
|
|
225
|
+
|
|
226
|
+
| Markdown | HTML |
|
|
227
|
+
|---------------------------|-----------------------------------------------|
|
|
228
|
+
| `1. item\n2. item` | `<ol><li>item</li><li>item</li></ol>` |
|
|
229
|
+
| `- item\n- item` | `<ul><li>item</li><li>item</li></ul>` |
|
|
230
|
+
| `**bold**` | `<strong>bold</strong>` |
|
|
231
|
+
| `\n\n` (paragraph break) | `</p><p>` |
|
|
232
|
+
| `\n` (single newline) | `<br>` |
|
|
233
|
+
| `` `code` `` | `<code>code</code>` |
|
|
234
|
+
| `### Heading` | `<h3>Heading</h3>` |
|
|
235
|
+
| `[text](url)` | `<a href="url">text</a>` |
|
|
236
|
+
| `` | `<img src="url" alt="alt">` |
|
|
237
|
+
|
|
238
|
+
Wrap each top-level section in `<p>...</p>`. Preserve any user-supplied `<img>` tags from Step 2 as-is.
|
|
239
|
+
|
|
240
|
+
### Call the create API
|
|
241
|
+
|
|
242
|
+
Call `mcp__azure-devops__wit_create_work_item` with:
|
|
243
|
+
|
|
244
|
+
- **project**: the chosen project
|
|
245
|
+
- **workItemType**: `Bug` or `User Story`
|
|
246
|
+
- **title**: the approved title (with prefix)
|
|
247
|
+
- **fields**: a JSON Patch document setting:
|
|
248
|
+
- `System.Description` — the rendered HTML description (with embedded mockup `<img>` and any user-supplied images)
|
|
249
|
+
- `Microsoft.VSTS.Common.AcceptanceCriteria` — the rendered HTML acceptance criteria block
|
|
250
|
+
- For Bugs:
|
|
251
|
+
- `Microsoft.VSTS.TCM.ReproSteps` — the rendered HTML repro steps (Azure DevOps puts repro steps in this field for the Bug template; if the project uses the Agile template instead, fold repro steps into Description)
|
|
252
|
+
- `Microsoft.VSTS.Common.Priority` — the chosen Priority (1–4)
|
|
253
|
+
- `Microsoft.VSTS.Common.Severity` — the chosen Severity (`1 - Critical`, `2 - High`, `3 - Medium`, `4 - Low`)
|
|
254
|
+
|
|
255
|
+
If the `Open Questions` section is non-empty, append it to the description as a clearly-labeled HTML block (`<h3>Open Questions</h3><ul>...</ul>`) so the assignee can address it later.
|
|
256
|
+
|
|
257
|
+
## Step 8: Confirm
|
|
258
|
+
|
|
259
|
+
After creation, report:
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
Created AB#{id}: {title}
|
|
263
|
+
Project: {project}
|
|
264
|
+
Type: {type}
|
|
265
|
+
URL: {work item URL}
|
|
266
|
+
Mockup attached: {yes / no}
|
|
267
|
+
Open questions: {count}
|
|
268
|
+
|
|
269
|
+
Next steps:
|
|
270
|
+
/explain AB#{id} — re-read the item in plain language
|
|
271
|
+
/quote AB#{id} — estimate story points
|
|
272
|
+
/implement AB#{id} — start working on it
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Do not assign the work item, set an iteration, or add tags unless the user explicitly asks — those are downstream decisions.
|
|
@@ -174,4 +174,69 @@ Wait for the user's response before proceeding. Do NOT create a PR until confirm
|
|
|
174
174
|
- **title**: `AB#{id}: {work item title}`
|
|
175
175
|
- **labels**: `["hotfix"]` if the work item type is Hot Fix
|
|
176
176
|
3. Link the PR to the work item via `wit_link_work_item_to_pull_request`
|
|
177
|
-
4.
|
|
177
|
+
4. **Close related Tasks and log hours** — see "Closing Related Tasks" below.
|
|
178
|
+
5. **Move the work item to `Code Review`** via `wit_update_work_item`:
|
|
179
|
+
- **path**: `/fields/System.State`
|
|
180
|
+
- **value**: `Code Review`
|
|
181
|
+
|
|
182
|
+
If the project's process template does not have a `Code Review` state (the update call returns an invalid-state error), fall back in this order: `Resolved` → `In Review` → leave the current state and warn the user that the state could not be advanced automatically. Do not silently swallow the error.
|
|
183
|
+
|
|
184
|
+
### Closing Related Tasks
|
|
185
|
+
|
|
186
|
+
After the PR is created, find every child Task of this work item (relations of type `System.LinkTypes.Hierarchy-Forward` where the target's `System.WorkItemType` is `Task`). Skip this step if there are no child Tasks.
|
|
187
|
+
|
|
188
|
+
For each child Task, capture:
|
|
189
|
+
- ID, title, state
|
|
190
|
+
- `Microsoft.VSTS.Scheduling.OriginalEstimate`
|
|
191
|
+
- `Microsoft.VSTS.Scheduling.CompletedWork`
|
|
192
|
+
- `Microsoft.VSTS.Scheduling.RemainingWork`
|
|
193
|
+
|
|
194
|
+
Present:
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
## Close Related Tasks
|
|
198
|
+
|
|
199
|
+
| Task ID | Title | State | Original | Completed | Remaining |
|
|
200
|
+
|---------|-------|-------|----------|-----------|-----------|
|
|
201
|
+
| AB#xxxx | ... | Active | 4 | 0 | 4 |
|
|
202
|
+
| AB#yyyy | ... | Active | 2 | 1 | 1 |
|
|
203
|
+
|
|
204
|
+
Close all related tasks and log completed hours? (yes / no / select)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
- `yes` → walk through every child Task in sequence
|
|
208
|
+
- `no` → skip closing tasks entirely
|
|
209
|
+
- `select` → ask which task IDs to process; only those get prompted
|
|
210
|
+
|
|
211
|
+
For each task being processed, prompt for completed hours:
|
|
212
|
+
|
|
213
|
+
- **If `CompletedWork` is empty or `0`:**
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
AB#xxxx ({title})
|
|
217
|
+
Original estimate: {n}h
|
|
218
|
+
Completed: 0h
|
|
219
|
+
Remaining: {n}h
|
|
220
|
+
|
|
221
|
+
Enter completed hours (suggested: {OriginalEstimate}h, press enter to accept):
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
- **If `CompletedWork` is already set (non-zero):**
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
AB#xxxx ({title})
|
|
228
|
+
Original estimate: {n}h
|
|
229
|
+
Completed: {current}h ← already logged
|
|
230
|
+
Remaining: {m}h
|
|
231
|
+
|
|
232
|
+
Update completed hours to (press enter to keep {current}, or enter new value):
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**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.
|
|
236
|
+
|
|
237
|
+
Once the user has answered, update each task via `wit_update_work_item`:
|
|
238
|
+
- `Microsoft.VSTS.Scheduling.CompletedWork` → the agreed value
|
|
239
|
+
- `Microsoft.VSTS.Scheduling.RemainingWork` → `0`
|
|
240
|
+
- `System.State` → `Closed` (fall back to `Done` if the project's task template uses Agile; warn if neither is valid)
|
|
241
|
+
|
|
242
|
+
Confirm with a summary line per task: `Closed AB#xxxx — {hours}h logged`.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
Resolve unresolved comment threads on a pull request. Usage: `/resolve-feedback <pr-id>` (or `/resolve-feedback` to auto-detect from the current branch).
|
|
2
|
+
|
|
3
|
+
This is the lightweight counterpart to `/rework`. It targets **PR comment threads** specifically — read each active thread, implement the fix, push, then reply to and resolve the thread on the PR. No Task creation, no hours tracking, no UAT gate. Use `/rework` when feedback spans the whole work item or requires a new round of full quality checks.
|
|
4
|
+
|
|
5
|
+
## Step 1: Identify the Pull Request
|
|
6
|
+
|
|
7
|
+
Parse `$ARGUMENTS`:
|
|
8
|
+
|
|
9
|
+
- **PR id given** (`142`, `#142`, `!142`) — strip non-digits and use as the PR id.
|
|
10
|
+
- **No argument** — find the PR for the current branch:
|
|
11
|
+
1. Get current branch via `git rev-parse --abbrev-ref HEAD`.
|
|
12
|
+
2. Call `repo_list_pull_requests_by_repo_or_project` filtered to `sourceRefName: refs/heads/<branch>` and `status: active`.
|
|
13
|
+
3. If exactly one match, use it. If zero or multiple, ask the user which PR id to target — do not guess.
|
|
14
|
+
|
|
15
|
+
Fetch the PR via `repo_get_pull_request_by_id`. Record:
|
|
16
|
+
- `pullRequestId`, `title`, `status`
|
|
17
|
+
- `sourceRefName` (the branch holding the fixes) and `targetRefName`
|
|
18
|
+
- Linked work item id(s) from artifact links — used only for context, not modified by this command.
|
|
19
|
+
|
|
20
|
+
## Step 2: List Active Comment Threads
|
|
21
|
+
|
|
22
|
+
Call `repo_list_pull_request_threads` for the PR. Filter the returned threads to the ones that need a response:
|
|
23
|
+
|
|
24
|
+
**Include a thread when all of these are true:**
|
|
25
|
+
- `status` is `active` or `pending` (statuses `1` or `6`). Skip `fixed`, `wontFix`, `closed`, `byDesign`.
|
|
26
|
+
- It contains at least one comment authored by a real reviewer (`commentType` is `text`, not `system`).
|
|
27
|
+
- It is not a system-generated thread (vote changes, policy violations, build failures, work-item link additions, etc. — these have `commentType: system` or no real comments).
|
|
28
|
+
- It is not authored exclusively by the current PR author. A thread where the PR author is talking to themselves with no reviewer input is not feedback to resolve. (Use the PR `createdBy.id` as the author id.)
|
|
29
|
+
|
|
30
|
+
For each remaining thread, capture:
|
|
31
|
+
- `threadId`
|
|
32
|
+
- `threadContext` — `filePath`, `rightFileStart.line` / `leftFileStart.line` (may be null for PR-level threads)
|
|
33
|
+
- Full comment chain via `repo_list_pull_request_thread_comments` — author, date, body. Inline images in comments often carry critical context; if a comment body contains an `<img src="...">` pointing to an Azure DevOps attachment, download and view it via WebFetch before proposing a fix.
|
|
34
|
+
|
|
35
|
+
If there are zero qualifying threads, tell the user `No unresolved reviewer threads on PR #{id}.` and stop.
|
|
36
|
+
|
|
37
|
+
## Step 3: Switch to the PR Branch
|
|
38
|
+
|
|
39
|
+
Before reading code or proposing fixes, make sure local state matches the PR:
|
|
40
|
+
|
|
41
|
+
1. `git fetch`
|
|
42
|
+
2. If the current branch ≠ `sourceRefName` (stripping `refs/heads/`): `git checkout <source-branch>`. If the branch does not exist locally, `git checkout -b <source-branch> origin/<source-branch>`.
|
|
43
|
+
3. `git pull --ff-only` — refuse to proceed on a dirty or diverged working tree; ask the user to resolve it first rather than auto-stashing or force-resetting.
|
|
44
|
+
|
|
45
|
+
## Step 4: Triage and Propose Responses
|
|
46
|
+
|
|
47
|
+
For each qualifying thread, read the referenced code (use `threadContext.filePath` + line) and decide one of:
|
|
48
|
+
|
|
49
|
+
- **fix** — code change needed. Draft the change in your head and capture which files will be touched.
|
|
50
|
+
- **reply-only** — answers the reviewer's question without a code change (clarification, link to existing code, explanation of intentional design). Capture the reply text.
|
|
51
|
+
- **defer** — out of scope for this round; reply explaining why and leave the thread `active`. Do not silently skip.
|
|
52
|
+
|
|
53
|
+
Present the full triage to the user before touching any code:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
PR #{id}: {title}
|
|
57
|
+
Branch: {source-branch} → {target-branch}
|
|
58
|
+
Active reviewer threads: {count}
|
|
59
|
+
|
|
60
|
+
## Thread 1 — {file}:{line} (or "PR-level" if no file context)
|
|
61
|
+
Reviewer ({name}, {date}):
|
|
62
|
+
> {comment excerpt — first ~200 chars}
|
|
63
|
+
{additional reply chain summarized in 1 line each, if any}
|
|
64
|
+
|
|
65
|
+
Proposed action: FIX
|
|
66
|
+
Files to change:
|
|
67
|
+
- {path} — {what changes}
|
|
68
|
+
- {path} — {what changes}
|
|
69
|
+
Reply on resolve: "{short summary that will be posted with the resolution}"
|
|
70
|
+
|
|
71
|
+
## Thread 2 — {file}:{line}
|
|
72
|
+
Reviewer ({name}, {date}):
|
|
73
|
+
> {comment excerpt}
|
|
74
|
+
|
|
75
|
+
Proposed action: REPLY-ONLY (no code change)
|
|
76
|
+
Reply: "{text to post}"
|
|
77
|
+
|
|
78
|
+
## Thread 3 — PR-level
|
|
79
|
+
Reviewer ({name}, {date}):
|
|
80
|
+
> {comment excerpt}
|
|
81
|
+
|
|
82
|
+
Proposed action: DEFER (out of scope for this round)
|
|
83
|
+
Reply: "{text explaining why this will be handled separately}"
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
Approve this plan? (yes / edit <n>: <change> / skip <n> / no)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Wait for the user's response.** Apply edits and re-present until the user replies `yes`. `skip <n>` removes a thread from this round entirely — it stays active on the PR and gets no reply.
|
|
90
|
+
|
|
91
|
+
## Step 5: Implement the Fixes
|
|
92
|
+
|
|
93
|
+
For each thread marked **fix** in the approved plan:
|
|
94
|
+
|
|
95
|
+
1. Make the code change. Use the `backend` / `frontend` / `legacy` agents when the change is non-trivial; small targeted edits can go through `Edit` directly.
|
|
96
|
+
2. Add or update tests when the fix changes observable behavior. A reviewer comment that says "this doesn't handle empty input" implies a missing test case — add it. Do not add tests for pure rename/comment/formatting fixes.
|
|
97
|
+
|
|
98
|
+
Implement all fixes before moving to validation — batching keeps the build/test cycle short.
|
|
99
|
+
|
|
100
|
+
## Step 6: Validate
|
|
101
|
+
|
|
102
|
+
Run in this order. Stop and fix on the first failure before continuing.
|
|
103
|
+
|
|
104
|
+
1. **Build** — via the `build-validator` agent. Build must be clean.
|
|
105
|
+
2. **Lint** — `dotnet format` for `.cs` changes, ESLint for `.ts`/`.tsx` changes (only on touched files; full-repo lint runs are wasteful here).
|
|
106
|
+
3. **Tests** — run the test suites that cover the files you touched (`test-runner` agent). If a touched file has no test coverage, call that out in the final summary rather than silently skipping.
|
|
107
|
+
|
|
108
|
+
If validation fails after a reasonable fix attempt, stop and report — do not push broken code to resolve a comment.
|
|
109
|
+
|
|
110
|
+
## Step 7: Confirm Before Pushing
|
|
111
|
+
|
|
112
|
+
Show the user exactly what will happen next:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Validation passed.
|
|
116
|
+
|
|
117
|
+
Changes ready to push to {source-branch}:
|
|
118
|
+
{git diff --stat output}
|
|
119
|
+
|
|
120
|
+
About to:
|
|
121
|
+
1. git push origin {source-branch}
|
|
122
|
+
2. For each FIX thread: reply with the resolution summary + mark as Fixed (status 2)
|
|
123
|
+
3. For each REPLY-ONLY: reply with the response + mark as Closed (status 4)
|
|
124
|
+
4. For each DEFER thread: reply with the deferral note + leave status Active
|
|
125
|
+
|
|
126
|
+
Proceed? (yes / no)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Wait for `yes`.** Anything else aborts without pushing or touching the PR.
|
|
130
|
+
|
|
131
|
+
## Step 8: Push and Update the PR
|
|
132
|
+
|
|
133
|
+
1. `git push origin <source-branch>`.
|
|
134
|
+
2. For each thread in the approved plan, in order:
|
|
135
|
+
- Call `repo_reply_to_comment` with the reply text. Reference the new commit SHA in FIX replies (e.g. `Fixed in {sha} — {one-line summary of what changed}`).
|
|
136
|
+
- Call `repo_update_pull_request_thread` to set `status`:
|
|
137
|
+
- **fix** → `fixed` (2)
|
|
138
|
+
- **reply-only** → `closed` (4)
|
|
139
|
+
- **defer** → leave as `active` (do not call the update; only the reply was posted)
|
|
140
|
+
3. After every thread has been processed, post one PR-level summary comment via `repo_create_pull_request_thread` (new top-level thread, status `closed`):
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
Resolved review feedback in {sha}:
|
|
144
|
+
- {N} threads addressed with code fixes
|
|
145
|
+
- {M} threads answered without code changes
|
|
146
|
+
- {K} threads deferred ({reason summary})
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Skip the summary comment if only one thread was touched — the reply on that thread already says everything.
|
|
150
|
+
|
|
151
|
+
4. Do **not** change the work item state, do **not** create Tasks, do **not** log hours. Those belong to `/rework`. Leave the PR vote alone — the reviewer drives the next vote when they see the resolved threads.
|
|
152
|
+
|
|
153
|
+
## Step 9: Final Report
|
|
154
|
+
|
|
155
|
+
Print to the user:
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
PR #{id} — feedback resolved
|
|
159
|
+
Branch: {source-branch} ({sha})
|
|
160
|
+
Fixed: {N} thread(s)
|
|
161
|
+
Replied: {M} thread(s)
|
|
162
|
+
Deferred: {K} thread(s)
|
|
163
|
+
Files touched: {file count}
|
|
164
|
+
Tests added/updated: {test file count, or "none — no behavior change"}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
If any thread was deferred, list those thread ids explicitly so the user can decide whether they need to file a follow-up work item or address them in a later round.
|
|
@@ -97,7 +97,69 @@ Approve this plan? (yes / no / suggest changes)
|
|
|
97
97
|
|
|
98
98
|
**Wait for the user to approve the plan.** Do NOT start implementation until the user approves. If they suggest changes, revise the plan and present it again.
|
|
99
99
|
|
|
100
|
-
## Step 5:
|
|
100
|
+
## Step 5: Create Rework Task as a Child
|
|
101
|
+
|
|
102
|
+
Every rework round gets its own Task work item, parented under the original User Story / Bug. This keeps the rework effort visible on the board and gives the team a clean record of how many rounds an item went through.
|
|
103
|
+
|
|
104
|
+
### Suggest hours
|
|
105
|
+
|
|
106
|
+
Estimate the rework effort from the approved plan. Use this rubric — calibrate against scope, not abstract complexity:
|
|
107
|
+
|
|
108
|
+
| Hours | Looks like |
|
|
109
|
+
|-------|-----------|
|
|
110
|
+
| **0.5** | Trivial — copy tweak, single config value, one-line fix. No new tests. |
|
|
111
|
+
| **1** | One file, well-understood change. Maybe one new/updated test. |
|
|
112
|
+
| **2** | 2–3 files, one layer, follows existing patterns. Some new tests. |
|
|
113
|
+
| **4** | Multiple files across layers, or new logic in one area. Real test coverage. |
|
|
114
|
+
| **8** | Most of a day — meaningful new logic, several files, edge cases. |
|
|
115
|
+
| **16** | Two days — significant rework, multiple unknowns to resolve. |
|
|
116
|
+
| **24+** | Three days or more — flag that this rework probably should have been a fresh story. |
|
|
117
|
+
|
|
118
|
+
Adjust upward for: ambiguous feedback, missing UX, data migrations, regression risk in unrelated areas. Adjust downward for: pure config changes or mechanical fixes.
|
|
119
|
+
|
|
120
|
+
### Prompt the user
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
## Rework Task
|
|
124
|
+
|
|
125
|
+
**Title:** Rework AB#{id} — round {N}
|
|
126
|
+
**Parent:** AB#{id} ({title})
|
|
127
|
+
**Description:** {1–2 sentence summary of the rework feedback addressed}
|
|
128
|
+
|
|
129
|
+
**Suggested hours:** {n}
|
|
130
|
+
Based on: {one line — files touched / scope / unknowns}
|
|
131
|
+
|
|
132
|
+
Enter the estimated hours for this task (press enter to accept {n}):
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`{N}` is the rework round — count how many existing child Tasks already exist on the parent with a title matching `Rework AB#{id}` and add 1.
|
|
136
|
+
|
|
137
|
+
**Wait for the user's response.** Accept the suggestion (enter), accept a different number, or `cancel` to skip task creation. Do not proceed to branch switch until this is resolved.
|
|
138
|
+
|
|
139
|
+
### Create the task
|
|
140
|
+
|
|
141
|
+
If the user provided hours (suggested or overridden):
|
|
142
|
+
|
|
143
|
+
1. Call `mcp__azure-devops__wit_create_work_item`:
|
|
144
|
+
- **workItemType**: `Task`
|
|
145
|
+
- **title**: `Rework AB#{id} — round {N}`
|
|
146
|
+
- **fields**: JSON Patch document setting:
|
|
147
|
+
- `System.Description` — short summary of the rework feedback + link to the most recent PR
|
|
148
|
+
- `Microsoft.VSTS.Scheduling.OriginalEstimate` — the agreed hours
|
|
149
|
+
- `Microsoft.VSTS.Scheduling.RemainingWork` — the agreed hours
|
|
150
|
+
- `System.AreaPath` — same as the parent
|
|
151
|
+
- `System.IterationPath` — same as the parent
|
|
152
|
+
|
|
153
|
+
2. Link the new Task as a child of the parent work item via `wit_work_items_link`:
|
|
154
|
+
- **type**: `Child` (the parent → child link from the parent's perspective; equivalent to `Parent` from the task's perspective)
|
|
155
|
+
- **source**: parent work item ID
|
|
156
|
+
- **target**: new task ID
|
|
157
|
+
|
|
158
|
+
3. Confirm to the user: `Created task AB#{taskId} (parent: AB#{id}, est: {hours}h)`.
|
|
159
|
+
|
|
160
|
+
If the user cancels, skip task creation and proceed — note "No rework task created" in the final summary.
|
|
161
|
+
|
|
162
|
+
## Step 6: Switch to Existing Branch
|
|
101
163
|
|
|
102
164
|
The work item already has a branch from the previous PR. Switch to it:
|
|
103
165
|
|
|
@@ -107,26 +169,26 @@ The work item already has a branch from the previous PR. Switch to it:
|
|
|
107
169
|
|
|
108
170
|
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.
|
|
109
171
|
|
|
110
|
-
## Step
|
|
172
|
+
## Step 7: Implement
|
|
111
173
|
|
|
112
174
|
1. **Implement** the rework using backend and/or frontend agents according to the approved plan
|
|
113
175
|
2. **Write the unit tests** listed in the plan's "Unit Tests" section alongside the implementation — not after. Include any regression test that would have caught the original issue
|
|
114
176
|
3. **Generate mockup** if there are UI changes
|
|
115
177
|
|
|
116
|
-
## Step
|
|
178
|
+
## Step 8: Build Validation
|
|
117
179
|
|
|
118
180
|
Run a build check **before** any other quality checks. Use the `build-validator` agent to verify that all projects compile successfully.
|
|
119
181
|
|
|
120
182
|
- If the build fails, **fix the errors immediately** and re-run until the build passes
|
|
121
183
|
- Do NOT proceed to review, tests, or lint until the build is clean
|
|
122
184
|
|
|
123
|
-
## Step
|
|
185
|
+
## Step 9: Quality Checks
|
|
124
186
|
|
|
125
187
|
1. **Review** code for quality, security, and Clean Architecture compliance
|
|
126
188
|
2. **Run the full test suite** — every unit test in the repo, plus integration tests. Not just the tests added in this rework. A failure in an unrelated test means this rework broke something else; treat it as a regression, fix it, and re-run until the entire suite is green
|
|
127
189
|
3. **Run lint** — ESLint and dotnet format
|
|
128
190
|
|
|
129
|
-
## Step
|
|
191
|
+
## Step 10: UAT Gate
|
|
130
192
|
|
|
131
193
|
### If Hot Fix:
|
|
132
194
|
Skip manual UAT. Present an abbreviated confirmation:
|
|
@@ -158,8 +220,75 @@ Did manual testing pass?
|
|
|
158
220
|
|
|
159
221
|
Wait for the user's response before proceeding. Do NOT push until confirmed.
|
|
160
222
|
|
|
161
|
-
## Step
|
|
223
|
+
## Step 11: Push and Update
|
|
162
224
|
|
|
163
225
|
1. Push the changes: `git push`
|
|
164
226
|
2. Add a comment on the existing PR summarizing what was changed in the rework
|
|
165
|
-
3.
|
|
227
|
+
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.
|
|
228
|
+
4. **Move the work item back to `Code Review`** via `wit_update_work_item`:
|
|
229
|
+
- **path**: `/fields/System.State`
|
|
230
|
+
- **value**: `Code Review`
|
|
231
|
+
|
|
232
|
+
Rework is triggered by reviewer feedback, so the item was likely in `Active` / `In Progress` / `Rework` while the fixes were being made. Pushing the rework hands it back to the reviewer, so it belongs in `Code Review` again.
|
|
233
|
+
|
|
234
|
+
If the project's process template does not have a `Code Review` state (the update call returns an invalid-state error), fall back in this order: `Resolved` → `In Review` → leave the current state and warn the user. Do not silently swallow the error.
|
|
235
|
+
|
|
236
|
+
### Closing Related Tasks
|
|
237
|
+
|
|
238
|
+
After pushing, find every child Task of this work item (relations of type `System.LinkTypes.Hierarchy-Forward` where the target's `System.WorkItemType` is `Task`). Skip this step if there are no child Tasks.
|
|
239
|
+
|
|
240
|
+
For each child Task, capture:
|
|
241
|
+
- ID, title, state
|
|
242
|
+
- `Microsoft.VSTS.Scheduling.OriginalEstimate`
|
|
243
|
+
- `Microsoft.VSTS.Scheduling.CompletedWork`
|
|
244
|
+
- `Microsoft.VSTS.Scheduling.RemainingWork`
|
|
245
|
+
|
|
246
|
+
Present:
|
|
247
|
+
|
|
248
|
+
```
|
|
249
|
+
## Close Related Tasks
|
|
250
|
+
|
|
251
|
+
| Task ID | Title | State | Original | Completed | Remaining |
|
|
252
|
+
|---------|-------|-------|----------|-----------|-----------|
|
|
253
|
+
| AB#xxxx | Rework AB#{id} — round 2 | Active | 4 | 0 | 4 |
|
|
254
|
+
| AB#yyyy | ... | Active | 2 | 1 | 1 |
|
|
255
|
+
|
|
256
|
+
Close all related tasks and log completed hours? (yes / no / select)
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
- `yes` → walk through every child Task in sequence
|
|
260
|
+
- `no` → skip closing tasks entirely
|
|
261
|
+
- `select` → ask which task IDs to process; only those get prompted
|
|
262
|
+
|
|
263
|
+
For each task being processed, prompt for completed hours:
|
|
264
|
+
|
|
265
|
+
- **If `CompletedWork` is empty or `0`:**
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
AB#xxxx ({title})
|
|
269
|
+
Original estimate: {n}h
|
|
270
|
+
Completed: 0h
|
|
271
|
+
Remaining: {n}h
|
|
272
|
+
|
|
273
|
+
Enter completed hours (suggested: {OriginalEstimate}h, press enter to accept):
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
- **If `CompletedWork` is already set (non-zero):**
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
AB#xxxx ({title})
|
|
280
|
+
Original estimate: {n}h
|
|
281
|
+
Completed: {current}h ← already logged
|
|
282
|
+
Remaining: {m}h
|
|
283
|
+
|
|
284
|
+
Update completed hours to (press enter to keep {current}, or enter new value):
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
**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.
|
|
288
|
+
|
|
289
|
+
Once the user has answered, update each task via `wit_update_work_item`:
|
|
290
|
+
- `Microsoft.VSTS.Scheduling.CompletedWork` → the agreed value
|
|
291
|
+
- `Microsoft.VSTS.Scheduling.RemainingWork` → `0`
|
|
292
|
+
- `System.State` → `Closed` (fall back to `Done` if the project's task template uses Agile; warn if neither is valid)
|
|
293
|
+
|
|
294
|
+
Confirm with a summary line per task: `Closed AB#xxxx — {hours}h logged`.
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
This project uses [Claude Kit](https://github.com/Christopher-Waters/claude-kit) — a standardized set of agents, hooks, MCP servers, and workflows installed via `npx @chris1807/claude-kit init`.
|
|
5
5
|
|
|
6
|
+
> **This workflow is built for Azure DevOps.** Work items, branches, pull requests, releases (as iterations), and CD pipelines all live in Azure DevOps. The slash commands below talk to it through the Azure DevOps MCP server — `AB#1234` ids refer to Azure DevOps work items, PR numbers refer to Azure Repos pull requests, and pipeline ids refer to Azure Pipelines build definitions. If your project lives somewhere else (GitHub, GitLab, Jira), these commands will not work as-is.
|
|
7
|
+
|
|
6
8
|
### Agent Pipeline
|
|
7
9
|
|
|
8
10
|
When given a task, Claude Code can delegate through specialized agents:
|
|
@@ -51,7 +53,7 @@ These run automatically — no action needed:
|
|
|
51
53
|
|
|
52
54
|
| Server | What It Does |
|
|
53
55
|
|--------|-------------|
|
|
54
|
-
| **Azure DevOps** | Work items,
|
|
56
|
+
| **Azure DevOps** *(core — drives every slash command)* | Work items, repos, pull requests, pipelines, wiki, test plans, advanced security |
|
|
55
57
|
| **Playwright** | Browser testing (navigate, click, fill, screenshot) |
|
|
56
58
|
| **MongoDB** | Direct database queries and updates |
|
|
57
59
|
| **Microsoft Teams** | Send/read team messages and notifications |
|
|
@@ -200,6 +202,7 @@ All deployment and release operations are available as slash commands:
|
|
|
200
202
|
|---|---|---|
|
|
201
203
|
| `/implement` | `/implement AB#1234` | Summarize work item → approve plan → implement → PR |
|
|
202
204
|
| `/review` | `/review 142` | Automated code review on a PR |
|
|
205
|
+
| `/resolve-feedback` | `/resolve-feedback 142` | Address unresolved PR comment threads, push fixes, reply + resolve threads |
|
|
203
206
|
| `/deploy` | `/deploy "commit message"` | Commit, push, trigger pipeline |
|
|
204
207
|
| `/create-release` | `/create-release 23` | Group work items into Release #23 |
|
|
205
208
|
| `/deploy-release` | `/deploy-release 23 staging` | Cherry-pick release to environment |
|