From ce9893517425a58b58dd16eb9219ed2f08e846df Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:05:49 +0000 Subject: [PATCH 1/9] Initial plan From adaeeba79a0388dc595f70355b016255e3d628a7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:21:41 +0000 Subject: [PATCH 2/9] Add shared MCP workflow for qmd docs indexing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/shared/mcp/qmd.md | 150 ++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 .github/workflows/shared/mcp/qmd.md diff --git a/.github/workflows/shared/mcp/qmd.md b/.github/workflows/shared/mcp/qmd.md new file mode 100644 index 00000000000..6673d3117b8 --- /dev/null +++ b/.github/workflows/shared/mcp/qmd.md @@ -0,0 +1,150 @@ +--- +# QMD MCP Server +# Local on-device search engine for the project documentation +# +# Documentation: https://github.com/tobi/qmd +# +# Available tools (via MCP): +# - query: Search with typed sub-queries (lex/vec/hyde), combined via RRF + reranking +# - get: Retrieve a document by path or docid (with fuzzy matching suggestions) +# - multi_get: Batch retrieve by glob pattern, comma-separated list, or docids +# - status: Index health and collection info +# +# Usage: +# imports: +# - shared/mcp/qmd.md + +mcp-servers: + qmd: + type: http + url: http://localhost:8181/mcp + allowed: + - query + - get + - multi_get + - status + +steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "22" + - name: Install QMD + run: npm install -g @tobilu/qmd + - name: Index docs with QMD + run: | + set -e + + DOCS_DIR="${{ github.workspace }}/docs/src/content/docs" + + if [ ! -d "$DOCS_DIR" ]; then + echo "Docs directory not found: $DOCS_DIR" + exit 1 + fi + + # Add documentation collection pointing to the docs source + qmd collection add "$DOCS_DIR" --name docs + + # Add context to improve search relevance and results + qmd context add qmd://docs "GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows" + - name: Start QMD MCP server + run: | + set -e + mkdir -p /tmp/gh-aw/mcp-logs/qmd/ + + # Start QMD MCP server in HTTP daemon mode (default port 8181) + qmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1 + + # Poll until the server is healthy (up to 15 seconds) + for i in $(seq 1 30); do + if curl -sf http://localhost:8181/health > /dev/null 2>&1; then + echo "QMD MCP server started successfully" + echo "Status: $(curl -s http://localhost:8181/health)" + exit 0 + fi + sleep 0.5 + done + + echo "QMD MCP server health check timed out after 15 seconds" + echo "Server logs:" + cat /tmp/gh-aw/mcp-logs/qmd/server.log || true + exit 1 +--- + + From b98c08496dcfbc0c095a42e15c0111c4cc83652b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:33:34 +0000 Subject: [PATCH 3/9] Update qmd workflow: Node.js 24 and actions/cache for index reuse Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/shared/mcp/qmd.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/shared/mcp/qmd.md b/.github/workflows/shared/mcp/qmd.md index 6673d3117b8..d4d468fe3e8 100644 --- a/.github/workflows/shared/mcp/qmd.md +++ b/.github/workflows/shared/mcp/qmd.md @@ -28,10 +28,18 @@ steps: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: "22" + node-version: "24" - name: Install QMD run: npm install -g @tobilu/qmd + - name: Restore QMD index cache + id: qmd-cache + uses: actions/cache/restore@v4 + with: + path: ~/.cache/qmd + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + restore-keys: qmd-docs- - name: Index docs with QMD + if: steps.qmd-cache.outputs.cache-hit != 'true' run: | set -e @@ -47,6 +55,12 @@ steps: # Add context to improve search relevance and results qmd context add qmd://docs "GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows" + - name: Save QMD index cache + if: steps.qmd-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: ~/.cache/qmd + key: ${{ steps.qmd-cache.outputs.cache-primary-key }} - name: Start QMD MCP server run: | set -e @@ -131,10 +145,10 @@ Use the qmd tool to search the project documentation and answer questions. ### How It Works -1. Node.js 22 is installed +1. Node.js 24 is installed 2. QMD is installed globally from npm (`@tobilu/qmd`) -3. The `docs/src/content/docs/` directory is indexed as the `docs` collection -4. A context description is added to improve search relevance +3. The qmd index is restored from `actions/cache` using a key derived from a hash of the docs content +4. If the cache is missed, `docs/src/content/docs/` is indexed as the `docs` collection with a context description, and the resulting index is saved to cache 5. The HTTP MCP server starts on `localhost:8181` The `query` tool supports BM25 full-text search (`lex` type) out of the box. From e64e526298444fdc8301fa12810948453765a8c2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:44:07 +0000 Subject: [PATCH 4/9] Import shared/mcp/qmd.md in docs, dictation, and prompt workflows Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/daily-doc-healer.lock.yml | 54 ++++++++++++++++-- .github/workflows/daily-doc-healer.md | 1 + .github/workflows/daily-doc-updater.lock.yml | 57 +++++++++++++++++-- .github/workflows/daily-doc-updater.md | 3 + .../developer-docs-consolidator.lock.yml | 54 ++++++++++++++++-- .../workflows/developer-docs-consolidator.md | 1 + .github/workflows/dictation-prompt.lock.yml | 48 ++++++++++++++-- .github/workflows/dictation-prompt.md | 1 + .../workflows/glossary-maintainer.lock.yml | 55 ++++++++++++++++-- .github/workflows/glossary-maintainer.md | 1 + .../workflows/technical-doc-writer.lock.yml | 42 ++++++++++++-- .github/workflows/technical-doc-writer.md | 1 + .github/workflows/unbloat-docs.lock.yml | 48 ++++++++++++++-- .github/workflows/unbloat-docs.md | 1 + 14 files changed, 334 insertions(+), 33 deletions(-) diff --git a/.github/workflows/daily-doc-healer.lock.yml b/.github/workflows/daily-doc-healer.lock.yml index 280fdc26a17..4499b763982 100644 --- a/.github/workflows/daily-doc-healer.lock.yml +++ b/.github/workflows/daily-doc-healer.lock.yml @@ -25,9 +25,10 @@ # # Resolved workflow manifest: # Imports: +# - shared/mcp/qmd.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"535fc3da48a2fd7b03e26162c792c6242dd96d231e18ab602c9a5bdb55885f58","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"0acde325a62fcebed9b6d4a4d431c474e83bdfaa7840af8aee50f3537e1c1fd8","strict":true} name: "Daily Documentation Healer" "on": @@ -177,6 +178,9 @@ jobs: {{#runtime-import .github/workflows/shared/reporting.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' + {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + GH_AW_PROMPT_EOF + cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/daily-doc-healer.md}} GH_AW_PROMPT_EOF } > "$GH_AW_PROMPT" @@ -290,8 +294,34 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false + - name: Setup Node.js + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + with: + node-version: '24' + package-manager-cache: false - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Install QMD + run: npm install -g @tobilu/qmd + - id: qmd-cache + name: Restore QMD index cache + uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + path: ~/.cache/qmd + restore-keys: qmd-docs- + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Index docs with QMD + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Save QMD index cache + uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: ${{ steps.qmd-cache.outputs.cache-primary-key }} + path: ~/.cache/qmd + - name: Start QMD MCP server + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + # Cache memory file share configuration from frontmatter processed below - name: Create cache-memory directory run: bash /opt/gh-aw/actions/create_cache_memory_dir.sh @@ -760,6 +790,16 @@ jobs: "GITHUB_TOOLSETS": "context,repos,issues,pull_requests" } }, + "qmd": { + "type": "http", + "url": "http://host.docker.internal:8181/mcp", + "tools": [ + "query", + "get", + "multi_get", + "status" + ] + }, "safeoutputs": { "type": "http", "url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT", @@ -882,13 +922,17 @@ jobs: # - mcp__github__search_pull_requests # - mcp__github__search_repositories # - mcp__github__search_users + # - mcp__qmd__get + # - mcp__qmd__multi_get + # - mcp__qmd__query + # - mcp__qmd__status timeout-minutes: 45 run: | set -o pipefail touch /tmp/gh-aw/agent-step-summary.md # shellcheck disable=SC1003 - sudo -E awf --tty --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && claude --print --disable-slash-commands --no-chrome --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json --allowed-tools '\''Bash(cat .github/workflows/daily-doc-updater.md),Bash(cat),Bash(date),Bash(echo),Bash(find docs -name '\''\'\'''\''*.md'\''\'\'''\'' -o -name '\''\'\'''\''*.mdx'\''\'\'''\''),Bash(git add:*),Bash(git branch:*),Bash(git checkout:*),Bash(git commit:*),Bash(git diff:*),Bash(git log:*),Bash(git merge:*),Bash(git rm:*),Bash(git show:*),Bash(git status),Bash(git switch:*),Bash(grep),Bash(grep:*),Bash(head),Bash(ls),Bash(pwd),Bash(sort),Bash(tail),Bash(uniq),Bash(wc),Bash(yq),BashOutput,Edit,Edit(/tmp/gh-aw/cache-memory/*),ExitPlanMode,Glob,Grep,KillBash,LS,MultiEdit,MultiEdit(/tmp/gh-aw/cache-memory/*),NotebookEdit,NotebookRead,Read,Read(/tmp/gh-aw/cache-memory/*),Task,TodoWrite,Write,Write(/tmp/gh-aw/cache-memory/*),mcp__github__download_workflow_run_artifact,mcp__github__get_code_scanning_alert,mcp__github__get_commit,mcp__github__get_dependabot_alert,mcp__github__get_discussion,mcp__github__get_discussion_comments,mcp__github__get_file_contents,mcp__github__get_job_logs,mcp__github__get_label,mcp__github__get_latest_release,mcp__github__get_me,mcp__github__get_notification_details,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_review_comments,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__get_release_by_tag,mcp__github__get_secret_scanning_alert,mcp__github__get_tag,mcp__github__get_workflow_run,mcp__github__get_workflow_run_logs,mcp__github__get_workflow_run_usage,mcp__github__issue_read,mcp__github__list_branches,mcp__github__list_code_scanning_alerts,mcp__github__list_commits,mcp__github__list_dependabot_alerts,mcp__github__list_discussion_categories,mcp__github__list_discussions,mcp__github__list_issue_types,mcp__github__list_issues,mcp__github__list_label,mcp__github__list_notifications,mcp__github__list_pull_requests,mcp__github__list_releases,mcp__github__list_secret_scanning_alerts,mcp__github__list_starred_repositories,mcp__github__list_tags,mcp__github__list_workflow_jobs,mcp__github__list_workflow_run_artifacts,mcp__github__list_workflow_runs,mcp__github__list_workflows,mcp__github__pull_request_read,mcp__github__search_code,mcp__github__search_issues,mcp__github__search_orgs,mcp__github__search_pull_requests,mcp__github__search_repositories,mcp__github__search_users'\'' --debug-file /tmp/gh-aw/agent-stdio.log --verbose --permission-mode bypassPermissions --output-format stream-json "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_CLAUDE:+ --model "$GH_AW_MODEL_AGENT_CLAUDE"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --tty --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && claude --print --disable-slash-commands --no-chrome --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json --allowed-tools '\''Bash(cat .github/workflows/daily-doc-updater.md),Bash(cat),Bash(date),Bash(echo),Bash(find docs -name '\''\'\'''\''*.md'\''\'\'''\'' -o -name '\''\'\'''\''*.mdx'\''\'\'''\''),Bash(git add:*),Bash(git branch:*),Bash(git checkout:*),Bash(git commit:*),Bash(git diff:*),Bash(git log:*),Bash(git merge:*),Bash(git rm:*),Bash(git show:*),Bash(git status),Bash(git switch:*),Bash(grep),Bash(grep:*),Bash(head),Bash(ls),Bash(pwd),Bash(sort),Bash(tail),Bash(uniq),Bash(wc),Bash(yq),BashOutput,Edit,Edit(/tmp/gh-aw/cache-memory/*),ExitPlanMode,Glob,Grep,KillBash,LS,MultiEdit,MultiEdit(/tmp/gh-aw/cache-memory/*),NotebookEdit,NotebookRead,Read,Read(/tmp/gh-aw/cache-memory/*),Task,TodoWrite,Write,Write(/tmp/gh-aw/cache-memory/*),mcp__github__download_workflow_run_artifact,mcp__github__get_code_scanning_alert,mcp__github__get_commit,mcp__github__get_dependabot_alert,mcp__github__get_discussion,mcp__github__get_discussion_comments,mcp__github__get_file_contents,mcp__github__get_job_logs,mcp__github__get_label,mcp__github__get_latest_release,mcp__github__get_me,mcp__github__get_notification_details,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_review_comments,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__get_release_by_tag,mcp__github__get_secret_scanning_alert,mcp__github__get_tag,mcp__github__get_workflow_run,mcp__github__get_workflow_run_logs,mcp__github__get_workflow_run_usage,mcp__github__issue_read,mcp__github__list_branches,mcp__github__list_code_scanning_alerts,mcp__github__list_commits,mcp__github__list_dependabot_alerts,mcp__github__list_discussion_categories,mcp__github__list_discussions,mcp__github__list_issue_types,mcp__github__list_issues,mcp__github__list_label,mcp__github__list_notifications,mcp__github__list_pull_requests,mcp__github__list_releases,mcp__github__list_secret_scanning_alerts,mcp__github__list_starred_repositories,mcp__github__list_tags,mcp__github__list_workflow_jobs,mcp__github__list_workflow_run_artifacts,mcp__github__list_workflow_runs,mcp__github__list_workflows,mcp__github__pull_request_read,mcp__github__search_code,mcp__github__search_issues,mcp__github__search_orgs,mcp__github__search_pull_requests,mcp__github__search_repositories,mcp__github__search_users,mcp__qmd__get,mcp__qmd__multi_get,mcp__qmd__query,mcp__qmd__status'\'' --debug-file /tmp/gh-aw/agent-stdio.log --verbose --permission-mode bypassPermissions --output-format stream-json "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_CLAUDE:+ --model "$GH_AW_MODEL_AGENT_CLAUDE"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} BASH_DEFAULT_TIMEOUT_MS: 60000 @@ -961,7 +1005,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} with: @@ -1378,7 +1422,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_issue\":{\"assignees\":[\"copilot\"],\"expires\":72,\"labels\":[\"documentation\",\"automation\"],\"max\":1,\"title_prefix\":\"[doc-healer] \"},\"create_pull_request\":{\"expires\":72,\"labels\":[\"documentation\",\"automation\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CLAUDE.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\",\".claude/\"],\"title_prefix\":\"[docs] \"},\"missing_data\":{},\"missing_tool\":{}}" diff --git a/.github/workflows/daily-doc-healer.md b/.github/workflows/daily-doc-healer.md index a585e0029b0..5a7bd14f452 100644 --- a/.github/workflows/daily-doc-healer.md +++ b/.github/workflows/daily-doc-healer.md @@ -50,6 +50,7 @@ timeout-minutes: 45 imports: - shared/reporting.md + - shared/mcp/qmd.md --- {{#runtime-import? .github/shared-instructions.md}} diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index a5729c05280..0697b788ac7 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -23,7 +23,11 @@ # # Automatically reviews and updates documentation to ensure accuracy and completeness # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"9cc6295dbd7c765e3874d3994dddfdcff53d62e24627a054ec25bbbfe8a48b00","strict":true} +# Resolved workflow manifest: +# Imports: +# - shared/mcp/qmd.md +# +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"d863a01b0b91f7b356ae368e7e8a0808040b2776da9c5d67fb3c677d514db288","strict":true} name: "Daily Documentation Updater" "on": @@ -170,6 +174,9 @@ jobs: GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' + {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + GH_AW_PROMPT_EOF + cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/daily-doc-updater.md}} GH_AW_PROMPT_EOF } > "$GH_AW_PROMPT" @@ -283,8 +290,34 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false + - name: Setup Node.js + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + with: + node-version: '24' + package-manager-cache: false - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Install QMD + run: npm install -g @tobilu/qmd + - id: qmd-cache + name: Restore QMD index cache + uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + path: ~/.cache/qmd + restore-keys: qmd-docs- + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Index docs with QMD + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Save QMD index cache + uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: ${{ steps.qmd-cache.outputs.cache-primary-key }} + path: ~/.cache/qmd + - name: Start QMD MCP server + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + # Cache memory file share configuration from frontmatter processed below - name: Create cache-memory directory run: bash /opt/gh-aw/actions/create_cache_memory_dir.sh @@ -671,6 +704,16 @@ jobs: "GITHUB_TOOLSETS": "context,repos,issues,pull_requests" } }, + "qmd": { + "type": "http", + "url": "http://host.docker.internal:8181/mcp", + "tools": [ + "query", + "get", + "multi_get", + "status" + ] + }, "safeoutputs": { "type": "http", "url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT", @@ -794,13 +837,17 @@ jobs: # - mcp__github__search_pull_requests # - mcp__github__search_repositories # - mcp__github__search_users + # - mcp__qmd__get + # - mcp__qmd__multi_get + # - mcp__qmd__query + # - mcp__qmd__status timeout-minutes: 45 run: | set -o pipefail touch /tmp/gh-aw/agent-step-summary.md # shellcheck disable=SC1003 - sudo -E awf --tty --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && claude --print --disable-slash-commands --no-chrome --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json --allowed-tools '\''Bash(cat pkg/parser/schemas/*.json),Bash(cat),Bash(date),Bash(echo),Bash(find docs -maxdepth 1 -ls),Bash(find docs -name '\''\'\'''\''*.md'\''\'\'''\'' -exec cat {} +),Bash(find docs -name '\''\'\'''\''*.md'\''\'\'''\'' -o -name '\''\'\'''\''*.mdx'\''\'\'''\''),Bash(find pkg/parser/schemas -name '\''\'\'''\''*.json'\''\'\'''\''),Bash(git add:*),Bash(git branch:*),Bash(git checkout:*),Bash(git commit:*),Bash(git merge:*),Bash(git rm:*),Bash(git status),Bash(git switch:*),Bash(git),Bash(grep -r '\''\'\'''\''*'\''\'\'''\'' docs),Bash(grep),Bash(head),Bash(ls),Bash(pwd),Bash(sort),Bash(tail),Bash(uniq),Bash(wc),Bash(yq),BashOutput,Edit,Edit(/tmp/gh-aw/cache-memory/*),ExitPlanMode,Glob,Grep,KillBash,LS,MultiEdit,MultiEdit(/tmp/gh-aw/cache-memory/*),NotebookEdit,NotebookRead,Read,Read(/tmp/gh-aw/cache-memory/*),Task,TodoWrite,Write,Write(/tmp/gh-aw/cache-memory/*),mcp__github__download_workflow_run_artifact,mcp__github__get_code_scanning_alert,mcp__github__get_commit,mcp__github__get_dependabot_alert,mcp__github__get_discussion,mcp__github__get_discussion_comments,mcp__github__get_file_contents,mcp__github__get_job_logs,mcp__github__get_label,mcp__github__get_latest_release,mcp__github__get_me,mcp__github__get_notification_details,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_review_comments,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__get_release_by_tag,mcp__github__get_secret_scanning_alert,mcp__github__get_tag,mcp__github__get_workflow_run,mcp__github__get_workflow_run_logs,mcp__github__get_workflow_run_usage,mcp__github__issue_read,mcp__github__list_branches,mcp__github__list_code_scanning_alerts,mcp__github__list_commits,mcp__github__list_dependabot_alerts,mcp__github__list_discussion_categories,mcp__github__list_discussions,mcp__github__list_issue_types,mcp__github__list_issues,mcp__github__list_label,mcp__github__list_notifications,mcp__github__list_pull_requests,mcp__github__list_releases,mcp__github__list_secret_scanning_alerts,mcp__github__list_starred_repositories,mcp__github__list_tags,mcp__github__list_workflow_jobs,mcp__github__list_workflow_run_artifacts,mcp__github__list_workflow_runs,mcp__github__list_workflows,mcp__github__pull_request_read,mcp__github__search_code,mcp__github__search_issues,mcp__github__search_orgs,mcp__github__search_pull_requests,mcp__github__search_repositories,mcp__github__search_users'\'' --debug-file /tmp/gh-aw/agent-stdio.log --verbose --permission-mode bypassPermissions --output-format stream-json "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_CLAUDE:+ --model "$GH_AW_MODEL_AGENT_CLAUDE"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --tty --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && claude --print --disable-slash-commands --no-chrome --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json --allowed-tools '\''Bash(cat pkg/parser/schemas/*.json),Bash(cat),Bash(date),Bash(echo),Bash(find docs -maxdepth 1 -ls),Bash(find docs -name '\''\'\'''\''*.md'\''\'\'''\'' -exec cat {} +),Bash(find docs -name '\''\'\'''\''*.md'\''\'\'''\'' -o -name '\''\'\'''\''*.mdx'\''\'\'''\''),Bash(find pkg/parser/schemas -name '\''\'\'''\''*.json'\''\'\'''\''),Bash(git add:*),Bash(git branch:*),Bash(git checkout:*),Bash(git commit:*),Bash(git merge:*),Bash(git rm:*),Bash(git status),Bash(git switch:*),Bash(git),Bash(grep -r '\''\'\'''\''*'\''\'\'''\'' docs),Bash(grep),Bash(head),Bash(ls),Bash(pwd),Bash(sort),Bash(tail),Bash(uniq),Bash(wc),Bash(yq),BashOutput,Edit,Edit(/tmp/gh-aw/cache-memory/*),ExitPlanMode,Glob,Grep,KillBash,LS,MultiEdit,MultiEdit(/tmp/gh-aw/cache-memory/*),NotebookEdit,NotebookRead,Read,Read(/tmp/gh-aw/cache-memory/*),Task,TodoWrite,Write,Write(/tmp/gh-aw/cache-memory/*),mcp__github__download_workflow_run_artifact,mcp__github__get_code_scanning_alert,mcp__github__get_commit,mcp__github__get_dependabot_alert,mcp__github__get_discussion,mcp__github__get_discussion_comments,mcp__github__get_file_contents,mcp__github__get_job_logs,mcp__github__get_label,mcp__github__get_latest_release,mcp__github__get_me,mcp__github__get_notification_details,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_review_comments,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__get_release_by_tag,mcp__github__get_secret_scanning_alert,mcp__github__get_tag,mcp__github__get_workflow_run,mcp__github__get_workflow_run_logs,mcp__github__get_workflow_run_usage,mcp__github__issue_read,mcp__github__list_branches,mcp__github__list_code_scanning_alerts,mcp__github__list_commits,mcp__github__list_dependabot_alerts,mcp__github__list_discussion_categories,mcp__github__list_discussions,mcp__github__list_issue_types,mcp__github__list_issues,mcp__github__list_label,mcp__github__list_notifications,mcp__github__list_pull_requests,mcp__github__list_releases,mcp__github__list_secret_scanning_alerts,mcp__github__list_starred_repositories,mcp__github__list_tags,mcp__github__list_workflow_jobs,mcp__github__list_workflow_run_artifacts,mcp__github__list_workflow_runs,mcp__github__list_workflows,mcp__github__pull_request_read,mcp__github__search_code,mcp__github__search_issues,mcp__github__search_orgs,mcp__github__search_pull_requests,mcp__github__search_repositories,mcp__github__search_users,mcp__qmd__get,mcp__qmd__multi_get,mcp__qmd__query,mcp__qmd__status'\'' --debug-file /tmp/gh-aw/agent-stdio.log --verbose --permission-mode bypassPermissions --output-format stream-json "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_CLAUDE:+ --model "$GH_AW_MODEL_AGENT_CLAUDE"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} BASH_DEFAULT_TIMEOUT_MS: 60000 @@ -873,7 +920,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} with: @@ -1288,7 +1335,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"auto_merge\":true,\"draft\":false,\"expires\":24,\"labels\":[\"documentation\",\"automation\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CLAUDE.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\",\".claude/\"],\"reviewers\":[\"copilot\"],\"title_prefix\":\"[docs] \"},\"missing_data\":{},\"missing_tool\":{}}" diff --git a/.github/workflows/daily-doc-updater.md b/.github/workflows/daily-doc-updater.md index 8be2c59678b..0df28cee9ca 100644 --- a/.github/workflows/daily-doc-updater.md +++ b/.github/workflows/daily-doc-updater.md @@ -46,6 +46,9 @@ tools: timeout-minutes: 45 +imports: + - shared/mcp/qmd.md + --- {{#runtime-import? .github/shared-instructions.md}} diff --git a/.github/workflows/developer-docs-consolidator.lock.yml b/.github/workflows/developer-docs-consolidator.lock.yml index f874ca9f4a6..c1ca83e6fca 100644 --- a/.github/workflows/developer-docs-consolidator.lock.yml +++ b/.github/workflows/developer-docs-consolidator.lock.yml @@ -25,10 +25,11 @@ # # Resolved workflow manifest: # Imports: +# - shared/mcp/qmd.md # - shared/mcp/serena-go.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"ba20f92152708c40f6b55c5384131f6e54f60e07c1d5f0fe932645b137b1ee2e","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"f7f33e4248f9b3b4c02429b9adfcdeff4493687fd2fc532ebe1870f8ac3413dc","strict":true} name: "Developer Documentation Consolidator" "on": @@ -182,6 +183,9 @@ jobs: {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' + {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + GH_AW_PROMPT_EOF + cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/developer-docs-consolidator.md}} GH_AW_PROMPT_EOF } > "$GH_AW_PROMPT" @@ -309,8 +313,34 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false + - name: Setup Node.js + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + with: + node-version: '24' + package-manager-cache: false - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Install QMD + run: npm install -g @tobilu/qmd + - id: qmd-cache + name: Restore QMD index cache + uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + path: ~/.cache/qmd + restore-keys: qmd-docs- + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Index docs with QMD + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Save QMD index cache + uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: ${{ steps.qmd-cache.outputs.cache-primary-key }} + path: ~/.cache/qmd + - name: Start QMD MCP server + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + # Cache memory file share configuration from frontmatter processed below - name: Create cache-memory directory run: bash /opt/gh-aw/actions/create_cache_memory_dir.sh @@ -782,6 +812,16 @@ jobs: "GITHUB_TOOLSETS": "context,repos,issues,pull_requests" } }, + "qmd": { + "type": "http", + "url": "http://host.docker.internal:8181/mcp", + "tools": [ + "query", + "get", + "multi_get", + "status" + ] + }, "safeoutputs": { "type": "http", "url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT", @@ -920,13 +960,17 @@ jobs: # - mcp__github__search_pull_requests # - mcp__github__search_repositories # - mcp__github__search_users + # - mcp__qmd__get + # - mcp__qmd__multi_get + # - mcp__qmd__query + # - mcp__qmd__status timeout-minutes: 30 run: | set -o pipefail touch /tmp/gh-aw/agent-step-summary.md # shellcheck disable=SC1003 - sudo -E awf --tty --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && claude --print --disable-slash-commands --no-chrome --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json --allowed-tools '\''Bash(cat scratchpad/*.md),Bash(cat),Bash(date),Bash(echo),Bash(find specs -maxdepth 1 -ls),Bash(find specs -name '\''\'\'''\''*.md'\''\'\'''\''),Bash(git add:*),Bash(git branch:*),Bash(git checkout:*),Bash(git commit:*),Bash(git merge:*),Bash(git rm:*),Bash(git status),Bash(git switch:*),Bash(git),Bash(grep -r '\''\'\'''\''*'\''\'\'''\'' specs),Bash(grep),Bash(head),Bash(ls),Bash(pwd),Bash(sort),Bash(tail),Bash(uniq),Bash(wc -l scratchpad/*.md),Bash(wc),Bash(yq),BashOutput,Edit,Edit(/tmp/gh-aw/cache-memory/*),ExitPlanMode,Glob,Grep,KillBash,LS,MultiEdit,MultiEdit(/tmp/gh-aw/cache-memory/*),NotebookEdit,NotebookRead,Read,Read(/tmp/gh-aw/cache-memory/*),Task,TodoWrite,Write,Write(/tmp/gh-aw/cache-memory/*),mcp__github__download_workflow_run_artifact,mcp__github__get_code_scanning_alert,mcp__github__get_commit,mcp__github__get_dependabot_alert,mcp__github__get_discussion,mcp__github__get_discussion_comments,mcp__github__get_file_contents,mcp__github__get_job_logs,mcp__github__get_label,mcp__github__get_latest_release,mcp__github__get_me,mcp__github__get_notification_details,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_review_comments,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__get_release_by_tag,mcp__github__get_secret_scanning_alert,mcp__github__get_tag,mcp__github__get_workflow_run,mcp__github__get_workflow_run_logs,mcp__github__get_workflow_run_usage,mcp__github__issue_read,mcp__github__list_branches,mcp__github__list_code_scanning_alerts,mcp__github__list_commits,mcp__github__list_dependabot_alerts,mcp__github__list_discussion_categories,mcp__github__list_discussions,mcp__github__list_issue_types,mcp__github__list_issues,mcp__github__list_label,mcp__github__list_notifications,mcp__github__list_pull_requests,mcp__github__list_releases,mcp__github__list_secret_scanning_alerts,mcp__github__list_starred_repositories,mcp__github__list_tags,mcp__github__list_workflow_jobs,mcp__github__list_workflow_run_artifacts,mcp__github__list_workflow_runs,mcp__github__list_workflows,mcp__github__pull_request_read,mcp__github__search_code,mcp__github__search_issues,mcp__github__search_orgs,mcp__github__search_pull_requests,mcp__github__search_repositories,mcp__github__search_users'\'' --debug-file /tmp/gh-aw/agent-stdio.log --verbose --permission-mode bypassPermissions --output-format stream-json "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_CLAUDE:+ --model "$GH_AW_MODEL_AGENT_CLAUDE"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --tty --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && claude --print --disable-slash-commands --no-chrome --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json --allowed-tools '\''Bash(cat scratchpad/*.md),Bash(cat),Bash(date),Bash(echo),Bash(find specs -maxdepth 1 -ls),Bash(find specs -name '\''\'\'''\''*.md'\''\'\'''\''),Bash(git add:*),Bash(git branch:*),Bash(git checkout:*),Bash(git commit:*),Bash(git merge:*),Bash(git rm:*),Bash(git status),Bash(git switch:*),Bash(git),Bash(grep -r '\''\'\'''\''*'\''\'\'''\'' specs),Bash(grep),Bash(head),Bash(ls),Bash(pwd),Bash(sort),Bash(tail),Bash(uniq),Bash(wc -l scratchpad/*.md),Bash(wc),Bash(yq),BashOutput,Edit,Edit(/tmp/gh-aw/cache-memory/*),ExitPlanMode,Glob,Grep,KillBash,LS,MultiEdit,MultiEdit(/tmp/gh-aw/cache-memory/*),NotebookEdit,NotebookRead,Read,Read(/tmp/gh-aw/cache-memory/*),Task,TodoWrite,Write,Write(/tmp/gh-aw/cache-memory/*),mcp__github__download_workflow_run_artifact,mcp__github__get_code_scanning_alert,mcp__github__get_commit,mcp__github__get_dependabot_alert,mcp__github__get_discussion,mcp__github__get_discussion_comments,mcp__github__get_file_contents,mcp__github__get_job_logs,mcp__github__get_label,mcp__github__get_latest_release,mcp__github__get_me,mcp__github__get_notification_details,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_review_comments,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__get_release_by_tag,mcp__github__get_secret_scanning_alert,mcp__github__get_tag,mcp__github__get_workflow_run,mcp__github__get_workflow_run_logs,mcp__github__get_workflow_run_usage,mcp__github__issue_read,mcp__github__list_branches,mcp__github__list_code_scanning_alerts,mcp__github__list_commits,mcp__github__list_dependabot_alerts,mcp__github__list_discussion_categories,mcp__github__list_discussions,mcp__github__list_issue_types,mcp__github__list_issues,mcp__github__list_label,mcp__github__list_notifications,mcp__github__list_pull_requests,mcp__github__list_releases,mcp__github__list_secret_scanning_alerts,mcp__github__list_starred_repositories,mcp__github__list_tags,mcp__github__list_workflow_jobs,mcp__github__list_workflow_run_artifacts,mcp__github__list_workflow_runs,mcp__github__list_workflows,mcp__github__pull_request_read,mcp__github__search_code,mcp__github__search_issues,mcp__github__search_orgs,mcp__github__search_pull_requests,mcp__github__search_repositories,mcp__github__search_users,mcp__qmd__get,mcp__qmd__multi_get,mcp__qmd__query,mcp__qmd__status'\'' --debug-file /tmp/gh-aw/agent-stdio.log --verbose --permission-mode bypassPermissions --output-format stream-json "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_CLAUDE:+ --model "$GH_AW_MODEL_AGENT_CLAUDE"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} BASH_DEFAULT_TIMEOUT_MS: 60000 @@ -999,7 +1043,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} with: @@ -1497,7 +1541,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_discussion\":{\"category\":\"audits\",\"close_older_discussions\":true,\"expires\":168,\"fallback_to_issue\":true,\"max\":1},\"create_pull_request\":{\"draft\":false,\"expires\":48,\"labels\":[\"documentation\",\"automation\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CLAUDE.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\",\".claude/\"],\"title_prefix\":\"[docs] \"},\"missing_data\":{},\"missing_tool\":{}}" diff --git a/.github/workflows/developer-docs-consolidator.md b/.github/workflows/developer-docs-consolidator.md index bafcc7b9fca..bdf6f9e64f9 100644 --- a/.github/workflows/developer-docs-consolidator.md +++ b/.github/workflows/developer-docs-consolidator.md @@ -54,6 +54,7 @@ timeout-minutes: 30 imports: - shared/reporting.md - shared/mcp/serena-go.md + - shared/mcp/qmd.md --- diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml index 3982c2db751..4c395aee9e2 100644 --- a/.github/workflows/dictation-prompt.lock.yml +++ b/.github/workflows/dictation-prompt.lock.yml @@ -25,9 +25,10 @@ # # Resolved workflow manifest: # Imports: +# - shared/mcp/qmd.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"16af25ab41ce0041c3db1e91145eacb6fa58d80cd9b2fecc6f8fc9a3f16a6641","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"fb771e95c127b4b50723662fbcc03250ca2326abf4099ac7767491694921592e","strict":true} name: "Dictation Prompt Generator" "on": @@ -169,6 +170,9 @@ jobs: {{#runtime-import .github/workflows/shared/reporting.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' + {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + GH_AW_PROMPT_EOF + cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/dictation-prompt.md}} GH_AW_PROMPT_EOF } > "$GH_AW_PROMPT" @@ -277,8 +281,34 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false + - name: Setup Node.js + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + with: + node-version: '24' + package-manager-cache: false - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Install QMD + run: npm install -g @tobilu/qmd + - id: qmd-cache + name: Restore QMD index cache + uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + path: ~/.cache/qmd + restore-keys: qmd-docs- + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Index docs with QMD + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Save QMD index cache + uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: ${{ steps.qmd-cache.outputs.cache-primary-key }} + path: ~/.cache/qmd + - name: Start QMD MCP server + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -652,6 +682,16 @@ jobs: "GITHUB_TOOLSETS": "context,repos,issues,pull_requests" } }, + "qmd": { + "type": "http", + "url": "http://host.docker.internal:8181/mcp", + "tools": [ + "query", + "get", + "multi_get", + "status" + ] + }, "safeoutputs": { "type": "http", "url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT", @@ -683,7 +723,7 @@ jobs: set -o pipefail touch /tmp/gh-aw/agent-step-summary.md # shellcheck disable=SC1003 - sudo -E awf --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ + sudo -E awf --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,localhost,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ -- /bin/bash -c '/usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --add-dir "${GITHUB_WORKSPACE}" --disable-builtin-mcps --allow-all-tools --allow-all-paths --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: COPILOT_AGENT_RUNNER_TYPE: STANDALONE @@ -779,7 +819,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,localhost,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} with: @@ -1173,7 +1213,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,localhost,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"auto_merge\":true,\"draft\":false,\"expires\":48,\"labels\":[\"documentation\",\"automation\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"AGENTS.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\"],\"title_prefix\":\"[docs] \"},\"missing_data\":{},\"missing_tool\":{}}" diff --git a/.github/workflows/dictation-prompt.md b/.github/workflows/dictation-prompt.md index dd75e74b017..b21c62de52b 100644 --- a/.github/workflows/dictation-prompt.md +++ b/.github/workflows/dictation-prompt.md @@ -17,6 +17,7 @@ network: defaults imports: - shared/reporting.md + - shared/mcp/qmd.md tools: edit: diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index 109deb61eb4..76bfbff1273 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -27,9 +27,10 @@ # Imports: # - ../agents/technical-doc-writer.agent.md # - ../skills/documentation/SKILL.md +# - shared/mcp/qmd.md # - shared/mcp/serena-go.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"a8396d3fdc420a67bda3195b1a040e89160fd59ac515a342320200c977c49452","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"b514e0686f96669e8f1071dc2024f1797a64b4193dde15d3ff95cda81b2d7676","strict":true} name: "Glossary Maintainer" "on": @@ -185,6 +186,9 @@ jobs: {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' + {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + GH_AW_PROMPT_EOF + cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/glossary-maintainer.md}} GH_AW_PROMPT_EOF } > "$GH_AW_PROMPT" @@ -323,8 +327,34 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('/opt/gh-aw/actions/merge_remote_agent_github_folder.cjs'); await main(); + - name: Setup Node.js + uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 + with: + node-version: '24' + package-manager-cache: false - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Install QMD + run: npm install -g @tobilu/qmd + - id: qmd-cache + name: Restore QMD index cache + uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + path: ~/.cache/qmd + restore-keys: qmd-docs- + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Index docs with QMD + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Save QMD index cache + uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: ${{ steps.qmd-cache.outputs.cache-primary-key }} + path: ~/.cache/qmd + - name: Start QMD MCP server + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + # Cache memory file share configuration from frontmatter processed below - name: Create cache-memory directory run: bash /opt/gh-aw/actions/create_cache_memory_dir.sh @@ -733,6 +763,16 @@ jobs: "GITHUB_TOOLSETS": "context,repos,issues,pull_requests" } }, + "qmd": { + "type": "http", + "url": "http://host.docker.internal:8181/mcp", + "tools": [ + "query", + "get", + "multi_get", + "status" + ] + }, "safeoutputs": { "type": "http", "url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT", @@ -768,6 +808,11 @@ jobs: id: agentic_execution # Copilot CLI tool arguments (sorted): # --allow-tool github + # --allow-tool qmd + # --allow-tool qmd(get) + # --allow-tool qmd(multi_get) + # --allow-tool qmd(query) + # --allow-tool qmd(status) # --allow-tool safeoutputs # --allow-tool serena # --allow-tool shell(cat) @@ -800,8 +845,8 @@ jobs: set -o pipefail touch /tmp/gh-aw/agent-step-summary.md # shellcheck disable=SC1003 - sudo -E awf --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ - -- /bin/bash -c '/usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --add-dir "${GITHUB_WORKSPACE}" --disable-builtin-mcps --agent technical-doc-writer --allow-tool github --allow-tool safeoutputs --allow-tool serena --allow-tool '\''shell(cat)'\'' --allow-tool '\''shell(date)'\'' --allow-tool '\''shell(echo)'\'' --allow-tool '\''shell(find docs -name '\''\'\'''\''*.md'\''\'\'''\'')'\'' --allow-tool '\''shell(git add:*)'\'' --allow-tool '\''shell(git branch:*)'\'' --allow-tool '\''shell(git checkout:*)'\'' --allow-tool '\''shell(git commit:*)'\'' --allow-tool '\''shell(git log --since='\''\'\'''\''24 hours ago'\''\'\'''\'' --oneline)'\'' --allow-tool '\''shell(git log --since='\''\'\'''\''7 days ago'\''\'\'''\'' --oneline)'\'' --allow-tool '\''shell(git merge:*)'\'' --allow-tool '\''shell(git rm:*)'\'' --allow-tool '\''shell(git status)'\'' --allow-tool '\''shell(git switch:*)'\'' --allow-tool '\''shell(grep -r '\''\'\'''\''*'\''\'\'''\'' docs)'\'' --allow-tool '\''shell(grep)'\'' --allow-tool '\''shell(head)'\'' --allow-tool '\''shell(ls)'\'' --allow-tool '\''shell(pwd)'\'' --allow-tool '\''shell(sort)'\'' --allow-tool '\''shell(tail)'\'' --allow-tool '\''shell(uniq)'\'' --allow-tool '\''shell(wc)'\'' --allow-tool '\''shell(yq)'\'' --allow-tool write --add-dir /tmp/gh-aw/cache-memory/ --allow-all-paths --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ + -- /bin/bash -c '/usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --add-dir "${GITHUB_WORKSPACE}" --disable-builtin-mcps --agent technical-doc-writer --allow-tool github --allow-tool qmd --allow-tool '\''qmd(get)'\'' --allow-tool '\''qmd(multi_get)'\'' --allow-tool '\''qmd(query)'\'' --allow-tool '\''qmd(status)'\'' --allow-tool safeoutputs --allow-tool serena --allow-tool '\''shell(cat)'\'' --allow-tool '\''shell(date)'\'' --allow-tool '\''shell(echo)'\'' --allow-tool '\''shell(find docs -name '\''\'\'''\''*.md'\''\'\'''\'')'\'' --allow-tool '\''shell(git add:*)'\'' --allow-tool '\''shell(git branch:*)'\'' --allow-tool '\''shell(git checkout:*)'\'' --allow-tool '\''shell(git commit:*)'\'' --allow-tool '\''shell(git log --since='\''\'\'''\''24 hours ago'\''\'\'''\'' --oneline)'\'' --allow-tool '\''shell(git log --since='\''\'\'''\''7 days ago'\''\'\'''\'' --oneline)'\'' --allow-tool '\''shell(git merge:*)'\'' --allow-tool '\''shell(git rm:*)'\'' --allow-tool '\''shell(git status)'\'' --allow-tool '\''shell(git switch:*)'\'' --allow-tool '\''shell(grep -r '\''\'\'''\''*'\''\'\'''\'' docs)'\'' --allow-tool '\''shell(grep)'\'' --allow-tool '\''shell(head)'\'' --allow-tool '\''shell(ls)'\'' --allow-tool '\''shell(pwd)'\'' --allow-tool '\''shell(sort)'\'' --allow-tool '\''shell(tail)'\'' --allow-tool '\''shell(uniq)'\'' --allow-tool '\''shell(wc)'\'' --allow-tool '\''shell(yq)'\'' --allow-tool write --add-dir /tmp/gh-aw/cache-memory/ --allow-all-paths --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: COPILOT_AGENT_RUNNER_TYPE: STANDALONE COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }} @@ -896,7 +941,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} with: @@ -1382,7 +1427,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"create_pull_request\":{\"draft\":false,\"expires\":48,\"labels\":[\"documentation\",\"glossary\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"AGENTS.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\"],\"title_prefix\":\"[docs] \"},\"missing_data\":{},\"missing_tool\":{}}" diff --git a/.github/workflows/glossary-maintainer.md b/.github/workflows/glossary-maintainer.md index 47fec3ce330..5500f7981a1 100644 --- a/.github/workflows/glossary-maintainer.md +++ b/.github/workflows/glossary-maintainer.md @@ -26,6 +26,7 @@ imports: - ../skills/documentation/SKILL.md - ../agents/technical-doc-writer.agent.md - shared/mcp/serena-go.md + - shared/mcp/qmd.md safe-outputs: create-pull-request: diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index c447c5619e5..c0188ac7976 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -27,8 +27,9 @@ # Imports: # - ../agents/technical-doc-writer.agent.md # - ../skills/documentation/SKILL.md +# - shared/mcp/qmd.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"75ffe292ccf1475efdf95b90c2ecbc225bc7fca6e403d3f0eb58141890b50838","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"9d787f9a30ae048c2d731d080c30e2277de4503553da416afc063922cbaea242","strict":true} name: "Rebuild the documentation after making changes" "on": @@ -187,6 +188,9 @@ jobs: {{#runtime-import .github/agents/technical-doc-writer.agent.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' + {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + GH_AW_PROMPT_EOF + cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/technical-doc-writer.md}} GH_AW_PROMPT_EOF } > "$GH_AW_PROMPT" @@ -334,6 +338,26 @@ jobs: package-manager-cache: false - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Install QMD + run: npm install -g @tobilu/qmd + - id: qmd-cache + name: Restore QMD index cache + uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + path: ~/.cache/qmd + restore-keys: qmd-docs- + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Index docs with QMD + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Save QMD index cache + uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: ${{ steps.qmd-cache.outputs.cache-primary-key }} + path: ~/.cache/qmd + - name: Start QMD MCP server + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" - name: Install dependencies run: npm ci working-directory: ./docs @@ -843,6 +867,16 @@ jobs: "GITHUB_TOOLSETS": "context,repos,issues,pull_requests" } }, + "qmd": { + "type": "http", + "url": "http://host.docker.internal:8181/mcp", + "tools": [ + "query", + "get", + "multi_get", + "status" + ] + }, "safeoutputs": { "type": "http", "url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT", @@ -874,7 +908,7 @@ jobs: set -o pipefail touch /tmp/gh-aw/agent-step-summary.md # shellcheck disable=SC1003 - sudo -E awf --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ + sudo -E awf --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ -- /bin/bash -c '/usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --add-dir "${GITHUB_WORKSPACE}" --disable-builtin-mcps --agent technical-doc-writer --allow-all-tools --add-dir /tmp/gh-aw/cache-memory/ --allow-all-paths --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: COPILOT_AGENT_RUNNER_TYPE: STANDALONE @@ -973,7 +1007,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} with: @@ -1475,7 +1509,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,ppa.launchpad.net,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"max\":1},\"create_pull_request\":{\"draft\":false,\"expires\":48,\"labels\":[\"documentation\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"AGENTS.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\"],\"reviewers\":[\"copilot\"],\"title_prefix\":\"[docs] \"},\"missing_data\":{},\"missing_tool\":{}}" diff --git a/.github/workflows/technical-doc-writer.md b/.github/workflows/technical-doc-writer.md index e0499f087ee..5697d4bfce2 100644 --- a/.github/workflows/technical-doc-writer.md +++ b/.github/workflows/technical-doc-writer.md @@ -26,6 +26,7 @@ network: imports: - ../skills/documentation/SKILL.md - ../agents/technical-doc-writer.agent.md + - shared/mcp/qmd.md safe-outputs: add-comment: diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index ed87188dc53..6faf2409b22 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -26,9 +26,10 @@ # Resolved workflow manifest: # Imports: # - shared/docs-server-lifecycle.md +# - shared/mcp/qmd.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"2dab426fe58dfdfcc6fab1dcdb0f3bf7932bdad926b39deab8acd23e49a07837","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"6ed4dd35fb7e3f06f94aef26d4fadfaac8e5b4f7f8372ff2617ecf37c64fc073","strict":true} name: "Documentation Unbloat" "on": @@ -221,6 +222,9 @@ jobs: {{#runtime-import .github/workflows/shared/docs-server-lifecycle.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' + {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + GH_AW_PROMPT_EOF + cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/unbloat-docs.md}} GH_AW_PROMPT_EOF } > "$GH_AW_PROMPT" @@ -336,6 +340,26 @@ jobs: destination: /opt/gh-aw/actions - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Install QMD + run: npm install -g @tobilu/qmd + - id: qmd-cache + name: Restore QMD index cache + uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + path: ~/.cache/qmd + restore-keys: qmd-docs- + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Index docs with QMD + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + - if: steps.qmd-cache.outputs.cache-hit != 'true' + name: Save QMD index cache + uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + with: + key: ${{ steps.qmd-cache.outputs.cache-primary-key }} + path: ~/.cache/qmd + - name: Start QMD MCP server + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -854,6 +878,16 @@ jobs: ], "mounts": ["/tmp/gh-aw/mcp-logs:/tmp/gh-aw/mcp-logs:rw"] }, + "qmd": { + "type": "http", + "url": "http://host.docker.internal:8181/mcp", + "tools": [ + "query", + "get", + "multi_get", + "status" + ] + }, "safeoutputs": { "type": "http", "url": "http://host.docker.internal:$GH_AW_SAFE_OUTPUTS_PORT", @@ -1009,13 +1043,17 @@ jobs: # - mcp__playwright__browser_take_screenshot # - mcp__playwright__browser_type # - mcp__playwright__browser_wait_for + # - mcp__qmd__get + # - mcp__qmd__multi_get + # - mcp__qmd__query + # - mcp__qmd__status timeout-minutes: 30 run: | set -o pipefail touch /tmp/gh-aw/agent-step-summary.md # shellcheck disable=SC1003 - sudo -E awf --tty --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ - -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && claude --print --disable-slash-commands --no-chrome --max-turns 90 --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json --allowed-tools '\''Bash(cat *),Bash(cat),Bash(cd *),Bash(cp *),Bash(curl *),Bash(date),Bash(echo *),Bash(echo),Bash(find docs/src/content/docs -name '\''\'\'''\''*.md'\''\'\'''\''),Bash(git add:*),Bash(git branch:*),Bash(git checkout:*),Bash(git commit:*),Bash(git merge:*),Bash(git rm:*),Bash(git status),Bash(git switch:*),Bash(git),Bash(grep -n *),Bash(grep),Bash(head *),Bash(head),Bash(kill *),Bash(ls),Bash(mkdir *),Bash(mv *),Bash(node *),Bash(npm *),Bash(ps *),Bash(pwd),Bash(sleep *),Bash(sort),Bash(tail *),Bash(tail),Bash(uniq),Bash(wc -l *),Bash(wc),Bash(yq),BashOutput,Edit,Edit(/tmp/gh-aw/cache-memory/*),ExitPlanMode,Glob,Grep,KillBash,LS,MultiEdit,MultiEdit(/tmp/gh-aw/cache-memory/*),NotebookEdit,NotebookRead,Read,Read(/tmp/gh-aw/cache-memory/*),Task,TodoWrite,Write,Write(/tmp/gh-aw/cache-memory/*),mcp__github__download_workflow_run_artifact,mcp__github__get_code_scanning_alert,mcp__github__get_commit,mcp__github__get_dependabot_alert,mcp__github__get_discussion,mcp__github__get_discussion_comments,mcp__github__get_file_contents,mcp__github__get_job_logs,mcp__github__get_label,mcp__github__get_latest_release,mcp__github__get_me,mcp__github__get_notification_details,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_review_comments,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__get_release_by_tag,mcp__github__get_secret_scanning_alert,mcp__github__get_tag,mcp__github__get_workflow_run,mcp__github__get_workflow_run_logs,mcp__github__get_workflow_run_usage,mcp__github__issue_read,mcp__github__list_branches,mcp__github__list_code_scanning_alerts,mcp__github__list_commits,mcp__github__list_dependabot_alerts,mcp__github__list_discussion_categories,mcp__github__list_discussions,mcp__github__list_issue_types,mcp__github__list_issues,mcp__github__list_label,mcp__github__list_notifications,mcp__github__list_pull_requests,mcp__github__list_releases,mcp__github__list_secret_scanning_alerts,mcp__github__list_starred_repositories,mcp__github__list_tags,mcp__github__list_workflow_jobs,mcp__github__list_workflow_run_artifacts,mcp__github__list_workflow_runs,mcp__github__list_workflows,mcp__github__pull_request_read,mcp__github__search_code,mcp__github__search_issues,mcp__github__search_orgs,mcp__github__search_pull_requests,mcp__github__search_repositories,mcp__github__search_users,mcp__playwright__browser_click,mcp__playwright__browser_close,mcp__playwright__browser_console_messages,mcp__playwright__browser_drag,mcp__playwright__browser_evaluate,mcp__playwright__browser_file_upload,mcp__playwright__browser_fill_form,mcp__playwright__browser_handle_dialog,mcp__playwright__browser_hover,mcp__playwright__browser_install,mcp__playwright__browser_navigate,mcp__playwright__browser_navigate_back,mcp__playwright__browser_network_requests,mcp__playwright__browser_press_key,mcp__playwright__browser_resize,mcp__playwright__browser_select_option,mcp__playwright__browser_snapshot,mcp__playwright__browser_tabs,mcp__playwright__browser_take_screenshot,mcp__playwright__browser_type,mcp__playwright__browser_wait_for'\'' --debug-file /tmp/gh-aw/agent-stdio.log --verbose --permission-mode bypassPermissions --output-format stream-json "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_CLAUDE:+ --model "$GH_AW_MODEL_AGENT_CLAUDE"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log + sudo -E awf --tty --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.24.1 --skip-pull --enable-api-proxy \ + -- /bin/bash -c 'export PATH="$(find /opt/hostedtoolcache -maxdepth 4 -type d -name bin 2>/dev/null | tr '\''\n'\'' '\'':'\'')$PATH"; [ -n "$GOROOT" ] && export PATH="$GOROOT/bin:$PATH" || true && claude --print --disable-slash-commands --no-chrome --max-turns 90 --mcp-config /tmp/gh-aw/mcp-config/mcp-servers.json --allowed-tools '\''Bash(cat *),Bash(cat),Bash(cd *),Bash(cp *),Bash(curl *),Bash(date),Bash(echo *),Bash(echo),Bash(find docs/src/content/docs -name '\''\'\'''\''*.md'\''\'\'''\''),Bash(git add:*),Bash(git branch:*),Bash(git checkout:*),Bash(git commit:*),Bash(git merge:*),Bash(git rm:*),Bash(git status),Bash(git switch:*),Bash(git),Bash(grep -n *),Bash(grep),Bash(head *),Bash(head),Bash(kill *),Bash(ls),Bash(mkdir *),Bash(mv *),Bash(node *),Bash(npm *),Bash(ps *),Bash(pwd),Bash(sleep *),Bash(sort),Bash(tail *),Bash(tail),Bash(uniq),Bash(wc -l *),Bash(wc),Bash(yq),BashOutput,Edit,Edit(/tmp/gh-aw/cache-memory/*),ExitPlanMode,Glob,Grep,KillBash,LS,MultiEdit,MultiEdit(/tmp/gh-aw/cache-memory/*),NotebookEdit,NotebookRead,Read,Read(/tmp/gh-aw/cache-memory/*),Task,TodoWrite,Write,Write(/tmp/gh-aw/cache-memory/*),mcp__github__download_workflow_run_artifact,mcp__github__get_code_scanning_alert,mcp__github__get_commit,mcp__github__get_dependabot_alert,mcp__github__get_discussion,mcp__github__get_discussion_comments,mcp__github__get_file_contents,mcp__github__get_job_logs,mcp__github__get_label,mcp__github__get_latest_release,mcp__github__get_me,mcp__github__get_notification_details,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_diff,mcp__github__get_pull_request_files,mcp__github__get_pull_request_review_comments,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__get_release_by_tag,mcp__github__get_secret_scanning_alert,mcp__github__get_tag,mcp__github__get_workflow_run,mcp__github__get_workflow_run_logs,mcp__github__get_workflow_run_usage,mcp__github__issue_read,mcp__github__list_branches,mcp__github__list_code_scanning_alerts,mcp__github__list_commits,mcp__github__list_dependabot_alerts,mcp__github__list_discussion_categories,mcp__github__list_discussions,mcp__github__list_issue_types,mcp__github__list_issues,mcp__github__list_label,mcp__github__list_notifications,mcp__github__list_pull_requests,mcp__github__list_releases,mcp__github__list_secret_scanning_alerts,mcp__github__list_starred_repositories,mcp__github__list_tags,mcp__github__list_workflow_jobs,mcp__github__list_workflow_run_artifacts,mcp__github__list_workflow_runs,mcp__github__list_workflows,mcp__github__pull_request_read,mcp__github__search_code,mcp__github__search_issues,mcp__github__search_orgs,mcp__github__search_pull_requests,mcp__github__search_repositories,mcp__github__search_users,mcp__playwright__browser_click,mcp__playwright__browser_close,mcp__playwright__browser_console_messages,mcp__playwright__browser_drag,mcp__playwright__browser_evaluate,mcp__playwright__browser_file_upload,mcp__playwright__browser_fill_form,mcp__playwright__browser_handle_dialog,mcp__playwright__browser_hover,mcp__playwright__browser_install,mcp__playwright__browser_navigate,mcp__playwright__browser_navigate_back,mcp__playwright__browser_network_requests,mcp__playwright__browser_press_key,mcp__playwright__browser_resize,mcp__playwright__browser_select_option,mcp__playwright__browser_snapshot,mcp__playwright__browser_tabs,mcp__playwright__browser_take_screenshot,mcp__playwright__browser_type,mcp__playwright__browser_wait_for,mcp__qmd__get,mcp__qmd__multi_get,mcp__qmd__query,mcp__qmd__status'\'' --debug-file /tmp/gh-aw/agent-stdio.log --verbose --permission-mode bypassPermissions --output-format stream-json "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_CLAUDE:+ --model "$GH_AW_MODEL_AGENT_CLAUDE"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} BASH_DEFAULT_TIMEOUT_MS: 60000 @@ -1092,7 +1130,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} GH_AW_COMMAND: unbloat @@ -1563,7 +1601,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" + GH_AW_ALLOWED_DOMAINS: "*.githubusercontent.com,anthropic.com,api.anthropic.com,api.github.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,cdn.playwright.dev,codeload.github.com,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,ghcr.io,github-cloud.githubusercontent.com,github-cloud.s3.amazonaws.com,github.com,github.githubassets.com,host.docker.internal,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,lfs.github.com,localhost,objects.githubusercontent.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,playwright.download.prss.microsoft.com,ppa.launchpad.net,pypi.org,raw.githubusercontent.com,registry.npmjs.org,s.symcb.com,s.symcd.com,security.ubuntu.com,sentry.io,statsig.anthropic.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com" GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"max\":1},\"create_pull_request\":{\"auto_merge\":true,\"draft\":true,\"expires\":48,\"fallback_as_issue\":false,\"labels\":[\"documentation\",\"automation\"],\"max\":1,\"max_patch_size\":1024,\"protected_files\":[\"package.json\",\"bun.lockb\",\"bunfig.toml\",\"deno.json\",\"deno.jsonc\",\"deno.lock\",\"global.json\",\"NuGet.Config\",\"Directory.Packages.props\",\"mix.exs\",\"mix.lock\",\"go.mod\",\"go.sum\",\"stack.yaml\",\"stack.yaml.lock\",\"pom.xml\",\"build.gradle\",\"build.gradle.kts\",\"settings.gradle\",\"settings.gradle.kts\",\"gradle.properties\",\"package-lock.json\",\"yarn.lock\",\"pnpm-lock.yaml\",\"npm-shrinkwrap.json\",\"requirements.txt\",\"Pipfile\",\"Pipfile.lock\",\"pyproject.toml\",\"setup.py\",\"setup.cfg\",\"Gemfile\",\"Gemfile.lock\",\"uv.lock\",\"CLAUDE.md\"],\"protected_path_prefixes\":[\".github/\",\".agents/\",\".claude/\"],\"reviewers\":[\"copilot\"],\"title_prefix\":\"[docs] \"},\"missing_data\":{},\"missing_tool\":{}}" diff --git a/.github/workflows/unbloat-docs.md b/.github/workflows/unbloat-docs.md index dbd5d29dd9a..e37f08c8761 100644 --- a/.github/workflows/unbloat-docs.md +++ b/.github/workflows/unbloat-docs.md @@ -30,6 +30,7 @@ engine: imports: - shared/reporting.md - shared/docs-server-lifecycle.md + - shared/mcp/qmd.md # Network access for documentation best practices research network: From a712cbad1fb5d24e4589a4560680b2aaf26bf99d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 13:53:43 +0000 Subject: [PATCH 5/9] Rename qmd.md to qmd-docs.md and add .github/agents and .github/aw indexing Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/aw/actions-lock.json | 15 ++ .github/workflows/daily-doc-healer.lock.yml | 14 +- .github/workflows/daily-doc-healer.md | 2 +- .github/workflows/daily-doc-updater.lock.yml | 14 +- .github/workflows/daily-doc-updater.md | 2 +- .../developer-docs-consolidator.lock.yml | 14 +- .../workflows/developer-docs-consolidator.md | 2 +- .github/workflows/dictation-prompt.lock.yml | 14 +- .github/workflows/dictation-prompt.md | 2 +- .../workflows/glossary-maintainer.lock.yml | 14 +- .github/workflows/glossary-maintainer.md | 2 +- .github/workflows/shared/mcp/qmd-docs.md | 183 ++++++++++++++++++ .github/workflows/shared/mcp/qmd.md | 164 +--------------- .../workflows/technical-doc-writer.lock.yml | 14 +- .github/workflows/technical-doc-writer.md | 2 +- .github/workflows/unbloat-docs.lock.yml | 14 +- .github/workflows/unbloat-docs.md | 2 +- pkg/workflow/data/action_pins.json | 15 ++ 18 files changed, 272 insertions(+), 217 deletions(-) create mode 100644 .github/workflows/shared/mcp/qmd-docs.md diff --git a/.github/aw/actions-lock.json b/.github/aw/actions-lock.json index caa7270229b..a98a9f788a1 100644 --- a/.github/aw/actions-lock.json +++ b/.github/aw/actions-lock.json @@ -10,11 +10,21 @@ "version": "v4.1.0", "sha": "a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32" }, + "actions/cache/restore@v4": { + "repo": "actions/cache/restore", + "version": "v4", + "sha": "0057852bfaa89a56745cba8c7296529d2fc39830" + }, "actions/cache/restore@v5.0.3": { "repo": "actions/cache/restore", "version": "v5.0.3", "sha": "cdf6c1fa76f9f475f3d7449005a359c84ca0f306" }, + "actions/cache/save@v4": { + "repo": "actions/cache/save", + "version": "v4", + "sha": "0057852bfaa89a56745cba8c7296529d2fc39830" + }, "actions/cache/save@v5.0.3": { "repo": "actions/cache/save", "version": "v5.0.3", @@ -60,6 +70,11 @@ "version": "v5.2.0", "sha": "be666c2fcd27ec809703dec50e508c2fdc7f6654" }, + "actions/setup-node@v4": { + "repo": "actions/setup-node", + "version": "v4", + "sha": "49933ea5288caeca8642d1e84afbd3f7d6820020" + }, "actions/setup-node@v6.3.0": { "repo": "actions/setup-node", "version": "v6.3.0", diff --git a/.github/workflows/daily-doc-healer.lock.yml b/.github/workflows/daily-doc-healer.lock.yml index 4499b763982..2b5c959eee9 100644 --- a/.github/workflows/daily-doc-healer.lock.yml +++ b/.github/workflows/daily-doc-healer.lock.yml @@ -25,10 +25,10 @@ # # Resolved workflow manifest: # Imports: -# - shared/mcp/qmd.md +# - shared/mcp/qmd-docs.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"0acde325a62fcebed9b6d4a4d431c474e83bdfaa7840af8aee50f3537e1c1fd8","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"4cb50dcba0b4d234d52e190e04b57085be793dcc66f25f58fd33febf16e05e07","strict":true} name: "Daily Documentation Healer" "on": @@ -178,7 +178,7 @@ jobs: {{#runtime-import .github/workflows/shared/reporting.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' - {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + {{#runtime-import .github/workflows/shared/mcp/qmd-docs.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/daily-doc-healer.md}} @@ -305,17 +305,17 @@ jobs: run: npm install -g @tobilu/qmd - id: qmd-cache name: Restore QMD index cache - uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: - key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Save QMD index cache - uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: ${{ steps.qmd-cache.outputs.cache-primary-key }} path: ~/.cache/qmd diff --git a/.github/workflows/daily-doc-healer.md b/.github/workflows/daily-doc-healer.md index 5a7bd14f452..820cd1f69e7 100644 --- a/.github/workflows/daily-doc-healer.md +++ b/.github/workflows/daily-doc-healer.md @@ -50,7 +50,7 @@ timeout-minutes: 45 imports: - shared/reporting.md - - shared/mcp/qmd.md + - shared/mcp/qmd-docs.md --- {{#runtime-import? .github/shared-instructions.md}} diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index 0697b788ac7..956c19eb06f 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -25,9 +25,9 @@ # # Resolved workflow manifest: # Imports: -# - shared/mcp/qmd.md +# - shared/mcp/qmd-docs.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"d863a01b0b91f7b356ae368e7e8a0808040b2776da9c5d67fb3c677d514db288","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"cc2b4da8df8a142066ccc726bd322ea46e2e318ab44b695b52a56520b6c4cffb","strict":true} name: "Daily Documentation Updater" "on": @@ -174,7 +174,7 @@ jobs: GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' - {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + {{#runtime-import .github/workflows/shared/mcp/qmd-docs.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/daily-doc-updater.md}} @@ -301,17 +301,17 @@ jobs: run: npm install -g @tobilu/qmd - id: qmd-cache name: Restore QMD index cache - uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: - key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Save QMD index cache - uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: ${{ steps.qmd-cache.outputs.cache-primary-key }} path: ~/.cache/qmd diff --git a/.github/workflows/daily-doc-updater.md b/.github/workflows/daily-doc-updater.md index 0df28cee9ca..0589afff687 100644 --- a/.github/workflows/daily-doc-updater.md +++ b/.github/workflows/daily-doc-updater.md @@ -47,7 +47,7 @@ tools: timeout-minutes: 45 imports: - - shared/mcp/qmd.md + - shared/mcp/qmd-docs.md --- diff --git a/.github/workflows/developer-docs-consolidator.lock.yml b/.github/workflows/developer-docs-consolidator.lock.yml index c1ca83e6fca..fd35ad829ae 100644 --- a/.github/workflows/developer-docs-consolidator.lock.yml +++ b/.github/workflows/developer-docs-consolidator.lock.yml @@ -25,11 +25,11 @@ # # Resolved workflow manifest: # Imports: -# - shared/mcp/qmd.md +# - shared/mcp/qmd-docs.md # - shared/mcp/serena-go.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"f7f33e4248f9b3b4c02429b9adfcdeff4493687fd2fc532ebe1870f8ac3413dc","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"d8d62e237540dcc2327a41b77e70688c2424c130c99d036c1af422ca7ceed2eb","strict":true} name: "Developer Documentation Consolidator" "on": @@ -183,7 +183,7 @@ jobs: {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' - {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + {{#runtime-import .github/workflows/shared/mcp/qmd-docs.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/developer-docs-consolidator.md}} @@ -324,17 +324,17 @@ jobs: run: npm install -g @tobilu/qmd - id: qmd-cache name: Restore QMD index cache - uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: - key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Save QMD index cache - uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: ${{ steps.qmd-cache.outputs.cache-primary-key }} path: ~/.cache/qmd diff --git a/.github/workflows/developer-docs-consolidator.md b/.github/workflows/developer-docs-consolidator.md index bdf6f9e64f9..ca09807e773 100644 --- a/.github/workflows/developer-docs-consolidator.md +++ b/.github/workflows/developer-docs-consolidator.md @@ -54,7 +54,7 @@ timeout-minutes: 30 imports: - shared/reporting.md - shared/mcp/serena-go.md - - shared/mcp/qmd.md + - shared/mcp/qmd-docs.md --- diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml index 4c395aee9e2..05f264ac8ac 100644 --- a/.github/workflows/dictation-prompt.lock.yml +++ b/.github/workflows/dictation-prompt.lock.yml @@ -25,10 +25,10 @@ # # Resolved workflow manifest: # Imports: -# - shared/mcp/qmd.md +# - shared/mcp/qmd-docs.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"fb771e95c127b4b50723662fbcc03250ca2326abf4099ac7767491694921592e","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"1e450d38df36e1a9ee4313b1228e6d48f4e1fb61d07dd95b9677ab84d297526b","strict":true} name: "Dictation Prompt Generator" "on": @@ -170,7 +170,7 @@ jobs: {{#runtime-import .github/workflows/shared/reporting.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' - {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + {{#runtime-import .github/workflows/shared/mcp/qmd-docs.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/dictation-prompt.md}} @@ -292,17 +292,17 @@ jobs: run: npm install -g @tobilu/qmd - id: qmd-cache name: Restore QMD index cache - uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: - key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Save QMD index cache - uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: ${{ steps.qmd-cache.outputs.cache-primary-key }} path: ~/.cache/qmd diff --git a/.github/workflows/dictation-prompt.md b/.github/workflows/dictation-prompt.md index b21c62de52b..a2f4efef850 100644 --- a/.github/workflows/dictation-prompt.md +++ b/.github/workflows/dictation-prompt.md @@ -17,7 +17,7 @@ network: defaults imports: - shared/reporting.md - - shared/mcp/qmd.md + - shared/mcp/qmd-docs.md tools: edit: diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index 76bfbff1273..063b195c7e5 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -27,10 +27,10 @@ # Imports: # - ../agents/technical-doc-writer.agent.md # - ../skills/documentation/SKILL.md -# - shared/mcp/qmd.md +# - shared/mcp/qmd-docs.md # - shared/mcp/serena-go.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"b514e0686f96669e8f1071dc2024f1797a64b4193dde15d3ff95cda81b2d7676","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"9456df562bed7c2f9476610414e5dd6809543c6d2cac2822445c098ac712954e","strict":true} name: "Glossary Maintainer" "on": @@ -186,7 +186,7 @@ jobs: {{#runtime-import .github/workflows/shared/mcp/serena-go.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' - {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + {{#runtime-import .github/workflows/shared/mcp/qmd-docs.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/glossary-maintainer.md}} @@ -338,17 +338,17 @@ jobs: run: npm install -g @tobilu/qmd - id: qmd-cache name: Restore QMD index cache - uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: - key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Save QMD index cache - uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: ${{ steps.qmd-cache.outputs.cache-primary-key }} path: ~/.cache/qmd diff --git a/.github/workflows/glossary-maintainer.md b/.github/workflows/glossary-maintainer.md index 5500f7981a1..9470a5fd170 100644 --- a/.github/workflows/glossary-maintainer.md +++ b/.github/workflows/glossary-maintainer.md @@ -26,7 +26,7 @@ imports: - ../skills/documentation/SKILL.md - ../agents/technical-doc-writer.agent.md - shared/mcp/serena-go.md - - shared/mcp/qmd.md + - shared/mcp/qmd-docs.md safe-outputs: create-pull-request: diff --git a/.github/workflows/shared/mcp/qmd-docs.md b/.github/workflows/shared/mcp/qmd-docs.md new file mode 100644 index 00000000000..b8e7556d305 --- /dev/null +++ b/.github/workflows/shared/mcp/qmd-docs.md @@ -0,0 +1,183 @@ +--- +# QMD MCP Server +# Local on-device search engine for the project documentation, agents, and workflow instructions +# +# Documentation: https://github.com/tobi/qmd +# +# Available tools (via MCP): +# - query: Search with typed sub-queries (lex/vec/hyde), combined via RRF + reranking +# - get: Retrieve a document by path or docid (with fuzzy matching suggestions) +# - multi_get: Batch retrieve by glob pattern, comma-separated list, or docids +# - status: Index health and collection info +# +# Usage: +# imports: +# - shared/mcp/qmd-docs.md + +mcp-servers: + qmd: + type: http + url: http://localhost:8181/mcp + allowed: + - query + - get + - multi_get + - status + +steps: + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "24" + - name: Install QMD + run: npm install -g @tobilu/qmd + - name: Restore QMD index cache + id: qmd-cache + uses: actions/cache/restore@v4 + with: + path: ~/.cache/qmd + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} + restore-keys: qmd-docs- + - name: Index docs with QMD + if: steps.qmd-cache.outputs.cache-hit != 'true' + run: | + set -e + + DOCS_DIR="${{ github.workspace }}/docs/src/content/docs" + AGENTS_DIR="${{ github.workspace }}/.github/agents" + AW_DIR="${{ github.workspace }}/.github/aw" + + if [ ! -d "$DOCS_DIR" ]; then + echo "Docs directory not found: $DOCS_DIR" + exit 1 + fi + + # Add documentation collection pointing to the docs source + qmd collection add "$DOCS_DIR" --name docs + + # Add context to improve search relevance and results + qmd context add qmd://docs "GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows" + + # Index agent definitions if present + if [ -d "$AGENTS_DIR" ]; then + qmd collection add "$AGENTS_DIR" --name agents + qmd context add qmd://agents "GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours" + fi + + # Index workflow authoring instructions if present + if [ -d "$AW_DIR" ]; then + qmd collection add "$AW_DIR" --name aw + qmd context add qmd://aw "GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations" + fi + - name: Save QMD index cache + if: steps.qmd-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: ~/.cache/qmd + key: ${{ steps.qmd-cache.outputs.cache-primary-key }} + - name: Start QMD MCP server + run: | + set -e + mkdir -p /tmp/gh-aw/mcp-logs/qmd/ + + # Start QMD MCP server in HTTP daemon mode (default port 8181) + qmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1 + + # Poll until the server is healthy (up to 15 seconds) + for i in $(seq 1 30); do + if curl -sf http://localhost:8181/health > /dev/null 2>&1; then + echo "QMD MCP server started successfully" + echo "Status: $(curl -s http://localhost:8181/health)" + exit 0 + fi + sleep 0.5 + done + + echo "QMD MCP server health check timed out after 15 seconds" + echo "Server logs:" + cat /tmp/gh-aw/mcp-logs/qmd/server.log || true + exit 1 +--- + + diff --git a/.github/workflows/shared/mcp/qmd.md b/.github/workflows/shared/mcp/qmd.md index d4d468fe3e8..1de18caf04e 100644 --- a/.github/workflows/shared/mcp/qmd.md +++ b/.github/workflows/shared/mcp/qmd.md @@ -1,164 +1,6 @@ --- -# QMD MCP Server -# Local on-device search engine for the project documentation -# -# Documentation: https://github.com/tobi/qmd -# -# Available tools (via MCP): -# - query: Search with typed sub-queries (lex/vec/hyde), combined via RRF + reranking -# - get: Retrieve a document by path or docid (with fuzzy matching suggestions) -# - multi_get: Batch retrieve by glob pattern, comma-separated list, or docids -# - status: Index health and collection info -# -# Usage: +# Renamed to qmd-docs.md +# Please use: # imports: -# - shared/mcp/qmd.md - -mcp-servers: - qmd: - type: http - url: http://localhost:8181/mcp - allowed: - - query - - get - - multi_get - - status - -steps: - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "24" - - name: Install QMD - run: npm install -g @tobilu/qmd - - name: Restore QMD index cache - id: qmd-cache - uses: actions/cache/restore@v4 - with: - path: ~/.cache/qmd - key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} - restore-keys: qmd-docs- - - name: Index docs with QMD - if: steps.qmd-cache.outputs.cache-hit != 'true' - run: | - set -e - - DOCS_DIR="${{ github.workspace }}/docs/src/content/docs" - - if [ ! -d "$DOCS_DIR" ]; then - echo "Docs directory not found: $DOCS_DIR" - exit 1 - fi - - # Add documentation collection pointing to the docs source - qmd collection add "$DOCS_DIR" --name docs - - # Add context to improve search relevance and results - qmd context add qmd://docs "GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows" - - name: Save QMD index cache - if: steps.qmd-cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - path: ~/.cache/qmd - key: ${{ steps.qmd-cache.outputs.cache-primary-key }} - - name: Start QMD MCP server - run: | - set -e - mkdir -p /tmp/gh-aw/mcp-logs/qmd/ - - # Start QMD MCP server in HTTP daemon mode (default port 8181) - qmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1 - - # Poll until the server is healthy (up to 15 seconds) - for i in $(seq 1 30); do - if curl -sf http://localhost:8181/health > /dev/null 2>&1; then - echo "QMD MCP server started successfully" - echo "Status: $(curl -s http://localhost:8181/health)" - exit 0 - fi - sleep 0.5 - done - - echo "QMD MCP server health check timed out after 15 seconds" - echo "Server logs:" - cat /tmp/gh-aw/mcp-logs/qmd/server.log || true - exit 1 +# - shared/mcp/qmd-docs.md --- - - diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index c0188ac7976..430b7f7779e 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -27,9 +27,9 @@ # Imports: # - ../agents/technical-doc-writer.agent.md # - ../skills/documentation/SKILL.md -# - shared/mcp/qmd.md +# - shared/mcp/qmd-docs.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"9d787f9a30ae048c2d731d080c30e2277de4503553da416afc063922cbaea242","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"211dd6387f80fdaae65f5cf2c141e877cf6d3fa13af8d676bda1c13ed0dc11b2","strict":true} name: "Rebuild the documentation after making changes" "on": @@ -188,7 +188,7 @@ jobs: {{#runtime-import .github/agents/technical-doc-writer.agent.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' - {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + {{#runtime-import .github/workflows/shared/mcp/qmd-docs.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/technical-doc-writer.md}} @@ -342,17 +342,17 @@ jobs: run: npm install -g @tobilu/qmd - id: qmd-cache name: Restore QMD index cache - uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: - key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Save QMD index cache - uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: ${{ steps.qmd-cache.outputs.cache-primary-key }} path: ~/.cache/qmd diff --git a/.github/workflows/technical-doc-writer.md b/.github/workflows/technical-doc-writer.md index 5697d4bfce2..86c47898291 100644 --- a/.github/workflows/technical-doc-writer.md +++ b/.github/workflows/technical-doc-writer.md @@ -26,7 +26,7 @@ network: imports: - ../skills/documentation/SKILL.md - ../agents/technical-doc-writer.agent.md - - shared/mcp/qmd.md + - shared/mcp/qmd-docs.md safe-outputs: add-comment: diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index 6faf2409b22..c3874d01425 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -26,10 +26,10 @@ # Resolved workflow manifest: # Imports: # - shared/docs-server-lifecycle.md -# - shared/mcp/qmd.md +# - shared/mcp/qmd-docs.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"6ed4dd35fb7e3f06f94aef26d4fadfaac8e5b4f7f8372ff2617ecf37c64fc073","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"182d5a704ef03c2652d09e725d4c67b9914b4bc6d4c33a510da8c5b2e2b27960","strict":true} name: "Documentation Unbloat" "on": @@ -222,7 +222,7 @@ jobs: {{#runtime-import .github/workflows/shared/docs-server-lifecycle.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' - {{#runtime-import .github/workflows/shared/mcp/qmd.md}} + {{#runtime-import .github/workflows/shared/mcp/qmd-docs.md}} GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' {{#runtime-import .github/workflows/unbloat-docs.md}} @@ -344,17 +344,17 @@ jobs: run: npm install -g @tobilu/qmd - id: qmd-cache name: Restore QMD index cache - uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: - key: qmd-docs-${{ hashFiles('docs/src/content/docs/**') }} + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n" + run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - if: steps.qmd-cache.outputs.cache-hit != 'true' name: Save QMD index cache - uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v4 + uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: ${{ steps.qmd-cache.outputs.cache-primary-key }} path: ~/.cache/qmd diff --git a/.github/workflows/unbloat-docs.md b/.github/workflows/unbloat-docs.md index e37f08c8761..3f28c1d161a 100644 --- a/.github/workflows/unbloat-docs.md +++ b/.github/workflows/unbloat-docs.md @@ -30,7 +30,7 @@ engine: imports: - shared/reporting.md - shared/docs-server-lifecycle.md - - shared/mcp/qmd.md + - shared/mcp/qmd-docs.md # Network access for documentation best practices research network: diff --git a/pkg/workflow/data/action_pins.json b/pkg/workflow/data/action_pins.json index caa7270229b..a98a9f788a1 100644 --- a/pkg/workflow/data/action_pins.json +++ b/pkg/workflow/data/action_pins.json @@ -10,11 +10,21 @@ "version": "v4.1.0", "sha": "a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32" }, + "actions/cache/restore@v4": { + "repo": "actions/cache/restore", + "version": "v4", + "sha": "0057852bfaa89a56745cba8c7296529d2fc39830" + }, "actions/cache/restore@v5.0.3": { "repo": "actions/cache/restore", "version": "v5.0.3", "sha": "cdf6c1fa76f9f475f3d7449005a359c84ca0f306" }, + "actions/cache/save@v4": { + "repo": "actions/cache/save", + "version": "v4", + "sha": "0057852bfaa89a56745cba8c7296529d2fc39830" + }, "actions/cache/save@v5.0.3": { "repo": "actions/cache/save", "version": "v5.0.3", @@ -60,6 +70,11 @@ "version": "v5.2.0", "sha": "be666c2fcd27ec809703dec50e508c2fdc7f6654" }, + "actions/setup-node@v4": { + "repo": "actions/setup-node", + "version": "v4", + "sha": "49933ea5288caeca8642d1e84afbd3f7d6820020" + }, "actions/setup-node@v6.3.0": { "repo": "actions/setup-node", "version": "v6.3.0", From 019b802e29417c9ad4487aff9cf0efd040cfab9f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:15:58 +0000 Subject: [PATCH 6/9] Move QMD indexing to standalone workflow; remove indexing from qmd-docs.md Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/daily-doc-healer.lock.yml | 14 +--- .github/workflows/daily-doc-updater.lock.yml | 14 +--- .../developer-docs-consolidator.lock.yml | 14 +--- .github/workflows/dictation-prompt.lock.yml | 14 +--- .../workflows/glossary-maintainer.lock.yml | 14 +--- .github/workflows/qmd-docs-indexer.yml | 83 +++++++++++++++++++ .github/workflows/shared/mcp/qmd-docs.md | 49 ++--------- .../workflows/technical-doc-writer.lock.yml | 14 +--- .github/workflows/unbloat-docs.lock.yml | 14 +--- 9 files changed, 105 insertions(+), 125 deletions(-) create mode 100644 .github/workflows/qmd-docs-indexer.yml diff --git a/.github/workflows/daily-doc-healer.lock.yml b/.github/workflows/daily-doc-healer.lock.yml index 2b5c959eee9..298d88fcbd4 100644 --- a/.github/workflows/daily-doc-healer.lock.yml +++ b/.github/workflows/daily-doc-healer.lock.yml @@ -28,7 +28,7 @@ # - shared/mcp/qmd-docs.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"4cb50dcba0b4d234d52e190e04b57085be793dcc66f25f58fd33febf16e05e07","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"3281ba1de9c3a7453fd4e74eb14dcbf06ea83c84ac6709d0dfe024f818dd4a3d","strict":true} name: "Daily Documentation Healer" "on": @@ -303,22 +303,12 @@ jobs: run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Install QMD run: npm install -g @tobilu/qmd - - id: qmd-cache - name: Restore QMD index cache + - name: Restore QMD index cache uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Save QMD index cache - uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 - with: - key: ${{ steps.qmd-cache.outputs.cache-primary-key }} - path: ~/.cache/qmd - name: Start QMD MCP server run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index 956c19eb06f..57af79db159 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -27,7 +27,7 @@ # Imports: # - shared/mcp/qmd-docs.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"cc2b4da8df8a142066ccc726bd322ea46e2e318ab44b695b52a56520b6c4cffb","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"029b4f22798fe4cdef702904b87b929499b2e7faab3fbd4c75fc2d2aa6905d03","strict":true} name: "Daily Documentation Updater" "on": @@ -299,22 +299,12 @@ jobs: run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Install QMD run: npm install -g @tobilu/qmd - - id: qmd-cache - name: Restore QMD index cache + - name: Restore QMD index cache uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Save QMD index cache - uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 - with: - key: ${{ steps.qmd-cache.outputs.cache-primary-key }} - path: ~/.cache/qmd - name: Start QMD MCP server run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" diff --git a/.github/workflows/developer-docs-consolidator.lock.yml b/.github/workflows/developer-docs-consolidator.lock.yml index fd35ad829ae..f41348f05c9 100644 --- a/.github/workflows/developer-docs-consolidator.lock.yml +++ b/.github/workflows/developer-docs-consolidator.lock.yml @@ -29,7 +29,7 @@ # - shared/mcp/serena-go.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"d8d62e237540dcc2327a41b77e70688c2424c130c99d036c1af422ca7ceed2eb","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"04ab9b346523011c327645a8bfdd1d836c37666cd30bb4509fc9a1973c797275","strict":true} name: "Developer Documentation Consolidator" "on": @@ -322,22 +322,12 @@ jobs: run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Install QMD run: npm install -g @tobilu/qmd - - id: qmd-cache - name: Restore QMD index cache + - name: Restore QMD index cache uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Save QMD index cache - uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 - with: - key: ${{ steps.qmd-cache.outputs.cache-primary-key }} - path: ~/.cache/qmd - name: Start QMD MCP server run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml index 05f264ac8ac..1b0ebf4dedc 100644 --- a/.github/workflows/dictation-prompt.lock.yml +++ b/.github/workflows/dictation-prompt.lock.yml @@ -28,7 +28,7 @@ # - shared/mcp/qmd-docs.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"1e450d38df36e1a9ee4313b1228e6d48f4e1fb61d07dd95b9677ab84d297526b","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"06d87876523bb7d9b4f99d72c34ff0965474e7b4ca8f7e657a276596b119b594","strict":true} name: "Dictation Prompt Generator" "on": @@ -290,22 +290,12 @@ jobs: run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Install QMD run: npm install -g @tobilu/qmd - - id: qmd-cache - name: Restore QMD index cache + - name: Restore QMD index cache uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Save QMD index cache - uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 - with: - key: ${{ steps.qmd-cache.outputs.cache-primary-key }} - path: ~/.cache/qmd - name: Start QMD MCP server run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index 063b195c7e5..dda1393b115 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -30,7 +30,7 @@ # - shared/mcp/qmd-docs.md # - shared/mcp/serena-go.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"9456df562bed7c2f9476610414e5dd6809543c6d2cac2822445c098ac712954e","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"474cc67d7db6b1b65413c80bc89f19fabc09cb1b40bf4a639e4826ad1e628578","strict":true} name: "Glossary Maintainer" "on": @@ -336,22 +336,12 @@ jobs: run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Install QMD run: npm install -g @tobilu/qmd - - id: qmd-cache - name: Restore QMD index cache + - name: Restore QMD index cache uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Save QMD index cache - uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 - with: - key: ${{ steps.qmd-cache.outputs.cache-primary-key }} - path: ~/.cache/qmd - name: Start QMD MCP server run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" diff --git a/.github/workflows/qmd-docs-indexer.yml b/.github/workflows/qmd-docs-indexer.yml new file mode 100644 index 00000000000..6ea82329800 --- /dev/null +++ b/.github/workflows/qmd-docs-indexer.yml @@ -0,0 +1,83 @@ +name: QMD Docs Indexer + +# Builds and caches the QMD search index for documentation, agent definitions, +# and workflow authoring instructions. Runs on trusted pushes to main so the +# cached index is always built from verified content. + +on: + push: + branches: [main] + paths: + - "docs/src/content/docs/**" + - ".github/agents/**" + - ".github/aw/**" + schedule: + - cron: "0 3 * * *" # Daily at 03:00 UTC to capture any missed pushes + workflow_dispatch: + +permissions: + contents: read + +jobs: + index: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + + - name: Setup Node.js + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + with: + node-version: "24" + + - name: Install QMD + run: npm install -g @tobilu/qmd + + - name: Restore QMD index cache + id: qmd-cache + uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 + with: + path: ~/.cache/qmd + key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} + restore-keys: qmd-docs- + + - name: Index docs with QMD + if: steps.qmd-cache.outputs.cache-hit != 'true' + run: | + set -e + + DOCS_DIR="${{ github.workspace }}/docs/src/content/docs" + AGENTS_DIR="${{ github.workspace }}/.github/agents" + AW_DIR="${{ github.workspace }}/.github/aw" + + if [ ! -d "$DOCS_DIR" ]; then + echo "Docs directory not found: $DOCS_DIR" + exit 1 + fi + + # Add documentation collection pointing to the docs source + qmd collection add "$DOCS_DIR" --name docs + + # Add context to improve search relevance and results + qmd context add qmd://docs "GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows" + + # Index agent definitions if present + if [ -d "$AGENTS_DIR" ]; then + qmd collection add "$AGENTS_DIR" --name agents + qmd context add qmd://agents "GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours" + fi + + # Index workflow authoring instructions if present + if [ -d "$AW_DIR" ]; then + qmd collection add "$AW_DIR" --name aw + qmd context add qmd://aw "GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations" + fi + + - name: Save QMD index cache + if: steps.qmd-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 + with: + path: ~/.cache/qmd + key: ${{ steps.qmd-cache.outputs.cache-primary-key }} diff --git a/.github/workflows/shared/mcp/qmd-docs.md b/.github/workflows/shared/mcp/qmd-docs.md index b8e7556d305..eaf761b52c5 100644 --- a/.github/workflows/shared/mcp/qmd-docs.md +++ b/.github/workflows/shared/mcp/qmd-docs.md @@ -32,49 +32,11 @@ steps: - name: Install QMD run: npm install -g @tobilu/qmd - name: Restore QMD index cache - id: qmd-cache uses: actions/cache/restore@v4 with: path: ~/.cache/qmd key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} restore-keys: qmd-docs- - - name: Index docs with QMD - if: steps.qmd-cache.outputs.cache-hit != 'true' - run: | - set -e - - DOCS_DIR="${{ github.workspace }}/docs/src/content/docs" - AGENTS_DIR="${{ github.workspace }}/.github/agents" - AW_DIR="${{ github.workspace }}/.github/aw" - - if [ ! -d "$DOCS_DIR" ]; then - echo "Docs directory not found: $DOCS_DIR" - exit 1 - fi - - # Add documentation collection pointing to the docs source - qmd collection add "$DOCS_DIR" --name docs - - # Add context to improve search relevance and results - qmd context add qmd://docs "GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows" - - # Index agent definitions if present - if [ -d "$AGENTS_DIR" ]; then - qmd collection add "$AGENTS_DIR" --name agents - qmd context add qmd://agents "GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours" - fi - - # Index workflow authoring instructions if present - if [ -d "$AW_DIR" ]; then - qmd collection add "$AW_DIR" --name aw - qmd context add qmd://aw "GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations" - fi - - name: Save QMD index cache - if: steps.qmd-cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v4 - with: - path: ~/.cache/qmd - key: ${{ steps.qmd-cache.outputs.cache-primary-key }} - name: Start QMD MCP server run: | set -e @@ -164,11 +126,16 @@ Use the qmd tool to search the project documentation and answer questions. ### How It Works +The QMD index is pre-built by the `qmd-docs-indexer.yml` workflow on every trusted push +to `main` (path-filtered to the indexed directories) and on a daily schedule. This ensures +the index always reflects verified content. + +At runtime (when this shared module is imported): + 1. Node.js 24 is installed 2. QMD is installed globally from npm (`@tobilu/qmd`) -3. The qmd index is restored from `actions/cache` using a key derived from a hash of the docs, agents, and aw content -4. If the cache is missed, the three collections are indexed with context descriptions, and the resulting index is saved to cache -5. The HTTP MCP server starts on `localhost:8181` +3. The pre-built qmd index is restored from `actions/cache` using a key derived from a hash of the docs, agents, and aw content +4. The HTTP MCP server starts on `localhost:8181` The `query` tool supports BM25 full-text search (`lex` type) out of the box. For semantic vector search (`vec`/`hyde` types), run `qmd embed` before starting diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index 430b7f7779e..f2e3527711f 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -29,7 +29,7 @@ # - ../skills/documentation/SKILL.md # - shared/mcp/qmd-docs.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"211dd6387f80fdaae65f5cf2c141e877cf6d3fa13af8d676bda1c13ed0dc11b2","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"ff83f6edccccc4e75b6305b5374e23aba06ee6be27e5dd9fd6cb4cc33839f052","strict":true} name: "Rebuild the documentation after making changes" "on": @@ -340,22 +340,12 @@ jobs: run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Install QMD run: npm install -g @tobilu/qmd - - id: qmd-cache - name: Restore QMD index cache + - name: Restore QMD index cache uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Save QMD index cache - uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 - with: - key: ${{ steps.qmd-cache.outputs.cache-primary-key }} - path: ~/.cache/qmd - name: Start QMD MCP server run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" - name: Install dependencies diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index c3874d01425..49839844624 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -29,7 +29,7 @@ # - shared/mcp/qmd-docs.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"182d5a704ef03c2652d09e725d4c67b9914b4bc6d4c33a510da8c5b2e2b27960","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"f80a0d009fbcd00205e16fe0c698bd48fd56c0dfbf5a0130608b7e7e99b7adc3","strict":true} name: "Documentation Unbloat" "on": @@ -342,22 +342,12 @@ jobs: run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh - name: Install QMD run: npm install -g @tobilu/qmd - - id: qmd-cache - name: Restore QMD index cache + - name: Restore QMD index cache uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} path: ~/.cache/qmd restore-keys: qmd-docs- - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Index docs with QMD - run: "set -e\n\nDOCS_DIR=\"${{ github.workspace }}/docs/src/content/docs\"\nAGENTS_DIR=\"${{ github.workspace }}/.github/agents\"\nAW_DIR=\"${{ github.workspace }}/.github/aw\"\n\nif [ ! -d \"$DOCS_DIR\" ]; then\n echo \"Docs directory not found: $DOCS_DIR\"\n exit 1\nfi\n\n# Add documentation collection pointing to the docs source\nqmd collection add \"$DOCS_DIR\" --name docs\n\n# Add context to improve search relevance and results\nqmd context add qmd://docs \"GitHub Agentic Workflows (gh-aw) documentation - guides, reference, examples, and patterns for building agentic workflows\"\n\n# Index agent definitions if present\nif [ -d \"$AGENTS_DIR\" ]; then\n qmd collection add \"$AGENTS_DIR\" --name agents\n qmd context add qmd://agents \"GitHub Agentic Workflows agent definitions and instructions - custom agent configurations and behaviours\"\nfi\n\n# Index workflow authoring instructions if present\nif [ -d \"$AW_DIR\" ]; then\n qmd collection add \"$AW_DIR\" --name aw\n qmd context add qmd://aw \"GitHub Agentic Workflows authoring instructions and templates - workflow creation guides and shared configurations\"\nfi\n" - - if: steps.qmd-cache.outputs.cache-hit != 'true' - name: Save QMD index cache - uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 - with: - key: ${{ steps.qmd-cache.outputs.cache-primary-key }} - path: ~/.cache/qmd - name: Start QMD MCP server run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" - name: Checkout repository From 8bab06297b5bbc5058c45fc62d5dbf20661d38d3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:27:17 +0000 Subject: [PATCH 7/9] Update actions/checkout to v6.0.2 and actions/setup-node to v6 in qmd-docs-indexer.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/qmd-docs-indexer.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/qmd-docs-indexer.yml b/.github/workflows/qmd-docs-indexer.yml index 6ea82329800..8aacb8c912a 100644 --- a/.github/workflows/qmd-docs-indexer.yml +++ b/.github/workflows/qmd-docs-indexer.yml @@ -23,12 +23,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: Setup Node.js - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6 with: node-version: "24" From 003f14919de82b40ea987c5a91d90bb6868efaf0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:33:56 +0000 Subject: [PATCH 8/9] Mount QMD cache at /tmp/gh-aw/cache/qmd-docs and symlink to ~/.cache/qmd Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/qmd-docs-indexer.yml | 9 +++++++-- .github/workflows/shared/mcp/qmd-docs.md | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/qmd-docs-indexer.yml b/.github/workflows/qmd-docs-indexer.yml index 8aacb8c912a..5a584b5f3dd 100644 --- a/.github/workflows/qmd-docs-indexer.yml +++ b/.github/workflows/qmd-docs-indexer.yml @@ -39,10 +39,15 @@ jobs: id: qmd-cache uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: - path: ~/.cache/qmd + path: /tmp/gh-aw/cache/qmd-docs key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} restore-keys: qmd-docs- + - name: Setup QMD cache directory + run: | + mkdir -p /tmp/gh-aw/cache/qmd-docs ~/.cache + ln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd + - name: Index docs with QMD if: steps.qmd-cache.outputs.cache-hit != 'true' run: | @@ -79,5 +84,5 @@ jobs: if: steps.qmd-cache.outputs.cache-hit != 'true' uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: - path: ~/.cache/qmd + path: /tmp/gh-aw/cache/qmd-docs key: ${{ steps.qmd-cache.outputs.cache-primary-key }} diff --git a/.github/workflows/shared/mcp/qmd-docs.md b/.github/workflows/shared/mcp/qmd-docs.md index eaf761b52c5..46569fd4be4 100644 --- a/.github/workflows/shared/mcp/qmd-docs.md +++ b/.github/workflows/shared/mcp/qmd-docs.md @@ -34,13 +34,14 @@ steps: - name: Restore QMD index cache uses: actions/cache/restore@v4 with: - path: ~/.cache/qmd + path: /tmp/gh-aw/cache/qmd-docs key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} restore-keys: qmd-docs- - name: Start QMD MCP server run: | set -e - mkdir -p /tmp/gh-aw/mcp-logs/qmd/ + mkdir -p /tmp/gh-aw/mcp-logs/qmd/ /tmp/gh-aw/cache/qmd-docs ~/.cache + ln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd # Start QMD MCP server in HTTP daemon mode (default port 8181) qmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1 From 3cce874c4a34218324f24c68ea1d0078a9694dc3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:47:11 +0000 Subject: [PATCH 9/9] Revert cache path change from 003f149 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/daily-doc-healer.lock.yml | 6 +++--- .github/workflows/daily-doc-updater.lock.yml | 6 +++--- .github/workflows/developer-docs-consolidator.lock.yml | 6 +++--- .github/workflows/dictation-prompt.lock.yml | 6 +++--- .github/workflows/glossary-maintainer.lock.yml | 6 +++--- .github/workflows/qmd-docs-indexer.yml | 9 ++------- .github/workflows/shared/mcp/qmd-docs.md | 5 ++--- .github/workflows/technical-doc-writer.lock.yml | 6 +++--- .github/workflows/unbloat-docs.lock.yml | 6 +++--- 9 files changed, 25 insertions(+), 31 deletions(-) diff --git a/.github/workflows/daily-doc-healer.lock.yml b/.github/workflows/daily-doc-healer.lock.yml index 298d88fcbd4..f63abec3bfb 100644 --- a/.github/workflows/daily-doc-healer.lock.yml +++ b/.github/workflows/daily-doc-healer.lock.yml @@ -28,7 +28,7 @@ # - shared/mcp/qmd-docs.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"3281ba1de9c3a7453fd4e74eb14dcbf06ea83c84ac6709d0dfe024f818dd4a3d","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"e4f96b1dbfc72616f65e3b3e6640e1d4b9ca66d10d1bdf130ed7c6f832ae1a60","strict":true} name: "Daily Documentation Healer" "on": @@ -307,10 +307,10 @@ jobs: uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} - path: ~/.cache/qmd + path: /tmp/gh-aw/cache/qmd-docs restore-keys: qmd-docs- - name: Start QMD MCP server - run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/ /tmp/gh-aw/cache/qmd-docs ~/.cache\nln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" # Cache memory file share configuration from frontmatter processed below - name: Create cache-memory directory diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index 57af79db159..0c28503835f 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -27,7 +27,7 @@ # Imports: # - shared/mcp/qmd-docs.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"029b4f22798fe4cdef702904b87b929499b2e7faab3fbd4c75fc2d2aa6905d03","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"fe8a240ea8336e8b642577dc172dd573a6c425784419632463308d357be0b753","strict":true} name: "Daily Documentation Updater" "on": @@ -303,10 +303,10 @@ jobs: uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} - path: ~/.cache/qmd + path: /tmp/gh-aw/cache/qmd-docs restore-keys: qmd-docs- - name: Start QMD MCP server - run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/ /tmp/gh-aw/cache/qmd-docs ~/.cache\nln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" # Cache memory file share configuration from frontmatter processed below - name: Create cache-memory directory diff --git a/.github/workflows/developer-docs-consolidator.lock.yml b/.github/workflows/developer-docs-consolidator.lock.yml index f41348f05c9..1ccdc09c0b8 100644 --- a/.github/workflows/developer-docs-consolidator.lock.yml +++ b/.github/workflows/developer-docs-consolidator.lock.yml @@ -29,7 +29,7 @@ # - shared/mcp/serena-go.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"04ab9b346523011c327645a8bfdd1d836c37666cd30bb4509fc9a1973c797275","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"20c36f8e327a140ac929db97c45391e69994645cb56a02951bbaf6c4575b8f81","strict":true} name: "Developer Documentation Consolidator" "on": @@ -326,10 +326,10 @@ jobs: uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} - path: ~/.cache/qmd + path: /tmp/gh-aw/cache/qmd-docs restore-keys: qmd-docs- - name: Start QMD MCP server - run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/ /tmp/gh-aw/cache/qmd-docs ~/.cache\nln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" # Cache memory file share configuration from frontmatter processed below - name: Create cache-memory directory diff --git a/.github/workflows/dictation-prompt.lock.yml b/.github/workflows/dictation-prompt.lock.yml index 1b0ebf4dedc..161f11729ae 100644 --- a/.github/workflows/dictation-prompt.lock.yml +++ b/.github/workflows/dictation-prompt.lock.yml @@ -28,7 +28,7 @@ # - shared/mcp/qmd-docs.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"06d87876523bb7d9b4f99d72c34ff0965474e7b4ca8f7e657a276596b119b594","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"95efc73940ca0c7c170dca71f137ad47e80873445b33c95090f52d713b79f591","strict":true} name: "Dictation Prompt Generator" "on": @@ -294,10 +294,10 @@ jobs: uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} - path: ~/.cache/qmd + path: /tmp/gh-aw/cache/qmd-docs restore-keys: qmd-docs- - name: Start QMD MCP server - run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/ /tmp/gh-aw/cache/qmd-docs ~/.cache\nln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" - name: Configure Git credentials env: diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index dda1393b115..7f8b642ec52 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -30,7 +30,7 @@ # - shared/mcp/qmd-docs.md # - shared/mcp/serena-go.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"474cc67d7db6b1b65413c80bc89f19fabc09cb1b40bf4a639e4826ad1e628578","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"c93b02ab9448ae744c33ffd66ce6435fcdd3a8efce53ec6da833283aabed58a9","strict":true} name: "Glossary Maintainer" "on": @@ -340,10 +340,10 @@ jobs: uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} - path: ~/.cache/qmd + path: /tmp/gh-aw/cache/qmd-docs restore-keys: qmd-docs- - name: Start QMD MCP server - run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/ /tmp/gh-aw/cache/qmd-docs ~/.cache\nln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" # Cache memory file share configuration from frontmatter processed below - name: Create cache-memory directory diff --git a/.github/workflows/qmd-docs-indexer.yml b/.github/workflows/qmd-docs-indexer.yml index 5a584b5f3dd..8aacb8c912a 100644 --- a/.github/workflows/qmd-docs-indexer.yml +++ b/.github/workflows/qmd-docs-indexer.yml @@ -39,15 +39,10 @@ jobs: id: qmd-cache uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: - path: /tmp/gh-aw/cache/qmd-docs + path: ~/.cache/qmd key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} restore-keys: qmd-docs- - - name: Setup QMD cache directory - run: | - mkdir -p /tmp/gh-aw/cache/qmd-docs ~/.cache - ln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd - - name: Index docs with QMD if: steps.qmd-cache.outputs.cache-hit != 'true' run: | @@ -84,5 +79,5 @@ jobs: if: steps.qmd-cache.outputs.cache-hit != 'true' uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: - path: /tmp/gh-aw/cache/qmd-docs + path: ~/.cache/qmd key: ${{ steps.qmd-cache.outputs.cache-primary-key }} diff --git a/.github/workflows/shared/mcp/qmd-docs.md b/.github/workflows/shared/mcp/qmd-docs.md index 46569fd4be4..eaf761b52c5 100644 --- a/.github/workflows/shared/mcp/qmd-docs.md +++ b/.github/workflows/shared/mcp/qmd-docs.md @@ -34,14 +34,13 @@ steps: - name: Restore QMD index cache uses: actions/cache/restore@v4 with: - path: /tmp/gh-aw/cache/qmd-docs + path: ~/.cache/qmd key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} restore-keys: qmd-docs- - name: Start QMD MCP server run: | set -e - mkdir -p /tmp/gh-aw/mcp-logs/qmd/ /tmp/gh-aw/cache/qmd-docs ~/.cache - ln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd + mkdir -p /tmp/gh-aw/mcp-logs/qmd/ # Start QMD MCP server in HTTP daemon mode (default port 8181) qmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1 diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index f2e3527711f..34f6d485dc9 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -29,7 +29,7 @@ # - ../skills/documentation/SKILL.md # - shared/mcp/qmd-docs.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"ff83f6edccccc4e75b6305b5374e23aba06ee6be27e5dd9fd6cb4cc33839f052","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"6bfbae28e605cee1bda90beea0fc1a949f9bf24de09611ad3e2d8c4446f15f02","strict":true} name: "Rebuild the documentation after making changes" "on": @@ -344,10 +344,10 @@ jobs: uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} - path: ~/.cache/qmd + path: /tmp/gh-aw/cache/qmd-docs restore-keys: qmd-docs- - name: Start QMD MCP server - run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/ /tmp/gh-aw/cache/qmd-docs ~/.cache\nln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" - name: Install dependencies run: npm ci working-directory: ./docs diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index 49839844624..5099bde6d81 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -29,7 +29,7 @@ # - shared/mcp/qmd-docs.md # - shared/reporting.md # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"f80a0d009fbcd00205e16fe0c698bd48fd56c0dfbf5a0130608b7e7e99b7adc3","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"ca1d2986551f0d2769f4034506bee7a81b462d860dc36fa864b9b849a813cfdb","strict":true} name: "Documentation Unbloat" "on": @@ -346,10 +346,10 @@ jobs: uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 with: key: qmd-docs-${{ hashFiles('docs/src/content/docs/**', '.github/agents/**', '.github/aw/**') }} - path: ~/.cache/qmd + path: /tmp/gh-aw/cache/qmd-docs restore-keys: qmd-docs- - name: Start QMD MCP server - run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" + run: "set -e\nmkdir -p /tmp/gh-aw/mcp-logs/qmd/ /tmp/gh-aw/cache/qmd-docs ~/.cache\nln -sfn /tmp/gh-aw/cache/qmd-docs ~/.cache/qmd\n\n# Start QMD MCP server in HTTP daemon mode (default port 8181)\nqmd mcp --http --daemon > /tmp/gh-aw/mcp-logs/qmd/server.log 2>&1\n\n# Poll until the server is healthy (up to 15 seconds)\nfor i in $(seq 1 30); do\n if curl -sf http://localhost:8181/health > /dev/null 2>&1; then\n echo \"QMD MCP server started successfully\"\n echo \"Status: $(curl -s http://localhost:8181/health)\"\n exit 0\n fi\n sleep 0.5\ndone\n\necho \"QMD MCP server health check timed out after 15 seconds\"\necho \"Server logs:\"\ncat /tmp/gh-aw/mcp-logs/qmd/server.log || true\nexit 1" - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: