ruver-validate-branchlisted
Install: claude install-skill ruverd/skills
# Ruver Validate Branch — Orchestrator
Pre-PR validation pipeline. Take a branch from "I think it's done" to "ready to merge".
```
SETUP → ANALYZE (parallel) → DECIDE → AMBIGUITIES (pt-BR) →
FIX → SIMPLIFY → TESTS → VERIFY → PUSH/PR → SUMMARY
```
The command file is the thin entry point; this skill owns the workflow.
## Tone
- **Final diff, commits, PR body, summary**: English (Conventional Commits).
- **Interactive prompts to the author**: Portuguese (pt-BR), grill-me style — one question at a time, with a recommended answer.
## Prerequisites
- `gh` authenticated.
- Branch has ≥ 1 commit ahead of `main` (or `master`).
- Working tree clean — if dirty, ask in pt-BR whether to stash, commit, or stop. Don't silently leave changes uncommitted (the FIX stage will commit).
---
## Stage 0 — Setup
Pick the mode by `$ARGUMENTS`:
- **PR mode** — `$ARGUMENTS` is a URL or plain number.
- Parse `OWNER`, `REPO`, `PR_NUMBER`. URL → split. Plain number → use `origin` of current repo.
- `gh pr view PR_NUMBER --repo OWNER/REPO --json headRefName,headRefOid,baseRefName,isDraft,mergeStateStatus,state`.
- Save `HEAD_SHA`, `BASE_BRANCH`, `HEAD_BRANCH`.
- Verify local branch matches `HEAD_BRANCH`. If not → ask in pt-BR whether to `git checkout HEAD_BRANCH` or stop.
- Set `PR_REF = OWNER/REPO#PR_NUMBER`. Set `HAS_PR = true`.
- **Pre-PR mode** — `$ARGUMENTS` empty.
- `HEAD_BRANCH` = current branch. Reject if it equals base.
- `BASE_BRANCH` = `main` (or `master`).
- Check