Batch ws-2-8-religion — REVIEW

Content-cleanup variant per ADR-0009. Stage-2 cleanup of WS-II Chapter 8 (“Religion”), Part 2 (“Sin and Salvation”). Seventh Phase B chapter.

What changed

  • New (9 files): resources/WorldScripture/Part2/Chapter08-religion/ws-{NN-subtheme-slug}.md. Per-sub-theme files; line counts 121–224.
  • Intermediate (1 file, staging-only): staging/ws-2-8-religion/resources/WorldScripture/Part2/ws-2-8-religion.md.
  • Modified: scripts/clean_ws_chapter.py — added --chapter-title CLI override for the case where Marker dropped the title line (see below).

Sub-theme files produced

FileLinesSub-sub-themesSMM blocksFootnotes used
ws-01-the-purpose-of-religion.md148331
ws-02-one-truth-many-paths.md187222–5
ws-03-tolerance-religious-freedom-and-interfaith-solidarity.md180336–8
ws-04-shamanism-polytheism-and-animism.md180229–13
ws-05-buddhism.md1313314–21
ws-06-confucianism.md1362222–26
ws-07-judaism.md1844427–31
ws-08-christianity.md2244432–34
ws-09-islam.md1212235–40

40 inline footnote markers converted (= Ch8’s full back-matter count in ws-notes.md). Per-file footnote refs == defs (sum: 1+4+3+5+8+5+5+3+6 = 40).

Cleanup decisions (script-applied)

Same base transformations as Ch2–Ch7. One new pattern Ch8 surfaced:

  • Missing chapter title at top of raw file. Ch8’s raw chapter-8-religion.md starts directly with ## The Purpose of Religion (a sub-theme) — no ## Religion heading. Without intervention the cleaner would have consumed “The Purpose of Religion” as the chapter title and demoted the rest of the sub-themes by one structural level. Added --chapter-title optional CLI flag to scripts/clean_ws_chapter.py: when supplied (--chapter-title "Religion" for this batch), the auto-detection is skipped and the first ## is treated as the first sub-theme. The state.chapter_title is pre-seeded for use in frontmatter.

    This same pattern may show up on later chapters Marker mangled similarly; if so the same --chapter-title flag is the fix. Strictly opt-in — when not supplied, behaviour is unchanged from the prior version.

Ch2–Ch7 regression-tested unchanged on all six.

No manual fixes needed

No SMM marker mashed into body lines this chapter. No ## Chapter N artifact. No orphan-space footnote conversions — all 40 markers matched the primary regex.

Flagged for human review

  1. --chapter-title override invoked for this batch (only). Recorded in the finalize-plan commands below so the run is reproducible.

  2. Blockquote strips (7) — all attribution lines Marker wrapped in >. Tradition tags include Korean Shamanism, Winnebago/Igbo, Dalai Lama, ‘Abdul’l-Bahá — broader source coverage than prior chapters but the strip pattern is identical.

  3. SMM number-prefix convention preserved per feedback_smm_prefix.

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

  5. Cleanest chapter so far — 0 manual fixes, 0 SMM mashes, 0 orphan-space footnote conversions. Marker did good work on this one.

Verification

head -16 resources/WorldScripture/Part2/Chapter08-religion/ws-01-the-purpose-of-religion.md
# Frontmatter `title:`, `chapter-title:`, and the per-file slug should reflect the override.
 
for f in resources/WorldScripture/Part2/Chapter08-religion/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–Ch7 regression — all unchanged.

Finalize plan

When user approves:

  1. cp staging/ws-2-8-religion/REVIEW.md _meta/batch-reviews/ws-2-8-religion.md
  2. mkdir -p resources/WorldScripture/Part2/Chapter08-religion && mv staging/.../Chapter08-religion/ws-*.md resources/WorldScripture/Part2/Chapter08-religion/
  3. Delete staging dir per 9c5d7a3 convention.
  4. Commit; Ch9 (“History of God’s Providence”) follows.

Re-run command used (for reproducibility):

uv run scripts/clean_ws_chapter.py \
  --input resources-raw/WorldScripture/extracted/02-sin-and-salvation/chapter-8-religion.md \
  --output staging/ws-2-8-religion/resources/WorldScripture/Part2/ws-2-8-religion.md \
  --part 2 --part-title "Sin and Salvation" --chapter 8 --chapter-title "Religion" \
  --flag-log staging/ws-2-8-religion/flag-log.txt

Out of scope

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