# reflect

dry-run 계획과 audit evidence를 사용하여 제한된 consolidation 및 memory-lifecycle maintenance pass를 실행합니다.

- Canonical: https://docs.xmemo.dev/ko/docs/tools/reflect
- Locale: ko-KR
- Content-Locale: ko-KR
- Canonical-Content-Digest: 7afa4b8d44fff19ccfcb601c0e34865481552d9859f6c34ad606585ce7cba9a4
- Edition-Digest: 490893430f038053ea13d7e69696cc8e0776d4da1225eeeddcfb7a6b0c8a49f2
- Source-Revision: sha256:fba63cf2a719e03b0aeff710b1b21a15473a175f8e5efc7000cc9bc6ebb7792a

## Tool Reference: `reflect`

### Purpose

bounded Dream/Reflection maintenance pass를 실행하여 consolidation 및 memory-lifecycle 결정을 보고하고, 선택적으로 지정된 write를 적용합니다.

### Parameters

- `actions_csv` (string, optional, default: summarize,promote,expire,decay,archive): 쉼표로 구분한 action입니다. 제공되는 action은 summarize, promote, expire, decay 및 archive이며 summary, promotion, expiry 및 importance_decay 같은 alias는 compactor가 normalize합니다.
- `dry_run` (boolean, optional, default: false): true이면 consolidation 또는 lifecycle write 없이 candidate와 count를 계산합니다. review에는 이를 우선합니다.
- `time_window_hours` (number, optional, default: 24.0): episodic summarize/promote 선택에 사용하는 양수 lookback window이며, 지정하면 since가 이를 대신합니다.
- `since / until` (string, optional, default: empty): reflection window의 선택적 ISO 8601 경계이며, 잘못된 timestamp는 거부됩니다.
- `path_filter / owner_filter` (string, optional, default: % / authenticated owner): logical path와 owner filter입니다. server가 owner filter를 인증된 context에 맞춰 확인합니다.
- `bucket / scope / team_id` (string, optional, default: % / empty / empty): 선택적 memory boundary filter이며, 명시한 team_id는 bound/authenticated team context와 일치해야 합니다.
- `limit` (integer, optional, default: 500): compactor에 전달하는 최대 candidate budget이며 implementation이 지원 범위로 제한합니다.

### Returns

compactor는 dry_run, normalized actions, filters, summaries, promotions, lifecycle details, counts.summarized/promoted/expired/decayed/archived 및 audit_record_ids가 있는 report를 만듭니다. MCP text response는 '### Memory Reflect Report'로 시작하며 Dry Run, Actions, 다섯 가지 count, Audit Records 및 처음 20개의 Audit ID까지 표시합니다.

### Errors

- 401/403: caller가 dry_run에 필요한 read scope 또는 mutating run에 필요한 write scope가 없거나 요청한 owner/team/bound space가 승인되지 않았습니다.
- Validation failure: action이 지원되지 않거나 time_window_hours가 양수가 아니거나 since/until이 ISO 8601이 아니거나 boundary/limit 값이 유효하지 않습니다.
- Team authorization failure: 권한이 없는 team lifecycle mutation은 조용히 적용하지 않고 거부합니다.
- Concurrency or audit failure: memory가 변경되었거나 status transition이 완료되지 않았거나 consolidation audit가 실패하면 rollback하거나 error로 보고합니다.

### Examples

#### 전체 maintenance pass 미리 보기



```typescript
reflect({
  actions_csv: "summarize,promote,expire,decay,archive",
  dry_run: true,
  time_window_hours: 24,
  limit: 500
})
```

#### 명시적으로 승인된 lifecycle action 적용



```typescript
reflect({
  actions_csv: "archive",
  dry_run: false,
  bucket: "personal",
  limit: 100
})
```

### Related Tools

- [recall_context](/docs/tools/recall-context): maintenance가 필요한지 결정하기 전에 bounded context pack을 읽습니다.
- [remember](/docs/tools/remember): consolidation pass 없이 명시적으로 요청된 durable fact 하나를 저장합니다.
- [search_memory](/docs/tools/search): lifecycle maintenance가 아니라 retrieval이 필요할 때 승인된 memory를 검색합니다.

## 메모리를 변경하기 전에 미리 보기

dry_run=true를 사용해 다섯 가지 제공 reflection action, 각 count 및 candidate 세부 정보를 확인한 후 summary, promotion, expiry, decay 또는 archive write를 허용합니다.

