Refactor: Integrate AI features with MCP tools and add technical review

Critical improvements based on technical review:

## Fixed Issues (Priority: High)
1. AI features now properly integrated with MCP server
   - Added create_memory_with_ai tool (was implemented but unused!)
   - Added list_memories_by_priority tool
   - All memory outputs now include new fields: interpreted_content, priority_score, user_context

2. Added getter methods to MemoryManager
   - get_memory(id) for single memory retrieval
   - get_all_memories() for bulk access

3. Complete memory information in MCP responses
   - search_memories now returns all fields
   - Priority-based filtering and sorting functional

## New Files
- docs/TECHNICAL_REVIEW.md: Comprehensive technical evaluation
  - Scores: 65/100 overall, identified key improvements
  - Actionable recommendations for Phase 1-3
  - Architecture proposals and code examples

## Updated Documentation
- README.md: Added usage examples for new AI tools
- Clear distinction between basic and AI-powered tools

## Technical Debt Identified
- openai crate version needs update (see review doc)
- Config externalization needed
- Test suite missing
- LLM provider abstraction recommended

This brings the implementation in line with the "psychological priority memory"
concept. The AI interpretation and scoring features are now actually usable!

Next: Phase 2 improvements (config externalization, error handling)
This commit is contained in:
Claude
2025-11-05 14:17:14 +00:00
parent fd97ba2d81
commit 00c26f5984
5 changed files with 728 additions and 2 deletions

View File

@@ -86,21 +86,60 @@ aigpt import path/to/conversations.json
## 提供するMCPツール一覧
1. **create_memory** - 新しいメモリを作成
### 基本ツール
1. **create_memory** - 新しいメモリを作成(シンプル版)
2. **update_memory** - 既存のメモリを更新
3. **delete_memory** - メモリを削除
4. **search_memories** - メモリを検索
5. **list_conversations** - インポートされた会話を一覧表示
### AI機能ツール重要
6. **create_memory_with_ai** - AI解釈と心理判定付きでメモリを作成
- 元のコンテンツをAIが解釈
- 重要度を0.0-1.0のスコアで自動評価
- ユーザーコンテキストを考慮可能
7. **list_memories_by_priority** - 優先順位順にメモリをリスト
- 高スコアから順に表示
- min_scoreで閾値フィルタリング可能
- limit で件数制限可能
## ツールの使用例
Claude Desktop/Codeで以下のように使用します
### メモリ作成
### 基本的なメモリ作成
```
MCPツールを使って「今日は良い天気です」というメモリーを作成してください
```
### AI解釈付きメモリ作成推奨
```
create_memory_with_ai ツールを使って「新しいAI記憶システムのアイデアを思いついた」というメモリーを作成してください。
ユーザーコンテキスト: 「AI開発者、創造的思考を重視」
```
レスポンス例:
```json
{
"success": true,
"id": "uuid-here",
"memory": {
"content": "新しいAI記憶システムのアイデアを思いついた",
"interpreted_content": "AIによる解釈: 記憶システムの革新的アプローチ...",
"priority_score": 0.85,
"user_context": "AI開発者、創造的思考を重視"
}
}
```
### 優先順位でメモリをリスト
```
list_memories_by_priority ツールで、スコア0.7以上の重要なメモリを10件表示してください
```
### メモリの検索
```
MCPツールを使って「天気」に関するメモリーを検索してください