Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .claude/skills/dep-upgrade/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: dep-upgrade
description: Analyze a major version dependency upgrade: summarize breaking changes, assess project impact, and propose new features to adopt. Outputs a plan.md and executes the upgrade.
disable-model-invocation: true
argument-hint: '<package-name> <old-major> <new-major>'
---

Analyze and execute the major version upgrade for: $ARGUMENTS

1. **Analyze** — fetch the official migration guide via WebFetch; apply the checklist in [instructions.md](instructions.md)
2. **Generate plan** — create `docs/dev-notes/YYYY-MM-DD/{package}-upgrade/plan.md` with breaking changes, impact, and new features; **stop and ask for confirmation**
3. **Execute** — update `package.json`, run `pnpm install && pnpm lint && pnpm check && pnpm test:unit`; update the plan checklist when done
74 changes: 74 additions & 0 deletions .claude/skills/dep-upgrade/instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Dependency Major Upgrade Checklist

## 1. Breaking Changes Analysis

Fetch the official migration guide via WebFetch. For each breaking change, grep `src/`, config files,
and `package.json` to determine applicability. Produce two tables:

**問題なし(対応不要)**

| Confirmed Item | Rationale |
| -------------- | --------- |
| ... | ... |

**要対応**

| Item | Content | Risk |
| ---- | ------- | ------------------- |
| ... | ... | High / Medium / Low |

Key areas to check:

- Runtime requirements (`engines.node` in `package.json`)
- Config file format changes (flat config vs legacy, etc.)
- Deprecated/removed APIs used in `src/`
- Directive comments that become errors in the new version (e.g., `/* eslint-env */` in ESLint v10)

## 2. Companion Package Check

Some packages must be upgraded together in the same commit to avoid version mismatch.
Check `package.json` for known companion pairs:

- `@sveltejs/kit` + `@sveltejs/vite-plugin-svelte`
- `eslint` + `@eslint/js`

Also verify peer dependency compatibility (`"eslint": "^8 || ^9 || ^10"` style) for all
related packages already installed.

If companion packages are found, include them in the upgrade scope.

## 3. New Features to Adopt

List features unlocked by the new major version:

| Feature | Description | Recommendation |
| ------- | ----------- | ------------------- |
| ... | ... | High / Medium / Low |

## 4. plan.md Structure

Write `docs/dev-notes/YYYY-MM-DD/{package}-upgrade/plan.md` in Japanese:

- **概要**: Which Dependabot PR / bump triggered this; summary of scope
- **破壊的変更の影響調査結果**: Tables from sections 1–2 above
- **設計方針**: How to handle action-required items; companion package strategy
- **却下した代替案**: Alternatives considered (e.g., upgrading only one of a companion pair)
- **便利な新機能(採用検討)**: Table from section 3
- **実装フェーズ**: Phased `- [ ]` checklist (lowest risk → highest risk)
- **検証手順**: The exact commands to run

## 5. Verification Commands

```bash
pnpm install
pnpm lint
pnpm check
pnpm test:unit
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.

> **`pnpm check` tip:** If type errors appear and you have uncommitted changes, run
> `git stash && pnpm check 2>&1 | tail -5` to confirm whether errors are pre-existing.
> Restore with `git stash pop`. If there is nothing to stash, skip this check — without
> a baseline to compare against, it gives no useful signal.

Update the plan.md `- [ ]` checklist and add a verification results table when done.
26 changes: 21 additions & 5 deletions docs/guides/claude-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,27 @@ paths:

**本プロジェクトの skills(`.claude/skills/` および superpowers plugin):**

| スキル | 用途 |
| ---------------- | ------------------------------------------------------------------------------------------------------------ |
| `/writing-plans` | 新機能・追加実装の詳細計画を生成(2-5分単位のタスク分解)。superpowers plugin 提供 |
| `/refactor-plan` | Issue 番号またはパスを渡してリファクタリング計画を出力(実装はしない) |
| `/session-close` | セッション終了時のルーティン:テスト確認 → plan.md 更新 → rules 候補提示 → 肥大化チェック → 繰り返し指示検出 |
| スキル | 用途 |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `/writing-plans` | 新機能・追加実装の詳細計画を生成(2-5分単位のタスク分解)。superpowers plugin 提供 |
| `/refactor-plan` | Issue 番号またはパスを渡してリファクタリング計画を出力(実装はしない) |
| `/session-close` | セッション終了時のルーティン:テスト確認 → plan.md 更新 → rules 候補提示 → 肥大化チェック → 繰り返し指示検出 |
| `/dep-upgrade` | ライブラリのメジャーバージョンアップ分析:破壊的変更の整理・本プロジェクトへの影響・新機能提案 → plan.md 生成 → アップグレード実行 |

**`/dep-upgrade` の使い方:**

```bash
/dep-upgrade <package-name> <old-major> <new-major>
例: /dep-upgrade eslint 9 10
```

実行内容:

1. 公式マイグレーションガイドを WebFetch で取得
2. 破壊的変更を `src/` / 設定ファイルに対して grep し、問題なし / 要対応を分類
3. 同時更新が必要なコンパニオンパッケージを確認(例: `eslint` + `@eslint/js`)
4. 新バージョンで使える機能を推奨度付きで提案
5. `docs/dev-notes/YYYY-MM-DD/{package}-upgrade/plan.md` を生成し、確認後にアップグレードを実行

**`/writing-plans` と `/refactor-plan` の使い分け:**

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@dnd-kit/abstract": "0.3.2",
"@dnd-kit/dom": "0.3.2",
"@eslint/eslintrc": "3.3.5",
"@eslint/js": "9.39.4",
"@eslint/js": "10.0.1",
"@playwright/test": "1.58.2",
"@quramy/prisma-fabbrica": "2.3.3",
"@sveltejs/adapter-vercel": "6.3.3",
Expand All @@ -41,7 +41,7 @@
"@typescript-eslint/parser": "8.57.1",
"@vitest/coverage-v8": "4.0.18",
"@vitest/ui": "4.0.18",
"eslint": "9.39.2",
"eslint": "10.1.0",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-svelte": "3.16.0",
"flowbite": "3.1.2",
Expand Down
Loading
Loading