name: mmq description: > Query the knowledge base. Reads session context first, then the root index, then relevant atlas, concept, and synthesis pages, and synthesizes a clear answer with [[wikilink]] citations. Use when you want to ask about past decisions, patterns, lessons, or technical knowledge captured in previous AI conversations. argument-hint: "[question]" allowed-tools: "Read Glob Grep"
Objective
Answer a knowledge-base question using index-guided retrieval and cite sources with [[wikilinks]].
This command is operational only. Do not write /mmq, /memory-mason:mmq, 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 rules:
- If the vault path comes from an
.envfile, useMEMORY_MASON_SUBFOLDERfrom that same file when present, otherwise default toai-knowledge. - If the vault path comes from
memory-mason.jsonor~/.memory-mason/config.json, use itssubfolder.
Do not claim config is missing until you have attempted all four locations above. If none provide a vault path, state that the knowledge base is not initialized because no supported Memory Mason config source was found.
Use these paths:
- Session context: {vault}/{subfolder}/_meta/context.md
- Manifest: {vault}/{subfolder}/_meta/manifest.json
- Build log: {vault}/{subfolder}/_meta/log.md
- Index: {vault}/{subfolder}/index.md
- Atlas: {vault}/{subfolder}/atlas/
- Concepts: {vault}/{subfolder}/concepts/
- Synthesis: {vault}/{subfolder}/synthesis/
- Raw captures: {vault}/{subfolder}/_raw/
Steps
- Read {vault}/{subfolder}/_meta/context.md if it exists.
- Treat
context.mdas a fast cache of recent context, not a replacement for the knowledge base. - If
context.mddirectly answers the question with enough precision, answer immediately. - If
context.mdis relevant but incomplete, extract likely page names, tags, dates, and follow-up questions from it, then continue.
- Read {vault}/{subfolder}/index.md.
- This is the primary retrieval mechanism after the session context.
- If it is missing, state that the knowledge base is not initialized.
- Read the index table carefully.
- Identify 3-10 pages most relevant to the user question.
- Prefer pages explicitly mentioned in
context.mdwhen they are relevant. - Use atlas pages for broad topic questions, synthesis pages for cross-cutting pattern questions, and concept pages for specific definition, workflow, or decision questions.
- Read selected pages in full.
- Pull complete article context before answering.
- If the answer depends on source provenance or freshness, read {vault}/{subfolder}/_meta/manifest.json to see which
_raw/YYYY-MM-DD/sources were compiled. - If needed, inspect specific
_raw/YYYY-MM-DD/NNN.mdchunks directly instead of assuming the vault is current.
- Aggregate confidence from cited pages.
- After reading concept pages, collect the
confidencefield from each cited concept's YAML frontmatter. Valid values:high,medium,low. - Apply lowest-wins semantics: if any cited concept is
low, overall confidence islow; else if any ismedium, overall confidence ismedium; elsehigh. - If any cited concept has
status: seedlingor contains a[!gap]callout, note it in the answer. - Append to the answer footer:
Confidence: [high|medium|low] (based on N cited concept pages)If any seedling or gap concepts were cited, add:Note: answer draws on N seedling/gap concept(s): [names]. - Apply only to cited concept pages. Do not aggregate from atlas or synthesis pages directly unless they themselves cite a concept that contributes to the answer.
- Synthesize a clear, thorough answer.
- Cite supporting sources with [[wikilinks]] using the
{subfolder}/prefix: [[{subfolder}/concepts/example-concept]], [[{subfolder}/synthesis/example-tag]], or [[{subfolder}/atlas/example-tag]]. - Use
context.mdonly as retrieval assistance. Do not cite_meta/context.mdas authoritative when a durable page exists. - Mention raw chunk paths in prose only when you directly inspected them and no durable page exists yet.
- Handle missing knowledge honestly.
- If the knowledge base does not contain relevant information, say so clearly.
- Suggest running
/mmcif relevant information appears to exist in_raw/but is not compiled into durable pages yet. - Use {vault}/{subfolder}/_meta/log.md only to clarify recency or whether a compile happened. Do not treat the build log as a primary knowledge source.
Filing Behavior
- Vault Architecture v2 does not define a dedicated filed Q&A location.
- Do not create a filed-answer page unless the user explicitly provides a destination path outside this skill.
Answering Guidelines
- Prefer precision over broad speculation.
- Keep the final answer directly tied to cited durable pages.
- Use
_meta/context.mdto accelerate retrieval, not to skip article reads when the answer requires durable citations. - Use concise, clear language and explicit reasoning.