Batch ws-2-6-evil-sin-and-the-human-fall — REVIEW

Content-cleanup variant per ADR-0009. Stage-2 cleanup of WS-II Chapter 6 (“Evil, Sin and the Human Fall”), Part 2 (“Sin and Salvation”). First Part 2 chapter; fifth Phase B chapter overall.

What changed

  • New (13 files): resources/WorldScripture/Part2/Chapter06-evil-sin-and-the-human-fall/ws-{NN-subtheme-slug}.md. Per-sub-theme files; line counts 58–249.
  • New directory: resources/WorldScripture/Part2/ (first Part 2 batch).
  • Intermediate (1 file, staging-only): staging/ws-2-6-evil-sin-and-the-human-fall/resources/WorldScripture/Part2/ws-2-6-evil-sin-and-the-human-fall.md.
  • Modified: scripts/clean_ws_chapter.py — widened the numbered-sub-sub-theme regex to accept #### depth (see below).

Sub-theme files produced

FileLinesSub-sub-themesSMM blocksFootnotes used
ws-01-the-human-fall.md249331–4
ws-02-cain-and-abel.md96015
ws-03-the-devil-and-his-activities.md247446–11
ws-04-sin.md1422212–16
ws-05-inherited-sin-and-karma.md1522217
ws-06-collective-and-historical-sin.md5801(none)
ws-07-selfish-desires-and-fallen-nature.md1802218–20
ws-08-the-war-within.md930121–22
ws-09-egoism-and-pride.md1320123
ws-10-ignorance-and-atheism.md1923324
ws-11-idolatry-and-materialism.md700125
ws-12-suffering.md1943326
ws-13-god-s-grief.md2173327–34

34 inline footnote markers converted (= Ch6’s full back-matter count in ws-notes.md). Per-file footnote refs == defs (total: 4+1+6+5+1+0+3+2+1+1+1+1+8 = 34).

Cleanup decisions (script-applied)

Same base transformations as Ch2–Ch5. One new Marker-artifact pattern Ch6 surfaced — scripts/clean_ws_chapter.py extended:

  • Numbered sub-sub-themes at H4 depth. Ch2 used ### *N. Title*, Ch3 used ## *N. Title*, and Ch6 uses #### *N. Title* (e.g. raw line 11: #### *1. Adam and Eve's Transgression*). The pre-existing NUMBERED_SUBSUB_RE only accepted ## or ###, so all 22 numbered sub-sub-theme headings in Ch6 were silently falling through to body text — and consequently every SMM block was rendering as ## SMM — {sub-theme} instead of ## SMM — {N. sub-sub-theme} (since state.subsub was never set). Widened the regex alternation to (?:####|###|##). After the fix, all 22 numbered sub-sub-themes detected and their 22 paired SMM blocks correctly tag the sub-sub-theme parent.

    Subtle check: SUBTHEME_RE = ^##\s+(.+?)\s*$ requires whitespace immediately after ##, so #### *N. Title* never matched it (the third # blocks the \s); no risk of double-matching after this widening.

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

No manual fixes needed

No SMM marker mashed into body lines this chapter (the inline-SMM flag from Ch4 didn’t fire). No ## Chapter N artifact. Three orphan-space footnote conversions (lines 309, 611, 1573 — the existing fallbacks handle them).

Flagged for human review

  1. #### heading-depth pattern is now the third variant the script handles. If a later chapter uses a fourth depth (e.g. #####) the regex needs widening again; the fix pattern is the same. So far depths observed: Ch2 → ###, Ch3 → ##, Ch6 → ####. (Ch4/Ch5 also surfaced as ## *N...* per Ch3.)

  2. Three orphan-space footnote conversions at lines 309/611/1573 — gated by expected_footnote so cannot be false positives.

  3. Blockquote strips (2 only — lowest count so far). Tung Chung-Shu equivalent absent; only the Buddhaghosa and LDS attributions tripped it. Consistent with prior chapters’ pattern.

  4. SMM number-prefix convention preserved per feedback_smm_prefix.

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

  6. First Part 2 batch — new directory resources/WorldScripture/Part2/ is created here. Frontmatter part: 2, part-title: "Sin and Salvation" written by the cleaner from CLI args.

Verification

head -16 resources/WorldScripture/Part2/Chapter06-evil-sin-and-the-human-fall/ws-01-the-human-fall.md
 
for f in resources/WorldScripture/Part2/Chapter06-evil-sin-and-the-human-fall/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 regression — all unchanged.
for C in 2 3 4 5; do
  uv run scripts/clean_ws_chapter.py \
    --input resources-raw/WorldScripture/extracted/01-god-and-creation/chapter-${C}-*.md \
    --output /tmp/ch${C}-recheck.md --part 1 --part-title "God and the Creation" --chapter ${C}
done
# Expected: Ch2 1..23, Ch3 1..15, Ch4 1..16, Ch5 1..37.

Finalize plan

When user approves:

  1. cp staging/ws-2-6-evil-sin-and-the-human-fall/REVIEW.md _meta/batch-reviews/ws-2-6-evil-sin-and-the-human-fall.md
  2. mkdir -p resources/WorldScripture/Part2/Chapter06-evil-sin-and-the-human-fall && mv staging/.../Chapter06-.../ws-*.md resources/WorldScripture/Part2/Chapter06-evil-sin-and-the-human-fall/
  3. Delete staging dir per 9c5d7a3 convention.
  4. Commit; Ch7 (“Salvation, Liberation, Enlightenment”) follows.

Out of scope

  • Chapters 7–22 (16 batches remaining: Ch7–10 Part 2, Ch11–18 Part 3, Ch19–22 Part 4).
  • Front/back-matter (Phase C).
  • Atomization (stage-3).