Batch ws-2-7-salvation-liberation-enlightenment — REVIEW

Content-cleanup variant per ADR-0009. Stage-2 cleanup of WS-II Chapter 7 (“Salvation – Liberation – Enlightenment”), Part 2 (“Sin and Salvation”). Sixth Phase B chapter. Largest by sub-theme count tied (15) and second-largest by footnote count (48).

What changed

  • New (15 files): resources/WorldScripture/Part2/Chapter07-salvation-liberation-enlightenment/ws-{NN-subtheme-slug}.md. Per-sub-theme files; line counts 97–222.
  • Intermediate (1 file, staging-only): staging/ws-2-7-salvation-liberation-enlightenment/resources/WorldScripture/Part2/ws-2-7-salvation-liberation-enlightenment.md.
  • Modified: scripts/clean_ws_chapter.py — widened the inline-footnote-marker regexes for two new Ch7 patterns (see below).

Sub-theme files produced

FileLinesSub-sub-themesSMM blocksFootnotes used
ws-01-grace.md161221–4
ws-02-forgiveness.md121225–8
ws-03-atonement.md97229–12
ws-04-enlightenment.md1653313–14
ws-05-liberation.md1452215–18
ws-06-emptiness-nirvana.md1850119–22
ws-07-spiritual-union.md1763323
ws-08-healing.md1562224–26
ws-09-the-refining-fire.md1362227
ws-10-help-and-deliverance.md2222228–32
ws-11-reversal-and-restoration.md2133333–38
ws-12-rebirth.md1483339–41
ws-13-resurrection.md1222242
ws-14-eternal-life.md1392243–44
ws-15-universal-salvation.md1270145–48

48 inline footnote markers converted (= Ch7’s full back-matter count in ws-notes.md). Per-file footnote refs == defs across every sub-theme file (sum: 4+4+4+2+4+4+1+3+1+5+6+3+1+2+4 = 48).

Cleanup decisions (script-applied)

Same base transformations as Ch2–Ch6. Two new patterns Ch7 surfaced — scripts/clean_ws_chapter.py extended:

  • Italics-close before bare digit: *(Mahikari24)*. Raw line ~957: Goseigen *(Mahikari24)*. The tradition-tag closing * precedes the digit, and the closing ) follows it. The primary regex’s lookbehind didn’t include *, and the lookahead didn’t include ) or * — so this footnote (and every one after it) wasn’t detected. Added * to the primary lookbehind class and \)|\* to the primary lookahead. Caught footnote 24 and unblocked the chain. No false-positive risk: the converter is gated on n == expected_footnote.

  • Sentence-terminator + space before bare digit: …World]? 31. Raw line ~1289 ends a Buddhist citation passage with Kuan Shih Yin [Hearer of the Cries of the World]? 31. The bracket + question mark + space + digit was not matched by any existing pattern: primary requires no space between lookbehind char and digit; period-fallback required a literal period (not ?/!); post-quote-fallback required a quote; post-paren-fallback required ) before space. Generalized the period-fallback’s lookbehind from <char>.\s to <char>[.!?]\s, and added ] to the char1 class to handle bracket-wrapped citations. Caught footnote 31 and unblocked the rest of the chain.

Ch2/Ch3/Ch4/Ch5/Ch6 regression-tested unchanged on all five.

No manual fixes needed

No SMM marker mashed into body lines this chapter. No ## Chapter N artifact. Six orphan-space footnote conversions (lines 37, 251, 995, 1289, 1455, 1679) — the existing/extended fallbacks handle them.

Flagged for human review

  1. Six orphan-space footnote conversions — gated by expected_footnote so cannot be false positives.

  2. Blockquote strips (6 — high but consistent with Ch3’s volume). All six are attribution lines Marker wrapped in >. No new pattern.

  3. Largest chapter by sub-theme count tied with Ch5 — 15 sub-themes, 32 SMM blocks, 48 footnotes, ~213 KB cleaned.

  4. SMM number-prefix convention preserved per feedback_smm_prefix.

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

  6. Title contains en-dashesSalvation – Liberation – Enlightenment uses U+2013 between words, preserved as-extracted into frontmatter. Quartz rendering should handle these fine; flagged here in case a downstream slug-generator misbehaves.

Verification

head -16 resources/WorldScripture/Part2/Chapter07-salvation-liberation-enlightenment/ws-01-grace.md
 
for f in resources/WorldScripture/Part2/Chapter07-salvation-liberation-enlightenment/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/3/4/5/6 regression — all unchanged.

Finalize plan

When user approves:

  1. cp staging/ws-2-7-salvation-liberation-enlightenment/REVIEW.md _meta/batch-reviews/ws-2-7-salvation-liberation-enlightenment.md
  2. mkdir -p resources/WorldScripture/Part2/Chapter07-salvation-liberation-enlightenment && mv staging/.../Chapter07-.../ws-*.md resources/WorldScripture/Part2/Chapter07-salvation-liberation-enlightenment/
  3. Delete staging dir per 9c5d7a3 convention.
  4. Commit; Ch8 (“Religion”) follows.

Out of scope

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