# PmeCompactionStrategy

**Kind:** Class

**Source:** [`atloria-monorepo/libs/pme-core/src/context/pme-compaction-strategy.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/pme-core/src/context/pme-compaction-strategy.ts#L31)

**Implements:** `CompactionStrategy`

## Methods

| Method | Signature | Returns |
|---|---|---|
| `shouldPreserve` | `shouldPreserve(item: ContextItem)` | `boolean` |
| `summarize` | `summarize(items: ContextItem[])` | `string` |

## Where it refuses work

- `PmeCompactionStrategy` stops the work with an early return when `item.role === 'system'`.
- `PmeCompactionStrategy` stops the work with an early return when `item.tags?.some((t) => PRESERVE_TAGS.has(t))`.
- `PmeCompactionStrategy` stops the work with an early return when `item.tokenEstimate < 200`.
