@chris1807/claude-kit 2.1.38 → 2.1.39

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** | 21 | `.claude/commands/` (in the project) | `/implement`, `/review`, `/deep-review`, `/resolve-feedback`, `/fix-review`, `/deploy`, `/create-release`, `/deploy-release`, `/add-to-release`, `/cherry-pick`, `/promote`, `/rollback`, `/status`, `/cleanup-branches`, `/close-orphan-tasks`, `/quote`, `/explain` |
31
+ | **Slash Commands** | 22 | `.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`, `/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 |
@@ -254,6 +254,7 @@ Kit operations that benefit from ultracode when it's on:
254
254
  | Operation | Fan-out unit |
255
255
  |-----------|--------------|
256
256
  | `/plan-backlog` | one agent per Dev Ready story — analyze, point, and propose tasks in parallel |
257
+ | `/plan-sprint` | one agent per sprint item — analyze and propose tasks in parallel |
257
258
  | Backlog / board audits | one agent per work item — find stale, mislabeled, orphaned, or unestimated items |
258
259
  | Multi-file or cross-layer review | one agent per file/dimension, then adversarial verify before reporting |
259
260
  | Repo-wide sweeps (rename, dependency bump, pattern migration) | one agent per site, worktree-isolated |
@@ -645,6 +646,8 @@ Claude reviews for:
645
646
  | `/promote` | `/promote staging production` | PR to promote all code between environments |
646
647
  | `/rollback` | `/rollback AB#1234 production` | Revert specific commits on an environment via PR |
647
648
  | `/status` | `/status release 24` | Check status of a release, pipeline, work item, or environment |
649
+ | `/plan-backlog` | `/plan-backlog [project]` | Sweep backlog for Dev Ready stories with points and no tasks → propose one child task with hours per story |
650
+ | `/plan-sprint` | `/plan-sprint [project]` | Sweep the current sprint for stories/bugs with no child tasks → propose one child task with hours per item |
648
651
  | `/quote` | `/quote AB#1234` | Display a work item as a formatted blockquote |
649
652
  | `/explain` | `/explain AB#1234` | Summarize and explain a work item in plain language |
650
653
  | `/cleanup-branches` | `/cleanup-branches` | Delete merged feature/work branches |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chris1807/claude-kit",
