Skip to content

Make docs agent workflows autonomous - #137

Merged
theletterf merged 5 commits into
mainfrom
fab/share-apm-skill-bundle
May 5, 2026
Merged

theletterf merged 5 commits into
mainfrom
fab/share-apm-skill-bundle

Conversation

@theletterf

@theletterf theletterf commented May 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Remove runtime Elastic Docs Skills/APM dependencies from the docs review, openings, frontmatter, applies_to, and style sweep workflows.
  • Embed high-value guidance from the former skills directly into autonomous prompts, including style, Formatting, UI writing, jargon, frontmatter, content-type, applies_to, and page-opening rules.
  • Add deterministic Vale pre-steps where style findings need elastic/vale-rules, and keep bounded Elastic docs MCP use for published-doc verification.
  • Refresh generated lock files and workflow documentation to describe autonomous behavior.

Test plan

  • make compile.
  • make lint.
  • Searched workflow sources and lock files for stale skill/APM references.

theletterf and others added 2 commits May 5, 2026 16:14
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]>
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]>
@theletterf
theletterf requested a review from a team as a code owner May 5, 2026 16:39
@theletterf
theletterf requested a review from Mpdreamz May 5, 2026 16:39
theletterf and others added 2 commits May 5, 2026 18:46
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]>
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]>
@theletterf theletterf self-assigned this May 5, 2026
@theletterf theletterf added the enhancement New feature or request label May 5, 2026
Resolve workflow conflicts by keeping the autonomous prompt imports and regenerating gh-aw lock files against the current main branch.

Co-authored-by: OpenAI GPT-5.5 <[email protected]>
Co-authored-by: Cursor <[email protected]>
@theletterf
theletterf merged commit 93188c6 into main May 5, 2026
3 checks passed
@theletterf
theletterf deleted the fab/share-apm-skill-bundle branch May 5, 2026 16:57
theletterf added a commit that referenced this pull request May 8, 2026
When the docs-review workflow is triggered by an issue_comment event
(which is how the PR-menu /docs-review slash command fires), gh-aw's
submit_pull_request_review handler cannot resolve the PR — its
resolveTarget path treats only pull_request* events as PR context, so
body-only reviews silently drop with "No review context available".
The handler for create_pull_request_review_comment, by contrast, reads
context.payload.issue.pull_request and works fine on the same trigger.

Before #137 the agent always emitted at least one inline comment via
the docs skills, which set the review context as a side effect. The
autonomous Vale-only flow now produces zero inline comments on clean
PRs, exposing the latent gh-aw asymmetry. Tracked upstream at
github/gh-aw#30964.

Switch the no-findings path to add_comment, which correctly handles
issue_comment payloads, so the summary always posts. submit_pull_request_review
remains the path when there are inline review comments to attach.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
theletterf added a commit that referenced this pull request May 8, 2026
* Post docs-review summary as PR comment when no inline findings

When the docs-review workflow is triggered by an issue_comment event
(which is how the PR-menu /docs-review slash command fires), gh-aw's
submit_pull_request_review handler cannot resolve the PR — its
resolveTarget path treats only pull_request* events as PR context, so
body-only reviews silently drop with "No review context available".
The handler for create_pull_request_review_comment, by contrast, reads
context.payload.issue.pull_request and works fine on the same trigger.

Before #137 the agent always emitted at least one inline comment via
the docs skills, which set the review context as a side effect. The
autonomous Vale-only flow now produces zero inline comments on clean
PRs, exposing the latent gh-aw asymmetry. Tracked upstream at
github/gh-aw#30964.

Switch the no-findings path to add_comment, which correctly handles
issue_comment payloads, so the summary always posts. submit_pull_request_review
remains the path when there are inline review comments to attach.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

* Clarify docs-review scope and suggestion handling.

Document repo-wide markdown review for repos like docs-content, keep Vale advisory instead of review-gating, and drop the obsolete gh-aw suggestion-block workaround for escaped curly braces.

Co-authored-by: GPT-5.4 <[email protected]>
Co-authored-by: Cursor <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Co-authored-by: GPT-5.4 <[email protected]>
Co-authored-by: Cursor <[email protected]>
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