@chris1807/claude-kit 2.1.57 → 2.1.59

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
@@ -17,7 +17,7 @@ The slash commands assume Azure DevOps as the system of record:
17
17
  - **Releases & deployments** — tracked as Azure DevOps iterations (`Release #N`) and tags; CD runs on Azure Pipelines
18
18
  - **Wiki, test plans, advanced security alerts** — all surfaced through the same Azure DevOps MCP server
19
19
 
20
- > **Not using Azure DevOps?** The Claude Code primitives (agents, hooks, memory) are still useful, but the slash commands 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.
20
+ > **Not using Azure DevOps?** The Claude Code primitives (agents, hooks, memory) are still useful, but the slash commands 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`, `/track`, `/rework`, and `/resolve-feedback` commands against GitHub / GitLab / Jira / etc.
21
21
 
22
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.
23
23
 
@@ -28,7 +28,7 @@ Every session Claude learns from your feedback and gets better at helping you sp
28
28
  | **Global Agents** | 10 | `~/.claude/agents/` (your machine, all projects) | backend, frontend, legacy (Lucee/CFML), mockup, reviewer, test-runner, build-validator, lint-checker, azure-ops, security-auditor |
29
29
  | **Project Agents** | 2 | `.claude/agents/` (in the project) | deployer, db-admin |
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** | 24 | `.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`, `/plan-backlog`, `/plan-sprint`, `/quote-backlog`, `/cleanup-branches`, `/close-orphan-tasks`, `/quote`, `/explain`, `/create-work-item`, `/edit-work-item` |
31
+ | **Slash Commands** | 24 | `.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`, `/track`, `/plan-backlog`, `/plan-sprint`, `/quote-backlog`, `/cleanup-branches`, `/close-orphan-tasks`, `/quote`, `/explain`, `/create-work-item`, `/edit-work-item` |
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 |
@@ -73,7 +73,7 @@ You'll be asked:
73
73
  2. **Components** — checkboxes to pick which parts to install:
74
74
  - ☑ Project Agents (deployer, db-admin)
75
75
  - ☑ Hooks (secret blocker, auto-format, etc.)
76
- - ☑ Slash Commands (/implement, /review, /resolve-feedback, /deploy, /create-release, /deploy-release, /add-to-release, /cherry-pick, /promote, /rollback, /status, /cleanup-branches, /quote, /explain)
76
+ - ☑ Slash Commands (/implement, /review, /resolve-feedback, /deploy, /create-release, /deploy-release, /add-to-release, /cherry-pick, /promote, /rollback, /track, /cleanup-branches, /quote, /explain)
77
77
  - ☑ MCP Servers
78
78
  - ☑ Settings
79
79
  - ☑ CLAUDE.md Workflow
@@ -214,7 +214,7 @@ your-project/ ← Project-specific
214
214
  │ │ ├── promote.md # /promote main dev
215
215
  │ │ ├── rollback.md # /rollback AB#1234 prod
216
216
  │ │ ├── add-to-release.md # /add-to-release 24 AB#4599
217
- │ │ ├── status.md # /status release 24
217
+ │ │ ├── track.md # /track release 24
218
218
  │ │ ├── cleanup-branches.md # /cleanup-branches
219
219
  │ │ ├── close-orphan-tasks.md # /close-orphan-tasks
220
220
  │ │ ├── quote.md # /quote AB#1234
@@ -261,7 +261,7 @@ Kit operations that benefit from ultracode when it's on:
261
261
  | Multi-file or cross-layer review | one agent per file/dimension, then adversarial verify before reporting |
262
262
  | Repo-wide sweeps (rename, dependency bump, pattern migration) | one agent per site, worktree-isolated |
263
263
 
264
- Short, single-query operations (`/status`, `/explain`, `/close-orphan-tasks`) don't need ultracode — they're already one pass and gain nothing from fan-out. Reach for it when the work-list is large and the per-item work is independent.
264
+ Short, single-query operations (`/track`, `/explain`, `/close-orphan-tasks`) don't need ultracode — they're already one pass and gain nothing from fan-out. Reach for it when the work-list is large and the per-item work is independent.
265
265
 
266
266
  ### Implement a Work Item
267
267
 
@@ -331,7 +331,8 @@ Claude automatically:
331
331
  3. Creates a PR targeting the `staging` branch — merging it triggers the Staging pipeline
332
332
  4. Links all work items to the PR
333
333
  5. Asks who verifies each product group on Staging (`COM`, `PAY`, …) — candidates are the non-developer names already on those work items
334
- 6. Watches the PR and the Staging pipeline; once it's green, moves the work items to `Staging` and assigns them to the approved verifiers
334
+ 6. Waits for Serena (the AI reviewer) to approve the PR, then completes it — for `dev`, `test`, and `staging` only; a `prod` PR you merge yourself
335
+ 7. Watches the Staging pipeline; once it's green, moves the work items to `Staging` and assigns them to the approved verifiers
335
336
 
336
337
  The same command walks a release through `test` → `staging` → `prod`; with no environment given it picks the next one.
337
338
 
@@ -341,7 +342,7 @@ The same command walks a release through `test` → `staging` → `prod`; with n
341
342
  /cherry-pick AB#1234 AB#1235 prod
342
343
  ```
343
344
 
344
- Cherry-picks specific work items to an environment without a formal release. Same gate check, same verifier question, and the same automatic state advance + assignment once the pipeline is green as `/deploy-release`. `main` is also a valid target — that's how a hot fix that went straight to `prod` is brought back into the compare branch.
345
+ Cherry-picks specific work items to an environment without a formal release. Same gate check, same verifier question, and the same automatic state advance + assignment once the pipeline is green as `/deploy-release`. Targeting `dev`, `test`, or `staging` it also merges the PR itself once Serena approves it; a `prod` PR waits for a person. `main` is also a valid target — that's how a hot fix that went straight to `prod` is brought back into the compare branch.
345
346
 
346
347
  ### Promote an Environment
347
348
 
@@ -351,7 +352,7 @@ Cherry-picks specific work items to an environment without a formal release. Sam
351
352
  /promote ← auto-detects from the current branch
352
353
  ```
353
354
 
354
- Creates a PR to promote all code from one branch to the next in the chain (`main → dev → test → staging → prod`). Shows every commit and work item before confirming, gate-checks the work items, asks who verifies each product group, and advances and assigns them once the merge's pipeline is green. `main → dev` is the usual first hop after feature PRs merge — nothing has deployed before that.
355
+ Creates a PR to promote all code from one branch to the next in the chain (`main → dev → test → staging → prod`). Shows every commit and work item before confirming, gate-checks the work items, asks who verifies each product group, and advances and assigns them once the merge's pipeline is green. Below production it also **merges the PR for you**: it polls until Serena (the AI reviewer) approves, then completes it with autocomplete — a PR into `prod` is always merged by a person. `main → dev` is the usual first hop after feature PRs merge — nothing has deployed before that.
355
356
 
356
357
  ### Rollback a Deployment
357
358
 
@@ -373,11 +374,11 @@ Adds work items to an existing release — assigns them to the iteration and tag
373
374
  ### Check Status
374
375
 
375
376
  ```
376
- /status release 24
377
- /status pipeline
378
- /status AB#4521
379
- /status staging
380
- /status
377
+ /track release 24
378
+ /track pipeline
379
+ /track AB#4521
380
+ /track staging
381
+ /track
381
382
  ```
382
383
 
383
384
  Shows the status of a release, pipeline, work item, environment, or a high-level overview of everything.
@@ -441,7 +442,7 @@ Every environment has a work item state, and the promotion commands keep them in
441
442
  | `test → staging` | `Ready for Staging` (QA sign-off) | `Staging` |
442
443
  | `staging → prod` | `Ready to Deploy` (stakeholder sign-off) | `Deployed` |
443
444
 
444
- `/deploy-release`, `/cherry-pick`, and `/promote` check the gate before creating the PR, ask who verifies each product group while the PR is in review, then watch the PR and the environment's CD pipeline — on a green pipeline they set the state and the assignee together. A failed pipeline changes nothing. `/status` flags anything whose state lags the branch it's on.
445
+ `/deploy-release`, `/cherry-pick`, and `/promote` check the gate before creating the PR, ask who verifies each product group while the PR is in review, then watch the PR and the environment's CD pipeline — on a green pipeline they set the state and the assignee together. A failed pipeline changes nothing. `/track` flags anything whose state lags the branch it's on.
445
446
 
446
447
  ### Branch Naming
447
448
 
@@ -509,7 +510,7 @@ The PR merges into `main`. **That merge deploys nothing** — `main` is the comp
509
510
  /promote main dev
510
511
  ```
511
512
 
512
- Merge that PR. Claude asks who verifies each product group on Dev, watches the Dev pipeline, and once it's green moves the work items to `Ready for Testing` and assigns them to those people.
513
+ Claude asks who verifies each product group on Dev, waits for Serena to approve the PR and merges it, watches the Dev pipeline, and once it's green moves the work items to `Ready for Testing` and assigns them to those people. (Dev, Test, and Staging merge themselves this way; a production PR you merge yourself.)
513
514
 
514
515
  ### Step 2: Deploy Changes (Quick Commits)
515
516
 
@@ -569,7 +570,7 @@ When stakeholders have verified on Staging and set the items to `Ready to Deploy
569
570
  /deploy-release 23 prod
570
571
  ```
571
572
 
572
- Same process — gate `Ready to Deploy`, cherry-picks from `staging` into a PR targeting `prod`. After merge the Production CD pipeline triggers; when it comes back green the items move to `Deployed` and are assigned to whoever you named for each product group.
573
+ Same process — gate `Ready to Deploy`, cherry-picks from `staging` into a PR targeting `prod`. **You merge this one** — Claude auto-merges only into `dev`, `test`, and `staging`. After merge the Production CD pipeline triggers; when it comes back green the items move to `Deployed` and are assigned to whoever you named for each product group.
573
574
 
574
575
  ### Selective Deployment
575
576
 
@@ -679,7 +680,7 @@ Claude reviews for:
679
680
  | `/cherry-pick` | `/cherry-pick AB#1234 AB#1235 prod` | Gate-check → cherry-pick specific work items to environment via PR → ask who verifies → advance + assign on a green pipeline |
680
681
  | `/promote` | `/promote main dev` | PR to promote all code to the next branch in the chain (`main → dev → test → staging → prod`) → ask who verifies → advance + assign on a green pipeline |
681
682
  | `/rollback` | `/rollback AB#1234 prod` | Revert specific commits on an environment via PR |
682
- | `/status` | `/status release 24` | Check status of a release, pipeline, work item, or environment; flags work items whose state lags their environment |
683
+ | `/track` | `/track release 24` | Check status of a release, pipeline, work item, or environment; flags work items whose state lags their environment |
683
684
  | `/qa` | `/qa AB#1234 [env]` | Verify the item is fully deployed with a green pipeline → open the app in a real browser → sign in as a test account → full regression of the screens the story touched → pass/fail comment on the work item (never a state change). Environments: `local`, `dev`, `test`, `staging` |
684
685
  | `/plan-backlog` | `/plan-backlog [project]` | Sweep backlog for Dev Ready stories with points and no tasks → propose one child task with hours per story |
685
686
  | `/plan-sprint` | `/plan-sprint [project]` | Sweep the current sprint for stories/bugs with no child tasks → propose one child task with hours per item |
package/bin/cli.js CHANGED
@@ -231,10 +231,14 @@ function splitWorkflowSection(existing) {
231
231
 
232
232
  const RETIRED_GLOBAL_AGENTS = ['manager.md', 'uat-generator.md', 'api-tester.md'];
233
233
  const RETIRED_PROJECT_AGENTS = ['devops-tracker.md'];
234
+ // status.md was renamed to track.md in 2.1.58 — Claude Code ships a built-in /status,
235
+ // which shadowed the kit's command. The old file has to be deleted from existing
236
+ // installs or the collision never goes away, since installs only ever add files.
237
+ const RETIRED_COMMANDS = ['status.md'];
234
238
 
235
- async function removeRetiredAgents(agentsDir, retired) {
239
+ async function removeRetiredFiles(dir, retired) {
236
240
  for (const file of retired) {
237
- const target = join(agentsDir, file);
241
+ const target = join(dir, file);
238
242
  if (await fs.pathExists(target)) {
239
243
  await fs.remove(target);
240
244
  console.log(chalk.gray(` - ${file} (retired, removed)`));
@@ -258,7 +262,7 @@ async function installGlobalAgents() {
258
262
  );
259
263
  }
260
264
  }
261
- await removeRetiredAgents(globalAgentsDir, RETIRED_GLOBAL_AGENTS);
265
+ await removeRetiredFiles(globalAgentsDir, RETIRED_GLOBAL_AGENTS);
262
266
  }
263
267
 
264
268
  // ============================================================================
@@ -308,7 +312,7 @@ async function main() {
308
312
  choices: [
309
313
  { name: 'Project Agents (deployer, db-admin)', value: 'agents', checked: true },
310
314
  { name: 'Hooks (secret blocker, auto-format, test suggestions)', value: 'hooks', checked: true },
311
- { name: 'Slash Commands (implement, review, deploy, releases, cherry-pick, promote, rollback, status, cleanup, create-work-item, …)', value: 'commands', checked: true },
315
+ { name: 'Slash Commands (implement, review, deploy, releases, cherry-pick, promote, rollback, track, cleanup, create-work-item, …)', value: 'commands', checked: true },
312
316
  { name: 'MCP Servers (Playwright, DB, Teams, Stripe, Azure, Azure DevOps)', value: 'mcp', checked: true },
313
317
  { name: 'Settings (hook registration)', value: 'settings', checked: true },
314
318
  { name: 'CLAUDE.md Workflow Section', value: 'workflow', checked: true },
@@ -333,7 +337,7 @@ async function main() {
333
337
  );
334
338
  }
335
339
  }
336
- await removeRetiredAgents(agentsDir, RETIRED_PROJECT_AGENTS);
340
+ await removeRetiredFiles(agentsDir, RETIRED_PROJECT_AGENTS);
337
341
  }
338
342
 
339
343
  // ── Hooks ─────────────────────────────────────────────────────────────
@@ -369,6 +373,7 @@ async function main() {
369
373
  );
370
374
  }
371
375
  }
376
+ await removeRetiredFiles(cmdsDir, RETIRED_COMMANDS);
372
377
  }
373
378
 
374
379
  // ── MCP Servers (interactive selection) ───────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chris1807/claude-kit",
3
- "version": "2.1.57",
3
+ "version": "2.1.59",
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": {
@@ -162,9 +162,19 @@ Approve? (yes / change)
162
162
 
163
163
  `change` re-asks 6c. Only after `yes` do you move on — if the PR merges before the user answers, keep waiting for the answer, then run Step 8.
164
164
 
165
- ## Step 7: Watch the Merge, Then the Pipeline
165
+ ## Step 7: Get the PR Merged, Then Watch the Pipeline
166
166
 
167
- Do NOT merge the PR yourself — a reviewer approves and completes it. Report the PR, then watch for the deployment:
167
+ ### 7a. Who completes the PR depends on the target
168
+
169
+ | Target | Who merges |
170
+ |---|---|
171
+ | `dev`, `test`, `staging` | **You do** — poll until Serena approves, then complete the PR (7b–7c) |
172
+ | `prod` | A human. **Never auto-merge into production.** |
173
+ | `main` | A human. No pipeline and no state change either — report the PR and stop. |
174
+
175
+ Resolve the target through the Pipeline Configuration table, not by the spelling of the branch — a project whose staging branch is named `Staging` or `release/staging` is still staging, and a project with no `test` row simply has no test hop.
176
+
177
+ Report the PR either way:
168
178
 
169
179
  ```
170
180
  Cherry-pick PR created for {environment}.
@@ -174,13 +184,88 @@ Work items:
174
184
  - AB#1234: COM - Add payment export
175
185
  - AB#1240: PAY - Fix login redirect
176
186
 
177
- Merging the PR triggers the CD pipeline for {environment}. I'm watching the PR
178
- and that pipeline — when it comes back green I'll set these {count} items to
179
- `{state after merge}` and assign them as approved above. Nothing is written
180
- until then. Say `stop watching` to leave the states alone.
187
+ {merge line}
181
188
  ```
182
189
 
183
- 1. **Wait for the PR to complete.** Poll `repo_pull_request` until `status` is `completed`; note the merge commit and completion time. `abandoned` → stop, change nothing, report it.
190
+ `{merge line}` for `dev` / `test` / `staging`:
191
+
192
+ ```
193
+ Waiting on Serena's review. When she approves I'll complete the PR, which
194
+ triggers the {environment} CD pipeline; when that comes back green I'll set
195
+ these {count} items to `{state after merge}` and assign them as approved
196
+ above. Say `don't merge` to stop before the merge, or `stop watching` to
197
+ leave the work item states alone.
198
+ ```
199
+
200
+ `{merge line}` for `prod` / `main`:
201
+
202
+ ```
203
+ A reviewer approves and completes this one — I don't merge into {environment}.
204
+ I'm watching the PR and that pipeline: when it comes back green I'll set these
205
+ {count} items to `{state after merge}` and assign them as approved above.
206
+ Nothing is written until then. Say `stop watching` to leave the states alone.
207
+ ```
208
+
209
+ ### 7b. Wait for Serena's approval (`dev` / `test` / `staging` only)
210
+
211
+ Serena is the AI reviewer on this org's pull requests. Find her among the PR's reviewers by matching `serena` case-insensitively against `displayName` / `uniqueName` — never hardcode an identity id, and never count another reviewer's approval as hers.
212
+
213
+ Reviewer votes: `10` approved · `5` approved with suggestions · `0` no vote yet · `-5` waiting for author · `-10` rejected.
214
+
215
+ - `10` or `5` → approved. Go to 7c.
216
+ - `-5` or `-10` → **do not merge.** List her threads (`repo_pull_request_thread` `action: list`), report what she flagged, and stop. `/resolve-feedback {pr-id}` addresses them; her vote is re-evaluated after the next push.
217
+ - `0`, or she is not on the reviewer list yet → keep polling.
218
+
219
+ **Never cast a vote on the PR yourself** to satisfy an approval policy, and never add yourself as a reviewer to do it.
220
+
221
+ Poll in the background — never a foreground `sleep`:
222
+
223
+ ```bash
224
+ ORG=<org-url>; PR=<pr-id>; TRIES=0
225
+ while [ $TRIES -lt 120 ]; do
226
+ VOTE=$(az repos pr show --id "$PR" --org "$ORG" \
227
+ --query "reviewers[].[displayName,vote]" -o tsv \
228
+ | grep -i serena | cut -f2 | head -1)
229
+ case "$VOTE" in
230
+ 10|5) echo "APPROVED vote=$VOTE"; break ;;
231
+ -5|-10) echo "BLOCKED vote=$VOTE"; break ;;
232
+ *) TRIES=$((TRIES + 1)); sleep 30 ;;
233
+ esac
234
+ done
235
+ [ $TRIES -ge 120 ] && echo "TIMEOUT - no Serena vote after 60 minutes"
236
+ ```
237
+
238
+ Run it with `Monitor` (or Bash `run_in_background`). An empty `VOTE` means she isn't a reviewer yet, which is why the loop keeps going rather than treating it as a decision. Without the Azure CLI, poll `repo_pull_request` `action: get` on the same ~30-second cadence and read `reviewers[]`.
239
+
240
+ If the loop times out, leave the PR open and ask whether to keep waiting or merge without her. **If she was never added as a reviewer at all, say exactly that** — it usually means the PR was never picked up for review, not that it sailed through.
241
+
242
+ ### 7c. Complete the PR
243
+
244
+ Merge with `repo_pull_request_write` `action: update`:
245
+
246
+ | Field | Value | Why |
247
+ |---|---|---|
248
+ | `autoComplete` | `true` | ADO completes it the moment the remaining branch policies pass — a required build still gates the merge |
249
+ | `mergeStrategy` | `NoFastForward` | one merge commit, cherry-pick history intact |
250
+ | `transitionWorkItems` | `false` | **required.** This command owns the work item states (Step 8); ADO's own transition moves parents too |
251
+ | `deleteSourceBranch` | `true` | the `cherry-pick/...` branch is disposable |
252
+ | `bypassPolicy` | **never set it** | a policy that isn't passing is a stop, not an obstacle |
253
+
254
+ Then poll `repo_pull_request` `action: get` until `status` is `completed`. If it stays `Active` with autocomplete queued, a branch policy is unmet — report which one and stop; do not bypass it and do not push to the source branch to force it.
255
+
256
+ CLI fallback if the MCP update fails:
257
+
258
+ ```bash
259
+ az repos pr update --id <pr-id> --org <org-url> \
260
+ --auto-complete true --transition-work-items false --delete-source-branch true \
261
+ --merge-commit-message "Cherry-pick AB#1234, AB#1240 -> {Environment}"
262
+ ```
263
+
264
+ If the user said `don't merge`, leave the PR open, say so, and skip to 7d — a human merging it later still gets the pipeline watch and the state changes.
265
+
266
+ ### 7d. Watch the CD pipeline
267
+
268
+ 1. **Confirm the PR completed.** Poll `repo_pull_request` until `status` is `completed`; note the merge commit and completion time. `abandoned` → stop, change nothing, report it.
184
269
  2. **Find the CD run.** Look up the target branch's pipeline ID(s) in the Pipeline Configuration table, then poll `pipelines_build` for runs on `refs/heads/<target-branch>` queued at or after the merge time — match the merge commit when the run exposes it — and **capture each run's id**. A run that was already completed before the merge is not this deployment; ignore it. A branch with more than one pipeline (API + Client) must have **all** of them green.
