pr-workflow
Enforces the PR-first workflow across all @theholocron repositories.
Invoke as: /pr-workflow
Trigger: opening a PR, merging, closing a PR, creating a branch.
Core rules
Section titled “Core rules”- Always open a PR — never push directly to the default branch. Even for small fixes: create a branch, push, open a PR. This lets CI run and keeps history reviewable.
- One PR = one focused change. Squash-merge; the PR title becomes the squashed commit subject that semantic-release reads.
- File issues for non-trivial work and reference them in commits/PRs (
Closes #N/Refs #N). Skip for typo fixes.
Before pushing
Section titled “Before pushing”Run holocron ci — it runs exactly the merge-gating checks locally, in CI order, and exits non-zero on the first failure. Finding failures after pushing wastes a review round trip. (Equivalent: pnpm typecheck && pnpm lint && pnpm test && pnpm build.) protection: "strict" repos install a pre-push git hook that runs it automatically; git push --no-verify bypasses that hook once.
Opening a PR
Section titled “Opening a PR”- Create a branch from the correct base (usually
main;alphain holocron) - Push:
git push -u origin <branch> - Open with
gh pr create— title must follow Conventional Commits format
Merging
Section titled “Merging”Squash-merge only. The PR title becomes the single commit on the base branch and must follow Conventional Commits so semantic-release computes the correct version bump.
Closing / discarding
Section titled “Closing / discarding”Delete the branch when closing — never close the PR and leave the branch. A closed-but-existing branch blocks future PR creation for the same branch name (GitHub returns 422).
gh pr close <n> --repo <owner>/<repo> --delete-branch