MODULE 07 // 19:30

Working Memory, Scratchpads & Context Compaction

Prevent context rot over long trajectories by summarizing completed sub-tasks and pruning stale tool outputs.

// KEY ARCHITECTURAL TAKEAWAYS

  • Separate immutable system rules from rolling observation summaries.
  • Store structured task checklists outside the prompt window.
  • Trigger automatic compaction at 70% context utilization.
REFERENCE IMPLEMENTATION // SNIPPET
{
  "active_goal": "Deploy containerized service",
  "completed_steps": ["audit_vhost", "verify_php_profile"],
  "next_action": "enable_rewrite_rules"
}