gpd-compact-state

Archive historical STATE.md entries into STATE-ARCHIVE.md and update state.json.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/MichaelsEngineering/get-physics-done-test --skill gpd-compact-state-michaelsengineering
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gpd-compact-state
Source: https://github.com/MichaelsEngineering/get-physics-done-test/tree/main/.agents/skills/gpd-compact-state
Command: npx skills add https://github.com/MichaelsEngineering/get-physics-done-test --skill gpd-compact-state-michaelsengineering

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

STATE.md acts as the living memory of a research project and tends to grow beyond practical context limits. This Skill provides an automated workflow to compact STATE.md by archiving older entries into STATE-ARCHIVE.md, preserving current focus while maintaining a complete historical record.

Core Features & Use Cases

  • Archiving: moves older decisions, resolved blockers, and long-running session records to STATE-ARCHIVE.md while keeping recent and active items in STATE.md.
  • Context preservation: ensures current phase content, references, and essential context remain accessible in the active STATE.md.
  • Workflow integration: integrates with the GPD runtime CLI to measure line counts, perform archival, sync state.json, and verify recoverability.
  • Versioned history: maintains a dated header in the archive and preserves completeness for audit and reproducibility.

Quick Start

Run the compact-state workflow to archive historical STATE.md entries to STATE-ARCHIVE.md and shrink STATE.md to the 150-line target.

Frequently Asked Questions about gpd-compact-state

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

FAQPage Schema
How do I compact STATE.md to reduce file size for long-running research projects?

To compact STATE.md, you can archive historical entries like resolved blockers and old session logs into a separate STATE-ARCHIVE.md file. This shrinks the active STATE.md to a 150-line target while retaining current-phase content.

What happens to archived state management entries when context grows too large?

When state management context grows too large, older decisions and session logs are moved to STATE-ARCHIVE.md with dated headers. This maintains a complete historical record for audit and reproducibility without cluttering the active workspace.

Can I preserve current phase content while archiving older research workflow logs?

Yes, you can preserve current phase content while archiving older research workflow logs. The compaction process measures line counts and specifically protects current phase references and essential context from being moved to the archive.

Does the GPD runtime CLI support automated state.md archival and state.json updates?

Yes, the GPD runtime CLI supports automated state.md archival by measuring file length, moving eligible sections to STATE-ARCHIVE.md, and updating the .gpd/state.json file to reflect the changes and verify recoverability.

When should I avoid compacting my project's STATE.md file?

You should avoid compacting your project's STATE.md file if your research project is short-running or if the file has not yet accumulated enough decisions, blockers, and session logs to exceed practical context limits.