Runtime Configuration (Step 0 — before any processing)
Read these files to configure domain-specific behavior:
-
ops/derivation-manifest.md— vocabulary mapping, platform hints- Use
vocabulary.notesfor the notes folder name - Use
vocabulary.note/vocabulary.note_pluralfor note type references - Use
vocabulary.verifyfor the process verb in output - Use
vocabulary.topic_mapfor MOC references - Use
vocabulary.templatesfor the templates folder path - Use
vocabulary.cmd_reflectfor redirect when missing connections found
- Use
-
ops/config.yaml— processing depth, verification settingsprocessing.depth: deep | standard | quickprocessing.verification.description_test: true | falseprocessing.verification.schema_check: true | falseprocessing.verification.link_check: true | false
If these files don't exist, use universal defaults.
Processing depth adaptation:
| Depth | Verification Behavior |
|---|---|
| deep | Full verification: cold-read prediction, complete schema check, exhaustive link verification, MOC coverage, orphan risk analysis, content staleness detection, bundling analysis |
| standard | Balanced: cold-read prediction, schema check, link verification, MOC coverage |
| quick | Basic: schema check, link verification only. Skip cold-read prediction and health analysis |
EXECUTE NOW
Target: $ARGUMENTS
Parse immediately:
- If target contains a note name: verify that specific note
- If target contains
--handoff: output RALPH HANDOFF block at end - If target is "all" or "recent": verify recently created/modified notes
- If target is empty: ask which note to verify
Anti-Shortcut Warning
Before marking verification as passed, you MUST complete ALL four categories:
-
COMPLETE description quality test — cold-read the title + description, predict what the note contains, compare against actual content. A description that merely restates the title FAILS.
-
COMPLETE schema validation — check ALL required fields from the template schema, verify ALL enum values are valid, confirm ALL constraints are met. A single missing required field FAILS.
-
COMPLETE link verification — confirm ALL wiki links in the note resolve to existing files. A single dangling link FAILS.
-
COMPLETE {DOMAIN:topic map} integration — verify the note appears in at least one {DOMAIN:topic map}'s Core Ideas section with a context phrase. A note with no {DOMAIN:topic map} mention FAILS.
Do NOT declare success after checking only one or two categories. ALL FOUR must pass.
Execute these steps IN ORDER:
Step 0: INDEX FRESHNESS CHECK
Before any retrieval tests, verify the semantic search index is current:
- Try
mcp__qmd__vector_searchwith a simple test query to confirm MCP availability - If MCP is unavailable (tool fails or returns error), try qmd CLI (
qmd status) to confirm local CLI availability - If either MCP or qmd CLI is available, proceed to Step 1
- If neither MCP nor qmd CLI is available: note "retrieval test will be deferred" and proceed — do NOT let index issues block verification
The index freshness check prevents false retrieval failures on recently created notes. If the index is stale, retrieval test results should be interpreted with that context.
Step 1: RECITE (cold-read prediction test)
CRITICAL: Do NOT read the full note yet. Only read frontmatter.
This step tests whether the title + description alone enable an agent to predict the note's content. The cold-read constraint is the entire point — reading the note first contaminates the prediction.
1. Read ONLY title + description
Use Read with a line limit to get just the first few lines of frontmatter. Extract:
- Title (the filename without .md)
- Description (the description field)
Do NOT scroll past the frontmatter closing ---.
2. Form prediction
Before reading further, write out what you expect:
- Core argument: what claim does this note make?
- Mechanism: what reasoning or evidence does it use?
- Scope: what boundaries does the argument have?
- Likely connections: what other notes would it reference?
Write this prediction explicitly in your output. It must be specific enough to be wrong.
3. Read full note content
NOW read the complete note. Compare against your prediction.
4. Score prediction accuracy (1-5)
| Score | Meaning | Threshold |
|---|---|---|
| 5 | Perfect — description fully captured the argument | Pass |
| 4 | Strong — minor details missed, core predicted | Pass |
| 3 | Adequate — general area right, missed key aspects | Pass (minimum) |
| 2 | Weak — significant mismatch between prediction and content | FAIL |
| 1 | Failed — note argued something different than expected | FAIL |
Passing threshold: 3 or above.
5. Run semantic retrieval test
Test whether the description enables semantic retrieval:
- Tier 1 (preferred):
mcp__qmd__vector_searchwith query = "[the note's description text]", collection = "{vocabulary.notes_collection}", limit = 10 - Tier 2 (CLI fallback):
qmd vsearch "[the note's description text]" --collection {vocabulary.notes_collection} -n 10 - Tier 3: if both MCP and qmd CLI are unavailable, report "retrieval test deferred (semantic search unavailable)" — do NOT skip silently
Check where the note appears in results:
- Top 3: description works well for semantic retrieval
- Position 4-10: adequate but could improve
- Not in top 10: flag — description may not convey the note's meaning
Why vector_search specifically: Agents find notes via semantic search during reflect and reweave. Testing with keyword search tests the wrong retrieval method. Full hybrid search with LLM reranking compensates for weak descriptions — too lenient. vector_search tests real semantic findability without hiding bad descriptions behind reranking.
6. Draft improved description if needed
If prediction score < 3:
- Diagnose the failure: too vague? missing mechanism? wrong emphasis? restates title?
- Draft an improved description that would score higher
- If you have Edit tool access: apply the improvement
7. Combined scoring
| Prediction Score | Retrieval Rank | Suggested Action |
|---|---|---|
| 4-5 | top 3 | Description works — no changes needed |
| 3-4 | top 5 | Adequate — minor improvements possible |
| 3+ | 6-10 | Investigate — passes prediction but weak retrieval |
| any | not in top 10 | Flag for review — description may not enable retrieval |
| < 3 | any | FAIL — description needs rewriting |
Step 2: VALIDATE (schema check)
Read the template that applies to this note type. Determine the template by checking:
- Note location (e.g., {DOMAIN:notes}/ uses the standard note template)
- Type field in frontmatter (if present, may indicate a specialized template)
If the vault has templates with _schema blocks, read the _schema from the relevant template for authoritative field requirements. If no _schema exists, use the checks below as defaults.
Required fields (FAIL if missing):
| Field | Requirement | Severity |
|---|---|---|
description | Must exist and be non-empty | FAIL |
Topics footer or topics field | Must reference at least one {DOMAIN:topic map} | FAIL |
Description constraints (WARN if violated):
| Constraint | Check | Severity |
|---|---|---|
| Length | Should be ~50-200 characters | WARN |
| Format | Single sentence, no trailing period | WARN |
| Content | MUST add NEW information beyond title | WARN |
| Semantic value | Should capture mechanism, not just topic | WARN |
How to check "adds new info": Read the title, read the description. If the description says the same thing in different words, it fails this check. A good description adds: mechanism (how/why), scope (boundaries), implication (what follows), o