Resolve the integration issue where outline mode schema generation captured heading text correctly but draft generation didn't use it, resulting in generic placeholders instead of preserved document structure. Key changes: - Enhanced StubGenerator._extract_heading_text_from_schema() to extract actual heading text from enum constraints - Modified heading generation logic in _generate_content_from_headings() to use captured text - Fixed both H1 and H2+ heading handling to preserve source document structure - Added comprehensive test suite covering all outline mode functionality - Updated end-to-end test to reflect expected behavior (stubs vs full validation) Impact: - Outline schemas now properly integrate with draft generation - Generated drafts preserve actual heading text from source documents - End-to-end workflow: example → outline schema → draft maintains document structure - Backward compatibility maintained for existing functionality Tests: 8/8 passing in test_issue_46_schema_generation_outline.py Resolves: coulomb/markitect_project#46 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
15 KiB
15 KiB