Knowledge check — search vault for constraints relevant to planned work. Use before modifying detection, export, labeling, or other constrained systems. Triggers on /kcheck, 'knowledge check', 'check vault'.
Planned work: $ARGUMENTS
If no description provided, ask the user what they are about to do.
Execute these steps:
Extract from the user's description:
energy_detector.py, raven_export.py)Run vault search via topic map traversal + ripgrep:
Structural + content search — find notes via topic map routing and keyword matching:
node ops/scripts/vault-search.mjs --query "[full description of planned work]" --limit 8
Parse the JSON output to get note titles, descriptions, types, and scores.
Supplementary keyword search — catch any notes the structural search missed:
rg -il "key-term-1|key-term-2" notes/
Read any additional matches not already in the vault-search results.
Deduplication: Results from vault-search.mjs are already deduplicated. Merge any supplementary ripgrep finds by note title. Cap at 8 results total, sorted by score descending.
Present results in this format:
## 🔍 Knowledge Check: [short summary of intent]
### Relevant Notes (N found)
| Score | Note | Key Point |
|-------|------|-----------|
| 0.XX | [[note title]] | first sentence of description field |
### ⚠️ CRITICAL — File-Specific Constraints
[Only if any result's content references files mentioned in the intent]
- **[[note title]]** references `file.py` — READ BEFORE PROCEEDING
### Summary
[1-2 sentence synthesis: what constraints or prior decisions are most relevant to the planned work]
If no results pass the score threshold: Display "No strong matches found in vault. Proceed with standard care."
If file paths were mentioned in the intent: After getting search results, use Grep to check if any of the top results' note files contain the mentioned file paths. If they do, flag them in the CRITICAL section — these notes have direct opinions about the files being modified.
ops/derivation.md, ops/config.yaml, or methodology files — this is a fast vault lookup, not a deep analysis./ask or /learn as follow-ups.