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
| File | Lines | Sub-sub-themes | SMM blocks | Footnotes used |
|---|---|---|---|---|
ws-01-the-human-fall.md | 249 | 3 | 3 | 1–4 |
ws-02-cain-and-abel.md | 96 | 0 | 1 | 5 |
ws-03-the-devil-and-his-activities.md | 247 | 4 | 4 | 6–11 |
ws-04-sin.md | 142 | 2 | 2 | 12–16 |
ws-05-inherited-sin-and-karma.md | 152 | 2 | 2 | 17 |
ws-06-collective-and-historical-sin.md | 58 | 0 | 1 | (none) |
ws-07-selfish-desires-and-fallen-nature.md | 180 | 2 | 2 | 18–20 |
ws-08-the-war-within.md | 93 | 0 | 1 | 21–22 |
ws-09-egoism-and-pride.md | 132 | 0 | 1 | 23 |
ws-10-ignorance-and-atheism.md | 192 | 3 | 3 | 24 |
ws-11-idolatry-and-materialism.md | 70 | 0 | 1 | 25 |
ws-12-suffering.md | 194 | 3 | 3 | 26 |
ws-13-god-s-grief.md | 217 | 3 | 3 | 27–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-existingNUMBERED_SUBSUB_REonly 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}(sincestate.subsubwas 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
-
####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.) -
Three orphan-space footnote conversions at lines 309/611/1573 — gated by
expected_footnoteso cannot be false positives. -
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.
-
SMM number-prefix convention preserved per feedback_smm_prefix.
-
Tradition-tag italics kept as-extracted per pilot convention.
-
First Part 2 batch — new directory
resources/WorldScripture/Part2/is created here. Frontmatterpart: 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:
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.mdmkdir -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/- Delete staging dir per 9c5d7a3 convention.
- 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).