Repository navigation
Add docs-frontmatter-sweep agentic workflow - #123
Merged
Merged
Conversation
7 tasks
New scheduled / on-demand sweep that audits frontmatter quality across a docs corpus on a rotating slice each run. Combines two existing skills (`docs-frontmatter-audit` for required-field validation and `docs-frontmatter-description` for SEO-quality descriptions) and emits a single labeled fix-issue with structured YAML findings consumable by a future fix-agent. Establishes the sweep pattern shared by the rest of this family: - Deterministic rotating slice via `hash(path) mod N == iso_week mod N`, with `N` auto-derived from corpus size. - Pages modified in the last 7 days included regardless of rotation. - Slice files copied to `/tmp/gh-aw/sweep-data/scope/` so skills can operate without affecting the repo. - Fix-issues filed cross-repo to `elastic/docs-content-internal` (via `safe-outputs.create-issue.target-repo`) to keep AI triage findings out of public docs repos. Consumers must configure `DOCS_FIX_ISSUES_TOKEN` with `issues:write` on the internal repo. - `close-older-issues: true` keeps the tracker clean across runs. Part of phase 3 of elastic/docs-content-internal#949. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
theletterf
force-pushed
the
docs-frontmatter-sweep
branch
from
May 5, 2026 08:13
bc64d2e to
96aa8bc
Compare
8 tasks
2 of 4 tasks
theletterf
added a commit
that referenced
this pull request
May 5, 2026
Every APM-importing reusable workflow in this repo currently caches its
skill bundle under the constant key `apm-copilot-` when called from
elastic/docs-content. The cache key formula
`apm-${engine}-${hashFiles('.github/workflows/*.lock.yml')}` is evaluated
in the caller's workspace, which has no lock files — so the hash segment
is empty for every workflow.
While only docs-review used APM this was benign. Once the sweeps landed
(#123-#125), every additional workflow with a different `packages:` list
started overwriting the same cache slot. The next workflow to run hit
the previous one's bundle and got `Skill not found` for the skills it
actually imports — with the agent ultimately falling back to manual
analysis ("All skills are unavailable. I'll review the changes using my
own judgment now.").
Workaround: align every APM-importing workflow's `packages:` to the
union of all skills used across the repo, so all five workflows pack
the same bundle and cache collisions are no-ops. Adds a small per-run
download cost (each workflow pulls all seven skills, uses one or two)
but restores correctness.
Filed upstream as github/gh-aw#30365 — when fixed there, we can revert
each workflow's `packages:` back to its minimum set.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
theletterf
added a commit
that referenced
this pull request
May 5, 2026
Every APM-importing reusable workflow in this repo currently caches its
skill bundle under the constant key `apm-copilot-` when called from
elastic/docs-content. The cache key formula
`apm-${engine}-${hashFiles('.github/workflows/*.lock.yml')}` is evaluated
in the caller's workspace, which has no lock files — so the hash segment
is empty for every workflow.
While only docs-review used APM this was benign. Once the sweeps landed
(#123-#125), every additional workflow with a different `packages:` list
started overwriting the same cache slot. The next workflow to run hit
the previous one's bundle and got `Skill not found` for the skills it
actually imports — with the agent ultimately falling back to manual
analysis ("All skills are unavailable. I'll review the changes using my
own judgment now.").
Workaround: align every APM-importing workflow's `packages:` to the
union of all skills used across the repo, so all five workflows pack
the same bundle and cache collisions are no-ops. Adds a small per-run
download cost (each workflow pulls all seven skills, uses one or two)
but restores correctness.
Filed upstream as github/gh-aw#30365 — when fixed there, we can revert
each workflow's `packages:` back to its minimum set.
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
theletterf
added a commit
that referenced
this pull request
May 5, 2026
* Pack identical APM skill bundle across all reusable workflows
Every APM-importing reusable workflow in this repo currently caches its
skill bundle under the constant key `apm-copilot-` when called from
elastic/docs-content. The cache key formula
`apm-${engine}-${hashFiles('.github/workflows/*.lock.yml')}` is evaluated
in the caller's workspace, which has no lock files — so the hash segment
is empty for every workflow.
While only docs-review used APM this was benign. Once the sweeps landed
(#123-#125), every additional workflow with a different `packages:` list
started overwriting the same cache slot. The next workflow to run hit
the previous one's bundle and got `Skill not found` for the skills it
actually imports — with the agent ultimately falling back to manual
analysis ("All skills are unavailable. I'll review the changes using my
own judgment now.").
Workaround: align every APM-importing workflow's `packages:` to the
union of all skills used across the repo, so all five workflows pack
the same bundle and cache collisions are no-ops. Adds a small per-run
download cost (each workflow pulls all seven skills, uses one or two)
but restores correctness.
Filed upstream as github/gh-aw#30365 — when fixed there, we can revert
each workflow's `packages:` back to its minimum set.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* Make docs agent workflows autonomous
Embed the docs review and sweep rules directly in the agent prompts so the workflows no longer depend on runtime Elastic Docs Skills, while keeping Elastic docs MCP as the bounded source for published-doc verification.
Co-authored-by: OpenAI GPT-5.5 <[email protected]>
Co-authored-by: Cursor <[email protected]>
* Run Vale before docs review
Add deterministic Vale output to the docs-review workflow so style findings are grounded in elastic/vale-rules instead of runtime skills or model-only judgment.
Co-authored-by: OpenAI GPT-5.5 <[email protected]>
Co-authored-by: Cursor <[email protected]>
* Carry over docs skill review guidance
Embed the high-value style, jargon, frontmatter, content-type, applies_to, and page-opening guidance from Elastic Docs Skills into the autonomous workflow prompts while keeping Vale and MCP as evidence sources.
Co-authored-by: OpenAI GPT-5.5 <[email protected]>
Co-authored-by: Cursor <[email protected]>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Co-authored-by: OpenAI GPT-5.5 <[email protected]>
Co-authored-by: Cursor <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs-frontmatter-audit(required-field validation) anddocs-frontmatter-description(SEO-quality descriptions).docs-fix:frontmatter) with structured YAML findings consumable by a future fix-agent.This is the foundational PR of three. The next stacked PR adds applies-to / openings / style / typos sweeps + the
docs-quality-sweeporchestrator; the third stacked PR adds staleness and coherence sweeps.Implements phase 3 of elastic/docs-content-internal#949.
Where this is meant to run
elastic/docs-content-internal(or whichever repo you want fix-issues to land in).source-repoinput — defaults toelastic/docs-contentin the trigger template.GITHUB_TOKEN. No cross-repo PAT, no extra secret.COPILOT_GITHUB_TOKEN, which already exists indocs-content-internalfor the existing docs-issue-scope / docs-triage installs.Test plan
make compilepasses with 0 errors / 0 warnings.make lintpasses (no new files trigger pre-commit hooks).workflow_dispatchrun from a sandboxinternalrepo against a small public repo viasource-repo=...— confirm the rotating slice + recently-changed selection works.yqsmoke test) andfile/line/evidenceare accurate for 2-3 sampled findings.source-repo).close-older-issues: truecloses the prior fix-issue on a second run.🤖 Generated with Claude Code