Memory index compact

From Fr-e-d/GAAI-framework · View interactive version

Memory index compact is an AI agent skill from the GitHub repository Fr-e-d/GAAI-framework. Compact verbose memory index / registry files to pointer-only form. Activate when an index file (index.md, index-decisions.md, or any sibling registry table) breaches the file-size budget OR shows substance-duplication drift. Distinct from memory-compact (which targets content categories) and memory

How to use this skill

Skill file

Memory Index Compact

Purpose / When to Activate

Activate when:

Distinct from other memory skills:

Core principle — index = pointer

Every row in a registry must answer one question : « Does an agent reading this row for relevance assessment need this word? »

Substance lives in:

Index rows duplicating any of these are anti-pattern.


Process

  1. Identify target file. Read the registry. Confirm it is an index (rows = pointers, not content). Skip if file is substantive content with embedded tables (those follow memory-compact flow).
  1. Measure baseline. Record current size in chars. Note the budget (typically 40k for memory index files — check hooks/post-commit.d/03-memory-size-budget.sh BUDGETS array). Calculate target reduction.
  1. Triage rows. For each row > 200 chars, classify content per the « keep / dégage » heuristic:
  1. Compact the row. Rewrite in the target form:
  1. Compact narrative sections. Same principle for non-table prose:
  1. Verify no information loss. Before any cut, confirm the dropped content lives in another source-of-truth file. If a row's content does NOT live elsewhere, the substance must move TO the appropriate target file FIRST (then cut from index).
  1. Update budget tracking. If the post-commit hook flagged the breach, verify new size is ≤ budget. Re-run the hook locally if available.

Outputs


Quality Checks


Non-Goals

This skill must NOT:


Relationship with other skills

file-size budget breach → memory-index-compact (this skill)
filesystem-vs-registry drift → memory-index-sync
DEC superseded → memory-archive-superseded
content categories oversized → memory-compact
validation invariants → memory-index-lint

If unsure which skill applies, the failure mode of each is well-bounded :

Pointer principle is invariant. Even if other skills create or amend rows, those new rows MUST be in pointer-only form per this skill's heuristic. Substance-duplication in any row is a defect.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.