From memory-mason
Compiles daily or specified raw captures into Obsidian Vault Architecture v2 via three-stage ETL pipeline, updating concepts, atlas MOCs, synthesis pages, index, metadata, and archives.
npx claudepluginhub s-gryt/memory-mason --plugin memory-mason[YYYY-MM-DD|raw-folder-path]This skill is limited to using the following tools:
Compile one raw daily capture into the Vault Architecture v2 knowledge base.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Share bugs, ideas, or general feedback.
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.
Use these paths for all operations:
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
- [[concepts/related-concept]] - [How it relates]
- [[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.[[concepts/related-slug]] entries in the ## Related section for concepts that share 2 or more tags. Target 3-5 outbound wikilinks per concept page.MOC generation rule:
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
- [[concepts/concept-a]] - [One-line summary]
- [[concepts/concept-b]] - [One-line summary]
## Related Synthesis
- [[synthesis/tag-slug]] - [Only if a synthesis page exists]
## Related Tags
- [[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
- [[concepts/concept-a]] - [Evidence]
- [[concepts/concept-b]] - [Evidence]
- [[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
- [[atlas/tag-slug]] - [Concept count for the tag]
## Recently Updated
- [[concepts/example-concept]]
- [[synthesis/example-tag]]
- [[atlas/example-tag]]
knowledge/ folder.concept, synthesis, moc.Index format:
# Memory Mason Index
| Type | Article | Summary | Updated |
|------|---------|---------|---------|
| concept | [[concepts/example-concept]] | One-line summary. | 2026-05-04 |
| synthesis | [[synthesis/example-tag]] | One-line summary. | 2026-05-04 |
| moc | [[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.
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: [[_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: [[_meta/folds/{fold-id}]]
Report the fold action in /mmc output whenever auto-archive runs.
Overwrite {vault}/{subfolder}/_meta/context.md on every successful compile.
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 use the full directory-prefixed path relative to the subfolder root. Never use bare slug links.
| Target type | Correct | Wrong |
|---|---|---|
| Concept | [[concepts/hook-system-architecture]] | [[hook-system-architecture]] |
| Synthesis | [[synthesis/hook-architecture-and-wiring]] | [[hook-architecture-and-wiring]] |
| Atlas MOC | [[atlas/hooks]] | [[hooks]] |
| Raw source (body) | [[_raw/2026-05-04/001]] | [[memory-mason/_raw/2026-05-04/001]] |
sources: arrays use plain string paths like "_raw/2026-05-04/001.md", not wikilink brackets.memory-mason/) to any wikilink. Paths are already relative to the subfolder root.## Related section in concept pages must link to [[concepts/slug]], not [[slug]].[[concepts/slug]], [[synthesis/slug]], and [[atlas/slug]].