@hir4ta/memoria 0.12.11 → 0.12.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "memoria",
3
3
  "description": "A plugin that provides long-term memory for Claude Code. It automatically saves context lost during auto-compact, offering features for session restoration, recording technical decisions, and learning developer patterns.",
4
- "version": "0.12.11",
4
+ "version": "0.12.13",
5
5
  "author": {
6
6
  "name": "hir4ta"
7
7
  },
package/README.ja.md CHANGED
@@ -2,27 +2,21 @@
2
2
 
3
3
  Claude Codeの長期記憶を実現するプラグイン
4
4
 
5
- セッションの自動保存、技術的な判断の記録、Webダッシュボードでの管理を提供します。
5
+ セッションの自動保存、インテリジェントな記憶検索、Webダッシュボードでの管理を提供します。
6
6
 
7
7
  ## 機能
8
8
 
9
9
  ### コア機能
10
10
  - **会話の自動保存**: セッション終了時にjqで自動保存(確実・高速)
11
+ - **自動記憶検索**: プロンプトごとに関連する過去のセッション・判断を自動で注入
11
12
  - **PreCompactバックアップ**: Auto-Compact前にinteractionsをバックアップ(コンテキスト95%で発動)
12
- - **手動保存**: `/memoria:save` で要約作成 + 構造化データ保存
13
+ - **フルデータ抽出**: `/memoria:save` で要約・判断・パターン・ルールを一括保存
14
+ - **記憶参照プランニング**: `/memoria:plan` で過去の知見を活用した設計・計画
13
15
  - **セッション再開**: `/memoria:resume` で過去のセッションを再開(チェーン追跡付き)
14
16
  - **セッション提案**: セッション開始時に最新3件を提案
15
- - **技術的な判断の記録**: `/memoria:decision` で判断を記録
16
17
  - **ルールベースレビュー**: `dev-rules.json` / `review-guidelines.json` に基づくレビュー
17
18
  - **週次レポート**: レビュー結果を集計したMarkdownレポートを自動生成
18
- - **Webダッシュボード**: セッション・判断記録の閲覧・編集
19
-
20
- ### 開発ワークフロー
21
- - **ブレインストーミング**: ソクラティック質問 + 記憶参照で設計 (`/memoria:brainstorm`)
22
- - **計画作成**: 2-5分単位のTDDタスク分割 (`/memoria:plan`)
23
- - **TDD**: RED-GREEN-REFACTORサイクルの厳格強制 (`/memoria:tdd`)
24
- - **デバッグ**: 根本原因分析 + エラーパターン参照 (`/memoria:debug`)
25
- - **二段階レビュー**: 仕様準拠 + コード品質 (`/memoria:review --full`)
19
+ - **Webダッシュボード**: セッション・判断・パターン・ルールの閲覧
26
20
 
27
21
  ## 課題と解決(導入メリット)
28
22
 
@@ -30,15 +24,16 @@ Claude Codeの長期記憶を実現するプラグイン
30
24
 
31
25
  - **コンテキストの消失**: セッション終了やAuto-Compactで会話の文脈が失われる
32
26
  - **判断の不透明化**: 「なぜこの設計にしたのか」が後から追えない
27
+ - **同じミスの繰り返し**: 同じエラーを何度も解決(学習されない)
33
28
  - **知見の再利用が難しい**: 過去のやり取りや決定を検索・参照しづらい
34
29
 
35
- ### memoria でできること/解消できること
30
+ ### memoria でできること
36
31
 
37
32
  - **自動保存 + 再開**で、セッションを跨いだ文脈の継続が可能
38
- - **判断記録**で、理由・代替案を後から追跡
33
+ - **自動記憶検索**で、関連する過去の知見が常に会話に反映される
34
+ - **判断・パターン記録**で、理由やエラー解決策を後から追跡
39
35
  - **検索とダッシュボード**で、過去の記録を素早く参照
40
36
  - **レビュー機能**で、リポジトリ固有の観点に基づいて指摘
41
- - **週次レポート**で、レビュー観点の改善と共有が容易
42
37
 
43
38
  ### チーム利用のメリット
44
39
 
@@ -106,8 +101,14 @@ Claude Codeを再起動
106
101
 
107
102
  **PreCompact**ではinteractionsを`preCompactBackups`にバックアップします(コンテキスト95%で発動)。要約は自動作成されません。
108
103
 
109
- **要約と構造化データ**は `/memoria:save` で手動作成:
110
- - JSON: `title`, `tags`, `summary`, `plan`, `discussions`, `errors`, `handoff`, `references` を更新
104
+ ### 自動記憶検索
105
+
106
+ **プロンプトごとに**、memoriaは自動で:
107
+ 1. メッセージからキーワードを抽出
108
+ 2. sessions/decisions/patternsを検索
109
+ 3. 関連情報をClaudeに注入
110
+
111
+ 手動で検索しなくても、過去の知見が常に活用されます。
111
112
 
112
113
  ### セッション提案
113
114
 
@@ -122,43 +123,27 @@ Claude Codeを再起動
122
123
  Continue from a previous session? Use `/memoria:resume <id>`
123
124
  ```
124
125
 
125
- ### セッションチェーン追跡
126
-
127
- セッションを再開すると、チェーンが追跡されます:
128
-
129
- ```
130
- /memoria:resume abc123
131
-
132
- 現在のセッションJSONを更新: "resumedFrom": "abc123"
133
-
134
- チェーン: current ← abc123
135
- ```
136
-
137
126
  ### コマンド
138
127
 
139
128
  | コマンド | 説明 |
140
129
  | --------- | ------ |
130
+ | `/memoria:save` | 全データ抽出: 要約・判断・パターン・ルール |
131
+ | `/memoria:plan [トピック]` | 記憶参照 + ソクラティック質問 + タスク分割 |
141
132
  | `/memoria:resume [id]` | セッションを再開(ID省略で一覧表示) |
142
- | `/memoria:save` | 要約作成 + 構造化データ保存 + ルール抽出 |
143
- | `/memoria:decision "タイトル"` | 技術的な判断を記録 |
144
- | `/memoria:search "クエリ"` | セッション・判断記録を検索 |
145
- | `/memoria:review [--staged\|--all\|--diff=branch\|--full]` | ルールに基づくレビュー(--fullで二段階) |
133
+ | `/memoria:search "クエリ"` | セッション・判断・パターンを検索 |
134
+ | `/memoria:review [--staged\|--all\|--diff=branch\|--full]` | ルールに基づくレビュー |
146
135
  | `/memoria:report [--from YYYY-MM-DD --to YYYY-MM-DD]` | 週次レビューレポート |
147
- | `/memoria:brainstorm [トピック]` | ソクラティック質問 + 記憶参照で設計 |
148
- | `/memoria:plan [トピック]` | 2-5分TDDタスクに分割した計画作成 |
149
- | `/memoria:tdd` | RED-GREEN-REFACTOR厳格サイクル |
150
- | `/memoria:debug` | 根本原因分析 + エラーパターン参照 |
151
136
 
152
137
  ### 推奨ワークフロー
153
138
 
154
139
  ```
155
- brainstormplantdd → review
140
+ planimplementsave → review
156
141
  ```
157
142
 
158
- 1. **brainstorm**: ソクラティック質問 + 記憶参照で設計
159
- 2. **plan**: 2-5分TDDタスクに分割
160
- 3. **tdd**: RED → GREEN → REFACTOR で実装
161
- 4. **review**: 仕様準拠(--full)+ コード品質をレビュー
143
+ 1. **plan**: 記憶参照 + ソクラティック質問 + タスク分割
144
+ 2. **implement**: 計画に沿って実装
145
+ 3. **save**: 判断・パターン・ルールを抽出
146
+ 4. **review**: 計画準拠とコード品質をレビュー
162
147
 
163
148
  ### ダッシュボード
164
149
 
@@ -178,9 +163,9 @@ npx @hir4ta/memoria --dashboard --port 8080
178
163
 
179
164
  #### 画面一覧
180
165
 
181
- - **Sessions**: セッション一覧・詳細・編集・削除
182
- - **Decisions**: 技術的な判断の一覧・作成・編集・削除
183
- - **Rules**: 開発ルール・レビュー観点の閲覧・編集
166
+ - **Sessions**: セッション一覧・詳細
167
+ - **Decisions**: 技術的な判断の一覧・詳細
168
+ - **Rules**: 開発ルール・レビュー観点の閲覧
184
169
  - **Patterns**: 学習済みパターンの閲覧(グッドパターン、アンチパターン、エラー解決策)
185
170
  - **Statistics**: アクティビティチャート・セッション統計の表示
186
171
  - **Graph**: タグ共有によるセッション関連性の可視化
@@ -199,47 +184,41 @@ flowchart TB
199
184
  C --> D[interactions + files + metrics]
200
185
  end
201
186
 
187
+ subgraph autosearch [自動記憶検索]
188
+ E[ユーザープロンプト] --> F[UserPromptSubmitフック]
189
+ F --> G[sessions/decisions/patternsを検索]
190
+ G --> H[関連コンテキストを注入]
191
+ end
192
+
202
193
  subgraph backup [PreCompactバックアップ]
203
- E[コンテキスト95%] --> F[PreCompactフック]
204
- F --> G[interactionsをpreCompactBackupsに保存]
194
+ I[コンテキスト95%] --> J[PreCompactフック]
195
+ J --> K[interactionsをpreCompactBackupsに保存]
205
196
  end
206
197
 
207
198
  subgraph manual [手動操作]
208
- H["memoria:save"] --> I[JSON更新(構造化データ)]
209
- J["memoria:decision"] --> K[判断を明示的に記録]
199
+ L["memoria:save"] --> M[判断 + パターン + ルールを抽出]
200
+ N["memoria:plan"] --> O[記憶参照 + 設計 + タスク分割]
210
201
  end
211
202
 
212
203
  subgraph resume [セッション再開]
213
- L["memoria:resume"] --> M[一覧から選択]
214
- M --> N[過去の文脈を復元 + resumedFrom設定]
215
- end
216
-
217
- subgraph search [検索]
218
- O["memoria:search"] --> P[セッションと判断を検索]
204
+ P["memoria:resume"] --> Q[一覧から選択]
205
+ Q --> R[過去の文脈を復元 + resumedFrom設定]
219
206
  end
220
207
 
221
208
  subgraph review [レビュー]
222
- Q["memoria:review"] --> R[ルールに基づく指摘]
223
- R --> S[レビュー結果を保存]
224
- end
225
-
226
- subgraph report [週次レポート]
227
- T["memoria:report"] --> U[レビュー集計レポート]
209
+ S["memoria:review"] --> T[ルールに基づく指摘]
210
+ T --> U[レビュー結果を保存]
228
211
  end
229
212
 
230
213
  subgraph dashboard [ダッシュボード]
231
214
  V["npx @hir4ta/memoria -d"] --> W[ブラウザで表示]
232
- W --> X[閲覧・編集・削除]
215
+ W --> X[全データを閲覧]
233
216
  end
234
217
 
235
- D --> L
236
- G --> L
237
- I --> L
238
- K --> O
239
- D --> S
240
- S --> U
241
- D --> V
242
- K --> V
218
+ D --> P
219
+ H --> L
220
+ M --> V
221
+ U --> V
243
222
  ```
244
223
 
245
224
  ## データ保存
