---
key: process.pr-routine-sequence
title: '2026-07-21 — The PR routine is a fixed sequence: validate locally, then push, then only follow-up commits (#542)'
status: active
since: '2026-07-21'
supersedes: none
superseded-by: none
rule: Worktree off origin/main → implement → regenerate API artifacts → full local tests + cold review + live-E2E ALL before the push → push, open PR, arm the CI monitor at open → fixes after the push are follow-up commits, never amend/force-push.
signals: 'PR routine · worktree off origin/main · `./scripts/update-openapi.sh` · `npm run generate:api` · cold-context review · CI monitor at PR open · no force-push on a pushed branch · derived-consent merge gate · paths: `scripts/update-openapi.sh`, `scripts/e2e-local.sh` · issues: #542'
mechanics: 'CI watch by commit status: `/api/v1/repos/timothy/ersatztv/commits/{sha}/status`. Merge via the derived-consent gate (`pretooluse-merge-consent.sh`).'
---

The sequence: create a worktree off `origin/main`; implement; for **API changes build the app project
FIRST**, then `./scripts/update-openapi.sh`, then `npm run generate:api` (order matters — the generator
reads the built app's spec). Then run the full local test pass, a cold-context adversarial review
scoped to "review only", and live-E2E for UI/write-path changes — **all before the push**. Fold
pre-push fixes into the branch; amend/reword is fine while nothing is pushed.

Then push, open the PR, and arm the CI monitor **at open**, not at the end. Once the branch is pushed,
every further fix — a post-push cross-model pass, or a CI-surfaced issue — lands as a **follow-up
commit**; never amend or force-push a pushed branch. On green, merge through the derived-consent gate
and write the structured close comments the applicable `AGENTS.md` / `CLAUDE.md` protocol requires.
