PR Gates
DevOps & Securitypr-gatesPR Gates is an Agent Skill for devops & security published in the spacedriveapp/spacebot repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
This skill should be used when the user asks to "open a PR", "prepare for review", "address review comments", "run gates", or "verify before pushing" in this repository. Enforces preflight/gate workflow, migration safety, and review-evidence closure.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/spacedriveapp/spacebot/blob/HEAD/.agents/skills/pr-gates/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/pr-gates, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
PR Gates
Mandatory Flow
- Run
just preflightbefore finalizing changes. - Run
just gate-prbefore pushing or updating a PR. - If the same command fails twice in one session, stop rerunning and switch to root-cause debugging.
- Do not push when any gate is red.
Review Feedback Closure
For every P1/P2 review finding, include all three:
- Code change reference (file path and concise rationale)
- Targeted verification command
- Pass/fail evidence from that command
Async And Stateful Changes
When touching worker lifecycle, cancellation, retries, state transitions, or caches:
- Document terminal states and allowed transitions.
- Explicitly reason about race windows and idempotency.
- Run targeted tests in addition to broad gate runs.
- Capture the exact command proving the behavior.
Migration Safety
- Never edit an existing file in
migrations/. - Add a new timestamped migration for every schema change.
- If a gate flags migration edits, stop and create a new migration file.
Handoff Format
- Summary
- Changed files
- Gate commands executed
- P1/P2 finding-to-evidence mapping
- Residual risk