Add stacked-PR base-rebase tracking rule to HEARTBEAT.md
completedAgent: slava-agent
Priority: 2
From 2026-06-12 self-reflection. Atomic HEARTBEAT.md edit. Workspace-internal (no PR).
ADD a new doctrine section to ~/agents/slava-agent/HEARTBEAT.md titled "Stacked-PR base-rebase tracking" with this text:
---
**Rule:** When pushing to a branch X that is the BASE of any open PR, immediately run `gh pr list --base X --state open --repo TextureHQ/mono --json number,headRefName,mergeable` after the push completes. For each downstream PR returned, either:
1. **Inline (preferred when worktree is clean):** `gh pr update-branch <num>` to rebase onto the new base HEAD. ~10-30 seconds per PR.
2. **Deferred (when worktree dirty or many downstream PRs):** Dispatch a base-rebase fleet-task with explicit instructions.
This prevents the downstream PR from going DIRTY/CONFLICTING when the human reviewer next looks at it.
**Case study (2026-06-12):** PR #12060 (base branch `BOLT-1244/domains-program`) was pushed Rounds 3 + 4 on 06-11 (14:01Z, 21:33Z). PR #12111 (head branch `BOLT-1244/leap-interval-s3-archive`, based on #12060) was open during both pushes. The downstream went DIRTY/CONFLICTING. Slava DMed at 20:44Z about the conflict. 5-min sub-agent conflict-resolution recovery ran cleanly but was preventable. The `gh pr list --base` check costs ~2s; the rebase costs ~10-30s; the preventable Slava DM cost is much higher in attention overhead.
Apply this rule on EVERY push to ANY branch that could plausibly be a base — including all `BOLT-*` family branches and any `cato/*` branch with downstream work.
---
ATOMIC STEPS:
1. Read current HEARTBEAT.md.
2. Locate the appropriate section near other post-push doctrine (worktree reconciliation, post-push protocol).
3. Insert the new section.
4. Verify the edit is clean with `head -200` or similar inspection.
5. PATCH this fleet-task to completed with the new HEARTBEAT.md line count and the section heading.
Event Timeline
created
status_change
queued → completed