From f310e1ccdb42cc877a26fe64b1b3513982ab1894 Mon Sep 17 00:00:00 2001 From: "kuroeda.makoto" Date: Fri, 10 Oct 2025 06:03:00 +0900 Subject: [PATCH 1/9] feat: add Claude plugin configuration file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add .claude-plugin/plugin.json to define Tsumiki's Claude Code plugin integration, including metadata, commands, and agents paths for AI-driven development support 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .claude-plugin/plugin.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .claude-plugin/plugin.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..c4d281c --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "tsumiki", + "version": "0.0.6", + "description": "AI-driven development toolkit for TDD and SDD workflows, providing comprehensive command templates and agents to enhance developer productivity with Claude Code", + "author": { + "name": "makoto kuroeda", + "email": "kuroeda.makoto@classmethod.jp" + }, + "homepage": "https://github.com/classmethod/tsumiki", + "repository": "https://github.com/classmethod/tsumiki", + "license": "MIT", + "keywords": ["ai-development", "sdd", "tdd"], + "commands": "./commands", + "agents": "./agents" +} From 06d76e2d240047b578993d158253197944bd9a83 Mon Sep 17 00:00:00 2001 From: "kuroeda.makoto" Date: Fri, 10 Oct 2025 06:36:12 +0900 Subject: [PATCH 2/9] docs: update installation method to Claude Code Plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update README.md and MANUAL.md to recommend Plugin installation - Add /tsumiki: prefix to all command examples - Mark npx installation method as deprecated - Add marketplace.json for Plugin marketplace - Update all command samples throughout documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .claude-plugin/marketplace.json | 28 +++++++++++++ .claude-plugin/plugin.json | 4 +- MANUAL.md | 71 ++++++++++++++++++--------------- README.md | 53 +++++++++++++----------- 4 files changed, 99 insertions(+), 57 deletions(-) create mode 100644 .claude-plugin/marketplace.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..79f8828 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,28 @@ +{ + "name": "tsumiki", + "owner": { + "name": "makoto kuroeda", + "email": "kuroeda.makoto@classmethod.jp", + "url": "https://github.com/classmethod" + }, + "metadata": { + "description": "AI-driven development toolkit for TDD and SDD workflows, providing comprehensive command templates and agents to enhance developer productivity with Claude Code", + "version": "0.0.6" + }, + "plugins": [ + { + "name": "tsumiki", + "source": "./", + "description": "AI-driven development toolkit for TDD and SDD workflows, providing comprehensive command templates and agents to enhance developer productivity with Claude Code", + "version": "0.0.6", + "author": { + "name": "makoto kuroeda", + "email": "kuroeda.makoto@classmethod.jp" + }, + "homepage": "https://github.com/classmethod/tsumiki", + "repository": "https://github.com/classmethod/tsumiki", + "license": "MIT", + "keywords": ["ai-development", "sdd", "tdd"] + } + ] +} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index c4d281c..8c18ef1 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -10,6 +10,6 @@ "repository": "https://github.com/classmethod/tsumiki", "license": "MIT", "keywords": ["ai-development", "sdd", "tdd"], - "commands": "./commands", - "agents": "./agents" + "commands": "./commands/", + "agents": ["./agents/symbol-searcher.md"] } diff --git a/MANUAL.md b/MANUAL.md index 666cbd7..47a74fa 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -4,7 +4,17 @@ ### セットアップ -プロジェクトを使用する前に、まず `commands` ディレクトリの内容をClaudeのコマンドディレクトリにコピーします: +Claude Code Pluginを使用してTsumikiをインストールします: + +```bash +/plugin marketplace add https://github.com/classmethod/tsumiki.git +``` + +**注意**: Claude Code Pluginでインストールした場合、コマンドは `/tsumiki:` プレフィックス付きで実行します(例:`/tsumiki:kairo-requirements`)。 + +#### 非推奨:手動セットアップ + +以下の方法でも利用可能ですが、Plugin方式を推奨します: ```bash # プロジェクトのcommandsディレクトリを.claude/commandsにコピー @@ -40,25 +50,22 @@ TASK作成時に `TDD` と判定している場合で個別にTDDプロセスを ``` # TDD要件定義 -/tdd-requirements タスクファイル名 TASK番号 +/tsumiki:tdd-requirements タスクファイル名 TASK番号 # テストケース作成 -/tdd-testcases タスクファイル名 TASK番号 - -# テスト実装〜TDD完了確認まで自動化する場合 -/tdd-cycle-full.sh "タスクファイル名 TASK番号" +/tsumiki:tdd-testcases タスクファイル名 TASK番号 # テスト実装(Red) -/tdd-red タスクファイル名 TASK番号 +/tsumiki:tdd-red タスクファイル名 TASK番号 # 最小実装(Green) -/tdd-green タスクファイル名 TASK番号 +/tsumiki:tdd-green タスクファイル名 TASK番号 # リファクタリング -/tdd-refactor タスクファイル名 TASK番号 +/tsumiki:tdd-refactor タスクファイル名 TASK番号 # TDD完了確認 -/tdd-verify-complete タスクファイル名 TASK番号 +/tsumiki:tdd-verify-complete タスクファイル名 TASK番号 ``` ### DIRECTコマンド @@ -67,10 +74,10 @@ TASK作成時に `DIRECT` と判定している場合は、以下のコマンド ``` # DIRECT準備 -/direct-setup タスクファイル名 TASK番号 +/tsumiki:direct-setup タスクファイル名 TASK番号 # DIRECT検証 -/direct-verify タスクファイル名 TASK番号 +/tsumiki:direct-verify タスクファイル名 TASK番号 ``` ### Kairoコマンド(包括的フロー) @@ -80,9 +87,9 @@ TASK作成時に `DIRECT` と判定している場合は、以下のコマンド プロジェクトの技術スタック(フレームワーク、ライブラリ)を初期化します: ``` -/init-tech-stack - +/tsumiki:init-tech-stack ``` + init-tech-stack は以下を生成します: 生成されたファイル: `/docs/tech-stack.md` 配下 @@ -92,7 +99,7 @@ init-tech-stack は以下を生成します: 最初に、プロジェクトの要件概要をKairoに伝えます: ``` -/kairo-requirements 要件概要 +/tsumiki:kairo-requirements 要件概要 # プロンプト例: # "ECサイトの商品レビュー機能を実装したい。 @@ -113,7 +120,7 @@ Kairoは以下を生成します: 要件を確認・修正した後、設計を依頼します: ``` -/kairo-design(または省略可能) +/tsumiki:kairo-design(または省略可能) # 要件を承認済みであることを伝えてください ``` @@ -132,12 +139,12 @@ Kairoは以下を生成します: 設計を確認した後(承認は省略可)、タスク分割を実行します: ``` -/kairo-tasks +/tsumiki:kairo-tasks # 設計を承認したことを伝えてください(または省略可能) ``` -タスク内容の確認用に `/kairo-task-verify` を実行することをお勧めします。 +タスク内容の確認用に `/tsumiki:kairo-task-verify` を実行することをお勧めします。 Kairoは以下を生成します: - 依存関係を考慮したタスク一覧 @@ -153,10 +160,10 @@ Kairoは以下を生成します: ``` # 全タスクを順番に実装 -/kairo-implement +/tsumiki:kairo-implement # 特定のタスクのみ実装 -/kairo-implement タスクファイル名 TASK番号 +/tsumiki:kairo-implement タスクファイル名 TASK番号 # "TASK-101を実装してください" ``` @@ -174,16 +181,16 @@ Kairoは各タスクに対して内部的にTDDコマンドを使用して以下 ``` # 既存コードからタスク構造を分析 -/rev-tasks +/tsumiki:rev-tasks # 設計文書の逆生成(タスク分析後推奨) -/rev-design +/tsumiki:rev-design # テスト仕様書の逆生成(設計文書後推奨) -/rev-specs +/tsumiki:rev-specs # 要件定義書の逆生成(全分析完了後推奨) -/rev-requirements +/tsumiki:rev-requirements ``` #### リバースエンジニアリングの詳細 @@ -267,16 +274,16 @@ Kairoは各タスクに対して内部的にTDDコマンドを使用して以下 ```bash # プロジェクト全体の逆解析 -/rev-tasks +/tsumiki:rev-tasks # → タスク構造を把握 -/rev-design +/tsumiki:rev-design # → アーキテクチャと設計を文書化 -/rev-specs +/tsumiki:rev-specs # → テスト状況を分析して不足テストを特定 -/rev-requirements +/tsumiki:rev-requirements # → 最終的に要件定義書を生成 ``` @@ -308,15 +315,15 @@ Kairoは各タスクに対して内部的にTDDコマンドを使用して以下 ```mermaid flowchart TD - A[要件概要を伝える] --> B[kairo-requirements] + A[要件概要を伝える] --> B[tsumiki:kairo-requirements] B --> C{要件を確認} C -->|修正必要| B - C -->|OK| D[kairo-design] + C -->|OK| D[tsumiki:kairo-design] D --> E{設計を確認} E -->|修正必要| D - E -->|OK| F[kairo-tasks] + E -->|OK| F[tsumiki:kairo-tasks] F --> G{タスクを確認} - G -->|OK| H[kairo-implement] + G -->|OK| H[tsumiki:kairo-implement] H --> I{全タスク完了?} I -->|No| H I -->|Yes| J[プロジェクト完了] diff --git a/README.md b/README.md index 85fbc05..2aef74f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,19 @@ TsumikiはAI駆動開発のためのフレームワークです。要件定義 ## インストール -Tsumikiを使用するには、次のnpxコマンドでインストールしてください: +Tsumikiを使用するには、次のClaude Code Pluginコマンドでインストールしてください: + +```bash +/plugin marketplace add https://github.com/classmethod/tsumiki.git +``` + +このコマンドを実行すると、TsumikiのClaude Codeスラッシュコマンドとエージェントが自動的にインストールされます。 + +**注意**: Claude Code Pluginでインストールした場合、コマンドは `/tsumiki:` プレフィックス付きで実行します(例:`/tsumiki:kairo-requirements`)。 + +### 非推奨:npxによるインストール + +以下の方法でもインストール可能ですが、今後はClaude Code Plugin方式を推奨します: ```bash npx tsumiki install @@ -56,57 +68,52 @@ Kairoは要件定義から実装までの開発プロセスを自動化・支援 ## クイックスタート +**注意**: Claude Code Pluginでインストールした場合は、各コマンドの先頭に `tsumiki:` を付けてください(例:`/tsumiki:kairo-requirements`)。 + ### 包括的な開発フロー ```bash # 1. 技術スタック初期化 -/init-tech-stack +/tsumiki:init-tech-stack # 2. 要件定義 -/kairo-requirements +/tsumiki:kairo-requirements # 3. 設計 -/kairo-design +/tsumiki:kairo-design # 4. タスク分割 -/kairo-tasks +/tsumiki:kairo-tasks # 5. 実装 -/kairo-implement +/tsumiki:kairo-implement ``` ### 個別TDDプロセス ```bash -/tdd-requirements -/tdd-testcases -/tdd-red -/tdd-green -/tdd-refactor -/tdd-verify-complete +/tsumiki:tdd-requirements +/tsumiki:tdd-testcases +/tsumiki:tdd-red +/tsumiki:tdd-green +/tsumiki:tdd-refactor +/tsumiki:tdd-verify-complete ``` ### リバースエンジニアリング ```bash # 1. 既存コードからタスク構造を分析 -/rev-tasks +/tsumiki:rev-tasks # 2. 設計文書の逆生成(タスク分析後推奨) -/rev-design +/tsumiki:rev-design # 3. テスト仕様書の逆生成(設計文書後推奨) -/rev-specs +/tsumiki:rev-specs # 4. 要件定義書の逆生成(全分析完了後推奨) -/rev-requirements -``` - -### 開発環境のクリーンアップ - -```bash -# 開発環境をクリーンアップ -/clear +/tsumiki:rev-requirements ``` ## Claude Code以外のツールでtsumikiを使用する From 114e7d23fd53b4dcd6875fd80ec79f0d2dba0947 Mon Sep 17 00:00:00 2001 From: "kuroeda.makoto" Date: Fri, 10 Oct 2025 10:09:58 +0900 Subject: [PATCH 3/9] docs: add /tsumiki: prefix to command references in commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update command references in auto-debug.md - Update command references in tdd-*.md files - Update command references in usage examples - Ensure consistency with Claude Code Plugin format 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- commands/auto-debug.md | 2 +- commands/tdd-load-context.md | 2 +- commands/tdd-red.md | 4 ++-- commands/tdd-refactor.md | 2 +- commands/tdd-testcases.md | 2 +- commands/tdd-verify-complete.md | 8 ++++---- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/commands/auto-debug.md b/commands/auto-debug.md index ccca41e..bcc19c3 100644 --- a/commands/auto-debug.md +++ b/commands/auto-debug.md @@ -6,7 +6,7 @@ description: テストエラーを解消するための自動デバッグプロ 最初に全テストケースの確認をタスク実行してテストケースのエラーをtodoにセットして 各対象毎に以下の作業を実施して   - タスクで詳細にテストのエラー原因を調る -  - 新たなタスクで /tdd-green を使って修正する +  - 新たなタスクで /tsumiki:tdd-green を使って修正する 最後に全体のテストの成功率を確認してレポートして ゴールはテストケースの成功数を上げること NEVER: テストのスキップ diff --git a/commands/tdd-load-context.md b/commands/tdd-load-context.md index 4f65666..7b3a720 100644 --- a/commands/tdd-load-context.md +++ b/commands/tdd-load-context.md @@ -104,7 +104,7 @@ description: TDD関連ファイル読み込み・コンテキスト準備を行 開発コンテキストの準備を行います: -**Taskツール実行**: `/tdd-load-context` でTDD関連ファイルの読み込み・探索とコンテキスト準備を実行 +**Taskツール実行**: `/tsumiki:tdd-load-context` でTDD関連ファイルの読み込み・探索とコンテキスト準備を実行 読み込み完了後、準備されたコンテキスト情報を基に{現在のフェーズ}の作業を開始します。 ``` diff --git a/commands/tdd-red.md b/commands/tdd-red.md index a8a0367..0548984 100644 --- a/commands/tdd-red.md +++ b/commands/tdd-red.md @@ -390,7 +390,7 @@ npx cypress run --browser chrome - アサーション: 適切 - 実装方針: 明確 5. **次のステップ表示**: 判定結果に関わらず、次のお勧めコマンドを表示 - - 「次のお勧めステップ: `/tdd-green` でGreenフェーズ(最小実装)を開始します。」 + - 「次のお勧めステップ: `/tsumiki:tdd-green` でGreenフェーズ(最小実装)を開始します。」 ## TDDメモファイル形式 @@ -509,4 +509,4 @@ npx cypress run --browser chrome - 次のフェーズ「Greenフェーズ(最小実装)」をTODOに追加 ``` -次のステップ: `/tdd-green` でテストを通すための最小限の実装を行います。 +次のステップ: `/tsumiki:tdd-green` でテストを通すための最小限の実装を行います。 diff --git a/commands/tdd-refactor.md b/commands/tdd-refactor.md index bf9f74b..1fdcfcd 100644 --- a/commands/tdd-refactor.md +++ b/commands/tdd-refactor.md @@ -282,7 +282,7 @@ function add(firstNumber, secondNumber) { - リファクタ品質: 目標が達成されている - コード品質: 適切なレベルに向上 5. **次のステップ表示**: 判定結果に関わらず、次のお勧めコマンドを表示 - - 「次のお勧めステップ: `/tdd-verify-complete` で完全性検証を実行します。」 + - 「次のお勧めステップ: `/tsumiki:tdd-verify-complete` で完全性検証を実行します。」 ## 品質判定基準 diff --git a/commands/tdd-testcases.md b/commands/tdd-testcases.md index 8d6042f..1205947 100644 --- a/commands/tdd-testcases.md +++ b/commands/tdd-testcases.md @@ -167,7 +167,7 @@ afterEach(() => { - 技術選択: プログラミング言語・テストフレームワークが確定 - 実装可能性: 現在の技術スタックで実現可能 4. **次のステップ表示**: 判定結果に関わらず、次のお勧めコマンドを表示 - - 「次のお勧めステップ: `/tdd-red` でRedフェーズ(失敗テスト作成)を開始します。」 + - 「次のお勧めステップ: `/tsumiki:tdd-red` でRedフェーズ(失敗テスト作成)を開始します。」 ## 品質判定基準 diff --git a/commands/tdd-verify-complete.md b/commands/tdd-verify-complete.md index d3401df..970ca24 100644 --- a/commands/tdd-verify-complete.md +++ b/commands/tdd-verify-complete.md @@ -229,7 +229,7 @@ TDD開発でテストケースの実装が完全に完了しているかを検 - テスト成功率: 100% - 品質基準: 達成 -次のお勧めステップ: `/tdd-cycle` で次のTDDサイクルを開始します。 +次のお勧めステップ: `/tsumiki:tdd-cycle` で次のTDDサイクルを開始します。 ``` **メモファイル記録**: 検証結果をメモファイルに自動追記する。 @@ -355,11 +355,11 @@ TDD開発でテストケースの実装が完全に完了しているかを検 ```bash # refactorフェーズ後に自動実行 -/tdd-refactor +/tsumiki:tdd-refactor # ↓ 自動実行 -/tdd-verify-complete +/tsumiki:tdd-verify-complete # ↓ 実装完全なら自動実行 -/tdd-cycle +/tsumiki:tdd-cycle ``` ## 出力形式 From 136fe36560abb9fada4a064eba89e9e822bb6651 Mon Sep 17 00:00:00 2001 From: "kuroeda.makoto" Date: Fri, 10 Oct 2025 10:18:12 +0900 Subject: [PATCH 4/9] docs: update command references to use /tsumiki: prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update @task references in kairo-implement.md to use /tsumiki: prefix - Update command references in kairo-tasks.md - Update prerequisite references in rev-*.md and direct-*.md files - Keep /{taskID}/ path placeholders unchanged (not commands) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- commands/direct-setup.md | 2 +- commands/direct-verify.md | 2 +- commands/kairo-implement.md | 52 ++++++++++++++++++------------------ commands/kairo-tasks.md | 16 +++++------ commands/rev-design.md | 2 +- commands/rev-requirements.md | 2 +- commands/rev-specs.md | 2 +- 7 files changed, 39 insertions(+), 39 deletions(-) diff --git a/commands/direct-setup.md b/commands/direct-setup.md index 6b36a48..e9c9f88 100644 --- a/commands/direct-setup.md +++ b/commands/direct-setup.md @@ -143,7 +143,7 @@ psql -d mydb -f database-schema.sql ## 次のステップ -- `direct-verify.md` を実行して設定を確認 +- `/tsumiki:direct-verify` を実行して設定を確認 - 必要に応じて設定の調整を実施 ## 実行後の確認 diff --git a/commands/direct-verify.md b/commands/direct-verify.md index b47f55f..edb9267 100644 --- a/commands/direct-verify.md +++ b/commands/direct-verify.md @@ -10,7 +10,7 @@ DIRECTタスクで実行した設定作業の動作確認とテストを行い ## 前提条件 -- `direct-setup.md` が実行済み +- `/tsumiki:direct-setup` が実行済み - タスクIDが提供されている - 設定作業の記録が存在する diff --git a/commands/kairo-implement.md b/commands/kairo-implement.md index a3b60df..4011d87 100644 --- a/commands/kairo-implement.md +++ b/commands/kairo-implement.md @@ -61,57 +61,57 @@ description: 分割されたタスクを順番に、またはユーザが指定 ### A. **TDDプロセス**(コード実装タスク用) - a. **要件定義** - `@task general-purpose tdd-requirements.md` + a. **要件定義** - `@task general-purpose /tsumiki:tdd-requirements` ``` Task実行: TDD要件定義フェーズ 目的: タスクの詳細要件を記述し、受け入れ基準を明確化する - コマンド: tdd-requirements.md + コマンド: /tsumiki:tdd-requirements 実行方式: 個別Task実行 ``` - b. **テストケース作成** - `@task general-purpose tdd-testcases.md` + b. **テストケース作成** - `@task general-purpose /tsumiki:tdd-testcases` ``` Task実行: TDDテストケース作成フェーズ 目的: 単体テストケースを作成し、エッジケースを考慮する - コマンド: tdd-testcases.md + コマンド: /tsumiki:tdd-testcases 実行方式: 個別Task実行 ``` - c. **テスト実装** - `@task general-purpose tdd-red.md` + c. **テスト実装** - `@task general-purpose /tsumiki:tdd-red` ``` Task実行: TDDレッドフェーズ 目的: 失敗するテストを実装し、テストが失敗することを確認する - コマンド: tdd-red.md + コマンド: /tsumiki:tdd-red 実行方式: 個別Task実行 ``` - d. **最小実装** - `@task general-purpose tdd-green.md` + d. **最小実装** - `@task general-purpose /tsumiki:tdd-green` ``` Task実行: TDDグリーンフェーズ 目的: テストが通る最小限の実装を行い、過度な実装を避ける - コマンド: tdd-green.md + コマンド: /tsumiki:tdd-green 実行方式: 個別Task実行 ``` - e. **リファクタリング** - `@task general-purpose tdd-refactor.md` + e. **リファクタリング** - `@task general-purpose /tsumiki:tdd-refactor` ``` Task実行: TDDリファクタリングフェーズ 目的: コードの品質向上と保守性の改善を行う - コマンド: tdd-refactor.md + コマンド: /tsumiki:tdd-refactor 実行方式: 個別Task実行 ``` - f. **品質確認** - `@task general-purpose tdd-verify-complete.md` + f. **品質確認** - `@task general-purpose /tsumiki:tdd-verify-complete` ``` Task実行: TDD品質確認フェーズ 目的: 実装の完成度を確認し、不足があればc-fを繰り返す - コマンド: tdd-verify-complete.md + コマンド: /tsumiki:tdd-verify-complete 実行方式: 個別Task実行 ``` ### B. **直接作業プロセス**(準備作業タスク用) - a. **準備作業の実行** - `@task general-purpose direct-setup.md` + a. **準備作業の実行** - `@task general-purpose /tsumiki:direct-setup` ``` Task実行: 直接作業実行フェーズ 目的: ディレクトリ作成、設定ファイル作成、依存関係のインストール、環境設定を行う @@ -123,7 +123,7 @@ description: 分割されたタスクを順番に、またはユーザが指定 実行方式: 個別Task実行 ``` - b. **作業結果の確認** - `@task general-purpose direct-verify.md` + b. **作業結果の確認** - `@task general-purpose /tsumiki:direct-verify` ``` Task実行: 直接作業確認フェーズ 目的: 作業完了の検証と成果物確認を行う @@ -225,16 +225,16 @@ $ claude code kairo-implement --status ```bash # TDDプロセスの場合 -@task general-purpose tdd-requirements.md -@task general-purpose tdd-testcases.md -@task general-purpose tdd-red.md -@task general-purpose tdd-green.md -@task general-purpose tdd-refactor.md -@task general-purpose tdd-verify-complete.md +@task general-purpose /tsumiki:tdd-requirements +@task general-purpose /tsumiki:tdd-testcases +@task general-purpose /tsumiki:tdd-red +@task general-purpose /tsumiki:tdd-green +@task general-purpose /tsumiki:tdd-refactor +@task general-purpose /tsumiki:tdd-verify-complete # 直接作業プロセスの場合 -@task general-purpose direct-setup.md -@task general-purpose direct-verify.md +@task general-purpose /tsumiki:direct-setup +@task general-purpose /tsumiki:direct-verify ``` ## 実装時の注意事項 @@ -300,22 +300,22 @@ $ claude code kairo-implement --status ### 各ステップ完了時(TDD) ``` -✅ Task 1/6: @task tdd-requirements 完了 +✅ Task 1/6: @task /tsumiki:tdd-requirements 完了 ファイル: docs/implements/{要件名}/{{task_id}}/{要件名}-requirements.md Task実行結果: 要件定義書作成完了 -🏃 Task 2/6: @task tdd-testcases 実行中... +🏃 Task 2/6: @task /tsumiki:tdd-testcases 実行中... Task実行: TDDテストケース作成フェーズを開始 ``` ### 各ステップ完了時(直接作業) ``` -✅ Task 1/2: @task direct-work-execute 完了 +✅ Task 1/2: @task /tsumiki:direct-setup 完了 作成ファイル: 8個、設定更新: 3個 Task実行結果: 準備作業実行完了 -🏃 Task 2/2: @task direct-work-verify 実行中... +🏃 Task 2/2: @task /tsumiki:direct-verify 実行中... Task実行: 直接作業確認フェーズを開始 ``` diff --git a/commands/kairo-tasks.md b/commands/kairo-tasks.md index 9fcd071..6ecc275 100644 --- a/commands/kairo-tasks.md +++ b/commands/kairo-tasks.md @@ -139,16 +139,16 @@ description: 設計文書に基づいて実装タスクを1日単位の粒度で ## タスクプロセス定義 ### TDDタスク -1. `tdd-requirements.md` - 詳細要件定義 -2. `tdd-testcases.md` - テストケース作成 -3. `tdd-red.md` - テスト実装(失敗) -4. `tdd-green.md` - 最小実装 -5. `tdd-refactor.md` - リファクタリング -6. `tdd-verify-complete.md` - 品質確認 +1. `/tsumiki:tdd-requirements` - 詳細要件定義 +2. `/tsumiki:tdd-testcases` - テストケース作成 +3. `/tsumiki:tdd-red` - テスト実装(失敗) +4. `/tsumiki:tdd-green` - 最小実装 +5. `/tsumiki:tdd-refactor` - リファクタリング +6. `/tsumiki:tdd-verify-complete` - 品質確認 ### DIRECTタスク -1. `direct-setup.md` - 直接実装・設定 -2. `direct-verify.md` - 動作確認・品質確認 +1. `/tsumiki:direct-setup` - 直接実装・設定 +2. `/tsumiki:direct-verify` - 動作確認・品質確認 ## 実行フロー diff --git a/commands/rev-design.md b/commands/rev-design.md index ef5ae82..49b5c91 100644 --- a/commands/rev-design.md +++ b/commands/rev-design.md @@ -12,7 +12,7 @@ description: 既存のコードベースから技術設計文書を逆生成し - 分析対象のコードベースが存在する - `docs/reverse/` ディレクトリが存在する(なければ作成) -- 可能であれば事前に `rev-tasks.md` を実行済み +- 可能であれば事前に `/tsumiki:rev-tasks` を実行済み ## 実行内容 diff --git a/commands/rev-requirements.md b/commands/rev-requirements.md index 7d5415c..54e3ba8 100644 --- a/commands/rev-requirements.md +++ b/commands/rev-requirements.md @@ -12,7 +12,7 @@ description: 既存のコードベースから要件定義書を逆生成しま - 分析対象のコードベースが存在する - `docs/reverse/` ディレクトリが存在する(なければ作成) -- 可能であれば事前に `rev-tasks.md` および `rev-design.md` を実行済み +- 可能であれば事前に `/tsumiki:rev-tasks` および `/tsumiki:rev-design` を実行済み ## 実行内容 diff --git a/commands/rev-specs.md b/commands/rev-specs.md index 0c1800f..b4e1db6 100644 --- a/commands/rev-specs.md +++ b/commands/rev-specs.md @@ -12,7 +12,7 @@ description: 既存のコードベースから包括的なテストケースと - 分析対象のコードベースが存在する - `docs/reverse/` ディレクトリが存在する(なければ作成) -- 可能であれば事前に `rev-requirements.md`, `rev-design.md` を実行済み +- 可能であれば事前に `/tsumiki:rev-requirements`, `/tsumiki:rev-design` を実行済み ## 実行内容 From af716af107cbf08981360b1fff407f5585c7345c Mon Sep 17 00:00:00 2001 From: "kuroeda.makoto" Date: Fri, 10 Oct 2025 14:35:35 +0900 Subject: [PATCH 5/9] refactor: remove npx CLI functionality and migrate to plugin-only distribution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove all npx-related code and build infrastructure as Tsumiki is now distributed exclusively via Claude Code Plugin marketplace. Changes: - Delete src/ directory (CLI implementation) - Delete build configuration (tsup.config.ts, tsconfig.json) - Remove build-related dependencies from package.json - Update documentation to remove npx installation instructions - Simplify project structure to plugin-only distribution 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- CLAUDE.md | 49 ++++----- CONTRIBUTING.md | 23 +--- MANUAL.md | 18 +--- README.md | 15 +-- package.json | 56 ++-------- src/cli.ts | 30 ------ src/commands/gitignore.tsx | 212 ------------------------------------- src/commands/install.tsx | 161 ---------------------------- src/commands/uninstall.tsx | 180 ------------------------------- tsconfig.json | 13 --- tsup.config.ts | 14 --- 11 files changed, 43 insertions(+), 728 deletions(-) delete mode 100644 src/cli.ts delete mode 100644 src/commands/gitignore.tsx delete mode 100644 src/commands/install.tsx delete mode 100644 src/commands/uninstall.tsx delete mode 100644 tsconfig.json delete mode 100644 tsup.config.ts diff --git a/CLAUDE.md b/CLAUDE.md index 3d823a8..46a099d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## 概要 -TsumikiはAI駆動開発フレームワークのコマンドテンプレートを提供するCLIツールです。このプロジェクトはTypeScript + ReactをInkで構成されたCLIアプリケーションで、Claude Code用のコマンドテンプレートをユーザーの`.claude/commands/`ディレクトリにインストールします。 +TsumikiはAI駆動開発フレームワークです。Claude Code Plugin経由でインストールされ、要件定義から実装までのAI支援開発プロセスを提供します。 + +このリポジトリには以下が含まれています: +- **`commands/`**: Claude Codeスラッシュコマンド用のテンプレートファイル(`.md`と`.sh`) +- **`agents/`**: Claude Codeエージェント用の定義ファイル(`.md`) +- **`.claude-plugin/`**: Claude Code Plugin設定ファイル ## 開発コマンド @@ -12,14 +17,9 @@ TsumikiはAI駆動開発フレームワークのコマンドテンプレート # 開発環境 pnpm install # 依存関係のインストール -# ビルド -pnpm build # プロジェクトをビルドし、commandsディレクトリをdist/にコピー -pnpm build:run # ビルド後、CLI実行(テスト用) - # コード品質 -pnpm check # Biomeでコードチェック +pnpm check # Biomeでコードチェック(commands/とagents/) pnpm fix # Biomeで自動修正 -pnpm typecheck # TypeScriptの型チェック(tsgoを使用) pnpm secretlint # シークレット情報の検査 # pre-commitフック @@ -28,40 +28,35 @@ pnpm prepare # simple-git-hooksのセットアップ ## プロジェクト構造 -- **`src/cli.ts`**: CLIエントリーポイント、commanderを使用してコマンド定義 -- **`src/commands/install.tsx`**: React + Inkを使用したインストールコマンドのUI実装 - **`commands/`**: TsumikiのAI開発フレームワーク用Claude Codeコマンドテンプレート(`.md`と`.sh`ファイル) -- **`dist/`**: ビルド出力、`dist/commands/`にテンプレートがコピーされる +- **`agents/`**: Claude Codeエージェント定義(`.md`ファイル) +- **`.claude-plugin/`**: Claude Code Plugin設定(marketplace.json, plugin.json) +- **`book/`**: 開発ガイドとドキュメント ## 技術スタック -- **CLI Framework**: Commander.js -- **UI Framework**: React + Ink(CLIでのReactレンダリング) -- **Build Tool**: tsup(TypeScript + ESBuildベース) - **Code Quality**: Biome(リンタ・フォーマッタ) -- **TypeScript**: tsgo(高速型チェック) +- **Security**: secretlint(機密情報検査) - **Package Manager**: pnpm +- **Distribution**: Claude Code Plugin Marketplace -## ビルドプロセス +## インストール方法 -ビルド時(`pnpm build`)は以下の処理が実行されます: -1. `dist`ディレクトリをクリーンアップ -2. `dist/commands`ディレクトリを作成 -3. `commands/`内の`.md`と`.sh`ファイルを`dist/commands/`にコピー -4. tsupでTypeScriptコードをESMとCJSの両形式でビルド +ユーザーは以下のコマンドでTsumikiをインストールします: -## インストール動作 +```bash +/plugin marketplace add https://github.com/classmethod/tsumiki.git +``` -`tsumiki install`コマンドは以下を実行します: -1. 現在のディレクトリに`.claude/commands/`ディレクトリを作成 -2. ビルド済みの`dist/commands/`から全ての`.md`と`.sh`ファイルをコピー -3. React + Inkでプログレス表示とファイル一覧を表示 +Claude Code Pluginが自動的に: +1. リポジトリから`commands/`と`agents/`のファイルを読み込み +2. `.claude-plugin/plugin.json`の設定に従ってコマンドとエージェントを登録 +3. `/tsumiki:` プレフィックス付きでコマンドを使用可能にする ## 品質管理 Pre-commitフックで以下が自動実行されます: - `pnpm secretlint`: 機密情報のチェック -- `pnpm typecheck`: 型チェック - `pnpm fix`: コードの自動修正 -コード修正時は必ず`pnpm check`と`pnpm typecheck`を実行してからコミットしてください。 \ No newline at end of file +コマンドファイル(`.md`)やエージェント定義(`.md`)を修正する際は、必ず`pnpm check`を実行してからコミットしてください。 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a925f1..9acb15c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,9 +52,6 @@ git checkout -b feature/your-feature-name 3. コード品質チェックを実行します: ```bash -# 型チェック -pnpm typecheck - # コードチェック pnpm check @@ -65,13 +62,7 @@ pnpm fix pnpm secretlint ``` -4. ビルドテストを実行します: - -```bash -pnpm build:run -``` - -5. 変更をコミットします: +4. 変更をコミットします: ```bash git add . @@ -104,7 +95,6 @@ docs: update README with new command examples Pre-commitフックで以下が自動実行されます: - **secretlint**: 機密情報(APIキー、パスワードなど)の混入チェック -- **typecheck**: TypeScriptの型チェック - **fix**: Biomeによるコードの自動修正 ### 手動チェック @@ -113,7 +103,7 @@ Pre-commitフックで以下が自動実行されます: ```bash # 全てのチェックを実行 -pnpm typecheck && pnpm check && pnpm secretlint +pnpm check && pnpm secretlint # コードの自動修正 pnpm fix @@ -123,12 +113,10 @@ pnpm fix ``` tsumiki/ -├── src/ -│ ├── cli.ts # CLIエントリーポイント -│ └── commands/ -│ └── install.tsx # インストールコマンドのUI実装 +├── .claude-plugin/ # Claude Code Plugin設定 ├── commands/ # コマンドテンプレート(.md, .sh) -├── dist/ # ビルド出力 +├── agents/ # エージェント定義(.md) +├── book/ # ドキュメント ├── package.json ├── CLAUDE.md # プロジェクト指示書 └── README.md @@ -153,7 +141,6 @@ git push origin feature/your-feature-name - [ ] 変更内容が明確に説明されている - [ ] 関連するIssueがリンクされている(該当する場合) - [ ] コード品質チェックが通っている -- [ ] ビルドが成功している - [ ] 機密情報が含まれていない ## Issue報告 diff --git a/MANUAL.md b/MANUAL.md index 47a74fa..ddc3277 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -8,24 +8,12 @@ Claude Code Pluginを使用してTsumikiをインストールします: ```bash /plugin marketplace add https://github.com/classmethod/tsumiki.git +/plugin install tsumiki@tsumiki ``` -**注意**: Claude Code Pluginでインストールした場合、コマンドは `/tsumiki:` プレフィックス付きで実行します(例:`/tsumiki:kairo-requirements`)。 +**注意**: コマンドは `/tsumiki:` プレフィックス付きで実行します(例:`/tsumiki:kairo-requirements`)。 -#### 非推奨:手動セットアップ - -以下の方法でも利用可能ですが、Plugin方式を推奨します: - -```bash -# プロジェクトのcommandsディレクトリを.claude/commandsにコピー -cp -r commands ~/.claude/commands/ - -# または、プロジェクトディレクトリ内で -mkdir -p .claude -cp -r commands .claude/ -``` - -#### オプション:プロジェクト固有のルール設定 +#### プロジェクト固有のルール設定 セットアップ後、プロジェクト固有のルールや設定を追加できます。 `docs/rule/{種類1}/{種類2}` ディレクトリ構造でファイルを配置すると、対応するコマンド実行時に自動で読み込まれます。 diff --git a/README.md b/README.md index 2aef74f..8664c84 100644 --- a/README.md +++ b/README.md @@ -10,21 +10,12 @@ Tsumikiを使用するには、次のClaude Code Pluginコマンドでインス ```bash /plugin marketplace add https://github.com/classmethod/tsumiki.git +/plugin install tsumiki@tsumiki ``` このコマンドを実行すると、TsumikiのClaude Codeスラッシュコマンドとエージェントが自動的にインストールされます。 -**注意**: Claude Code Pluginでインストールした場合、コマンドは `/tsumiki:` プレフィックス付きで実行します(例:`/tsumiki:kairo-requirements`)。 - -### 非推奨:npxによるインストール - -以下の方法でもインストール可能ですが、今後はClaude Code Plugin方式を推奨します: - -```bash -npx tsumiki install -``` - -このコマンドを実行すると、`.claude/commands/` にTsumikiのClaude Codeスラッシュコマンドがインストールされます。 +**注意**: コマンドは `/tsumiki:` プレフィックス付きで実行します(例:`/tsumiki:kairo-requirements`)。 ## 概要 @@ -120,7 +111,7 @@ Kairoは要件定義から実装までの開発プロセスを自動化・支援 [rulesync](https://github.com/dyoshikawa/rulesync)を組み合わせて使用することで、Claude Code以外のツールでもtsumikiのコマンドを使用できます。 -`tsumiki install` 後、プロジェクトルートで以下のコマンドを実行します。 +プロジェクトルートで以下のコマンドを実行します。 ``` npx -y rulesync init diff --git a/package.json b/package.json index b5d399a..fac5c6e 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,14 @@ "name": "tsumiki", "private": false, "version": "0.0.6", - "description": "A CLI tool for install tsumiki commands", + "description": "AI-driven development framework for Claude Code", "keywords": [ - "cli", "tsumiki", "claude", "claudecode", - "ai" + "ai", + "tdd", + "plugin" ], "homepage": "https://github.com/classmethod/tsumiki#readme", "bugs": { @@ -22,57 +23,20 @@ "author": { "name": "classmethod" }, - "type": "module", - "exports": { - ".": { - "types": "./dist/cli.d.ts", - "import": "./dist/cli.js", - "require": "./dist/cli.cjs" - } - }, - "main": "./dist/cli.cjs", - "module": "./dist/cli.js", - "types": "./dist/cli.d.ts", - "bin": { - "tsumiki": "./dist/cli.js" - }, - "files": [ - "dist" - ], "scripts": { - "build": "rm -rf dist && mkdir -p dist/commands dist/agents && cp ./commands/*.md ./commands/*.sh dist/commands/ 2>/dev/null || true && cp ./agents/*.md dist/agents/ 2>/dev/null || true && tsup", - "build:run": "pnpm build && node dist/cli.js", - "check": "biome check src", - "fix": "biome check src --write", + "check": "biome check commands agents", + "fix": "biome check commands agents --write", "prepare": "simple-git-hooks", - "secretlint": "secretlint --secretlintignore .gitignore **/*", - "typecheck": "tsgo --noEmit" + "secretlint": "secretlint --secretlintignore .gitignore **/*" }, "simple-git-hooks": { - "pre-commit": "pnpm secretlint && pnpm typecheck && pnpm fix" - }, - "dependencies": { - "commander": "14.0.0", - "fs-extra": "11.3.0", - "ink": "6.1.0", - "react": "19.1.1" + "pre-commit": "pnpm secretlint && pnpm fix" }, "devDependencies": { "@biomejs/biome": "2.1.3", "@secretlint/secretlint-rule-preset-recommend": "10.2.1", - "@tsconfig/node24": "24.0.1", - "@types/fs-extra": "11.0.4", - "@types/node": "24.1.0", - "@types/react": "19.1.9", - "@typescript/native-preview": "7.0.0-dev.20250729.2", "secretlint": "10.2.1", - "simple-git-hooks": "2.13.0", - "tsup": "8.5.0", - "tsx": "4.20.3", - "typescript": "5.8.3" + "simple-git-hooks": "2.13.0" }, - "packageManager": "pnpm@10.13.1", - "engines": { - "node": ">=18.0.0" - } + "packageManager": "pnpm@10.13.1" } diff --git a/src/cli.ts b/src/cli.ts deleted file mode 100644 index e3653fb..0000000 --- a/src/cli.ts +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node - -import { Command } from "commander"; -import { gitignoreCommand } from "./commands/gitignore.js"; -import { installCommand } from "./commands/install.js"; -import { uninstallCommand } from "./commands/uninstall.js"; - -const program = new Command(); - -program - .name("tsumiki") - .description("CLI tool for installing Claude Code command templates") - .version("1.0.0"); - -program - .command("install") - .description("Install Claude Code command templates to .claude/commands/") - .action(installCommand); - -program - .command("uninstall") - .description("Uninstall Claude Code command templates from .claude/commands/") - .action(uninstallCommand); - -program - .command("gitignore") - .description("Add commands/*.{md,sh} to .gitignore file") - .action(gitignoreCommand); - -program.parse(); diff --git a/src/commands/gitignore.tsx b/src/commands/gitignore.tsx deleted file mode 100644 index 3ddf50b..0000000 --- a/src/commands/gitignore.tsx +++ /dev/null @@ -1,212 +0,0 @@ -import * as path from "node:path"; -import { fileURLToPath } from "node:url"; -import fs from "fs-extra"; -import { Box, Newline, render, Text } from "ink"; -import React, { useEffect, useState } from "react"; - -type GitignoreStatus = - | "starting" - | "checking" - | "updating" - | "completed" - | "skipped" - | "error"; - -const GitignoreComponent: React.FC = () => { - const [status, setStatus] = useState("starting"); - const [addedRules, setAddedRules] = useState([]); - const [skippedRules, setSkippedRules] = useState([]); - const [error, setError] = useState(null); - - useEffect(() => { - const performGitignoreUpdate = async (): Promise => { - try { - setStatus("checking"); - - const currentDir = process.cwd(); - const gitignorePath = path.join(currentDir, ".gitignore"); - - // tsumikiのcommandsディレクトリを取得 - const __filename = fileURLToPath(import.meta.url); - const __dirname = path.dirname(__filename); - // ビルド後はdist/commandsを参照(cli.jsがdist/にあるため) - const tsumikiDir = path.join(__dirname, "commands"); - - // commandsディレクトリ内のすべての.mdファイルと.shファイルを取得 - const files = await fs.readdir(tsumikiDir); - const targetFiles = files.filter( - (file) => file.endsWith(".md") || file.endsWith(".sh"), - ); - - // 具体的なファイルパスをルールとして作成 - const rulesToAdd = targetFiles.map( - (file) => `.claude/commands/${file}`, - ); - - let gitignoreContent = ""; - let gitignoreExists = false; - - try { - gitignoreContent = await fs.readFile(gitignorePath, "utf-8"); - gitignoreExists = true; - } catch { - gitignoreExists = false; - } - - const existingLines = gitignoreContent - .split("\n") - .map((line) => line.trim()); - const rulesToActuallyAdd: string[] = []; - const rulesAlreadyExist: string[] = []; - - for (const rule of rulesToAdd) { - if (existingLines.includes(rule)) { - rulesAlreadyExist.push(rule); - } else { - rulesToActuallyAdd.push(rule); - } - } - - if (rulesToActuallyAdd.length === 0) { - setSkippedRules(rulesAlreadyExist); - setStatus("skipped"); - setTimeout(() => { - process.exit(0); - }, 2000); - return; - } - - setStatus("updating"); - - let newContent = gitignoreContent; - if ( - gitignoreExists && - gitignoreContent.length > 0 && - !gitignoreContent.endsWith("\n") - ) { - newContent += "\n"; - } - - if (gitignoreExists && gitignoreContent.length > 0) { - newContent += "\n# Tsumiki command templates\n"; - } else { - newContent = "# Tsumiki command templates\n"; - } - - for (const rule of rulesToActuallyAdd) { - newContent += `${rule}\n`; - } - - await fs.writeFile(gitignorePath, newContent); - - setAddedRules(rulesToActuallyAdd); - setSkippedRules(rulesAlreadyExist); - setStatus("completed"); - - setTimeout(() => { - process.exit(0); - }, 2000); - } catch (err) { - const errorMessage = - err instanceof Error ? err.message : "Unknown error occurred"; - setError(errorMessage); - setStatus("error"); - - setTimeout(() => { - process.exit(1); - }, 3000); - } - }; - - performGitignoreUpdate(); - }, []); - - if (status === "starting") { - return ( - - 🚀 .gitignore の更新を開始します... - - ); - } - - if (status === "checking") { - return ( - - 📋 .gitignore ファイルをチェック中... - - ); - } - - if (status === "updating") { - return ( - - ✏️ .gitignore を更新中... - - ); - } - - if (status === "error") { - return ( - - ❌ エラーが発生しました: - {error} - - ); - } - - if (status === "skipped") { - return ( - - ⏭️ すべてのルールが既に存在します - - 既存のルール: - {skippedRules.map((rule) => ( - - • {rule} - - ))} - - .gitignore の更新は不要でした - - ); - } - - if (status === "completed") { - return ( - - ✅ .gitignore の更新が完了しました! - - {addedRules.length > 0 && ( - <> - 追加されたルール ({addedRules.length}個): - {addedRules.map((rule) => ( - - • {rule} - - ))} - - )} - {skippedRules.length > 0 && ( - <> - 既存のルール ({skippedRules.length}個): - {skippedRules.map((rule) => ( - - • {rule} - - ))} - - )} - - - Tsumiki のコマンドファイルが Git から無視されるようになりました - - - ); - } - - return null; -}; - -export const gitignoreCommand = (): void => { - render(React.createElement(GitignoreComponent)); -}; diff --git a/src/commands/install.tsx b/src/commands/install.tsx deleted file mode 100644 index c75dca9..0000000 --- a/src/commands/install.tsx +++ /dev/null @@ -1,161 +0,0 @@ -import * as path from "node:path"; -import { fileURLToPath } from "node:url"; -import fs from "fs-extra"; -import { Box, Newline, render, Text } from "ink"; -import React, { useEffect, useState } from "react"; - -type InstallStatus = - | "starting" - | "checking" - | "copying" - | "completed" - | "error"; - -const InstallComponent: React.FC = () => { - const [status, setStatus] = useState("starting"); - const [copiedFiles, setCopiedFiles] = useState([]); - const [error, setError] = useState(null); - - useEffect(() => { - const performInstall = async (): Promise => { - try { - setStatus("checking"); - - // 現在のディレクトリを取得 - const currentDir = process.cwd(); - const commandsTargetDir = path.join(currentDir, ".claude", "commands"); - const agentsTargetDir = path.join(currentDir, ".claude", "agents"); - - // tsumikiのcommandsディレクトリとagentsディレクトリを取得 - const __filename = fileURLToPath(import.meta.url); - const __dirname = path.dirname(__filename); - // ビルド後はdist/commands, dist/agentsを参照(cli.jsがdist/にあるため) - const tsumikiCommandsDir = path.join(__dirname, "commands"); - const tsumikiAgentsDir = path.join(__dirname, "agents"); - - // .claude/commandsと.claude/agentsディレクトリが存在しない場合は作成 - await fs.ensureDir(commandsTargetDir); - await fs.ensureDir(agentsTargetDir); - - setStatus("copying"); - - // commandsディレクトリ内のすべての.mdファイルと.shファイルを取得 - const commandFiles = await fs.readdir(tsumikiCommandsDir); - const targetCommandFiles = commandFiles.filter( - (file) => file.endsWith(".md") || file.endsWith(".sh"), - ); - - // agentsディレクトリ内のすべての.mdファイルを取得 - let targetAgentFiles: string[] = []; - try { - const agentFiles = await fs.readdir(tsumikiAgentsDir); - targetAgentFiles = agentFiles.filter((file) => file.endsWith(".md")); - } catch { - // agentsディレクトリが存在しない場合はスキップ - } - - const copiedFilesList: string[] = []; - - // commandsファイルをコピー - for (const file of targetCommandFiles) { - const sourcePath = path.join(tsumikiCommandsDir, file); - const targetPath = path.join(commandsTargetDir, file); - - await fs.copy(sourcePath, targetPath); - copiedFilesList.push(`commands/${file}`); - } - - // agentsファイルをコピー - for (const file of targetAgentFiles) { - const sourcePath = path.join(tsumikiAgentsDir, file); - const targetPath = path.join(agentsTargetDir, file); - - await fs.copy(sourcePath, targetPath); - copiedFilesList.push(`agents/${file}`); - } - - setCopiedFiles(copiedFilesList); - setStatus("completed"); - - // 2秒後に終了 - setTimeout(() => { - process.exit(0); - }, 2000); - } catch (err) { - const errorMessage = - err instanceof Error ? err.message : "Unknown error occurred"; - setError(errorMessage); - setStatus("error"); - - setTimeout(() => { - process.exit(1); - }, 3000); - } - }; - - performInstall(); - }, []); - - if (status === "starting") { - return ( - - 🚀 Tsumiki インストールを開始します... - - ); - } - - if (status === "checking") { - return ( - - 📋 環境をチェック中... - - ); - } - - if (status === "copying") { - return ( - - 📝 コマンドテンプレートをコピー中... - - ); - } - - if (status === "error") { - return ( - - ❌ エラーが発生しました: - {error} - - ); - } - - if (status === "completed") { - return ( - - ✅ インストールが完了しました! - - コピーされたファイル ({copiedFiles.length}個): - {copiedFiles.map((file) => ( - - {" "} - • {file} - - ))} - - - Claude Codeで以下のようにコマンドを使用できます: - - /tdd-requirements - /kairo-design - @agent-symbol-searcher - ... - - ); - } - - return null; -}; - -export const installCommand = (): void => { - render(React.createElement(InstallComponent)); -}; diff --git a/src/commands/uninstall.tsx b/src/commands/uninstall.tsx deleted file mode 100644 index d287c4d..0000000 --- a/src/commands/uninstall.tsx +++ /dev/null @@ -1,180 +0,0 @@ -import * as path from "node:path"; -import { fileURLToPath } from "node:url"; -import fs from "fs-extra"; -import { Box, Newline, render, Text } from "ink"; -import React, { useEffect, useState } from "react"; - -type UninstallStatus = - | "starting" - | "checking" - | "removing" - | "completed" - | "error" - | "not_found"; - -const UninstallComponent: React.FC = () => { - const [status, setStatus] = useState("starting"); - const [removedFiles, setRemovedFiles] = useState([]); - const [error, setError] = useState(null); - - useEffect(() => { - const performUninstall = async (): Promise => { - try { - setStatus("checking"); - - // 現在のディレクトリを取得 - const currentDir = process.cwd(); - const targetDir = path.join(currentDir, ".claude", "commands"); - - // .claude/commandsディレクトリが存在するかチェック - const dirExists = await fs.pathExists(targetDir); - if (!dirExists) { - setStatus("not_found"); - setTimeout(() => { - process.exit(0); - }, 2000); - return; - } - - // tsumikiのcommandsディレクトリを取得 - const __filename = fileURLToPath(import.meta.url); - const __dirname = path.dirname(__filename); - // ビルド後はdist/commandsを参照(cli.jsがdist/にあるため) - const tsumikiDir = path.join(__dirname, "commands"); - - // tsumikiのファイル一覧を取得 - const tsumikiFiles = await fs.readdir(tsumikiDir); - const tsumikiTargetFiles = tsumikiFiles.filter( - (file) => file.endsWith(".md") || file.endsWith(".sh"), - ); - - setStatus("removing"); - - // .claude/commands内のファイルをチェックして、tsumiki由来のファイルのみ削除 - const installedFiles = await fs.readdir(targetDir); - const removedFilesList: string[] = []; - - for (const file of installedFiles) { - if (tsumikiTargetFiles.includes(file)) { - const filePath = path.join(targetDir, file); - await fs.remove(filePath); - removedFilesList.push(file); - } - } - - // 削除後に.claude/commandsディレクトリが空になったかチェック - const remainingFiles = await fs.readdir(targetDir); - if (remainingFiles.length === 0) { - // 空のディレクトリを削除 - await fs.rmdir(targetDir); - // .claudeディレクトリも空の場合は削除 - const claudeDir = path.dirname(targetDir); - const claudeFiles = await fs.readdir(claudeDir); - if (claudeFiles.length === 0) { - await fs.rmdir(claudeDir); - } - } - - setRemovedFiles(removedFilesList); - setStatus("completed"); - - // 2秒後に終了 - setTimeout(() => { - process.exit(0); - }, 2000); - } catch (err) { - const errorMessage = - err instanceof Error ? err.message : "Unknown error occurred"; - setError(errorMessage); - setStatus("error"); - - setTimeout(() => { - process.exit(1); - }, 3000); - } - }; - - performUninstall(); - }, []); - - if (status === "starting") { - return ( - - 🗑️ Tsumiki アンインストールを開始します... - - ); - } - - if (status === "checking") { - return ( - - 📋 インストール状況をチェック中... - - ); - } - - if (status === "removing") { - return ( - - 🗑️ コマンドテンプレートを削除中... - - ); - } - - if (status === "not_found") { - return ( - - - ⚠️ .claude/commands ディレクトリが見つかりません - - Tsumikiはインストールされていないようです。 - - ); - } - - if (status === "error") { - return ( - - ❌ エラーが発生しました: - {error} - - ); - } - - if (status === "completed") { - if (removedFiles.length === 0) { - return ( - - ⚠️ 削除対象のファイルが見つかりませんでした - - Tsumikiのコマンドはインストールされていないようです。 - - - ); - } - - return ( - - ✅ アンインストールが完了しました! - - 削除されたファイル ({removedFiles.length}個): - {removedFiles.map((file) => ( - - {" "} - • {file} - - ))} - - - TsumikiのClaude Codeコマンドテンプレートが削除されました。 - - - ); - } - - return null; -}; - -export const uninstallCommand = (): void => { - render(React.createElement(UninstallComponent)); -}; diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 7510be6..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "@tsconfig/node24/tsconfig.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src", - "declaration": true, - "declarationMap": true, - "sourceMap": true, - "jsx": "react" - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist"] -} diff --git a/tsup.config.ts b/tsup.config.ts deleted file mode 100644 index abbfc66..0000000 --- a/tsup.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from 'tsup'; - -export default defineConfig({ - entry: ['src/cli.ts'], - format: ['esm', 'cjs'], - dts: true, - outDir: 'dist', - clean: false, - target: 'es2022', - tsconfig: 'tsconfig.json', - esbuildOptions: (options) => { - options.jsx = 'automatic'; - }, -}); From d951acbf26e84cffc42bb6e756dd4aea0299c76e Mon Sep 17 00:00:00 2001 From: "kuroeda.makoto" Date: Fri, 10 Oct 2025 16:32:57 +0900 Subject: [PATCH 6/9] docs: update TDD cycle script to use /tsumiki: command prefix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update all command references in tdd-cycle-full.sh to use the /tsumiki: prefix: - /tdd-red -> /tsumiki:tdd-red - /tdd-green -> /tsumiki:tdd-green - /tdd-refactor -> /tsumiki:tdd-refactor - /tdd-verify-complete -> /tsumiki:tdd-verify-complete This aligns with the plugin-based distribution model. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- commands/tdd-cycle-full.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/commands/tdd-cycle-full.sh b/commands/tdd-cycle-full.sh index 4c2799a..2bb0b02 100755 --- a/commands/tdd-cycle-full.sh +++ b/commands/tdd-cycle-full.sh @@ -31,21 +31,21 @@ run_tdd_cycle() { local test_case=$1 echo "🔴 RED フェーズ開始..." - if ! claude -p "/tdd-red $test_case 不足テストの追加実装" --allowedTools "$ALLOWED_TOOLS" --disallowedTools "$DISALLOWED_TOOLS"; then + if ! claude -p "/tsumiki:tdd-red $test_case 不足テストの追加実装" --allowedTools "$ALLOWED_TOOLS" --disallowedTools "$DISALLOWED_TOOLS"; then echo -e "${RED}❌ RED フェーズ失敗${NC}" exit 1 fi echo -e "${GREEN}✅ RED フェーズ完了${NC}" echo "🟢 GREEN フェーズ開始..." - if ! claude -p "/tdd-green $test_case" --allowedTools "$ALLOWED_TOOLS" --disallowedTools "$DISALLOWED_TOOLS"; then + if ! claude -p "/tsumiki:tdd-green $test_case" --allowedTools "$ALLOWED_TOOLS" --disallowedTools "$DISALLOWED_TOOLS"; then echo -e "${RED}❌ GREEN フェーズ失敗${NC}" exit 1 fi echo -e "${GREEN}✅ GREEN フェーズ完了${NC}" echo "🔵 REFACTOR フェーズ開始..." - if ! claude -p "/tdd-refactor $test_case" --allowedTools "$ALLOWED_TOOLS" --disallowedTools "$DISALLOWED_TOOLS"; then + if ! claude -p "/tsumiki:tdd-refactor $test_case" --allowedTools "$ALLOWED_TOOLS" --disallowedTools "$DISALLOWED_TOOLS"; then echo -e "${RED}❌ REFACTOR フェーズ失敗${NC}" exit 1 fi @@ -53,7 +53,7 @@ run_tdd_cycle() { echo "🔍 VERIFY COMPLETE フェーズ開始..." local verify_result - verify_result=$(claude -p "/tdd-verify-complete $test_case" --allowedTools "$VERIFY_ALLOWED_TOOLS" --disallowedTools "$VERIFY_DISALLOWED_TOOLS" 2>&1) + verify_result=$(claude -p "/tsumiki:tdd-verify-complete $test_case" --allowedTools "$VERIFY_ALLOWED_TOOLS" --disallowedTools "$VERIFY_DISALLOWED_TOOLS" 2>&1) local verify_exit_code=$? if [ $verify_exit_code -ne 0 ]; then From 8126d5540a60c2267c338f301b6f66e23f36923d Mon Sep 17 00:00:00 2001 From: "kuroeda.makoto" Date: Sat, 11 Oct 2025 10:13:12 +0900 Subject: [PATCH 7/9] =?UTF-8?q?install=E6=96=B9=E6=B3=95=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index 46a099d..9a7a864 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -46,6 +46,7 @@ pnpm prepare # simple-git-hooksのセットアップ ```bash /plugin marketplace add https://github.com/classmethod/tsumiki.git +/plugin install tsumiki@tsumiki ``` Claude Code Pluginが自動的に: From e4f9612162a7ec933431a8cb1ecca409994bf03c Mon Sep 17 00:00:00 2001 From: "kuroeda.makoto" Date: Sat, 11 Oct 2025 10:29:58 +0900 Subject: [PATCH 8/9] =?UTF-8?q?CI=E3=82=A8=E3=83=A9=E3=83=BC=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fac5c6e..a08e064 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "name": "classmethod" }, "scripts": { - "check": "biome check commands agents", - "fix": "biome check commands agents --write", + "check": "biome check src", + "fix": "biome check src --write", "prepare": "simple-git-hooks", "secretlint": "secretlint --secretlintignore .gitignore **/*" }, From 5af28df773a7d64cd54f74992eedb23793ff7db3 Mon Sep 17 00:00:00 2001 From: "kuroeda.makoto" Date: Sat, 11 Oct 2025 10:39:09 +0900 Subject: [PATCH 9/9] fix: remove Biome dependency as project contains only markdown and shell files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This project consists solely of .md and .sh files (command templates and agent definitions), which are not supported by Biome. Simplified the toolchain to use only secretlint for security checks. Changes: - Remove check and fix scripts from package.json - Update pre-commit hook to run only secretlint - Remove Biome-related steps from CI/release workflows (check, typecheck, build) - Update documentation (CLAUDE.md, CONTRIBUTING.md) to reflect secretlint-only approach 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 9 --------- .github/workflows/release.yml | 5 +---- CLAUDE.md | 6 +----- CONTRIBUTING.md | 14 ++------------ package.json | 4 +--- 5 files changed, 5 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5b8eed..f12070e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,14 +36,5 @@ jobs: exit 1 fi - - name: Run check - run: pnpm check - - name: Run secretlint run: pnpm secretlint - - - name: Run typecheck - run: pnpm typecheck - - - name: Build project - run: pnpm build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7929ba5..024e682 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,10 +30,7 @@ jobs: run: pnpm install - name: Run quality checks - run: | - pnpm check - pnpm secretlint - pnpm typecheck + run: pnpm secretlint - name: Publish to npm run: pnpm publish diff --git a/CLAUDE.md b/CLAUDE.md index 9a7a864..8bcc361 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,8 +18,6 @@ TsumikiはAI駆動開発フレームワークです。Claude Code Plugin経由 pnpm install # 依存関係のインストール # コード品質 -pnpm check # Biomeでコードチェック(commands/とagents/) -pnpm fix # Biomeで自動修正 pnpm secretlint # シークレット情報の検査 # pre-commitフック @@ -35,7 +33,6 @@ pnpm prepare # simple-git-hooksのセットアップ ## 技術スタック -- **Code Quality**: Biome(リンタ・フォーマッタ) - **Security**: secretlint(機密情報検査) - **Package Manager**: pnpm - **Distribution**: Claude Code Plugin Marketplace @@ -58,6 +55,5 @@ Claude Code Pluginが自動的に: Pre-commitフックで以下が自動実行されます: - `pnpm secretlint`: 機密情報のチェック -- `pnpm fix`: コードの自動修正 -コマンドファイル(`.md`)やエージェント定義(`.md`)を修正する際は、必ず`pnpm check`を実行してからコミットしてください。 +コマンドファイル(`.md`)やエージェント定義(`.md`)を修正する際は、機密情報が含まれていないことを確認してからコミットしてください。 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9acb15c..ee3d3f4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,12 +52,6 @@ git checkout -b feature/your-feature-name 3. コード品質チェックを実行します: ```bash -# コードチェック -pnpm check - -# 自動修正 -pnpm fix - # 機密情報チェック pnpm secretlint ``` @@ -95,18 +89,14 @@ docs: update README with new command examples Pre-commitフックで以下が自動実行されます: - **secretlint**: 機密情報(APIキー、パスワードなど)の混入チェック -- **fix**: Biomeによるコードの自動修正 ### 手動チェック 変更前に以下のコマンドを実行してください: ```bash -# 全てのチェックを実行 -pnpm check && pnpm secretlint - -# コードの自動修正 -pnpm fix +# 機密情報チェック +pnpm secretlint ``` ## プロジェクト構造 diff --git a/package.json b/package.json index a08e064..ffcd3a1 100644 --- a/package.json +++ b/package.json @@ -24,13 +24,11 @@ "name": "classmethod" }, "scripts": { - "check": "biome check src", - "fix": "biome check src --write", "prepare": "simple-git-hooks", "secretlint": "secretlint --secretlintignore .gitignore **/*" }, "simple-git-hooks": { - "pre-commit": "pnpm secretlint && pnpm fix" + "pre-commit": "pnpm secretlint" }, "devDependencies": { "@biomejs/biome": "2.1.3",