Opening PRs A graph that turns the imperative "create branch, push files, open a PR, poll mergeable state" workflow into a structural DAG. The "NEVER push directly to main" rule is encoded as a gate that physically can't be skipped. What this fixes The workflow (or hand-rolled API calls) has five steps in prose form: 1. Determine the branch name 2. Get the base branch's HEAD SHA 3. Create the branch 4. Push files to the branch 5. Create the PR 6. Poll until GitHub finishes computing it Each step has known failure modes: - Step 1 : Accidentally pushing to — the diagnosed pattern that motivated…