Skip to content

Add skill to split larger Kibana change to multiple PRs#271996

Draft
miltonhultgren wants to merge 1 commit into
elastic:mainfrom
miltonhultgren:kibana-split-pr-skill
Draft

Add skill to split larger Kibana change to multiple PRs#271996
miltonhultgren wants to merge 1 commit into
elastic:mainfrom
miltonhultgren:kibana-split-pr-skill

Conversation

@miltonhultgren
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the author:actionable-obs PRs authored by the actionable obs team label May 29, 2026
@miltonhultgren miltonhultgren requested a review from Copilot May 29, 2026 21:19
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new “kibana-split-to-prs” skill and supporting reference docs to standardize how large Kibana changes are sliced into a small stacked series of reviewable PRs.

Changes:

  • Introduces the skill definition (SKILL.md) with a phased workflow, guardrails, and execution steps.
  • Adds reference docs for slicing strategy, review-product criteria, plan schema, and validation/execution guidance.
  • Provides a plan template to ensure consistent split plans (including per-PR fields, risk tags, and validation recording).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.agents/skills/kibana-split-to-prs/references/slicing.md Documents when/how to split, hotspots, ordering, and splittability edits.
.agents/skills/kibana-split-to-prs/references/review.md Defines “review product” criteria, risk buckets/tags, and hidden-risk checks.
.agents/skills/kibana-split-to-prs/references/plan-template.md Provides the required split-plan schema and a filled example.
.agents/skills/kibana-split-to-prs/references/execution.md Describes validation timing, approval gates, and commands for execution.
.agents/skills/kibana-split-to-prs/SKILL.md Adds the skill spec + end-to-end workflow and Phase 4 gate checklist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to +35
| Signal | Action |
|--------|--------|
| Mechanical + behavioral in one file | Extract or dark-ship |
| Same file in 2+ PRs | Avoid—see cross-PR |
| Two review questions in one file | Extract or `const useNew = false` |
| Mixed team ownership | Split by file, or one PR + coupling note |
| God file | One-time extraction PR |
Comment on lines +5 to +11
| Term | Meaning |
|------|---------|
| **One question** | Single sentence the reviewer decides—not a file list; split if "and" joins unrelated concerns |
| **One owner** | Primary `@elastic/team`; secondary minimal and named |
| **Planned validation** | `node scripts/check --scope branch --base-ref upstream/main`; outcome only after Phase 5 commit |
| **No hidden risk** | Surprise audit empty or every surprise named + hinted |
| **Bucket** | `low risk` \| `needs scrutiny`—review surface, not approval urgency |
Comment on lines +26 to +34
| # | Section | Content |
|---|---------|---------|
| 1 | **Review question** | One sentence |
| 2 | **Out of scope** | What later PRs add |
| 3 | **Surprise audit** | `None identified` or bullets + hints |
| 4 | **Risk tags + hints** | Tags; 1–2 imperative hints |
| 5 | **Files** | Paths; cross-PR hunk map inline if needed |
| 6 | **Mergeability + splittability edits** | Why safe alone; flag/dark-ship state; `none` or edits in this PR; PR # removing scaffolding |
| 7 | **Validation** | Command + `Outcome: not run — slice not materialized; run in Phase 5 after commit` |
Comment on lines +5 to +8
| Phase | Run check on slice? | Plan outcome |
|-------|---------------------|--------------|
| 1–3 | **No** | `not run — slice not materialized; run in Phase 5 after commit` |
| 5 | **Yes** — after commit | `pass` or `fail` (stop stack on fail) |
| Trojan mechanical | Split behavioral hunk |
| Silent default | Own PR or `config` tag + hint |
| Type-only runtime change | `public-api` + call-site hint |
| Cross-stack file | Reslice, extract, hunk map ([slicing.md](slicing.md) §hotspots) |

**Depth:** target ≤5 PRs; merge coherent slices or document why not.

**Stop splitting** when compile breaks without reasonable shims, hunks won't separate, or re-read tax exceeds benefit—propose shims (§splittability) before one big PR.
| **2 Slice + audit** | [slicing.md](references/slicing.md), [review.md](references/review.md) | Slice per slicing order (CODEOWNERS → deps → mechanical/behavioral → BBA/dark-ship → noise). One chain only—no parallel PRs off `main`. Splittability edits when `git add -p` won't compile or yield one question. **Audit:** each PR passes [review.md](references/review.md) and has an answer for every Phase 4 row below. Revise or `NEEDS DECISION`. Flag mergeability per [AGENTS.md](../../../AGENTS.md) (SO: one model version/type/PR; privileges: deprecation skill ordering). |
| **3 Plan** | [plan-template.md](references/plan-template.md) | Write `split-plan-<slug>.md` (repo root or primary plugin dir—state path). Follow schema; **self-check:** every PR has all 7 fields. |
| **4 Gate** | — | **Stop.** No branches, commits, push, PRs. Present plan (see below). Ask: **Plan only** \| **Approve and execute split**. Do not bundle draft PRs. |
| **5 Execute** | [execution.md](references/execution.md) | Backup: `SHA=$(git stash create "pre-split"); [ -n "$SHA" ] && git update-ref "refs/backup/pre-split-$(date +%s)" "$SHA"`. `git fetch upstream`. Per PR in order: splittability edits → branch from `upstream/main` or prior split branch → stage planned hunks only → commit → **`node scripts/check --scope branch --base-ref upstream/main`**—stop on fail → record branch + SHA + outcome. No push/`gh` unless asked (`origin` only). Leave original branch recoverable. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:actionable-obs PRs authored by the actionable obs team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants