@chris1807/claude-kit 2.1.1 → 2.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chris1807/claude-kit",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "Claude Code starter kit — agents, hooks, MCP servers, slash commands, and workflow automation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -63,6 +63,12 @@ Present the plan to the user:
63
63
  ### Files to Delete (if any)
64
64
  - `path/to/old/file.cs` — {why it's being removed}
65
65
 
66
+ ### Unit Tests
67
+ - `path/to/new.tests.cs` — covers {scenario 1}, {scenario 2}, {edge case}
68
+ - `path/to/existing.tests.cs` — adds cases for {new behavior}
69
+
70
+ List every test file you will add or modify and the scenarios each covers (happy path, error paths, edge cases, regression guards). If a change in this plan has no test coverage, justify why here.
71
+
66
72
  ### Agents
67
73
  - **backend**: {what it will do}
68
74
  - **frontend**: {what it will do}
@@ -111,7 +117,8 @@ Remember the `BASE_BRANCH` — you will need it for the PR step.
111
117
  ## Step 5: Implement
112
118
 
113
119
  1. **Implement** using backend and/or frontend agents according to the approved plan
114
- 2. **Generate mockup** if there are UI changes
120
+ 2. **Write the unit tests** listed in the plan's "Unit Tests" section alongside the implementation — not after
121
+ 3. **Generate mockup** if there are UI changes
115
122
 
116
123
  ## Step 6: Build Validation
117
124
 
@@ -123,7 +130,7 @@ Run a build check **before** any other quality checks. Use the `build-validator`
123
130
  ## Step 7: Quality Checks
124
131
 
125
132
  1. **Review** code for quality, security, and Clean Architecture compliance
126
- 2. **Run tests** — unit, integration, and build validation
133
+ 2. **Run the full test suite** — every unit test in the repo, plus integration tests. Not just the tests added in this change. A failure in an unrelated test means this change broke something else; treat it as a regression, fix it, and re-run until the entire suite is green
127
134
  3. **Run lint** — ESLint and dotnet format
128
135
 
129
136
  ## Step 8: UAT Gate
@@ -79,6 +79,12 @@ Present the plan to the user:
79
79
  ### Files to Delete (if any)
80
80
  - `path/to/old/file.cs` — {why it's being removed}
81
81
 
82
+ ### Unit Tests
83
+ - `path/to/new.tests.cs` — covers {scenario the rework adds or fixes}
84
+ - `path/to/existing.tests.cs` — updates assertions for {changed behavior}
85
+
86
+ List every test file you will add or modify and the scenarios each covers. Rework feedback often reveals missing test coverage on the original implementation — add regression tests that would have caught the original issue. If a rework change in this plan has no test coverage, justify why here.
87
+
82
88
  ### Agents
83
89
  - **backend**: {what it will do}
84
90
  - **frontend**: {what it will do}
@@ -104,7 +110,8 @@ If the PR was completed/merged and the branch was deleted, create a new branch f
104
110
  ## Step 6: Implement
105
111
 
106
112
  1. **Implement** the rework using backend and/or frontend agents according to the approved plan
107
- 2. **Generate mockup** if there are UI changes
113
+ 2. **Write the unit tests** listed in the plan's "Unit Tests" section alongside the implementation — not after. Include any regression test that would have caught the original issue
114
+ 3. **Generate mockup** if there are UI changes
108
115
 
109
116
  ## Step 7: Build Validation
110
117
 
@@ -116,7 +123,7 @@ Run a build check **before** any other quality checks. Use the `build-validator`
116
123
  ## Step 8: Quality Checks
117
124
 
118
125
  1. **Review** code for quality, security, and Clean Architecture compliance
119
- 2. **Run tests** — unit, integration, and build validation
126
+ 2. **Run the full test suite** — every unit test in the repo, plus integration tests. Not just the tests added in this rework. A failure in an unrelated test means this rework broke something else; treat it as a regression, fix it, and re-run until the entire suite is green
120
127
  3. **Run lint** — ESLint and dotnet format
121
128
 
122
129
  ## Step 9: UAT Gate
@@ -0,0 +1,87 @@
1
+ Show which environments a work item is currently deployed to. Usage: `/where <work-item-id>`
2
+
3
+ Parse `$ARGUMENTS` to extract the work item ID. Accept formats like `AB#1234`, `#1234`, or just `1234`. If no ID is provided, report the error and stop.
4
+
5
+ ## Step 1: Fetch the Work Item
6
+
7
+ Read the work item from Azure DevOps using the project from the current repo's CLAUDE.md configuration. Expand with `relations` so PR links are included.
8
+
9
+ If the work item is not found, report the error and stop.
10
+
11
+ Capture: id, title, type, state, and any linked Pull Request artifacts from `relations`.
12
+
13
+ ## Step 2: Resolve the Environment Chain
14
+
15
+ Read the **Pipeline Configuration** table from the current repo's `CLAUDE.md`. The table rows define the environment branches in promotion order (top → bottom). Example:
16
+
17
+ ```
18
+ | Branch | Environment | Pipeline(s) |
19
+ |--------|------------|-------------|
20
+ | develop | Dev | ... |
21
+ | staging | Staging | ... |
22
+ | main | Production | ... |
23
+ ```
24
+
25
+ If the table is missing, report that the project has no pipeline configuration in `CLAUDE.md` and stop.
26
+
27
+ For each environment branch, run `git fetch origin <branch>` first so the local view is current.
28
+
29
+ ## Step 3: Find the Commits for This Work Item
30
+
31
+ Locate the commits associated with the work item using these signals (combine results, dedupe by SHA):
32
+
33
+ 1. **Linked PRs** — for each linked PR from Step 1, get the merge commit on the target branch (Azure DevOps API: `lastMergeCommit`).
34
+ 2. **Commit message search** — `git log --all --grep="AB#<id>\b" --grep="#<id>\b" -i --format=%H` to catch commits whose messages reference the ID.
35
+ 3. **Branch name** — `git log --all --format=%H` filtered to commits whose source branch matched `*AB#<id>-*` (use `git for-each-ref` + reflog if needed; skip if not resolvable).
36
+
37
+ If no commits are found, report:
38
+ ```
39
+ AB#<id>: <title>
40
+ No commits found referencing this work item — not deployed to any environment.
41
+ ```
42
+ and stop.
43
+
44
+ ## Step 4: Check Each Environment
45
+
46
+ For each branch in the Pipeline Configuration table, determine whether **any** of the work item's commits is reachable from `origin/<branch>`:
47
+
48
+ ```
49
+ git merge-base --is-ancestor <commit> origin/<branch>
50
+ ```
51
+
52
+ A work item is "in" an environment if at least one of its commits is an ancestor of that environment's branch tip. Track which specific commits landed in which environment so partial deployments are visible.
53
+
54
+ ## Step 5: Display the Result
55
+
56
+ Output a concise summary in plain language followed by a details block.
57
+
58
+ ```
59
+ AB#<id>: <title>
60
+ <type> · <state>
61
+
62
+ This work item is in <env list joined with " and ">.
63
+ ```
64
+
65
+ Where `<env list>` is the environments where the work item is present, in promotion order. If none, say "not deployed to any environment yet."
66
+
67
+ Then a details table:
68
+
69
+ ```
70
+ | Environment | Branch | Deployed | Commits |
71
+ |-------------|---------|----------|---------|
72
+ | Dev | develop | Yes | 2 of 2 |
73
+ | Staging | staging | Yes | 2 of 2 |
74
+ | Production | main | No | 0 of 2 |
75
+ ```
76
+
77
+ - **Deployed**: Yes if at least one commit is reachable from the branch tip; No otherwise.
78
+ - **Commits**: how many of the work item's commits are present on that branch (e.g. `1 of 2` flags a partial cherry-pick).
79
+
80
+ If any linked PRs are still open (not merged), append:
81
+
82
+ ```
83
+ Open PRs:
84
+ - PR #<n> → <target branch> (<status>)
85
+ ```
86
+
87
+ That's it — read-only. Do not modify branches, push, or create PRs.