本文へ移動
cccskills
無料GitHub で公開

provenance-grounded-memory

Use when designing or auditing long-term memory for persistent AI agents. Stores immutable source evidence before canonical facts, links beliefs to provenance, applies novelty-aware ADD/UPDATE/NOOP write gating, keeps uncertain merges explicit, separates retrieval from answer generation, supports deletion, and evaluates memory failures layer by layer.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md6.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Provenance-Grounded Agent Memory

Build memory around evidence before belief. Persistent agents need memory that can be retrieved, audited, updated, corrected, and erased without collapsing raw evidence, derived beliefs, retrieval logic, and answer policy into one opaque prompt path.

When to Activate

Activate when:

  • Adding cross-session memory to an agent
  • Auditing stale, contradictory, duplicated, or unsupported memories
  • Reducing write-side LLM calls in a growing memory store
  • Separating memory retrieval quality from answer-model behavior
  • Implementing user-visible correction, deletion, or provenance inspection

Architecture

Raw evidence (immutable)
    -> typed signals and hard anchors
    -> candidate canonical facts
    -> provenance validation
    -> novelty-aware write gate
       -> ADD
       -> NOOP
       -> UPDATE / MERGE with LLM only when uncertain
    -> canonical fact store linked to evidence
    -> deterministic multi-route retrieval
    -> bounded retrieved context
    -> separate answer policy and answer model

Paper-Backed Principles

  1. Evidence before belief. Preserve immutable source evidence before promoting derived facts.
  2. Provenance is not truth. It shows where a claim came from and whether extraction is supported, not whether the source statement is world-level truth.
  3. Retrieval and answer synthesis should be separable. Evaluate the memory substrate independently from the answer model.
  4. Write-side control matters. Memory quality degrades when systems append duplicates, merge unrelated facts, or route every candidate through expensive LLM deliberation.
  5. Novelty gating is a useful write abstraction. Resolve clearly novel facts as ADD, clearly redundant facts as NOOP, and send ambiguous cases to an UPDATE or merge path.

Data Model

evidence:
  id: evidence-001
  uri: source-or-session
  content_hash: sha256
  captured_at: ISO-8601
  immutable: true
  deletion_scope: user|project|organization

fact:
  id: fact-001
  statement: text
  evidence_ids: [evidence-001]
  entity_scope: []
  temporal_scope: {}
  typed_signals: []
  status: active|superseded|deleted|needs-review
  confidence: 0.0
  last_verified_at: ISO-8601

Workflow

Step 1: Capture Immutable Evidence

Store the original source before extraction. Preserve source ID, capture time, content hash, access scope, and deletion semantics.

Step 2: Extract Typed Signals

Detect signals such as:

  • Entities
  • Dates and temporal qualifiers
  • Decisions
  • Corrections
  • Preferences
  • Hard anchors such as exact paths, identifiers, or commitments

Validate derived facts against source support before promotion.

Step 3: Apply the Write Gate

Compute a novelty score against the current memory scope. Use an adaptive threshold that changes as store density changes.

if store is empty:
    ADD
elif novelty >= threshold + uncertainty_margin:
    ADD
elif novelty < threshold:
    NOOP
else:
    UPDATE_OR_MERGE_WITH_LLM

The exact scoring function is implementation-specific. SAGE uses a von Mises-Fisher density estimate over normalized memory embeddings. Do not invent universal thresholds; calibrate on a deployment-specific split.

Step 4: Link Canonical Facts to Evidence

Every promoted fact must retain:

  • Supporting evidence IDs
  • Extraction version
  • Superseded fact IDs when updated
  • Confidence and verification timestamps
  • Deletion relationship to its sources

Step 5: Retrieve Through Multiple Deterministic Routes

Combine bounded routes such as:

  • Entity scope
  • Temporal metadata
  • Keyword search
  • Vector similarity
  • Canonical facts
  • Raw observations when needed

Return retrieved evidence separately from answer instructions.

Step 6: Evaluate by Failure Layer

For each wrong answer, classify:

