From memory-mason
Archives oldest build log entries from _meta/log.md into extractive summary pages in _meta/folds/ to manage growth in Obsidian vaults. Auto-triggers at 32+ entries.
npx claudepluginhub s-gryt/memory-mason --plugin memory-mason[--dry-run] [--k <batch-exponent>]This skill is limited to using the following tools:
Fold the oldest 2^k entries from _meta/log.md into a single summary page, reducing log.md size while preserving all information.
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.
Fold the oldest 2^k entries from _meta/log.md into a single summary page, reducing log.md size while preserving all information.
This command is operational only. Do not write /mma, /memory-mason:mma, or their execution chatter back into the vault.
Routine archival runs automatically when mmc appends a build log entry that brings _meta/log.md to 32 or more entries. mmc folds the oldest 16 entries (k=4) into _meta/folds/ without requiring a manual /mma call.
Use /mma for:
--k 5 folds 32 entries at once)--dry-run)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.
--dry-run: Show what would be folded without writing anything. Default behavior.--k <n>: Batch exponent. Fold 2^n entries at once. Default: k=4 (16 entries).Always dry-run first. Only write when user confirms or --commit is passed.
Read {vault}/{subfolder}/_meta/log.md.
## [).Determine fold range.
fold-k{k}-from-{EARLIEST-DATE}-to-{LATEST-DATE}-n{COUNT}
Example: fold-k4-from-2026-04-01-to-2026-04-16-n16Generate fold summary.
Fold page format (_meta/folds/{fold-id}.md):
---
title: "Fold: {EARLIEST-DATE} to {LATEST-DATE}"
fold_id: "{fold-id}"
entries_folded: {COUNT}
source: "_meta/log.md"
created: {ISO-date}
---
# Build Log Fold: {EARLIEST-DATE} to {LATEST-DATE}
{COUNT} entries from {EARLIEST-DATE} to {LATEST-DATE}.
## Summary
- Compiles run: {count}
- Articles created: {count} ({list key ones with wikilinks})
- Articles updated: {count}
- Queries answered: {count}
## Source Entries
{verbatim copy of the folded entries}
Write the fold page to _meta/folds/{fold-id}.md.
Remove the folded entries from log.md.
<!-- folded: [[_meta/folds/{fold-id}]] ({COUNT} entries, {EARLIEST-DATE} to {LATEST-DATE}) -->Append to log.md:
## [{ISO-timestamp}] fold | {fold-id}
- Entries folded: {COUNT} ({EARLIEST-DATE} to {LATEST-DATE})
- Fold page: [[_meta/folds/{fold-id}]]
Report without writing:
Fold plan:
- Entries to fold: {COUNT} (oldest 2^{k})
- Date range: {EARLIEST-DATE} to {LATEST-DATE}
- Fold ID: {fold-id}
- Fold page: _meta/folds/{fold-id}.md
- Remaining in log.md: {total - COUNT} entries
Run /mma --commit to execute.