GAAI-framework memory-ingest
Transform validated knowledge into structured long-term memory. Activate after Bootstrap scan, after Discovery produces validated artefacts, or after architecture insights are available.
install
source · Clone the upstream repo
git clone https://github.com/Fr-e-d/GAAI-framework
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Fr-e-d/GAAI-framework "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.gaai/core/skills/cross/memory-ingest" ~/.claude/skills/fr-e-d-gaai-framework-memory-ingest && rm -rf "$T"
manifest:
.gaai/core/skills/cross/memory-ingest/SKILL.mdsource content
Memory Ingest
Purpose / When to Activate
Activate after:
- Bootstrap scan produces architecture insights
- Discovery produces validated artefacts or decisions
- New validated project knowledge needs to be persisted
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:
- If it does NOT exist → proceed normally.
- If it DOES exist → read the existing file first. Then decide:
- If the existing content covers a different topic or entity than what you are about to write → STOP immediately, surface the collision to the human, do not proceed.
- If the existing content covers the same topic and an update is warranted → proceed, but preserve any human edits or prior knowledge that remains valid. Treat this as an update, not a replacement.
- If the existing content is identical or still valid → skip writing, report "no changes needed". This guard prevents the silent data loss incident of 2026-03-17 where concurrent sessions overwrote memory files.
- Read new validated knowledge (discovery results, decisions, architecture insights, validated hypotheses, GTM decisions)
- Read
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 incontexts/memory/index.md
before writing any file.index.md - Create or update corresponding memory files using standard templates
- Register all new or modified entries in
— this is mandatory, not optional. Any file not in the index is invisible to all other memory skills.contexts/memory/index.md - Domain dual-index rule: When ingesting into a domain category (
), also update the domain's owndomains/{domain}/
(e.g.,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.domains/content-production/index.md
- Impact Scan (post-write) (informational — does not block ingestion). After writing new memory
files and updating all indexes (steps 3–5):
- Re-read
and collect all entries whosecontexts/memory/index.md
overlap with the tags of the ingested content.tags - For each matching entry, check whether the ingested content changes or invalidates assumptions described in that file (load the file, compare topic overlap).
- List any potentially stale entries in the session output: entry path, reason suspected stale.
- If
is missing or a referenced file is unreadable: skip the Impact Scan and noteindex.md
in session output — do not fail the ingestion. 6b. Architecture file gate (applies ONLY to writes under"Impact Scan skipped: {reason}"
). Before writing or updating any file in that folder:contexts/memory/architecture/ - Read
in fullcontexts/rules/memory-architecture.rules.md - Apply the Content Principle (§1) — if the content is a code snapshot rather than a conceptual invariant, STOP and reclassify (either rewrite at the invariant level or discard — do not weaken the rule)
- Apply the Verify-Before-Update Protocol (§2) — load each path in
, confirm every claim in the content still matches current code; on divergence, escalate (never silent-rewrite)depends_on.code_paths - Populate the attestation fields in frontmatter:
andverified_against_commit_sha: <40-char sha>verified_at: <ISO 8601 timestamp> - Writing an architecture file without running this gate, or writing content copied from a memory-delta without independent code verification, is forbidden
- Re-read
- Freshness metadata governance (Tier 1–2 files) After writing any memory file under
,architecture/
, orpatterns/conventions.md
, verify that bothproject/context.md
anddepends_on
are present in the file's YAML frontmatter before proceeding.refresh_tier- If both are present → continue.
- If either is absent → add them before this step completes. Do not exit the skill without freshness metadata on a Tier 1–2 file.
- If the code paths are unknown, use the safe fallback:
Then add a session note:depends_on: code_paths: [] decisions: [] epics: [] refresh_tier: 2"[FRESHNESS TODO] {file_path}: depends_on.code_paths not populated — manual enrichment required." - All other memory files (outside the three paths above):
is optional. If present, validate thatdepends_on
is also declared and is a value 1–4. Ifrefresh_tier
is absent butrefresh_tier
is present, default todepends_on
and note for review.refresh_tier: 2 - Rule reference:
§3 (which files must declare) and §4 (graceful degradation).contexts/rules/memory-freshness.rules.md
- 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:
— project-level facts, architecture, constraintscontexts/memory/project/
— governance decisionscontexts/memory/decisions/
— coding conventions, procedural knowledgecontexts/memory/patterns/
— platform operations, DNS, providers, infra procedurescontexts/memory/ops/
— experts and leads identified during Discoverycontexts/memory/contacts/
— domain-scoped: research AKUs, sources, voice guide, gap analysis for content blueprintcontexts/memory/domains/content-production/
— updated (always, mandatory)contexts/memory/index.md- Domain
— updated when ingesting into a domain (mandatory, see Process step 5)index.md
Governance rule: Any new category must be registered in
before use. Never write a memory file to an unregistered path.index.md
Quality Checks
- Knowledge is stored in correct memory category
- Memory files remain structured and minimal
- Index reflects all active memory
- No duplication or raw session data
- Only validated knowledge enters long-term memory
Non-Goals
This skill must NOT:
- Store raw session conversations
- Ingest speculative or unvalidated information
- Duplicate existing memory entries
No knowledge enters memory without explicit validation. Raw exploration belongs to session memory only.