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

FileLinesSub-sub-themesSMM blocksFootnotes used
ws-01-for-god-s-good-pleasure.md14222(none)
ws-02-the-image-of-god.md213321–2
ws-03-the-temple-of-god.md129013–6
ws-04-sons-and-daughters-of-god.md11022(none)
ws-05-the-value-of-human-life.md237447–10
ws-06-conscience-and-inborn-goodness.md1802211–13
ws-07-perfection.md2113314–15
ws-08-joy.md18833(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_RE widened to accept either ## or ### before the italic-number prefix.
  • SMM blocks at H2 depth. Likewise, SMM_RE extended 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) and true,14 (comma), plus true?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 — the M.4 is “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

  1. SMM number-prefix convention preserved per the feedback_smm_prefix decision (user-confirmed at Ch2 finalize).

  2. Blockquote strips (10 in this chapter, vs 4 in Ch2) — all attribution lines that Marker wrapped in >. Each surfaced in flag-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.

  3. II8 form (raw line 669: Pope John Paul II8 (*Christianity)*) — footnote 8 follows the Roman numeral II. The pattern <alpha>(\d) caught it correctly. Worth noting in case a future chapter has III + digit or similar.

  4. Tradition-tag italics kept as-extracted per pilot convention.

  5. 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:

  1. cp staging/ws-1-3-the-purpose-of-human-life/REVIEW.md _meta/batch-reviews/ws-1-3-the-purpose-of-human-life.md
  2. mv 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/
  3. Delete staging dir per 9c5d7a3 convention.
  4. Commit; Ch4 follows.

Out of scope

  • Chapters 4–22 (19 batches remaining).
  • Front/back-matter (Phase C).
  • Atomization (stage-3).