@hir4ta/memoria 0.12.7 → 0.12.8

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.7",
4
+ "version": "0.12.8",
5
5
  "author": {
6
6
  "name": "hir4ta"
7
7
  },
package/README.ja.md CHANGED
@@ -9,7 +9,7 @@ Claude Codeの長期記憶を実現するプラグイン
9
9
  ### コア機能
10
10
  - **会話の自動保存**: セッション終了時にjqで自動保存(確実・高速)
11
11
  - **PreCompactバックアップ**: Auto-Compact前にinteractionsをバックアップ(コンテキスト95%で発動)
12
- - **手動保存**: `/memoria:save` で要約作成 + YAMLファイル生成
12
+ - **手動保存**: `/memoria:save` で要約作成 + 構造化データ保存
13
13
  - **セッション再開**: `/memoria:resume` で過去のセッションを再開(チェーン追跡付き)
14
14
  - **セッション提案**: セッション開始時に最新3件を提案
15
15
  - **技術的な判断の記録**: `/memoria:decision` で判断を記録
@@ -42,7 +42,7 @@ Claude Codeの長期記憶を実現するプラグイン
42
42
 
43
43
  ### チーム利用のメリット
44
44
 
45
- - `.memoria/` のJSON/YAMLは**Git管理可能**なので、判断や会話の履歴をチームで共有できる
45
+ - `.memoria/` のJSONファイルは**Git管理可能**なので、判断や会話の履歴をチームで共有できる
46
46
  - オンボーディングやレビュー時に「背景・経緯」を短時間で把握できる
47
47
 
48
48
  ## インストール
@@ -107,8 +107,7 @@ Claude Codeを再起動
107
107
  **PreCompact**ではinteractionsを`preCompactBackups`にバックアップします(コンテキスト95%で発動)。要約は自動作成されません。
108
108
 
109
109
  **要約と構造化データ**は `/memoria:save` で手動作成:
110
- - JSON: `title`, `tags` を更新(検索インデックス)
111
- - YAML: 構造化データを作成(summary, plan, discussions, errors, handoff)
110
+ - JSON: `title`, `tags`, `summary`, `plan`, `discussions`, `errors`, `handoff`, `references` を更新
112
111
 
113
112
  ### セッション提案
114
113
 
@@ -140,7 +139,7 @@ Continue from a previous session? Use `/memoria:resume <id>`
140
139
  | コマンド | 説明 |
141
140
  | --------- | ------ |
142
141
  | `/memoria:resume [id]` | セッションを再開(ID省略で一覧表示) |
143
- | `/memoria:save` | 要約作成 + YAML生成 + ルール抽出 |
142
+ | `/memoria:save` | 要約作成 + 構造化データ保存 + ルール抽出 |
144
143
  | `/memoria:decision "タイトル"` | 技術的な判断を記録 |
145
144
  | `/memoria:search "クエリ"` | セッション・判断記録を検索 |
146
145
  | `/memoria:review [--staged\|--all\|--diff=branch\|--full]` | ルールに基づくレビュー(--fullで二段階) |
@@ -206,7 +205,7 @@ flowchart TB
206
205
  end
207
206
 
208
207
  subgraph manual [手動操作]
209
- H["memoria:save"] --> I[YAML作成 + JSON更新]
208
+ H["memoria:save"] --> I[JSON更新(構造化データ)]
210
209
  J["memoria:decision"] --> K[判断を明示的に記録]
211
210
  end
212
211
 
@@ -252,8 +251,7 @@ flowchart TB
252
251
  ├── tags.json # タグマスターファイル(93タグ、表記揺れ防止)
253
252
  ├── sessions/ # セッション履歴 (YYYY/MM)
254
253
  │ └── YYYY/MM/
255
- ├── {id}.json # ログ + 検索インデックス(自動保存)
256
- │ └── {id}.yaml # 構造化データ(手動保存)
254
+ └── {id}.json # 全セッションデータ(自動 + 手動保存)
257
255
  ├── decisions/ # 技術的な判断 (YYYY/MM)
258
256
  ├── rules/ # 開発ルール / レビュー観点
259
257
  ├── reviews/ # レビュー結果 (YYYY/MM)
