.agents/skills/scout-best-practices-reviewer/SKILL.md
Perform a static PR review of Scout UI and API test files (*.spec.ts) against Scout best practices and existing Scout abstractions (fixtures, page objects, API helpers). Produce actionable, PR-review-ready feedback that pushes for reuse over one-off implementations.
Solution-specific skills may extend this skill with additional review criteria. Check if one exists for your solution (e.g., Security Solution has one at <plugin>/.agents/skills/scout-best-practices-reviewer/). Run the general review first, then apply solution-specific checks.
Important: Do not post GitHub comments unless explicitly stated.
*.spec.ts files (and imported helpers/fixtures).
test / spaceTest (usually in **/test/scout/ui/**).apiTest (usually in **/test/scout/api/**).test/scout/**/fixtures/**) to spot reuse opportunities and avoid duplicating helpers.docs/extend/scout/best-practices.mddocs/extend/scout/core-concepts.md, docs/extend/scout/fixtures.mddocs/extend/scout/page-objects.md, docs/extend/scout/api-services.mddocs/extend/scout/write-ui-tests.md, docs/extend/scout/write-api-tests.mddocs/extend/scout/api-auth.md, docs/extend/scout/browser-auth.md, docs/extend/scout/parallelism.md, docs/extend/scout/deployment-tags.md, docs/extend/scout/a11y-checks.md, docs/extend/scout/debugging.md, docs/extend/scout/run-tests.mddocs/extend/scout/fixtures.md + local test/scout/**/fixtures)@kbn/scout, solution Scout packages, and plugin-local test/scout/**) before suggesting brand-new helpersdocs/extend/scout/best-practices.md)pageObjects, fixtures, and apiServices; if adding helpers/page objects, place them in the right scope (plugin vs solution vs @kbn/scout) and register via fixtures.apiClient for the endpoint under test; apiServices/kbnClient for setup/teardown only; correct auth + common headers.admin unless required); space-aware behavior covered or explicitly out of scope.waitForTimeout() and time-based assertions/retries; rely on auto-waiting + explicit readiness signals. Some locators are restricted by @kbn/eslint/scout_no_locators (e.g. globalLoadingIndicator).test/functional/**, loadTestFile(), FTR configs) alongside new/changed Scout specs.blocker unless explicitly de-scoped.admin vs viewer), spaces behavior, and permission realismignoreErrors, automatic retries)loadTestFile()).Output only the applicable sections below. Use headings and lists (no tables). Group issues by priority: blocker → major → minor → nit. Omit empty priorities.
<file:line> (add multiple as needed)<file:line><file:line><file:line>Include this section only when the PR removes/changes FTR tests alongside new/changed Scout specs and you found at least one parity issue that requires someone to step in (code change or an explicit de-scope/sign-off decision). Do not output an FYI parity map. If everything is equivalent (or differences are clearly benign), omit this section.
<file:line>Offer to generate the updated code, fully incorporating the suggested improvements and resolving any parity gaps.