- Replace single-pass multiline regex with heading match + slice approach to avoid lazy quantifier issues - Fix section extraction to correctly handle File Scope as both mid-file and last section - Add tests for File Scope followed by another heading, at end of file, missing section, missing PROMPT.md, and glob patterns