Skip to content

Triage: three-team mapping, instructions file, and auto-run on new issues - #8297

Merged
theletterf merged 7 commits into
mainfrom
triage-three-team-mapping
Sep 16, 2026
Merged

theletterf merged 7 commits into
mainfrom
triage-three-team-mapping

Conversation

@theletterf

@theletterf theletterf commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

The triage bot's team mapping had drifted. It still described six teams — Team:Experience, Team:Ingest, Team:DocsEng, and Team:Projects alongside Admin and Developer — and it had no row for Team:SKI at all, even though 396 issues in this repo already carry that label. Meanwhile .github/CODEOWNERS has settled on exactly three teams for content paths: @elastic/admin-docs, @elastic/developer-docs, and @elastic/ski-docs.

So this rebuilds the mapping from CODEOWNERS rather than pruning the old table. Issues now route to Team:SKI, Team:Admin, or Team:Developer, and nothing else.

I also moved the mapping out of the workflow files. It was living inline under additional-instructions in two callers, docs-triage.yml and docs-ai-menu.yml, as two byte-identical copies — which is how it drifted in the first place. It now lives in .github/triage-instructions.md, which is already the reusable workflow's default project-instructions-path, so both callers read the same file and neither needed an input change.

What changed inside the mapping:

  • Team:SKI takes over everything the old Team:Experience and Team:Ingest rows covered: Kibana, Observability, Security, Fleet, and ingest.
  • explore-analyze/ai-features/ moves to Team:SKI. CODEOWNERS assigns only ai-features/agent-builder/ to @elastic/developer-docs; the rest falls to the /explore-analyze/ default, which is @elastic/ski-docs.
  • A new CODEOWNERS resolution table spells out that @elastic/docs, @elastic/doc-leads, @elastic/docs-engineering, @elastic/core-docs, and @elastic/docs-serverless-release-team map to no team label. Step 3 of the reusable workflow tells the model to cross-reference CODEOWNERS, so without this line it can reach Team:DocsEng through @elastic/docs-engineering.
  • Docs tooling and get-started issues therefore get no team label. They still get triaged, and a missing team label never makes an issue non-routable.
  • Dropped the old **Fallback**: apply cross-team line. It contradicted the workflow contract, which says omit the team when ownership is unclear and reserve cross-team for genuine multi-owner cases.
  • Escaped ES|QL as ES\|QL. The bare pipe was breaking that table row.

Why I tested this before opening it

The retired Team:* labels stay on the repo's label menu — Team:Experience alone is on 1235 issues, so deleting them was never an option. That leaves instructions as the only lever, and prompt wording is a weak lever on Haiku-class models. So I measured the leak risk in elastic/docs-actions-sandbox first: same mapping text, same instructions-file mechanism, the three new labels created, Team:Experience / Team:Ingest / Team:DocsEng left in place as decoys, and a CODEOWNERS mirroring this repo's team structure.

Five fresh issues, one per routing path:

Test issue Old routing Requested labels
Lens metric visualization settings Team:Experience triaged, documentation, Team:SKI
Fleet agent policy rollout Team:Ingest triaged, documentation, Team:SKI
Docs build workflow failure Team:DocsEng triaged, bug, priority:high
SLM expire_after Team:Admin triaged, documentation, Team:Admin
ES|QL column order Team:Developer triaged, documentation, Team:Developer, area:esql

Zero retired labels across all five, a 👍 on each, and no outcome comments. Sandbox runs: 34952778191, 34952780402, 34952784103, 34952786259, 34952794614.

What's still open

Docs-infrastructure issues now land with a type label and no team. If that turns out to matter in practice, the fix is a fourth team label rather than another mapping change. And if a retired label ever does leak in production, the structural fix is a docs-actions PR that makes "a defined team mapping is exhaustive" part of the Step 3 contract instead of a line of prose.

🤖 Generated with Claude Code

Related to elastic/docs-actions#398

Rebuild the team ownership mapping from .github/CODEOWNERS, which names
exactly three content teams: admin-docs, developer-docs, and ski-docs.
Issues now route to Team:SKI, Team:Admin, or Team:Developer only.

Move the mapping out of the two callers' inline additional-instructions
into .github/triage-instructions.md, the reusable workflow's default
project-instructions-path, so both callers read one source of truth.

- Team:SKI replaces the old Team:Experience and Team:Ingest rows
- Add a CODEOWNERS team -> label resolution table, including the teams
  that map to no label
- Drop the cross-team fallback line, which contradicted the workflow
  contract
- Escape ES|QL so the table row renders

Verified in elastic/docs-actions-sandbox: five fresh issues, one per
routing path, with the retired labels left in place as decoys. Zero
retired labels requested.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@theletterf
theletterf requested review from a team as code owners September 15, 2026 09:38
@theletterf
theletterf requested a review from akira28 September 15, 2026 09:38
@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 and others added 2 commits September 15, 2026 12:59
Add a docs-auto-triage.yml caller on issues: opened, mirroring the
manual /triage caller. It reads the same .github/triage-instructions.md,
so the three-team mapping applies to both paths.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@theletterf

Copy link
Copy Markdown
Member Author

Added a second commit (824ebd4): .github/workflows/docs-auto-triage.yml, so triage also runs on its own when an issue is opened — not only on /triage.

It calls gh-aw-issue-auto-triage.lock.yml@v1 with the same secrets as docs-triage.yml and no inline instructions. Both paths read the new .github/triage-instructions.md, so the three-team mapping applies to auto and manual triage alike. Same shape as the caller docs-eng-team already runs. Auto-triage skips bot-opened issues and applies labels only, no comments.

The PR title still describes the mapping change; the scope is now "triage config: three-team mapping + run on new issues". Happy to split it back out if you'd rather review them separately.

@theletterf theletterf changed the title Triage: route to three team labels and move the mapping into a file Triage: three-team mapping, instructions file, and auto-run on new issues Sep 15, 2026
Triage now runs automatically on issues: opened and on /triage, so the
menu checkbox is redundant. Drop the triage entry from docs_ai_menu.cjs
and the run-docs-triage / refresh-menu-after-docs-triage jobs and the
triage_triggered plumbing from docs-ai-menu.yml.

Existing menu comments self-heal: the menu is rebuilt from WORKFLOW_ORDER
on every refresh, so the stale triage line drops without a migration.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@theletterf

Copy link
Copy Markdown
Member Author

Third commit: triage removed from the AI issue menu, leaving only Scope. Now that triage runs on issues: opened and on /triage, the checkbox was redundant. docs_ai_menu.cjs drops the triage entry; docs-ai-menu.yml drops run-docs-triage, refresh-menu-after-docs-triage, and the triage_triggered plumbing. Existing menu comments self-heal — the menu is rebuilt from WORKFLOW_ORDER on every refresh, so the stale triage line disappears on the next touch with no migration. Smoke-tested the script with node and validated the YAML; the menu workflow has no sandbox equivalent, so that is the extent of pre-merge testing.

The workflows and scripts touched by this PR already route to
@elastic/docs-engineering. The instructions file fell to the /.github/
catch-all (doc-leads only); add docs-engineering alongside so triage
behavior changes reach the team that maintains the workflow.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@theletterf

Copy link
Copy Markdown
Member Author

Fourth commit: CODEOWNERS. Of the five files this PR touches, .github/workflows/* and .github/scripts/* were already @elastic/docs-engineering; only .github/triage-instructions.md fell through to the /.github/ catch-all (@elastic/doc-leads). Added a line making it @elastic/doc-leads @elastic/docs-engineering — both listed, because a later CODEOWNERS match replaces owners rather than adding to them.

@theletterf
theletterf enabled auto-merge (squash) September 15, 2026 13:08
Comment thread .github/triage-instructions.md Resolved
Comment thread .github/triage-instructions.md Resolved

@bmorelli25 bmorelli25 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two clarifying suggestions. Otherwise looks like a good place to start!

@georgewallace georgewallace left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes Brandon. Looks good.

@theletterf

Copy link
Copy Markdown
Member Author

Yay! Shipping it.

@theletterf
theletterf merged commit bbc36c0 into main Sep 16, 2026
8 checks passed
@theletterf
theletterf deleted the triage-three-team-mapping branch September 16, 2026 08:09
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.

4 participants