Parallel `phase add` invocations each read disk state before any write completes, causing all processes to calculate the same next phase number and produce duplicate directories and ROADMAP entries. The new `add-batch` subcommand accepts a JSON array of phase descriptions and performs all directory creation and ROADMAP appends within a single `withPlanningLock()` call, incrementing `maxPhase` within the lock for each entry. This guarantees sequential numbering regardless of call concurrency patterns. Closes #2165 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
94 KiB
94 KiB