@@ -249,10 +228,14 @@ flowchart TB
249
228
  ```text
250
229
  .memoria/
251
230
  ├── tags.json # タグマスターファイル(93タグ、表記揺れ防止)
252
- ├── sessions/ # セッション履歴 (YYYY/MM)
231
+ ├── sessions/ # セッション履歴(自動 + 手動保存)
232
+ │ └── YYYY/MM/
233
+ │ └── {id}.json
234
+ ├── decisions/ # 技術的な判断(/saveから)
253
235
  │ └── YYYY/MM/
254
- │ └── {id}.json # 全セッションデータ(自動 + 手動保存)
255
- ├── decisions/ # 技術的な判断 (YYYY/MM)
236
+ │ └── {id}.json
237
+ ├── patterns/ # エラーパターン(/saveから)
238
+ │ └── {user}.json
256
239
  ├── rules/ # 開発ルール / レビュー観点
257
240
  ├── reviews/ # レビュー結果 (YYYY/MM)
258
241
  └── reports/ # 週次レポート (YYYY-MM)
package/README.md CHANGED
@@ -2,27 +2,21 @@
2
2
 
3
3
  Long-term memory plugin for Claude Code
4
4
 
5
- Provides automatic session saving, technical decision recording, and web dashboard management.
5
+ Provides automatic session saving, intelligent memory search, and web dashboard management.
6
6
 
7
7
  ## Features
8
8
 
9
9
  ### Core Features
10
10
  - **Auto-save interactions**: Conversations auto-saved at session end (jq-based, reliable)
11
+ - **Auto memory search**: Related past sessions/decisions automatically injected on each prompt
11
12
  - **Backup on PreCompact**: Interactions backed up before Auto-Compact (context 95% full)
12
- - **Manual save**: Create summary and structured data with `/memoria:save`
13
+ - **Full data extraction**: Save summary, decisions, patterns, and rules with `/memoria:save`
14
+ - **Memory-informed planning**: Design and plan with past knowledge via `/memoria:plan`
13
15
  - **Session Resume**: Resume past sessions with `/memoria:resume` (with chain tracking)
14
16
  - **Session Suggestion**: Recent 3 sessions shown at session start
15
- - **Technical Decision Recording**: Record decisions with `/memoria:decision`
16
17
  - **Rule-based Review**: Code review based on `dev-rules.json` / `review-guidelines.json`
17
18
  - **Weekly Reports**: Auto-generate Markdown reports aggregating review results
18
- - **Web Dashboard**: View and edit sessions, decisions, and rules
19
-
20
- ### Development Workflow (superpowers-style)
21
- - **Brainstorming**: Socratic questioning + past memory lookup (`/memoria:brainstorm`)
22
- - **Planning**: 2-5 minute task breakdown with TDD enforcement (`/memoria:plan`)
23
- - **TDD**: Strict RED-GREEN-REFACTOR cycle (`/memoria:tdd`)
24
- - **Debugging**: Systematic root cause analysis + error pattern lookup (`/memoria:debug`)
25
- - **Two-stage Review**: Spec compliance + code quality (`/memoria:review --full`)
19
+ - **Web Dashboard**: View sessions, decisions, patterns, and rules
26
20
 
27
21
  ## Problems Solved
28
22
 
@@ -30,15 +24,16 @@ Provides automatic session saving, technical decision recording, and web dashboa
30
24
 
31
25
  - **Context Loss**: Conversation context is lost on session end or Auto-Compact
32
26
  - **Opaque Decisions**: "Why did we choose this design?" becomes untraceable
33
- - **Hard to Reuse Knowledge**: Past interactions and decisions are hard to search and reference
27
+ - **Repeated Mistakes**: Same errors solved multiple times without learning
28
+ - **Hard to Reuse Knowledge**: Past interactions and decisions are hard to search
34
29
 
35
30
  ### What memoria Enables
36
31
 
37
32
  - **Auto-save + Resume** enables context continuity across sessions
38
- - **Decision Recording** tracks reasoning and alternatives for later review
33
+ - **Auto memory search** brings relevant past knowledge to every conversation
34
+ - **Decision & Pattern Recording** tracks reasoning and error solutions
39
35
  - **Search and Dashboard** for quick access to past records
40
36
  - **Review Feature** for repository-specific code review
41
- - **Weekly Reports** for improving and sharing review practices
42
37
 
43
38
  ### Team Benefits
44
39
 
@@ -106,8 +101,14 @@ This will auto-update on Claude Code startup.
106
101
 
107
102
  **PreCompact** backs up interactions to `preCompactBackups` before Auto-Compact (context 95% full). Summary is NOT auto-created.
108
103
 
109
- **Summary and structured data** are created manually via `/memoria:save`:
110
- - Updates `title`, `tags`, `summary`, `plan`, `discussions`, `errors`, `handoff`, `references` in JSON
104
+ ### Auto Memory Search
105
+
106
+ **On every prompt**, memoria automatically:
107
+ 1. Extracts keywords from your message
108
+ 2. Searches sessions/decisions/patterns
109
+ 3. Injects relevant context to Claude
110
+
111
+ This means past knowledge is always available without manual lookup.
111
112
 
112
113
  ### Session Suggestion
113
114
 
@@ -122,43 +123,27 @@ At session start, recent 3 sessions are shown:
122
123
  Continue from a previous session? Use `/memoria:resume <id>`
123
124
  ```
