@chris1807/claude-kit 2.1.46 → 2.1.47

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** | 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** | 23 | `.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` |
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` |
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 |
@@ -652,6 +652,8 @@ Claude reviews for:
652
652
  | `/quote-backlog` | `/quote-backlog [project]` | Sweep backlog for Design Approved items without points → review completeness, check for duplicates, suggest rewrites, propose points + creator comments (10 at a time, approval-gated) |
653
653
  | `/quote` | `/quote AB#1234` | Estimate a work item in story points (senior-calibrated Fibonacci rubric) |
654
654
  | `/explain` | `/explain AB#1234` | Summarize and explain a work item in plain language |
655
+ | `/create-work-item` | `/create-work-item [description]` | Interactively draft and create a Feature, Bug, or User Story — proposes story points (user must agree), creates pointed items in Dev Ready; on a Feature, also drafts its child stories with `Custom.Order` waves |
656
+ | `/edit-work-item` | `/edit-work-item AB#1234 [what to change]` | Revise an existing work item field-by-field. On a Feature, cascades into its child stories — updates, adds, retires, and re-sequences `Custom.Order` waves — with a safety gate on anything already past Dev Ready |
655
657
  | `/cleanup-branches` | `/cleanup-branches` | Delete merged feature/work branches |
656
658
  | `/close-orphan-tasks` | `/close-orphan-tasks --dry-run` | Close open Tasks whose parent is Ready to Deploy / Deployed / Closed |
657
659
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chris1807/claude-kit",
3
- "version": "2.1.46",
3
+ "version": "2.1.47",
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": {
@@ -1,6 +1,6 @@
1
1
  Create a new Azure DevOps work item interactively. Usage: `/create-work-item`
2
2
 
3
- This command walks the user through creating a Bug or User Story, develops an acceptance-criteria-ready plan, optionally embeds a UI mockup in the description, and creates the item in the chosen Azure DevOps project.
3
+ This command walks the user through creating a Feature, Bug, or User Story, develops an acceptance-criteria-ready plan, optionally embeds a UI mockup in the description, and creates the item in the chosen Azure DevOps project. For a Feature it can also draft and create the child User Stories that make the Feature implementable.
4
4
 
5
5
  Treat `$ARGUMENTS` as an optional rough description that the user may have typed inline (e.g. `/create-work-item users should be able to export payments`). If provided, skip the initial "describe your requirements" prompt in Step 2 and use it as the starting requirements text — but still confirm with the user before proceeding.
6
6
 
@@ -11,20 +11,23 @@ Ask the user:
11
11
  ```
12
12
  What type of work item do you want to create?
13
13
 
14
- 1. Bug
15
- 2. User Story
14
+ 1. Bug — something deployed is behaving wrong
15
+ 2. User Story — one shippable slice of user-facing behavior
16
+ 3. Feature — a container for several related user stories
16
17
 
17
- Reply with 1, 2, "bug", or "user story".
18
+ Reply with 1, 2, 3, "bug", "user story", or "feature".
18
19
  ```
19
20
 
20
- **Wait for the user's response.** Map the answer to either `Bug` or `User Story`. If the user types something else, ask again — do not guess.
21
+ **Wait for the user's response.** Map the answer to `Bug`, `User Story`, or `Feature`. If the user types something else, ask again — do not guess.
22
+
23
+ If the requirements clearly span several independently shippable slices, say so and recommend `Feature` — but the type is still the user's call.
21
24
 
22
25
  ## Step 2: Gather Requirements
23
26
 
24
27
  Ask the user to describe the requirements:
25
28
 
26
29
  ```
27
- Describe the {bug | user story} in your own words. Include:
30
+ Describe the {feature | bug | user story} in your own words. Include:
28
31
 
29
32
  - What the user is trying to do (or what is broken)
30
33
  - Why it matters / who is affected
@@ -53,6 +56,38 @@ For each image found, plan to embed it in the final description as an `<img src=
53
56
 
54
57
  Translate the user's free-form requirements into a structured work item draft. The shape depends on the type:
55
58
 
59
+ ### For a Feature:
60
+
61
+ ```
62
+ ## Draft: {Prefix} - {proposed title}
63
+
64
+ **Type:** Feature
65
+
66
+ ### Description
67
+ {2–4 sentences describing the capability being delivered and who it serves.
68
+ A Feature is a container — describe the outcome, not the implementation.}
69
+
70
+ ### Business Value
71
+ {Why this is worth building — the problem it removes or the opportunity it opens.}
72
+
73
+ ### Scope
74
+ - {each coherent, independently shippable chunk of work — these become the
75
+ child User Stories in Step 9}
76
+ - ...
77
+
78
+ ### Out of Scope
79
+ - {anything the user mentioned that shouldn't ride along with this feature}
80
+
81
+ ### Success Criteria
82
+ 1. {observable, feature-level outcome that proves the capability landed}
83
+ 2. ...
84
+
85
+ ### Open Questions
86
+ - {anything ambiguous that you couldn't infer}
87
+ ```
88
+
89
+ A Feature carries **no story points** and **never moves to `Dev Ready`** — sizing and state live on its child stories. Step 4 is skipped for Features.
90
+
56
91
  ### For a User Story:
57
92
 
58
93
  ```
@@ -146,7 +181,9 @@ Approve this draft? (yes / suggest changes / cancel)
146
181
 
147
182
  ## Step 4: Propose Story Points
148
183
 
149
- Every work item this command creates gets a story point estimate proposed automatically, applied only with the user's agreement.
184
+ **Skip this step entirely for a Feature.** A Feature's size is the sum of its child stories — the Feature itself gets no `StoryPoints` value and stays in `New`. Its stories are pointed in Step 9. Go to Step 5.
185
+
186
+ For a **Bug** or **User Story**, every work item this command creates gets a story point estimate — proposed automatically, applied only with the user's agreement.
150
187
 
151
188
  Estimate using the same rubric as `/quote`: the **modified Fibonacci scale** (`1, 2, 3, 5, 8, 13, 21`), calibrated for a **senior developer working with Claude assistance** in a codebase they know. Don't pad for ramp-up, routine architectural decisions, or stack familiarity — only for things a senior cannot shortcut: genuinely novel work, unresolved open questions, cross-team coordination, external dependencies. If the work looks larger than 21 points, recommend splitting the item instead of proposing a number.
152
189
 
@@ -167,9 +204,9 @@ Agree? (yes / different number / skip)
167
204
 
168
205
  Points are never written without the user's explicit agreement.
169
206
 
170
- ## Step 5: Offer a Mockup (User Stories only — skip for Bugs)
207
+ ## Step 5: Offer a Mockup (User Stories and Features — skip for Bugs)
171
208
 
172
- If the work item type is **User Story** and the requirements appear to involve UI (a screen, a form, a button, a workflow), ask:
209
+ If the work item type is **User Story** or **Feature** and the requirements appear to involve UI (a screen, a form, a button, a workflow), ask:
173
210
 
174
211
  ```
175
212
  Want me to generate an HTML mockup and embed it in the description? (yes / no)
@@ -222,14 +259,17 @@ Before creating anything in Azure DevOps, present a final summary and ask for on
222
259
  ## Ready to Create
223
260
 
224
261
  **Title:** {Prefix} - {title}
225
- **Type:** {Bug | User Story}
262
+ **Type:** {Feature | Bug | User Story}
226
263
  **Project:** {project}
227
264
  {for Bugs:}
228
265
  **Priority:** {n}
229
266
  **Severity:** {n - Label}
230
267
  {end for Bugs}
231
- **Story Points:** {n (agreed) | skipped}
232
- **Initial State:** {Dev Ready (pointed) | New (no points)}
268
+ {for Features:}
269
+ **Scope items:** {count} offered as child stories after creation
270
+ {end for Features}
271
+ **Story Points:** {n (agreed) | skipped | n/a — Features aren't pointed}
272
+ **Initial State:** {Dev Ready (pointed) | New (no points) | New (Feature)}
233
273
  **Mockup:** {Embedded | Not requested | Skipped (non-UI)}
234
274
  **Images:** {count} user-supplied image(s) embedded in description
235
275
  **Open Questions:** {count}
@@ -278,12 +318,16 @@ Apply this pass to every section (Description, Acceptance Criteria, Steps to Rep
278
318
  Call `mcp__azure-devops__wit_create_work_item` with:
279
319
 
280
320
  - **project**: the chosen project
281
- - **workItemType**: `Bug` or `User Story`
321
+ - **workItemType**: `Feature`, `Bug`, or `User Story`
282
322
  - **title**: the approved title (with prefix)
283
323
  - **fields**: a JSON Patch document setting:
284
324
  - `System.Description` — the rendered HTML description (with embedded mockup `<img>` and any user-supplied images)
285
325
  - `Microsoft.VSTS.Common.AcceptanceCriteria` — the rendered HTML acceptance criteria block
286
- - `Microsoft.VSTS.Scheduling.StoryPoints` — the points agreed in Step 4 (omit entirely if the user skipped)
326
+ - `Microsoft.VSTS.Scheduling.StoryPoints` — the points agreed in Step 4 (omit entirely if the user skipped, and **always** for a Feature)
327
+ - For Features:
328
+ - Render `Business Value`, `Scope`, `Out of Scope`, and `Success Criteria` into the description. Put `Success Criteria` in `Microsoft.VSTS.Common.AcceptanceCriteria` **only if** the process template exposes that field on Feature — if the create call rejects it, fold the block into the description and retry rather than dropping it.
329
+ - `Microsoft.VSTS.Common.BusinessValue` — only if the user supplied a number. Never invent one.
330
+ - Omit `Microsoft.VSTS.Scheduling.StoryPoints` entirely.
287
331
  - For Bugs:
288
332
  - `Microsoft.VSTS.TCM.ReproSteps` — the rendered HTML repro steps (Azure DevOps puts repro steps in this field for the Bug template; if the project uses the Agile template instead, fold repro steps into Description)
289
333
  - `Microsoft.VSTS.Common.Priority` — the chosen Priority (1–4)
@@ -295,7 +339,46 @@ If the `Open Questions` section is non-empty, append it to the description as a
295
339
 
296
340
  If story points were agreed in Step 4, set `System.State` to `Dev Ready` via `mcp__azure-devops__wit_update_work_item` **after** the item is created (a separate call — new items start in `New`, and some process templates reject a non-initial state in the create call). If the state transition is rejected, report the error and leave the state as-is — don't silently retry through intermediate states. Items created without points stay in `New`.
297
341
 
298
- ## Step 9: Confirm
342
+ **Features are never moved.** A Feature stays in `New` and advances only as its child stories are verified and closed — the same rule `/implement` follows.
343
+
344
+ ## Step 9: Offer Child User Stories (Features only)
345
+
346
+ Skip this step for Bugs and User Stories.
347
+
348
+ A Feature is a container — `/implement AB#{id}` on a Feature implements its **child User Stories in `Custom.Order` waves**, so a Feature with no children can't be worked. After the Feature is created, ask:
349
+
350
+ ```
351
+ Draft child user stories for this feature now? (yes / no — I'll add them later)
352
+ ```
353
+
354
+ **Wait for the user.** On `no`, skip to Step 10 and point them at `/plan-backlog` for later.
355
+
356
+ On `yes`:
357
+
358
+ 1. Turn each bullet from the Feature's **Scope** section into a candidate User Story using the User Story draft shape from Step 3 — plain-language description plus testable acceptance criteria. Keep each one independently shippable; if a bullet is really two stories, split it.
359
+ 2. Assign each story a **`Custom.Order`** value. Stories that can be built in parallel share the same number; a story that depends on an earlier one gets a higher number. Start at `1` and increment per wave. This field drives the wave ordering in `/implement` — a story with no value lands in a catch-all wave, so set it on every story.
360
+ 3. Propose story points for each using the Step 4 rubric.
361
+ 4. Present the whole set for approval at once:
362
+
363
+ | # | Order | Proposed Title | Points | Summary |
364
+ |---|-------|----------------|--------|---------|
365
+
366
+ ```
367
+ Approve these child stories? (yes / change N / drop N / cancel)
368
+ ```
369
+
370
+ **Wait for the user.** Revise and re-present until approved. Do not create anything before approval.
371
+ 5. On approval, create each story with `mcp__azure-devops__wit_create_work_item` in the same project, setting:
372
+ - `System.Description` and `Microsoft.VSTS.Common.AcceptanceCriteria` — rendered to HTML per the Step 8 rules
373
+ - `Custom.Order` — the wave number
374
+ - `Microsoft.VSTS.Scheduling.StoryPoints` — the agreed points
375
+ - `System.AssignedTo` — copied from the Feature if the Feature has an assignee; otherwise leave unset
376
+ 6. Link each story to the Feature as a child via `mcp__azure-devops__wit_work_item_link_write` (`System.LinkTypes.Hierarchy-Reverse` from the story to the Feature).
377
+ 7. Move each pointed story to `Dev Ready` in a follow-up update, per the Step 8 rule. **The Feature's state is never changed.**
378
+
379
+ If a story fails to create or link, report which ones succeeded and which didn't — don't roll back the Feature.
380
+
381
+ ## Step 10: Confirm
299
382
 
300
383
  After creation, report:
301
384
 
@@ -303,11 +386,16 @@ After creation, report:
303
386
  Created AB#{id}: {title}
304
387
  Project: {project}
305
388
  Type: {type}
306
- Story Points: {n | not set}
389
+ Story Points: {n | not set | n/a (Feature)}
307
390
  State: {Dev Ready | New}
308
391
  URL: {work item URL}
309
392
  Mockup attached: {yes / no}
310
393
  Open questions: {count}
394
+ {Features only:}
395
+ Child stories: {n created | none — add them later with /plan-backlog}
396
+ AB#{id} (order {n}, {p} pts) — {title}
397
+ ...
398
+ {end Features only}
311
399
 
312
400
  Next steps:
313
401
  /explain AB#{id} — re-read the item in plain language
@@ -315,4 +403,13 @@ Next steps:
315
403
  /implement AB#{id} — start working on it
316
404
  ```
317
405
 
406
+ For a **Feature**, use these next steps instead:
407
+
408
+ ```
409
+ Next steps:
410
+ /explain AB#{id} — re-read the feature in plain language
411
+ /plan-backlog — propose child Tasks for the Dev Ready stories
412
+ /implement AB#{id} — implement the child stories in Custom.Order waves
413
+ ```
414
+
318
415
  Do not assign the work item, set an iteration, or add tags unless the user explicitly asks — those are downstream decisions.
@@ -0,0 +1,237 @@
1
+ Edit an existing Azure DevOps work item. Usage: `/edit-work-item <work-item-id> [what to change]`
2
+
3
+ This command revises a work item that already exists — title, description, acceptance criteria, points, priority/severity, order. On a **Feature** it treats the Feature and its child User Stories as **one unit**: a change to the Feature's scope cascades into the children, new stories are drafted for new scope, stories that fell out of scope are retired, and `Custom.Order` is re-sequenced so the implementation waves still make sense.
4
+
5
+ Parse `$ARGUMENTS`:
6
+ - **Work item ID** — accept `AB#1234`, `#1234`, or `1234`. Required. If missing, ask for it and stop.
7
+ - **Change request** — any remaining text is the user's description of what to change (e.g. `/edit-work-item AB#6240 add SSO to the scope, drop the CSV export story`). Optional — if absent, Step 3 asks for it.
8
+ - **`--dry-run`** — do every step including the full change set, but make no writes. Report what would have changed and stop.
9
+
10
+ ## Step 1: Fetch the Work Item
11
+
12
+ Read the work item with `expand: Relations` so links and children come back. Collect:
13
+
14
+ - `System.Title`, `System.WorkItemType`, `System.State`, `System.AssignedTo`, `System.Tags`
15
+ - `System.Description`, `Microsoft.VSTS.Common.AcceptanceCriteria`
16
+ - `Microsoft.VSTS.Scheduling.StoryPoints`, `Custom.Order`
17
+ - For Bugs / Hot Fixes: `Microsoft.VSTS.TCM.ReproSteps`, `Microsoft.VSTS.Common.Priority`, `Microsoft.VSTS.Common.Severity`
18
+ - Parent, children, and **linked pull requests** (`ArtifactLink` relations)
19
+ - Comments — recent discussion often explains why a field says what it says
20
+
21
+ If the work item is not found, report the error and stop.
22
+
23
+ ### If the item is a Feature
24
+
25
+ Also fetch every child via `wit_work_item` `get_batch` with fields `System.Id`, `System.Title`, `System.WorkItemType`, `System.State`, `System.AssignedTo`, `Custom.Order`, `Microsoft.VSTS.Scheduling.StoryPoints`, `System.Description`, `Microsoft.VSTS.Common.AcceptanceCriteria`. Children are the `System.LinkTypes.Hierarchy-Forward` relations. You need their full text — you cannot judge whether a story still fits the revised scope from its title alone.
26
+
27
+ ## Step 2: Show the Current Item
28
+
29
+ Present what exists today, so the user is editing against reality and not memory:
30
+
31
+ ```
32
+ ## AB#{id}: {title}
33
+
34
+ **Type:** {type} **State:** {state} **Points:** {n | not set} **Assigned:** {name | unassigned}
35
+ **Linked PRs:** {#id (status), ... | none}
36
+
37
+ ### Description
38
+ {current description, rendered as readable text}
39
+
40
+ ### Acceptance Criteria
41
+ {current AC}
42
+ {for Bugs:}
43
+ **Priority:** {n} **Severity:** {n - Label}
44
+ {end for Bugs}
45
+ ```
46
+
47
+ For a **Feature**, append the current wave layout:
48
+
49
+ ```
50
+ ### Child Stories (current Custom.Order waves)
51
+
52
+ | Wave | Order | Story | Title | Points | State |
53
+ |------|-------|-------|-------|--------|-------|
54
+ | 1 | 1 | AB#6242 | ... | 3 | Dev Ready |
55
+ | 1 | 1 | AB#6243 | ... | 2 | Dev Ready |
56
+ | 2 | 2 | AB#6244 | ... | 5 | Code Review |
57
+ | 3 | — | AB#6245 | ... | 3 | New | ← no Custom.Order set
58
+ ```
59
+
60
+ ## Step 3: Gather the Change Request
61
+
62
+ If the user supplied a change request inline, restate your reading of it in one line and move on. Otherwise ask:
63
+
64
+ ```
65
+ What should change on AB#{id}?
66
+
67
+ Describe it however you like — "the scope should also cover SSO", "tighten AC 3",
68
+ "this is really two stories", "bump severity to 2". You can paste image URLs or
69
+ links; they'll be preserved.
70
+ ```
71
+
72
+ **Wait for the user's response.** Ask at most one targeted clarifying question if the request is ambiguous about *which* field or *which* child it touches.
73
+
74
+ Scan the response for images and links and preserve them exactly as `/create-work-item` Step 2 describes — an edit must never silently strip an image, attachment URL, or reference link that is already in the description.
75
+
76
+ ## Step 4: Draft the Change Set
77
+
78
+ Produce a **field-level diff**, not a rewritten item. For every field you propose to touch, show before and after. Fields not listed are not touched.
79
+
80
+ ```
81
+ ## Proposed Changes — AB#{id}
82
+
83
+ **Title**
84
+ - {current}
85
+ + {proposed}
86
+
87
+ **Description**
88
+ {a readable summary of what's being added, removed, or reworded — not a raw dump}
89
+
90
+ **Acceptance Criteria**
91
+ - 3. {removed criterion}
92
+ + 3. {new criterion}
93
+ + 4. {added criterion}
94
+
95
+ **Story Points:** {n} → {m} ({one-line rationale})
96
+ **Priority / Severity:** {n} → {m} (Bugs only)
97
+
98
+ **Unchanged:** {list the fields you deliberately left alone}
99
+ ```
100
+
101
+ Rules for the draft:
102
+
103
+ - **Preserve, don't regenerate.** Keep existing wording that the change request doesn't touch. Never drop existing `<img>` tags, attachment URLs, or reference links.
104
+ - **Points follow the `/quote` rubric** — modified Fibonacci (`1, 2, 3, 5, 8, 13, 21`), calibrated for a senior developer working with Claude assistance. Only propose a change if the scope actually moved. If the revised item now looks bigger than 21 points, recommend splitting it into a Feature instead of writing the number.
105
+ - **Never point a Feature** and never change a Feature's `System.State`.
106
+ - **Prefix rule holds** — if the title changes, it keeps its `PREFIX - ` prefix from the project's CLAUDE.md table.
107
+
108
+ ### If the item is a Feature — cascade to the children
109
+
110
+ This is the point of the command. After drafting the Feature's own changes, evaluate **every child story against the revised scope** and classify each one:
111
+
112
+ | Verdict | Meaning | Action |
113
+ |---------|---------|--------|
114
+ | **Unchanged** | Still correct under the new scope | Leave it entirely alone |
115
+ | **Update** | Still belongs, but its title / description / AC / points no longer match | Draft a field-level diff for it |
116
+ | **Add** | The revised scope introduces work no existing story covers | Draft a new User Story (`/create-work-item` Step 3 shape) with proposed points |
117
+ | **Retire** | The revised scope no longer includes this work | Propose `System.State` = `Removed`, or unlinking from the Feature — user picks |
118
+ | **Split** | The story now carries two independently shippable slices | Propose narrowing the existing story and adding a sibling |
119
+
120
+ Then **re-sequence `Custom.Order`**, because adding, retiring, or re-scoping stories usually breaks the wave plan:
121
+
122
+ 1. Rebuild the dependency picture across the surviving + added stories: a story that needs another story's work merged first must land in a **later** wave.
123
+ 2. Stories with no dependency on each other share a wave (same `Custom.Order` value) so `/implement` runs them in parallel.
124
+ 3. Number waves as **consecutive integers starting at 1**, no gaps. Stories that previously had no `Custom.Order` get one now.
125
+ 4. **Only write `Custom.Order` where the value actually changes.** A re-sequence that renumbers every story to the same value it already had is not a change — don't issue the write.
126
+ 5. Stories already past `Dev Ready` (see the safety gate below) keep their existing order unless the user explicitly says otherwise — moving an in-flight story between waves has no effect on work that's already done and only confuses the record.
127
+
128
+ Present the cascade as one table, old order → new order:
129
+
130
+ ```
131
+ ### Child Story Changes
132
+
133
+ | Story | Title | Verdict | Order | Points | State | Notes |
134
+ |-------|-------|---------|-------|--------|-------|-------|
135
+ | AB#6242 | ... | Unchanged | 1 | 3 | Dev Ready | — |
136
+ | AB#6243 | ... | Update | 1 | 2 → 3 | Dev Ready | AC 2 reworded for SSO |
137
+ | AB#6244 | ... | Unchanged | 2 → 2 | 5 | Code Review | in flight — order held |
138
+ | (new) | ... | Add | 2 | 5 | → Dev Ready | covers new SSO scope |
139
+ | AB#6245 | ... | Retire | — | 3 | New | dropped from scope → Removed |
140
+
141
+ ### Resulting Waves
142
+
143
+ | Wave | Order | Stories |
144
+ |------|-------|---------|
145
+ | 1 | 1 | AB#6242, AB#6243 |
146
+ | 2 | 2 | AB#6244, (new SSO story) |
147
+ ```
148
+
149
+ Show the field-level diff for every story marked **Update**, and the full draft for every story marked **Add**, below the table. The user is approving specific text, not a summary.
150
+
151
+ ## Step 5: Safety Gate — In-Flight Work
152
+
153
+ Before asking for approval, check the state of everything you propose to write and flag anything that is **past `Dev Ready`** in the workflow (`Active`, `Code Review`, `Ready for Testing`, `Testing`, `Ready to Deploy`, `Deployed`, `Closed`) or has a **linked pull request**.
154
+
155
+ Editing the acceptance criteria of a story that is already implemented silently invalidates a PR that was reviewed against the old criteria. So for each such item, call it out explicitly:
156
+
157
+ ```
158
+ ⚠️ AB#6244 is in **Code Review** with PR #142 open.
159
+
160
+ Changing its acceptance criteria now means the open PR no longer matches the story.
161
+ 1. Edit it anyway — I'll note the change in a work item comment
162
+ 2. Leave it alone and put the new behavior in a new story
163
+ 3. Use /rework AB#6244 instead — that's the flow built for post-PR changes
164
+
165
+ Which?
166
+ ```
167
+
168
+ **Wait for the user on each flagged item.** Default to option 2 if the user is vague — adding a story is always recoverable; rewriting an implemented one is not.
169
+
170
+ Never move an item **backward** through the workflow. If setting points on an item that is already past `Dev Ready`, set the points only, leave the state alone, and say so.
171
+
172
+ ## Step 6: Approve
173
+
174
+ ```
175
+ ## Ready to Apply — AB#{id}
176
+
177
+ **Feature/item changes:** {n} field(s)
178
+ **Child stories:** {a} updated, {b} added, {c} retired, {d} re-ordered, {e} unchanged
179
+ **In-flight items being edited:** {list | none}
180
+ **Post a comment recording this change on each edited item?** {yes | no}
181
+
182
+ Apply these changes? (yes / edit / cancel)
183
+ ```
184
+
185
+ **Wait for the user.**
186
+ - `yes` → Step 7
187
+ - `edit` → ask which part to revise, revise it, re-show the diff from Step 4, then return here
188
+ - `cancel` → abort with no writes and confirm "Cancelled — nothing was changed."
189
+
190
+ If `--dry-run` was passed, stop here instead and report the change set as final output. Make no writes.
191
+
192
+ Default the comment question to **yes** for any item past `New`, and **no** for items still in `New` (nobody has looked at them yet).
193
+
194
+ ## Step 7: Apply
195
+
196
+ Render every Markdown section to HTML first — Azure DevOps description and acceptance criteria fields do not render Markdown. Use the conversion table and the **emphasis and code spans** rules from `/create-work-item` Step 8: bold the noun phrase carrying each claim, wrap identifiers in `<code>`, use lists for 2+ parallel items, keep `### Headings` as `<h3>`. Preserve existing `<img>` tags exactly.
197
+
198
+ Apply writes in this order, so a failure partway through leaves the most useful state behind:
199
+
200
+ 1. **Update the parent item** — one `mcp__azure-devops__wit_update_work_item` call with every changed field. Never include `System.State` for a Feature.
201
+ 2. **Update existing children** (verdict `Update`) — one call per story, points and `Custom.Order` in the same call as the text changes. If points were set on a story still at or before `Dev Ready`, set `System.State` = `Dev Ready` in that same call.
202
+ 3. **Create added children** — `mcp__azure-devops__wit_create_work_item` with description, acceptance criteria, `Custom.Order`, agreed `Microsoft.VSTS.Scheduling.StoryPoints`, and `System.AssignedTo` copied from the Feature if it has an assignee. Then link each to the Feature as a child via `mcp__azure-devops__wit_work_item_link_write` (`System.LinkTypes.Hierarchy-Reverse`), then move pointed ones to `Dev Ready` in a follow-up call.
203
+ 4. **Re-order** any story whose only change is `Custom.Order` — one call each, touching that field alone.
204
+ 5. **Retire** stories the user approved — set `System.State` = `Removed`, or remove the parent link, whichever the user chose. **Never delete a work item.**
205
+ 6. **Post comments** (if the user said yes) via `mcp__azure-devops__wit_work_item_comment_write` — one short comment per edited item saying what changed and why, and naming the Feature edit that drove it (e.g. `Scope updated via edit of AB#6240: acceptance criteria 2 reworded to cover SSO; re-ordered from wave 3 to wave 2.`).
206
+
207
+ Touch no field that wasn't in the approved change set. Assignee, iteration, and tags stay as they are unless the user asked.
208
+
209
+ If any write fails, stop, report exactly which items were changed and which weren't, and do not retry blindly — a half-applied re-sequence needs the user to see the real state before you try again.
210
+
211
+ ## Step 8: Confirm
212
+
213
+ ```
214
+ Updated AB#{id}: {title}
215
+ Type: {type}
216
+ Fields changed: {list}
217
+ Points: {n → m | unchanged}
218
+ State: {state} {(unchanged — Features are never moved) | (→ Dev Ready)}
219
+ URL: {work item URL}
220
+
221
+ {Features only:}
222
+ Child stories:
223
+ updated: AB#{id} ({what changed})
224
+ added: AB#{id} — {title} (order {n}, {p} pts, Dev Ready)
225
+ retired: AB#{id} — {title} (Removed)
226
+ re-ordered: AB#{id} (wave {old} → {new})
227
+ unchanged: {count}
228
+
229
+ Resulting waves: {1: AB#..., AB#... | 2: AB#...}
230
+ {end Features only}
231
+
232
+ Next steps:
233
+ /explain AB#{id} — re-read the item as it now stands
234
+ /implement AB#{id} — {implement the child stories in Custom.Order waves | start working on it}
235
+ ```
236
+
237
+ If nothing ended up changing (the user cancelled every proposed edit at the safety gate), say that plainly rather than reporting a successful edit.
@@ -257,7 +257,8 @@ All deployment and release operations are available as slash commands:
257
257
  | `/plan-sprint` | `/plan-sprint [project]` | Sweep the current sprint for stories/bugs with no child tasks → propose one child task with hours per item |
258
258
  | `/quote-backlog` | `/quote-backlog [project]` | Sweep backlog for Design Approved items without points → review completeness, check for duplicates, suggest rewrites, propose points + creator comments (10 at a time, approval-gated). Pointed items move to Dev Ready; items that can't be quoted move back to **Design Review** so the next sweep skips them |
259
259
  | `/quote` | `/quote AB#1234` | Estimate story points for one work item; on approval, sets the points and moves the item to Dev Ready. If it can't be estimated, offers to move it back to **Design Review** |
260
- | `/create-work-item` | `/create-work-item [description]` | Interactively draft and create a Bug or User Story — proposes story points (user must agree) and creates pointed items in Dev Ready |
260
+ | `/create-work-item` | `/create-work-item [description]` | Interactively draft and create a Feature, Bug, or User Story — proposes story points (user must agree) and creates pointed items in Dev Ready; on a Feature, also drafts its child stories with `Custom.Order` waves |
261
+ | `/edit-work-item` | `/edit-work-item AB#1234 [what to change]` | Revise an existing work item field-by-field. On a Feature, cascades the change into its child stories — updates, adds, retires, and re-sequences `Custom.Order` waves — with a safety gate on anything already past Dev Ready |
261
262
  | `/cleanup-branches` | `/cleanup-branches` | Delete merged branches |
262
263
  | `/close-orphan-tasks` | `/close-orphan-tasks [scope] [--dry-run]` | Close open Tasks whose parent is Ready to Deploy / Deployed / Closed |
263
264