@@ -262,7 +260,9 @@ flowchart TB
262
260
 
263
261
  Gitでバージョン管理可能です。`.gitignore` に追加するかはプロジェクトに応じて判断してください。
264
262
 
265
- ### セッションJSONスキーマ(ログ + 検索インデックス)
263
+ ### セッションJSONスキーマ
264
+
265
+ 全てのセッションデータは単一のJSONファイルに保存されます:
266
266
 
267
267
  ```json
268
268
  {
@@ -297,68 +297,53 @@ Gitでバージョン管理可能です。`.gitignore` に追加するかはプ
297
297
  ],
298
298
  "preCompactBackups": [],
299
299
  "resumedFrom": "def45678",
300
- "status": "complete"
301
- }
302
- ```
300
+ "status": "complete",
301
+
302
+ "summary": {
303
+ "title": "JWT認証機能の実装",
304
+ "goal": "JWTベースの認証機能を実装",
305
+ "outcome": "success",
306
+ "description": "RS256署名でJWT認証を実装",
307
+ "sessionType": "implementation"
308
+ },
303
309
 
304
- ### セッションYAMLスキーマ(構造化データ)
305
-
306
- ```yaml
307
- version: 1
308
- session_id: abc12345
309
-
310
- summary:
311
- title: "JWT認証機能の実装"
312
- goal: "JWTベースの認証機能を実装"
313
- outcome: success # success | partial | blocked | abandoned
314
- description: "RS256署名でJWT認証を実装"
315
- session_type: implementation
316
-
317
- plan:
318
- tasks:
319
- - "[x] JWT署名方式の選定"
320
- - "[x] ミドルウェア実装"
321
- - "[ ] テスト追加"
322
- remaining:
323
- - "テスト追加"
324
-
325
- discussions:
326
- - topic: "署名方式"
327
- decision: "RS256を採用"
328
- reasoning: "本番環境でのセキュリティを考慮"
329
- alternatives:
330
- - "HS256(シンプルだが秘密鍵共有が必要)"
331
-
332
- code_examples:
333
- - file: "src/auth/jwt.ts"
334
- description: "JWT生成関数"
335
- after: |
336
- export function generateToken(payload: JWTPayload): string {
337
- return jwt.sign(payload, privateKey, { algorithm: 'RS256' });
338
- }
339
-
340
- errors:
341
- - error: "secretOrPrivateKey must be asymmetric"
342
- cause: "HS256用の秘密鍵をRS256で使用"
343
- solution: "RS256用のキーペアを生成"
344
-
345
- handoff:
346
- stopped_reason: "テスト作成は次回に持ち越し"
347
- notes:
348
- - "vitest設定済み"
349
- - "モック用のキーペアは test/fixtures/ に配置"
350
- next_steps:
351
- - "jwt.test.ts を作成"
352
- - "E2Eテスト追加"
353
-
354
- references:
355
- - url: "https://jwt.io/introduction"
356
- title: "JWT Introduction"
310
+ "plan": {
311
+ "tasks": ["[x] JWT署名方式の選定", "[x] ミドルウェア実装", "[ ] テスト追加"],
312
+ "remaining": ["テスト追加"]
313
+ },
314
+
315
+ "discussions": [
316
+ {
317
+ "topic": "署名方式",
318
+ "decision": "RS256を採用",
319
+ "reasoning": "本番環境でのセキュリティを考慮",
320
+ "alternatives": ["HS256(シンプルだが秘密鍵共有が必要)"]
321
+ }
322
+ ],
323
+
324
+ "errors": [
325
+ {
326
+ "error": "secretOrPrivateKey must be asymmetric",
327
+ "cause": "HS256用の秘密鍵をRS256で使用",
328
+ "solution": "RS256用のキーペアを生成"
329
+ }
330
+ ],
331
+
332
+ "handoff": {
333
+ "stoppedReason": "テスト作成は次回に持ち越し",
334
+ "notes": ["vitest設定済み", "モック用のキーペアは test/fixtures/ に配置"],
335
+ "nextSteps": ["jwt.test.ts を作成", "E2Eテスト追加"]
336
+ },
337
+
338
+ "references": [
339
+ { "url": "https://jwt.io/introduction", "title": "JWT Introduction" }
340
+ ]
341
+ }
357
342
  ```
358
343
 
359
344
  ### セッションタイプ
360
345
 
361
- `session_type` フィールド(YAML内)はセッションの種類を分類します。
346
+ `sessionType` フィールドはセッションの種類を分類します。
362
347
 
363
348
  | タイプ | 説明 |
364
349
  |--------|------|
package/README.md CHANGED
@@ -9,7 +9,7 @@ Provides automatic session saving, technical decision recording, and web dashboa
9
9
  ### Core Features
10
10
  - **Auto-save interactions**: Conversations auto-saved at session end (jq-based, reliable)
11
11
  - **Backup on PreCompact**: Interactions backed up before Auto-Compact (context 95% full)
12
- - **Manual save**: Create summary and YAML file with `/memoria:save`
12
+ - **Manual save**: Create summary and structured data with `/memoria:save`
13
13
  - **Session Resume**: Resume past sessions with `/memoria:resume` (with chain tracking)
14
14
  - **Session Suggestion**: Recent 3 sessions shown at session start
15
15
  - **Technical Decision Recording**: Record decisions with `/memoria:decision`
@@ -42,7 +42,7 @@ Provides automatic session saving, technical decision recording, and web dashboa
42
42
 
43
43
  ### Team Benefits
44
44
 
45
- - `.memoria/` JSON/YAML files are **Git-manageable**, enabling team sharing of decisions and session history
45
+ - `.memoria/` JSON files are **Git-manageable**, enabling team sharing of decisions and session history
46
46
  - Quickly understand background and context during onboarding or reviews
47
47
 
48
48
  ## Installation
@@ -107,8 +107,7 @@ This will auto-update on Claude Code startup.
107
107
  **PreCompact** backs up interactions to `preCompactBackups` before Auto-Compact (context 95% full). Summary is NOT auto-created.
108
108
 
109
109
  **Summary and structured data** are created manually via `/memoria:save`:
110
- - JSON: Updates `title`, `tags` (search index)
111
- - YAML: Creates structured data (summary, plan, discussions, errors, handoff)
110
+ - Updates `title`, `tags`, `summary`, `plan`, `discussions`, `errors`, `handoff`, `references` in JSON
112
111
 
113
112
  ### Session Suggestion
114
113
 
@@ -140,7 +139,7 @@ Chain: current ← abc123
140
139
  | Command | Description |
141
140
  |---------|-------------|
142
141
  | `/memoria:resume [id]` | Resume session (show list if ID omitted) |
143
- | `/memoria:save` | Create summary + YAML + extract rules |
142
+ | `/memoria:save` | Create summary + structured data + extract rules |
144
143
  | `/memoria:decision "title"` | Record a technical decision |
145
144
  | `/memoria:search "query"` | Search sessions and decisions |
146
145
  | `/memoria:review [--staged\|--all\|--diff=branch\|--full]` | Rule-based code review (--full for two-stage) |
@@ -206,7 +205,7 @@ flowchart TB
206
205
  end
207
206
 
208
207
  subgraph manual [Manual Actions]
209
- H["memoria:save"] --> I[Create YAML + update JSON]
208
+ H["memoria:save"] --> I[Update JSON with structured data]
210
209
  J["memoria:decision"] --> K[Record decision explicitly]
211
210
  end
212
211
 
@@ -252,8 +251,7 @@ All data is stored in `.memoria/` directory:
252
251
  ├── tags.json # Tag master file (93 tags, prevents notation variations)
253
252
  ├── sessions/ # Session history (YYYY/MM)
254
253
  │ └── YYYY/MM/
255
- ├── {id}.json # Log + search index (auto-saved)
256
- │ └── {id}.yaml # Structured data (manual save)
254
+ └── {id}.json # All session data (auto + manual save)
257
255
  ├── decisions/ # Technical decisions (YYYY/MM)
258
256
  ├── rules/ # Dev rules / review guidelines
259
257
  ├── reviews/ # Review results (YYYY/MM)
@@ -262,7 +260,9 @@ All data is stored in `.memoria/` directory:
262
260
 
