qmd: replace paths array with pattern string and add ignore for excluded patterns#22683
qmd: replace paths array with pattern string and add ignore for excluded patterns#22683
paths array with pattern string and add ignore for excluded patterns#22683Conversation
|
@copilot Support excluded patterns |
…DK data structure Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/3ed96cb2-0a3e-4dc3-aa91-86d0473d5aa2
paths array with pattern string to match SDK data structure
| - docs/src/content/docs/** | ||
| - .github/agents/** | ||
| - .github/aw/** | ||
| pattern: "**" |
There was a problem hiding this comment.
Updated to "docs/**/*.md" in 1f3b240.
.github/workflows/dev.md
Outdated
| paths: | ||
| - docs/src/**/*.md | ||
| - docs/src/**/*.mdx | ||
| pattern: "docs/src/**" |
There was a problem hiding this comment.
Updated to "docs/src/**/*.md" in 1f3b240.
.github/workflows/shared/mcp/qmd.md
Outdated
| - docs/src/content/docs/** | ||
| - .github/agents/** | ||
| - .github/aw/** | ||
| pattern: "**" |
There was a problem hiding this comment.
Updated to "docs/**/*.md" in 1f3b240.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/aecdf8d7-9490-426e-af13-6d5ab599d66c
Added checkouts:
- name: docs
pattern: "**/*.md"
ignore:
- "**/node_modules/**"
- "**/*.test.md"The field flows through the Go types → JSON config → Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
paths array with pattern string to match SDK data structurepaths array with pattern string and add ignore for excluded patterns
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b68ff563-5793-43b5-b49c-509730a9a16e
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Updates the qmd tool configuration model to match @tobilu/qmd’s expected inputs by replacing multi-pattern paths/patterns arrays with a single pattern string per collection and adding optional ignore globs.
Changes:
- Go:
QmdDocCollection.Paths []string→Pattern string+Ignore []string, with parser + compiler config generation updated accordingly. - JS runtime: qmd indexing script and tests updated to consume
pattern/ignoreand display ignore globs in the step summary. - Schema/docs/workflows: schema and examples migrated from
pathstopattern+ optionalignore, and existing workflows regenerated.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/tools_types.go | Replaces paths with pattern and introduces ignore on qmd collections. |
| pkg/workflow/tools_parser.go | Parses pattern/ignore keys into the updated Go types. |
| pkg/workflow/qmd.go | Updates JSON config emitted to the JS indexer to use pattern/ignore. |
| pkg/parser/schemas/main_workflow_schema.json | Migrates schema from paths array to pattern string + ignore array, updates examples. |
| docs/src/content/docs/reference/tools.md | Updates qmd quick example to use pattern. |
| docs/src/content/docs/reference/qmd.md | Updates qmd reference examples/field table; documents ignore. |
| docs/src/content/docs/reference/frontmatter-full.md | Regenerated frontmatter reference output reflecting updated schema/examples. |
| actions/setup/js/qmd_index.test.cjs | Updates tests for new config shape and summary table columns; adds ignore-summary coverage. |
| actions/setup/js/qmd_index.cjs | Switches checkout handling from patterns[] to pattern + optional ignore; updates summary output. |
| .github/workflows/weekly-blog-post-writer.lock.yml | Regenerated lock workflow with new QMD_CONFIG_JSON shape. |
| .github/workflows/unbloat-docs.lock.yml | Regenerated lock workflow with new QMD_CONFIG_JSON shape. |
| .github/workflows/technical-doc-writer.lock.yml | Regenerated lock workflow with new QMD_CONFIG_JSON shape. |
| .github/workflows/smoke-codex.md | Migrates qmd config to pattern. |
| .github/workflows/smoke-codex.lock.yml | Regenerated lock workflow with new QMD_CONFIG_JSON shape. |
| .github/workflows/shared/mcp/qmd.md | Migrates shared qmd MCP config to pattern. |
| .github/workflows/shared/mcp/qmd-docs.md | Migrates shared qmd-docs MCP config to pattern. |
| .github/workflows/glossary-maintainer.lock.yml | Regenerated lock workflow with new QMD_CONFIG_JSON shape. |
| .github/workflows/dictation-prompt.lock.yml | Regenerated lock workflow with new QMD_CONFIG_JSON shape. |
| .github/workflows/developer-docs-consolidator.lock.yml | Regenerated lock workflow with new QMD_CONFIG_JSON shape. |
| .github/workflows/dev.md | Migrates qmd config to pattern. |
| .github/workflows/dev.lock.yml | Regenerated lock workflow with new QMD_CONFIG_JSON shape. |
| .github/workflows/daily-doc-updater.lock.yml | Regenerated lock workflow with new QMD_CONFIG_JSON shape. |
| .github/workflows/daily-doc-healer.lock.yml | Regenerated lock workflow with new QMD_CONFIG_JSON shape. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/shared/mcp/qmd.md
Outdated
| - name: gh-aw | ||
| paths: | ||
| - docs/src/content/docs/** | ||
| - .github/agents/** | ||
| - .github/aw/** | ||
| pattern: "docs/**/*.md" | ||
| context: "gh-aw project documentation, agent definitions, and workflow authoring instructions" |
There was a problem hiding this comment.
Same issue as qmd-docs.md: pattern: "docs/**/*.md" does not match the repository’s .mdx documentation pages (e.g. docs/src/content/docs/**/*.mdx) and won’t include agent/workflow instruction files under .github/**, despite the context string claiming it does. Update the pattern(s) (or split into multiple collections) so the indexed paths actually match the described content.
See below for a potential fix:
- name: gh-aw-docs
pattern: "docs/src/content/docs/**/*.mdx"
context: "gh-aw project documentation"
- name: gh-aw-workflows
pattern: ".github/**/*.md"
context: "gh-aw agent definitions and workflow authoring instructions"
| env: | ||
| QMD_CONFIG_JSON: | | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","patterns":["docs/src/content/docs/**",".github/agents/**",".github/aw/**"],"context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} |
There was a problem hiding this comment.
This workflow’s lock file now configures qmd with pattern: "docs/**/*.md", which likely omits the primary .mdx docs and the .github/** instruction sources. Adjust the qmd checkout patterns (or split into separate collections) and regenerate the lock workflow so the indexed content matches the workflow’s intent.
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | |
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"},{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.mdx","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"},{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":".github/**","context":"gh-aw GitHub workflows, actions, and agent instruction sources"}]} |
| env: | ||
| QMD_CONFIG_JSON: | | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","patterns":["docs/src/content/docs/**",".github/agents/**",".github/aw/**"],"context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} |
There was a problem hiding this comment.
The lock workflow’s qmd checkout pattern docs/**/*.md won’t include .mdx pages under docs/src/content/docs/** and drops .github/** content that used to be indexed. This may cause qmd searches to return few/no relevant results. Update the checkout(s) to cover the intended doc/instruction sources and recompile.
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | |
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"},{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/src/content/docs/**/*.mdx","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"},{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":".github/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} |
| env: | ||
| QMD_CONFIG_JSON: | | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","patterns":["docs/src/content/docs/**",".github/agents/**",".github/aw/**"],"context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} |
There was a problem hiding this comment.
This lock workflow now indexes only docs/**/*.md for qmd, which is likely incomplete for this repo (docs are largely .mdx under docs/src/content/docs/**, and .github/** instruction files are excluded). Update the qmd checkout patterns / collections and regenerate the lock file.
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | |
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.{md,mdx}","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"},{"name":"gh-aw-github","path":"${GITHUB_WORKSPACE}","pattern":".github/**/*.md","context":"gh-aw GitHub workflows, configs, and instruction files"}]} |
.github/workflows/dev.lock.yml
Outdated
| env: | ||
| QMD_CONFIG_JSON: | | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"docs","path":"${GITHUB_WORKSPACE}","patterns":["docs/src/**/*.md","docs/src/**/*.mdx"],"context":"gh-aw project documentation"}],"searches":[{"name":"issues","type":"issues","max":500,"tokenEnvVar":"QMD_SEARCH_TOKEN_0"}]} | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"docs","path":"${GITHUB_WORKSPACE}","pattern":"docs/src/**/*.md","context":"gh-aw project documentation"}],"searches":[{"name":"issues","type":"issues","max":500,"tokenEnvVar":"QMD_SEARCH_TOKEN_0"}]} |
There was a problem hiding this comment.
The qmd checkout pattern docs/src/**/*.md in this lock workflow will miss .mdx docs under docs/src/content/docs/**, likely resulting in an incomplete docs index. Update the pattern to include .mdx (or target the docs content directory) and recompile so the lock file matches the updated source workflow.
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"docs","path":"${GITHUB_WORKSPACE}","pattern":"docs/src/**/*.md","context":"gh-aw project documentation"}],"searches":[{"name":"issues","type":"issues","max":500,"tokenEnvVar":"QMD_SEARCH_TOKEN_0"}]} | |
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"docs","path":"${GITHUB_WORKSPACE}","pattern":"docs/src/**/*.{md,mdx}","context":"gh-aw project documentation"}],"searches":[{"name":"issues","type":"issues","max":500,"tokenEnvVar":"QMD_SEARCH_TOKEN_0"}]} |
| context: "Project documentation" | ||
| - name: sdk-docs | ||
| paths: [README.md, docs/**/*.md] | ||
| pattern: "docs/**/*.md" |
There was a problem hiding this comment.
In the multi-checkout example, sdk-docs previously included README.md as well as docs globs, but now the example only indexes docs/**/*.md. If the intent is to show how to include both root README and docs, update the example to use a pattern that includes both (or demonstrate multiple collections).
| pattern: "docs/**/*.md" | |
| pattern: "{README.md,docs/**/*.md}" |
| - docs/src/content/docs/** | ||
| - .github/agents/** | ||
| - .github/aw/** | ||
| pattern: "docs/**/*.md" |
There was a problem hiding this comment.
The qmd collection is described as indexing “project documentation, agent definitions, and workflow authoring instructions”, but the new pattern only matches docs/**/*.md (excluding .mdx content under docs/src/content/docs/** and excluding .github/agents/** / .github/aw/**). This will likely produce an incomplete/empty index. Consider splitting this into multiple qmd collections (one per directory) and/or using a pattern that includes docs/src/content/docs/** and .mdx files, with ignore to exclude unwanted paths.
| pattern: "docs/**/*.md" | |
| pattern: "**/*.{md,mdx}" | |
| ignore: | |
| - ".git/**" | |
| - "node_modules/**" |
| env: | ||
| QMD_CONFIG_JSON: | | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","patterns":["docs/src/content/docs/**",".github/agents/**",".github/aw/**"],"context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} |
There was a problem hiding this comment.
This lock workflow’s QMD_CONFIG_JSON now uses pattern: "docs/**/*.md", which will not include .mdx docs (under docs/src/content/docs/**) and won’t include .github/agents/** / .github/aw/** referenced by the context string. Update the qmd checkout(s) to cover the intended sources and regenerate the lock file.
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | |
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw-docs","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.{md,mdx}","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"},{"name":"gh-aw-agents","path":"${GITHUB_WORKSPACE}","pattern":".github/agents/**","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"},{"name":"gh-aw-aw","path":"${GITHUB_WORKSPACE}","pattern":".github/aw/**","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} |
| env: | ||
| QMD_CONFIG_JSON: | | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","patterns":["docs/src/content/docs/**",".github/agents/**",".github/aw/**"],"context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} |
There was a problem hiding this comment.
The QMD_CONFIG_JSON in this lock file switched to pattern: "docs/**/*.md", which excludes .mdx documentation and .github/** instruction sources that were previously indexed. This likely makes qmd search much less useful for this workflow. Update patterns / split into multiple collections and recompile the workflow to update this lock file.
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | |
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"**/*.{md,mdx}","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} |
| env: | ||
| QMD_CONFIG_JSON: | | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","patterns":["docs/src/content/docs/**",".github/agents/**",".github/aw/**"],"context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | ||
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} |
There was a problem hiding this comment.
The updated qmd checkout pattern docs/**/*.md in this lock workflow will not match .mdx docs and will exclude .github/** instruction files that the context suggests should be searchable. Update the checkout config to include the intended sources (possibly as multiple collections) and recompile to refresh this lock file.
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"}]} | |
| {"dbPath":"/tmp/gh-aw/qmd-index","checkouts":[{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.md","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"},{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":"docs/**/*.mdx","context":"gh-aw project documentation, agent definitions, and workflow authoring instructions"},{"name":"gh-aw","path":"${GITHUB_WORKSPACE}","pattern":".github/**","context":"gh-aw GitHub configuration, workflows, and instruction files"}]} |
|
@copilot Apply comments |
…it collections, narrow smoke-codex Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/0216bcb9-1bdc-48b3-8924-6c859bb685bc
Applied in
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
The
QmdDocCollectionexposed apaths: string[]field that was joined into a comma-separated string before being passed to the@tobilu/qmdSDK — which doesn't support comma-separated patterns. The SDK natively expects a singlepattern: stringper collection and an optionalignore: string[]for excluded patterns.Changes
tools_types.go,tools_parser.go):Paths []string→Pattern stringand newIgnore []stringonQmdDocCollection; parser readspatternandignorekeysqmd.go):qmdCheckoutEntry.Patterns []string→Pattern string+Ignore []string;buildQmdConfigpasses both directlyqmd_index.cjs): typedef updated topattern?: string, ignore?: string[]; usescheckout.patternandcheckout.ignoredirectly; summary table shows ignore patternsmain_workflow_schema.json):qmdCollection.paths(array) →pattern(string) +ignore(array); examples updatedshared/mcp/qmd-docs.md,qmd.md,smoke-codex.md,dev.md): migrated frompaths: [...]topattern: "..."qmd.md,tools.md,frontmatter-full.mdregeneratedBefore / After
No backward compatibility — existing workflows using
pathsmust be updated.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.