Skip to content

Run Vale + elastic/vale-rules directly in style sweep - #135

Merged
theletterf merged 1 commit into
mainfrom
style-sweep-runs-vale
May 5, 2026
Merged

theletterf merged 1 commit into
mainfrom
style-sweep-runs-vale

Conversation

@theletterf

Copy link
Copy Markdown
Member

Summary

  • Replaces the docs-check-style skill invocation with a deterministic pre-step that downloads Vale 3.12.0 and clones elastic/vale-rules, then runs vale --output JSON against the in-scope slice.
  • The agent's role narrows to formatting vale.json into the structured YAML schema (category mapping, sort, cap) instead of running anything itself.
  • Mirrors the pattern already in gh-aw-docs-typos-sweep (deterministic codespell + agent formatter).

Why

The skill-driven path was unreliable: the skill invokes Vale via Shell, but the gh-aw agent container doesn't ship with Vale on PATH and can't write to a place we can install it before the agent starts. Running Vale ourselves in a workflow step (where the runner shell has full disk + network) gives us deterministic, auditable findings and removes the "Skill not found / Vale not found" failure modes seen in recent runs.

elastic/vale-rules's .vale.ini resolves StylesPath = styles relative to the config's directory, so the step cds into the cloned rules repo before invoking vale.

Test plan

  • make compile produces 0 errors / 0 warnings (done locally).
  • After merge: bust the apm-copilot cache, dispatch gh-aw-docs-style-sweep against elastic/docs-content with a small target-batch-size, and verify a fix-issue is opened with Vale-derived findings (Check, Match, Line, Message mapped to category/severity/evidence).
  • Confirm the agent calls noop cleanly when Vale finds nothing in the slice.

🤖 Generated with Claude Code

Drops the docs-check-style skill in favor of running Vale against the
slice in a deterministic pre-step. The agent's job is now to format
vale.json findings into the structured YAML schema and apply category
mapping — no skill invocation involved.

This matches the typos sweep pattern (deterministic codespell pre-step,
agent formats findings) and avoids the failure mode where the skill
runs inside the agent container without Vale on PATH.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@theletterf
theletterf requested a review from a team as a code owner May 5, 2026 13:37
@theletterf
theletterf requested a review from Mpdreamz May 5, 2026 13:37
@theletterf theletterf added the fix label May 5, 2026
@theletterf
theletterf merged commit 4723f26 into main May 5, 2026
3 of 4 checks passed
@theletterf
theletterf deleted the style-sweep-runs-vale branch May 5, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant