claude-dev-kit 2.1.8 → 2.2.0

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.
@@ -43,10 +43,19 @@ ls jest.config.* vitest.config.* playwright.config.* cypress.config.* pytest.ini
43
43
  # Mobile
44
44
  ls capacitor.config.ts app.json 2>/dev/null
45
45
 
46
- # CI/CD
46
+ # CI/CD and VCS detection
47
47
  ls .github/workflows/ 2>/dev/null | head -5
48
+ ls .gitlab-ci.yml .gitlab/ 2>/dev/null
49
+ ls .github/ 2>/dev/null | head -3
48
50
  ls Dockerfile docker-compose.yml 2>/dev/null
49
51
 
52
+ # Issue tracker / remote detection
53
+ git remote get-url origin 2>/dev/null || echo "NO_GIT_REMOTE"
54
+ cat .clickup 2>/dev/null || echo "NO_CLICKUP"
55
+ ls .linear 2>/dev/null || echo "NO_LINEAR"
56
+ # Check for MCP config (ClickUp/Linear MCP presence)
57
+ cat .claude/settings.json 2>/dev/null | grep -i "clickup\|linear\|jira" || true
58
+
50
59
  # Project structure (top-level only)
51
60
  tree -L 2 --gitignore 2>/dev/null || find . -maxdepth 2 -not -path './.git/*' -not -path './node_modules/*' -not -path './.next/*' | sort
52
61
  ```
@@ -114,16 +123,43 @@ Analyze the inventory to produce a detection JSON. Use this decision tree — fi
114
123
  | `capacitor.config.ts` | `capacitor` |
115
124
  | `app.json` with `"expo"` key | `expo` |
116
125
 
126
+ ### VCS Platform
127
+ | Detection | Result |
128
+ |-----------|--------|
129
+ | `.github/workflows/` exists OR `git remote` URL contains `github.com` | `github` |
130
+ | `.gitlab-ci.yml` exists OR `git remote` URL contains `gitlab.` | `gitlab` |
131
+ | `git remote` URL contains `bitbucket.org` | `bitbucket` |
132
+ | No git remote or no match | `none` |
133
+
134
+ ### Issue Tracker
135
+ | Detection | Result |
136
+ |-----------|--------|
137
+ | VCS is `github` AND `.github/` present | `github-issues` |
138
+ | VCS is `gitlab` | `gitlab-issues` |
139
+ | `clickup` found in MCP config OR `.clickup` file | `clickup` |
140
+ | `linear` found in MCP config OR `.linear` file | `linear` |
141
+ | `jira` found in MCP config | `jira` |
142
+ | Fallback | `none` |
143
+
144
+ Store both as `vcs_platform` and `issue_tracker` in the detection JSON. These values are used in Phase 5 to customize the CLAUDE.md agent table and commands section.
145
+
146
+ **Existing project fallback**: If `issue_tracker` resolves to `none` after all detection signals, ask the user once:
147
+ > "I couldn't auto-detect your issue tracker. Which one does this project use?
148
+ > GitHub Issues / GitLab Issues / Linear / ClickUp / Jira / None"
149
+ Do NOT ask if `vcs_platform` already implies the tracker (e.g. `gitlab` → `gitlab-issues`).
150
+
117
151
  ### Ambiguous / Large Codebase Fallback
118
152
  If the framework is not detectable from manifest files, use Gemini:
119
153
  ```bash
120
- gemini -p "@./ Identify the web framework, ORM/database layer, test runner, E2E tool, and mobile platform used in this project. Respond in exactly this format:
154
+ gemini -p "@./ Identify the web framework, ORM/database layer, test runner, E2E tool, mobile platform, VCS host, and issue tracker used in this project. Respond in exactly this format:
121
155
  FRAMEWORK: <name>
122
156
  ORM: <name or none>
123
157
  TEST_RUNNER: <name or none>
124
158
  E2E: <name or none>
125
159
  MOBILE: <name or none>
