| 190 | return { current: 0, total: 0, label: 'No phase table' }; |
| 191 | } |
| 192 | |
| 193 | function lastDecision(content) { |
| 194 | const sectionMatch = content.match(/^##\s+Decision Log\s*\r?\n([\s\S]*?)(?=^##\s+|\s*$)/m); |
| 195 | if (!sectionMatch) return null; |
| 196 | const section = sectionMatch[1]; |
| 197 | const decisions = section.split(/\r?\n/) |
| 198 | .map((line) => line.trim()) |
| 199 | .filter((line) => line.startsWith('- ')); |
| 200 | return decisions.length > 0 ? decisions[decisions.length - 1].replace(/^- /, '') : null; |
| 201 | } |
| 202 | |
| 203 | function completionRecordSummary(content) { |