compaction-handling

Persist planning session state to YAML frontmatter and markdown working files.

4|Updated Feb 17, 2026
One-click install
npx skills add https://github.com/jonathanung/finesse --skill compaction-handling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compaction-handling
Source: https://github.com/jonathanung/finesse/tree/main/plugins/finesse/skills/compaction-handling
Command: npx skills add https://github.com/jonathanung/finesse --skill compaction-handling

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining critical information during long AI planning sessions where the AI's context window might become full and older information could be lost.

Core Features & Use Cases

  • Working File Persistence: Saves key planning session data to finesse-plans/<name>-working.md to prevent data loss.
  • Context Recovery: Enables the AI to reload state from the working file if context is compacted.
  • Phase Code Reference: Provides a clear mapping of phase codes for different task types (Feature, Bug Fix, Refactor, etc.) to track progress.
  • Post-Compaction Rules: Defines strict procedures for the AI to follow after context compaction to ensure accurate state recovery.

Quick Start

Use the compaction-handling skill to recover the planning session state from the working file.

Frequently Asked Questions about compaction-handling

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

FAQPage Schema
How do I prevent data loss when the AI context window fills up during planning?

To prevent data loss during long AI planning sessions, you can persist critical state data to a structured markdown working file with YAML frontmatter. This ensures session details survive context window compaction.

What is context compaction recovery in AI agents?

Context compaction recovery is a procedure that reloads saved planning session state from a persistent working file. It uses strict post-compaction rules to help AI agents accurately resume tasks after context limits are reached.

How do I save AI planning session state to a markdown file?

You save AI planning session state by writing key data into a structured working file using a defined schema. The file combines YAML frontmatter for metadata and a markdown body for state preservation and task tracking.

How do I track AI task progress using phase codes?

You track AI task progress by mapping phase codes to specific task types like Feature, Bug Fix, or Refactor. This provides a clear reference within the working file to monitor the current stage of the planning session.

Does this context management approach require any external dependencies?

No, this context management approach requires no external dependencies. It relies entirely on structured markdown files and YAML frontmatter to maintain state persistence and recovery for AI agents.