For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Extend scripts/normalize_wp_quotes.py so wp:quote paragraphs with harmless <p> attributes, <br /><br /> paragraph breaks, empty spacing paragraphs, and link-only paragraphs count as safe, while keeping file-level skip reporting for any still-unsupported quote blocks.
Architecture: Make a narrow parser change in the quote normalizer rather than broadening the entire HTML model. Add tests first for the new paragraph shapes, then implement the minimal matcher and rendering update, then rerun the dry-run normalizer to inspect which files still skip and why.
Tech Stack: Python 3, unittest, regex parsing, markdown generation for Jekyll posts
Files:
Modify: tests/test_normalize_wp_quotes.py
Step 1: Add a failing unit test for <br /><br /> paragraph splitting
Cover a wp:quote block whose paragraph content includes <br /><br /> and assert the markdown output becomes:
> Paragraph one.
>
> Paragraph two.
id attributeUse the user-provided third-block example shape and assert the paragraph itself is now considered safe.
Cover:
<p></p> becoming ><p><a href="...">Title</a></p> becoming > [Title](...)
Construct a post with:
Assert the whole file remains skipped and that a reason is still reported.
Run:
python3 -m unittest tests/test_normalize_wp_quotes.py
Expected: FAIL on the new cases before implementation.
Files:
scripts/normalize_wp_quotes.pyModify: tests/test_normalize_wp_quotes.py
<p> attributesAdjust the paragraph parser so <p> tags with attributes like id still match as safe quote paragraphs.
<br /><br /> as a markdown paragraph breakImplement the smallest possible rendering change so double breaks become:
>
between quote paragraphs instead of collapsing into one run-on block.
Implement the smallest possible support for:
<p></p> as >single-anchor paragraphs as > [text](url)
Do not relax support for:
wp:quotelink-only quote paragraphs are supported in this scope
Run:
python3 -m unittest tests/test_normalize_wp_quotes.py
Expected: PASS
Files:
scripts/normalize_wp_quotes.pyVerify: _posts/
Run:
python3 scripts/normalize_wp_quotes.py
Check whether _posts/2025-07-21-negativity-blackholes-unburdening-and-resilience.md now:
still skips but with a more precise remaining blocker
Capture the current skip list so the user can provide the next safe-shape suggestion from a concrete backlog instead of guessing.
Files:
tests/test_normalize_wp_quotes.pyVerify: scripts/normalize_wp_quotes.py
Run:
python3 -m unittest tests/test_normalize_wp_quotes.py
Expected: PASS
Verify the implementation changes are limited to:
no unrelated content rewrites
Make sure the final report still includes which files remain skipped, because the user explicitly wants that list to drive the next cleanup rule.