agentic/code/addons/semantic-memory/skills/memory-ingest/SKILL.md
Ingest a source into any consumer's semantic memory by reading the topology contract
npx skillsauth add jmagly/aiwg memory-ingestInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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.
data-ai
Report which research-corpus radar sidecars are overdue for refresh. Computes staleness (days since last refresh vs the cadence window) for every radar, sorted most-overdue-first. Runs via `aiwg corpus radar-status`.
data-ai
Aggregate research-corpus radar sidecars into a corpus or per-cluster freshness report — totals, overdue count, per-cluster / per-GRADE / per-trajectory breakdowns, an overdue table, and per-radar rationale snippets. Runs via `aiwg corpus radar-report`.
testing
Scaffold radar/freshness sidecars for research-corpus REFs. Pulls title/authors from the citation sidecar and GRADE from the analysis doc, defaults the refresh cadence from GRADE and the cluster from a corpus-local map, and stamps documentation/radar/REF-XXX-radar.md. Runs via `aiwg corpus radar-init`.
data-ai
Compute an entity's publication trajectory — per-year paper counts, topic drift, hot-streak detection (≥3 consecutive A-grade years), and career phase. Runs via `aiwg corpus profile-temporal`.