/semantic-memory:memory-ingestfrom semantic-memory
Ingests external sources (documents, PDFs, URLs, directories) into a consumer framework's semantic memory by reading its topology contract, then extracts, summarizes, and cross-references content.
Ships in semantic-memory. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This remains the canonical semantic synthesis workflow. Dataset Intelligence can register its source and evidence, but raw dataset ingestion does not replace summary, entity, contradiction, topology, or cross-reference behavior. See the dataset migration guide.
Ingest an external source into a consumer framework's semantic memory. Reads the consumer's memory.topology contract to know where pages live, then extracts, summarizes, integrates, and cross-references — all topology-agnostic.
For normalized session events or catalog candidates, first use
aiwg show skill session-harvest --body. Session knowledge uses the catalog's exact
candidate-version review and sessions promote gateway, retaining the
source-event → candidate → destination receipt. Do not flatten session output
into an external-source file to bypass that review path. General semantic
synthesis may consume an authorized promoted page while retaining its lineage;
ordinary external documents continue through the workflow below.
When new knowledge (a document, paper, URL, config file, or directory of files) needs to enter a consumer's semantic memory. This is the primary write path for external information.
Path to the source material. Supports: markdown (.md), PDF (.pdf), HTML (.html), YAML (.yaml/.yml), JSON (.json), a directory of files, or a URL.
Consumer ID to ingest into. Resolved via ADR-021 D4 precedence:
--consumer research-complete.aiwg/frameworks/registry.jsonPreview what would be created/modified without writing any files. Outputs the planned page list, cross-references, and contradiction flags.
Skip the discussion step and proceed directly to extraction and page writing. Use for batch ingestion or CI pipelines.
Determine which consumer's memory to target using ADR-021 D4 precedence. Fail with a clear error if no consumer can be resolved.
Read memory.topology from the consumer's manifest.json. Extract:
rootDir — base path for all memory pagesderivedPages.summary — where summary pages are writtenpageTemplate — structure the summary must conform tocrossRefStyle — how cross-references are formatted (e.g., wiki-links, markdown links)indexPath — location of the consumer's memory indexlog — path to .log.jsonlingestRequires — optional list of required post-ingest actions (e.g., "provenance")Parse the source material based on type:
Default behavior (no --non-interactive flag):
This discussion-first pattern ensures the memory reflects human judgment, not just mechanical extraction.
Use LLM to produce a structured summary conforming to the consumer's pageTemplate. The summary captures:
derivedPages.summary pathcrossRefStyleCompare new claims against existing pages. When a contradiction is found:
> [!contradiction]
> Source "paper.pdf" (2026-04-14) claims X, but this page states Y.
> Ingested via memory-ingest — awaiting human resolution.
.log.jsonl with "contradictions" count and detailsRegenerate the entry for the new summary page in the consumer's index at indexPath. Include title, source reference, date, and cross-ref targets.
Call memory-log-append with:
--consumer <resolved> --op ingest --data '{"source":"<path>","pages_touched":[...],"contradictions":<n>,"cross_refs_added":<n>}'
If ingestRequires includes "provenance", create a W3C PROV record documenting:
prov:Entity — the new summary pageprov:Activity — the ingest operationprov:wasDerivedFrom — the source materialprov:wasGeneratedBy — this skill invocationprov:wasAttributedTo — the actor (model + user)Output a summary:
memory-lint to catch# Interactive ingest of a research paper
memory-ingest docs/papers/distributed-consensus.pdf --consumer research-complete
# Batch ingest a directory of meeting notes
memory-ingest .aiwg/working/meeting-notes/ --consumer sdlc-complete --non-interactive
# Dry run to preview what would change
memory-ingest https://example.com/api-spec.html --consumer sdlc-complete --dry-run
# Explicit consumer override
memory-ingest design-doc.md --consumer media-marketing-kit --non-interactive
memory-log-append — log write primitive (called in step 9)memory-lint — validates memory page structure and cross-ref integritymemory-query-capture — captures query patterns for memory optimizationprovenance-create — W3C PROV record creation (called in step 10 when required)This skill's persistence flows through resolveStorage('memory'). On the default fs backend the memory subsystem lives at .aiwg/memory/ and behavior is byte-identical to direct file writes. To redirect memory artifacts into Obsidian, Logseq, Fortemi, or another backend without changing this skill, configure .aiwg/storage.config (#934).
When this skill needs to read or write memory artifacts from a Bash step:
aiwg memory path # resolved root (fs only)
aiwg memory list --prefix research-complete/
aiwg memory get research-complete/index.md
echo "# index" | aiwg memory put research-complete/index.md
echo '{"op":"ingest","summary":"foo"}' | aiwg memory append-log research-complete/.log.jsonl
The aiwg memory append-log subcommand uses atomic O_APPEND (#976) on the fs backend — concurrent appenders don't race.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jmagly/aiwg --plugin semantic-memory5 skills in this plugin
/memory-query-captureCapture query synthesis as durable pages in semantic memoryOther plugins' skills for the same job