Context
5 PRs this session (2026-05-10) hit the same stale-branch + chore-sync contamination pattern:
| PR |
Resolved |
Stale-branch source |
Chore-sync commit |
Resolution |
| #11106 cycle 1 |
#11105 (template-adherence) |
Pre-merge sister branch |
chore: ticket sync [skip ci] |
Cycle-2 cleanup via cherry-pick |
| #11109 |
#11108 (window telemetry) |
(no stale-branch; only chore-sync) |
chore: ticket sync [skip ci] |
Cycle-2 cleanup via rebase |
| #11114 cycle 1 |
#11113 (issue chunking) |
(no stale-branch; only chore-sync + stray drafts) |
chore: ticket sync [skip ci] |
Cycle-2 cleanup via cherry-pick |
| #11129 |
#11126 (chunkPath unification) |
Pre-merge PR #11125's branch |
chore: ticket sync [skip ci] |
Cycle-2 cleanup pending (#11129 RA1) |
| #11132 |
#11131 (release-pipeline integration) |
Pre-merge PR #11130's branch |
(commits inherited from #11130's still-open branch) |
Awaiting #11129 cleanup propagation |
5 occurrences in <90 minutes is empirical evidence for systemic workflow gap, not 5 isolated incidents. Per feedback_substrate_scope_restraint: when same friction trips 2-3 cycles, treat as substrate-quality concern (not iteration target). 5 cycles is well past that threshold.
The Problem
Two distinct sub-patterns:
Stale-branch from peer's pre-merge branch. Branching feature work from another peer's still-open PR branch (rather than origin/dev) bundles their content into the new PR's diff. Substrate symptom: gh pr view --json files shows files from the other peer's PR alongside the actual feature work; review surface bloated; squash-merge collision risk.
Local sync-pipeline auto-bundles chore: ticket sync [skip ci] commits onto feature branches before push. Substrate symptom: branch contains both feature work AND auto-sync data; PR diff shows hundreds-of-files / thousands-of-LOC stat where actual feature is ~10-100 LOC.
Both produce the same outcome: review surface signal-to-noise asymmetry + squash-merge git-history pollution (per #11116 friction-gold lesson).
The Architectural Reality
feedback_branch_from_origin_dev_explicitly MEMORY.md entry codifies the discipline:
"branching from a peer's local branch (or current HEAD) in active multi-PR cycle conflates scope; PR diff includes the upstream-branch's commits"
But the discipline is discipline-only, not enforced. 5 occurrences this session demonstrates discipline alone is insufficient operationalization.
The chore: ticket sync [skip ci] auto-bundle source is presumed to be a local sync-pipeline (e.g., npm run ai:sync-content or equivalent) that writes to git-tracked content directories. When developer runs the sync mid-feature-work, the auto-commit gets staged onto the feature branch.
The Fix — Three Path Options
Path A (lowest cost): Documented branch-from-origin/dev mandate. Add explicit pre-flight to pull-request-workflow.md:
Before opening a PR, verify branch base:
git log origin/dev..HEAD --oneline
If output contains commits NOT belonging to your feature, rebase first:
git checkout -b agent/<ticket>-v2 origin/dev && git cherry-pick <feature-commits>
Path B (mechanical enforcement): pre-push git hook. Detect non-feature commits on the branch (e.g., chore: ticket sync patterns OR commits authored by other peers) and warn/block before push:
.git/hooks/pre-push:
- Check `git log origin/dev..HEAD --oneline` for chore-sync OR other-peer-authored commits
- Block if found; suggest cherry-pick rebuild
Path C (substrate-level): isolate sync-pipeline-output from feature branches. The chore: ticket sync auto-bundle is the recurring friction source. If sync-pipeline writes to a separate worktree OR commits to a dedicated branch (not whatever HEAD is checked out), feature branches stay clean.
My lean: Path A + Path B together. Path A makes the discipline visible; Path B catches misses mechanically. Path C is heavier substrate work; defer if A+B converges the pattern.
Acceptance Criteria
Out of Scope
- Modifying the local sync pipeline itself (that's Path C; defer until A+B convergence-tested)
- Cleanup of currently-in-flight PRs (#11129 RA1 + #11132 inherited stale-branch) — those are per-PR mechanical fixes; this ticket addresses the SOURCE
- AGENTS.md §0 invariant additions — this is value-tier discipline, not invariant-class
Avoided Traps / Gold Standards Rejected
Decision Matrix
Path A + Path B (discipline + mechanical enforcement) — Selected: Lowest implementation cost; addresses both sub-patterns (stale-branch + chore-sync). 5x empirical pattern this session demonstrates discipline alone is insufficient.
Path A only (documented mandate): Rejected. feedback_branch_from_origin_dev_explicitly already codifies the discipline; 5 occurrences this session post-codification demonstrates documentation alone fails.
Path C only (sync-pipeline isolation): Rejected as substrate-evolution scope-creep for this ticket. May become substrate-correct end-state once A+B is empirically validated; defer.
Per-PR cleanup discipline (continue current pattern): REJECTED. 5 occurrences in 90 minutes is the friction; continuing per-PR cleanup is treating symptom not source. Per feedback_substrate_scope_restraint: at 2-3 cycles of same iteration without convergence, choose Drop+Supersede / substrate-correct shape. We're at 5 cycles.
Operator-policing the discipline: Rejected. Per feedback_lead_role_decision_thresholds + just-codified Verdict-Authority discipline (#11102 / PR #11127): substrate gates should self-correct via codified peer-V-B-A; relying on operator surfacing each instance is the friction the MX loop converts to gold.
- Trap: Treating each PR's stale-branch as one-off + cleaning per-PR. Rejection: 5 same-session occurrences = pattern, not incidents.
- Trap: Codifying discipline without mechanical enforcement. Rejection: Empirically tested this session —
feedback_branch_from_origin_dev_explicitly was already-codified yet 5 PRs tripped it. Documentation alone is insufficient operationalization.
Related
feedback_branch_from_origin_dev_explicitly MEMORY.md entry (the existing discipline this ticket enforces)
- #11116 (sister friction-gold: code-vs-data-migration commit-shape; same family of "review surface signal-to-noise asymmetry" friction)
- PR #11106 cycle 1 / PR #11109 / PR #11114 cycle 1 / PR #11129 / PR #11132 — empirical-anchor cluster (5 PRs, 1 session)
pull-request-workflow.md (Path A target)
.git/hooks/pre-push (Path B target)
- AGENTS.md §13.2 friction → gold core value (this ticket IS the conversion artifact)
Origin Session ID: c2912891-b459-4a03-b2af-154d5e264df1
Retrieval Hint: "GH-content sync workflow-fragility", "stale-branch + chore-sync 5x pattern", "branch-from-origin/dev enforcement layer"
Context
5 PRs this session (2026-05-10) hit the same stale-branch + chore-sync contamination pattern:
chore: ticket sync [skip ci]chore: ticket sync [skip ci]chore: ticket sync [skip ci]chore: ticket sync [skip ci]5 occurrences in <90 minutes is empirical evidence for systemic workflow gap, not 5 isolated incidents. Per
feedback_substrate_scope_restraint: when same friction trips 2-3 cycles, treat as substrate-quality concern (not iteration target). 5 cycles is well past that threshold.The Problem
Two distinct sub-patterns:
Stale-branch from peer's pre-merge branch. Branching feature work from another peer's still-open PR branch (rather than
origin/dev) bundles their content into the new PR's diff. Substrate symptom:gh pr view --json filesshows files from the other peer's PR alongside the actual feature work; review surface bloated; squash-merge collision risk.Local sync-pipeline auto-bundles
chore: ticket sync [skip ci]commits onto feature branches before push. Substrate symptom: branch contains both feature work AND auto-sync data; PR diff shows hundreds-of-files / thousands-of-LOC stat where actual feature is ~10-100 LOC.Both produce the same outcome: review surface signal-to-noise asymmetry + squash-merge git-history pollution (per #11116 friction-gold lesson).
The Architectural Reality
feedback_branch_from_origin_dev_explicitlyMEMORY.md entry codifies the discipline:But the discipline is discipline-only, not enforced. 5 occurrences this session demonstrates discipline alone is insufficient operationalization.
The
chore: ticket sync [skip ci]auto-bundle source is presumed to be a local sync-pipeline (e.g.,npm run ai:sync-contentor equivalent) that writes to git-tracked content directories. When developer runs the sync mid-feature-work, the auto-commit gets staged onto the feature branch.The Fix — Three Path Options
Path A (lowest cost): Documented branch-from-origin/dev mandate. Add explicit pre-flight to
pull-request-workflow.md:Path B (mechanical enforcement): pre-push git hook. Detect non-feature commits on the branch (e.g.,
chore: ticket syncpatterns OR commits authored by other peers) and warn/block before push:Path C (substrate-level): isolate sync-pipeline-output from feature branches. The
chore: ticket syncauto-bundle is the recurring friction source. If sync-pipeline writes to a separate worktree OR commits to a dedicated branch (not whatever HEAD is checked out), feature branches stay clean.My lean: Path A + Path B together. Path A makes the discipline visible; Path B catches misses mechanically. Path C is heavier substrate work; defer if A+B converges the pattern.
Acceptance Criteria
pull-request-workflow.mdadds explicit branch-from-origin/dev pre-flight check with rebase remediation example.git/hooks/pre-push(or equivalent project-level hook config) detects + warns/blocks chore-sync OR peer-authored commits on feature branchesfeedback_branch_from_origin_dev_explicitlyMEMORY.md entry updated to reference this ticket as enforcement layerOut of Scope
Avoided Traps / Gold Standards Rejected
Decision Matrix
Path A + Path B (discipline + mechanical enforcement) — Selected: Lowest implementation cost; addresses both sub-patterns (stale-branch + chore-sync). 5x empirical pattern this session demonstrates discipline alone is insufficient.
Path A only (documented mandate): Rejected.
feedback_branch_from_origin_dev_explicitlyalready codifies the discipline; 5 occurrences this session post-codification demonstrates documentation alone fails.Path C only (sync-pipeline isolation): Rejected as substrate-evolution scope-creep for this ticket. May become substrate-correct end-state once A+B is empirically validated; defer.
Per-PR cleanup discipline (continue current pattern): REJECTED. 5 occurrences in 90 minutes is the friction; continuing per-PR cleanup is treating symptom not source. Per
feedback_substrate_scope_restraint: at 2-3 cycles of same iteration without convergence, choose Drop+Supersede / substrate-correct shape. We're at 5 cycles.Operator-policing the discipline: Rejected. Per
feedback_lead_role_decision_thresholds+ just-codified Verdict-Authority discipline (#11102 / PR #11127): substrate gates should self-correct via codified peer-V-B-A; relying on operator surfacing each instance is the friction the MX loop converts to gold.feedback_branch_from_origin_dev_explicitlywas already-codified yet 5 PRs tripped it. Documentation alone is insufficient operationalization.Related
feedback_branch_from_origin_dev_explicitlyMEMORY.md entry (the existing discipline this ticket enforces)pull-request-workflow.md(Path A target).git/hooks/pre-push(Path B target)Origin Session ID: c2912891-b459-4a03-b2af-154d5e264df1 Retrieval Hint: "GH-content sync workflow-fragility", "stale-branch + chore-sync 5x pattern", "branch-from-origin/dev enforcement layer"