evanflow-compact

Compact AI session context while preserving anchors and isolating branches during phase boundaries.

417|18|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/evanklem/evanflow --skill evanflow-compact
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: evanflow-compact
Source: https://github.com/evanklem/evanflow/tree/main/skills/evanflow-compact
Command: npx skills add https://github.com/evanklem/evanflow --skill evanflow-compact

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Long-running agent sessions suffer from context drift and memory degradation, reducing decision quality over time. This skill provides proactive strategies to compact context, preserve critical anchors, and isolate side-quests to keep the main thread focused.

Core Features & Use Cases

  • Proactive phase-boundary compaction that preserves decisions and open questions
  • Anchor-based memory preservation (e.g., CONTEXT.md, ADRs) to survive through iterations
  • Branch isolation to move side-quests into separate sessions without polluting the main context

Quick Start

Invoke evanflow-compact at a clean boundary to compact context while preserving anchors.

Frequently Asked Questions about evanflow-compact

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent context drift in long-running AI agent sessions?

To prevent context drift in long-running AI agent sessions, apply proactive phase-boundary compaction to preserve critical anchors and decisions while discarding irrelevant history, maintaining focus and decision quality across iterations.

What is the best way to compact context without losing critical session anchors?

The best way to compact context without losing critical anchors is to invoke compaction at clean phase boundaries, which preserves memory anchors like CONTEXT.md and architectural decision records while removing degraded or irrelevant session data.

How do I isolate side-quests from my main AI agent context thread?

You can isolate side-quests from your main AI agent context thread by using branch isolation, a technique that moves secondary explorations into separate sessions to prevent pollution of the primary working context.

When should I apply context compaction during an AI agent workflow?

Context compaction should be applied during major phase boundaries or after lengthy back-and-forth sessions, proactively stabilizing the context to prevent memory degradation before decision quality is impacted.

Does session compaction support preserving architectural decision records across iterations?

Yes, session compaction supports preserving architectural decision records across iterations through anchor-based memory preservation, ensuring critical decisions and open questions survive the context compaction process.

What are the limitations of proactive context compaction for AI agents?

A limitation of proactive context compaction is that it requires a clean phase boundary to execute effectively, meaning mid-task invocation may disrupt the active reasoning flow if side-quests are not properly isolated beforehand.