Commit Graph
5 Commits
Author SHA1 Message Date
sebastian e36e87966d Plan: fix H3 spy tests + _render_pre trailing empty
Empirical audit (Stage 2) found 2 critical spy tests guarding the H3 keystone:
- test_register_multilevel_numbering_creates_abstractNum_with_3_levels
- test_nested_bullet_list_uses_increasing_ilvl

Both passed when register_multilevel_numbering was mutated to 'return 1'
(no XML written). Rewrote both to BEHAVIORAL form: trace numId → w:num →
w:abstractNumId → w:abstractNum, assert THAT abstractNum has ilvl=[0,1,2].

Also: _render_pre now drops trailing empty line (text.split('\n') artifact).
2026-07-28 00:00:07 +03:00
sebastian 5891ed892c Plan: address Stage 1 re-review feedback
Fixes:
- CRITICAL: Task 2 Step 3 no longer overwrites md2doc.py — extends in place
- MAJOR: COMMON.keep_with_next_headings now wired into _render_heading
- MINOR: added test for keep_with_next assertion
- MINOR: Task 9 note about footer param preservation
- MINOR: _render_pre now preserves newlines via add_break()
- MINOR: Notes section documents fixture location, security, COMMON wiring
2026-07-27 23:51:21 +03:00
sebastian 5f8c2bdbc2 Plan: address Stage 1 reviewer feedback
Fixes:
- Critical: add Task 1.5 (_bulletize copy with complete code)
- Major: enrich STYLES dict (5 styles now visually distinct)
- Major: implement COMMON dict partial (keep_with_next on headings)
- Major: inline code now gets run-level shading (spec §4)
- Minor: heading color assertion added
- Minor: Task 5 Step 4.5 H3 keystone manual checkpoint (spec §4.2)
- Minor: Task 8 exact line numbers from Research Summary
- Minor: Task 10 renamed to characterization test
2026-07-27 23:46:45 +03:00
sebastian 64c77d27fc Update spec after Stage 1 + Stage 2 review
Stage 1 (textual): 12 issues found, all fixed (re-ran clean on major axes)
Stage 2 (empirical): 6 claims tested with real python-docx code
  - H1, H2, H4, H5: SURVIVED (XML manipulation routes verified)
  - H3: PARTIALLY-REFUTED — CRITICAL. List Bullet 2/3 style names exist
    but produce flat lists. Spec now mandates manual numbering XML.
  - B2: claim SURVIVED, presentational_hints hypothesis REFUTED.
    Decision: eliminate --forms from md2pdf (YAGNI).
2026-07-27 19:47:34 +03:00
sebastian 23deb7b3f5 Add md2doc design spec
Design for new md2doc.py (Markdown to DOCX converter) plus two bug-fixes
for md2pdf.py (--footer dead in CLI, --forms produces no AcroForm).

Spec includes 5 empirical hypotheses (H1-H5) about python-docx capabilities
that must be validated before implementation.
2026-07-27 19:34:57 +03:00