Load memory by durability class:
Durable memory (decisions, patterns, project, ops, contacts, domains):
→ Load individual decisions/DEC-{ID}.md files directly. Full text, never summaries.
→ Summaries exist as INDEX-ONLY aids — they list entries for scanning but MUST NOT substitute for the full decision text.
→ Load only the specific decisions relevant to the task (typically 3-10 files).
Ephemeral memory (sessions):
→ Prefer summaries if available (lower token cost).
Freshness Check (Tier 2 files only)
Pre-condition: verify that git is available on the PATH (git --version). If git is unavailable, append the following note to the freshness_warnings section and skip the remainder of this step — proceed to Step 6 normally:
Freshness check skipped: git not available
For each file in the memory_context_bundle:
a. If the file's frontmatter has no refresh_tier field, or refresh_tier ≠ 2 → skip (Tier 1 files are proactively refreshed via the post-delivery hook; Tier 3-4 are not checked at read time).
b. If depends_on is absent or depends_on.code_paths is empty → skip (treat as Tier 4 — no check, no warning).
c. If updated_at is absent or unparseable → append to freshness_warnings:
Freshness check skipped: no valid updated_at — {file_path}
Then skip this file.
d. For each path in depends_on.code_paths:
- If the path does not exist on disk, append to
freshness_warnings:
Freshness check skipped: {path} not found — depends_on may be stale
Then skip this path.
- Run:
git log --oneline --since="{updated_at}" -- "{path}" (where {updated_at} is the file's frontmatter value, quoted exactly as-is).
- Count the lines returned. If the count > 0, the file is
POTENTIALLY_STALE for this path.
e. If any path produced a non-zero commit count for this file, append one freshness_warnings entry per changed path in the format below (AC2):
⚠ FRESHNESS WARNING — {file_path}
refresh_tier: 2
updated_at: {date}
changed_dependency: {code_path} ({N} commits since updated_at)
action: verify content is still accurate before relying on it
If no warnings are produced, the freshness_warnings section is omitted from the output (0 tokens).