185
270
  3. **Wait for a terminal result** on each run: `succeeded`, `partiallySucceeded`, `failed`, or `canceled`.
186
271
 
@@ -233,4 +318,4 @@ Cherry-pick is deployed to {environment} (pipeline {build-number}, succeeded).
233
318
  Next: {the human step — "QA tests on Test and sets Ready for Staging" / "stakeholders verify on Staging and set Ready to Deploy" / "verify in production, then Close"}.
234
319
  ```
235
320
 
236
- If the user said `stop watching`, or an update fails, leave the rest alone, say exactly which items were and were not updated, and note that `/status` will flag the lag later.
321
+ If the user said `stop watching`, or an update fails, leave the rest alone, say exactly which items were and were not updated, and note that `/track` will flag the lag later.
@@ -217,9 +217,20 @@ Approve? (yes / change)
217
217
 
218
218
  `change` re-asks 8c. Only after `yes` do you move on — if the PR merges before the user answers, keep waiting for the answer, then run Step 10.
219
219
 
220
- ## Step 9: Watch the Merge, Then the Pipeline
220
+ ## Step 9: Get the PR Merged, Then Watch the Pipeline
221
221
 
222
- Do NOT merge the PR yourself, and do NOT trigger the CD pipeline — it triggers on the merge. Report the PR, then watch for the deployment:
222
+ Never trigger the CD pipeline by hand — it triggers on the merge.
223
+
224
+ ### 9a. Who completes the PR depends on the target
225
+
226
+ | Target | Who merges |
227
+ |---|---|
228
+ | `dev`, `test`, `staging` | **You do** — poll until Serena approves, then complete the PR (9b–9c) |
229
+ | `prod` | A human. **Never auto-merge into production.** |
230
+
231
+ Resolve the target through the Pipeline Configuration table, not by the spelling of the branch — a project whose staging branch is named `Staging` or `release/staging` is still staging, and a project with no `test` row simply has no test hop.
232
+
233
+ Report the PR either way:
223
234
 
224
235
  ```
225
236
  Release #{N} PR created for {environment}.
@@ -232,13 +243,89 @@ Work items included:
232
243
  - AB#1236: COM - View history
233
244
  - AB#1240: PAY - Fix login redirect
234
245
 
235
- Review and approve the PR — merging it triggers the CD pipeline for {environment}.
236
- I'm watching the PR and that pipeline; when it comes back green I'll set these
246
+ {merge line}
247
+ ```
248
+
249
+ `{merge line}` for `dev` / `test` / `staging`:
250
+
251
+ ```
252
+ Waiting on Serena's review. When she approves I'll complete the PR, which
253
+ triggers the {environment} CD pipeline; when that comes back green I'll set
254
+ these {count} items to `{state after merge}` and assign them as approved
255
+ above. Say `don't merge` to stop before the merge, or `stop watching` to
256
+ leave the work item states alone.
257
+ ```
258
+
259
+ `{merge line}` for `prod`:
260
+
261
+ ```
262
+ Review and approve the PR — a person merges this one; I don't merge into
263
+ production. Merging it triggers the CD pipeline for {environment}. I'm
264
+ watching the PR and that pipeline; when it comes back green I'll set these
237
265
  {count} items to `{state after merge}` and assign them as approved above.
238
266
  Nothing is written until then. Say `stop watching` to leave the states alone.
