name: infra description: "Make infrastructure changes safely: create a branch first, apply changes in logically grouped commits, and push. Use when modifying docker-compose files, CI/CD workflows, Traefik config, Dockerfiles, or any file under infra/ or .github/workflows/." argument-hint: "<change description> — describe the infrastructure change to make"
Infra Changes Workflow
Before touching any files, set up a branch. Then apply changes in logical batches, each with its own commit. Finally push.
Change requested: $ARGUMENTS
Step 0 — Pre-flight checks
Run the following checks before doing anything else. If any check fails, stop and inform the user — do not proceed.
-
Check for uncommitted or unstaged changes:
git status --porcelainIf the output is non-empty, cancel with:
"There are uncommitted or unstaged changes in the working tree. Please commit, stash, or discard them before proceeding with infra changes."
-
Ensure you are on
main:git branch --show-currentIf the current branch is not
main, cancel with:"You are currently on branch
<branch>, notmain. Please switch tomainbefore starting infra changes." -
Pull the latest
main:git pull origin mainConfirm the pull succeeded before continuing.
Step 1 — Create a branch
Derive a short, descriptive branch name from the user's request using the prefix infra/ (e.g. infra/split-deploy-jobs, infra/traefik-ssl-config).
Run:
git checkout -b <branch-name>
Confirm the branch was created before proceeding.
Step 2 — Apply changes in logical batches
Group the planned changes by concern. Each group becomes one commit. Typical groupings for this repo:
- CI/CD — files under
.github/workflows/ - Container config —
Dockerfile,Dockerfile.prod,Dockerfile.migrate - Compose / infra — files under
infra/(docker-compose files, traefik config) - Mixed — if a change spans groups, split by layer (e.g. compose changes first, then workflow changes that depend on them)
For each batch:
- Make the file edits.
- Stage only the files for that batch:
git add <files> - Commit with a concise imperative message:
git commit -m "<what and why>"
Do not mix unrelated files in a single commit.
Step 3 — Push the branch
git push -u origin <branch-name>
Step 4 — Done
Report to the user:
- Branch name
- Commit SHA(s) (from
git log --oneline origin/main..HEAD)
Run /pr to open the pull request when ready.
Architecte Docker Compose
DevOps
Concoit des configurations Docker Compose optimisees.
Rapport de Post-Mortem
DevOps
Rédige des rapports post-mortem d'incidents structurés et blameless.
Créateur de Runbooks
DevOps
Crée des runbooks opérationnels clairs pour les procédures DevOps courantes.