124
125
 
125
- ### Session Chain Tracking
126
-
127
- When resuming a session, the chain is tracked:
128
-
129
- ```
130
- /memoria:resume abc123
131
-
132
- Current session JSON updated: "resumedFrom": "abc123"
133
-
134
- Chain: current ← abc123
135
- ```
136
-
137
126
  ### Commands
138
127
 
139
128
  | Command | Description |
140
129
  |---------|-------------|
130
+ | `/memoria:save` | Extract all data: summary, decisions, patterns, rules |
131
+ | `/memoria:plan [topic]` | Memory-informed design + Socratic questions + task breakdown |
141
132
  | `/memoria:resume [id]` | Resume session (show list if ID omitted) |
142
- | `/memoria:save` | Create summary + structured data + extract rules |
143
- | `/memoria:decision "title"` | Record a technical decision |
144
- | `/memoria:search "query"` | Search sessions and decisions |
145
- | `/memoria:review [--staged\|--all\|--diff=branch\|--full]` | Rule-based code review (--full for two-stage) |
133
+ | `/memoria:search "query"` | Search sessions, decisions, and patterns |
134
+ | `/memoria:review [--staged\|--all\|--diff=branch\|--full]` | Rule-based code review |
146
135
  | `/memoria:report [--from YYYY-MM-DD --to YYYY-MM-DD]` | Weekly review report |
147
- | `/memoria:brainstorm [topic]` | Design-first Socratic questioning + memory lookup |
148
- | `/memoria:plan [topic]` | Create implementation plan with 2-5 min TDD tasks |
149
- | `/memoria:tdd` | Strict RED-GREEN-REFACTOR development cycle |
150
- | `/memoria:debug` | Systematic debugging with error pattern lookup |
151
136
 
152
137
  ### Recommended Workflow
153
138
 
154
139
  ```
155
- brainstormplantdd → review
140
+ planimplementsave → review
156
141
  ```
157
142
 
158
- 1. **brainstorm**: Design with Socratic questions + past memory lookup
159
- 2. **plan**: Break into 2-5 minute TDD tasks
160
- 3. **tdd**: Implement with RED → GREEN → REFACTOR
161
- 4. **review**: Verify against plan (--full) and code quality
143
+ 1. **plan**: Design with memory lookup + Socratic questions + task breakdown
144
+ 2. **implement**: Follow the plan
145
+ 3. **save**: Extract decisions, patterns, rules
146
+ 4. **review**: Verify against plan and code quality
162
147
 
163
148
  ### Dashboard
164
149
 
@@ -178,9 +163,9 @@ npx @hir4ta/memoria --dashboard --port 8080
178
163
 
