Batch ws-1-2-truth-and-universal-law — REVIEW
Content-cleanup variant per ADR-0009. Stage-2 cleanup of WS-II Chapter 2 (“Truth and Universal Law”), Part 1 (“God and the Creation”). First Phase B chapter — first batch to use the full resources/WorldScripture/ws-notes.md (committed in e7a993b) for footnote backfill.
What changed
- New (8 files):
resources/WorldScripture/Part1/Chapter02-truth-and-universal-law/ws-{NN-subtheme-slug}.md. Per-sub-theme files; line counts 81–255, total ~1,220 lines across the 8. - Intermediate (1 file, kept in staging only — not moved to final per pilot precedent):
staging/ws-1-2-truth-and-universal-law/resources/WorldScripture/Part1/ws-1-2-truth-and-universal-law.md— splitter’s input. - New script:
scripts/clean_ws_chapter.py— deterministic stage-2 cleaner. Replaces the per-chapter manual AI cleanup of the pilot with a reproducible script that handles the patterned transformations (heading re-leveling, italics strip, blockquote unwrap, SMM rename, footnote-marker conversion, word-break fixes) and writes a flag-log for the few cases that need human judgment.
Sub-theme files produced
Filenames carry a 2-digit ordinal prefix (ws-NN-) so alphabetical sort matches print order.
| File | Lines | Sub-sub-themes | SMM blocks | Footnotes used |
|---|---|---|---|---|
ws-01-eternal-truth.md | 206 | 3 | 3 | 1–3 |
ws-02-the-moral-law.md | 155 | 2 | 2 | 4–5 |
ws-03-the-golden-rule.md | 86 | 0 | 1 | 6 |
ws-04-the-ten-commandments.md | 153 | 0 | 1 | 7–10 |
ws-05-beyond-the-law.md | 96 | 0 | 1 | (none) |
ws-06-duality.md | 255 | 3 | 3 | 11–16 |
ws-07-interdependence.md | 81 | 0 | 1 | 17, 19 |
ws-08-cause-and-effect.md | 188 | 2 | 2 | 18, 20–23 |
Per-file footnote scoping (markdown footnotes are file-local) verified: body [^N] refs match [^N]: definitions in every file. Total inline markers: 23 (= ch2’s full count from the back-matter notes).
Cleanup decisions (applied deterministically by scripts/clean_ws_chapter.py)
- Chapter title (
## Truth and Universal Law, raw line 1): dropped. Lives in per-file frontmattertitle+chapter-title. - Sub-themes (8 of them: Eternal Truth, The Moral Law, The Golden Rule, The Ten Commandments, Beyond the Law, Duality, Interdependence, Cause and Effect): kept as H1 (
# Title) — the splitter slices on these. - Numbered sub-sub-themes (10 total across 4 sub-themes):
### *N. Title*→## N. Title. Italics stripped, depth dropped one. Number prefix preserved per the pilot convention (still under review: confirm/strip). - SMM blocks (14 total): rewritten as
## SMM — {parent}. Parent = most-recent numbered sub-sub-theme (withN.prefix preserved) for sub-themes that have sub-sub-themes; or the sub-theme title for the four sub-themes without sub-sub-themes (Golden Rule, Ten Commandments, Beyond the Law, Interdependence). Three SMM-block formats Marker produced — all caught:#### *Teachings of Sun Myung Moon*,### *Teachings of Sun Myung Moon*, and the bare*Teachings of Sun Myung Moon*(no heading marker at all, at raw lines 791 and 871). - Blockquote wrappers (4 stray): Marker wrapped four attribution lines in
>. Pilot stripped these; the script does the same and flags each. The four:Immanuel Kant,Majjhima Nikaya 3.251-52,Chou Tun-i,Shantideva(all author/citation lines following long scripture passages). - Inline footnote markers: bare digits after a word/punctuation (e.g.
God.1,child;2,Milan4) →[^N]. Uses sequence validation (each match must equal the next expected number 1, 2, …) and excludes verse-reference patterns likeRig Veda 10.85.1/Qur'an 42.11/Genesis Rabbah 13.13via negative lookbehind on<digit>.. One orphan-space marker handled via fallback (raw line 1021Ill. 23). - Word-break artifacts:
birth-anddeath→birth-and-deathapplied. (No other word-break artifacts in this chapter’s text — script’s shared dictionary withclean_ws_notes.pyis conservative.) - Frontmatter: synthesised by the splitter from the chapter file’s frontmatter + per-file
subthemeslug derived from the H1 title.
Flagged for human review
-
SMM slug still includes the
N.number prefix on sub-sub-theme SMM blocks (e.g.## SMM — 1. In the Beginning Was the Word). This was flagged on the pilot as an unresolved question: keep prefix, or strip to## SMM — In the Beginning Was the Word. Script preserves the pilot’s choice. Confirm. -
Mid-paragraph hard breaks from Marker preserved as-is (consistent with pilot).
-
Tradition-tag italics kept as-extracted (e.g.
Rig Veda 10.85.1 *(Hinduism)*). Same convention as pilot. African Traditional Religions attributions also italicised inconsistently in raw; left untouched. -
>blockquote strips (4) — all four were author/attribution lines. None should reasonably remain blockquoted. Script auto-strips and flags; the four flags inflag-log.txtcorrespond to the cases. -
Note 23’s orphan-space form (raw
Ill. 23at line 1021) — the only marker in this chapter where Marker inserted a space between the sentence-terminator and the digit. Script’s fallback regex caught it; flagged for visual confirmation. -
Generality of the script. This is the first chapter to use
clean_ws_chapter.py. Patterns observed in chapters 3–22 may differ (e.g. unusual SMM-block forms, more aggressive Marker artifacts). Each batch’s flag-log will surface deviations; the script will need extending if a new pattern recurs.
Verification
# Frontmatter validates.
head -16 resources/WorldScripture/Part1/Chapter02-truth-and-universal-law/ws-01-eternal-truth.md
# Heading structure (each file: zero or more `## N. Title` numbered sub-sub-themes,
# each followed by `## SMM — N. Title`; for files without numbered sub-sub-themes,
# one bare `## SMM — {Sub-theme}` block).
for f in resources/WorldScripture/Part1/Chapter02-truth-and-universal-law/ws-*.md; do
echo "=== $(basename $f) ==="
grep -E '^## ' "$f"
done
# Per-file footnote ref/def match.
for f in resources/WorldScripture/Part1/Chapter02-truth-and-universal-law/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
# Quartz preview.
cd _meta/quartz && npm run serve
# Navigate: WorldScripture → Part1 → Chapter02-truth-and-universal-law → ws-01-eternal-truthFinalize plan
When user approves this batch:
cp staging/ws-1-2-truth-and-universal-law/REVIEW.md _meta/batch-reviews/ws-1-2-truth-and-universal-law.mdmv staging/ws-1-2-truth-and-universal-law/resources/WorldScripture/Part1/Chapter02-truth-and-universal-law/ws-*.md resources/WorldScripture/Part1/Chapter02-truth-and-universal-law/- Delete
staging/ws-1-2-truth-and-universal-law/per ADR-0009 + CONTEXT convention (9c5d7a3). Stage-2 intermediatews-1-2-truth-and-universal-law.mdlives in the staging commit’s git history. - Commit.
- Proceed to Ch3 (
chapter-3-the-purpose-of-human-life.md).
Out of scope (deferred)
- Chapters 3–22 (20 batches remaining).
- Front/back-matter at root level (Preface, Invocation, list-of-sources) — Phase C.
- Atomization (stage-3, separate batches).