diff --git a/docs/specification/06_development_guide.md b/docs/specification/06_development_guide.md index a29a7b8..112d19f 100644 --- a/docs/specification/06_development_guide.md +++ b/docs/specification/06_development_guide.md @@ -1,47 +1,55 @@ # 開発者ガイド (Development Guide) -## 1. 開発の基本コンセプト +## 1. 開発の基本コンセプト (Core Concepts) -TelosDB の開発においては、**「確信の持てるコード」**と**「自動化された環境」**を重視します。Windows 環境特有の DLL 競合やビルドエラーを避けるため、環境構築手順を簡略化しています。 +TelosDB の開発においては、**「確信の持てるコード」**と**「自動化された環境」**を重視します。Windows 環境特有 of DLL 競合やビルドエラーを避けるため、環境構築手順を簡略化しています。 +In TelosDB development, we emphasize **"code you can trust"** and an **"automated environment."** To avoid DLL conflicts and build errors specific to the Windows environment, we have simplified the setup procedures. -## 2. 環境構築の手順 +## 2. 環境構築の手順 (Setup Procedures) -### 2.1 必要なツール +### 2.1 必要なツール (Required Tools) -- **Rust**: 最新の Stable ツールチェーン。 -- **Node.js**: フロントエンド資材の管理用。 -- **VS Code**: 推奨エディタ(Tauri / Rust 拡張機能)。 +- **Rust**: 最新の Stable ツールチェーン。 (Latest Stable toolchain) +- **Node.js**: フロントエンド資材の管理用。 (For managing frontend assets) +- **VS Code**: 推奨エディタ(Tauri / Rust 拡張機能)。 (Recommended editor with Tauri/Rust extensions) -### 2.2 初回セットアップ +### 2.2 初回セットアップ (Initial Setup) -1. リポジトリをクローン。 -2. `npm install` を実行(`sqlite-vec` などのバイナリ等が含まれます)。 -3. `src-tauri/resources/` に指定の推論モデル(Gemma-3 GGUF)を配置。 +1. リポジトリをクローン。 (Clone the repository) +2. `npm install` を実行(`sqlite-vec` などのバイナリ等が含まれます)。 (Run `npm install`, which includes binaries like `sqlite-vec`) +3. `src/backend/resources/` に指定の推論モデル(Gemma-3 GGUF)を配置。 (Place the specified inference model in `src/backend/resources/`) -## 3. ビルドと実行 +## 3. ビルドと実行 (Build and Run) ```bash # 開発モード(ホットリロード有効) +# Development mode (Hot reload enabled) npm run tauri dev ``` > [!NOTE] > 開発時に DLL のエラーが出る場合は、一度 `cargo clean` を行い、`build.rs` による DLL 再生成を促してください。 +> If a DLL error occurs during development, perform `cargo clean` once to prompt DLL regeneration via `build.rs`. -## 4. 拡張手順 (MCP ツールの追加) +## 4. 拡張手順 (MCP ツールの追加) (Extension Procedures: Adding MCP Tools) 新しい機能を MCP 経由で公開する場合は、以下のファイルを修正します。 +To expose a new feature via MCP, modify the following files: -1. **`mcp.rs`**: JSON-RPC ハンドラーに新しいメソッドを追加。 -2. **`document/mcp.json`**: ツールのスキーマ(引数定義)を記述。エージェントがこの定義を読み取ります。 -3. **`04_mcp_api_specification.md`**: 仕様書を更新。 +1. **`mcp.rs`**: JSON-RPC ハンドラーに新しいメソッドを追加。 (Add a new method to the JSON-RPC handler) +2. **`document/mcp.json`**: ツールのスキーマ(引数定義)を記述。エージェントがこの定義を読み取ります。 (Describe the tool schema/argument definitions. The agent reads this definition) +3. **`04_mcp_api_specification.md`**: 仕様書を更新。 (Update the specification document) -## 5. コーディング規約とテスト +## 5. コーディング規約とテスト (Coding Conventions and Testing) -- **非同期処理**: SQLite 操作や通信はすべて `tokio` ランタイム上で行い、UI をブロックしないようにします。 -- **ログ**: `log::info!` / `log::error!` を使用してください。ログは `src-tauri/logs/` に自動出力されます。 -- **テスト**: ロジックの変更後は必ず `scripts/test_mcp_client.mjs` を実行し、既存ツールが壊れていないか確認してください。 +- **非同期処理 (Asynchronous Processing)**: SQLite 操作や通信はすべて `tokio` ランタイム上で行い、UI をブロックしないようにします。 + All SQLite operations and communications are performed on the `tokio` runtime to avoid blocking the UI. +- **ログ (Logging)**: `log::info!` / `log::error!` を使用してください。ログは `src/backend/logs/` に自動出力されます。 + Use `log::info!` / `log::error!`. Logs are automatically output to `src/backend/logs/`. +- **テスト (Testing)**: ロジックの変更後は必ず `scripts/test_mcp_client.mjs` を実行し、既存ツールが壊れていないか確認してください。 + Always run `scripts/test_mcp_client.mjs` after logic changes to ensure existing tools are not broken. -## 6. ライセンスと貢献 +## 6. ライセンスと貢献 (License and Contribution) TelosDB は MIT ライセンスの下で公開されています。貢献については、プロジェクトルートの `CONTRIBUTING.md`(存在する場合)またはリポジトリの運用方針を参照してください。 +TelosDB is published under the MIT license. For contributions, please refer to `CONTRIBUTING.md` (if it exists) in the project root or the repository's operational policy. diff --git "a/journals/20260223-0014-\351\201\213\347\224\250\343\203\253\343\203\274\343\203\253\343\201\256.agent_rules\343\201\270\343\201\256\347\247\273\350\241\214\343\201\250\346\227\245\350\213\261\344\275\265\350\250\230\345\214\226.md" "b/journals/20260223-0014-\351\201\213\347\224\250\343\203\253\343\203\274\343\203\253\343\201\256.agent_rules\343\201\270\343\201\256\347\247\273\350\241\214\343\201\250\346\227\245\350\213\261\344\275\265\350\250\230\345\214\226.md" index aa6b3ab..555f83f 100644 --- "a/journals/20260223-0014-\351\201\213\347\224\250\343\203\253\343\203\274\343\203\253\343\201\256.agent_rules\343\201\270\343\201\256\347\247\273\350\241\214\343\201\250\346\227\245\350\213\261\344\275\265\350\250\230\345\214\226.md" +++ "b/journals/20260223-0014-\351\201\213\347\224\250\343\203\253\343\203\274\343\203\253\343\201\256.agent_rules\343\201\270\343\201\256\347\247\273\350\241\214\343\201\250\346\227\245\350\213\261\344\275\265\350\250\230\345\214\226.md" @@ -10,19 +10,19 @@ - **観点**: AIエージェントの動作を規定するルールを `.agent/rules` に配置することで、セッション開始時に自動的にコンテキスト化されるようにする。 - **意図**: ルール自体を日英併記にすることで、グローバルな開発環境およびAIとの協調を円滑にする。 -## 3. 指記内容とその対応 +## 3. 指記事項とその対応 -- **ルール配置の修正**: `issue_management.md` と `development_guide.md` を `.agent/rules` へ移動。 +- **ルール配置の修正**: 運用ルールである `issue_management.md` を `.agent/rules` へ移動。技術仕様である `development_guide.md` は `docs/specification` で管理を継続。 - **日英併記**: 両ファイルの内容に英語翻訳を追加。 -- **不要ファイルの削除**: `docs/` 内の移動元ファイルおよび空になったディレクトリを削除。 +- **不要ファイルの削除**: `docs/` 内の移動元ファイル(Issue管理)を削除。 ## 4. 作業詳細 AIエージェントは以下の手順で作業を実施した。 1. `docs/workflow/issue_management.md` を抽出し、英語翻訳を付加して `.agent/rules/issue_management.md` を作成。 -2. `docs/specification/06_development_guide.md` を抽出し、英語翻訳を付加して `.agent/rules/development_guide.md` を作成。 -3. `docs/` 配下の古いファイルを削除し、不要なディレクトリ構造(`docs/workflow`)をクリーンアップした。 +2. `docs/specification/06_development_guide.md` を日英併記に更新(配置先は `docs/` 配下を維持)。 +3. 開発者向けの技術仕様と、AIエージェント向けの運用ルールの境界を明確にした。 ## 5. AI視点での結果