126
- PACKAGE_MANAGER: <name>"
160
+ PACKAGE_MANAGER: <name>
161
+ VCS_PLATFORM: <github|gitlab|bitbucket|none>
162
+ ISSUE_TRACKER: <github-issues|gitlab-issues|linear|clickup|jira|none>"
127
163
  ```
128
164
 
129
165
  ---
@@ -192,6 +228,14 @@ Ask these questions sequentially using the AskUserQuestion tool. Wait for each a
192
228
  - Unit tests only
193
229
  - Minimal (lint + build only)
194
230
 
231
+ **Q11**: Where will you track issues and tasks?
232
+ - GitHub Issues (default, works with `/dev` and `/pm:*` out of the box)
233
+ - GitLab Issues
234
+ - Linear
235
+ - ClickUp
236
+ - Jira
237
+ - No issue tracker / other
238
+
195
239
  Build the stack map from answers. For "Undecided — recommend for me" answers, apply these defaults:
196
240
  - TypeScript + small/medium scale + web → Next.js + Prisma + PostgreSQL
197
241
  - TypeScript + API-only → Fastify + Drizzle
@@ -242,9 +286,21 @@ Files to update:
242
286
 
243
287
  **Content to populate:**
244
288
  - Project name from `package.json` `name` field (or ask for new projects)
245
- - Stack summary
289
+ - Stack summary (substitute `<!-- FRAMEWORK -->`, `<!-- ORM -->`, etc.)
246
290
  - Dev commands table (extracted from `package.json` `scripts` or language conventions)
247
291
  - Validation gate commands
292
+ - `<!-- VCS_PLATFORM -->` → detected `vcs_platform` (e.g. `GitLab`, `GitHub`, `Bitbucket`, `none`)
293
+ - `<!-- ISSUE_TRACKER -->` → detected `issue_tracker` (e.g. `GitHub Issues`, `GitLab Issues`, `ClickUp`, `Linear`, `Jira`, `none`)
294
+
295
+ **Tracker-aware commands note:** If `issue_tracker` is NOT `github-issues`, add a notice block after the Agent System table:
296
+
297
+ ```markdown
298
+ > **Note**: This project uses <!-- ISSUE_TRACKER --> for issue tracking. The `/dev` and `/pm:*` commands
299
+ > will read issue context from that tracker rather than GitHub Issues. Ensure the relevant MCP server
300
+ > or CLI tool is configured (see `.claude/settings.json`).
301
+ ```
302
+
303
+ Skip the notice block if `issue_tracker` is `github-issues` or `none`.
248
304
 
249
305
  ### 5c. Generate CLAUDE.local.md.example
250
306
 
@@ -333,6 +389,8 @@ Read existing settings.json. Preserve the `hooks` section verbatim. Replace only
333
389
  | Test runner | Jest |
334
390
  | E2E | Playwright |
335
391
  | Mobile | Capacitor |
392
+ | VCS | GitHub |
393
+ | Issue tracker | GitHub Issues |
336
394
 
337
395
  ### Files Generated/Updated
338
396
  - `.claude/agents/dev-backend.md` — Next.js + Prisma patterns
@@ -15,6 +15,8 @@
15
15
  | Test runner | <!-- TEST_RUNNER --> |
16
16
  | E2E | <!-- E2E_RUNNER --> |
17
17
  | Mobile | <!-- MOBILE --> |
18
+ | VCS | <!-- VCS_PLATFORM --> |
19
+ | Issue tracker | <!-- ISSUE_TRACKER --> |
18
20
 
19
21
  ## Development Commands
20
22
  | Task | Command |
@@ -51,13 +53,15 @@ This project uses the claude-dev-kit autonomous development pipeline:
51
53
  | Command | Purpose |
52
54
  |---------|---------|
53
55
  | `/init` | Re-run to refresh agents after stack changes |
54
- | `/pm:groom` | Groom GitHub issues with acceptance criteria |
56
+ | `/pm:groom` | Groom <!-- ISSUE_TRACKER --> issues with acceptance criteria |
55
57
  | `/pm:size` | Size stories for sprint planning |
56
58
  | `/pm:plan-epic` | Full epic plan: groom → size → PRPs |
57
59
  | `/dev <issue>` | Autonomous implementation: code → tests → review → PR |
58
60
  | `/dev:review` | Code review of current branch |
59
61
  | `/bs:brainstorm_full` | Multi-LLM brainstorming |
60
62
 
63
+ > **Issue tracker**: <!-- ISSUE_TRACKER --> — `/pm:groom` and `/dev` read issues from here.
64
+
61
65
  <!-- CDK:GENERATED:END -->
62
66
 
63
67
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-dev-kit",
3
- "version": "2.1.8",
3
+ "version": "2.2.0",
4
4
  "description": "Transform Claude Code into a fully autonomous development team — orchestrated sub-agents for planning, implementation, testing, and review.",
5
5
  "bin": {
6
6
  "claude-dev-kit": "./bin/claude-dev-kit.js"
@@ -48,6 +48,19 @@ make_temp_file() {
48
48
  mktemp "${TMPDIR:-/tmp}/cdk-temp.XXXXXX"
49
49
  }
50
50
 
51
+ extract_cdk_block() {
52
+ local source_file="$1"
53
+ local output_file="$2"
54
+ local start_marker="$3"
55
+ local end_marker="$4"
56
+
57
+ awk -v start="<!-- ${start_marker}" -v end="<!-- ${end_marker} -->" '
58
+ index($0, start) > 0 { in_block=1 }
59
+ in_block { print }
60
+ index($0, end) > 0 { in_block=0 }
61
+ ' "$source_file" > "$output_file"
62
+ }
63
+
51
64
  CI_MODE="${CI:-false}"
52
65
 
53
66
  # ─── Section 1: Load existing manifest ────────────────────────────────────────
@@ -381,38 +394,44 @@ merge_claude_md() {
381
394
  if grep -qF "$START_MARKER" "$tgt_md" 2>/dev/null; then
382
395
  # Has CDK markers — replace only the block between markers (inclusive)
383
396
  local tmp
397
+ local cdk_block
398
+ local before_block
399
+ local after_block
384
400
  tmp=$(make_temp_file)
401
+ cdk_block=$(make_temp_file)
402
+ before_block=$(make_temp_file)
403
+ after_block=$(make_temp_file)
385
404
  # shellcheck disable=SC2064
386
- trap "rm -f '$tmp'" RETURN
405
+ trap "rm -f '$tmp' '$cdk_block' '$before_block' '$after_block'" RETURN
387
406
 
388
- # Extract CDK block from template
389
- local cdk_block
390
- cdk_block=$(awk "/<!-- ${START_MARKER}/,/<!-- ${END_MARKER} -->/" "$cdk_template")
391
-
392
- # Build merged file: content before START + cdk block + content after END
393
- awk -v block="$cdk_block" \
394
- -v start="$START_MARKER" \
395
- -v end="$END_MARKER" \
396
- 'BEGIN { in_block=0; printed=0 }
397
- index($0, start) > 0 {
398
- if (!printed) { print block; printed=1 }
399
- in_block=1; next
400
- }
401
- in_block && index($0, end) > 0 { in_block=0; next }
402
- !in_block { print }
403
- ' "$tgt_md" > "$tmp"
407
+ extract_cdk_block "$cdk_template" "$cdk_block" "$START_MARKER" "$END_MARKER"
408
+
409
+ awk -v start="$START_MARKER" '
410
+ index($0, start) > 0 { exit }
411
+ { print }
412
+ ' "$tgt_md" > "$before_block"
413
+
414
+ awk -v end="$END_MARKER" '
415
+ found_end { print; next }
416
+ index($0, end) > 0 { found_end=1 }
417
+ ' "$tgt_md" > "$after_block"
418
+
419
+ cat "$before_block" "$cdk_block" "$after_block" > "$tmp"
404
420
 
405
421
  cp "$tmp" "$tgt_md"
406
422
  success "CLAUDE.md: CDK block updated (your custom content preserved)"
407
423
  else
408
424
  # No CDK markers — append the CDK block at the end
409
425
  local cdk_block
410
- cdk_block=$(awk "/<!-- ${START_MARKER}/,/<!-- ${END_MARKER} -->/" "$cdk_template")
426
+ cdk_block=$(make_temp_file)
427
+ # shellcheck disable=SC2064
428
+ trap "rm -f '$cdk_block'" RETURN
429
+ extract_cdk_block "$cdk_template" "$cdk_block" "$START_MARKER" "$END_MARKER"
411
430
  {
412
431
  echo ""
413
432
  echo "---"
414
433
  echo ""
415
- printf '%s\n' "$cdk_block"
434
+ cat "$cdk_block"
416
435
  } >> "$tgt_md"
417
436
  success "CLAUDE.md: CDK block appended (your existing content preserved)"
418
437
  info "Tip: you can move the appended block anywhere in the file — the markers let future migrations update it in place"