Add shared MCP workflow for qmd-docs indexing#20792
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot import qmd shared workflow in all workflows that update prompts, dictation, update docs |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added in b98c084. The index is cached under Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot rename to qmd-docs |
|
@copilot also index markdowns in .github/agents and .github/aw |
There was a problem hiding this comment.
Pull request overview
Adds a shared MCP module that indexes the repo docs with QMD and exposes a local HTTP MCP server for agent-accessible documentation search.
Changes:
- Introduces a shared
qmdMCP server configuration (HTTP onlocalhost:8181) with a restricted tool allowlist. - Adds setup steps to install QMD, (re)index
docs/src/content/docs, and start the server with a health-check gate. - Adds GitHub Actions cache restore/save for
~/.cache/qmdkeyed on a docs content hash.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
.github/workflows/shared/mcp/qmd.md
Outdated
| key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} | ||
| restore-keys: qmd-docs- |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in e64e526. Added Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…dexing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in a712cba. Renamed to
Done in a712cba. Added Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Rationale: index only updated with trusted docs. |
…cs.md Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 019b802.
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
There was a problem hiding this comment.
@copilot update to latest release of actions/checkout and sha, also for setup-node
There was a problem hiding this comment.
Done in 8bab062. Updated to actions/checkout@de0fac2e # v6.0.2 and actions/setup-node@395ad326 # v6 — matching the versions used across other workflows in the repo.
| id: qmd-cache | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: ~/.cache/qmd |
There was a problem hiding this comment.
@copilot mount cache in /tmp/gh-aw/cache/qmd-docs
There was a problem hiding this comment.
Done in 003f149. Both the shared module and indexer now use /tmp/gh-aw/cache/qmd-docs as the cache path. A symlink ~/.cache/qmd → /tmp/gh-aw/cache/qmd-docs is created at runtime so qmd finds its data at its default location.
…-docs-indexer.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Adds a shared MCP module (
shared/mcp/qmd-docs.md) that restores a pre-built QMD search index and exposes it to agents via a local HTTP MCP server. A dedicated indexer workflow builds and caches the index from trusted content on the main branch. Imports the module into all documentation, dictation, and prompt workflows.What's added
.github/workflows/shared/mcp/qmd-docs.md— installs@tobilu/qmd(on Node.js 24), restores the pre-built index fromactions/cache(~/.cache/qmd), starts the QMD HTTP MCP server onlocalhost:8181, and exposes four MCP tools:query,get,multi_get,status.github/workflows/qmd-docs-indexer.yml— standalone GitHub Actions workflow that builds and saves the QMD index. Triggers on push tomain(path-filtered to indexed directories) and on a daily schedule to capture any missed pushes. Index is only ever built from trusted content onmain. Usesactions/checkout@v6.0.2andactions/setup-node@v6.Indexed collections
docsdocs/src/content/docs/agents.github/agents/aw.github/aw/Usage
Once imported, agents can search the docs with BM25 keyword search (
lexqueries) out of the box. For semantic/hybrid search,qmd embedcan be added to the setup steps to generate local GGUF embeddings.Caching
The qmd index (
~/.cache/qmd) is built and cached byqmd-docs-indexer.ymlusing a key derived fromhashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**'). The shared module restores this cache at runtime — no indexing occurs during agent workflow runs.Workflows updated
The
shared/mcp/qmd-docs.mdimport has been added to all workflows that update docs, handle dictation, or manage prompts:dictation-prompt.md— dictation / prompt generationdaily-doc-updater.md— daily documentation updatesdaily-doc-healer.md— documentation gap detection and correctiondeveloper-docs-consolidator.md— developer documentation consolidationunbloat-docs.md— documentation simplificationglossary-maintainer.md— glossary maintenancetechnical-doc-writer.md— technical documentation reviewOriginal prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.