263
261
  Git-manageable. Add to `.gitignore` based on your project needs.
264
262
 
265
- ### Session JSON Schema (Log + Search Index)
263
+ ### Session JSON Schema
264
+
265
+ All session data is stored in a single JSON file:
266
266
 
267
267
  ```json
268
268
  {
@@ -297,68 +297,53 @@ Git-manageable. Add to `.gitignore` based on your project needs.
297
297
  ],
298
298
  "preCompactBackups": [],
299
299
  "resumedFrom": "def45678",
300
- "status": "complete"
301
- }
302
- ```
300
+ "status": "complete",
301
+
302
+ "summary": {
303
+ "title": "JWT authentication implementation",
304
+ "goal": "Implement JWT-based auth with refresh token support",
305
+ "outcome": "success",
306
+ "description": "Implemented JWT auth with RS256 signing",
307
+ "sessionType": "implementation"
308
+ },
303
309
 
304
- ### Session YAML Schema (Structured Data)
305
-
306
- ```yaml
307
- version: 1
308
- session_id: abc12345
309
-
310
- summary:
311
- title: "JWT authentication implementation"
312
- goal: "Implement JWT-based auth with refresh token support"
313
- outcome: success # success | partial | blocked | abandoned
314
- description: "Implemented JWT auth with RS256 signing"
315
- session_type: implementation
316
-
317
- plan:
318
- tasks:
319
- - "[x] JWT signing method selection"
320
- - "[x] Middleware implementation"
321
- - "[ ] Add tests"
322
- remaining:
323
- - "Add tests"
324
-
325
- discussions:
326
- - topic: "Signing algorithm"
327
- decision: "Adopt RS256"
328
- reasoning: "Security considerations for production"
329
- alternatives:
330
- - "HS256 (simpler but requires shared secret)"
331
-
332
- code_examples:
333
- - file: "src/auth/jwt.ts"
334
- description: "JWT generation function"
335
- after: |
336
- export function generateToken(payload: JWTPayload): string {
337
- return jwt.sign(payload, privateKey, { algorithm: 'RS256' });
338
- }
339
-
340
- errors:
341
- - error: "secretOrPrivateKey must be asymmetric"
342
- cause: "Using HS256 secret with RS256"
343
- solution: "Generate RS256 key pair"
344
-
345
- handoff:
346
- stopped_reason: "Test creation postponed to next session"
347
- notes:
348
- - "vitest configured"
349
- - "Mock key pair in test/fixtures/"
350
- next_steps:
351
- - "Create jwt.test.ts"
352
- - "Add E2E tests"
353
-
354
- references:
355
- - url: "https://jwt.io/introduction"
356
- title: "JWT Introduction"
310
+ "plan": {
311
+ "tasks": ["[x] JWT signing method selection", "[x] Middleware implementation", "[ ] Add tests"],
312
+ "remaining": ["Add tests"]
313
+ },
314
+
315
+ "discussions": [
316
+ {
317
+ "topic": "Signing algorithm",
318
+ "decision": "Adopt RS256",
319
+ "reasoning": "Security considerations for production",
320
+ "alternatives": ["HS256 (simpler but requires shared secret)"]
321
+ }
322
+ ],
323
+
324
+ "errors": [
325
+ {
326
+ "error": "secretOrPrivateKey must be asymmetric",
327
+ "cause": "Using HS256 secret with RS256",
328
+ "solution": "Generate RS256 key pair"
329
+ }
330
+ ],
331
+
332
+ "handoff": {
333
+ "stoppedReason": "Test creation postponed to next session",
334
+ "notes": ["vitest configured", "Mock key pair in test/fixtures/"],
335
+ "nextSteps": ["Create jwt.test.ts", "Add E2E tests"]
336
+ },
337
+
338
+ "references": [
339
+ { "url": "https://jwt.io/introduction", "title": "JWT Introduction" }
340
+ ]
341
+ }
357
342
  ```
358
343
 
359
344
  ### Session Types
360
345
 
361
- The `session_type` field (in YAML) classifies the session type.
346
+ The `sessionType` field classifies the session type.
362
347
 
363
348
  | Type | Description |
364
349
  |------|-------------|