Manages token budget across sessions. Implements lazy loading, context compression, and progressive disclosure to maximize effective context usage.
"Load what you need, when you need it. Never the whole library."
Prevents context window saturation by managing what gets loaded and when. Implements lazy loading of skill references, progressive disclosure of large artifacts, and context compression for long sessions.
When to use:
/jm:optimize-ctx is invoked| Input | Type | Required | Description |
|---|---|---|---|
| Current context | State | Yes | Active session state |
| Active phase | Enum | Yes | Current pipeline phase |
| Output | Type | Description |
|---|---|---|
| Optimized context | State | Compressed session state |
| Eviction report | Text | What was compressed and why |
[!WARNING] IF loading a reference/ file that isn't for the active skill THEN DEFER. Load only when the skill executes.