239
267
  ```
240
268
 
241
- 1. **Wait for the PR to complete.** Poll `repo_pull_request` until `status` is `completed`; note the merge commit and completion time. `abandoned` → stop, change nothing, report it.
269
+ ### 9b. Wait for Serena's approval (`dev` / `test` / `staging` only)
270
+
271
+ Serena is the AI reviewer on this org's pull requests. Find her among the PR's reviewers by matching `serena` case-insensitively against `displayName` / `uniqueName` — never hardcode an identity id, and never count another reviewer's approval as hers.
272
+
273
+ Reviewer votes: `10` approved · `5` approved with suggestions · `0` no vote yet · `-5` waiting for author · `-10` rejected.
274
+
275
+ - `10` or `5` → approved. Go to 9c.
276
+ - `-5` or `-10` → **do not merge.** List her threads (`repo_pull_request_thread` `action: list`), report what she flagged, and stop. A release branch is a cherry-pick of commits that already merged upstream, so the fix usually belongs on the source branch and comes forward in the next release — not as a patch commit on `release/{N}-to-{environment}`.
277
+ - `0`, or she is not on the reviewer list yet → keep polling.
278
+
279
+ **Never cast a vote on the PR yourself** to satisfy an approval policy, and never add yourself as a reviewer to do it.
280
+
281
+ Poll in the background — never a foreground `sleep`:
282
+
283
+ ```bash
284
+ ORG=<org-url>; PR=<pr-id>; TRIES=0
285
+ while [ $TRIES -lt 120 ]; do
286
+ VOTE=$(az repos pr show --id "$PR" --org "$ORG" \
287
+ --query "reviewers[].[displayName,vote]" -o tsv \
288
+ | grep -i serena | cut -f2 | head -1)
289
+ case "$VOTE" in
290
+ 10|5) echo "APPROVED vote=$VOTE"; break ;;
291
+ -5|-10) echo "BLOCKED vote=$VOTE"; break ;;
292
+ *) TRIES=$((TRIES + 1)); sleep 30 ;;
293
+ esac
294
+ done
295
+ [ $TRIES -ge 120 ] && echo "TIMEOUT - no Serena vote after 60 minutes"
296
+ ```
297
+
298
+ Run it with `Monitor` (or Bash `run_in_background`). An empty `VOTE` means she isn't a reviewer yet, which is why the loop keeps going rather than treating it as a decision. Without the Azure CLI, poll `repo_pull_request` `action: get` on the same ~30-second cadence and read `reviewers[]`.
299
+
300
+ If the loop times out, leave the PR open and ask whether to keep waiting or merge without her. **If she was never added as a reviewer at all, say exactly that** — it usually means the PR was never picked up for review, not that it sailed through.
301
+
302
+ ### 9c. Complete the PR
303
+
304
+ Merge with `repo_pull_request_write` `action: update`:
305
+
306
+ | Field | Value | Why |
307
+ |---|---|---|
308
+ | `autoComplete` | `true` | ADO completes it the moment the remaining branch policies pass — a required build still gates the merge |
309
+ | `mergeStrategy` | `NoFastForward` | one merge commit, cherry-pick history intact |
310
+ | `transitionWorkItems` | `false` | **required.** This command owns the work item states (Step 10); ADO's own transition moves parents too |
311
+ | `deleteSourceBranch` | `true` | the `release/{N}-to-{environment}` branch is disposable — the release itself lives in the iteration and the `release-{N}` tags |
312
+ | `bypassPolicy` | **never set it** | a policy that isn't passing is a stop, not an obstacle |
313
+
314
+ Then poll `repo_pull_request` `action: get` until `status` is `completed`. If it stays `Active` with autocomplete queued, a branch policy is unmet — report which one and stop; do not bypass it and do not push to the source branch to force it.
315
+
316
+ CLI fallback if the MCP update fails:
317
+
318
+ ```bash
319
+ az repos pr update --id <pr-id> --org <org-url> \
320
+ --auto-complete true --transition-work-items false --delete-source-branch true \
321
+ --merge-commit-message "Release #{N} -> {Environment}"
322
+ ```
323
+
324
+ If the user said `don't merge`, leave the PR open, say so, and skip to 9d — a human merging it later still gets the pipeline watch and the state changes.
325
+
326
+ ### 9d. Watch the CD pipeline
327
+
328
+ 1. **Confirm the PR completed.** Poll `repo_pull_request` until `status` is `completed`; note the merge commit and completion time. `abandoned` → stop, change nothing, report it.
242
329
  2. **Find the CD run.** Look up the target branch's pipeline ID(s) in the Pipeline Configuration table, then poll `pipelines_build` for runs on `refs/heads/<target-branch>` queued at or after the merge time — match the merge commit when the run exposes it — and **capture each run's id**. A run that was already completed before the merge is not this deployment; ignore it. A branch with more than one pipeline (API + Client) must have **all** of them green.
243
330
  3. **Wait for a terminal result** on each run: `succeeded`, `partiallySucceeded`, `failed`, or `canceled`.
244
331
 
@@ -292,7 +379,7 @@ Release #{N} is on {environment} (pipeline {build-number}, succeeded).
292
379
  Next: {the human step — "QA tests on Test and sets Ready for Staging" / "stakeholders verify on Staging and set Ready to Deploy" / "verify in production, then Close"}.
293
380
  ```
294
381
 
295
- If the user said `stop watching`, or an update fails, leave the rest alone, say exactly which items were and were not updated, and note that `/status release {N}` will flag the lag later.
382
+ If the user said `stop watching`, or an update fails, leave the rest alone, say exactly which items were and were not updated, and note that `/track release {N}` will flag the lag later.
296
383
 
297
384
  ## Step 11: Notify Team (if Teams MCP is configured)
298
385
 
@@ -159,9 +159,18 @@ Approve? (yes / change)
159
159
 
160
160
  `change` re-asks 5c. Only after `yes` do you move on — if the PR merges before the user answers, keep waiting for the answer, then run Step 7.
161
161
 
162
- ## Step 6: Watch the Merge, Then the Pipeline
162
+ ## Step 6: Get the PR Merged, Then Watch the Pipeline
163
163
 
164
- Do NOT merge the PR yourself — a reviewer approves and completes it. Report the PR, then watch for the deployment:
164
+ ### 6a. Who completes the PR depends on the target
165
+
166
+ | Target | Who merges |
167
+ |---|---|
168
+ | `dev`, `test`, `staging` | **You do** — poll until Serena approves, then complete the PR (6b–6c) |
169
+ | `prod` | A human. **Never auto-merge into production.** |
170
+
171
+ Resolve the target through the Pipeline Configuration table, not by the spelling of the branch — a project whose staging branch is named `Staging` or `release/staging` is still staging, and a project with no `test` row simply has no test hop.
172
+
173
+ Report the PR either way:
165
174
 
166
175
  ```
167
176
  Promotion PR created: {source} → {target}
@@ -169,13 +178,88 @@ Promotion PR created: {source} → {target}
169
178
  PR: {pr-url}
170
179
 
171
180
  {count} commits, {n} work items included.
