Memory ingest

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

Memory ingest is an AI agent skill from the GitHub repository Fr-e-d/GAAI-framework. Transform validated knowledge into structured long-term memory. Activate after Bootstrap scan, after Discovery produces validated artefacts, or after architecture insights are available.

How to use this skill

Skill file

Memory Ingest

Purpose / When to Activate

Activate after:

Only ingest validated knowledge — never raw session output.


Process

CRITICAL — Anti-Collision Guard (MUST execute before writing any memory file):

Before writing any file under contexts/memory/**, check if the target file already exists on disk:

This guard prevents the silent data loss incident of 2026-03-17 where concurrent sessions overwrote memory files.

  1. Read new validated knowledge (discovery results, decisions, architecture insights, validated hypotheses, GTM decisions)
  2. Read contexts/memory/index.md to discover available categories (shared and domain). Classify knowledge into the most appropriate existing category. If no existing category fits, create a new one — name it clearly, create the directory, and register it in index.md before writing any file.
  3. Create or update corresponding memory files using standard templates
  4. Register all new or modified entries in contexts/memory/index.md — this is mandatory, not optional. Any file not in the index is invisible to all other memory skills.
  5. Domain dual-index rule: When ingesting into a domain category (domains/{domain}/), also update the domain's own index.md (e.g., domains/content-production/index.md). Both the master index AND the domain index must reflect the new entry. Failure to update both causes silent drift — the domain sub-agent won't see entries missing from its domain index.

<!-- Impact Scan added to surface drift risk after ingest. Addresses the gap where ingested

content can silently invalidate assumptions in related memory files. Provides informational

ripple-effect visibility for OSS Discovery Agent (Cloud enforcement not required). -->

  1. Impact Scan (post-write) (informational — does not block ingestion). After writing new memory

files and updating all indexes (steps 3–5):

of the ingested content.

described in that file (load the file, compare topic overlap).

"Impact Scan skipped: {reason}" in session output — do not fail the ingestion.

6b. Architecture file gate (applies ONLY to writes under contexts/memory/architecture/).

Before writing or updating any file in that folder:

  1. Freshness metadata governance (Tier 1–2 files) After writing any memory file under architecture/, patterns/conventions.md, or project/context.md, verify that both depends_on and refresh_tier are present in the file's YAML frontmatter before proceeding.

```yaml

depends_on:

code_paths: []

decisions: []

epics: []

refresh_tier: 2

```

Then add a session note: "[FRESHNESS TODO] {file_path}: depends_on.code_paths not populated — manual enrichment required."

  1. Ensure memory files remain structured and minimal

Outputs

Memory files created at any registered category path (see contexts/memory/index.md). Current categories as of last update:

Governance rule: Any new category must be registered in index.md before use. Never write a memory file to an unregistered path.


Quality Checks


Non-Goals

This skill must NOT:

No knowledge enters memory without explicit validation. Raw exploration belongs to session memory only.

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.