179
164
  #### Screens
180
165
 
181
- - **Sessions**: List, view, edit, delete sessions
182
- - **Decisions**: List, create, edit, delete technical decisions
183
- - **Rules**: View and edit dev rules and review guidelines
166
+ - **Sessions**: List and view sessions
167
+ - **Decisions**: List and view technical decisions
168
+ - **Rules**: View dev rules and review guidelines
184
169
  - **Patterns**: View learned patterns (good patterns, anti-patterns, error solutions)
185
170
  - **Statistics**: View activity charts and session statistics
186
171
  - **Graph**: Visualize session connections by shared tags
@@ -199,47 +184,41 @@ flowchart TB
199
184
  C --> D[interactions + files + metrics]
200
185
  end
201
186
 
187
+ subgraph autosearch [Auto Memory Search]
188
+ E[User Prompt] --> F[UserPromptSubmit Hook]
189
+ F --> G[Search sessions/decisions/patterns]
190
+ G --> H[Inject relevant context]
191
+ end
192
+
202
193
  subgraph backup [PreCompact Backup]
203
- E[Context 95% Full] --> F[PreCompact Hook]
204
- F --> G[Backup interactions to preCompactBackups]
194
+ I[Context 95% Full] --> J[PreCompact Hook]
195
+ J --> K[Backup interactions to preCompactBackups]
205
196
  end
206
197
 
207
198
  subgraph manual [Manual Actions]
208
- H["memoria:save"] --> I[Update JSON with structured data]
209
- J["memoria:decision"] --> K[Record decision explicitly]
199
+ L["memoria:save"] --> M[Extract decisions + patterns + rules]
200
+ N["memoria:plan"] --> O[Memory-informed design + tasks]
210
201
  end
211
202
 
212
203
  subgraph resume [Session Resume]
213
- L["memoria:resume"] --> M[Select from list]
214
- M --> N[Restore past context + set resumedFrom]
215
- end
216
-
217
- subgraph search [Search]
218
- O["memoria:search"] --> P[Search sessions and decisions]
204
+ P["memoria:resume"] --> Q[Select from list]
205
+ Q --> R[Restore past context + set resumedFrom]
219
206
  end
220
207
 
221
208
  subgraph review [Review]
222
- Q["memoria:review"] --> R[Rule-based findings]
223
- R --> S[Save review results]
224
- end
225
-
226
- subgraph report [Weekly Report]
227
- T["memoria:report"] --> U[Review summary report]
209
+ S["memoria:review"] --> T[Rule-based findings]
210
+ T --> U[Save review results]
228
211
  end
229
212
 
230
213
  subgraph dashboard [Dashboard]
231
214
  V["npx @hir4ta/memoria -d"] --> W[Open in browser]
232
- W --> X[View, edit, delete]
215
+ W --> X[View all data]
233
216
  end
234
217
 
235
- D --> L
236
- G --> L
237
- I --> L
238
- K --> O
239
- D --> S
240
- S --> U
241
- D --> V
242
- K --> V
218
+ D --> P
219
+ H --> L
220
+ M --> V
221
+ U --> V
243
222
  ```
244
223
 
245
224
  ## Data Storage
@@ -252,7 +231,11 @@ All data is stored in `.memoria/` directory:
252
231
  ├── sessions/ # Session history (YYYY/MM)
253
232
  │ └── YYYY/MM/
254
233
  │ └── {id}.json # All session data (auto + manual save)
255
- ├── decisions/ # Technical decisions (YYYY/MM)
234
+ ├── decisions/ # Technical decisions (from /save)
235
+ │ └── YYYY/MM/
236
+ │ └── {id}.json
237
+ ├── patterns/ # Error patterns (from /save)
238
+ │ └── {user}.json
256
239
  ├── rules/ # Dev rules / review guidelines
257
240
  ├── reviews/ # Review results (YYYY/MM)
258
241
  └── reports/ # Weekly reports (YYYY-MM)