172
- Merging the PR triggers the CD pipeline for {target}. I'm watching the PR and
173
- that pipeline — when it comes back green I'll set the {n} work items to
174
- `{state after merge}` and assign them as approved above. Nothing is written
175
- until then. Say `stop watching` to leave the states alone.
181
+ {merge line}
182
+ ```
183
+
184
+ `{merge line}` for `dev` / `test` / `staging`:
185
+
186
+ ```
187
+ Waiting on Serena's review. When she approves I'll complete the PR, which
188
+ triggers the {target} CD pipeline; when that comes back green I'll set the
189
+ {n} work items to `{state after merge}` and assign them as approved above.
190
+ Say `don't merge` to stop before the merge, or `stop watching` to leave the
191
+ work item states alone.
192
+ ```
193
+
194
+ `{merge line}` for `prod`:
195
+
196
+ ```
197
+ A reviewer approves and completes this one — I don't merge into production.
198
+ I'm watching the PR and that pipeline: when it comes back green I'll set the
199
+ {n} work items to `{state after merge}` and assign them as approved above.
200
+ Nothing is written until then. Say `stop watching` to leave the states alone.
201
+ ```
202
+
203
+ ### 6b. Wait for Serena's approval (`dev` / `test` / `staging` only)
204
+
205
+ Serena is the AI reviewer on this org's pull requests. Find her among the PR's reviewers by matching `serena` case-insensitively against `displayName` / `uniqueName` — never hardcode an identity id, and never count another reviewer's approval as hers.
206
+
207
+ Reviewer votes: `10` approved · `5` approved with suggestions · `0` no vote yet · `-5` waiting for author · `-10` rejected.
208
+
209
+ - `10` or `5` → approved. Go to 6c.
210
+ - `-5` or `-10` → **do not merge.** List her threads (`repo_pull_request_thread` `action: list`), report what she flagged, and stop. On a promotion the fix belongs on the source branch, not on the PR — a promotion PR has no branch of its own to push to.
211
+ - `0`, or she is not on the reviewer list yet → keep polling.
212
+
213
+ **Never cast a vote on the PR yourself** to satisfy an approval policy, and never add yourself as a reviewer to do it.
214
+
215
+ Poll in the background — never a foreground `sleep`:
216
+
217
+ ```bash
218
+ ORG=<org-url>; PR=<pr-id>; TRIES=0
219
+ while [ $TRIES -lt 120 ]; do
220
+ VOTE=$(az repos pr show --id "$PR" --org "$ORG" \
221
+ --query "reviewers[].[displayName,vote]" -o tsv \
222
+ | grep -i serena | cut -f2 | head -1)
223
+ case "$VOTE" in
224
+ 10|5) echo "APPROVED vote=$VOTE"; break ;;
225
+ -5|-10) echo "BLOCKED vote=$VOTE"; break ;;
226
+ *) TRIES=$((TRIES + 1)); sleep 30 ;;
227
+ esac
228
+ done
229
+ [ $TRIES -ge 120 ] && echo "TIMEOUT - no Serena vote after 60 minutes"
176
230
  ```
177
231
 
178
- 1. **Wait for the PR to complete.** Poll `repo_pull_request` until `status` is `completed`; note the merge commit and the completion time. `abandoned` → stop, change nothing, report it.
232
+ Run it with `Monitor` (or Bash `run_in_background`). An empty `VOTE` means she isn't a reviewer yet, which is why the loop keeps going rather than treating it as a decision. Without the Azure CLI, poll `repo_pull_request` `action: get` on the same ~30-second cadence and read `reviewers[]`.
233
+
234
+ If the loop times out, leave the PR open and ask whether to keep waiting or merge without her. **If she was never added as a reviewer at all, say exactly that** — it usually means the PR was never picked up for review, not that it sailed through.
235
+
236
+ ### 6c. Complete the PR
237
+
238
+ Merge with `repo_pull_request_write` `action: update`:
239
+
240
+ | Field | Value | Why |
241
+ |---|---|---|
242
+ | `autoComplete` | `true` | ADO completes it the moment the remaining branch policies pass — a required build still gates the merge |
243
+ | `mergeStrategy` | `NoFastForward` | one merge commit; never squash a promotion — it rewrites the commit ids the next hop cherry-picks by |
244
+ | `transitionWorkItems` | `false` | **required.** This command owns the work item states (Step 7); ADO's own transition moves parents too |
245
+ | `deleteSourceBranch` | **`false`** | the source is a long-lived environment branch (`main`, `dev`, `test`, `staging`) — deleting it would destroy the promotion chain |
246
+ | `bypassPolicy` | **never set it** | a policy that isn't passing is a stop, not an obstacle |
247
+
248
+ Then poll `repo_pull_request` `action: get` until `status` is `completed`. If it stays `Active` with autocomplete queued, a branch policy is unmet — report which one and stop; do not bypass it and do not push to the source branch to force it.
249
+
250
+ CLI fallback if the MCP update fails:
251
+
252
+ ```bash
253
+ az repos pr update --id <pr-id> --org <org-url> \
254
+ --auto-complete true --transition-work-items false --delete-source-branch false \
255
+ --merge-commit-message "Promote {source} -> {target}"
256
+ ```
257
+
258
+ If the user said `don't merge`, leave the PR open, say so, and skip to 6d — a human merging it later still gets the pipeline watch and the state changes.
259
+
260
+ ### 6d. Watch the CD pipeline
261
+
262
+ 1. **Confirm the PR completed.** Poll `repo_pull_request` until `status` is `completed`; note the merge commit and the completion time. `abandoned` → stop, change nothing, report it.
179
263
  2. **Find the CD run.** Look up the target branch's pipeline ID(s) in the Pipeline Configuration table, then poll `pipelines_build` for runs on `refs/heads/<target-branch>` queued at or after the merge time — match the merge commit when the run exposes it — and **capture each run's id**. A run that was already completed before the merge is not this deployment; ignore it. A branch with more than one pipeline (API + Client) must have **all** of them green.
180
264
  3. **Wait for a terminal result** on each run: `succeeded`, `partiallySucceeded`, `failed`, or `canceled`.
181
265
 
@@ -227,4 +311,4 @@ Report both fields, so a wrong assignment is easy to put back:
227
311
  Next: {the human step — "QA tests on Test and sets Ready for Staging" / "stakeholders verify on Staging and set Ready to Deploy" / "verify in production, then Close"}.
228
312
  ```
229
313
 
230
- If the user said `stop watching`, or an update fails, leave the rest alone, say exactly which items were and were not updated, and note that `/status` will flag the lag later.
314
+ If the user said `stop watching`, or an update fails, leave the rest alone, say exactly which items were and were not updated, and note that `/track` will flag the lag later.
@@ -1,4 +1,4 @@
1
- Check the status of a release, pipeline, environment, or work item. Usage: `/status <target>`
1
+ Check the status of a release, pipeline, environment, or work item. Usage: `/track <target>`
2
2
 
3
3
  Parse `$ARGUMENTS` to determine what to check:
4
4
  - **Release**: "release 24" or "r24" → show release status
@@ -23,7 +23,7 @@ Work item states track environments. Use this to spot **state lag** — an item
23
23
 
24
24
  `Ready for Staging` and `Ready to Deploy` are human sign-offs and are never "lag". Only User Stories, Bugs, and Hot Fixes are checked — Features and Tasks have no environment state.
25
25
 
26
- ## If Release (e.g., `/status release 24`):
26
+ ## If Release (e.g., `/track release 24`):
27
27
 
28
28
  Query all work items tagged `release-{N}` or in the `Release #{N}` iteration. For each, find which environment branches contain its commits (`repo_search_commits` with `includeWorkItems: true`, or `git merge-base --is-ancestor`).
29
29
 
@@ -51,7 +51,7 @@ Catch these up? (yes/no)
51
51
 
52
52
  If the user says yes, set `System.State` on each lagging item to the expected state via `wit_update_work_item` — never backward, never on a Feature or Task — and report `Was → Now`.
53
53
 
54
- ## If Pipeline (e.g., `/status pipeline` or `/status build`):
54
+ ## If Pipeline (e.g., `/track pipeline` or `/track build`):
55
55
 
56
56
  Query recent builds for each pipeline in the Pipeline Configuration table.
57
57
 
@@ -67,7 +67,7 @@ Query recent builds for each pipeline in the Pipeline Configuration table.
67
67
 
68
68
  A run on `main` would be unexpected — `main` has no pipeline. If one appears, say so.
69
69
 
70
- ## If Work Item (e.g., `/status AB#4521`):
70
+ ## If Work Item (e.g., `/track AB#4521`):
71
71
 
72
72
  Read the work item from Azure DevOps and show its full status, including which environment branches contain its commits.
73
73
 
@@ -102,7 +102,7 @@ State `Staging` matches the furthest environment. ✓
102
102
 
103
103
  If the state lags the furthest environment, flag it and offer to catch it up as in the release view.
104
104
 
105
- ## If Environment (e.g., `/status staging`):
105
+ ## If Environment (e.g., `/track staging`):
106
106
 
