pre-submit-pr
Pre-Submit PR Check
Comprehensive validation before submitting a pull request. Run this before creating or updating a PR.
Instructions
-
Check branch freshness (BLOCKING):
- Run
git fetch origin mainto get latest main - Run
git rev-list --count HEAD..origin/mainto check commits behind - If > 0 commits behind, merge main before proceeding:
git merge origin/main - This prevents "branch out of date" issues on GitHub
- Run
-
Run all automated hooks:
bash .claude/hooks/lint.sh- format check (includes ruff format + ruff check)bash .claude/hooks/test.sh- run testsbash .claude/hooks/check-debug.sh- find debug code
More from meta-pytorch/openenv
write-tests
Write failing tests from requirements. Invoke for each todo before /implement.
25simplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
20alignment-review
Review code changes for bugs and alignment with OpenEnv principles and RFCs. Use when reviewing PRs, checking code before commit, or when asked to review changes. Implements two-tier review model.
20rfc-check
Determine if proposed changes require an RFC. Use when planning significant changes, before starting major work, or when asked whether an RFC is needed.
19implement
Make tests pass. Invoke after /write-tests produces failing tests.
17work-on-issue
Start work on a GitHub issue. Extracts requirements, creates worktree, sets up TDD workflow.
17