Summary
Replace the heuristic markdown import parser with markdown-it-py AST parser for more reliable section splitting.
Motivation
Current parser uses regex-based heading detection which can misparse edge cases (headings in code blocks, non-standard markdown).
Technical Approach
- Replace heuristic parser in prd_import_markdown with markdown-it-py
- Parse to AST, walk tree to find heading nodes
- Split content at h2 boundaries (configurable heading level)
- Preserve code blocks, lists, and other markdown structures correctly
Key Files
- mcp_server/tools/import_tools.py — prd_import_markdown implementation
- requirements.txt — add markdown-it-py
Acceptance Criteria
Summary
Replace the heuristic markdown import parser with markdown-it-py AST parser for more reliable section splitting.
Motivation
Current parser uses regex-based heading detection which can misparse edge cases (headings in code blocks, non-standard markdown).
Technical Approach
Key Files
Acceptance Criteria