107
107
  Map the name to its branch through the Pipeline Configuration table. Show the last deployment and what's currently there.
108
108
 
@@ -123,9 +123,9 @@ Map the name to its branch through the Pipeline Configuration table. Show the la
123
123
  {count} commits on `test` are not on `staging` — run `/promote test staging` or `/deploy-release <N> staging`.
124
124
  ```
125
125
 
126
- `/status main` is allowed but reports "compare branch — nothing deploys from main" and lists what's on `main` that hasn't been promoted to `dev`.
126
+ `/track main` is allowed but reports "compare branch — nothing deploys from main" and lists what's on `main` that hasn't been promoted to `dev`.
127
127
 
128
- ## If No Argument (e.g., `/status`):
128
+ ## If No Argument (e.g., `/track`):
129
129
 
130
130
  Show a high-level overview.
131
131
 
@@ -88,6 +88,6 @@ Open PRs:
88
88
  - PR #<n> → <target branch> (<status>)
89
89
  ```
90
90
 
91
- Finally, compare the work item's state with its furthest environment (`dev` → `Ready for Testing`, `test` → `Testing`, `staging` → `Staging`, `prod` → `Deployed`). If the state lags — e.g. commits on `staging` but the item is still `Testing` — add one line: `⚠ State lags environment: Testing, expected at least Staging — /status AB#<id> can catch it up.`
91
+ Finally, compare the work item's state with its furthest environment (`dev` → `Ready for Testing`, `test` → `Testing`, `staging` → `Staging`, `prod` → `Deployed`). If the state lags — e.g. commits on `staging` but the item is still `Testing` — add one line: `⚠ State lags environment: Testing, expected at least Staging — /track AB#<id> can catch it up.`
92
92
 
93
93
  That's it — read-only. Do not modify branches, push, create PRs, or change states.
@@ -47,7 +47,7 @@ Ultracode is **opt-in**. It is on only when a system-reminder confirms it, when
47
47
  | Multi-file or cross-layer review | one agent per file/dimension, then adversarial verify before reporting |
48
48
  | Repo-wide sweeps (rename, dependency bump, pattern migration) | one agent per site, worktree-isolated |
49
49
 
50
- Short, single-query operations (`/status`, `/explain`, `/close-orphan-tasks`) do **not** need ultracode — they are already one pass and gain nothing from fan-out. Reach for `Workflow` when the work-list is large and the per-item work is independent.
50
+ Short, single-query operations (`/track`, `/explain`, `/close-orphan-tasks`) do **not** need ultracode — they are already one pass and gain nothing from fan-out. Reach for `Workflow` when the work-list is large and the per-item work is independent.
51
51
 
52
52
  **`/rework` always uses ultracode** — it does not wait to be asked. It fans out feedback gathering, codebase exploration, per-acceptance-criterion coverage checks, and the find → adversarially-verify review, while keeping every approval gate and write in the main loop.
53
53
 
@@ -102,7 +102,7 @@ Claude maintains persistent memory across sessions in `~/.claude/projects/.../me
102
102
  4. **PR merges** into `main` — the compare branch. **Nothing deploys yet.** The work item stays in `Code Review` until it is promoted
103
103
  5. **Promote or release** — `/promote main dev` carries everything on `main` to Dev; `/create-release <N>` groups work items so `/deploy-release <N> test` → `staging` → `prod` can carry just those
104
104
  6. **Say who verifies** — before the merge, the command asks who each product group (`COM`, `PAY`, …) should be assigned to in the target environment, offering the non-developer names already on those work items
105
- 7. **Merge each promotion PR** — that merge triggers the environment's CD pipeline. The command watches it and, once it's green, sets the work items to `Testing`, `Staging`, or `Deployed` **and** assigns them to the approved verifiers — automatically, no reply needed
105
+ 7. **The promotion PR merges** — for `dev`, `test`, and `staging`, the deploy commands wait for Serena to approve and then complete the PR themselves; a `prod` PR is always merged by a person. That merge triggers the environment's CD pipeline. The command watches it and, once it's green, sets the work items to `Testing`, `Staging`, or `Deployed` **and** assigns them to the approved verifiers — automatically, no reply needed
106
106
  8. **Test** using Playwright MCP for browser testing
107
107
  9. **Track** work items via the Azure DevOps MCP server
108
108
  10. **Learn** — Claude saves what worked for next time
@@ -178,7 +178,8 @@ Human-only transitions — no slash command ever makes these: `Testing → Ready
178
178
  How the commands use this table:
179
179
 
180
180
  - **Gate check before the PR.** `/deploy-release`, `/cherry-pick`, and `/promote` compare each carried work item's state against the gate for the target environment. Anything behind the gate (e.g. still `Testing` when deploying to `staging`) is flagged and the user decides whether to include it. Items *ahead* of the gate (e.g. already `Deployed` on a cherry-pick to `prod`) are reported and left alone.
181
- - **Advance on a green pipeline, automatically.** `/promote`, `/cherry-pick`, and `/deploy-release` do not stop at the PR. They poll it until it is `completed`, then poll the target branch's CD pipeline until every run finishes. Only on `succeeded` do they write the new state — for every carried User Story, Bug, and Hot Fix, never a Feature or Task, and never backward. A failed or canceled run changes **nothing** and is reported with the log link. `/status` reports items whose state lags the branch their commits are on and offers to catch them up.
181
+ - **Advance on a green pipeline, automatically.** `/promote`, `/cherry-pick`, and `/deploy-release` do not stop at the PR. They poll it until it is `completed`, then poll the target branch's CD pipeline until every run finishes. Only on `succeeded` do they write the new state — for every carried User Story, Bug, and Hot Fix, never a Feature or Task, and never backward. A failed or canceled run changes **nothing** and is reported with the log link. `/track` reports items whose state lags the branch their commits are on and offers to catch them up.
182
+ - **Auto-merge below production.** When the target is `dev`, `test`, or `staging`, all three commands poll the PR until **Serena** (the AI reviewer) votes, then complete it with autocomplete — remaining branch policies still gate the merge, work item transitions are left off so the command's own state logic owns them, and a branch policy that isn't passing is a stop, never a bypass. A rejection or *waiting for author* vote stops the merge and reports her threads. A PR into `prod` (or into `main`) is **always** merged by a person.
182
183
  - **Assign the verifier at the same time.** The state change hands the item to a person, so the same three commands ask **before the merge** who each group of items should go to, then apply the assignee alongside the state once the pipeline is green. See **Verifier Assignment** below.
183
184
  - **Never assume the state list.** Confirm with `mcp__azure-devops__wit_work_item` (`action: get_type`) on an unfamiliar project before writing a state name — a bad name is accepted silently by a query and rejected only at write time.
184
185
 
@@ -207,7 +208,7 @@ This creates a `Release #23` iteration, assigns the selected work items to it, a
207
208
  /deploy-release 23 staging
208
209
  /deploy-release 23 prod
