@chris1807/claude-kit 2.1.26 → 2.1.27
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 +2 -1
- package/package.json +1 -1
- package/templates/commands/deep-review.md +196 -0
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** | 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`, `/close-orphan-tasks`, `/quote`, `/explain` |
|
|
31
|
+
| **Slash Commands** | 13 | `.claude/commands/` (in the project) | `/implement`, `/review`, `/deep-review`, `/resolve-feedback`, `/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 |
|
|
@@ -637,6 +637,7 @@ Claude reviews for:
|
|
|
637
637
|
|---------|-------|-------------|
|
|
638
638
|
| `/implement` | `/implement AB#1234` | Read work item → summarize → approve plan → implement → quality checks → UAT → PR |
|
|
639
639
|
| `/review` | `/review 142` | Full code review on a PR with inline comments |
|
|
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 |
|
|
640
641
|
| `/resolve-feedback` | `/resolve-feedback 142` | Address unresolved PR comment threads, push fixes, reply + resolve threads |
|
|
641
642
|
| `/deploy` | `/deploy "message"` | Commit, push, trigger pipeline if on environment branch |
|
|
642
643
|
| `/create-release` | `/create-release 23` | Group work items into Release #23 iteration with tags |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chris1807/claude-kit",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.27",
|
|
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,196 @@
|
|
|
1
|
+
Deeply review PR #$ARGUMENTS in the current project — a local, checkout-based, Ultracode-orchestrated version of `/review`. Does everything `/review` does, plus: checks out the branch, verifies every requirement is implemented, confirms nothing else broke, and flags any changes the developer made that fall outside the work item. Follow this workflow:
|
|
2
|
+
|
|
3
|
+
## Always Use Ultracode
|
|
4
|
+
|
|
5
|
+
This command **always orchestrates its analysis-heavy phases with the `Workflow` tool** — you do not wait to be asked, and you do not need the `ultracode` keyword. The slash command runs in the main loop, which has the `Workflow` tool, so fan-out is available throughout. This is the deep-review counterpart to `/review`: where `/review` reads the PR diff over MCP, `/deep-review` checks the branch out locally and runs a far more exhaustive, multi-agent analysis.
|
|
6
|
+
|
|
7
|
+
What this means in practice:
|
|
8
|
+
|
|
9
|
+
- **Fan out the read / analyze / verify work** — rework-context detection (Step 2), per-acceptance-criterion coverage (Step 5), regression analysis (Step 6), scope/unwanted-change detection (Step 7), and the review dimensions (Step 8) are run as `Workflow` scripts with one agent per independent unit (per prior PR, per acceptance criterion, per impacted subsystem, per review dimension). Each agent returns **structured findings** via a `schema`; you synthesize the results in the main loop.
|
|
10
|
+
- **Never fan out an interactive gate, a write, or a vote.** Every user prompt (Steps 7, 9, 10) and every PR mutation — posting comments, voting (Steps 10–11) — stays in the **main loop**. Workflow agents here are **read-only analysts** — they use MCP read tools, `Read`, `Grep`, and `Bash` for read-only inspection (builds, tests, `git diff`), and they return data. They do not post comments, vote, switch branches, write code, or ask the user anything.
|
|
11
|
+
- **Stay in the loop between phases.** Run one `Workflow` per phase, read its results, present/await the user as the steps require, then launch the next phase's workflow. This is several short workflows in sequence — not one monolithic run that tries to swallow the approval gates.
|
|
12
|
+
- **Review uses the canonical find → adversarially-verify pipeline** (Step 8): fan out per dimension, then spawn skeptic verifiers per finding and drop findings the majority refute, so only confirmed issues reach the user. Use the `reviewer` agent type for the dimension agents (`agentType: 'reviewer'`) so they inherit its review rules.
|
|
13
|
+
|
|
14
|
+
If the `Workflow` tool is somehow unavailable, fall back to running each phase sequentially in the main loop — the output is identical, just slower.
|
|
15
|
+
|
|
16
|
+
## Step 1: Resolve the PR, Work Item, and Branch
|
|
17
|
+
|
|
18
|
+
Handle `$ARGUMENTS` as a PR id (e.g. `142`).
|
|
19
|
+
|
|
20
|
+
1. **Read the PR** via `repo_get_pull_request_by_id` — capture the **source branch**, **target branch**, title, description, and status.
|
|
21
|
+
2. **Read the linked work item** and gather the full description and acceptance criteria. Download and view every embedded image in the description / acceptance criteria via `WebFetch` — visual requirements (mockups, expected UI, error states) are part of the spec and you cannot verify "implemented properly" without seeing them.
|
|
22
|
+
3. **Read the full diff** via `repo_get_pull_request_changes` — understand every file the PR touches. This is the canonical list of what the developer changed.
|
|
23
|
+
|
|
24
|
+
## Step 2: Check Out the Branch Locally
|
|
25
|
+
|
|
26
|
+
Unlike `/review`, this command works against the real working tree so it can build, test, and inspect the full code — not just the diff hunks.
|
|
27
|
+
|
|
28
|
+
1. Stash or confirm a clean working tree first. If the working tree is dirty, **stop and tell the user** — do not stash their work without asking.
|
|
29
|
+
2. `git fetch` then `git checkout <source-branch>` and `git pull` to get the exact code under review.
|
|
30
|
+
3. Compute the review diff range against the target branch: `git merge-base <target-branch> HEAD` → use `git diff <merge-base>..HEAD` as the authoritative diff for all later steps. This is more reliable than the MCP diff for local analysis and matches what will actually merge.
|
|
31
|
+
4. Confirm to the user which branch and commit you are reviewing:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
Reviewing PR #{id} — {title}
|
|
35
|
+
Source branch: {source} @ {short-sha}
|
|
36
|
+
Target branch: {target}
|
|
37
|
+
Work item: AB#{wi} — {wi title}
|
|
38
|
+
Files changed: {n}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If checkout fails (branch deleted after merge, etc.), tell the user and offer to fall back to a diff-only review (the `/review` behavior) instead.
|
|
42
|
+
|
|
43
|
+
## Step 3: Detect Rework Context — do this BEFORE judging acceptance criteria
|
|
44
|
+
|
|
45
|
+
A small diff does not mean a small feature. The PR you are reviewing may be a rework that only addresses targeted feedback, while the bulk of the implementation already shipped in earlier PRs. Judging acceptance criteria against the current diff alone will produce false "not met" findings.
|
|
46
|
+
|
|
47
|
+
> **Ultracode:** Fan out with `Workflow` — one agent per PR linked to the work item, each fetching its details and classifying it. Synthesize in the main loop.
|
|
48
|
+
|
|
49
|
+
For each PR linked to the work item (via `relations` / artifact links), fetch its details and classify:
|
|
50
|
+
- **This PR** — the one being reviewed.
|
|
51
|
+
- **Prior merged PRs** — `status: completed` and merged before this PR was created. Their changes are already in the target branch.
|
|
52
|
+
- **Prior abandoned PRs** — ignore for acceptance-criteria coverage; their code is not in the target branch.
|
|
53
|
+
|
|
54
|
+
Also scan the work item comments for rework feedback posted after the most recent prior merged PR. That feedback is what the current PR is expected to address.
|
|
55
|
+
|
|
56
|
+
Treat the PR as a **rework** if any prior merged PR exists for this work item, OR if the work item has rework feedback comments dated after a prior PR. Otherwise treat it as an **initial PR**.
|
|
57
|
+
|
|
58
|
+
## Step 4: Build and Test the Checked-Out Branch
|
|
59
|
+
|
|
60
|
+
Because the branch is local, prove it actually works before judging it — a PR that does not build or whose tests fail is not mergeable regardless of how the code reads.
|
|
61
|
+
|
|
62
|
+
1. **Build** every affected project with the `build-validator` agent. Record pass/fail and any errors.
|
|
63
|
+
2. **Run the full test suite** with the `test-runner` agent — every unit test in the repo, plus integration tests, not just tests touched by this PR. A failure in an unrelated test is a regression signal for Step 6.
|
|
64
|
+
3. **Run lint** — ESLint and `dotnet format` via the `lint-checker` agent.
|
|
65
|
+
|
|
66
|
+
Capture the results; do not fix anything (this command is read-only on the code). Build/test/lint failures become findings in the Step 8 summary, flagged **critical**.
|
|
67
|
+
|
|
68
|
+
## Step 5: Verify Every Requirement Is Implemented — Deep AC Coverage
|
|
69
|
+
|
|
70
|
+
This is the core of `/deep-review`: confirm **nothing in the spec was missed** and everything was **implemented properly**, not just superficially present.
|
|
71
|
+
|
|
72
|
+
> **Ultracode:** Fan out with `Workflow` — **one agent per acceptance criterion**. Each agent reads the relevant code in the checked-out tree and returns `{ac, status, evidence, gaps}` where:
|
|
73
|
+
> - `status` ∈ `met-this-pr` | `met-prior-pr` | `partial` | `not-met` | `not-applicable`
|
|
74
|
+
> - `evidence` — the specific file(s)/line(s) and test(s) that prove the AC is satisfied
|
|
75
|
+
> - `gaps` — anything required by the AC (including details only visible in the embedded images) that is missing, stubbed, or only partially done
|
|
76
|
+
>
|
|
77
|
+
> Evaluate coverage against the **cumulative work**, not just this diff:
|
|
78
|
+
> - **Initial PR**: every AC must be satisfied by this PR's diff.
|
|
79
|
+
> - **Rework PR**: an AC may be satisfied by (prior merged PRs already in the target branch) + (this PR's diff). Mark those `met-prior-pr` — do not flag them as missing — but re-check any AC whose area this PR's diff touches, for regression.
|
|
80
|
+
>
|
|
81
|
+
> Collect all results in the main loop. Any `partial` or `not-met` AC is a blocking finding.
|
|
82
|
+
|
|
83
|
+
For a rework PR with a small diff, also ask the focused question: **does this diff correctly address the rework feedback, and does it avoid regressing the prior implementation?** — not "does this diff implement every AC from scratch?"
|
|
84
|
+
|
|
85
|
+
## Step 6: Confirm It Didn't Break Other Code — Regression Analysis
|
|
86
|
+
|
|
87
|
+
Verify the change is safe beyond the lines it touched.
|
|
88
|
+
|
|
89
|
+
> **Ultracode:** Fan out with `Workflow` — one agent per subsystem or shared component the diff could affect (callers of changed methods, shared DTOs/interfaces, database schema or query shape changes, public API contracts, config/env changes). Each agent returns `{area, impact, risk, evidence}`. Seed the agents with: (a) the full-suite test results from Step 4, (b) the list of changed symbols, and (c) `grep` for usages of every changed public symbol. Synthesize a regression risk table in the main loop.
|
|
90
|
+
|
|
91
|
+
Specifically check:
|
|
92
|
+
- **Changed shared code** — for every public method/class/interface/DTO the diff modifies, find its other callers and confirm the change is backward-compatible or all callers were updated.
|
|
93
|
+
- **Test fallout** — any failing test from Step 4 in an area this PR didn't intend to change is a regression; surface it as **critical**.
|
|
94
|
+
- **Environment configuration parity** — if the diff adds or changes any key in `appsettings.*.json` or `.env*`, every parallel environment file (Development/Staging/QA/Production for backend; `.env.development`/`.env.staging`/`.env.production`/`.env.example` for React) must have a corresponding entry, or the omission must be called out. Build a (key × environment) table and flag any missing cell as **critical**. A pipeline variable group, Key Vault, or App Configuration counts as a valid source for an environment — verify it exists rather than assume it.
|
|
95
|
+
|
|
96
|
+
## Step 7: Detect Unwanted / Out-of-Scope Changes — and Confirm With the User
|
|
97
|
+
|
|
98
|
+
The developer should have changed **only** what the work item requires. Catch anything extra — accidental commits, debug code, unrelated refactors, formatting churn, vendored files, secrets, commented-out blocks, or scope creep.
|
|
99
|
+
|
|
100
|
+
> **Ultracode:** Fan out with `Workflow` — one agent per changed file (or per logical group of files). Each agent answers: *does this change map to an acceptance criterion or the work item's stated intent?* and returns `{file, mapsToAC, classification, rationale}` where `classification` ∈ `in-scope` | `incidental-ok` (e.g. an unavoidable import or a generated file) | `out-of-scope` | `suspicious` (debug code, leftover TODO, commented-out blocks, stray console/Debug logging, unrelated dependency bumps, large reformat-only diffs). Synthesize in the main loop into a single scope table.
|
|
101
|
+
|
|
102
|
+
Present every out-of-scope or suspicious change to the user and **wait for a decision** — do not silently fold these into the review:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
## Out-of-Scope / Unexpected Changes in PR #{id}
|
|
106
|
+
|
|
107
|
+
These changes do not map to any acceptance criterion on AB#{wi}:
|
|
108
|
+
|
|
109
|
+
| # | File | What changed | Why it looks out of scope |
|
|
110
|
+
|---|------|--------------|---------------------------|
|
|
111
|
+
| 1 | {file} | {summary} | {e.g. unrelated refactor of an untouched module} |
|
|
112
|
+
| 2 | {file} | {summary} | {e.g. leftover console.log / commented-out code} |
|
|
113
|
+
| 3 | {file} | {summary} | {e.g. dependency bump unrelated to this work item} |
|
|
114
|
+
|
|
115
|
+
For each, tell me how to treat it:
|
|
116
|
+
- "ok 1,3" → accepted as intentional; I won't flag them
|
|
117
|
+
- "flag 2" → I'll raise it as a review finding (severity I'll pick by type)
|
|
118
|
+
- "ok all" / "flag all"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Wait for the user's response.** Items the user marks `ok` are dropped from the findings. Items marked `flag` (or anything genuinely dangerous — a committed secret, disabled security check, or `.env` with real values — which you should flag as **critical** regardless of the user's call, while telling them why) carry into the Step 8 review summary. If there are no out-of-scope or suspicious changes, state that and skip the prompt.
|
|
122
|
+
|
|
123
|
+
## Step 8: Review for Quality — find → adversarially-verify
|
|
124
|
+
|
|
125
|
+
> **Ultracode:** Run the review as a `Workflow` find → verify pipeline. **Find:** fan out one agent per dimension (below), each scoped to the Step 2 diff range and returning structured findings. **Verify:** for each finding, spawn independent skeptic agents prompted to *refute* it (default to refuted if uncertain); drop any finding the majority refute. Only confirmed findings reach the user. Use `agentType: 'reviewer'` for the dimension agents.
|
|
126
|
+
|
|
127
|
+
Review dimensions:
|
|
128
|
+
- Clean Architecture boundaries (Domain has no infrastructure dependencies)
|
|
129
|
+
- Tenant/`organizationId` enforcement on all database queries
|
|
130
|
+
- Missing unit or integration tests for new code
|
|
131
|
+
- `any` types in TypeScript (should be properly typed)
|
|
132
|
+
- Security issues (OWASP Top 10, hardcoded secrets, SQL/NoSQL injection, exposed PII)
|
|
133
|
+
- Error handling (are exceptions caught appropriately?)
|
|
134
|
+
- Naming conventions and code style consistency
|
|
135
|
+
- Breaking changes or backwards compatibility issues (cross-reference Step 6)
|
|
136
|
+
- **CLAUDE.md compliance** — sensitive-data rules, work-item prefix conventions, branching, anything the project's CLAUDE.md mandates
|
|
137
|
+
|
|
138
|
+
Fold in the carried-over findings from Steps 4 (build/test/lint), 5 (AC gaps), 6 (regressions, env parity), and 7 (flagged out-of-scope changes).
|
|
139
|
+
|
|
140
|
+
## Step 9: Draft the Comments and Summary
|
|
141
|
+
|
|
142
|
+
**Draft (do not post yet) the inline comments** for every confirmed finding. For each, capture: file path, line number, severity, and the exact comment body.
|
|
143
|
+
|
|
144
|
+
**Draft (do not post yet) the PR-level summary comment** with:
|
|
145
|
+
- **PR type**: Initial PR or Rework (and if rework, the prior merged PR numbers and the rework feedback addressed)
|
|
146
|
+
- **Build / Test / Lint**: pass/fail from Step 4
|
|
147
|
+
- Overall assessment (ready to merge / needs changes)
|
|
148
|
+
- Count of issues by severity (critical / warning / suggestion)
|
|
149
|
+
- **Acceptance criteria checklist** — each item marked `met (this PR)` / `met (prior PR #N)` / `partial` / `not met` / `not applicable`, with the evidence or gap from Step 5
|
|
150
|
+
- **Regression assessment** — from Step 6 (impacted areas + result)
|
|
151
|
+
- **Out-of-scope changes** — what was found and how it was dispositioned in Step 7
|
|
152
|
+
- **Rework feedback checklist** (rework PRs only) — each item addressed / not addressed
|
|
153
|
+
- Test coverage assessment
|
|
154
|
+
|
|
155
|
+
## Step 10: Preview Everything and Wait for Approval
|
|
156
|
+
|
|
157
|
+
**Preview every comment to me and wait for approval before posting anything to the PR.** Show:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Deep review drafted — nothing has been posted to PR #{id} yet.
|
|
161
|
+
|
|
162
|
+
## Inline comments ({count})
|
|
163
|
+
1. {file}:{line} [{severity}] — {comment body}
|
|
164
|
+
2. ...
|
|
165
|
+
|
|
166
|
+
## PR summary comment
|
|
167
|
+
{full summary body as it will appear on the PR}
|
|
168
|
+
|
|
169
|
+
Reply with one of:
|
|
170
|
+
- "approve" → post all inline comments and the summary exactly as shown above
|
|
171
|
+
- "skip" → post nothing
|
|
172
|
+
- "edit <number>: <new text>" or "skip <numbers>" → revise/drop specific items, then I'll re-preview before posting
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Wait for my response. Never post any comment to the PR until I reply "approve".** If I edit or skip individual items, apply the changes and re-preview the full set before asking again. "skip" with no numbers means post nothing at all — move directly to Step 11 without posting.
|
|
176
|
+
|
|
177
|
+
## Step 11: Post and Vote
|
|
178
|
+
|
|
179
|
+
If I approved, post the inline comments and the summary to the PR. If I skipped, post nothing. Either way, then ask me:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
{Comments posted to PR #{id}. | No comments posted (skipped).}
|
|
183
|
+
- PR type: {Initial | Rework of prior PR(s) #N, #M}
|
|
184
|
+
- Build/Test/Lint: {pass | fail — detail}
|
|
185
|
+
- X critical issues
|
|
186
|
+
- Y warnings
|
|
187
|
+
- Z suggestions
|
|
188
|
+
- Acceptance criteria: A met this PR, B met in prior PRs, C partial, D not met
|
|
189
|
+
- Regressions: {none | detail}
|
|
190
|
+
- Out-of-scope changes: {none | E accepted, F flagged}
|
|
191
|
+
- Rework feedback (if rework): G/H addressed
|
|
192
|
+
|
|
193
|
+
Approve, Request Changes, or skip the vote?
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Wait for my response before submitting any vote on the PR. Then restore the user's original branch if you switched away from it in Step 2 (tell them before doing so).
|