[Evolution] Context Window — Gitea-Centric Checkpoint Pruning + Agent Context Hygiene #114

Closed
opened 2026-05-18 14:55:47 +00:00 by NW · 0 comments
Owner

Evolution Summary

Type: Context Window Hardening
Date: 2026-05-18T15:50:00+01:00

Problem

Agents loaded full issue comment history (200+ comments = 15,000+ tokens), build logs, unrelated rules — pushing context to 80–90% before work began.

Solution

  • Gitea as single source of truth: All old state lives in Gitea comments, not agent RAM
  • Checkpoint pruning: If consumed > 80%, truncate history to last 3 entries, archive rest to comment
  • Agent context hygiene: Load ONLY checkpoint + last 3 comments + ≤3 files + 1 skill + 1 rule

New Files

  • .kilo/rules/context-window-budget.md — budget tables, what NOT to load, recovery protocol
  • .kilo/rules/gns-checkpoint-pruning.md — minimal checkpoint v2, entry/exit protocols, pagination

Updated Files

  • .kilo/agents/orchestrator.md — Context Budget Governance section
  • .kilo/rules/gns-agent-protocol.md — checkpoint schema trimmed, added current_task + agent_chain
  • .kilo/EVOLUTION_LOG.md — evolution entry #5

Commit

46d6752feat(context-window): evolution — Gitea-centric checkpoint pruning + agent context hygiene

Expected Impact

  • Context token reduction: ~12,000 per invocation
  • Context window availability: 10% → 60% (6x more room for reasoning)

/close

## Evolution Summary Type: **Context Window Hardening** Date: 2026-05-18T15:50:00+01:00 ### Problem Agents loaded full issue comment history (200+ comments = 15,000+ tokens), build logs, unrelated rules — pushing context to 80–90% before work began. ### Solution - **Gitea as single source of truth**: All old state lives in Gitea comments, not agent RAM - **Checkpoint pruning**: If `consumed > 80%`, truncate history to last 3 entries, archive rest to comment - **Agent context hygiene**: Load ONLY checkpoint + last 3 comments + ≤3 files + 1 skill + 1 rule ### New Files - `.kilo/rules/context-window-budget.md` — budget tables, what NOT to load, recovery protocol - `.kilo/rules/gns-checkpoint-pruning.md` — minimal checkpoint v2, entry/exit protocols, pagination ### Updated Files - `.kilo/agents/orchestrator.md` — Context Budget Governance section - `.kilo/rules/gns-agent-protocol.md` — checkpoint schema trimmed, added current_task + agent_chain - `.kilo/EVOLUTION_LOG.md` — evolution entry #5 ### Commit `46d6752` — `feat(context-window): evolution — Gitea-centric checkpoint pruning + agent context hygiene` ### Expected Impact - Context token reduction: ~12,000 per invocation - Context window availability: 10% → 60% (6x more room for reasoning) /close
NW closed this issue 2026-05-18 14:56:20 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: UniqueSoft/APAW#114