Target Metadata Store
Relevant source files
The following files were used as context for generating this wiki page:
The Target Metadata Store manages the lifecycle state and provenance of reasoning artifacts within the layered memory architecture. It tracks critical attributes such as confidence levels, promotion status, and evidence to distinguish ephemeral scratch reasoning from durable machine memory.
This store functions as one of three primary retrieval layers. While qmd handles canonical documentation and Zvec manages semantic search for non-doc artifacts, the Metadata Store owns the structural state required for continuity across long-running agent tasks.
Sources: CLAUDE.md:21-27, README.md:46-51
Architecture and Retrieval Split
The Metadata Store participates in a three-way split of retrieval ownership. This design prevents overlapping systems from competing for the same retrieval tasks.
- qmd: Owns retrieval for canonical human-maintained documents and collections.
- Zvec: Owns semantic retrieval for promoted memory artifacts and non-doc artifacts.
- Metadata Store: Owns structured lifecycle state and synchronization data.
Sources: CLAUDE.md:22-26, README.md:46-51
The following diagram illustrates the relationship between these storage layers:
The diagram shows how the system routes retrieval requests to specific stores based on the type of information required.
Sources: README.md:46-51, CLAUDE.md:22-26
Core Data Model
The Metadata Store persists specific fields for every promoted memory object. These fields allow the system to evaluate the reliability and relevance of information before it enters the durable context.
Lifecycle State Fields
| Field | Description |
|---|---|
| Confidence | Numerical value representing the certainty of the memory artifact. |
| Evidence | Reference to the data or thoughts that support the conclusion. |
| Promotion Status | The current stage of the artifact (e.g., scratch, checkpointed, promoted). |
| Staleness | Indicator of how recently the information was verified or updated. |
| Scope | The boundaries within which the artifact is valid (e.g., project-wide vs. local). |
| Sync State | Coordination status for cloud-assisted or multi-location operations. |
| Sources: CLAUDE.md:21-27, README.md:46-51 |
Promotion and Gating Logic
The Target Metadata Store serves as a gatekeeper for durable memory. Raw chain-of-thought data remains ephemeral and is not stored in long-term memory by default. The store only records artifacts that pass specific promotion criteria.
- Evidence: The artifact must have supporting data points.
- Confidence: The system must reach a sufficient certainty threshold.
- Stability: The conclusion must remain valid beyond the current immediate subtask.
- Reuse Value: The artifact must have likely future utility.
Sources: README.md:65-71, CLAUDE.md:32-35
The sequence diagram details the interaction between the Agent and the Metadata Store during the promotion workflow.
Sources: README.md:65-71, CLAUDE.md:32-35
Integration with Transitional Components
In the current implementation, the UnifiedSessionManager prepares data for the eventual metadata store by tracking confidence and tags within markdown files. The models.py definitions for Memory and Thought already include fields that will map to the Target Metadata Store.
Sources: session_manager.py:100-112, memory-bank/memories/67944906-43bc-4c85-9424-f2261850bc97.md:19-21
Current Storage Mapping
The transitional system uses markdown headers and bold fields to simulate structured metadata:
**Confidence:**maps to the store's confidence metric.**Tags:**provides early structural scope and categorization.**ID:**ensures unique provenance for every artifact.
Sources: session_manager.py:116-120, memory-bank/sessions/7a56026e-0a71-42e5-a577-ae854a3ae896.md:27-31
Conclusion
The Target Metadata Store is the structural backbone of the new reasoning architecture. By separating lifecycle state from raw content, it enables high-confidence retrieval and prevents token-ceiling exhaustion through intelligent memory promotion and compaction.