You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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) <noreply@anthropic.com>
* 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 <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* 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 <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* 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 <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: OpenAI GPT-5.5 <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: .claude/skills/create-agentic-workflow/SKILL.md
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,10 +27,10 @@ You are a workflow generator for the [elastic/docs-actions](https://github.com/e
27
27
28
28
## Background
29
29
30
-
This repo uses [GitHub Agent Workflows](https://github.github.com/gh-aw/). Workflow `.md` sources live in `agentic-workflows/` as a library. A compile script copies them to `.github/workflows/` for the gh-aw compiler, which produces `.lock.yml` files that consumer repos call via `uses:`.
30
+
This repo uses [GitHub Agent Workflows](https://github.github.com/gh-aw/). Workflow `.md` sources live in `.github/workflows/` for the gh-aw compiler, which produces `.lock.yml` files that consumer repos call via `uses:`. Usage documentation and trigger templates live under `agentic-workflows/`.
Generate `.github/workflows/gh-aw-<name>.md`. Read the available fragments in `.github/workflows/gh-aw-fragments/` and import those relevant to the workflow. **Always include `inlined-imports: true`** — this embeds all imported content at compile time, which is required for cross-repo `workflow_call` invocation.
69
71
@@ -110,6 +112,11 @@ tools:
110
112
toolsets: [repos, issues, pull_requests, search]
111
113
bash: true
112
114
web-fetch:
115
+
mcp-servers:
116
+
elastic-docs:
117
+
type: http
118
+
url: "https://www.elastic.co/docs/_mcp/"
119
+
allowed: ["*"]
113
120
network:
114
121
allowed:
115
122
- defaults
@@ -137,6 +144,8 @@ Follow the frontmatter with the agent prompt in markdown. The imported fragments
137
144
5.**Quality gate** — when to noop vs. when to report (noop is the expected outcome)
138
145
6.**Output format** — exact format for the issue body, PR body, or comment
139
146
147
+
Make the workflow autonomous. Do not require runtime skills or agent-local packages for core behavior. Embed the domain rules the agent needs, use deterministic pre-steps for mechanical checks, and use Elastic docs MCP for published-doc evidence when needed. If MCP is required for a finding but is unavailable, instruct the agent to `noop` or skip the finding rather than guessing.
148
+
140
149
End with `${{ inputs.additional-instructions }}` so callers can inject repo-specific guidance.
141
150
142
151
Read the existing workflows for examples.
@@ -177,7 +186,7 @@ For scheduled audits, add `issues: write` to permissions. For fixes, add `conten
177
186
178
187
### Step 5: Generate the README
179
188
180
-
Create `agentic-workflows/<name>/README.md` following the pattern in `agentic-workflows/docs-check/README.md`:
189
+
Create `agentic-workflows/<name>/README.md` following the pattern in `agentic-workflows/docs-review/README.md` or `agentic-workflows/docs-issue-scope/README.md`:
@@ -208,18 +202,38 @@ A pre-step has computed the in-scope file list:
208
202
209
203
Read with `cat` / `jq`. If `in_scope_count` is `0`, call `noop` with the stats and stop.
210
204
211
-
## Step 1: Run the skill in audit mode
205
+
## Step 1: Validate applies_to autonomously
206
+
207
+
This workflow is autonomous. Do not invoke runtime skills or depend on a skill package being installed. For each in-scope file, read the frontmatter block at the top of the copy under `/tmp/gh-aw/sweep-data/scope/` and inspect the `applies_to` key.
208
+
209
+
Audit only. Do not edit repo originals or scope copies. This sweep emits an issue, not a PR.
210
+
211
+
Before filing any validity finding, verify the rule from one of these sources:
212
212
213
-
Invoke `skill(skill: docs-applies-to-tagging)` against `/tmp/gh-aw/sweep-data/scope/`.
213
+
- A checked-in repository schema or docs-builder configuration in the source repository.
214
+
- Published cumulative-docs guidance fetched during this run with `elastic-docs.get_document_by_url`, especially `/docs/contribute-docs/how-to/cumulative-docs/guidelines` and `/docs/contribute-docs/how-to/cumulative-docs/reference`.
215
+
- Published syntax and placement guidance fetched during this run when body-level annotations are involved, especially the docs-builder applies_to syntax guide, badge placement guidance, and cumulative-docs example scenarios.
214
216
215
-
**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.
217
+
Use the published reference as the source of truth for allowed dimensions, keys, lifecycle states, and version formats. If the MCP server is unavailable and no local schema is available, call`noop` with `"applies_to reference unavailable; skipping applies_to sweep"` rather than emitting unverified findings.
216
218
217
-
**If the skill returns "Skill not found", do not noop.** That error is ambiguous — it can mean the skill genuinely isn't installed, or that the invocation form was reformatted by the agent's tool serialization. Either way: fall back to manual analysis instead of aborting. Procedure:
219
+
Apply these rules after verification:
218
220
219
-
1. Try invoking the skill with the exact form `skill(skill: docs-applies-to-tagging)`.
220
-
2. If that fails or returns "Skill not found": fall back to **manual analysis**. Use `bash` to scan each in-scope file's frontmatter (the YAML block at the top), checking for missing/invalid `applies_to` keys against the documented allowed values. Produce findings as you would have from the skill output, and add a single line in the issue body's `Notes` section: "skill `docs-applies-to-tagging` did not produce output in this run; findings are agent-only."
221
+
- Every page should include page-level `applies_to` frontmatter.
222
+
- Page-level `applies_to` should use one primary dimension: Stack/Serverless (`stack`, `serverless`), Deployment (`deployment` with deployment subkeys and, where documented, `serverless`), or Product (`product` with documented product subkeys). Section-level and inline annotations can use a different dimension when needed to clarify local exceptions.
223
+
- Lifecycle values must match the verified reference. Current published states include `preview`, `beta`, `ga`, `deprecated`, `removed`, and `unavailable`, but do not rely on this list without fetching the reference or reading a local schema during the run.
224
+
- Version values must use documented formats, such as major/minor versions, exact versions, ranges, or greater-than-or-equal versions, according to the verified reference.
225
+
-`ech` is the current key for Elastic Cloud Hosted. Treat `ess` as deprecated in new or updated content unless local build constraints require it.
226
+
- Validate version semantics: only one version per lifecycle, only one open-ended `+` lifecycle per key, exact versions use `=x.x` or `=x.x.x`, ranges use one hyphen with no spaces, range starts must be less than or equal to ends, and ranges must not overlap.
227
+
- Do not write version numbers in prose next to `applies_to` badges. Let the badge carry version applicability.
228
+
- Section-level annotations belong immediately after a heading and apply until the next heading of the same or higher level. Do not put inline annotations in headings.
229
+
- Inline annotations are appropriate for a single phrase, property, definition-list term, or table cell, not for whole sections.
230
+
- Badge placement should match the element: frontmatter for page-level, after headings for section-level, at the beginning of list items when the whole item varies, at the end of a definition-list term when the whole item varies, and in the first column or relevant cell for tables.
231
+
- Use `applies-switch` tabs only when code blocks or workflows differ entirely between contexts.
232
+
- Do not require `unavailable` when omission already communicates that the content does not apply. Report `unavailable` misuse only when the page creates a high risk of user confusion or contradicts the published guidance.
233
+
- Do not flag dimension choices unless the page-level `applies_to` clearly mixes primary dimensions, contradicts `products`, or conflicts with the page's documented scope.
234
+
- Do not add or require tags for typo fixes, formatting changes, information architecture changes, or sections whose applicability is already established by a parent tag.
221
235
222
-
Only call `noop` if you cannot produce any high-confidence findings even from manual analysis.
236
+
Only call `noop` if you cannot produce any high-confidence findings from verified rules.
223
237
224
238
## Step 2: Build the findings list
225
239
@@ -229,9 +243,9 @@ Categories (use exactly these strings):
229
243
-`invalid-applies-to-syntax` — malformed YAML or unrecognized structure under `applies_to:`.
230
244
-`invalid-applies-to-value` — recognized structure but a value (product, deployment, lifecycle stage) that is not in the allowed vocabulary.
231
245
-`inconsistent-applies-to` — `applies_to` contradicts other frontmatter (e.g., `products:` says one thing, `applies_to:` another).
232
-
-`outdated-applies-to` — references a deployment/lifecycle value that is deprecated per the skill's reference set.
246
+
-`outdated-applies-to` — references a deployment or lifecycle value that is deprecated per the verified reference.
233
247
234
-
For each finding extract `file`, `line`, `category`, `severity`, `evidence`, and `suggested_fix`(concrete YAML snippet) when the skill produces one.
248
+
For each finding extract `file`, `line`, `category`, `severity`, `evidence`, and `suggested_fix`when you can produce a concrete YAML snippet confidently.
235
249
236
250
Strip the `/tmp/gh-aw/sweep-data/scope/` prefix from `file` so paths are repo-relative.
0 commit comments