FG-0401 Context Recovery Protocol
Description
Define a structured sequence for restoring agent context at the start of every session. AI agents start each session with no memory of previous work. Context Recovery Protocol establishes a systematic loading sequence that brings agents up to speed efficiently: read governance first, then project state, then current priorities, then specific task context. The order matters because each layer informs the interpretation of the next.
Implementation
Define a context loading sequence with a consistent priority order. Load foundational context (governance, rules) before operational context (current tasks, recent history). Ensure the sequence is documented and repeatable. Measure context recovery time and optimize for speed without sacrificing completeness.
Success Indicators
- Agents reach productive state within the first few minutes of a session
- Context loading is consistent and reproducible across sessions
- Critical governance context is loaded before task context
- Recovery time decreases as the process is refined
Failure Modes
- Loading too much context: overwhelming the agent's attention
- Loading too little context: agent makes decisions without critical background
- Wrong loading order: task context loaded before governance, leading to ungoverned action
- No standardized sequence: context recovery quality varies by session
Sub-Methods 4
Always load governance rules, laws, and operational boundaries before any task-specific context. This prevents the common failure where agents take immediate action based on task context before understanding the rules that govern how they should act. The loading order is: laws, then architecture, then state, then task.
Load context in layers of increasing detail: start with summaries and metadata (frontmatter scanning), then load full documents only when the summary indicates relevance. Use a breadcrumb system where each shallow file points to deeper context via traceable paths (STATUS.md points to active plans, active plans point to reference documents). This is retrieval-augmented context assembly, a hierarchical retrieval pattern that prevents context window saturation by pulling only the relevant detail into the window. Optimize for speed-to-productive over completeness.
Track and optimize the time from session start to first productive action. Measure recovery time across sessions to identify bottlenecks. Target: under 3 minutes for standard recovery, under 1 minute for continuation of recent work. Recovery time is a key operational metric.
Build mechanisms to detect when loaded context is outdated: timestamp checks, hash comparisons, or explicit staleness markers. Stale context is worse than no context because it creates false confidence. Flag stale context for refresh rather than silently using outdated information.