209
210
  ```
210
- This finds all work items in Release #23, checks each one against the target environment's gate state, cherry-picks their commits into a release branch (`release/23-to-staging`), creates a PR targeting the environment branch, links all work items, asks who verifies each product group, and — once the merge's CD pipeline comes back green — advances them to the environment's state (`Testing`, `Staging`, `Deployed`) and assigns them to those verifiers.
211
+ This finds all work items in Release #23, checks each one against the target environment's gate state, cherry-picks their commits into a release branch (`release/23-to-staging`), creates a PR targeting the environment branch, links all work items, asks who verifies each product group, merges the PR once Serena approves it (`dev`/`test`/`staging` only — a `prod` PR waits for a person), and — once the merge's CD pipeline comes back green — advances them to the environment's state (`Testing`, `Staging`, `Deployed`) and assigns them to those verifiers.
211
212
 
212
213
  **Selective deployment:** Since releases are deployed via cherry-pick, you can deploy a full release or a subset. If staging has 5 user stories but only 3 are `Ready to Deploy`, create a release with just those 3 and deploy it.
213
214
 
@@ -227,7 +228,7 @@ Cherry-pick specific work items to an environment without a formal release:
227
228
  ```
228
229
  /cherry-pick AB#1234 AB#1235 prod
229
230
  ```
230
- This finds commits for the specified work items, checks them against the target's gate state, cherry-picks them into a branch (`cherry-pick/<date>-to-<environment>`), creates a PR, asks who verifies each product group, and — once the merge's CD pipeline is green — advances and assigns the work items.
231
+ This finds commits for the specified work items, checks them against the target's gate state, cherry-picks them into a branch (`cherry-pick/<date>-to-<environment>`), creates a PR, asks who verifies each product group, merges the PR once Serena approves it (`dev`/`test`/`staging` only — a `prod` PR waits for a person), and — once the merge's CD pipeline is green — advances and assigns the work items.
231
232
 
232
233
  #### Promoting Environments
233
234
 
@@ -237,7 +238,7 @@ Promote all code from one environment to the next:
237
238
  /promote staging prod
238
239
  /promote ← auto-detects source and target from current branch
239
240
  ```
240
- This creates a PR from the source branch to the target branch with a summary of all included commits and their work items, checks the work items against the target's gate state, asks who verifies each product group, and — once the merge's CD pipeline is green — advances and assigns them. `main → dev` is the usual first hop after feature PRs merge.
241
+ This creates a PR from the source branch to the target branch with a summary of all included commits and their work items, checks the work items against the target's gate state, asks who verifies each product group, merges the PR once Serena approves it (`dev`/`test`/`staging` only — a `prod` PR waits for a person), and — once the merge's CD pipeline is green — advances and assigns them. `main → dev` is the usual first hop after feature PRs merge.
241
242
 
242
243
  #### Rollbacks
243
244
 
@@ -302,12 +303,12 @@ All deployment and release operations are available as slash commands:
302
303
  | `/resolve-feedback` | `/resolve-feedback 142` | Address unresolved PR comment threads, push fixes, reply + resolve threads |
303
304
  | `/deploy` | `/deploy "commit message"` | Commit, push, trigger pipeline (only on `dev`/`test`/`staging`/`prod` — never on `main`) |
304
305
  | `/create-release` | `/create-release 23` | Group work items into Release #23 |
305
- | `/deploy-release` | `/deploy-release 23 staging` | Gate-check → cherry-pick release to environment → PR → ask who verifies → advance + assign on a green pipeline |
306
+ | `/deploy-release` | `/deploy-release 23 staging` | Gate-check → cherry-pick release to environment → PR → ask who verifies → merge on Serena's approval (below prod) → advance + assign on a green pipeline |
306
307
  | `/add-to-release` | `/add-to-release 24 AB#4599` | Add work items to existing release |
307
- | `/cherry-pick` | `/cherry-pick AB#1234 AB#1235 prod` | Gate-check → cherry-pick specific work items → PR → ask who verifies → advance + assign on a green pipeline |
308
- | `/promote` | `/promote main dev` | Promote all code between environments (`main → dev → test → staging → prod`) → ask who verifies → advance + assign on a green pipeline |
308
+ | `/cherry-pick` | `/cherry-pick AB#1234 AB#1235 prod` | Gate-check → cherry-pick specific work items → PR → ask who verifies → merge on Serena's approval (below prod) → advance + assign on a green pipeline |
309
+ | `/promote` | `/promote main dev` | Promote all code between environments (`main → dev → test → staging → prod`) → ask who verifies → merge on Serena's approval (below prod) → advance + assign on a green pipeline |
309
310
  | `/rollback` | `/rollback AB#1234 prod` | Revert commits on an environment |
310
- | `/status` | `/status release 24` | Check release, pipeline, environment, or work item status; flags work items whose state lags their environment |
311
+ | `/track` | `/track release 24` | Check release, pipeline, environment, or work item status; flags work items whose state lags their environment |
311
312
  | `/where` | `/where AB#1234` | Show which environment branches contain a work item's commits |
312
313
  | `/qa` | `/qa AB#1234 [env]` | Verify the item is fully deployed with a green pipeline → open the app in a real browser → sign in as a test account → full regression of the screens the story touched → pass/fail comment (never a state change) |
313
314
  | `/plan-backlog` | `/plan-backlog [project]` | Sweep backlog for Dev Ready stories with points and no tasks → propose child tasks with hours |
@@ -323,7 +324,7 @@ The CD pipeline is only triggered manually when pushing directly to an environme
323
324
 
324
325
  ### Pipeline Configuration
325
326
 
326
- Each project must define its compare branch, its environment chain, and its pipeline IDs so the slash commands (`/deploy`, `/promote`, `/deploy-release`, `/cherry-pick`, `/where`, `/status`) know which pipelines to trigger and what the promotion order is.
327
+ Each project must define its compare branch, its environment chain, and its pipeline IDs so the slash commands (`/deploy`, `/promote`, `/deploy-release`, `/cherry-pick`, `/where`, `/track`) know which pipelines to trigger and what the promotion order is.
327
328
 
328
329
  Add this section to your project's `CLAUDE.md`:
329
330
 
@@ -345,7 +346,7 @@ Add this section to your project's `CLAUDE.md`:
345
346
  - `/deploy` triggers the pipeline(s) listed for the current branch. If the current branch is not in this table, or its pipeline cell is `—`, no pipeline is triggered.
346
347
  - `/promote` uses this table to determine the next environment (the next row down).
347
348
  - `/deploy-release` and `/cherry-pick` create PRs targeting environment branches listed here, and use the **Work Item States ↔ Environments** table to gate-check and advance work items.
348
- - `/where` and `/status` check every row; the compare branch reports as "merged to main", not as a deployment.
349
+ - `/where` and `/track` check every row; the compare branch reports as "merged to main", not as a deployment.
349
350
 
350
351
  **Examples from actual projects:**
351
352