@chris1807/claude-kit 2.1.8 → 2.1.10
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
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/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.10",
|
|
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,219 @@
|
|
|
1
|
+
Sweep an Azure DevOps backlog for Dev Ready user stories without child tasks and propose a per-story task breakdown with hour estimates. Usage: `/plan-backlog [project]`
|
|
2
|
+
|
|
3
|
+
This command walks the **backlog** of a chosen Azure DevOps project (work items not assigned to any sprint), finds user stories that are **Dev Ready**, **have Story Points**, and **have no child tasks yet**, and — story by story — proposes a tailored Task breakdown with hour estimates for the user to approve before any work items are created.
|
|
4
|
+
|
|
5
|
+
Treat `$ARGUMENTS` as an optional project name (e.g. `/plan-backlog CSI Development`). If provided, skip the project prompt in Step 1.
|
|
6
|
+
|
|
7
|
+
## Step 1: Choose the Azure DevOps Project
|
|
8
|
+
|
|
9
|
+
### Detect the default project
|
|
10
|
+
|
|
11
|
+
Before prompting, attempt to detect the default Azure DevOps project from CLAUDE.md, in this order:
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
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."
|
|
15
|
+
|
|
16
|
+
If a default is found, present it pre-selected:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Which Azure DevOps project should I sweep?
|
|
20
|
+
|
|
21
|
+
Default: {detected project} ← press enter to accept
|
|
22
|
+
|
|
23
|
+
Or specify a different project name, or "list" to see all projects.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If the user types `list`, call `mcp__azure-devops__core_list_projects` and present the names, then re-prompt. **Wait for the user's response.** Validate the chosen project name exists (call `core_list_projects` if uncertain).
|
|
27
|
+
|
|
28
|
+
## Step 2: Query the Backlog
|
|
29
|
+
|
|
30
|
+
Run a WIQL query via `mcp__azure-devops__wit_query_by_wiql` to find candidate stories. "Backlog" means items at the **root iteration path** (not assigned to any sprint).
|
|
31
|
+
|
|
32
|
+
```sql
|
|
33
|
+
SELECT [System.Id], [System.Title], [System.State],
|
|
34
|
+
[System.WorkItemType], [System.IterationPath],
|
|
35
|
+
[Microsoft.VSTS.Scheduling.StoryPoints], [System.Tags]
|
|
36
|
+
FROM WorkItems
|
|
37
|
+
WHERE [System.TeamProject] = '{project}'
|
|
38
|
+
AND [System.WorkItemType] IN ('User Story', 'Bug')
|
|
39
|
+
AND [System.State] = 'Dev Ready'
|
|
40
|
+
AND [Microsoft.VSTS.Scheduling.StoryPoints] > 0
|
|
41
|
+
AND [System.IterationPath] = '{project}'
|
|
42
|
+
ORDER BY [Microsoft.VSTS.Common.StackRank] ASC
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
> The `[System.IterationPath] = '{project}'` clause restricts results to the **root** iteration — items not yet placed in a sprint. If a project uses a different convention (e.g. an explicit "Backlog" iteration), ask the user to confirm before proceeding.
|
|
46
|
+
|
|
47
|
+
If the query returns zero items, report:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
No Dev Ready stories with Story Points were found on the backlog of {project}.
|
|
51
|
+
Nothing to plan.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
and stop.
|
|
55
|
+
|
|
56
|
+
## Step 3: Filter Out Stories That Already Have Child Tasks
|
|
57
|
+
|
|
58
|
+
For each candidate from Step 2, fetch the work item with `mcp__azure-devops__wit_get_work_item` 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
|
+
|
|
60
|
+
Present a one-line summary of what was skipped:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Skipped {n} stories that already have child tasks:
|
|
64
|
+
- AB#{id}: {title} ({k} existing tasks)
|
|
65
|
+
- ...
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
If after filtering there are zero stories left, report "All Dev Ready backlog stories already have tasks — nothing to plan." and stop.
|
|
69
|
+
|
|
70
|
+
## Step 4: Present the Working List
|
|
71
|
+
|
|
72
|
+
Show the remaining stories the user is about to walk through:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Found {n} Dev Ready stories with Story Points and no child tasks on the {project} backlog:
|
|
76
|
+
|
|
77
|
+
| # | ID | Title | Points |
|
|
78
|
+
|----|----------|------------------------------------------|--------|
|
|
79
|
+
| 1 | AB#4521 | COM - Admin can export payments to CSV | 5 |
|
|
80
|
+
| 2 | AB#4523 | COM - Add bulk approval workflow | 8 |
|
|
81
|
+
| 3 | AB#4530 | COM - Dashboard trend graphs | 3 |
|
|
82
|
+
| .. | ... | ... | ... |
|
|
83
|
+
|
|
84
|
+
I'll walk through each one. For each story you'll see a proposed task list
|
|
85
|
+
with hours; you can approve, edit, or skip per story.
|
|
86
|
+
|
|
87
|
+
Continue? (yes / cancel)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Wait for the user.** If `cancel`, stop with no changes.
|
|
91
|
+
|
|
92
|
+
## Step 5: Per-Story Task Breakdown (loop)
|
|
93
|
+
|
|
94
|
+
For each remaining story, in order:
|
|
95
|
+
|
|
96
|
+
### 5a. Re-read the story in full
|
|
97
|
+
|
|
98
|
+
Fetch the work item again (Description and Acceptance Criteria fields) if not already cached. You need the AC text to tailor the task list.
|
|
99
|
+
|
|
100
|
+
### 5b. Map Story Points → total hour budget
|
|
101
|
+
|
|
102
|
+
Use this rough mapping (calibrated to ~6 productive hours per day):
|
|
103
|
+
|
|
104
|
+
| Points | Hour budget | Notes |
|
|
105
|
+
|--------|-------------|-------|
|
|
106
|
+
| 1 | 4 hrs | trivial change |
|
|
107
|
+
| 2 | 8 hrs | small, one-layer change |
|
|
108
|
+
| 3 | 14 hrs | one feature slice, modest tests |
|
|
109
|
+
| 5 | 24 hrs | cross-layer or new component |
|
|
110
|
+
| 8 | 40 hrs | multi-area, real unknowns |
|
|
111
|
+
| 13 | 64 hrs | large feature — should probably be split |
|
|
112
|
+
| 21 | 100 hrs | very large — almost certainly split |
|
|
113
|
+
|
|
114
|
+
If the points value isn't on the Fibonacci scale, round to the nearest entry above.
|
|
115
|
+
|
|
116
|
+
### 5c. Tailor the task list (hybrid template)
|
|
117
|
+
|
|
118
|
+
Start from this template, then **add, remove, or rename** tasks based on what the AC actually describes:
|
|
119
|
+
|
|
120
|
+
| Default task | When to include |
|
|
121
|
+
|------------------------|----------------------------------------------------------|
|
|
122
|
+
| Design / Spike | AC has open questions or the implementation isn't obvious |
|
|
123
|
+
| Backend implementation | AC mentions API, service, job, persistence, or data flow |
|
|
124
|
+
| Frontend implementation| AC mentions UI, screen, form, button, or workflow |
|
|
125
|
+
| Database / migration | AC requires schema changes or data backfill |
|
|
126
|
+
| Automated tests | Always include unless the story is purely a config tweak |
|
|
127
|
+
| Code review revisions | Always include |
|
|
128
|
+
| UAT support | Always include unless explicitly out of scope |
|
|
129
|
+
|
|
130
|
+
Distribute the hour budget across the chosen tasks. Reasonable defaults:
|
|
131
|
+
|
|
132
|
+
- Code review revisions: ~10% of budget (min 1 hr)
|
|
133
|
+
- UAT support: ~10% of budget (min 1 hr)
|
|
134
|
+
- Automated tests: ~15–25% of budget
|
|
135
|
+
- Design / Spike (if present): ~10–20% of budget
|
|
136
|
+
- Remaining hours split across implementation tasks based on the AC
|
|
137
|
+
|
|
138
|
+
Round each task to a whole hour. Final total should equal the budget (give or take 1 hr from rounding).
|
|
139
|
+
|
|
140
|
+
### 5d. Show the proposal
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
─────────────────────────────────────────────────────────────
|
|
144
|
+
AB#{id}: {title} ({points} pts → {budget} hrs total)
|
|
145
|
+
─────────────────────────────────────────────────────────────
|
|
146
|
+
|
|
147
|
+
Proposed child tasks:
|
|
148
|
+
|
|
149
|
+
| # | Task title | Hours |
|
|
150
|
+
|---|-----------------------------------------------|-------|
|
|
151
|
+
| 1 | {Prefix} - Design: clarify export field set | 3 |
|
|
152
|
+
| 2 | {Prefix} - Backend: CSV export endpoint | 8 |
|
|
153
|
+
| 3 | {Prefix} - Frontend: export button + download | 6 |
|
|
154
|
+
| 4 | {Prefix} - Tests: export endpoint + UI | 4 |
|
|
155
|
+
| 5 | {Prefix} - Code review revisions | 2 |
|
|
156
|
+
| 6 | {Prefix} - UAT support | 1 |
|
|
157
|
+
| | **Total** | **24**|
|
|
158
|
+
|
|
159
|
+
Approve? (yes / edit / skip / cancel-all)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Task titles use the same product prefix as the parent (e.g. `COM`, `PAY`, `CDA`) — extract it from the parent's title. Use the format `{Prefix} - {what the task does}`.
|
|
163
|
+
|
|
164
|
+
**Wait for the user.**
|
|
165
|
+
|
|
166
|
+
- `yes` → proceed to 5e (create the tasks)
|
|
167
|
+
- `edit` → ask which row to change (title or hours), revise, re-show the table, ask again
|
|
168
|
+
- `skip` → skip this story, move to the next; record it as skipped
|
|
169
|
+
- `cancel-all` → stop the entire loop with no further changes. Report what was already created.
|
|
170
|
+
|
|
171
|
+
### 5e. Create the child tasks
|
|
172
|
+
|
|
173
|
+
For each approved task, call `mcp__azure-devops__wit_create_work_item` with:
|
|
174
|
+
|
|
175
|
+
- **project**: the chosen project
|
|
176
|
+
- **workItemType**: `Task`
|
|
177
|
+
- **title**: the task title (with prefix)
|
|
178
|
+
- **fields**:
|
|
179
|
+
- `Microsoft.VSTS.Scheduling.OriginalEstimate` — the hour estimate (as a number)
|
|
180
|
+
- `Microsoft.VSTS.Scheduling.RemainingWork` — the same hour estimate
|
|
181
|
+
- `System.IterationPath` — copy from the parent (which is the root)
|
|
182
|
+
- `System.AreaPath` — copy from the parent
|
|
183
|
+
|
|
184
|
+
Then link the new task as a child of the parent with `mcp__azure-devops__wit_add_child_work_items` (or fall back to `wit_work_items_link` with link type `System.LinkTypes.Hierarchy-Forward` from parent → task).
|
|
185
|
+
|
|
186
|
+
If any create or link call fails, report the failure for that task, stop creating tasks for this story, and ask the user whether to continue with the next story or abort the loop.
|
|
187
|
+
|
|
188
|
+
### 5f. Confirm per-story result
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
✓ AB#{id}: created {k} child tasks ({budget} hrs total)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Then move to the next story.
|
|
195
|
+
|
|
196
|
+
## Step 6: Final Summary
|
|
197
|
+
|
|
198
|
+
Once the loop ends (all stories handled, or user said `cancel-all`):
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
## Backlog Planning Complete — {project}
|
|
202
|
+
|
|
203
|
+
Stories planned: {n_planned}
|
|
204
|
+
✓ Tasks created: {n_tasks_total} ({hours_total} hrs)
|
|
205
|
+
Stories skipped: {n_skipped}
|
|
206
|
+
- already had tasks: {n_existing}
|
|
207
|
+
- user skipped: {n_user_skipped}
|
|
208
|
+
|
|
209
|
+
Planned stories:
|
|
210
|
+
- AB#4521: 6 tasks, 24 hrs
|
|
211
|
+
- AB#4530: 4 tasks, 14 hrs
|
|
212
|
+
- ...
|
|
213
|
+
|
|
214
|
+
Next steps:
|
|
215
|
+
/quote AB#{id} — re-estimate any story whose budget felt off
|
|
216
|
+
/implement AB#{id} — start working on a planned story
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Do not assign tasks, change parent state, or add tags unless the user explicitly asks — those are downstream decisions.
|
|
@@ -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.
|
|
@@ -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 |
|
|
@@ -208,6 +211,7 @@ All deployment and release operations are available as slash commands:
|
|
|
208
211
|
| `/promote` | `/promote staging production` | Promote all code between environments |
|
|
209
212
|
| `/rollback` | `/rollback AB#1234 production` | Revert commits on an environment |
|
|
210
213
|
| `/status` | `/status release 24` | Check release, pipeline, or work item status |
|
|
214
|
+
| `/plan-backlog` | `/plan-backlog [project]` | Sweep backlog for Dev Ready stories with points and no tasks → propose child tasks with hours |
|
|
211
215
|
| `/cleanup-branches` | `/cleanup-branches` | Delete merged branches |
|
|
212
216
|
|
|
213
217
|
The CD pipeline is only triggered manually when pushing directly to an environment branch. For feature/work branches, the pipeline triggers on PR merge.
|