Skip to content

Add applies-to / openings / style / typos sweeps + quality-sweep orchestrator - #124

Merged
theletterf merged 2 commits into
mainfrom
docs-content-quality-sweeps
May 5, 2026
Merged

theletterf merged 2 commits into
mainfrom
docs-content-quality-sweeps

Conversation

@theletterf

@theletterf theletterf commented May 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Adds four more agentic sweeps following the pattern established in Add docs-frontmatter-sweep agentic workflow #123:
    • gh-aw-docs-applies-to-sweep — validates applies_to correctness (audit-only mode of the docs-applies-to-tagging skill).
    • gh-aw-docs-openings-sweep — vague H1, weak opening, missing prerequisites via docs-page-opening-optimizer. Wires the Elastic Docs MCP server for optional cross-checks of H1 distinctiveness.
    • gh-aw-docs-style-sweep — Vale + Elastic style guide via docs-check-style. Categories include tortured-sentence for unambiguously bad construction.
    • gh-aw-docs-typos-sweep — deterministic codespell scan over the whole corpus (no rotation; fast). Split out from style sweep because gh-aw treats safe-outputs.create-issue.labels as a per-workflow literal — bundling them would conflate docs-fix:style and docs-fix:typos on the same issue.
  • Adds agentic-workflows/docs-quality-sweep/ orchestrator template that fans out to all five sweeps as parallel workflow_call jobs, with an inputs.sweeps filter for running subsets.

Stacked on #123 — merge that first.

Implements phase 3 of elastic/docs-content-internal#949.

Where this is meant to run

Same as #123: install the orchestrator (or any individual sweep) in elastic/docs-content-internal, set source-repo: elastic/docs-content, fix-issues land in the calling repo. Only COPILOT_GITHUB_TOKEN needed.

Test plan

  • make compile passes with 0 errors / 0 warnings.
  • make lint passes for the new files.
  • gh workflow run docs-quality-sweep.yml -f sweeps=frontmatter,typos only fans out to those two jobs (validates the if: filtering).
  • On a sandbox repo: each sweep opens its own labeled fix-issue (or calls `noop`) when run via the orchestrator.
  • Style sweep flags a known tortured sentence and produces a usable `suggested_fix`.
  • Openings sweep can fall back gracefully when the Elastic Docs MCP server is unreachable.
  • Typos sweep filters out proper nouns / code identifiers correctly (manual spot-check on 5-10 findings).

🤖 Generated with Claude Code

@theletterf
theletterf requested a review from a team as a code owner May 5, 2026 07:53
@theletterf
theletterf requested a review from Mpdreamz May 5, 2026 07:53
@theletterf theletterf mentioned this pull request May 5, 2026
8 tasks
@theletterf theletterf self-assigned this May 5, 2026
@theletterf theletterf added the enhancement New feature or request label May 5, 2026
@theletterf
theletterf force-pushed the docs-frontmatter-sweep branch from bc64d2e to 96aa8bc Compare May 5, 2026 08:13
@theletterf
theletterf force-pushed the docs-content-quality-sweeps branch from 1b19641 to 3bf2b7d Compare May 5, 2026 08:16
Base automatically changed from docs-frontmatter-sweep to main May 5, 2026 08:50
@theletterf
theletterf force-pushed the docs-content-quality-sweeps branch from 2ace079 to 088cf4d Compare May 5, 2026 08:53
theletterf and others added 2 commits May 5, 2026 10:54
…estrator

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]>
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
theletterf force-pushed the docs-content-quality-sweeps branch from 088cf4d to 1ebeb11 Compare May 5, 2026 08:55
@theletterf
theletterf merged commit 249ac91 into main May 5, 2026
3 checks passed
@theletterf
theletterf deleted the docs-content-quality-sweeps branch May 5, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant