Aiwg memory-log-append
Append a structured event to a consumer's semantic memory log
install
source · Clone the upstream repo
git clone https://github.com/jmagly/aiwg
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/jmagly/aiwg "$T" && mkdir -p ~/.claude/skills && cp -r "$T/agentic/code/addons/semantic-memory/skills/memory-log-append" ~/.claude/skills/jmagly-aiwg-memory-log-append-fccd86 && rm -rf "$T"
manifest:
agentic/code/addons/semantic-memory/skills/memory-log-append/SKILL.mdsource content
memory-log-append
Append a single structured JSON event to a consumer's
.log.jsonl file. This is the write primitive for the semantic memory kernel's event stream.
When to Use
Called internally by other kernel skills (
memory-ingest, memory-lint, memory-query-capture) after completing an operation. Can also be called directly for custom event types.
Parameters
--consumer (optional)
Consumer ID to log against. Resolved via ADR-021 D4 precedence: explicit > wrapper > auto-detect.
--op (required)
Operation type:
ingest, lint, query-capture, log-render, index-rebuild, or a custom string.
--data (required)
JSON object with operation-specific fields per the
memory-log-event schema.
Operation
- Resolve consumer — determine which consumer's log to append to.
- Load topology — read
path from consumer'smemory.topology.log
.manifest.json - Validate event — ensure required fields (
,ts
,op
,consumer
) are present. Addactor
andts
automatically if missing.actor - Append — write single JSON line to the
file (create file if first entry)..log.jsonl - Activity log — also append a summary line to
per the.aiwg/activity.log
rule.activity-log
Event Construction
The skill auto-populates:
— current ISO 8601 timestamp (UTC)ts
— current model identifieractor
— resolved consumer IDconsumer
The caller provides
op and all operation-specific fields.
Error Handling
- Log write failures are non-blocking — the calling skill reports success/failure of its primary operation, not the log write.
- If the log file path doesn't exist, create parent directories first.
- If the log file is corrupted (not valid JSONL), append anyway —
will flag the corruption.memory-lint
Schema Reference
@semantic-memory/schemas/memory-log-event.md
Examples
# After an ingest operation memory-log-append --consumer research-complete --op ingest --data '{"source":"paper.pdf","pages_touched":["summaries/paper.md"],"contradictions":0,"duration_ms":5200}' # After a lint operation memory-log-append --consumer sdlc-complete --op lint --data '{"findings":{"error":0,"warning":3,"suggestion":8},"duration_ms":2100}'