| 110 | } |
| 111 | |
| 112 | function queueMergeCheck(branch, worktree) { |
| 113 | try { |
| 114 | const queueFile = path.join(PROJECT_ROOT, '.planning', 'telemetry', 'merge-check-queue.jsonl'); |
| 115 | const entry = JSON.stringify({ |
| 116 | event: 'worktree-removed', |
| 117 | timestamp: new Date().toISOString(), |
| 118 | branch, |
| 119 | worktree, |
| 120 | status: 'pending-merge-review', |
| 121 | }); |
| 122 | fs.appendFileSync(queueFile, entry + '\n', 'utf8'); |
| 123 | } catch { /* non-critical */ } |
| 124 | } |
| 125 | |
| 126 | function cleanupScopeClaims(worktreeName) { |
| 127 | if (!worktreeName) return; |