Batch ws-1-3-the-purpose-of-human-life — REVIEW
Content-cleanup variant per ADR-0009. Stage-2 cleanup of WS-II Chapter 3 (“The Purpose of Human Life”), Part 1 (“God and the Creation”). Second Phase B chapter.
What changed
- New (8 files):
resources/WorldScripture/Part1/Chapter03-the-purpose-of-human-life/ws-{NN-subtheme-slug}.md. Per-sub-theme files; line counts 110–237. - Intermediate (1 file, staging-only):
staging/ws-1-3-the-purpose-of-human-life/resources/WorldScripture/Part1/ws-1-3-the-purpose-of-human-life.md. - Modified:
scripts/clean_ws_chapter.py— extended to handle Ch3-specific patterns discovered while processing this batch (see below).
Sub-theme files produced
| File | Lines | Sub-sub-themes | SMM blocks | Footnotes used |
|---|---|---|---|---|
ws-01-for-god-s-good-pleasure.md | 142 | 2 | 2 | (none) |
ws-02-the-image-of-god.md | 213 | 3 | 2 | 1–2 |
ws-03-the-temple-of-god.md | 129 | 0 | 1 | 3–6 |
ws-04-sons-and-daughters-of-god.md | 110 | 2 | 2 | (none) |
ws-05-the-value-of-human-life.md | 237 | 4 | 4 | 7–10 |
ws-06-conscience-and-inborn-goodness.md | 180 | 2 | 2 | 11–13 |
ws-07-perfection.md | 211 | 3 | 3 | 14–15 |
ws-08-joy.md | 188 | 3 | 3 | (none) |
15 inline footnote markers converted (= ch3’s full back-matter count). Per-file footnote refs == defs in every sub-theme file (total: 2+4+4+3+2 = 15).
Cleanup decisions (script-applied)
Same set of transformations as Ch2 (heading re-leveling, italics strip, SMM rename, blockquote unwrap, footnote-marker conversion, word-break fixes, frontmatter). Two new patterns Ch3 surfaced — scripts/clean_ws_chapter.py extended in this batch:
- Numbered sub-sub-themes at H2 depth. Ch2 used
### *N. Title*; Ch3 uses## *N. Title*(Marker collapsed heading depth differently).NUMBERED_SUBSUB_REwidened to accept either##or###before the italic-number prefix. - SMM blocks at H2 depth. Likewise,
SMM_REextended to recognize## *Teachings of Sun Myung Moon*in addition to the####,###, and bare forms. - Inline footnote markers with non-period preceding punctuation. Ch3 introduced
stay!4(exclamation) andtrue,14(comma), plustrue?15(question mark). The lookbehind character class for the footnote-marker regex extended to include! ? ,. - Single-uppercase-letter Sikh citation form.
Adi Granth, Gaund, M.4, p. 861— theM.4is “Master 4,” not a footnote marker. Added negative lookbehind(?<![A-Z]\.)so single-cap-period-digit patterns are skipped. - Decimal verse references following the footnote candidate.
(Matt. 5.48)would otherwise have been caught by the orphan-space fallback regex as a footnote-5 marker. Added trailing(?!\.\d)lookahead so candidates that turn out to be the first half of a<digit>.<digit>are skipped.
Ch2 regression-tested after these script changes — output byte-identical to the committed Ch2 batch.
Flagged for human review
-
SMM number-prefix convention preserved per the feedback_smm_prefix decision (user-confirmed at Ch2 finalize).
-
Blockquote strips (10 in this chapter, vs 4 in Ch2) — all attribution lines that Marker wrapped in
>. Each surfaced inflag-log.txt. Significantly more than Ch2; if a future chapter pushes this past ~20 it’d warrant investigating why Marker is wrapping so aggressively, but for now the script’s auto-strip behaviour is the right call. -
II8form (raw line 669:Pope John Paul II8 (*Christianity)*) — footnote8follows the Roman numeralII. The pattern<alpha>(\d)caught it correctly. Worth noting in case a future chapter hasIII+ digit or similar. -
Tradition-tag italics kept as-extracted per pilot convention.
-
Mid-paragraph hard breaks preserved.
Verification
# Frontmatter validates.
head -16 resources/WorldScripture/Part1/Chapter03-the-purpose-of-human-life/ws-01-for-god-s-good-pleasure.md
# Per-file footnote ref/def match.
for f in resources/WorldScripture/Part1/Chapter03-the-purpose-of-human-life/ws-*.md; do
refs=$(awk 'BEGIN{p=1} /^## Footnotes/{p=0} p' "$f" | grep -oE '\[\^[0-9]+\]' | sort -u | wc -l)
defs=$(awk '/^## Footnotes/,0' "$f" | grep -cE '^\[\^')
echo "$(basename $f): refs=$refs defs=$defs"
done
# Ch2 regression-check (clean_ws_chapter.py changes shouldn't alter Ch2 output).
uv run scripts/clean_ws_chapter.py \
--input resources-raw/WorldScripture/extracted/01-god-and-creation/chapter-2-truth-and-universal-law.md \
--output /tmp/ch2-recheck.md --part 1 --part-title "God and the Creation" --chapter 2
diff <(grep -oE '\[\^[0-9]+\]' /tmp/ch2-recheck.md | sort -u) \
<(grep -oE '\[\^[0-9]+\]' resources/WorldScripture/Part1/Chapter02-truth-and-universal-law/*.md | sort -u | cut -d: -f2)Finalize plan
When user approves:
cp staging/ws-1-3-the-purpose-of-human-life/REVIEW.md _meta/batch-reviews/ws-1-3-the-purpose-of-human-life.mdmv staging/ws-1-3-the-purpose-of-human-life/resources/WorldScripture/Part1/Chapter03-the-purpose-of-human-life/ws-*.md resources/WorldScripture/Part1/Chapter03-the-purpose-of-human-life/- Delete staging dir per 9c5d7a3 convention.
- Commit; Ch4 follows.
Out of scope
- Chapters 4–22 (19 batches remaining).
- Front/back-matter (Phase C).
- Atomization (stage-3).