Repository navigation
Add staleness and coherence sweeps - #125
Merged
theletterf merged 1 commit intoMay 5, 2026
Merged
Conversation
theletterf
force-pushed
the
docs-content-quality-sweeps
branch
from
May 5, 2026 08:16
1b19641 to
3bf2b7d
Compare
Two more sweeps in the docs-quality-sweep family. Both are heavier than the existing five and benefit from isolated review. `gh-aw-docs-staleness-sweep`: - Stale content (page's latest commit older than `stale-content-months`, default 24). - Stale screenshots (image's last commit predates the doc by at least `stale-screenshot-min-gap-months`, default 6). - Broken external links via `lychee` in a pre-step. Internal Elastic domains are excluded by default. - Mentions of EOL product versions, identified via the elastic-docs MCP server (`search_docs` + `get_document_by_url` against the support matrix). Release-notes and upgrade pages are exempted. `gh-aw-docs-coherence-sweep`: - Detects duplicate / near-duplicate / contradictory content vs. published Elastic docs. Each in-scope page → focused query → `find_related_docs` (capped at `max-related-per-page`, default 3) → `get_document_by_url` for the comparison set. - Smaller default `target-batch-size` (50) because each page produces multiple MCP fetches and LLM comparisons. - The agent calls `noop` if the MCP server is unreachable for more than half the run, rather than emit unreliable findings. Both file fix-issues in `elastic/docs-content-internal` (via `DOCS_FIX_ISSUES_TOKEN`) under labels `docs-fix:staleness` and `docs-fix:coherence`. The `docs-quality-sweep` orchestrator picks up two new jobs and two new inputs (`staleness-content-months`, `coherence-batch-size`). Stacked on docs-content-quality-sweeps. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
theletterf
force-pushed
the
docs-staleness-coherence-sweeps
branch
from
May 5, 2026 08:18
7ed4b6f to
546c6f0
Compare
theletterf
added a commit
that referenced
this pull request
May 5, 2026
Two more sweeps in the docs-quality-sweep family. Both are heavier than the existing five and benefit from isolated review. `gh-aw-docs-staleness-sweep`: - Stale content (page's latest commit older than `stale-content-months`, default 24). - Stale screenshots (image's last commit predates the doc by at least `stale-screenshot-min-gap-months`, default 6). - Broken external links via `lychee` in a pre-step. Internal Elastic domains are excluded by default. - Mentions of EOL product versions, identified via the elastic-docs MCP server (`search_docs` + `get_document_by_url` against the support matrix). Release-notes and upgrade pages are exempted. `gh-aw-docs-coherence-sweep`: - Detects duplicate / near-duplicate / contradictory content vs. published Elastic docs. Each in-scope page → focused query → `find_related_docs` (capped at `max-related-per-page`, default 3) → `get_document_by_url` for the comparison set. - Smaller default `target-batch-size` (50) because each page produces multiple MCP fetches and LLM comparisons. - The agent calls `noop` if the MCP server is unreachable for more than half the run, rather than emit unreliable findings. Both file fix-issues in `elastic/docs-content-internal` (via `DOCS_FIX_ISSUES_TOKEN`) under labels `docs-fix:staleness` and `docs-fix:coherence`. The `docs-quality-sweep` orchestrator picks up two new jobs and two new inputs (`staleness-content-months`, `coherence-batch-size`). Stacked on docs-content-quality-sweeps. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
theletterf
added a commit
that referenced
this pull request
May 5, 2026
Two more sweeps in the docs-quality-sweep family. Both are heavier than the existing five and benefit from isolated review. `gh-aw-docs-staleness-sweep`: - Stale content (page's latest commit older than `stale-content-months`, default 24). - Stale screenshots (image's last commit predates the doc by at least `stale-screenshot-min-gap-months`, default 6). - Broken external links via `lychee` in a pre-step. Internal Elastic domains are excluded by default. - Mentions of EOL product versions, identified via the elastic-docs MCP server (`search_docs` + `get_document_by_url` against the support matrix). Release-notes and upgrade pages are exempted. `gh-aw-docs-coherence-sweep`: - Detects duplicate / near-duplicate / contradictory content vs. published Elastic docs. Each in-scope page → focused query → `find_related_docs` (capped at `max-related-per-page`, default 3) → `get_document_by_url` for the comparison set. - Smaller default `target-batch-size` (50) because each page produces multiple MCP fetches and LLM comparisons. - The agent calls `noop` if the MCP server is unreachable for more than half the run, rather than emit unreliable findings. Both file fix-issues in `elastic/docs-content-internal` (via `DOCS_FIX_ISSUES_TOKEN`) under labels `docs-fix:staleness` and `docs-fix:coherence`. The `docs-quality-sweep` orchestrator picks up two new jobs and two new inputs (`staleness-content-months`, `coherence-batch-size`). Stacked on docs-content-quality-sweeps. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
theletterf
added a commit
that referenced
this pull request
May 5, 2026
…estrator (#124) * Add applies-to / openings / style / typos sweeps + quality-sweep orchestrator Builds on the foundational pattern established by docs-frontmatter-sweep: - `gh-aw-docs-applies-to-sweep` — validates `applies_to` correctness via `docs-applies-to-tagging` skill in audit-only mode. - `gh-aw-docs-openings-sweep` — vague-H1 / weak-opening / missing "Before you begin" via `docs-page-opening-optimizer`. Wires the `elastic-docs` MCP server so the agent can cross-check H1 distinctiveness against sibling pages on the public docs. - `gh-aw-docs-style-sweep` — Vale + Elastic style guide via `docs-check-style`. Categories include `tortured-sentence` for unambiguously bad construction (nested negations, garden-paths, deeply nested clauses) where reasonable rewrites are obvious. - `gh-aw-docs-typos-sweep` — deterministic codespell scan over the whole corpus (no rotation needed). Split out from style sweep so each fix-issue carries a single, routable category label (`docs-fix:typos` vs `docs-fix:style`); gh-aw treats `safe-outputs.create-issue.labels` as a per-workflow literal so they cannot be set per-call. - `agentic-workflows/docs-quality-sweep/` — orchestrator trigger template that fans out to all five sweeps as parallel `workflow_call` jobs, with an `inputs.sweeps` filter so consumers can run subsets via `gh workflow run docs-quality-sweep.yml -f sweeps=frontmatter,typos`. All sweeps file fix-issues in `elastic/docs-content-internal` via the `DOCS_FIX_ISSUES_TOKEN` secret. Each carries the `docs-quality-sweep` parent label plus a per-category `docs-fix:<category>` label, with `close-older-issues: true` so the issue tracker doesn't accumulate stale runs. Stacked on docs-frontmatter-sweep; merge that first. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * Add staleness and coherence sweeps (#125) Two more sweeps in the docs-quality-sweep family. Both are heavier than the existing five and benefit from isolated review. `gh-aw-docs-staleness-sweep`: - Stale content (page's latest commit older than `stale-content-months`, default 24). - Stale screenshots (image's last commit predates the doc by at least `stale-screenshot-min-gap-months`, default 6). - Broken external links via `lychee` in a pre-step. Internal Elastic domains are excluded by default. - Mentions of EOL product versions, identified via the elastic-docs MCP server (`search_docs` + `get_document_by_url` against the support matrix). Release-notes and upgrade pages are exempted. `gh-aw-docs-coherence-sweep`: - Detects duplicate / near-duplicate / contradictory content vs. published Elastic docs. Each in-scope page → focused query → `find_related_docs` (capped at `max-related-per-page`, default 3) → `get_document_by_url` for the comparison set. - Smaller default `target-batch-size` (50) because each page produces multiple MCP fetches and LLM comparisons. - The agent calls `noop` if the MCP server is unreachable for more than half the run, rather than emit unreliable findings. Both file fix-issues in `elastic/docs-content-internal` (via `DOCS_FIX_ISSUES_TOKEN`) under labels `docs-fix:staleness` and `docs-fix:coherence`. The `docs-quality-sweep` orchestrator picks up two new jobs and two new inputs (`staleness-content-months`, `coherence-batch-size`). Stacked on docs-content-quality-sweeps. Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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
Two more sweeps in the docs-quality-sweep family, stacked on #124.
gh-aw-docs-staleness-sweepstale-content-months(default 24).stale-screenshot-min-gap-months(default 6).lychee. Internal Elastic domains are excluded by default.search_docs+get_document_by_urlagainst the support matrix). Release-notes and upgrade pages are exempted.A python pre-step computes git ages and image references; lychee is downloaded as a release binary and run on the in-scope slice.
gh-aw-docs-coherence-sweepfind_related_docs(capped atmax-related-per-page, default 3) →get_document_by_urlfor the comparison set → LLM classification.target-batch-size(50) because each page produces multiple MCP fetches and LLM comparisons.noopif the MCP server is unreachable for more than half the run, rather than emit unreliable findings.Orchestrator update
agentic-workflows/docs-quality-sweep/example.ymladds two more parallel jobs and two new inputs (staleness-content-months,coherence-batch-size).Stacked on #124 — merge that first.
Where this is meant to run
Same as #123 / #124: install in
elastic/docs-content-internal, auditsource-repo: elastic/docs-content, fix-issues land in the calling repo. OnlyCOPILOT_GITHUB_TOKENneeded.Test plan
make compilepasses with 0 errors / 0 warnings.make lintpasses for the new files.staleness.jsonand lychee outputs alychee.jsonwith at least one expected broken URL.max-related-per-page * in-scope-pagesMCP fetches occur.🤖 Generated with Claude Code