3
- "version": "2.1.38",
3
+ "version": "2.1.39",
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,227 @@
1
+ Sweep the **current sprint** for user stories and bugs without child tasks and propose a single implementation task per item with an hour estimate. Usage: `/plan-sprint [project]`
2
+
3
+ This command finds every **User Story** and **Bug** in the current sprint of a chosen Azure DevOps project that **has no child tasks yet**, and — item by item — proposes **one child Task** with an hour estimate for the user to approve before any work items are created. Exactly one task per work item — never a multi-task breakdown.
4
+
5
+ This is the sprint-planning counterpart of `/plan-backlog`. Use `/plan-backlog` to groom the unscheduled backlog; use `/plan-sprint` after items are pulled into the sprint to make sure each has its implementation task and hours.
6
+
7
+ Treat `$ARGUMENTS` as an optional project name (e.g. `/plan-sprint CSI Development`). If provided, skip the project prompt in Step 1.
8
+
9
+ ## Step 1: Choose the Azure DevOps Project
10
+
11
+ ### Detect the default project
12
+
13
+ Before prompting, attempt to detect the default Azure DevOps project from CLAUDE.md, in this order:
14
+
15
+ 1. **Project CLAUDE.md** — read `<current-repo>/CLAUDE.md`. Look for an explicit `project: <name>` declaration, a "Work items live in **<Project Name>**" sentence, or a `## Pipeline Configuration` table with project references.
16
+ 2. **Parent CLAUDE.md** — read `<parent-dir>/CLAUDE.md` (e.g. `~/Projects/CLAUDE.md`). Look for the same patterns. The CSI parent CLAUDE.md, for example, declares: "Work items for both **COMPASS** and **CSI Pay** live in the **CSI Development** Azure DevOps project."
17
+
18
+ If a default is found, present it pre-selected:
19
+
20
+ ```
21
+ Which Azure DevOps project should I sweep?
22
+
23
+ Default: {detected project} ← press enter to accept
24
+
25
+ Or specify a different project name, or "list" to see all projects.
26
+ ```
27
+
28
+ If the user types `list`, call `mcp__azure-devops__core_list_projects` and present the names, then re-prompt. **Wait for the user's response.** Validate the chosen project name exists (call `core_list_projects` if uncertain).
29
+
30
+ ## Step 2: Resolve the Current Sprint
31
+
32
+ Resolve the team's **current iteration** — do not guess the iteration path:
33
+
34
+ 1. Determine the team. Most projects have a default team named after the project; if `mcp__azure-devops__core_list_project_teams` shows multiple teams and it isn't obvious which one runs the sprint, ask the user which team to use.
35
+ 2. Fetch the current iteration via `mcp__azure-devops__work_list_team_iterations` (or the equivalent `work` tool) with `timeframe: current` and capture its full **iteration path** and date range.
36
+
37
+ If no current iteration exists (no sprint with today's date in range), report:
38
+
39
+ ```
40
+ {project} has no active sprint (no iteration covers today). Nothing to plan.
41
+ ```
42
+
43
+ and stop.
44
+
45
+ ## Step 3: Query the Sprint
46
+
47
+ Run a WIQL query via `mcp__azure-devops__wit_query_by_wiql` using the **literal iteration path** from Step 2:
48
+
49
+ ```sql
50
+ SELECT [System.Id], [System.Title], [System.State],
51
+ [System.WorkItemType], [System.IterationPath],
52
+ [Microsoft.VSTS.Scheduling.StoryPoints], [System.Tags]
53
+ FROM WorkItems
54
+ WHERE [System.TeamProject] = '{project}'
55
+ AND [System.WorkItemType] IN ('User Story', 'Bug')
56
+ AND [System.IterationPath] UNDER '{current sprint iteration path}'
57
+ AND [System.State] NOT IN ('Closed', 'Removed', 'Done', 'Resolved', 'Code Review', 'Ready to Deploy', 'Deployed')
58
+ ORDER BY [Microsoft.VSTS.Common.StackRank] ASC
59
+ ```
60
+
61
+ > The state exclusion drops items that are already implemented or finished — planning tasks for those adds noise. If the project's process template uses different late-stage state names, adjust the exclusion list to match; when in doubt, include the item and let the user skip it in Step 6.
62
+
63
+ Unlike `/plan-backlog`, **Story Points are not required** — an unpointed item that made it into the sprint still needs a task. Unpointed items are flagged in Step 5 and estimated from their description instead.
64
+
65
+ If the query returns zero items, report:
66
+
67
+ ```
68
+ No open stories or bugs found in {current sprint} of {project}.
69
+ Nothing to plan.
70
+ ```
71
+
72
+ and stop.
73
+
74
+ ## Step 4: Filter Out Items That Already Have Child Tasks
75
+
76
+ For each candidate from Step 3, fetch the work item with `mcp__azure-devops__wit_get_work_item` expanding `relations`. If the item has any `System.LinkTypes.Hierarchy-Forward` relation pointing at a `Task`, mark it as **already broken down** and skip it.
77
+
78
+ Present a one-line summary of what was skipped:
79
+
80
+ ```
81
+ Skipped {n} items that already have child tasks:
82
+ - AB#{id}: {title} ({k} existing tasks)
83
+ - ...
84
+ ```
85
+
86
+ If after filtering there are zero items left, report "Every open story and bug in {current sprint} already has a task — nothing to plan." and stop.
87
+
88
+ ## Step 5: Present the Working List
89
+
90
+ Show the remaining items the user is about to walk through:
91
+
92
+ ```
93
+ Found {n} items in {current sprint} ({date range}) with no child tasks:
94
+
95
+ | # | ID | Type | Title | State | Points |
96
+ |----|----------|------------|------------------------------------------|-----------|--------|
97
+ | 1 | AB#4521 | User Story | COM - Admin can export payments to CSV | Dev Ready | 5 |
98
+ | 2 | AB#4523 | Bug | COM - Fix duplicate email on resend | Active | — |
99
+ | .. | ... | ... | ... | ... | ... |
100
+
101
+ I'll walk through each one. For each item you'll see one proposed task
102
+ with an hour estimate; you can approve, edit, or skip per item.
103
+
104
+ Continue? (yes / cancel)
105
+ ```
106
+
107
+ **Wait for the user.** If `cancel`, stop with no changes.
108
+
109
+ ### Ultracode mode (optional fan-out)
110
+
111
+ Only when **ultracode is on** (a system-reminder confirms it, or the user typed `ultracode`): the analysis in 6a–6c is independent per item, so pre-compute all proposals in parallel with the `Workflow` tool instead of analyzing one item at a time.
112
+
113
+ - Fan out **one agent per item** that does 6a–6c — re-read the item, derive the hour budget, draft the single task — and returns a structured proposal (item id, points, budget, and one `{title, hours}` task). Use a `schema` so each agent returns validated JSON.
114
+ - Then run Step 6's loop **using the pre-computed proposals** — but keep 6d (approval) and 6e (creation) exactly as written: present each proposal, wait for `yes / edit / skip / cancel-all`, and create the task only after approval. **Never fan out the approval or the work-item creation** — those stay sequential and interactive.
115
+
116
+ If ultracode is off, ignore this and run Step 6 the normal sequential way. The output is identical either way; ultracode only makes the analysis faster for large sprints.
117
+
118
+ ## Step 6: Per-Item Task (loop)
119
+
120
+ For each remaining item, in order:
121
+
122
+ ### 6a. Re-read the item in full
123
+
124
+ Fetch the work item again (Description and Acceptance Criteria fields — Repro Steps for Bugs) if not already cached. You need this text to write an accurate task title and, for unpointed items, an hour estimate.
125
+
126
+ ### 6b. Derive the hour budget
127
+
128
+ > **Assume a senior developer is the implementer.** The hour budget below already discounts for senior-level speed — no ramp-up time, no time spent learning the stack, routine cross-layer work is fast. Do not add a separate "experience" discount on top of these numbers.
129
+
130
+ **If the item has Story Points**, use this mapping (calibrated for a senior developer at ~6 productive hours per day):
131
+
132
+ | Points | Hour budget | Notes |
133
+ |--------|-------------|-------|
134
+ | 1 | 3 hrs | trivial change |
135
+ | 2 | 6 hrs | small, one-layer change |
136
+ | 3 | 10 hrs | one feature slice, modest tests |
137
+ | 5 | 16 hrs | cross-layer or new component (routine for a senior) |
138
+ | 8 | 28 hrs | multi-area, real unknowns even for a senior |
139
+ | 13 | 48 hrs | large feature — should probably be split |
140
+ | 21 | 75 hrs | very large — almost certainly split |
141
+
142
+ If the points value isn't on the Fibonacci scale, round to the nearest entry above. If the item has tags like `spike`, `research`, or `unknown-stack`, add 20–30% on top — those are the cases where seniority doesn't help.
143
+
144
+ **If the item has no Story Points**, estimate the hours directly from the description, acceptance criteria, and repro steps — judge which row of the table the work most resembles and use that hour budget. Mark the proposal `(no points — estimated from description)` and suggest `/quote AB#{id}` in the final summary. Do **not** set Story Points on the item — that's the user's call.
145
+
146
+ ### 6c. Draft the single task
147
+
148
+ Create **exactly one task** covering all the work for the item — implementation, tests, code review revisions, and UAT support are all rolled into it. Do not split the item into design/backend/frontend/test tasks.
149
+
150
+ - **Title**: `{Prefix} - Implement: {short summary of the item}` — use the same product prefix as the parent (e.g. `COM`, `PAY`, `CDA`), extracted from the parent's title. For Bugs, `{Prefix} - Fix: {short summary}` reads better.
151
+ - **Hours**: the full hour budget from 6b, rounded to a whole hour.
152
+
153
+ ### 6d. Show the proposal
154
+
155
+ ```
156
+ ─────────────────────────────────────────────────────────────
157
+ AB#{id}: {title} ({points} pts → {budget} hrs)
158
+ ─────────────────────────────────────────────────────────────
159
+
160
+ Proposed child task:
161
+
162
+ | Task title | Hours |
163
+ |------------------------------------------------|-------|
164
+ | {Prefix} - Implement: payments CSV export | 24 |
165
+
166
+ Approve? (yes / edit / skip / cancel-all)
167
+ ```
168
+
169
+ For unpointed items, the header line reads `(no points — estimated from description → {budget} hrs)`.
170
+
171
+ **Wait for the user.**
172
+
173
+ - `yes` → proceed to 6e (create the task)
174
+ - `edit` → ask what to change (title or hours), revise, re-show, ask again
175
+ - `skip` → skip this item, move to the next; record it as skipped
176
+ - `cancel-all` → stop the entire loop with no further changes. Report what was already created.
177
+
178
+ ### 6e. Create the child task
179
+
180
+ Create the approved task with `mcp__azure-devops__wit_create_work_item`:
181
+
182
+ - **project**: the chosen project
183
+ - **workItemType**: `Task`
184
+ - **title**: the task title (with prefix)
185
+ - **fields**:
186
+ - `Microsoft.VSTS.Scheduling.OriginalEstimate` — the hour estimate (as a number)
187
+ - `Microsoft.VSTS.Scheduling.RemainingWork` — the same hour estimate
188
+ - `System.IterationPath` — copy from the parent (the parent is in the current sprint, so the task lands on the sprint taskboard)
189
+ - `System.AreaPath` — copy from the parent
190
+ - `System.AssignedTo` — copy from the parent (pass the parent's `uniqueName` / email if its `System.AssignedTo` value is an identity object). If the parent is unassigned, leave this field unset rather than failing.
191
+
192
+ Then link the new task as a child of the parent with `mcp__azure-devops__wit_add_child_work_items` (or fall back to `wit_work_items_link` with link type `System.LinkTypes.Hierarchy-Forward` from parent → task).
193
+
194
+ If the create or link call fails, report the failure and ask the user whether to continue with the next item or abort the loop.
195
+
196
+ ### 6f. Confirm per-item result
197
+
198
+ ```
199
+ ✓ AB#{id}: created 1 child task ({budget} hrs)
200
+ ```
201
+
202
+ Then move to the next item.
203
+
204
+ ## Step 7: Final Summary
205
+
206
+ Once the loop ends (all items handled, or user said `cancel-all`):
207
+
208
+ ```
209
+ ## Sprint Planning Complete — {project} / {current sprint}
210
+
211
+ Items planned: {n_planned}
212
+ ✓ Tasks created: {n_tasks_total} — one per item ({hours_total} hrs)
213
+ Items skipped: {n_skipped}
214
+ - already had tasks: {n_existing}
215
+ - user skipped: {n_user_skipped}
216
+
217
+ Planned items:
218
+ - AB#4521: 1 task, 24 hrs
219
+ - AB#4523: 1 task, 6 hrs (no points — consider /quote AB#4523)
220
+ - ...
221
+
222
+ Next steps:
223
+ /quote AB#{id} — point any unpointed item or re-check a budget that felt off
224
+ /implement AB#{id} — start working on a planned item
225
+ ```
226
+
227
+ Do not assign tasks, change parent state, set story points, or add tags unless the user explicitly asks — those are downstream decisions.
@@ -40,6 +40,7 @@ Ultracode is **opt-in**. It is on only when a system-reminder confirms it, when
40
40
  | Operation | Fan-out unit |
41
41
  |-----------|--------------|
42
42
  | `/plan-backlog` | one agent per Dev Ready story — analyze, point, and propose tasks in parallel |
43
+ | `/plan-sprint` | one agent per sprint item — analyze and propose tasks in parallel |
43
44
  | Backlog / board audits | one agent per work item — find stale, mislabeled, orphaned, or unestimated items |
44
45
  | Multi-file or cross-layer review | one agent per file/dimension, then adversarial verify before reporting |
45
46
  | Repo-wide sweeps (rename, dependency bump, pattern migration) | one agent per site, worktree-isolated |
@@ -50,7 +51,7 @@ Short, single-query operations (`/status`, `/explain`, `/close-orphan-tasks`) do
50
51
 
51
52
  **`/implement` uses ultracode scaled to the change** — its code review always fans out (find → adversarially-verify), but exploration and per-AC coverage fan out only for non-trivial / full-stack stories; a one-line config change runs lean. It's the daily driver, so it doesn't blanket-fan-out like `/rework`.
52
53
 
53
- **`/plan-backlog` uses it opt-in** — only when ultracode is on.
54
+ **`/plan-backlog` and `/plan-sprint` use it opt-in** — only when ultracode is on.
54
55
 
55
56
  ### Sensitive Data Policy
56
57
 
@@ -241,6 +242,7 @@ All deployment and release operations are available as slash commands:
241
242
  | `/rollback` | `/rollback AB#1234 production` | Revert commits on an environment |
242
243
  | `/status` | `/status release 24` | Check release, pipeline, or work item status |
243
244
  | `/plan-backlog` | `/plan-backlog [project]` | Sweep backlog for Dev Ready stories with points and no tasks → propose child tasks with hours |
245
+ | `/plan-sprint` | `/plan-sprint [project]` | Sweep the current sprint for stories/bugs with no child tasks → propose one child task with hours per item |
244
246
  | `/cleanup-branches` | `/cleanup-branches` | Delete merged branches |
245
247
  | `/close-orphan-tasks` | `/close-orphan-tasks [scope] [--dry-run]` | Close open Tasks whose parent is Ready to Deploy / Deployed / Closed |
246
248