$npx -y skills add kv0906/pm-kit --skill askFast vault Q&A — quick lookups, decision history, blocker status, doc search. Uses QMD hybrid search when available, falls back to vault grep. Use for "/ask what did we decide about auth?" or "/ask who's blocked?".
| 1 | # /ask — Question Answering |
| 2 | |
| 3 | Fast answers from your vault. Uses QMD hybrid search (BM25 + vector + rerank) when available, with automatic fallback to vault grep. |
| 4 | |
| 5 | ## Context |
| 6 | |
| 7 | Config: @_core/config.yaml |
| 8 | |
| 9 | ## Input |
| 10 | |
| 11 | User input: $ARGUMENTS |
| 12 | |
| 13 | ## Processing Steps |
| 14 | |
| 15 | ### Step 1: Detect Search Backend |
| 16 | |
| 17 | Check if QMD MCP tools are available in the current session: |
| 18 | |
| 19 | 1. **Try `qmd_status`** (MCP tool) to check QMD availability and index state. |
| 20 | 2. **Evaluate result:** |
| 21 | - QMD available AND has embedded docs → use **QMD mode** |
| 22 | - QMD available but 0 embedded docs → use **Fallback mode** + hint |
| 23 | - QMD not available (tool missing/error) → use **Fallback mode** |
| 24 | |
| 25 | ### Step 2: Parse Question |
| 26 | |
| 27 | - Detect project if mentioned |
| 28 | - Identify question type: |
| 29 | - "what did we decide about X" → decisions |
| 30 | - "who's blocked" → blockers |
| 31 | - "find doc for X" → docs |
| 32 | - "status of X" → index |
| 33 | |
| 34 | ### Step 3A: QMD Mode (preferred) |
| 35 | |
| 36 | When QMD is available and indexed: |
| 37 | |
| 38 | 1. **Deep search**: Call `qmd_deep_search` with the user's question. |
| 39 | - Use collection filter from config: `_core/config.yaml → qmd.collection_name` (default: `pm-kit`) |
| 40 | - Cap results: use `qmd.max_results` from config (default: 8) |
| 41 | 2. **Retrieve top docs**: Call `qmd_get` or `qmd_multi_get` for the top-scored results. |
| 42 | - Apply minimum score threshold from config: `qmd.min_score` (default: 0.35) |
| 43 | 3. **Synthesize answer**: Read the retrieved content and produce a grounded answer with source citations. |
| 44 | |
| 45 | ### Step 3B: Fallback Mode (vault grep) |
| 46 | |
| 47 | When QMD is not available or not indexed: |
| 48 | |
| 49 | 1. **Search Strategy** |
| 50 | |
| 51 | | Question Type | Search Path | |
| 52 | |--------------|-------------| |
| 53 | | Decisions | `decisions/{project}/*.md` | |
| 54 | | Blockers | `blockers/{project}/*.md` | |
| 55 | | Docs | `docs/{project}/*.md`, `docs/general/*.md` | |
| 56 | | Status | `01-index/{project}.md` | |
| 57 | | General | All folders | |
| 58 | |
| 59 | 2. **Search Methods** |
| 60 | - Filename match first (fastest — naming-as-API) |
| 61 | - Frontmatter field match |
| 62 | - Content grep (slower) |
| 63 | |
| 64 | ### Step 4: Return Answer |
| 65 | |
| 66 | ## Output Format |
| 67 | |
| 68 | ### With results |
| 69 | |
| 70 | ```markdown |
| 71 | ## Answer |
| 72 | |
| 73 | {Direct answer — 1-3 sentences, grounded in source content} |
| 74 | |
| 75 | ### Sources |
| 76 | - `{file-path}` — {brief context why this source is relevant} |
| 77 | - `{file-path}` — {brief context} |
| 78 | |
| 79 | ### Search Mode |
| 80 | {QMD (deep) | Fallback (vault grep)} |
| 81 | ``` |
| 82 | |
| 83 | ### No results |
| 84 | |
| 85 | ```markdown |
| 86 | ## No Results Found |
| 87 | |
| 88 | Searched: {folders or QMD collection} |
| 89 | Query: "{query}" |
| 90 | |
| 91 | **Suggestions**: |
| 92 | - Try broader terms |
| 93 | - Check spelling |
| 94 | - Run `qmd embed` if QMD is installed but not indexed |
| 95 | |
| 96 | ### Search Mode |
| 97 | {QMD (deep) | Fallback (vault grep)} |
| 98 | ``` |
| 99 | |
| 100 | ### Fallback mode hint |
| 101 | |
| 102 | When running in Fallback mode, append after the answer: |
| 103 | |
| 104 | > **Tip**: Install [QMD](https://github.com/tobi/qmd) for smarter search with semantic understanding. See [handbook/QMD_INTEGRATION.md](handbook/QMD_INTEGRATION.md) for setup. |