Mml
Lint the knowledge base for broken links, orphan pages, stale captures, and wikilink convention violations. Run as a periodic health check.From its SKILL.md
npx -y skills add s-gryt/memory-mason --skill mmlAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.7 KB, as published. Nobody here has run it
Objective
Run eighteen health checks on the knowledge base and report all findings by severity.
This command is operational only. Do not write /mml, /memory-mason:mml, or their execution chatter back into the vault.
Path Resolution
Before any other reasoning, resolve vault config in this priority order:
- Project
./.env - Project
./memory-mason.json - Global
~/.memory-mason/.env - Global
~/.memory-mason/config.json
Resolve:
- {vault}: absolute path to the Obsidian vault
- {subfolder}: plugin-managed subfolder inside the vault
Use the source that provides the vault path.
Subfolder: .env sources use MEMORY_MASON_SUBFOLDER when present, else ai-knowledge. JSON sources use their subfolder field.
If no location provides a vault path, fail fast with an explicit error naming every location checked.
Checks run against {vault}/{subfolder}/{atlas|concepts|synthesis}/*, index.md, _meta/{state.json, manifest.json, context.md}, _raw/*.
Execution Rules
- Glob all markdown files under {vault}/{subfolder}/atlas/, {vault}/{subfolder}/concepts/, and {vault}/{subfolder}/synthesis/. Also include {vault}/{subfolder}/index.md if it exists.
- Do not lint files under
_raw/or_meta/as knowledge articles, except for the explicit checks below against_meta/manifest.jsonand_meta/context.md. - Parse wikilinks in the form
[[target]]from article content. - Treat links starting with
{subfolder}/_raw/as valid source references. Links starting with bare_raw/(missing subfolder prefix) are flagged by Check 13. - Treat bare slug links such as
[[foo]]as format violations handled by Check 13. - Report every issue found. Do not stop after the first failure.
Checks
See detailed specifications for exact rules, report formats, and edge cases for every check.
- Broken wikilinks (error) — flag every
[[link]]whose target file does not exist under{vault}/{subfolder}. - Orphan pages (warning) — report articles with zero inbound links from other content articles.
- Uncompiled raw captures (warning) — report
_raw/YYYY-MM-DD/folders absent fromstate.jsoningestedmap. - Stale articles (warning) — report raw captures whose current hash differs from the compiled hash in
state.json. - Missing backlinks (suggestion) — flag A→B links where B does not link back to A.
- Sparse articles (suggestion) — report articles with fewer than 200 words (excluding frontmatter).
- Large raw captures (warning/error) — warn >500 KB, error >2 MB total chunk size per daily folder (sum all chunk files regardless of naming layout: legacy numeric
001.mdfiles and session-scopedHHMMSS-{sid8}-NNN.mdfiles). - Manifest integrity (error/warning/suggestion) — validate
_meta/manifest.jsonstructure, page references, and hash agreement withstate.json. - Session context freshness (warning/suggestion) — validate
_meta/context.mdexists, has required frontmatter, and is not older thanlast_compile. - Unresolved contradictions (warning) — count
[!contradiction]callouts inconcepts/articles. - Wikilink density (suggestion) — flag concept pages with zero outbound links; flag atlas MOCs with fewer than 3 concept links.
- Knowledge gaps (suggestion) — count
[!gap]callouts inconcepts/articles. - Wikilink format convention (error) — flag bare slugs and links missing the
{subfolder}/prefix. - Cross-project references (error) — flag links starting with a subfolder prefix other than
{subfolder}/. - Session note coverage (warning) — compiled date has sessions recorded in
_raw/{YYYY-MM-DD}/meta.json(schemaVersion 2) but the correspondingsessions/YYYY-MM-DD-{sid8}.mdfile is missing. - Bases integrity (suggestion) —
atlas/bases/*.basefiles expected after at least one compile are absent or contain invalid YAML. - Supersede integrity (error) — a
superseded_bytarget wikilink does not resolve; a superseded concept (hassuperseded_by) hasstatus: evergreen; orhas_contradictionflag does not match callout presence. - Index session rows (warning) — a session note exists in
sessions/with no correspondingsessionrow inindex.md.
Output Format
- Return a markdown report grouped by severity:
### Errors (must fix),### Warnings (should fix),### Suggestions (nice to fix), and a### Summarywith counts. If no issues:✓ Knowledge base is healthy.