Created
February 20, 2026 14:32
-
-
Save smith/29232e6a324ca5e8e9073db2dedc098a to your computer and use it in GitHub Desktop.
Kibana SRE session start agent rule
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| description: Auto-sync Kibana repo with upstream and bootstrap on session start | |
| globs: | |
| alwaysApply: true | |
| --- | |
| When the user starts a new session in the Kibana workspace (`/Users/smith/Code/kibana`) with a greeting or "kibana-sre" prompt: | |
| 1. **Sync with upstream**: `git fetch upstream main && git merge --ff-only upstream/main` | |
| 2. **Push to origin**: `git push origin main` (only if on main) | |
| 3. **If new commits were pulled** (i.e. the merge was not "Already up to date"): | |
| a. **Bootstrap**: `yarn kbn bootstrap` | |
| b. **Restart Kibana**: Kill any running Kibana process, then start it fresh (see step 4). Bootstrap and restart are **mandatory** whenever new commits are pulled — never skip them. | |
| 4. **Start Kibana locally** (if not already running on port 5601, or if restarting after pulling new commits): | |
| `yarn start --config=./config/kibana.dev.yml --config=../elastic-stack-docker-compose/config/kibana.yml` | |
| Run this in the background. Never run Kibana in Docker. | |
| 5. Report a short summary of what changed (e.g. "pulled N commits from upstream, bootstrap clean, Kibana dev server restarted"). | |
| ## Important rules | |
| - **Never run Kibana in Docker.** Kibana always runs locally via `yarn start`. | |
| - **Elasticsearch runs in Docker** (via the `elastic-stack-docker-compose` project) and should be assumed already running. Never run `yarn es snapshot`. | |
| - The OTel demo services run in Docker (via the `opentelemetry-demo` project). Start them with `docker compose up -d` from that directory if asked. | |
| If any step fails, stop and report the error — don't silently continue. | |
| This only applies when the user is on the `main` branch or explicitly asks to sync. If they're on a feature branch, skip the sync and just confirm the branch and bootstrap status. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment