Skip to content

Commit de00cb2

Browse files
theletterfclaude
andauthored
Harden skill-availability check: require two exact-form failures before noop (#133)
The openings sweep noop'd on its first real run on elastic/docs-content despite the skill being available, because the agent stochastically invoked the skill with a non-exact form the first time: 11:33:22 ✗ skill(docs-page-opening-optimizer) Skill not found 11:33:27 ● noop "docs-page-opening-optimizer skill unavailable..." 11:33:33 ✓ skill(skill: docs-page-opening-optimizer) succeeded The prompt's "abort with noop on skill failure" rule fired on the first non-exact attempt, before the agent retried with the correct `skill(skill: …)` form and got results. By the time the exact invocation succeeded, the noop was already committed. Frontmatter, applies-to, and style produced fix-issues fine in the same orchestrator run. The difference: the frontmatter sweep prompt explicitly tolerates partial skill failures ("if one fails, report only the other"); applies-to and style happened to land on the exact form first try. Openings was the unlucky one. Lift the docs-review pattern (PRs #117/#118) where skill availability is only declared after a confirmed exact-form failure. Apply to the three sweeps that had the strict abort-on-first-failure rule: - openings (was hit by this in real run 25373751367) - applies-to (would hit it next time the agent picks the wrong form) - style (same) Each now spells out the procedure: try the exact form, retry once on failure, only noop after the second exact-form failure. A single non-exact failure is not sufficient evidence. The frontmatter prompt already had a softer fallback ("merge what works, note any failure in Notes"); coherence and staleness use different mechanisms (>50% MCP failure threshold and full-repo deterministic respectively); typos doesn't import any skill. None of those need this change. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b45090a commit de00cb2

6 files changed

Lines changed: 75 additions & 39 deletions

.github/workflows/gh-aw-docs-applies-to-sweep.lock.yml

Lines changed: 18 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/gh-aw-docs-applies-to-sweep.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,13 @@ Invoke `skill(skill: docs-applies-to-tagging)` against `/tmp/gh-aw/sweep-data/sc
205205

206206
**Audit mode only — do not write any files.** The skill defaults to validation when not asked to fix; reinforce that intent in the call. This sweep produces an issue, not edits.
207207

208-
If the skill fails, abort the run by calling `noop` with `"docs-applies-to-tagging skill unavailable"` — there is no fallback heuristic worth filing as findings.
208+
**Only treat the skill as unavailable after a confirmed exact-form failure.** Stochastic agent retries sometimes invoke the skill with a shortened form (e.g., `skill(docs-applies-to-tagging)` without the `skill:` prefix) which fails before the exact form is tried. Procedure:
209+
210+
1. Invoke with the exact form `skill(skill: docs-applies-to-tagging)`.
211+
2. If the result is "Skill not found", retry once more with the same exact form.
212+
3. Only after a second exact-form failure, abort the run by calling `noop` with `"docs-applies-to-tagging skill unavailable"` — there is no fallback heuristic worth filing as findings.
213+
214+
A single first-attempt failure (especially with a non-exact form) is **not** sufficient evidence to noop.
209215

210216
## Step 2: Build the findings list
211217

.github/workflows/gh-aw-docs-openings-sweep.lock.yml

Lines changed: 18 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/gh-aw-docs-openings-sweep.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,13 @@ Invoke `skill(skill: docs-page-opening-optimizer)` against `/tmp/gh-aw/sweep-dat
213213

214214
**Suggest only — do not produce edits to repo originals.** This sweep emits an issue, not a PR. The skill may modify files inside the scope copy directory; that is fine — the changes are scratch. To recover the suggestion, diff each modified scope file against the original at `${{ github.workspace }}/<path>`.
215215

216-
If the skill fails, abort by calling `noop` with `"docs-page-opening-optimizer skill unavailable"`.
216+
**Only treat the skill as unavailable after a confirmed exact-form failure.** Stochastic agent retries sometimes invoke the skill with a shortened form (e.g., `skill(docs-page-opening-optimizer)` without the `skill:` prefix) which fails before the exact form is tried. Procedure:
217+
218+
1. Invoke with the exact form `skill(skill: docs-page-opening-optimizer)`.
219+
2. If the result is "Skill not found", retry once more with the same exact form.
220+
3. Only after a second exact-form failure, abort by calling `noop` with `"docs-page-opening-optimizer skill unavailable"`.
221+
222+
A single first-attempt failure (especially with a non-exact form) is **not** sufficient evidence to noop.
217223

218224
## Optional: cross-check H1 specificity via the Elastic Docs MCP server
219225

0 commit comments

Comments
 (0)