agentic/code/addons/semantic-memory/skills/memory-query-capture/SKILL.md
Capture query synthesis as durable pages in semantic memory
npx skillsauth add jmagly/aiwg memory-query-captureInstall 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.
Capture valuable assistant synthesis from conversation into durable semantic memory pages. This is the compounding primitive — explorations accumulate as reusable knowledge rather than evaporating into chat history.
Any time an assistant response produces analytical output worth preserving: comparisons, gap analyses, architectural assessments, synthesis narratives. Invoked explicitly by the user, suggested ambiently by the system, or chained automatically by other skills.
Consumer ID to write against. Resolved via ADR-021 D4 precedence: explicit > wrapper > auto-detect.
Page type: synthesis, comparison, analysis, or gap. If omitted, determined by heuristic or user prompt.
Page title. If omitted, derived from content via headline extraction or summarization.
Suggested automatically when a query response exceeds a length/value threshold. The system presents a capture prompt; the user confirms or dismisses.
User invokes directly: "save this as a page", "capture that comparison", or calls memory-query-capture with parameters.
Any skill can call memory-query-capture as a final step after producing analytical output. The calling skill passes --type and --title to skip heuristics.
--type flag, content heuristic, or user prompt.memory.topology.derivedPages from consumer's manifest.json and select the matching subdirectory (derivedPages.synthesis, derivedPages.comparison, etc.).--title flag or derived from content (first heading, key noun phrase, or summarized label).crossRefStyle setting.memory-log-append with --op query-capture and metadata about the captured page.When --type is not provided, the skill inspects the synthesis content:
| Content pattern | Assigned type |
|-----------------|---------------|
| Comparison table, side-by-side columns | comparison |
| Narrative prose with connective reasoning | synthesis |
| Gap analysis, missing coverage, "what's absent" | gap |
| Bullet-point assessment, evaluation criteria | analysis |
If the heuristic is ambiguous, prompt the user to select.
Follows ADR-021 D4 precedence:
--consumer flag provided on invocation..aiwg/frameworks/registry.json for the active consumer with a memory.topology contract.If no consumer can be resolved, abort with a clear error requesting --consumer.
The consumer's manifest.json declares a crossRefStyle — one of:
wikilink — [[page-name]]markdown — [page name](relative/path.md)at-mention — @consumer/path/to/page.mdThe skill reads this setting and formats all source-page links accordingly.
memory-log-append are non-blocking — the page write is the primary operation.derivedPages mapping for the resolved type, fall back to the consumer's base memory directory.@semantic-memory/schemas/memory-log-event.md
# Explicit capture after a deep comparison
memory-query-capture --consumer research-complete --type comparison --title "Redis vs Valkey feature matrix"
# Ambient capture (system-suggested, user confirms)
> Your comparison of caching strategies looks worth preserving. Capture as a page? [Y/n]
memory-query-capture --type synthesis
# Skill-chain: architecture-evolution calls capture after producing assessment
memory-query-capture --consumer sdlc-complete --type analysis --title "Microservices migration readiness"
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`.