Skip to content

feat: replace /size + /docs-issue-scope with combined /scope workflow - #7947

Merged
theletterf merged 6 commits into
mainfrom
feat/use-scope-workflow
Aug 13, 2026
Merged

theletterf merged 6 commits into
mainfrom
feat/use-scope-workflow

Conversation

@theletterf

@theletterf theletterf commented Aug 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Migrates from the two separate size (`/size`) and scope (`/docs-issue-scope`) workflows to the new combined `/scope` workflow from elastic/docs-actions#284.

Workflow file changes:

  • Deletes `docs-size.yml` and `docs-issue-scope.yml`
  • Adds `docs-scope.yml` (triggers on `/scope`, calls `gh-aw-issue-scope.lock.yml@v1`)
  • Updates `docs-ai-menu.yml`: removes the `run-docs-size` job and `refresh-menu-after-docs-size` job; updates `run-docs-issue-scope` to call the new `gh-aw-issue-scope.lock.yml@v1`

AI menu script change (`docs_ai_menu.cjs`):

  • Removes the `size` menu item from `WORKFLOW_CONFIG` and `WORKFLOW_ORDER`
  • Updates the `issueScope` label to link to the new `gh-aw-issue-scope.md` source

The "Scope the docs work" AI menu checkbox now triggers `/scope` (which covers both docs scope and cost/benefit sizing in one comment).

Merge after elastic/docs-actions#284 is merged and the `v1` tag is moved.

🤖 Generated with Claude Code

Related to elastic/docs-actions#399

@theletterf
theletterf requested a review from a team as a code owner August 13, 2026 14:26
@theletterf
theletterf requested a review from cotti August 13, 2026 14:26
@github-actions

Copy link
Copy Markdown
Contributor

Elastic Docs AI PR menu

Check the box to run an AI review for this pull request.

  • Review docs changes (docs-review). Status: not started.

Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team.

@theletterf
theletterf enabled auto-merge (squash) August 13, 2026 16:27
@theletterf
theletterf merged commit efa7a67 into main Aug 13, 2026
7 checks passed
@theletterf
theletterf deleted the feat/use-scope-workflow branch August 13, 2026 16:28
mdbirnstiehl pushed a commit to mdbirnstiehl/docs-content that referenced this pull request Oct 14, 2026
…astic#8826)

## Summary

Ticking **Scope the docs work** on an issue whose AI menu was posted
before Aug 13 now starts the check, and ScopeBot gets a short
instructions file that limits scope work to 9.x and Serverless.

## Why

Visha ticked the box on elastic#7634, elastic#7636, and elastic#7702 and the check never ran.
The menu script built its line pattern from the label text, and elastic#7947
renamed that label from `docs-issue-scope` to `docs-scope`. Menus posted
earlier never matched, so `selected` stayed false. Separately,
`docs-scope.yml` points at `.github/scope-instructions.md`, which did
not exist. On elastic#7702 ScopeBot asked about 8.17 and 8.18, which these docs
do not cover.

## What

#### Old menus parse
`getLinePattern` in `.github/scripts/docs_ai_menu.cjs` now matches the
stable marker `<!-- docs-ai-menu:issue-scope -->` and accepts any label
text. The next refresh rewrites an old menu in the current format, so
the extra Triage and Size lines on old menus disappear.

**Out of scope:** An old menu that is already ticked does not trigger,
because the trigger needs an unticked-to-ticked change. Untick and tick
the box again, or comment `/scope`. The PR AI menu status and
docs-content-internal are separate (a sibling PR covers
docs-content-internal).

#### Scope instructions
`.github/scope-instructions.md` says that this repository documents
Elastic Stack 9.x and Serverless, and that ScopeBot should not ask about
or recommend 8.x work unless the issue asks for an 8.x backport. It adds
no other rules.

## Verify
I ran the script from `main` and the script from this branch against the
live menu bodies of elastic#7634, elastic#7934, and elastic#8814 with a local Node check,
which is not committed. To repeat it, copy those menu comments to files
and pass each body to `parseMenuState` from both versions of
`docs_ai_menu.cjs`. The output:

```text
# docs-content#7634 (old label, ticked)
  before  {"selected":false}
  after   {"selected":true,"statusText":"Status: not started."}
# docs-content#7934 (old label, unticked)
  before  {"selected":false}
  after   {"selected":false,"statusText":"Status: not started."}
# docs-content#8814 (current label)
  before  {"selected":true,"statusText":"Status: completed. [View progress](...)."}
  after   {"selected":true,"statusText":"Status: completed. [View progress](...)."}
# transition on old menu (unticked -> ticked) issue_scope_triggered = false  [before]
# transition on old menu (unticked -> ticked) issue_scope_triggered = true  [after]
# transition on current menu = true  [before]
# transition on current menu = true  [after]
```

A refresh of the old ticked menu keeps the tick and writes the current
label with `Status: running.`. I did not run the workflows themselves. I
have not tested the instructions file with a ScopeBot run.

Fixes elastic/docs-eng-team#1032

## Generative AI disclosure
1. Did you use a generative AI (GenAI) tool to assist in creating this
contribution?
- [x] Yes

Tool(s) and model(s) used: Claude Code (Claude Sonnet 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants