These rules apply to every developer and AI agent opening pull requests in this repository.
Open PRs from branches in PolicyEngine/policyengine-api-v2, not from personal
forks. CI and deployment checks are designed around same-repository branches.
Before creating or sharing a PR:
- Confirm the canonical repository is reachable:
gh repo view PolicyEngine/policyengine-api-v2 --json nameWithOwner. - Open a GitHub issue for the work, or verify that an appropriate issue already exists.
- Put
Fixes #ISSUE_NUMBERas the first line of the PR description, using the issue number from the issue created or found in the previous step. - Run formatting and the most relevant tests for the changed surface. If an expected check cannot be run, say so in the PR body.
- Push the current branch to the canonical repository:
make push-pr-branch. - Create the PR as a draft from that same repository:
gh pr create --draft --repo PolicyEngine/policyengine-api-v2 --head "$(git branch --show-current)" --base main. - Verify the PR is draft and the head repository is canonical:
gh pr view <PR> --repo PolicyEngine/policyengine-api-v2 --json isDraft,headRepositoryOwner,headRepository. - Leave the PR as draft unless a maintainer explicitly asks for it to be marked ready for review.
The PR is valid only if isDraft is true and the head repository is
PolicyEngine/policyengine-api-v2. If you cannot push to the canonical
repository, stop and ask for access. Do not create a fork PR as a fallback. If
you accidentally create one, close it immediately and replace it with a
same-repository draft PR.
Do not add [codex], [claude], [copilot], or other agent labels to PR
titles. Use a plain descriptive title.