@chris1807/claude-kit 2.1.21 → 2.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ Every session Claude learns from your feedback and gets better at helping you sp
|
|
|
28
28
|
| **Global Agents** | 13 | `~/.claude/agents/` (your machine, all projects) | backend, frontend, legacy (Lucee/CFML), manager, mockup, reviewer, test-runner, build-validator, lint-checker, uat-generator, azure-ops, security-auditor, api-tester |
|
|
29
29
|
| **Project Agents** | 3 | `.claude/agents/` (in the project) | deployer, db-admin, devops-tracker |
|
|
30
30
|
| **Hooks** | 9 | `.claude/hooks/` (in the project) | Secret blocker, sensitive data blocker (Bash + MCP + output), protected files, auto-format, test suggestions, UAT reminder, self-improve |
|
|
31
|
-
| **Slash Commands** | 13 | `.claude/commands/` (in the project) | `/implement`, `/review`, `/resolve-feedback`, `/deploy`, `/create-release`, `/deploy-release`, `/add-to-release`, `/cherry-pick`, `/promote`, `/rollback`, `/status`, `/cleanup-branches`, `/quote`, `/explain` |
|
|
31
|
+
| **Slash Commands** | 13 | `.claude/commands/` (in the project) | `/implement`, `/review`, `/resolve-feedback`, `/deploy`, `/create-release`, `/deploy-release`, `/add-to-release`, `/cherry-pick`, `/promote`, `/rollback`, `/status`, `/cleanup-branches`, `/close-orphan-tasks`, `/quote`, `/explain` |
|
|
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 |
|
|
@@ -220,6 +220,7 @@ your-project/ ← Project-specific
|
|
|
220
220
|
│ │ ├── add-to-release.md # /add-to-release 24 AB#4599
|
|
221
221
|
│ │ ├── status.md # /status release 24
|
|
222
222
|
│ │ ├── cleanup-branches.md # /cleanup-branches
|
|
223
|
+
│ │ ├── close-orphan-tasks.md # /close-orphan-tasks
|
|
223
224
|
│ │ ├── quote.md # /quote AB#1234
|
|
224
225
|
│ │ └── explain.md # /explain AB#1234
|
|
225
226
|
│ │
|
|
@@ -629,6 +630,7 @@ Claude reviews for:
|
|
|
629
630
|
| `/quote` | `/quote AB#1234` | Display a work item as a formatted blockquote |
|
|
630
631
|
| `/explain` | `/explain AB#1234` | Summarize and explain a work item in plain language |
|
|
631
632
|
| `/cleanup-branches` | `/cleanup-branches` | Delete merged feature/work branches |
|
|
633
|
+
| `/close-orphan-tasks` | `/close-orphan-tasks --dry-run` | Close open Tasks whose parent is Ready to Deploy / Deployed / Closed |
|
|
632
634
|
|
|
633
635
|
---
|
|
634
636
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chris1807/claude-kit",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.22",
|
|
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,86 @@
|
|
|
1
|
+
Close orphaned tasks — open Tasks whose parent has already moved to a deploy/done state. Usage: `/close-orphan-tasks [scope] [--dry-run]`
|
|
2
|
+
|
|
3
|
+
An **orphaned task** here means a child Task that is still open while its parent work item has already reached one of these states:
|
|
4
|
+
|
|
5
|
+
- `Ready to Deploy`
|
|
6
|
+
- `Deployed`
|
|
7
|
+
- `Closed`
|
|
8
|
+
|
|
9
|
+
When a parent is deployed or closed, leftover open child Tasks just add noise to the board. This command finds them and closes them in a single pass.
|
|
10
|
+
|
|
11
|
+
Parse `$ARGUMENTS`:
|
|
12
|
+
- If it contains `dry-run` or `--dry-run`, only list the orphaned tasks — do **not** close anything.
|
|
13
|
+
- Any other text is an optional **scope** filter — an Area Path, product prefix (`COM`, `PAY`, …), or iteration to narrow the search. With no scope, search the whole project.
|
|
14
|
+
|
|
15
|
+
All work items live in the **CSI Development** Azure DevOps project (see CLAUDE.md). Target that project unless the repo's CLAUDE.md says otherwise.
|
|
16
|
+
|
|
17
|
+
## Step 1: Find Orphaned Tasks
|
|
18
|
+
|
|
19
|
+
Use the Azure DevOps MCP `wit_query_by_wiql` with a hierarchy link query. The Source is the parent, the Target is the child Task:
|
|
20
|
+
|
|
21
|
+
```sql
|
|
22
|
+
SELECT [System.Id]
|
|
23
|
+
FROM WorkItemLinks
|
|
24
|
+
WHERE
|
|
25
|
+
([Source].[System.State] IN ('Ready to Deploy', 'Deployed', 'Closed'))
|
|
26
|
+
AND ([System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward')
|
|
27
|
+
AND ([Target].[System.WorkItemType] = 'Task')
|
|
28
|
+
AND ([Target].[System.State] NOT IN ('Closed', 'Removed', 'Done'))
|
|
29
|
+
MODE (MustContain)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
If a **scope** was given, add the matching constraint to the `[Target]` clause (e.g. `AND [Target].[System.AreaPath] UNDER 'CSI Development\\Compass'`, or `AND [Target].[System.Title] CONTAINS 'PAY'`).
|
|
33
|
+
|
|
34
|
+
> **Note on state names:** Process templates vary. Some projects close tasks to `Done` instead of `Closed`, or use `Resolved`. If the query returns nothing or errors on an unknown state, first confirm the valid states for the Task type via `wit_get_work_item_type`, then adjust the `NOT IN` list and the close target in Step 3 accordingly.
|
|
35
|
+
|
|
36
|
+
If the link query is unsupported or returns no usable pairs, fall back to: query all open Tasks in scope with a flat WIQL, fetch each task's parent via `relations`, and keep only those whose parent state is in the three target states.
|
|
37
|
+
|
|
38
|
+
Fetch the matched tasks (and their parents) in a batch via `wit_get_work_items_batch_by_ids` to get titles, states, assignees, and parent context.
|
|
39
|
+
|
|
40
|
+
## Step 2: Present the Candidates
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
## Orphaned Tasks ({count})
|
|
44
|
+
|
|
45
|
+
| Task | Title | State | Parent | Parent State |
|
|
46
|
+
|------|-------|-------|--------|--------------|
|
|
47
|
+
| AB#4710 | Add export endpoint | Active | AB#4521 | Deployed |
|
|
48
|
+
| AB#4711 | Wire up CSV service | New | AB#4521 | Deployed |
|
|
49
|
+
| AB#4733 | Fix null check | Active | AB#4598 | Closed |
|
|
50
|
+
|
|
51
|
+
These tasks will be set to **Closed** with a comment noting the parent's state.
|
|
52
|
+
|
|
53
|
+
Close {count} orphaned tasks? (yes/no)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If `--dry-run`, show the table but do **not** ask for confirmation and do **not** close anything. Stop here.
|
|
57
|
+
|
|
58
|
+
Otherwise, wait for explicit confirmation before proceeding. Never close tasks without a yes.
|
|
59
|
+
|
|
60
|
+
## Step 3: Close the Tasks
|
|
61
|
+
|
|
62
|
+
For each confirmed task, use `wit_update_work_items_batch`:
|
|
63
|
+
- **path**: `/fields/System.State`
|
|
64
|
+
- **value**: `Closed` (or the project's terminal Task state confirmed in Step 1)
|
|
65
|
+
|
|
66
|
+
Then add a comment on each via `wit_add_work_item_comment` so the auto-close is traceable:
|
|
67
|
+
|
|
68
|
+
> Auto-closed by `/close-orphan-tasks` — parent AB#{parentId} is in state "{parentState}".
|
|
69
|
+
|
|
70
|
+
Do not modify the parent items. Do not touch tasks whose parent is in any other state.
|
|
71
|
+
|
|
72
|
+
## Step 4: Report
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
Closed {count} orphaned tasks.
|
|
76
|
+
|
|
77
|
+
| Task | Title | Parent | Parent State |
|
|
78
|
+
|------|-------|--------|--------------|
|
|
79
|
+
| AB#4710 | Add export endpoint | AB#4521 | Deployed |
|
|
80
|
+
| AB#4711 | Wire up CSV service | AB#4521 | Deployed |
|
|
81
|
+
| AB#4733 | Fix null check | AB#4598 | Closed |
|
|
82
|
+
|
|
83
|
+
Skipped: {n} (state transition not permitted — list any that the board rejected)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
If any update was rejected (e.g. a required field or an invalid state transition), list it under **Skipped** with the reason rather than silently dropping it.
|
|
@@ -213,6 +213,7 @@ All deployment and release operations are available as slash commands:
|
|
|
213
213
|
| `/status` | `/status release 24` | Check release, pipeline, or work item status |
|
|
214
214
|
| `/plan-backlog` | `/plan-backlog [project]` | Sweep backlog for Dev Ready stories with points and no tasks → propose child tasks with hours |
|
|
215
215
|
| `/cleanup-branches` | `/cleanup-branches` | Delete merged branches |
|
|
216
|
+
| `/close-orphan-tasks` | `/close-orphan-tasks [scope] [--dry-run]` | Close open Tasks whose parent is Ready to Deploy / Deployed / Closed |
|
|
216
217
|
|
|
217
218
|
The CD pipeline is only triggered manually when pushing directly to an environment branch. For feature/work branches, the pipeline triggers on PR merge.
|
|
218
219
|
|