format
MIF Level 3 specification, memory templates, and formatting guidelines
Memory
Search first: /mnemonic:search {relevant_keywords}
Capture after: /mnemonic:capture {namespace} "{title}"
Run /mnemonic:list --namespaces to see available namespaces from loaded ontologies.
Mnemonic Format Skill
MIF Level 3 specification, templates, and formatting guidelines.
Trigger Phrases
- "memory format", "MIF format", "frontmatter template", "memory template", "mnemonic schema"
Quick Start: Minimal Memory
Only 4 fields are required. Everything else is optional.
---
id: 550e8400-e29b-41d4-a716-446655440000
title: "Human-readable title"
type: semantic
created: 2026-01-23T10:30:00Z
---
# Title
Content here.
That's it. Add optional fields only when you need them.
File Naming
{slug}.memory.md
- slug: URL-safe title, lowercase, max 50 chars
- UUID is stored only in the frontmatter
id:field - If a file with the same slug already exists, content is merged
Full Optional Fields Reference
---
# REQUIRED (always include these 4)
id: 550e8400-e29b-41d4-a716-446655440000
title: "Human-readable title"
type: semantic
created: 2026-01-23T10:30:00Z
# COMMON
modified: 2026-01-23T14:22:00Z
namespace: _semantic/decisions/project
tags:
- architecture
- database
# BI-TEMPORAL TRACKING
temporal:
valid_from: 2026-01-23T00:00:00Z
valid_until: null
recorded_at: 2026-01-23T10:30:00Z
ttl: P90D
decay:
model: exponential
half_life: P7D
strength: 0.85
access_count: 5
last_accessed: 2026-01-23T14:22:00Z
# PROVENANCE
provenance:
source_type: conversation # user_explicit | inferred | conversation
source_ref: file:///path/to/source.ts:42
agent: claude-opus-4
confidence: 0.95
session_id: abc123
# CODE REFERENCES
code_refs:
- file: src/auth/handler.ts
line: 42
symbol: authenticateUser
type: function # function | class | method | variable | type
# CITATIONS
citations:
- type: documentation # paper | documentation | blog | github | stackoverflow | article
title: "Source Title"
url: https://example.com/source
author: "Author Name"
date: 2026-01-23
accessed: 2026-01-23T10:30:00Z
relevance: 0.90
note: "Brief description"
# COMPRESSION (auto-generated by gc --compress)
summary: "Concise 2-3 sentence summary (max 500 chars)"
compressed_at: 2026-01-24T10:00:00Z
---
# Memory Title
Content in markdown format.
## Relationships
- relates-to [[other-memory-id]]
- supersedes [[old-memory-id]]
- derived-from [[source-memory-id]]
Cognitive Memory Types
| Type | Use For | Namespace Pattern |
|---|---|---|
semantic | Facts, specs, configs, definitions | _semantic/{subtype}/project |
episodic | Debug sessions, incidents, discoveries | _episodic/{subtype}/project |
procedural | Runbooks, how-to guides, workflows | _procedural/{subtype}/project |
Relationship Syntax
Add a ## Relationships section at the end of any memory body using - {type} [[{memory-id}]] syntax.
| Type | Meaning |
|---|---|
relates-to | General association |
supersedes | Replaces older memory |
derived-from | Built upon another memory |
contradicts | Conflicts with another memory |
implements | Realizes a design/decision |
Quick Templates
Generate REAL values for ids and timestamps. Run uuidgen | tr '[:upper:]' '[:lower:]' and date -u +"%Y-%m-%dT%H:%M:%SZ" before creating any memory. NEVER leave placeholders.
See Quick Start above for the minimal template. Below are additional templates for common memory types.
Decision Memory
---
id: <generate with: uuidgen | tr '[:upper:]' '[:lower:]'>
type: semantic
namespace: _semantic/decisions/project
created: <generate with: date -u +"%Y-%m-%dT%H:%M:%SZ">
title: "Decision: {what}"
tags: [architecture]
provenance:
confidence: 0.95
---
# Decision: {What}
## Quick Answer
{What} was chosen for {primary reason}.
## Context
- **Alternatives:** {Option A}, {Option B}
- **Key drivers:** {Driver 1}, {Driver 2}
- **Trade-offs:** {What was sacrificed}