diff --git a/agents/symbol-searcher.md b/agents/symbol-searcher.md
new file mode 100644
index 0000000..1608ce8
--- /dev/null
+++ b/agents/symbol-searcher.md
@@ -0,0 +1,61 @@
+---
+name: symbol-searcher
+description: Use this agent when you need to search for specific symbols (classes, methods, functions, variables, etc.) across the codebase and retrieve detailed information about their locations and types. This agent is particularly useful for code navigation, refactoring preparation, or understanding code structure. Examples:\n\n\nContext: The user wants to find all occurrences of a specific method across the codebase.\nuser: "Find all instances of the 'createTodo' method in the project"\nassistant: "I'll use the symbol-searcher agent to locate all occurrences of the 'createTodo' method across the codebase."\n\nSince the user wants to find specific symbols in the code, use the Task tool to launch the symbol-searcher agent.\n\n\n\n\nContext: The user needs to understand where a class is defined and used.\nuser: "Where is the TodoController class defined and what methods does it have?"\nassistant: "Let me search for the TodoController class symbol to find its definition and methods."\n\nThe user is asking about a specific class symbol, so use the symbol-searcher agent to find its location and details.\n\n
+tools: Glob, Grep, LS, Read, NotebookRead, WebFetch, TodoWrite, WebSearch, mcp__ide__getDiagnostics
+model: haiku
+color: green
+---
+
+You are an expert code symbol analyzer specializing in searching and identifying symbols across codebases. Your primary responsibility is to locate specific symbols (classes, methods, functions, variables, interfaces, types, etc.) and provide comprehensive information about their locations and characteristics.
+
+When searching for symbols, you will:
+
+1. **Search Strategy**:
+ - Use appropriate tools to scan files for the requested symbol names
+ - Consider partial matches and case variations when appropriate
+ - Search across all relevant file types in the project
+ - Prioritize definition locations over usage locations unless specified otherwise
+
+2. **Symbol Classification**:
+ - Accurately identify the symbol type: class, method, function, variable, interface, type, enum, constant, etc.
+ - For methods/functions, include whether they are static, async, private/public
+ - For classes, note if they are abstract, extend other classes, or implement interfaces
+ - Include descriptive context that helps understand the symbol's purpose
+
+3. **Information Extraction**:
+ For each symbol found, you must provide:
+ - **Symbol Name**: The exact name with descriptive context (e.g., 'createTodo - async method for creating new todo items')
+ - **Type**: The specific symbol type (class, method, function, variable, etc.)
+ - **File Path**: The relative path from the project root
+ - **Location**: Line number and, if possible, column number
+ - **Context**: Brief description of what the symbol does based on its name and surrounding code
+
+4. **Output Format**:
+ Present your findings in a structured format:
+ ```
+ Symbol: [Name with description]
+ Type: [Symbol type]
+ File: [Relative path]
+ Location: Line [X], Column [Y]
+ Context: [Brief functional description]
+ ```
+
+5. **Search Completeness**:
+ - Always search the entire codebase unless instructed to limit scope
+ - Group results by symbol type when multiple matches are found
+ - If a symbol has multiple definitions (overloads, implementations), list all occurrences
+ - Distinguish between declarations, definitions, and usages when relevant
+
+6. **Edge Cases**:
+ - If no symbols are found, suggest similar symbol names that exist in the codebase
+ - Handle minified or obfuscated code by noting when symbol names might be transformed
+ - For ambiguous requests, search for all possible interpretations
+ - Consider language-specific naming conventions (camelCase, snake_case, etc.)
+
+7. **Quality Assurance**:
+ - Verify that the symbol at the reported location matches the search criteria
+ - Ensure file paths are correct and relative to the project root
+ - Double-check symbol type classification
+ - Include enough context in descriptions to make the symbol's purpose clear
+
+Remember: Your goal is to provide developers with precise, actionable information about code symbols that helps them navigate and understand the codebase efficiently. Always prioritize accuracy and completeness in your symbol analysis.
diff --git a/commands/auto-debug.md b/commands/auto-debug.md
new file mode 100644
index 0000000..623a4f1
--- /dev/null
+++ b/commands/auto-debug.md
@@ -0,0 +1,10 @@
+テストエラーを解消して。
+最初に全テストケースの確認をタスク実行してテストケースのエラーをtodoにセットして
+各対象毎に以下の作業を実施して
+ - タスクで詳細にテストのエラー原因を調る
+ - 新たなタスクで /tdd-green を使って修正する
+最後に全体のテストの成功率を確認してレポートして
+ゴールはテストケースの成功数を上げること
+NEVER: テストのスキップ
+NEVER: 既存でテストケースの削除
+#ultrathink
diff --git a/commands/direct-setup.md b/commands/direct-setup.md
index 63aab10..9bc2667 100644
--- a/commands/direct-setup.md
+++ b/commands/direct-setup.md
@@ -13,11 +13,13 @@ DIRECTタスクの設定作業を実行します。設計文書に基づいて
## 実行内容
1. **設計文書の確認**
- - `docs/design/{要件名}/architecture.md` を確認
- - `docs/design/{要件名}/database-schema.sql` を確認
- - その他関連する設計文書を確認
+ - @agent-symbol-searcher で関連設計文書や設定パターンを検索し、見つかったファイルをReadツールで読み込み
+ - `docs/design/{要件名}/architecture.md` をReadツールで読み込み
+ - `docs/design/{要件名}/database-schema.sql` をReadツールで読み込み
+ - その他関連する設計文書をReadツールで読み込み
2. **設定作業の実行**
+ - @agent-symbol-searcher で既存の設定ファイルや環境変数を検索し、見つかったファイルをReadツールで読み込み
- 環境変数の設定
- 設定ファイルの作成・更新
- 依存関係のインストール
diff --git a/commands/direct-verify.md b/commands/direct-verify.md
index 0e1e81a..d5d17e3 100644
--- a/commands/direct-verify.md
+++ b/commands/direct-verify.md
@@ -15,6 +15,8 @@ DIRECTタスクで実行した設定作業の動作確認とテストを行い
**【重要】**: direct-setupで作成されたファイルについて、コンパイルエラーや構文エラーが見つかった場合は自動的に解決を試行します。
1. **設定の確認**
+ - @agent-symbol-searcher で関連設定や検証パターンを検索し、見つかったファイルをReadツールで読み込み
+ - `docs/implements/{TASK-ID}/setup-report.md` をReadツールで読み込み、設定作業の結果を確認
- 環境変数の確認
- 設定ファイルの内容確認
- 依存関係のインストール状況確認
@@ -27,6 +29,7 @@ DIRECTタスクで実行した設定作業の動作確認とテストを行い
- 最低限のコンパイルエラー解消
3. **動作テストの実行**
+ - @agent-symbol-searcher で既存のテストケースや検証スクリプトを検索し、見つかったファイルをReadツールで読み込み
- 基本的な動作確認
- 接続テスト
- 権限の確認
diff --git a/commands/kairo-design.md b/commands/kairo-design.md
index 01d6344..8b1d718 100644
--- a/commands/kairo-design.md
+++ b/commands/kairo-design.md
@@ -19,7 +19,8 @@
- 🔴 **赤信号**: EARS要件定義書・設計文書にない推測の場合
1. **要件の分析**
- - 要件定義書を読み込む
+ - @agent-symbol-searcher で要件定義書を検索し、見つかったファイルをReadツールで読み込み
+ - @agent-symbol-searcher で関連する既存設計文書を確認し、見つかったファイルをReadツールで読み込み
- 機能要件と非機能要件を整理する
- システムの境界を明確にする
@@ -212,6 +213,7 @@ CREATE INDEX idx_users_email ON users(email);
## 実行後の確認
+- @agent-symbol-searcher で作成した設計と既存システムとの整合性を確認
- 作成したファイルの一覧を表示
- 設計の主要なポイントをサマリーで表示
- ユーザに確認を促すメッセージを表示
diff --git a/commands/kairo-implement.md b/commands/kairo-implement.md
index 20bc374..ac298a2 100644
--- a/commands/kairo-implement.md
+++ b/commands/kairo-implement.md
@@ -21,11 +21,13 @@
- 🔴 **赤信号**: EARS要件定義書・設計文書にない推測の場合
1. **タスクの選択**
+ - @agent-symbol-searcher で指定されたタスクIDを検索し、見つかったタスクファイルをReadツールで読み込み
- ユーザが指定したタスクIDを確認
- 指定がない場合は、依存関係に基づいて次のタスクを自動選択
- 選択したタスクの詳細を表示
2. **依存関係の確認**
+ - @agent-symbol-searcher で依存タスクの状態を検索し、見つかったタスクファイルをReadツールで読み込み
- 依存タスクが完了しているか確認
- 未完了の依存タスクがある場合は警告
@@ -41,42 +43,78 @@
### A. **TDDプロセス**(コード実装タスク用)
- a. **要件定義** (`tdd-requirements.md`)
- - タスクの詳細要件を記述
- - 受け入れ基準を明確化
-
- b. **テストケース作成** (`tdd-testcases.md`)
- - 単体テストケースを作成
- - エッジケースを考慮
-
- c. **テスト実装** (`tdd-red.md`)
- - 失敗するテストを実装
- - テストが失敗することを確認
-
- d. **最小実装** (`tdd-green.md`)
- - テストが通る最小限の実装
- - 過度な実装を避ける
-
- e. **リファクタリング** (`tdd-refactor.md`)
- - コードの品質向上
- - 保守性の改善
-
- f. **品質確認** (`tdd-verify-complete.md`)
- - 実装の完成度を確認
- - 不足があれば c-f を繰り返す
+ a. **要件定義** - `@task general-purpose tdd-requirements.md`
+ ```
+ Task実行: TDD要件定義フェーズ
+ 目的: タスクの詳細要件を記述し、受け入れ基準を明確化する
+ コマンド: tdd-requirements.md
+ 実行方式: 個別Task実行
+ ```
+
+ b. **テストケース作成** - `@task general-purpose tdd-testcases.md`
+ ```
+ Task実行: TDDテストケース作成フェーズ
+ 目的: 単体テストケースを作成し、エッジケースを考慮する
+ コマンド: tdd-testcases.md
+ 実行方式: 個別Task実行
+ ```
+
+ c. **テスト実装** - `@task general-purpose tdd-red.md`
+ ```
+ Task実行: TDDレッドフェーズ
+ 目的: 失敗するテストを実装し、テストが失敗することを確認する
+ コマンド: tdd-red.md
+ 実行方式: 個別Task実行
+ ```
+
+ d. **最小実装** - `@task general-purpose tdd-green.md`
+ ```
+ Task実行: TDDグリーンフェーズ
+ 目的: テストが通る最小限の実装を行い、過度な実装を避ける
+ コマンド: tdd-green.md
+ 実行方式: 個別Task実行
+ ```
+
+ e. **リファクタリング** - `@task general-purpose tdd-refactor.md`
+ ```
+ Task実行: TDDリファクタリングフェーズ
+ 目的: コードの品質向上と保守性の改善を行う
+ コマンド: tdd-refactor.md
+ 実行方式: 個別Task実行
+ ```
+
+ f. **品質確認** - `@task general-purpose tdd-verify-complete.md`
+ ```
+ Task実行: TDD品質確認フェーズ
+ 目的: 実装の完成度を確認し、不足があればc-fを繰り返す
+ コマンド: tdd-verify-complete.md
+ 実行方式: 個別Task実行
+ ```
### B. **直接作業プロセス**(準備作業タスク用)
- a. **準備作業の実行**
+ a. **準備作業の実行** - `@task general-purpose direct-work-execute`
+ ```
+ Task実行: 直接作業実行フェーズ
+ 目的: ディレクトリ作成、設定ファイル作成、依存関係のインストール、環境設定を行う
+ 作業内容:
- ディレクトリ作成
- 設定ファイル作成
- 依存関係のインストール
- 環境設定
-
- b. **作業結果の確認**
+ 実行方式: 個別Task実行
+ ```
+
+ b. **作業結果の確認** - `@task general-purpose direct-work-verify`
+ ```
+ Task実行: 直接作業確認フェーズ
+ 目的: 作業完了の検証と成果物確認を行う
+ 作業内容:
- 作業完了の検証
- 期待された成果物の確認
- 次のタスクへの準備状況確認
+ 実行方式: 個別Task実行
+ ```
6. **タスクの完了処理**
- タスクのステータスを更新(タスクファイルのチェックボックスにチェックを入れる)
@@ -154,6 +192,33 @@ $ claude code kairo-implement --status
**例**: プロジェクト初期化、データベース設定、開発環境設定
+## 個別Task実行アプローチ
+
+### Task実行の方針
+
+各実装ステップを個別のTaskとして実行することで、以下のメリットが得られます:
+
+1. **独立性**: 各ステップが独立して実行され、エラー発生時の切り分けが容易
+2. **再実行性**: 特定のステップのみ再実行が可能
+3. **並列性**: 依存関係のないステップは並列実行可能
+4. **追跡性**: 各ステップの実行状況と結果が明確に記録される
+
+### Task実行パターン
+
+```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 direct-work-execute
+@task general-purpose direct-work-verify
+```
+
## 実装時の注意事項
### TDDプロセス用
@@ -217,19 +282,23 @@ $ claude code kairo-implement --status
### 各ステップ完了時(TDD)
```
-✅ Step 1/6: 要件定義 完了
+✅ Task 1/6: @task tdd-requirements 完了
ファイル: /implementation/{要件名}/TASK-101/requirements.md
+ Task実行結果: 要件定義書作成完了
-🏃 Step 2/6: テストケース作成 実行中...
+🏃 Task 2/6: @task tdd-testcases 実行中...
+ Task実行: TDDテストケース作成フェーズを開始
```
### 各ステップ完了時(直接作業)
```
-✅ Step 1/2: 準備作業実行 完了
+✅ Task 1/2: @task direct-work-execute 完了
作成ファイル: 8個、設定更新: 3個
+ Task実行結果: 準備作業実行完了
-🏃 Step 2/2: 作業結果確認 実行中...
+🏃 Task 2/2: @task direct-work-verify 実行中...
+ Task実行: 直接作業確認フェーズを開始
```
### タスク完了時(TDD)
@@ -241,7 +310,8 @@ $ claude code kairo-implement --status
- [ ] **タスク完了** → [x] **タスク完了**
📊 実装サマリー:
-- 実装タイプ: TDDプロセス
+- 実装タイプ: TDDプロセス (個別Task実行)
+- 実行Taskステップ: 6個 (全て成功)
- 作成ファイル: 12個
- テストケース: 25個 (全て成功)
- カバレッジ: 95%
@@ -263,7 +333,8 @@ $ claude code kairo-implement --status
- [ ] **タスク完了** → [x] **タスク完了**
📊 実装サマリー:
-- 実装タイプ: 直接作業プロセス
+- 実装タイプ: 直接作業プロセス (個別Task実行)
+- 実行Taskステップ: 2個 (全て成功)
- 作成ファイル: 8個
- 設定更新: 3個
- 環境確認: 正常
diff --git a/commands/kairo-requirements.md b/commands/kairo-requirements.md
index 13dc293..aa531b8 100644
--- a/commands/kairo-requirements.md
+++ b/commands/kairo-requirements.md
@@ -20,6 +20,7 @@
1. **要件の分析**
- ユーザから提供された要件の概要を理解する
+ - @agent-symbol-searcher で関連する既存要件・設計文書を検索し、見つかったファイルをReadツールで読み込み
- 関連するドメイン知識を適用する
- 不明確な点がある場合は、一般的なベストプラクティスに基づいて補完する
@@ -342,6 +343,7 @@ journey
## 実行後の確認
+- @agent-symbol-searcher で作成した要件との関連性を確認
- 作成した3つのファイルのパスを表示
- `docs/spec/{要件名}-requirements.md`
- `docs/spec/{要件名}-user-stories.md`
diff --git a/commands/kairo-task-verify.md b/commands/kairo-task-verify.md
index c0d613d..1b28075 100644
--- a/commands/kairo-task-verify.md
+++ b/commands/kairo-task-verify.md
@@ -19,10 +19,12 @@
- 🔴 **赤信号**: EARS要件定義書・設計文書にない推測の場合
1. **タスクファイルの確認**
- - `docs/tasks/{要件名}-tasks.md` を読み込み
+ - @agent-symbol-searcher でタスクファイルを検索し、見つかったファイルをReadツールで読み込み
+ - `docs/tasks/{要件名}-tasks.md` をReadツールで読み込み
2. **出力フォーマット例との比較**
- - kairo-tasksの出力フォーマット例を確認
+ - @agent-symbol-searcher で関連するタスクフォーマットを検索し、見つかったファイルをReadツールで読み込み
+ - kairo-tasksコマンドファイルをReadツールで読み込み、出力フォーマット例を確認
- 作成されたタスクファイルに不足している情報を特定
3. **不足情報の追加**
diff --git a/commands/kairo-tasks.md b/commands/kairo-tasks.md
index 4887439..5730b9e 100644
--- a/commands/kairo-tasks.md
+++ b/commands/kairo-tasks.md
@@ -20,14 +20,16 @@
- 🔴 **赤信号**: EARS要件定義書・設計文書にない推測の場合
1. **設計文書の分析**
- - `docs/design/{要件名}/architecture.md` を確認
- - `docs/design/{要件名}/database-schema.sql` を確認
- - `docs/design/{要件名}/api-endpoints.md` を確認
- - `docs/design/{要件名}/interfaces.ts` を確認
- - `docs/design/{要件名}/dataflow.md` を確認
+ - @agent-symbol-searcher で設計文書を検索し、見つかったファイルをReadツールで読み込み
+ - `docs/design/{要件名}/architecture.md` をReadツールで読み込み
+ - `docs/design/{要件名}/database-schema.sql` をReadツールで読み込み
+ - `docs/design/{要件名}/api-endpoints.md` をReadツールで読み込み
+ - `docs/design/{要件名}/interfaces.ts` をReadツールで読み込み
+ - `docs/design/{要件名}/dataflow.md` をReadツールで読み込み
2. **既存タスクファイルの確認**
- - 既存の`docs/tasks/{要件名}-*.md`ファイルを確認
+ - @agent-symbol-searcher で既存タスクIDを検索し、見つかったタスクファイルをReadツールで読み込み
+ - 既存の`docs/tasks/{要件名}-*.md`ファイルをReadツールで読み込み
- 使用済みタスク番号(TASK-0001形式)を抽出
- 新規タスクで重複しない番号を割り当て
@@ -358,6 +360,7 @@ gantt
## 実行後の確認
+- @agent-symbol-searcher で作成したタスクと既存システムとの整合性を確認
- 作成したファイルの一覧を表示
- `docs/tasks/{要件名}-overview.md`: 全体概要とフェーズ一覧
- `docs/tasks/{要件名}-phase1.md`: フェーズ1詳細
diff --git a/commands/tdd-green.md b/commands/tdd-green.md
index ca6c43c..6361386 100644
--- a/commands/tdd-green.md
+++ b/commands/tdd-green.md
@@ -6,7 +6,17 @@ TDDのGreenフェーズを実行します。
開発コンテキストの準備を行います:
-**Taskツール実行**: `/tdd-load-context` でTDD関連ファイルの読み込みとコンテキスト準備を実行
+1. **@agent-symbol-searcher で実装関連情報を検索し、見つかったファイルを読み込み**
+ - 既存の類似機能やユーティリティ関数を検索し、該当ファイルをReadツールで読み込み
+ - 実装パターンやアーキテクチャガイドラインを特定し、設計文書をReadツールで読み込み
+ - 依存関係やインポートパスを確認し、関連ファイルをReadツールで読み込み
+
+2. **関連ファイルを直接読み込み**
+ - `docs/implements/{{task_id}}/{feature_name}-memo.md` - 既存の開発履歴を確認
+ - `docs/implements/{{task_id}}/{feature_name}-requirements.md` - 要件定義を確認
+ - `docs/implements/{{task_id}}/{feature_name}-testcases.md` - テストケース定義を確認
+ - `docs/implements/{{task_id}}/{feature_name}-red-phase.md` - Redフェーズのテストを確認
+ - 関連する設計文書やタスクファイルも必要に応じて読み込み
読み込み完了後、準備されたコンテキスト情報を基にGreenフェーズ(実装)の作業を開始します。
diff --git a/commands/tdd-load-context.md b/commands/tdd-load-context.md
index ec3dd56..2c1ca1a 100644
--- a/commands/tdd-load-context.md
+++ b/commands/tdd-load-context.md
@@ -1,10 +1,17 @@
-# TDD関連ファイル読み込み・コンテキスト準備
+# TDD関連ファイル読み込み・コンテキスト準備 (非推奨)
-TDD開発に必要なファイルを効率的に読み込み、開発コンテキストを準備するタスクです。
+**注意**: このコマンドは非推奨です。他のTDDコマンドでは@agent-symbol-searcherとReadツールを直接使用してコンテキストを準備します。
+
+以下は参考情報として保持しています。
## 実行タスク
-以下のTaskツールによる並列読み込みを実行します:
+以下の@agent-symbol-searcherとTaskツールによる並列読み込み・検索を実行します:
+
+### 0. **@agent-symbol-searcher で関連情報を検索**
+ - 対象機能に関連する既存シンボル・関数・クラスを検索
+ - 類似機能の実装パターンやアーキテクチャを特定
+ - TDD関連のツール・フレームワークの使用方法を確認
```
1. 【読み込み】TDDメモファイルの確認
@@ -106,4 +113,4 @@ TDD開発に必要なファイルを効率的に読み込み、開発コンテ
- **保守性**: ファイル読み込み・探索ロジックの一元管理
- **軽量化**: 関連ファイルは特定のみで、必要に応じて個別に読み込み可能
-このタスクにより、TDD開発の各フェーズで必要な情報を効率的に準備できます。
\ No newline at end of file
+このタスクにより、@agent-symbol-searcherでの検索結果と既存TDDファイルの情報を組み合わせ、TDD開発の各フェーズで必要な情報を効率的に準備できます。
\ No newline at end of file
diff --git a/commands/tdd-red.md b/commands/tdd-red.md
index 5775413..fb7d0ee 100644
--- a/commands/tdd-red.md
+++ b/commands/tdd-red.md
@@ -6,7 +6,16 @@ TDDのRedフェーズを実行します。
開発コンテキストの準備を行います:
-**Taskツール実行**: `/tdd-load-context` でTDD関連ファイルの読み込みとコンテキスト準備を実行
+1. **@agent-symbol-searcher でテスト実装関連情報を検索し、見つかったファイルを読み込み**
+ - 既存のテストファイルやテスト関数を検索し、該当ファイルをReadツールで読み込み
+ - テストセットアップやモックの使用パターンを特定し、関連ファイルをReadツールで読み込み
+ - Jest/Mochaなどのテストフレームワークの設定を確認し、設定ファイルをReadツールで読み込み
+
+2. **関連ファイルを直接読み込み**
+ - `docs/implements/{{task_id}}/{feature_name}-memo.md` - 既存の開発履歴を確認
+ - `docs/implements/{{task_id}}/{feature_name}-requirements.md` - 要件定義を確認
+ - `docs/implements/{{task_id}}/{feature_name}-testcases.md` - テストケース定義を確認
+ - 関連する設計文書やタスクファイルも必要に応じて読み込み
読み込み完了後、準備されたコンテキスト情報を基にRedフェーズ(失敗テスト作成)の作業を開始します。
diff --git a/commands/tdd-refactor.md b/commands/tdd-refactor.md
index 04f44c6..a274efb 100644
--- a/commands/tdd-refactor.md
+++ b/commands/tdd-refactor.md
@@ -6,7 +6,17 @@ TDDのRefactorフェーズを実行します。
開発コンテキストの準備を行います:
-**Taskツール実行**: `/tdd-load-context` でTDD関連ファイルの読み込みとコンテキスト準備を実行
+1. **@agent-symbol-searcher でリファクタリング関連情報を検索し、見つかったファイルを読み込み**
+ - 既存のコードスタイルやベストプラクティスを検索し、スタイルガイドをReadツールで読み込み
+ - プロジェクト全体のアーキテクチャパターンを特定し、設計文書をReadツールで読み込み
+ - 再利用可能なユーティリティ関数やコンポーネントを確認し、関連ファイルをReadツールで読み込み
+
+2. **関連ファイルを直接読み込み**
+ - `docs/implements/{{task_id}}/{feature_name}-memo.md` - 既存の開発履歴を確認
+ - `docs/implements/{{task_id}}/{feature_name}-requirements.md` - 要件定義を確認
+ - `docs/implements/{{task_id}}/{feature_name}-testcases.md` - テストケース定義を確認
+ - `docs/implements/{{task_id}}/{feature_name}-green-phase.md` - Greenフェーズの実装を確認
+ - 関連する設計文書やタスクファイルも必要に応じて読み込み
読み込み完了後、準備されたコンテキスト情報を基にRefactorフェーズ(コード改善)の作業を開始します。
diff --git a/commands/tdd-requirements.md b/commands/tdd-requirements.md
index bd03082..3f74870 100644
--- a/commands/tdd-requirements.md
+++ b/commands/tdd-requirements.md
@@ -8,7 +8,16 @@ TDD開発を始めます。以下の機能について要件を整理してく
開発コンテキストの準備を行います:
-**Taskツール実行**: `/tdd-load-context` でTDD関連ファイルの読み込みとコンテキスト準備を実行
+1. **@agent-symbol-searcher で機能関連情報を検索し、見つかったファイルを読み込み**
+ - 関連する既存機能・コンポーネントを検索し、該当ファイルをReadツールで読み込み
+ - 類似した実装パターンやアーキテクチャを特定し、設計文書をReadツールで読み込み
+ - 既存のインターフェースやAPI仕様を確認し、関連ファイルをReadツールで読み込み
+
+2. **関連ファイルを直接読み込み**
+ - `docs/implements/{{task_id}}/{feature_name}-memo.md` - 既存の開発履歴を確認
+ - `docs/implements/{{task_id}}/{feature_name}-requirements.md` - 既存の要件定義を確認
+ - `docs/implements/{{task_id}}/{feature_name}-testcases.md` - 既存のテストケースを確認
+ - 関連する設計文書やタスクファイルも必要に応じて読み込み
読み込み完了後、準備されたコンテキスト情報を基にTDD要件定義の作業を開始します。
diff --git a/commands/tdd-testcases.md b/commands/tdd-testcases.md
index 25d5500..d4cfe6d 100644
--- a/commands/tdd-testcases.md
+++ b/commands/tdd-testcases.md
@@ -6,7 +6,16 @@
開発コンテキストの準備を行います:
-**Taskツール実行**: `/tdd-load-context` でTDD関連ファイルの読み込みとコンテキスト準備を実行
+1. **@agent-symbol-searcher でテスト関連情報を検索し、見つかったファイルを読み込み**
+ - 既存のテストパターンやテストケースを検索し、該当テストファイルをReadツールで読み込み
+ - 類似機能のテスト方法やモック戦略を特定し、関連ファイルをReadツールで読み込み
+ - テストフレームワークの使用方法を確認し、設定ファイルをReadツールで読み込み
+
+2. **関連ファイルを直接読み込み**
+ - `docs/implements/{{task_id}}/{feature_name}-memo.md` - 既存の開発履歴を確認
+ - `docs/implements/{{task_id}}/{feature_name}-requirements.md` - 要件定義を確認
+ - `docs/implements/{{task_id}}/{feature_name}-testcases.md` - 既存のテストケースを確認
+ - 関連する設計文書やタスクファイルも必要に応じて読み込み
読み込み完了後、準備されたコンテキスト情報を基にテストケースの洗い出しを行います。
diff --git a/commands/tdd-todo.md b/commands/tdd-todo.md
index 892182b..48308e9 100644
--- a/commands/tdd-todo.md
+++ b/commands/tdd-todo.md
@@ -16,12 +16,14 @@
## 作成手順
1. **要件定義文書の分析**
+ - @agent-symbol-searcher で関連要件・設計文書を検索
- EARS記法による要件の理解
- ユーザストーリーと価値の把握
- 機能要件と非機能要件の確認
- Edgeケースと受け入れ基準の理解
2. **設計文書の分析**
+ - @agent-symbol-searcher で既存アーキテクチャパターンを検索
- アーキテクチャ設計の全体像を把握
- データベーススキーマの構造を理解
- APIエンドポイントの仕様を確認
@@ -29,6 +31,7 @@
- データフローの設計を理解
3. **タスクファイルの分析**
+ - @agent-symbol-searcher で関連タスクIDや完了状態を検索
- 全体のフェーズ構造を把握
- タスクID別の実装内容を確認
- 依存関係と実行順序を理解
diff --git a/commands/tdd-verify-complete.md b/commands/tdd-verify-complete.md
index 3ec8275..233d051 100644
--- a/commands/tdd-verify-complete.md
+++ b/commands/tdd-verify-complete.md
@@ -28,7 +28,17 @@ TDD開発でテストケースの実装が完全に完了しているかを検
検証コンテキストの準備を行います:
-**Taskツール実行**: `/tdd-load-context` でTDD関連ファイルの読み込みとコンテキスト準備を実行
+1. **@agent-symbol-searcher で検証関連情報を検索し、見つかったファイルを読み込み**
+ - 完了予定のテストケースや機能を検索し、該当ファイルをReadツールで読み込み
+ - 既存のテストカバレッジや品質基準を確認し、関連ファイルをReadツールで読み込み
+ - 実装完了タスクのマーキングパターンを特定し、タスクファイルをReadツールで読み込み
+
+2. **関連ファイルを直接読み込み**
+ - `docs/implements/{{task_id}}/{feature_name}-memo.md` - 既存の開発履歴を確認
+ - `docs/implements/{{task_id}}/{feature_name}-requirements.md` - 要件定義を確認
+ - `docs/implements/{{task_id}}/{feature_name}-testcases.md` - テストケース定義を確認
+ - `docs/implements/{{task_id}}/{feature_name}-refactor-phase.md` - Refactorフェーズの結果を確認
+ - 元タスクファイル (`docs/tasks/{taskfile}.md`) - タスクの完了状態を確認
読み込み完了後、準備されたコンテキスト情報を基にテストケース完全性検証を開始します。
diff --git a/package.json b/package.json
index bcdcba3..b5d399a 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,7 @@
"dist"
],
"scripts": {
- "build": "rm -rf dist && mkdir -p dist/commands && cp ./commands/*.md ./commands/*.sh dist/commands/ 2>/dev/null || true && tsup",
+ "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",
diff --git a/src/commands/install.tsx b/src/commands/install.tsx
index ecc78a8..c75dca9 100644
--- a/src/commands/install.tsx
+++ b/src/commands/install.tsx
@@ -23,33 +23,55 @@ const InstallComponent: React.FC = () => {
// 現在のディレクトリを取得
const currentDir = process.cwd();
- const targetDir = path.join(currentDir, ".claude", "commands");
+ const commandsTargetDir = path.join(currentDir, ".claude", "commands");
+ const agentsTargetDir = path.join(currentDir, ".claude", "agents");
- // tsumikiのcommandsディレクトリを取得
+ // tsumikiのcommandsディレクトリとagentsディレクトリを取得
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
- // ビルド後はdist/commandsを参照(cli.jsがdist/にあるため)
- const tsumikiDir = path.join(__dirname, "commands");
+ // ビルド後はdist/commands, dist/agentsを参照(cli.jsがdist/にあるため)
+ const tsumikiCommandsDir = path.join(__dirname, "commands");
+ const tsumikiAgentsDir = path.join(__dirname, "agents");
- // .claude/commandsディレクトリが存在しない場合は作成
- await fs.ensureDir(targetDir);
+ // .claude/commandsと.claude/agentsディレクトリが存在しない場合は作成
+ await fs.ensureDir(commandsTargetDir);
+ await fs.ensureDir(agentsTargetDir);
setStatus("copying");
// commandsディレクトリ内のすべての.mdファイルと.shファイルを取得
- const files = await fs.readdir(tsumikiDir);
- const targetFiles = files.filter(
+ 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[] = [];
- for (const file of targetFiles) {
- const sourcePath = path.join(tsumikiDir, file);
- const targetPath = path.join(targetDir, file);
+ // 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(file);
+ copiedFilesList.push(`agents/${file}`);
}
setCopiedFiles(copiedFilesList);
@@ -125,6 +147,7 @@ const InstallComponent: React.FC = () => {
/tdd-requirements
/kairo-design
+ @agent-symbol-searcher
...
);