From memory-mason
Compiles today's daily capture into an Obsidian vault using three-stage extract-transform-load pipeline. Builds concepts, atlas maps, synthesis pages, and auto-archives raw input.
How this skill is triggered — by the user, by Claude, or both
Slash command
/memory-mason:mmc [YYYY-MM-DD|raw-folder-path|--all][YYYY-MM-DD|raw-folder-path|--all]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Compile one raw daily capture into the Vault Architecture v2 knowledge base.
Compile one raw daily capture into the Vault Architecture v2 knowledge base.
This command is operational only. Do not write /mmc, /memory-mason:mmc, or their execution chatter back into the vault.
Before any other reasoning, resolve vault config in this priority order:
./.env./memory-mason.json~/.memory-mason/.env~/.memory-mason/config.jsonResolve:
Use the source that provides the vault path.
Subfolder rules:
.env file, use MEMORY_MASON_SUBFOLDER from that same file when present, otherwise default to ai-knowledge.memory-mason.json or ~/.memory-mason/config.json, use its subfolder.Do not claim config is missing until you have attempted all four locations above. If none provide a vault path, fail fast with an explicit error that names every location checked.
Each subfolder is a self-contained project boundary. Strict rules:
{vault}/{subfolder}/ — never glob, read, or reference files in sibling subfolders.{vault}/{subfolder}/ — every wikilink in article bodies, index rows, and log entries must start with {subfolder}/ so Obsidian resolves within the correct project regardless of vault-wide link settings.{vault}/{subfolder}/ — concepts, atlas, synthesis, index, and meta files all live under the configured subfolder.[[{subfolder}/concepts/slug]] links to concepts that were confirmed to exist in {vault}/{subfolder}/concepts/ during this compile. Never link to concepts you know exist in other subfolders.Use these paths for all operations:
--all, enter batch mode: read _meta/state.json ingested map, glob all date folders under _raw/, identify every folder not present in the ingested map (or whose hash changed), and process each in chronological order. Run the full EXTRACT → TRANSFORM → LOAD pipeline for each date. Report per-day results. After all days complete, run a final TRANSFORM pass across the full concept set to ensure atlas/synthesis pages reflect the complete corpus.YYYY-MM-DD, use that date folder under _raw/.sourceKey as the date folder name YYYY-MM-DD.^[0-9]{3}\.md$ in numeric order: 001.md, 002.md, and so on.meta.json if present for operational metadata only. Do not treat meta.json as narrative source text.sourceKey with the same hash, and the user did not explicitly request recompilation, stop and report Already compiled (unchanged).For every concept page, use this exact frontmatter schema:
---
title: "Concept Name"
type: concept
status: seedling
confidence: medium
aliases: []
tags: []
sources:
- "_raw/2026-05-04/001.md"
created: 2026-05-04
updated: 2026-05-04
---
Concept status rules:
seedling.growing when the concept has 3 or more unique sources entries.evergreen when at least one synthesis page links to the concept.evergreen overrides growing, and growing overrides seedling.Confidence rules:
low: weakly supported, inferred, or only briefly mentioned.medium: directly supported by the current raw capture or one durable prior source.high: corroborated by multiple sources or expressed as an explicit stable decision.Concept page body format (frontmatter omitted here because the schema above is authoritative):
# Concept Name
[2-4 sentence core explanation]
## Key Points
- [Self-contained point]
- [Self-contained point]
- [Self-contained point]
## Details
[Encyclopedia-style paragraph]
[Second encyclopedia-style paragraph]
## Related
- [[{subfolder}/concepts/related-concept]] - [How it relates]
- [[{subfolder}/atlas/topic-slug]] - [Parent topic map]
## Sources section to concept pages.Concept update rules:
created date.updated on every material change.aliases, tags, and sources.status and confidence after merging sources.Contradiction detection during updates:
## Key Points.[!contradiction] Session _raw/2026-05-05/001.md states Y, but existing evidence from _raw/2026-05-01/002.md says X.
[!contradiction] callouts must not be promoted to evergreen.> [!note] Superseded: previously X (see _raw/2026-05-01/002.md), now Y.Gap flagging for thin concepts:
confidence: low and the ## Key Points section has fewer than 3 items, append a callout at the end of the ## Details section:[!gap] Sparse capture — this concept was only briefly mentioned. Awaiting future sessions for enrichment.
confidence: medium or high.{vault}/{subfolder}/ after EXTRACT, not just pages touched in this run. Never read concepts from sibling subfolders.{vault}/{subfolder}/concepts/ for shared tags. Add [[{subfolder}/concepts/related-slug]] entries in the ## Related section for concepts that share 2 or more tags. Target 3-5 outbound wikilinks per concept page. Only link to concepts confirmed to exist in the current subfolder.MOC generation rule:
Sparse MOC rule:
status: sparse in the frontmatter.{tag-slug}-sparse.md to {tag-slug}.md and remove the status: sparse field.Atlas page format:
---
title: "Tag Name"
type: moc
tag: tag-slug
created: 2026-05-04
updated: 2026-05-04
---
# Tag Name
## Summary
[1 short paragraph describing what this tag collects]
## Concepts
- [[{subfolder}/concepts/concept-a]] - [One-line summary]
- [[{subfolder}/concepts/concept-b]] - [One-line summary]
## Related Synthesis
- [[{subfolder}/synthesis/tag-slug]] - [Only if a synthesis page exists]
## Related Tags
- [[{subfolder}/atlas/another-tag]] - [Only when genuinely related]
Synthesis generation rule:
Synthesis page format:
---
title: "Synthesis: Tag Name"
type: synthesis
tag: tag-slug
concepts:
- "concepts/concept-a"
- "concepts/concept-b"
sources:
- "_raw/2026-05-01/001.md"
- "_raw/2026-05-03/002.md"
- "_raw/2026-05-04/001.md"
created: 2026-05-04
updated: 2026-05-04
---
# Synthesis: Tag Name
## Pattern
[State the non-obvious cross-cutting pattern in 1-2 paragraphs]
## Evidence
- [[{subfolder}/concepts/concept-a]] - [Evidence]
- [[{subfolder}/concepts/concept-b]] - [Evidence]
- [[{subfolder}/concepts/concept-c]] - [Evidence]
## Implications
- [Reusable lesson]
- [Constraint or tradeoff]
- [Follow-up question or operational consequence]
Maturity promotion during TRANSFORM:
evergreen only if it has no unresolved [!contradiction] callouts.seedling or growing) until the contradiction is resolved.updated dates if their status changed.Home MOC rule:
/mmc run.atlas/home.md must include current vault stats and recent activity, even if no tag MOC or synthesis page changed.Home MOC format:
---
title: "Memory Mason Home"
type: moc
created: 2026-05-04
updated: 2026-05-04
---
# Memory Mason Home
## Vault Stats
- Concepts: [count]
- Synthesis: [count]
- MOCs: [count]
- Last compile: [ISO timestamp]
## Active Tags
- [[{subfolder}/atlas/tag-slug]] - [Concept count for the tag]
## Recently Updated
- [[{subfolder}/concepts/example-concept]]
- [[{subfolder}/synthesis/example-tag]]
- [[{subfolder}/atlas/example-tag]]
knowledge/ folder.concept, synthesis, moc.Index format:
# Memory Mason Index
| Type | Article | Summary | Updated |
|------|---------|---------|---------|
| concept | [[{subfolder}/concepts/example-concept]] | One-line summary. | 2026-05-04 |
| synthesis | [[{subfolder}/synthesis/example-tag]] | One-line summary. | 2026-05-04 |
| moc | [[{subfolder}/atlas/example-tag]] | One-line summary. | 2026-05-04 |
{
"ingested": {},
"last_compile": null,
"last_lint": null,
"capture_metrics": {
"capture_count": 0,
"total_raw_chars": 0,
"total_stored_chars": 0,
"total_raw_tokens": 0,
"total_stored_tokens": 0,
"total_savings_chars": 0,
"total_savings_tokens": 0,
"total_savings_percent": 0,
"last_capture_at": null,
"last_capture": null
}
}
If state.json already exists, preserve existing keys you are not actively updating,
including capture_metrics and total_cost_usd.
Set ingested[sourceKey] to:
{
"hash": "<16-char-hash>",
"compiled_at": "<ISO-8601 timestamp>",
"chunk_count": 3
}
Set last_compile to the current ISO-8601 timestamp.
Write {vault}/{subfolder}/_meta/state.json with 2-space JSON indentation.
Read {vault}/{subfolder}/_meta/manifest.json if it exists. Otherwise start with:
{
"sources": {}
}
sources[sourceKey] to:{
"source_path": "_raw/YYYY-MM-DD/",
"hash": "<16-char-hash>",
"compiled_at": "<ISO-8601 timestamp>",
"chunks": [
"_raw/YYYY-MM-DD/001.md",
"_raw/YYYY-MM-DD/002.md"
],
"pages_created": [
"concepts/example-concept.md",
"atlas/example-tag.md"
],
"pages_updated": [
"concepts/another-concept.md",
"synthesis/example-tag.md",
"index.md"
]
}
Merge and deduplicate pages_created and pages_updated if the source key already exists.
Preserve all other manifest entries.
Write {vault}/{subfolder}/_meta/manifest.json with 2-space JSON indentation.
Update {vault}/{subfolder}/_meta/taxonomy.md on every successful compile.
Glob all concept pages in {vault}/{subfolder}/concepts/. Collect every unique tag from frontmatter tags: arrays.
If taxonomy.md does not exist, create it with all collected tags.
If taxonomy.md exists, read it and append any new tags not already listed.
Taxonomy format:
---
type: meta
title: "Taxonomy"
updated: 2026-05-04
---
# Taxonomy
| Tag | Canonical | Aliases |
|-----|-----------|---------|
| tag-slug | Tag Name | alias-1, alias-2 |
When a concept uses a tag that resembles an existing tag (plural/singular, hyphenation variant), normalize it to the existing canonical form instead of creating a duplicate. Update the concept's frontmatter to use the canonical tag.
Append one build entry to {vault}/{subfolder}/_meta/log.md using this format:
## [ISO-timestamp] compile | YYYY-MM-DD
- Source: _raw/YYYY-MM-DD/ ([chunk count] chunks)
- Concepts created: [count]
- Concepts updated: [count]
- Synthesis created: [count]
- Synthesis updated: [count]
- MOCs created: [count]
- MOCs updated: [count]
- Index rows touched: [count]
_meta/log.md entries by ## [ headings._meta/log.md has 32 or more entries, auto-fold the oldest 16 entries (k=4) into {vault}/{subfolder}/_meta/folds/{fold-id}.md./mma extractive rules for the fold page: no invented facts, preserve verbatim source entries, and summarize only what those entries record._meta/log.md with:<!-- folded: [[{subfolder}/_meta/folds/{fold-id}]] ({COUNT} entries, {EARLIEST-DATE} to {LATEST-DATE}) -->
_meta/log.md after the replacement:## [ISO-timestamp] fold | {fold-id}
- Entries folded: {COUNT} ({EARLIEST-DATE} to {LATEST-DATE})
- Fold page: [[{subfolder}/_meta/folds/{fold-id}]]
Report the fold action in /mmc output whenever auto-archive runs.
If the newly compiled context body (excluding YAML frontmatter) is fewer than 80 words, append the new content below the existing context.md body rather than replacing it. Still update the updated timestamp in frontmatter. When appending, add a horizontal rule separator. When the new content is 80 words or more, overwrite as normal.
Keep the body under 300 words.
context.md must summarize only current focus, open decisions, and active threads that are still relevant after this compile.
Do not append old context verbatim. Carry forward only unresolved threads that are still grounded in the latest compiled knowledge.
context.md format:
---
type: meta
title: "Session Context"
updated: 2026-05-04T12:34:56Z
---
## Current Focus
[Short paragraph]
## Open Decisions
- [Decision still unresolved]
## Active Threads
- [Thread still active]
.md extensions in article bodies._raw/YYYY-MM-DD/001.md for source provenance.Every [[wikilink]] in article bodies must include the {subfolder}/ prefix followed by the full directory-prefixed path. This ensures Obsidian resolves links within the correct project when multiple subfolders share a vault.
| Target type | Correct | Wrong |
|---|---|---|
| Concept | [[{subfolder}/concepts/hook-system-architecture]] | [[concepts/hook-system-architecture]] |
| Synthesis | [[{subfolder}/synthesis/hook-architecture-and-wiring]] | [[synthesis/hook-architecture-and-wiring]] |
| Atlas MOC | [[{subfolder}/atlas/hooks]] | [[atlas/hooks]] |
| Raw source (body) | [[{subfolder}/_raw/2026-05-04/001]] | [[_raw/2026-05-04/001]] |
| Meta fold | [[{subfolder}/_meta/folds/fold-id]] | [[_meta/folds/fold-id]] |
sources: arrays use plain string paths like "_raw/2026-05-04/001.md", not wikilink brackets. These do not need the subfolder prefix.{subfolder}/ to every wikilink. Without it, Obsidian may resolve links to pages in sibling subfolders that share the same slug.{subfolder}/ prefix plus explicit directory makes every link unambiguous.## Related section in concept pages must link to [[{subfolder}/concepts/slug]], not [[concepts/slug]] or [[slug]].[[{subfolder}/concepts/slug]], [[{subfolder}/synthesis/slug]], and [[{subfolder}/atlas/slug]].npx claudepluginhub s-gryt/memory-mason --plugin memory-masonEnforces schema-as-code for Obsidian vaults. Discovers structure, builds a schema, and runs health checks, dedup, link cleanup, MOC generation, and decay cycles.
Organizes an Obsidian vault: adds documents with auto-categorization, restructures misplaced files, processes meeting notes, and runs health checks.
Ingests files and URLs into an Obsidian vault by extracting entities and concepts, creating or updating wiki pages with cross-references. Supports batch mode and multiple transport methods (CLI, MCP, filesystem).