LayerFailure
Evidence captureOriginal evidence missing
ExtractionUnsupported or omitted fact
Write gateWrong ADD, NOOP, or UPDATE decision
Canonical storeStale, contradictory, or duplicated state
RetrievalRelevant fact not selected within budget
Answer policyEvidence received but misused, overgeneralized, or refused incorrectly

Step 7: Support Correction and Erasure

Deletion is first-class:

  • Erase raw evidence when required
  • Remove or invalidate derived facts that depend on deleted evidence
  • Rebuild affected retrieval indexes
  • Log the deletion result

Metrics

  • Provenance coverage
  • Unsupported extraction rate
  • Duplicate-memory rate
  • Write-gate ADD/NOOP/UPDATE accuracy
  • Merge-call rate
  • Write-side token cost and latency
  • Retrieval sufficiency
  • Multi-hop recall
  • Temporal update handling
  • Abstention quality
  • Deletion completeness

Guidelines

  1. Preserve evidence before creating beliefs.
  2. Keep retrieval deterministic when possible.
  3. Reserve expensive LLM merge calls for uncertain cases.
  4. Calibrate novelty thresholds outside the target test set.
  5. Keep answer instructions separate from retrieved memory.
  6. Implement correction and erasure paths before production use.
  7. Audit each failure at its actual layer.

Gotchas

  1. Opaque prompt path - Mixing evidence, facts, retrieval, and answer policy makes failures hard to repair.
  2. Provenance equals truth - A supported extraction can still reflect a false source statement.
  3. Append-only memory - Growing stores need write-side routing.
  4. Fixed novelty thresholds - Store density changes over time.
  5. Hidden deletion gaps - Removing a source without invalidating derived facts leaves ghost memory.
  6. Retrieval-score tunnel vision - Evaluate downstream sufficiency and answer-policy behavior separately.

References


Skill Metadata

Created: 2026-06-02 Version: 1.0.0

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when long-lived agents, project memories, system prompts, or playbooks are repeatedly summarized, rewritten, or optimized and risk losing domain detail, provenance, or execution learnings.

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

Use this skill when the user explicitly asks to map, document, or onboard into an existing codebase. Trigger for prompts like "map this codebase", "document this architecture", "onboard me to this repo", or "create codebase docs". Do not trigger for routine feature implementation, bug fixes, or narrow code edits unless the user asks for repository-level discovery.

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

Adds educational comments to a code file so it becomes a learning resource, asking for the file (with a list of close matches) if none is given. Use when preparing code for learners, onboarding, or teaching.

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

Write, debug, and optimize Adobe Illustrator automation scripts using ExtendScript (JavaScript/JSX). Use when creating or modifying scripts that manipulate documents, layers, paths, text frames, colors, symbols, artboards, or any Illustrator DOM objects. Covers the complete JavaScript object model, coordinate system, measurement units, export workflows, and scripting best practices.

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

Patterns and techniques for adding governance, safety, and trust controls to AI agent systems. Use this skill when: - Building AI agents that call external tools (APIs, databases, file systems) - Implementing policy-based access controls for agent tool usage - Adding semantic intent classification to detect dangerous prompts - Creating trust scoring systems for multi-agent workflows - Building audit trails for agent actions and decisions - Enforcing rate limits, content filters, or tool restrictions on agents - Working with any agent framework (PydanticAI, CrewAI, OpenAI Agents, LangChain, AutoGen)

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

Check any AI agent codebase against the OWASP Agentic Security Initiative (ASI) Top 10 risks. Use this skill when: - Evaluating an agent system's security posture before production deployment - Running a compliance check against OWASP ASI 2026 standards - Mapping existing security controls to the 10 agentic risks - Generating a compliance report for security review or audit - Comparing agent framework security features against the standard - Any request like "is my agent OWASP compliant?", "check ASI compliance", or "agentic security audit"

日本語の概要は準備中です。原文の説明を表示しています。

mouadja02/skills102026年10月16日 更新

mouadja02 のスキルをすべて見る

このスキルの問題を報告する