@chris1807/claude-kit 2.1.27 → 2.1.30
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
|
@@ -28,7 +28,7 @@ Every session Claude learns from your feedback and gets better at helping you sp
|
|
|
28
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 |
|
|
29
29
|
| **Project Agents** | 3 | `.claude/agents/` (in the project) | deployer, db-admin, devops-tracker |
|
|
30
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 |
|
|
31
|
-
| **Slash Commands** |
|
|
31
|
+
| **Slash Commands** | 21 | `.claude/commands/` (in the project) | `/implement`, `/review`, `/deep-review`, `/resolve-feedback`, `/fix-review`, `/deploy`, `/create-release`, `/deploy-release`, `/add-to-release`, `/cherry-pick`, `/promote`, `/rollback`, `/status`, `/cleanup-branches`, `/close-orphan-tasks`, `/quote`, `/explain` |
|
|
32
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 |
|
|
33
33
|
| **Workflow Template** | 1 | Appended to `CLAUDE.md` | Documents the full development process |
|
|
34
34
|
| **Settings** | 1 | `.claude/settings.json` (in the project) | Registers all hooks and MCP servers |
|
|
@@ -639,6 +639,7 @@ Claude reviews for:
|
|
|
639
639
|
| `/review` | `/review 142` | Full code review on a PR with inline comments |
|
|
640
640
|
| `/deep-review` | `/deep-review 142` | Deep, Ultracode-orchestrated review: checks out the branch, builds/tests it, verifies every requirement, checks for regressions, flags out-of-scope changes, then comments + votes |
|
|
641
641
|
| `/resolve-feedback` | `/resolve-feedback 142` | Address unresolved PR comment threads, push fixes, reply + resolve threads |
|
|
642
|
+
| `/fix-review` | `/fix-review 142` | Fix everything flagged on a PR — human reviewer comments and automated `/review` findings alike: implement in severity order, validate, push, resolve threads |
|
|
642
643
|
| `/deploy` | `/deploy "message"` | Commit, push, trigger pipeline if on environment branch |
|
|
643
644
|
| `/create-release` | `/create-release 23` | Group work items into Release #23 iteration with tags |
|
|
644
645
|
| `/deploy-release` | `/deploy-release 23 staging` | Cherry-pick release work items to environment via PR |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chris1807/claude-kit",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.30",
|
|
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": {
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
Fix everything flagged on a pull request. Usage: `/fix-review <pr-id>` (or `/fix-review` to auto-detect from the current branch).
|
|
2
|
+
|
|
3
|
+
This command fixes **anything a reviewer raised on the PR** — whether the reviewer is a person leaving inline comments or the automated `/review` / `/deep-review` pass that posts severity-tagged findings. It reads every open comment, plans a concrete fix for each, validates, pushes, and resolves the threads. The default disposition is **fix it** — if the reviewer flagged something, you make the change.
|
|
4
|
+
|
|
5
|
+
**How this differs from `/resolve-feedback`:** `/resolve-feedback` is triage-oriented — it weighs each thread as fix / reply-only / defer and is built for back-and-forth conversation with a reviewer. `/fix-review` is fix-oriented — its job is to burn down the whole list of flagged items and get the PR mergeable, defaulting every flagged item to a code fix unless it's genuinely wrong or out of scope. Use `/resolve-feedback` when you mostly want to *discuss* the feedback; use `/fix-review` when you want to *clear* it. Neither touches work-item state, hours, or UAT — that's `/rework`.
|
|
6
|
+
|
|
7
|
+
## Step 1: Identify the Pull Request
|
|
8
|
+
|
|
9
|
+
Parse `$ARGUMENTS`:
|
|
10
|
+
|
|
11
|
+
- **PR id given** (`142`, `#142`, `!142`) — strip non-digits and use as the PR id.
|
|
12
|
+
- **No argument** — find the PR for the current branch:
|
|
13
|
+
1. Get current branch via `git rev-parse --abbrev-ref HEAD`.
|
|
14
|
+
2. Call `repo_list_pull_requests_by_repo_or_project` filtered to `sourceRefName: refs/heads/<branch>` and `status: active`.
|
|
15
|
+
3. If exactly one match, use it. If zero or multiple, ask the user which PR id to target — do not guess.
|
|
16
|
+
|
|
17
|
+
Fetch the PR via `repo_get_pull_request_by_id`. Record:
|
|
18
|
+
- `pullRequestId`, `title`, `status`
|
|
19
|
+
- `sourceRefName` (the branch holding the fixes) and `targetRefName`
|
|
20
|
+
- Linked work item id(s) from artifact links — used only for context, not modified by this command.
|
|
21
|
+
|
|
22
|
+
## Step 2: Collect Everything Flagged
|
|
23
|
+
|
|
24
|
+
Call `repo_list_pull_request_threads` for the PR, then read each thread's comments via `repo_list_pull_request_thread_comments`. Gather **every open thing a reviewer raised** — both human reviewer comments and automated `/review` / `/deep-review` findings.
|
|
25
|
+
|
|
26
|
+
**Include a thread when all of these are true:**
|
|
27
|
+
- `status` is `active` or `pending` (statuses `1` or `6`). Skip `fixed`, `wontFix`, `closed`, `byDesign` — those are already handled.
|
|
28
|
+
- It contains at least one real reviewer comment (`commentType: text`), not a system thread (vote changes, build status, policy violations, work-item link additions — these are `commentType: system`).
|
|
29
|
+
- It is not authored exclusively by the PR author talking to themselves with no reviewer or automated-review input. Use the PR `createdBy.id` to identify the author.
|
|
30
|
+
|
|
31
|
+
This captures both sources:
|
|
32
|
+
- **Human reviewer comments** — free-form prose, often without a severity tag. Infer severity from the language ("this will crash" → critical; "consider renaming" → suggestion); when unclear, default to **warning**.
|
|
33
|
+
- **Automated review findings** — `/review` / `/deep-review` post inline comments in the form `{file}:{line} [{severity}] — {body}` plus a PR-level summary comment with "X critical / Y warnings / Z suggestions" and an acceptance-criteria checklist. Read that summary comment too, and use it to recover any finding raised only in the summary, not as an inline comment.
|
|
34
|
+
|
|
35
|
+
For each flagged item, capture:
|
|
36
|
+
- `threadId`
|
|
37
|
+
- **source** — human reviewer vs. automated review (so the reply can be worded appropriately)
|
|
38
|
+
- **severity** — critical / warning / suggestion (inferred for human comments as above)
|
|
39
|
+
- `threadContext` — `filePath`, `rightFileStart.line` / `leftFileStart.line` (may be null for PR-level threads)
|
|
40
|
+
- the comment body — what's wrong and any suggested fix. If a comment body contains an `<img src="...">` pointing to an Azure DevOps attachment, download and view it via WebFetch before proposing a fix — reviewers often paste screenshots that carry the real context.
|
|
41
|
+
|
|
42
|
+
If there are zero qualifying threads, tell the user `No open reviewer feedback on PR #{id}.` and stop.
|
|
43
|
+
|
|
44
|
+
## Step 3: Switch to the PR Branch
|
|
45
|
+
|
|
46
|
+
Before reading code or proposing fixes, make sure local state matches the PR:
|
|
47
|
+
|
|
48
|
+
1. `git fetch`
|
|
49
|
+
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>`.
|
|
50
|
+
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.
|
|
51
|
+
|
|
52
|
+
## Step 4: Plan the Fixes
|
|
53
|
+
|
|
54
|
+
Order the items by severity — **critical first, then warning, then suggestion**. For each, read the referenced code (use `threadContext.filePath` + line, or locate it from the comment body for PR-level threads) and decide one of — **defaulting to fix**, because the point of this command is to clear what reviewers flagged:
|
|
55
|
+
|
|
56
|
+
- **fix** (the default) — apply the change the reviewer asked for. Capture which files will be touched and a one-line description of the change. Reach for this for anything actionable, whether it came from a person or the automated review.
|
|
57
|
+
- **disagree** — the comment is wrong or already addressed in the current code. Do not silently skip; capture a short rebuttal to post as a reply, and leave the thread for the reviewer to adjudicate. Use sparingly — a human reviewer flagged it for a reason, so only disagree when you're confident.
|
|
58
|
+
- **defer** — valid but genuinely out of scope for this round (e.g. a large refactor a suggestion asks for). Capture why; reply and leave the thread active.
|
|
59
|
+
|
|
60
|
+
Present the full plan to the user before touching any code:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
PR #{id}: {title}
|
|
64
|
+
Branch: {source-branch} → {target-branch}
|
|
65
|
+
Flagged items: {count} ({n} critical, {m} warning, {k} suggestion)
|
|
66
|
+
|
|
67
|
+
## Item 1 — [CRITICAL] {file}:{line} (or "PR-level" if no file context)
|
|
68
|
+
Flagged by: {reviewer name | automated review}
|
|
69
|
+
> {comment excerpt — first ~200 chars}
|
|
70
|
+
|
|
71
|
+
Proposed action: FIX
|
|
72
|
+
Files to change:
|
|
73
|
+
- {path} — {what changes}
|
|
74
|
+
Reply on resolve: "{short summary that will be posted with the resolution}"
|
|
75
|
+
|
|
76
|
+
## Item 2 — [WARNING] {file}:{line}
|
|
77
|
+
Flagged by: {reviewer name}
|
|
78
|
+
> {comment excerpt}
|
|
79
|
+
|
|
80
|
+
Proposed action: DISAGREE (already handled / incorrect)
|
|
81
|
+
Reply: "{rebuttal text}"
|
|
82
|
+
|
|
83
|
+
## Item 3 — [SUGGESTION] {file}:{line}
|
|
84
|
+
Flagged by: {automated review}
|
|
85
|
+
> {comment excerpt}
|
|
86
|
+
|
|
87
|
+
Proposed action: DEFER (out of scope for this round)
|
|
88
|
+
Reply: "{text explaining why this will be handled separately}"
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
Approve this plan? (yes / edit <n>: <change> / skip <n> / no)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Wait for the user's response.** Apply edits and re-present until the user replies `yes`. `skip <n>` removes an item from this round entirely — it stays active on the PR and gets no reply.
|
|
95
|
+
|
|
96
|
+
## Step 5: Implement the Fixes
|
|
97
|
+
|
|
98
|
+
For each finding marked **fix** in the approved plan, in severity order:
|
|
99
|
+
|
|
100
|
+
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.
|
|
101
|
+
2. Add or update tests when the fix changes observable behavior. A finding 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.
|
|
102
|
+
|
|
103
|
+
Implement all fixes before moving to validation — batching keeps the build/test cycle short.
|
|
104
|
+
|
|
105
|
+
## Step 6: Validate
|
|
106
|
+
|
|
107
|
+
Run in this order. Stop and fix on the first failure before continuing.
|
|
108
|
+
|
|
109
|
+
1. **Build** — via the `build-validator` agent. Build must be clean.
|
|
110
|
+
2. **Lint** — `dotnet format` for `.cs` changes, ESLint for `.ts`/`.tsx` changes (only on touched files; full-repo lint runs are wasteful here).
|
|
111
|
+
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.
|
|
112
|
+
|
|
113
|
+
If validation fails after a reasonable fix attempt, stop and report — do not push broken code to clear a finding.
|
|
114
|
+
|
|
115
|
+
## Step 7: Confirm Before Pushing
|
|
116
|
+
|
|
117
|
+
Show the user exactly what will happen next:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
Validation passed.
|
|
121
|
+
|
|
122
|
+
Changes ready to push to {source-branch}:
|
|
123
|
+
{git diff --stat output}
|
|
124
|
+
|
|
125
|
+
About to:
|
|
126
|
+
1. git push origin {source-branch}
|
|
127
|
+
2. For each FIX finding: reply with the resolution summary + mark as Fixed (status 2)
|
|
128
|
+
3. For each DISAGREE finding: reply with the rebuttal + leave status Active
|
|
129
|
+
4. For each DEFER finding: reply with the deferral note + leave status Active
|
|
130
|
+
|
|
131
|
+
Proceed? (yes / no)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Wait for `yes`.** Anything else aborts without pushing or touching the PR.
|
|
135
|
+
|
|
136
|
+
## Step 8: Push and Update the PR
|
|
137
|
+
|
|
138
|
+
1. `git push origin <source-branch>`.
|
|
139
|
+
2. For each finding in the approved plan, in order:
|
|
140
|
+
- 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}`).
|
|
141
|
+
- Call `repo_update_pull_request_thread` to set `status`:
|
|
142
|
+
- **fix** → `fixed` (2)
|
|
143
|
+
- **disagree** → leave as `active` (only the reply was posted — the user/reviewer adjudicates)
|
|
144
|
+
- **defer** → leave as `active`
|
|
145
|
+
3. After every finding has been processed, post one PR-level summary comment via `repo_create_pull_request_thread` (new top-level thread, status `closed`):
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
Addressed reviewer feedback in {sha}:
|
|
149
|
+
- {N} fixed ({critical/warning/suggestion breakdown})
|
|
150
|
+
- {D} disagreed (left active for adjudication)
|
|
151
|
+
- {K} deferred ({reason summary})
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Skip the summary comment if only one finding was touched — the reply on that thread already says everything.
|
|
155
|
+
|
|
156
|
+
4. Do **not** change the work item state, do **not** create Tasks, do **not** log hours, do **not** vote on the PR. Those belong to `/rework` and to the reviewer.
|
|
157
|
+
|
|
158
|
+
## Step 9: Final Report
|
|
159
|
+
|
|
160
|
+
Print to the user:
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
PR #{id} — reviewer feedback addressed
|
|
164
|
+
Branch: {source-branch} ({sha})
|
|
165
|
+
Fixed: {N} finding(s) ({n} critical, {m} warning, {k} suggestion)
|
|
166
|
+
Disagreed: {D} finding(s)
|
|
167
|
+
Deferred: {K} finding(s)
|
|
168
|
+
Files touched: {file count}
|
|
169
|
+
Tests added/updated: {test file count, or "none — no behavior change"}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
If any finding was disagreed or deferred, list those thread ids explicitly so the user can adjudicate or file a follow-up. If any critical finding remains unfixed for any reason, call that out prominently — a PR with open critical findings should not merge.
|
|
@@ -243,6 +243,8 @@ Wait for the user's response before proceeding. Do NOT create a PR until confirm
|
|
|
243
243
|
|
|
244
244
|
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.
|
|
245
245
|
|
|
246
|
+
> **PR completion closes the Task only.** When this PR is later completed/merged, only the child **Task** may be closed — never the parent User Story or Bug. Azure DevOps's "Complete associated work items" option transitions *every* linked work item (including the parent this PR is linked to), so do **not** enable it when completing the PR. Close the child Task explicitly instead; the parent stays in `Code Review` until QA/UAT and any sibling Tasks are done.
|
|
247
|
+
|
|
246
248
|
### Closing Related Tasks
|
|
247
249
|
|
|
248
250
|
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.
|
|
@@ -323,6 +323,8 @@ Wait for the user's response before proceeding. Do NOT push until confirmed.
|
|
|
323
323
|
|
|
324
324
|
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.
|
|
325
325
|
|
|
326
|
+
> **PR completion closes the Task only.** When the PR is later completed/merged, only the child **Task** may be closed — never the parent User Story or Bug. Azure DevOps's "Complete associated work items" option transitions *every* linked work item (including the parent the PR is linked to), so do **not** enable it when completing the PR. Close the child Task explicitly instead; the parent stays in `Code Review` until QA/UAT and any sibling Tasks are done.
|
|
327
|
+
|
|
326
328
|
### Closing Related Tasks
|
|
327
329
|
|
|
328
330
|
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.
|