Status: done (2026-11-24) Priority: 2 Size: M Design ref: BACKLOG.md, How this backlog works (renumbering); tools/inbox.js (init, start); tools/backlog.js new; docs/agents/worker.md; docs/plans/VB-1677-conflicts.md Goal: Two sessions never keep the same new task ID: a new ID is taken past every branch in flight, and what still collides is renumbered by a tool, not by hand Acceptance criteria:
tools/backlog.js new, tools/inbox.js init and start) is above the highest task file on main and on every origin branch pushed in the last 14 days (read with git ls-tree, after a git fetch the caller runs; the tools do not fetch); a branch not fetched is said, not guessed. The rule in “How this backlog works” says so.node tools/renumber.js --onto REF (REF the branch about to be merged in, usually origin/main): the IDs this branch added (task files added since the merge base) that REF added too are renumbered, with every ID the branch added after the first of them, in order, to REF’s next free IDs (the rule: the highest file on REF, plus one). It renames the task files and rewrites the IDs in the files the branch changed (an added ID cannot appear in a line from before the branch), commits “Backlog: this branch’s tasks renumbered, VB-a to VB-b (REF took VB-c to VB-d)”, and prints the map. --dry prints the map only.tools/inbox.js), so a run that merges main mid-night goes on.docs/agents/worker.md (preflight, merging main, wrap-up) and the guide to writing a task (VB-1677) run it before every merge of main; a session with Kim does likewise.git log --grep renumbered), the tool’s map equals the one made by hand on at least 3 of them, and the merge that followed has no task-file conflict.tests/renumber.js on a scratch repository: two branches add the same IDs; renumbered, the merge has no conflict in backlog/ and tests/backlog.js passes; an unrelated ID in a line from before the branch is untouched. npm test and npm run verify pass; a row in docs/agents/changes.md.
Notes:.git: it keeps a run’s sub-agents apart already, but cannot see another session’s container, where the collisions come from.refs/vb-ids/<first ID> reserves a block atomically. It needs push rights beyond a session’s own branch. Proposed: not now; avoid plus repair first, and measure what collides still.tools/lib/ids.js (115 branches read in about 0.3 s), tools/renumber.js, inbox.js renumber. Decided: only the IDs that meet move (the criterion said every ID after the first; 7 of the hand renumberings moved only those, and it changes the fewest files), above REF’s, the branch’s own and the branches in flight; a file named after a task (docs/plans/VB-N-*) is renamed with it.