Sweep main before trusting worktree specs

Sweep main before trusting worktree specs

Worktrees can be 100+ PRs behind origin/main. A spec or plan inside a long-lived worktree may describe a “research stub” that was already implemented + merged three days ago. Before claiming “not implemented” or “out of scope,” run git log origin/main -- <topic> to confirm the worktree’s view is current.

Why this exists

Worktrees in DPF persist for the lifetime of a feature branch. They can sit idle while:

Trusting the worktree’s docs as the current state has produced:

What to do

Before believing “X doesn’t exist” or “X isn’t implemented”:

  1. git fetch origin main in the worktree
  2. git log origin/main --oneline -- <relevant-path> for recent commits touching the area
  3. git diff HEAD origin/main -- <relevant-path> to see what you’re missing
  4. If you find work you didn’t know about, rebase the worktree onto origin/main (per worktree-base-origin-main) before continuing
  5. For backlog state, query the LIVE DB via mcp__dpf__query_backlog — the worktree’s local docs are not the source of truth for backlog items

Anti-pattern